From 10266bf73982fc705e7cedace88706cbecca19e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 17 Dec 2024 15:00:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A6=BB=E8=81=8C?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E6=97=A0=E6=B3=95=E5=AF=BC=E5=85=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SalaryAcctExcelServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index ce89f8196..67aff3ecd 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -1082,9 +1082,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc stopWatch.stop(); // 租户下所有的人员 stopWatch.start("薪资核算确认的人员"); - List salaryEmployees = getSalaryEmployeeService(user).listAllForReport(); - Map salaryEmployeeMap = SalaryEntityUtil.convert2Map(salaryEmployees, DataCollectionEmployee::getUsername, DataCollectionEmployee::getEmployeeId); - Map emps = SalaryEntityUtil.convert2Map(salaryEmployees, DataCollectionEmployee::getEmployeeId); + List employeeIds = SalaryEntityUtil.properties(salaryAcctEmployees, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList()); + List salaryEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); stopWatch.stop(); // 租户下所有的个税扣缴义务人 stopWatch.start("租户下所有的个税扣缴义务人"); From bf8f55aaa9a3c74d9d48810305ac791d7adeba9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 17 Dec 2024 15:47:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E7=8F=AD=E6=AC=A1=E7=BB=99=E5=87=BA=E6=8C=89=E9=92=AE=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RemoteAttend4SalaryServiceImpl.java | 25 ++++++++++++++++--- .../sys/constant/SalarySysConstant.java | 3 +++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/remote/attend/service/impl/RemoteAttend4SalaryServiceImpl.java b/src/com/engine/salary/remote/attend/service/impl/RemoteAttend4SalaryServiceImpl.java index eeddfd41d..c54bbf10b 100644 --- a/src/com/engine/salary/remote/attend/service/impl/RemoteAttend4SalaryServiceImpl.java +++ b/src/com/engine/salary/remote/attend/service/impl/RemoteAttend4SalaryServiceImpl.java @@ -2,12 +2,15 @@ package com.engine.salary.remote.attend.service.impl; import com.alibaba.druid.support.json.JSONUtils; import com.alibaba.fastjson.JSONObject; +import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.kq.cmd.report.GetKQReportCmd; import com.engine.salary.mapper.datacollection.AttendQuoteFieldMapper; import com.engine.salary.remote.attend.cmd.GetSearchListCmd; import com.engine.salary.remote.attend.entity.Attend4Salary; import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService; +import com.engine.salary.sys.service.SalarySysConfService; +import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.db.MapperProxyFactory; @@ -20,11 +23,14 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import weaver.general.BaseBean; import weaver.general.Util; +import weaver.hrm.User; import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; +import static com.engine.salary.sys.constant.SalarySysConstant.ATTENDANCE_SERIAL_COLLECTION_BTN; + @Slf4j public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAttend4SalaryService { private final Boolean isLog = "true".equals(new BaseBean().getPropValue("hrmSalary", "log")); @@ -33,12 +39,23 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt return MapperProxyFactory.getProxy(AttendQuoteFieldMapper.class); } + private SalarySysConfService getSalarySysConfService(User user) { + return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); + } + + //是否采集考勤班次数据 + boolean isCollectAttendanceSerial = "1".equals(getSalarySysConfService(user).getValueByCode(ATTENDANCE_SERIAL_COLLECTION_BTN)); + + @Override public List> getColumns() { - //兼容获取班次信息字段 - List attendanceSerials = getAttendQuoteFieldMapper().getAttendanceSerials(); - String attendanceSerial = Joiner.on(",").join((Iterable) attendanceSerials); + //是否采集考勤班次数据 + String attendanceSerial = ""; + if (isCollectAttendanceSerial) { + List attendanceSerials = getAttendQuoteFieldMapper().getAttendanceSerials(); + attendanceSerial = Joiner.on(",").join((Iterable) attendanceSerials); + } Map paramsMap = new HashMap(); paramsMap.put("typeselect", "3"); @@ -146,7 +163,7 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt paramsMap.put("resourceId", String.join(",", resourceIds)); paramsMap.put("isNoAccount", "1"); //班次 - paramsMap.put("attendanceSerial", attend4Salary.getAttendanceSerial()); + paramsMap.put("attendanceSerial", isCollectAttendanceSerial ? attend4Salary.getAttendanceSerial() : ""); paramsMap.put("isFromMyAttendance", "1"); Map temp = new HashMap(); temp.put("data", JSONObject.toJSONString(paramsMap)); diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index 4f5966095..7a3c052be 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -214,4 +214,7 @@ public class SalarySysConstant { * 快照时间点 */ public static final String SHOT_EMP_TIME_TYPE = "SHOT_EMP_TIME_TYPE"; + + //是否采集考勤班次数据,0:关闭 1:开启 + public static final String ATTENDANCE_SERIAL_COLLECTION_BTN = "ATTENDANCE_SERIAL_COLLECTION_BTN"; } From 7b82b570e402ca33cae715faab9606e5ab0f50a7 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 19 Dec 2024 16:59:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=8E=B7=E5=8F=96token=E5=A2=9E=E5=8A=A0ht?= =?UTF-8?q?tps=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/SalaryTokenUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/util/SalaryTokenUtil.java b/src/com/engine/salary/util/SalaryTokenUtil.java index aaa53e1d9..653a0a821 100644 --- a/src/com/engine/salary/util/SalaryTokenUtil.java +++ b/src/com/engine/salary/util/SalaryTokenUtil.java @@ -90,6 +90,9 @@ public class SalaryTokenUtil { return heads; } BaseBean baseBean = new BaseBean(); + // 获取是否是https + String isHttps = baseBean.getPropValue("hrmSalaryBillToken", "is_https"); + String httpKey = (StringUtils.isNotBlank(isHttps) && isHttps.equals("true")) ? "https://" : "http://"; RecordSet rs = new RecordSet(); Map resultMap = new HashMap<>(); @@ -123,7 +126,7 @@ public class SalaryTokenUtil { heads.put("appid", appid); heads.put("cpk", cpk); // 调用ECOLOGY系统接口进行注册 - String data = post("http://" + ip + "/api/ec/dev/auth/regist", null, heads); + String data = post(httpKey + ip + "/api/ec/dev/auth/regist", null, heads); Map datas = JSONObject.parseObject(data, new TypeReference>() {}); // ECOLOGY返回的系统公钥 String spk = (String) (datas.get("spk")); @@ -144,7 +147,7 @@ public class SalaryTokenUtil { heads.put("appid", appid); heads.put("secret", secret); //调用ECOLOGY系统接口进行注册 - String data2 = post("http://" + ip + "/api/ec/dev/auth/applytoken", null, heads); + String data2 = post(httpKey + ip + "/api/ec/dev/auth/applytoken", null, heads); // 通过第一步注册许可时返回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 bbb02bcd81819b8c86aea1140d985b40c87ba752 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 24 Dec 2024 15:39:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix=20=E6=8A=A5=E8=A1=A8=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E5=88=86=E9=83=A8=E7=BB=B4=E5=BA=A6=E9=94=99=E8=AF=AF=20fix=20?= =?UTF-8?q?=E8=B0=83=E8=96=AA=E8=AE=B0=E5=BD=95=E5=AF=BC=E5=85=A5=E7=94=9F?= =?UTF-8?q?=E6=95=88=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SalaryStatisticsReportServiceImpl.java | 2 +- .../salary/service/impl/SalaryArchiveItemServiceImpl.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 5ee5edea8..2b62276cd 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -818,7 +818,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary data.getList().forEach(employee -> { if (employee.getSubcompanyId() != null && employee.getSubcompanyId() != null) { subComIdNameMap.put(employee.getSubcompanyId(), employee.getSubcompanyName()); - subComIds.add(employee.getDepartmentId()); + subComIds.add(employee.getSubcompanyId()); empIdSubComMap.put(employee.getEmployeeId(), employee.getSubcompanyId()); } }); diff --git a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java index 431b56170..9e353083e 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java @@ -29,6 +29,7 @@ import com.engine.salary.mapper.archive.SalaryArchiveItemMapper; import com.engine.salary.mapper.salaryitem.SalaryItemMapper; import com.engine.salary.service.*; import com.engine.salary.sys.entity.vo.UploadConfigResponse; +import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.SalaryLoggerUtil; @@ -41,6 +42,7 @@ import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.hrm.User; @@ -706,7 +708,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi String userstatus = queryParam.getUserstatus(); r.setUsername(employee.getUsername()); r.setDepartmentName(employee.getDepartmentName()); - r.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(employee.getStatus()))); + r.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(NumberUtils.isCreatable(employee.getStatus()) ? employee.getStatus() : "-1"))); r.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(r.getAdjustReason())); return (StringUtils.isBlank(username) || employee.getUsername().contains(username)) && (CollectionUtils.isEmpty(departmentIds) || departmentIds.contains(employee.getDepartmentId())) @@ -739,7 +741,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi row.add(dto.getAdjustBefore()); row.add(dto.getAdjustAfter()); row.add(dto.getAdjustReason()); - row.add(dto.getEffectiveTime() + ""); + row.add(SalaryDateUtil.getFormatDate(dto.getEffectiveTime())); row.add(dto.getOperator()); row.add(format.format(dto.getOperateTime())); row.add(dto.getDescription());