Commit b1d71c3d authored by huyuchen's avatar huyuchen

huych-bug修复

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