From 0cea01300da3555a0d59cd1ec243348d5033a193 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 17 Dec 2025 10:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=20=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=EF=BC=8C=E5=B7=A5?= =?UTF-8?q?=E5=8F=B7=E3=80=81=E9=83=A8=E9=97=A8=E3=80=81=E5=88=86=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siexport/param/InsuranceExportParam.java | 2 + .../salary/mapper/InsuranceExportMapper.xml | 122 ++++++++++++++++++ .../engine/salary/web/SIExportController.java | 10 +- 3 files changed, 132 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java b/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java index ae4cfc61a..461cd450c 100644 --- a/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java +++ b/src/com/engine/salary/entity/siexport/param/InsuranceExportParam.java @@ -45,4 +45,6 @@ public class InsuranceExportParam extends BaseQueryParam { private List taxAgents; private String workcode; + private List departmentIds; + private List subCompanyIds; } diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index 3a5397af8..2e12b7755 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -23,6 +23,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) + @@ -51,6 +52,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) + @@ -79,6 +81,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) + @@ -96,6 +99,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) + @@ -147,6 +153,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) + @@ -176,6 +183,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) + @@ -205,6 +213,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) + @@ -233,6 +242,7 @@ LEFT JOIN hrmdepartment d ON d.id = e.department_id LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id where e.status not in (7) + @@ -293,6 +305,7 @@ LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id LEFT JOIN hrmdepartment d ON d.id = e.department_id where e.status not in (7) + + + + + AND e.workcode like CONCAT('%',#{param.workcode},'%') + + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + + + + + AND e.workcode like '%'||#{param.workcode}||'%' + + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + + + + + + AND e.workcode like '%'+#{param.workcode}+'%' + + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + + + + + + AND e.workcode like CONCAT('%',#{param.workcode},'%') + + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + + + + + + AND e.workcode like '%'||#{param.workcode}||'%' + + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + + + + + + AND e.workcode like '%'+#{param.workcode}+'%' + + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + + diff --git a/src/com/engine/salary/web/SIExportController.java b/src/com/engine/salary/web/SIExportController.java index f3636c8dd..cb92e0d1f 100644 --- a/src/com/engine/salary/web/SIExportController.java +++ b/src/com/engine/salary/web/SIExportController.java @@ -112,8 +112,14 @@ public class SIExportController { @Path("/common/export") @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response, - @QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization) { - InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).build(); + @QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization,@QueryParam("departmentIds") String departmentIds,@QueryParam("subCompanyIds") String subCompanyIds,@QueryParam("workcode") String workcode) { + InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).workcode(workcode).build(); + if(StringUtils.isNotBlank(departmentIds)){ + param.setDepartmentIds(Arrays.stream(departmentIds.split(",")).map(Long::parseLong).collect(Collectors.toList())); + } + if(StringUtils.isNotBlank(subCompanyIds)){ + param.setSubCompanyIds(Arrays.stream(subCompanyIds.split(",")).map(Long::parseLong).collect(Collectors.toList())); + } User user = HrmUserVarify.getUser(request, response); XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param); String time = LocalDate.now().toString();