Browse Source

加个统一信用码

v6
蟑螂恶霸 8 months ago
parent
commit
80a5af72da
  1. 16
      lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java
  2. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
  3. 34
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

16
lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java

@ -32,7 +32,7 @@ public class IdCardCryptoUtil {
String key = "VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0"; String key = "VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0";
System.out.println("====================== 示例 ======================"); System.out.println("====================== 示例 ======================");
// 加密 // 加密
String source_dec = "13009650312"; String source_dec = "15914090216";
String enc = IdCardCryptoUtil.symmetricEncryptIdCard(key, source_dec); String enc = IdCardCryptoUtil.symmetricEncryptIdCard(key, source_dec);
System.out.println(source_dec+" 加密后 : "+enc); System.out.println(source_dec+" 加密后 : "+enc);
// 解密 // 解密
@ -51,18 +51,8 @@ public class IdCardCryptoUtil {
System.out.println("====================== 实用 ======================"); System.out.println("====================== 实用 ======================");
String[] strings={ String[] strings={
"13590339121", "18926034339",
"13631661625", "18038193067",
"13322980102",
"13632592442",
"13430419797",
"18124650573",
"13533812128",
"13316822721",
"13826520393",
"18681486898",
"18128825544",
"18126333814",
}; };
// 刘义 13410900924 19020722074 // 刘义 13410900924 19020722074

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -99,9 +99,13 @@ public class EnforcementRegistrationController extends BaseController
model.addAttribute("yearList",yearMake()); model.addAttribute("yearList",yearMake());
model.addAttribute("total",list.size()); model.addAttribute("total",list.size());
model.addAttribute("unite",uniteList.size()); model.addAttribute("unite",uniteList.size());
if(list.size()>0){
model.addAttribute("unite_per", (uniteList.size() * 100 + list.size() / 2) / list.size() + "%"); model.addAttribute("unite_per", (uniteList.size() * 100 + list.size() / 2) / list.size() + "%");
}else {
model.addAttribute("unite_per", "0%");
}
/*model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));*/ /*model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));*/
if(uniteList.size()>0){ if(uniteList.size()>0 && list.size()>0){
model.addAttribute("uniteDouble",str1.format((double)uniteList.size()/list.size())); model.addAttribute("uniteDouble",str1.format((double)uniteList.size()/list.size()));
}else { }else {
model.addAttribute("uniteDouble", "0.00%"); model.addAttribute("uniteDouble", "0.00%");
@ -109,7 +113,7 @@ public class EnforcementRegistrationController extends BaseController
model.addAttribute("check",checkName);//!! model.addAttribute("check",checkName);//!!
model.addAttribute("checkNumber",checkList.size()); model.addAttribute("checkNumber",checkList.size());
/*model.addAttribute("checkDouble",String.format("%.3f",((double)checkList.size()/list.size())));*/ /*model.addAttribute("checkDouble",String.format("%.3f",((double)checkList.size()/list.size())));*/
if(checkList.size()>0){ if(checkList.size()>0 && list.size()>0){
model.addAttribute("checkDouble",str1.format((double)checkList.size()/list.size())); model.addAttribute("checkDouble",str1.format((double)checkList.size()/list.size()));
}else { }else {
model.addAttribute("checkDouble", "0.00%"); model.addAttribute("checkDouble", "0.00%");

34
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -897,7 +897,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
styleRow2.setBorderLeft(BorderStyle.THIN); styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2); styleRow2.setFont(font2);
//设置表头 //设置表头
String[] headerList = {"执法单位", "被执法企业名称","企业所属区域", "企业所属街道", "执法人员","执法事项","执法时间", "联合执法", "受委托", "委托单位","行政执法类别","任务来源","是否扫码","未扫码原因","是否投诉"}; String[] headerList = {"执法单位", "被执法企业名称","统一社会信用代码","企业所属区域", "企业所属街道", "执法人员","执法事项","执法时间", "联合执法", "受委托", "委托单位","行政执法类别","任务来源","是否扫码","未扫码原因","是否投诉"};
HSSFRow headerRow = sheet.createRow(0); HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) { for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i); HSSFCell cell = headerRow.createCell(i);
@ -915,11 +915,13 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
cell4.setCellValue(e.getBureauDeptName()); cell4.setCellValue(e.getBureauDeptName());
HSSFCell cell1 = row.createCell(1); HSSFCell cell1 = row.createCell(1);
cell1.setCellValue(e.getEnterpriseName()); cell1.setCellValue(e.getEnterpriseName());
HSSFCell cell2 = row.createCell(2); HSSFCell cellEnterpriseNumber = row.createCell(2);
cellEnterpriseNumber.setCellValue(e.getEnterpriseNumber());
HSSFCell cell2 = row.createCell(3);
cell2.setCellValue(e.getQy()); cell2.setCellValue(e.getQy());
HSSFCell cell3 = row.createCell(3); HSSFCell cell3 = row.createCell(4);
cell3.setCellValue(e.getJd()); cell3.setCellValue(e.getJd());
HSSFCell cell5 = row.createCell(4); HSSFCell cell5 = row.createCell(5);
String name=""; String name="";
if(!"".equals(e.getLawEnforcer())&&e.getLawEnforcer()!=null){ if(!"".equals(e.getLawEnforcer())&&e.getLawEnforcer()!=null){
name=e.getLawEnforcer(); name=e.getLawEnforcer();
@ -931,46 +933,46 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
name=name+e.getLawEnforcerTwo(); name=name+e.getLawEnforcerTwo();
} }
cell5.setCellValue(name); cell5.setCellValue(name);
HSSFCell cell6 = row.createCell(5); HSSFCell cell6 = row.createCell(6);
cell6.setCellValue(e.getLawEnforcementItemText()); cell6.setCellValue(e.getLawEnforcementItemText());
HSSFCell cell12 = row.createCell(6 ); HSSFCell cell12 = row.createCell(7);
cell12.setCellValue(e.getEnforcementTime()); cell12.setCellValue(e.getEnforcementTime());
cell12.setCellStyle(dateStyle); cell12.setCellStyle(dateStyle);
HSSFCell cell17 = row.createCell(7); HSSFCell cell17 = row.createCell(8);
if(e.getHasUnion()!=null&&!"".equals(e.getHasUnion())){ if(e.getHasUnion()!=null&&e.getHasUnion()==1){
cell17.setCellValue("是"); cell17.setCellValue("是");
}else { }else {
cell17.setCellValue("否"); cell17.setCellValue("否");
} }
HSSFCell cell18 = row.createCell(8); HSSFCell cell18 = row.createCell(9);
if(e.getHasAuto()!=null&&!"".equals(e.getHasAuto())){ if(e.getHasAuto()!=null&&e.getHasAuto()==1){
cell18.setCellValue("是"); cell18.setCellValue("是");
}else { }else {
cell18.setCellValue("否"); cell18.setCellValue("否");
} }
HSSFCell cell112 = row.createCell(9 ); HSSFCell cell112 = row.createCell(10);
cell112.setCellValue(e.getEntrustDeptName()); cell112.setCellValue(e.getEntrustDeptName());
HSSFCell cell7 = row.createCell(10); HSSFCell cell7 = row.createCell(11);
if(lawMap.containsKey(e.getLawEnforceCategory())){ if(lawMap.containsKey(e.getLawEnforceCategory())){
cell7.setCellValue(lawMap.get(e.getLawEnforceCategory()).getDictLabel()); cell7.setCellValue(lawMap.get(e.getLawEnforceCategory()).getDictLabel());
} }
HSSFCell cell8 = row.createCell(11); HSSFCell cell8 = row.createCell(12);
if(dictDataMap1.containsKey(e.getCheckCategory())){ if(dictDataMap1.containsKey(e.getCheckCategory())){
cell8.setCellValue(dictDataMap1.get(e.getCheckCategory()).getDictLabel()); cell8.setCellValue(dictDataMap1.get(e.getCheckCategory()).getDictLabel());
} }
HSSFCell cell9 = row.createCell(12); HSSFCell cell9 = row.createCell(13);
if(e.getCheckCss()!=null&&!"".equals(e.getCheckCss())){ if(e.getCheckCss()!=null&&!"".equals(e.getCheckCss())){
cell9.setCellValue("否"); cell9.setCellValue("否");
}else { }else {
cell9.setCellValue("是"); cell9.setCellValue("是");
} }
HSSFCell cell10 = row.createCell(13); HSSFCell cell10 = row.createCell(14);
if(dictDataMap2.containsKey(e.getCheckCss())){ if(dictDataMap2.containsKey(e.getCheckCss())){
cell10.setCellValue(dictDataMap2.get(e.getCheckCss()).getDictLabel()); cell10.setCellValue(dictDataMap2.get(e.getCheckCss()).getDictLabel());
} }
HSSFCell cell11 = row.createCell(14); HSSFCell cell11 = row.createCell(15);
if(e.getIsComplaint()==0){ if(e.getIsComplaint()==0){
cell11.setCellValue("否"); cell11.setCellValue("否");
}else { }else {

Loading…
Cancel
Save