From e2db30c8164cb17a82d80f94527e158f7dfaab1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 27 Sep 2022 10:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 13 +++ .../siexport/param/InsuranceExportParam.java | 3 +- .../salary/mapper/InsuranceExportMapper.java | 3 +- .../salary/mapper/InsuranceExportMapper.xml | 94 +++++++++++++------ .../InsuranceAccountDetailMapper.xml | 7 +- .../service/impl/SIAccountServiceImpl.java | 12 +++ .../service/impl/SIExportServiceImpl.java | 18 +++- .../service/impl/SISchemeServiceImpl.java | 10 ++ 8 files changed, 126 insertions(+), 34 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 04e16465e..27ae1abdf 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -39,6 +39,9 @@ import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentService; import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.service.impl.TaxAgentServiceImpl; +import com.engine.salary.sys.entity.vo.OrderRuleVO; +import com.engine.salary.sys.service.SalarySysConfService; +import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; @@ -54,6 +57,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; +import weaver.hrm.User; import java.math.BigDecimal; import java.util.*; @@ -99,6 +103,10 @@ public class SIAccountBiz extends Service { return MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class); } + private SalarySysConfService getSalarySysConfService(User user) { + return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); + } + public PageInfo listPage(InsuranceAccountBatchParam queryParam) { SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountBatchMapper().list(queryParam); @@ -109,6 +117,11 @@ public class SIAccountBiz extends Service { public PageInfo listCommonPage(InsuranceAccountDetailParam queryParam) { queryParam.setPaymentStatus(PaymentStatusEnum.COMMON.getValue()); + + //排序配置 + OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); + queryParam.setOrderRule(orderRule); + SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountDetailMapper().list(queryParam); InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list); diff --git a/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java b/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java index 2a5bf4750..74491be6b 100644 --- a/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java +++ b/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.siexport.param; +import com.engine.salary.common.BaseQueryParam; import com.engine.salary.util.valid.DataCheck; import lombok.AllArgsConstructor; import lombok.Builder; @@ -17,7 +18,7 @@ import lombok.NoArgsConstructor; @Builder @NoArgsConstructor @AllArgsConstructor -public class InsuranceExportParam { +public class InsuranceExportParam extends BaseQueryParam { //@NotBlank @DataCheck(require = true,message = "账单月份不可为空") diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.java b/src/com/engine/salary/mapper/InsuranceExportMapper.java index 601624da1..78fde573b 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.java +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.java @@ -1,5 +1,6 @@ package com.engine.salary.mapper; +import com.engine.salary.entity.siexport.param.InsuranceExportParam; import com.engine.salary.entity.siexport.po.AccountExportPO; import org.apache.ibatis.annotations.Param; @@ -13,6 +14,6 @@ import java.util.List; **/ public interface InsuranceExportMapper { - List exportAccount(@Param("paymentStatus") Integer paymentStatus, @Param("billMonth") String billMonth,@Param("paymentOrganization") String paymentOrganization); + List exportAccount(@Param("paymentStatus") Integer paymentStatus, @Param("param") InsuranceExportParam param); } diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index 4b0694c47..6c60c5ba3 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -2,37 +2,75 @@ + + + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} + + + SELECT a.*, + e.lastname AS userName, + e.MOBILE AS telephone, + d.departmentname AS departmentName, + e.STATUS AS userStatus + FROM ( + SELECT * + from hrsa_bill_detail + WHERE delete_type = 0 + AND bill_month = #{param.billMonth} + AND payment_status = #{paymentStatus} + AND payment_organization = #{param.paymentOrganization} + ) a + LEFT JOIN hrmresource e ON e.ID = a.employee_id + 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/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 6c72d255c..f89616075 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -146,13 +146,18 @@ FROM hrsa_bill_detail t left join hrmresource e + LEFT JOIN hrmdepartment d ON d.id = e.departmentid + LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1 on e.ID = t.employee_id WHERE t.delete_type = 0 and e.status not in (7) and (e.accounttype is null or e.accounttype = 0) - ORDER BY t.update_time DESC + + + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} +