From 46aaee45587c0034d789e10f00eaf6d6fcf849ea Mon Sep 17 00:00:00 2001 From: kylin L <452061493@qq.com> Date: Wed, 7 Aug 2024 19:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppEnterpriseInformationController.java | 14 +++++++------ .../resources/mapper/system/UserMapper.xml | 3 +++ .../project/code/information/information.html | 2 +- .../EnterpriseInformationController.java | 2 ++ .../code/domain/EnforcementRegistration.java | 13 +++++++++++- .../EnterpriseInformationServiceImpl.java | 20 +++++++++++++++---- .../mapper/EnforcementRegistrationMapper.xml | 10 +++++++++- 7 files changed, 51 insertions(+), 13 deletions(-) diff --git a/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java b/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java index 3e8696c4..74b18358 100644 --- a/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java +++ b/lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java @@ -226,8 +226,8 @@ public class AppEnterpriseInformationController extends BaseController * @return */ @ResponseBody - @GetMapping("/checkIsState/{enterpriseNumber}") - public ZDResponse checkIsState(@PathVariable("enterpriseNumber") String enterpriseNumber){ + @GetMapping("/checkIsState/{enterpriseNumber}/{id}") + public ZDResponse checkIsState(@PathVariable("enterpriseNumber") String enterpriseNumber, @PathVariable("id") String id){ // 根据加密后的企业编码查询出企业信息 System.out.println("===============================进入企业判断======================================"); EnterpriseInformation enterpriseInformation = enterpriseInformationService.selectEnterpriseInformationBySalt(enterpriseNumber); @@ -236,11 +236,13 @@ public class AppEnterpriseInformationController extends BaseController System.out.println("===============================二维码判断======================================"); // 通过正常企业编码查询二维码信息 QrCodeGenerateHistory params = new QrCodeGenerateHistory(); - params.setEnterpriseNumber(enterpriseInformation.getEnterpriseNumber()); - params.setStatus(0); - List qrCodeGenerateHistories = iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryList(params); +// params.setEnterpriseNumber(enterpriseInformation.getEnterpriseNumber()); +// params.setStatus(0); +// List qrCodeGenerateHistories = iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryList(params); + // 应该用过id来获取二维码信息判断是否过期 + QrCodeGenerateHistory qrCodeGenerateHistories = iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryById(id); System.out.println("===============================二维码查询======================================"); - if (null != qrCodeGenerateHistories && qrCodeGenerateHistories.size()>0) { + if (null != qrCodeGenerateHistories && qrCodeGenerateHistories.getStatus()==0) { return ZDResponse.success("二维码正常",Boolean.TRUE); } return ZDResponse.success("二维码已过期",Boolean.FALSE); diff --git a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml index 5223a80a..44ee970a 100644 --- a/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml +++ b/lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml @@ -157,6 +157,9 @@ AND (u.dept_id = #{deptId}) + + AND u.user_name like concat('%', #{userName}, '%') + AND u.tenant_code = #{tenantCode} diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html index e9103c50..9d160436 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html @@ -20,7 +20,7 @@
  • 企业类型:

    - diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java index 0696d3ee..670363e4 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java @@ -42,6 +42,8 @@ public class EnterpriseInformationController extends BaseController @GetMapping() public String information() { + // 因为企业类型是中文的, 所以分组统计出来 + return prefix + "/information"; } 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 6972e8bb..8b3b7b46 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 @@ -142,6 +142,11 @@ public class EnforcementRegistration extends BaseDomain /** 未扫码原因 */ private String enforce; + /** 预约关联id */ + private String lawId; + /** 预约关联文字 */ + private String lawText; + /** * 关键字查询 */ @@ -155,7 +160,6 @@ public class EnforcementRegistration extends BaseDomain private String lawCertificateNumText; private String lawCertificateNumTwoText; private String subsidiaryerText; - private String lawId; private int comOrOpi; private String uniteCheck; private List fileListObj; @@ -187,6 +191,13 @@ public class EnforcementRegistration extends BaseDomain */ private EnterpriseEvaluate enterpriseEvaluate; + public String getLawText() { + return lawText; + } + + public void setLawText(String lawText) { + this.lawText = lawText; + } public String getCheckCss() { return checkCss; diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java index 407dd3b8..dca06cf5 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java @@ -18,6 +18,7 @@ import java.util.Map; import cn.hutool.core.convert.Convert; import cn.hutool.core.util.IdUtil; +import com.alibaba.fastjson.JSON; import com.zdxt.auth.dto.UserBean; import com.zdxt.auth.feign.FileUploadApi; import com.zdxt.auth.feign.UserApi; @@ -150,7 +151,13 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS i = enterpriseInformationMapper.updateEnterpriseInformationByEnterpriseNumber(enterpriseInformation); } if(i > 0){ - String text = salt; +// String text = salt; + String uuid = IdUtil.simpleUUID(); + Map jsonMap = new HashMap<>(); + jsonMap.put("salt", salt); + jsonMap.put("codeId", uuid); + jsonMap.put("type", "tmp"); + String text = JSON.toJSONString(jsonMap); //这里设置自定义网站url String logoPath = qrCodeUrl; try { @@ -158,7 +165,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS MultipartFile multipartFile = QRCodeUtil.getMultipartFile(encode); String upload = fileUploadApi.upload(multipartFile); - String uuid = IdUtil.simpleUUID(); +// String uuid = IdUtil.simpleUUID(); QrCodeGenerateHistory qrCodeGenerateHistory = new QrCodeGenerateHistory(); qrCodeGenerateHistory.setId(uuid); //生成时间 @@ -351,7 +358,13 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS List enterpriseInformations = enterpriseInformationMapper.selectEnterpriseInformationList(info); if (null != enterpriseInformations && enterpriseInformations.size() > 0) { EnterpriseInformation enterpriseInformation = enterpriseInformations.get(0); - String text = enterpriseInformation.getSalt(); +// String text = enterpriseInformation.getSalt(); + String uuid = IdUtil.simpleUUID(); + Map jsonMap = new HashMap<>(); + jsonMap.put("salt", enterpriseInformation.getSalt()); + jsonMap.put("codeId", uuid); + jsonMap.put("type", "tmp"); + String text = JSON.toJSONString(jsonMap); //这里设置自定义网站url String logoPath = qrCodeUrl; try { @@ -359,7 +372,6 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS MultipartFile multipartFile = QRCodeUtil.getMultipartFile(encode); String upload = fileUploadApi.upload(multipartFile); - String uuid = IdUtil.simpleUUID(); QrCodeGenerateHistory qrCodeGenerateHistory = new QrCodeGenerateHistory(); qrCodeGenerateHistory.setId(uuid); //生成时间 diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml index 72bc9ea3..db99298d 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml @@ -45,6 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -60,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_item_text, law_enforcement_basis, law_enforcement_basis_text, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code, is_complaint,is_submit, unite_check,check_css, enforce_reason, law_field,check_category, - bureau_dept_id,bureau_dept_name,is_evaluate + bureau_dept_id,bureau_dept_name,is_evaluate, law_id, law_text from enforcement_registration @@ -183,6 +185,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bureau_dept_name, bureau_dept_id, is_evaluate, + law_id, + law_text, #{id}, @@ -225,6 +229,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{bureauDeptName}, #{bureauDeptId}, #{isEvaluate}, + #{lawId}, + #{lawText}, @@ -269,6 +275,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bureau_dept_name = #{bureauDeptName}, bureau_dept_id = #{bureauDeptId}, is_evaluate = #{isEvaluate}, + law_id = #{lawId}, + law_text = #{lawText}, where id = #{id}