diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml index 147be24a..5f13eb94 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml @@ -18,7 +18,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 85 + port: 8888 servlet: # 应用的访问路径 context-path: / @@ -206,4 +206,9 @@ yzy: paasid: 123 -qr_code_url: C:\ruoyi\uploadPath\zfjd_logo.png \ No newline at end of file +qr_code_url: C:\ruoyi\uploadPath\zfjd_logo.png + +#深i企对接密钥 测试环境 +siq: + code: zfjdm + secretKey: eWIzY3BMRVNEQXhvUUlXMA== diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java index d481b623..45e8346f 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java @@ -61,6 +61,19 @@ public class EnforcementInspectionProgramController extends BaseController List list = enforcementInspectionProgramService.selectEnforcementInspectionProgramList(enforcementInspectionProgram); return ZDResponse.success("查询成功",list); } + /** + * 查询执法检查计划列表 + */ +// @RequiresPermissions("code:enforcementInspectionProgram:queryList") + @GetMapping("/queryListNoPermission") + @ResponseBody + public ZDResponse queryListNoPermission(EnforcementInspectionProgram enforcementInspectionProgram) + { + startPage(); + List list = + enforcementInspectionProgramService.selectEnforcementInspectionProgramListNoPermission(enforcementInspectionProgram); + return ZDResponse.success("查询成功",list); + } /** diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java index 1d168987..f3e16a8e 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java @@ -43,7 +43,7 @@ public class LawEnforcementWarningListController extends BaseController /** * 查询执法预警列表列表 */ - @RequiresPermissions("code:LawEnforcementWarningList:list") +// @RequiresPermissions("code:LawEnforcementWarningList:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(LawEnforcementWarningList lawEnforcementWarningList) @@ -57,7 +57,7 @@ public class LawEnforcementWarningListController extends BaseController /** * 查询执法预警列表列表 */ - @RequiresPermissions("code:LawEnforcementWarningList:queryList") +// @RequiresPermissions("code:LawEnforcementWarningList:queryList") @GetMapping("/queryList") @ResponseBody public ZDResponse queryList(LawEnforcementWarningList lawEnforcementWarningList) diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java index 134fe612..29b61e03 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java @@ -94,6 +94,11 @@ public class EnforcementRegistration extends BaseDomain */ private Integer isComplaint; + /** + * 数据保存或提交 0 保存 1提交 + */ + private Integer isSubmit; + /** * 文件几个 */ @@ -363,4 +368,12 @@ public class EnforcementRegistration extends BaseDomain public void setIsComplaint(Integer isComplaint) { this.isComplaint = isComplaint; } + + public Integer getIsSubmit() { + return isSubmit; + } + + public void setIsSubmit(Integer isSubmit) { + this.isSubmit = isSubmit; + } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java index 48348c56..9d416a4e 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java @@ -74,6 +74,11 @@ public class EnterpriseLawEnforcement extends BaseDomain */ private Integer isDelete; + /** + * 数据保存或提交 0 保存 1 提交 + */ + private Integer isSubmit; + /** * 搜索关键字 */ @@ -83,6 +88,7 @@ public class EnterpriseLawEnforcement extends BaseDomain */ private String searchDate; + /** * 日期快捷查询 1 本月 2 本季度 3 本年 */ @@ -308,6 +314,14 @@ public class EnterpriseLawEnforcement extends BaseDomain this.lawEnforcerTwoId = lawEnforcerTwoId; } + public Integer getIsSubmit() { + return isSubmit; + } + + public void setIsSubmit(Integer isSubmit) { + this.isSubmit = isSubmit; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java index 1871ad05..da9d25b3 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java @@ -26,6 +26,7 @@ public interface IEnforcementInspectionProgramService * @return 执法检查计划集合 */ public List selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram); + List selectEnforcementInspectionProgramListNoPermission(EnforcementInspectionProgram enforcementInspectionProgram); /** * 新增执法检查计划 diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java index bfda8a34..b6d1cbf1 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java @@ -7,6 +7,7 @@ import cn.hutool.core.util.IdUtil; import com.zdxt.auth.dto.UserBean; import com.zdxt.auth.feign.UserApi; import com.zdxt.auth.feign.ZdxtFileCommonApi; +import com.zdxt.common.annotation.DataScope; import com.zdxt.common.util.DateUtils; import com.zdxt.common.zdxtFile.ZdxtFileCommon; import org.springframework.beans.factory.annotation.Autowired; @@ -52,6 +53,7 @@ public class EnforcementInspectionProgramServiceImpl implements IEnforcementInsp * @param enforcementInspectionProgram 执法检查计划 * @return 执法检查计划 */ + @DataScope @Override public List selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram) { @@ -69,6 +71,22 @@ public class EnforcementInspectionProgramServiceImpl implements IEnforcementInsp return enforcementInspectionPrograms; } + @Override + public List selectEnforcementInspectionProgramListNoPermission(EnforcementInspectionProgram enforcementInspectionProgram) { + List enforcementInspectionPrograms = + enforcementInspectionProgramMapper.selectEnforcementInspectionProgramList(enforcementInspectionProgram); + enforcementInspectionPrograms.forEach(res ->{ + List zdxtFileCommons = zdxtFileCommonApi.selectZdxtFileById(res.getId()); + if(zdxtFileCommons != null && zdxtFileCommons.size() > 0){ + EnforcementInspectionProgram.FileObject fileObject = new EnforcementInspectionProgram.FileObject(); + fileObject.setFileName(zdxtFileCommons.get(0).getFileName()); + fileObject.setFileUrl(zdxtFileCommons.get(0).getUploadPath()); + res.setFileObject(fileObject); + } + }); + return enforcementInspectionPrograms; + } + /** * 新增执法检查计划 * diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseLawEnforcementServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseLawEnforcementServiceImpl.java index 85dc693c..e41141ab 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseLawEnforcementServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseLawEnforcementServiceImpl.java @@ -9,7 +9,9 @@ import com.zdxt.auth.dto.UserBean; import com.zdxt.auth.feign.UserApi; import com.zdxt.auth.feign.ZdxtFileCommonApi; import com.zdxt.code.domain.EnterpriseMerchantAuthorization; +import com.zdxt.code.domain.LinkageDict; import com.zdxt.code.service.IEnterpriseMerchantAuthorizationService; +import com.zdxt.code.service.ILinkageDictService; import com.zdxt.common.util.DateUtils; import com.zdxt.common.zdxtFile.ZdxtFileCommon; import org.springframework.beans.factory.annotation.Autowired; @@ -39,6 +41,9 @@ public class EnterpriseLawEnforcementServiceImpl implements IEnterpriseLawEnforc @Autowired private IEnterpriseMerchantAuthorizationService enterpriseMerchantAuthorizationService; + @Autowired + private ILinkageDictService linkageDictService; + /** * 查询企业端-执法部门预约记录 * @@ -60,6 +65,19 @@ public class EnterpriseLawEnforcementServiceImpl implements IEnterpriseLawEnforc userApi.getUserByUserId(Long.valueOf(enterpriseLawEnforcement.getLawEnforcerTwoId())); enterpriseLawEnforcement.setLawEnforcerTwo(enterpriseLawEnforcement.getLawEnforcerTwo() + " " + user.getLawCertificateNum() ); } + if(StrUtil.isNotEmpty(enterpriseLawEnforcement.getCheckItem())){ + LinkageDict linkageDict = linkageDictService.selectLinkageDictById(enterpriseLawEnforcement.getCheckItem()); + if(linkageDict!= null){ + enterpriseLawEnforcement.setCheckItem(linkageDict.getTitle()); + } + } + if(StrUtil.isNotEmpty(enterpriseLawEnforcement.getCheckRequire())){ + LinkageDict linkageDict = linkageDictService.selectLinkageDictById(enterpriseLawEnforcement.getCheckRequire()); + if(linkageDict!= null){ + enterpriseLawEnforcement.setCheckRequire(linkageDict.getTitle()); + } + } + return enterpriseLawEnforcement; } @@ -72,7 +90,16 @@ public class EnterpriseLawEnforcementServiceImpl implements IEnterpriseLawEnforc @Override public List selectEnterpriseLawEnforcementList(EnterpriseLawEnforcement enterpriseLawEnforcement) { - return enterpriseLawEnforcementMapper.selectEnterpriseLawEnforcementList(enterpriseLawEnforcement); + List enterpriseLawEnforcements = + enterpriseLawEnforcementMapper.selectEnterpriseLawEnforcementList(enterpriseLawEnforcement); + for (int i = 0; i < enterpriseLawEnforcements.size(); i++) { + LinkageDict linkageDict = + linkageDictService.selectLinkageDictById(enterpriseLawEnforcements.get(i).getCheckItem()); + if(linkageDict != null){ + enterpriseLawEnforcements.get(i).setCheckItem(linkageDict.getTitle()); + } + } + return enterpriseLawEnforcements; } /** diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/IdCardCryptoUtil.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/IdCardCryptoUtil.java new file mode 100644 index 00000000..6088a2e8 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/IdCardCryptoUtil.java @@ -0,0 +1,103 @@ +package com.zdxt.code.utils; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.crypto.symmetric.SymmetricAlgorithm; +import com.zdxt.code.utils.HttpUtil; + +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +/** + * 证件号加密工具 + * + * @author joelzzhang + */ +public class IdCardCryptoUtil { + + /** + * 以下字符串为密钥,可以通过配置来传递 + */ + public static final String OUTER_AES_KEY = "u3BPiZWALItH27e34oO6bw=="; + public static final String INNER_AES_KEY = "ol1hV81iCruo+thxtZGnCg=="; + public static final String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDADIVdRXNyT5pmGxSUfwEup2Y1YCz7VfibMyyQhkpVP3ByKsoFDjZ30yW5gv70sQbqn/MCthTFqwh3/I/YLfthM3vU7TdlmNfnlKcQ6prxYofLkX8akrhgQVFerb/4DhcbAk5xvx12Dkeh/nzDf5Qw2K3CymRPnr4zN6ZjAL79HwIDAQAB"; + public static final String PRIVATE_KEY = "MIICdAIBADANBgkqhkiG9w0BAQEFAASCAl4wggJaAgEAAoGBAMAMhV1Fc3JPmmYbFJR/AS6nZjVgLPtV+JszLJCGSlU/cHIqygUONnfTJbmC/vSxBuqf8wK2FMWrCHf8j9gt+2Eze9TtN2WY1+eUpxDqmvFih8uRfxqSuGBBUV6tv/gOFxsCTnG/HXYOR6H+fMN/lDDYrcLKZE+evjM3pmMAvv0fAgMBAAECf2rTWPVVrHuC/ywzFz+CmSXAxLNSZbMCH0doYvs0hIrmvtjCjgN1F6P1z2yUpHBEbsetZEwdyQnEf74+WCuBaFIYjmQm/05grIxam/QrGibnV5qNiA0VeCkj6bUy+z5mt3/ithgzjmOiYIgMenjf6ut6RmgRDodgJiFbvSvfskECQQDoqGMNaUV+Y/O9h+l9eOCkSUOjOsL9WDRL34ei/jf7VFFYBZLs2GMzLunDkDz1dHvufDiMPeHUTTN8zIEEpNMVAkEA01Ehf9Np2zUqFQp3SW/fHVsaGM97JsbsTQrsDdUWwZLJTSQ7Yf+yg21GkNa8Mmlsp1OLyS607HV7lPlKO0LsYwJBAN1LTOv0taUCbVRZcj1mPEYHac5Ylh9jRlrkwp7GL3lfOf//TUD6kWCdvrvE9jaCFV9ByIecVLEavV53JkDEhgECQHgR40z0XXOWs8Cc38a0cDwH5b4vNjSEVwQ3roT1jSaUNxlD+xHl7hLLZosp2Gl0ia5RxF2d0mOBJaUyOMGPdy0CQCLBU3995JMoUyLgt2+Riw0PFbdxFEnKGyshAt5Q957/hC6L/V5tQNnh/AM9q23DIUQGb1whhxdIzV12qFSSS34="; + + public static void main(String[] args) { + String encode = Base64.encode(SecureUtil.generateKey(SymmetricAlgorithm.AES.getValue()).getEncoded()); + System.out.println(encode); +// String content = "1111111111"; +// String value = asymmetricEncryptIdCard(PUBLIC_KEY, null, content); +// System.out.println(value); +// String decryptIdCard = asymmetricDecryptIdCard(null, PRIVATE_KEY, value); +// System.out.println(decryptIdCard); +// Map heardMap = new HashMap<>(); +// try { +// heardMap.put("x-auth-channel","123456"); +// heardMap.put("x-auth-app-code","zfjdm"); +// String s = HttpUtil.HttpSendPost("http://egbpub.siqhz.com/egb/api/thirdauth/pub/auth/token/", +// null, heardMap, ""); +// System.out.println(s); +// } catch (Exception e) { +// e.printStackTrace(); +// } + + System.out.println(symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "8892121545124124")); + } + + + /** + * 证件号通过RSA的公钥加密 + * + * @param publicKey 公钥Base64 + * @param privateKey 私钥Base64 + * @param content 被加密的字符串 + * @return 加密后的字符串 + */ + public static String asymmetricEncryptIdCard(String publicKey, String privateKey, String content) { + RSA rsa = SecureUtil.rsa(privateKey, publicKey); + byte[] encrypt = rsa.encrypt(content, StandardCharsets.UTF_8, KeyType.PublicKey); + return Base64.encode(encrypt); + } + + /** + * 证件号通过RSA的私钥解密 + * + * @param publicKey 公钥Base64 + * @param privateKey 私钥Base64 + * @param content 被解密的字符串 + * @return 解密后的字符串 + */ + public static String asymmetricDecryptIdCard(String publicKey, String privateKey, String content) { + RSA rsa = SecureUtil.rsa(privateKey, publicKey); + byte[] decrypt = rsa.decrypt(content, KeyType.PrivateKey); + return StrUtil.str(decrypt, StandardCharsets.UTF_8); + } + + /** + * 证件号对称加密后入库 + * + * @param key 密钥Base64 + * @param content 被加密的字符串 + * @return 加密后的字符串 + */ + public static String symmetricEncryptIdCard(String key, String content) { + return SecureUtil.aes(SecureUtil.decode(key)).encryptBase64(content); + } + + /** + * 证件号对称解密 + * + * @param key 密钥Base64 + * @param content 被解密的字符串Base64 + * @return 解密后的字符串 + */ + public static String symmetricDecryptIdCard(String key, String content) { + return SecureUtil.aes(SecureUtil.decode(key)).decryptStr(content); + } + +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml index bee834da..4f34bf7b 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml @@ -45,6 +45,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and DATE_FORMAT(create_time, '%Y-%m') = #{dateSearch} + + + ${params.dataScope} + @@ -83,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{userId}, #{deptId}, #{isDelete}, - #{is_publish}, + #{isPublish}, diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml index 762e3e82..f7dbda1c 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml @@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, law_enforcement, law_enforcement_id, enterprise_id, enterprise_name, enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id, law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer, subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_basis, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,is_complaint from enforcement_registration + select id, law_enforcement, law_enforcement_id, enterprise_id, enterprise_name, enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id, law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer, subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_basis, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,is_complaint,is_submit from enforcement_registration @@ -54,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and link_tel = #{linkTel} and check_item = #{checkItem} and check_require = #{checkRequire} + and is_submit = #{isSubmit} and ( enterprise_name like concat(concat('%',#{searchValue}),'%') or check_item like concat(concat('%',#{searchValue}),'%') @@ -117,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" check_item, check_require, enterprise_number, + is_submit, #{id}, @@ -142,6 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{checkItem}, #{checkRequire}, #{enterpriseNumber}, + #{isSubmit}, @@ -169,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" link_tel = #{linkTel}, check_item = #{checkItem}, check_require = #{checkRequire}, + is_submit = #{isSubmit}, where id = #{id}