|
|
|
@ -1131,212 +1131,425 @@ public class UsersServiceImpl implements UsersService {
|
|
|
|
|
@Override
|
|
|
|
|
public ReturnMap setPractitionerAdd(PageData pd, MultipartFile[] files) throws Exception {
|
|
|
|
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
|
|
|
|
|
|
|
|
|
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) {
|
|
|
|
|
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
|
|
|
|
|
try {
|
|
|
|
|
FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new Exception("人脸图像不符合要求,请重新上传");
|
|
|
|
|
if(StringUtils.isEmpty(pd.getString("choice"))) {
|
|
|
|
|
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) {
|
|
|
|
|
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
|
|
|
|
|
try {
|
|
|
|
|
FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new Exception("人脸图像不符合要求,请重新上传");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
|
|
|
|
return ReturnMap.error("身份证号校验不通过,请核对信息");
|
|
|
|
|
}*/
|
|
|
|
|
PageData corp = new PageData();
|
|
|
|
|
corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
|
|
|
|
corp = corpInfoService.findById(corp);
|
|
|
|
|
String ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版
|
|
|
|
|
ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11";
|
|
|
|
|
}
|
|
|
|
|
else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版
|
|
|
|
|
ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
}
|
|
|
|
|
else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版
|
|
|
|
|
ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4";
|
|
|
|
|
}
|
|
|
|
|
PageData role = new PageData();
|
|
|
|
|
role.put("ROLE_ID", ROLE_ID);
|
|
|
|
|
role = roleService.findById(role);
|
|
|
|
|
pd.put("USER_ID", Warden.get32UUID());
|
|
|
|
|
pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号
|
|
|
|
|
pd.put("RIGHTS", role.getString("RIGHTS"));
|
|
|
|
|
pd.put("USERNAME", pd.getString("USER_ID_CARD"));
|
|
|
|
|
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
|
|
|
|
|
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");
|
|
|
|
|
PageData lc = dictionariesCorpService.saveSelf(pd);
|
|
|
|
|
pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID"));
|
|
|
|
|
}
|
|
|
|
|
PageData corp = new PageData();
|
|
|
|
|
corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
|
|
|
|
corp = corpInfoService.findById(corp);
|
|
|
|
|
String ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版
|
|
|
|
|
ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11";
|
|
|
|
|
}
|
|
|
|
|
else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版
|
|
|
|
|
ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
}
|
|
|
|
|
else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版
|
|
|
|
|
ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4";
|
|
|
|
|
}
|
|
|
|
|
PageData role = new PageData();
|
|
|
|
|
role.put("ROLE_ID", ROLE_ID);
|
|
|
|
|
role = roleService.findById(role);
|
|
|
|
|
pd.put("USER_ID", Warden.get32UUID());
|
|
|
|
|
pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号
|
|
|
|
|
pd.put("RIGHTS", role.getString("RIGHTS"));
|
|
|
|
|
pd.put("USERNAME", pd.getString("USER_ID_CARD"));
|
|
|
|
|
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
|
|
|
|
|
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");
|
|
|
|
|
PageData lc = dictionariesCorpService.saveSelf(pd);
|
|
|
|
|
pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pd.put("LAST_LOGIN", "");
|
|
|
|
|
pd.put("IP", "");
|
|
|
|
|
pd.put("STATUS", "0");
|
|
|
|
|
pd.put("ISMAIN", "0");
|
|
|
|
|
pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark");
|
|
|
|
|
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString());
|
|
|
|
|
pd.put("LAST_LOGIN", "");
|
|
|
|
|
pd.put("IP", "");
|
|
|
|
|
pd.put("STATUS", "0");
|
|
|
|
|
pd.put("ISMAIN", "0");
|
|
|
|
|
pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark");
|
|
|
|
|
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString());
|
|
|
|
|
|
|
|
|
|
if (usersMapper.findByUsername(pd) == null) {
|
|
|
|
|
if (usersMapper.findByUsername(pd) == null) {
|
|
|
|
|
|
|
|
|
|
// 申请入职企业
|
|
|
|
|
PageData applyCorp = new PageData();
|
|
|
|
|
Warden.initData(applyCorp, "app", pd);
|
|
|
|
|
applyCorp.put("USER_CORP_ID", Warden.get32UUID());
|
|
|
|
|
applyCorp.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业
|
|
|
|
|
applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门
|
|
|
|
|
applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位
|
|
|
|
|
applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级
|
|
|
|
|
applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级
|
|
|
|
|
applyCorp.put("DURATION", pd.getString("DURATION")); //
|
|
|
|
|
applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); //
|
|
|
|
|
applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); //
|
|
|
|
|
// 申请入职企业
|
|
|
|
|
PageData applyCorp = new PageData();
|
|
|
|
|
Warden.initData(applyCorp, "app", pd);
|
|
|
|
|
applyCorp.put("USER_CORP_ID", Warden.get32UUID());
|
|
|
|
|
applyCorp.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业
|
|
|
|
|
applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门
|
|
|
|
|
applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位
|
|
|
|
|
applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级
|
|
|
|
|
applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级
|
|
|
|
|
applyCorp.put("DURATION", pd.getString("DURATION")); //
|
|
|
|
|
applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); //
|
|
|
|
|
applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); //
|
|
|
|
|
|
|
|
|
|
applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间
|
|
|
|
|
applyCorp.put("APPLY_STATUS", "0"); // 0.申请中
|
|
|
|
|
applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请
|
|
|
|
|
applyCorp.put("APPLY_CONTENT", ""); //
|
|
|
|
|
if ("select".equals(pd.getString("letDutiesType"))) {
|
|
|
|
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
|
|
|
|
dicPd.put("BIANMA", "zhiwu");
|
|
|
|
|
dicPd.put("NAME", pd.getString("DUTIESValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
}else{
|
|
|
|
|
applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间
|
|
|
|
|
applyCorp.put("APPLY_STATUS", "0"); // 0.申请中
|
|
|
|
|
applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请
|
|
|
|
|
applyCorp.put("APPLY_CONTENT", ""); //
|
|
|
|
|
if ("select".equals(pd.getString("letDutiesType"))) {
|
|
|
|
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
|
|
|
|
dicPd.put("BIANMA", "zhiwu");
|
|
|
|
|
dicPd.put("NAME", pd.getString("DUTIESValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
}else{
|
|
|
|
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务
|
|
|
|
|
if ("select".equals(pd.getString("letTitleType"))) {
|
|
|
|
|
pd.put("TITLE", pd.getString("TITLE"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
|
|
|
|
dicPd.put("BIANMA", "zhicheng");
|
|
|
|
|
dicPd.put("NAME", pd.getString("letTitleValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
}else{
|
|
|
|
|
applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务
|
|
|
|
|
if ("select".equals(pd.getString("letTitleType"))) {
|
|
|
|
|
pd.put("TITLE", pd.getString("TITLE"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
|
|
|
|
dicPd.put("BIANMA", "zhicheng");
|
|
|
|
|
dicPd.put("NAME", pd.getString("letTitleValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
}else{
|
|
|
|
|
pd.put("TITLE", pd.getString("TITLE"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
applyCorp.put("TITLE", pd.getString("TITLE")); // 职称
|
|
|
|
|
userCorpService.save(applyCorp);
|
|
|
|
|
applyCorp.put("TITLE", pd.getString("TITLE")); // 职称
|
|
|
|
|
userCorpService.save(applyCorp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> filePaths = new ArrayList<>();
|
|
|
|
|
PageData idCard = new PageData();
|
|
|
|
|
Warden.initData(idCard, "app", pd);
|
|
|
|
|
PageData driverLicense = new PageData();
|
|
|
|
|
Warden.initData(driverLicense, "app", pd);
|
|
|
|
|
PageData qualificationCertificate = new PageData();
|
|
|
|
|
Warden.initData(qualificationCertificate, "app", pd);
|
|
|
|
|
for (int i = 0; i < files.length; i++) {
|
|
|
|
|
//保存签名文件
|
|
|
|
|
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
|
|
|
|
String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf("."));
|
|
|
|
|
smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile);
|
|
|
|
|
switch (i) {
|
|
|
|
|
case 0:
|
|
|
|
|
idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
List<String> filePaths = new ArrayList<>();
|
|
|
|
|
PageData idCard = new PageData();
|
|
|
|
|
Warden.initData(idCard, "app", pd);
|
|
|
|
|
PageData driverLicense = new PageData();
|
|
|
|
|
Warden.initData(driverLicense, "app", pd);
|
|
|
|
|
PageData qualificationCertificate = new PageData();
|
|
|
|
|
Warden.initData(qualificationCertificate, "app", pd);
|
|
|
|
|
for (int i = 0; i < files.length; i++) {
|
|
|
|
|
//保存签名文件
|
|
|
|
|
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
|
|
|
|
String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf("."));
|
|
|
|
|
smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile);
|
|
|
|
|
switch (i) {
|
|
|
|
|
case 0:
|
|
|
|
|
idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
idCard.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证
|
|
|
|
|
idCard.put("ID_NO", pd.getString("USER_ID_CARD"));
|
|
|
|
|
idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
idCard.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证
|
|
|
|
|
idCard.put("ID_NO", pd.getString("USER_ID_CARD"));
|
|
|
|
|
// idCard.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY"));
|
|
|
|
|
// idCard.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE"));
|
|
|
|
|
idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START"));
|
|
|
|
|
idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END"));
|
|
|
|
|
idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN"));
|
|
|
|
|
userCertificateService.save(idCard);
|
|
|
|
|
idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START"));
|
|
|
|
|
idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END"));
|
|
|
|
|
idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN"));
|
|
|
|
|
userCertificateService.save(idCard);
|
|
|
|
|
|
|
|
|
|
// 驾驶证
|
|
|
|
|
driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
driverLicense.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicense.put("CERTIFICATE_CATEGORY", "2");
|
|
|
|
|
driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO"));
|
|
|
|
|
driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY"));
|
|
|
|
|
driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END"));
|
|
|
|
|
driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN"));
|
|
|
|
|
userCertificateService.save(driverLicense);
|
|
|
|
|
String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(",");
|
|
|
|
|
for (int i = 0; i < DRIVING_MODEL.length; i++) {
|
|
|
|
|
PageData driverLicenseCategory = new PageData();
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
driverLicenseCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]);
|
|
|
|
|
userCertificateAppendixService.save(driverLicenseCategory);
|
|
|
|
|
}
|
|
|
|
|
// 驾驶证
|
|
|
|
|
driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
driverLicense.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicense.put("CERTIFICATE_CATEGORY", "2");
|
|
|
|
|
driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO"));
|
|
|
|
|
driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY"));
|
|
|
|
|
driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END"));
|
|
|
|
|
driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN"));
|
|
|
|
|
userCertificateService.save(driverLicense);
|
|
|
|
|
String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(",");
|
|
|
|
|
for (int i = 0; i < DRIVING_MODEL.length; i++) {
|
|
|
|
|
PageData driverLicenseCategory = new PageData();
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
driverLicenseCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]);
|
|
|
|
|
userCertificateAppendixService.save(driverLicenseCategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 道路运输从业资格证
|
|
|
|
|
qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificate.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificate.put("CERTIFICATE_CATEGORY", "3");
|
|
|
|
|
qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO"));
|
|
|
|
|
qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY"));
|
|
|
|
|
qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END"));
|
|
|
|
|
qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN"));
|
|
|
|
|
userCertificateService.save(qualificationCertificate);
|
|
|
|
|
String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(",");
|
|
|
|
|
for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) {
|
|
|
|
|
PageData qualificationCertificateCategory = new PageData();
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]);
|
|
|
|
|
userCertificateAppendixService.save(qualificationCertificateCategory);
|
|
|
|
|
}
|
|
|
|
|
// 道路运输从业资格证
|
|
|
|
|
qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificate.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificate.put("CERTIFICATE_CATEGORY", "3");
|
|
|
|
|
qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO"));
|
|
|
|
|
qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY"));
|
|
|
|
|
qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END"));
|
|
|
|
|
qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN"));
|
|
|
|
|
userCertificateService.save(qualificationCertificate);
|
|
|
|
|
String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(",");
|
|
|
|
|
for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) {
|
|
|
|
|
PageData qualificationCertificateCategory = new PageData();
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]);
|
|
|
|
|
userCertificateAppendixService.save(qualificationCertificateCategory);
|
|
|
|
|
}
|
|
|
|
|
// pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
|
|
|
|
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证
|
|
|
|
|
pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是
|
|
|
|
|
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证
|
|
|
|
|
pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是
|
|
|
|
|
|
|
|
|
|
pd.put("DUTIES", ""); // 职务
|
|
|
|
|
pd.put("TITLE", ""); // 职称
|
|
|
|
|
pd.put("ENTRY_DATE", ""); // 入职时间
|
|
|
|
|
userInfoService.save(pd);
|
|
|
|
|
pd.put("CORPINFO_ID", ""); // 入职企业
|
|
|
|
|
pd.put("DEPARTMENT_ID", ""); // 部门
|
|
|
|
|
pd.put("POST_ID", ""); // 岗位
|
|
|
|
|
pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级
|
|
|
|
|
pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级
|
|
|
|
|
pd.put("DURATION", ""); //
|
|
|
|
|
pd.put("WORKSTATUS", ""); //
|
|
|
|
|
pd.put("WORKPERIOD", ""); //
|
|
|
|
|
usersMapper.saveUser(pd);
|
|
|
|
|
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
|
|
|
|
|
for (String str : PERSONNEL_TYPES) {
|
|
|
|
|
PageData pdd = new PageData();
|
|
|
|
|
pdd.put("ID", Warden.get32UUID());
|
|
|
|
|
pdd.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
pdd.put("PERSONNEL_TYPE", str);
|
|
|
|
|
userInfoService.addUserInfoPersonnelType(pdd);
|
|
|
|
|
pd.put("DUTIES", ""); // 职务
|
|
|
|
|
pd.put("TITLE", ""); // 职称
|
|
|
|
|
pd.put("ENTRY_DATE", ""); // 入职时间
|
|
|
|
|
userInfoService.save(pd);
|
|
|
|
|
pd.put("CORPINFO_ID", ""); // 入职企业
|
|
|
|
|
pd.put("DEPARTMENT_ID", ""); // 部门
|
|
|
|
|
pd.put("POST_ID", ""); // 岗位
|
|
|
|
|
pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级
|
|
|
|
|
pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级
|
|
|
|
|
pd.put("DURATION", ""); //
|
|
|
|
|
pd.put("WORKSTATUS", ""); //
|
|
|
|
|
pd.put("WORKPERIOD", ""); //
|
|
|
|
|
usersMapper.saveUser(pd);
|
|
|
|
|
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
|
|
|
|
|
for (String str : PERSONNEL_TYPES) {
|
|
|
|
|
PageData pdd = new PageData();
|
|
|
|
|
pdd.put("ID", Warden.get32UUID());
|
|
|
|
|
pdd.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
pdd.put("PERSONNEL_TYPE", str);
|
|
|
|
|
userInfoService.addUserInfoPersonnelType(pdd);
|
|
|
|
|
}
|
|
|
|
|
return ReturnMap.ok();
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
String userId = pd.getString("USER_ID");
|
|
|
|
|
/*userCorpService.modifyUserStatus(userId);
|
|
|
|
|
pd.put("USER_ID",userId);
|
|
|
|
|
usersMapper.editUser(pd);
|
|
|
|
|
return ReturnMap.ok();*/
|
|
|
|
|
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) {
|
|
|
|
|
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
|
|
|
|
|
try {
|
|
|
|
|
FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new Exception("人脸图像不符合要求,请重新上传");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
|
|
|
|
return ReturnMap.error("身份证号校验不通过,请核对信息");
|
|
|
|
|
}*/
|
|
|
|
|
PageData corp = new PageData();
|
|
|
|
|
corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
|
|
|
|
corp = corpInfoService.findById(corp);
|
|
|
|
|
String ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
if ("518eb2d1c9c1470ba552249d017d29b7".equals(corp.getString("VIPLEVEL"))) { // 双重预防基础版
|
|
|
|
|
ROLE_ID = "c4903c96dfe74451b41bb6daa6e47f11";
|
|
|
|
|
}
|
|
|
|
|
else if ("7ba30577e5a54eca90bcbf63f249a3bc".equals(corp.getString("VIPLEVEL"))) { // 双重预防标准版
|
|
|
|
|
ROLE_ID = "223f076bf20e46039e95acc091b0b47d";
|
|
|
|
|
}
|
|
|
|
|
else if ("1b47de318d5847a8aabe9bcbb6f82510".equals(corp.getString("VIPLEVEL"))) { // 双重预防升级版
|
|
|
|
|
ROLE_ID = "409688eeb2ad4c728c2155b2982fb3d4";
|
|
|
|
|
}
|
|
|
|
|
PageData role = new PageData();
|
|
|
|
|
role.put("ROLE_ID", ROLE_ID);
|
|
|
|
|
role = roleService.findById(role);
|
|
|
|
|
pd.put("USER_ID", userId);
|
|
|
|
|
pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号
|
|
|
|
|
pd.put("RIGHTS", role.getString("RIGHTS"));
|
|
|
|
|
pd.put("USERNAME", pd.getString("USER_ID_CARD"));
|
|
|
|
|
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
|
|
|
|
|
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");
|
|
|
|
|
PageData lc = dictionariesCorpService.saveSelf(pd);
|
|
|
|
|
pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pd.put("LAST_LOGIN", "");
|
|
|
|
|
pd.put("IP", "");
|
|
|
|
|
pd.put("STATUS", "0");
|
|
|
|
|
pd.put("ISMAIN", "0");
|
|
|
|
|
pd.put("SKIN", "pcoded-navbar navbar-image-3, navbar pcoded-header navbar-expand-lg navbar-light header-dark");
|
|
|
|
|
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString());
|
|
|
|
|
|
|
|
|
|
if (usersMapper.findByUsername(pd) == null) {
|
|
|
|
|
|
|
|
|
|
// 申请入职企业
|
|
|
|
|
PageData applyCorp = new PageData();
|
|
|
|
|
Warden.initData(applyCorp, "app", pd);
|
|
|
|
|
applyCorp.put("USER_CORP_ID", Warden.get32UUID());
|
|
|
|
|
applyCorp.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
applyCorp.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); // 入职企业
|
|
|
|
|
applyCorp.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID")); // 部门
|
|
|
|
|
applyCorp.put("POST_ID", pd.getString("POST_ID")); // 岗位
|
|
|
|
|
applyCorp.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE")); // 倒班类型-1级
|
|
|
|
|
applyCorp.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO")); // 倒班类型-2级
|
|
|
|
|
applyCorp.put("DURATION", pd.getString("DURATION")); //
|
|
|
|
|
applyCorp.put("WORKSTATUS", pd.getString("WORKSTATUS")); //
|
|
|
|
|
applyCorp.put("WORKPERIOD", pd.getString("WORKPERIOD")); //
|
|
|
|
|
|
|
|
|
|
applyCorp.put("ENTRY_DATE", pd.getString("ENTRY_DATE")); // 入职时间
|
|
|
|
|
applyCorp.put("APPLY_STATUS", "0"); // 0.申请中
|
|
|
|
|
applyCorp.put("APPLY_TYPE", "2"); // 2.企业添加入职申请
|
|
|
|
|
applyCorp.put("APPLY_CONTENT", ""); //
|
|
|
|
|
if ("select".equals(pd.getString("letDutiesType"))) {
|
|
|
|
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
|
|
|
|
dicPd.put("BIANMA", "zhiwu");
|
|
|
|
|
dicPd.put("NAME", pd.getString("DUTIESValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if (!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
} else {
|
|
|
|
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务
|
|
|
|
|
if ("select".equals(pd.getString("letTitleType"))) {
|
|
|
|
|
pd.put("TITLE", pd.getString("TITLE"));
|
|
|
|
|
} else {
|
|
|
|
|
PageData dicPd = new PageData();
|
|
|
|
|
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
|
|
|
|
dicPd.put("BIANMA", "zhicheng");
|
|
|
|
|
dicPd.put("NAME", pd.getString("letTitleValue"));
|
|
|
|
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
|
|
|
if (!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
|
|
|
|
|
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
|
|
|
|
} else {
|
|
|
|
|
pd.put("TITLE", pd.getString("TITLE"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
applyCorp.put("TITLE", pd.getString("TITLE")); // 职称
|
|
|
|
|
userCorpService.save(applyCorp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> filePaths = new ArrayList<>();
|
|
|
|
|
PageData idCard = new PageData();
|
|
|
|
|
Warden.initData(idCard, "app", pd);
|
|
|
|
|
PageData driverLicense = new PageData();
|
|
|
|
|
Warden.initData(driverLicense, "app", pd);
|
|
|
|
|
PageData qualificationCertificate = new PageData();
|
|
|
|
|
Warden.initData(qualificationCertificate, "app", pd);
|
|
|
|
|
/*for (int i = 0; i < files.length; i++) {
|
|
|
|
|
//保存签名文件
|
|
|
|
|
String ffile = "practitioner" + "/" + DateUtil.getYear() + "/" + DateUtil.getMonth() + "/" + DateUtil.getOnlyDay();
|
|
|
|
|
String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf("."));
|
|
|
|
|
smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + ffile);
|
|
|
|
|
switch (i) {
|
|
|
|
|
case 0:
|
|
|
|
|
idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
idCard.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证
|
|
|
|
|
idCard.put("ID_NO", pd.getString("USER_ID_CARD"));
|
|
|
|
|
// idCard.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY"));
|
|
|
|
|
// idCard.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE"));
|
|
|
|
|
idCard.put("ID_VALIDITY_START", pd.getString("ID_CARD_VALIDITY_START"));
|
|
|
|
|
idCard.put("ID_VALIDITY_END", pd.getString("ID_CARD_VALIDITY_END"));
|
|
|
|
|
idCard.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
idCard.put("ID_ORGAN", pd.getString("ID_CARD_ORGAN"));
|
|
|
|
|
userCertificateService.save(idCard);*/
|
|
|
|
|
|
|
|
|
|
// 驾驶证
|
|
|
|
|
driverLicense.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
driverLicense.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicense.put("CERTIFICATE_CATEGORY", "2");
|
|
|
|
|
driverLicense.put("ID_NO", pd.getString("DRIVER_LICENSE_NO"));
|
|
|
|
|
driverLicense.put("ID_NATIONALITY", pd.getString("DRIVING_NATIONALITY"));
|
|
|
|
|
driverLicense.put("ID_ISSUE_DATE", pd.getString("DRIVER_LICENSE_ISSUE_DATE"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_START", pd.getString("DRIVER_LICENSE_VALIDITY_START"));
|
|
|
|
|
driverLicense.put("ID_VALIDITY_END", pd.getString("DRIVER_LICENSE_VALIDITY_END"));
|
|
|
|
|
driverLicense.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
driverLicense.put("ID_ORGAN", pd.getString("DRIVER_LICENSE_ORGAN"));
|
|
|
|
|
userCertificateService.save(driverLicense);
|
|
|
|
|
String[] DRIVING_MODEL = pd.getString("DRIVING_MODEL").split(",");
|
|
|
|
|
for (int i = 0; i < DRIVING_MODEL.length; i++) {
|
|
|
|
|
PageData driverLicenseCategory = new PageData();
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
driverLicenseCategory.put("USER_CERTIFICATE_ID", driverLicense.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
driverLicenseCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]);
|
|
|
|
|
userCertificateAppendixService.save(driverLicenseCategory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 道路运输从业资格证
|
|
|
|
|
qualificationCertificate.put("USER_CERTIFICATE_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificate.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificate.put("CERTIFICATE_CATEGORY", "3");
|
|
|
|
|
qualificationCertificate.put("ID_NO", pd.getString("QUALIFICATION_CERTIFICATE_NO"));
|
|
|
|
|
qualificationCertificate.put("ID_NATIONALITY", pd.getString("QUALIFICATION_CERTIFICATE_NATIONALITY"));
|
|
|
|
|
qualificationCertificate.put("ID_ISSUE_DATE", pd.getString("QUALIFICATION_CERTIFICATE_ISSUE_DATE"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_START", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_START"));
|
|
|
|
|
qualificationCertificate.put("ID_VALIDITY_END", pd.getString("QUALIFICATION_CERTIFICATE_VALIDITY_END"));
|
|
|
|
|
qualificationCertificate.put("ID_ADDRESS", pd.getString("ID_CARD_ADDRESS"));
|
|
|
|
|
qualificationCertificate.put("ID_ORGAN", pd.getString("QUALIFICATION_CERTIFICATE_ORGAN"));
|
|
|
|
|
userCertificateService.save(qualificationCertificate);
|
|
|
|
|
String[] QUALIFICATION_CERTIFICATE_CATEGORY = pd.getString("QUALIFICATION_CERTIFICATE_CATEGORY").split(",");
|
|
|
|
|
for (int i = 0; i < QUALIFICATION_CERTIFICATE_CATEGORY.length; i++) {
|
|
|
|
|
PageData qualificationCertificateCategory = new PageData();
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_APPENDIX_ID", Warden.get32UUID());
|
|
|
|
|
qualificationCertificateCategory.put("USER_CERTIFICATE_ID", qualificationCertificate.getString("USER_CERTIFICATE_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]);
|
|
|
|
|
userCertificateAppendixService.save(qualificationCertificateCategory);
|
|
|
|
|
}
|
|
|
|
|
// pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
|
|
|
|
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证
|
|
|
|
|
pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是
|
|
|
|
|
|
|
|
|
|
pd.put("DUTIES", ""); // 职务
|
|
|
|
|
pd.put("TITLE", ""); // 职称
|
|
|
|
|
pd.put("ENTRY_DATE", ""); // 入职时间
|
|
|
|
|
/*userInfoService.save(pd);*/
|
|
|
|
|
pd.put("CORPINFO_ID", ""); // 入职企业
|
|
|
|
|
pd.put("DEPARTMENT_ID", ""); // 部门
|
|
|
|
|
pd.put("POST_ID", ""); // 岗位
|
|
|
|
|
pd.put("SHIFTDUTYONE", ""); // 倒班类型-1级
|
|
|
|
|
pd.put("SHIFTDUTYTWO", ""); // 倒班类型-2级
|
|
|
|
|
pd.put("DURATION", ""); //
|
|
|
|
|
pd.put("WORKSTATUS", ""); //
|
|
|
|
|
pd.put("WORKPERIOD", ""); //
|
|
|
|
|
usersMapper.editUser(pd);
|
|
|
|
|
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
|
|
|
|
|
for (String str : PERSONNEL_TYPES) {
|
|
|
|
|
PageData pdd = new PageData();
|
|
|
|
|
pdd.put("ID", Warden.get32UUID());
|
|
|
|
|
pdd.put("USER_ID", pd.getString("USER_ID"));
|
|
|
|
|
pdd.put("PERSONNEL_TYPE", str);
|
|
|
|
|
userInfoService.addUserInfoPersonnelType(pdd);
|
|
|
|
|
}
|
|
|
|
|
return ReturnMap.ok();
|
|
|
|
|
}
|
|
|
|
|
return ReturnMap.ok();
|
|
|
|
|
}
|
|
|
|
|
return ReturnMap.error("保存失败");
|
|
|
|
|
}
|
|
|
|
@ -1370,4 +1583,10 @@ public class UsersServiceImpl implements UsersService {
|
|
|
|
|
public List<PageData> getAllUser(PageData pd) {
|
|
|
|
|
return usersMapper.getAllUser(pd);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<PageData> getUserNoCorpinfoListAll(Page page) {
|
|
|
|
|
return usersMapper.getUserNoCorpinfoListAll(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|