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/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 fb17777e..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 @@ -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; @@ -9,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; @@ -55,6 +57,9 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { @Autowired private IEnterpriseInformationService enterpriseInformationService; + @Autowired + private Xzjcjbxx025711Mapper xzjcjbxx025711Mapper; + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); @Override @@ -163,8 +168,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 = "永久"; } @@ -186,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); + } + } + } +} 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