Commit ecbce6f6 authored by huyuchen's avatar huyuchen

huych-bug修复

parent e5b573e8
......@@ -635,32 +635,27 @@
</sql>
<update id="updateExcelEmpProject" parameterType="java.util.List">
update t_employee_project
<set>
<foreach collection="list" item="i" separator=",">
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
EMP_NATRUE = COALESCE(#{i.empNatrue}, EMP_NATRUE),
EMP_IDCARD = COALESCE(#{i.empIdcard}, EMP_IDCARD),
PROJECT_STATUS = 0,
UPDATE_TIME = now(),
UPDATE_BY = COALESCE(#{i.updateBy}, UPDATE_BY),
DEPT_NO = COALESCE(#{i.deptNo}, DEPT_NO),
CONTRACT_TYPE = COALESCE(#{i.contractType}, CONTRACT_TYPE),
WORKING_HOURS = COALESCE(#{i.workingHours}, WORKING_HOURS),
POST = COALESCE(#{i.post}, POST),
TRY_PERIOD = COALESCE(#{i.tryPeriod}, TRY_PERIOD),
ENJOIN_DATE = COALESCE(#{i.enjoinDate}, ENJOIN_DATE),
BANK_NAME = COALESCE(#{i.bankName}, BANK_NAME),
BANK_NO = COALESCE(#{i.bankNo}, BANK_NO),
BANK_SUB_NAME = COALESCE(#{i.bankSubName}, BANK_SUB_NAME)
</foreach>
</set>
where id in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.id}
<foreach collection="list" index="index" item="i" separator=";">
update t_employee_project set
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
EMP_NATRUE = COALESCE(#{i.empNatrue}, EMP_NATRUE),
EMP_IDCARD = COALESCE(#{i.empIdcard}, EMP_IDCARD),
PROJECT_STATUS = 0,
UPDATE_TIME = now(),
UPDATE_BY = COALESCE(#{i.updateBy}, UPDATE_BY),
DEPT_NO = COALESCE(#{i.deptNo}, DEPT_NO),
CONTRACT_TYPE = COALESCE(#{i.contractType}, CONTRACT_TYPE),
WORKING_HOURS = COALESCE(#{i.workingHours}, WORKING_HOURS),
POST = COALESCE(#{i.post}, POST),
TRY_PERIOD = COALESCE(#{i.tryPeriod}, TRY_PERIOD),
ENJOIN_DATE = COALESCE(#{i.enjoinDate}, ENJOIN_DATE),
BANK_NAME = COALESCE(#{i.bankName}, BANK_NAME),
BANK_NO = COALESCE(#{i.bankNo}, BANK_NO),
BANK_SUB_NAME = COALESCE(#{i.bankSubName}, BANK_SUB_NAME)
where id = #{i.id}
</foreach>
</update>
<insert id="insertExcelEmpProject" parameterType="java.util.List">
insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
......@@ -708,24 +703,21 @@
)
</foreach>
</insert>
<update id="updateReduceEmpProject" parameterType="java.util.List">
update t_employee_project
<set>
<foreach collection="list" item="i" separator=",">
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
PROJECT_STATUS = 1,
LEAVE_TIME = now(),
LEAVE_REASON = COALESCE(#{i.leaveReason}, LEAVE_REASON),
LEAVE_USER = COALESCE(#{i.leaveUser}, LEAVE_USER),
LEAVE_REMARK = COALESCE(#{i.leaveRemark}, LEAVE_REMARK)
</foreach>
</set>
where id in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.id}
<foreach collection="list" index="index" item="i" separator=";">
update t_employee_project
set
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
PROJECT_STATUS = 1,
LEAVE_TIME = now(),
LEAVE_REASON = COALESCE(#{i.leaveReason}, LEAVE_REASON),
LEAVE_USER = COALESCE(#{i.leaveUser}, LEAVE_USER),
LEAVE_REMARK = COALESCE(#{i.leaveRemark}, LEAVE_REMARK)
where id = #{i.id}
</foreach>
</update>
<!--查询部门编码和最大员工数-->
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
select MAX(EMP_NO) from t_employee_project where
......
......@@ -232,22 +232,17 @@
</insert>
<update id="batchUpdateUser" parameterType="java.util.List">
update sys_user
<set>
<foreach collection="list" item="i" separator=",">
phone = COALESCE(#{i.telephoneNumber}, phone),
update_time = now(),
email = COALESCE(#{i.email}, email),
nickname = COALESCE(#{i.personName}, nickname),
password = COALESCE(#{i.password}, password),
dept_id = COALESCE(#{i.deptId}, dept_id),
dept_name = COALESCE(#{i.deptName}, dept_name)
</foreach>
</set>
where username in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.uid}
<foreach collection="list" index="index" item="i" separator=";">
update sys_user
set
phone = COALESCE(#{i.telephoneNumber}, phone),
update_time = now(),
email = COALESCE(#{i.email}, email),
nickname = COALESCE(#{i.personName}, nickname),
password = COALESCE(#{i.password}, password),
dept_id = COALESCE(#{i.deptId}, dept_id),
dept_name = COALESCE(#{i.deptName}, dept_name)
where username = #{i.uid}
</foreach>
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment