From 0c13abc34e2de034e8d20369f7a37b12046f33a5 Mon Sep 17 00:00:00 2001 From: chenrui <1950717904@qq.com> Date: Tue, 4 Jun 2024 19:01:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=8C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BA=BA=E5=91=98=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zdxt/code/domain/Zfryjdm2405301.java | 61 +++++++++++++++++++ .../code/mapper/Xzjcjbxx025711Mapper.java | 15 +++++ .../service/impl/ThirdLoginServiceImpl.java | 7 ++- .../resources/mapper/Xzjcjbxx025711Mapper.xml | 8 +++ 4 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/Zfryjdm2405301.java diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/Zfryjdm2405301.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/Zfryjdm2405301.java new file mode 100644 index 00000000..37409ce6 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/Zfryjdm2405301.java @@ -0,0 +1,61 @@ +package com.zdxt.code.domain; + +/** + * 执法人员数据 + */ +public class Zfryjdm2405301 { + + /** + * 执法人员姓名 + */ + private String name; + + /** + * 执法单位 + */ + private String zfzzfdw; + + /** + * 身份证号码 + */ + private String sfzcode; + + /** + * 执法证编号 + */ + private String zfcode; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getZfzzfdw() { + return zfzzfdw; + } + + public void setZfzzfdw(String zfzzfdw) { + this.zfzzfdw = zfzzfdw; + } + + public String getSfzcode() { + return sfzcode; + } + + public void setSfzcode(String sfzcode) { + this.sfzcode = sfzcode; + } + + public String getZfcode() { + return zfcode; + } + + public void setZfcode(String zfcode) { + this.zfcode = zfcode; + } + + +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/Xzjcjbxx025711Mapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/Xzjcjbxx025711Mapper.java index 30b0112d..b318d82c 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/Xzjcjbxx025711Mapper.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/Xzjcjbxx025711Mapper.java @@ -3,6 +3,7 @@ package com.zdxt.code.mapper; import com.zdxt.code.domain.Xzjcjbxx025711; import com.zdxt.code.domain.Xzcfajjbxx026705; import com.zdxt.code.domain.Xzqzjbxx173774; +import com.zdxt.code.domain.Zfryjdm2405301; import java.util.List; @@ -66,4 +67,18 @@ public interface Xzjcjbxx025711Mapper * @return */ public List queryCFAJByEnterpriseNumber(String enterpriseNumber); + + /** + * 查询行政处罚案件 + * @param + * @return 查询所有执法人员数据 + */ + public List queryZFRY(); + + /** + * 通过身份证查询是否为执法人员 + * @return + */ + public List queryZFRYByIdCard(String userIdCard); + } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java index fb17777e..598e9810 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java @@ -1,5 +1,6 @@ package com.zdxt.code.service.impl; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.zdxt.auth.dto.DeptBean; @@ -163,8 +164,10 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { //结束时间 返回为空表示为永久 String termEnd = jsonObject.getString("termEnd"); try { - Date termEndD = format.parse(termEnd); - termEnd = format.format(termEndD); + if(StrUtil.isNotEmpty(termEnd)){ + Date termEndD = format.parse(termEnd); + termEnd = format.format(termEndD); + } } catch (Exception e) { termEnd = "永久"; } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml index 58d55c0f..65d82230 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml @@ -316,5 +316,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN XZCFAJDSRXX594019 c on a.c201000 = c.c201000 where c.c201016 = #{enterpriseNumber} order by c.c201016 desc limit 10 + + + + \ No newline at end of file From be5d8dd45d05fe883d5995c6552ab30b4128d117 Mon Sep 17 00:00:00 2001 From: chenrui <1950717904@qq.com> Date: Tue, 4 Jun 2024 20:00:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E4=B8=BA=E6=89=A7=E6=B3=95=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zdxt/code/service/ThirdLoginService.java | 7 ++++ .../service/impl/ThirdLoginServiceImpl.java | 10 +++++ .../zdxt/code/task/EnforcementNumberTask.java | 37 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/EnforcementNumberTask.java diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ThirdLoginService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ThirdLoginService.java index 2732e2ba..0d40c1ed 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ThirdLoginService.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ThirdLoginService.java @@ -29,4 +29,11 @@ public interface ThirdLoginService { Boolean addSiqUserCompany(JSONObject jsonObject); void siqTestLogin(String userId,String userName); + + /** + * 查询是否为执法人员 + * @param userIdCard + * @return + */ + public Boolean checkIsLawOfficer(String userIdCard); } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java index 598e9810..5c3102b9 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java @@ -10,6 +10,7 @@ import com.zdxt.auth.feign.UserApi; import com.zdxt.auth.framework.shiro.nopaddword.LoginType; import com.zdxt.auth.framework.shiro.nopaddword.UserToken; import com.zdxt.code.domain.EnterpriseInformation; +import com.zdxt.code.mapper.Xzjcjbxx025711Mapper; import com.zdxt.code.service.IEnforcementRegistrationService; import com.zdxt.code.service.IEnterpriseInformationService; import com.zdxt.code.service.ThirdLoginService; @@ -56,6 +57,9 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { @Autowired private IEnterpriseInformationService enterpriseInformationService; + @Autowired + private Xzjcjbxx025711Mapper xzjcjbxx025711Mapper; + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); @Override @@ -189,4 +193,10 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { Subject subject = SecurityUtils.getSubject(); subject.login(sysToken); } + + @Override + public Boolean checkIsLawOfficer(String userIdCard) { + + return null; + } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/EnforcementNumberTask.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/EnforcementNumberTask.java new file mode 100644 index 00000000..f6fed3cc --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/EnforcementNumberTask.java @@ -0,0 +1,37 @@ +package com.zdxt.code.task; + +import com.zdxt.auth.project.system.user.service.IUserService; +import com.zdxt.code.domain.Zfryjdm2405301; +import com.zdxt.code.mapper.Xzjcjbxx025711Mapper; +import com.zdxt.domain.auth.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 同步执法人员证件号 + */ +@Component("enforcementNumberTask") +public class EnforcementNumberTask { + + @Autowired + private Xzjcjbxx025711Mapper xzjcjbxx025711Mapper; + + @Autowired + private IUserService userService; + + public void syncNumber(){ + List zfryjdm2405301s = xzjcjbxx025711Mapper.queryZFRY(); + for (Zfryjdm2405301 zfryjdm2405301 : zfryjdm2405301s) { + User user = new User(); + user.setCertificateNumber(zfryjdm2405301.getSfzcode()); + List users = userService.selectUserList(user); + if(users.size() > 0 ){ + User user1 = users.get(0); + user1.setLawCertificateNum(zfryjdm2405301.getZfcode()); + userService.updateUserInfo(user1); + } + } + } +}