Commit b1d71c3d authored by huyuchen's avatar huyuchen

huych-bug修复

parent 555f5b8b
...@@ -635,9 +635,8 @@ ...@@ -635,9 +635,8 @@
</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),
...@@ -653,12 +652,7 @@ ...@@ -653,12 +652,7 @@
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)
</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>
<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">
<foreach collection="list" index="index" item="i" separator=";">
update t_employee_project update t_employee_project
<set> set
<foreach collection="list" item="i" separator=",">
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,9 +232,9 @@ ...@@ -232,9 +232,9 @@
</insert> </insert>
<update id="batchUpdateUser" parameterType="java.util.List"> <update id="batchUpdateUser" parameterType="java.util.List">
<foreach collection="list" index="index" item="i" separator=";">
update sys_user update sys_user
<set> set
<foreach collection="list" item="i" separator=",">
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),
...@@ -242,12 +242,7 @@ ...@@ -242,12 +242,7 @@
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