feat(ebom): 添加批量查询物料信息的接口
This commit is contained in:
parent
4f74c84fd7
commit
84ea802dff
|
|
@ -13,6 +13,7 @@ import com.nflg.product.bomnew.pojo.dto.*;
|
|||
import com.nflg.product.bomnew.pojo.query.BomExceptionQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomMaterialQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.QueryMaterialsQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.*;
|
||||
import com.nflg.product.bomnew.util.EecExcelUtil;
|
||||
|
|
@ -20,7 +21,6 @@ import com.nflg.product.bomnew.util.VUtils;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import nflg.product.common.constant.STATE;
|
||||
import nflg.product.common.dto.LoginUserInfoDTO;
|
||||
import nflg.product.common.vo.ResultVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -451,4 +451,10 @@ public class EbomApi extends BaseApi {
|
|||
public ResultVO<List<BomOriginalListVO>> getSource(@Valid @RequestParam("rowId") @NotNull Long rowId) {
|
||||
return ResultVO.success(bomNewEbomParentService.getSource(rowId));
|
||||
}
|
||||
|
||||
@PostMapping("queryMaterials")
|
||||
@ApiOperation("批量查询物料信息")
|
||||
public ResultVO<List<BaseMaterialVO>> queryMaterials(@Valid @RequestBody QueryMaterialsQuery query) {
|
||||
return ResultVO.success(bomNewEbomParentService.queryMaterials(query));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.nflg.product.base.core.conmon.util.SessionUtil;
|
|||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.*;
|
||||
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
||||
import com.nflg.product.bomnew.mapper.master.MaterialMainMapper;
|
||||
import com.nflg.product.bomnew.pojo.dto.*;
|
||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.T1DTO;
|
||||
|
|
@ -27,6 +28,7 @@ import com.nflg.product.bomnew.pojo.entity.*;
|
|||
import com.nflg.product.bomnew.pojo.query.BomExceptionQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomMaterialQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
|
||||
import com.nflg.product.bomnew.pojo.query.QueryMaterialsQuery;
|
||||
import com.nflg.product.bomnew.pojo.vo.*;
|
||||
import com.nflg.product.bomnew.service.domain.EBom.*;
|
||||
import com.nflg.product.bomnew.util.*;
|
||||
|
|
@ -2347,4 +2349,14 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<BaseMaterialVO> queryMaterials(QueryMaterialsQuery query) {
|
||||
if (query.getType() == 0) {
|
||||
return SpringUtil.getBean(MaterialMainMapper.class).getMaterialBaseInfo(query.getKeys());
|
||||
} else if (query.getType() == 1) {
|
||||
return SpringUtil.getBean(MaterialMainMapper.class).getMaterialByDrawingNo(query.getKeys());
|
||||
} else {
|
||||
throw new NflgBusinessException(STATE.BusinessError, "无效的类别");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue