Commit 9d1ddc8a by 邓实川
parents e5a2e428 6089e9af
...@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz; ...@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz;
import java.util.List; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
......
...@@ -58,6 +58,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> { ...@@ -58,6 +58,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "操作时间 ", example = "操作时间")
private Date updateTime;
private List<SpmkExecutor> spmkExecutors; private List<SpmkExecutor> spmkExecutors;
} }
\ No newline at end of file
...@@ -65,4 +65,8 @@ public class SpmkExecutor extends Model<SpmkExecutor> { ...@@ -65,4 +65,8 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date updateTime;
} }
\ No newline at end of file
...@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号") @ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
private Integer isManager; private Integer isManager;
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
......
...@@ -98,7 +98,7 @@ public interface SpmkEnumInterface { ...@@ -98,7 +98,7 @@ public interface SpmkEnumInterface {
*/ */
@Getter @Getter
enum ParticipatorType implements SpmkEnumInterface { enum ParticipatorType implements SpmkEnumInterface {
INITIATOR(0, "发起"), COPY(1, "抄送人"), APPROVER(2, "审批人"); INITIATOR(0, "发起申请"), COPY(1, "抄送人"), APPROVER(2, "审批人");
private Integer type; private Integer type;
private String name; private String name;
......
...@@ -64,7 +64,7 @@ public interface YgEnumInterface { ...@@ -64,7 +64,7 @@ public interface YgEnumInterface {
*/ */
@Getter @Getter
enum YgJobType implements YgEnumInterface { enum YgJobType implements YgEnumInterface {
QUANZHI(0, "全"), SHIXI(1, "实习"), JIANZHI(2, "兼"), LWPQ(3, "劳务派遣"), LAOWU(4, "劳务"), PAIQIAN(5, "派遣"), QUANZHI(0, "全职"), SHIXI(1, "实习"), JIANZHI(2, "兼职"), LWPQ(3, "劳务派遣"), LAOWU(4, "劳务"), PAIQIAN(5, "派遣"),
WAIBAO(6, "外包"), TUIXIU(7, "退休"); WAIBAO(6, "外包"), TUIXIU(7, "退休");
private Integer type; private Integer type;
......
...@@ -11,20 +11,22 @@ import lombok.Getter; ...@@ -11,20 +11,22 @@ import lombok.Getter;
@Getter @Getter
public enum CommonEnum { public enum CommonEnum {
NULL_STR(0,""),
/** /**
* 1 超管理员 * 1 超管理员
*/ */
U_TYPE_ADMIN(1, "超管理员"), U_TYPE_ADMIN(0, "超管理员"),
/** /**
* 2 子管理 * 2 子管理
*/ */
U_TYPE_C_ADMIN(2, "子管理"), U_TYPE_C_ADMIN(1, "子管理"),
/** /**
* 3 普通员工 * 3 普通员工
*/ */
U_TYPE_EMP(3, "普通员工"), U_TYPE_EMP(2, "普通员工"),
/** /**
* 0 关闭 * 0 关闭
......
package cn.timer.api.config.exception; package cn.timer.api.config.exception;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -65,6 +66,15 @@ public class GlobalExceptionHandler { ...@@ -65,6 +66,15 @@ public class GlobalExceptionHandler {
} }
/** /**
* io异常
*/
@ExceptionHandler(IOException.class)
public Result<Object> ioException(IOException e) {
log.error(e.getMessage(), e);
return ResultUtil.error(e.getMessage());
}
/**
* 自定义验证异常 * 自定义验证异常
*/ */
@ExceptionHandler(MethodArgumentNotValidException.class) @ExceptionHandler(MethodArgumentNotValidException.class)
......
...@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth; ...@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.enuminterface.YgEnumInterface.YgJobType;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl; import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
...@@ -430,7 +432,7 @@ public class LoginController { ...@@ -430,7 +432,7 @@ public class LoginController {
@ApiOperation(value = "6.注册企业", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "6.注册企业", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Log(title = "企业注册", businessType = BusinessType.INSERT) @Log(title = "企业注册", businessType = BusinessType.INSERT)
public Result<String> register(@RequestBody EntRegisterDto entRegisterDto) { public Result<String> register(@RequestBody EntRegisterDto entRegisterDto) throws Exception{
// 事务回滚 // 事务回滚
/* /*
* DefaultTransactionDefinition def = new DefaultTransactionDefinition(); * DefaultTransactionDefinition def = new DefaultTransactionDefinition();
...@@ -473,12 +475,6 @@ public class LoginController { ...@@ -473,12 +475,6 @@ public class LoginController {
if (login == null) { if (login == null) {
// 员工信息 // 员工信息
/*
* QyzxEmpLogin qyzxEmpLogin =
* QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
* .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(
* DateUtil.date()) .endTime(DateUtil.nextMonth()).build();
*/
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw)) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()) .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date())
.build(); .build();
...@@ -489,8 +485,9 @@ public class LoginController { ...@@ -489,8 +485,9 @@ public class LoginController {
} }
} }
boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date()).isManager(1) boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date())
.name(username).jobStatus(1).build().insert(); .isManager(CommonEnum.U_TYPE_ADMIN.getType()).name(username).phone(phone).jobType(YgJobType.QUANZHI.getType()).jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType())
.build().insert();
if (!b4) { if (!b4) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败3"); return ResultUtil.error("注册企业失败3");
......
...@@ -142,25 +142,6 @@ public class QyzxController { ...@@ -142,25 +142,6 @@ public class QyzxController {
} }
/** /**
* 企业认证-审核-通过/未通过
*
* @param qyzxEntAuth
* @return
*/
/*
* @PostMapping(value = "/entauthcheck")
*
* @ApiOperation(value = "企业认证-审核-通过/未通过", httpMethod = "POST", notes =
* "接口发布说明") public Result<QyzxEntAuth> entauthcheck1(@CurrentUser UserBean
* userBean, @RequestBody QyzxEntAuth qyzxEntAuth) { Integer id =
* qyzxEntAuth.getId(); Integer authType = qyzxEntAuth.getAuthType(); if (id ==
* null || authType == null) { return ResultUtil.error("参数缺少/异常"); } QyzxEntAuth
* entAuth = QyzxEntAuth.builder().id(id).authType(authType).build(); boolean b
* = entAuth.updateById(); if (b) { return ResultUtil.data(qyzxEntAuth,
* "企业认证-审批成功"); } else { return ResultUtil.error("企业认证-审批失败"); } }
*/
/**
* 运营管理 企业认证-审核-通过/不通过(weng) * 运营管理 企业认证-审核-通过/不通过(weng)
* *
* @param qyzxEntAuth * @param qyzxEntAuth
...@@ -267,10 +248,10 @@ public class QyzxController { ...@@ -267,10 +248,10 @@ public class QyzxController {
@GetMapping(value = "/entlist") @GetMapping(value = "/entlist")
@ApiOperation(value = "企业列表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "企业列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) { public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
QueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<>(); List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(new QueryWrapper<QyzxEmpEntAsso>().lambda()
queryWrapper.select("org_code").eq("emp_num", empNum); .select(QyzxEmpEntAsso::getOrgCode)
List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(queryWrapper); .eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper) List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
.in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list(); .in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list();
return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功"); return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功");
...@@ -327,56 +308,6 @@ public class QyzxController { ...@@ -327,56 +308,6 @@ public class QyzxController {
} }
} }
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/**
* 意见反馈
*/
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
// /**
// * 意见反馈2
// */
// @PostMapping(value = "/feedback")
// @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
// public Result<String> feedback(@CurrentUser UserBean userBean, @RequestBody FeebackDto feebackDto) {
// String opinionText = feebackDto.getOpinionText();
// List<String> urlList = feebackDto.getUrlList();
// QyzxSuggestionFeeback qs = QyzxSuggestionFeeback.builder().orgCode(userBean.getOrgCode()).empNum(userBean.getEmpNum()).opinionText(opinionText).bugType(1).createTime(new Date()).build();
//
// boolean tof = qs.insert();
// Integer feebackId = qs.getId();
// if (tof) {
// for (String str : urlList) {
// QyzxFeebackAccessory.builder().feebackId(feebackId).opinionUrl(str).build().insert();
// }
// return ResultUtil.data("意见反馈成功!");
// }
//
// return ResultUtil.data("意见反馈失败!");
// }
/** /**
* 意见反馈 * 意见反馈
*/ */
...@@ -438,8 +369,8 @@ public class QyzxController { ...@@ -438,8 +369,8 @@ public class QyzxController {
.build().insertOrUpdate(); .build().insertOrUpdate();
// 添加或修改服务计算表 // 添加或修改服务计算表
Integer number = qyzxPayServe.getNum(); Integer number = qyzxPayServe.getNum();
QueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<>(); LambdaQueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<QyzxAttaFwjsb>().lambda();
queryWrapper.eq("emp_num", userBean.getEmpNum()).eq("code", code); queryWrapper.eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()).eq(QyzxAttaFwjsb::getCode, code);
Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper); Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper);
if (result != null && result > 0) { if (result != null && result > 0) {
QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper); QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper);
...@@ -465,7 +396,7 @@ public class QyzxController { ...@@ -465,7 +396,7 @@ public class QyzxController {
@ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) { public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) {
List<QyzxAttaFwjsb> qyzxAttaFpgl = QyzxAttaFwjsb.builder().build() List<QyzxAttaFwjsb> qyzxAttaFpgl = QyzxAttaFwjsb.builder().build()
.selectList(new QueryWrapper<QyzxAttaFwjsb>().eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<QyzxAttaFwjsb>().lambda().eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()));
return ResultUtil.data(qyzxAttaFpgl, "获取服务计算成功"); return ResultUtil.data(qyzxAttaFpgl, "获取服务计算成功");
} }
...@@ -479,7 +410,7 @@ public class QyzxController { ...@@ -479,7 +410,7 @@ public class QyzxController {
@ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) { public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) {
List<QyzxLogBuy> qyzxLogBuy = QyzxLogBuy.builder().build() List<QyzxLogBuy> qyzxLogBuy = QyzxLogBuy.builder().build()
.selectList(new QueryWrapper<QyzxLogBuy>().eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<QyzxLogBuy>().lambda().eq(QyzxLogBuy::getEmpNum, userBean.getEmpNum()));
return ResultUtil.data(qyzxLogBuy, "获取购买记录成功"); return ResultUtil.data(qyzxLogBuy, "获取购买记录成功");
} }
......
...@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.druid.sql.visitor.functions.Nil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -49,8 +47,8 @@ import cn.timer.api.config.annotation.UserBean; ...@@ -49,8 +47,8 @@ import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.SpmkEnumInterface; import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.exception.CustomException; import cn.timer.api.config.exception.CustomException;
import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Ranks; import cn.timer.api.config.validation.Ranks;
import cn.timer.api.config.validation.ValidList; import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl; import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
...@@ -88,10 +86,10 @@ import io.swagger.annotations.ApiOperation; ...@@ -88,10 +86,10 @@ import io.swagger.annotations.ApiOperation;
@Transactional @Transactional
@RequestMapping(value = "/spmk", @RequestMapping(value = "/spmk",
produces = { "application/json","multipart/form-data" }) produces = { "application/json","multipart/form-data" })
//@BindingResultCtrol(title = "发起审批")
public class SpmkController { public class SpmkController {
@Autowired
SpmkServiceImpl spmkService;
@Autowired @Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired @Autowired
...@@ -127,7 +125,7 @@ public class SpmkController { ...@@ -127,7 +125,7 @@ public class SpmkController {
public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){ public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){
if (spmkApprovalTemplateG.selectCount(new QueryWrapper<SpmkApprovalTemplateG>().lambda() if (spmkApprovalTemplateG.selectCount(new QueryWrapper<SpmkApprovalTemplateG>().lambda()
.ne(SpmkApprovalTemplateG::getId, spmkApprovalTemplateG.getId()) .ne(spmkApprovalTemplateG.getId() != null,SpmkApprovalTemplateG::getId, spmkApprovalTemplateG.getId())
.eq(SpmkApprovalTemplateG::getName, spmkApprovalTemplateG.getName())) > 0) { .eq(SpmkApprovalTemplateG::getName, spmkApprovalTemplateG.getName())) > 0) {
return ResultUtil.error("审批模板组名重复!"); return ResultUtil.error("审批模板组名重复!");
} }
...@@ -198,7 +196,7 @@ public class SpmkController { ...@@ -198,7 +196,7 @@ public class SpmkController {
at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter())); at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter()));
if (at.selectCount(new QueryWrapper<SpmkApprovalTemplate>().lambda() if (at.selectCount(new QueryWrapper<SpmkApprovalTemplate>().lambda()
.ne(SpmkApprovalTemplate::getId, at.getId()) .ne(at.getId() != null, SpmkApprovalTemplate::getId, at.getId())
.eq(SpmkApprovalTemplate::getName, at.getName())) > 0) { .eq(SpmkApprovalTemplate::getName, at.getName())) > 0) {
return ResultUtil.error("审批模板名重复!"); return ResultUtil.error("审批模板名重复!");
} }
...@@ -266,7 +264,7 @@ public class SpmkController { ...@@ -266,7 +264,7 @@ public class SpmkController {
public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){ public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){
if (spmkApprovalG.selectCount(new QueryWrapper<SpmkApprovalG>().lambda() if (spmkApprovalG.selectCount(new QueryWrapper<SpmkApprovalG>().lambda()
.ne(SpmkApprovalG::getId, spmkApprovalG.getId()) .ne(spmkApprovalG.getId() != null, SpmkApprovalG::getId, spmkApprovalG.getId())
.eq(SpmkApprovalG::getName, spmkApprovalG.getName()) .eq(SpmkApprovalG::getName, spmkApprovalG.getName())
.eq(SpmkApprovalG::getOrgCode, userBean.getOrgCode())) > 0) { .eq(SpmkApprovalG::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("审批组名重复!"); return ResultUtil.error("审批组名重复!");
...@@ -315,7 +313,6 @@ public class SpmkController { ...@@ -315,7 +313,6 @@ public class SpmkController {
public Result<Object> selectListAg(@CurrentUser UserBean userBean){ public Result<Object> selectListAg(@CurrentUser UserBean userBean){
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum()); List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!"); return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!");
} }
...@@ -349,7 +346,7 @@ public class SpmkController { ...@@ -349,7 +346,7 @@ public class SpmkController {
BeanUtil.copyProperties(spmkCustomApprovalDto, ca , "froms","router","initiatorConfigs"); BeanUtil.copyProperties(spmkCustomApprovalDto, ca , "froms","router","initiatorConfigs");
if (ca.selectCount(new QueryWrapper<SpmkCustomApproval>().lambda() if (ca.selectCount(new QueryWrapper<SpmkCustomApproval>().lambda()
.ne(SpmkCustomApproval::getId, ca.getId()) .ne(ca.getId() != null, SpmkCustomApproval::getId, ca.getId())
.eq(SpmkCustomApproval::getName, ca.getName()) .eq(SpmkCustomApproval::getName, ca.getName())
.eq(SpmkCustomApproval::getOrgCode, userBean.getOrgCode())) > 0) { .eq(SpmkCustomApproval::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("自定义审批名重复!"); return ResultUtil.error("自定义审批名重复!");
...@@ -381,8 +378,6 @@ public class SpmkController { ...@@ -381,8 +378,6 @@ public class SpmkController {
} }
// //
/** /**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class)) * 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
...@@ -414,7 +409,6 @@ public class SpmkController { ...@@ -414,7 +409,6 @@ public class SpmkController {
} }
return ResultUtil.success("操作成功!"); return ResultUtil.success("操作成功!");
} }
/** /**
...@@ -468,7 +462,7 @@ public class SpmkController { ...@@ -468,7 +462,7 @@ public class SpmkController {
listRouter.add(spmkApproveSummaryDto.getRouter()); listRouter.add(spmkApproveSummaryDto.getRouter());
JSONObject jSONObject = spmkApproveSummaryDto.getRequestData() JSONObject jSONObject = spmkApproveSummaryDto.getRequestData()
.set("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build()) .set("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build())
.set("initiator", FromData.builder().value(spmkApproveSummaryDto.getInitiator()).build()) .set("initiator", FromData.builder().value(ygglMainEmp.getName()).build())
.set("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build()) .set("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build())
.set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build()); .set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build());
RouterUtils.NextNode(listRouter, jSONObject, ISFIRST); RouterUtils.NextNode(listRouter, jSONObject, ISFIRST);
...@@ -561,18 +555,7 @@ public class SpmkController { ...@@ -561,18 +555,7 @@ public class SpmkController {
@Log(title = "审批-审批详情", businessType = BusinessType.OTHER) @Log(title = "审批-审批详情", businessType = BusinessType.OTHER)
public Result<Object> selectAd(@PathVariable(required = true) Integer id) { public Result<Object> selectAd(@PathVariable(required = true) Integer id) {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id)); SpmkApproveDetailDto adD = spmkService.selectApproveDetailByAsId(id);
SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build();
if (ad == null) {
return ResultUtil.data(adD, "操作成功!");
}
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(id);
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.deserialize(ad.getRequestData()));
adD.setFroms(ObjectUtil.deserialize(ad.getFroms()));
adD.setRouter(ObjectUtil.deserialize(ad.getRouter()));
adD.setFlowChildren(ObjectUtil.deserialize(ad.getFlowChildren()));
adD.setApproveExecuteRecord(listAer);
return ResultUtil.data(adD, "操作成功!"); return ResultUtil.data(adD, "操作成功!");
} }
...@@ -626,6 +609,7 @@ public class SpmkController { ...@@ -626,6 +609,7 @@ public class SpmkController {
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren()); List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren());
// 审批逻辑
RouterUtils.approving( RouterUtils.approving(
listFlowChildren, listFlowChildren,
approvingDto.getAsId(), approvingDto.getAsId(),
...@@ -647,12 +631,14 @@ public class SpmkController { ...@@ -647,12 +631,14 @@ public class SpmkController {
.eq(SpmkApproveSummary::getId, approvingDto.getAsId())); .eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) { if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover("").endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById(); SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
JSONObject jSONObject = ObjectUtil.deserialize(ad.getRequestData());
jSONObject.set("approveId", approvingDto.getAsId());
//审批完成后 业务 //审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType())); SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null) if (sab != null)
sab.handleApprove(ObjectUtil.deserialize(ad.getRequestData())); sab.handleApprove(jSONObject);
} }
} }
...@@ -758,16 +744,13 @@ public class SpmkController { ...@@ -758,16 +744,13 @@ public class SpmkController {
return ResultUtil.data(spmkIcons,"获取图标列表成功"); return ResultUtil.data(spmkIcons,"获取图标列表成功");
} }
@Autowired
SpmkServiceImpl SpmkService;
//TODO 测试-生成 审批组 和 自定义审批 //TODO 测试-生成 审批组 和 自定义审批
@GetMapping(value = "/test") @GetMapping(value = "/test")
@ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批") @ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批")
@ApiOperationSupport(order = 98) @ApiOperationSupport(order = 98)
public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){ public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){
SpmkService.createCustomApproval(orgCode); spmkService.createCustomApproval(orgCode);
List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll(); List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll();
......
package cn.timer.api.controller.spmk.service; package cn.timer.api.controller.spmk.service;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public interface SpmkService { public interface SpmkService {
boolean createCustomApproval(Integer orgCode); boolean createCustomApproval(Integer orgCode);
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId);
} }
...@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console; import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.bean.spmk.SpmkApprovalG; import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate; import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
import cn.timer.api.bean.spmk.SpmkApprovalTemplateG; import cn.timer.api.bean.spmk.SpmkApprovalTemplateG;
import cn.timer.api.bean.spmk.SpmkApproveDetail;
import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
import cn.timer.api.bean.spmk.SpmkCustomApproval; import cn.timer.api.bean.spmk.SpmkCustomApproval;
import cn.timer.api.dao.spmk.SpmkApproveDetailMapper;
import cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper; import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
@Service @Service
public class SpmkServiceImpl implements SpmkService{ public class SpmkServiceImpl implements SpmkService{
@Autowired @Autowired
SpmkCustomApprovalMapper spmkCustomApprovalMapper; private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
@Autowired
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
/** /**
* 根据orgCode查数据库 审批模板 生成 自定义模板 * 根据orgCode查数据库 审批模板 生成 自定义模板
...@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{
return true; return true;
} }
/**
* 根据审批汇总id 获取 审批详情
*/
@Override
public SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId) {
// TODO Auto-generated method stub
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, asId));
SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build();
if (ad == null) {
return null;
}
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(asId);
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.deserialize(ad.getRequestData()));
adD.setFroms(ObjectUtil.deserialize(ad.getFroms()));
adD.setRouter(ObjectUtil.deserialize(ad.getRouter()));
adD.setFlowChildren(ObjectUtil.deserialize(ad.getFlowChildren()));
adD.setApproveExecuteRecord(listAer);
return adD;
}
} }
...@@ -5,20 +5,18 @@ ...@@ -5,20 +5,18 @@
*/ */
package cn.timer.api.controller.yggl; package cn.timer.api.controller.yggl;
import java.text.ParseException; import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -38,22 +36,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -38,22 +36,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.util.StringUtil; import com.github.pagehelper.util.StringUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.BetweenFormater.Level; import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.lang.tree.Tree; import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNodeConfig; import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil; import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import cn.timer.api.bean.clazz.CommonArea; import cn.timer.api.bean.clazz.CommonArea;
import cn.timer.api.bean.clazz.SysRegion; import cn.timer.api.bean.clazz.SysRegion;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
...@@ -78,6 +78,7 @@ import cn.timer.api.config.annotation.UserBean; ...@@ -78,6 +78,7 @@ import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.YgEnumInterface; import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.exception.Regular; import cn.timer.api.config.exception.Regular;
import cn.timer.api.config.validation.ValidList;
import cn.timer.api.dao.clazz.CommonAreaMapper; import cn.timer.api.dao.clazz.CommonAreaMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.yggl.YgMzDtoMapper; import cn.timer.api.dao.yggl.YgMzDtoMapper;
...@@ -85,13 +86,12 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -85,13 +86,12 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.yggl.YgglMainLzbMapper; import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dto.yggl.AddygdaDto; import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.ImportEmpDto;
import cn.timer.api.dto.yggl.LoginInfoDto; import cn.timer.api.dto.yggl.LoginInfoDto;
import cn.timer.api.dto.yggl.LoginerChargeDto; import cn.timer.api.dto.yggl.LoginerChargeDto;
import cn.timer.api.dto.yggl.LzbQueryDto; import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgCartogramDto; import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgDrjqbDto;
import cn.timer.api.dto.yggl.YgDrsDto;
import cn.timer.api.dto.yggl.YgKVDto; import cn.timer.api.dto.yggl.YgKVDto;
import cn.timer.api.dto.yggl.YgQueryDto; import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto; import cn.timer.api.dto.yggl.YgbintuDto;
...@@ -135,151 +135,20 @@ public class YgglController { ...@@ -135,151 +135,20 @@ public class YgglController {
private YgMzDtoMapper ygMzDtoMapper; private YgMzDtoMapper ygMzDtoMapper;
/** /**
* 获取登录人的相关信息
*
* @param
* @return
*/
@GetMapping(value = "/loginmessage")
@ApiOperation(value = "获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 68)
public Result<LoginInfoDto> loginmessage(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
LoginInfoDto loginInfo = LoginInfoDto.builder().build();
YgglMainEmp ygglMainEmp = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.select(YgglMainEmp::getBmgwId, YgglMainEmp::getName, YgglMainEmp::getRzTime, YgglMainEmp::getZzTime,
YgglMainEmp::getEmpNum)
.eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, orgCode).one();
if (ygglMainEmp != null) {
Integer gw = ygglMainEmp.getBmgwId();
ZzglBmgwM gwObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.select(ZzglBmgwM::getUpId, ZzglBmgwM::getName).eq(ZzglBmgwM::getId, gw)
.eq(ZzglBmgwM::getOrgCode, orgCode).one();
if (gwObj != null) {
ZzglBmgwM bmObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.select(ZzglBmgwM::getId, ZzglBmgwM::getName).eq(ZzglBmgwM::getId, gwObj.getUpId())
.eq(ZzglBmgwM::getOrgCode, orgCode).one();
loginInfo.setBmId(bmObj != null ? bmObj.getId() : null);
loginInfo.setBmName(bmObj != null ? bmObj.getName() : null);
}
loginInfo.setEmpNum(ygglMainEmp.getEmpNum());
loginInfo.setName(ygglMainEmp.getName());
loginInfo.setGwId(gw);
loginInfo.setGwName(gwObj != null ? gwObj.getName() : "");
loginInfo.setEntryTime(ygglMainEmp.getRzTime());
loginInfo.setRegularTime(ygglMainEmp.getRzTime());
}
return ResultUtil.data(loginInfo, "操作成功!");
}
/**
* 获取登录人和上级主管的empNum和名称
*
* @param
* @return
*/
@GetMapping(value = "/loginerChargers")
@ApiOperation(value = " 获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 69)
public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>();
Integer empNum = userBean.getEmpNum();
Integer gw = empNumConfirm(orgCode, empNum).getBmgwId();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM.getUpDepts(list, gw, zzglBmgwMs);
List<Integer> leaderList = new ArrayList<Integer>();
for (Integer zzglId : list) {
for (ZzglBmgwM zzglBmgwM : zzglBmgwMs) {
if (zzglId.equals(zzglBmgwM.getId()) && zzglBmgwM.getLeader() != null) {
leaderList.add(zzglBmgwM.getLeader());
}
}
}
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for (YgglMainEmp m : ygglMainEmps) {
if (m.getHeadUrl() == null) {
m.setHeadUrl("");
}
loginerChargeDtos.add(new LoginerChargeDto(m.getEmpNum(), m.getName(), m.getHeadUrl()));
}
Collections.reverse(loginerChargeDtos);
return ResultUtil.data(loginerChargeDtos, "获取上级部门的部门id");
}
// 根据传来的empNum获取该人员信息,没有则传全部
public List<YgglMainEmp> empNumsConfirm(Integer orgCode, List<Integer> empNumList) {
List<YgglMainEmp> all = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, orgCode).list();
List<YgglMainEmp> ygglMainEmps = new ArrayList<YgglMainEmp>();
if (empNumList.size() != 0) {
for (Integer empNum : empNumList) {
all.stream().filter(item -> empNum.equals(item.getEmpNum())).forEach(action -> {
ygglMainEmps.add(action);
});
}
} else {
ygglMainEmps.addAll(all);
}
return ygglMainEmps;
}
// 根据传来的empNum获取该人员信息
public YgglMainEmp empNumConfirm(Integer orgCode, Integer empNum) {
YgglMainEmp one = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one();
return one;
}
/**
* 获取用户头像
*
* @param
* @return
*/
@PostMapping(value = "/headphotos")
@ApiOperation(value = "获取用户头像", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 70)
public Result<List<YgglMainEmp>> headphotos(@CurrentUser UserBean userBean, @RequestBody List<Integer> empNumList) {
if (empNumList.size() == 0) {
return ResultUtil.error("请输入empNum数组");
}
List<YgglMainEmp> yglList = YgglMainEmp.builder().build()
.selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.in(YgglMainEmp::getEmpNum, empNumList)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getHeadUrl));
for (YgglMainEmp yg : yglList) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
}
}
return ResultUtil.data(yglList, "获取用户头像组成功");
}
/**
* 获取员工档案 * 获取员工档案
* *
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/ygda") @GetMapping(value = "/ygda")
@ApiOperation(value = "获取员工档案", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "1.获取员工档案", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
public Result<YgglMainEmp> selectygda(@CurrentUser UserBean userBean) { public Result<YgglMainEmp> selectygda(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda()
queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum); .eq(YgglMainEmp::getOrgCode, orgCode)
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); .eq(YgglMainEmp::getEmpNum, empNum));
Date rz = ygglMainEmp.getRzTime(); Date rz = ygglMainEmp.getRzTime();
if (rz != null) { if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(rz, new Date(), Level.DAY)); ygglMainEmp.setWorkTime(DateUtil.formatBetween(rz, new Date(), Level.DAY));
...@@ -289,13 +158,13 @@ public class YgglController { ...@@ -289,13 +158,13 @@ public class YgglController {
// 获取员工档案 // 获取员工档案
@GetMapping(value = "/ygda/{empNum}") @GetMapping(value = "/ygda/{empNum}")
@ApiOperation(value = "获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "2.获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
public Result<YgglMainEmp> selectygda(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<YgglMainEmp> selectygda(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda()
queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum); .eq(YgglMainEmp::getOrgCode, orgCode)
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); .eq(YgglMainEmp::getEmpNum, empNum));
Date rz = ygglMainEmp.getRzTime(); Date rz = ygglMainEmp.getRzTime();
if (rz != null) { if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(), Level.DAY)); ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(), Level.DAY));
...@@ -310,16 +179,16 @@ public class YgglController { ...@@ -310,16 +179,16 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/ygdabm/{gwid}") @GetMapping(value = "/ygdabm/{gwid}")
@ApiOperation(value = "获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "3.获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
public Result<String> selectbmgw(@CurrentUser UserBean userBean, @PathVariable Integer gwid) { public Result<String> selectbmgw(@CurrentUser UserBean userBean, @PathVariable Integer gwid) {
if (gwid == null || gwid == 0) { if (gwid == null || gwid == 0) {
return ResultUtil.data("无岗位", "获取员工档案部门岗位名称成功"); return ResultUtil.data("无岗位", "获取员工档案部门岗位名称成功");
} }
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<>(); ZzglBmgwM zzglBmgwM = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().lambda()
queryWrapper.eq("org_code", orgCode).eq("id", gwid); .eq(ZzglBmgwM::getOrgCode, orgCode)
ZzglBmgwM zzglBmgwM = ZzglBmgwM.builder().build().selectOne(queryWrapper); .eq(ZzglBmgwM::getId, gwid));
String gw = null; String gw = null;
Integer bmid = null; Integer bmid = null;
if (zzglBmgwM != null) { if (zzglBmgwM != null) {
...@@ -327,7 +196,9 @@ public class YgglController { ...@@ -327,7 +196,9 @@ public class YgglController {
bmid = zzglBmgwM.getUpId(); bmid = zzglBmgwM.getUpId();
} }
ZzglBmgwM z = ZzglBmgwM.builder().build() ZzglBmgwM z = ZzglBmgwM.builder().build()
.selectOne(new QueryWrapper<ZzglBmgwM>().eq("org_code", orgCode).eq("id", bmid)); .selectOne(new QueryWrapper<ZzglBmgwM>().lambda()
.eq(ZzglBmgwM::getOrgCode, orgCode)
.eq(ZzglBmgwM::getId, bmid));
String bm = null; String bm = null;
if (z != null) { if (z != null) {
bm = z.getName(); bm = z.getName();
...@@ -344,10 +215,9 @@ public class YgglController { ...@@ -344,10 +215,9 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/addygda") @PostMapping(value = "/addygda")
@ApiOperation(value = "添加员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "4.添加员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) throws Exception {
throws Exception {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String name = addygdaDto.getName(); String name = addygdaDto.getName();
String phone = addygdaDto.getPhone(); String phone = addygdaDto.getPhone();
...@@ -368,32 +238,17 @@ public class YgglController { ...@@ -368,32 +238,17 @@ public class YgglController {
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum); isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break; break;
default: default:
break; break;
} }
if (!isvalid) { if (!isvalid) {
return ResultUtil.error("证件格式不对!"); return ResultUtil.error("证件格式不对!");
} }
Integer jobType = addygdaDto.getJobType(); Integer jobType = addygdaDto.getJobType();
Date rzTime = null; Date rzTime = addygdaDto.getRzTime() == null ? new Date() : addygdaDto.getRzTime();
if (addygdaDto.getRzTime() == null)
rzTime = new Date();
else
rzTime = addygdaDto.getRzTime();
Integer syq = addygdaDto.getSyq(); Integer syq = addygdaDto.getSyq();
Integer sex = addygdaDto.getSex(); Integer sex = addygdaDto.getSex();
Integer bmgwId = addygdaDto.getBmgwId(); Integer bmgwId = addygdaDto.getBmgwId();
if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) {
return ResultUtil.error("请输入员工姓名,手机号和身份证号");
}
if (!ObjectUtil.isAllNotEmpty(name, phone, zjType, zjNum, jobType, rzTime, syq, bmgwId, sex)) {
return ResultUtil.error("请完善员工信息!");
}
if (!IdcardUtil.isValidCard(zjNum)) {
return ResultUtil.error("请输入有效的证件信息!");
}
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one(); .eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
...@@ -405,48 +260,28 @@ public class YgglController { ...@@ -405,48 +260,28 @@ public class YgglController {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("添加员工登录表失败,请检查输入信息"); return ResultUtil.error("添加员工登录表失败,请检查输入信息");
} }
// 添加三张表
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(orgCode)
.userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// usertype2普通员工 status1正常
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq)
.sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode).build();
ygglMainEmp.insert();
if (addygdaDto.getBmgwId() != null) {
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.set(YgglMainEmp::getBmgwId, addygdaDto.getBmgwId()).eq(YgglMainEmp::getOrgCode, orgCode)
.eq(YgglMainEmp::getId, ygglMainEmp.getId()).update();
} }
return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
} else {
YgglMainEmp ishad = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode)); .eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode));
if (ishad == null) { if (ygglMainEmp == null) {
// 添加三张表 QyzxEmpEntAsso.builder()
// 员工权限表(未定) .empNum(login.getId()).orgCode(orgCode).userType(CommonEnum.U_TYPE_EMP.getType()).status(CommonEnum.U_STS_ON.getType())
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(orgCode) .build()
.userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// usertype2普通员工 .insert();
// status1正常 ygglMainEmp = YgglMainEmp.builder()
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum) .name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq) .jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime)
.sex(sex).empNum(login.getId()).orgCode(orgCode).build(); .syq(syq).sex(sex).empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId)
.build();
ygglMainEmp.insert(); ygglMainEmp.insert();
if (addygdaDto.getBmgwId() != null) {
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) return ResultUtil.data(ygglMainEmp, "添加员工成功!");
.set(YgglMainEmp::getBmgwId, addygdaDto.getBmgwId()).eq(YgglMainEmp::getOrgCode, orgCode)
.eq(YgglMainEmp::getId, ygglMainEmp.getId()).update();
}
return ResultUtil.data(ygglMainEmp, "添加员工档案成功!");
} else { } else {
return ResultUtil.error("该手机号已被使用,请输入正确手机号"); return ResultUtil.error("该手机号已被使用,请输入正确手机号");
} }
}
} }
/** /**
...@@ -456,7 +291,7 @@ public class YgglController { ...@@ -456,7 +291,7 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/updateygda") @PostMapping(value = "/updateygda")
@ApiOperation(value = "修改员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "5.修改员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public Result<Object> updateygda(@CurrentUser UserBean userBean, @RequestBody YgglMainEmp ygglMainEmp) public Result<Object> updateygda(@CurrentUser UserBean userBean, @RequestBody YgglMainEmp ygglMainEmp)
throws Exception { throws Exception {
...@@ -466,18 +301,13 @@ public class YgglController { ...@@ -466,18 +301,13 @@ public class YgglController {
updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainEmp.getEmpNum()); updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainEmp.getEmpNum());
ygglMainEmp.update(updateWrapper); ygglMainEmp.update(updateWrapper);
// Integer count = qyzxEmpLoginMapper.selectCount(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getPhone, ygglMainEmp.getPhone()));
// if (count >= 1) {
// return ResultUtil.error("手机号已被使用!");
// }
//
// QyzxEmpLogin.builder().phone(ygglMainEmp.getPhone()).build()
// .update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId, userBean.getEmpNum()));
return ResultUtil.data(ygglMainEmp, "修改成功"); return ResultUtil.data(ygglMainEmp, "修改成功");
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
} }
/** /**
* 员工搜索 * 员工搜索
* *
...@@ -485,7 +315,7 @@ public class YgglController { ...@@ -485,7 +315,7 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/ygquery") @PostMapping(value = "/ygquery")
@ApiOperation(value = "员工搜索/分页", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "6.员工搜索/分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
public Result<Object> ygquery(@CurrentUser UserBean userBean, @RequestBody YgQueryDto ygQueryDto) { public Result<Object> ygquery(@CurrentUser UserBean userBean, @RequestBody YgQueryDto ygQueryDto) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
...@@ -519,408 +349,173 @@ public class YgglController { ...@@ -519,408 +349,173 @@ public class YgglController {
* 导入员工档案 * 导入员工档案
*/ */
@PostMapping(value = "/import_emp_record") @PostMapping(value = "/import_emp_record")
@ApiOperation(value = "导入员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "7.导入员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> importEmpRecord( public Result<JSONObject> importEmpRecord(
@CurrentUser UserBean userBean/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */) { @CurrentUser UserBean userBean ,@Validated @RequestBody ValidList<AddygdaDto> listAddygdaDto ) throws Exception {
List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper Integer orgCode = userBean.getOrgCode();
.selectList(new QueryWrapper<QyzxEmpLogin>().lambda().select(QyzxEmpLogin::getPhone)); // 查询所有员工手机号
listEl = listEl != null ? listEl.stream() // List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper
// .selectList(new QueryWrapper<QyzxEmpLogin>().lambda()
// .select(QyzxEmpLogin::getPhone));
List<YgglMainEmp> listMe = ygglMainEmpMapper
.selectList(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getOrgCode, orgCode)
.select(YgglMainEmp::getPhone,YgglMainEmp::getZjNum));
listMe = listMe != null ? listMe.stream()
.filter(o -> o != null && o.getPhone() != null).collect(Collectors.toList()) : null; .filter(o -> o != null && o.getPhone() != null).collect(Collectors.toList()) : null;
System.out.println(JSONUtil.parseObj(listEl));
// listEl.stream().filter(predicate)
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// list.add(zzglBmgwM.getId());
// getDepts(list, zzglBmgwM.getId(), objs);
// });
// 抽取 登录表 的phone的集合 // 抽取 登录表 的phone的集合
List<String> listPhone = listEl.stream().map(QyzxEmpLogin::getPhone).collect(Collectors.toList()); List<String> listPhone = listMe.stream().map(YgglMainEmp::getPhone).collect(Collectors.toList());
// 抽取 登录表 的zjNum的集合
List<String> listzjNum = listMe.stream().map(YgglMainEmp::getZjNum).collect(Collectors.toList());
List<YgglMainEmp> listYmp = new ArrayList<YgglMainEmp>();
List<AddygdaDto> list = listAddygdaDto.stream()
.filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum())).collect(Collectors.toList());
List<AddygdaDto> phoneRepetitions = listAddygdaDto.stream()
.filter(o -> o != null && listPhone.contains(o.getPhone())).collect(Collectors.toList());
List<AddygdaDto> idCardRepetitions = listAddygdaDto.stream()
.filter(o -> o != null && listzjNum.contains(o.getZjNum())).collect(Collectors.toList());
List<YgglMainEmp> insertErrors = new ArrayList<YgglMainEmp>();
YgglMainEmp yme;
for (AddygdaDto ad : list) {
System.out.println(JSONUtil.parseObj(listPhone)); String name = ad.getName();
listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList()); String phone = ad.getPhone();
return null; Integer zjType = ad.getZjType();
String zjNum = ad.getZjNum();
boolean isvalid = true;
switch (zjType) {
case 0:
isvalid = ReUtil.isMatch(Regular.IDCARD, zjNum);
break;
case 1:
isvalid = ReUtil.isMatch(Regular.HKMAKAO, zjNum);
break;
case 2:
isvalid = ReUtil.isMatch(Regular.TAIWAN1, zjNum) || ReUtil.isMatch(Regular.TAIWAN2, zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
if (!isvalid) {
return ResultUtil.error("证件格式不对!");
} }
Integer jobType = ad.getJobType();
Date rzTime = ad.getRzTime() == null ? new Date() : ad.getRzTime();
Integer syq = ad.getSyq();
Integer sex = ad.getSex();
Integer bmgwId = ad.getBmgwId();
/**
* 导入威力加强版
*
* @param
* @return
*/
@PostMapping(value = "/ygdas")
@ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明")
public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) {
drList.setErrorList(new ArrayList<YgDrjqbDto>());
drList.setOrgCode(userBean.getOrgCode());
YgDrsDto tofList = errorFilter(drList);// 滤嘴,过滤信息
if (tofList.getDrList().size() == 0)
return ResultUtil.data(tofList.getErrorList(), "导入发生错误人员名单");
YgDrsDto tof = optFilter(tofList);// 彻底规范好数据
List<YgDrjqbDto> trueList = tof.getDrList();// 拿出正确的信息
List<YgDrjqbDto> errorList = tof.getErrorList();// 拿出错误的信息
if (trueList.size() == 0)
return ResultUtil.data(errorList, "导入发生错误人员名单");
for (YgDrjqbDto e : trueList) {
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(QyzxEmpLogin::getPhone, e.getPhone()).one(); .eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
// 证件类型为0 if (login == null) {
Integer jobType = Integer.valueOf(e.getJobType());// 工作类型 // 初始化密码 pwd
Integer syq = Integer.valueOf(e.getSyq());// 试用期 login = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pwd))
Integer sex = Integer.valueOf(e.getSex());// 性别 .sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(name).build();
Integer gw = e.getHavebmid(); if (!login.insert()) {
String jobNum = e.getYgnbgh();
Integer jg = e.getJg();
Date birthday = e.getBirthday();
// 入职日期
Date rzdate = new Date();
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");// 正杠
if (e.getRzTime().indexOf("-") != -1) {
try {
rzdate = straight.parse(e.getRzTime());
} catch (ParseException PException) {
PException.printStackTrace();
e.setError("请填写正确的时间格式");
errorList.add(e);
continue;
}
}
// 判断是否已有员工登录表
if (login == null) {// 添加三张表
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(e.getPhone()).pw(Md5.md5("123456"))
.sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(e.getName()).build();
if (!qyzxEmpLogin.insert()) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
e.setError("员工无法添加!"); return ResultUtil.error("添加员工登录表失败,请检查输入信息");
errorList.add(e);
continue;
}
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode())
.userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// userType2普通员工,status1正常
YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0).zjNum(e.getZj())
.jobType(jobType).rzTime(rzdate).updateTime(new Date()).updateMan(userBean.getEmpNum()).syq(syq)
.sex(sex).jobNum(jobNum).bmgwId(gw).empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode())
.build();
emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
// return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
} else {
// 添加两张表
YgglMainEmp ishad = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.eq("phone", e.getPhone()).eq("org_code", userBean.getOrgCode()));
if (ishad == null) {
// 员工权限表(未定)
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(userBean.getOrgCode())
.userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// userType2普通员工,status1正常
YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0)
.zjNum(e.getZj()).jobType(jobType).rzTime(rzdate).updateTime(new Date())
.updateMan(userBean.getEmpNum()).syq(syq).sex(sex).jobNum(jobNum).empNum(login.getId())
.orgCode(userBean.getOrgCode()).build();
emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
} else {
e.setError("该手机号码已被使用");
errorList.add(e);
continue;
}
}
}
if (errorList.size() == 0) {
return ResultUtil.success("员工全部导入成功!");
}
return ResultUtil.data(errorList, "导入发生错误人员名单");
}
// 错误选项过滤器
public YgDrsDto errorFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size();
for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) {
a = itDr.next();
}
// 请填写必填项
String name = newList.get(i).getName();
String phone = newList.get(i).getPhone();
String sex = newList.get(i).getSex();
String zj = newList.get(i).getZj();
if (StrUtil.hasBlank(name) || StrUtil.hasBlank(phone) || StrUtil.hasBlank(sex) || StrUtil.hasBlank(zj)) {
d.setError("请填写必填项");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 手机号码格式不对
String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
if (phone.length() != 11) {
d.setError("手机号应为11位数");
errorList.add(d);
itDr.remove();
i++;
continue;
}
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(phone);
boolean isMatch = m.matches();
if (!isMatch) {
d.setError("手机号格式不对");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 手机号码已被使用
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(QyzxEmpLogin::getPhone, phone).eq(QyzxEmpLogin::getOrgId, orgCode).one();
if (login != null) {
d.setError("手机号码已被使用");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 证件号码信息有误
if (zj == null || "".equals(zj)) {
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|"
+ "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
boolean matches = zj.matches(regularExpression);
if (!matches) {
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
try {
if (zj.length() == 18) {
char[] charArray = zj.toCharArray();
// 前十七位加权因子
int[] idCardWi = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
// 这是除以11后,可能产生的11位余数对应的验证码
String[] idCardY = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" };
int sum = 0;
for (Integer j = 0; j < idCardWi.length; j++) {
int current = Integer.parseInt(String.valueOf(charArray[j]));
int count = current * idCardWi[j];
sum += count;
}
char idCardLast = charArray[17];
int idCardMod = sum % 11;
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) {
// System.out.println("成功,接着完善员工的个人信息");
String birth = zj.substring(6, 14);
String birthday = birth.substring(0, 4) + "-" + birth.substring(4, 6) + "-"
+ birth.substring(6, 8);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
} else {
// System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
} else {
// 给15位数的添加生日籍贯
String birth = zj.substring(6, 12);
String birthday = "19" + birth.substring(0, 2) + "-" + birth.substring(2, 4) + "-"
+ birth.substring(4, 6);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
}
} catch (Exception e) {
e.printStackTrace();
// System.out.println("异常:" + zj);
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 部门岗位有误
String oneb = newList.get(i).getOneb();
String twob = newList.get(i).getTwob();
String threeb = newList.get(i).getThreeb();
String fourb = newList.get(i).getFourb();
String gw = newList.get(i).getGw();
String[] bms = { oneb, twob, threeb, fourb };
if (StrUtil.hasBlank(gw) && StrUtil.hasBlank(oneb) && StrUtil.hasBlank(twob) && StrUtil.hasBlank(threeb)
&& StrUtil.hasBlank(fourb)) { // 没填写岗位,通过~ //
} else {
// 填写了部门岗位,办他!
Integer isHaveBmgw = isHavebmgw(bms, gw, orgCode);
if (isHaveBmgw == 0) {
d.setError("部门岗位有误");
errorList.add(d);
itDr.remove();
i++;
continue;
} else {
// 获取到部门岗位id啦!
d.setHavebmid(isHaveBmgw);
}
}
} // for循环完毕!
YgDrsDto tofList = new YgDrsDto(drList, errorList, orgCode);
return tofList;
}
// 选填项过滤器
public YgDrsDto optFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size();
for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) {
a = itDr.next();
}
// for (YgDrjqbDto d : drList) {
String ygnbgh = d.getYgnbgh();
String sex = d.getSex();
String jobType = d.getJobType();
String jobStatus = d.getJobStatus();
String rzTime = d.getRzTime();
String syq = d.getSyq();
String zy = d.getZy();
String address = d.getAddress();
String hjAddress = d.getHkAddress();
String qq = d.getQq();
String weixin = d.getWeixin();
String email = d.getEmail();
String[] bathroom = { ygnbgh, sex, jobType, jobStatus, rzTime, syq, zy, address, hjAddress, qq, weixin,
email };
boolean child = takeshower(bathroom);
if (child == false) {
d.setError("填写内容不要大于50字数");
errorList.add(d);
itDr.remove();
i++;
continue;
}
// 公司内部工号
if (ygnbgh != null && ygnbgh.length() != 0) {
d.setYgnbgh(ygnbgh.trim());
} else {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
String bh = format.format(new Date()) + orgCode + i + System.currentTimeMillis();
d.setYgnbgh(bh);
}
// 男女(最大优化)
d.setSex(YgEnumInterface.sex.isMan(sex));
// 工作性质(最大优化)
d.setJobType(YgEnumInterface.YgJobType.choose(jobType));
// 员工状态(最大优化)
d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus));
// 入职日期(最大优化)
d.setRzTime(
rzTime != null ? YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime)) : null);
// 试用期(最大优化)
d.setSyq(YgEnumInterface.syq.choose(syq));
}
YgDrsDto clear = new YgDrsDto(drList, errorList, orgCode);
return clear;
}
// 浴池,洗去选填项字节大于100的选项
public boolean takeshower(String[] bathroom) {
for (String b : bathroom) {
if (b != null && b.length() > 100) {
return false;
}
}
return true;
}
// 判断是否导入组织部门
public Integer isHavebmgw(String[] bms, String gw, Integer orgCode) {
// 将姓名转为部门岗位对象
List<ZzglBmgwM> gwList = new ArrayList<ZzglBmgwM>();
// 判断有几个部门,且这几个部门是否属实,里面不包括岗位
for (String bm : bms) {
if (!StrUtil.hasBlank(bm)) {
ZzglBmgwM ibm = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, bm)
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).one(); // 选择部门类型0为部门,1为岗位
if (ibm == null) {
return 0;
} // 找不到有相关名称的部门则报错
gwList.add(ibm);
} else {
break;
} }
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(orgCode)
.userType(CommonEnum.U_TYPE_EMP.getType()).status(CommonEnum.U_STS_ON.getType()).build().insert();// usertype2普通员工 status1正常
yme = YgglMainEmp.builder()
.name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime)
.syq(syq).sex(sex).empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId)
.build();
if (yme.insert()) {
listYmp.add(yme);
}else {
insertErrors.add(yme);
} }
Integer qiantao = qiantao(gwList, gw, 0, orgCode);
if (qiantao != 0) {
return qiantao;// 组织部门成立!
} else {
return 0;// 失败
} }
}; JSONObject obj = JSONUtil.createObj();
obj.set("empList", listYmp);
obj.set("phoneRepetitions", phoneRepetitions);
obj.set("idCardRepetitions", idCardRepetitions);
obj.set("insertErrors", insertErrors);
// 判断是否导入组织部门的嵌套并寻找到正确岗位id //listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList());
public Integer qiantao(List<ZzglBmgwM> gwList, String gw, Integer upid, Integer orgCode) { return ResultUtil.data(obj, "导入员工档案成功!");
// 重写
if (upid != 0 && !gwList.get(0).getUpId().equals(upid)) {
return 0;
} }
upid = gwList.get(0).getId();
if (gwList.size() == 1) { /**
ZzglBmgwM igw = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, gw) * 获取导入模板
.eq(ZzglBmgwM::getUpId, upid).eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 1).one(); *
if (igw == null) { * @param
return 0; * @return
} * @throws IOException
return igw.getId(); */
@GetMapping(value = "/impoet_template")
@ApiOperation(value = "8.获取导入模板", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8)
public Result<Object> getImpoetTemplate(HttpServletResponse response) throws IOException {
ImportEmpDto ied = ImportEmpDto.builder()
.name("张三")
.phone("15219671123")
// 证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他
.zjType(0)
.zjNum("445381199611063586")
// 工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘
.jobType(0)
.rzTime("2010-10-10 10:10:10")
// 试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)
.syq(1)
// 性别 0:男;1:女
.sex(0)
.build();
List<ImportEmpDto> listAd = CollUtil.newArrayList(ied);
// 通过工具类创建writer
ExcelWriter writer = ExcelUtil.getWriter(true);
//自定义标题别名
writer.addHeaderAlias("name", "姓名");
writer.addHeaderAlias("phone", "手机号");
writer.addHeaderAlias("sex", "性别");
writer.addHeaderAlias("zjType", "证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他");
writer.addHeaderAlias("zjNum", "证件号");
writer.addHeaderAlias("jobType", "工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘");
writer.addHeaderAlias("syq", "试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)");
writer.addHeaderAlias("rzTime", "入职日期");
// 合并单元格后的标题行,使用默认标题样式
writer.merge(7, "员工导入模板");
writer.setFreezePane(2);
writer.setColumnWidth(1, 15);
writer.setColumnWidth(4, 22);
writer.setColumnWidth(7, 20);
// 一次性写出内容,使用默认样式,强制输出标题
writer.write(listAd, true);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
response.setHeader("Content-Disposition","attachment;filename=8timer_emp_import.xlsx");
ServletOutputStream out = response.getOutputStream();
writer.flush(out, true);
// 关闭writer,释放内存
writer.close();
//此处记得关闭输出Servlet流
IoUtil.close(out);
return ResultUtil.data(null, "获取模板成功");
} }
gwList.remove(0);
Integer q = qiantao(gwList, gw, upid, orgCode);
return q;
};
/** /**
* 导出员工 * 导出员工
...@@ -929,12 +524,11 @@ public class YgglController { ...@@ -929,12 +524,11 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/ygdas") @GetMapping(value = "/ygdas")
@ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "9.导出员工", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 9)
public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) {
int[] jList = { 1, 2, 3 };
List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper) List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list(); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, 1,2,3).list();
return ResultUtil.data(list, "导出员工成功"); return ResultUtil.data(list, "导出员工成功");
} }
...@@ -945,8 +539,8 @@ public class YgglController { ...@@ -945,8 +539,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/jyjlb") @GetMapping(value = "/jyjlb")
@ApiOperation(value = "获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "10.获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 10)
public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) {
List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build() List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build()
.selectList(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -956,8 +550,8 @@ public class YgglController { ...@@ -956,8 +550,8 @@ public class YgglController {
// 获取员工教育经历表 // 获取员工教育经历表
@GetMapping(value = "/jyjlb/{empNum}") @GetMapping(value = "/jyjlb/{empNum}")
@ApiOperation(value = "获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "11.获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 11)
public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaJyjlb> ygglAttaJyjlbs = YgglAttaJyjlb.builder().build().selectList( List<YgglAttaJyjlb> ygglAttaJyjlbs = YgglAttaJyjlb.builder().build().selectList(
new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -971,8 +565,8 @@ public class YgglController { ...@@ -971,8 +565,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/jyjlb") @PostMapping(value = "/jyjlb")
@ApiOperation(value = "添加/修改员工教育经历表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "12.添加/修改员工教育经历表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 12)
public Result<YgglAttaJyjlb> addjyjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaJyjlb ygglAttaJyjlb) { public Result<YgglAttaJyjlb> addjyjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaJyjlb ygglAttaJyjlb) {
ygglAttaJyjlb.setEmpNum(ygglAttaJyjlb.getEmpNum()); ygglAttaJyjlb.setEmpNum(ygglAttaJyjlb.getEmpNum());
ygglAttaJyjlb.setOrgCode(userBean.getOrgCode()); ygglAttaJyjlb.setOrgCode(userBean.getOrgCode());
...@@ -987,8 +581,8 @@ public class YgglController { ...@@ -987,8 +581,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/jyjlb/{id}") @DeleteMapping(value = "/jyjlb/{id}")
@ApiOperation(value = "删除员工教育经历表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "13.删除员工教育经历表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 13)
public Result<Boolean> deljyjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> deljyjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaJyjlb.builder().build() return ResultUtil.data(YgglAttaJyjlb.builder().build()
...@@ -1002,8 +596,8 @@ public class YgglController { ...@@ -1002,8 +596,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/pxjlxxb") @GetMapping(value = "/pxjlxxb")
@ApiOperation(value = "获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "14.获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 14)
public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) {
List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build() List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build()
.selectList(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1013,8 +607,8 @@ public class YgglController { ...@@ -1013,8 +607,8 @@ public class YgglController {
// 获取员工培训经历信息表 // 获取员工培训经历信息表
@GetMapping(value = "/pxjlxxb/{empNum}") @GetMapping(value = "/pxjlxxb/{empNum}")
@ApiOperation(value = "获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "15.获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 15)
public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build().selectList( List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build().selectList(
new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1028,8 +622,8 @@ public class YgglController { ...@@ -1028,8 +622,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/pxjlxxb") @PostMapping(value = "/pxjlxxb")
@ApiOperation(value = "添加/修改员工培训经历信息表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "16.添加/修改员工培训经历信息表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 16)
public Result<YgglAttaPxjlxxb> addpxjlxxb(@CurrentUser UserBean userBean, public Result<YgglAttaPxjlxxb> addpxjlxxb(@CurrentUser UserBean userBean,
@RequestBody YgglAttaPxjlxxb ygglAttaPxjlxxb) { @RequestBody YgglAttaPxjlxxb ygglAttaPxjlxxb) {
ygglAttaPxjlxxb.setEmpNum(ygglAttaPxjlxxb.getEmpNum()); ygglAttaPxjlxxb.setEmpNum(ygglAttaPxjlxxb.getEmpNum());
...@@ -1045,8 +639,8 @@ public class YgglController { ...@@ -1045,8 +639,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/pxjlxxb/{id}") @DeleteMapping(value = "/pxjlxxb/{id}")
@ApiOperation(value = "删除员工培训经历信息表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "17.删除员工培训经历信息表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 16) @ApiOperationSupport(order = 17)
public Result<Boolean> delpxjlxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delpxjlxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaPxjlxxb.builder().build() return ResultUtil.data(YgglAttaPxjlxxb.builder().build()
...@@ -1060,8 +654,8 @@ public class YgglController { ...@@ -1060,8 +654,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/gzjlb") @GetMapping(value = "/gzjlb")
@ApiOperation(value = "获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "18.获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 18)
public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) {
List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build() List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build()
.selectList(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1071,8 +665,8 @@ public class YgglController { ...@@ -1071,8 +665,8 @@ public class YgglController {
// 获取员工工作经历表 // 获取员工工作经历表
@GetMapping(value = "/gzjlb/{empNum}") @GetMapping(value = "/gzjlb/{empNum}")
@ApiOperation(value = "获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "19.获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 19)
public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build().selectList( List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build().selectList(
new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1086,8 +680,8 @@ public class YgglController { ...@@ -1086,8 +680,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/gzjlb") @PostMapping(value = "/gzjlb")
@ApiOperation(value = "添加/修改员工工作经历表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "20.添加/修改员工工作经历表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 19) @ApiOperationSupport(order = 20)
public Result<YgglAttaGzjlb> addgzjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaGzjlb ygglAttaGzjlb) { public Result<YgglAttaGzjlb> addgzjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaGzjlb ygglAttaGzjlb) {
ygglAttaGzjlb.setEmpNum(ygglAttaGzjlb.getEmpNum()); ygglAttaGzjlb.setEmpNum(ygglAttaGzjlb.getEmpNum());
ygglAttaGzjlb.setOrgCode(userBean.getOrgCode()); ygglAttaGzjlb.setOrgCode(userBean.getOrgCode());
...@@ -1102,8 +696,8 @@ public class YgglController { ...@@ -1102,8 +696,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/gzjlb/{id}") @DeleteMapping(value = "/gzjlb/{id}")
@ApiOperation(value = "删除员工工作经历表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "21.删除员工工作经历表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 21)
public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaGzjlb.builder().build() return ResultUtil.data(YgglAttaGzjlb.builder().build()
...@@ -1117,8 +711,8 @@ public class YgglController { ...@@ -1117,8 +711,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/zcxxb") @GetMapping(value = "/zcxxb")
@ApiOperation(value = "获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "22.获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 21) @ApiOperationSupport(order = 22)
public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) {
List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build() List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build()
.selectList(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1128,8 +722,8 @@ public class YgglController { ...@@ -1128,8 +722,8 @@ public class YgglController {
// 获取员工职称信息表 // 获取员工职称信息表
@GetMapping(value = "/zcxxb/{empNum}") @GetMapping(value = "/zcxxb/{empNum}")
@ApiOperation(value = "获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "23.获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 22) @ApiOperationSupport(order = 23)
public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build().selectList( List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build().selectList(
new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1143,8 +737,8 @@ public class YgglController { ...@@ -1143,8 +737,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/zcxxb") @PostMapping(value = "/zcxxb")
@ApiOperation(value = "添加/修改员工职称信息表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "24.添加/修改员工职称信息表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 23) @ApiOperationSupport(order = 24)
public Result<YgglAttaZcxxb> addzcxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaZcxxb ygglAttaZcxxb) { public Result<YgglAttaZcxxb> addzcxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaZcxxb ygglAttaZcxxb) {
ygglAttaZcxxb.setEmpNum(ygglAttaZcxxb.getEmpNum()); ygglAttaZcxxb.setEmpNum(ygglAttaZcxxb.getEmpNum());
ygglAttaZcxxb.setOrgCode(userBean.getOrgCode()); ygglAttaZcxxb.setOrgCode(userBean.getOrgCode());
...@@ -1159,8 +753,8 @@ public class YgglController { ...@@ -1159,8 +753,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/zcxxb/{id}") @DeleteMapping(value = "/zcxxb/{id}")
@ApiOperation(value = "删除员工职称信息表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "25.删除员工职称信息表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 24) @ApiOperationSupport(order = 25)
public Result<Boolean> delzcxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delzcxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaZcxxb.builder().build() return ResultUtil.data(YgglAttaZcxxb.builder().build()
...@@ -1174,8 +768,8 @@ public class YgglController { ...@@ -1174,8 +768,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/zszjb") @GetMapping(value = "/zszjb")
@ApiOperation(value = "获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "26.获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 25) @ApiOperationSupport(order = 26)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build() List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build()
.selectList(new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1185,8 +779,8 @@ public class YgglController { ...@@ -1185,8 +779,8 @@ public class YgglController {
// 获取员工证书证件表 // 获取员工证书证件表
@GetMapping(value = "/zszjb/{empNum}") @GetMapping(value = "/zszjb/{empNum}")
@ApiOperation(value = "获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "27.获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 26) @ApiOperationSupport(order = 27)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList( List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList(
new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1200,8 +794,8 @@ public class YgglController { ...@@ -1200,8 +794,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/zszjb") @PostMapping(value = "/zszjb")
@ApiOperation(value = "添加/修改员工证书证件表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "28.添加/修改员工证书证件表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 27) @ApiOperationSupport(order = 28)
public Result<YgglAttaZszjb> addzszjb(@CurrentUser UserBean userBean, @RequestBody YgglAttaZszjb ygglAttaZszjb) { public Result<YgglAttaZszjb> addzszjb(@CurrentUser UserBean userBean, @RequestBody YgglAttaZszjb ygglAttaZszjb) {
ygglAttaZszjb.setEmpNum(ygglAttaZszjb.getEmpNum()); ygglAttaZszjb.setEmpNum(ygglAttaZszjb.getEmpNum());
ygglAttaZszjb.setOrgCode(userBean.getOrgCode()); ygglAttaZszjb.setOrgCode(userBean.getOrgCode());
...@@ -1216,8 +810,8 @@ public class YgglController { ...@@ -1216,8 +810,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/zszjb/{id}") @DeleteMapping(value = "/zszjb/{id}")
@ApiOperation(value = "删除员工证书证件表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "29.删除员工证书证件表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 28) @ApiOperationSupport(order = 29)
public Result<Boolean> delzszjb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delzszjb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaZszjb.builder().build() return ResultUtil.data(YgglAttaZszjb.builder().build()
...@@ -1231,8 +825,8 @@ public class YgglController { ...@@ -1231,8 +825,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/lxxxb") @GetMapping(value = "/lxxxb")
@ApiOperation(value = "获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "30.获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 29) @ApiOperationSupport(order = 30)
public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) {
List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build() List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build()
.selectList(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1242,8 +836,8 @@ public class YgglController { ...@@ -1242,8 +836,8 @@ public class YgglController {
// 获取员工联系信息表 // 获取员工联系信息表
@GetMapping(value = "/lxxxb/{empNum}") @GetMapping(value = "/lxxxb/{empNum}")
@ApiOperation(value = "获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "31.获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 31)
public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build().selectList( List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build().selectList(
new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1257,8 +851,8 @@ public class YgglController { ...@@ -1257,8 +851,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/lxxxb") @PostMapping(value = "/lxxxb")
@ApiOperation(value = "添加/修改员工联系信息表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "32.添加/修改员工联系信息表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 31) @ApiOperationSupport(order = 32)
public Result<YgglAttaLxxxb> addlxxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaLxxxb ygglAttaLxxxb) { public Result<YgglAttaLxxxb> addlxxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaLxxxb ygglAttaLxxxb) {
ygglAttaLxxxb.setEmpNum(ygglAttaLxxxb.getEmpNum()); ygglAttaLxxxb.setEmpNum(ygglAttaLxxxb.getEmpNum());
ygglAttaLxxxb.setOrgCode(userBean.getOrgCode()); ygglAttaLxxxb.setOrgCode(userBean.getOrgCode());
...@@ -1273,8 +867,8 @@ public class YgglController { ...@@ -1273,8 +867,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/lxxxb/{id}") @DeleteMapping(value = "/lxxxb/{id}")
@ApiOperation(value = "删除员工联系信息表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "33.删除员工联系信息表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 32) @ApiOperationSupport(order = 33)
public Result<Boolean> dellxxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> dellxxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaLxxxb.builder().build() return ResultUtil.data(YgglAttaLxxxb.builder().build()
...@@ -1288,8 +882,8 @@ public class YgglController { ...@@ -1288,8 +882,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/jjlxr") @GetMapping(value = "/jjlxr")
@ApiOperation(value = "获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "34.获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 33) @ApiOperationSupport(order = 34)
public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) {
List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build() List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build()
.selectList(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1299,8 +893,8 @@ public class YgglController { ...@@ -1299,8 +893,8 @@ public class YgglController {
// 获取员工紧急联系人表 // 获取员工紧急联系人表
@GetMapping(value = "/jjlxr/{empNum}") @GetMapping(value = "/jjlxr/{empNum}")
@ApiOperation(value = "获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "35.获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 34) @ApiOperationSupport(order = 35)
public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build().selectList( List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build().selectList(
new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1314,8 +908,8 @@ public class YgglController { ...@@ -1314,8 +908,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/jjlxr") @PostMapping(value = "/jjlxr")
@ApiOperation(value = "添加/修改员工紧急联系人表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "36.添加/修改员工紧急联系人表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 35) @ApiOperationSupport(order = 36)
public Result<YgglAttaJjlxr> addjjlxr(@CurrentUser UserBean userBean, @RequestBody YgglAttaJjlxr ygglAttaJjlxr) { public Result<YgglAttaJjlxr> addjjlxr(@CurrentUser UserBean userBean, @RequestBody YgglAttaJjlxr ygglAttaJjlxr) {
ygglAttaJjlxr.setEmpNum(ygglAttaJjlxr.getEmpNum()); ygglAttaJjlxr.setEmpNum(ygglAttaJjlxr.getEmpNum());
ygglAttaJjlxr.setOrgCode(userBean.getOrgCode()); ygglAttaJjlxr.setOrgCode(userBean.getOrgCode());
...@@ -1330,8 +924,8 @@ public class YgglController { ...@@ -1330,8 +924,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/jjlxr/{id}") @DeleteMapping(value = "/jjlxr/{id}")
@ApiOperation(value = "删除员工紧急联系人表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "37.删除员工紧急联系人表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 36) @ApiOperationSupport(order = 37)
public Result<Boolean> deljjlxr(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> deljjlxr(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaJjlxr.builder().build() return ResultUtil.data(YgglAttaJjlxr.builder().build()
...@@ -1346,8 +940,8 @@ public class YgglController { ...@@ -1346,8 +940,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/gzk") @GetMapping(value = "/gzk")
@ApiOperation(value = "获取员工工资卡信息", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "38.获取员工工资卡信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 37) @ApiOperationSupport(order = 38)
public Result<List<YgglAttaGzk>> selectgzk(@CurrentUser UserBean userBean) { public Result<List<YgglAttaGzk>> selectgzk(@CurrentUser UserBean userBean) {
List<YgglAttaGzk> ygglAttaGzks = YgglAttaGzk.builder().build().selectList(new QueryWrapper<YgglAttaGzk>() List<YgglAttaGzk> ygglAttaGzks = YgglAttaGzk.builder().build().selectList(new QueryWrapper<YgglAttaGzk>()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
...@@ -1356,8 +950,8 @@ public class YgglController { ...@@ -1356,8 +950,8 @@ public class YgglController {
// 获取工资卡信息 // 获取工资卡信息
@GetMapping(value = "/gzk/{empNum}") @GetMapping(value = "/gzk/{empNum}")
@ApiOperation(value = "获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "39.获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 38) @ApiOperationSupport(order = 39)
public Result<List<YgglAttaGzk>> selectgzk(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaGzk>> selectgzk(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaGzk> ygglAttaGzks = YgglAttaGzk.builder().build().selectList( List<YgglAttaGzk> ygglAttaGzks = YgglAttaGzk.builder().build().selectList(
new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1371,8 +965,8 @@ public class YgglController { ...@@ -1371,8 +965,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/gzk") @PostMapping(value = "/gzk")
@ApiOperation(value = "添加/修改工资卡信息", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "40.添加/修改工资卡信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 39) @ApiOperationSupport(order = 40)
public Result<YgglAttaGzk> addgzk(@CurrentUser UserBean userBean, @RequestBody YgglAttaGzk ygglAttaGzk) { public Result<YgglAttaGzk> addgzk(@CurrentUser UserBean userBean, @RequestBody YgglAttaGzk ygglAttaGzk) {
ygglAttaGzk.setEmpNum(ygglAttaGzk.getEmpNum()); ygglAttaGzk.setEmpNum(ygglAttaGzk.getEmpNum());
ygglAttaGzk.setOrgCode(userBean.getOrgCode()); ygglAttaGzk.setOrgCode(userBean.getOrgCode());
...@@ -1387,8 +981,8 @@ public class YgglController { ...@@ -1387,8 +981,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/gzk/{id}") @DeleteMapping(value = "/gzk/{id}")
@ApiOperation(value = "删除工资卡信息", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "41.删除工资卡信息", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 41)
public Result<Boolean> delgzk(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delgzk(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaGzk.builder().build() return ResultUtil.data(YgglAttaGzk.builder().build()
...@@ -1402,8 +996,8 @@ public class YgglController { ...@@ -1402,8 +996,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/htxxb") @GetMapping(value = "/htxxb")
@ApiOperation(value = "获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "42.获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 41) @ApiOperationSupport(order = 42)
public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) {
List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build() List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build()
.selectList(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1413,8 +1007,8 @@ public class YgglController { ...@@ -1413,8 +1007,8 @@ public class YgglController {
// 获取员工合同信息表 // 获取员工合同信息表
@GetMapping(value = "/htxxb/{empNum}") @GetMapping(value = "/htxxb/{empNum}")
@ApiOperation(value = "获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "43.获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 42) @ApiOperationSupport(order = 43)
public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build().selectList( List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build().selectList(
new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1428,8 +1022,8 @@ public class YgglController { ...@@ -1428,8 +1022,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/htxxb") @PostMapping(value = "/htxxb")
@ApiOperation(value = "添加/修改员工合同信息表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "44.添加/修改员工合同信息表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 43) @ApiOperationSupport(order = 44)
public Result<YgglAttaHtxxb> addhtxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaHtxxb ygglAttaHtxxb) { public Result<YgglAttaHtxxb> addhtxxb(@CurrentUser UserBean userBean, @RequestBody YgglAttaHtxxb ygglAttaHtxxb) {
ygglAttaHtxxb.setEmpNum(ygglAttaHtxxb.getEmpNum()); ygglAttaHtxxb.setEmpNum(ygglAttaHtxxb.getEmpNum());
ygglAttaHtxxb.setOrgCode(userBean.getOrgCode()); ygglAttaHtxxb.setOrgCode(userBean.getOrgCode());
...@@ -1444,8 +1038,8 @@ public class YgglController { ...@@ -1444,8 +1038,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/htxxb/{id}") @DeleteMapping(value = "/htxxb/{id}")
@ApiOperation(value = "删除员工合同信息表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "45.删除员工合同信息表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 44) @ApiOperationSupport(order = 45)
public Result<Boolean> delhtxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delhtxxb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaHtxxb.builder().build() return ResultUtil.data(YgglAttaHtxxb.builder().build()
...@@ -1459,8 +1053,8 @@ public class YgglController { ...@@ -1459,8 +1053,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/clfjb") @GetMapping(value = "/clfjb")
@ApiOperation(value = "获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "46.获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 45) @ApiOperationSupport(order = 46)
public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) {
List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build() List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build()
.selectList(new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1470,8 +1064,8 @@ public class YgglController { ...@@ -1470,8 +1064,8 @@ public class YgglController {
// 获取员工材料附件表 // 获取员工材料附件表
@GetMapping(value = "/clfjb/{empNum}") @GetMapping(value = "/clfjb/{empNum}")
@ApiOperation(value = "获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "47.获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 46) @ApiOperationSupport(order = 47)
public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build().selectList( List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build().selectList(
new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1485,8 +1079,8 @@ public class YgglController { ...@@ -1485,8 +1079,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/clfjb") @PostMapping(value = "/clfjb")
@ApiOperation(value = "添加/修改员工材料附件表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "48.添加/修改员工材料附件表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 47) @ApiOperationSupport(order = 48)
public Result<YgglAttaClfjb> addclfjb(@CurrentUser UserBean userBean, @RequestBody YgglAttaClfjb ygglAttaClfjb) { public Result<YgglAttaClfjb> addclfjb(@CurrentUser UserBean userBean, @RequestBody YgglAttaClfjb ygglAttaClfjb) {
ygglAttaClfjb.setOrgCode(userBean.getOrgCode()); ygglAttaClfjb.setOrgCode(userBean.getOrgCode());
ygglAttaClfjb.setEmpNum(ygglAttaClfjb.getEmpNum()); ygglAttaClfjb.setEmpNum(ygglAttaClfjb.getEmpNum());
...@@ -1501,8 +1095,8 @@ public class YgglController { ...@@ -1501,8 +1095,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/clfjb/{id}") @DeleteMapping(value = "/clfjb/{id}")
@ApiOperation(value = "删除员工材料附件表", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "49.删除员工材料附件表", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 48) @ApiOperationSupport(order = 49)
public Result<Boolean> delclfjb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delclfjb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaClfjb.builder().build() return ResultUtil.data(YgglAttaClfjb.builder().build()
...@@ -1516,8 +1110,8 @@ public class YgglController { ...@@ -1516,8 +1110,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/czjlb") @GetMapping(value = "/czjlb")
@ApiOperation(value = "获取成长记录表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "50.获取成长记录表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 49) @ApiOperationSupport(order = 50)
public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) {
List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build() List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build()
.selectList(new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", .selectList(new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
...@@ -1527,8 +1121,8 @@ public class YgglController { ...@@ -1527,8 +1121,8 @@ public class YgglController {
// 获取成长记录表 // 获取成长记录表
@GetMapping(value = "/czjlb/{empNum}") @GetMapping(value = "/czjlb/{empNum}")
@ApiOperation(value = "获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "51.获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 51)
public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build().selectList( List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build().selectList(
new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
...@@ -1542,8 +1136,8 @@ public class YgglController { ...@@ -1542,8 +1136,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/czjlb") @PostMapping(value = "/czjlb")
@ApiOperation(value = "添加/修改成长记录表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "52.添加/修改成长记录表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 51) @ApiOperationSupport(order = 52)
public Result<YgglAttaCzjlb> addczjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaCzjlb ygglAttaCzjlb) { public Result<YgglAttaCzjlb> addczjlb(@CurrentUser UserBean userBean, @RequestBody YgglAttaCzjlb ygglAttaCzjlb) {
ygglAttaCzjlb.setEmpNum(ygglAttaCzjlb.getEmpNum()); ygglAttaCzjlb.setEmpNum(ygglAttaCzjlb.getEmpNum());
ygglAttaCzjlb.setOrgCode(userBean.getOrgCode()); ygglAttaCzjlb.setOrgCode(userBean.getOrgCode());
...@@ -1558,8 +1152,8 @@ public class YgglController { ...@@ -1558,8 +1152,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/lzb/{empNum}") @GetMapping(value = "/lzb/{empNum}")
@ApiOperation(value = "获取单个离职员工信息(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "53.获取单个离职员工信息(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 52) @ApiOperationSupport(order = 53)
public Result<YgglMainLzb> selectlzb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<YgglMainLzb> selectlzb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
YgglMainLzb lzyg = new LambdaQueryChainWrapper<YgglMainLzb>(ygglMainLzbMapper) YgglMainLzb lzyg = new LambdaQueryChainWrapper<YgglMainLzb>(ygglMainLzbMapper)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one(); .eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one();
...@@ -1573,8 +1167,8 @@ public class YgglController { ...@@ -1573,8 +1167,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/ygzz") @PostMapping(value = "/ygzz")
@ApiOperation(value = "员工转正", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "54.员工转正", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 53) @ApiOperationSupport(order = 54)
public Result<Void> ygzz(@CurrentUser UserBean userBean, @RequestBody YgzzDto ygzzDto) { public Result<Void> ygzz(@CurrentUser UserBean userBean, @RequestBody YgzzDto ygzzDto) {
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", ygzzDto.getEmpNum()); updateWrapper.eq("emp_num", ygzzDto.getEmpNum());
...@@ -1590,8 +1184,8 @@ public class YgglController { ...@@ -1590,8 +1184,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/addlzjh") @PostMapping(value = "/addlzjh")
@ApiOperation(value = "添加离职计划", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "55.添加离职计划", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 54) @ApiOperationSupport(order = 55)
public Result<YgglMainLzb> addjhlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) { public Result<YgglMainLzb> addjhlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
Integer empNum = lzygQueryDto.getEmpNum(); Integer empNum = lzygQueryDto.getEmpNum();
...@@ -1601,14 +1195,14 @@ public class YgglController { ...@@ -1601,14 +1195,14 @@ public class YgglController {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb); BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb,"before_leaving_sts");
ygglMainLzb.insert(); ygglMainLzb.insert();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", empNum); updateWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>(); UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>();
updateWrapper1.eq("emp_num", empNum); updateWrapper1.eq("emp_num", empNum);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()) YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).beforeLeavingSts(ygglMainEmp.getJobStatus())
.build().update(updateWrapper); .build().update(updateWrapper);
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime()) YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1); .lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1);
...@@ -1623,8 +1217,8 @@ public class YgglController { ...@@ -1623,8 +1217,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/qrlz") @PostMapping(value = "/qrlz")
@ApiOperation(value = "确认离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "56.确认离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 55) @ApiOperationSupport(order = 56)
public Result<Void> addlzb(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) { public Result<Void> addlzb(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
Integer empNum = lzygQueryDto.getEmpNum(); Integer empNum = lzygQueryDto.getEmpNum();
// 删除员工档案表 // 删除员工档案表
...@@ -1651,12 +1245,19 @@ public class YgglController { ...@@ -1651,12 +1245,19 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/fqlz") @PostMapping(value = "/fqlz")
@ApiOperation(value = "放弃离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "57.放弃离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 56) @ApiOperationSupport(order = 57)
public Result<Void> fqlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) { public Result<Void> fqlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(
new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, lzygQueryDto.getEmpNum())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", lzygQueryDto.getEmpNum()); updateWrapper.eq("emp_num", lzygQueryDto.getEmpNum());
YgglMainEmp.builder().jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build().update(updateWrapper); YgglMainEmp.builder().jobStatus(ygglMainEmp.getBeforeLeavingSts()).build().update(updateWrapper);
QueryWrapper<YgglMainLzb> queryWrapper = new QueryWrapper<YgglMainLzb>(); QueryWrapper<YgglMainLzb> queryWrapper = new QueryWrapper<YgglMainLzb>();
queryWrapper.eq("emp_num", lzygQueryDto.getEmpNum()); queryWrapper.eq("emp_num", lzygQueryDto.getEmpNum());
// 删除离职表 // 删除离职表
...@@ -1666,8 +1267,8 @@ public class YgglController { ...@@ -1666,8 +1267,8 @@ public class YgglController {
} }
@PostMapping(value = "/tzlzyy") @PostMapping(value = "/tzlzyy")
@ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "58.调整离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 56) @ApiOperationSupport(order = 58)
public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) { public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) {
if (ygglMainLzb.getEmpNum() != null) { if (ygglMainLzb.getEmpNum() != null) {
...@@ -1687,8 +1288,8 @@ public class YgglController { ...@@ -1687,8 +1288,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/querylzyg") @PostMapping(value = "/querylzyg")
@ApiOperation(value = "查询离职员工列表", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "59.查询离职员工列表", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 57) @ApiOperationSupport(order = 59)
public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) { public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) {
lzygQueryDto.setOrgCode(userBean.getOrgCode()); lzygQueryDto.setOrgCode(userBean.getOrgCode());
...@@ -1706,8 +1307,8 @@ public class YgglController { ...@@ -1706,8 +1307,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/mz/{id}") @PostMapping(value = "/mz/{id}")
@ApiOperation(value = "展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "60.展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 59) @ApiOperationSupport(order = 60)
public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) {
if (id == null || id == 0) { if (id == null || id == 0) {
List<YgmzDto> allmz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list(); List<YgmzDto> allmz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list();
...@@ -1727,8 +1328,8 @@ public class YgglController { ...@@ -1727,8 +1328,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/native_place") @GetMapping(value = "/native_place")
@ApiOperation(value = "籍贯树", httpMethod = "GET", notes = "籍贯树") @ApiOperation(value = "61.籍贯树", httpMethod = "GET", notes = "籍贯树")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 61)
public Result<List<CommonArea>> selectNativePlace() { public Result<List<CommonArea>> selectNativePlace() {
List<CommonArea> listCommonArea = commonAreaMapper.AllAreaForTree(); List<CommonArea> listCommonArea = commonAreaMapper.AllAreaForTree();
...@@ -1743,7 +1344,7 @@ public class YgglController { ...@@ -1743,7 +1344,7 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/queryemp") @GetMapping(value = "/queryemp")
@ApiOperation(value = "查询员工列表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "62.查询员工列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 62) @ApiOperationSupport(order = 62)
public Result<List<YgQueryDto>> queryEmpMessage(@CurrentUser UserBean userBean) { public Result<List<YgQueryDto>> queryEmpMessage(@CurrentUser UserBean userBean) {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean.getOrgCode()); List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean.getOrgCode());
...@@ -1762,7 +1363,7 @@ public class YgglController { ...@@ -1762,7 +1363,7 @@ public class YgglController {
* @return 成功信息 * @return 成功信息
*/ */
@GetMapping("/yggl") @GetMapping("/yggl")
@ApiOperation(value = "获取员工管理统计图信息", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "63.获取员工管理统计图信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 63) @ApiOperationSupport(order = 63)
public Result<Map<String, Object>> queryYgglCartogram(@CurrentUser UserBean userBean) { public Result<Map<String, Object>> queryYgglCartogram(@CurrentUser UserBean userBean) {
...@@ -1805,8 +1406,8 @@ public class YgglController { ...@@ -1805,8 +1406,8 @@ public class YgglController {
* @return 成功信息(weng) * @return 成功信息(weng)
*/ */
@GetMapping("/Cartogram") @GetMapping("/Cartogram")
@ApiOperation(value = "获取员工管理统计图信息", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "64.获取员工管理统计图信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 99) @ApiOperationSupport(order = 64)
public Result<YgCartogramDto> ygCartogram(@CurrentUser UserBean userBean) { public Result<YgCartogramDto> ygCartogram(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
List<YgbintuDto> bintu = ygglMainEmpMapper.rsybp(orgCode); List<YgbintuDto> bintu = ygglMainEmpMapper.rsybp(orgCode);
...@@ -1894,8 +1495,8 @@ public class YgglController { ...@@ -1894,8 +1495,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/ygsbgjj") @GetMapping(value = "/ygsbgjj")
@ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "65.获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 64) @ApiOperationSupport(order = 65)
public Result<List<YgglAttaSbgjj>> selectygsbgjj(@CurrentUser UserBean userBean) { public Result<List<YgglAttaSbgjj>> selectygsbgjj(@CurrentUser UserBean userBean) {
List<YgglAttaSbgjj> ygglAttaSbgjj = YgglAttaSbgjj.builder().build().selectList(new QueryWrapper<YgglAttaSbgjj>() List<YgglAttaSbgjj> ygglAttaSbgjj = YgglAttaSbgjj.builder().build().selectList(new QueryWrapper<YgglAttaSbgjj>()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
...@@ -1909,8 +1510,8 @@ public class YgglController { ...@@ -1909,8 +1510,8 @@ public class YgglController {
* @return * @return
*/ */
@GetMapping(value = "/ygsbgjj/{empNum}") @GetMapping(value = "/ygsbgjj/{empNum}")
@ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "66.获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 65) @ApiOperationSupport(order = 66)
public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build() YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build()
...@@ -1926,8 +1527,8 @@ public class YgglController { ...@@ -1926,8 +1527,8 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/ygsbgjj") @PostMapping(value = "/ygsbgjj")
@ApiOperation(value = "添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "67.添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 66) @ApiOperationSupport(order = 67)
public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean, @RequestBody YgglAttaSbgjj ygglAttaSbgjj) { public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean, @RequestBody YgglAttaSbgjj ygglAttaSbgjj) {
Integer empNum = ygglAttaSbgjj.getEmpNum(); Integer empNum = ygglAttaSbgjj.getEmpNum();
if (empNum == null) { if (empNum == null) {
...@@ -1951,8 +1552,8 @@ public class YgglController { ...@@ -1951,8 +1552,8 @@ public class YgglController {
* @return * @return
*/ */
@DeleteMapping(value = "/ygsbgjj/{id}") @DeleteMapping(value = "/ygsbgjj/{id}")
@ApiOperation(value = "删除员工社保公积金", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "68.删除员工社保公积金", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 67) @ApiOperationSupport(order = 68)
public Result<Boolean> delygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaSbgjj.builder().build() return ResultUtil.data(YgglAttaSbgjj.builder().build()
...@@ -1985,4 +1586,135 @@ public class YgglController { ...@@ -1985,4 +1586,135 @@ public class YgglController {
return ResultUtil.data(treeNodes, "获取成功"); return ResultUtil.data(treeNodes, "获取成功");
} }
/**
* 获取登录人的相关信息
*
* @param
* @return
*/
@GetMapping(value = "/loginmessage")
@ApiOperation(value = "69.获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 69)
public Result<LoginInfoDto> loginmessage(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
LoginInfoDto loginInfo = LoginInfoDto.builder().build();
YgglMainEmp ygglMainEmp = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.select(YgglMainEmp::getBmgwId, YgglMainEmp::getName, YgglMainEmp::getRzTime, YgglMainEmp::getZzTime,
YgglMainEmp::getEmpNum)
.eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, orgCode).one();
if (ygglMainEmp != null) {
Integer gw = ygglMainEmp.getBmgwId();
ZzglBmgwM gwObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.select(ZzglBmgwM::getUpId, ZzglBmgwM::getName).eq(ZzglBmgwM::getId, gw)
.eq(ZzglBmgwM::getOrgCode, orgCode).one();
if (gwObj != null) {
ZzglBmgwM bmObj = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.select(ZzglBmgwM::getId, ZzglBmgwM::getName).eq(ZzglBmgwM::getId, gwObj.getUpId())
.eq(ZzglBmgwM::getOrgCode, orgCode).one();
loginInfo.setBmId(bmObj != null ? bmObj.getId() : null);
loginInfo.setBmName(bmObj != null ? bmObj.getName() : null);
}
loginInfo.setEmpNum(ygglMainEmp.getEmpNum());
loginInfo.setName(ygglMainEmp.getName());
loginInfo.setGwId(gw);
loginInfo.setGwName(gwObj != null ? gwObj.getName() : "");
loginInfo.setEntryTime(ygglMainEmp.getRzTime());
loginInfo.setRegularTime(ygglMainEmp.getRzTime());
}
return ResultUtil.data(loginInfo, "操作成功!");
}
/**
* 获取登录人和上级主管的empNum和名称
*
* @param
* @return
*/
@GetMapping(value = "/loginerChargers")
@ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70)
public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>();
Integer empNum = userBean.getEmpNum();
Integer gw = empNumConfirm(orgCode, empNum).getBmgwId();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM.getUpDepts(list, gw, zzglBmgwMs);
List<Integer> leaderList = new ArrayList<Integer>();
for (Integer zzglId : list) {
for (ZzglBmgwM zzglBmgwM : zzglBmgwMs) {
if (zzglId.equals(zzglBmgwM.getId()) && zzglBmgwM.getLeader() != null) {
leaderList.add(zzglBmgwM.getLeader());
}
}
}
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for (YgglMainEmp m : ygglMainEmps) {
if (m.getHeadUrl() == null) {
m.setHeadUrl("");
}
loginerChargeDtos.add(new LoginerChargeDto(m.getEmpNum(), m.getName(), m.getHeadUrl()));
}
Collections.reverse(loginerChargeDtos);
return ResultUtil.data(loginerChargeDtos, "获取上级部门的部门id");
}
// 根据传来的empNum获取该人员信息,没有则传全部
public List<YgglMainEmp> empNumsConfirm(Integer orgCode, List<Integer> empNumList) {
List<YgglMainEmp> all = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, orgCode).list();
List<YgglMainEmp> ygglMainEmps = new ArrayList<YgglMainEmp>();
if (empNumList.size() != 0) {
for (Integer empNum : empNumList) {
all.stream().filter(item -> empNum.equals(item.getEmpNum())).forEach(action -> {
ygglMainEmps.add(action);
});
}
} else {
ygglMainEmps.addAll(all);
}
return ygglMainEmps;
}
// 根据传来的empNum获取该人员信息
public YgglMainEmp empNumConfirm(Integer orgCode, Integer empNum) {
YgglMainEmp one = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, orgCode).eq(YgglMainEmp::getEmpNum, empNum).one();
return one;
}
/**
* 获取用户头像
*
* @param
* @return
*/
@PostMapping(value = "/headphotos")
@ApiOperation(value = "71.获取用户头像", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 71)
public Result<List<YgglMainEmp>> headphotos(@CurrentUser UserBean userBean, @RequestBody List<Integer> empNumList) {
if (empNumList.size() == 0) {
return ResultUtil.error("请输入empNum数组");
}
List<YgglMainEmp> yglList = YgglMainEmp.builder().build()
.selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.in(YgglMainEmp::getEmpNum, empNumList)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getHeadUrl));
for (YgglMainEmp yg : yglList) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
}
}
return ResultUtil.data(yglList, "获取用户头像组成功");
}
} }
...@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0") @ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType; private Integer jobType;
@NotNull(message = ValidationMsg.NOTNULL) // @NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime; private Date rzTime;
...@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="性别 0:男;1:女",example="0") @ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex; private Integer sex;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="部门岗位id",example="0") @ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId; private Integer bmgwId;
......
package cn.timer.api.dto.yggl;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import cn.timer.api.config.exception.Regular;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 员工导入模板
* @author Tang
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImportEmpDto implements Serializable{
private static final long serialVersionUID = -1230023773946170942L;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="员工姓名",example="华仔")
private String name;
@NotBlank(message = ValidationMsg.NOTBLANK)
@Pattern(regexp=Regular.PHONE,message = ValidationMsg.PATTERN)
@ApiModelProperty(value="手机号",example="101")
private String phone;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="0")
private Integer zjType;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private String rzTime;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="0")
private Integer syq;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex;
}
...@@ -22,6 +22,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM; ...@@ -22,6 +22,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecuteRecordSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecuteRecordSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.dto.spmk.Condition; import cn.timer.api.dto.spmk.Condition;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User; ...@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User;
* *
*/ */
public class RouterUtils { public class RouterUtils {
/**
* 0 未执行
*/
private final static String UNEXECUTED = "0"; private final static String UNEXECUTED = "0";
/**
* 1 执行中
*/
private final static String EXECUTING = "1"; private final static String EXECUTING = "1";
/**
* 2 已执行
*/
private final static String EXECUTED = "2"; private final static String EXECUTED = "2";
/**
* creator 抄送人
*/
private final static String CREATOR = "creator"; private final static String CREATOR = "creator";
/**
* audit 审批人
*/
private final static String AUDIT = "audit"; private final static String AUDIT = "audit";
/**
* copy 抄送人
*/
private final static String COPY = "copy"; private final static String COPY = "copy";
/**
* department 部门类型
*/
private final static String RELATION_TYPE_DEPARTMENT = "department"; private final static String RELATION_TYPE_DEPARTMENT = "department";
/**
* users 用户类型
*/
private final static String RELATION_TYPE_USERS = "users"; private final static String RELATION_TYPE_USERS = "users";
public static List<Router> NextNode(List<Router> listRouter,JSONObject obj, boolean isFirse) throws NumberFormatException, ConvertException, Exception { public static List<Router> NextNode(List<Router> listRouter,JSONObject obj, boolean isFirse) throws NumberFormatException, ConvertException, Exception {
...@@ -76,7 +100,7 @@ public class RouterUtils { ...@@ -76,7 +100,7 @@ public class RouterUtils {
.name(obj.get("initiator",FromData.class).getValue()) .name(obj.get("initiator",FromData.class).getValue())
.id(obj.get("id",FromData.class).getValue()) .id(obj.get("id",FromData.class).getValue())
.headUrl(obj.get("headUrl",FromData.class).getValue()) .headUrl(obj.get("headUrl",FromData.class).getValue())
.execute("0") .execute(UNEXECUTED)
.build(); .build();
users.add(userFirst); users.add(userFirst);
List<Relation> relations = new ArrayList<Relation>(); List<Relation> relations = new ArrayList<Relation>();
...@@ -238,9 +262,8 @@ public class RouterUtils { ...@@ -238,9 +262,8 @@ public class RouterUtils {
public static List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){ public static List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<ZzglBmgwM>(); List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(new QueryWrapper<ZzglBmgwM>().lambda()
queryWrapper.eq("org_code", orgCode); .eq(ZzglBmgwM::getOrgCode, orgCode));
List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(queryWrapper);
list.add(id); list.add(id);
ZzglBmgwM.getDepts(list, id, zzglBmgwMs); ZzglBmgwM.getDepts(list, id, zzglBmgwMs);
...@@ -293,13 +316,14 @@ public class RouterUtils { ...@@ -293,13 +316,14 @@ public class RouterUtils {
continue; continue;
} }
// ClassName 区分参与审批流程人的角色 CREATOR(发起人)、AUDIT(审核人)、COPY(抄送人)
// 各个角色的逻辑不同
switch (listFlowChildren.get(i).getClassName()) { switch (listFlowChildren.get(i).getClassName()) {
case CREATOR: case CREATOR:
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("发起申请") .name(ParticipatorType.INITIATOR.getName())
.type(ParticipatorType.INITIATOR.ordinal()) .type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
...@@ -321,7 +345,7 @@ public class RouterUtils { ...@@ -321,7 +345,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("审批人") .name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal()) .type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal()) .sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build(); .build();
...@@ -354,7 +378,7 @@ public class RouterUtils { ...@@ -354,7 +378,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("抄送人") .name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal()) .type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
...@@ -423,7 +447,7 @@ public class RouterUtils { ...@@ -423,7 +447,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派 // 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == ExecutorSts.REFUSE.ordinal()) { if (sts == ExecutorSts.REFUSE.ordinal()) {
// 更新 审批汇总 状态 // 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).currentApprover("").endTime(new Date()).sts(sts).build().updateById(); SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord SpmkApproveExecuteRecord
.builder() .builder()
.id(executeRecordId) .id(executeRecordId)
...@@ -434,6 +458,7 @@ public class RouterUtils { ...@@ -434,6 +458,7 @@ public class RouterUtils {
listFlowChildren.get(i_user).setExecute(EXECUTED); listFlowChildren.get(i_user).setExecute(EXECUTED);
return; return;
//转派 处理 //转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) { }else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1); List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
users1.add(redeployUser); users1.add(redeployUser);
...@@ -480,8 +505,8 @@ public class RouterUtils { ...@@ -480,8 +505,8 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("发起申请") .name(ParticipatorType.INITIATOR.getName())
.type(0) .type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
// 新增 审批执行记录 // 新增 审批执行记录
...@@ -504,7 +529,7 @@ public class RouterUtils { ...@@ -504,7 +529,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("审批人") .name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal()) .type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal()) .sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build(); .build();
...@@ -530,7 +555,7 @@ public class RouterUtils { ...@@ -530,7 +555,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("抄送人") .name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal()) .type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
...@@ -541,7 +566,7 @@ public class RouterUtils { ...@@ -541,7 +566,7 @@ public class RouterUtils {
for (Relation relation : listRelation) { for (Relation relation : listRelation) {
List<User> listUser2 = relation.getUsers(); List<User> listUser2 = relation.getUsers();
if (listUser2 != null) {
// 新增 执行人 // 新增 执行人
for (User user2 : listUser2) { for (User user2 : listUser2) {
SpmkExecutor executor = SpmkExecutor.builder() SpmkExecutor executor = SpmkExecutor.builder()
...@@ -554,6 +579,7 @@ public class RouterUtils { ...@@ -554,6 +579,7 @@ public class RouterUtils {
executor.insert(); executor.insert();
} }
} }
}
listFlowChildren.get(i).setExecute(EXECUTED); listFlowChildren.get(i).setExecute(EXECUTED);
break; break;
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -14,8 +21,11 @@ import lombok.Builder; ...@@ -14,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class EvectionBusiness extends SpmkAssoBusiness { public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
...@@ -23,6 +33,9 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -23,6 +33,9 @@ public class EvectionBusiness extends SpmkAssoBusiness {
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue(); String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间 // 开始时间
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue(); String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间 // 结束时间
...@@ -34,8 +47,17 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -34,8 +47,17 @@ public class EvectionBusiness extends SpmkAssoBusiness {
// 上传文件 // 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务 AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder()
.evectionid(Convert.toInt(approveId))
.evectiontype(1)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-出差
kqglService.attevectionapproval(eaD);
} }
} }
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/** /**
* 外出 * 外出-业务
* @author Tang * @author Tang
* *
*/ */
@Builder
public class GoOutBusiness extends SpmkAssoBusiness { public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness {
String id = jsonObj.get("id",FromData.class).getValue(); String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称 // 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue(); String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间 // 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue(); String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间 // 结束时间
...@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness {
// 上传文件 // 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务 AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder()
.evectionid(Convert.toInt(approveId))
.evectiontype(2)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-外出
kqglService.attevectionapproval(eaD);
} }
} }
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.kqmk.AttLeaveApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -14,8 +23,11 @@ import lombok.Builder; ...@@ -14,8 +23,11 @@ import lombok.Builder;
@Builder @Builder
public class LeaveBusiness extends SpmkAssoBusiness { public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
...@@ -24,6 +36,9 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -24,6 +36,9 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 请假类型 // 请假类型
String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue(); String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue();
// 开始时间 // 开始时间
...@@ -37,7 +52,17 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -37,7 +52,17 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 上传文件 // 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务 AttLeaveApprovalDto laD = AttLeaveApprovalDto
.builder()
.leaveid(Convert.toInt(approveId))
.leavetype(Convert.toInt(LeaveType))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD);
} }
} }
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttRepairApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -13,8 +21,11 @@ import lombok.Builder; ...@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class ReissueACardBusiness extends SpmkAssoBusiness { public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
...@@ -23,14 +34,28 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -23,14 +34,28 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 补卡时间 // 补卡时间
String PatchCardTime = ObjectUtil.isNull(jsonObj.get("__PatchCardTime",FromData.class)) ? null : jsonObj.get("__PatchCardTime",FromData.class).getValue(); String PatchCardTime = ObjectUtil.isNull(jsonObj.get("__PatchCardTime",FromData.class)) ? null : jsonObj.get("__PatchCardTime",FromData.class).getValue();
// 缺卡原因 // 缺卡原因
String cardShortage = ObjectUtil.isNull(jsonObj.get("cardShortage",FromData.class)) ? null : jsonObj.get("cardShortage",FromData.class).getValue(); String cardShortage = ObjectUtil.isNull(jsonObj.get("cardShortage",FromData.class)) ? null : jsonObj.get("cardShortage",FromData.class).getValue();
// 缺卡时段-上班、下班-前端未改
String cardreplperiod = ObjectUtil.isNull(jsonObj.get("cardreplperiod",FromData.class)) ? null : jsonObj.get("cardreplperiod",FromData.class).getValue();
// 上传文件 // 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务 AttRepairApprovalDto raD = AttRepairApprovalDto
.builder()
.repairid(Convert.toInt(approveId))
.cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss"))
.cardreplperiod(Convert.toInt(cardreplperiod))
.build();
// 调 考勤管理 业务-补卡
kqglService.attrepairapproval(raD);
} }
} }
...@@ -35,6 +35,9 @@ public class SpmkAssoBusinessFactory { ...@@ -35,6 +35,9 @@ public class SpmkAssoBusinessFactory {
case EVECTION: case EVECTION:
sat = EvectionBusiness.builder().build(); sat = EvectionBusiness.builder().build();
break; break;
case GO_OUT:
sat = GoOutBusiness.builder().build();
break;
case REISSUE_A_CARD: case REISSUE_A_CARD:
sat = ReissueACardBusiness.builder().build(); sat = ReissueACardBusiness.builder().build();
break; break;
......
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttOvertimeApprovalDto;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -13,8 +21,11 @@ import lombok.Builder; ...@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class WorkOvertimeBusiness extends SpmkAssoBusiness { public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
...@@ -23,6 +34,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -23,6 +34,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
// 发起人名称 // 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue(); String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间 // 开始时间
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue(); String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间 // 结束时间
...@@ -33,10 +47,24 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -33,10 +47,24 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue(); String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue();
// 加班原因 // 加班原因
String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue(); String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue();
// 加班类型-前端未给
String overtimetype = ObjectUtil.isNull(jsonObj.get("__overtimetype",FromData.class)) ? null : jsonObj.get("__overtimetype",FromData.class).getValue();
// 上传文件 // 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务 AttOvertimeApprovalDto oaD = AttOvertimeApprovalDto
.builder()
.overtimeid(Convert.toInt(approveId))
.overtimetype(Convert.toInt(overtimetype))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(timeLong))
.compensate(Convert.toInt(compensate))
.build();
// 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD);
} }
} }
...@@ -2,9 +2,9 @@ package cn.timer.api.utils.router.enums; ...@@ -2,9 +2,9 @@ package cn.timer.api.utils.router.enums;
public enum ApproveEnum { public enum ApproveEnum {
DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1), DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1),RECRUIT(4, "招聘", 1),
RECRUIT(4, "招聘", 1), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), REISSUE_A_CARD(8, "补卡", 2), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), GO_OUT(8, "外出", 2),REISSUE_A_CARD(9, "补卡", 2),
WAGE_ADJUSTMENT(9, "调薪", 3),; WAGE_ADJUSTMENT(10, "调薪", 3);
private Integer type; private Integer type;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" > <resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" >
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor" <collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor"
resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_"> resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_">
</collection> </collection>
...@@ -30,7 +32,8 @@ ...@@ -30,7 +32,8 @@
name, name,
type, type,
sts, sts,
create_time create_time,
update_time
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -39,7 +42,8 @@ ...@@ -39,7 +42,8 @@
a.name, a.name,
a.type, a.type,
a.sts, a.sts,
a.create_time a.create_time,
a.update_time
</sql> </sql>
<sql id="Base_Column_List_Alias_b"> <sql id="Base_Column_List_Alias_b">
...@@ -50,7 +54,8 @@ ...@@ -50,7 +54,8 @@
b.operator_header_url SpmkExecutor_operator_header_url, b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion, b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts, b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -59,7 +64,8 @@ ...@@ -59,7 +64,8 @@
name SpmkApproveExecuteRecord_name, name SpmkApproveExecuteRecord_name,
type SpmkApproveExecuteRecord_type, type SpmkApproveExecuteRecord_type,
sts SpmkApproveExecuteRecord_sts, sts SpmkApproveExecuteRecord_sts,
create_time SpmkApproveExecuteRecord_create_time create_time SpmkApproveExecuteRecord_create_time,
update_time SpmkApproveExecuteRecord_update_time
</sql> </sql>
...@@ -93,7 +99,10 @@ ...@@ -93,7 +99,10 @@
sts, sts,
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
create_time create_time,
</if>
<if test ='null != updateTime'>
update_time
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -111,6 +120,9 @@ ...@@ -111,6 +120,9 @@
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
#{createTime} #{createTime}
</if>,
<if test ='null != updateTime'>
#{updateTime}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -127,7 +139,8 @@ ...@@ -127,7 +139,8 @@
<if test ='null != name'>name = #{name},</if> <if test ='null != name'>name = #{name},</if>
<if test ='null != type'>type = #{type},</if> <if test ='null != type'>type = #{type},</if>
<if test ='null != sts'>sts = #{sts},</if> <if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if> <if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -22,7 +23,8 @@ ...@@ -22,7 +23,8 @@
operator_header_url, operator_header_url,
opinion, opinion,
sts, sts,
create_time create_time,
update_time
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -33,7 +35,8 @@ ...@@ -33,7 +35,8 @@
operator_header_url SpmkExecutor_operator_header_url, operator_header_url SpmkExecutor_operator_header_url,
opinion SpmkExecutor_opinion, opinion SpmkExecutor_opinion,
sts SpmkExecutor_sts, sts SpmkExecutor_sts,
create_time SpmkExecutor_create_time create_time SpmkExecutor_create_time,
update_time SpmkExecutor_update_time
</sql> </sql>
<!-- <!--
...@@ -60,7 +63,10 @@ ...@@ -60,7 +63,10 @@
sts, sts,
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
create_time create_time,
</if>
<if test ='null != updateTime'>
update_time
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -83,7 +89,10 @@ ...@@ -83,7 +89,10 @@
#{sts}, #{sts},
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
#{createTime} #{createTime},
</if>
<if test ='null != updateTime'>
#{updateTime}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -102,7 +111,8 @@ ...@@ -102,7 +111,8 @@
<if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if> <if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if>
<if test ='null != opinion'>opinion = #{opinion},</if> <if test ='null != opinion'>opinion = #{opinion},</if>
<if test ='null != sts'>sts = #{sts},</if> <if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if> <if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment