Browse Source

Merge remote-tracking branch 'origin/master'

v2
蟑螂恶霸 2 years ago
parent
commit
5d6830c50e
  1. 61
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/Zfryjdm2405301.java
  2. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/Xzjcjbxx025711Mapper.java
  3. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ThirdLoginService.java
  4. 17
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java
  5. 37
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/EnforcementNumberTask.java
  6. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml

61
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;
}
}

15
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<Xzcfajjbxx026705> queryCFAJByEnterpriseNumber(String enterpriseNumber);
/**
* 查询行政处罚案件
* @param
* @return 查询所有执法人员数据
*/
public List<Zfryjdm2405301> queryZFRY();
/**
* 通过身份证查询是否为执法人员
* @return
*/
public List<Zfryjdm2405301> queryZFRYByIdCard(String userIdCard);
}

7
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);
}

17
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;
}
}

37
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<Zfryjdm2405301> zfryjdm2405301s = xzjcjbxx025711Mapper.queryZFRY();
for (Zfryjdm2405301 zfryjdm2405301 : zfryjdm2405301s) {
User user = new User();
user.setCertificateNumber(zfryjdm2405301.getSfzcode());
List<User> users = userService.selectUserList(user);
if(users.size() > 0 ){
User user1 = users.get(0);
user1.setLawCertificateNum(zfryjdm2405301.getZfcode());
userService.updateUserInfo(user1);
}
}
}
}

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Xzjcjbxx025711Mapper.xml

@ -317,4 +317,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where c.c201016 = #{enterpriseNumber} order by c.c201016 desc limit 10
</select>
<select id="queryZFRY" parameterType="String" resultType="com.zdxt.code.domain.Zfryjdm2405301">
select `name`,zfzzfdw,sfzcode,zfcode from ZFRYJDM2405301
</select>
<select id="queryZFRYByIdCard" parameterType="String" resultType="com.zdxt.code.domain.Zfryjdm2405301">
select `name`,zfzzfdw,sfzcode,zfcode from ZFRYJDM2405301 where SFZCODE = #{userIdCard}
</select>
</mapper>
Loading…
Cancel
Save