fix in out 1000
This commit is contained in:
parent
e4200ee9f2
commit
4d981a0aa0
|
|
@ -1026,19 +1026,39 @@
|
|||
AND t.effective_time > #{param.effectiveTime}
|
||||
</if>
|
||||
<if test="param.salaryItemIds != null and param.salaryItemIds.size()>0">
|
||||
AND t.salary_item_id IN
|
||||
<foreach collection="param.salaryItemIds" open="(" item="salaryItemId" separator="," close=")">
|
||||
#{salaryItemId}
|
||||
</foreach>
|
||||
AND (t.salary_item_id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR t.salary_item_id IN()">
|
||||
<foreach collection="param.salaryItemIds " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR t.salary_item_id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
<if test="param.salaryArchiveId != null">
|
||||
AND t.salary_archive_id = #{param.salaryArchiveId}
|
||||
</if>
|
||||
<if test="param.salaryArchivesIds != null and param.salaryArchivesIds.size()>0">
|
||||
AND t.salary_archive_id IN
|
||||
<foreach collection="param.salaryArchivesIds" open="(" item="salaryArchiveId" separator="," close=")">
|
||||
#{salaryArchiveId}
|
||||
</foreach>
|
||||
AND (t.salary_archive_id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR t.salary_archive_id IN()">
|
||||
<foreach collection="param.salaryArchivesIds " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR t.salary_archive_id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
<if test="param.salaryItemId != null">
|
||||
AND t.salary_item_id = #{param.salaryItemId}
|
||||
|
|
@ -1056,16 +1076,36 @@
|
|||
AND t.effective_time <= #{param.effectiveTime}
|
||||
</if>
|
||||
<if test="param.salaryItemIds != null and param.salaryItemIds.size()>0">
|
||||
AND t.salary_item_id IN
|
||||
<foreach collection="param.salaryItemIds" open="(" item="salaryItemId" separator="," close=")">
|
||||
#{salaryItemId}
|
||||
</foreach>
|
||||
AND (t.salary_item_id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR t.salary_item_id IN()">
|
||||
<foreach collection="param.salaryItemIds " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR t.salary_item_id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
<if test="param.salaryArchivesIds != null and param.salaryArchivesIds.size()>0">
|
||||
AND t.salary_archive_id IN
|
||||
<foreach collection="param.salaryArchivesIds" open="(" item="salaryArchivesId" separator="," close=")">
|
||||
#{salaryArchivesId}
|
||||
</foreach>
|
||||
AND (t.salary_archive_id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR t.salary_archive_id IN()">
|
||||
<foreach collection="param.salaryArchivesIds " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR t.salary_archive_id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
<if test="param.salaryArchiveId != null">
|
||||
AND t.salary_archive_id = #{param.salaryArchiveId}
|
||||
|
|
@ -1078,10 +1118,21 @@
|
|||
UPDATE hrsa_salary_archive_item
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="effectiveSalaryItemDels" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND (id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR id IN()">
|
||||
<foreach collection="effectiveSalaryItemDels " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
|
||||
</update>
|
||||
|
||||
<update id="deleteBySalaryArchiveId">
|
||||
|
|
|
|||
|
|
@ -64,10 +64,20 @@
|
|||
WHERE
|
||||
social.delete_type = 0
|
||||
<if test="employeeIds != null and employeeIds.size()>0">
|
||||
AND social.employee_id IN
|
||||
<foreach collection="employeeIds" open="(" item="employeeId" separator="," close=")">
|
||||
#{employeeId}
|
||||
</foreach>
|
||||
AND (social.employee_id IN
|
||||
<!-- 处理in的集合超过1000条时Oracle不支持的情况 -->
|
||||
<trim suffixOverrides=" OR social.employee_id IN()">
|
||||
<foreach collection="employeeIds " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR social.employee_id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -245,10 +245,20 @@
|
|||
UPDATE hrsa_tax_agent_emp_change
|
||||
SET delete_type=1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND (id IN
|
||||
<!-- 处理in的集合超过1000条时数据库不支持的情况 -->
|
||||
<trim suffixOverrides=" OR id IN()">
|
||||
<foreach collection="ids " item="Id" index="index" open="(" close=")">
|
||||
<if test="index != 0">
|
||||
<choose>
|
||||
<when test="index % 1000 == 999">) OR id IN (</when>
|
||||
<otherwise>,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
#{Id}
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue