6 changed files with 143 additions and 2 deletions
@ -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; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -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); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue