Commit dd2ff010 by ilal Committed by chenzg

提交

parent c00268a9
...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式") @ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts; private Integer beforeLeavingSts;
@ApiModelProperty(value="自定义工号",example="")
private String customNum;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
......
...@@ -248,10 +248,12 @@ public class YgglController { ...@@ -248,10 +248,12 @@ public class YgglController {
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto)
throws Exception { throws Exception {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String customNum = addygdaDto.getCustomNum();//自定义工号
String name = addygdaDto.getName(); String name = addygdaDto.getName();
String phone = addygdaDto.getPhone(); String phone = addygdaDto.getPhone();
Integer zjType = addygdaDto.getZjType(); Integer zjType = addygdaDto.getZjType();
String zjNum = addygdaDto.getZjNum(); String zjNum = addygdaDto.getZjNum();
int attgroupid = addygdaDto.getAttgroupid();//考勤组id
boolean isvalid = true; boolean isvalid = true;
switch (zjType) { switch (zjType) {
case 0: case 0:
...@@ -306,7 +308,11 @@ public class YgglController { ...@@ -306,7 +308,11 @@ public class YgglController {
.status(CommonEnum.U_STS_ON.getType()).build().insert(); .status(CommonEnum.U_STS_ON.getType()).build().insert();
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).build(); .empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
}
if(syq == 0) { if(syq == 0) {
ygglMainEmp.setZzTime(rzTime); ygglMainEmp.setZzTime(rzTime);
......
...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="部门岗位id",example="0") @ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="自定义工号",example="1001")
private String customNum;
@ApiModelProperty(value="考勤组id",example="0")
private Integer attgroupid;
} }
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<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="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="unionid" property="unionid" /> <result column="unionid" property="unionid" />
...@@ -124,7 +125,8 @@ ...@@ -124,7 +125,8 @@
unionid, unionid,
openid, openid,
mpopenid, mpopenid,
appopenid appopenid,
custom_num
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -145,60 +147,11 @@ ...@@ -145,60 +147,11 @@
a.zj_type, a.zj_type,
a.zj_num, a.zj_num,
a.syq, a.syq,
a.zz_time a.zz_time,
a.custom_num
</sql> </sql>
<sql id="Base_Column_List_Alias">
id YgglMainEmp_id,
emp_num YgglMainEmp_emp_num,
phone YgglMainEmp_phone,
password YgglMainEmp_password,
head_url YgglMainEmp_head_url,
name YgglMainEmp_name,
english_name YgglMainEmp_english_name,
sex YgglMainEmp_sex,
zj_type YgglMainEmp_zj_type,
zj_num YgglMainEmp_zj_num,
sfzyx_time YgglMainEmp_sfzyx_time,
birthday YgglMainEmp_birthday,
age YgglMainEmp_age,
is_married YgglMainEmp_is_married,
is_pregnant YgglMainEmp_is_pregnant,
area YgglMainEmp_area,
mz YgglMainEmp_mz,
zzmm YgglMainEmp_zzmm,
jg YgglMainEmp_jg,
city YgglMainEmp_city,
hk_type YgglMainEmp_hk_type,
hk_address YgglMainEmp_hk_address,
qq YgglMainEmp_qq,
wechat YgglMainEmp_wechat,
email YgglMainEmp_email,
blood_type YgglMainEmp_blood_type,
language YgglMainEmp_language,
edu YgglMainEmp_edu,
zy YgglMainEmp_zy,
zz_remark YgglMainEmp_zz_remark,
job_type YgglMainEmp_job_type,
job_status YgglMainEmp_job_status,
rz_time YgglMainEmp_rz_time,
syq YgglMainEmp_syq,
zz_time YgglMainEmp_zz_time,
sjzz_time YgglMainEmp_sjzz_time,
is_jrkq YgglMainEmp_is_jrkq,
job_num YgglMainEmp_job_num,
work_address YgglMainEmp_work_address,
work_phone YgglMainEmp_work_phone,
work_email YgglMainEmp_work_email,
zpqd YgglMainEmp_zpqd,
bmgw_id YgglMainEmp_bmgw_id,
org_code YgglMainEmp_org_code,
unionid YgglMainEmp_unionid,
openid YgglMainEmp_openid,
mpopenid YgglMainEmp_mpopenid,
appopenid YgglMainEmp_appopenid
</sql>
<!-- rsybp人事仪表盘 --> <!-- rsybp人事仪表盘 -->
<select id="rsybp" resultMap="Bintu"> <select id="rsybp" resultMap="Bintu">
SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw, SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw,
...@@ -439,376 +392,5 @@ ...@@ -439,376 +392,5 @@
org_code = #{orgCode} org_code = #{orgCode}
]]> ]]>
</select> </select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
INSERT INTO yggl_main_emp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != empNum'>
emp_num,
</if>
<if test ='null != phone'>
phone,
</if>
<if test ='null != password'>
password,
</if>
<if test ='null != headUrl'>
head_url,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != englishName'>
english_name,
</if>
<if test ='null != sex'>
sex,
</if>
<if test ='null != zjType'>
zj_type,
</if>
<if test ='null != zjNum'>
zj_num,
</if>
<if test ='null != sfzyxTime'>
sfzyx_time,
</if>
<if test ='null != birthday'>
birthday,
</if>
<if test ='null != age'>
age,
</if>
<if test ='null != isMarried'>
is_married,
</if>
<if test ='null != isPregnant'>
is_pregnant,
</if>
<if test ='null != area'>
area,
</if>
<if test ='null != mz'>
mz,
</if>
<if test ='null != zzmm'>
zzmm,
</if>
<if test ='null != jg'>
jg,
</if>
<if test ='null != city'>
city,
</if>
<if test ='null != hkType'>
hk_type,
</if>
<if test ='null != hkAddress'>
hk_address,
</if>
<if test ='null != qq'>
qq,
</if>
<if test ='null != wechat'>
wechat,
</if>
<if test ='null != email'>
email,
</if>
<if test ='null != bloodType'>
blood_type,
</if>
<if test ='null != language'>
language,
</if>
<if test ='null != edu'>
edu,
</if>
<if test ='null != zy'>
zy,
</if>
<if test ='null != zzRemark'>
zz_remark,
</if>
<if test ='null != jobType'>
job_type,
</if>
<if test ='null != jobStatus'>
job_status,
</if>
<if test ='null != rzTime'>
rz_time,
</if>
<if test ='null != syq'>
syq,
</if>
<if test ='null != zzTime'>
zz_time,
</if>
<if test ='null != sjzzTime'>
sjzz_time,
</if>
<if test ='null != isJrkq'>
is_jrkq,
</if>
<if test ='null != jobNum'>
job_num,
</if>
<if test ='null != workAddress'>
work_address,
</if>
<if test ='null != workPhone'>
work_phone,
</if>
<if test ='null != workEmail'>
work_email,
</if>
<if test ='null != zpqd'>
zpqd,
</if>
<if test ='null != bmgwId'>
bmgw_id,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != unionid'>
unionid,
</if>
<if test ='null != openid'>
openid,
</if>
<if test ='null != mpopenid'>
mpopenid,
</if>
<if test ='null != appopenid'>
appopenid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != empNum'>
#{empNum},
</if>
<if test ='null != phone'>
#{phone},
</if>
<if test ='null != password'>
#{password},
</if>
<if test ='null != headUrl'>
#{headUrl},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != englishName'>
#{englishName},
</if>
<if test ='null != sex'>
#{sex},
</if>
<if test ='null != zjType'>
#{zjType},
</if>
<if test ='null != zjNum'>
#{zjNum},
</if>
<if test ='null != sfzyxTime'>
#{sfzyxTime},
</if>
<if test ='null != birthday'>
#{birthday},
</if>
<if test ='null != age'>
#{age},
</if>
<if test ='null != isMarried'>
#{isMarried},
</if>
<if test ='null != isPregnant'>
#{isPregnant},
</if>
<if test ='null != area'>
#{area},
</if>
<if test ='null != mz'>
#{mz},
</if>
<if test ='null != zzmm'>
#{zzmm},
</if>
<if test ='null != jg'>
#{jg},
</if>
<if test ='null != city'>
#{city},
</if>
<if test ='null != hkType'>
#{hkType},
</if>
<if test ='null != hkAddress'>
#{hkAddress},
</if>
<if test ='null != qq'>
#{qq},
</if>
<if test ='null != wechat'>
#{wechat},
</if>
<if test ='null != email'>
#{email},
</if>
<if test ='null != bloodType'>
#{bloodType},
</if>
<if test ='null != language'>
#{language},
</if>
<if test ='null != edu'>
#{edu},
</if>
<if test ='null != zy'>
#{zy},
</if>
<if test ='null != zzRemark'>
#{zzRemark},
</if>
<if test ='null != jobType'>
#{jobType},
</if>
<if test ='null != jobStatus'>
#{jobStatus},
</if>
<if test ='null != rzTime'>
#{rzTime},
</if>
<if test ='null != syq'>
#{syq},
</if>
<if test ='null != zzTime'>
#{zzTime},
</if>
<if test ='null != sjzzTime'>
#{sjzzTime},
</if>
<if test ='null != isJrkq'>
#{isJrkq},
</if>
<if test ='null != jobNum'>
#{jobNum},
</if>
<if test ='null != workAddress'>
#{workAddress},
</if>
<if test ='null != workPhone'>
#{workPhone},
</if>
<if test ='null != workEmail'>
#{workEmail},
</if>
<if test ='null != zpqd'>
#{zpqd},
</if>
<if test ='null != bmgwId'>
#{bmgwId},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != unionid'>
#{unionid},
</if>
<if test ='null != openid'>
#{openid},
</if>
<if test ='null != mpopenid'>
#{mpopenid},
</if>
<if test ='null != appopenid'>
#{appopenid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM yggl_main_emp
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
UPDATE yggl_main_emp
<set>
<if test ='null != empNum'>emp_num = #{empNum},</if>
<if test ='null != phone'>phone = #{phone},</if>
<if test ='null != password'>password = #{password},</if>
<if test ='null != headUrl'>head_url = #{headUrl},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != englishName'>english_name = #{englishName},</if>
<if test ='null != sex'>sex = #{sex},</if>
<if test ='null != zjType'>zj_type = #{zjType},</if>
<if test ='null != zjNum'>zj_num = #{zjNum},</if>
<if test ='null != sfzyxTime'>sfzyx_time = #{sfzyxTime},</if>
<if test ='null != birthday'>birthday = #{birthday},</if>
<if test ='null != age'>age = #{age},</if>
<if test ='null != isMarried'>is_married = #{isMarried},</if>
<if test ='null != isPregnant'>is_pregnant = #{isPregnant},</if>
<if test ='null != area'>area = #{area},</if>
<if test ='null != mz'>mz = #{mz},</if>
<if test ='null != zzmm'>zzmm = #{zzmm},</if>
<if test ='null != jg'>jg = #{jg},</if>
<if test ='null != city'>city = #{city},</if>
<if test ='null != hkType'>hk_type = #{hkType},</if>
<if test ='null != hkAddress'>hk_address = #{hkAddress},</if>
<if test ='null != qq'>qq = #{qq},</if>
<if test ='null != wechat'>wechat = #{wechat},</if>
<if test ='null != email'>email = #{email},</if>
<if test ='null != bloodType'>blood_type = #{bloodType},</if>
<if test ='null != language'>language = #{language},</if>
<if test ='null != edu'>edu = #{edu},</if>
<if test ='null != zy'>zy = #{zy},</if>
<if test ='null != zzRemark'>zz_remark = #{zzRemark},</if>
<if test ='null != jobType'>job_type = #{jobType},</if>
<if test ='null != jobStatus'>job_status = #{jobStatus},</if>
<if test ='null != rzTime'>rz_time = #{rzTime},</if>
<if test ='null != syq'>syq = #{syq},</if>
<if test ='null != zzTime'>zz_time = #{zzTime},</if>
<if test ='null != sjzzTime'>sjzz_time = #{sjzzTime},</if>
<if test ='null != isJrkq'>is_jrkq = #{isJrkq},</if>
<if test ='null != jobNum'>job_num = #{jobNum},</if>
<if test ='null != workAddress'>work_address = #{workAddress},</if>
<if test ='null != workPhone'>work_phone = #{workPhone},</if>
<if test ='null != workEmail'>work_email = #{workEmail},</if>
<if test ='null != zpqd'>zpqd = #{zpqd},</if>
<if test ='null != bmgwId'>bmgw_id = #{bmgwId},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != unionid'>unionid = #{unionid},</if>
<if test ='null != openid'>openid = #{openid},</if>
<if test ='null != mpopenid'>mpopenid = #{mpopenid},</if>
<if test ='null != appopenid'>appopenid = #{appopenid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM yggl_main_emp
</select>
-->
</mapper> </mapper>
\ No newline at end of file
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