|
|
@ -120,6 +120,12 @@ public class ErpMaterialServiceImpl implements IErpMaterialService |
|
|
|
@Autowired |
|
|
|
private SalesEstimateDetailMapper estimateDetailMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BaseRequisitioningOrderChildMapper requisitioningOrderChildMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BaseEmpRequisiteOrderChildMapper requisiteOrderChildMapper; |
|
|
|
|
|
|
|
|
|
|
|
private final static String RMB = "1"; //RMB
|
|
|
|
|
|
|
@ -519,6 +525,19 @@ public class ErpMaterialServiceImpl implements IErpMaterialService |
|
|
|
throw new BusinessException("该物料信息被开发修改单引用,无法作废!"); |
|
|
|
} |
|
|
|
|
|
|
|
//是否被员工请购单引用
|
|
|
|
int countRequisitioningOrderChild = requisitioningOrderChildMapper.checkMaterialIsReferencedByRequisitioningOrderChild(erpMaterialVo.getMaterialNo()); |
|
|
|
if(countRequisitioningOrderChild>0){ |
|
|
|
throw new BusinessException("该物料信息被请购单引用,无法作废!"); |
|
|
|
} |
|
|
|
|
|
|
|
//是否被员工领料单引用
|
|
|
|
int countRequisiteOrderChild = requisiteOrderChildMapper.checkMaterialIsReferencedByRequisiteOrderChild(erpMaterialVo.getMaterialNo()); |
|
|
|
if(countRequisiteOrderChild>0){ |
|
|
|
throw new BusinessException("该物料信息被员工领料单引用,无法作废!"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SysUser sysUser = ShiroUtils.getSysUser(); |
|
|
|
List<SysPost> sysPostsList = sysPostService.selectPostsByUserId(sysUser.getUserId()); |
|
|
|
String operPeople = sysUser.getDept().getDeptName() + "/" + sysPostsList.get(0).getPostName()+"/" + sysUser.getUserName(); |
|
|
|