Browse Source

监督端-执法投诉

v6
zouyx 1 year ago
parent
commit
0874344f4a
  1. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  2. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
  3. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintsReportServiceImpl.java

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java

@ -64,7 +64,7 @@ public class ComplaintStaticController extends BaseController {
complaintStatistics.setBeginTime(str.format(beginTime));
complaintStatistics.setEndTime(str.format(endTime));
model.addAttribute("yearList",yearMake());
// model.addAttribute("year",localDate.getYear());
model.addAttribute("year",localDate.getYear());
model.addAttribute("selectTime",localDate.getYear()+"年");
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());
@ -114,10 +114,22 @@ public class ComplaintStaticController extends BaseController {
}
}
Map<String, Dept> deptMap=new HashMap<>();
if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
/* if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
List<Dept> deptList=iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
deptMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
}*/
if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())) {//搜索条件内有投诉对象时
List<Dept> deptList = new ArrayList<>();
deptList = iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
if (!deptList.isEmpty()) {
deptMap = deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
} else {
List<String> strings = new ArrayList<>();
strings.add("无此部门");
complaintStatistics.setComplaintDepartmentIdList(strings);
}
}
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java

@ -243,9 +243,16 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
public List<ComplaintStatistics> selectComplaintStatisticsListGroupDeptList(ComplaintStatistics complaintStatistics) {
Map<String, Dept> deptMap=new HashMap<>();
if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
List<Dept> deptList=iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
deptMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
List<Dept> deptList=new ArrayList<>();
deptList=iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
if(!deptList.isEmpty()) {
deptMap = deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
}else{
List<String> strings=new ArrayList<>();
strings.add("无此部门");
complaintStatistics.setComplaintDepartmentIdList(strings);
}
}else {
deptMap=iDeptService.selectDeptAll().stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
}

15
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintsReportServiceImpl.java

@ -71,11 +71,16 @@ public class ComplaintsReportServiceImpl implements ComplaintsReportService {
if (zdxtFileCommonList.size() > 0) {
complaintStatistics.setFileList(zdxtFileCommonList.stream().map(ZdxtFileCommon::getUploadPath).collect(Collectors.toList()));
}
String enforceTypeText = dictDataMapper.selectDictLabel("caseType", enterpriseComplaint.getEnforceType() + "");
if (enforceTypeText == null || enforceTypeText.isEmpty()) {
enterpriseComplaint.setEnforceTypeStr(enterpriseComplaint.getEnforceType() + "");
} else {
enterpriseComplaint.setEnforceTypeStr(enforceTypeText);
if(enterpriseComplaint.getEnforceType()!=null) {
String enforceTypeText = dictDataMapper.selectDictLabel("caseType", enterpriseComplaint.getEnforceType() + "");
if (enforceTypeText == null || enforceTypeText.isEmpty()) {
enterpriseComplaint.setEnforceTypeStr(enterpriseComplaint.getEnforceType() + "");
} else {
enterpriseComplaint.setEnforceTypeStr(enforceTypeText);
}
}else{
enterpriseComplaint.setEnforceTypeStr(" ");
}
enterpriseComplaint.setCreateTimeStr(simpleDateFormat.format(enterpriseComplaint.getCreateTime()));
complaintStatistics.setEnterpriseComplaint(enterpriseComplaint);

Loading…
Cancel
Save