|
@ -140,6 +140,7 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
complaintNoticeDetail.setCreateBy(loginName); |
|
|
complaintNoticeDetail.setCreateBy(loginName); |
|
|
complaintNoticeDetail.setCreateTime(DateUtils.getNowDate()); |
|
|
complaintNoticeDetail.setCreateTime(DateUtils.getNowDate()); |
|
|
String makeNo = complaintNoticeDetail.getMakeNo(); |
|
|
String makeNo = complaintNoticeDetail.getMakeNo(); |
|
|
|
|
|
int enterpriseSum = 0; |
|
|
//保存信息到AftersalesComplaintNotice数据表中
|
|
|
//保存信息到AftersalesComplaintNotice数据表中
|
|
|
complaintNotice.setComplaintNoticeCode(newCode); |
|
|
complaintNotice.setComplaintNoticeCode(newCode); |
|
|
complaintNotice.setCreateBy(loginName); |
|
|
complaintNotice.setCreateBy(loginName); |
|
@ -171,10 +172,13 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
// int totalQuantity = warehouseOutOrderMapper.sumOutOrderQuantityByMakeNo(makeNo);
|
|
|
// int totalQuantity = warehouseOutOrderMapper.sumOutOrderQuantityByMakeNo(makeNo);
|
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
complaintNotice.setEnterpriseSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
String snCodes = aftersalesMaterialVO.getSnCode(); |
|
|
|
|
|
String[] snCodeArray = snCodes.split(","); |
|
|
|
|
|
enterpriseSum += snCodeArray.length; |
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
} |
|
|
} |
|
|
} |
|
|
complaintNotice.setEnterpriseSum(enterpriseSum); |
|
|
|
|
|
} |
|
|
complaintNoticeMapper.insertAftersalesComplaintNotice(complaintNotice); |
|
|
complaintNoticeMapper.insertAftersalesComplaintNotice(complaintNotice); |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
@ -191,6 +195,7 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
{ |
|
|
{ |
|
|
AftersalesComplaintNotice aftersalesComplaintNotice = new AftersalesComplaintNotice(); |
|
|
AftersalesComplaintNotice aftersalesComplaintNotice = new AftersalesComplaintNotice(); |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
|
|
int enterpriseSum = 0; |
|
|
//更新主表内容
|
|
|
//更新主表内容
|
|
|
aftersalesComplaintNotice.setComplaintNoticeCode(aftersalesComplaintNoticeDetail.getComplaintNoticeCode()); |
|
|
aftersalesComplaintNotice.setComplaintNoticeCode(aftersalesComplaintNoticeDetail.getComplaintNoticeCode()); |
|
|
aftersalesComplaintNotice.setUpdateBy(loginName); |
|
|
aftersalesComplaintNotice.setUpdateBy(loginName); |
|
@ -201,44 +206,48 @@ public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesCo |
|
|
aftersalesComplaintNotice.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); |
|
|
aftersalesComplaintNotice.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); |
|
|
aftersalesComplaintNotice.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); |
|
|
aftersalesComplaintNotice.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); |
|
|
aftersalesComplaintNotice.setClosingProcedures(aftersalesComplaintNoticeDetail.getClosingProcedures()); |
|
|
aftersalesComplaintNotice.setClosingProcedures(aftersalesComplaintNoticeDetail.getClosingProcedures()); |
|
|
complaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice); |
|
|
|
|
|
String complaintNoticeCode = aftersalesComplaintNoticeDetail.getComplaintNoticeCode(); |
|
|
String complaintNoticeCode = aftersalesComplaintNoticeDetail.getComplaintNoticeCode(); |
|
|
List<AftersalesMaterialVO> aftersalesMaterialVOs = aftersalesComplaintNoticeDetail.getAftersalesMaterialVOs(); |
|
|
List<AftersalesMaterialVO> aftersalesMaterialVOs = aftersalesComplaintNoticeDetail.getAftersalesMaterialVOs(); |
|
|
//如果前面相关物料信息为空
|
|
|
//如果前面相关物料信息为空
|
|
|
if (StringUtils.isEmpty(aftersalesMaterialVOs)){ |
|
|
if (StringUtils.isEmpty(aftersalesMaterialVOs)){ |
|
|
//删除子表中的数据
|
|
|
//删除子表中的数据
|
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
return result; |
|
|
}else{ |
|
|
} |
|
|
//如果有物料信息
|
|
|
//如果有物料信息
|
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
int result = aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByCode(complaintNoticeCode); |
|
|
for (AftersalesMaterialVO aftersalesMaterialVO : aftersalesMaterialVOs) { |
|
|
for (AftersalesMaterialVO aftersalesMaterialVO : aftersalesMaterialVOs) { |
|
|
AftersalesComplaintNoticeDetail complaintNoticeDetail = new AftersalesComplaintNoticeDetail(); |
|
|
AftersalesComplaintNoticeDetail complaintNoticeDetail = new AftersalesComplaintNoticeDetail(); |
|
|
complaintNoticeDetail.setComplaintNoticeCode(complaintNoticeCode); |
|
|
complaintNoticeDetail.setComplaintNoticeCode(complaintNoticeCode); |
|
|
complaintNoticeDetail.setCreateBy(aftersalesComplaintNoticeDetail.getCreateBy()); |
|
|
complaintNoticeDetail.setCreateBy(aftersalesComplaintNoticeDetail.getCreateBy()); |
|
|
complaintNoticeDetail.setCreateTime(aftersalesComplaintNoticeDetail.getCreateTime()); |
|
|
complaintNoticeDetail.setCreateTime(aftersalesComplaintNoticeDetail.getCreateTime()); |
|
|
complaintNoticeDetail.setUpdateBy(loginName); |
|
|
complaintNoticeDetail.setUpdateBy(loginName); |
|
|
complaintNoticeDetail.setUpdateTime(DateUtils.getNowDate()); |
|
|
complaintNoticeDetail.setUpdateTime(DateUtils.getNowDate()); |
|
|
complaintNoticeDetail.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); |
|
|
complaintNoticeDetail.setCustomerId(aftersalesComplaintNoticeDetail.getCustomerId()); |
|
|
complaintNoticeDetail.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); |
|
|
complaintNoticeDetail.setCustomerName(aftersalesComplaintNoticeDetail.getCustomerName()); |
|
|
complaintNoticeDetail.setEmergencyDegree(aftersalesComplaintNoticeDetail.getEmergencyDegree()); |
|
|
complaintNoticeDetail.setEmergencyDegree(aftersalesComplaintNoticeDetail.getEmergencyDegree()); |
|
|
complaintNoticeDetail.setMakeNo(aftersalesComplaintNoticeDetail.getMakeNo()); |
|
|
complaintNoticeDetail.setMakeNo(aftersalesComplaintNoticeDetail.getMakeNo()); |
|
|
complaintNoticeDetail.setRemark(aftersalesComplaintNoticeDetail.getRemark()); |
|
|
complaintNoticeDetail.setRemark(aftersalesComplaintNoticeDetail.getRemark()); |
|
|
complaintNoticeDetail.setMaterialType(aftersalesMaterialVO.getMaterialType()); |
|
|
complaintNoticeDetail.setMaterialType(aftersalesMaterialVO.getMaterialType()); |
|
|
complaintNoticeDetail.setMaterialUnit(aftersalesMaterialVO.getMaterialUnit()); |
|
|
complaintNoticeDetail.setMaterialUnit(aftersalesMaterialVO.getMaterialUnit()); |
|
|
complaintNoticeDetail.setMaterialProcessMethod(aftersalesMaterialVO.getMaterialProcessMethod()); |
|
|
complaintNoticeDetail.setMaterialProcessMethod(aftersalesMaterialVO.getMaterialProcessMethod()); |
|
|
complaintNoticeDetail.setMaterialName(aftersalesMaterialVO.getMaterialName()); |
|
|
complaintNoticeDetail.setMaterialName(aftersalesMaterialVO.getMaterialName()); |
|
|
complaintNoticeDetail.setMaterialDescribe(aftersalesMaterialVO.getMaterialDescribe()); |
|
|
complaintNoticeDetail.setMaterialDescribe(aftersalesMaterialVO.getMaterialDescribe()); |
|
|
complaintNoticeDetail.setMaterialNo(aftersalesMaterialVO.getMaterialNo()); |
|
|
complaintNoticeDetail.setMaterialNo(aftersalesMaterialVO.getMaterialNo()); |
|
|
complaintNoticeDetail.setMaterialPhotourl(aftersalesMaterialVO.getMaterialPhotourl()); |
|
|
complaintNoticeDetail.setMaterialPhotourl(aftersalesMaterialVO.getMaterialPhotourl()); |
|
|
complaintNoticeDetail.setMaterialBrand(aftersalesMaterialVO.getMaterialBrand()); |
|
|
complaintNoticeDetail.setMaterialBrand(aftersalesMaterialVO.getMaterialBrand()); |
|
|
complaintNoticeDetail.setComplaintProblem(aftersalesMaterialVO.getComplaintProblem()); |
|
|
complaintNoticeDetail.setComplaintProblem(aftersalesMaterialVO.getComplaintProblem()); |
|
|
complaintNoticeDetail.setSnCode(aftersalesMaterialVO.getSnCode()); |
|
|
complaintNoticeDetail.setSnCode(aftersalesMaterialVO.getSnCode()); |
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
complaintNoticeDetail.setAdverseReportUrl(aftersalesMaterialVO.getAdverseReportUrl()); |
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
complaintNoticeDetail.setShippedGoodsSum(aftersalesMaterialVO.getShippedGoodsSum()); |
|
|
complaintNoticeDetail.setClosingProcedures("1"); |
|
|
complaintNoticeDetail.setClosingProcedures("1"); |
|
|
String snCodes = aftersalesMaterialVO.getSnCode(); |
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
String[] snCodeArray = snCodes.split(","); |
|
|
|
|
|
enterpriseSum += snCodeArray.length; |
|
|
|
|
|
aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
aftersalesComplaintNotice.setEnterpriseSum(enterpriseSum); |
|
|
|
|
|
complaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice); |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|