修复福利台账补缴功能异常
This commit is contained in:
parent
f34eaa7c6f
commit
3e300e62eb
|
|
@ -838,6 +838,7 @@ public class SIAccountBiz extends Service {
|
|||
SupplementAccountBaseParam supplementAccountBaseParam = SupplementAccountBaseParam.builder()
|
||||
.supplementaryMonth(month)
|
||||
.employeeId(id)
|
||||
.paymentOrganization(param.getPaymentOrganization())
|
||||
.projects(param.getProjects())
|
||||
.billMonth(param.getBillMonth())
|
||||
.build();
|
||||
|
|
@ -882,6 +883,7 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setEmployeeId(baseParam.getEmployeeId());
|
||||
insuranceAccountDetailPO.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue());
|
||||
insuranceAccountDetailPO.setSupplementaryMonth(baseParam.getSupplementaryMonth());
|
||||
insuranceAccountDetailPO.setPaymentOrganization(baseParam.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setSupplementaryProjects(
|
||||
String.join(",",
|
||||
baseParam.getProjects() == null ? new ArrayList<>() : baseParam.getProjects().stream().map(String::valueOf).collect(Collectors.toList())));
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import java.util.Date;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_bill_batch
|
||||
public class InsuranceAccountBatchPO {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@ package com.engine.salary.enums.siaccount;
|
|||
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: zhangheng
|
||||
* @CreateDate: 2021/12/10 13:10
|
||||
* @Version: v1.0
|
||||
*/
|
||||
|
||||
public enum ProjectTypeEnum implements BaseEnum<Integer> {
|
||||
ALL(0, "全部", 85155),
|
||||
SOCIAL(1, "社保", 86568),
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
AND
|
||||
t.bill_month = #{param.billMonth}
|
||||
</if>
|
||||
<if test="param.paymentStatus != null and param.paymentStatus != ''">
|
||||
<if test="param.paymentStatus != null">
|
||||
AND
|
||||
t.payment_status = #{param.paymentStatus}
|
||||
</if>
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.bill_month = #{billMonth}
|
||||
<if test="paymentOrganization != null and paymentOrganization != ''">
|
||||
<if test="paymentOrganization != null">
|
||||
AND t.payment_organization = #{paymentOrganization}
|
||||
</if>
|
||||
</select>
|
||||
|
|
@ -223,12 +223,8 @@
|
|||
LEFT JOIN hrsa_fund_archives fund ON t.ID = fund.employee_id
|
||||
LEFT JOIN hrsa_other_archives other ON t.ID = other.employee_id
|
||||
WHERE (
|
||||
fund.delete_type = 0 and
|
||||
fund.fund_start_time IS NOT NULL AND fund.fund_start_time != ''
|
||||
<if test="paymentOrganization != null and paymentOrganization != ''">
|
||||
AND
|
||||
-- 个税扣缴义务人
|
||||
fund.payment_organization = #{paymentOrganization}
|
||||
</if>
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
|
|
@ -236,8 +232,9 @@
|
|||
)
|
||||
)
|
||||
OR (
|
||||
social.delete_type = 0 and
|
||||
social.social_start_time IS NOT NULL AND social.social_start_time != ''
|
||||
<if test="paymentOrganization != null and paymentOrganization != ''">
|
||||
<if test="paymentOrganization != null">
|
||||
AND
|
||||
-- 个税扣缴义务人
|
||||
social.payment_organization = #{paymentOrganization}
|
||||
|
|
@ -249,12 +246,8 @@
|
|||
)
|
||||
)
|
||||
OR (
|
||||
other.delete_type = 0 and
|
||||
other.other_start_time IS NOT NULL AND other.other_start_time != ''
|
||||
<if test="paymentOrganization != null and paymentOrganization != ''">
|
||||
AND
|
||||
-- 个税扣缴义务人
|
||||
other.payment_organization = #{paymentOrganization}
|
||||
</if>
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
|
|
@ -264,67 +257,67 @@
|
|||
) a
|
||||
</select>
|
||||
|
||||
<select id="selectAccountIds" resultType="java.lang.Long" databaseId="oracle">
|
||||
SELECT DISTINCT a.ID
|
||||
FROM (
|
||||
SELECT t.ID,
|
||||
social.social_start_time,
|
||||
social.social_end_time,
|
||||
fund.fund_start_time,
|
||||
fund.fund_end_time,
|
||||
other.other_start_time,
|
||||
other.other_end_time
|
||||
FROM (
|
||||
SELECT e.ID
|
||||
FROM hrmresource e
|
||||
LEFT JOIN (SELECT
|
||||
t.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
log.resource_n,
|
||||
log.dismissdate
|
||||
FROM
|
||||
bill_hrmdismiss log ) t) l
|
||||
ON e.ID = l.resource_n
|
||||
WHERE(
|
||||
e.status != '5'
|
||||
and (e.accounttype is null or e.accounttype = 0)
|
||||
OR l.dismissdate IS NULL
|
||||
OR l.dismissdate = ''
|
||||
OR l.dismissdate
|
||||
> #{time}
|
||||
)
|
||||
) t
|
||||
LEFT JOIN hrsa_social_archives social ON t.ID = social.employee_id
|
||||
LEFT JOIN hrsa_fund_archives fund ON t.ID = fund.employee_id
|
||||
LEFT JOIN hrsa_other_archives other ON t.ID = other.employee_id
|
||||
WHERE (
|
||||
fund.fund_start_time IS NOT NULL
|
||||
AND(
|
||||
fund.fund_end_time IS NULL
|
||||
OR fund.fund_end_time = ''
|
||||
OR fund.fund_end_time > #{time}
|
||||
)
|
||||
)
|
||||
OR (
|
||||
social.social_start_time IS NOT NULL
|
||||
AND(
|
||||
social.social_end_time IS NULL
|
||||
OR social.social_end_time = ''
|
||||
OR social.social_end_time > #{time}
|
||||
)
|
||||
)
|
||||
OR (
|
||||
other.other_start_time IS NOT NULL
|
||||
AND(
|
||||
other.other_end_time IS NULL
|
||||
OR other.other_end_time = ''
|
||||
OR other.other_end_time > #{time}
|
||||
)
|
||||
)
|
||||
) a
|
||||
</select>
|
||||
<!-- <select id="selectAccountIds" resultType="java.lang.Long" databaseId="oracle">-->
|
||||
<!-- SELECT DISTINCT a.ID-->
|
||||
<!-- FROM (-->
|
||||
<!-- SELECT t.ID,-->
|
||||
<!-- social.social_start_time,-->
|
||||
<!-- social.social_end_time,-->
|
||||
<!-- fund.fund_start_time,-->
|
||||
<!-- fund.fund_end_time,-->
|
||||
<!-- other.other_start_time,-->
|
||||
<!-- other.other_end_time-->
|
||||
<!-- FROM (-->
|
||||
<!-- SELECT e.ID-->
|
||||
<!-- FROM hrmresource e-->
|
||||
<!-- LEFT JOIN (SELECT-->
|
||||
<!-- t.*-->
|
||||
<!-- FROM-->
|
||||
<!-- (-->
|
||||
<!-- SELECT-->
|
||||
<!-- log.resource_n,-->
|
||||
<!-- log.dismissdate-->
|
||||
<!-- FROM-->
|
||||
<!-- bill_hrmdismiss log ) t) l-->
|
||||
<!-- ON e.ID = l.resource_n-->
|
||||
<!-- WHERE(-->
|
||||
<!-- e.status != '5'-->
|
||||
<!-- and (e.accounttype is null or e.accounttype = 0)-->
|
||||
<!-- OR l.dismissdate IS NULL-->
|
||||
<!-- OR l.dismissdate = ''-->
|
||||
<!-- OR l.dismissdate-->
|
||||
<!-- > #{time}-->
|
||||
<!-- )-->
|
||||
<!-- ) t-->
|
||||
<!-- LEFT JOIN hrsa_social_archives social ON t.ID = social.employee_id-->
|
||||
<!-- LEFT JOIN hrsa_fund_archives fund ON t.ID = fund.employee_id-->
|
||||
<!-- LEFT JOIN hrsa_other_archives other ON t.ID = other.employee_id-->
|
||||
<!-- WHERE (-->
|
||||
<!-- fund.fund_start_time IS NOT NULL-->
|
||||
<!-- AND(-->
|
||||
<!-- fund.fund_end_time IS NULL-->
|
||||
<!-- OR fund.fund_end_time = ''-->
|
||||
<!-- OR fund.fund_end_time > #{time}-->
|
||||
<!-- )-->
|
||||
<!-- )-->
|
||||
<!-- OR (-->
|
||||
<!-- social.social_start_time IS NOT NULL-->
|
||||
<!-- AND(-->
|
||||
<!-- social.social_end_time IS NULL-->
|
||||
<!-- OR social.social_end_time = ''-->
|
||||
<!-- OR social.social_end_time > #{time}-->
|
||||
<!-- )-->
|
||||
<!-- )-->
|
||||
<!-- OR (-->
|
||||
<!-- other.other_start_time IS NOT NULL-->
|
||||
<!-- AND(-->
|
||||
<!-- other.other_end_time IS NULL-->
|
||||
<!-- OR other.other_end_time = ''-->
|
||||
<!-- OR other.other_end_time > #{time}-->
|
||||
<!-- )-->
|
||||
<!-- )-->
|
||||
<!-- ) a-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue