forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
04dcec4ec5
|
@ -60,6 +60,7 @@ public class ShiroConfiguration {
|
|||
filterChainMap.put("/404/**", "anon");
|
||||
filterChainMap.put("/assets/**", "anon");
|
||||
filterChainMap.put("/admin/check", "anon");
|
||||
filterChainMap.put("/admin/checkPractitioner", "anon");
|
||||
filterChainMap.put("/admin/islogin", "anon");
|
||||
filterChainMap.put("/admin/register", "anon");
|
||||
filterChainMap.put("/admin/adminCheck", "anon");
|
||||
|
|
|
@ -85,7 +85,6 @@ public class AppTrafficSecurityNoticeController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd.put("USER_ID", pd.getString("loginUserId"));
|
||||
pd = this.getPageData();
|
||||
pd.put("PERSON", Jurisdiction.getName());
|
||||
int count1 = securityNoticeService.getRedPoint(pd);
|
||||
//int count2 = noticeService.getRedPoint(pd);
|
||||
map.put("count", count1);
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
|
@ -26,6 +27,8 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
@Autowired
|
||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
|
@ -80,10 +83,23 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = trafficSecurityWaybillRegistrationService.findById(pd); // 根据ID读取
|
||||
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||
try {
|
||||
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||
// if(pd.getString("OPERATOR"))
|
||||
// pd.put("a", "119.60436762");
|
||||
// pd.put("b", "39.94546157");
|
||||
errInfo = "success";
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "数据获取成功");
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "数据获取失败");
|
||||
}
|
||||
map.put("commitmentList", commitmentList);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.zcloud.controller.comprehensive;
|
|||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
@ -25,6 +27,11 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
|
||||
@Autowired
|
||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
@Autowired
|
||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
@ResponseBody
|
||||
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
||||
|
@ -64,6 +71,38 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 查看详情
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getDetail")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||
try {
|
||||
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||
// if(pd.getString("OPERATOR"))
|
||||
// pd.put("a", "119.60436762");
|
||||
// pd.put("b", "39.94546157");
|
||||
errInfo = "success";
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "数据获取成功");
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "数据获取失败");
|
||||
}
|
||||
map.put("commitmentList", commitmentList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
|
|
|
@ -210,4 +210,18 @@ public class AppCorpInfoController extends BaseController {
|
|||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
|
||||
@RequestMapping(value = "/listAll")
|
||||
@ResponseBody
|
||||
public Object listAll() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
List<PageData> varList = corpinfoService.listAll(pd); //列出CorpInfo列表
|
||||
map.put("list", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class CorpInfoController extends BaseController {
|
|||
user.put("IP", ""); //IP
|
||||
user.put("STATUS", "0"); //状态
|
||||
user.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //用户默认皮肤
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("CORP_NAME"), "666666").toString()); //密码加密
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("CORP_NAME"), "Aa@123456").toString()); //密码加密
|
||||
if(null == usersService.findByUsername(user)){ //判断用户名是否存在
|
||||
usersService.saveUser(user); //执行保存
|
||||
// System.out.println(user.getString("PASSWORD"));
|
||||
|
@ -398,7 +398,7 @@ public class CorpInfoController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
PageData pageData = usersService.findById(pd);
|
||||
//corpInfo
|
||||
String pwd = new SimpleHash("SHA-1", pageData.getString("USERNAME"), "666666").toString();
|
||||
String pwd = new SimpleHash("SHA-1", pageData.getString("USERNAME"), "Aa@123456").toString();
|
||||
PageData updateUser = new PageData();
|
||||
updateUser.put("PASSWORD", pwd);
|
||||
updateUser.put("USER_ID", pageData.getString("USER_ID"));
|
||||
|
|
|
@ -1,20 +1,36 @@
|
|||
package com.zcloud.controller.system;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.mapper.dsno3.eduStudy.StudentMapper;
|
||||
import com.zcloud.mapper.dsno3.eduSystem.BaseFactoryMapper;
|
||||
import com.zcloud.service.eduArchives.ArchivesStudentService;
|
||||
import com.zcloud.service.eduStudy.FaceImgLogService;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.Response;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.plugins.websocketFace.FaceServerPool;
|
||||
import com.zcloud.service.system.*;
|
||||
import com.zcloud.service.system.impl.UserCorpServiceImpl;
|
||||
import com.zcloud.util.*;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||
import org.java_websocket.WebSocket;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartRequest;
|
||||
import ws.schild.jave.MultimediaInfo;
|
||||
import ws.schild.jave.MultimediaObject;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -28,6 +44,17 @@ public class AppUsersController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
@Autowired
|
||||
private UserCertificateService userCertificateService;
|
||||
@Autowired
|
||||
private UserCertificateAppendixService userCertificateAppendixService;
|
||||
@Autowired
|
||||
private UserCorpService userCorpService;
|
||||
|
||||
@Autowired
|
||||
private FHlogService FHLOG;
|
||||
@Autowired
|
||||
|
@ -37,8 +64,6 @@ public class AppUsersController extends BaseController {
|
|||
@Autowired
|
||||
private PhotoService photoService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
@Resource
|
||||
private FaceImgLogService faceImgLogService;
|
||||
|
@ -829,4 +854,237 @@ public class AppUsersController extends BaseController {
|
|||
// return map;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 判断用户名是否存在
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/hasUserIdCard")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "双重预防", menuServer = "企业管理", instructionsOperate = "用户管理", instructionsType = "判断用户身份证号是否存在")
|
||||
public Object hasUserIdCard() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "身份证号校验不通过,请核对信息");
|
||||
return map;
|
||||
}
|
||||
pd = userInfoService.getUserCardId(pd);
|
||||
if (pd != null) {
|
||||
map.put("result", "errInfo");
|
||||
PageData uc = new PageData();
|
||||
uc.put("USER_ID",pd.getString("USER_ID"));
|
||||
uc.put("ISDELETE","0");
|
||||
List<PageData> ucList = userCorpService.getPractitionerEmploymentCorp(uc);
|
||||
if (ucList.size() == 0) {
|
||||
map.put("msg", "该用户已存在,请自行办理入职申请");
|
||||
} else {
|
||||
uc = ucList.get(0);
|
||||
if ("1".equals(uc.getString("APPLY_STATUS"))) {
|
||||
map.put("msg", "该用户现正服务于【" + uc.getString("CORP_NAME") + "】");
|
||||
}
|
||||
else if ("0".equals(uc.getString("APPLY_STATUS"))) {
|
||||
if ("1".equals(pd.getString("APPLY_TYPE"))) map.put("msg", "该用户已提交入职申请,待企业审核");
|
||||
else if ("2".equals(pd.getString("APPLY_TYPE"))) map.put("msg", "该用户已由企业办理入职,待用户确认");
|
||||
else if ("3".equals(pd.getString("APPLY_TYPE"))) map.put("msg", "该用户已提交离职申请,待企业审核");
|
||||
else if ("4".equals(pd.getString("APPLY_TYPE"))) map.put("msg", "该用户已由企业办理解聘,待用户确认");
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从业人员注册
|
||||
*/
|
||||
@RequestMapping(value = "/setPractitionerRegister")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "手机", menuServer = "注册从业人员", instructionsOperate = "注册从业人员", instructionsType = "注册")
|
||||
public Object setPractitionerRegister(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
fileList.add(request.getFile("file" + i));
|
||||
}
|
||||
usersService.setPractitionerRegister(pd, fileList.toArray(new MultipartFile[fileList.size()]));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取从业人员信息
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getPractitionerInfo") // /goEditUser
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "从业人员", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "获取从业人员信息")
|
||||
public Object getPractitionerInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if ("1".equals(pd.getString("USER_ID"))) {
|
||||
return null;
|
||||
}
|
||||
pd = usersService.findById(pd);
|
||||
|
||||
PageData userInfo = userInfoService.findById(pd); // 添加 用户详情 CERTIFICATE_INFORMATION 证书信息
|
||||
List<PageData> userCerList = new ArrayList<PageData>();
|
||||
if (null != userInfo) {
|
||||
PageData userCerPd = new PageData();
|
||||
userCerPd.put("TYPE", "18");
|
||||
userCerPd.put("FOREIGN_KEY", pd.get("USER_ID"));
|
||||
userCerList = imgfilesService.listAll(userCerPd);
|
||||
pd.putAll(userInfo);
|
||||
}
|
||||
PageData cer = new PageData();
|
||||
cer.put("USER_ID", pd.getString("USER_ID"));
|
||||
List<PageData> certificateList = userCertificateService.listAll(cer);
|
||||
List<PageData> certificateAppendixList = userCertificateAppendixService.listAll(cer);
|
||||
for (PageData c : certificateList) {
|
||||
StringBuilder ALLOW_QUALIFICATION = new StringBuilder();
|
||||
StringBuilder ALLOW_QUALIFICATION_NAME = new StringBuilder();
|
||||
for (PageData ca : certificateAppendixList) {
|
||||
if (c.getString("USER_CERTIFICATE_ID").equals(ca.getString("USER_CERTIFICATE_ID"))) {
|
||||
if ("2".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION_NAME.append(ca.getString("BIANMA")).append(",");
|
||||
} else if ("3".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION_NAME.append(ca.getString("NAME")).append(",");
|
||||
}
|
||||
ALLOW_QUALIFICATION.append(ca.getString("ALLOW_QUALIFICATION")).append(",");
|
||||
}
|
||||
}
|
||||
c.put("ALLOW_QUALIFICATION", ALLOW_QUALIFICATION.length() < 1 ? "" : ALLOW_QUALIFICATION.substring(0, ALLOW_QUALIFICATION.length()-1));
|
||||
c.put("ALLOW_QUALIFICATION_NAME", ALLOW_QUALIFICATION_NAME.length() < 1 ? "" : ALLOW_QUALIFICATION_NAME.substring(0, ALLOW_QUALIFICATION_NAME.length()-1));
|
||||
}
|
||||
if (Tools.notEmpty(pd.getString("CORPINFO_ID"))) {
|
||||
PageData dept = new PageData();
|
||||
dept.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
dept = this.departmentService.findByCorpId(dept);
|
||||
pd.put("ISSTUDENT", Boolean.valueOf(pd.getString("ISSTUDENT")));
|
||||
PageData shiftDutyPeriod = new PageData();
|
||||
shiftDutyPeriod.put("DURATION", pd.get("DURATION"));
|
||||
shiftDutyPeriod.put("WORKSTATUS", pd.get("WORKSTATUS"));
|
||||
shiftDutyPeriod.put("WORKPERIOD", pd.get("WORKPERIOD"));
|
||||
map.put("period", shiftDutyPeriod);
|
||||
map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD"));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("userCerList", userCerList);
|
||||
map.put("certificateList", certificateList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 从业人员信息修改
|
||||
*/
|
||||
@RequestMapping(value = "/editPractitioner")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "手机", menuServer = "注册从业人员", instructionsOperate = "注册从业人员", instructionsType = "注册")
|
||||
public Object editPractitioner(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
fileList.add(request.getFile("file" + i));
|
||||
}
|
||||
usersService.editPractitioner(pd, fileList.toArray(new MultipartFile[fileList.size()]));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取从业人员信息
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getPractitionerEmploymentCorp") // /goEditUser
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "App", menuServer = "个人信息", instructionsOperate = "离职申请", instructionsType = "获取从业人员当前任职公司")
|
||||
public Object getPractitionerEmploymentCorp() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> corp = userCorpService.getPractitionerEmploymentCorp(pd);
|
||||
map.put("pd", corp.size()>0 ? corp.get(0) : null);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setPractitionerResignationByUser")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "App", menuServer = "个人信息", instructionsOperate = "离职申请", instructionsType = "离职申请提交")
|
||||
public Object setPractitionerResignationByUser() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("APPLY_TYPE","3"); // 3.从业人员离职申请
|
||||
pd.put("APPLY_STATUS","0"); // 0.申请中
|
||||
try {
|
||||
return userCorpService.setPractitionerResignation(pd);
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setPractitionerEntryByUser")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "App", menuServer = "个人信息", instructionsOperate = "入职申请", instructionsType = "入职申请提交")
|
||||
public Object setPractitionerEntryByUser() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
Warden.initData(pd, "app", pd);
|
||||
pd.put("USER_CORP_ID", Warden.get32UUID());
|
||||
pd.put("APPLY_TYPE","1"); // 1.从业人员入职申请
|
||||
pd.put("APPLY_STATUS","0"); // 0.申请中
|
||||
try {
|
||||
userCorpService.save(pd);
|
||||
return ReturnMap.ok();
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/setPractitionerConfirmByUser")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "App", menuServer = "个人信息", instructionsOperate = "信息确认", instructionsType = "入职/离职确认")
|
||||
public Object setPractitionerConfirmByUser() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
try {
|
||||
return userCorpService.setPractitionerConfirmByUser(pd);
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -279,6 +279,73 @@ public class DictionariesController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取连级数据
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getDictList")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "数据字典", menuServer = "数据字典", instructionsOperate = "编辑", instructionsType = "获取字典数据")
|
||||
public Object getDictList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DICTIONARIES_ID = pd.getString("DICTIONARIES_ID");
|
||||
pd.put("PARENT_ID", Tools.isEmpty(DICTIONARIES_ID) ? "0" : DICTIONARIES_ID);
|
||||
List<Dictionaries> varList = dictionariesService.listSubDictByParent(pd); //用传过来的ID获取此ID下的子列表数据
|
||||
List<PageData> pdList = new ArrayList<PageData>();
|
||||
for (Dictionaries d : varList) {
|
||||
PageData pdf = new PageData();
|
||||
pdf.put("DICTIONARIES_ID", d.getDICTIONARIES_ID());
|
||||
pdf.put("BIANMA", d.getBIANMA());
|
||||
pdf.put("NAME", d.getNAME());
|
||||
pdList.add(pdf);
|
||||
}
|
||||
map.put("list", pdList);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过根节点ID获取所有终节点子级列表(不支持1级查询)
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getLevelCustom")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "数据字典", menuServer = "数据字典", instructionsOperate = "编辑", instructionsType = "获取字典数据")
|
||||
public Object getLevelCustom() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DICTIONARIES_ID = pd.getString("DICTIONARIES_ID");
|
||||
pd.put("PARENT_ID", Tools.isEmpty(DICTIONARIES_ID) ? "0" : DICTIONARIES_ID);
|
||||
List<Integer> levelList = new ArrayList<>();
|
||||
Integer level = Tools.isEmpty(pd.getString("LEVEL")) ? 0 : Integer.parseInt(pd.getString("LEVEL"));
|
||||
for (int i = 1; i < level; i++) {
|
||||
levelList.add(i);
|
||||
}
|
||||
pd.put("levelList", levelList);
|
||||
pd.put("paramParent", level > 1 ? "d"+(level-1) : "f");
|
||||
List<Dictionaries> varList = dictionariesService.getLevelCustom(pd); //用传过来的ID获取此ID下的子列表数据
|
||||
List<PageData> pdList = new ArrayList<PageData>();
|
||||
for (Dictionaries d : varList) {
|
||||
PageData pdf = new PageData();
|
||||
pdf.put("DICTIONARIES_ID", d.getDICTIONARIES_ID());
|
||||
pdf.put("BIANMA", d.getBIANMA());
|
||||
pdf.put("NAME", d.getNAME());
|
||||
pdList.add(pdf);
|
||||
}
|
||||
map.put("list", pdList);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取连级数据
|
||||
*
|
||||
|
|
|
@ -244,6 +244,213 @@ public class LoginController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求登录验证用户接口
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/checkPractitioner", produces = "application/json;charset=UTF-8")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "登录",instructionsType = "请求登录验证用户接口")
|
||||
public Object checkPractitioner() throws Exception {
|
||||
// 获取IP
|
||||
HttpServletRequest request = this.getRequest();
|
||||
String ip = "";
|
||||
if (request.getHeader("x-forwarded-for") == null) {
|
||||
ip = request.getRemoteAddr();
|
||||
} else {
|
||||
ip = request.getHeader("x-forwarded-for");
|
||||
}
|
||||
Boolean isLogin = true; // 当subject.login
|
||||
// 验证不通过时,用于跳过后续操作(有时会出现subject.login验证不通过,但是subject.isAuthenticated为true的情况)
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
// if(!BasicInfoUtil.checkValid()) {
|
||||
// String errInfo = "invalid";
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String source = pd.getString("SOURCE");
|
||||
String errInfo = "success";
|
||||
String loginData = pd.getString("KEYDATA");
|
||||
if(loginData.indexOf("zcloudchina")==-1){
|
||||
loginData = RSAUtils.decryptDataOnJava(loginData, RSAUtils.getPrivateKey());
|
||||
}
|
||||
|
||||
|
||||
String KEYDATA[] = loginData.replaceAll("zcloudchina", "").split(",zy,");
|
||||
|
||||
if (null != KEYDATA && KEYDATA.length == 2) {
|
||||
String USERNAME = KEYDATA[0]; // 登录过来的用户名
|
||||
String PASSWORD = KEYDATA[1]; // 登录过来的密码
|
||||
UsernamePasswordToken token;
|
||||
if (null != pd.get("isLogin")) {
|
||||
token = new UsernamePasswordToken(USERNAME, PASSWORD);
|
||||
} else {
|
||||
token = new UsernamePasswordToken(USERNAME, new SimpleHash("SHA-1", USERNAME, PASSWORD).toString());
|
||||
}
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
try {
|
||||
subject.login(token); // 这一步在调用login(token)方法时,它会走到MyRealm.doGetAuthenticationInfo()方法中
|
||||
} catch (UnknownAccountException uae) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
} catch (IncorrectCredentialsException ice) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
} catch (LockedAccountException lae) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
} catch (ExcessiveAttemptsException eae) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
} catch (DisabledAccountException sae) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
} catch (AuthenticationException ae) {
|
||||
errInfo = "usererror";
|
||||
isLogin = false;
|
||||
}
|
||||
System.out.println(PASSWORD);
|
||||
try {
|
||||
if (subject.isAuthenticated() && isLogin) { // 验证是否登录成功
|
||||
removeSession(USERNAME);
|
||||
Session session = Jurisdiction.getSession();
|
||||
pd.put("USERNAME", USERNAME);
|
||||
pd = usersService.findByUsername(pd);
|
||||
PageData cpd = null;
|
||||
if (!Tools.isEmpty(pd.getString("CORPINFO_ID"))) {
|
||||
cpd = corpinfoService.findById(pd);
|
||||
}
|
||||
// if (pd != null && pd.get("RIGHTS") != null && Tools.notEmpty(pd.get("RIGHTS").toString())
|
||||
// && "788664966448".equals(pd.get("RIGHTS").toString())) {
|
||||
map.put("USERNAME", USERNAME);
|
||||
map.put("USER_ID", pd.getString("USER_ID"));
|
||||
map.put("NAME", pd.getString("NAME"));
|
||||
map.put("ISMAIN", pd.getString("ISMAIN"));
|
||||
map.put("IS_SAFETY", pd.get("IS_SAFETY"));
|
||||
map.put("ISHEAD", pd.getString("ISHEAD"));
|
||||
map.put("ISLEADER", pd.getString("ISLEADER"));
|
||||
map.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
map.put("CORPINFO_ID", cpd==null ? "" : pd.getString("CORPINFO_ID"));
|
||||
map.put("CORP_NAME", cpd==null ? "" : cpd.getString("CORP_NAME"));
|
||||
map.put("PROVINCE", cpd==null ? "" :cpd.getString("PROVINCE"));
|
||||
map.put("PLS_ID", pd.getOrDefault("PLS_ID",""));
|
||||
map.put("POST_URL", cpd==null ? "" : cpd.getOrDefault("POST_URL",""));
|
||||
// PageData dpd = new PageData();
|
||||
// dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
// dpd=departmentService.findById(dpd);
|
||||
// map.put("DEPARTMENT_NAME", dpd.getString("NAME"));
|
||||
// map.put("PARENT_NAME", dpd.getString("PARENT_NAME"));
|
||||
PageData rpd = roleService.findById(pd);
|
||||
map.put("ROLEID", rpd.getString("ROLE_ID"));
|
||||
map.put("ROLE_NAME", rpd.getString("ROLE_NAME"));
|
||||
map.put("USERBZ", pd.getString("BZ"));
|
||||
PageData dpd = null;
|
||||
if (!Tools.isEmpty(pd.getString("DEPARTMENT_ID"))) {
|
||||
dpd = new PageData();
|
||||
dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
dpd = departmentService.findById(dpd);
|
||||
}
|
||||
if (dpd!=null && "1".equals(dpd.getString("FOREIGNPERSONNEL"))) {
|
||||
return ReturnMap.error("账号密码不正确");
|
||||
}
|
||||
map.put("DEPARTMENT_NAME", dpd==null ? "" : dpd.getString("NAME"));
|
||||
map.put("DEPARTMENT_LEVEL", dpd==null ? "" : dpd.getString("LEVEL"));
|
||||
map.put("ISSUPERVISE", dpd==null ? "" : dpd.getString("ISSUPERVISE"));
|
||||
User user = new User();
|
||||
user.setUSER_ID(pd.getString("USER_ID"));
|
||||
user.setUSERNAME(pd.getString("USERNAME"));
|
||||
user.setPASSWORD(pd.getString("PASSWORD"));
|
||||
user.setNAME(pd.getString("NAME"));
|
||||
user.setROLE_ID(pd.getString("ROLE_ID"));
|
||||
user.setLAST_LOGIN(pd.getString("LAST_LOGIN"));
|
||||
user.setIP(pd.getString("IP"));
|
||||
user.setSTATUS(pd.getString("STATUS"));
|
||||
if (dpd!=null) {
|
||||
user.setSuperviseDepartId(this.superviseDepart(dpd)); //监管下部门ID
|
||||
}
|
||||
if (Tools.notEmpty(pd.getString("WORKSTATUS")) && "2".equals(pd.getString("WORKSTATUS"))) {// 查看用户是否处于周期性休班中
|
||||
// 休班(周期性)
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
// 查看用户是否在休假中
|
||||
PageData isRest = this.getPageData();
|
||||
isRest.put("ISREST", "1");
|
||||
isRest.put("USER_ID", pd.getString("USER_ID"));
|
||||
isRest.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
List<PageData> restList = offdutyService.listAll(isRest);
|
||||
if (restList != null && restList.size() > 0) {
|
||||
// 休假中
|
||||
map.put("ISREST", "1");
|
||||
} else {
|
||||
// 正常工作
|
||||
map.put("ISREST", "0");
|
||||
}
|
||||
}
|
||||
if (cpd!=null) {
|
||||
map.put("deptList", departmentService.listAll(cpd));
|
||||
map.put("userList", usersService.listAllUser(cpd));
|
||||
map.put("CORP_TRAINTYPE", Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE"));// 用户所属企业的培训行业类型到
|
||||
}
|
||||
session.setAttribute(Const.SESSION_USER, user); // 把当前用户放入session
|
||||
session.setAttribute(Const.DEPARTMENT_ID, pd.getString("DEPARTMENT_ID")); // 把当前用户放入session
|
||||
session.setAttribute(Const.ISSUPERVISE, dpd==null ? "" : dpd.getString("ISSUPERVISE")); // 把当前用户放入session
|
||||
System.out.println(session.getAttribute(Const.VIPLEVEL));
|
||||
session.setAttribute(Const.CORPINFO_ID, pd.getString("CORPINFO_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.POST_ID,
|
||||
pd.getString("POST_ID") == null ? "" : pd.getString("POST_ID")); // 把当前用户岗位放入session
|
||||
session.setAttribute(Const.VIPLEVEL, cpd==null ? "" : cpd.getString("VIPLEVEL")); // 把当前用户放入session
|
||||
session.setAttribute(Const.USER_ID, pd.getString("USER_ID")); // 把当前用户企业放入session
|
||||
session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session
|
||||
session.setAttribute(Const.SESSION_U_NAME, user.getNAME()); // 放入用户姓名到session
|
||||
session.setAttribute(Const.IS_MAIN, pd.get("ISMAIN")); // 是否主账号
|
||||
session.setAttribute(Const.CORP_TRAINTYPE, cpd==null ? "" : (Tools.isEmpty(cpd.getString("TRAINTYPE")) ? "" : cpd.getString("TRAINTYPE"))); // 放入当前用户所属企业的培训行业类型到session
|
||||
|
||||
|
||||
// 记录日志
|
||||
PageData log = new PageData();
|
||||
log.put("USERNAME", USERNAME);
|
||||
log.put("CONTENT", "成功登录系统");
|
||||
log.put("FHLOG_ID", UuidUtil.get32UUID());
|
||||
log.put("IP", ip);
|
||||
log.put("CZTIME", DateUtil.date2Str(new Date()));
|
||||
log.put("SOURCE", source);
|
||||
log.put("USER_ID", pd.getString("USER_ID"));
|
||||
log.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
log.put("TYPE", "1");
|
||||
log.put("NAME", pd.getString("NAME"));
|
||||
log.put("DEPARTMENT", dpd==null ? "" : dpd.getString("NAME"));
|
||||
log.put("DEPARTMENT_ID", dpd==null ? "" : dpd.getString("DEPARTMENT_ID"));
|
||||
|
||||
FHLOG.save(log);
|
||||
|
||||
} else {
|
||||
token.clear();
|
||||
errInfo = "usererror";
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
map.put("msg", "用户名或密码有误");
|
||||
return map;
|
||||
}
|
||||
if (!"success".equals(errInfo))
|
||||
FHLOG.save(USERNAME, "尝试登录系统失败,用户名密码错误,无权限", ip);
|
||||
|
||||
} else {
|
||||
errInfo = "error"; // 缺少参数
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
if ("usererror".equals(errInfo)) {
|
||||
map.put("msg", "用户名或密码有误");
|
||||
} else if ("error".equals(errInfo)) {
|
||||
map.put("msg", "缺少参数");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户监管部门id
|
||||
* 等级(0--公司领导,1部门领导,3普通员工)
|
||||
|
@ -346,6 +553,6 @@ public class LoginController extends BaseController {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new SimpleHash("SHA-1", "18700000001", "666666").toString());
|
||||
System.out.println(new SimpleHash("SHA-1", "新绎七修酒店管理有限公司七修养生酒店", "666666").toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -72,6 +73,15 @@ public class UsersController extends BaseController {
|
|||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
@Autowired
|
||||
private UserCertificateService userCertificateService;
|
||||
@Autowired
|
||||
private UserCertificateAppendixService userCertificateAppendixService;
|
||||
@Autowired
|
||||
private UserCorpService userCorpService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
/**
|
||||
* 根据卡号找人信息
|
||||
*
|
||||
|
@ -480,157 +490,144 @@ public class UsersController extends BaseController {
|
|||
if (pd.getString("PASSWORD") != null && !"".equals(pd.getString("PASSWORD"))) {
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString());
|
||||
}
|
||||
String msg = usersService.changeOrUpdUserCardNo(pd);
|
||||
if (msg.equals(Const.CAN_CHENG_USER)) {
|
||||
if (PLSUtil.editUser(pd)) {
|
||||
if (Tools.isEmpty(pd.getString("CARDNO"))) {pd.put("CARDNO", null);}
|
||||
usersService.editUser(pd); //执行修改
|
||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||
pd.put("USER_ID_CARD", pd.get("USER_ID_CARD").toString().replace("x", "X")); //身份证最后小写x转换成大写X
|
||||
if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "身份证号校验不通过,请核对信息");
|
||||
return map;
|
||||
}
|
||||
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);
|
||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
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);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916");
|
||||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.delete(pd);
|
||||
userInfoService.save(pd);
|
||||
}
|
||||
// 如果修改了部门/岗位,将该用户所有清单都删除
|
||||
if (pd.get("OPERATIONTYPE") != null && pd.get("OPERATIONTYPE").toString() != null && Tools.notEmpty(pd.get("OPERATIONTYPE").toString())) {
|
||||
List<PageData> listIds = listManagerService.listListByUser(pd);
|
||||
if (listIds != null && listIds.size() > 0) {
|
||||
for (PageData listPd : listIds) {
|
||||
PageData pd1 = new PageData();
|
||||
pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd1.put("LISTMANAGER_ID", listPd.get("LISTMANAGER_ID"));
|
||||
listManagerService.remove(pd1);
|
||||
pd1 = listManagerService.findById(pd1);
|
||||
if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
|
||||
if ("listType0005".equals(pd1.get("TYPE").toString())) {
|
||||
pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
||||
pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
|
||||
pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
|
||||
pd1.put("PERIOD", null);
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
} else {
|
||||
if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
|
||||
String period = pd1.get("PERIOD").toString();
|
||||
switch (period) {
|
||||
case "checkPeriod0001"://每日
|
||||
pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
|
||||
break;
|
||||
usersService.editUser(pd); //执行修改
|
||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||
if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "身份证号校验不通过,请核对信息");
|
||||
return map;
|
||||
}
|
||||
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);
|
||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
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);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
}
|
||||
pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916");
|
||||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.delete(pd);
|
||||
userInfoService.save(pd);
|
||||
// 如果修改了部门/岗位,将该用户所有清单都删除
|
||||
if (pd.get("OPERATIONTYPE") != null && pd.get("OPERATIONTYPE").toString() != null && Tools.notEmpty(pd.get("OPERATIONTYPE").toString())) {
|
||||
List<PageData> listIds = listManagerService.listListByUser(pd);
|
||||
if (listIds != null && listIds.size() > 0) {
|
||||
for (PageData listPd : listIds) {
|
||||
PageData pd1 = new PageData();
|
||||
pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd1.put("LISTMANAGER_ID", listPd.get("LISTMANAGER_ID"));
|
||||
listManagerService.remove(pd1);
|
||||
pd1 = listManagerService.findById(pd1);
|
||||
if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
|
||||
if ("listType0005".equals(pd1.get("TYPE").toString())) {
|
||||
pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
||||
pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
|
||||
pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
|
||||
pd1.put("PERIOD", null);
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
} else {
|
||||
if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
|
||||
String period = pd1.get("PERIOD").toString();
|
||||
switch (period) {
|
||||
case "checkPeriod0001"://每日
|
||||
pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0002"://每周
|
||||
pd1.put("STARTTIME", DateUtil.getWeekStart());
|
||||
pd1.put("ENDTIME", DateUtil.getWeekEnd());
|
||||
break;
|
||||
case "checkPeriod0002"://每周
|
||||
pd1.put("STARTTIME", DateUtil.getWeekStart());
|
||||
pd1.put("ENDTIME", DateUtil.getWeekEnd());
|
||||
break;
|
||||
|
||||
case "checkPeriod0003"://每旬
|
||||
String year = DateUtil.getYear().toString();
|
||||
String month = DateUtil.getMonth().toString();
|
||||
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
||||
String startTime = year + "-" + month + "-";
|
||||
String endTime = year + "-" + month + "-";
|
||||
if (day <= 10) {
|
||||
startTime = startTime + "01 00:00:00";
|
||||
endTime = endTime + "10 23:59:59";
|
||||
} else if (day > 10 && day <= 20) {
|
||||
startTime = startTime + "11 00:00:00";
|
||||
endTime = endTime + "20 23:59:59";
|
||||
} else {
|
||||
startTime = startTime + "21 00:00:00";
|
||||
endTime = DateUtil.getMonthEndDay() + " 23:59:59";
|
||||
}
|
||||
pd1.put("STARTTIME", startTime);
|
||||
pd1.put("ENDTIME", endTime);
|
||||
break;
|
||||
|
||||
case "checkPeriod0004"://每月
|
||||
pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0005"://每季
|
||||
pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0006"://每年
|
||||
pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0007"://半年
|
||||
String byear = DateUtil.getYear().toString();
|
||||
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
||||
if (bmonth <= 6) {
|
||||
pd1.put("STARTTIME", byear + "-01-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-06-30 23:59:59");
|
||||
} else if (bmonth > 6) {
|
||||
pd1.put("STARTTIME", byear + "-07-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-12-31 23:59:59");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case "checkPeriod0003"://每旬
|
||||
String year = DateUtil.getYear().toString();
|
||||
String month = DateUtil.getMonth().toString();
|
||||
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
||||
String startTime = year + "-" + month + "-";
|
||||
String endTime = year + "-" + month + "-";
|
||||
if (day <= 10) {
|
||||
startTime = startTime + "01 00:00:00";
|
||||
endTime = endTime + "10 23:59:59";
|
||||
} else if (day > 10 && day <= 20) {
|
||||
startTime = startTime + "11 00:00:00";
|
||||
endTime = endTime + "20 23:59:59";
|
||||
} else {
|
||||
startTime = startTime + "21 00:00:00";
|
||||
endTime = DateUtil.getMonthEndDay() + " 23:59:59";
|
||||
}
|
||||
}
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
pd1.put("STARTTIME", startTime);
|
||||
pd1.put("ENDTIME", endTime);
|
||||
break;
|
||||
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
case "checkPeriod0004"://每月
|
||||
pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0005"://每季
|
||||
pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0006"://每年
|
||||
pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0007"://半年
|
||||
String byear = DateUtil.getYear().toString();
|
||||
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
||||
if (bmonth <= 6) {
|
||||
pd1.put("STARTTIME", byear + "-01-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-06-30 23:59:59");
|
||||
} else if (bmonth > 6) {
|
||||
pd1.put("STARTTIME", byear + "-07-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-12-31 23:59:59");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
} else {
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "人员定位系统修改失败,请联系管理员");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", msg);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -713,7 +710,7 @@ public class UsersController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd = userInfoService.getUserCardId(pd);
|
||||
if (pd != null) {
|
||||
map.put("pd", pd);
|
||||
|
@ -1452,7 +1449,7 @@ public class UsersController extends BaseController {
|
|||
PageData user = new PageData();
|
||||
user.put("USER_ID", this.get32UUID());
|
||||
user.put("USERNAME", userName);
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", userName, "666666").toString());
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", userName, "Aa@123456").toString());
|
||||
user.put("NAME", name);
|
||||
user.put("CARDNO", CardNo);
|
||||
user.put("ROLE_ID", role.getString("ROLE_ID"));
|
||||
|
@ -1988,7 +1985,7 @@ public class UsersController extends BaseController {
|
|||
errorStr.append("未找到该学员信息或人员信息不一致,请重新检查数据\n");
|
||||
continue;
|
||||
}
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", userName, "666666").toString());
|
||||
user.put("PASSWORD", new SimpleHash("SHA-1", userName, "Aa@123456").toString());
|
||||
user.put("ROLE_ID", role.getString("ROLE_ID"));
|
||||
user.put("LAST_LOGIN", "");
|
||||
user.put("IP", "");
|
||||
|
@ -2426,4 +2423,545 @@ public class UsersController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/getPractitionerPage") // /list
|
||||
// @RequiresPermissions("user:list")
|
||||
@ResponseBody
|
||||
public Object getPractitionerPage(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
/*检索条件*/
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID"); //关键词检索条件
|
||||
if (Tools.notEmpty(DEPARTMENT_ID)) pd.put("DEPARTMENT_ID", DEPARTMENT_ID.trim());
|
||||
String STARTTIME = pd.getString("STARTTIME"); //开始时间
|
||||
String ENDTIME = pd.getString("ENDTIME"); //结束时间
|
||||
if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME + " 00:00:00");
|
||||
if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME + " 00:00:00");
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("VIPLEVEL", Jurisdiction.getVIPLEVEL());
|
||||
page.setPd(pd);
|
||||
List<PageData> userList = usersService.practitionerlistPage(page); //列出用户列表
|
||||
|
||||
map.put("varList", userList);
|
||||
map.put("page", page);
|
||||
map.put("pd", pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改用户页面(从系统用户页面修改)
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getPractitionerInfo") // /goEditUser
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "从业人员", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "获取从业人员信息")
|
||||
public Object getPractitionerInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if ("1".equals(pd.getString("USER_ID"))) {
|
||||
return null;
|
||||
}
|
||||
pd = usersService.findById(pd);
|
||||
|
||||
PageData userInfo = userInfoService.findById(pd); // 添加 用户详情 CERTIFICATE_INFORMATION 证书信息
|
||||
List<PageData> userCerList = new ArrayList<PageData>();
|
||||
if (null != userInfo) {
|
||||
PageData userCerPd = new PageData();
|
||||
userCerPd.put("TYPE", "18");
|
||||
userCerPd.put("FOREIGN_KEY", pd.get("USER_ID"));
|
||||
userCerList = imgfilesService.listAll(userCerPd);
|
||||
pd.putAll(userInfo);
|
||||
}
|
||||
PageData cer = new PageData();
|
||||
cer.put("USER_ID", pd.getString("USER_ID"));
|
||||
List<PageData> certificateList = userCertificateService.listAll(cer);
|
||||
List<PageData> certificateAppendixList = userCertificateAppendixService.listAll(cer);
|
||||
for (PageData c : certificateList) {
|
||||
StringBuilder ALLOW_QUALIFICATION = new StringBuilder();
|
||||
for (PageData ca : certificateAppendixList) {
|
||||
if (c.getString("USER_CERTIFICATE_ID").equals(ca.getString("USER_CERTIFICATE_ID"))) {
|
||||
if ("2".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION.append(ca.getString("BIANMA")).append(",");
|
||||
} else if ("3".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION.append(ca.getString("NAME")).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
c.put("ALLOW_QUALIFICATION", ALLOW_QUALIFICATION.length() < 1 ? "" : ALLOW_QUALIFICATION.substring(0, ALLOW_QUALIFICATION.length()-1));
|
||||
}
|
||||
if (Tools.notEmpty(pd.getString("CORPINFO_ID"))) {
|
||||
PageData dept = new PageData();
|
||||
dept.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
dept = this.departmentService.findByCorpId(dept);
|
||||
pd.put("ISSTUDENT", Boolean.valueOf(pd.getString("ISSTUDENT")));
|
||||
PageData shiftDutyPeriod = new PageData();
|
||||
shiftDutyPeriod.put("DURATION", pd.get("DURATION"));
|
||||
shiftDutyPeriod.put("WORKSTATUS", pd.get("WORKSTATUS"));
|
||||
shiftDutyPeriod.put("WORKPERIOD", pd.get("WORKPERIOD"));
|
||||
map.put("period", shiftDutyPeriod);
|
||||
map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD"));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("userCerList", userCerList);
|
||||
map.put("certificateList", certificateList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setPractitionerReview")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "企业信息", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "入职/离职审核")
|
||||
public Object setPractitionerReview() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
try {
|
||||
return usersService.setPractitionerReview(pd);
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setPractitionerDismissal")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "企业信息", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "解聘")
|
||||
public Object setPractitionerDismissal() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
try {
|
||||
return usersService.setPractitionerDismissal(pd);
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/setPractitionerAdd")
|
||||
// @RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType = "企业信息", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "新增")
|
||||
public Object setPractitionerAdd(
|
||||
@RequestParam(value="imgFiles",required=false) MultipartFile[] imgFiles) throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = this.getPageData();
|
||||
try {
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
return usersService.setPractitionerAdd(pd, imgFiles);
|
||||
// 调用 Service 层保存用户
|
||||
} catch (Exception e) {
|
||||
map.put("msg", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改用户页面(从系统用户页面修改)
|
||||
* // goEditUser
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getPractitionerForEdit")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "企业信息", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "去修改用户页面(从用户页面修改)")
|
||||
public Object getPractitionerForEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if ("1".equals(pd.getString("USER_ID"))) {
|
||||
return null;
|
||||
} //不能修改admin用户
|
||||
pd.put("ROLE_ID", Jurisdiction.getVIPLEVEL());
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
pd.put("PARENT_ID", Jurisdiction.getVIPLEVEL());
|
||||
pd.put("ISMAIN", "0");
|
||||
List<PageData> userlist = roleService.findByPid(pd);
|
||||
// //获取部门下拉树
|
||||
// List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||
// String ZDEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
|
||||
// ZDEPARTMENT_ID = "".equals(ZDEPARTMENT_ID)?"0":ZDEPARTMENT_ID;
|
||||
// PageData dept = new PageData();
|
||||
// dept.put("DEPARTMENT_ID",ZDEPARTMENT_ID);
|
||||
// dept=this.departmentService.findById(dept);
|
||||
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||
PageData dept = new PageData();
|
||||
dept.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
dept = this.departmentService.findByCorpId(dept);
|
||||
String ZDEPARTMENT_ID = dept.getString("DEPARTMENT_ID");
|
||||
|
||||
PageData node = new PageData();
|
||||
node.put("id", dept.get("DEPARTMENT_ID"));
|
||||
node.put("parentId", dept.get("PARENT_ID"));
|
||||
node.put("name", dept.get("NAME"));
|
||||
node.put("icon", "../../../assets/images/user.gif");
|
||||
zdepartmentPdList.add(node);
|
||||
JSONArray arr = JSONArray.fromObject(departmentService.listAllDepartmentToSelect(ZDEPARTMENT_ID, zdepartmentPdList));
|
||||
map.put("zTreeNodes", (null == arr ? "" : "{\"treeNodes\":" + arr.toString() + "}"));
|
||||
String depname = null == dept ? "请选择" : dept.getString("NAME");
|
||||
map.put("depname", null == depname ? "请选择" : depname);
|
||||
pd = usersService.findById(pd); //根据ID读取
|
||||
pd.put("ISSTUDENT", Boolean.valueOf(pd.getString("ISSTUDENT")));
|
||||
PageData shiftDutyPeriod = new PageData();
|
||||
shiftDutyPeriod.put("DURATION", pd.get("DURATION"));
|
||||
shiftDutyPeriod.put("WORKSTATUS", pd.get("WORKSTATUS"));
|
||||
shiftDutyPeriod.put("WORKPERIOD", pd.get("WORKPERIOD"));
|
||||
|
||||
String ROLE_IDS = pd.getString("ROLE_IDS"); //副职角色ID
|
||||
if (Tools.notEmpty(ROLE_IDS)) {
|
||||
String arryROLE_ID[] = ROLE_IDS.split(",");
|
||||
for (int i = 0; i < roleList.size(); i++) {
|
||||
Role role = roleList.get(i);
|
||||
String roleId = role.getROLE_ID();
|
||||
for (int n = 0; n < arryROLE_ID.length; n++) {
|
||||
if (arryROLE_ID[n].equals(roleId)) {
|
||||
role.setRIGHTS("1"); //此时的目的是为了修改用户信息上,能看到副职角色都有哪些
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PageData userInfo = userInfoService.findById(pd); // 添加 用户详情 CERTIFICATE_INFORMATION 证书信息
|
||||
List<PageData> userCerList = new ArrayList<PageData>();
|
||||
if (null != userInfo) {
|
||||
PageData userCerPd = new PageData();
|
||||
userCerPd.put("TYPE", "18");
|
||||
userCerPd.put("FOREIGN_KEY", pd.get("USER_ID"));
|
||||
userCerList = imgfilesService.listAll(userCerPd);
|
||||
pd.putAll(userInfo);
|
||||
}
|
||||
PageData cer = new PageData();
|
||||
cer.put("USER_ID", pd.getString("USER_ID"));
|
||||
List<PageData> certificateList = userCertificateService.listAll(cer);
|
||||
List<PageData> certificateAppendixList = userCertificateAppendixService.listAll(cer);
|
||||
for (PageData c : certificateList) {
|
||||
StringBuilder ALLOW_QUALIFICATION = new StringBuilder();
|
||||
for (PageData ca : certificateAppendixList) {
|
||||
if (c.getString("USER_CERTIFICATE_ID").equals(ca.getString("USER_CERTIFICATE_ID"))) {
|
||||
if ("2".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION.append(ca.getString("ALLOW_QUALIFICATION")).append(",");
|
||||
} else if ("3".equals(c.getString("CERTIFICATE_CATEGORY"))) {
|
||||
ALLOW_QUALIFICATION.append(ca.getString("ALLOW_QUALIFICATION")).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
c.put("ALLOW_QUALIFICATION", ALLOW_QUALIFICATION.length() < 1 ? "" : ALLOW_QUALIFICATION.substring(0, ALLOW_QUALIFICATION.length()-1));
|
||||
}
|
||||
//获取岗位下拉
|
||||
PageData post = new PageData();
|
||||
post.put("DEPARTMENT_ID", ZDEPARTMENT_ID);
|
||||
post.put("STATUS", 0);
|
||||
List<PageData> postList = this.postService.listAll(post);
|
||||
map.put("postList", postList);
|
||||
map.put("pd", pd);
|
||||
map.put("userList", userlist);
|
||||
map.put("period", shiftDutyPeriod);
|
||||
map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD"));
|
||||
map.put("userCerList", userCerList);
|
||||
map.put("certificateList", certificateList);
|
||||
map.put("roleList", roleList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户(系统用户列表修改)
|
||||
*/
|
||||
@RequestMapping(value = "/setPractitionerEdit")
|
||||
// @RequiresPermissions("user:edit")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "企业信息", menuServer = "从业人员", instructionsOperate = "从业人员", instructionsType = "修改用户(系统用户列表修改)")
|
||||
public Object setPractitionerEdit(
|
||||
@RequestParam(value="idCardFrontFiles",required=false) MultipartFile idCardFrontFiles,
|
||||
@RequestParam(value="idCardBackFiles",required=false) MultipartFile idCardBackFiles,
|
||||
@RequestParam(value="driverLicenseFiles",required=false) MultipartFile driverLicenseFiles,
|
||||
@RequestParam(value="qualificationCertificateFiles",required=false) MultipartFile qualificationCertificateFiles
|
||||
) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
|
||||
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
|
||||
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");
|
||||
PageData lc = dictionariesCorpService.saveSelf(pd);
|
||||
pd.put("LEARNERCATEGORY", lc.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
||||
if (!Jurisdiction.getUsername().equals(pd.getString("USERNAME"))) { //如果当前登录用户修改用户资料提交的用户名非本人
|
||||
if ("admin".equals(pd.getString("USERNAME")) && !"admin".equals(Jurisdiction.getUsername())) {
|
||||
return null;
|
||||
} //非admin用户不能修改admin
|
||||
} else { //如果当前登录用户修改用户资料提交的用户名是本人,则不能修改本人的角色ID
|
||||
PageData upd = usersService.findByUsername(pd);
|
||||
pd.put("ROLE_ID", upd.getString("ROLE_ID")); //对角色ID还原本人角色ID
|
||||
pd.put("ROLE_IDS", Tools.notEmpty(upd.getString("ROLE_IDS")) ? upd.get("ROLE_IDS") : ""); //对角色ID还原本人副职角色ID
|
||||
}
|
||||
if (pd.getString("PASSWORD") != null && !"".equals(pd.getString("PASSWORD"))) {
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString());
|
||||
}
|
||||
usersService.editUser(pd); //执行修改
|
||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||
/*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "身份证号校验不通过,请核对信息");
|
||||
return map;
|
||||
}*/
|
||||
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);
|
||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
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);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
}
|
||||
pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916");
|
||||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.delete(pd);
|
||||
userInfoService.save(pd);
|
||||
// 如果修改了部门/岗位,将该用户所有清单都删除
|
||||
if (pd.get("OPERATIONTYPE") != null && pd.get("OPERATIONTYPE").toString() != null && Tools.notEmpty(pd.get("OPERATIONTYPE").toString())) {
|
||||
List<PageData> listIds = listManagerService.listListByUser(pd);
|
||||
if (listIds != null && listIds.size() > 0) {
|
||||
for (PageData listPd : listIds) {
|
||||
PageData pd1 = new PageData();
|
||||
pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd1.put("LISTMANAGER_ID", listPd.get("LISTMANAGER_ID"));
|
||||
listManagerService.remove(pd1);
|
||||
pd1 = listManagerService.findById(pd1);
|
||||
if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
|
||||
if ("listType0005".equals(pd1.get("TYPE").toString())) {
|
||||
pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
||||
pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
|
||||
pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
|
||||
pd1.put("PERIOD", null);
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
} else {
|
||||
if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
|
||||
String period = pd1.get("PERIOD").toString();
|
||||
switch (period) {
|
||||
case "checkPeriod0001"://每日
|
||||
pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0002"://每周
|
||||
pd1.put("STARTTIME", DateUtil.getWeekStart());
|
||||
pd1.put("ENDTIME", DateUtil.getWeekEnd());
|
||||
break;
|
||||
|
||||
case "checkPeriod0003"://每旬
|
||||
String year = DateUtil.getYear().toString();
|
||||
String month = DateUtil.getMonth().toString();
|
||||
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
||||
String startTime = year + "-" + month + "-";
|
||||
String endTime = year + "-" + month + "-";
|
||||
if (day <= 10) {
|
||||
startTime = startTime + "01 00:00:00";
|
||||
endTime = endTime + "10 23:59:59";
|
||||
} else if (day > 10 && day <= 20) {
|
||||
startTime = startTime + "11 00:00:00";
|
||||
endTime = endTime + "20 23:59:59";
|
||||
} else {
|
||||
startTime = startTime + "21 00:00:00";
|
||||
endTime = DateUtil.getMonthEndDay() + " 23:59:59";
|
||||
}
|
||||
pd1.put("STARTTIME", startTime);
|
||||
pd1.put("ENDTIME", endTime);
|
||||
break;
|
||||
|
||||
case "checkPeriod0004"://每月
|
||||
pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0005"://每季
|
||||
pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0006"://每年
|
||||
pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
|
||||
pd1.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
|
||||
break;
|
||||
|
||||
case "checkPeriod0007"://半年
|
||||
String byear = DateUtil.getYear().toString();
|
||||
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
||||
if (bmonth <= 6) {
|
||||
pd1.put("STARTTIME", byear + "-01-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-06-30 23:59:59");
|
||||
} else if (bmonth > 6) {
|
||||
pd1.put("STARTTIME", byear + "-07-01 00:00:00");
|
||||
pd1.put("ENDTIME", byear + "-12-31 23:59:59");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
|
||||
listStatisticsService.edit(statistics);
|
||||
}
|
||||
|
||||
pd1.put("ISSTATISTICS", '0');
|
||||
// 本期已检查的不计入统计
|
||||
checkrecordService.editStatistics(pd1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PageData idCard = new PageData();
|
||||
Warden.initData(idCard, "pc", pd);
|
||||
idCard.put("ID_PHOTO_FRONT", pd.getString("ID_CARD_FRONT"));
|
||||
idCard.put("ID_PHOTO_BACK", pd.getString("ID_CARD_BACK"));
|
||||
PageData driverLicense = new PageData();
|
||||
Warden.initData(driverLicense, "pc", pd);
|
||||
driverLicense.put("ID_PHOTO_FRONT", pd.getString("DRIVER_LICENSE"));
|
||||
PageData qualificationCertificate = new PageData();
|
||||
Warden.initData(qualificationCertificate, "pc", pd);
|
||||
qualificationCertificate.put("ID_PHOTO_FRONT", pd.getString("QUALIFICATION_CERTIFICATE"));
|
||||
if (null != idCardFrontFiles && !idCardFrontFiles.isEmpty()){
|
||||
//保存签名文件
|
||||
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
||||
String fileName = UuidUtil.get32UUID() + idCardFrontFiles.getOriginalFilename().substring(idCardFrontFiles.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(idCardFrontFiles, fileName, Const.FILEPATHFILE + ffile);
|
||||
idCard.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
||||
}
|
||||
if (null != idCardBackFiles && !idCardBackFiles.isEmpty()){
|
||||
//保存签名文件
|
||||
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
||||
String fileName = UuidUtil.get32UUID() + idCardBackFiles.getOriginalFilename().substring(idCardBackFiles.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(idCardBackFiles, fileName, Const.FILEPATHFILE + ffile);
|
||||
idCard.put("ID_PHOTO_BACK", Const.FILEPATHFILE + ffile + "/" + fileName);
|
||||
}
|
||||
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.editByUserId(idCard);
|
||||
|
||||
// 驾驶证
|
||||
if (null != driverLicenseFiles && !driverLicenseFiles.isEmpty()){
|
||||
//保存签名文件
|
||||
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
||||
String fileName = UuidUtil.get32UUID() + driverLicenseFiles.getOriginalFilename().substring(driverLicenseFiles.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(driverLicenseFiles, fileName, Const.FILEPATHFILE + ffile);
|
||||
driverLicense.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
||||
}
|
||||
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.editByUserId(driverLicense);
|
||||
PageData dpd = new PageData();
|
||||
dpd.put("USER_ID", driverLicense.getString("USER_ID"));
|
||||
dpd.put("CERTIFICATE_CATEGORY", driverLicense.getString("CERTIFICATE_CATEGORY"));
|
||||
List<PageData> dList = userCertificateService.listAll(dpd);
|
||||
userCertificateAppendixService.delete(dList.get(0));
|
||||
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", dList.get(0).getString("USER_CERTIFICATE_ID"));
|
||||
driverLicenseCategory.put("USER_ID", pd.getString("USER_ID"));
|
||||
driverLicenseCategory.put("ALLOW_QUALIFICATION", DRIVING_MODEL[i]);
|
||||
userCertificateAppendixService.save(driverLicenseCategory);
|
||||
}
|
||||
|
||||
// 道路运输从业资格证
|
||||
if (null != qualificationCertificateFiles && !qualificationCertificateFiles.isEmpty()){
|
||||
String ffile = "practitioner"+ "/" +DateUtil.getYear()+ "/" +DateUtil.getMonth()+ "/" +DateUtil.getOnlyDay();
|
||||
String fileName = UuidUtil.get32UUID() + qualificationCertificateFiles.getOriginalFilename().substring(qualificationCertificateFiles.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(qualificationCertificateFiles, fileName, Const.FILEPATHFILE + ffile);
|
||||
qualificationCertificate.put("ID_PHOTO_FRONT", Const.FILEPATHFILE + ffile + "/" + fileName);
|
||||
}
|
||||
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.editByUserId(qualificationCertificate);
|
||||
PageData qpd = new PageData();
|
||||
qpd.put("USER_ID", qualificationCertificate.getString("USER_ID"));
|
||||
qpd.put("CERTIFICATE_CATEGORY", qualificationCertificate.getString("CERTIFICATE_CATEGORY"));
|
||||
List<PageData> qList = userCertificateService.listAll(qpd);
|
||||
userCertificateAppendixService.delete(qList.get(0));
|
||||
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", qList.get(0).getString("USER_CERTIFICATE_ID"));
|
||||
qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID"));
|
||||
qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]);
|
||||
userCertificateAppendixService.save(qualificationCertificateCategory);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package com.zcloud.controller.taxationManage;
|
||||
|
||||
import com.alibaba.excel.util.DateUtils;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.assignedManage.AssignedManageService;
|
||||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
@ -26,6 +26,7 @@ public interface TrafficDrivingSignMapper {
|
|||
|
||||
List<PageData> listAllType(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
|
|
|
@ -40,4 +40,11 @@ public interface TrafficDrivingTypeMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
List<PageData> findCategory(PageData pd);
|
||||
|
||||
List<PageData> findListbyDetail(PageData pd);
|
||||
|
||||
List<PageData> findListbyItem(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,13 @@ public interface DictionariesMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
List<Dictionaries> listSubDictByParent(PageData pd);
|
||||
/**
|
||||
* 通过根节点ID获取所有终节点子级列表(不支持1级查询)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<Dictionaries> getLevelCustom(PageData pd);
|
||||
|
||||
/**
|
||||
* 通过ID获取其子级列表(学习考试课件相关)
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCertificateAppendixMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCertificateMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
void editByUserId(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCorpMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerDismissal(PageData pd);
|
||||
|
||||
List<PageData> getPractitionerEmploymentCorp(PageData pd);
|
||||
|
||||
/**
|
||||
* 修改离职审核状态
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerReviewResignation(PageData pd);
|
||||
|
||||
/**
|
||||
* 离职审核通过,清理服务企业关系
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerCorpInvalid(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCorpReviewMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
}
|
||||
|
|
@ -73,5 +73,17 @@ public interface UserInfoMapper{
|
|||
void editUserSignType(PageData pd);
|
||||
|
||||
PageData getUserCardId(PageData departPd);
|
||||
|
||||
/**从业人员入职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerReview(PageData pd);
|
||||
|
||||
/**修改从业人员信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editPractitioner(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -273,4 +273,24 @@ public interface UsersMapper {
|
|||
List<PageData> studentlist(PageData pd);
|
||||
|
||||
List<PageData> userSelectPersonTypelistPage(Page page);
|
||||
|
||||
/**从业人员列表 //userlistPage(Page page)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> practitionerlistPage(Page page);
|
||||
|
||||
/**
|
||||
* 从业人员入职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerReview(PageData pd);
|
||||
|
||||
/**
|
||||
* 修改从业人员信息
|
||||
* @param pd
|
||||
*/
|
||||
void editPractitioner(PageData pd);
|
||||
}
|
||||
|
|
|
@ -174,5 +174,6 @@ public interface SurveyMapper {
|
|||
*/
|
||||
List<PageData> getCountByQuestionType(PageData pd);
|
||||
|
||||
PageData findBycorpinfoId(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,12 @@ public interface TrafficDrivingTypeService {
|
|||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取检查记录详情
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData infoCategory(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> listForDrivingType(Page page);
|
||||
|
||||
|
|
|
@ -2,18 +2,25 @@ package com.zcloud.service.comprehensive.impl;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingTypeMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
|
||||
|
||||
@Autowired
|
||||
private TrafficDrivingTypeMapper trafficDrivingTypeMapper;
|
||||
@Autowired
|
||||
private com.zcloud.mapper.datasource.comprehensive.TrafficSecurityWaybillRegistrationMapper TrafficSecurityWaybillRegistrationMapper;
|
||||
|
||||
|
||||
|
||||
/**新增
|
||||
|
@ -55,4 +62,40 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
|
|||
public PageData findById(PageData pd) {
|
||||
return trafficDrivingTypeMapper.findById(pd);
|
||||
}
|
||||
@Autowired
|
||||
private TrafficDrivingSignMapper trafficDrivingSignMapper;
|
||||
|
||||
/**
|
||||
* 获取检查记录详情
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData infoCategory(PageData pd)throws Exception{
|
||||
PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取
|
||||
List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd);
|
||||
List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd);
|
||||
List<PageData> varItemList = trafficDrivingTypeMapper.findListbyItem(pd);
|
||||
|
||||
List<PageData> pd1Children = new ArrayList<>();
|
||||
List<PageData> pd2Children = new ArrayList<>();
|
||||
for (PageData pd1: vList) {
|
||||
pd1Children = new ArrayList<>();
|
||||
for (PageData pd2:varOList) {
|
||||
pd2Children = new ArrayList<>();
|
||||
if (pd1.getString("CHECKTYPE_ID").equals(pd2.getString("CHECKTYPE_ID"))) {
|
||||
for (PageData pd3:varItemList) {
|
||||
if (pd2.getString("DRIVING_SIGN_ID").equals(pd3.getString("DRIVING_SIGN_ID"))) {
|
||||
pd2Children.add(pd3);
|
||||
}
|
||||
}
|
||||
pd2.put("pd2Children",pd2Children);
|
||||
pd1Children.add(pd2);
|
||||
}
|
||||
}
|
||||
pd1.put("pd1Children",pd1Children);
|
||||
}
|
||||
|
||||
cpd.put("varList", vList);
|
||||
return cpd;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -519,7 +519,7 @@ public class UsersCacheServiceImpl implements UsersCacheService {
|
|||
public void initPass(PageData request) throws Exception {
|
||||
PageData entity = usersCacheMapper.findById(request);
|
||||
if (entity == null) throw new RuntimeException("数据异常,请联系管理员");
|
||||
entity.put("PASSWORD", new SimpleHash("SHA-1", entity.getString("USERNAME"), "666666").toString());
|
||||
entity.put("PASSWORD", new SimpleHash("SHA-1", entity.getString("USERNAME"), "Aa@123456").toString());
|
||||
usersCacheMapper.editUser(entity);
|
||||
}
|
||||
|
||||
|
@ -574,7 +574,7 @@ public class UsersCacheServiceImpl implements UsersCacheService {
|
|||
entity.put("AUTHENTICATION", "0");
|
||||
entity.put("PERSONNELTYPE", "6");
|
||||
entity.put("USERNAME", entity.getString("USER_ID_CARD"));
|
||||
entity.put("PASSWORD", new SimpleHash("SHA-1", entity.getString("USERNAME"), "666666").toString());
|
||||
entity.put("PASSWORD", new SimpleHash("SHA-1", entity.getString("USERNAME"), "Aa@123456").toString());
|
||||
Warden.initDate(entity);
|
||||
usersCacheMapper.saveUser(entity);
|
||||
PageData base = new PageData();
|
||||
|
|
|
@ -75,6 +75,13 @@ public interface DictionariesService {
|
|||
* @throws Exception
|
||||
*/
|
||||
public List<Dictionaries> listSubDictByParent(PageData pd) throws Exception;
|
||||
/**
|
||||
* 通过根节点ID获取所有终节点子级列表(不支持1级查询)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<Dictionaries> getLevelCustom(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过ID获取其子级列表(学习考试课件相关)
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCertificateAppendixService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCertificateService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
void editByUserId(PageData idCard)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCorpReviewService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface UserCorpService {
|
||||
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
void setPractitionerDismissal(PageData uc)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取从业人员当前任职公司
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getPractitionerEmploymentCorp(PageData pd) throws Exception;
|
||||
|
||||
ReturnMap setPractitionerResignation(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 修改离职审核状态
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerReviewResignation(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 离职审核通过,清理服务企业关系
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerCorpInvalid(PageData pd) throws Exception;
|
||||
|
||||
Object setPractitionerConfirmByUser(PageData pd) throws Exception;
|
||||
}
|
||||
|
|
@ -67,5 +67,17 @@ public interface UserInfoService{
|
|||
void editUserSignType(PageData pd)throws Exception;
|
||||
|
||||
PageData getUserCardId(PageData departPd)throws Exception;
|
||||
|
||||
/**从业人员入职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setPractitionerReview(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 修改从业人员信息
|
||||
* @param pd
|
||||
*/
|
||||
void editPractitioner(PageData pd)throws Exception;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -320,4 +321,49 @@ public interface UsersService {
|
|||
List<PageData> userSelectPersonTypelistPage(Page page);
|
||||
|
||||
List<PageData> studentlist(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 从业人员注册账号
|
||||
* @param pd 注册信息
|
||||
* @param files 证照附件
|
||||
*/
|
||||
void setPractitionerRegister(PageData pd, MultipartFile[] files) throws Exception;
|
||||
|
||||
/**从业人员列表 //userlistPage(Page page)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> practitionerlistPage(Page page)throws Exception;
|
||||
|
||||
/**
|
||||
* 从业人员入职审核
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
ReturnMap setPractitionerReview(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 从业人员解聘
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
ReturnMap setPractitionerDismissal(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 从业人员信息修改
|
||||
* @param pd 注册信息
|
||||
* @param files 证照附件
|
||||
*/
|
||||
void editPractitioner(PageData pd, MultipartFile[] files) throws Exception;
|
||||
|
||||
ReturnMap setPractitionerAdd(PageData pd, MultipartFile[] files) throws Exception;
|
||||
|
||||
/**
|
||||
* 用户信息确认(入职)
|
||||
* @param pd
|
||||
*/
|
||||
void setPractitionerConfirm(PageData pd) throws Exception;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,16 @@ public class DictionariesServiceImpl implements DictionariesService {
|
|||
return dictionariesMapper.listSubDictByParent(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过根节点ID获取所有终节点子级列表(不支持1级查询)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Dictionaries> getLevelCustom(PageData pd) throws Exception {
|
||||
return dictionariesMapper.getLevelCustom(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取其子级列表
|
||||
* @param
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UserCertificateAppendixMapper;
|
||||
import com.zcloud.mapper.datasource.system.UserCertificateMapper;
|
||||
import com.zcloud.service.system.UserCertificateAppendixService;
|
||||
import com.zcloud.util.Smb;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UserCertificateAppendixServiceImpl implements UserCertificateAppendixService {
|
||||
|
||||
@Autowired
|
||||
private UserCertificateAppendixMapper userCertificateAppendixMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
userCertificateAppendixMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
userCertificateAppendixMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return userCertificateAppendixMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return userCertificateAppendixMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return userCertificateAppendixMapper.findById(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UserCertificateMapper;
|
||||
import com.zcloud.service.system.UserCertificateService;
|
||||
import com.zcloud.util.Smb;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UserCertificateServiceImpl implements UserCertificateService {
|
||||
|
||||
@Autowired
|
||||
private UserCertificateMapper userCertificateMapper;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
userCertificateMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
userCertificateMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
userCertificateMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return userCertificateMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return userCertificateMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return userCertificateMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
userCertificateMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editByUserId(PageData pd)throws Exception{
|
||||
userCertificateMapper.editByUserId(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UserCorpReviewMapper;
|
||||
import com.zcloud.service.system.UserCorpReviewService;
|
||||
import com.zcloud.util.Smb;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UserCorpReviewServiceImpl implements UserCorpReviewService {
|
||||
|
||||
@Autowired
|
||||
private UserCorpReviewMapper userCorpReviewMapper;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
userCorpReviewMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
userCorpReviewMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
userCorpReviewMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return userCorpReviewMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return userCorpReviewMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return userCorpReviewMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
userCorpReviewMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,237 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UserCorpMapper;
|
||||
import com.zcloud.service.system.UserCorpReviewService;
|
||||
import com.zcloud.service.system.UserCorpService;
|
||||
import com.zcloud.service.system.UserInfoService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Smb;
|
||||
import com.zcloud.util.Warden;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户表明细
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-07
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UserCorpServiceImpl implements UserCorpService {
|
||||
|
||||
@Autowired
|
||||
private UserCorpMapper userCorpMapper;
|
||||
@Autowired
|
||||
private UserCorpReviewService userCorpReviewService;
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
userCorpMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
userCorpMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
userCorpMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return userCorpMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return userCorpMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return userCorpMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
userCorpMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void setPractitionerDismissal(PageData pd)throws Exception{
|
||||
userCorpMapper.setPractitionerDismissal(pd);
|
||||
}
|
||||
|
||||
/**获取从业人员当前任职公司
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getPractitionerEmploymentCorp(PageData pd)throws Exception {
|
||||
return userCorpMapper.getPractitionerEmploymentCorp(pd);
|
||||
}
|
||||
|
||||
|
||||
public ReturnMap setPractitionerResignation(PageData pd)throws Exception {
|
||||
pd.put("USER_CORP_ID", Warden.get32UUID());
|
||||
Warden.initData(pd, "app", pd);
|
||||
userCorpMapper.save(pd);
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
|
||||
public void setPractitionerReviewResignation(PageData pd) throws Exception{
|
||||
userCorpMapper.setPractitionerReviewResignation(pd);
|
||||
}
|
||||
|
||||
public void setPractitionerCorpInvalid(PageData pd) throws Exception{
|
||||
userCorpMapper.setPractitionerCorpInvalid(pd);
|
||||
}
|
||||
|
||||
public ReturnMap setPractitionerConfirmByUser(PageData pd) throws Exception {
|
||||
//添加审核记录
|
||||
PageData review = new PageData();
|
||||
Warden.initData(review, "app", pd);
|
||||
review.put("USER_CORP_REVIEW_ID", Warden.get32UUID());
|
||||
review.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
review.put("USER_ID", pd.getString("USER_ID"));
|
||||
review.put("REVIEW_RESULT", pd.getString("REVIEW_RESULT"));
|
||||
review.put("REVIEW_COMMENTS", pd.getString("REVIEW_COMMENTS"));
|
||||
userCorpReviewService.save(review);
|
||||
if ("2".equals(pd.getString("APPLY_TYPE"))) { //入职确认
|
||||
setPractitionerConfirmEntry(pd);
|
||||
}
|
||||
else if ("4".equals(pd.getString("APPLY_TYPE"))) { //解聘确认
|
||||
setPractitionerConfirmResignation(pd);
|
||||
}
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 入职确认
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setPractitionerConfirmEntry(PageData pd) throws Exception {
|
||||
|
||||
//保存审核结果
|
||||
Warden.initData(pd, "app", pd);
|
||||
pd.put("APPLY_STATUS", pd.getString("REVIEW_RESULT"));
|
||||
if ("1".equals(pd.getString("REVIEW_RESULT"))) {
|
||||
|
||||
//补充人员关联信息(企业、部门、岗位、排班)
|
||||
PageData user = new PageData();
|
||||
Warden.initData(user, "app", pd);
|
||||
user.put("USER_ID", pd.getString("USER_ID"));
|
||||
user.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
user.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
user.put("POST_ID", pd.getString("POST_ID"));
|
||||
user.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE"));
|
||||
user.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO"));
|
||||
user.put("DURATION", pd.getString("DURATION"));
|
||||
user.put("WORKSTATUS", pd.getString("WORKSTATUS"));
|
||||
user.put("WORKPERIOD", pd.getString("WORKPERIOD"));
|
||||
usersService.setPractitionerConfirm(user);
|
||||
|
||||
//补充人员附加信息(工种、入职时间、职务、职称、在职状态)
|
||||
PageData userInfo = new PageData();
|
||||
Warden.initData(userInfo, "app", pd);
|
||||
userInfo.put("USER_ID", pd.getString("USER_ID"));
|
||||
userInfo.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
userInfo.put("ENTRY_DATE", pd.getString("ENTRY_DATE"));
|
||||
userInfo.put("DUTIES", pd.getString("DUTIES"));
|
||||
userInfo.put("TITLE", pd.getString("TITLE"));
|
||||
userInfo.put("INCUMBENCY", "bd4d802e94354230b1bb19cfabd7f810"); // 在职
|
||||
userInfoService.setPractitionerReview(userInfo);
|
||||
} else {
|
||||
pd.put("ISDELETE", "2");
|
||||
}
|
||||
userCorpMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解聘确认
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setPractitionerConfirmResignation(PageData pd) throws Exception {
|
||||
//保存审核结果
|
||||
PageData uc = new PageData();
|
||||
Warden.initData(uc, "app", pd);
|
||||
uc.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
uc.put("USER_ID", pd.getString("USER_ID"));
|
||||
uc.put("APPLY_STATUS", pd.getString("REVIEW_RESULT"));
|
||||
if ("1".equals(pd.getString("REVIEW_RESULT"))) {
|
||||
pd.put("DUTIES", "");
|
||||
pd.put("TITLE", "");
|
||||
|
||||
//补充人员关联信息(企业、部门、岗位、排班)
|
||||
PageData user = new PageData();
|
||||
Warden.initData(user, "app", pd);
|
||||
user.put("USER_ID", pd.getString("USER_ID"));
|
||||
user.put("CORPINFO_ID", "");
|
||||
user.put("DEPARTMENT_ID", "");
|
||||
user.put("POST_ID", "");
|
||||
user.put("SHIFTDUTYONE", "");
|
||||
user.put("SHIFTDUTYTWO", "");
|
||||
user.put("DURATION", "");
|
||||
user.put("WORKSTATUS", "");
|
||||
user.put("WORKPERIOD", "");
|
||||
usersService.setPractitionerConfirm(user);
|
||||
|
||||
//补充人员附加信息(工种、入职时间、职务、职称、在职状态)
|
||||
PageData userInfo = new PageData();
|
||||
Warden.initData(userInfo, "app", pd);
|
||||
userInfo.put("USER_ID", pd.getString("USER_ID"));
|
||||
userInfo.put("TYPE_OF_WORK", "");
|
||||
userInfo.put("ENTRY_DATE", "");
|
||||
userInfo.put("DUTIES", "");
|
||||
userInfo.put("TITLE", "");
|
||||
userInfo.put("INCUMBENCY", "4dd28e91b104410b85c25a792c424172"); // 离职
|
||||
userInfoService.setPractitionerReview(userInfo);
|
||||
|
||||
setPractitionerCorpInvalid(uc);
|
||||
}
|
||||
setPractitionerReviewResignation(uc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -121,5 +121,21 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|||
return userinfoMapper.getUserCardId(departPd);
|
||||
}
|
||||
|
||||
/**从业人员入职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void setPractitionerReview(PageData pd)throws Exception{
|
||||
userinfoMapper.setPractitionerReview(pd);
|
||||
}
|
||||
|
||||
/**修改从业人员信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editPractitioner(PageData pd)throws Exception{
|
||||
userinfoMapper.editPractitioner(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,12 +5,14 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.service.corp.CorpInfoService;
|
||||
import com.zcloud.service.system.*;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -31,6 +33,10 @@ public class UsersServiceImpl implements UsersService {
|
|||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
@Autowired
|
||||
private RoleService roleService;
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
|
@ -39,6 +45,17 @@ public class UsersServiceImpl implements UsersService {
|
|||
@Autowired
|
||||
private FHlogService FHLOG;
|
||||
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
@Autowired
|
||||
private UserCertificateService userCertificateService;
|
||||
@Autowired
|
||||
private UserCertificateAppendixService userCertificateAppendixService;
|
||||
@Autowired
|
||||
private UserCorpService userCorpService;
|
||||
@Autowired
|
||||
private UserCorpReviewService userCorpReviewService;
|
||||
|
||||
/**
|
||||
* 通过用户名获取用户信息
|
||||
*
|
||||
|
@ -302,9 +319,9 @@ public class UsersServiceImpl implements UsersService {
|
|||
pd.put("WORKPERIOD", "1");
|
||||
pd.put("RIGHTS", "788664966448");
|
||||
// 先判断这个人定位卡号与姓名是否对的上
|
||||
if (!PLSUtil.hasCardNumber(pd)) {
|
||||
return ReturnMap.error(pd.getString("CARDNO") + "定位卡已经存在");
|
||||
}
|
||||
// if (!PLSUtil.hasCardNumber(pd)) {
|
||||
// return ReturnMap.error(pd.getString("CARDNO") + "定位卡已经存在");
|
||||
// }
|
||||
|
||||
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) {
|
||||
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
|
||||
|
@ -330,7 +347,7 @@ public class UsersServiceImpl implements UsersService {
|
|||
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"), "666666").toString());
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), "Aa@123456").toString());
|
||||
|
||||
if (usersMapper.findByUsername(pd) == null) {
|
||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||
|
@ -354,20 +371,20 @@ public class UsersServiceImpl implements UsersService {
|
|||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916");
|
||||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.save(pd);
|
||||
}
|
||||
PageData response = PLSUtil.saveUser(pd);
|
||||
if ("200".equals(response.getString("code"))) {
|
||||
pd.put("PLS_ID", response.getString("data"));
|
||||
if (Tools.isEmpty(pd.getString("CARDNO"))) pd.put("CARDNO",null);
|
||||
pd.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
pd.put("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916");
|
||||
pd.put("AUTHENTICATION", "0");
|
||||
userInfoService.save(pd);
|
||||
// PageData response = PLSUtil.saveUser(pd);
|
||||
// if ("200".equals(response.getString("code"))) {
|
||||
// pd.put("PLS_ID", response.getString("data"));
|
||||
// if (Tools.isEmpty(pd.getString("CARDNO"))) pd.put("CARDNO",null);
|
||||
usersMapper.saveUser(pd);
|
||||
FHLOG.save(Jurisdiction.getUsername(), "新增用户:" + pd.getString("USERNAME"));
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
return ReturnMap.error(response.getString("msg"));
|
||||
// }
|
||||
// return ReturnMap.error(response.getString("msg"));
|
||||
}
|
||||
return ReturnMap.error("保存失败");
|
||||
}
|
||||
|
@ -666,4 +683,649 @@ public class UsersServiceImpl implements UsersService {
|
|||
public List<PageData> studentlist(PageData pd) throws Exception {
|
||||
return usersMapper.studentlist(pd);
|
||||
}
|
||||
@Override
|
||||
public void setPractitionerRegister(PageData pd, MultipartFile[] files) throws Exception {
|
||||
|
||||
PageData corp = new PageData();
|
||||
corp.put("CORPINFO_ID", pd.getString("APPLY_CORP"));
|
||||
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("USERNAME", pd.getString("USER_ID_CARD"));
|
||||
pd.put("ROLE_ID", role.getString("ROLE_ID")); // 个人账号
|
||||
pd.put("RIGHTS", role.getString("RIGHTS"));
|
||||
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("CERTIFICATETYPE", "4bed7fac8fe24ad4b5c0c69321fd5916"); // sys_userinfo 证件类型:身份证
|
||||
pd.put("AUTHENTICATION", "0"); // sys_userinfo 学员是否认证 0否 1是
|
||||
PageData newUser = new PageData();
|
||||
newUser.put("CORPINFO_ID", pd.getString("APPLY_CORP"));
|
||||
pd.put("SORT", usersMapper.getUserCount(newUser) + 1);
|
||||
usersMapper.saveUser(pd);
|
||||
userInfoService.save(pd);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// 申请入职企业
|
||||
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("APPLY_CORP")); // 身份证
|
||||
applyCorp.put("APPLY_STATUS", "0"); // 0.申请中
|
||||
applyCorp.put("APPLY_TYPE", "1"); // 1.从业人员入职申请
|
||||
applyCorp.put("APPLY_CONTENT", ""); //
|
||||
userCorpService.save(applyCorp);
|
||||
}
|
||||
|
||||
/**从业人员列表 //userlistPage(Page page)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> practitionerlistPage(Page page)throws Exception {
|
||||
return usersMapper.practitionerlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnMap setPractitionerReview(PageData pd) throws Exception {
|
||||
//添加审核记录
|
||||
PageData review = new PageData();
|
||||
Warden.initData(review, "pc", pd);
|
||||
review.put("USER_CORP_REVIEW_ID", Warden.get32UUID());
|
||||
review.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
review.put("USER_ID", pd.getString("USER_ID"));
|
||||
review.put("REVIEW_RESULT", pd.getString("REVIEW_RESULT"));
|
||||
review.put("REVIEW_COMMENTS", pd.getString("REVIEW_COMMENTS"));
|
||||
userCorpReviewService.save(review);
|
||||
if ("1".equals(pd.getString("APPLY_TYPE"))) { //入职审核
|
||||
setPractitionerReviewEntry(pd);
|
||||
}
|
||||
else if ("3".equals(pd.getString("APPLY_TYPE"))) { //离职审核
|
||||
setPractitionerReviewResignation(pd);
|
||||
}
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 入职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setPractitionerReviewEntry(PageData pd) throws Exception {
|
||||
|
||||
//保存审核结果
|
||||
PageData uc = new PageData();
|
||||
Warden.initData(uc, "pc", pd);
|
||||
uc.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
uc.put("APPLY_STATUS", pd.getString("REVIEW_RESULT"));
|
||||
if ("1".equals(pd.getString("REVIEW_RESULT"))) {
|
||||
uc.put("ENTRY_DATE", pd.getString("ENTRY_DATE"));
|
||||
uc.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
uc.put("POST_ID", pd.getString("POST_ID"));
|
||||
uc.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE"));
|
||||
uc.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO"));
|
||||
uc.put("DURATION", pd.getString("DURATION"));
|
||||
uc.put("WORKSTATUS", pd.getString("WORKSTATUS"));
|
||||
uc.put("WORKPERIOD", pd.getString("WORKPERIOD"));
|
||||
|
||||
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);
|
||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
uc.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);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
uc.put("TITLE", pd.getString("TITLE"));
|
||||
|
||||
//补充人员关联信息(企业、部门、岗位、排班)
|
||||
PageData user = new PageData();
|
||||
Warden.initData(user, "pc", pd);
|
||||
user.put("USER_ID", pd.getString("USER_ID"));
|
||||
user.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
user.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||
user.put("POST_ID", pd.getString("POST_ID"));
|
||||
user.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE"));
|
||||
user.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO"));
|
||||
user.put("DURATION", pd.getString("DURATION"));
|
||||
user.put("WORKSTATUS", pd.getString("WORKSTATUS"));
|
||||
user.put("WORKPERIOD", pd.getString("WORKPERIOD"));
|
||||
user.put("SORT", pd.get("SORT"));
|
||||
usersMapper.setPractitionerReview(user);
|
||||
|
||||
//补充人员附加信息(工种、入职时间、职务、职称、在职状态)
|
||||
PageData userInfo = new PageData();
|
||||
Warden.initData(userInfo, "pc", pd);
|
||||
userInfo.put("USER_ID", pd.getString("USER_ID"));
|
||||
userInfo.put("TYPE_OF_WORK", pd.getString("POST_ID"));
|
||||
userInfo.put("ENTRY_DATE", pd.getString("ENTRY_DATE"));
|
||||
userInfo.put("DUTIES", pd.getString("DUTIES"));
|
||||
userInfo.put("TITLE", pd.getString("TITLE"));
|
||||
userInfo.put("INCUMBENCY", pd.getString("INCUMBENCY")); // 在职
|
||||
userInfoService.setPractitionerReview(userInfo);
|
||||
} else {
|
||||
uc.put("ISDELETE", "2");
|
||||
}
|
||||
userCorpService.edit(uc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 离职审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setPractitionerReviewResignation(PageData pd) throws Exception {
|
||||
//保存审核结果
|
||||
PageData uc = new PageData();
|
||||
Warden.initData(uc, "pc", pd);
|
||||
uc.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
uc.put("USER_ID", pd.getString("USER_ID"));
|
||||
uc.put("APPLY_STATUS", pd.getString("REVIEW_RESULT"));
|
||||
if ("1".equals(pd.getString("REVIEW_RESULT"))) {
|
||||
pd.put("DUTIES", "");
|
||||
pd.put("TITLE", "");
|
||||
|
||||
//补充人员关联信息(企业、部门、岗位、排班)
|
||||
PageData user = new PageData();
|
||||
Warden.initData(user, "pc", pd);
|
||||
user.put("USER_ID", pd.getString("USER_ID"));
|
||||
user.put("CORPINFO_ID", "");
|
||||
user.put("DEPARTMENT_ID", "");
|
||||
user.put("POST_ID", "");
|
||||
user.put("SHIFTDUTYONE", "");
|
||||
user.put("SHIFTDUTYTWO", "");
|
||||
user.put("DURATION", "");
|
||||
user.put("WORKSTATUS", "");
|
||||
user.put("WORKPERIOD", "");
|
||||
user.put("SORT", pd.get("SORT"));
|
||||
usersMapper.setPractitionerReview(user);
|
||||
|
||||
//补充人员附加信息(工种、入职时间、职务、职称、在职状态)
|
||||
PageData userInfo = new PageData();
|
||||
Warden.initData(userInfo, "pc", pd);
|
||||
userInfo.put("USER_ID", pd.getString("USER_ID"));
|
||||
userInfo.put("TYPE_OF_WORK", "");
|
||||
userInfo.put("ENTRY_DATE", "");
|
||||
userInfo.put("DUTIES", "");
|
||||
userInfo.put("TITLE", "");
|
||||
userInfo.put("INCUMBENCY", pd.getString("INCUMBENCY")); // 在职
|
||||
userInfoService.setPractitionerReview(userInfo);
|
||||
|
||||
userCorpService.setPractitionerCorpInvalid(uc);
|
||||
}
|
||||
userCorpService.setPractitionerReviewResignation(uc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnMap setPractitionerDismissal(PageData pd) throws Exception {
|
||||
//修改从业人员关联企业数据为无效
|
||||
Warden.initData(pd, "pc", pd);
|
||||
pd.put("USER_CORP_ID", Warden.get32UUID());
|
||||
pd.put("APPLY_TYPE", "4"); // 4.企业解聘申请
|
||||
pd.put("APPLY_CONTENT", ""); //
|
||||
pd.put("APPLY_STATUS", "0"); // 申请中
|
||||
userCorpService.save(pd);
|
||||
|
||||
return ReturnMap.ok();
|
||||
// //修改从业人员关联企业数据为无效
|
||||
// PageData uc = new PageData();
|
||||
// Warden.initData(uc, "pc", pd);
|
||||
// uc.put("USER_CORP_ID", pd.getString("USER_CORP_ID"));
|
||||
// uc.put("ISDELETE", "2");
|
||||
// userCorpService.setPractitionerDismissal(uc);
|
||||
//
|
||||
// pd.put("DUTIES", "");
|
||||
// pd.put("TITLE", "");
|
||||
//
|
||||
// //补充人员关联信息(企业、部门、岗位、排班)
|
||||
// PageData user = new PageData();
|
||||
// Warden.initData(user, "pc", pd);
|
||||
// user.put("USER_ID", pd.getString("USER_ID"));
|
||||
// user.put("CORPINFO_ID", "");
|
||||
// user.put("DEPARTMENT_ID", "");
|
||||
// user.put("POST_ID", "");
|
||||
// user.put("SHIFTDUTYONE", "");
|
||||
// user.put("SHIFTDUTYTWO", "");
|
||||
// user.put("DURATION", "");
|
||||
// user.put("WORKSTATUS", "");
|
||||
// user.put("WORKPERIOD", "");
|
||||
// user.put("SORT", 0);
|
||||
// usersMapper.setPractitionerReview(user);
|
||||
//
|
||||
// //补充人员附加信息(工种、入职时间、职务、职称、在职状态)
|
||||
// PageData userInfo = new PageData();
|
||||
// Warden.initData(userInfo, "pc", pd);
|
||||
// userInfo.put("USER_ID", pd.getString("USER_ID"));
|
||||
// userInfo.put("TYPE_OF_WORK", "");
|
||||
// userInfo.put("ENTRY_DATE", "");
|
||||
// userInfo.put("DUTIES", "");
|
||||
// userInfo.put("TITLE", "");
|
||||
// userInfo.put("INCUMBENCY", ""); // 在职
|
||||
// userInfoService.setPractitionerReview(userInfo);
|
||||
// return ReturnMap.ok();
|
||||
}
|
||||
@Override
|
||||
public void editPractitioner(PageData pd, MultipartFile[] files) throws Exception {
|
||||
usersMapper.editPractitioner(pd);
|
||||
userInfoService.editPractitioner(pd);
|
||||
|
||||
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_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.editByUserId(idCard);
|
||||
|
||||
// 驾驶证
|
||||
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.editByUserId(driverLicense);
|
||||
PageData dpd = new PageData();
|
||||
dpd.put("USER_ID", driverLicense.getString("USER_ID"));
|
||||
dpd.put("CERTIFICATE_CATEGORY", driverLicense.getString("CERTIFICATE_CATEGORY"));
|
||||
List<PageData> dList = userCertificateService.listAll(dpd);
|
||||
userCertificateAppendixService.delete(dList.get(0));
|
||||
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", dList.get(0).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_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.editByUserId(qualificationCertificate);
|
||||
PageData qpd = new PageData();
|
||||
qpd.put("USER_ID", qualificationCertificate.getString("USER_ID"));
|
||||
qpd.put("CERTIFICATE_CATEGORY", qualificationCertificate.getString("CERTIFICATE_CATEGORY"));
|
||||
List<PageData> qList = userCertificateService.listAll(qpd);
|
||||
userCertificateAppendixService.delete(qList.get(0));
|
||||
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", qList.get(0).getString("USER_CERTIFICATE_ID"));
|
||||
qualificationCertificateCategory.put("USER_ID", pd.getString("USER_ID"));
|
||||
qualificationCertificateCategory.put("ALLOW_QUALIFICATION", QUALIFICATION_CERTIFICATE_CATEGORY[i]);
|
||||
userCertificateAppendixService.save(qualificationCertificateCategory);
|
||||
}
|
||||
|
||||
// // 申请入职企业
|
||||
// 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("APPLY_CORP")); // 身份证
|
||||
// applyCorp.put("APPLY_STATUS", "0"); // 0.申请中
|
||||
// userCorpService.save(applyCorp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从业人员新增 saveUserNew(PageData pd)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@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 (!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"));
|
||||
}
|
||||
|
||||
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);
|
||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
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);
|
||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||
}
|
||||
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.saveUser(pd);
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
return ReturnMap.error("保存失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPractitionerConfirm(PageData pd) throws Exception {
|
||||
usersMapper.setPractitionerReview(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class Const {
|
|||
public static final String IS_MAIN = "IS_MAIN"; //是否主账号
|
||||
public static final String ISSUPERVISE = "ISSUPERVISE"; //是否监管部门
|
||||
public static final String VIPLEVEL = "VIPLEVEL"; //企业会员等级
|
||||
public static final String DEFAULT_PASSWORD = "666666"; //系统默认密码
|
||||
public static final String DEFAULT_PASSWORD = "Aa@123456"; //系统默认密码
|
||||
|
||||
public static final String FILEURL = "/mnt/qyag/file/"; //文件服务器地址
|
||||
public static final String HTTPFILEURL = "https://file.zcloudchina.com/YTHFile"; //文件服务器地址
|
||||
|
|
|
@ -235,7 +235,7 @@ public class HttpClientService {
|
|||
// /**
|
||||
// * 参数名
|
||||
// */
|
||||
// Object [] values =new Object[]{"qdkjchina白氏集团,qd,666666","1"};
|
||||
// Object [] values =new Object[]{"qdkjchina白氏集团,qd,Aa@123456","1"};
|
||||
// /**
|
||||
// * 获取参数对象
|
||||
// */
|
||||
|
@ -261,7 +261,7 @@ public class HttpClientService {
|
|||
|
||||
|
||||
String url = "http://192.168.0.5:8085/admin/check";
|
||||
String js = "{\"KEYDATA\":\"qdkjchina卓云企业,qd,666666\"}";
|
||||
String js = "{\"KEYDATA\":\"qdkjchina卓云企业,qd,Aa@123456\"}";
|
||||
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=UTF-8");
|
||||
|
|
|
@ -51,16 +51,29 @@ public class Warden {
|
|||
|
||||
public static void initDate(PageData entity) {
|
||||
entity.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||
entity.put("CREATORNAME", Jurisdiction.getName());
|
||||
entity.put("CREATE_TIME", DateUtil.getTime());
|
||||
entity.put("CREATOR_NAME", Jurisdiction.getName());
|
||||
entity.put("CREATTIME", DateUtil.getTime());
|
||||
entity.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||
entity.put("OPERATORNAME", Jurisdiction.getName());
|
||||
entity.put("OPERATOR_NAME", Jurisdiction.getName());
|
||||
entity.put("OPERAT_TIME", DateUtil.getTime());
|
||||
entity.put("OPERATTIME", DateUtil.getTime());
|
||||
entity.put("ISDELETE", "0");
|
||||
}
|
||||
|
||||
|
||||
public static void initData(PageData entity, String source, PageData pd) {
|
||||
entity.put("ISDELETE", "0");
|
||||
entity.put("CREATOR", "app".equals(source) ? pd.getString("USER_ID") : Jurisdiction.getUSER_ID());
|
||||
entity.put("CREATORNAME", "app".equals(source) ? pd.getString("NAME") : Jurisdiction.getName());
|
||||
entity.put("CREATTIME", DateUtil.getTime());
|
||||
entity.put("OPERATOR", "app".equals(source) ? pd.getString("USER_ID") : Jurisdiction.getUSER_ID());
|
||||
entity.put("OPERATORNAME", "app".equals(source) ? pd.getString("NAME") : Jurisdiction.getName());
|
||||
entity.put("OPERATTIME", DateUtil.getTime());
|
||||
}
|
||||
|
||||
public static void updateDate(PageData entity) {
|
||||
entity.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||
entity.put("OPERAT_TIME", DateUtil.getTime());
|
||||
|
|
|
@ -133,4 +133,55 @@
|
|||
where
|
||||
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
|
||||
</delete>
|
||||
|
||||
<select id="findCategory" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.CHECKTYPE_ID,
|
||||
d.NAME as CHECKTYPE_NAME
|
||||
from
|
||||
bus_traffic_driving_sign f
|
||||
left join sys_dictionaries d on d.BIANMA = f.CHECKTYPE_ID
|
||||
where f.ISDELETE = '0'
|
||||
AND f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
group by f.CHECKTYPE_ID
|
||||
order by f.CHECKTYPE_ID,f.OPERATTIME
|
||||
</select>
|
||||
|
||||
<select id="findListbyDetail" parameterType="pd" resultType="pd">
|
||||
<!-- select f.DRIVINGTYPE_ID,f.CHECKITEMNAME,f.REMARKS,u.NAME,-->
|
||||
<!-- f.CHECKTYPE_ID,s.SIGN_TIME,s.SIGN_PATH,s.IMG_PATH,-->
|
||||
<!-- s.WAYBILLREGISTRATION_ID,i.STATUS,i.REMARK-->
|
||||
<!-- from-->
|
||||
<!-- <include refid="tableName"></include> f-->
|
||||
<!-- left join bus_traffic_driving_item i on i.DRIVINGTYPE_ID = f.DRIVINGTYPE_ID-->
|
||||
<!-- left join bus_traffic_driving_sign s on s.DRIVING_SIGN_ID = i.DRIVING_SIGN_ID-->
|
||||
<!-- left join sys_user u on u.USER_ID = s.CREATOR-->
|
||||
<!-- left join sys_dictionaries d on d.BIANMA = f.CHECKTYPE_ID-->
|
||||
<!-- where f.ISDELETE = '0'-->
|
||||
<!-- and s.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} order by s.OPERATTIME-->
|
||||
SELECT
|
||||
f.*
|
||||
FROM
|
||||
bus_traffic_driving_sign f
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
ORDER BY
|
||||
f.OPERATTIME
|
||||
</select>
|
||||
|
||||
<select id="findListbyItem" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.*,t.CHECKITEMNAME,t.REMARKS
|
||||
FROM
|
||||
bus_traffic_driving_item f
|
||||
left join bus_traffic_driving_sign s on s.DRIVING_SIGN_ID = f.DRIVING_SIGN_ID
|
||||
left join bus_traffic_driving_type t on t.DRIVINGTYPE_ID = f.DRIVINGTYPE_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND s.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
ORDER BY
|
||||
f.OPERATTIME;
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -158,10 +158,13 @@
|
|||
f.*,
|
||||
i.CORP_NAME,
|
||||
u.NAME,
|
||||
u.PHONE,
|
||||
b.LOCATIONNAME AS ORIGIN_NAME,
|
||||
b2.LOCATIONNAME AS DESTINATION_NAME,
|
||||
c.CUSTOMERNAME AS CLIENT_NAME,
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME,
|
||||
t.OPERATTIME as STARTTIME,
|
||||
p.OPERATTIME as STOPTIME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
|
@ -170,6 +173,8 @@
|
|||
left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONNAME_ID
|
||||
left join bus_traffic_customer_management c on f.CLIENT = c.CUSTOMERNAME_ID
|
||||
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
|
||||
left join bus_traffic_driving_sign t on t.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and t.CHECKTYPE_ID = 'status001'
|
||||
left join bus_traffic_driving_sign p on p.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and p.CHECKTYPE_ID = 'status003'
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.WAYBILLSTATUS != null and pd.WAYBILLSTATUS != ''"><!-- 关键词检索-运单状态 -->
|
||||
and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS}
|
||||
|
@ -201,9 +206,29 @@
|
|||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
<include refid="Field"></include>,
|
||||
s.NAME,
|
||||
s.PHONE,
|
||||
t.OPERATTIME as STARTTIME,
|
||||
p.OPERATTIME as STOPTIME,
|
||||
c.PLATE_NUMBER,
|
||||
c.APPROVED_TOTAL_MASS,
|
||||
c.APPROVED_LOAD_CAPACITY,
|
||||
c.VIN,
|
||||
b.LOCATIONNAME AS ORIGIN_NAME,
|
||||
b2.LOCATIONNAME AS DESTINATION_NAME,
|
||||
m.CUSTOMERNAME AS CLIENT_NAME,
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_user s on s.USER_ID = f.PRACTITIONER
|
||||
left join bus_traffic_driving_sign t on t.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and t.CHECKTYPE_ID = 'status001'
|
||||
left join bus_traffic_driving_sign p on p.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and p.CHECKTYPE_ID = 'status003'
|
||||
left join bus_traffic_mechanical_freighttrailer c on c.FREIGHTTRAILER_ID = f.TRUCKCART
|
||||
left join bus_traffic_location_management b on f.ORIGIN = b.LOCATIONNAME_ID
|
||||
left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONNAME_ID
|
||||
left join bus_traffic_customer_management m on f.CLIENT = m.CUSTOMERNAME_ID
|
||||
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
|
||||
where
|
||||
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
</select>
|
||||
|
|
|
@ -126,11 +126,36 @@
|
|||
<include refid="tableName"></include>
|
||||
where PARENT_ID = #{PARENT_ID}
|
||||
<if test="BIANMA != null and BIANMA != ''"><!-- 编码 -->
|
||||
and BIANMA = #{BIANMA}
|
||||
and BIANMA LIKE CONCAT(CONCAT('%', #{BIANMA}),'%')
|
||||
</if>
|
||||
order by ORDER_BY
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 通过根节点ID获取所有终节点子级列表(不支持1级查询) -->
|
||||
<select id="getLevelCustom" parameterType="pd" resultMap="dictResultMap">
|
||||
select
|
||||
<include refid="Field2"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
<foreach collection="levelList" item="item" index="index">
|
||||
left join <include refid="tableName"></include> d${item}
|
||||
<choose>
|
||||
<when test="index == 0">
|
||||
on d${item}.DICTIONARIES_ID = f.PARENT_ID
|
||||
</when>
|
||||
<otherwise>
|
||||
on d${item}.DICTIONARIES_ID = d${index}.PARENT_ID
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
where ${paramParent}.DICTIONARIES_ID = #{DICTIONARIES_ID}
|
||||
<if test="BIANMA != null and BIANMA != ''"><!-- 编码 -->
|
||||
and BIANMA LIKE CONCAT(CONCAT('%', #{BIANMA}),'%')
|
||||
</if>
|
||||
order by ORDER_BY
|
||||
</select>
|
||||
|
||||
<!-- 通过ID获取其子级列表(学习考试课件相关) -->
|
||||
<select id="listSubDictByParentIdAndCourseware" parameterType="pd" resultMap="dictResultMap">
|
||||
SELECT
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.system.UserCertificateAppendixMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_USER_CERTIFICATE_APPENDIX
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.USER_ID,
|
||||
f.USER_CERTIFICATE_ID,
|
||||
f.ALLOW_QUALIFICATION,
|
||||
f.USER_CERTIFICATE_APPENDIX_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
USER_ID,
|
||||
USER_CERTIFICATE_ID,
|
||||
ALLOW_QUALIFICATION,
|
||||
USER_CERTIFICATE_APPENDIX_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{USER_ID},
|
||||
#{USER_CERTIFICATE_ID},
|
||||
#{ALLOW_QUALIFICATION},
|
||||
#{USER_CERTIFICATE_APPENDIX_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
USER_CERTIFICATE_ID = #{USER_CERTIFICATE_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.USER_CERTIFICATE_APPENDIX_ID = #{USER_CERTIFICATE_APPENDIX_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1 = 1
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''"><!-- 人员id -->
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
<if test="pd.USER_CERTIFICATE_ID != null and pd.USER_CERTIFICATE_ID != ''"><!-- 人员证件id -->
|
||||
and f.USER_CERTIFICATE_ID = #{pd.USER_CERTIFICATE_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
,d.NAME,d.BIANMA
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join <include refid="dicTableName"></include> d on d.DICTIONARIES_ID = f.ALLOW_QUALIFICATION
|
||||
where 1 = 1
|
||||
<if test="USER_ID != null and USER_ID != ''"><!-- 人员id -->
|
||||
and f.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
<if test="USER_CERTIFICATE_ID != null and USER_CERTIFICATE_ID != ''"><!-- 人员证件id -->
|
||||
and f.USER_CERTIFICATE_ID = #{USER_CERTIFICATE_ID}
|
||||
</if>
|
||||
order by d.ORDER_BY
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.system.UserCertificateMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_USER_CERTIFICATE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.USER_ID,
|
||||
f.CERTIFICATE_CATEGORY,
|
||||
f.ID_NO,
|
||||
f.ID_PHOTO_FRONT,
|
||||
f.ID_PHOTO_BACK,
|
||||
f.ID_NATIONALITY,
|
||||
f.ID_ISSUE_DATE,
|
||||
f.ID_VALIDITY_START,
|
||||
f.ID_VALIDITY_END,
|
||||
f.ID_ADDRESS,
|
||||
f.ID_ORGAN,
|
||||
f.ISDELETE,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETTIME,
|
||||
f.USER_CERTIFICATE_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
USER_ID,
|
||||
CERTIFICATE_CATEGORY,
|
||||
ID_NO,
|
||||
ID_PHOTO_FRONT,
|
||||
ID_PHOTO_BACK,
|
||||
ID_NATIONALITY,
|
||||
ID_ISSUE_DATE,
|
||||
ID_VALIDITY_START,
|
||||
ID_VALIDITY_END,
|
||||
ID_ADDRESS,
|
||||
ID_ORGAN,
|
||||
ISDELETE,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETTIME,
|
||||
USER_CERTIFICATE_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{USER_ID},
|
||||
#{CERTIFICATE_CATEGORY},
|
||||
#{ID_NO},
|
||||
#{ID_PHOTO_FRONT},
|
||||
#{ID_PHOTO_BACK},
|
||||
#{ID_NATIONALITY},
|
||||
#{ID_ISSUE_DATE},
|
||||
#{ID_VALIDITY_START},
|
||||
#{ID_VALIDITY_END},
|
||||
#{ID_ADDRESS},
|
||||
#{ID_ORGAN},
|
||||
#{ISDELETE},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETTIME},
|
||||
#{USER_CERTIFICATE_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CERTIFICATE_ID = #{USER_CERTIFICATE_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
CERTIFICATE_CATEGORY = #{CERTIFICATE_CATEGORY},
|
||||
ID_NO = #{ID_NO},
|
||||
ID_PHOTO_FRONT = #{ID_PHOTO_FRONT},
|
||||
ID_PHOTO_BACK = #{ID_PHOTO_BACK},
|
||||
ID_NATIONALITY = #{ID_NATIONALITY},
|
||||
ID_VALIDITY_START = #{ID_VALIDITY_START},
|
||||
ID_VALIDITY_END = #{ID_VALIDITY_END},
|
||||
ID_ADDRESS = #{ID_ADDRESS},
|
||||
ID_ORGAN = #{ID_ORGAN},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
USER_CERTIFICATE_ID = USER_CERTIFICATE_ID
|
||||
where
|
||||
USER_CERTIFICATE_ID = #{USER_CERTIFICATE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
and f.USER_CERTIFICATE_ID = #{USER_CERTIFICATE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="USER_ID != null and USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
<if test="CERTIFICATE_CATEGORY != null and CERTIFICATE_CATEGORY != ''"><!-- 关键词检索 -->
|
||||
and f.CERTIFICATE_CATEGORY = #{CERTIFICATE_CATEGORY}
|
||||
</if>
|
||||
order by f.CERTIFICATE_CATEGORY
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CERTIFICATE_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="editByUserId" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ID_NO = #{ID_NO},
|
||||
ID_PHOTO_FRONT = #{ID_PHOTO_FRONT},
|
||||
ID_PHOTO_BACK = #{ID_PHOTO_BACK},
|
||||
ID_NATIONALITY = #{ID_NATIONALITY},
|
||||
ID_VALIDITY_START = #{ID_VALIDITY_START},
|
||||
ID_VALIDITY_END = #{ID_VALIDITY_END},
|
||||
ID_ADDRESS = #{ID_ADDRESS},
|
||||
ID_ORGAN = #{ID_ORGAN},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
USER_CERTIFICATE_ID = USER_CERTIFICATE_ID
|
||||
where
|
||||
USER_ID = #{USER_ID} and CERTIFICATE_CATEGORY = #{CERTIFICATE_CATEGORY}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,270 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.system.UserCorpMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_USER_CORP
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.USER_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.DEPARTMENT_ID,
|
||||
f.POST_ID,
|
||||
f.SHIFTDUTYONE,
|
||||
f.SHIFTDUTYTWO,
|
||||
f.DURATION,
|
||||
f.WORKSTATUS,
|
||||
f.WORKPERIOD,
|
||||
f.DUTIES,
|
||||
f.TITLE,
|
||||
f.ENTRY_DATE,
|
||||
f.APPLY_TYPE,
|
||||
f.APPLY_CONTENT,
|
||||
f.APPLY_STATUS,
|
||||
f.ISDELETE,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETTIME,
|
||||
f.USER_CORP_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
USER_ID,
|
||||
CORPINFO_ID,
|
||||
DEPARTMENT_ID,
|
||||
POST_ID,
|
||||
SHIFTDUTYONE,
|
||||
SHIFTDUTYTWO,
|
||||
DURATION,
|
||||
WORKSTATUS,
|
||||
WORKPERIOD,
|
||||
DUTIES,
|
||||
TITLE,
|
||||
ENTRY_DATE,
|
||||
APPLY_TYPE,
|
||||
APPLY_CONTENT,
|
||||
APPLY_STATUS,
|
||||
ISDELETE,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETTIME,
|
||||
USER_CORP_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{USER_ID},
|
||||
#{CORPINFO_ID},
|
||||
#{DEPARTMENT_ID},
|
||||
#{POST_ID},
|
||||
#{SHIFTDUTYONE},
|
||||
#{SHIFTDUTYTWO},
|
||||
#{DURATION},
|
||||
#{WORKSTATUS},
|
||||
#{WORKPERIOD},
|
||||
#{DUTIES},
|
||||
#{TITLE},
|
||||
#{ENTRY_DATE},
|
||||
#{APPLY_TYPE},
|
||||
#{APPLY_CONTENT},
|
||||
#{APPLY_STATUS},
|
||||
#{ISDELETE},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETTIME},
|
||||
#{USER_CORP_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CORP_ID = #{USER_CORP_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ENTRY_DATE = #{ENTRY_DATE},
|
||||
APPLY_STATUS = #{APPLY_STATUS},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
POST_ID = #{POST_ID},
|
||||
SHIFTDUTYONE = #{SHIFTDUTYONE},
|
||||
SHIFTDUTYTWO = #{SHIFTDUTYTWO},
|
||||
DURATION = #{DURATION},
|
||||
WORKSTATUS = #{WORKSTATUS},
|
||||
WORKPERIOD = #{WORKPERIOD},
|
||||
DUTIES = #{DUTIES},
|
||||
TITLE = #{TITLE},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
USER_CORP_ID = USER_CORP_ID
|
||||
where
|
||||
USER_CORP_ID = #{USER_CORP_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
and f.USER_CORP_ID = #{USER_CORP_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="USER_ID != null and USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CORP_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="setPractitionerDismissal" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = #{ISDELETE},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
USER_CORP_ID = USER_CORP_ID
|
||||
where
|
||||
USER_CORP_ID = #{USER_CORP_ID}
|
||||
</update>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="getPractitionerEmploymentCorp" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.ENTRY_DATE,
|
||||
c.CORP_NAME,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
p.NAME POST_NAME,
|
||||
du.NAME AS DUTIES_NAME,
|
||||
ti.NAME AS TITLE_NAME,
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
|
||||
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
left join SYS_POST p on p.POST_ID = f.POST_ID
|
||||
left join SYS_DICTIONARIES_CORP du on du.DICTIONARIES_ID = f.DUTIES
|
||||
left join SYS_DICTIONARIES_CORP ti on ti.DICTIONARIES_ID = f.TITLE
|
||||
where 1=1
|
||||
<if test="ISDELETE != null and ISDELETE != ''"><!-- 关键词检索 -->
|
||||
and f.ISDELETE = #{ISDELETE}
|
||||
</if>
|
||||
<if test="USER_ID != null and USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
<if test="APPLY_STATUS != null and APPLY_STATUS != ''"><!-- 关键词检索 -->
|
||||
and f.APPLY_STATUS = #{APPLY_STATUS}
|
||||
</if>
|
||||
order by f.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<!-- 修改离职审核状态 -->
|
||||
<update id="setPractitionerReviewResignation" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
APPLY_STATUS = #{APPLY_STATUS},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
USER_CORP_ID = USER_CORP_ID
|
||||
where
|
||||
USER_CORP_ID = #{USER_CORP_ID}
|
||||
</update>
|
||||
|
||||
<!-- 离职审核通过,清理服务企业关系 -->
|
||||
<update id="setPractitionerCorpInvalid" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '2'
|
||||
where
|
||||
USER_ID = #{USER_ID} and ISDELETE = '0'
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.system.UserCorpReviewMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_USER_CORP_REVIEW
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.USER_CORP_ID,
|
||||
f.USER_ID,
|
||||
f.REVIEW_RESULT,
|
||||
f.REVIEW_COMMENTS,
|
||||
f.ISDELETE,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATTIME,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETTIME,
|
||||
f.USER_CORP_REVIEW_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
USER_CORP_ID,
|
||||
USER_ID,
|
||||
REVIEW_RESULT,
|
||||
REVIEW_COMMENTS,
|
||||
ISDELETE,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATTIME,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETTIME,
|
||||
USER_CORP_REVIEW_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{USER_CORP_ID},
|
||||
#{USER_ID},
|
||||
#{REVIEW_RESULT},
|
||||
#{REVIEW_COMMENTS},
|
||||
#{ISDELETE},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATTIME},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETTIME},
|
||||
#{USER_CORP_REVIEW_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CORP_REVIEW_ID = #{USER_CORP_REVIEW_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
USER_CORP_ID = #{USER_CORP_ID},
|
||||
USER_ID = #{USER_ID},
|
||||
REVIEW_COMMENTS = #{REVIEW_COMMENTS},
|
||||
USER_CORP_REVIEW_ID = USER_CORP_REVIEW_ID
|
||||
where
|
||||
USER_CORP_REVIEW_ID = #{USER_CORP_REVIEW_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
and f.USER_CORP_REVIEW_ID = #{USER_CORP_REVIEW_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
<if test="pd.USER_CORP_ID != null and pd.USER_CORP_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_CORP_ID = #{pd.USER_CORP_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="USER_ID != null and USER_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
<if test="USER_CORP_ID != null and USER_CORP_ID != ''"><!-- 关键词检索 -->
|
||||
and f.USER_CORP_ID = #{USER_CORP_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
USER_CORP_REVIEW_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -143,6 +143,7 @@
|
|||
p.NAME AS POLITICAL_OUTLOOK_NAME,
|
||||
d.NAME AS DEGREE_OF_EDUCATION_NAME,
|
||||
du.NAME AS DUTIES_NAME,
|
||||
ti.NAME AS TITLE_NAME,
|
||||
w.NAME AS TYPE_OF_WORK_NAME,
|
||||
pt.NAME AS PERSONNEL_TYPE_NAME
|
||||
|
||||
|
@ -155,6 +156,7 @@
|
|||
left join SYS_DICTIONARIES_CORP du on du.DICTIONARIES_ID = f.DUTIES
|
||||
left join SYS_DICTIONARIES_CORP w on w.DICTIONARIES_ID = f.TYPE_OF_WORK
|
||||
left join SYS_DICTIONARIES pt on pt.DICTIONARIES_ID = f.PERSONNEL_TYPE
|
||||
left join SYS_DICTIONARIES_CORP ti on ti.DICTIONARIES_ID = f.TITLE
|
||||
where
|
||||
f.USER_ID = #{USER_ID}
|
||||
</select>
|
||||
|
@ -255,10 +257,40 @@
|
|||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_user u on u.USER_ID = f.USER_ID
|
||||
where u.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and f.USER_ID_CARD = #{USER_ID_CARD}
|
||||
where f.USER_ID_CARD = #{USER_ID_CARD}
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and u.CORPINFO_ID != #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="VERIFYUSER_ID != null and VERIFYUSER_ID != ''">
|
||||
and f.USER_ID != #{VERIFYUSER_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 从业人员入职审核 -->
|
||||
<update id="setPractitionerReview" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
TYPE_OF_WORK = #{TYPE_OF_WORK},
|
||||
ENTRY_DATE = #{ENTRY_DATE},
|
||||
INCUMBENCY = #{INCUMBENCY},
|
||||
DUTIES = #{DUTIES},
|
||||
TITLE = #{TITLE}
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
|
||||
<!-- 修改从业人员信息 -->
|
||||
<update id="editPractitioner" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
PERSONNEL_TYPE = #{PERSONNEL_TYPE},
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||
POLITICAL_OUTLOOK = #{POLITICAL_OUTLOOK},
|
||||
WORKING_DATE = #{WORKING_DATE},
|
||||
USER_ID = USER_ID
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
@ -204,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select
|
||||
CONVERT (f.USERAVATARURL USING utf8) AS USERAVATARURL_CONVERT,
|
||||
<include refid="Field2"></include>,
|
||||
c.CORP_NAME,
|
||||
p.NAME AS POST_NAME,
|
||||
d.NAME AS DEPARTMENT_NAME,
|
||||
ui.USER_ID_CARD,
|
||||
|
@ -213,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ui.CERTIFICATETYPE
|
||||
from
|
||||
<include refid="tableName"></include>f
|
||||
left join BUS_CORP_INFO c on c.CORPINFO_ID=f.CORPINFO_ID
|
||||
left join OA_DEPARTMENT d on d.DEPARTMENT_ID=f.DEPARTMENT_ID
|
||||
left join SYS_POST p on p.POST_ID=f.POST_ID
|
||||
left join SYS_USERINFO ui on ui.USER_ID = f.USER_ID
|
||||
|
@ -389,6 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
,info.DEGREE_OF_EDUCATION
|
||||
,info.PERSONNEL_TYPE
|
||||
,info.DUTIES
|
||||
,dic.`BIANMA` as PERSONNEL_TYPE_BIANMA
|
||||
,dic.`NAME` as PERSONNEL_TYPE_NAME
|
||||
from <include refid="tableName"></include> u
|
||||
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
||||
|
@ -1641,4 +1644,162 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and d.DICTIONARIES_ID = '5ae743c76dbf496eb1b5101075b073d5'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 从业人员列表 userlistPage -->
|
||||
<select id="practitionerlistPage" parameterType="page" resultType="pd" >
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
u.ISMAIN,
|
||||
u.SHIFTDUTYONE,
|
||||
u.SHIFTDUTYTWO,
|
||||
u.DURATION,
|
||||
u.WORKSTATUS,
|
||||
u.WORKPERIOD,
|
||||
u.CORPINFO_ID,
|
||||
u.DEPARTMENT_ID,
|
||||
u.POST_ID,
|
||||
u.SORT,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
p.NAME AS POST_NAME,
|
||||
sw.NAME SHIFTDUTYONENAME,
|
||||
swr.NAME SHIFTDUTYTWONAME,
|
||||
info.IS_RECORDER,
|
||||
info.IS_CHARGE
|
||||
,info.USER_ID_CARD
|
||||
,info.CERTIFICATETYPE
|
||||
,info.DEGREE_OF_EDUCATION
|
||||
,info.PERSONNEL_TYPE
|
||||
,info.DUTIES
|
||||
,info.TITLE
|
||||
,info.ENTRY_DATE
|
||||
,dic.`NAME` as PERSONNEL_TYPE_NAME
|
||||
,uc.USER_CORP_ID
|
||||
,uc.APPLY_TYPE
|
||||
,uc.APPLY_STATUS
|
||||
from <include refid="tableName"></include> u
|
||||
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
||||
left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
|
||||
left join SYS_POST p on p.POST_ID=u.POST_ID
|
||||
left join BUS_SHIFTWORKRULES sw on sw.SHIFTWORKRULES_ID = u.SHIFTDUTYONE
|
||||
left join BUS_SHIFTWORKRULES swr on swr.SHIFTWORKRULES_ID = u.SHIFTDUTYTWO
|
||||
left join SYS_USERINFO info on info.USER_ID = u.USER_ID
|
||||
left join SYS_DICTIONARIES dic on dic.DICTIONARIES_ID = info.PERSONNEL_TYPE
|
||||
left join (
|
||||
SELECT t1.USER_CORP_ID, t1.CORPINFO_ID, t1.USER_ID, t1.APPLY_TYPE, t1.APPLY_STATUS, t1.ISDELETE
|
||||
FROM SYS_USER_CORP t1
|
||||
WHERE t1.ISDELETE = '0'
|
||||
<if test="pd.APPLY_TYPE != null and pd.APPLY_TYPE != ''">
|
||||
<choose>
|
||||
<when test="pd.APPLY_TYPE == '1-3'"> AND t1.APPLY_TYPE in ('1','3')</when>
|
||||
</choose>
|
||||
</if> AND t1.CREATTIME = (
|
||||
SELECT MAX(t2.CREATTIME)
|
||||
FROM SYS_USER_CORP t2
|
||||
WHERE t2.ISDELETE = '0'
|
||||
<if test="pd.APPLY_TYPE != null and pd.APPLY_TYPE != ''">
|
||||
<choose>
|
||||
<when test="pd.APPLY_TYPE == '1-3'"> AND t2.APPLY_TYPE in ('1','3')</when>
|
||||
</choose>
|
||||
</if> AND t2.USER_ID = t1.USER_ID)
|
||||
) uc on uc.USER_ID = u.USER_ID and uc.ISDELETE = 0
|
||||
where u.ISDELETE = 0
|
||||
and u.USERNAME != 'admin'
|
||||
<if test="pd.VIPLEVEL != null and pd.VIPLEVEL != ''"> <!-- 角色检索 -->
|
||||
and r.PARENT_ID=#{pd.VIPLEVEL}
|
||||
</if>
|
||||
<if test="pd.VIPLEVEL == null or pd.VIPLEVEL == ''"> <!-- 角色检索 -->
|
||||
and r.PARENT_ID = '1'
|
||||
</if>
|
||||
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''"> <!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{pd.ROLE_ID}
|
||||
</if>
|
||||
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''"> <!-- 角色检索 -->
|
||||
and u.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
|
||||
</if>
|
||||
<if test="pd.STARTTIME!=null and pd.STARTTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{pd.STARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME!=null and pd.ENDTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.SHIFTDUTYONE != null and pd.SHIFTDUTYONE != ''">
|
||||
and u.SHIFTDUTYONE=#{pd.SHIFTDUTYONE}
|
||||
</if>
|
||||
<if test="pd.SHIFTDUTYTWO != null and pd.SHIFTDUTYTWO != ''">
|
||||
and u.SHIFTDUTYTWO=#{pd.SHIFTDUTYTWO}
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
AND
|
||||
uc.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.IS_ARCHIVES != null and pd.IS_ARCHIVES != ''">
|
||||
and (select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID) > 0
|
||||
</if>
|
||||
<if test="pd.IS_STUDENT != null and pd.IS_STUDENT != ''">
|
||||
and u.ISSTUDENT = #{pd.IS_STUDENT}
|
||||
</if>
|
||||
<if test="pd.PERSONNEL_TYPE != null and pd.PERSONNEL_TYPE != ''">
|
||||
and info.PERSONNEL_TYPE = #{pd.PERSONNEL_TYPE}
|
||||
</if>
|
||||
<if test="pd.IS_RECORDER != null and pd.IS_RECORDER != '' and pd.IS_RECORDER == 1 ">
|
||||
and info.IS_RECORDER = #{pd.IS_RECORDER}
|
||||
</if>
|
||||
<if test="pd.IS_CHARGE != null and pd.IS_CHARGE != '' and pd.IS_CHARGE == 1 ">
|
||||
and info.IS_CHARGE = #{pd.IS_CHARGE}
|
||||
</if>
|
||||
order by u.SORT asc,u.LAST_LOGIN desc
|
||||
</select>
|
||||
|
||||
<!-- 从业人员入职审核 -->
|
||||
<update id="setPractitionerReview" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
POST_ID = #{POST_ID},
|
||||
SHIFTDUTYONE = #{SHIFTDUTYONE},
|
||||
SHIFTDUTYTWO = #{SHIFTDUTYTWO},
|
||||
DURATION = #{DURATION},
|
||||
WORKSTATUS = #{WORKSTATUS},
|
||||
WORKPERIOD = #{WORKPERIOD}
|
||||
<if test="SORT != null">
|
||||
,SORT = #{SORT}
|
||||
</if>
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
|
||||
<!-- 修改从业人员信息 -->
|
||||
<update id="editPractitioner" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
NAME = #{NAME},
|
||||
PHONE = #{PHONE},
|
||||
USER_ID = USER_ID
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue