|
|
@ -140,6 +140,7 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
|
complaintNoticeDetail.setCreateBy(loginName); |
|
|
|
complaintNoticeDetail.setCreateTime(DateUtils.getNowDate()); |
|
|
|
String makeNo = complaintNoticeDetail.getMakeNo(); |
|
|
|
int enterpriseSum = 0; |
|
|
|
//保存信息到AftersalesComplaintNotice数据表中
|
|
|
|
complaintNotice.setComplaintNoticeCode(newCode); |
|
|
|
complaintNotice.setCreateBy(loginName); |
|
|
@ -171,9 +172,12 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
|
// int totalQuantity = warehouseOutOrderMapper.sumOutOrderQuantityByMakeNo(makeNo);
|
|
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
|
complaintNotice.setEnterpriseSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
|
String snCodes = aftersalesMaterialVO.getSnCode(); |
|
|
|
String[] snCodeArray = snCodes.split(","); |
|
|
|
enterpriseSum += snCodeArray.length; |
|
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
|
} |
|
|
|
complaintNotice.setEnterpriseSum(enterpriseSum); |
|
|
|
} |
|
|
|
complaintNoticeMapper.insertAftersalesComplaintNotice(complaintNotice); |
|
|
|
return 1; |
|
|
@ -191,6 +195,7 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
|
{ |
|
|
|
AftersalesComplaintNotice aftersalesComplaintNotice = new AftersalesComplaintNotice(); |
|
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
int enterpriseSum = 0; |
|
|
|
//更新主表内容
|
|
|
|
aftersalesComplaintNotice.setComplaintNoticeCode(aftersalesComplaintNoticeDetail.getComplaintNoticeCode()); |
|
|
|
aftersalesComplaintNotice.setUpdateBy(loginName); |
|
|
@ -201,15 +206,13 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
|
aftersalesComplaintNotice.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); |
|
|
|
aftersalesComplaintNotice.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); |
|
|
|
aftersalesComplaintNotice.setClosingProcedures(aftersalesComplaintNoticeDetail.getClosingProcedures()); |
|
|
|
complaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice); |
|
|
|
String complaintNoticeCode = aftersalesComplaintNoticeDetail.getComplaintNoticeCode(); |
|
|
|
List<AftersalesMaterialVO> aftersalesMaterialVOs = aftersalesComplaintNoticeDetail.getAftersalesMaterialVOs(); |
|
|
|
//如果前面相关物料信息为空
|
|
|
|
if (StringUtils.isEmpty(aftersalesMaterialVOs)){ |
|
|
|
//删除子表中的数据
|
|
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
|
return result; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
//如果有物料信息
|
|
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
|
for (AftersalesMaterialVO aftersalesMaterialVO : aftersalesMaterialVOs) { |
|
|
@ -237,8 +240,14 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
|
complaintNoticeDetail.setClosingProcedures("1"); |
|
|
|
String snCodes = aftersalesMaterialVO.getSnCode(); |
|
|
|
String[] snCodeArray = snCodes.split(","); |
|
|
|
enterpriseSum += snCodeArray.length; |
|
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
|
} |
|
|
|
} |
|
|
|
aftersalesComplaintNotice.setEnterpriseSum(enterpriseSum); |
|
|
|
complaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
|
|
|
|