|
|
|
@ -182,47 +182,52 @@ public class EnterpriseComplaintServiceImpl implements IEnterpriseComplaintServi |
|
|
|
enterpriseComplaint.setId(IdUtil.simpleUUID()); |
|
|
|
//默认工单为已受理
|
|
|
|
enterpriseComplaint.setStatus(0); |
|
|
|
complaintStatisticsService.insertComplaintStatistics(enterpriseComplaint); |
|
|
|
//TODO 暂时注释,后续启用
|
|
|
|
// complaintStatisticsService.insertComplaintStatistics(enterpriseComplaint);
|
|
|
|
int i = enterpriseComplaintMapper.insertEnterpriseComplaint(enterpriseComplaint); |
|
|
|
List<String> proCodeList = new ArrayList<>(); |
|
|
|
if (i > 0) { |
|
|
|
if(enterpriseComplaint.getEnforceType() != 3 ){ |
|
|
|
if(StringUtils.isNotEmpty(enterpriseComplaint.getComplaintDepartmentIds())) { |
|
|
|
String[] split = enterpriseComplaint.getComplaintDepartmentIds().split(","); |
|
|
|
List<String> strings = Arrays.asList(split); |
|
|
|
strings.forEach(res ->{ |
|
|
|
strings.forEach(res -> { |
|
|
|
//查询所在部门
|
|
|
|
DeptBean deptById = deptApi.getDeptById(res); |
|
|
|
//匹配民生诉求事项编码
|
|
|
|
String itemCode = ""; |
|
|
|
if(StringUtils.isNotEmpty(deptById.getCreditcode())){ |
|
|
|
if (StringUtils.isNotEmpty(deptById.getCreditcode())) { |
|
|
|
List<ComplaintItem> complaintItems = |
|
|
|
complaintItemMapper.selectComplaintItemCodeByNumber(deptById.getCreditcode()); |
|
|
|
if(complaintItems.size() > 0 ){ |
|
|
|
if (complaintItems.size() > 0) { |
|
|
|
itemCode = complaintItems.get(0).getComplaintItemCode(); |
|
|
|
} |
|
|
|
} |
|
|
|
String prwCode = addMssqOrder(enterpriseComplaint,itemCode); |
|
|
|
String prwCode = addMssqOrder(enterpriseComplaint, itemCode); |
|
|
|
proCodeList.add(prwCode); |
|
|
|
}); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
List<String> deptNameList = new ArrayList<>(); |
|
|
|
List<String> deptIdsList = new ArrayList<>(); |
|
|
|
if(StringUtils.isNotEmpty(enterpriseComplaint.getComplaintDepartmentIds())) { |
|
|
|
String[] split = enterpriseComplaint.getComplaintItemCodes().split(","); |
|
|
|
List<String> strings = Arrays.asList(split); |
|
|
|
strings.forEach(res ->{ |
|
|
|
strings.forEach(res -> { |
|
|
|
String substring = res.substring(0, 18); |
|
|
|
//查询所在部门
|
|
|
|
DeptBean deptBean = deptApi.selectDeptByCreditcode(substring); |
|
|
|
if(BeanUtil.isNotEmpty(deptBean) && StringUtils.isNotEmpty(deptBean.getDeptName())){ |
|
|
|
if (BeanUtil.isNotEmpty(deptBean) && StringUtils.isNotEmpty(deptBean.getDeptName())) { |
|
|
|
deptNameList.add(deptBean.getDeptName()); |
|
|
|
deptIdsList.add(deptBean.getDeptId()); |
|
|
|
} |
|
|
|
String prwCode = addMssqOrder(enterpriseComplaint,res); |
|
|
|
String prwCode = addMssqOrder(enterpriseComplaint, res); |
|
|
|
proCodeList.add(prwCode); |
|
|
|
}); |
|
|
|
enterpriseComplaint.setComplaintDepartments(String.join(",",deptNameList)); |
|
|
|
enterpriseComplaint.setComplaintDepartmentIds(String.join(",",deptIdsList)); |
|
|
|
} |
|
|
|
} |
|
|
|
//投诉工单返回参数
|
|
|
|
enterpriseComplaint.setProWoCode(String.join(",",proCodeList)); |
|
|
|
enterpriseComplaintMapper.updateEnterpriseComplaint(enterpriseComplaint); |
|
|
|
|