From 0cea01300da3555a0d59cd1ec243348d5033a193 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 17 Dec 2025 10:05:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=20=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E5=B7=A5=E5=8F=B7=E3=80=81=E9=83=A8=E9=97=A8=E3=80=81=E5=88=86?= =?UTF-8?q?=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(); From ffe8c88392d6e308c85c58b57f47e4c262df4040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 18 Dec 2025 10:19:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9Etoken=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/SalaryTokenUtil.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/util/SalaryTokenUtil.java b/src/com/engine/salary/util/SalaryTokenUtil.java index 653a0a821..651ec4e64 100644 --- a/src/com/engine/salary/util/SalaryTokenUtil.java +++ b/src/com/engine/salary/util/SalaryTokenUtil.java @@ -6,6 +6,7 @@ import com.engine.salary.encrypt.AESEncryptUtil; import com.engine.salary.entity.salaryBill.param.SalaryBillGetTokenParam; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.util.db.IdGenerator; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; import weaver.general.BaseBean; @@ -23,6 +24,7 @@ import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; +@Slf4j public class SalaryTokenUtil { /** @@ -126,8 +128,10 @@ public class SalaryTokenUtil { heads.put("appid", appid); heads.put("cpk", cpk); // 调用ECOLOGY系统接口进行注册 - String data = post(httpKey + ip + "/api/ec/dev/auth/regist", null, heads); + String url = httpKey + ip + "/api/ec/dev/auth/regist"; + String data = post(url , null, heads); Map datas = JSONObject.parseObject(data, new TypeReference>() {}); + log.info("GetToken regist url {} ,heads {}, data: {}",url ,heads, data); // ECOLOGY返回的系统公钥 String spk = (String) (datas.get("spk")); RSA rsa = new RSA(); @@ -138,16 +142,20 @@ public class SalaryTokenUtil { sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')", IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date); rs.execute(sql); + log.info("GetToken regist secret , sql: {}", sql); // 保存spk sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')", IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date); rs.execute(sql); + log.info("GetToken regist spk , sql: {}", sql); } //封装参数到请求头 heads.put("appid", appid); heads.put("secret", secret); //调用ECOLOGY系统接口进行注册 - String data2 = post(httpKey + ip + "/api/ec/dev/auth/applytoken", null, heads); + String url = httpKey + ip + "/api/ec/dev/auth/applytoken"; + String data2 = post(url, null, heads); + log.info("GetToken=====applytoken url {} ,heads {}, data: {}",url ,heads, data2); // 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文 sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'"; rs.execute(sql); From 55c8680ab2ae8615dce0f6c7ac0dfb0ac2370b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 19 Dec 2025 13:30:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=81=E9=87=8F?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java index 71af06009..8086bd467 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java @@ -62,7 +62,7 @@ public class TaxDeclarationApiFlowStatisticServiceImpl extends Service implement return TaxDeclarationApiFlowTotalDTO.builder() .total(apiConfigPO.getTotality()) .remain(apiConfigPO.getRemain()) - .used(Long.parseLong(response.getBody().getSurplus())) + .used(Long.parseLong(response.getBody().getUsed())) .lastUpdateTime(SalaryDateUtil.getFormatLocalDateTime(apiConfigPO.getLastUpdateTime())) .build(); }