From d3050117d1090052fd60e2508b3071735786706d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 15 Oct 2024 14:24:37 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=AC=A1=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataCollectionEmployee.java | 3 ++ .../salary/mapper/InsuranceExportMapper.xml | 18 +++++----- .../mapper/archive/SalaryArchiveMapper.xml | 6 ++-- .../archive/SalaryArchiveTaxAgentMapper.xml | 6 ++-- .../datacollection/AddUpDeductionMapper.xml | 12 +++---- .../datacollection/AddUpSituationMapper.xml | 8 ++--- .../datacollection/AttendQuoteDataMapper.xml | 6 ++-- .../mapper/datacollection/EmployMapper.xml | 34 +++++++++++++------ .../datacollection/OtherDeductionMapper.xml | 4 +-- .../SpecialAddDeductionMapper.xml | 6 ++-- .../datacollection/VariableArchiveMapper.xml | 6 ++-- .../salaryacct/SalaryAcctEmployeeMapper.xml | 9 +++-- .../mapper/salarysob/SalarySobRangeMapper.xml | 2 +- .../InsuranceAccountDetailMapper.xml | 10 +++--- .../mapper/siarchives/SocialSchemeMapper.xml | 1 - 15 files changed, 73 insertions(+), 58 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java b/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java index a4ce08bb3..38eb1c8c7 100644 --- a/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java +++ b/src/com/engine/salary/entity/datacollection/DataCollectionEmployee.java @@ -114,6 +114,9 @@ public class DataCollectionEmployee { @SalaryFormulaVar(defaultLabel = "证件号码", labelId = 98624, dataType = "string") private String idNo; + //主次账号 0/null:主账号 1:次账号 + private Integer accountType; + //是否是系统管理员 private Boolean isAdmin; diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index dbe86d9f6..0803f7892 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -21,7 +21,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -47,7 +47,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -73,7 +73,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -90,7 +90,7 @@ LEFT JOIN hrmresource e ON e.ID = a.employee_id LEFT JOIN hrmdepartment d ON d.id = e.departmentid where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -139,7 +139,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -166,7 +166,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -193,7 +193,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index 259cb45d1..212354488 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -118,7 +118,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN @@ -222,7 +222,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN @@ -323,7 +323,7 @@ WHERE t.delete_type = 0 and t.employee_type is null and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.id IN diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml index 900888f9c..3639039e2 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml @@ -556,7 +556,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( @@ -580,7 +580,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( e.lastname like '%'||#{param.keyword}||'%' @@ -602,7 +602,7 @@ WHERE t1.delete_type = 0 AND e.status != '7' - and (e.accounttype is null or e.accounttype = 0) + AND ( e.lastname like '%'+#{param.keyword}+'%' diff --git a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml index ebd2b723f..5393e4363 100644 --- a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml @@ -96,7 +96,7 @@ from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -326,7 +326,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -347,7 +347,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -367,7 +367,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -649,7 +649,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.declare_month DESC @@ -664,7 +664,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + and tax_agent_id in diff --git a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml index 1a4e58158..2b5c45519 100644 --- a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml @@ -336,7 +336,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -360,7 +360,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -384,7 +384,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -405,7 +405,7 @@ t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.tax_year_month DESC diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml index 234d990b3..ca51de22a 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml @@ -261,7 +261,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -279,7 +279,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -297,7 +297,7 @@ WHERE t1.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index ae903a6a7..149522857 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -10,11 +10,12 @@ e.mobile, e.workcode, e.certificatenum as idNo, + e.accounttype as accountType, 'false' as extEmp from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -278,6 +286,7 @@ e.certificatenum as idNo, e.companystartdate as companystartdate, e.mobile as mobile, + e.accounttype as accountType, e.subcompanyid1 as subcompanyid, d.departmentname as departmentName, d.id as departmentId, @@ -287,7 +296,6 @@ left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) @@ -319,6 +328,7 @@ e.mobile as mobile, e.departmentid as departmentId, e.subcompanyid1 as subcompanyid, + e.accounttype as accountType, e.costcenterid as costcenterId, e.locationid as locationId, e.jobtitle as jobtitleId, @@ -327,7 +337,7 @@ from hrmresource e left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -480,6 +490,7 @@ e.workcode as workcode, e.companystartdate as companystartdate, e.mobile as mobile, + e.accounttype as accountType, e.enddate as dismissdate from hrmresource e where e.status in (4,5,6) @@ -557,11 +568,12 @@ c.jobtitlename as jobtitleName, c.id as jobtitleId, e.companystartdate as companystartdate, + e.accounttype as accountType, e.mobile as mobile from hrmresource e left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id - WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + WHERE e.status not in (7) AND e.subcompanyid1 IN @@ -580,6 +592,7 @@ resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee"> select e.RESOURCEID as employeeId, e.SUBCOMPANYID as subcompanyid, + h.accounttype as accountType, e.DEPARTMENTID as departmentId from hrmresourcevirtual e left join hrmresource h on e.RESOURCEID=h.id @@ -597,6 +610,7 @@ select e.RESOURCEID as employeeId, e.SUBCOMPANYID as subcompanyid, + h.accounttype as accountType, e.DEPARTMENTID as departmentId from hrmresourcevirtual e left join hrmresource h on e.RESOURCEID=h.id diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index 0afae02a2..f21fed4a1 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -280,7 +280,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + @@ -299,7 +299,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.declare_month DESC diff --git a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml index ce701f1d9..442fe485e 100644 --- a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml @@ -619,7 +619,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + ORDER BY t1.create_time desc @@ -633,7 +633,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t1.tax_agent_id IN @@ -653,7 +653,7 @@ WHERE t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + order by ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} diff --git a/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml b/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml index c6352fa2f..9462ea707 100644 --- a/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/VariableArchiveMapper.xml @@ -116,7 +116,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN @@ -173,7 +173,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN @@ -230,7 +230,7 @@ LEFT JOIN hrsa_tax_agent a ON t.tax_agent_id = a.id WHERE t.delete_type = 0 and e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) + AND t.tax_agent_id IN diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index 86781c4d3..48483a038 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -262,7 +262,6 @@ AND employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) AND em.lastname LIKE '%'||#{param.employeeName}||'%' @@ -343,7 +342,7 @@ AND employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'+#{param.employeeName}+'%' @@ -616,7 +615,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE CONCAT('%',#{param.employeeName},'%') @@ -692,7 +691,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'||#{param.employeeName}||'%' @@ -766,7 +765,7 @@ AND t.employee_id IN ( SELECT id FROM hrmresource em WHERE em.status not in (7) - and (em.accounttype is null or em.accounttype = 0) + AND em.lastname LIKE '%'+#{param.employeeName}+'%' diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml index d46406ff5..e05bdf60f 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml @@ -434,7 +434,7 @@