|
|
|
@ -253,31 +253,31 @@ public class IssureNotifyServiceImpl implements IssureNotifyService { |
|
|
|
@Transactional |
|
|
|
public void deleteNotifyMaterial(SOIssueNotifyOrderMaterialListData data){ |
|
|
|
List<SOIssueNotifyOrderMaterialListData> checkDeleteMaterial=issureNotifyMapper.checkDeleteMaterial(data); |
|
|
|
if(checkDeleteMaterial.size()==0){ |
|
|
|
if(checkDeleteMaterial.isEmpty()){ |
|
|
|
throw new RuntimeException("该记录已不存在!"); |
|
|
|
} |
|
|
|
if(BigDecimalUtils.compareToZero(checkDeleteMaterial.get(0).getQtyToIssueOriginal())>0){ |
|
|
|
throw new RuntimeException("该记录已有领料记录无法删除!"); |
|
|
|
} |
|
|
|
issureNotifyMapper.deleteNotifyMaterial(data); |
|
|
|
|
|
|
|
IssueNotifyChangeLog issueNotifyChangeLog=new IssueNotifyChangeLog(); |
|
|
|
List<SOIssueNotifyOrderList> checkList=issureNotifyMapper.getSOIssueNotifyOrderListData(data); |
|
|
|
if(checkList.size()>0){ |
|
|
|
issueNotifyChangeLog.setsOOrderNo(checkList.get(0).getsOOrderNo()); |
|
|
|
issueNotifyChangeLog.setSeqNo(checkList.get(0).getSeqNo()); |
|
|
|
|
|
|
|
} |
|
|
|
issueNotifyChangeLog.setSite(data.getSite()); |
|
|
|
issueNotifyChangeLog.setNotifyNo(data.getNotifyNo()); |
|
|
|
issueNotifyChangeLog.setItemNo(data.getItemNo()); |
|
|
|
issueNotifyChangeLog.setComponentPartNo(data.getComponentPartNo()); |
|
|
|
issueNotifyChangeLog.setQtyToIssue(data.getQtyToIssue()); |
|
|
|
issueNotifyChangeLog.setUpdateBy(String.valueOf(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername())); |
|
|
|
issueNotifyChangeLog.setUpdateType("删除申请单材料明细"); |
|
|
|
issueNotifyChangeLog.setUpdateDate(new Date()); |
|
|
|
issueNotifyChangeLog.setIssueType(data.getIssueType()); |
|
|
|
issureNotifyMapper.saveIssueNotifyChangeLog(issueNotifyChangeLog); |
|
|
|
issureNotifyMapper.deleteNotifyMaterial2(data); |
|
|
|
|
|
|
|
// IssueNotifyChangeLog issueNotifyChangeLog=new IssueNotifyChangeLog(); |
|
|
|
// List<SOIssueNotifyOrderList> checkList=issureNotifyMapper.getSOIssueNotifyOrderListData(data); |
|
|
|
// if(!checkList.isEmpty()){ |
|
|
|
// issueNotifyChangeLog.setsOOrderNo(checkList.get(0).getsOOrderNo()); |
|
|
|
// issueNotifyChangeLog.setSeqNo(checkList.get(0).getSeqNo()); |
|
|
|
// |
|
|
|
// } |
|
|
|
// issueNotifyChangeLog.setSite(data.getSite()); |
|
|
|
// issueNotifyChangeLog.setNotifyNo(data.getNotifyNo()); |
|
|
|
// issueNotifyChangeLog.setItemNo(data.getItemNo()); |
|
|
|
// issueNotifyChangeLog.setComponentPartNo(data.getComponentPartNo()); |
|
|
|
// issueNotifyChangeLog.setQtyToIssue(data.getQtyToIssue()); |
|
|
|
// issueNotifyChangeLog.setUpdateBy(String.valueOf(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername())); |
|
|
|
// issueNotifyChangeLog.setUpdateType("删除申请单材料明细"); |
|
|
|
// issueNotifyChangeLog.setUpdateDate(new Date()); |
|
|
|
// issueNotifyChangeLog.setIssueType(data.getIssueType()); |
|
|
|
// issureNotifyMapper.saveIssueNotifyChangeLog(issueNotifyChangeLog); |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
|