Commit 5797c743 by 翁国栋

人员异动

parent a9adfdf0
ALTER TABLE `zzgl_log_dgjl`
ADD COLUMN `type` int(11) NULL COMMENT '1 转正 2调岗 3离职 4岗位删除员工 5 岗位添加员工' AFTER `comment`;
CREATE TABLE `yggl_emp_lzyy`
(
`id` int(11) NOT NULL,
`value` varchar(255) NULL COMMENT '离职原因',
PRIMARY KEY (`id`)
) COMMENT = '离职原因';
ALTER TABLE `yggl_emp_lzyy`
MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST;
ALTER TABLE `timer_test`.`yggl_emp_lzyy`
ADD COLUMN `org_code` int(11) NULL DEFAULT NULL COMMENT '企业Id' AFTER `value`;
ALTER TABLE `yggl_main_lzb`
ADD COLUMN `lzyy_id` int(11) NULL COMMENT '离职原因Id' AFTER `query`,
MODIFY COLUMN `lzbz` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '离职去向(原离职备注)' AFTER `query`,
MODIFY COLUMN `lzyy` varchar(800) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原因说明(原离职原因)' AFTER `lzbz`;
ALTER TABLE yggl_main_emp`
ADD COLUMN `zpgl_zj_id` int(11) NULL DEFAULT NULL COMMENT '职级字典id' AFTER `zpgl_gzdd_id`;
package cn.timer.api.bean.yggl;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 离职原因
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-05-06 15:46:06
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="yggl_emp_lzyy")
@ApiModel("员工离职原因")
public class YgglEmpLzyy extends Model<YgglEmpLzyy> {
private static final long serialVersionUID = -107322833609489522L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value="id 员工编号",example="101")
private Integer id;
/**
* 离职原因
*/
@ApiModelProperty(value="离职原因 ",example="离职原因")
private String value;
@ApiModelProperty(value="企业Id ",example="企业Id")
private Integer orgCode;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:离职原因
*/
public void setValue(String value) {
this.value = value;
}
/**
* 获取:离职原因
*/
public String getValue() {
return value;
}
}
...@@ -233,6 +233,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -233,6 +233,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="是否已投保:0否 1是 ",example="") @ApiModelProperty(value="是否已投保:0否 1是 ",example="")
private int isInsure; private int isInsure;
@ApiModelProperty(value="职级字典id ",example="")
private int zpglZjId;
} }
...@@ -200,12 +200,16 @@ public class YgglMainLzb extends Model<YgglMainLzb> { ...@@ -200,12 +200,16 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@ApiModelProperty(value="实际离职时间 ",example="实际离职时间") @ApiModelProperty(value="实际离职时间 ",example="实际离职时间")
private Date sjlzTime; private Date sjlzTime;
@ApiModelProperty(value="离职原因 ",example="离职原因") @ApiModelProperty(value="原因说明(原离职原因) ",example="原因说明(原离职原因)")
private String lzyy; private String lzyy;
@ApiModelProperty(value="离职备注",example="离职原因") @ApiModelProperty(value="离职去向(原离职备注)",example="离职去向(原离职备注)")
private String lzbz; private String lzbz;
@ApiModelProperty(value="离职原因id",example="离职原因id")
private String lzyyId;
//@Transient //@Transient
//@TableField(exist = false) //@TableField(exist = false)
//private String workTime;//工龄 //private String workTime;//工龄
......
...@@ -2,10 +2,7 @@ package cn.timer.api.bean.zzgl; ...@@ -2,10 +2,7 @@ package cn.timer.api.bean.zzgl;
import java.util.Date; import java.util.Date;
import javax.persistence.Entity; import javax.persistence.*;
import javax.persistence.GeneratedValue;
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;
...@@ -61,4 +58,14 @@ public class ZzglLogDgjl extends Model<ZzglLogDgjl> { ...@@ -61,4 +58,14 @@ public class ZzglLogDgjl extends Model<ZzglLogDgjl> {
@ApiModelProperty(value = "记录时间 ", example = "记录时间") @ApiModelProperty(value = "记录时间 ", example = "记录时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "类型 ", example = "1 转正 2调岗 3离职 4岗位删除员工 5 岗位添加员工")
private Integer type;
@ApiModelProperty(value = "备注 ", example = "备注")
private String comment;
@Transient
private String obmgwName;
@Transient
private String nbmgwName;
} }
...@@ -22,9 +22,14 @@ import javax.servlet.ServletOutputStream; ...@@ -22,9 +22,14 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import cn.timer.api.bean.yggl.*;
import cn.timer.api.bean.zzgl.ZzglLogDgjl;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
import cn.timer.api.dao.yggl.YgglAttaHtxxbMapper; import cn.timer.api.dao.yggl.YgglAttaHtxxbMapper;
import cn.timer.api.dto.yggl.*; import cn.timer.api.dto.yggl.*;
import cn.timer.api.utils.redis.RedisUtil; import cn.timer.api.utils.redis.RedisUtil;
import com.google.common.collect.Lists;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
...@@ -75,20 +80,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz; ...@@ -75,20 +80,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import cn.timer.api.bean.kqmk.KqglAssoYhsb; import cn.timer.api.bean.kqmk.KqglAssoYhsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.yggl.YgglAttaClfjb;
import cn.timer.api.bean.yggl.YgglAttaCzjlb;
import cn.timer.api.bean.yggl.YgglAttaGzjlb;
import cn.timer.api.bean.yggl.YgglAttaGzk;
import cn.timer.api.bean.yggl.YgglAttaHtxxb;
import cn.timer.api.bean.yggl.YgglAttaJjlxr;
import cn.timer.api.bean.yggl.YgglAttaJyjlb;
import cn.timer.api.bean.yggl.YgglAttaLxxxb;
import cn.timer.api.bean.yggl.YgglAttaPxjlxxb;
import cn.timer.api.bean.yggl.YgglAttaSbgjj;
import cn.timer.api.bean.yggl.YgglAttaZcxxb;
import cn.timer.api.bean.yggl.YgglAttaZszjb;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.yggl.YgglMainLzb;
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;
...@@ -112,7 +103,22 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -112,7 +103,22 @@ 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.kqmk.AdditionalDto; import cn.timer.api.dto.kqmk.AdditionalDto;
import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.EmpQuery;
import cn.timer.api.dto.yggl.ImportEmpDto;
import cn.timer.api.dto.yggl.LoginInfoDto;
import cn.timer.api.dto.yggl.LoginerChargeDto;
import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.ModifyAvatarDto;
import cn.timer.api.dto.yggl.UserInfo;
import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgKVDto;
import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto;
import cn.timer.api.dto.yggl.YgglCartogramDto;
import cn.timer.api.bean.clazz.NationClass; import cn.timer.api.bean.clazz.NationClass;
import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.DateFormatUtils; import cn.timer.api.utils.DateFormatUtils;
import cn.timer.api.utils.Md5; import cn.timer.api.utils.Md5;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -153,6 +159,9 @@ public class YgglController { ...@@ -153,6 +159,9 @@ public class YgglController {
@Autowired @Autowired
private NationClassMapper nationClassMapper; private NationClassMapper nationClassMapper;
@Autowired
private ZzglLogDgjlMapper zzglLogDgjlMapper;
@Resource @Resource
private RedisUtil redisUtil; private RedisUtil redisUtil;
...@@ -1387,10 +1396,24 @@ public class YgglController { ...@@ -1387,10 +1396,24 @@ public class YgglController {
@ApiOperation(value = "54.员工转正", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "54.员工转正", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 54) @ApiOperationSupport(order = 54)
public Result<Void> ygzz(@CurrentUser UserBean userBean, @RequestBody YgzzDto ygzzDto) { public Result<Void> ygzz(@CurrentUser UserBean userBean, @RequestBody YgzzDto ygzzDto) {
Integer ogwid = null;
YgglMainEmp ygglMainEmp=YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()).eq(YgglMainEmp::getOrgCode,userBean.getOrgCode()));
if(ygglMainEmp.getBmgwId()!=null){
ogwid=ygglMainEmp.getBmgwId();
}
ygglMainEmp.setJobStatus(jobStatus.ZHENSHI.getType());
ygglMainEmp.setZzTime(ygzzDto.getZzTime());
ygglMainEmp.setSjzzTime(ygzzDto.getSjzzTime()==null?new Date():ygzzDto.getSjzzTime());
ygglMainEmp.setZzRemark(ygzzDto.getZzRemark());
ygglMainEmp.setBmgwId(ygzzDto.getBmgwId());
ygglMainEmp.updateById();
/*增加一条调岗记录*/
// orgCode
List<Integer> list = Lists.newArrayList();
list.add(ygzzDto.getEmpNum());
zzglLogDgjlMapper.insertbyaddemp(list, userBean.getEmpNum(), ygzzDto.getBmgwId(),ogwid, userBean.getOrgCode(),
ygzzDto.getZzRemark(),1);
YgglMainEmp.builder().jobStatus(jobStatus.ZHENSHI.getType()).zzTime(ygzzDto.getZzTime()).sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark()).build()
.update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()));
return ResultUtil.success("转正成功!"); return ResultUtil.success("转正成功!");
} }
...@@ -1432,7 +1455,10 @@ public class YgglController { ...@@ -1432,7 +1455,10 @@ public class YgglController {
.update(new UpdateWrapper<YgglMainLzb>().lambda() .update(new UpdateWrapper<YgglMainLzb>().lambda()
.eq(YgglMainLzb::getEmpNum, empNum) .eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode())); .eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()));
List<Integer> list = Lists.newArrayList();
list.add(empNum);
zzglLogDgjlMapper.insertbyaddemp(list, userBean.getEmpNum(), null,null, userBean.getOrgCode(),
lzygQueryDto.getLzyy(),3);
return ResultUtil.data(ygglMainLzb, "添加待离职员工成功"); return ResultUtil.data(ygglMainLzb, "添加待离职员工成功");
} }
...@@ -2048,6 +2074,26 @@ public class YgglController { ...@@ -2048,6 +2074,26 @@ public class YgglController {
return ResultUtil.data(ygQueryDto); return ResultUtil.data(ygQueryDto);
} }
@PostMapping(value = "/addLzyy")
@ApiOperation(value = "离职原因", httpMethod = "POST", notes = "离职原因")
public Result<Object> getUserList(@CurrentUser UserBean userBean,@RequestBody YgglEmpLzyy data) {
if(StringUtils.isEmpty(data.getValue())){
return ResultUtil.error("请输入离职原因");
}
YgglEmpLzyy ygglEmpLzyy = YgglEmpLzyy.builder().build().selectOne(new QueryWrapper<YgglEmpLzyy>().lambda()
.eq(YgglEmpLzyy::getValue,data.getValue()).eq(YgglEmpLzyy::getOrgCode,userBean.getOrgCode()));
if(ygglEmpLzyy!=null){
return ResultUtil.error("离职原因已存在");
}
YgglEmpLzyy.builder().value(data.getValue()).orgCode(userBean.getOrgCode()).build().insert();
return ResultUtil.data("添加成功");
}
@GetMapping(value = "/allLzyyList")
@ApiOperation(value = "获取所有离职原因", httpMethod = "GET", notes = "获取所有离职原因")
public Result<Object> allLzyyList(@CurrentUser UserBean userBean) {
List<YgglEmpLzyy> ygglEmpLzyyList = YgglEmpLzyy.builder().build().selectList(new QueryWrapper<YgglEmpLzyy>().lambda().eq(YgglEmpLzyy::getOrgCode,userBean.getOrgCode()));
return ResultUtil.data(ygglEmpLzyyList);
}
@GetMapping(value = "/getContract") @GetMapping(value = "/getContract")
@ApiOperation(value = "72.运营后台--合同概况列表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "72.运营后台--合同概况列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 72) @ApiOperationSupport(order = 72)
......
...@@ -7,6 +7,8 @@ import java.util.stream.Collectors; ...@@ -7,6 +7,8 @@ import java.util.stream.Collectors;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary; import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.zzgl.*;
import com.google.common.collect.Lists;
import freemarker.template.utility.StringUtil; import freemarker.template.utility.StringUtil;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -34,10 +36,6 @@ import cn.timer.api.aspect.lang.enums.BusinessType; ...@@ -34,10 +36,6 @@ import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.admin.AdminMenuTemplate; import cn.timer.api.bean.admin.AdminMenuTemplate;
import cn.timer.api.bean.qyzx.QyzxAdminMenu; import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.bean.zzgl.ZzglMenu;
import cn.timer.api.bean.zzgl.ZzglPostMenu;
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;
...@@ -422,8 +420,29 @@ public class ZzglController { ...@@ -422,8 +420,29 @@ public class ZzglController {
List<Integer> empNums = upEmpDeptDto.getEmpNum(); List<Integer> empNums = upEmpDeptDto.getEmpNum();
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
KqglAssoMonthPunchSummary kqglAssoMonthPunchSummary = KqglAssoMonthPunchSummary.builder().build(); KqglAssoMonthPunchSummary kqglAssoMonthPunchSummary = KqglAssoMonthPunchSummary.builder().build();
zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(), String comm=null;
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗"); Integer type=null;
if(dpetId == null || dpetId == 0 ){
comm="岗位删除员工";
type=4;
}else if(upEmpDeptDto.getIsdg() == null){
comm="岗位添加员工";
type=5;
}else{
if(upEmpDeptDto.getIsdg()==1) {
comm = "员工调岗";
type = 2;
}
if(upEmpDeptDto.getIsdg()==6) {
comm = upEmpDeptDto.getRemake();
type = 6;
}
if(upEmpDeptDto.getIsdg()==7) {
comm = upEmpDeptDto.getRemake();;
type = 7;
}
}
// zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId,null, userBean.getOrgCode(),comm,type);
// 清楚 leader 主管标记 // 清楚 leader 主管标记
if ((dpetId == null || dpetId == 0) || upEmpDeptDto.getIsdg() == null) { if ((dpetId == null || dpetId == 0) || upEmpDeptDto.getIsdg() == null) {
ZzglBmgwM.builder().leader(null).build() ZzglBmgwM.builder().leader(null).build()
...@@ -432,9 +451,30 @@ public class ZzglController { ...@@ -432,9 +451,30 @@ public class ZzglController {
.in(ZzglBmgwM::getLeader, empNums)); .in(ZzglBmgwM::getLeader, empNums));
} }
ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda() // ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda()
.set(YgglMainEmp::getBmgwId, dpetId).set(YgglMainEmp::getBmgwName, upEmpDeptDto.getDept()) // .set(YgglMainEmp::getBmgwId, dpetId).set(YgglMainEmp::getBmgwName, upEmpDeptDto.getDept())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNums)); // .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getEmpNum, empNums));
List<YgglMainEmp> ygglMainEmpList=YgglMainEmp.builder().build().selectList(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode,userBean.getOrgCode()).in(YgglMainEmp::getEmpNum,empNums));
Integer oId=null;
for(YgglMainEmp y:ygglMainEmpList) {
if (upEmpDeptDto.getZpglCompanyId() != null) {
y.setZpglCompanyId(upEmpDeptDto.getZpglCompanyId());
}
if (upEmpDeptDto.getZpglCompanyId() != null) {
y.setZpglGzddId(upEmpDeptDto.getZpglGzddId());
}
if (upEmpDeptDto.getZpglCompanyId() != null) {
y.setZpglZjId(upEmpDeptDto.getZpglZjId());
}
if (dpetId != null) {
oId = y.getBmgwId();
y.setBmgwId(dpetId);
}
y.updateById();
zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, oId, userBean.getOrgCode(),
comm, type);
}
// 调岗 同步部门 和 岗位信息 打卡月汇总 // 调岗 同步部门 和 岗位信息 打卡月汇总
if(!StringUtils.isEmpty(upEmpDeptDto.getIsdg()) && upEmpDeptDto.getIsdg().intValue()==1){ if(!StringUtils.isEmpty(upEmpDeptDto.getIsdg()) && upEmpDeptDto.getIsdg().intValue()==1){
kqglAssoMonthPunchSummary.update(new UpdateWrapper<KqglAssoMonthPunchSummary>().lambda() kqglAssoMonthPunchSummary.update(new UpdateWrapper<KqglAssoMonthPunchSummary>().lambda()
...@@ -442,6 +482,7 @@ public class ZzglController { ...@@ -442,6 +482,7 @@ public class ZzglController {
.eq(KqglAssoMonthPunchSummary::getOrgCode, userBean.getOrgCode()).in(KqglAssoMonthPunchSummary::getNum, empNums) .eq(KqglAssoMonthPunchSummary::getOrgCode, userBean.getOrgCode()).in(KqglAssoMonthPunchSummary::getNum, empNums)
); );
} }
return ResultUtil.success(); return ResultUtil.success();
} }
...@@ -716,4 +757,10 @@ public class ZzglController { ...@@ -716,4 +757,10 @@ public class ZzglController {
return ResultUtil.data(tmen); return ResultUtil.data(tmen);
} }
@GetMapping(value = "/dgListByUser")
@ApiOperation(value = "获取异动记录", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> dgListByUser(@CurrentUser UserBean userBean,@RequestParam(value = "empNum", required = false, defaultValue = "") Integer empNum) {
List<ZzglLogDgjl> zzglLogDgjlList=zzglLogDgjlMapper.selectListByUser(userBean.getOrgCode(),empNum);
return ResultUtil.data(zzglLogDgjlList);
}
} }
...@@ -91,8 +91,19 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -91,8 +91,19 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.set("bmgw_id", dpetId).eq("org_code", orgCode).in("emp_num", empNum); updateWrapper.set("bmgw_id", dpetId).eq("org_code", orgCode).in("emp_num", empNum);
zzglLogDgjlMapper.insertbyaddemp(empNums, empNum, dpetId, orgCode, String comm;
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗"); Integer type;
if(dpetId == null || dpetId == 0 ){
comm="岗位删除员工";
type=4;
}else if(upEmpDeptDto.getIsdg() == null){
comm="岗位添加员工";
type=5;
}else{
comm="员工调岗";
type=2;
}
zzglLogDgjlMapper.insertbyaddemp(empNums,empNum, dpetId,null, orgCode,comm,type);
ygglMainEmp.update(updateWrapper); ygglMainEmp.update(updateWrapper);
} }
......
package cn.timer.api.dao.yggl;
import cn.timer.api.bean.yggl.YgglEmpLzyy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 离职原因
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-05-06 15:46:06
*/
@Repository
public interface YgglEmpLzyyMapper extends BaseMapper<YgglEmpLzyy> {
}
...@@ -144,4 +144,6 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -144,4 +144,6 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
List<YgglMainEmp> selectListByIds(@Param("array")String[] ids); List<YgglMainEmp> selectListByIds(@Param("array")String[] ids);
List<YgglMainEmp> selectListByIZjNum(@Param("array")String[] zjNum,@Param("orgCode") Integer orgCode); List<YgglMainEmp> selectListByIZjNum(@Param("array")String[] zjNum,@Param("orgCode") Integer orgCode);
int updateInsure(@Param("array")Integer[] ids);
} }
...@@ -2,6 +2,7 @@ package cn.timer.api.dao.zzgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.dao.zzgl;
import java.util.List; import java.util.List;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -23,8 +24,10 @@ public interface ZzglLogDgjlMapper extends BaseMapper<ZzglLogDgjl> { ...@@ -23,8 +24,10 @@ public interface ZzglLogDgjlMapper extends BaseMapper<ZzglLogDgjl> {
List<ZzglLogDgjlDto> selectListdgjl( ZzglLogDgjlQueryDto zglLogDgjlQueryDto); List<ZzglLogDgjlDto> selectListdgjl( ZzglLogDgjlQueryDto zglLogDgjlQueryDto);
void insertbydeldept(@Param("ids") List<Integer>ids,@Param("uid") Integer uid); void insertbydeldept(@Param("ids") List<Integer>ids,@Param("uid") Integer uid);
void insertbyaddemp(@Param("ids") List<Integer>ids,@Param("uid") Integer uid,@Param("gwid") Integer gwid,@Param("orgc") Integer orgc,@Param("comm") String comm ); void insertbyaddemp(@Param("ids") List<Integer>ids, @Param("uid") Integer uid, @Param("gwid") Integer gwid,@Param("ogwid") Integer ogwid, @Param("orgc") Integer orgc, @Param("comm") String comm, @Param("type")Integer type);
//weng 获取调岗记录 //weng 获取调岗记录
List<LogDgjlsDto> selectListdgjls(IPage<LogDgjlsDto> page,@Param("param") LogDgjlsQueryDto logDgjlsQueryDto); List<LogDgjlsDto> selectListdgjls(IPage<LogDgjlsDto> page,@Param("param") LogDgjlsQueryDto logDgjlsQueryDto);
List<ZzglLogDgjl> selectListByUser(@Param("orgCode")Integer orgCode,@Param("empNum") Integer empNum);
} }
...@@ -31,4 +31,7 @@ public class YgzzDto implements Serializable{ ...@@ -31,4 +31,7 @@ public class YgzzDto implements Serializable{
@ApiModelProperty(value="转正原因",example="有梦想") @ApiModelProperty(value="转正原因",example="有梦想")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="岗位",example="有梦想")
private Integer bmgwId;
} }
...@@ -32,4 +32,17 @@ public class UpEmpDeptDto implements Serializable{ ...@@ -32,4 +32,17 @@ public class UpEmpDeptDto implements Serializable{
@ApiModelProperty(value="是否调岗",example="1") @ApiModelProperty(value="是否调岗",example="1")
private Integer isdg; private Integer isdg;
@ApiModelProperty(value="备注",example="1")
private String remake;
@ApiModelProperty(value="合同公司id",example="1")
private Integer zpglCompanyId;
@ApiModelProperty(value="工作地点id",example="1")
private Integer zpglGzddId;
@ApiModelProperty(value="原职级id",example="1")
private Integer zpglZjId;
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.yggl.YgglEmpLzyyMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.yggl.YgglEmpLzyy" id="ygglEmpLzyyMap">
<result property="id" column="id"/>
<result property="value" column="value"/>
<result property="orgCode" column="org_code"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.yggl.YgglEmpLzyy">
select *
from yggl_emp_lzyy
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.yggl.YgglEmpLzyy">
select * from yggl_emp_lzyy
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="value != null and value != ''">AND `value` = #{value}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from yggl_emp_lzyy
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="value != null and value != ''">AND `value` = #{value}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.yggl.YgglEmpLzyy">
insert into yggl_emp_lzyy
(`id`,
`value`)
values (#{id},
#{value})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.yggl.YgglEmpLzyy">
insert into yggl_emp_lzyy
(
<if test="id != null">`id`</if>
<if test="value != null">,`value`</if>
)
values
(
<if test="id != null">#{id}</if>
<if test="value != null">,#{value}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.yggl.YgglEmpLzyy">
insert into yggl_emp_lzyy
(
`id`,
`value`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.value}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglEmpLzyy">
update yggl_emp_lzyy
<set>
<if test="value != null">`value` = #{value}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from yggl_emp_lzyy
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from yggl_emp_lzyy where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<result column="mpopenid" property="mpopenid" /> <result column="mpopenid" property="mpopenid" />
<result column="appopenid" property="appopenid" /> <result column="appopenid" property="appopenid" />
<result column="is_insure" property="isInsure"/> <result column="is_insure" property="isInsure"/>
<result column="zpgl_zj_id" property="zpglZjId"/>
</resultMap> </resultMap>
<resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" > <resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
...@@ -128,7 +129,8 @@ ...@@ -128,7 +129,8 @@
mpopenid, mpopenid,
appopenid, appopenid,
custom_num, custom_num,
is_insure is_insure,
zpgl_zj_id
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -151,7 +153,8 @@ ...@@ -151,7 +153,8 @@
a.syq, a.syq,
a.zz_time, a.zz_time,
a.custom_num, a.custom_num,
a.is_insure a.is_insure,
a.zpgl_zj_id
</sql> </sql>
...@@ -462,4 +465,16 @@ ...@@ -462,4 +465,16 @@
#{zjnum} #{zjnum}
</foreach> </foreach>
</select> </select>
<update id="updateInsure">
UPDATE yggl_main_emp
<set>
is_insure = 0
</set>
WHERE id IN
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper> </mapper>
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
<result column="appopenid" property="appopenid" /> <result column="appopenid" property="appopenid" />
<result column="lz_time" property="lzTime" /> <result column="lz_time" property="lzTime" />
<result column="sjlz_time" property="sjlzTime" /> <result column="sjlz_time" property="sjlzTime" />
<result column="lzyy_id" property="lzyyId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -107,7 +109,8 @@ ...@@ -107,7 +109,8 @@
mpopenid, mpopenid,
appopenid, appopenid,
lz_time, lz_time,
sjlz_time sjlz_time,
lzyy_id
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -160,7 +163,8 @@ ...@@ -160,7 +163,8 @@
mpopenid YgglMainLzb_mpopenid, mpopenid YgglMainLzb_mpopenid,
appopenid YgglMainLzb_appopenid, appopenid YgglMainLzb_appopenid,
lz_time YgglMainLzb_lz_time, lz_time YgglMainLzb_lz_time,
sjlz_time YgglMainLzb_sjlz_time sjlz_time YgglMainLzb_sjlz_time,
lzyyId YgglMainLzb_lzyy_id,
</sql> </sql>
<!-- 查询本月离职人数 --> <!-- 查询本月离职人数 -->
<select id="queryDeparture" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryDeparture" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<result column="nbmgw_id" property="nbmgwId" /> <result column="nbmgw_id" property="nbmgwId" />
<result column="update_id" property="updateId" /> <result column="update_id" property="updateId" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="type" property="type" />
<result column="comment" property="comment" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -21,7 +24,8 @@ ...@@ -21,7 +24,8 @@
a.obmgw_id, a.obmgw_id,
a.nbmgw_id, a.nbmgw_id,
a.update_id, a.update_id,
a.create_time a.create_time,
a.type
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -108,8 +112,15 @@ ...@@ -108,8 +112,15 @@
</insert> </insert>
<insert id="insertbyaddemp"> <insert id="insertbyaddemp">
insert into zzgl_log_dgjl insert into zzgl_log_dgjl
(create_time,emp_num,nbmgw_id,obmgw_id,org_code,update_id,comment) (create_time,emp_num,nbmgw_id,obmgw_id,org_code,update_id,comment,type)
select NOW(),emp_num,#{gwid},bmgw_id,org_code,#{uid},#{comm} from select NOW(),emp_num,#{gwid},
<if test="ogwid==null">
bmgw_id
</if>
<if test="ogwid!=null">
#{ogwid}
</if>
,org_code,#{uid},#{comm},#{type} from
yggl_main_emp where org_code=#{orgc} and emp_num in yggl_main_emp where org_code=#{orgc} and emp_num in
<foreach item="item" index="index" collection="ids" open="(" <foreach item="item" index="index" collection="ids" open="("
separator="," close=")">#{item}</foreach> separator="," close=")">#{item}</foreach>
...@@ -137,4 +148,11 @@ ...@@ -137,4 +148,11 @@
#{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> #{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1) FROM zzgl_log_dgjl </select> --> SELECT count(1) FROM zzgl_log_dgjl </select> -->
<select id="selectListByUser" resultType="cn.timer.api.bean.zzgl.ZzglLogDgjl">
select z.*,zm.`name` as obmgwName,zmn.`name`as nbmgwName from zzgl_log_dgjl z
LEFT JOIN zzgl_bmgw_m zm on zm.id=z.obmgw_id
LEFT JOIN zzgl_bmgw_m zmn on zmn.id=z.nbmgw_id
where z.type in (1,2,3,6,7) and z.emp_num =#{empNum} and z.org_code=#{orgCode}
order by z.create_time desc
</select>
</mapper> </mapper>
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