Commit 470d48d7 by 龙于生

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/main/java/cn/timer/api/controller/yggl/YgglController.java
parents 7162f2e4 5797c743
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;
}
}
...@@ -39,63 +39,63 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -39,63 +39,63 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@TableId (type = IdType.AUTO) @TableId (type = IdType.AUTO)
@ApiModelProperty(value="员工编号 员工编号",example="101") @ApiModelProperty(value="员工编号 员工编号",example="101")
private Integer id; private Integer id;
@ApiModelProperty(value="员工工号 ",example="员工工号") @ApiModelProperty(value="员工工号 ",example="员工工号")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="手机号码 手机号码",example="101") @ApiModelProperty(value="手机号码 手机号码",example="101")
private String phone; private String phone;
@ApiModelProperty(value="密码 ",example="密码") @ApiModelProperty(value="密码 ",example="密码")
private String password; private String password;
@ApiModelProperty(value="头像 ",example="base64来处理头像") @ApiModelProperty(value="头像 ",example="base64来处理头像")
private String headUrl; private String headUrl;
@ApiModelProperty(value="名称 ",example="名称") @ApiModelProperty(value="名称 ",example="名称")
private String name; private String name;
@ApiModelProperty(value="英文名称 ",example="英文名称") @ApiModelProperty(value="英文名称 ",example="英文名称")
private String englishName; private String englishName;
@ApiModelProperty(value="性别 0:男;1:女",example="0") @ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex; private Integer sex;
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101") @ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101")
private Integer zjType; private Integer zjType;
@ApiModelProperty(value="证件号码 ",example="证件号码") @ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum; private String zjNum;
@ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日") @ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日")
private Date sfzyxTime; private Date sfzyxTime;
@ApiModelProperty(value="出生日期 ",example="出生日期") @ApiModelProperty(value="出生日期 ",example="出生日期")
private Date birthday; private Date birthday;
@ApiModelProperty(value="年龄 年龄",example="101") @ApiModelProperty(value="年龄 年龄",example="101")
private Integer age; private Integer age;
@ApiModelProperty(value="是否已婚 0:否、1:是",example="101") @ApiModelProperty(value="是否已婚 0:否、1:是",example="101")
private Integer isMarried; private Integer isMarried;
@ApiModelProperty(value="是否已育 0:否、1:是",example="101") @ApiModelProperty(value="是否已育 0:否、1:是",example="101")
private Integer isPregnant; private Integer isPregnant;
@ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101") @ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101")
private Integer area; private Integer area;
@ApiModelProperty(value="民族 56个名族",example="101") @ApiModelProperty(value="民族 56个名族",example="101")
private Integer mz; private Integer mz;
@ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101") @ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101")
private Integer zzmm; private Integer zzmm;
@ApiModelProperty(value="籍贯 省",example="101") @ApiModelProperty(value="籍贯 省",example="101")
private String jg; private String jg;
@ApiModelProperty(value="籍贯 省id",example="101") @ApiModelProperty(value="籍贯 省id",example="101")
private String jgId; private String jgId;
@ApiModelProperty(value = "省") @ApiModelProperty(value = "省")
private String province; private String province;
@ApiModelProperty(value = "省id") @ApiModelProperty(value = "省id")
...@@ -108,106 +108,106 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -108,106 +108,106 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
private String district; private String district;
@ApiModelProperty(value = "区编号") @ApiModelProperty(value = "区编号")
private String districtId; private String districtId;
@ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101") @ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101")
private Integer hkType; private Integer hkType;
@ApiModelProperty(value="户籍地址 ",example="详细地址") @ApiModelProperty(value="户籍地址 ",example="详细地址")
private String hkAddress; private String hkAddress;
@ApiModelProperty(value="QQ QQ",example="101") @ApiModelProperty(value="QQ QQ",example="101")
private Integer qq; private Integer qq;
@ApiModelProperty(value="微信 ",example="微信") @ApiModelProperty(value="微信 ",example="微信")
private String wechat; private String wechat;
// @ApiModelProperty(value="个人邮箱 ",example="个人邮箱") // @ApiModelProperty(value="个人邮箱 ",example="个人邮箱")
// private String email; // private String email;
@ApiModelProperty(value="血型 ",example="血型") @ApiModelProperty(value="血型 ",example="血型")
private String bloodType; private String bloodType;
@ApiModelProperty(value="语言 ",example="语言") @ApiModelProperty(value="语言 ",example="语言")
private String language; private String language;
@ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101") @ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101")
private Integer edu; private Integer edu;
@ApiModelProperty(value="专业 ",example="专业") @ApiModelProperty(value="专业 ",example="专业")
private String zy; private String zy;
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101") @ApiModelProperty(value="工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime; private Date rzTime;
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101") @ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101")
private Integer syq; private Integer syq;
@ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期") @ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期")
private Date zzTime; private Date zzTime;
@ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期") @ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期")
private Date sjzzTime; private Date sjzzTime;
@ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101") @ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101")
private Integer isJrkq; private Integer isJrkq;
@ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101") @ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101")
private String jobNum; private String jobNum;
@ApiModelProperty(value="工作地点 ",example="工作地点") @ApiModelProperty(value="工作地点 ",example="工作地点")
private String workAddress; private String workAddress;
@ApiModelProperty(value="工作电话 工作电话",example="101") @ApiModelProperty(value="工作电话 工作电话",example="101")
private Integer workPhone; private Integer workPhone;
@ApiModelProperty(value="工作邮箱 ",example="工作邮箱") @ApiModelProperty(value="工作邮箱 ",example="工作邮箱")
private String workEmail; private String workEmail;
@ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101") @ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101")
private Integer zpqd; private Integer zpqd;
@ApiModelProperty(value="部门岗位id 部门岗位id",example="101") @ApiModelProperty(value="部门岗位id 部门岗位id",example="101")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="部门名称",example="") @ApiModelProperty(value="部门名称",example="")
private String bmgwName; private String bmgwName;
@ApiModelProperty(value="修改时间",example="修改时间") @ApiModelProperty(value="修改时间",example="修改时间")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value="修改人",example="修改人") @ApiModelProperty(value="修改人",example="修改人")
private Integer updateMan; private Integer updateMan;
@ApiModelProperty(value="组织机构代码 组织机构代码",example="101") @ApiModelProperty(value="组织机构代码 组织机构代码",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="微信id",example="UnionID微信系统唯一id") @ApiModelProperty(value="微信id",example="UnionID微信系统唯一id")
private String unionid; private String unionid;
@ApiModelProperty(value="公众号id",example="openid公众号唯一id") @ApiModelProperty(value="公众号id",example="openid公众号唯一id")
private String openid; private String openid;
@ApiModelProperty(value="小程序id",example="mpopenid小程序") @ApiModelProperty(value="小程序id",example="mpopenid小程序")
private String mpopenid; private String mpopenid;
@ApiModelProperty(value="手机APPid",example="appopenid手机app") @ApiModelProperty(value="手机APPid",example="appopenid手机app")
private String appopenid; private String appopenid;
// @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正式") @ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts; private Integer beforeLeavingSts;
@ApiModelProperty(value="自定义工号",example="") @ApiModelProperty(value="自定义工号",example="")
private String customNum; private String customNum;
...@@ -220,7 +220,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -220,7 +220,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String error;//错误信息提示 private String error;//错误信息提示
...@@ -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;
}
\ No newline at end of file }
...@@ -34,69 +34,69 @@ public class YgglMainLzb extends Model<YgglMainLzb> { ...@@ -34,69 +34,69 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@TableId (type = IdType.AUTO) @TableId (type = IdType.AUTO)
@ApiModelProperty(value="员工编号 员工编号",example="101") @ApiModelProperty(value="员工编号 员工编号",example="101")
private Integer id; private Integer id;
@ApiModelProperty(value="员工工号 ",example="员工工号") @ApiModelProperty(value="员工工号 ",example="员工工号")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="手机号码 手机号码",example="101") @ApiModelProperty(value="手机号码 手机号码",example="101")
private String phone; private String phone;
@ApiModelProperty(value="密码 ",example="密码") @ApiModelProperty(value="密码 ",example="密码")
private String password; private String password;
@ApiModelProperty(value="头像 ",example="base64来处理头像") @ApiModelProperty(value="头像 ",example="base64来处理头像")
private String headUrl; private String headUrl;
@ApiModelProperty(value="名称 ",example="名称") @ApiModelProperty(value="名称 ",example="名称")
private String name; private String name;
@ApiModelProperty(value="英文名称 ",example="英文名称") @ApiModelProperty(value="英文名称 ",example="英文名称")
private String englishName; private String englishName;
@ApiModelProperty(value="性别 1:男;2:女",example="101") @ApiModelProperty(value="性别 1:男;2:女",example="101")
private Integer sex; private Integer sex;
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101") @ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101")
private Integer zjType; private Integer zjType;
@ApiModelProperty(value="证件号码 ",example="证件号码") @ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum; private String zjNum;
@ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日") @ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日")
private Date sfzyxTime; private Date sfzyxTime;
@ApiModelProperty(value="出生日期 ",example="出生日期") @ApiModelProperty(value="出生日期 ",example="出生日期")
private Date birthday; private Date birthday;
@ApiModelProperty(value="年龄 年龄",example="101") @ApiModelProperty(value="年龄 年龄",example="101")
private Integer age; private Integer age;
@ApiModelProperty(value="是否已婚 0:否、1:是",example="101") @ApiModelProperty(value="是否已婚 0:否、1:是",example="101")
private Integer isMarried; private Integer isMarried;
@ApiModelProperty(value="是否已育 0:否、1:是",example="101") @ApiModelProperty(value="是否已育 0:否、1:是",example="101")
private Integer isPregnant; private Integer isPregnant;
@ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101") @ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101")
private Integer area; private Integer area;
@ApiModelProperty(value="民族 56个名族",example="101") @ApiModelProperty(value="民族 56个名族",example="101")
private Integer mz; private Integer mz;
@ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101") @ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101")
private Integer zzmm; private Integer zzmm;
// @ApiModelProperty(value="籍贯 省/市/区 例:广东/广州/白云",example="101") // @ApiModelProperty(value="籍贯 省/市/区 例:广东/广州/白云",example="101")
// private Integer jg; // private Integer jg;
// //
// @ApiModelProperty(value="户籍城市 省/市/区 例:广东/广州/白云",example="101") // @ApiModelProperty(value="户籍城市 省/市/区 例:广东/广州/白云",example="101")
// private Integer city; // private Integer city;
@ApiModelProperty(value="籍贯 省",example="101") @ApiModelProperty(value="籍贯 省",example="101")
private String jg; private String jg;
@ApiModelProperty(value="籍贯 省id",example="101") @ApiModelProperty(value="籍贯 省id",example="101")
private String jgId; private String jgId;
@ApiModelProperty(value = "省") @ApiModelProperty(value = "省")
private String province; private String province;
@ApiModelProperty(value = "省id") @ApiModelProperty(value = "省id")
...@@ -109,109 +109,113 @@ public class YgglMainLzb extends Model<YgglMainLzb> { ...@@ -109,109 +109,113 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
private String district; private String district;
@ApiModelProperty(value = "区编号") @ApiModelProperty(value = "区编号")
private String districtId; private String districtId;
@ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101") @ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101")
private Integer hkType; private Integer hkType;
@ApiModelProperty(value="户籍地址 ",example="详细地址") @ApiModelProperty(value="户籍地址 ",example="详细地址")
private String hkAddress; private String hkAddress;
@ApiModelProperty(value="QQ QQ",example="101") @ApiModelProperty(value="QQ QQ",example="101")
private Integer qq; private Integer qq;
@ApiModelProperty(value="微信 ",example="微信") @ApiModelProperty(value="微信 ",example="微信")
private String wechat; private String wechat;
@ApiModelProperty(value="个人邮箱 ",example="个人邮箱") @ApiModelProperty(value="个人邮箱 ",example="个人邮箱")
private String email; private String email;
@ApiModelProperty(value="血型 ",example="血型") @ApiModelProperty(value="血型 ",example="血型")
private String bloodType; private String bloodType;
@ApiModelProperty(value="语言 ",example="语言") @ApiModelProperty(value="语言 ",example="语言")
private String language; private String language;
@ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101") @ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101")
private Integer edu; private Integer edu;
@ApiModelProperty(value="专业 ",example="专业") @ApiModelProperty(value="专业 ",example="专业")
private String zy; private String zy;
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="1") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="1")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime; private Date rzTime;
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101") @ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101")
private Integer syq; private Integer syq;
@ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期") @ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期")
private Date zzTime; private Date zzTime;
@ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期") @ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期")
private Date sjzzTime; private Date sjzzTime;
@ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101") @ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101")
private Integer isJrkq; private Integer isJrkq;
@ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101") @ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101")
private String jobNum; private String jobNum;
@ApiModelProperty(value="工作地点 ",example="工作地点") @ApiModelProperty(value="工作地点 ",example="工作地点")
private String workAddress; private String workAddress;
@ApiModelProperty(value="工作电话 工作电话",example="101") @ApiModelProperty(value="工作电话 工作电话",example="101")
private Integer workPhone; private Integer workPhone;
@ApiModelProperty(value="工作邮箱 ",example="工作邮箱") @ApiModelProperty(value="工作邮箱 ",example="工作邮箱")
private String workEmail; private String workEmail;
@ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101") @ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101")
private Integer zpqd; private Integer zpqd;
@ApiModelProperty(value="部门岗位id 部门岗位id",example="101") @ApiModelProperty(value="部门岗位id 部门岗位id",example="101")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="组织机构代码 组织机构代码",example="101") @ApiModelProperty(value="组织机构代码 组织机构代码",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="微信id ",example="UnionID微信系统唯一id") @ApiModelProperty(value="微信id ",example="UnionID微信系统唯一id")
private String unionid; private String unionid;
@ApiModelProperty(value="公众号id ",example="openid公众号唯一id") @ApiModelProperty(value="公众号id ",example="openid公众号唯一id")
private String openid; private String openid;
@ApiModelProperty(value="小程序id ",example="mpopenid小程序") @ApiModelProperty(value="小程序id ",example="mpopenid小程序")
private String mpopenid; private String mpopenid;
@ApiModelProperty(value="手机APPid ",example="appopenid手机app") @ApiModelProperty(value="手机APPid ",example="appopenid手机app")
private String appopenid; private String appopenid;
@ApiModelProperty(value="应离职时间 ",example="应离职时间") @ApiModelProperty(value="应离职时间 ",example="应离职时间")
private Date lzTime; private Date lzTime;
@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;//工龄
@Tolerate @Tolerate
public YgglMainLzb() { public YgglMainLzb() {
} }
} }
\ No newline at end of file
...@@ -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;
...@@ -31,7 +28,7 @@ import lombok.NoArgsConstructor; ...@@ -31,7 +28,7 @@ import lombok.NoArgsConstructor;
public class ZzglLogDgjl extends Model<ZzglLogDgjl> { public class ZzglLogDgjl extends Model<ZzglLogDgjl> {
/** /**
* @date 2019年12月9日 * @date 2019年12月9日
* @author 翁东州 * @author 翁东州
* @方法中文名称: * @方法中文名称:
*/ */
...@@ -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 岗位添加员工")
\ No newline at end of file private Integer type;
@ApiModelProperty(value = "备注 ", example = "备注")
private String comment;
@Transient
private String obmgwName;
@Transient
private String nbmgwName;
}
/** /**
* @date 2019年11月15日 * @date 2019年11月15日
* @author 翁东州 * @author 翁东州
* @方法中文名称: * @方法中文名称:
*/ */
package cn.timer.api.controller.yggl; package cn.timer.api.controller.yggl;
import java.io.*;
import java.net.URLEncoder;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -24,10 +22,14 @@ import javax.servlet.http.HttpServletResponse; ...@@ -24,10 +22,14 @@ import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import cn.timer.api.bean.yggl.*; 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.dao.yggl.YgglPersonnelFormMapper; import cn.timer.api.dao.yggl.YgglPersonnelFormMapper;
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;
...@@ -101,7 +103,22 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -101,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;
...@@ -142,6 +159,9 @@ public class YgglController { ...@@ -142,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;
...@@ -156,7 +176,7 @@ public class YgglController { ...@@ -156,7 +176,7 @@ public class YgglController {
/** /**
* 获取员工档案 * 获取员工档案
* *
* @param * @param
* @return * @return
*/ */
...@@ -196,7 +216,7 @@ public class YgglController { ...@@ -196,7 +216,7 @@ public class YgglController {
/** /**
* 根据岗位id获取员工档案部门岗位名称 * 根据岗位id获取员工档案部门岗位名称
* *
* @param * @param
* @return * @return
*/ */
...@@ -226,20 +246,20 @@ public class YgglController { ...@@ -226,20 +246,20 @@ public class YgglController {
return ResultUtil.data(bmgw); return ResultUtil.data(bmgw);
} }
@Autowired @Autowired
private RealTimeUpdate realtimeupdate; private RealTimeUpdate realtimeupdate;
@Autowired @Autowired
private KqglAssoKqzdkfsMapper kqglassokqzdkfsmapper; private KqglAssoKqzdkfsMapper kqglassokqzdkfsmapper;
@Value("${config-8timer.machine8timerUrl}") @Value("${config-8timer.machine8timerUrl}")
public String mac_command; // 回调地址 public String mac_command; // 回调地址
@Autowired @Autowired
private UserEquiRelationMapper userequirelationmapper; private UserEquiRelationMapper userequirelationmapper;
/** /**
* 添加员工档案 * 添加员工档案
* *
* @param userBean * @param userBean
* @param addygdaDto * @param addygdaDto
* @return * @return
...@@ -290,7 +310,7 @@ public class YgglController { ...@@ -290,7 +310,7 @@ public class YgglController {
Integer syq = addygdaDto.getSyq(); Integer syq = addygdaDto.getSyq();
Integer sex = addygdaDto.getSex(); Integer sex = addygdaDto.getSex();
Integer bmgwId = addygdaDto.getBmgwId(); Integer bmgwId = addygdaDto.getBmgwId();
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();
...@@ -313,17 +333,17 @@ public class YgglController { ...@@ -313,17 +333,17 @@ public class YgglController {
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType) ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex) .jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build(); .empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
if(addygdaDto.getAttgroupid() != null) { if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert(); KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
List<KqglAssoKqzdkfs> kqjs = kqglassokqzdkfsmapper.selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, addygdaDto.getAttgroupid()).eq(KqglAssoKqzdkfs::getType, 1)); List<KqglAssoKqzdkfs> kqjs = kqglassokqzdkfsmapper.selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, addygdaDto.getAttgroupid()).eq(KqglAssoKqzdkfs::getType, 1));
for(KqglAssoKqzdkfs abp:kqjs) { for(KqglAssoKqzdkfs abp:kqjs) {
KqglAssoKqj kqj = KqglAssoKqj.builder().id(abp.getDkfsid()).build().selectById(); KqglAssoKqj kqj = KqglAssoKqj.builder().id(abp.getDkfsid()).build().selectById();
KqglAssoYhsb kqjry = KqglAssoYhsb.builder().build().selectOne(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId())); KqglAssoYhsb kqjry = KqglAssoYhsb.builder().build().selectOne(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
if(kqjry == null) { if(kqjry == null) {
// YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId())); // YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId()));
String url = mac_command+"/addUserName"; String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
...@@ -334,22 +354,22 @@ public class YgglController { ...@@ -334,22 +354,22 @@ public class YgglController {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers); HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class); ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId())); KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(login.getId()).kqjid(kqj.getId()).type(1).build(); KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(login.getId()).kqjid(kqj.getId()).type(1).build();
UserEquiRelation isgly = userequirelationmapper.selectByuserId(login.getId()); UserEquiRelation isgly = userequirelationmapper.selectByuserId(login.getId());
if(isgly != null) { if(isgly != null) {
uskqj.setIsGly(isgly.getIsGly()); uskqj.setIsGly(isgly.getIsGly());
}else { }else {
uskqj.setIsGly(0); uskqj.setIsGly(0);
} }
if (!uskqj.insert()) if (!uskqj.insert())
return ResultUtil.error("操作失败--新增用户与设备关系"); return ResultUtil.error("操作失败--新增用户与设备关系");
} }
} }
} }
if(syq != null){ if(syq != null){
if(syq == 0) { if(syq == 0) {
...@@ -363,9 +383,9 @@ public class YgglController { ...@@ -363,9 +383,9 @@ public class YgglController {
ygglMainEmp.setZzTime(ClockInTool.strToDateLong(zztime)); ygglMainEmp.setZzTime(ClockInTool.strToDateLong(zztime));
} }
} }
ygglMainEmp.insert(); ygglMainEmp.insert();
//假期规则初始化 //假期规则初始化
String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode)); List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode));
...@@ -376,14 +396,14 @@ public class YgglController { ...@@ -376,14 +396,14 @@ public class YgglController {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(ygglMainEmp.getEmpNum()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert(); KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(ygglMainEmp.getEmpNum()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
} }
} }
try { try {
realtimeupdate.AttendanceTask(userBean.getOrgCode(), ygglMainEmp.getEmpNum(), 2,null); realtimeupdate.AttendanceTask(userBean.getOrgCode(), ygglMainEmp.getEmpNum(), 2,null);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
return ResultUtil.data(ygglMainEmp, "添加员工成功!"); return ResultUtil.data(ygglMainEmp, "添加员工成功!");
} else { } else {
return ResultUtil.error("该手机号已被使用,请输入正确手机号"); return ResultUtil.error("该手机号已被使用,请输入正确手机号");
...@@ -393,7 +413,7 @@ public class YgglController { ...@@ -393,7 +413,7 @@ public class YgglController {
/** /**
* 修改员工档案 * 修改员工档案
* *
* @param * @param
* @return * @return
*/ */
...@@ -432,7 +452,7 @@ public class YgglController { ...@@ -432,7 +452,7 @@ public class YgglController {
/** /**
* 员工搜索 * 员工搜索
* *
* @param * @param
* @return * @return
*/ */
...@@ -465,13 +485,13 @@ public class YgglController { ...@@ -465,13 +485,13 @@ public class YgglController {
return ResultUtil.data(ygglMainEmpPage); return ResultUtil.data(ygglMainEmpPage);
} }
@Autowired @Autowired
private ZzglBmgwMService zzglBmgwMService; private ZzglBmgwMService zzglBmgwMService;
/** /**
* 员工列表-分页 * 员工列表-分页
* *
* @param * @param
* @return * @return
*/ */
...@@ -483,7 +503,7 @@ public class YgglController { ...@@ -483,7 +503,7 @@ public class YgglController {
Integer bmgwId = empQuery.getBmgwid(); Integer bmgwId = empQuery.getBmgwid();
Page<YgglMainEmp> page = new Page<YgglMainEmp>(empQuery.getCurrentPage(), empQuery.getTotalPage()); Page<YgglMainEmp> page = new Page<YgglMainEmp>(empQuery.getCurrentPage(), empQuery.getTotalPage());
List<Integer> empNums = CollUtil.toList(); List<Integer> empNums = CollUtil.toList();
if (bmgwId != null) { if (bmgwId != null) {
List<YgglMainEmp> usersQuery = zzglBmgwMService.selectOtherlistent(userBean.getOrgCode(), bmgwId); List<YgglMainEmp> usersQuery = zzglBmgwMService.selectOtherlistent(userBean.getOrgCode(), bmgwId);
if (CollectionUtil.isNotEmpty(usersQuery)) { if (CollectionUtil.isNotEmpty(usersQuery)) {
...@@ -491,7 +511,7 @@ public class YgglController { ...@@ -491,7 +511,7 @@ public class YgglController {
}else { }else {
return ResultUtil.data(null); return ResultUtil.data(null);
} }
if (CollectionUtil.isEmpty(empNums)) { if (CollectionUtil.isEmpty(empNums)) {
return ResultUtil.data(null); return ResultUtil.data(null);
} }
...@@ -552,7 +572,7 @@ public class YgglController { ...@@ -552,7 +572,7 @@ public class YgglController {
// List<AddygdaDto> list = listAddygdaDto.stream() // List<AddygdaDto> list = listAddygdaDto.stream()
// .filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum())) // .filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum()))
// .collect(Collectors.toList()); // .collect(Collectors.toList());
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合 // 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合
List<AddygdaDto> list = listAddygdaDto.stream() List<AddygdaDto> list = listAddygdaDto.stream()
.filter(o -> o != null && !listPhone.contains(o.getPhone())).collect(Collectors.toList()); .filter(o -> o != null && !listPhone.contains(o.getPhone())).collect(Collectors.toList());
...@@ -629,9 +649,9 @@ public class YgglController { ...@@ -629,9 +649,9 @@ public class YgglController {
// 存放 插入失败的 数据 // 存放 插入失败的 数据
insertErrors.add(yme); insertErrors.add(yme);
} }
//假期规则初始化 //假期规则初始化
String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode)); List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode));
...@@ -642,8 +662,8 @@ public class YgglController { ...@@ -642,8 +662,8 @@ public class YgglController {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert(); KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
} }
} }
} }
JSONObject obj = JSONUtil.createObj(); JSONObject obj = JSONUtil.createObj();
...@@ -659,7 +679,7 @@ public class YgglController { ...@@ -659,7 +679,7 @@ public class YgglController {
/** /**
* 获取导入模板 * 获取导入模板
* *
* @param * @param
* @return * @return
* @throws IOException * @throws IOException
...@@ -716,7 +736,7 @@ public class YgglController { ...@@ -716,7 +736,7 @@ public class YgglController {
/** /**
* 导出员工 * 导出员工
* *
* @param * @param
* @return * @return
*/ */
...@@ -731,7 +751,7 @@ public class YgglController { ...@@ -731,7 +751,7 @@ public class YgglController {
/** /**
* 获取员工教育经历表 * 获取员工教育经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -758,7 +778,7 @@ public class YgglController { ...@@ -758,7 +778,7 @@ public class YgglController {
/** /**
* 添加/修改员工教育经历表 * 添加/修改员工教育经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -774,7 +794,7 @@ public class YgglController { ...@@ -774,7 +794,7 @@ public class YgglController {
/** /**
* 删除员工教育经历表 * 删除员工教育经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -789,7 +809,7 @@ public class YgglController { ...@@ -789,7 +809,7 @@ public class YgglController {
/** /**
* 获取员工培训经历信息表 * 获取员工培训经历信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -817,7 +837,7 @@ public class YgglController { ...@@ -817,7 +837,7 @@ public class YgglController {
/** /**
* 添加/修改员工培训经历信息表 * 添加/修改员工培训经历信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -834,7 +854,7 @@ public class YgglController { ...@@ -834,7 +854,7 @@ public class YgglController {
/** /**
* 删除员工培训经历信息表 * 删除员工培训经历信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -849,7 +869,7 @@ public class YgglController { ...@@ -849,7 +869,7 @@ public class YgglController {
/** /**
* 获取员工工作经历表 * 获取员工工作经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -876,7 +896,7 @@ public class YgglController { ...@@ -876,7 +896,7 @@ public class YgglController {
/** /**
* 添加/修改员工工作经历表 * 添加/修改员工工作经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -892,7 +912,7 @@ public class YgglController { ...@@ -892,7 +912,7 @@ public class YgglController {
/** /**
* 删除员工工作经历表 * 删除员工工作经历表
* *
* @param * @param
* @return * @return
*/ */
...@@ -907,7 +927,7 @@ public class YgglController { ...@@ -907,7 +927,7 @@ public class YgglController {
/** /**
* 获取员工职称信息表 * 获取员工职称信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -934,7 +954,7 @@ public class YgglController { ...@@ -934,7 +954,7 @@ public class YgglController {
/** /**
* 添加/修改员工职称信息表 * 添加/修改员工职称信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -950,7 +970,7 @@ public class YgglController { ...@@ -950,7 +970,7 @@ public class YgglController {
/** /**
* 删除员工职称信息表 * 删除员工职称信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -965,7 +985,7 @@ public class YgglController { ...@@ -965,7 +985,7 @@ public class YgglController {
/** /**
* 获取员工证书证件表 * 获取员工证书证件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -992,7 +1012,7 @@ public class YgglController { ...@@ -992,7 +1012,7 @@ public class YgglController {
/** /**
* 添加/修改员工证书证件表 * 添加/修改员工证书证件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1008,7 +1028,7 @@ public class YgglController { ...@@ -1008,7 +1028,7 @@ public class YgglController {
/** /**
* 删除员工证书证件表 * 删除员工证书证件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1023,7 +1043,7 @@ public class YgglController { ...@@ -1023,7 +1043,7 @@ public class YgglController {
/** /**
* 获取员工联系信息表 * 获取员工联系信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1050,7 +1070,7 @@ public class YgglController { ...@@ -1050,7 +1070,7 @@ public class YgglController {
/** /**
* 添加/修改员工联系信息表 * 添加/修改员工联系信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1066,7 +1086,7 @@ public class YgglController { ...@@ -1066,7 +1086,7 @@ public class YgglController {
/** /**
* 删除员工联系信息表 * 删除员工联系信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1081,7 +1101,7 @@ public class YgglController { ...@@ -1081,7 +1101,7 @@ public class YgglController {
/** /**
* 获取员工紧急联系人表 * 获取员工紧急联系人表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1108,7 +1128,7 @@ public class YgglController { ...@@ -1108,7 +1128,7 @@ public class YgglController {
/** /**
* 添加/修改员工紧急联系人表 * 添加/修改员工紧急联系人表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1124,7 +1144,7 @@ public class YgglController { ...@@ -1124,7 +1144,7 @@ public class YgglController {
/** /**
* 删除员工紧急联系人表 * 删除员工紧急联系人表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1140,7 +1160,7 @@ public class YgglController { ...@@ -1140,7 +1160,7 @@ public class YgglController {
// 获取工资卡信息 // 获取工资卡信息
/** /**
* 获取员工工资卡信息 * 获取员工工资卡信息
* *
* @param * @param
* @return * @return
*/ */
...@@ -1166,7 +1186,7 @@ public class YgglController { ...@@ -1166,7 +1186,7 @@ public class YgglController {
/** /**
* 添加/修改工资卡信息 * 添加/修改工资卡信息
* *
* @param * @param
* @return * @return
*/ */
...@@ -1182,7 +1202,7 @@ public class YgglController { ...@@ -1182,7 +1202,7 @@ public class YgglController {
/** /**
* 删除工资卡信息 * 删除工资卡信息
* *
* @param * @param
* @return * @return
*/ */
...@@ -1197,7 +1217,7 @@ public class YgglController { ...@@ -1197,7 +1217,7 @@ public class YgglController {
/** /**
* 获取员工合同信息表 * 获取员工合同信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1224,7 +1244,7 @@ public class YgglController { ...@@ -1224,7 +1244,7 @@ public class YgglController {
/** /**
* 添加/修改员工合同信息表 * 添加/修改员工合同信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1240,7 +1260,7 @@ public class YgglController { ...@@ -1240,7 +1260,7 @@ public class YgglController {
/** /**
* 删除员工合同信息表 * 删除员工合同信息表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1255,7 +1275,7 @@ public class YgglController { ...@@ -1255,7 +1275,7 @@ public class YgglController {
/** /**
* 获取员工材料附件表 * 获取员工材料附件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1282,7 +1302,7 @@ public class YgglController { ...@@ -1282,7 +1302,7 @@ public class YgglController {
/** /**
* 添加/修改员工材料附件表 * 添加/修改员工材料附件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1298,7 +1318,7 @@ public class YgglController { ...@@ -1298,7 +1318,7 @@ public class YgglController {
/** /**
* 删除员工材料附件表 * 删除员工材料附件表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1313,7 +1333,7 @@ public class YgglController { ...@@ -1313,7 +1333,7 @@ public class YgglController {
/** /**
* 获取成长记录表 * 获取成长记录表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1340,7 +1360,7 @@ public class YgglController { ...@@ -1340,7 +1360,7 @@ public class YgglController {
/** /**
* 添加/修改成长记录表 * 添加/修改成长记录表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1356,7 +1376,7 @@ public class YgglController { ...@@ -1356,7 +1376,7 @@ public class YgglController {
/** /**
* 获取单个离职员工信息(管) * 获取单个离职员工信息(管)
* *
* @param * @param
* @return * @return
*/ */
...@@ -1371,7 +1391,7 @@ public class YgglController { ...@@ -1371,7 +1391,7 @@ public class YgglController {
/** /**
* 员工转正 0-1 * 员工转正 0-1
* *
* @param * @param
* @return * @return
*/ */
...@@ -1379,16 +1399,30 @@ public class YgglController { ...@@ -1379,16 +1399,30 @@ 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("转正成功!");
} }
/** /**
* 计划离职 type1-2 * 计划离职 type1-2
* *
* @param * @param
* @return * @return
*/ */
...@@ -1402,11 +1436,11 @@ public class YgglController { ...@@ -1402,11 +1436,11 @@ public class YgglController {
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda() YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum) .eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) { if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) {
return ResultUtil.success("你已在离职中"); return ResultUtil.success("你已在离职中");
} }
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts"); BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
...@@ -1424,13 +1458,16 @@ public class YgglController { ...@@ -1424,13 +1458,16 @@ 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, "添加待离职员工成功");
} }
/** /**
* 确认离职 type2-3 * 确认离职 type2-3
* *
* @param * @param
* @return * @return
*/ */
...@@ -1468,11 +1505,11 @@ public class YgglController { ...@@ -1468,11 +1505,11 @@ public class YgglController {
if (listEEA != null && listEEA.size() > 0) { if (listEEA != null && listEEA.size() > 0) {
QyzxEmpLogin.builder().id(empNum).orgId(CollUtil.getFirst(listEEA).getOrgCode()).build().updateById(); QyzxEmpLogin.builder().id(empNum).orgId(CollUtil.getFirst(listEEA).getOrgCode()).build().updateById();
} }
QyzxEmpLogin.builder().build().delete(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()).eq(QyzxEmpLogin::getId, empNum)); QyzxEmpLogin.builder().build().delete(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()).eq(QyzxEmpLogin::getId, empNum));
KqglAssoYhkqz.builder().build().delete(new QueryWrapper<KqglAssoYhkqz>().lambda().eq(KqglAssoYhkqz::getUserid, empNum).eq(KqglAssoYhkqz::getQyid, userBean.getOrgCode())); KqglAssoYhkqz.builder().build().delete(new QueryWrapper<KqglAssoYhkqz>().lambda().eq(KqglAssoYhkqz::getUserid, empNum).eq(KqglAssoYhkqz::getQyid, userBean.getOrgCode()));
try { try {
realtimeupdate.AttendanceTask(userBean.getOrgCode(), empNum, 2,null); realtimeupdate.AttendanceTask(userBean.getOrgCode(), empNum, 2,null);
...@@ -1480,13 +1517,13 @@ public class YgglController { ...@@ -1480,13 +1517,13 @@ public class YgglController {
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
return ResultUtil.success("确认离职员工成功"); return ResultUtil.success("确认离职员工成功");
} }
/** /**
* 放弃离职 type 2-1 * 放弃离职 type 2-1
* *
* @param * @param
* @return * @return
*/ */
...@@ -1525,7 +1562,7 @@ public class YgglController { ...@@ -1525,7 +1562,7 @@ public class YgglController {
/** /**
* 查询离职员工列表 * 查询离职员工列表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1544,7 +1581,7 @@ public class YgglController { ...@@ -1544,7 +1581,7 @@ public class YgglController {
/** /**
* 展示民族/展示所有民族 * 展示民族/展示所有民族
* *
* @param * @param
* @return * @return
*/ */
...@@ -1565,7 +1602,7 @@ public class YgglController { ...@@ -1565,7 +1602,7 @@ public class YgglController {
/** /**
* 籍贯树 * 籍贯树
* *
* @param * @param
* @return * @return
*/ */
...@@ -1581,7 +1618,7 @@ public class YgglController { ...@@ -1581,7 +1618,7 @@ public class YgglController {
/** /**
* 查询员工列表 * 查询员工列表
* *
* @param * @param
* @return * @return
*/ */
...@@ -1601,7 +1638,7 @@ public class YgglController { ...@@ -1601,7 +1638,7 @@ public class YgglController {
/*************** 统计图 ***************/ /*************** 统计图 ***************/
/** /**
* 查询统计图 * 查询统计图
* *
* @return 成功信息 * @return 成功信息
*/ */
@GetMapping("/yggl") @GetMapping("/yggl")
...@@ -1644,7 +1681,7 @@ public class YgglController { ...@@ -1644,7 +1681,7 @@ public class YgglController {
/** /**
* 员工信息统计图 * 员工信息统计图
* *
* @return 成功信息(weng) * @return 成功信息(weng)
*/ */
@GetMapping("/Cartogram") @GetMapping("/Cartogram")
...@@ -1722,7 +1759,7 @@ public class YgglController { ...@@ -1722,7 +1759,7 @@ public class YgglController {
/** /**
* 获取员工社保公积金 * 获取员工社保公积金
* *
* @param * @param
* @return * @return
*/ */
...@@ -1738,7 +1775,7 @@ public class YgglController { ...@@ -1738,7 +1775,7 @@ public class YgglController {
/** /**
* 获取员工社保公积金 * 获取员工社保公积金
* *
* @param * @param
* @return * @return
*/ */
...@@ -1755,7 +1792,7 @@ public class YgglController { ...@@ -1755,7 +1792,7 @@ public class YgglController {
/** /**
* 添加/修改员工社保公积金 * 添加/修改员工社保公积金
* *
* @param * @param
* @return * @return
*/ */
...@@ -1780,7 +1817,7 @@ public class YgglController { ...@@ -1780,7 +1817,7 @@ public class YgglController {
/** /**
* 删除员工社保公积金 * 删除员工社保公积金
* *
* @param * @param
* @return * @return
*/ */
...@@ -1822,7 +1859,7 @@ public class YgglController { ...@@ -1822,7 +1859,7 @@ public class YgglController {
/** /**
* 获取登录人的相关信息 * 获取登录人的相关信息
* *
* @param * @param
* @return * @return
*/ */
...@@ -1857,22 +1894,22 @@ public class YgglController { ...@@ -1857,22 +1894,22 @@ public class YgglController {
loginInfo.setGwId(gw); loginInfo.setGwId(gw);
loginInfo.setGwName(gwObj != null ? gwObj.getName() : ""); loginInfo.setGwName(gwObj != null ? gwObj.getName() : "");
loginInfo.setEntryTime(ygglMainEmp.getRzTime()); loginInfo.setEntryTime(ygglMainEmp.getRzTime());
if(ygglMainEmp.getSyq()!=null) { if(ygglMainEmp.getSyq()!=null) {
// System.out.println(ygglMainEmp.getSyq()); // System.out.println(ygglMainEmp.getSyq());
Date expireDate = DateUtil.offsetMonth(ygglMainEmp.getRzTime(), ygglMainEmp.getSyq()); // 时间偏移 Date expireDate = DateUtil.offsetMonth(ygglMainEmp.getRzTime(), ygglMainEmp.getSyq()); // 时间偏移
loginInfo.setRegularTime(expireDate); loginInfo.setRegularTime(expireDate);
}else { }else {
loginInfo.setRegularTime(new Date()); loginInfo.setRegularTime(new Date());
} }
} }
return ResultUtil.data(loginInfo); return ResultUtil.data(loginInfo);
} }
/** /**
* 获取登录人和上级主管的empNum和名称 * 获取登录人和上级主管的empNum和名称
* *
* @param * @param
* @return * @return
*/ */
...@@ -1880,16 +1917,16 @@ public class YgglController { ...@@ -1880,16 +1917,16 @@ public class YgglController {
@ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) { public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) {
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>(); List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer gw = empNumConfirm(orgCode, empNum).getBmgwId(); Integer gw = empNumConfirm(orgCode, empNum).getBmgwId();
if(gw != null && gw > 0) { if(gw != null && gw > 0) {
ZzglBmgwM buid = ZzglBmgwM.builder().id(gw).build().selectById(); ZzglBmgwM buid = ZzglBmgwM.builder().id(gw).build().selectById();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();
// 获取该员工的上级部门id 的数组list // 获取该员工的上级部门id 的数组list
...@@ -1905,7 +1942,7 @@ public class YgglController { ...@@ -1905,7 +1942,7 @@ public class YgglController {
} }
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList); List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
// List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>(); // List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for (Integer leaderId : leaderList) { for (Integer leaderId : leaderList) {
for (YgglMainEmp m : ygglMainEmps) { for (YgglMainEmp m : ygglMainEmps) {
if(leaderId.equals(m.getEmpNum())) { if(leaderId.equals(m.getEmpNum())) {
...@@ -1915,10 +1952,10 @@ public class YgglController { ...@@ -1915,10 +1952,10 @@ public class YgglController {
loginerChargeDtos.add(new LoginerChargeDto(m.getEmpNum(), m.getName(), m.getHeadUrl())); loginerChargeDtos.add(new LoginerChargeDto(m.getEmpNum(), m.getName(), m.getHeadUrl()));
} }
} }
} }
Collections.reverse(loginerChargeDtos); Collections.reverse(loginerChargeDtos);
if(loginerChargeDtos.size()>0) { if(loginerChargeDtos.size()>0) {
if((userBean.getEmpNum()).equals(loginerChargeDtos.get(loginerChargeDtos.size()-1).getLeaderEmpNum())) { if((userBean.getEmpNum()).equals(loginerChargeDtos.get(loginerChargeDtos.size()-1).getLeaderEmpNum())) {
...@@ -1928,7 +1965,7 @@ public class YgglController { ...@@ -1928,7 +1965,7 @@ public class YgglController {
return ResultUtil.data(loginerChargeDtos); return ResultUtil.data(loginerChargeDtos);
} }
return ResultUtil.data(loginerChargeDtos); return ResultUtil.data(loginerChargeDtos);
} }
// 根据传来的empNum获取该人员信息,没有则传全部 // 根据传来的empNum获取该人员信息,没有则传全部
...@@ -1958,7 +1995,7 @@ public class YgglController { ...@@ -1958,7 +1995,7 @@ public class YgglController {
/** /**
* 获取用户头像 * 获取用户头像
* *
* @param * @param
* @return * @return
*/ */
...@@ -1980,51 +2017,51 @@ public class YgglController { ...@@ -1980,51 +2017,51 @@ public class YgglController {
} }
return ResultUtil.data(yglList); return ResultUtil.data(yglList);
} }
@Autowired @Autowired
private KqglAssoLeaveBalanceMapper kqglassoleavebalancemapper; private KqglAssoLeaveBalanceMapper kqglassoleavebalancemapper;
@GetMapping(value = "/address_book") @GetMapping(value = "/address_book")
@ApiOperation(value = "APP 获取通讯录", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "APP 获取通讯录", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
public Result<Object> Getaddressbook(@CurrentUser UserBean userBean) { public Result<Object> Getaddressbook(@CurrentUser UserBean userBean) {
List<AdditionalDto> userlist = kqglassoleavebalancemapper.selectAdditionalList(userBean.getOrgCode()); List<AdditionalDto> userlist = kqglassoleavebalancemapper.selectAdditionalList(userBean.getOrgCode());
return ResultUtil.data(userlist); return ResultUtil.data(userlist);
} }
@PostMapping(value = "/modify_avatar") @PostMapping(value = "/modify_avatar")
@ApiOperation(value = "APP_修改头像", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "APP_修改头像", httpMethod = "POST", notes = "接口发布说明")
public Result<YgglAttaSbgjj> Modify_Avatar(@CurrentUser UserBean userBean, @RequestBody ModifyAvatarDto modifyavatardto) { public Result<YgglAttaSbgjj> Modify_Avatar(@CurrentUser UserBean userBean, @RequestBody ModifyAvatarDto modifyavatardto) {
YgglMainEmp.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()) YgglMainEmp.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getEmpNum, userBean.getEmpNum())); .eq(YgglMainEmp::getEmpNum, userBean.getEmpNum()));
QyzxEmpLogin.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()) QyzxEmpLogin.builder().headUrl(modifyavatardto.getAvatar_path()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode())
.eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone())); .eq(QyzxEmpLogin::getPhone, userBean.getQyzxEmpLogin().getPhone()));
return ResultUtil.success("上传成功"); return ResultUtil.success("上传成功");
} }
@PostMapping(value = "/new_account") @PostMapping(value = "/new_account")
@ApiOperation(value = "修改账号", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "修改账号", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> New_account(@CurrentUser UserBean userBean, @RequestBody UserInfo userinfo) { public Result<Object> New_account(@CurrentUser UserBean userBean, @RequestBody UserInfo userinfo) {
YgglMainEmp sjhpd = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getPhone, userinfo.getPhone()) YgglMainEmp sjhpd = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getPhone, userinfo.getPhone())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if(sjhpd == null) { if(sjhpd == null) {
YgglMainEmp.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, userinfo.getName()).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); YgglMainEmp.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, userinfo.getName()).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
QyzxEmpLogin.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId,userinfo.getName()).eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode())); QyzxEmpLogin.builder().phone(userinfo.getPhone()).build().update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId,userinfo.getName()).eq(QyzxEmpLogin::getOrgId, userBean.getOrgCode()));
return ResultUtil.success("修改成功"); return ResultUtil.success("修改成功");
}else { }else {
return ResultUtil.error("该号码已存在"); return ResultUtil.error("该号码已存在");
} }
} }
@GetMapping(value = "/getUserList") @GetMapping(value = "/getUserList")
...@@ -2040,6 +2077,26 @@ public class YgglController { ...@@ -2040,6 +2077,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)
......
...@@ -44,17 +44,23 @@ public class ZpglH5Controller { ...@@ -44,17 +44,23 @@ public class ZpglH5Controller {
@ApiOperation(value = "添加面试申请", httpMethod = "POST", notes = "添加面试申请") @ApiOperation(value = "添加面试申请", httpMethod = "POST", notes = "添加面试申请")
@Log(title = "addInterviewApplication", businessType = BusinessType.INSERT_UPDATE) @Log(title = "addInterviewApplication", businessType = BusinessType.INSERT_UPDATE)
public Result<Object> addInterviewApplication(@Validated @RequestBody InterviewApplicationDto dto) { public Result<Object> addInterviewApplication(@Validated @RequestBody InterviewApplicationDto dto) {
System.out.println(dto); System.out.println(dto);
ZpglRcxx zpglRcxx = new ZpglRcxx(); ZpglRcxx zpglRcxx = new ZpglRcxx();
//复制到 ZpglRcxx 实体对象 //复制到 ZpglRcxx 实体对象
BeanUtils.copyProperties(dto,zpglRcxx); BeanUtils.copyProperties(dto,zpglRcxx);
/**
* 新增需要添加
* 是否初始化面试流程记录
*/
boolean insertZpglMslcLogFlag = StringUtils.isEmpty(zpglRcxx.getId());
// 计算工作年限 // 计算工作年限
if(!StringUtils.isEmpty(zpglRcxx.getWorkBeginYear())){ if(!StringUtils.isEmpty(zpglRcxx.getWorkBeginYear())){
zpglRcxx.setWorkyears(DateFormatUtils.yearCompare(zpglRcxx.getWorkBeginYear(),new Date())); zpglRcxx.setWorkyears(DateFormatUtils.yearCompare(zpglRcxx.getWorkBeginYear(),new Date()));
} }
zpglRcxx.insertOrUpdate(); zpglRcxx.insertOrUpdate();
if(StringUtils.isEmpty(zpglRcxx.getId())){ if(insertZpglMslcLogFlag){
// 新增人才信息 初始化流程记录 // 新增人才信息 初始化流程记录
ZpglMslcLog zpglMslcLog = new ZpglMslcLog(); ZpglMslcLog zpglMslcLog = new ZpglMslcLog();
zpglMslcLog.setZpglRcxxId(zpglRcxx.getId()); zpglMslcLog.setZpglRcxxId(zpglRcxx.getId());
......
...@@ -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);
}
} }
...@@ -26,7 +26,7 @@ import cn.timer.api.dto.zzgl.UpEmpDeptDto; ...@@ -26,7 +26,7 @@ import cn.timer.api.dto.zzgl.UpEmpDeptDto;
/** /**
* 部门岗位 服务逻辑层 * 部门岗位 服务逻辑层
* *
* @author Tang * @author Tang
*/ */
@Service @Service
...@@ -34,16 +34,16 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -34,16 +34,16 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
@Autowired @Autowired
private ZzglBmgwMMapper zzglBmgwMMapper; private ZzglBmgwMMapper zzglBmgwMMapper;
@Autowired @Autowired
private ZzglMenuMapper zzglMenuMapper; private ZzglMenuMapper zzglMenuMapper;
@Autowired @Autowired
private YgglMainEmpMapper ygglMainEmpMapper; private YgglMainEmpMapper ygglMainEmpMapper;
@Autowired @Autowired
private ZzglLogDgjlMapper zzglLogDgjlMapper; private ZzglLogDgjlMapper zzglLogDgjlMapper;
/** /**
* 根据 员工 的 岗位,以及上面所有的部门id,返回integer数组 * 根据 员工 的 岗位,以及上面所有的部门id,返回integer数组
*/ */
...@@ -62,7 +62,7 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -62,7 +62,7 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
all.add(getId); all.add(getId);
return ListUtil.toList(all); return ListUtil.toList(all);
} }
//遍历 //遍历
public Set<Integer> empNumupdept2(Set<Integer> lanzi,List<ZzglBmgwM> bmgws,Integer getId) { public Set<Integer> empNumupdept2(Set<Integer> lanzi,List<ZzglBmgwM> bmgws,Integer getId) {
for (ZzglBmgwM z : bmgws) { for (ZzglBmgwM z : bmgws) {
...@@ -88,23 +88,34 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -88,23 +88,34 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
List<Integer> empNums = new ArrayList<Integer>(); List<Integer> empNums = new ArrayList<Integer>();
empNums.add(empNum); empNums.add(empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
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);
} }
@Override @Override
public List<Integer> selectMenuByPostId(Integer id) { public List<Integer> selectMenuByPostId(Integer id) {
List<ZzglMenu> list = zzglMenuMapper.selectMenuByPostId(id); List<ZzglMenu> list = zzglMenuMapper.selectMenuByPostId(id);
List<Integer> menuList = list.stream().map(ZzglMenu::getMenuId).collect(Collectors.toList()); List<Integer> menuList = list.stream().map(ZzglMenu::getMenuId).collect(Collectors.toList());
return menuList; return menuList;
} }
@Override @Override
public List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){ public List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
...@@ -126,5 +137,5 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -126,5 +137,5 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
} }
} }
} }
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> {
}
...@@ -19,7 +19,7 @@ import cn.timer.api.dto.zzgl.DepartmentStaffDto; ...@@ -19,7 +19,7 @@ import cn.timer.api.dto.zzgl.DepartmentStaffDto;
/** /**
* 员工档案+统计图查询 * 员工档案+统计图查询
* *
* @author dsc 2019-11-23 * @author dsc 2019-11-23
*/ */
@Repository @Repository
...@@ -30,17 +30,17 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -30,17 +30,17 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
List<YgbintuDto> rsybp(Integer orgCode); List<YgbintuDto> rsybp(Integer orgCode);
/** /**
* 查询当月离职人数 * 查询当月离职人数
* @param userBean * @param userBean
* @return * @return
*/ */
Integer benyueLz(Integer orgCode); Integer benyueLz(Integer orgCode);
/** /**
* 查询当月转正人数 * 查询当月转正人数
* @param userBean * @param userBean
* @return * @return
*/ */
Integer benyueZz(Integer orgCode); Integer benyueZz(Integer orgCode);
...@@ -50,74 +50,74 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -50,74 +50,74 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode, @Param("isInsure")Integer isInsure); List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode, @Param("isInsure")Integer isInsure);
/** /**
* 查询在职员工(试用员工人数+正式员工人数) * 查询在职员工(试用员工人数+正式员工人数)
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryInservice(UserBean userBean); YgglCartogramDto queryInservice(UserBean userBean);
/** /**
* 查询当月入职人数 * 查询当月入职人数
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryInduction(UserBean userBean); YgglCartogramDto queryInduction(UserBean userBean);
/** /**
* 查询本月转正人数 * 查询本月转正人数
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryPositive(UserBean userBean); YgglCartogramDto queryPositive(UserBean userBean);
/** /**
* 查询员工平均年龄 * 查询员工平均年龄
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryAvgAge(UserBean userBean); YgglCartogramDto queryAvgAge(UserBean userBean);
/** /**
* 查询部门名称及人数 * 查询部门名称及人数
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryDepartmentNum(UserBean userBean); List<YgglCartogramDto> queryDepartmentNum(UserBean userBean);
/** /**
* 查询岗位名称及人数 * 查询岗位名称及人数
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryJobsNum(UserBean userBean); List<YgglCartogramDto> queryJobsNum(UserBean userBean);
/** /**
* 学历及人数查询 * 学历及人数查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryEducation(UserBean userBean); List<YgglCartogramDto> queryEducation(UserBean userBean);
/** /**
* 员工年龄分布查询 * 员工年龄分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryEmpAge(UserBean userBean); List<YgglCartogramDto> queryEmpAge(UserBean userBean);
/** /**
* 籍贯统计(省份)人数分布查询 * 籍贯统计(省份)人数分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryNativeplace(UserBean userBean); List<YgglCartogramDto> queryNativeplace(UserBean userBean);
/** /**
* 员工工龄分布查询 * 员工工龄分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryWorkingAge(UserBean userBean); List<YgglCartogramDto> queryWorkingAge(UserBean userBean);
...@@ -129,7 +129,7 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -129,7 +129,7 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery); IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery);
List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid); List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid);
/** /**
...@@ -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,11 +2,12 @@ package cn.timer.api.dao.zzgl; ...@@ -2,11 +2,12 @@ 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;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.zzgl.ZzglLogDgjl; import cn.timer.api.bean.zzgl.ZzglLogDgjl;
import cn.timer.api.dto.zzgl.LogDgjlsDto; import cn.timer.api.dto.zzgl.LogDgjlsDto;
...@@ -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);
} }
...@@ -19,16 +19,19 @@ public class YgzzDto implements Serializable{ ...@@ -19,16 +19,19 @@ public class YgzzDto implements Serializable{
@ApiModelProperty(value="工号",example="9527") @ApiModelProperty(value="工号",example="9527")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="企业id",example="12") @ApiModelProperty(value="企业id",example="12")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="应转正时间",example="1999-12-03") @ApiModelProperty(value="应转正时间",example="1999-12-03")
private Date zzTime; private Date zzTime;
@ApiModelProperty(value="实际转正时间",example="2019-12-03") @ApiModelProperty(value="实际转正时间",example="2019-12-03")
private Date sjzzTime; private Date sjzzTime;
@ApiModelProperty(value="转正原因",example="有梦想") @ApiModelProperty(value="转正原因",example="有梦想")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="岗位",example="有梦想")
private Integer bmgwId;
} }
...@@ -25,11 +25,24 @@ public class UpEmpDeptDto implements Serializable{ ...@@ -25,11 +25,24 @@ public class UpEmpDeptDto implements Serializable{
@ApiModelProperty(value="'职位'",example="''职位''") @ApiModelProperty(value="'职位'",example="''职位''")
private String post; private String post;
@ApiModelProperty(value="员工工号",example="2") @ApiModelProperty(value="员工工号",example="2")
private List<Integer> empNum; private List<Integer> empNum;
@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>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.yggl.YgglMainEmpMapper"> <mapper namespace="cn.timer.api.dao.yggl.YgglMainEmpMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglMainEmp" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglMainEmp" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="emp_num" property="empNum" /> <result column="emp_num" property="empNum" />
<result column="phone" property="phone" /> <result column="phone" property="phone" />
<result column="password" property="password" /> <result column="password" property="password" />
<result column="head_url" property="headUrl" /> <result column="head_url" property="headUrl" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="english_name" property="englishName" /> <result column="english_name" property="englishName" />
<result column="sex" property="sex" /> <result column="sex" property="sex" />
<result column="zj_type" property="zjType" /> <result column="zj_type" property="zjType" />
<result column="zj_num" property="zjNum" /> <result column="zj_num" property="zjNum" />
<result column="sfzyx_time" property="sfzyxTime" /> <result column="sfzyx_time" property="sfzyxTime" />
<result column="birthday" property="birthday" /> <result column="birthday" property="birthday" />
<result column="age" property="age" /> <result column="age" property="age" />
<result column="is_married" property="isMarried" /> <result column="is_married" property="isMarried" />
<result column="is_pregnant" property="isPregnant" /> <result column="is_pregnant" property="isPregnant" />
<result column="area" property="area" /> <result column="area" property="area" />
<result column="mz" property="mz" /> <result column="mz" property="mz" />
<result column="zzmm" property="zzmm" /> <result column="zzmm" property="zzmm" />
<result column="jg" property="jg" /> <result column="jg" property="jg" />
<result column="city" property="city" /> <result column="city" property="city" />
<result column="hk_type" property="hkType" /> <result column="hk_type" property="hkType" />
<result column="hk_address" property="hkAddress" /> <result column="hk_address" property="hkAddress" />
<result column="qq" property="qq" /> <result column="qq" property="qq" />
<result column="wechat" property="wechat" /> <result column="wechat" property="wechat" />
<result column="email" property="email" /> <result column="email" property="email" />
<result column="blood_type" property="bloodType" /> <result column="blood_type" property="bloodType" />
<result column="language" property="language" /> <result column="language" property="language" />
<result column="edu" property="edu" /> <result column="edu" property="edu" />
<result column="zy" property="zy" /> <result column="zy" property="zy" />
<result column="zz_remark" property="zzRemark" /> <result column="zz_remark" property="zzRemark" />
<result column="job_type" property="jobType" /> <result column="job_type" property="jobType" />
<result column="job_status" property="jobStatus" /> <result column="job_status" property="jobStatus" />
<result column="rz_time" property="rzTime" /> <result column="rz_time" property="rzTime" />
<result column="syq" property="syq" /> <result column="syq" property="syq" />
<result column="zz_time" property="zzTime" /> <result column="zz_time" property="zzTime" />
<result column="sjzz_time" property="sjzzTime" /> <result column="sjzz_time" property="sjzzTime" />
<result column="is_jrkq" property="isJrkq" /> <result column="is_jrkq" property="isJrkq" />
<result column="job_num" property="jobNum" /> <result column="job_num" property="jobNum" />
<result column="work_address" property="workAddress" /> <result column="work_address" property="workAddress" />
<result column="work_phone" property="workPhone" /> <result column="work_phone" property="workPhone" />
<result column="work_email" property="workEmail" /> <result column="work_email" property="workEmail" />
<result column="zpqd" property="zpqd" /> <result column="zpqd" property="zpqd" />
<result column="bmgw_id" property="bmgwId" /> <result column="bmgw_id" property="bmgwId" />
<result column="bmgw_name" property="bmgwName" /> <result column="bmgw_name" property="bmgwName" />
<result column="custom_num" property="customNum" /> <result column="custom_num" property="customNum" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="unionid" property="unionid" /> <result column="unionid" property="unionid" />
<result column="openid" property="openid" /> <result column="openid" property="openid" />
<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"/>
</resultMap> <result column="zpgl_zj_id" property="zpglZjId"/>
</resultMap>
<resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
<id column="id" property="id" /> <resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
<result column="age" property="age" /> <id column="id" property="id" />
<result column="bmgwId" property="bmgwId" /> <result column="age" property="age" />
<result column="gw" property="gw" /> <result column="bmgwId" property="bmgwId" />
<result column="bm" property="bm" /> <result column="gw" property="gw" />
<result column="proname" property="proname" /> <result column="bm" property="bm" />
<result column="eduname" property="eduname" /> <result column="proname" property="proname" />
<result column="jobStatus" property="jobStatus" /> <result column="eduname" property="eduname" />
<result column="workage" property="workage" /> <result column="jobStatus" property="jobStatus" />
</resultMap> <result column="workage" property="workage" />
</resultMap>
<resultMap id="DepartmentStaffMap" type="cn.timer.api.dto.zzgl.DepartmentStaffDto" >
<id column="id" property="id" /> <resultMap id="DepartmentStaffMap" type="cn.timer.api.dto.zzgl.DepartmentStaffDto" >
<result column="empNum" property="empNum" /> <id column="id" property="id" />
<result column="name" property="name" /> <result column="empNum" property="empNum" />
<result column="phone" property="phone" /> <result column="name" property="name" />
<result column="bmgwname" property="bmgwname" /> <result column="phone" property="phone" />
</resultMap> <result column="bmgwname" property="bmgwname" />
</resultMap>
<sql id="Base_Column_List">
id, <sql id="Base_Column_List">
emp_num, id,
phone, emp_num,
password, phone,
head_url, password,
name, head_url,
english_name, name,
sex, english_name,
zj_type, sex,
zj_num, zj_type,
sfzyx_time, zj_num,
birthday, sfzyx_time,
age, birthday,
is_married, age,
is_pregnant, is_married,
area, is_pregnant,
mz, area,
zzmm, mz,
jg, zzmm,
city, jg,
hk_type, city,
hk_address, hk_type,
qq, hk_address,
wechat, qq,
email, wechat,
blood_type, email,
language, blood_type,
edu, language,
zy, edu,
zz_remark, zy,
job_type, zz_remark,
job_status, job_type,
rz_time, job_status,
syq, rz_time,
zz_time, syq,
sjzz_time, zz_time,
is_jrkq, sjzz_time,
job_num, is_jrkq,
work_address, job_num,
work_phone, work_address,
work_email, work_phone,
zpqd, work_email,
bmgw_id, zpqd,
org_code, bmgw_id,
unionid, org_code,
openid, unionid,
mpopenid, openid,
appopenid, mpopenid,
custom_num, appopenid,
is_insure custom_num,
</sql> is_insure,
zpgl_zj_id
<sql id="Base_Column_List_a"> </sql>
a.id,
a.emp_num, <sql id="Base_Column_List_a">
a.phone, a.id,
a.head_url, a.emp_num,
a.name, a.phone,
a.english_name, a.head_url,
a.sex, a.name,
a.birthday, a.english_name,
a.jg, a.sex,
a.job_type, a.birthday,
a.job_status, a.jg,
a.rz_time, a.job_type,
a.bmgw_id, a.job_status,
a.org_code, a.rz_time,
a.zj_type, a.bmgw_id,
a.zj_num, a.org_code,
a.syq, a.zj_type,
a.zz_time, a.zj_num,
a.custom_num, a.syq,
a.is_insure a.zz_time,
a.custom_num,
</sql> a.is_insure,
a.zpgl_zj_id
<!-- rsybp人事仪表盘 -->
<select id="rsybp" resultMap="Bintu"> </sql>
SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw,
IFNULL(bb.`name`,'null') AS bm,IFNULL( p.`name`,'null') AS proname,IFNULL(d.`name` ,'null')AS eduname, <!-- rsybp人事仪表盘 -->
IFNULL(e.job_status,0) AS jobStatus,IFNULL(datediff(CURDATE(),e.rz_time),0)AS workage <select id="rsybp" resultMap="Bintu">
FROM yggl_main_emp e SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw,
LEFT JOIN zzgl_bmgw_m b ON b.id = e.bmgw_id IFNULL(bb.`name`,'null') AS bm,IFNULL( p.`name`,'null') AS proname,IFNULL(d.`name` ,'null')AS eduname,
LEFT JOIN zzgl_bmgw_m bb ON bb.id = b.up_id IFNULL(e.job_status,0) AS jobStatus,IFNULL(datediff(CURDATE(),e.rz_time),0)AS workage
LEFT JOIN province_class p ON left (e.`jg`,2) = p.province FROM yggl_main_emp e
LEFT JOIN education_class d ON d.number = e.edu LEFT JOIN zzgl_bmgw_m b ON b.id = e.bmgw_id
WHERE e.org_code = #{orgCode} LEFT JOIN zzgl_bmgw_m bb ON bb.id = b.up_id
</select> LEFT JOIN province_class p ON left (e.`jg`,2) = p.province
LEFT JOIN education_class d ON d.number = e.edu
<select id="DepartmentStaff" resultMap="DepartmentStaffMap"> WHERE e.org_code = #{orgCode}
select em.emp_num as empNum, </select>
em.`name` as empname,
bm.`name` as bmgwname, <select id="DepartmentStaff" resultMap="DepartmentStaffMap">
em.phone select em.emp_num as empNum,
from yggl_main_emp em em.`name` as empname,
LEFT JOIN zzgl_bmgw_m as bm on bm.id = em.bmgw_id bm.`name` as bmgwname,
where em.org_code = #{orgcode} em.phone
and em.bmgw_id in (select bm.id from zzgl_bmgw_m bm from yggl_main_emp em
WHERE bm.up_id = #{upid}) LEFT JOIN zzgl_bmgw_m as bm on bm.id = em.bmgw_id
</select> where em.org_code = #{orgcode}
and em.bmgw_id in (select bm.id from zzgl_bmgw_m bm
<select id="selectME" resultMap="BaseResultMap"> WHERE bm.up_id = #{upid})
SELECT </select>
<include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = a.bmgw_id limit 1) limit 1) as bmgw_name <select id="selectME" resultMap="BaseResultMap">
FROM yggl_main_emp a SELECT
<where> <include refid="Base_Column_List_a" />,
AND a.org_code = #{param.orgCode} (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = a.bmgw_id limit 1) limit 1) as bmgw_name
FROM yggl_main_emp a
<if test="param.jobType != null"> <where>
AND a.job_type = #{param.jobType} AND a.org_code = #{param.orgCode}
</if>
<if test="param.jobType != null">
<if test="param.status == 1"> AND a.job_type = #{param.jobType}
AND a.job_status BETWEEN 0 and 3 </if>
</if>
<if test="param.status == 2"> <if test="param.status == 1">
AND a.job_type = 0 AND a.job_status BETWEEN 0 and 3
</if> </if>
<if test="param.status == 3"> <if test="param.status == 2">
AND a.job_status = 0 AND a.job_type = 0
</if> </if>
<if test="param.status == 4"> <if test="param.status == 3">
AND a.job_status = 1 AND a.job_status = 0
</if> </if>
<if test="param.status == 5"> <if test="param.status == 4">
AND a.job_status = 2 AND a.job_status = 1
</if> </if>
<if test="param.status == 6"> <if test="param.status == 5">
AND a.job_status = 3 AND a.job_status = 2
</if> </if>
<if test="param.status == 6">
<if test="param.query != null and param.query != ''"> AND a.job_status = 3
AND ( </if>
a.name like CONCAT('%',#{param.query},'%') or
a.phone like CONCAT('%',#{param.query},'%') <if test="param.query != null and param.query != ''">
) AND (
</if> a.name like CONCAT('%',#{param.query},'%') or
<if test="param.empNums != null and param.empNums.size() > 0"> a.phone like CONCAT('%',#{param.query},'%')
<choose> )
<when test="param.empNums.size() > 1"> </if>
AND a.emp_num IN <if test="param.empNums != null and param.empNums.size() > 0">
( <choose>
<foreach item="it" index="index" collection="param.empNums" separator="," close="" > <when test="param.empNums.size() > 1">
#{it} AND a.emp_num IN
</foreach> (
) <foreach item="it" index="index" collection="param.empNums" separator="," close="" >
</when> #{it}
<otherwise> </foreach>
AND a.emp_num = #{param.empNums[0]} )
</otherwise> </when>
</choose> <otherwise>
</if> AND a.emp_num = #{param.empNums[0]}
</where> </otherwise>
</select> </choose>
</if>
<!-- benyueLz本月离职人数 --> </where>
<select id="benyueLz" resultType="Integer"> </select>
SELECT COUNT(datediff(CURDATE(),l.sjlz_time)) FROM yggl_main_lzb l WHERE datediff(CURDATE(),l.sjlz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
</select> <!-- benyueLz本月离职人数 -->
<select id="benyueLz" resultType="Integer">
<!-- benyueZz本月转正人数 --> SELECT COUNT(datediff(CURDATE(),l.sjlz_time)) FROM yggl_main_lzb l WHERE datediff(CURDATE(),l.sjlz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
<select id="benyueZz" resultType="Integer"> </select>
SELECT COUNT(datediff(CURDATE(),e.sjzz_time)) FROM yggl_main_emp e WHERE datediff(CURDATE(),e.sjzz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
</select> <!-- benyueZz本月转正人数 -->
<select id="benyueZz" resultType="Integer">
<!-- 查询员工信息 搜索 分页 --> SELECT COUNT(datediff(CURDATE(),e.sjzz_time)) FROM yggl_main_emp e WHERE datediff(CURDATE(),e.sjzz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
<select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto"> </select>
SELECT
a.name empName, <!-- 查询员工信息 搜索 分页 -->
a.emp_num empNum, <select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto">
b.name deptName, SELECT
a.rz_time rzTime, a.name empName,
a.job_type jobType, a.emp_num empNum,
a.phone phone, b.name deptName,
a.job_status jobStatus, a.rz_time rzTime,
a.head_url headUrl, a.job_type jobType,
a.sex sex, a.phone phone,
a.is_insure isInsure, a.job_status jobStatus,
a.zj_num zjNum a.head_url headUrl,
FROM a.sex sex,
yggl_main_emp a a.is_insure isInsure,
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id a.zj_num zjNum
WHERE FROM
a.org_code = #{orgCode} yggl_main_emp a
AND LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
a.job_status in (0,1,2) WHERE
<if test="isInsure!=null and isInsure != ''"> a.org_code = #{orgCode}
AND a.is_insure=#{isInsure} AND
</if> a.job_status in (0,1,2)
ORDER BY <if test="isInsure!=null and isInsure != ''">
emp_num DESC AND a.is_insure=#{isInsure}
</select> </if>
ORDER BY
<!-- 查询在职员工(试用员工人数+正式员工人数) --> emp_num DESC
<select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
SUM(job_status=1) AS probation, <!-- 查询在职员工(试用员工人数+正式员工人数) -->
SUM(job_status=2) AS regular <select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
FROM SELECT
yggl_main_emp SUM(job_status=1) AS probation,
WHERE SUM(job_status=2) AS regular
org_code=#{orgCode} FROM
</select> yggl_main_emp
WHERE
<!-- 查询当月入职人数 --> org_code=#{orgCode}
<select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
EXTRACT(MONTH FROM rz_time) AS month, <!-- 查询当月入职人数 -->
COUNT(emp_num) induction <select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
FROM SELECT
yggl_main_emp EXTRACT(MONTH FROM rz_time) AS month,
WHERE COUNT(emp_num) induction
org_code=#{orgCode} FROM
</select> yggl_main_emp
WHERE
org_code=#{orgCode}
<!-- 查询本月转正人数 --> </select>
<select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT
EXTRACT(MONTH FROM sjzz_time) AS month, <!-- 查询本月转正人数 -->
COUNT(emp_num) positive <select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
FROM SELECT
yggl_main_emp EXTRACT(MONTH FROM sjzz_time) AS month,
WHERE COUNT(emp_num) positive
org_code=#{orgCode} FROM
</select> yggl_main_emp
WHERE
<!-- 查询员工平均年龄 --> org_code=#{orgCode}
<select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
avg(age) avgAge <!-- 查询员工平均年龄 -->
FROM <select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
yggl_main_emp SELECT
WHERE avg(age) avgAge
org_code=#{orgCode} FROM
</select> yggl_main_emp
WHERE
<!-- 查询岗位上级部门id及名称及人数 --> org_code=#{orgCode}
<select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
IFNULL(c.name,'null') updeptname, <!-- 查询岗位上级部门id及名称及人数 -->
IFNULL(b.up_id,0) updeptid, <select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
count(1) updeptnum SELECT
FROM IFNULL(c.name,'null') updeptname,
yggl_main_emp y IFNULL(b.up_id,0) updeptid,
LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id count(1) updeptnum
LEFT JOIN zzgl_bmgw_m c ON c.id = b.up_id FROM
WHERE yggl_main_emp y
y.org_code = #{orgCode} LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id
GROUP BY LEFT JOIN zzgl_bmgw_m c ON c.id = b.up_id
c.name, WHERE
b.up_id y.org_code = #{orgCode}
</select> GROUP BY
c.name,
<!-- 查询岗位名称及人数 --> b.up_id
<select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
IFNULL(b.name,'null') jobname, <!-- 查询岗位名称及人数 -->
IFNULL(y.bmgw_id,0) jobid, <select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
count(1) jobnum SELECT
FROM IFNULL(b.name,'null') jobname,
yggl_main_emp y IFNULL(y.bmgw_id,0) jobid,
LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id count(1) jobnum
WHERE FROM
y.org_code = #{orgCode} yggl_main_emp y
GROUP BY LEFT JOIN zzgl_bmgw_m b ON y.bmgw_id = b.id
y.bmgw_id, WHERE
b.name; y.org_code = #{orgCode}
</select> GROUP BY
y.bmgw_id,
<!-- 学历及人数查询 --> b.name;
<select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
IFNULL(e.name,'null') education,count(y.edu) educationNum <!-- 学历及人数查询 -->
FROM <select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
yggl_main_emp y SELECT
LEFT JOIN IFNULL(e.name,'null') education,count(y.edu) educationNum
education_class e FROM
ON yggl_main_emp y
y.edu = e.id LEFT JOIN
WHERE education_class e
org_code = #{orgCode} ON
GROUP BY y.edu = e.id
e.name WHERE
ORDER BY org_code = #{orgCode}
e.id ASC GROUP BY
</select> e.name
ORDER BY
<!-- 员工年龄分布查询 --> e.id ASC
<select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
<![CDATA[
SELECT <!-- 员工年龄分布查询 -->
SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen, <select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive, <![CDATA[
SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo, SELECT
SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight, SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen,
SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive, SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive,
SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo,
FROM SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight,
yggl_main_emp SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive,
WHERE SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive
org_code = #{orgCode} FROM
]]> yggl_main_emp
</select> WHERE
org_code = #{orgCode}
<!-- 籍贯统计(省份)查询 --> ]]>
<select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
SELECT
IFNULL(c.city_name,'null') province,count(y.jg_id) provinceNum <!-- 籍贯统计(省份)查询 -->
FROM <select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
yggl_main_emp y SELECT
LEFT JOIN IFNULL(c.city_name,'null') province,count(y.jg_id) provinceNum
common_area c FROM
ON yggl_main_emp y
y.jg_id = c.code_id LEFT JOIN
WHERE common_area c
org_code = #{orgCode} ON
GROUP BY y.jg_id = c.code_id
c.city_name WHERE
</select> org_code = #{orgCode}
GROUP BY
<!-- 员工工龄分布查询 --> c.city_name
<select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> </select>
<![CDATA[
SELECT <!-- 员工工龄分布查询 -->
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear, <select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear, <![CDATA[
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear, SELECT
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear,
FROM SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear,
yggl_main_emp SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear,
WHERE SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear
org_code = #{orgCode} FROM
]]> yggl_main_emp
</select> WHERE
<!-- 查询在职员工数 --> org_code = #{orgCode}
<select id="selectEmpCount" resultType="Integer"> ]]>
<if test="status != null and status != ''"> </select>
<if test="status == 1"> <!-- 查询在职员工数 -->
SELECT SUM(job_status BETWEEN 0 and 3) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode} <select id="selectEmpCount" resultType="Integer">
</if> <if test="status != null and status != ''">
<if test="status == 2"> <if test="status == 1">
SELECT SUM(job_type = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode} SELECT SUM(job_status BETWEEN 0 and 3) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if> </if>
<if test="status == 3"> <if test="status == 2">
SELECT SUM(job_status = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode} SELECT SUM(job_type = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if> </if>
<if test="status == 4"> <if test="status == 3">
SELECT SUM(job_status = 1) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode} SELECT SUM(job_status = 0) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if> </if>
<if test="status == 5"> <if test="status == 4">
SELECT SUM(job_status = 2) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode} SELECT SUM(job_status = 1) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if> </if>
<if test="status == 6"> <if test="status == 5">
SELECT SUM(job_status = 3) AS probation FROM yggl_main_lzb WHERE org_code = #{orgCode} SELECT SUM(job_status = 2) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}
</if> </if>
</if> <if test="status == 6">
SELECT SUM(job_status = 3) AS probation FROM yggl_main_lzb WHERE org_code = #{orgCode}
</select> </if>
</if>
<!--根据id数组查询员工-->
<select id="selectListByIds" resultType="cn.timer.api.bean.yggl.YgglMainEmp"> </select>
SELECT
<include refid="Base_Column_List"/> <!--根据id数组查询员工-->
FROM yggl_main_emp <select id="selectListByIds" resultType="cn.timer.api.bean.yggl.YgglMainEmp">
WHERE id IN SELECT
<foreach item="id" collection="array" open="(" separator="," close=")"> <include refid="Base_Column_List"/>
#{id} FROM yggl_main_emp
</foreach> WHERE id IN
</select> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
<select id="selectListByIZjNum" resultType="cn.timer.api.bean.yggl.YgglMainEmp"> </foreach>
SELECT </select>
<include refid="Base_Column_List"/>
FROM yggl_main_emp <select id="selectListByIZjNum" resultType="cn.timer.api.bean.yggl.YgglMainEmp">
WHERE org_code = #{orgCode} and zj_num IN SELECT
<foreach item="zjnum" collection="array" open="(" separator="," close=")"> <include refid="Base_Column_List"/>
#{zjnum} FROM yggl_main_emp
</foreach> WHERE org_code = #{orgCode} and zj_num IN
</select> <foreach item="zjnum" collection="array" open="(" separator="," close=")">
</mapper> #{zjnum}
\ No newline at end of file </foreach>
</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>
...@@ -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,9 +109,10 @@ ...@@ -107,9 +109,10 @@
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">
id YgglMainLzb_id, id YgglMainLzb_id,
emp_num YgglMainLzb_emp_num, emp_num YgglMainLzb_emp_num,
...@@ -160,14 +163,15 @@ ...@@ -160,14 +163,15 @@
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">
SELECT SELECT
EXTRACT(MONTH FROM sjlz_time) AS mouth, EXTRACT(MONTH FROM sjlz_time) AS mouth,
COUNT(emp_num) departureNum COUNT(emp_num) departureNum
FROM FROM
yggl_main_lzb yggl_main_lzb
WHERE WHERE
org_code=#{orgCode} org_code=#{orgCode}
...@@ -208,7 +212,7 @@ ...@@ -208,7 +212,7 @@
ORDER BY a.job_status ASC ORDER BY a.job_status ASC
</select> </select>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainLzb"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainLzb">
INSERT INTO yggl_main_lzb INSERT INTO yggl_main_lzb
...@@ -593,4 +597,4 @@ ...@@ -593,4 +597,4 @@
--> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -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">
...@@ -75,13 +79,13 @@ ...@@ -75,13 +79,13 @@
LEFT JOIN yggl_main_emp c ON a.emp_num = c.emp_num LEFT JOIN yggl_main_emp c ON a.emp_num = c.emp_num
LEFT JOIN zzgl_bmgw_m b ON a.obmgw_id = b.id LEFT JOIN zzgl_bmgw_m b ON a.obmgw_id = b.id
LEFT JOIN zzgl_bmgw_m e ON a.nbmgw_id = e.id LEFT JOIN zzgl_bmgw_m e ON a.nbmgw_id = e.id
LEFT JOIN yggl_main_emp d ON a.update_id = d.emp_num LEFT JOIN yggl_main_emp d ON a.update_id = d.emp_num
<where> <where>
a.org_code = #{param.orgCode} AND c.org_code = #{param.orgCode} AND b.org_code = #{param.orgCode} a.org_code = #{param.orgCode} AND c.org_code = #{param.orgCode} AND b.org_code = #{param.orgCode}
AND e.org_code = #{param.orgCode} AND d.org_code = #{param.orgCode} AND e.org_code = #{param.orgCode} AND d.org_code = #{param.orgCode}
<if test="null != param.query and param.query != ''"> <if test="null != param.query and param.query != ''">
and (c.name like CONCAT('%',#{param.query},'%') or and (c.name like CONCAT('%',#{param.query},'%') or
a.emp_num like CONCAT('%',#{param.query},'%') or a.emp_num like CONCAT('%',#{param.query},'%') or
c.phone like CONCAT('%',#{param.query},'%')) c.phone like CONCAT('%',#{param.query},'%'))
</if> </if>
<if test="param.deptIdList != null"> <if test="param.deptIdList != null">
...@@ -108,33 +112,47 @@ ...@@ -108,33 +112,47 @@
</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>
</insert> </insert>
<!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.zzgl.ZzglLogDgjl"> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.zzgl.ZzglLogDgjl">
INSERT INTO zzgl_log_dgjl <trim prefix="(" suffix=")" suffixOverrides=","> INSERT INTO zzgl_log_dgjl <trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != orgCode'> org_code, </if> <if test ='null != empNum'> <if test ='null != orgCode'> org_code, </if> <if test ='null != empNum'>
emp_num, </if> <if test ='null != obmgwId'> obmgw_id, </if> <if test ='null emp_num, </if> <if test ='null != obmgwId'> obmgw_id, </if> <if test ='null
!= nbmgwId'> nbmgw_id, </if> <if test ='null != updateId'> update_id, </if> != nbmgwId'> nbmgw_id, </if> <if test ='null != updateId'> update_id, </if>
<if test ='null != createTime'> create_time </if> </trim> <trim prefix="values <if test ='null != createTime'> create_time </if> </trim> <trim prefix="values
(" suffix=")" suffixOverrides=","> <if test ='null != orgCode'> #{orgCode}, (" suffix=")" suffixOverrides=","> <if test ='null != orgCode'> #{orgCode},
</if> <if test ='null != empNum'> #{empNum}, </if> <if test ='null != obmgwId'> </if> <if test ='null != empNum'> #{empNum}, </if> <if test ='null != obmgwId'>
#{obmgwId}, </if> <if test ='null != nbmgwId'> #{nbmgwId}, </if> <if test #{obmgwId}, </if> <if test ='null != nbmgwId'> #{nbmgwId}, </if> <if test
='null != updateId'> #{updateId}, </if> <if test ='null != createTime'> #{createTime} ='null != updateId'> #{updateId}, </if> <if test ='null != createTime'> #{createTime}
</if> </trim> </insert> <delete id="delete" > DELETE FROM zzgl_log_dgjl WHERE </if> </trim> </insert> <delete id="delete" > DELETE FROM zzgl_log_dgjl WHERE
id = #{id} </delete> <update id="update" parameterType="cn.timer.api.bean.zzgl.ZzglLogDgjl"> id = #{id} </delete> <update id="update" parameterType="cn.timer.api.bean.zzgl.ZzglLogDgjl">
UPDATE zzgl_log_dgjl <set> <if test ='null != orgCode'>org_code = #{orgCode},</if> UPDATE zzgl_log_dgjl <set> <if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != empNum'>emp_num = #{empNum},</if> <if test ='null != obmgwId'>obmgw_id <if test ='null != empNum'>emp_num = #{empNum},</if> <if test ='null != obmgwId'>obmgw_id
= #{obmgwId},</if> <if test ='null != nbmgwId'>nbmgw_id = #{nbmgwId},</if> = #{obmgwId},</if> <if test ='null != nbmgwId'>nbmgw_id = #{nbmgwId},</if>
<if test ='null != updateId'>update_id = #{updateId},</if> <if test ='null <if test ='null != updateId'>update_id = #{updateId},</if> <if test ='null
!= createTime'>create_time = #{createTime}</if> </set> WHERE id = #{id} </update> != createTime'>create_time = #{createTime}</if> </set> WHERE id = #{id} </update>
<select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" <select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List"
/> FROM zzgl_log_dgjl WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> /> FROM zzgl_log_dgjl WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM zzgl_log_dgjl LIMIT #{offset}, SELECT <include refid="Base_Column_List" /> FROM zzgl_log_dgjl LIMIT #{offset},
#{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> -->
</mapper> <select id="selectListByUser" resultType="cn.timer.api.bean.zzgl.ZzglLogDgjl">
\ No newline at end of file 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>
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