物料相关
This commit is contained in:
@@ -148,8 +148,8 @@ public class ErpMaterialController implements BusinessControllerMarker {
|
||||
@GetMapping("/getErpMaterialByMainMaterialById")
|
||||
@Operation(summary = "通过主物料查询子物料信息")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterial(@RequestParam("id") Long mainMaterialId) {
|
||||
List<ErpMaterialRespVO> erpMaterial = erpMaterialService.getErpMaterialByMainMaterial(mainMaterialId);
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterial(@RequestParam("id") Long mainMaterialId, @RequestParam(value = "deptId",required = false) String companyCode) {
|
||||
List<ErpMaterialRespVO> erpMaterial = erpMaterialService.getErpMaterialByMainMaterial(mainMaterialId, companyCode);
|
||||
return success(BeanUtils.toBean(erpMaterial, ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ public interface ErpErpMaterialCorrService {
|
||||
List<ErpMaterialCorrRspVO> create(@Valid ErpMaterialCorrSaveReqVO reqVO);
|
||||
void deleteBatch(DeleteErpMaterialCorrVO reqVO);
|
||||
|
||||
List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterial(List<Long> mainMaterialIds);
|
||||
List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterial(List<Long> mainMaterialIds, String companyCode);
|
||||
|
||||
List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterialByCode(String code);
|
||||
List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterialByCode(String code,String companyCode);
|
||||
|
||||
List<ErpMaterialCorrRspVO> getErpMaterialByCompanyCode(String CompanyCode);
|
||||
}
|
||||
|
||||
@@ -48,13 +48,19 @@ public class ErpErpMaterialCorrServiceImpl implements ErpErpMaterialCorrService{
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterial(List<Long> mainMaterialIds) {
|
||||
return BeanUtils.toBean( erpErpMaterialCorrMapper.selectList(ErpMaterialCorrDO::getMaterialParentId, mainMaterialIds), ErpMaterialCorrRspVO.class);
|
||||
public List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterial(List<Long> mainMaterialIds, String companyCode) {
|
||||
LambdaQueryWrapperX<ErpMaterialCorrDO> erpMaterialCorrDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
||||
erpMaterialCorrDOLambdaQueryWrapperX.eq(ErpMaterialCorrDO::getMaterialParentId, mainMaterialIds);
|
||||
erpMaterialCorrDOLambdaQueryWrapperX.eqIfPresent(ErpMaterialCorrDO::getCompanyCode, companyCode);
|
||||
return BeanUtils.toBean( erpErpMaterialCorrMapper.selectList(erpMaterialCorrDOLambdaQueryWrapperX), ErpMaterialCorrRspVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterialByCode(String code) {
|
||||
return BeanUtils.toBean(erpErpMaterialCorrMapper.selectList(ErpMaterialCorrDO::getMaterialParentCode, code), ErpMaterialCorrRspVO.class);
|
||||
public List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterialByCode(String code, String companyCode) {
|
||||
LambdaQueryWrapperX<ErpMaterialCorrDO> erpMaterialCorrDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
||||
erpMaterialCorrDOLambdaQueryWrapperX.eq(ErpMaterialCorrDO::getMaterialParentCode, code);
|
||||
erpMaterialCorrDOLambdaQueryWrapperX.eqIfPresent(ErpMaterialCorrDO::getCompanyCode, companyCode);
|
||||
return BeanUtils.toBean(erpErpMaterialCorrMapper.selectList(erpMaterialCorrDOLambdaQueryWrapperX), ErpMaterialCorrRspVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,7 +75,7 @@ public interface ErpMaterialService {
|
||||
|
||||
ErpMaterialDO getErpMaterialById(Long id);
|
||||
|
||||
List<ErpMaterialRespVO> getErpMaterialByMainMaterial(Long mainMaterialId);
|
||||
List<ErpMaterialRespVO> getErpMaterialByMainMaterial(Long mainMaterialId, String companyCode);
|
||||
|
||||
PageResult<ErpMaterialDO> getErpMaterialByApi( MaterialInfomationApiVO vo);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user