Browse Source

修改统计分析 执法类别

v6
Chendy 1 year ago
parent
commit
b97af96255
  1. 8
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppSystemController.java
  2. 35
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComprehensiveAnalysis.java
  3. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComprehensiveAnalysisServiceImpl.java
  4. 3
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml

8
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppSystemController.java

@ -121,9 +121,13 @@ public class AppSystemController extends BaseController {
user.setDataScopeId(null); user.setDataScopeId(null);
List<User> list = userService.selectUserListByHave(user); List<User> list = userService.selectUserListByHave(user);
if(list.size()>0){ if(list.size()>0){
list.stream().filter(l->StringUtils.isNotEmpty(l.getPhonenumber())).forEach(li->{ list.forEach(li->{
if(!li.getPhonenumber().matches("^\\d+$")) if(StringUtils.isEmpty(li.getPhonenumber()))return;
if(li.getPhonenumber().matches("^\\d+$")){
li.setDecryptPhoneNum(li.getPhonenumber());
}else{
li.setDecryptPhoneNum(IdCardCryptoUtil.symmetricDecryptIdCard(KEY, li.getPhonenumber())); li.setDecryptPhoneNum(IdCardCryptoUtil.symmetricDecryptIdCard(KEY, li.getPhonenumber()));
}
}); });
} }
//解密 //解密

35
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComprehensiveAnalysis.java

@ -11,10 +11,16 @@ public class ComprehensiveAnalysis {
private String enterpriseName; private String enterpriseName;
private String enterpriseAddress; private String enterpriseAddress;
/** /**
* 检查类型 * 任务来源
*/ */
private String checkCategory; private String checkCategory;
private Integer checkCategoryNumber; private Integer checkCategoryNumber;
/**
* 执法类别
*/
private String lawEnforceCategory;
private Integer lawEnforceCategoryNumber;
/** /**
* 企业类型 * 企业类型
*/ */
@ -62,6 +68,10 @@ public class ComprehensiveAnalysis {
private List<ComprehensiveAnalysis> companyOrgTypeList; private List<ComprehensiveAnalysis> companyOrgTypeList;
private List<ComprehensiveAnalysis> complaintTypeList; private List<ComprehensiveAnalysis> complaintTypeList;
// 执法类别list
private List<ComprehensiveAnalysis> lawEnforceCategoryList;
private Long userId; private Long userId;
private String bureauDeptId; private String bureauDeptId;
private String bureauDeptName; private String bureauDeptName;
@ -103,6 +113,14 @@ public class ComprehensiveAnalysis {
*/ */
private Integer enterpriseTotal; private Integer enterpriseTotal;
public List<ComprehensiveAnalysis> getLawEnforceCategoryList() {
return lawEnforceCategoryList;
}
public void setLawEnforceCategoryList(List<ComprehensiveAnalysis> lawEnforceCategoryList) {
this.lawEnforceCategoryList = lawEnforceCategoryList;
}
public String getCheckCategory() { public String getCheckCategory() {
return checkCategory; return checkCategory;
} }
@ -111,6 +129,21 @@ public class ComprehensiveAnalysis {
this.checkCategory = checkCategory; this.checkCategory = checkCategory;
} }
public String getLawEnforceCategory() {
return lawEnforceCategory;
}
public void setLawEnforceCategory(String lawEnforceCategory) {
this.lawEnforceCategory = lawEnforceCategory;
}
public Integer getLawEnforceCategoryNumber() {
return lawEnforceCategoryNumber;
}
public void setLawEnforceCategoryNumber(Integer lawEnforceCategoryNumber) {
this.lawEnforceCategoryNumber = lawEnforceCategoryNumber;
}
public String getCompanyOrgType() { public String getCompanyOrgType() {
return companyOrgType; return companyOrgType;

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComprehensiveAnalysisServiceImpl.java

@ -55,8 +55,8 @@ public class ComprehensiveAnalysisServiceImpl implements ComprehensiveAnalysisSe
comprehensiveAnalysis.setComplaintTotal(complaintList.size()); comprehensiveAnalysis.setComplaintTotal(complaintList.size());
//投诉类型列表(类型value+数量+占比) //投诉类型列表(类型value+数量+占比)
comprehensiveAnalysis.setComplaintTypeList(getComplaintTypeList(complaintList)); comprehensiveAnalysis.setComplaintTypeList(getComplaintTypeList(complaintList));
//检查类别列表(类型value+数量+占比) //执法类别(类型value+数量+占比)
comprehensiveAnalysis.setCheckCategoryList(getCheckCategoryList(primaryRegistrationList)); comprehensiveAnalysis.setLawEnforceCategoryList(getLawEnforceCategoryList(primaryRegistrationList));
//企业类型列表(文字+数量+占比) //企业类型列表(文字+数量+占比)
comprehensiveAnalysis.setCompanyOrgTypeList(getCompanyOrgTypeList(primaryRegistrationList)); comprehensiveAnalysis.setCompanyOrgTypeList(getCompanyOrgTypeList(primaryRegistrationList));
return comprehensiveAnalysis; return comprehensiveAnalysis;
@ -370,6 +370,22 @@ public class ComprehensiveAnalysisServiceImpl implements ComprehensiveAnalysisSe
return checkCategoryList; return checkCategoryList;
} }
public List<ComprehensiveAnalysis> getLawEnforceCategoryList(List<ComprehensiveAnalysis> registrationList) {
int num = registrationList.size();
List<ComprehensiveAnalysis> lawList = new ArrayList<>();
List<DictData> dictDataList = dictDataMapper.selectDictDataByType("law_enforce_category");
for (DictData dictData : dictDataList) {
ComprehensiveAnalysis comprehensiveAnalysis = new ComprehensiveAnalysis();
List<ComprehensiveAnalysis> comprehensiveAnalysisList = registrationList.stream().filter(item -> item.getLawEnforceCategory().equals(dictData.getDictValue())).collect(Collectors.toList());
comprehensiveAnalysis.setLawEnforceCategory(dictData.getDictLabel());
comprehensiveAnalysis.setLawEnforceCategoryNumber(comprehensiveAnalysisList.size());
comprehensiveAnalysis.setPercentage((double) comprehensiveAnalysisList.size() / num);
lawList.add(comprehensiveAnalysis);
registrationList = registrationList.stream().filter(item -> !item.equals(dictData.getDictValue())).collect(Collectors.toList());
}
return lawList;
}
public List<ComprehensiveAnalysis> getCompanyOrgTypeList(List<ComprehensiveAnalysis> registrationList) { public List<ComprehensiveAnalysis> getCompanyOrgTypeList(List<ComprehensiveAnalysis> registrationList) {
//企业类型数组 //企业类型数组
List<ComprehensiveAnalysis> companyOrgTypeList = new ArrayList<>(); List<ComprehensiveAnalysis> companyOrgTypeList = new ArrayList<>();

3
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml

@ -15,13 +15,14 @@
<result property="bureauDeptName" column="bureau_dept_name" /> <result property="bureauDeptName" column="bureau_dept_name" />
</resultMap> </resultMap>
<select id="primarySectionA" parameterType="ComprehensiveAnalysis" resultMap="ComprehensiveAnalysisResult"> <select id="primarySectionA" parameterType="ComprehensiveAnalysis" resultMap="ComprehensiveAnalysisResult">
select r.check_category, e.company_org_type,r.enterprise_number,r.enterprise_name,e.enterprise_address,r.bureau_dept_id,r.bureau_dept_name select r.check_category,r.law_enforce_category, e.company_org_type,r.enterprise_number,r.enterprise_name,e.enterprise_address,r.bureau_dept_id,r.bureau_dept_name
from enforcement_registration r from enforcement_registration r
left join (select * from enterprise_information group by enterprise_number) e left join (select * from enterprise_information group by enterprise_number) e
on r.enterprise_number = e.enterprise_number on r.enterprise_number = e.enterprise_number
<where> <where>
and r.enterprise_number is not null and r.enterprise_number is not null
and r.check_category is not null and r.check_category is not null
and r.law_enforce_category is not null
and r.is_submit=1 and r.is_submit=1
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two like concat('%',#{userId}, '%')) r.law_enforcer_id_two like concat('%',#{userId}, '%'))

Loading…
Cancel
Save