From 4eb931686eb56182f90b424cc3ff9d24c37d26cd Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 5 Dec 2023 14:57:34 +0800 Subject: [PATCH 001/169] =?UTF-8?q?=E9=B2=81=E6=8E=A7=E6=95=B0=E5=AD=97tem?= =?UTF-8?q?p?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/bo/SalaryAcctResultReportBO.java | 39 ++++ .../salaryacct/bo/SalaryAcctResultBO.java | 29 +++ .../param/SalaryAcctResultBatchEditParam.java | 40 +++++ .../SalaryAcctResultBatchUpdateParam.java | 37 ++++ .../service/SalaryAcctRecordService.java | 6 + .../service/SalaryAcctResultService.java | 17 +- .../impl/SalaryAcctRecordServiceImpl.java | 99 +++++++++++ .../impl/SalaryAcctResultServiceImpl.java | 168 ++++++++++++++++++ .../salary/web/SalaryAcctController.java | 27 +++ .../wrapper/SalaryAcctRecordWrapper.java | 8 + .../wrapper/SalaryAcctResultWrapper.java | 21 ++- 11 files changed, 483 insertions(+), 8 deletions(-) create mode 100644 src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java create mode 100644 src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java diff --git a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java index 6a23857a5..485389860 100644 --- a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java +++ b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java @@ -8,6 +8,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTempPO; import dm.jdbc.util.IdGenerator; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.math.NumberUtils; import java.util.*; @@ -62,6 +63,44 @@ public class SalaryAcctResultReportBO { .collect(Collectors.toList()); } + public static List lkszConvert2PO(List items, + SalaryAcctEmployeePO salaryAcctEmployee, + Long employeeId, Map emps) { + if (CollectionUtils.isEmpty(items) || ObjectUtils.isEmpty(salaryAcctEmployee)) { + return Collections.emptyList(); + } + Date now = new Date(); + return items.stream() + .map(e -> { + SalaryAcctResultReportPO po = SalaryAcctResultReportPO.builder() + .id(IdGenerator.generate()) + .salarySobId(salaryAcctEmployee.getSalarySobId()) + .salaryItemId(e.getSalaryItemId()) + .salaryAcctRecordId(salaryAcctEmployee.getSalaryAcctRecordId()) + .salaryAcctEmpId(salaryAcctEmployee.getId().toString()) + .employeeId(salaryAcctEmployee.getEmployeeId().toString()) + .taxAgentId(salaryAcctEmployee.getTaxAgentId()) + .resultValue(e.getResultValue()) + .creator(employeeId) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build(); + + DataCollectionEmployee dataCollectionEmployee = emps.get(salaryAcctEmployee.getEmployeeId()); + if (dataCollectionEmployee != null) { + po.setDepartmentId(dataCollectionEmployee.getDepartmentId()); + po.setSubcompanyId(dataCollectionEmployee.getSubcompanyid()); + po.setCostcenterId(dataCollectionEmployee.getCostcenterId()); + po.setJobtitleId(dataCollectionEmployee.getJobtitleId()); + po.setLocationId(dataCollectionEmployee.getLocationId()); + } + return po; + }) + .collect(Collectors.toList()); + } + public static List convert2ReportPO(Collection temps, Map emps) { // Map longDataCollectionEmployeeMap = SalaryEntityUtil.convert2Map(emps, DataCollectionEmployee::getEmployeeId); diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 57b6e1927..29cae5d4a 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -27,6 +27,7 @@ import com.engine.salary.util.page.Column; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.beans.BeanUtils; @@ -577,6 +578,34 @@ public class SalaryAcctResultBO { .collect(Collectors.toList()); } + + public static List batchEditConvert2PO(Map salaryAcctResultOldPOMap, + List items, + SalaryAcctEmployeePO salaryAcctEmployee, + Long employeeId) { + if (CollectionUtils.isEmpty(items) || ObjectUtils.isEmpty(salaryAcctEmployee)) { + return Collections.emptyList(); + } + Date now = new Date(); + return items.stream() + .map(e -> SalaryAcctResultPO.builder() + .salarySobId(salaryAcctEmployee.getSalarySobId()) + .salaryItemId(e.getSalaryItemId()) + .salaryAcctRecordId(salaryAcctEmployee.getSalaryAcctRecordId()) + .salaryAcctEmpId(salaryAcctEmployee.getId()) + .employeeId(salaryAcctEmployee.getEmployeeId()) + .taxAgentId(salaryAcctEmployee.getTaxAgentId()) + .resultValue(StringUtils.trim(e.getResultValue())) + .originResultValue(salaryAcctResultOldPOMap.get(salaryAcctEmployee.getId() + "-" + e.getSalaryItemId())) + .creator(employeeId) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build()) + .collect(Collectors.toList()); + } + public static Map buildEmployeeFieldName() { Field[] declaredFields = SalaryFormulaEmployeeDTO.class.getDeclaredFields(); Map employeeFieldNameMap = Maps.newHashMapWithExpectedSize(declaredFields.length); diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java new file mode 100644 index 000000000..21922043c --- /dev/null +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java @@ -0,0 +1,40 @@ +package com.engine.salary.entity.salaryacct.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @ClassName SalaryAcctResultBatchUpdateParam + * @author Harryxzy + * @date 2023/12/4 13:48 + * @description 鲁控数字批量编辑参数 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SalaryAcctResultBatchEditParam { + + private Long salaryAcctRecordId; + + private List resultValueList; + + + @Data + @Builder + @AllArgsConstructor + @NoArgsConstructor + public class resultValue { + + // 薪资核算人员id + private Long salaryAcctEmpId; + + // 薪资项目值 + private List items; + } + +} diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java new file mode 100644 index 000000000..8eabde532 --- /dev/null +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java @@ -0,0 +1,37 @@ +package com.engine.salary.entity.salaryacct.param; + +import com.engine.salary.util.valid.DataCheck; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @ClassName SalaryAcctResultBatchUpdateParam + * @author Harryxzy + * @date 2023/12/4 13:48 + * @description 鲁控数字批量更新参数 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SalaryAcctResultBatchUpdateParam { + + //薪资核算记录的id + @DataCheck(require = true, message = "薪资核算记录ID不得为空") + private Long salaryAcctRecordId; + + //薪资项目的Id + @DataCheck(require = true, message = "薪资项目id不得为空") + private Long salaryItemId; + + // 薪资核算人员id + private List salaryAcctEmpIdList; + + //薪资项目值 + private String value; + +} diff --git a/src/com/engine/salary/service/SalaryAcctRecordService.java b/src/com/engine/salary/service/SalaryAcctRecordService.java index 1ba3419bf..319552b78 100644 --- a/src/com/engine/salary/service/SalaryAcctRecordService.java +++ b/src/com/engine/salary/service/SalaryAcctRecordService.java @@ -207,4 +207,10 @@ public interface SalaryAcctRecordService { List listSome(SalaryAcctRecordPO po); + + /** + * 鲁控数字-结账 + * @param salaryAcctRecordId + */ + void lkszJz(Long salaryAcctRecordId); } diff --git a/src/com/engine/salary/service/SalaryAcctResultService.java b/src/com/engine/salary/service/SalaryAcctResultService.java index 67320ed0d..871188360 100644 --- a/src/com/engine/salary/service/SalaryAcctResultService.java +++ b/src/com/engine/salary/service/SalaryAcctResultService.java @@ -4,10 +4,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO; -import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultSaveParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultUpdateLockStatusParam; +import com.engine.salary.entity.salaryacct.param.*; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.util.page.PageInfo; @@ -207,4 +204,16 @@ public interface SalaryAcctResultService { * @return */ Boolean checkAuth(Long salaryAcctRecordId); + + /** + * 鲁控数字薪资核算结果批量更新 + * @param param + */ + void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param); + + /** + * 鲁控数字薪资核算结果批量编辑 + * @param param + */ + void lkszBatchEdit(SalaryAcctResultBatchEditParam param); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 8038d08f7..1a189f762 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -4,6 +4,9 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; +import com.engine.salary.entity.report.po.SalaryAcctResultReportPO; import com.engine.salary.entity.salaryBill.po.SalarySendPO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO; import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam; @@ -12,6 +15,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; +import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; @@ -31,11 +35,14 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; +import dm.jdbc.util.IdGenerator; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import weaver.hrm.User; +import java.time.YearMonth; import java.util.*; import java.util.stream.Collectors; @@ -77,6 +84,10 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); } + private SalarySobItemService getSalarySobItemService(User user) { + return ServiceUtil.getService(SalarySobItemServiceImpl.class, user); + } + // private SalaryCheckResultService salaryCheckResultService; // // private SalaryCheckResultDetailService salaryCheckResultDetailService; @@ -102,6 +113,10 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe return ServiceUtil.getService(SalaryStatisticsReportServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + @Override public SalaryAcctRecordPO getById(Long id) { @@ -810,4 +825,88 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe public List listSome(SalaryAcctRecordPO po) { return getSalaryAcctRecordMapper().listSome(po); } + + @Override + public void lkszJz(Long salaryAcctRecordId) { + SalaryAcctRecordPO salaryAcctRecordPO = getById(salaryAcctRecordId); + if (ObjectUtils.isEmpty(salaryAcctRecordPO)) { + throw new SalaryRunTimeException("薪资核算记录不存在或已被删除"); + } + YearMonth salaryMonth = SalaryDateUtil.toYearMonth(SalaryDateUtil.dateToLocalDate(salaryAcctRecordPO.getSalaryMonth()).plusMonths(1)); + // 创建下一个月的薪资核算记录 + Long newSalaryAcctRecordId = save(SalaryAcctRecordSaveParam.builder().salarySobId(salaryAcctRecordPO.getSalarySobId()).salaryMonth(salaryMonth).build()); + // 查询下个月的薪资核算人员 + List salaryAcctEmployeePOList = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(newSalaryAcctRecordId); + List acctEmpIds = salaryAcctEmployeePOList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList()); + // 获取原来的薪资核算结果 + List salarySobItemPOS = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId()); + List salarySobItemIds = salarySobItemPOS.stream().map(SalarySobItemPO::getSalaryItemId).collect(Collectors.toList()); + List resultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(salaryAcctRecordId), salarySobItemIds); + // 过滤掉新的核算记录中不存在的人 + resultPOS = resultPOS.stream().filter(result -> acctEmpIds.contains(result.getEmployeeId())).collect(Collectors.toList()); + Map> resultMap = SalaryEntityUtil.group2Map(resultPOS, SalaryAcctResultPO::getEmployeeId); + // 查询人员信息,供报表使用 + List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); + Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); + + // 需要保存的核算结果 + List needInsertResultList = new ArrayList<>(); + // 报表 + List needInsertResultReportList = new ArrayList<>(); + Date now = new Date(); + Long uid = Long.valueOf(user.getUID()); + salaryAcctEmployeePOList.stream().forEach(acctEmp -> { + List oldResultList = resultMap.get(acctEmp.getEmployeeId()); + oldResultList.stream().forEach(oldResult -> { + // 薪资核算结果 + needInsertResultList.add(SalaryAcctResultPO.builder() + .salarySobId(salaryAcctRecordPO.getSalarySobId()) + .salaryItemId(oldResult.getSalaryItemId()) + .salaryAcctRecordId(newSalaryAcctRecordId) + .salaryAcctEmpId(acctEmp.getId()) + .employeeId(acctEmp.getEmployeeId()) + .taxAgentId(acctEmp.getTaxAgentId()) + .resultValue(StringUtils.trim(oldResult.getResultValue())) + .originResultValue(oldResult.getOriginResultValue()) + .creator(uid) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build()); + + // 报表结果 + SalaryAcctResultReportPO po = SalaryAcctResultReportPO.builder() + .id(IdGenerator.generate()) + .salarySobId(salaryAcctRecordPO.getSalarySobId()) + .salaryItemId(oldResult.getSalaryItemId()) + .salaryAcctRecordId(newSalaryAcctRecordId) + .salaryAcctEmpId(acctEmp.getId().toString()) + .employeeId(acctEmp.getEmployeeId().toString()) + .taxAgentId(acctEmp.getTaxAgentId()) + .resultValue(StringUtils.trim(oldResult.getResultValue())) + .creator(uid) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build(); + + DataCollectionEmployee dataCollectionEmployee = emps.get(acctEmp.getEmployeeId()); + if (dataCollectionEmployee != null) { + po.setDepartmentId(dataCollectionEmployee.getDepartmentId()); + po.setSubcompanyId(dataCollectionEmployee.getSubcompanyid()); + po.setCostcenterId(dataCollectionEmployee.getCostcenterId()); + po.setJobtitleId(dataCollectionEmployee.getJobtitleId()); + po.setLocationId(dataCollectionEmployee.getLocationId()); + } + needInsertResultReportList.add(po); + }); + }); + + // 入库 + getSalaryAcctResultService(user).batchSave(needInsertResultList); + getSalaryAcctReportService(user).batchSave(needInsertResultReportList); + + } } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 039546c4d..734f2ade4 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -4,6 +4,7 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.cache.SalaryCacheKey; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO; @@ -46,6 +47,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; +import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -55,6 +57,7 @@ import com.weaver.util.threadPool.entity.LocalRunnable; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -1088,4 +1091,169 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe } return true; } + + @Override + public void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param) { + ValidUtil.doValidator(param); + + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId()); + if (ObjectUtils.isEmpty(salaryAcctRecordPO)) { + throw new SalaryRunTimeException("薪资核算记录不存在,或已被删除"); + } + List salarySobItemPOS = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId()); + // 薪资账套中包含的薪资项目 + List salarySobItemIds = salarySobItemPOS.stream().map(SalarySobItemPO::getSalaryItemId).collect(Collectors.toList()); + if (!salarySobItemIds.contains(param.getSalaryItemId())) { + throw new SalaryRunTimeException("该账套不包含该薪资项目或已被删除,请先检查账套"); + } + // 获取需要更新的核算人员信息 + List salaryAcctEmployeePOList = Collections.emptyList(); + if (CollectionUtils.isEmpty(param.getSalaryAcctEmpIdList())) { + // 没有选择核算人员,更新核算记录中所有人员 + salaryAcctEmployeePOList.addAll(getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId())); + } else { + salaryAcctEmployeePOList.addAll(getSalaryAcctEmployeeService(user).listByIds(param.getSalaryAcctEmpIdList())); + } + + if (CollectionUtils.isNotEmpty(salaryAcctEmployeePOList)) { + List salaryAcctEmployeeIdList = SalaryEntityUtil.properties(salaryAcctEmployeePOList, SalaryAcctEmployeePO::getId, Collectors.toList()); + // 查询薪资核算结果 + List resultPOS = listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmployeeIdList, Collections.singleton(param.getSalaryItemId())); + Map salaryAcctResultPOMap = SalaryEntityUtil.convert2Map(resultPOS, SalaryAcctResultPO::getSalaryAcctEmpId); + List needUpdateList = new ArrayList<>(); + List needInsertList = new ArrayList<>(); + Date now = new Date(); + salaryAcctEmployeePOList.forEach(salaryAcctEmployeePO -> { + if (salaryAcctResultPOMap.containsKey(salaryAcctEmployeePO.getId())) { + // 更新 + SalaryAcctResultPO po = salaryAcctResultPOMap.get(salaryAcctEmployeePO.getId()); + po.setResultValue(param.getValue()); + po.setUpdateTime(now); + needUpdateList.add(po); + } else { + // 新增 + needInsertList.add(SalaryAcctResultPO.builder() + .salarySobId(salaryAcctRecordPO.getSalarySobId()) + .salaryItemId(param.getSalaryItemId()) + .salaryAcctRecordId(param.getSalaryAcctRecordId()) + .salaryAcctEmpId(salaryAcctEmployeePO.getId()) + .employeeId(salaryAcctEmployeePO.getEmployeeId()) + .taxAgentId(salaryAcctEmployeePO.getTaxAgentId()) + .resultValue(StringUtils.trim(param.getValue())) + .originResultValue("") + .creator(Long.valueOf(user.getUID())) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build()); + } + }); + // 入库 + if (CollectionUtils.isNotEmpty(needUpdateList)) { + getSalaryAcctResultMapper().batchUpdate(needUpdateList); + } + + if (CollectionUtils.isNotEmpty(needInsertList)) { + getSalaryAcctResultMapper().batchInsert(needInsertList); + } + } + } + + @Override + public void lkszBatchEdit(SalaryAcctResultBatchEditParam param) { + List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); + Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); + + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId()); + if (ObjectUtils.isEmpty(salaryAcctRecordPO)) { + throw new SalaryRunTimeException("薪资核算结果不存在或已被删除"); + } + + List salaryAcctEmployeePOList = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(param.getSalaryAcctRecordId()); + Map salaryAcctEmployeePOMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeePOList, SalaryAcctEmployeePO::getId); + + // 需要更新数据的薪资核算人员id + List updateAcctEmpIds = param.getResultValueList().stream().map(SalaryAcctResultBatchEditParam.resultValue::getSalaryAcctEmpId).collect(Collectors.toList()); + // 查询原来的薪资核算结果 + List salaryAcctResultPOSOld = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctEmpIds(updateAcctEmpIds).build()); + // 解密 + encryptUtil.decryptList(salaryAcctResultPOSOld, SalaryAcctResultPO.class); + // 保存参数转换成薪资核算结果po + List salaryAcctResultPOS = new ArrayList<>(); + // 获取薪资项目回算前的值 + Map salaryAcctResultOldPOMap = salaryAcctResultPOSOld.stream() + .collect(Collectors.groupingBy(p -> p.getSalaryAcctEmpId() + "-" + p.getSalaryItemId(), + Collectors.collectingAndThen(Collectors.maxBy(Comparator.comparing(SalaryAcctResultPO::getId)), + s -> s.map(SalaryAcctResultPO::getOriginResultValue).orElse("")))); + List salaryAcctResultReportPOS = new ArrayList<>(); + param.getResultValueList().forEach(resultValue -> { + SalaryAcctEmployeePO salaryAcctEmployeePO = salaryAcctEmployeePOMap.get(resultValue.getSalaryAcctEmpId()); + salaryAcctResultPOS.addAll(SalaryAcctResultBO.batchEditConvert2PO(salaryAcctResultOldPOMap, resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID())); + // 报表 + salaryAcctResultReportPOS.addAll(SalaryAcctResultReportBO.lkszConvert2PO(resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID(), emps)); + }); + + // 删除原来的薪资核算结果 + param.getResultValueList().stream().forEach(resultValue -> { + List saveItemIds = resultValue.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList()); + deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getSalaryAcctEmpId()), saveItemIds); + // 报表 + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getSalaryAcctEmpId()), saveItemIds); + }); + + // 保存薪资核算结果 + if (CollectionUtils.isNotEmpty(salaryAcctResultPOS)) { + // 加密 + encryptUtil.encryptList(salaryAcctResultPOS, SalaryAcctResultPO.class); + List> partition = Lists.partition(salaryAcctResultPOS, 100); + partition.forEach(getSalaryAcctResultMapper()::batchInsert); + } + + //报表 + if (CollectionUtils.isNotEmpty(salaryAcctResultReportPOS)) { + getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); + } + } + + + public void temp(SalaryAcctResultSaveParam saveParam){ + List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); + Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); + + // 查询薪资核算人员 + SalaryAcctEmployeePO salaryAcctEmployeePO = getSalaryAcctEmployeeService(user).getById(saveParam.getSalaryAcctEmpId()); + if (Objects.isNull(salaryAcctEmployeePO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98831, "薪资核算人员不存在或已被删除")); + } + // 查询原来的薪资核算结果 + List salaryAcctResultPOSOld = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctEmpId(saveParam.getSalaryAcctEmpId()).build()); + // 解密 + encryptUtil.decryptList(salaryAcctResultPOSOld, SalaryAcctResultPO.class); + // 保存参数转换成薪资核算结果po + List salaryAcctResultPOS = SalaryAcctResultBO.convert2PO(salaryAcctResultPOSOld, saveParam, salaryAcctEmployeePO, (long) user.getUID()); + SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK); + + // 删除原来的薪资核算结果 + List saveItemIds = saveParam.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList()); + deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds); + // 保存薪资核算结果 + if (CollectionUtils.isNotEmpty(salaryAcctResultPOS)) { + // 加密 + encryptUtil.encryptList(salaryAcctResultPOS, SalaryAcctResultPO.class); + List> partition = Lists.partition(salaryAcctResultPOS, 100); + partition.forEach(getSalaryAcctResultMapper()::batchInsert); + } + //报表 todo + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds); + List salaryAcctResultReportPOS = SalaryAcctResultReportBO.convert2PO(saveParam, salaryAcctEmployeePO, (long) user.getUID(), emps); + if (CollectionUtils.isNotEmpty(salaryAcctResultReportPOS)) { + getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); + } + + + // 存储薪资核算结果数据来源日志 + salaryAcctResultPOS = getSalaryAcctRecordService(user).listBySalaryAcctEmpId(saveParam.getSalaryAcctEmpId()); + saveSalaryAcctResultLog(salaryAcctResultPOSOld, salaryAcctResultPOS); + } } \ No newline at end of file diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java index 078060a02..45de6654d 100644 --- a/src/com/engine/salary/web/SalaryAcctController.java +++ b/src/com/engine/salary/web/SalaryAcctController.java @@ -158,6 +158,15 @@ public class SalaryAcctController { User user = HrmUserVarify.getUser(request, response); return new ResponseResult(user).run(getSalaryAcctRecordWrapper(user)::backCalculate, param.getSalaryAcctRecordId()); } + + // 结账 + @GET + @Path("/lkszJz") + @Produces(MediaType.APPLICATION_JSON) + public String lkszJz(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "id") Long id) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryAcctRecordWrapper(user)::lkszJz, id); + } /* ********************************薪资核算记录相关 end*********************************/ @@ -448,6 +457,24 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::updateLockStatusByParam, param); } + //鲁控数字批量更新 + @POST + @Path("/acctresult/lkszBatchUpdate") + @Produces(MediaType.APPLICATION_JSON) + public String lkszBatchUpdate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultBatchUpdateParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::lkszBatchUpdate, param); + } + + //鲁控数字批量编辑 + @POST + @Path("/acctresult/lkszBatchEdit") + @Produces(MediaType.APPLICATION_JSON) + public String lkszBatchEdit(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultBatchEditParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::lkszBatchEdit, param); + } + //薪资核算 @POST @Path("/acctresult/accounting") diff --git a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java index 9c17eaf78..5cd43cecb 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java @@ -258,4 +258,12 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord public void backCalculate(Long salaryAcctRecordId){ getSalaryAcctRecordService(user).backCalculate(salaryAcctRecordId); } + + /** + * 鲁控数字-结账 + * @param salaryAcctRecordId + */ + public void lkszJz(Long salaryAcctRecordId) { + getSalaryAcctRecordService(user).lkszJz(salaryAcctRecordId); + } } diff --git a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java index 8c0e6404d..59bbd3093 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java @@ -9,10 +9,7 @@ import com.engine.salary.entity.progress.ProgressDTO; import com.engine.salary.entity.salaryacct.dto.ConsolidatedTaxDetailDTO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO; -import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultQueryParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultSaveParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctResultUpdateLockStatusParam; +import com.engine.salary.entity.salaryacct.param.*; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.*; @@ -260,6 +257,22 @@ public class SalaryAcctResultWrapper extends Service { return getSalaryAcctResultService(user).checkAuth(salaryAcctRecordId); } + /** + * 鲁控数字薪资核算结果批量更新 + * @param param + */ + public void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param) { + getSalaryAcctResultService(user).lkszBatchUpdate(param); + } + + /** + * 鲁控数字薪资核算结果批量编辑 + * @param param + */ + public void lkszBatchEdit(SalaryAcctResultBatchEditParam param) { + getSalaryAcctResultService(user).lkszBatchEdit(param); + } + /** * 薪资核算-校验 From 451c9fb07bc45cc2e026c1fafde520251b598c68 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 6 Dec 2023 09:51:07 +0800 Subject: [PATCH 002/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=E6=94=B9?= =?UTF-8?q?=E9=80=A0=EF=BC=8C=E6=A0=B9=E6=8D=AE=E5=BA=94=E7=94=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E7=9A=84=E5=8C=BA=E5=88=86=E5=BC=80=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E5=88=A4=E5=AE=9A=E5=90=8E=E5=B0=86=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E7=9A=84=E7=A6=8F=E5=88=A9=E5=9F=BA=E6=95=B0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E5=8C=BA=E5=88=86=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 68 ++++++++++++++++--- .../po/InsuranceAccountDetailPO.java | 18 +++++ .../dto/InsuranceArchivesFundSchemeDTO.java | 2 + .../dto/InsuranceArchivesOtherSchemeDTO.java | 2 + .../dto/InsuranceArchivesSocialSchemeDTO.java | 3 + .../po/InsuranceArchivesFundSchemePO.java | 7 ++ .../po/InsuranceArchivesOtherSchemePO.java | 6 ++ .../po/InsuranceArchivesSocialSchemePO.java | 6 ++ .../sys/constant/SalarySysConstant.java | 5 ++ .../impl/SalarySysConfServiceImpl.java | 12 ++++ 10 files changed, 119 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 528849995..e0ebc3bef 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -14,7 +14,6 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.encrypt.AESEncryptUtil; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO; @@ -37,6 +36,10 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; +import com.engine.salary.sys.entity.po.SalarySysConfPO; +import com.engine.salary.sys.enums.OpenEnum; +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.SalaryEntityUtil; import com.engine.salary.util.SalaryFormItemUtil; @@ -65,6 +68,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_DIFF_BY_PER_AND_COM; + /** * @Author weaver_cl @@ -113,6 +118,10 @@ public class SIArchivesBiz { return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } + private SalarySysConfService getSalarySysConfService(User user) { + return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); + } + /** * @param welfareType * @param employeeId @@ -266,15 +275,18 @@ public class SIArchivesBiz { */ public Map getPaymentForm(User user, WelfareTypeEnum welfareType, Long employeeId, long operateId, Long schemeId, Long paymentOrganization) { Map data = new HashMap<>(16); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); switch (welfareType) { case SOCIAL_SECURITY: - data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization); + data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); break; case ACCUMULATION_FUND: - data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization); + data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); break; case OTHER: - data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization); + data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); break; default: } @@ -289,12 +301,16 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) { + public Map buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { Map dataMap = new HashMap<>(); InsuranceArchivesOtherSchemeDTO data = buildOtherForm(employeeId, operateId, paymentOrganization); if (data != null) { dataMap.put("data", JSONObject.parseObject(data.getOtherPaymentBaseString(), new TypeReference>() { })); + if (welBaseDiffSign) { + dataMap.put("comData", JSONObject.parseObject(data.getOtherPaymentComBaseString(), new TypeReference>() { + })); + } } List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); @@ -311,13 +327,17 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) { + public Map buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { Map dataMap = new HashMap<>(); InsuranceArchivesFundSchemeDTO data = buildFundForm(employeeId, operateId, paymentOrganization); if (data != null) { dataMap.put("data", JSONObject.parseObject(data.getFundPaymentBaseString(), new TypeReference>() { })); + if (welBaseDiffSign) { + dataMap.put("comData", JSONObject.parseObject(data.getFundPaymentComBaseString(), new TypeReference>() { + })); + } } List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); @@ -334,18 +354,28 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) { + public Map buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { Map dataMap = new HashMap<>(); InsuranceArchivesSocialSchemeDTO data = buildSocialForm(employeeId, operateId, paymentOrganization); if (data != null) { dataMap.put("data", JSONObject.parseObject(data.getSchemePaymentBaseString(), new TypeReference>() { })); + if (welBaseDiffSign) { + dataMap.put("comData", JSONObject.parseObject(data.getSchemePaymentComBaseString(), new TypeReference>() { + })); + } } List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); addGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputItems)); dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputComItems)); + dataMap.put("comItems", addComGroups); + } return dataMap; } @@ -361,9 +391,27 @@ public class SIArchivesBiz { if (schemeId == null) { return new ArrayList<>(); } - List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream().collect(Collectors.collectingAndThen( - Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceSchemeDetailPO::getInsuranceId))), ArrayList::new) - ); + List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList()); + SICategoryBiz siCategoryBiz = new SICategoryBiz(); + list.forEach(insuranceSchemeDetail -> { + ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); + if (iCategoryPO != null) { +// inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()))); + inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()) + , insuranceSchemeDetail.getUpperLimit(), insuranceSchemeDetail.getLowerLimit())); + } + }); + return inputItems; + } + + public List buildPaymentComBase(User user, Long schemeId, Integer welfareType) { + List inputItems = new ArrayList<>(); + if (schemeId == null) { + return new ArrayList<>(); + } + List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue())).collect(Collectors.toList()); SICategoryBiz siCategoryBiz = new SICategoryBiz(); list.forEach(insuranceSchemeDetail -> { ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java index e8f7ce98f..9cd2ad7f0 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java @@ -106,6 +106,12 @@ public class InsuranceAccountDetailPO { @Encrypt private String socialPaymentBaseString; + /** + * 社保缴纳基数——单位 + */ + @Encrypt + private String socialPaymentComBaseString; + /** * 公积金方案ID */ @@ -117,6 +123,12 @@ public class InsuranceAccountDetailPO { @Encrypt private String fundPaymentBaseString; + /** + * 公积金缴纳基数——单位 + */ + @Encrypt + private String fundPaymentComBaseString; + /** * 其他福利方案id */ @@ -128,6 +140,12 @@ public class InsuranceAccountDetailPO { @Encrypt private String otherPaymentBaseString; + /** + * 其他福利缴纳基数——单位 + */ + @Encrypt + private String otherPaymentComBaseString; + /** * 社保个人缴费明细 */ diff --git a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesFundSchemeDTO.java b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesFundSchemeDTO.java index f85206c01..4fcfdbcd1 100644 --- a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesFundSchemeDTO.java +++ b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesFundSchemeDTO.java @@ -65,4 +65,6 @@ public class InsuranceArchivesFundSchemeDTO { //缴纳基数 private String fundPaymentBaseString; + + private String fundPaymentComBaseString; } diff --git a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesOtherSchemeDTO.java b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesOtherSchemeDTO.java index a3c55fee5..3fa89c1c2 100644 --- a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesOtherSchemeDTO.java +++ b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesOtherSchemeDTO.java @@ -56,5 +56,7 @@ public class InsuranceArchivesOtherSchemeDTO { private String otherPaymentBaseString; + private String otherPaymentComBaseString; + //private WeaForm otherPaymentBase; } diff --git a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesSocialSchemeDTO.java b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesSocialSchemeDTO.java index 1be1afbca..d4fc1dae8 100644 --- a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesSocialSchemeDTO.java +++ b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesSocialSchemeDTO.java @@ -59,4 +59,7 @@ public class InsuranceArchivesSocialSchemeDTO { //社保缴纳基数 private String schemePaymentBaseString; + //社保缴纳基数——单位 + private String schemePaymentComBaseString; + } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java index 7b333f4e6..fc171c94b 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java @@ -87,6 +87,13 @@ public class InsuranceArchivesFundSchemePO { @Encrypt private String fundPaymentBaseString; + /** + * 公积金缴纳基数——单位 + */ + @Encrypt + private String fundPaymentComBaseString; + + /** * 租户key */ diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java index 76146719d..9ad9d9668 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java @@ -77,6 +77,12 @@ public class InsuranceArchivesOtherSchemePO { @Encrypt private String otherPaymentBaseString; + /** + * 其他福利缴纳基数——单位 + */ + @Encrypt + private String otherPaymentComBaseString; + /** * 租户key */ diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java index e6f4ff038..645e5215b 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java @@ -83,6 +83,12 @@ public class InsuranceArchivesSocialSchemePO { @Encrypt private String socialPaymentBaseString; + /** + * 社保缴纳基数——单位 + */ + @Encrypt + private String socialPaymentComBaseString; + /** * 租户key */ diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index c5b6b08db..df5ea5ea2 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -105,4 +105,9 @@ public class SalarySysConstant { * 核算固定列头数 */ public static final String SALARY_ACCT_FIXED_COLUMNS = "salaryAcctFixedColumns"; + + /** + * 应用设置是否福利档案基数区分个人和单位 + */ + public static final String WEL_BASE_DIFF_BY_PER_AND_COM = "welBaseDiffByPerAndCom"; } diff --git a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java index 57fb34878..74ead2a26 100644 --- a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java +++ b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java @@ -755,8 +755,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe insuranceArchivesSocialSchemePos.forEach(po -> { if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) { po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString(), sysConfPo)); + po.setSocialPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentComBaseString(), sysConfPo)); } else { po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString())); + po.setSocialPaymentComBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentComBaseString())); } }); List> partition = Lists.partition(insuranceArchivesSocialSchemePos, 50); @@ -782,8 +784,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe insuranceArchivesFundSchemePos.forEach(po -> { if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) { po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString(), sysConfPo)); + po.setFundPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentComBaseString(), sysConfPo)); } else { po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString())); + po.setFundPaymentComBaseString(AESEncryptUtil.encrypt(po.getFundPaymentComBaseString())); } }); List> partition = Lists.partition(insuranceArchivesFundSchemePos, 50); @@ -809,8 +813,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe insuranceArchivesOtherSchemePos.forEach(po -> { if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) { po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString(), sysConfPo)); + po.setOtherPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentComBaseString(), sysConfPo)); } else { po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString())); + po.setOtherPaymentComBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentComBaseString())); } }); List> partition = Lists.partition(insuranceArchivesOtherSchemePos, 50); @@ -869,6 +875,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString(), sysConfPo)); po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString(), sysConfPo)); po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString(), sysConfPo)); + po.setSocialPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentComBaseString(), sysConfPo)); + po.setFundPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentComBaseString(), sysConfPo)); + po.setOtherPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentComBaseString(), sysConfPo)); po.setSocialPerJson(AESEncryptUtil.closeEncryptSetting(po.getSocialPerJson(), sysConfPo)); po.setSocialPerSum(AESEncryptUtil.closeEncryptSetting(po.getSocialPerSum(), sysConfPo)); po.setFundPerJson(AESEncryptUtil.closeEncryptSetting(po.getFundPerJson(), sysConfPo)); @@ -887,6 +896,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString())); po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString())); po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString())); + po.setSocialPaymentComBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentComBaseString())); + po.setFundPaymentComBaseString(AESEncryptUtil.encrypt(po.getFundPaymentComBaseString())); + po.setOtherPaymentComBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentComBaseString())); po.setSocialPerJson(AESEncryptUtil.encrypt(po.getSocialPerJson())); po.setSocialPerSum(AESEncryptUtil.encrypt(po.getSocialPerSum())); po.setFundPerJson(AESEncryptUtil.encrypt(po.getFundPerJson())); From ec8cb6214ddb4b6f4a758b9f71c5750ab1bdabe8 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 6 Dec 2023 14:04:12 +0800 Subject: [PATCH 003/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=94=B9=E9=80=A0=EF=BC=8C=E9=80=82=E9=85=8D=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=A1=A3=E6=A1=88=E7=A6=8F=E5=88=A9=E5=9F=BA=E6=95=B0?= =?UTF-8?q?=E6=8B=86=E5=88=86=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 163 ++++++++++++++++-- .../dto/InsuranceArchivesBaseHistoryDTO.java | 6 + .../param/InsuranceArchivesSaveParam.java | 2 + .../po/InsuranceArchivesBaseHistoryPO.java | 2 + .../mapper/siarchives/FundSchemeMapper.xml | 5 + .../mapper/siarchives/OtherSchemeMapper.xml | 9 +- .../mapper/siarchives/SocialSchemeMapper.xml | 5 + .../service/impl/SIArchivesServiceImpl.java | 2 +- .../service/impl/SISchemeServiceImpl.java | 6 +- 9 files changed, 175 insertions(+), 25 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index e0ebc3bef..a58021031 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -669,17 +669,20 @@ public class SIArchivesBiz { * @param param * @param employeeId */ - public void insert(InsuranceArchivesSaveParam param, long employeeId) { + public void insert(InsuranceArchivesSaveParam param, User user) { SalaryAssert.notNull(param.getWelfareType(), "福利类型为空"); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); switch (param.getWelfareType()) { case SOCIAL_SECURITY: - socialSave(param, employeeId); + socialSave(param, user, welBaseDiffSign); break; case ACCUMULATION_FUND: - fundSave(param, employeeId); + fundSave(param, user, welBaseDiffSign); break; case OTHER: - otherSave(param, employeeId); + otherSave(param, user, welBaseDiffSign); break; default: throw new SalaryRunTimeException("福利类型不存在"); @@ -691,7 +694,8 @@ public class SIArchivesBiz { * @param paramReq * @param employeeId */ - public void otherSave(InsuranceArchivesSaveParam paramReq, long employeeId) { + public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); @@ -714,6 +718,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(param.getOtherSchemeId()) .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) .welfareType(paramReq.getWelfareType().getValue()) .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) @@ -725,6 +730,7 @@ public class SIArchivesBiz { encryptUtil.decrypt(oldOtherInfo, InsuranceArchivesOtherSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldOtherInfo.getOtherPaymentBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldOtherInfo.getOtherSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldOtherInfo.getOtherPaymentComBaseString()); //新数据 InsuranceArchivesOtherSchemePO updateOtherInfo = InsuranceArchivesOtherSchemePO.builder() @@ -744,9 +750,17 @@ public class SIArchivesBiz { .otherPaymentBaseString(paramReq.getPaymentForm()) .build(); //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString())) { + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class); otherSchemeMapper.updateById(updateOtherInfo); //更新base_info表状态 @@ -780,9 +794,17 @@ public class SIArchivesBiz { .otherPaymentBaseString(paramReq.getPaymentForm()) .build(); //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString())) { + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class); otherSchemeMapper.insert(insertOtherInfo); sqlSession.commit(); @@ -818,7 +840,8 @@ public class SIArchivesBiz { * @param paramReq * @param employeeId */ - public void fundSave(InsuranceArchivesSaveParam paramReq, long employeeId) { + public void fundSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); @@ -840,6 +863,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(param.getFundSchemeId()) .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) .welfareType(paramReq.getWelfareType().getValue()) .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) @@ -851,6 +875,7 @@ public class SIArchivesBiz { encryptUtil.decrypt(oldFundInfo, InsuranceArchivesFundSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldFundInfo.getFundPaymentBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldFundInfo.getFundSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldFundInfo.getFundPaymentComBaseString()); //新数据 InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder() .id(oldFundInfo.getId()) @@ -871,9 +896,17 @@ public class SIArchivesBiz { .employeeId(param.getEmployeeId()) .build(); //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString())) { + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class); fundSchemeMapper.updateById(updateFundInfo); //更新base_info表状态 @@ -909,9 +942,17 @@ public class SIArchivesBiz { .employeeId(param.getEmployeeId()) .build(); //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString())) { + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class); fundSchemeMapper.insert(insertFundInfo); sqlSession.commit(); @@ -949,8 +990,8 @@ public class SIArchivesBiz { * @param paramReq * @param employeeId */ - public void socialSave(InsuranceArchivesSaveParam paramReq, long employeeId) { - + public void socialSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); @@ -977,6 +1018,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(param.getSocialSchemeId()) .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) .welfareType(paramReq.getWelfareType().getValue()) .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) @@ -990,6 +1032,7 @@ public class SIArchivesBiz { encryptUtil.decrypt(oldSocialInfo, InsuranceArchivesSocialSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldSocialInfo.getSocialPaymentBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldSocialInfo.getSocialSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldSocialInfo.getSocialPaymentComBaseString()); //新数据 InsuranceArchivesSocialSchemePO updateSocialInfo = InsuranceArchivesSocialSchemePO.builder() @@ -1010,9 +1053,17 @@ public class SIArchivesBiz { .paymentOrganization(param.getPaymentOrganization()) .build(); //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString())) { + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class); socialSchemeMapper.updateById(updateSocialInfo); //更新base_info表状态 @@ -1048,9 +1099,17 @@ public class SIArchivesBiz { .paymentOrganization(param.getPaymentOrganization()) .build(); //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString())) { + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"); + } + } encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class); socialSchemeMapper.insert(insertSocialInfo); sqlSession.commit(); @@ -1088,14 +1147,11 @@ public class SIArchivesBiz { * @param paymentBaseString * @return */ - public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString) { + public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) { if (primaryId ==null || paymentBaseString == null) { return true; } - //设置缴纳对象和缴费状态 -// Integer paymentScope = 2; -// Integer isPayment = 1; Map paymentBaseJson = JSON.parseObject(paymentBaseString, new HashMap().getClass()); if (paymentBaseJson == null) { return true; @@ -1119,7 +1175,7 @@ public class SIArchivesBiz { return false; } List isPaymentList = insuranceSchemeDetailPOList.stream() - .filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList()); + .filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList()); if (isPaymentList.size() > 0) { InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0); @@ -2035,6 +2091,11 @@ public class SIArchivesBiz { //生成基数调整记录(基数单元未变化则忽略) public List createAdjustInfo(InsuranceArchivesBaseHistoryDTO adjustInfo, Long creator) { Date now = new Date(); + //判断是否要区分个人和单位福利基数 + User user = new User(Math.toIntExact(creator)); + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + List toCreateAdjustHistoryList = new ArrayList<>(); //旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。 if(StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isBlank(adjustInfo.getAdjustBeforeBaseJson())) { @@ -2053,6 +2114,7 @@ public class SIArchivesBiz { adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); toCreateAdjustHistoryList.add(adjustItem); } } else if (StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isNotBlank(adjustInfo.getAdjustBeforeBaseJson())) { @@ -2087,12 +2149,75 @@ public class SIArchivesBiz { adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); toCreateAdjustHistoryList.add(adjustItem); } } } + //如果系统应用设置拆分了个人和公司福利基数,则对adjustBeforeComBaseJson,adjustAfterComBaseJson也进行处理 + if (welBaseDiffSign) { + //旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。 + if(StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && StringUtils.isBlank(adjustInfo.getAdjustBeforeComBaseJson())) { + Map adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference>() { + }); + for (String key : adjustAfterComBaseMap.keySet()) { + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustAfterBaseValue((String) adjustAfterComBaseMap.get(key)); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + toCreateAdjustHistoryList.add(adjustItem); + } + } else if (StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && StringUtils.isNotBlank(adjustInfo.getAdjustBeforeComBaseJson())) { + Map adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference>() { + }); + Map adjustBeforeComBaseMap = JSON.parseObject(adjustInfo.getAdjustBeforeComBaseJson(), new TypeReference>() { + }); + Map reDealMap = new HashMap<>(); + if (adjustAfterComBaseMap != null) { + reDealMap.putAll(adjustAfterComBaseMap); + } + if (adjustBeforeComBaseMap != null) { + reDealMap.putAll(adjustBeforeComBaseMap); + } + if (reDealMap.size() >0) { + for (String key : reDealMap.keySet()) { + String beforeValue = (String) adjustBeforeComBaseMap.get(key); + String afterValue = (String) adjustAfterComBaseMap.get(key); + if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) { + continue; + } + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustBeforeBaseValue(beforeValue); + adjustItem.setAdjustAfterBaseValue(afterValue); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope( PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + + toCreateAdjustHistoryList.add(adjustItem); + } + } + + } + } return toCreateAdjustHistoryList; } diff --git a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesBaseHistoryDTO.java b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesBaseHistoryDTO.java index 259cc3e54..a0c2d57e8 100644 --- a/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesBaseHistoryDTO.java +++ b/src/com/engine/salary/entity/siarchives/dto/InsuranceArchivesBaseHistoryDTO.java @@ -70,12 +70,18 @@ public class InsuranceArchivesBaseHistoryDTO { private String adjustAfterBaseJson; + private String adjustBeforeComBaseJson; + + private String adjustAfterComBaseJson; + @TableTitle(title = "对象", dataIndex = "employeeName", key = "employeeName") private String employeeName; @TableTitle(title = "个税扣缴义务人", dataIndex = "paymentOrganizationName", key = "paymentOrganizationName") private String paymentOrganizationName; @TableTitle(title = "福利项名称", dataIndex = "welfareItemName", key = "welfareItemName") private String welfareItemName; + @TableTitle(title = "缴费对象", dataIndex = "paymentScope", key = "paymentScope") + private String paymentScope; @TableTitle(title = "调整前方案", dataIndex = "adjustBeforeSchemeName", key = "adjustBeforeSchemeName") private String adjustBeforeSchemeName; @TableTitle(title = "调整前基数", dataIndex = "adjustBeforeBaseValue", key = "adjustBeforeBaseValue") diff --git a/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesSaveParam.java b/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesSaveParam.java index 7e4e46fb7..8d086b1ad 100644 --- a/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesSaveParam.java +++ b/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesSaveParam.java @@ -23,4 +23,6 @@ public class InsuranceArchivesSaveParam { private String baseForm; private String paymentForm; + + private String paymentComForm; } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseHistoryPO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseHistoryPO.java index 6939c2258..52d31f804 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseHistoryPO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseHistoryPO.java @@ -77,4 +77,6 @@ public class InsuranceArchivesBaseHistoryPO { private Date createTime; private Date updateTime; + + private String paymentScope; } diff --git a/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml index fc91b8885..56731a58b 100644 --- a/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml @@ -14,6 +14,7 @@ + @@ -35,6 +36,7 @@ , t.payment_organization , t.under_take , t.fund_payment_base_string + , t.fund_payment_com_base_string , t.create_time , t.update_time , t.creator @@ -311,6 +313,7 @@ welfare_type = #{welfareType}, fund_payment_base_string = #{fundPaymentBaseString}, + fund_payment_com_base_string = #{fundPaymentComBaseString}, fund_scheme_id = #{fundSchemeId}, fund_end_time = #{fundEndTime}, fund_start_time = #{fundStartTime}, @@ -353,6 +356,7 @@ fund_end_time, fund_start_time, fund_payment_base_string, + fund_payment_com_base_string, supplement_fund_account, create_time, creator, @@ -371,6 +375,7 @@ #{fundEndTime}, #{fundStartTime}, #{fundPaymentBaseString}, + #{fundPaymentComBaseString}, #{supplementFundAccount}, #{createTime}, #{creator}, diff --git a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml index d1a18db07..de0febe4f 100644 --- a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml @@ -12,6 +12,7 @@ + @@ -31,6 +32,7 @@ , t.payment_organization , t.under_take , t.other_payment_base_string + , t.other_payment_com_base_string , t.create_time , t.update_time , t.creator @@ -292,6 +294,7 @@ welfare_type = #{welfareType}, other_payment_base_string = #{otherPaymentBaseString}, + other_payment_com_base_string = #{otherPaymentComBaseString}, other_scheme_id = #{otherSchemeId}, other_end_time = #{otherEndTime}, other_start_time = #{otherStartTime}, @@ -340,7 +343,8 @@ non_payment, creator, payment_organization, - other_payment_base_string) + other_payment_base_string, + other_payment_com_base_string) VALUES ( #{otherSchemeId}, @@ -356,7 +360,8 @@ #{nonPayment}, #{creator}, #{paymentOrganization}, - #{otherPaymentBaseString} + #{otherPaymentBaseString}, + #{otherPaymentComBaseString} ) \ No newline at end of file diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml index 8472020a2..c27048d10 100644 --- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml @@ -13,6 +13,7 @@ + @@ -33,6 +34,7 @@ , t.payment_organization , t.under_take , t.social_payment_base_string + , t.social_payment_com_base_string , t.create_time , t.update_time , t.creator @@ -955,6 +957,7 @@ welfare_type = #{welfareType}, social_payment_base_string = #{socialPaymentBaseString}, + social_payment_com_base_string = #{socialPaymentComBaseString}, social_scheme_id = #{socialSchemeId}, social_end_time = #{socialEndTime}, social_start_time = #{socialStartTime}, @@ -994,6 +997,7 @@ welfare_type, delete_type, social_payment_base_string, + social_payment_com_base_string, social_scheme_id, create_time, social_end_time, @@ -1011,6 +1015,7 @@ #{welfareType}, #{deleteType}, #{socialPaymentBaseString}, + #{socialPaymentComBaseString}, #{socialSchemeId}, #{createTime}, #{socialEndTime}, diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 59b4d8e48..11299554e 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -141,7 +141,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public String insert(InsuranceArchivesSaveParam param) { SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - siArchivesBiz.insert(param, (long) user.getUID()); + siArchivesBiz.insert(param, user); return null; } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 8746fdd48..d49f971e2 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -1102,11 +1102,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO); insuranceArchivesAccountPO.setBaseInfo(insuranceArchivesBaseInfoPO); //校验福利基数是否符合上下限要求, - Boolean socialCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString()); + Boolean socialCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - Boolean fundCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString()); + Boolean fundCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString()); + Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); if (socialCheckBase && fundCheckBase && otherCheckBase) { insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); From 6dca2a43800b08f8d4101f40ac6a2ff095f5e817 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 6 Dec 2023 15:38:19 +0800 Subject: [PATCH 004/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E6=97=B6=EF=BC=8C=E6=A1=A3=E6=A1=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=A4=BA=EF=BC=8C=E5=8C=BA=E5=88=86=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E7=A6=8F=E5=88=A9=E5=9F=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 282 +++++++++++++++--- .../salary/web/SIArchivesController.java | 2 + 2 files changed, 241 insertions(+), 43 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index a58021031..eb4980815 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -13,6 +13,7 @@ import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; +import com.engine.salary.common.SalaryContext; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -1383,6 +1384,7 @@ public class SIArchivesBiz { * @return */ public List buildWeaTableColumns(List insuranceArchivesEmployeePOS, long operateId) { + Map> titleMap = buildColumnTitle(insuranceArchivesEmployeePOS, operateId); List list = new ArrayList<>(); WeaTableColumn nameColumn = new WeaTableColumn("100px", "姓名", "employeeName"); @@ -1422,6 +1424,9 @@ public class SIArchivesBiz { * @return */ public Map> buildColumnTitle(List insuranceArchivesEmployeePOS, long operateId) { + + boolean welBaseDiffSign = isDiffWelBase(); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); Map> result = new HashMap<>(); @@ -1437,16 +1442,17 @@ public class SIArchivesBiz { Set fundSet = new HashSet<>(); Set otherSet = new HashSet<>(); + Set socialComSet = new HashSet<>(); + Set fundComSet = new HashSet<>(); + Set otherComSet = new HashSet<>(); + insuranceArchivesEmployeePOS.forEach(item -> { List socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId())); encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); -// InsuranceArchivesSocialSchemePO socialItem = socialList.size() != 0 ? socialList.get(0) : null; List fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId())); encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); -// InsuranceArchivesFundSchemePO fundItem = fundList.size() != 0 ? fundList.get(0) : null; List otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId())); encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); -// InsuranceArchivesOtherSchemePO otherItem = otherList.size() != 0 ? otherList.get(0) : null; if (socialList.size() > 0) { for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) { @@ -1455,6 +1461,14 @@ public class SIArchivesBiz { if (socialJson != null) { socialJson.forEach((k, v) -> socialSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map socialComJson = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + socialComJson.forEach((k, v) -> socialComSet.add(k)); + } + } } } @@ -1465,6 +1479,14 @@ public class SIArchivesBiz { if (fundJson != null) { fundJson.forEach((k, v) -> fundSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map fundComJson = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + fundComJson.forEach((k, v) -> fundComSet.add(k)); + } + } } } @@ -1475,11 +1497,20 @@ public class SIArchivesBiz { if (otherJson != null) { otherJson.forEach((k, v) -> otherSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map otherComJson = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + otherComJson.forEach((k, v) -> otherComSet.add(k)); + } + } } } }); Map socialMap = new HashMap<>(); + Map socialComMap = new HashMap<>(); Map socialCollect = new HashMap<>(); Map customSocial = iCategoryMapper.listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null) .stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); @@ -1489,34 +1520,89 @@ public class SIArchivesBiz { socialCollect.putAll(customSocial); socialCollect.putAll(sysSocial); - socialSet.forEach(item -> { - if (socialCollect.containsKey(Long.valueOf(item))) { - socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); - } - }); +// socialSet.forEach(item -> { +// if (socialCollect.containsKey(Long.valueOf(item))) { +// socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); +// } +// }); + if (welBaseDiffSign) { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + } + }); + socialComSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + } + }); + } else { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + } + }); + } Map fundMap = new HashMap<>(); + Map fundComMap = new HashMap<>(); Map fundCollect = new HashMap<>(); Map customFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); Map sysFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); fundCollect.putAll(customFund); fundCollect.putAll(sysFund); - fundSet.forEach(item -> { - if (fundCollect.containsKey(Long.valueOf(item))) { - fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); - } - }); +// fundSet.forEach(item -> { +// if (fundCollect.containsKey(Long.valueOf(item))) { +// fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); +// } +// }); + if (welBaseDiffSign) { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + } + }); + fundComSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + } + }); + } else { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + } + }); + } Map otherMap = new HashMap<>(); + Map otherComMap = new HashMap<>(); Map otherCollect = new HashMap<>(); Map customOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); Map sysOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); otherCollect.putAll(customOther); otherCollect.putAll(sysOther); - otherSet.forEach(item -> { - if (otherCollect.containsKey(Long.valueOf(item))) { - otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); - } - }); - +// otherSet.forEach(item -> { +// if (otherCollect.containsKey(Long.valueOf(item))) { +// otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); +// } +// }); + if (welBaseDiffSign) { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + } + }); + otherComSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + } + }); + } else { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + } + }); + } // map根据key排序 LinkedHashMap socialMapWithAscKey = socialMap.entrySet().stream() .sorted(Map.Entry.comparingByKey()) @@ -1530,6 +1616,23 @@ public class SIArchivesBiz { .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); + if (welBaseDiffSign) { + LinkedHashMap socialComMapWithAscKey = socialComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundComMapWithAscKey = fundComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherComMapWithAscKey = otherComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + socialMapWithAscKey.putAll(socialComMapWithAscKey); + fundMapWithAscKey.putAll(fundComMapWithAscKey); + otherMapWithAscKey.putAll(otherComMapWithAscKey); + } result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey); @@ -1552,6 +1655,9 @@ public class SIArchivesBiz { * @return */ public List> buildTableData(List insuranceArchivesEmployeePOS, boolean export) { + + boolean welBaseDiffSign = isDiffWelBase(); + List taxAgentPOS = getTaxAgentMapper().listAll(); Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); @@ -1599,16 +1705,39 @@ public class SIArchivesBiz { map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId())); Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { }); - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(socialJson); + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } + map.put("socialAccount", socialItem.getSocialAccount()); map.put("socialStartTime", socialItem.getSocialStartTime()); map.put("socialEndTime", socialItem.getSocialEndTime()); @@ -1618,16 +1747,39 @@ public class SIArchivesBiz { map.put("fundAccount", fundItem.getFundAccount()); Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { }); - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(fundJson); + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } + map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); map.put("fundStartTime", fundItem.getFundStartTime()); map.put("fundEndTime", fundItem.getFundEndTime()); @@ -1637,16 +1789,39 @@ public class SIArchivesBiz { map.put("otherName", insuranceSchemeMapper.querySchemeName(otherItem.getOtherSchemeId())); Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { }); - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(otherJson); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } + map.put("otherStartTime", otherItem.getOtherStartTime()); map.put("otherEndTime", otherItem.getOtherEndTime()); } @@ -1669,6 +1844,19 @@ public class SIArchivesBiz { } return insuranceIdList; } + + public List payInsuranceIds(Long socialSchemeId, Integer paymentScope) { + //查询该福利方案下开启缴纳的福利项 + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialSchemeId); + List insuranceIdList = new ArrayList<>(); + if (detailPOS != null && detailPOS.size() > 0) { + //开启缴纳的 + insuranceIdList = detailPOS.stream().filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)) + .map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + } + return insuranceIdList; + } + /** * 获取信息提示 */ @@ -2296,4 +2484,12 @@ public class SIArchivesBiz { list.add(new WeaTableColumn("150px", "操作时间", "operatorTime")); return list; } + + public boolean isDiffWelBase() { + User user = (User) SalaryContext.get().getValue("user"); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + + return welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + } } diff --git a/src/com/engine/salary/web/SIArchivesController.java b/src/com/engine/salary/web/SIArchivesController.java index ecc61b1b5..e0b3bfe89 100644 --- a/src/com/engine/salary/web/SIArchivesController.java +++ b/src/com/engine/salary/web/SIArchivesController.java @@ -2,6 +2,7 @@ package com.engine.salary.web; import com.engine.common.util.ParamUtil; import com.engine.common.util.ServiceUtil; +import com.engine.salary.common.SalaryContext; import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam; @@ -33,6 +34,7 @@ import java.util.Map; public class SIArchivesController { private SIArchivesService getService(User user) { + SalaryContext.get().setValue("user",user); return ServiceUtil.getService(SIArchivesServiceImpl.class,user); } From 2a02e17c15e57958e48a68fd099a033c7bf4201d Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 6 Dec 2023 15:55:47 +0800 Subject: [PATCH 005/169] temp --- .../salary/service/impl/SalaryAcctResultServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 734f2ade4..f051dfefd 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -1151,12 +1151,13 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe }); // 入库 if (CollectionUtils.isNotEmpty(needUpdateList)) { - getSalaryAcctResultMapper().batchUpdate(needUpdateList); - } + // 数据加密 + encryptUtil.encryptList(needUpdateList, SalaryAcctResultPO.class); + List> partition = Lists.partition(needUpdateList, 100); + partition.forEach(getSalaryAcctResultMapper()::batchUpdate); - if (CollectionUtils.isNotEmpty(needInsertList)) { - getSalaryAcctResultMapper().batchInsert(needInsertList); } + batchSave(needInsertList); } } From 419baeb8cd41050570327b61d740d16b949728b6 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 6 Dec 2023 16:05:08 +0800 Subject: [PATCH 006/169] =?UTF-8?q?=E9=B2=81=E6=8E=A7=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 1 - .../salary/component/WeaTableColumnGroup.java | 12 ++++ .../salaryacct/bo/SalaryAcctRecordBO.java | 3 + .../salaryacct/bo/SalaryAcctResultBO.java | 23 ++++---- .../dto/SalaryAcctResultDetailDTO.java | 3 + .../param/SalaryAcctResultBatchEditParam.java | 4 +- .../SalaryAcctResultBatchUpdateParam.java | 2 +- .../service/SalaryAcctRecordService.java | 2 +- .../service/SalaryAcctReportService.java | 2 + .../service/SalaryAcctResultService.java | 4 +- .../impl/SalaryAcctRecordServiceImpl.java | 3 +- .../impl/SalaryAcctReportServiceImpl.java | 13 +++++ .../impl/SalaryAcctResultServiceImpl.java | 58 +++++++++++++++---- .../salary/web/SalaryAcctController.java | 10 ++-- .../wrapper/SalaryAcctRecordWrapper.java | 2 +- .../wrapper/SalaryAcctResultWrapper.java | 6 +- 16 files changed, 109 insertions(+), 39 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 4ba839d57..4e5d4378e 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -7,7 +7,6 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.cache.SalaryCacheKey; import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.encrypt.AESEncryptUtil; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.progress.ProgressDTO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; diff --git a/src/com/engine/salary/component/WeaTableColumnGroup.java b/src/com/engine/salary/component/WeaTableColumnGroup.java index dac9a3569..0dcd305af 100644 --- a/src/com/engine/salary/component/WeaTableColumnGroup.java +++ b/src/com/engine/salary/component/WeaTableColumnGroup.java @@ -18,6 +18,11 @@ public class WeaTableColumnGroup extends WeaTableColumn { */ private Integer pattern; + /** + * 字段类型 + */ + private String dataType; + private List children; public WeaTableColumnGroup() { @@ -40,6 +45,13 @@ public class WeaTableColumnGroup extends WeaTableColumn { this.pattern = pattern; } + public WeaTableColumnGroup(String width, String text, String column, String lockStatus, Integer pattern, String dataType) { + super(width, text, column); + this.lockStatus = lockStatus; + this.pattern = pattern; + this.dataType = dataType; + } + public WeaTableColumnGroup(String width, String text, String column, List children) { super(width, text, column); diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java index f07aa7d36..11a44f311 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java @@ -67,13 +67,16 @@ public class SalaryAcctRecordBO { btnList.add(new WeaTableOperate("删除", null, "1")); } btnList.add(new WeaTableOperate("归档", null, "2")); + btnList.add(new WeaTableOperate("结转", null, "6")); } else if (SalaryAcctRecordStatusEnum.ARCHIVED == salaryAcctRecordStatusEnum && ( salarySendMap.get(salaryAcctRecordPO.getId()) ==Boolean.TRUE ) ){ btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); btnList.add(new WeaTableOperate("回算", null, "5")); + btnList.add(new WeaTableOperate("结转", null, "6")); } else { btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); + btnList.add(new WeaTableOperate("结转", null, "6")); } return SalaryAcctRecordListDTO.builder() .id(salaryAcctRecordPO.getId()) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 29cae5d4a..bfa7210cc 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -141,9 +141,9 @@ public class SalaryAcctResultBO { List childrenColumns = Lists.newArrayList(); for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup("150", salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns); @@ -152,18 +152,18 @@ public class SalaryAcctResultBO { // 没有分类的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } // 回算的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } @@ -378,7 +378,8 @@ public class SalaryAcctResultBO { List salarySobBackItemPOS, List salaryBackItemPOS, Map salaryBackItemFormula, - Map formulaContentMap) { + Map formulaContentMap, + List lockItems) { // 员工信息字段 Map employeeFieldValueMap = SalaryAcctFormulaBO.convert2FormulaEmployee(simpleEmployee); @@ -407,7 +408,7 @@ public class SalaryAcctResultBO { List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList()); if(CollectionUtils.isNotEmpty(groupItems)){ List items = groupItems.stream() - .map(salarySobItemPO -> convert2SalaryAcctResultDetailItemDTO(salarySobItemPO, salaryItemMap.get(salarySobItemPO.getSalaryItemId()), resultValueMap, formulaContentMap)) + .map(salarySobItemPO -> convert2SalaryAcctResultDetailItemDTO(salarySobItemPO, salaryItemMap.get(salarySobItemPO.getSalaryItemId()), resultValueMap, formulaContentMap, lockItems)) .collect(Collectors.toList()); itemsByGroup.add(SalaryAcctResultDetailDTO.SalaryAcctResultDetailItemByGroupDTO.builder() .salarySobItemGroupId(groupPO.getId()) @@ -420,7 +421,7 @@ public class SalaryAcctResultBO { List noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList()); if(CollectionUtils.isNotEmpty(noGroupItems)){ List items = noGroupItems.stream() - .map(salarySobItemPO -> convert2SalaryAcctResultDetailItemDTO(salarySobItemPO, salaryItemMap.get(salarySobItemPO.getSalaryItemId()), resultValueMap, formulaContentMap)) + .map(salarySobItemPO -> convert2SalaryAcctResultDetailItemDTO(salarySobItemPO, salaryItemMap.get(salarySobItemPO.getSalaryItemId()), resultValueMap, formulaContentMap, lockItems)) .collect(Collectors.toList()); itemsByGroup.add(SalaryAcctResultDetailDTO.SalaryAcctResultDetailItemByGroupDTO.builder() .salarySobItemGroupId(0L) @@ -492,7 +493,8 @@ public class SalaryAcctResultBO { private static SalaryAcctResultDetailDTO.SalaryAcctResultDetailItemDTO convert2SalaryAcctResultDetailItemDTO(SalarySobItemPO salarySobItemPO, SalaryItemPO salaryItemPO, Map resultValueMap, - Map formulaContentMap) { + Map formulaContentMap, + List lockItems) { SalaryValueTypeEnum salaryValueTypeEnum = SalaryValueTypeEnum.parseByValue(Optional.ofNullable(salarySobItemPO).map(SalarySobItemPO::getValueType).orElse(0)); String itemFormulaContent; @@ -512,6 +514,7 @@ public class SalaryAcctResultBO { // .canEdit(Objects.equals(Optional.ofNullable(salaryItemPO).map(SalaryItemPO::getUseInEmployeeSalary).orElse(0), 0)) .canEdit(true) .pattern(salarySobItemPO.getPattern()) + .lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getValue() : LockStatusEnum.UNLOCK.getValue()) .build(); } diff --git a/src/com/engine/salary/entity/salaryacct/dto/SalaryAcctResultDetailDTO.java b/src/com/engine/salary/entity/salaryacct/dto/SalaryAcctResultDetailDTO.java index 1929494a9..8fadd2670 100644 --- a/src/com/engine/salary/entity/salaryacct/dto/SalaryAcctResultDetailDTO.java +++ b/src/com/engine/salary/entity/salaryacct/dto/SalaryAcctResultDetailDTO.java @@ -71,6 +71,9 @@ public class SalaryAcctResultDetailDTO { // 保留小数位数 private Integer pattern; + + // 锁定状态 + private String lockStatus; } @Data diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java index 21922043c..487527d51 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java @@ -28,10 +28,10 @@ public class SalaryAcctResultBatchEditParam { @Builder @AllArgsConstructor @NoArgsConstructor - public class resultValue { + public static class resultValue { // 薪资核算人员id - private Long salaryAcctEmpId; + private Long id; // 薪资项目值 private List items; diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java index 8eabde532..141b3a004 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java @@ -29,7 +29,7 @@ public class SalaryAcctResultBatchUpdateParam { private Long salaryItemId; // 薪资核算人员id - private List salaryAcctEmpIdList; + private List idList; //薪资项目值 private String value; diff --git a/src/com/engine/salary/service/SalaryAcctRecordService.java b/src/com/engine/salary/service/SalaryAcctRecordService.java index 319552b78..9c3ba4f8c 100644 --- a/src/com/engine/salary/service/SalaryAcctRecordService.java +++ b/src/com/engine/salary/service/SalaryAcctRecordService.java @@ -209,7 +209,7 @@ public interface SalaryAcctRecordService { List listSome(SalaryAcctRecordPO po); /** - * 鲁控数字-结账 + * 鲁控数字-结转 * @param salaryAcctRecordId */ void lkszJz(Long salaryAcctRecordId); diff --git a/src/com/engine/salary/service/SalaryAcctReportService.java b/src/com/engine/salary/service/SalaryAcctReportService.java index c4c1636db..6cf5caa12 100644 --- a/src/com/engine/salary/service/SalaryAcctReportService.java +++ b/src/com/engine/salary/service/SalaryAcctReportService.java @@ -21,6 +21,8 @@ public interface SalaryAcctReportService { */ void batchSave(Collection pos); + void lkszBatchSave(Collection pos); + /** * 根据核算记录删除 * @param salaryAcctRecordIds diff --git a/src/com/engine/salary/service/SalaryAcctResultService.java b/src/com/engine/salary/service/SalaryAcctResultService.java index 871188360..ec8efb878 100644 --- a/src/com/engine/salary/service/SalaryAcctResultService.java +++ b/src/com/engine/salary/service/SalaryAcctResultService.java @@ -206,10 +206,10 @@ public interface SalaryAcctResultService { Boolean checkAuth(Long salaryAcctRecordId); /** - * 鲁控数字薪资核算结果批量更新 + * 薪资核算结果批量更新 * @param param */ - void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param); + void batchUpdate(SalaryAcctResultBatchUpdateParam param); /** * 鲁控数字薪资核算结果批量编辑 diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 1a189f762..ee596af21 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -906,7 +906,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe // 入库 getSalaryAcctResultService(user).batchSave(needInsertResultList); - getSalaryAcctReportService(user).batchSave(needInsertResultReportList); - + getSalaryAcctReportService(user).lkszBatchSave(needInsertResultReportList); } } diff --git a/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java index 8371241fb..43b7160a8 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java @@ -62,6 +62,19 @@ public class SalaryAcctReportServiceImpl extends Service implements SalaryAcctRe } } + @Override + public void lkszBatchSave(Collection pos) { + if (CollectionUtils.isNotEmpty(pos)) { + SalarySysConfPO disPlay = getSalarySysConfService(user).getOneByCode(DISPLAY_EMP_INFO_REPORT); + //默认不显示,关闭状态 + if (disPlay == null || OpenEnum.OFF.getValue().equals(disPlay.getConfValue())) { + pos = encryptUtil.encryptList(new ArrayList<>(pos), SalaryAcctResultReportPO.class); + } + List> partition = Lists.partition((List) pos, 100); + partition.forEach(getSalaryAcctResultReportMapper()::batchInsert); + } + } + @Override public void deleteBySalaryAcctRecordIds(Collection salaryAcctRecordIds) { if (CollectionUtils.isNotEmpty(salaryAcctRecordIds)) { diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index f051dfefd..34148f289 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -54,6 +54,7 @@ import com.google.common.collect.Sets; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.constant.ModulePoolEnum; import com.weaver.util.threadPool.entity.LocalRunnable; +import dm.jdbc.util.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; @@ -301,9 +302,10 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe TaxAgentPO taxAgent = getTaxAgentService(user).getById(salaryAcctEmployeePO.getTaxAgentId()); // 查询公式 Map formulaContentMap = getSalaryAcctResultService(user).getColumnBySalaryAcctRecordId(salaryAcctEmployeePO.getSalaryAcctRecordId()); + List lockItems = byId.getLockSalaryItemIds() == null ? Collections.emptyList() : byId.getLockSalaryItemIds(); // 转换成薪资核算结果详情dto - return SalaryAcctResultBO.convert2DetailDTO(simpleEmployee, taxAgent, salaryAcctEmployeePO, salarySobEmpFieldPOS, salarySobItemGroupPOS, salarySobItemPOS, salaryItemPOS, salaryAcctResultPOS, salarySobBackItemPOList, salaryBackItemPOS, salaryBackItemFormula, formulaContentMap); + return SalaryAcctResultBO.convert2DetailDTO(simpleEmployee, taxAgent, salaryAcctEmployeePO, salarySobEmpFieldPOS, salarySobItemGroupPOS, salarySobItemPOS, salaryItemPOS, salaryAcctResultPOS, salarySobBackItemPOList, salaryBackItemPOS, salaryBackItemFormula, formulaContentMap, lockItems); } @Override @@ -1093,7 +1095,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe } @Override - public void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param) { + public void batchUpdate(SalaryAcctResultBatchUpdateParam param) { ValidUtil.doValidator(param); SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId()); @@ -1107,12 +1109,12 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe throw new SalaryRunTimeException("该账套不包含该薪资项目或已被删除,请先检查账套"); } // 获取需要更新的核算人员信息 - List salaryAcctEmployeePOList = Collections.emptyList(); - if (CollectionUtils.isEmpty(param.getSalaryAcctEmpIdList())) { + List salaryAcctEmployeePOList = new ArrayList<>(); + if (CollectionUtils.isEmpty(param.getIdList())) { // 没有选择核算人员,更新核算记录中所有人员 salaryAcctEmployeePOList.addAll(getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId())); } else { - salaryAcctEmployeePOList.addAll(getSalaryAcctEmployeeService(user).listByIds(param.getSalaryAcctEmpIdList())); + salaryAcctEmployeePOList.addAll(getSalaryAcctEmployeeService(user).listByIds(param.getIdList())); } if (CollectionUtils.isNotEmpty(salaryAcctEmployeePOList)) { @@ -1120,9 +1122,12 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe // 查询薪资核算结果 List resultPOS = listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmployeeIdList, Collections.singleton(param.getSalaryItemId())); Map salaryAcctResultPOMap = SalaryEntityUtil.convert2Map(resultPOS, SalaryAcctResultPO::getSalaryAcctEmpId); + List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); + Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); List needUpdateList = new ArrayList<>(); List needInsertList = new ArrayList<>(); Date now = new Date(); + List salaryAcctResultReportPOS = new ArrayList<>(); salaryAcctEmployeePOList.forEach(salaryAcctEmployeePO -> { if (salaryAcctResultPOMap.containsKey(salaryAcctEmployeePO.getId())) { // 更新 @@ -1139,7 +1144,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe .salaryAcctEmpId(salaryAcctEmployeePO.getId()) .employeeId(salaryAcctEmployeePO.getEmployeeId()) .taxAgentId(salaryAcctEmployeePO.getTaxAgentId()) - .resultValue(StringUtils.trim(param.getValue())) + .resultValue(param.getValue()) .originResultValue("") .creator(Long.valueOf(user.getUID())) .createTime(now) @@ -1148,16 +1153,47 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) .build()); } + + // 报表 + SalaryAcctResultReportPO po = SalaryAcctResultReportPO.builder() + .id(IdGenerator.generate()) + .salarySobId(salaryAcctRecordPO.getSalarySobId()) + .salaryItemId(param.getSalaryItemId()) + .salaryAcctRecordId(param.getSalaryAcctRecordId()) + .salaryAcctEmpId(salaryAcctEmployeePO.getId().toString()) + .employeeId(salaryAcctEmployeePO.getEmployeeId().toString()) + .taxAgentId(salaryAcctEmployeePO.getTaxAgentId()) + .resultValue(param.getValue()) + .creator(Long.valueOf(user.getUID())) + .createTime(now) + .updateTime(now) + .deleteType(NumberUtils.INTEGER_ZERO) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .build(); + DataCollectionEmployee dataCollectionEmployee = emps.get(salaryAcctEmployeePO.getEmployeeId()); + if (dataCollectionEmployee != null) { + po.setDepartmentId(dataCollectionEmployee.getDepartmentId()); + po.setSubcompanyId(dataCollectionEmployee.getSubcompanyid()); + po.setCostcenterId(dataCollectionEmployee.getCostcenterId()); + po.setJobtitleId(dataCollectionEmployee.getJobtitleId()); + po.setLocationId(dataCollectionEmployee.getLocationId()); + } + salaryAcctResultReportPOS.add(po); }); + // 入库 if (CollectionUtils.isNotEmpty(needUpdateList)) { // 数据加密 encryptUtil.encryptList(needUpdateList, SalaryAcctResultPO.class); List> partition = Lists.partition(needUpdateList, 100); partition.forEach(getSalaryAcctResultMapper()::batchUpdate); - } batchSave(needInsertList); + + // 报表入库前先删除 + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(param.getIdList(), Collections.singletonList(param.getSalaryItemId()) ); + getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); + } } @@ -1175,7 +1211,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe Map salaryAcctEmployeePOMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeePOList, SalaryAcctEmployeePO::getId); // 需要更新数据的薪资核算人员id - List updateAcctEmpIds = param.getResultValueList().stream().map(SalaryAcctResultBatchEditParam.resultValue::getSalaryAcctEmpId).collect(Collectors.toList()); + List updateAcctEmpIds = param.getResultValueList().stream().map(SalaryAcctResultBatchEditParam.resultValue::getId).collect(Collectors.toList()); // 查询原来的薪资核算结果 List salaryAcctResultPOSOld = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctEmpIds(updateAcctEmpIds).build()); // 解密 @@ -1189,7 +1225,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe s -> s.map(SalaryAcctResultPO::getOriginResultValue).orElse("")))); List salaryAcctResultReportPOS = new ArrayList<>(); param.getResultValueList().forEach(resultValue -> { - SalaryAcctEmployeePO salaryAcctEmployeePO = salaryAcctEmployeePOMap.get(resultValue.getSalaryAcctEmpId()); + SalaryAcctEmployeePO salaryAcctEmployeePO = salaryAcctEmployeePOMap.get(resultValue.getId()); salaryAcctResultPOS.addAll(SalaryAcctResultBO.batchEditConvert2PO(salaryAcctResultOldPOMap, resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID())); // 报表 salaryAcctResultReportPOS.addAll(SalaryAcctResultReportBO.lkszConvert2PO(resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID(), emps)); @@ -1198,9 +1234,9 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe // 删除原来的薪资核算结果 param.getResultValueList().stream().forEach(resultValue -> { List saveItemIds = resultValue.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList()); - deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getSalaryAcctEmpId()), saveItemIds); + deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getId()), saveItemIds); // 报表 - getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getSalaryAcctEmpId()), saveItemIds); + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getId()), saveItemIds); }); // 保存薪资核算结果 diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java index 45de6654d..027678e1d 100644 --- a/src/com/engine/salary/web/SalaryAcctController.java +++ b/src/com/engine/salary/web/SalaryAcctController.java @@ -159,7 +159,7 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctRecordWrapper(user)::backCalculate, param.getSalaryAcctRecordId()); } - // 结账 + // 结转 @GET @Path("/lkszJz") @Produces(MediaType.APPLICATION_JSON) @@ -457,13 +457,13 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::updateLockStatusByParam, param); } - //鲁控数字批量更新 + //批量更新 @POST - @Path("/acctresult/lkszBatchUpdate") + @Path("/acctresult/batchUpdate") @Produces(MediaType.APPLICATION_JSON) - public String lkszBatchUpdate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultBatchUpdateParam param) { + public String batchUpdate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultBatchUpdateParam param) { User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::lkszBatchUpdate, param); + return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::batchUpdate, param); } //鲁控数字批量编辑 diff --git a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java index 5cd43cecb..9bf20496d 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java @@ -260,7 +260,7 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord } /** - * 鲁控数字-结账 + * 鲁控数字-结转 * @param salaryAcctRecordId */ public void lkszJz(Long salaryAcctRecordId) { diff --git a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java index 59bbd3093..2bf31ef9c 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java @@ -258,11 +258,11 @@ public class SalaryAcctResultWrapper extends Service { } /** - * 鲁控数字薪资核算结果批量更新 + * 薪资核算结果批量更新 * @param param */ - public void lkszBatchUpdate(SalaryAcctResultBatchUpdateParam param) { - getSalaryAcctResultService(user).lkszBatchUpdate(param); + public void batchUpdate(SalaryAcctResultBatchUpdateParam param) { + getSalaryAcctResultService(user).batchUpdate(param); } /** From 1287a97fe5a6f8eaed47559b222067cf0c6f965b Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 7 Dec 2023 09:41:46 +0800 Subject: [PATCH 007/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=8B=E8=BD=BD=E3=80=81=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E3=80=81=E5=9F=BA=E6=95=B0=E8=B0=83=E6=95=B4=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=A0=B9=E6=8D=AE=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=9F=BA=E6=95=B0=E9=80=BB=E8=BE=91=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 11 +- .../mapper/siarchives/FundSchemeMapper.xml | 6 + .../InsuranceBaseAdjustHistoryMapper.xml | 20 +- .../mapper/siarchives/OtherSchemeMapper.xml | 18 +- .../mapper/siarchives/SocialSchemeMapper.xml | 6 + .../service/impl/SIArchivesServiceImpl.java | 14 ++ .../service/impl/SIImportServiceImpl.java | 28 ++- .../service/impl/SISchemeServiceImpl.java | 187 ++++++++++++++---- 8 files changed, 234 insertions(+), 56 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index eb4980815..fbf526ca6 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -2198,6 +2198,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(po.getSocialSchemeId()) .adjustAfterBaseJson(po.getSocialPaymentBaseString()) + .adjustAfterComBaseJson(po.getSocialPaymentComBaseString()) .welfareType(po.getWelfareType()) .employeeId(po.getEmployeeId()) .paymentOrganization(po.getPaymentOrganization()) @@ -2207,6 +2208,7 @@ public class SIArchivesBiz { InsuranceArchivesSocialSchemePO oldBaseInfo = oldBaseInfoList.get(0); encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesSocialSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getSocialPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getSocialPaymentComBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getSocialSchemeId()); } else if (oldBaseInfoList.size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保档案存在冗余数据!")); @@ -2228,6 +2230,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(po.getFundSchemeId()) .adjustAfterBaseJson(po.getFundPaymentBaseString()) + .adjustAfterComBaseJson(po.getFundPaymentComBaseString()) .welfareType(po.getWelfareType()) .employeeId(po.getEmployeeId()) .paymentOrganization(po.getPaymentOrganization()) @@ -2237,6 +2240,7 @@ public class SIArchivesBiz { InsuranceArchivesFundSchemePO oldBaseInfo = oldBaseInfoList.get(0); encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesFundSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getFundPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getFundPaymentComBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getFundSchemeId()); } else if (oldBaseInfoList.size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金档案存在冗余数据!")); @@ -2257,6 +2261,7 @@ public class SIArchivesBiz { InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() .adjustAfterSchemeId(po.getOtherSchemeId()) .adjustAfterBaseJson(po.getOtherPaymentBaseString()) + .adjustAfterComBaseJson(po.getOtherPaymentComBaseString()) .welfareType(po.getWelfareType()) .employeeId(po.getEmployeeId()) .paymentOrganization(po.getPaymentOrganization()) @@ -2266,6 +2271,7 @@ public class SIArchivesBiz { InsuranceArchivesOtherSchemePO oldBaseInfo = oldBaseInfoList.get(0); encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesOtherSchemePO.class); adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getOtherPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getOtherPaymentComBaseString()); adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getOtherSchemeId()); } else if (oldBaseInfoList.size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利档案存在冗余数据!")); @@ -2279,10 +2285,7 @@ public class SIArchivesBiz { //生成基数调整记录(基数单元未变化则忽略) public List createAdjustInfo(InsuranceArchivesBaseHistoryDTO adjustInfo, Long creator) { Date now = new Date(); - //判断是否要区分个人和单位福利基数 - User user = new User(Math.toIntExact(creator)); - SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); - boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + boolean welBaseDiffSign = isDiffWelBase(); List toCreateAdjustHistoryList = new ArrayList<>(); //旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。 diff --git a/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml index 56731a58b..afdde68a1 100644 --- a/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/FundSchemeMapper.xml @@ -137,6 +137,7 @@ fund_end_time, fund_start_time, fund_payment_base_string, + fund_payment_com_base_string, supplement_fund_account, create_time, creator, @@ -156,6 +157,7 @@ #{item.fundEndTime}, #{item.fundStartTime}, #{item.fundPaymentBaseString}, + #{item.fundPaymentComBaseString}, #{item.supplementFundAccount}, #{item.createTime}, #{item.creator}, @@ -177,6 +179,7 @@ fund_end_time, fund_start_time, fund_payment_base_string, + fund_payment_com_base_string, supplement_fund_account, create_time, creator, @@ -195,6 +198,7 @@ #{item.fundEndTime,jdbcType=VARCHAR}, #{item.fundStartTime,jdbcType=VARCHAR}, #{item.fundPaymentBaseString,jdbcType=VARCHAR}, + #{item.fundPaymentComBaseString,jdbcType=VARCHAR}, #{item.supplementFundAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=DATE}, #{item.creator,jdbcType=DOUBLE}, @@ -217,6 +221,7 @@ fund_end_time, fund_start_time, fund_payment_base_string, + fund_payment_com_base_string, supplement_fund_account, create_time, creator, @@ -235,6 +240,7 @@ #{item.fundEndTime}, #{item.fundStartTime}, #{item.fundPaymentBaseString}, + #{item.fundPaymentComBaseString}, #{item.supplementFundAccount}, #{item.createTime}, #{item.creator}, diff --git a/src/com/engine/salary/mapper/siarchives/InsuranceBaseAdjustHistoryMapper.xml b/src/com/engine/salary/mapper/siarchives/InsuranceBaseAdjustHistoryMapper.xml index da02c83b5..0752177a1 100644 --- a/src/com/engine/salary/mapper/siarchives/InsuranceBaseAdjustHistoryMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/InsuranceBaseAdjustHistoryMapper.xml @@ -12,6 +12,7 @@ + @@ -33,6 +34,7 @@ , t.adjust_before_base_value , t.adjust_after_base_value , t.adjust_welfare_item_id + , t.payment_scope , t.operator , t.operate_time , t.create_time @@ -48,7 +50,7 @@ adjust_before_scheme_id,adjust_after_scheme_id, adjust_before_base_value,adjust_after_base_value, adjust_welfare_item_id,operator,operate_time, - tenant_key,creator,delete_type,create_time,update_time) + tenant_key,creator,delete_type,create_time,update_time,payment_scope) VALUES ( @@ -67,7 +69,8 @@ #{item.creator}, #{item.deleteType}, #{item.createTime}, - #{item.updateTime} + #{item.updateTime}, + #{item.paymentScope} ) @@ -77,7 +80,7 @@ adjust_before_scheme_id,adjust_after_scheme_id, adjust_before_base_value,adjust_after_base_value, adjust_welfare_item_id,operator,operate_time, - tenant_key,creator,delete_type,create_time,update_time) + tenant_key,creator,delete_type,create_time,update_time,payment_scope) select #{item.id,jdbcType=DOUBLE}, @@ -95,7 +98,8 @@ #{item.creator,jdbcType=DOUBLE}, #{item.deleteType}, #{item.createTime}, - #{item.updateTime} + #{item.updateTime}, + #{item.paymentScope} from dual @@ -106,7 +110,7 @@ adjust_before_scheme_id,adjust_after_scheme_id, adjust_before_base_value,adjust_after_base_value, adjust_welfare_item_id,operator,operate_time, - tenant_key,creator,delete_type,create_time,update_time) + tenant_key,creator,delete_type,create_time,update_time,payment_scope) VALUES ( #{item.id}, @@ -124,7 +128,8 @@ #{item.creator}, #{item.deleteType}, #{item.createTime}, - #{item.updateTime} + #{item.updateTime}, + #{item.paymentScope} ) @@ -148,6 +153,7 @@ , eo.lastname as operatorName , ee.lastname as employeeName , p.name as paymentOrganizationName + , t.payment_scope FROM hrsa_insurance_base_history t LEFT JOIN hrmresource eo on eo.id = t.operator LEFT JOIN hrmresource ee on ee.id = t.employee_id @@ -180,6 +186,7 @@ , eo.lastname as operatorName , ee.lastname as employeeName , p.name as paymentOrganizationName + , t.payment_scope FROM hrsa_insurance_base_history t LEFT JOIN hrmresource eo on eo.id = t.operator LEFT JOIN hrmresource ee on ee.id = t.employee_id @@ -216,6 +223,7 @@ , eo.lastname as operatorName , ee.username as employeeName , p.name as paymentOrganizationName + , t.payment_scope FROM hrsa_insurance_base_history t LEFT JOIN hrmresource eo on eo.id = t.operator LEFT JOIN hrsa_external_employee ee on ee.id = t.employee_id diff --git a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml index de0febe4f..2d67257b4 100644 --- a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml @@ -131,7 +131,8 @@ non_payment, creator, payment_organization, - other_payment_base_string) + other_payment_base_string, + other_payment_com_base_string) VALUES ( @@ -148,7 +149,8 @@ #{item.nonPayment}, #{item.creator}, #{item.paymentOrganization}, - #{item.otherPaymentBaseString} + #{item.otherPaymentBaseString}, + #{item.otherPaymentComBaseString} ) @@ -167,7 +169,8 @@ non_payment, creator, payment_organization, - other_payment_base_string) + other_payment_base_string, + other_payment_com_base_string) select #{item.otherSchemeId,jdbcType=DOUBLE}, @@ -183,7 +186,8 @@ #{item.nonPayment,jdbcType=INTEGER}, #{item.creator,jdbcType=DOUBLE}, #{item.paymentOrganization,jdbcType=DOUBLE}, - #{item.otherPaymentBaseString,jdbcType=VARCHAR} + #{item.otherPaymentBaseString,jdbcType=VARCHAR}, + #{item.otherPaymentComBaseString,jdbcType=VARCHAR} from dual @@ -203,7 +207,8 @@ non_payment, creator, payment_organization, - other_payment_base_string) + other_payment_base_string, + other_payment_com_base_string) VALUES ( #{item.otherSchemeId}, @@ -219,7 +224,8 @@ #{item.nonPayment}, #{item.creator}, #{item.paymentOrganization}, - #{item.otherPaymentBaseString} + #{item.otherPaymentBaseString}, + #{item.otherPaymentComBaseString} ) diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml index c27048d10..79562932f 100644 --- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml @@ -130,6 +130,7 @@ welfare_type, delete_type, social_payment_base_string, + social_payment_com_base_string, social_scheme_id, create_time, social_end_time, @@ -148,6 +149,7 @@ #{item.welfareType}, #{item.deleteType}, #{item.socialPaymentBaseString}, + #{item.socialPaymentComBaseString}, #{item.socialSchemeId}, #{item.createTime}, #{item.socialEndTime}, @@ -168,6 +170,7 @@ welfare_type, delete_type, social_payment_base_string, + social_payment_com_base_string, social_scheme_id, create_time, social_end_time, @@ -185,6 +188,7 @@ #{item.welfareType,jdbcType=INTEGER}, #{item.deleteType,jdbcType=INTEGER}, #{item.socialPaymentBaseString,jdbcType=VARCHAR}, + #{item.socialPaymentComBaseString,jdbcType=VARCHAR}, #{item.socialSchemeId,jdbcType=DOUBLE}, #{item.createTime,jdbcType=DATE}, #{item.socialEndTime,jdbcType=VARCHAR}, @@ -206,6 +210,7 @@ welfare_type, delete_type, social_payment_base_string, + social_payment_com_base_string, social_scheme_id, create_time, social_end_time, @@ -223,6 +228,7 @@ #{item.welfareType}, #{item.deleteType}, #{item.socialPaymentBaseString}, + #{item.socialPaymentComBaseString}, #{item.socialSchemeId}, #{item.createTime}, #{item.socialEndTime}, diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 11299554e..8738c66f9 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -20,6 +20,7 @@ import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.enums.sicategory.NonPaymentEnum; +import com.engine.salary.enums.sicategory.PaymentScopeEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -1158,6 +1159,19 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService public PageInfo historyListByEmployeeIdAndOperator(SIArchiveBaseHistoryListParam param) { List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); + adjustHistoryDTOS.forEach(f -> { + if (StringUtils.isNotBlank(f.getPaymentScope())) { + if(f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue().toString())) { + f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人")); + } else if(f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue().toString())) { + f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "公司")); + } else { + f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人") + "," + SalaryI18nUtil.getI18nLabel(0, "公司")); + } + } else { + f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人") + "," + SalaryI18nUtil.getI18nLabel(0, "公司")); + } + }); PageInfo listPage = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), adjustHistoryDTOS , InsuranceArchivesBaseHistoryDTO.class); diff --git a/src/com/engine/salary/service/impl/SIImportServiceImpl.java b/src/com/engine/salary/service/impl/SIImportServiceImpl.java index 8fc7eccdb..c8b41704c 100644 --- a/src/com/engine/salary/service/impl/SIImportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIImportServiceImpl.java @@ -27,6 +27,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; import com.engine.salary.util.excel.ExcelUtil; +import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; @@ -184,7 +185,7 @@ public class SIImportServiceImpl extends Service implements SIImportService { //工作簿数据 - return ExcelUtil.genWorkbookV2(excelSheetData, sheetName,excelComments); + return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName,excelComments); } @@ -194,6 +195,7 @@ public class SIImportServiceImpl extends Service implements SIImportService { * @return */ public List buildHeader() { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); List result = new ArrayList<>(); result.add(SalaryI18nUtil.getI18nLabel( 85429, "姓名")); result.add(SalaryI18nUtil.getI18nLabel( 86184, "个税扣缴义务人")); @@ -206,7 +208,13 @@ public class SIImportServiceImpl extends Service implements SIImportService { // result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织")); //社保福利基数 Map socialMap = welfareNameIdMap( WelfareTypeEnum.SOCIAL_SECURITY); - socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"))); + if (welBaseDiffSign) { + socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"))); + socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"))); + } else { + socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数"))); + } + result.add(SalaryI18nUtil.getI18nLabel( 91324, "社保账号")); result.add(SalaryI18nUtil.getI18nLabel( 91319, "社保起始缴纳月")); result.add(SalaryI18nUtil.getI18nLabel( 91320, "社保最后缴纳月")); @@ -215,7 +223,13 @@ public class SIImportServiceImpl extends Service implements SIImportService { result.add(SalaryI18nUtil.getI18nLabel( 91486, "公积金账号")); //公积金福利基数 Map fundMap = welfareNameIdMap( WelfareTypeEnum.ACCUMULATION_FUND); - fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"))); + if (welBaseDiffSign) { + fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"))); + fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"))); + } else { + fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数"))); + } + result.add(SalaryI18nUtil.getI18nLabel( 91487, "补充公积金账号")); result.add(SalaryI18nUtil.getI18nLabel( 91483, "公积金起始缴纳月")); result.add(SalaryI18nUtil.getI18nLabel( 91484, "公积金最后缴纳月")); @@ -223,7 +237,13 @@ public class SIImportServiceImpl extends Service implements SIImportService { // result.add(SalaryI18nUtil.getI18nLabel( 91497, "其他福利缴纳组织")); //其他福利基数 Map otherMap = welfareNameIdMap( WelfareTypeEnum.OTHER); - otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"))); + if (welBaseDiffSign) { + otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"))); + otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"))); + } else { + otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数"))); + } + result.add(SalaryI18nUtil.getI18nLabel( 91490, "其他福利起始缴纳月")); result.add(SalaryI18nUtil.getI18nLabel( 91494, "其他福利最后缴纳月")); return result; diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index d49f971e2..295fd5615 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -1084,16 +1084,40 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesOtherSchemePO = buildOtherPO(employeeId, welfareMap, singleAccount, schemeNameIdMap, paymentNameIdMap, creator); } /**************校验申报基数**************/ - for (Map.Entry entry : welfareMap.entrySet()) { - String keyName = entry.getValue() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"); - String numberVlue = findElement(singleAccount, keyName).get(keyName) == null ? "" : findElement(singleAccount, keyName).get(keyName).toString(); - if (!"".equals(numberVlue) && !NumberUtils.isParsable(numberVlue)) { - Map errorMessageMap = Maps.newHashMap(); - errorMessageMap.put("message", rowIndex + keyName + SalaryI18nUtil.getI18nLabel(100581, "请输入数字")); - excelComments.add(errorMessageMap); - isError = true; + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + if (welBaseDiffSign) { + for (Map.Entry entry : welfareMap.entrySet()) { + String keyPerName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"); + String keyComName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"); + String numberPerValue = findElement(singleAccount, keyPerName).get(keyPerName) == null ? "" : findElement(singleAccount, keyPerName).get(keyPerName).toString(); + String numberComValue = findElement(singleAccount, keyComName).get(keyComName) == null ? "" : findElement(singleAccount, keyComName).get(keyComName).toString(); + + if (!"".equals(numberPerValue) && !NumberUtils.isParsable(numberPerValue)) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + keyPerName + SalaryI18nUtil.getI18nLabel(0, "请输入数字")); + excelComments.add(errorMessageMap); + isError = true; + } + if (!"".equals(numberComValue) && !NumberUtils.isParsable(numberComValue)) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + keyComName + SalaryI18nUtil.getI18nLabel(0, "请输入数字")); + excelComments.add(errorMessageMap); + isError = true; + } + } + } else { + for (Map.Entry entry : welfareMap.entrySet()) { + String keyName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数"); + String numberValue = findElement(singleAccount, keyName).get(keyName) == null ? "" : findElement(singleAccount, keyName).get(keyName).toString(); + if (!"".equals(numberValue) && !NumberUtils.isParsable(numberValue)) { + Map errorMessageMap = Maps.newHashMap(); + errorMessageMap.put("message", rowIndex + keyName + SalaryI18nUtil.getI18nLabel(0, "请输入数字")); + excelComments.add(errorMessageMap); + isError = true; + } } } + //生成福利档案基础信息数据 InsuranceArchivesBaseInfoPO insuranceArchivesBaseInfoPO = buildBaseInfoPO(employeeId, singleAccount, paymentNameIdMap, creator, runStatus, employees.get(0).isExtEmp()); if (!isError) { @@ -1108,17 +1132,25 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - if (socialCheckBase && fundCheckBase && otherCheckBase) { + Boolean socialCheckComBase = true; + Boolean fundCheckComBase = true; + Boolean otherCheckComBase = true; + if (welBaseDiffSign) { + socialCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + } + if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) { insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); } else { String checkMessage = "该条数据中"; - if (!socialCheckBase) { + if (!socialCheckBase || !socialCheckComBase) { checkMessage = checkMessage + "社保福利基数、"; } - if (!fundCheckBase) { + if (!fundCheckBase || !fundCheckComBase) { checkMessage = checkMessage + "公积金福利基数、"; } - if (!otherCheckBase) { + if (!otherCheckBase || !otherCheckComBase) { checkMessage = checkMessage + "其他福利基数、"; } checkMessage = checkMessage.substring(0, checkMessage.length() - 1); @@ -1162,12 +1194,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { String socialAccount = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91324, "社保账号")).get(SalaryI18nUtil.getI18nLabel(91324, "社保账号")); Long socialSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91323, "社保方案名称")).get(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"))); HashMap oldSocialBaseMap = new HashMap<>(); + HashMap oldSocialComBaseMap = new HashMap<>(); if (oldSocialSchemeInfos.size() > 0) { oldSocialSchemePO = oldSocialSchemeInfos.get(0); encryptUtil.decrypt(oldSocialSchemePO, InsuranceArchivesSocialSchemePO.class); BeanUtils.copyProperties(oldSocialSchemePO, insuranceArchivesSocialSchemePO); //社保基数 oldSocialBaseMap = JSON.parseObject(oldSocialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); + oldSocialComBaseMap = JSON.parseObject(oldSocialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); } insuranceArchivesSocialSchemePO.setId(IdGenerator.generate()); @@ -1202,21 +1236,48 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesSocialSchemePO.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue()); List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesSocialSchemePO.getSocialSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); HashMap socialPaymentBase = new HashMap<>(); + HashMap socialPaymentComBase = new HashMap<>(); for (Long insuranceId : insuranceIds) { if (StringUtils.isBlank(welfareMap.get(insuranceId))) { continue; } - if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) { - String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - if (StringUtils.isNotBlank(itemValue)) { - socialPaymentBase.put(String.valueOf(insuranceId), itemValue); - } else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) { - socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId))); + if (welBaseDiffSign) { + Map itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (itemPerMap != null) { + String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (StringUtils.isNotBlank(itemValue)) { + socialPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) { + socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId))); + } + } + Map itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (itemComMap != null) { + String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (StringUtils.isNotBlank(itemValue)) { + socialPaymentComBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldSocialComBaseMap != null && StringUtils.isNotBlank(oldSocialComBaseMap.get(String.valueOf(insuranceId)))) { + socialPaymentComBase.put(String.valueOf(insuranceId), oldSocialComBaseMap.get(String.valueOf(insuranceId))); + } + } + insuranceArchivesSocialSchemePO.setSocialPaymentComBaseString(JSON.toJSONString(socialPaymentComBase)); + } else { + Map itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (itemMap != null) { + String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (StringUtils.isNotBlank(itemValue)) { + socialPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) { + socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId))); + } } } + } insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(JSON.toJSONString(socialPaymentBase)); } @@ -1243,12 +1304,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { String supplementFundAccount = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")).get(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")); Long fundSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")).get(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称"))); HashMap oldFundBaseMap = new HashMap<>(); + HashMap oldFundComBaseMap = new HashMap<>(); if (oldFundSchemeInfos.size() > 0) { oldFundSchemePO = oldFundSchemeInfos.get(0); encryptUtil.decrypt(oldFundSchemePO, InsuranceArchivesFundSchemePO.class); BeanUtils.copyProperties(oldFundSchemePO, insuranceArchivesFundSchemePO); //社保基数 oldFundBaseMap = JSON.parseObject(oldFundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); + oldFundComBaseMap = JSON.parseObject(oldFundSchemePO.getFundPaymentComBaseString(), new HashMap().getClass()); } insuranceArchivesFundSchemePO.setId(IdGenerator.generate()); @@ -1286,24 +1349,49 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesFundSchemePO.getFundSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); - HashMap socialPaymentBase = new HashMap<>(); + HashMap fundPaymentBase = new HashMap<>(); + HashMap fundPaymentComBase = new HashMap<>(); for (Long insuranceId : insuranceIds) { if (StringUtils.isBlank(welfareMap.get(insuranceId))) { continue; } - if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) { - String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - if (StringUtils.isNotBlank(itemValue)) { - socialPaymentBase.put(String.valueOf(insuranceId), itemValue); - } else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) { - socialPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId))); + if (welBaseDiffSign) { + Map itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (itemPerMap != null) { + String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (StringUtils.isNotBlank(itemValue)) { + fundPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) { + fundPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId))); + } + } + Map itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (itemComMap != null) { + String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (StringUtils.isNotBlank(itemValue)) { + fundPaymentComBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldFundComBaseMap != null && StringUtils.isNotBlank(oldFundComBaseMap.get(String.valueOf(insuranceId)))) { + fundPaymentComBase.put(String.valueOf(insuranceId), oldFundComBaseMap.get(String.valueOf(insuranceId))); + } + } + insuranceArchivesFundSchemePO.setFundPaymentComBaseString(JSON.toJSONString(fundPaymentComBase)); + } else { + Map itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (itemMap != null) { + String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (StringUtils.isNotBlank(itemValue)) { + fundPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) { + fundPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId))); + } } - } + } - insuranceArchivesFundSchemePO.setFundPaymentBaseString(JSON.toJSONString(socialPaymentBase)); + insuranceArchivesFundSchemePO.setFundPaymentBaseString(JSON.toJSONString(fundPaymentBase)); } return insuranceArchivesFundSchemePO; } @@ -1325,12 +1413,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //设置其他福利方案、起始缴纳月、最后缴纳月 Long otherSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")).get(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称"))); HashMap oldOtherBaseMap = new HashMap<>(); + HashMap oldOtherComBaseMap = new HashMap<>(); if (oldOtherSchemeInfos.size() > 0) { oldOtherSchemePO = oldOtherSchemeInfos.get(0); encryptUtil.decrypt(oldOtherSchemePO, InsuranceArchivesOtherSchemePO.class); BeanUtils.copyProperties(oldOtherSchemePO, insuranceArchivesOtherSchemePO); //社保基数 oldOtherBaseMap = JSON.parseObject(oldOtherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); + oldOtherComBaseMap = JSON.parseObject(oldOtherSchemePO.getOtherPaymentComBaseString(), new HashMap().getClass()); } insuranceArchivesOtherSchemePO.setId(IdGenerator.generate()); @@ -1361,24 +1451,49 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesOtherSchemePO.setEmployeeId(employeeId); List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesOtherSchemePO.getOtherSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); - HashMap socialPaymentBase = new HashMap<>(); + HashMap otherPaymentBase = new HashMap<>(); + HashMap otherPaymentComBase = new HashMap<>(); for (Long insuranceId : insuranceIds) { if (StringUtils.isBlank(welfareMap.get(insuranceId))) { continue; } - if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) { - String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - if (StringUtils.isNotBlank(itemValue)) { - socialPaymentBase.put(String.valueOf(insuranceId), itemValue); - } else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) { - socialPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId))); + if (welBaseDiffSign) { + Map itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (itemPerMap != null) { + String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人")); + if (StringUtils.isNotBlank(itemValue)) { + otherPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) { + otherPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId))); + } + } + Map itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (itemComMap != null) { + String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位")); + if (StringUtils.isNotBlank(itemValue)) { + otherPaymentComBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldOtherComBaseMap != null && StringUtils.isNotBlank(oldOtherComBaseMap.get(String.valueOf(insuranceId)))) { + otherPaymentComBase.put(String.valueOf(insuranceId), oldOtherComBaseMap.get(String.valueOf(insuranceId))); + } + } + insuranceArchivesOtherSchemePO.setOtherPaymentComBaseString(JSON.toJSONString(otherPaymentComBase)); + } else { + Map itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (itemMap != null) { + String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + if (StringUtils.isNotBlank(itemValue)) { + otherPaymentBase.put(String.valueOf(insuranceId), itemValue); + } else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) { + otherPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId))); + } } - } + } - insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(JSON.toJSONString(socialPaymentBase)); + insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(JSON.toJSONString(otherPaymentBase)); } return insuranceArchivesOtherSchemePO; } From bb1b785f55e432d08fe5014c2ee7ff54d3067a2c Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 7 Dec 2023 11:06:19 +0800 Subject: [PATCH 008/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=A0=B9=E6=8D=AE=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=9F=BA=E6=95=B0=E9=80=BB=E8=BE=91=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 35 +-- .../service/impl/SISchemeServiceImpl.java | 259 ++++++++++++++---- 2 files changed, 212 insertions(+), 82 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index fbf526ca6..32186cbbb 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -1520,26 +1520,22 @@ public class SIArchivesBiz { socialCollect.putAll(customSocial); socialCollect.putAll(sysSocial); -// socialSet.forEach(item -> { -// if (socialCollect.containsKey(Long.valueOf(item))) { -// socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); -// } -// }); + if (welBaseDiffSign) { socialSet.forEach(item -> { if (socialCollect.containsKey(Long.valueOf(item))) { - socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); } }); socialComSet.forEach(item -> { if (socialCollect.containsKey(Long.valueOf(item))) { - socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } }); } else { socialSet.forEach(item -> { if (socialCollect.containsKey(Long.valueOf(item))) { - socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } }); } @@ -1550,26 +1546,21 @@ public class SIArchivesBiz { Map sysFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); fundCollect.putAll(customFund); fundCollect.putAll(sysFund); -// fundSet.forEach(item -> { -// if (fundCollect.containsKey(Long.valueOf(item))) { -// fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); -// } -// }); if (welBaseDiffSign) { fundSet.forEach(item -> { if (fundCollect.containsKey(Long.valueOf(item))) { - fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); } }); fundComSet.forEach(item -> { if (fundCollect.containsKey(Long.valueOf(item))) { - fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } }); } else { fundSet.forEach(item -> { if (fundCollect.containsKey(Long.valueOf(item))) { - fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } }); } @@ -1580,26 +1571,22 @@ public class SIArchivesBiz { Map sysOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); otherCollect.putAll(customOther); otherCollect.putAll(sysOther); -// otherSet.forEach(item -> { -// if (otherCollect.containsKey(Long.valueOf(item))) { -// otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); -// } -// }); + if (welBaseDiffSign) { otherSet.forEach(item -> { if (otherCollect.containsKey(Long.valueOf(item))) { - otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人"); + otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); } }); otherComSet.forEach(item -> { if (otherCollect.containsKey(Long.valueOf(item))) { - otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位"); + otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } }); } else { otherSet.forEach(item -> { if (otherCollect.containsKey(Long.valueOf(item))) { - otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数"); + otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } }); } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 295fd5615..5b2552ef9 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -51,6 +51,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; +import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; @@ -261,6 +262,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { @Override public List> buildTableData(List insuranceArchivesEmployeePOS) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); List> records = new ArrayList<>(); List taxAgentPOS = getTaxAgentMapper().listAll(); Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); @@ -286,9 +288,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Map fundSchemePOMap = SalaryEntityUtil.convert2Map(fundList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId()); Map otherSchemePOMap = SalaryEntityUtil.convert2Map(otherList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId()); -// Map socialSchemePOMap = socialList.stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getEmployeeId, Function.identity())); -// Map fundSchemePOMap = fundList.stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getEmployeeId, Function.identity())); -// Map otherSchemePOMap = otherList.stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getEmployeeId, Function.identity())); insuranceArchivesEmployeePOS.forEach(item -> { InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId()); InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId()); @@ -307,15 +306,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId())); Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { }); - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(socialJson); + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } map.put("socialAccount", socialItem.getSocialAccount()); map.put("socialStartTime", socialItem.getSocialStartTime()); @@ -326,15 +347,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { map.put("fundAccount", fundItem.getFundAccount()); Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { }); - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(fundJson); + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); map.put("fundStartTime", fundItem.getFundStartTime()); @@ -345,15 +388,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { map.put("otherName", getSiSchemeService().querySchemeName(otherItem.getOtherSchemeId())); Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { }); - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { }); -// map.putAll(otherJson); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } } map.put("otherStartTime", otherItem.getOtherStartTime()); map.put("otherEndTime", otherItem.getOtherEndTime()); @@ -422,11 +487,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } //工作簿数据 - List> rows = new LinkedList<>(); - List collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList()); + List> rows = new LinkedList<>(); + List collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList()); rows.add(collect); for (Map recordData : records) { - List row = new LinkedList<>(); + List row = new LinkedList<>(); for (WeaTableColumn column : columns) { try { Object o = recordData.get(column.getColumn()); @@ -437,20 +502,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } rows.add(row); } -// return salaryBatchService.simpleExportExcel(ExportExcelInfo.builder() -// .bizId(exportMap.get("biz")) -// .flag(true) -// .userId(employeeId) -// .eteamsId(eteamsId) -// .tenantKey(tenantKey) -// .operator(operator) -// .module(exportMap.get("module")) -// .fileName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 94629, "社保福利档案") + SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now())) -// .handlerName("insuranceArchivesExportHandler") -// .dataType(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 99915, "档案")) -// .function(exportMap.get("function")).build(), sheetList); //获取excel - return ExcelUtil.genWorkbook(rows, sheetName); + return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -532,10 +585,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { public Map> buildColumnTitle(List insuranceArchivesEmployeePOS, Long employeeId) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + Map> result = new HashMap<>(); Set socialSet = new HashSet<>(); Set fundSet = new HashSet<>(); Set otherSet = new HashSet<>(); + + Set socialComSet = new HashSet<>(); + Set fundComSet = new HashSet<>(); + Set otherComSet = new HashSet<>(); + insuranceArchivesEmployeePOS.forEach(item -> { List socialByEmployeeId = siArchivesBiz.getSocialByEmployeeIds(new ArrayList() {{ add(item.getEmployeeId()); @@ -571,6 +631,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (socialJson != null) { socialJson.forEach((k, v) -> socialSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + socialComJson.forEach((k, v) -> socialComSet.add(k)); + } + } } if (fundItem != null) { Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { @@ -578,6 +646,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (fundJson != null) { fundJson.forEach((k, v) -> fundSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + fundComJson.forEach((k, v) -> fundComSet.add(k)); + } + } } if (otherItem != null) { Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { @@ -585,42 +661,92 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (otherJson != null) { otherJson.forEach((k, v) -> otherSet.add(k)); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + otherComJson.forEach((k, v) -> otherComSet.add(k)); + } + } } }); Map socialMap = new HashMap<>(); + Map socialComMap = new HashMap<>(); Map socialCollect = new HashMap<>(); Map customSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); Map sysSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); socialCollect.putAll(customSocial); socialCollect.putAll(sysSocial); - socialSet.forEach(item -> { - if (socialCollect.containsKey(Long.valueOf(item))) { - socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - } - }); + if (welBaseDiffSign) { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + socialComSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } Map fundMap = new HashMap<>(); + Map fundComMap = new HashMap<>(); Map fundCollect = new HashMap<>(); Map customFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); Map sysFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); fundCollect.putAll(customFund); fundCollect.putAll(sysFund); - fundSet.forEach(item -> { - if (fundCollect.containsKey(Long.valueOf(item))) { - fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - } - }); + if (welBaseDiffSign) { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + fundComSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } Map otherMap = new HashMap<>(); + Map otherComMap = new HashMap<>(); Map otherCollect = new HashMap<>(); Map customOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); Map sysOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); otherCollect.putAll(customOther); otherCollect.putAll(sysOther); - otherSet.forEach(item -> { - if (otherCollect.containsKey(Long.valueOf(item))) { - otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数")); - } - }); + if (welBaseDiffSign) { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + otherComSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } // map根据key排序 LinkedHashMap socialMapWithAscKey = socialMap.entrySet().stream() @@ -635,6 +761,23 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); + if (welBaseDiffSign) { + LinkedHashMap socialComMapWithAscKey = socialComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundComMapWithAscKey = fundComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherComMapWithAscKey = otherComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + socialMapWithAscKey.putAll(socialComMapWithAscKey); + fundMapWithAscKey.putAll(fundComMapWithAscKey); + otherMapWithAscKey.putAll(otherComMapWithAscKey); + } result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey); From 1c5249c76e1bf3aac4f4ed3096863eda22aa819c Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 8 Dec 2023 11:16:18 +0800 Subject: [PATCH 009/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E3=80=81=E6=98=8E=E7=BB=86=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=EF=BC=8C=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=8B=86=E5=88=86=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E5=9F=BA=E6=95=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 80 +++++- .../bo/InsuranceComparisonResultBO.java | 81 +++++- .../siaccount/po/ExcelInsuranceDetailPO.java | 18 ++ .../po/InsuranceAccountDetailTempPO.java | 18 ++ .../InsuranceAccountDetailMapper.xml | 36 ++- .../siaccount/SIAccountDetailTempMapper.xml | 30 ++- .../service/impl/ColumnBuildServiceImpl.java | 127 +++++++-- .../service/impl/RecordsBuildServiceImpl.java | 129 ++++++++- .../impl/SIAComparisonResultServiceImpl.java | 8 +- .../service/impl/SIAccountServiceImpl.java | 54 +++- .../service/impl/SIExportServiceImpl.java | 250 +++++++++++++++--- .../service/impl/SIRecessionServiceImpl.java | 3 + .../salary/web/SIAccountController.java | 4 +- 13 files changed, 730 insertions(+), 108 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 34b6aae17..c6df56a19 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -631,11 +631,13 @@ public class SIAccountBiz extends Service { } public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getOther() != null) { InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther(); insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization()); insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId()); insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString()); + insuranceAccountDetailPO.setOtherPaymentComBaseString(otherPO.getOtherPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime()); if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) { @@ -719,7 +721,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + } //需要核算其他的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -742,10 +750,11 @@ public class SIAccountBiz extends Service { List otherComList = new ArrayList<>(); Map otherComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = otherCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -787,6 +796,7 @@ public class SIAccountBiz extends Service { public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getFund() != null) { InsuranceArchivesFundSchemePO fundPO = accountPO.getFund(); insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization()); @@ -794,6 +804,7 @@ public class SIAccountBiz extends Service { insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount()); insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId()); insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString()); + insuranceAccountDetailPO.setFundPaymentComBaseString(fundPO.getFundPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime()); if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) { @@ -876,7 +887,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(fundPO.getFundPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + } //需要核算公积金的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -899,10 +916,11 @@ public class SIAccountBiz extends Service { List fundComList = new ArrayList<>(); Map fundComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = fundCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -945,12 +963,14 @@ public class SIAccountBiz extends Service { public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getSocial() != null) { InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount()); insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId()); insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString()); + insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime()); if ((NonPaymentEnum.YES.getValue().equals(socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) { @@ -1036,7 +1056,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + } //需要核算社保的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -1059,10 +1085,11 @@ public class SIAccountBiz extends Service { List socialCom = new ArrayList<>(); Map sociaComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = schemeCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -1510,7 +1537,6 @@ public class SIAccountBiz extends Service { } else { accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); } - } if (projects.contains(ProjectTypeEnum.OTHER.getValue())) { @@ -1532,11 +1558,13 @@ public class SIAccountBiz extends Service { public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getOther() != null) { InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther(); insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization()); insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId()); insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString()); + insuranceAccountDetailPO.setOtherPaymentComBaseString(otherPO.getOtherPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, otherPO.getOtherStartTime(), otherPO.getOtherEndTime()); if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) { @@ -1611,7 +1639,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + } //需要核算其他的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -1626,10 +1660,11 @@ public class SIAccountBiz extends Service { List otherComList = new ArrayList<>(); Map otherComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = otherCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -1671,6 +1706,7 @@ public class SIAccountBiz extends Service { } public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getFund() != null) { InsuranceArchivesFundSchemePO fundPO = accountPO.getFund(); insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization()); @@ -1678,6 +1714,7 @@ public class SIAccountBiz extends Service { insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount()); insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId()); insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString()); + insuranceAccountDetailPO.setFundPaymentComBaseString(fundPO.getFundPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, fundPO.getFundStartTime(), fundPO.getFundEndTime()); if ((Objects.equals(NonPaymentEnum.YES.getValue(), fundPO.getNonPayment()) || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) { @@ -1751,7 +1788,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(fundPO.getFundPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + } //需要核算公积金的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -1766,10 +1809,11 @@ public class SIAccountBiz extends Service { List fundComList = new ArrayList<>(); Map fundComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = fundCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -1812,12 +1856,14 @@ public class SIAccountBiz extends Service { } public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); if (accountPO.getSocial() != null) { InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount()); insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId()); insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString()); + insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime()); if ((Objects.equals(NonPaymentEnum.YES.getValue(), socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) { @@ -1896,7 +1942,13 @@ public class SIAccountBiz extends Service { .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 - HashMap archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); +// HashMap archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + } //需要核算社保的福利id 单位 List needArchivesCom = new ArrayList<>(); if (archivesCom != null) { @@ -1911,10 +1963,11 @@ public class SIAccountBiz extends Service { List socialCom = new ArrayList<>(); Map sociaComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; needArchivesCom.stream().forEach(e -> { InsuranceSchemeDetailPO po = schemeCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); - BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); @@ -1964,6 +2017,7 @@ public class SIAccountBiz extends Service { insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount()); insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId()); insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString()); + insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString()); //判断是否在起始缴纳月和最后缴纳月之间 Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime()); diff --git a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java index 6a85ddd20..79909c1e2 100644 --- a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java +++ b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java @@ -41,7 +41,7 @@ public class InsuranceComparisonResultBO { * 构建福利核算结果列表的表头(线下对比) * */ - public static List buildTableColumns4ComparisonResult(Set insuranceBaseSet, Set insurancePerPaySet, Set insuranceComPaySet) { + public static List buildTableColumns4ComparisonResult(Set insuranceBaseSet, Set insurancePerPaySet, Set insuranceComPaySet, boolean welBaseDiffSign) { List listAll = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll(); List socialWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList()); @@ -67,21 +67,63 @@ public class InsuranceComparisonResultBO { columns.add(new Column("社保账号", "socialAccount", "socialAccount")); columns.add(new Column("社保方案名称", "socialSchemeName", "socialSchemeName")); //组装社保基数 - for (ICategoryPO po : socialWelfareList) { - columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase")); + if (welBaseDiffSign) { + List socialComColumns = Lists.newArrayList(); + for (ICategoryPO po : socialWelfareList) { + columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人") + , po.getId() + "socialPerBase", po.getId() + "socialPerBase")); + socialComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位") + , po.getId() + "socialComBase", po.getId() + "socialComBase")); + } + columns.addAll(socialComColumns); + } else { + for (ICategoryPO po : socialWelfareList) { + columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase")); + } } +// for (ICategoryPO po : socialWelfareList) { +// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase")); +// } columns.add(new Column("公积金账号", "fundAccount", "fundAccount")); columns.add(new Column("公积金方案名称", "fundSchemeName", "fundSchemeName")); //组装公积金基数 - for (ICategoryPO po : fundWelfareList) { - columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase")); + if (welBaseDiffSign) { + List fundComColumns = Lists.newArrayList(); + for (ICategoryPO po : fundWelfareList) { + columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人") + , po.getId() + "fundPerBase", po.getId() + "fundPerBase")); + fundComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位") + , po.getId() + "fundComBase", po.getId() + "fundComBase")); + } + columns.addAll(fundComColumns); + } else { + for (ICategoryPO po : fundWelfareList) { + columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase")); + } } +// for (ICategoryPO po : fundWelfareList) { +// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase")); +// } columns.add(new Column("补充公积金账号", "supplementFundAccount", "supplementFundAccount")); columns.add(new Column("其他福利方案名称", "otherSchemeName", "otherSchemeName")); //组装其他福利基数 - for (ICategoryPO po : otherWelfareList) { - columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase")); + if (welBaseDiffSign) { + List otherComColumns = Lists.newArrayList(); + for (ICategoryPO po : otherWelfareList) { + columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人") + , po.getId() + "otherPerBase", po.getId() + "otherPerBase")); + otherComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位") + , po.getId() + "otherComBase", po.getId() + "otherComBase")); + } + columns.addAll(otherComColumns); + } else { + for (ICategoryPO po : otherWelfareList) { + columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase")); + } } +// for (ICategoryPO po : otherWelfareList) { +// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase")); +// } //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) for (ICategoryPO po : socialWelPerList) { @@ -127,7 +169,8 @@ public class InsuranceComparisonResultBO { * 构建福利核算线下对比结果 * */ - public static List> buildComparisonTableData(List accountExportPOS, List excelAccountExportPOS, Map schemeIdNameMap) { + public static List> buildComparisonTableData(List accountExportPOS, List excelAccountExportPOS + , Map schemeIdNameMap, boolean welBaseDiffSign) { Map> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId); // Map> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode); @@ -177,6 +220,28 @@ public class InsuranceComparisonResultBO { if (excelResultValueList != null && excelResultValueList.size() == 1) { excelAccountExportPO = excelResultValueList.get(0); } + if (welBaseDiffSign) { + //社保基数-个人,socialPaymentBaseString + welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1); + //公积金基数-个人,fundPaymentBaseString + welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2); + //其他福利基数-个人,otherPaymentBaseString + welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3); + + //社保基数-公司,socialPaymentComBaseString + welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1); + //公积金基数-公司,fundPaymentComBaseString + welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2); + //其他福利基数-公司,otherPaymentComBaseString + welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3); + } else { + //社保基数,socialPaymentBaseString + welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1); + //公积金基数,fundPaymentBaseString + welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2); + //其他福利基数,otherPaymentBaseString + welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3); + } //社保基数,socialPaymentBaseString welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1); //公积金基数,fundPaymentBaseString diff --git a/src/com/engine/salary/entity/siaccount/po/ExcelInsuranceDetailPO.java b/src/com/engine/salary/entity/siaccount/po/ExcelInsuranceDetailPO.java index 4e7889544..9660b8602 100644 --- a/src/com/engine/salary/entity/siaccount/po/ExcelInsuranceDetailPO.java +++ b/src/com/engine/salary/entity/siaccount/po/ExcelInsuranceDetailPO.java @@ -101,6 +101,12 @@ public class ExcelInsuranceDetailPO { @Encrypt private String socialPaymentBaseString; + /** + * 社保缴纳基数——单位 + */ + @Encrypt + private String socialPaymentComBaseString; + /** * 公积金方案ID */ @@ -112,6 +118,12 @@ public class ExcelInsuranceDetailPO { @Encrypt private String fundPaymentBaseString; + /** + * 公积金缴纳基数——单位 + */ + @Encrypt + private String fundPaymentComBaseString; + /** * 其他福利方案id */ @@ -123,6 +135,12 @@ public class ExcelInsuranceDetailPO { @Encrypt private String otherPaymentBaseString; + /** + * 其他福利缴纳基数——单位 + */ + @Encrypt + private String otherPaymentComBaseString; + /** * 社保个人缴费明细 */ diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java index 50897c6b2..dc8c1c2c0 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java @@ -102,6 +102,11 @@ public class InsuranceAccountDetailTempPO { @Encrypt private String socialPaymentBaseString; + /** + * 社保缴纳基数——单位 + */ + @Encrypt + private String socialPaymentComBaseString; /** * 公积金方案ID */ @@ -113,6 +118,12 @@ public class InsuranceAccountDetailTempPO { @Encrypt private String fundPaymentBaseString; + /** + * 公积金缴纳基数——单位 + */ + @Encrypt + private String fundPaymentComBaseString; + /** * 其他福利方案id */ @@ -124,6 +135,13 @@ public class InsuranceAccountDetailTempPO { @Encrypt private String otherPaymentBaseString; + /** + * 其他福利缴纳基数——单位 + */ + @Encrypt + private String otherPaymentComBaseString; + + /** * 社保个人缴费明细 */ diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 2e52ce986..925718b0b 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -18,10 +18,13 @@ + + + @@ -69,10 +72,13 @@ , t.other_pay_org , t.social_scheme_id , t.social_payment_base_string + , t.social_payment_com_base_string , t.fund_scheme_id , t.fund_payment_base_string + , t.fund_payment_com_base_string , t.other_scheme_id , t.other_payment_base_string + , t.other_payment_com_base_string , t.social_per_json , t.social_per_sum , t.fund_per_json @@ -117,10 +123,13 @@ , t.other_pay_org , t.social_scheme_id , t.social_payment_base_string + , t.social_payment_com_base_string , t.fund_scheme_id , t.fund_payment_base_string + , t.fund_payment_com_base_string , t.other_scheme_id , t.other_payment_base_string + , t.other_payment_com_base_string , t.social_per_json , t.social_per_sum , t.fund_per_json @@ -420,7 +429,8 @@ t.other_com_json,t.social_per_sum,t.social_com_sum, t.fund_per_sum,t.fund_com_sum,t.other_per_sum, t.other_com_sum,t.per_sum,t.com_sum,t.payment_organization, - t.social_payment_base_string, t.fund_payment_base_string, t.other_payment_base_string + t.social_payment_base_string, t.fund_payment_base_string, t.other_payment_base_string, + t.social_payment_com_base_string, t.fund_payment_com_base_string, t.other_payment_com_base_string FROM hrsa_bill_detail t WHERE t.delete_type = 0 @@ -711,7 +721,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( @@ -757,7 +768,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) @@ -766,7 +780,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) select #{item.employeeId,jdbcType=DOUBLE}, @@ -811,7 +826,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey,jdbcType=VARCHAR}, - #{item.paymentOrganization,jdbcType=DOUBLE} + #{item.paymentOrganization,jdbcType=DOUBLE}, + #{item.socialPaymentComBaseString,jdbcType=VARCHAR}, + #{item.fundPaymentComBaseString,jdbcType=VARCHAR}, + #{item.otherPaymentComBaseString,jdbcType=VARCHAR} from dual @@ -821,7 +839,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( #{item.employeeId}, @@ -866,7 +885,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) diff --git a/src/com/engine/salary/mapper/siaccount/SIAccountDetailTempMapper.xml b/src/com/engine/salary/mapper/siaccount/SIAccountDetailTempMapper.xml index f99461416..19b6fb3e5 100644 --- a/src/com/engine/salary/mapper/siaccount/SIAccountDetailTempMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/SIAccountDetailTempMapper.xml @@ -18,10 +18,13 @@ + + + @@ -68,10 +71,13 @@ , t.other_pay_org , t.social_scheme_id , t.social_payment_base_string + , t.social_payment_com_base_string , t.fund_scheme_id , t.fund_payment_base_string + , t.fund_payment_com_base_string , t.other_scheme_id , t.other_payment_base_string + , t.other_payment_com_base_string , t.social_per_json , t.social_per_sum , t.fund_per_json @@ -130,7 +136,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( @@ -175,7 +182,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) @@ -184,7 +194,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) select @@ -229,7 +240,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey,jdbcType=VARCHAR}, - #{item.paymentOrganization,jdbcType=DOUBLE} + #{item.paymentOrganization,jdbcType=DOUBLE}, + #{item.socialPaymentComBaseString,jdbcType=VARCHAR}, + #{item.fundPaymentComBaseString,jdbcType=VARCHAR}, + #{item.otherPaymentComBaseString,jdbcType=VARCHAR} from dual @@ -239,7 +253,8 @@ (employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( #{item.employeeId}, @@ -283,7 +298,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index f15ae19f1..5312f1c51 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -1,6 +1,7 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.constant.WeaBoolAttr; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.core.impl.Service; @@ -31,6 +32,8 @@ import java.util.stream.Collectors; **/ public class ColumnBuildServiceImpl extends Service implements ColumnBuildService { + private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + private ICategoryMapper getICategoryMapper() { return MapperProxyFactory.getProxy(ICategoryMapper.class); } @@ -122,58 +125,128 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic } private Map> buildPaymentTitle(List pos, Map categoryIdNameMap, Long employeeId, String tenantKey) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); + + Set socailComIds = new HashSet<>(); + Set fundComIds = new HashSet<>(); + Set otherComIds = new HashSet<>(); + Map> result = new HashMap<>(); pos.stream().forEach(item -> { - if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getSocialPaymentBaseString()) || StringUtils.isNotBlank(item.getSocialPaymentComBaseString())) { Map socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap().getClass()); if(socialJson!=null){ socialJson.forEach((k, v) -> { socailIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + socialComJson.forEach((k, v) -> socailComIds.add(k)); + } + } } - if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getFundPaymentBaseString()) || StringUtils.isNotBlank(item.getFundPaymentComBaseString())) { Map fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); if(fundJson!=null){ fundJson.forEach((k, v) -> { fundIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + fundComJson.forEach((k, v) -> fundComIds.add(k)); + } + } } - if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getOtherPaymentBaseString()) || StringUtils.isNotBlank(item.getOtherPaymentComBaseString())) { Map otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); if(otherJson!=null){ otherJson.forEach((k, v) -> { otherIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + otherComJson.forEach((k, v) -> otherComIds.add(k)); + } + } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); - socailIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "socialBase"); - } - }); - fundIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "fundBase"); - } - }); - otherIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase"); - } - }); + + Map socialComColumns = new HashMap<>(); + Map fundComColumns = new HashMap<>(); + Map otherComColumns = new HashMap<>(); + + if (welBaseDiffSign) { + socailIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "socialPerBase"); + } + }); + fundIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "fundPerBase"); + } + }); + otherIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "otherPerBase"); + } + }); + + socailComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "socialComBase"); + } + }); + fundComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "fundComBase"); + } + }); + otherComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "otherComBase"); + } + }); + } else { + socailIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数"), social + "socialBase"); + } + }); + fundIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "fundBase"); + } + }); + otherIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "otherBase"); + } + }); + } + // map根据value排序 LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) @@ -188,6 +261,24 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); + if (welBaseDiffSign) { + LinkedHashMap socialComMapWithAscKey = socialComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundComMapWithAscKey = fundComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherComMapWithAscKey = otherComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + socialColumnsWithAscValue.putAll(socialComMapWithAscKey); + fundColumnsWithAscValue.putAll(fundComMapWithAscKey); + otherColumnsWithAscValue.putAll(otherComMapWithAscKey); + } + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java index 138eb8cf1..a18ca32e0 100644 --- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java @@ -1,6 +1,7 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SIArchivesBiz; @@ -15,6 +16,7 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.ResourceFromEnum; +import com.engine.salary.enums.sicategory.PaymentScopeEnum; import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; @@ -60,8 +62,11 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } + private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + @Override public List> buildCommonRecords(List list, Long employeeId) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); List> result = new ArrayList<>(); if (CollectionUtils.isEmpty(list)) { return result; @@ -99,34 +104,130 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ record.put("socialAccount", item.getSocialAccount()); record.put("socialSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getSocialSchemeId())); - if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) { + if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString()) || StringUtils.isNotEmpty(item.getSocialPaymentComBaseString())) { Map socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap().getClass()); - if(socialJson!=null){ - socialJson.forEach((k, v) -> { - record.put(k + "socialBase", (String) v); +// if(socialJson!=null){ +// socialJson.forEach((k, v) -> { +// record.put(k + "socialBase", (String) v); +// }); +// } + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialPerBase", v); + } + }); + } + Map socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference>() { }); + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialComBase", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialBase", v); + } + }); + } } } record.put("fundPayOrg", item.getFundPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getFundPayOrg(),TaxAgentPO.builder().build())).getName()); record.put("fundAccount", item.getFundAccount()); record.put("fundSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getFundSchemeId())); record.put("supplementFundAccount", item.getSupplementFundAccount()); - if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) { - Map socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); - if(socialJson!=null){ - socialJson.forEach((k, v) -> { - record.put(k + "fundBase", (String) v); + if (StringUtils.isNotEmpty(item.getFundPaymentBaseString()) || StringUtils.isNotEmpty(item.getFundPaymentComBaseString())) { + Map fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); +// if(fundJson!=null){ +// fundJson.forEach((k, v) -> { +// record.put(k + "fundBase", (String) v); +// }); +// } + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundPerBase", v); + } + }); + } + Map fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference>() { }); + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundComBase", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundBase", v); + } + }); + } } } record.put("otherPayOrg", item.getOtherPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getOtherPayOrg(),TaxAgentPO.builder().build())).getName()); record.put("otherSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getOtherSchemeId())); - if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) { - Map socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); - if(socialJson!=null){ - socialJson.forEach((k, v) -> { - record.put(k + "otherBase", (String) v); + if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString()) || StringUtils.isNotEmpty(item.getOtherPaymentComBaseString())) { + Map otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); +// if(otherJson!=null){ +// otherJson.forEach((k, v) -> { +// record.put(k + "otherBase", (String) v); +// }); +// } + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherPerBase", v); + } + }); + } + Map otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference>() { }); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherComBase", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherBase", v); + } + }); + } } } if (StringUtils.isNotEmpty(item.getSocialPerJson())) { diff --git a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java index 89f725a87..23587a874 100644 --- a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java @@ -2,6 +2,7 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.bo.InsuranceComparisonResultBO; import com.engine.salary.entity.siaccount.dto.InsuranceComparisonResultListDTO; @@ -45,6 +46,8 @@ import java.util.stream.Collectors; public class SIAComparisonResultServiceImpl extends Service implements SIAComparisonResultService { private EncryptUtil encryptUtil = new EncryptUtil(); + private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + private InsuranceExportMapper getInsuranceExportMapper() { return MapperProxyFactory.getProxy(InsuranceExportMapper.class); } @@ -140,6 +143,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar */ private InsuranceComparisonResultListDTO listByParam(boolean needPage, InsuranceComparisonResultQueryParam queryParam) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); //排序配置 OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); @@ -200,10 +204,10 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar Set insurancePerPaySet = new HashSet<>(insurancePerPayIds); Set insuranceComPaySet = new HashSet<>(insuranceComPayIds); //3-构建福利核算对比结果列表表头 - List weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet); + List weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet, welBaseDiffSign); //4-通过线上线下两份数据获得对比结果 Map schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap(); - List> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap); + List> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign); // 系统值和线下值一致的人员 if (queryParam.isOnlyDiffEmployee()) { diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 282a6f545..d9387e62c 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -65,6 +65,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; +import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.Column; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -2221,7 +2222,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { */ @Override public XSSFWorkbook exportComparisonWelfareTemplate(InsuranceAccountDetailParam param) { - + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); //查询线上福利核算记录 InsuranceExportParam insuranceExportParam = new InsuranceExportParam(); insuranceExportParam.setBillMonth(param.getBillMonth()); @@ -2279,20 +2280,57 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // "养老保险申报基数" // "医疗保险申报基数" // "工伤保险申报基数" - for (ICategoryPO po : socialWelfareList) { - headerList.add(po.getInsuranceName() + "申报基数"); +// for (ICategoryPO po : socialWelfareList) { +// headerList.add(po.getInsuranceName() + "申报基数"); +// } + //组装社保基数 + if (welBaseDiffSign) { + List socialComColumns = Lists.newArrayList(); + for (ICategoryPO po : socialWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + socialComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + headerList.addAll(socialComColumns); + } else { + for (ICategoryPO po : socialWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } } headerList.add(SalaryI18nUtil.getI18nLabel(91486, "公积金账号")); headerList.add(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")); //组装公积金基数 - for (ICategoryPO po : fundWelfareList) { - headerList.add(po.getInsuranceName() + "申报基数"); +// for (ICategoryPO po : fundWelfareList) { +// headerList.add(po.getInsuranceName() + "申报基数"); +// } + if (welBaseDiffSign) { + List fundComColumns = Lists.newArrayList(); + for (ICategoryPO po : fundWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + fundComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + headerList.addAll(fundComColumns); + } else { + for (ICategoryPO po : fundWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } } headerList.add(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")); headerList.add(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")); //组装其他福利基数 - for (ICategoryPO po : otherWelfareList) { - headerList.add(po.getInsuranceName() + "申报基数"); +// for (ICategoryPO po : otherWelfareList) { +// headerList.add(po.getInsuranceName() + "申报基数"); +// } + if (welBaseDiffSign) { + List otherComColumns = Lists.newArrayList(); + for (ICategoryPO po : otherWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + otherComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + headerList.addAll(otherComColumns); + } else { + for (ICategoryPO po : otherWelfareList) { + headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } } //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) for (ICategoryPO po : socialWelPerList) { @@ -2335,7 +2373,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { rows.add(headerList); String sheetName = "福利核算-线下对比导入模板"; - return ExcelUtil.genWorkbookV2(rows, sheetName); + return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } /** diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index 1c351dfac..ac3ec8488 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -1,10 +1,12 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SIAccountBiz; +import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam; @@ -17,6 +19,7 @@ import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.siaccount.ResourceFromEnum; import com.engine.salary.enums.sicategory.DataTypeEnum; +import com.engine.salary.enums.sicategory.PaymentScopeEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.mapper.InsuranceExportMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; @@ -37,6 +40,7 @@ import com.engine.salary.util.SalaryEnumUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelUtil; +import com.engine.salary.util.excel.ExcelUtilPlus; import org.springframework.beans.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; @@ -66,6 +70,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { private SIAccountBiz siAccountBiz = new SIAccountBiz(); + private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + private SISchemeService getSISchemeService(User user) { return ServiceUtil.getService(SISchemeServiceImpl.class, user); } @@ -242,11 +248,12 @@ public class SIExportServiceImpl extends Service implements SIExportService { } excelSheetData.addAll(rows); - return ExcelUtil.genWorkbookV2(excelSheetData, sheetName, total); + return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName, total); } @Override public List> buildCommonRecords(List list) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); List> result = new ArrayList<>(); List paymentList = getTaxAgentMapper().listAll(); @@ -272,10 +279,42 @@ public class SIExportServiceImpl extends Service implements SIExportService { record.put("socialSchemeName", schemeIdNameMap.get(item.getSocialSchemeId())); if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) { Map socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap().getClass()); - if (socialJson != null) { - socialJson.forEach((k, v) -> { - record.put(k + "socialBase", v); +// if (socialJson != null) { +// socialJson.forEach((k, v) -> { +// record.put(k + "socialBase", v); +// }); +// } + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialPerBase", v); + } + }); + } + Map socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference>() { }); + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialComBase", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "socialBase", v); + } + }); + } } } @@ -284,22 +323,86 @@ public class SIExportServiceImpl extends Service implements SIExportService { record.put("fundSchemeName", schemeIdNameMap.get(item.getFundSchemeId())); record.put("supplementFundAccount", item.getSupplementFundAccount()); if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) { - Map socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); - if (socialJson != null) { - socialJson.forEach((k, v) -> { - record.put(k + "fundBase", v); + Map fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); +// if (fundJson != null) { +// fundJson.forEach((k, v) -> { +// record.put(k + "fundBase", v); +// }); +// } + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundPerBase", v); + } + }); + } + Map fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference>() { }); + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundComBase", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "fundBase", v); + } + }); + } } } record.put("otherPayOrg", paymentMap.get(item.getOtherPayOrg()) == null ? "" : paymentMap.get(item.getOtherPayOrg()).getName()); record.put("otherSchemeName", schemeIdNameMap.get(item.getOtherSchemeId())); if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) { - Map socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); - if (socialJson != null) { - socialJson.forEach((k, v) -> { - record.put(k + "otherBase", v); + Map otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); +// if (otherJson != null) { +// otherJson.forEach((k, v) -> { +// record.put(k + "otherBase", v); +// }); +// } + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherPerBase", v); + } + }); + } + Map otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference>() { }); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherComBase", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + record.put(k + "otherBase", v); + } + }); + } } } @@ -628,58 +731,127 @@ public class SIExportServiceImpl extends Service implements SIExportService { } private Map> buildPaymentTitle(List pos, Map categoryIdNameMap) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); + + Set socailComIds = new HashSet<>(); + Set fundComIds = new HashSet<>(); + Set otherComIds = new HashSet<>(); + Map> result = new HashMap<>(); pos.stream().forEach(item -> { - if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getSocialPaymentBaseString()) || StringUtils.isNotBlank(item.getSocialPaymentComBaseString())) { Map socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap().getClass()); if (socialJson != null) { socialJson.forEach((k, v) -> { socailIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + socialComJson.forEach((k, v) -> socailComIds.add(k)); + } + } } - if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getFundPaymentBaseString()) || StringUtils.isNotBlank(item.getFundPaymentComBaseString())) { Map fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); if (fundJson != null) { fundJson.forEach((k, v) -> { fundIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + fundComJson.forEach((k, v) -> fundComIds.add(k)); + } + } } - if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) { + if (StringUtils.isNotBlank(item.getOtherPaymentBaseString()) || StringUtils.isNotBlank(item.getOtherPaymentComBaseString())) { Map otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); if (otherJson != null) { otherJson.forEach((k, v) -> { otherIds.add(k); }); } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + otherComJson.forEach((k, v) -> otherComIds.add(k)); + } + } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); - socailIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "socialBase"); - } - }); - fundIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "fundBase"); - } - }); - otherIds.stream().forEach(social -> { - if (categoryIdNameMap.containsKey(social)) { - otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "otherBase"); - } - }); + + Map socialComColumns = new HashMap<>(); + Map fundComColumns = new HashMap<>(); + Map otherComColumns = new HashMap<>(); + + if (welBaseDiffSign) { + socailIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "socialPerBase"); + } + }); + fundIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "fundPerBase"); + } + }); + otherIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "otherPerBase"); + } + }); + + socailComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "socialComBase"); + } + }); + fundComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "fundComBase"); + } + }); + otherComIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "otherComBase"); + } + }); + } else { + socailIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数"), social + "socialBase"); + } + }); + fundIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "fundBase"); + } + }); + otherIds.stream().forEach(social -> { + if (categoryIdNameMap.containsKey(social)) { + otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "otherBase"); + } + }); + } // map根据value排序 LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) @@ -694,6 +866,24 @@ public class SIExportServiceImpl extends Service implements SIExportService { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); + if (welBaseDiffSign) { + LinkedHashMap socialComMapWithAscKey = socialComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundComMapWithAscKey = fundComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherComMapWithAscKey = otherComColumns.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + socialColumnsWithAscValue.putAll(socialComMapWithAscKey); + fundColumnsWithAscValue.putAll(fundComMapWithAscKey); + otherColumnsWithAscValue.putAll(otherComMapWithAscKey); + } + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); diff --git a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java index e1cf27275..e9a446dac 100644 --- a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java @@ -197,6 +197,9 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic // temp.setExternalFlag(insuranceAccountDetailPO.getExternalFlag()); temp.setPaymentOrganization(insuranceAccountDetailPO.getPaymentOrganization()); // temp.setPaymentAgency(insuranceAccountDetailPO.getPaymentAgency()); + temp.setSocialPaymentComBaseString(insuranceAccountDetailPO.getSocialPaymentComBaseString()); + temp.setFundPaymentComBaseString(insuranceAccountDetailPO.getFundPaymentComBaseString()); + temp.setOtherPaymentComBaseString(insuranceAccountDetailPO.getOtherPaymentComBaseString()); } private void recessionSocial(RecessionParam param, InsuranceAccountDetailPO temp, InsuranceAccountDetailPO insuranceAccountDetailPO) { //退差社保个人缴费 diff --git a/src/com/engine/salary/web/SIAccountController.java b/src/com/engine/salary/web/SIAccountController.java index 75ad6975a..ab9a41c9c 100644 --- a/src/com/engine/salary/web/SIAccountController.java +++ b/src/com/engine/salary/web/SIAccountController.java @@ -2,6 +2,7 @@ package com.engine.salary.web; import com.engine.common.util.ParamUtil; import com.engine.common.util.ServiceUtil; +import com.engine.salary.common.SalaryContext; import com.engine.salary.entity.hrm.dto.HrmInfoDTO; import com.engine.salary.entity.hrm.param.HrmQueryParam; import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; @@ -37,11 +38,9 @@ import javax.ws.rs.core.StreamingOutput; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.time.LocalDate; -import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * 福利核算控制器 @@ -50,6 +49,7 @@ import java.util.stream.Collectors; public class SIAccountController { public SIAccountService getService(User user) { + SalaryContext.get().setValue("user",user); return ServiceUtil.getService(SIAccountServiceImpl.class, user); } From 9d0d7a00fcf99f89b98f6dd8e29862107d60cb2c Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 8 Dec 2023 18:06:54 +0800 Subject: [PATCH 010/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E7=BA=BF=E4=B8=8B?= =?UTF-8?q?=E5=AF=B9=E6=AF=94=E5=88=97=E8=A1=A8=E3=80=81=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E3=80=81=E5=AF=BC=E5=87=BA=EF=BC=8C=E9=80=82=E9=85=8D=E6=8B=86?= =?UTF-8?q?=E5=88=86=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E5=92=8C=E5=85=AC=E5=8F=B8=E5=9F=BA=E6=95=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bo/InsuranceComparisonResultBO.java | 6 - .../param/ExcelInsuranceImportParam.java | 3 +- .../siaccount/ExcelInsuranceDetailMapper.xml | 24 +- .../impl/SIAComparisonResultServiceImpl.java | 46 +- .../service/impl/SIAccountServiceImpl.java | 557 ++++++++++++++---- 5 files changed, 479 insertions(+), 157 deletions(-) diff --git a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java index 79909c1e2..c6e6b40a3 100644 --- a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java +++ b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java @@ -242,12 +242,6 @@ public class InsuranceComparisonResultBO { //其他福利基数,otherPaymentBaseString welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3); } - //社保基数,socialPaymentBaseString - welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1); - //公积金基数,fundPaymentBaseString - welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2); - //其他福利基数,otherPaymentBaseString - welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3); //社保个人socialPerJson welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1); //公积金个人fundPerJson diff --git a/src/com/engine/salary/entity/siaccount/param/ExcelInsuranceImportParam.java b/src/com/engine/salary/entity/siaccount/param/ExcelInsuranceImportParam.java index 17b926b08..7a9090845 100644 --- a/src/com/engine/salary/entity/siaccount/param/ExcelInsuranceImportParam.java +++ b/src/com/engine/salary/entity/siaccount/param/ExcelInsuranceImportParam.java @@ -25,5 +25,6 @@ public class ExcelInsuranceImportParam { /** * 账单月份 */ - private String billMonth; + private String billMonth; + private String paymentOrganization; } diff --git a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml index d45fdec16..15ac635ce 100644 --- a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml @@ -157,7 +157,8 @@ (id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( @@ -204,7 +205,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) @@ -213,7 +217,8 @@ (id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) select #{item.id,jdbcType=DOUBLE}, @@ -259,7 +264,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey,jdbcType=VARCHAR}, - #{item.paymentOrganization,jdbcType=DOUBLE} + #{item.paymentOrganization,jdbcType=DOUBLE}, + #{item.socialPaymentComBaseString,jdbcType=VARCHAR}, + #{item.fundPaymentComBaseString,jdbcType=VARCHAR}, + #{item.otherPaymentComBaseString,jdbcType=VARCHAR} from dual @@ -269,7 +277,8 @@ (id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string, fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json, social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum, - com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization) + com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization, + social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string) VALUES ( #{item.id}, @@ -315,7 +324,10 @@ #{item.updateTime}, #{item.deleteType}, #{item.tenantKey}, - #{item.paymentOrganization} + #{item.paymentOrganization}, + #{item.socialPaymentComBaseString}, + #{item.fundPaymentComBaseString}, + #{item.otherPaymentComBaseString} ) diff --git a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java index 23587a874..389e4ef2b 100644 --- a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java @@ -25,6 +25,7 @@ import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelUtil; +import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.Column; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -134,7 +135,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar String sheetName = "线下对比结果"; - return ExcelUtil.genWorkbookV2(rows, sheetName); + return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -231,7 +232,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar } private Set welfareInfo() { - + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); Set info = new HashSet<>(); List listAll = getICategoryMapper().listAll(); @@ -239,18 +240,37 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar List fundWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 2).collect(Collectors.toList()); List otherWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 3).collect(Collectors.toList()); - //组装社保基数 - for (ICategoryPO po : socialWelfareList) { - info.add(po.getId() + "socialBase"); - } - //组装公积金基数 - for (ICategoryPO po : fundWelfareList) { - info.add(po.getId() + "fundBase"); - } - //组装其他福利基数 - for (ICategoryPO po : otherWelfareList) { - info.add(po.getId() + "otherBase"); + if (welBaseDiffSign) { + //组装社保基数 + for (ICategoryPO po : socialWelfareList) { + info.add(po.getId() + "socialPerBase"); + info.add(po.getId() + "socialComBase"); + } + //组装公积金基数 + for (ICategoryPO po : fundWelfareList) { + info.add(po.getId() + "fundPerBase"); + info.add(po.getId() + "fundComBase"); + } + //组装其他福利基数 + for (ICategoryPO po : otherWelfareList) { + info.add(po.getId() + "otherPerBase"); + info.add(po.getId() + "otherComBase"); + } + } else { + //组装社保基数 + for (ICategoryPO po : socialWelfareList) { + info.add(po.getId() + "socialBase"); + } + //组装公积金基数 + for (ICategoryPO po : fundWelfareList) { + info.add(po.getId() + "fundBase"); + } + //组装其他福利基数 + for (ICategoryPO po : otherWelfareList) { + info.add(po.getId() + "otherBase"); + } } + //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) for (ICategoryPO po : socialWelfareList) { info.add(po.getId() + "socialPer"); diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index d9387e62c..1385b84d7 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -2222,6 +2222,78 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { */ @Override public XSSFWorkbook exportComparisonWelfareTemplate(InsuranceAccountDetailParam param) { + Map> welColumnMap = createWelColumnMap(param); + + List headerList = Lists.newArrayList(SalaryI18nUtil.getI18nLabel(85429, "姓名"), + SalaryI18nUtil.getI18nLabel(86185, "部门"), + SalaryI18nUtil.getI18nLabel(86186, "手机号"), + SalaryI18nUtil.getI18nLabel(86317, "工号"), + SalaryI18nUtil.getI18nLabel(86187, "员工状态"), + SalaryI18nUtil.getI18nLabel(100377, "数据来源"), + SalaryI18nUtil.getI18nLabel(91325, "个税扣缴义务人")); + headerList.add(SalaryI18nUtil.getI18nLabel(91324, "社保账号")); + headerList.add(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称")); + //组装社保基数 + if (welColumnMap.get("socialBase") != null) { + headerList.addAll(welColumnMap.get("socialBase")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(91486, "公积金账号")); + headerList.add(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")); + //组装公积金基数 + if (welColumnMap.get("fundBase") != null) { + headerList.addAll(welColumnMap.get("fundBase")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")); + headerList.add(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")); + //组装其他福利基数 + if (welColumnMap.get("otherBase") != null) { + headerList.addAll(welColumnMap.get("otherBase")); + } + //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) + if (welColumnMap.get("socialPer") != null) { + headerList.addAll(welColumnMap.get("socialPer")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100388, "社保个人合计")); + //住房公积金个人、补充住房公积金个人 + if (welColumnMap.get("fundPer") != null) { + headerList.addAll(welColumnMap.get("fundPer")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计")); + //其他个人(比如企业年金个人) + if (welColumnMap.get("otherPer") != null) { + headerList.addAll(welColumnMap.get("otherPer")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100392, "其他福利个人合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(100393, "个人合计")); + //社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位) + if (welColumnMap.get("socialCom") != null) { + headerList.addAll(welColumnMap.get("socialCom")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100394, "社保单位合计")); + //住房公积金单位、补充住房公积金单位 + if (welColumnMap.get("fundCom") != null) { + headerList.addAll(welColumnMap.get("fundCom")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计")); + //其他单位(比如企业年金单位) + if (welColumnMap.get("otherCom") != null) { + headerList.addAll(welColumnMap.get("otherCom")); + } + headerList.add(SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(100397, "单位合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(100398, "社保合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(100399, "公积金合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(100400, "其他福利合计")); + headerList.add(SalaryI18nUtil.getI18nLabel(93278, "合计")); + + List> rows = new ArrayList<>(); + rows.add(headerList); + String sheetName = "福利核算-线下对比导入模板"; + + return ExcelUtilPlus.genWorkbookV2(rows, sheetName); + } + + public Map> createWelColumnMap(InsuranceAccountDetailParam param) { boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); //查询线上福利核算记录 InsuranceExportParam insuranceExportParam = new InsuranceExportParam(); @@ -2266,114 +2338,238 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List fundWelComList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList()); List otherWelComList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList()); - List headerList = Lists.newArrayList(SalaryI18nUtil.getI18nLabel(85429, "姓名"), - SalaryI18nUtil.getI18nLabel(86185, "部门"), - SalaryI18nUtil.getI18nLabel(86186, "手机号"), - SalaryI18nUtil.getI18nLabel(86317, "工号"), - SalaryI18nUtil.getI18nLabel(86187, "员工状态"), - SalaryI18nUtil.getI18nLabel(100377, "数据来源"), - SalaryI18nUtil.getI18nLabel(91325, "个税扣缴义务人")); - headerList.add(SalaryI18nUtil.getI18nLabel(91324, "社保账号")); - headerList.add(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称")); -// "失业保险申报基数" -// "生育保险申报基数" -// "养老保险申报基数" -// "医疗保险申报基数" -// "工伤保险申报基数" -// for (ICategoryPO po : socialWelfareList) { -// headerList.add(po.getInsuranceName() + "申报基数"); -// } //组装社保基数 + List socialBaseColumns = new ArrayList<>(); + List socialPerBaseColumns = new ArrayList<>(); + List socialComBaseColumns = Lists.newArrayList(); if (welBaseDiffSign) { - List socialComColumns = Lists.newArrayList(); for (ICategoryPO po : socialWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); - socialComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + socialPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + socialComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } - headerList.addAll(socialComColumns); + socialBaseColumns.addAll(socialPerBaseColumns); + socialBaseColumns.addAll(socialComBaseColumns); } else { for (ICategoryPO po : socialWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + socialBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } } - headerList.add(SalaryI18nUtil.getI18nLabel(91486, "公积金账号")); - headerList.add(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")); + //组装公积金基数 -// for (ICategoryPO po : fundWelfareList) { -// headerList.add(po.getInsuranceName() + "申报基数"); -// } + List fundBaseColumns = new ArrayList<>(); + List fundPerBaseColumns = Lists.newArrayList(); + List fundComBaseColumns = Lists.newArrayList(); if (welBaseDiffSign) { - List fundComColumns = Lists.newArrayList(); for (ICategoryPO po : fundWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); - fundComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + fundPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + fundComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } - headerList.addAll(fundComColumns); + fundBaseColumns.addAll(fundPerBaseColumns); + fundBaseColumns.addAll(fundComBaseColumns); } else { for (ICategoryPO po : fundWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + fundBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } } - headerList.add(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")); - headerList.add(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")); + //组装其他福利基数 -// for (ICategoryPO po : otherWelfareList) { -// headerList.add(po.getInsuranceName() + "申报基数"); -// } + List otherBaseColumns = new ArrayList<>(); + List otherPerBaseColumns = new ArrayList<>(); + List otherComBaseColumns = Lists.newArrayList(); if (welBaseDiffSign) { - List otherComColumns = Lists.newArrayList(); for (ICategoryPO po : otherWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); - otherComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); + otherPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")); + otherComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")); } - headerList.addAll(otherComColumns); + otherBaseColumns.addAll(otherPerBaseColumns); + otherBaseColumns.addAll(otherComBaseColumns); } else { for (ICategoryPO po : otherWelfareList) { - headerList.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + otherBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); } } + + //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) + List socialPerColumns = new ArrayList<>(); + for (ICategoryPO po : socialWelPerList) { + socialPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + //住房公积金个人、补充住房公积金个人 + List fundPerColumns = new ArrayList<>(); + for (ICategoryPO po : fundWelPerList) { + fundPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + //其他个人(比如企业年金个人) + List otherPerColumns = new ArrayList<>(); + for (ICategoryPO po : otherWelPerList) { + otherPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + //社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位) + List socialComColumns = new ArrayList<>(); + for (ICategoryPO po : socialWelComList) { + socialComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + //住房公积金单位、补充住房公积金单位 + List fundComColumns = new ArrayList<>(); + for (ICategoryPO po : fundWelComList) { + fundComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + + //其他单位(比如企业年金单位) + List otherComColumns = new ArrayList<>(); + for (ICategoryPO po : otherWelComList) { + otherComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + + Map> welColumnMap = new HashMap<>(); + welColumnMap.put("socialPerBase", socialPerBaseColumns); + welColumnMap.put("fundPerBase", fundPerBaseColumns); + welColumnMap.put("otherPerBase", otherPerBaseColumns); + welColumnMap.put("socialComBase", socialComBaseColumns); + welColumnMap.put("fundComBase", fundComBaseColumns); + welColumnMap.put("otherComBase", otherComBaseColumns); + welColumnMap.put("socialBase", socialBaseColumns); + welColumnMap.put("fundBase", fundBaseColumns); + welColumnMap.put("otherBase", otherBaseColumns); + welColumnMap.put("socialPer", socialPerColumns); + welColumnMap.put("fundPer", fundPerColumns); + welColumnMap.put("otherPer", otherPerColumns); + welColumnMap.put("socialCom", socialComColumns); + welColumnMap.put("fundCom", fundComColumns); + welColumnMap.put("otherCom", otherComColumns); + return welColumnMap; + } + + public Map welColumnNameCodeMap(InsuranceAccountDetailParam param) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + //查询线上福利核算记录 + InsuranceExportParam insuranceExportParam = new InsuranceExportParam(); + insuranceExportParam.setBillMonth(param.getBillMonth()); + insuranceExportParam.setPaymentOrganization(param.getPaymentOrganization()); + List accountExportPOS = getInsuranceExportMapper().exportAccount(param.getPaymentStatus(), insuranceExportParam); + + //整理线上核算记录相关的福利方案,并以此整理需要对比的福利项类别数据 + Set welfareSchemeIds = new HashSet<>(); + accountExportPOS.forEach(f -> { + welfareSchemeIds.add(f.getSocialSchemeId()); + welfareSchemeIds.add(f.getFundSchemeId()); + welfareSchemeIds.add(f.getOtherSchemeId()); + }); + List insuranceSchemeDetailPos = getInsuranceSchemeDetailMapper().listAll(); + List insuranceBaseIds = insuranceSchemeDetailPos.stream() + .filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1) + .map(InsuranceSchemeDetailPO::getInsuranceId) + .collect(Collectors.toList()); + List insurancePerPayIds = insuranceSchemeDetailPos.stream() + .filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1 && f.getPaymentScope() == 2) + .map(InsuranceSchemeDetailPO::getInsuranceId) + .collect(Collectors.toList()); + List insuranceComPayIds = insuranceSchemeDetailPos.stream() + .filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1 && f.getPaymentScope() == 1) + .map(InsuranceSchemeDetailPO::getInsuranceId) + .collect(Collectors.toList()); + Set insuranceBaseSet = new HashSet<>(insuranceBaseIds); + Set insurancePerPaySet = new HashSet<>(insurancePerPayIds); + Set insuranceComPaySet = new HashSet<>(insuranceComPayIds); + + List listAll = getICategoryMapper().listAll(); + List socialWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList()); + List fundWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList()); + List otherWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList()); + + List socialWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList()); + List fundWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList()); + List otherWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList()); + + List socialWelComList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList()); + List fundWelComList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList()); + List otherWelComList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList()); + + //组装社保基数 + Map result = new HashMap<>(); + if (welBaseDiffSign) { + for (ICategoryPO po : socialWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "socialPerBase"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "socialComBase"); + } + } else { + for (ICategoryPO po : socialWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialBase"); + } + } + + //组装公积金基数 + if (welBaseDiffSign) { + for (ICategoryPO po : fundWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "fundPerBase"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "fundComBase"); + } + } else { + for (ICategoryPO po : fundWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundBase"); + } + } + + //组装其他福利基数 + if (welBaseDiffSign) { + for (ICategoryPO po : otherWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "otherPerBase"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "otherComBase"); + } + } else { + for (ICategoryPO po : otherWelfareList) { + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherBase"); + } + } + //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) for (ICategoryPO po : socialWelPerList) { - headerList.add(po.getInsuranceName() + "个人"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialPer"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100388, "社保个人合计")); //住房公积金个人、补充住房公积金个人 for (ICategoryPO po : fundWelPerList) { - headerList.add(po.getInsuranceName() + "个人"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundPer"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计")); //其他个人(比如企业年金个人) for (ICategoryPO po : otherWelPerList) { - headerList.add(po.getInsuranceName() + "个人"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherPer"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100392, "其他福利个人合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(100393, "个人合计")); //社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位) for (ICategoryPO po : socialWelComList) { - headerList.add(po.getInsuranceName() + "单位"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialCom"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100394, "社保单位合计")); //住房公积金单位、补充住房公积金单位 for (ICategoryPO po : fundWelComList) { - headerList.add(po.getInsuranceName() + "单位"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundCom"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计")); + //其他单位(比如企业年金单位) for (ICategoryPO po : otherWelComList) { - headerList.add(po.getInsuranceName() + "单位"); + result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) + + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherCom"); } - headerList.add(SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(100397, "单位合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(100398, "社保合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(100399, "公积金合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(100400, "其他福利合计")); - headerList.add(SalaryI18nUtil.getI18nLabel(93278, "合计")); - List> rows = new ArrayList<>(); - rows.add(headerList); - String sheetName = "福利核算-线下对比导入模板"; - - return ExcelUtilPlus.genWorkbookV2(rows, sheetName); + return result; } /** @@ -2424,6 +2620,12 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } String billMonth = importParam.getBillMonth(); + + Map welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder() + .billMonth(billMonth) + .paymentOrganization(importParam.getPaymentOrganization()) + .paymentStatus(PaymentStatusEnum.COMMON.getValue()) + .build()); //存储待更新的InsuranceAccountDetailPO数据 List addCompareList = new ArrayList<>(); //记录待删除hrsa_excel_bill_detail.id @@ -2518,7 +2720,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { idList.addAll(ids); } //拼装待更新数据 - addCompareList.add(handleExcelInsuranceDetail(billMonth, employeeId, paymentOrganization, map)); + addCompareList.add(handleExcelInsuranceDetail(billMonth, employeeId, paymentOrganization, map, welColumnNameCodeMap)); } @@ -2557,7 +2759,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { * @param billMonth 对比的账单月份 * @param baseMap excel导入的对比数据 */ - private ExcelInsuranceDetailPO handleExcelInsuranceDetail(String billMonth, Long employeeId, Long paymentOrganization, Map baseMap) { + private ExcelInsuranceDetailPO handleExcelInsuranceDetail(String billMonth, Long employeeId, Long paymentOrganization, Map baseMap, Map welColumnNameCodeMap) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); ExcelInsuranceDetailPO excelInsuranceDetailPO = new ExcelInsuranceDetailPO(); excelInsuranceDetailPO.setId(IdGenerator.generate()); @@ -2573,6 +2776,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Map fundPaymentBaseMap = new HashMap<>(); Map otherPaymentBaseMap = new HashMap<>(); + Map socialPaymentComBaseMap = new HashMap<>(); + Map fundPaymentComBaseMap = new HashMap<>(); + Map otherPaymentComBaseMap = new HashMap<>(); + //筛选出福利核算项 Map toDealMap = baseMap.entrySet().stream() @@ -2586,73 +2793,157 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); for(Map.Entry entry : toDealMap.entrySet()) { - //判断元素是否属于福利类 - String keyName = entry.getKey(); - //获取元素名后缀,方便之后判断“个人”或“单位”或者“基数” - String payScope = keyName.substring(keyName.length() - 2); - //获取福利类型 - Integer welfareType; - //根据元素名后缀,区分截取内容 - String targetWelfareName; - if ("基数".equals(payScope)) { - targetWelfareName = entry.getKey().substring(0, keyName.length() - 4); - } else { - targetWelfareName = entry.getKey().substring(0, keyName.length() - 2); - } - List categoryPOList = siCategoryBiz.listByName(targetWelfareName); - if (categoryPOList.size() == 1) { - ICategoryPO iCategoryPO = categoryPOList.get(0); - welfareType = iCategoryPO.getWelfareType(); +// //判断元素是否属于福利类 +// String keyName = entry.getKey(); +// //获取元素名后缀,方便之后判断“个人”或“单位”或者“基数” +// String payScope = keyName.substring(keyName.length() - 2); +// //获取福利类型 +// Integer welfareType; +// //根据元素名后缀,区分截取内容 +// String targetWelfareName; +// if ("基数".equals(payScope)) { +// targetWelfareName = entry.getKey().substring(0, keyName.length() - 4); +// } else { +// targetWelfareName = entry.getKey().substring(0, keyName.length() - 2); +// } +// List categoryPOList = siCategoryBiz.listByName(targetWelfareName); +// if (categoryPOList.size() == 1) { +// ICategoryPO iCategoryPO = categoryPOList.get(0); +// welfareType = iCategoryPO.getWelfareType(); +// +// switch (payScope) { +// case "个人": +// switch (welfareType) { +// case 1: +// socialPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 2: +// fundPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 3: +// otherPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// default: +// throw new SalaryRunTimeException("福利类型不存在"); +// } +// break; +// case "单位": +// switch (welfareType) { +// case 1: +// socialComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 2: +// fundComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 3: +// otherComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// default: +// throw new SalaryRunTimeException("福利类型不存在"); +// } +// break; +// case "基数": +// switch (welfareType) { +// case 1: +// socialPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 2: +// fundPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// case 3: +// otherPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); +// break; +// default: +// throw new SalaryRunTimeException("福利类型不存在"); +// } +// break; +// } +// } - switch (payScope) { - case "个人": - switch (welfareType) { - case 1: - socialPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 2: - fundPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 3: - otherPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - default: - throw new SalaryRunTimeException("福利类型不存在"); - } - break; - case "单位": - switch (welfareType) { - case 1: - socialComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 2: - fundComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 3: - otherComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - default: - throw new SalaryRunTimeException("福利类型不存在"); - } - break; - case "基数": - switch (welfareType) { - case 1: - socialPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 2: - fundPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - case 3: - otherPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString()); - break; - default: - throw new SalaryRunTimeException("福利类型不存在"); - } - break; + if (welColumnNameCodeMap.get(entry.getKey()) != null) { + String code = welColumnNameCodeMap.get(entry.getKey()); + if (welBaseDiffSign) { + if (code.contains("socialPerBase")) { + code = code.replace("socialPerBase", ""); + socialPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("socialComBase")) { + code = code.replace("socialComBase", ""); + socialPaymentComBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("fundPerBase")) { + code = code.replace("fundPerBase", ""); + fundPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("fundComBase")) { + code = code.replace("fundComBase", ""); + fundPaymentComBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("otherPerBase")) { + code = code.replace("otherPerBase", ""); + otherPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("otherComBase")) { + code = code.replace("otherComBase", ""); + otherPaymentComBaseMap.put(code, entry.getValue().toString()); + continue; + } + } else { + if (code.contains("socialBase")) { + code = code.replace("socialBase", ""); + socialPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("fundBase")) { + code = code.replace("fundBase", ""); + fundPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("otherBase")) { + code = code.replace("otherBase", ""); + otherPaymentBaseMap.put(code, entry.getValue().toString()); + continue; + } + } + + + if (code.contains("socialPer") && !code.contains("socialPerBase")) { + code = code.replace("socialPer", ""); + socialPerMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("fundPer") && !code.contains("fundPerBase")) { + code = code.replace("fundPer", ""); + fundPerMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("otherPer") && !code.contains("otherPerBase")) { + code = code.replace("otherPer", ""); + otherPerMap.put(code, entry.getValue().toString()); + continue; + } + + if (code.contains("socialCom") && !code.contains("socialComBase")) { + code = code.replace("socialCom", ""); + socialComMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("fundCom") && !code.contains("fundComBase")) { + code = code.replace("fundCom", ""); + fundComMap.put(code, entry.getValue().toString()); + continue; + } + if (code.contains("otherCom") && !code.contains("otherComBase")) { + code = code.replace("otherCom", ""); + otherComMap.put(code, entry.getValue().toString()); + continue; } } - } //设置社保个人和公司缴纳明细 @@ -2669,6 +2960,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { excelInsuranceDetailPO.setFundPaymentBaseString(JSON.toJSONString(fundPaymentBaseMap)); excelInsuranceDetailPO.setOtherPaymentBaseString(JSON.toJSONString(otherPaymentBaseMap)); + excelInsuranceDetailPO.setSocialPaymentComBaseString(JSON.toJSONString(socialPaymentComBaseMap)); + excelInsuranceDetailPO.setFundPaymentComBaseString(JSON.toJSONString(fundPaymentComBaseMap)); + excelInsuranceDetailPO.setOtherPaymentComBaseString(JSON.toJSONString(otherPaymentComBaseMap)); + //组装新的insuranceAccountDetailPO对象数据 excelInsuranceDetailPO.setEmployeeId(employeeId); excelInsuranceDetailPO.setBillMonth(billMonth); From d6705e89177195c20886b7aa6c416517c301682c Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 11 Dec 2023 13:09:20 +0800 Subject: [PATCH 011/169] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/bo/SalaryAcctResultReportBO.java | 40 -------- .../salaryacct/bo/SalaryAcctRecordBO.java | 3 - .../param/SalaryAcctResultBatchEditParam.java | 40 -------- .../SalaryAcctResultBatchUpdateParam.java | 2 +- .../service/SalaryAcctRecordService.java | 6 -- .../service/SalaryAcctReportService.java | 2 - .../service/SalaryAcctResultService.java | 6 -- .../impl/SalaryAcctRecordServiceImpl.java | 83 ---------------- .../impl/SalaryAcctReportServiceImpl.java | 13 --- .../impl/SalaryAcctResultServiceImpl.java | 97 ------------------- .../salary/web/SalaryAcctController.java | 17 ---- .../wrapper/SalaryAcctRecordWrapper.java | 8 -- .../wrapper/SalaryAcctResultWrapper.java | 9 -- 13 files changed, 1 insertion(+), 325 deletions(-) delete mode 100644 src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java diff --git a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java index 485389860..06cb10a8a 100644 --- a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java +++ b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java @@ -8,7 +8,6 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTempPO; import dm.jdbc.util.IdGenerator; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.math.NumberUtils; import java.util.*; @@ -63,45 +62,6 @@ public class SalaryAcctResultReportBO { .collect(Collectors.toList()); } - public static List lkszConvert2PO(List items, - SalaryAcctEmployeePO salaryAcctEmployee, - Long employeeId, Map emps) { - if (CollectionUtils.isEmpty(items) || ObjectUtils.isEmpty(salaryAcctEmployee)) { - return Collections.emptyList(); - } - Date now = new Date(); - return items.stream() - .map(e -> { - SalaryAcctResultReportPO po = SalaryAcctResultReportPO.builder() - .id(IdGenerator.generate()) - .salarySobId(salaryAcctEmployee.getSalarySobId()) - .salaryItemId(e.getSalaryItemId()) - .salaryAcctRecordId(salaryAcctEmployee.getSalaryAcctRecordId()) - .salaryAcctEmpId(salaryAcctEmployee.getId().toString()) - .employeeId(salaryAcctEmployee.getEmployeeId().toString()) - .taxAgentId(salaryAcctEmployee.getTaxAgentId()) - .resultValue(e.getResultValue()) - .creator(employeeId) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build(); - - DataCollectionEmployee dataCollectionEmployee = emps.get(salaryAcctEmployee.getEmployeeId()); - if (dataCollectionEmployee != null) { - po.setDepartmentId(dataCollectionEmployee.getDepartmentId()); - po.setSubcompanyId(dataCollectionEmployee.getSubcompanyid()); - po.setCostcenterId(dataCollectionEmployee.getCostcenterId()); - po.setJobtitleId(dataCollectionEmployee.getJobtitleId()); - po.setLocationId(dataCollectionEmployee.getLocationId()); - } - return po; - }) - .collect(Collectors.toList()); - } - - public static List convert2ReportPO(Collection temps, Map emps) { // Map longDataCollectionEmployeeMap = SalaryEntityUtil.convert2Map(emps, DataCollectionEmployee::getEmployeeId); if (CollectionUtils.isEmpty(temps)) { diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java index dbf3b552e..53eb473b6 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java @@ -70,16 +70,13 @@ public class SalaryAcctRecordBO { btnList.add(new WeaTableOperate("删除", null, "1")); } btnList.add(new WeaTableOperate("归档", null, "2")); - btnList.add(new WeaTableOperate("结转", null, "6")); } else if (SalaryAcctRecordStatusEnum.ARCHIVED == salaryAcctRecordStatusEnum && ( salarySendMap.get(salaryAcctRecordPO.getId()) ==Boolean.TRUE ) ){ btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); btnList.add(new WeaTableOperate("回算", null, "5")); - btnList.add(new WeaTableOperate("结转", null, "6")); } else { btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); - btnList.add(new WeaTableOperate("结转", null, "6")); } return SalaryAcctRecordListDTO.builder() .id(salaryAcctRecordPO.getId()) diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java deleted file mode 100644 index 487527d51..000000000 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchEditParam.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.engine.salary.entity.salaryacct.param; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** - * @ClassName SalaryAcctResultBatchUpdateParam - * @author Harryxzy - * @date 2023/12/4 13:48 - * @description 鲁控数字批量编辑参数 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class SalaryAcctResultBatchEditParam { - - private Long salaryAcctRecordId; - - private List resultValueList; - - - @Data - @Builder - @AllArgsConstructor - @NoArgsConstructor - public static class resultValue { - - // 薪资核算人员id - private Long id; - - // 薪资项目值 - private List items; - } - -} diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java index 141b3a004..89c06ad5e 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultBatchUpdateParam.java @@ -12,7 +12,7 @@ import java.util.List; * @ClassName SalaryAcctResultBatchUpdateParam * @author Harryxzy * @date 2023/12/4 13:48 - * @description 鲁控数字批量更新参数 + * @description 批量更新参数 */ @Data @Builder diff --git a/src/com/engine/salary/service/SalaryAcctRecordService.java b/src/com/engine/salary/service/SalaryAcctRecordService.java index 9c3ba4f8c..1ba3419bf 100644 --- a/src/com/engine/salary/service/SalaryAcctRecordService.java +++ b/src/com/engine/salary/service/SalaryAcctRecordService.java @@ -207,10 +207,4 @@ public interface SalaryAcctRecordService { List listSome(SalaryAcctRecordPO po); - - /** - * 鲁控数字-结转 - * @param salaryAcctRecordId - */ - void lkszJz(Long salaryAcctRecordId); } diff --git a/src/com/engine/salary/service/SalaryAcctReportService.java b/src/com/engine/salary/service/SalaryAcctReportService.java index 6cf5caa12..c4c1636db 100644 --- a/src/com/engine/salary/service/SalaryAcctReportService.java +++ b/src/com/engine/salary/service/SalaryAcctReportService.java @@ -21,8 +21,6 @@ public interface SalaryAcctReportService { */ void batchSave(Collection pos); - void lkszBatchSave(Collection pos); - /** * 根据核算记录删除 * @param salaryAcctRecordIds diff --git a/src/com/engine/salary/service/SalaryAcctResultService.java b/src/com/engine/salary/service/SalaryAcctResultService.java index ec8efb878..0090f8330 100644 --- a/src/com/engine/salary/service/SalaryAcctResultService.java +++ b/src/com/engine/salary/service/SalaryAcctResultService.java @@ -210,10 +210,4 @@ public interface SalaryAcctResultService { * @param param */ void batchUpdate(SalaryAcctResultBatchUpdateParam param); - - /** - * 鲁控数字薪资核算结果批量编辑 - * @param param - */ - void lkszBatchEdit(SalaryAcctResultBatchEditParam param); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index ee596af21..d6924e489 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -825,87 +825,4 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe public List listSome(SalaryAcctRecordPO po) { return getSalaryAcctRecordMapper().listSome(po); } - - @Override - public void lkszJz(Long salaryAcctRecordId) { - SalaryAcctRecordPO salaryAcctRecordPO = getById(salaryAcctRecordId); - if (ObjectUtils.isEmpty(salaryAcctRecordPO)) { - throw new SalaryRunTimeException("薪资核算记录不存在或已被删除"); - } - YearMonth salaryMonth = SalaryDateUtil.toYearMonth(SalaryDateUtil.dateToLocalDate(salaryAcctRecordPO.getSalaryMonth()).plusMonths(1)); - // 创建下一个月的薪资核算记录 - Long newSalaryAcctRecordId = save(SalaryAcctRecordSaveParam.builder().salarySobId(salaryAcctRecordPO.getSalarySobId()).salaryMonth(salaryMonth).build()); - // 查询下个月的薪资核算人员 - List salaryAcctEmployeePOList = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(newSalaryAcctRecordId); - List acctEmpIds = salaryAcctEmployeePOList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList()); - // 获取原来的薪资核算结果 - List salarySobItemPOS = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId()); - List salarySobItemIds = salarySobItemPOS.stream().map(SalarySobItemPO::getSalaryItemId).collect(Collectors.toList()); - List resultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(salaryAcctRecordId), salarySobItemIds); - // 过滤掉新的核算记录中不存在的人 - resultPOS = resultPOS.stream().filter(result -> acctEmpIds.contains(result.getEmployeeId())).collect(Collectors.toList()); - Map> resultMap = SalaryEntityUtil.group2Map(resultPOS, SalaryAcctResultPO::getEmployeeId); - // 查询人员信息,供报表使用 - List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); - Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); - - // 需要保存的核算结果 - List needInsertResultList = new ArrayList<>(); - // 报表 - List needInsertResultReportList = new ArrayList<>(); - Date now = new Date(); - Long uid = Long.valueOf(user.getUID()); - salaryAcctEmployeePOList.stream().forEach(acctEmp -> { - List oldResultList = resultMap.get(acctEmp.getEmployeeId()); - oldResultList.stream().forEach(oldResult -> { - // 薪资核算结果 - needInsertResultList.add(SalaryAcctResultPO.builder() - .salarySobId(salaryAcctRecordPO.getSalarySobId()) - .salaryItemId(oldResult.getSalaryItemId()) - .salaryAcctRecordId(newSalaryAcctRecordId) - .salaryAcctEmpId(acctEmp.getId()) - .employeeId(acctEmp.getEmployeeId()) - .taxAgentId(acctEmp.getTaxAgentId()) - .resultValue(StringUtils.trim(oldResult.getResultValue())) - .originResultValue(oldResult.getOriginResultValue()) - .creator(uid) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build()); - - // 报表结果 - SalaryAcctResultReportPO po = SalaryAcctResultReportPO.builder() - .id(IdGenerator.generate()) - .salarySobId(salaryAcctRecordPO.getSalarySobId()) - .salaryItemId(oldResult.getSalaryItemId()) - .salaryAcctRecordId(newSalaryAcctRecordId) - .salaryAcctEmpId(acctEmp.getId().toString()) - .employeeId(acctEmp.getEmployeeId().toString()) - .taxAgentId(acctEmp.getTaxAgentId()) - .resultValue(StringUtils.trim(oldResult.getResultValue())) - .creator(uid) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build(); - - DataCollectionEmployee dataCollectionEmployee = emps.get(acctEmp.getEmployeeId()); - if (dataCollectionEmployee != null) { - po.setDepartmentId(dataCollectionEmployee.getDepartmentId()); - po.setSubcompanyId(dataCollectionEmployee.getSubcompanyid()); - po.setCostcenterId(dataCollectionEmployee.getCostcenterId()); - po.setJobtitleId(dataCollectionEmployee.getJobtitleId()); - po.setLocationId(dataCollectionEmployee.getLocationId()); - } - needInsertResultReportList.add(po); - }); - }); - - // 入库 - getSalaryAcctResultService(user).batchSave(needInsertResultList); - getSalaryAcctReportService(user).lkszBatchSave(needInsertResultReportList); - } } diff --git a/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java index 43b7160a8..8371241fb 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctReportServiceImpl.java @@ -62,19 +62,6 @@ public class SalaryAcctReportServiceImpl extends Service implements SalaryAcctRe } } - @Override - public void lkszBatchSave(Collection pos) { - if (CollectionUtils.isNotEmpty(pos)) { - SalarySysConfPO disPlay = getSalarySysConfService(user).getOneByCode(DISPLAY_EMP_INFO_REPORT); - //默认不显示,关闭状态 - if (disPlay == null || OpenEnum.OFF.getValue().equals(disPlay.getConfValue())) { - pos = encryptUtil.encryptList(new ArrayList<>(pos), SalaryAcctResultReportPO.class); - } - List> partition = Lists.partition((List) pos, 100); - partition.forEach(getSalaryAcctResultReportMapper()::batchInsert); - } - } - @Override public void deleteBySalaryAcctRecordIds(Collection salaryAcctRecordIds) { if (CollectionUtils.isNotEmpty(salaryAcctRecordIds)) { diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 34148f289..5369fea9e 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -1196,101 +1196,4 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe } } - - @Override - public void lkszBatchEdit(SalaryAcctResultBatchEditParam param) { - List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); - Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); - - SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId()); - if (ObjectUtils.isEmpty(salaryAcctRecordPO)) { - throw new SalaryRunTimeException("薪资核算结果不存在或已被删除"); - } - - List salaryAcctEmployeePOList = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(param.getSalaryAcctRecordId()); - Map salaryAcctEmployeePOMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeePOList, SalaryAcctEmployeePO::getId); - - // 需要更新数据的薪资核算人员id - List updateAcctEmpIds = param.getResultValueList().stream().map(SalaryAcctResultBatchEditParam.resultValue::getId).collect(Collectors.toList()); - // 查询原来的薪资核算结果 - List salaryAcctResultPOSOld = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctEmpIds(updateAcctEmpIds).build()); - // 解密 - encryptUtil.decryptList(salaryAcctResultPOSOld, SalaryAcctResultPO.class); - // 保存参数转换成薪资核算结果po - List salaryAcctResultPOS = new ArrayList<>(); - // 获取薪资项目回算前的值 - Map salaryAcctResultOldPOMap = salaryAcctResultPOSOld.stream() - .collect(Collectors.groupingBy(p -> p.getSalaryAcctEmpId() + "-" + p.getSalaryItemId(), - Collectors.collectingAndThen(Collectors.maxBy(Comparator.comparing(SalaryAcctResultPO::getId)), - s -> s.map(SalaryAcctResultPO::getOriginResultValue).orElse("")))); - List salaryAcctResultReportPOS = new ArrayList<>(); - param.getResultValueList().forEach(resultValue -> { - SalaryAcctEmployeePO salaryAcctEmployeePO = salaryAcctEmployeePOMap.get(resultValue.getId()); - salaryAcctResultPOS.addAll(SalaryAcctResultBO.batchEditConvert2PO(salaryAcctResultOldPOMap, resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID())); - // 报表 - salaryAcctResultReportPOS.addAll(SalaryAcctResultReportBO.lkszConvert2PO(resultValue.getItems(), salaryAcctEmployeePO, (long) user.getUID(), emps)); - }); - - // 删除原来的薪资核算结果 - param.getResultValueList().stream().forEach(resultValue -> { - List saveItemIds = resultValue.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList()); - deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getId()), saveItemIds); - // 报表 - getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(resultValue.getId()), saveItemIds); - }); - - // 保存薪资核算结果 - if (CollectionUtils.isNotEmpty(salaryAcctResultPOS)) { - // 加密 - encryptUtil.encryptList(salaryAcctResultPOS, SalaryAcctResultPO.class); - List> partition = Lists.partition(salaryAcctResultPOS, 100); - partition.forEach(getSalaryAcctResultMapper()::batchInsert); - } - - //报表 - if (CollectionUtils.isNotEmpty(salaryAcctResultReportPOS)) { - getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); - } - } - - - public void temp(SalaryAcctResultSaveParam saveParam){ - List dataCollectionEmployees = getSalaryEmployeeService(user).listAllForReport(); - Map emps = SalaryEntityUtil.convert2Map(dataCollectionEmployees, DataCollectionEmployee::getEmployeeId); - - // 查询薪资核算人员 - SalaryAcctEmployeePO salaryAcctEmployeePO = getSalaryAcctEmployeeService(user).getById(saveParam.getSalaryAcctEmpId()); - if (Objects.isNull(salaryAcctEmployeePO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98831, "薪资核算人员不存在或已被删除")); - } - // 查询原来的薪资核算结果 - List salaryAcctResultPOSOld = getSalaryAcctResultMapper().listSome(SalaryAcctResultPO.builder().salaryAcctEmpId(saveParam.getSalaryAcctEmpId()).build()); - // 解密 - encryptUtil.decryptList(salaryAcctResultPOSOld, SalaryAcctResultPO.class); - // 保存参数转换成薪资核算结果po - List salaryAcctResultPOS = SalaryAcctResultBO.convert2PO(salaryAcctResultPOSOld, saveParam, salaryAcctEmployeePO, (long) user.getUID()); - SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK); - - // 删除原来的薪资核算结果 - List saveItemIds = saveParam.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList()); - deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds); - // 保存薪资核算结果 - if (CollectionUtils.isNotEmpty(salaryAcctResultPOS)) { - // 加密 - encryptUtil.encryptList(salaryAcctResultPOS, SalaryAcctResultPO.class); - List> partition = Lists.partition(salaryAcctResultPOS, 100); - partition.forEach(getSalaryAcctResultMapper()::batchInsert); - } - //报表 todo - getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds); - List salaryAcctResultReportPOS = SalaryAcctResultReportBO.convert2PO(saveParam, salaryAcctEmployeePO, (long) user.getUID(), emps); - if (CollectionUtils.isNotEmpty(salaryAcctResultReportPOS)) { - getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); - } - - - // 存储薪资核算结果数据来源日志 - salaryAcctResultPOS = getSalaryAcctRecordService(user).listBySalaryAcctEmpId(saveParam.getSalaryAcctEmpId()); - saveSalaryAcctResultLog(salaryAcctResultPOSOld, salaryAcctResultPOS); - } } \ No newline at end of file diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java index c6032686c..4a8088761 100644 --- a/src/com/engine/salary/web/SalaryAcctController.java +++ b/src/com/engine/salary/web/SalaryAcctController.java @@ -159,14 +159,6 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctRecordWrapper(user)::backCalculate, param.getSalaryAcctRecordId()); } - // 结转 - @GET - @Path("/lkszJz") - @Produces(MediaType.APPLICATION_JSON) - public String lkszJz(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "id") Long id) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getSalaryAcctRecordWrapper(user)::lkszJz, id); - } /* ********************************薪资核算记录相关 end*********************************/ @@ -466,15 +458,6 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::batchUpdate, param); } - //鲁控数字批量编辑 - @POST - @Path("/acctresult/lkszBatchEdit") - @Produces(MediaType.APPLICATION_JSON) - public String lkszBatchEdit(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultBatchEditParam param) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::lkszBatchEdit, param); - } - //薪资核算 @POST @Path("/acctresult/accounting") diff --git a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java index 95b461e7d..b3d7d06e3 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctRecordWrapper.java @@ -266,12 +266,4 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord public void backCalculate(Long salaryAcctRecordId){ getSalaryAcctRecordService(user).backCalculate(salaryAcctRecordId); } - - /** - * 鲁控数字-结转 - * @param salaryAcctRecordId - */ - public void lkszJz(Long salaryAcctRecordId) { - getSalaryAcctRecordService(user).lkszJz(salaryAcctRecordId); - } } diff --git a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java index 2bf31ef9c..5c1347343 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java @@ -265,15 +265,6 @@ public class SalaryAcctResultWrapper extends Service { getSalaryAcctResultService(user).batchUpdate(param); } - /** - * 鲁控数字薪资核算结果批量编辑 - * @param param - */ - public void lkszBatchEdit(SalaryAcctResultBatchEditParam param) { - getSalaryAcctResultService(user).lkszBatchEdit(param); - } - - /** * 薪资核算-校验 * From e97dab27fc162809bac36042006d229ca231b5ff Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 13 Dec 2023 10:51:24 +0800 Subject: [PATCH 012/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=8B=86=E5=88=86?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=9F=BA=E6=95=B0=E9=80=BB=E8=BE=91=E7=9B=B8=E5=85=B3sql?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202312130203.sql | 39 +++++++++++++++++++ resource/sqlupgrade/GS/sql202312130203.sql | 39 +++++++++++++++++++ resource/sqlupgrade/JC/sql202312130203.sql | 39 +++++++++++++++++++ resource/sqlupgrade/Mysql/sql202312130203.sql | 17 ++++++++ .../sqlupgrade/Oracle/sql202312130203.sql | 30 ++++++++++++++ resource/sqlupgrade/PG/sql202312130203.sql | 17 ++++++++ .../sqlupgrade/SQLServer/sql202312130203.sql | 30 ++++++++++++++ resource/sqlupgrade/ST/sql202312130203.sql | 39 +++++++++++++++++++ 8 files changed, 250 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202312130203.sql create mode 100644 resource/sqlupgrade/GS/sql202312130203.sql create mode 100644 resource/sqlupgrade/JC/sql202312130203.sql create mode 100644 resource/sqlupgrade/Mysql/sql202312130203.sql create mode 100644 resource/sqlupgrade/Oracle/sql202312130203.sql create mode 100644 resource/sqlupgrade/PG/sql202312130203.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202312130203.sql create mode 100644 resource/sqlupgrade/ST/sql202312130203.sql diff --git a/resource/sqlupgrade/DM/sql202312130203.sql b/resource/sqlupgrade/DM/sql202312130203.sql new file mode 100644 index 000000000..d5bdd577d --- /dev/null +++ b/resource/sqlupgrade/DM/sql202312130203.sql @@ -0,0 +1,39 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL; +/ + diff --git a/resource/sqlupgrade/GS/sql202312130203.sql b/resource/sqlupgrade/GS/sql202312130203.sql new file mode 100644 index 000000000..d5bdd577d --- /dev/null +++ b/resource/sqlupgrade/GS/sql202312130203.sql @@ -0,0 +1,39 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL; +/ + diff --git a/resource/sqlupgrade/JC/sql202312130203.sql b/resource/sqlupgrade/JC/sql202312130203.sql new file mode 100644 index 000000000..d5bdd577d --- /dev/null +++ b/resource/sqlupgrade/JC/sql202312130203.sql @@ -0,0 +1,39 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202312130203.sql b/resource/sqlupgrade/Mysql/sql202312130203.sql new file mode 100644 index 000000000..7ff70da9f --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202312130203.sql @@ -0,0 +1,17 @@ +ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_insurance_base_history ADD COLUMN payment_scope varchar(10) NULL; diff --git a/resource/sqlupgrade/Oracle/sql202312130203.sql b/resource/sqlupgrade/Oracle/sql202312130203.sql new file mode 100644 index 000000000..f62d861b8 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202312130203.sql @@ -0,0 +1,30 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL +/ + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL +/ + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL +/ + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL +/ +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL +/ + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202312130203.sql b/resource/sqlupgrade/PG/sql202312130203.sql new file mode 100644 index 000000000..9b9630ce6 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202312130203.sql @@ -0,0 +1,17 @@ +ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; + +ALTER TABLE hrsa_insurance_base_history ADD COLUMN payment_scope varchar(10) NULL; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202312130203.sql b/resource/sqlupgrade/SQLServer/sql202312130203.sql new file mode 100644 index 000000000..0738202b3 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202312130203.sql @@ -0,0 +1,30 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar(4000) NULL +GO + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar(4000) NULL +GO + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar(4000) NULL +GO + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar(4000) NULL +GO +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar(4000) NULL +GO + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar(10) NULL +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202312130203.sql b/resource/sqlupgrade/ST/sql202312130203.sql new file mode 100644 index 000000000..d5bdd577d --- /dev/null +++ b/resource/sqlupgrade/ST/sql202312130203.sql @@ -0,0 +1,39 @@ +ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL; +/ + +ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL; +/ + From 96d37b1b68acee1f29a88860cb4085622d391177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 14 Dec 2023 10:39:49 +0800 Subject: [PATCH 013/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B3=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalaryStatisticsReportServiceImpl.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index c71f5193c..4bb650f92 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -352,7 +352,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary po.setCreator(uid); po.setCreateTime(now); po.setUpdateTime(now); - po.setReportName(po.getReportName()+"_copy"); + po.setReportName(po.getReportName() + "_copy"); getSalaryStatisticsReportMapper().insertIgnoreNull(po); @@ -414,11 +414,21 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary param.setSalaryStartMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryStartMonth())); param.setSalaryEndMonth(SalaryDateUtil.getFormatYearMonth(reportPO.getSalaryEndMonth())); String key = "id"; - param.setTaxAgent(((List) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); - param.setSubCompany(((List) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); - param.setDepart(((List) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); - param.setEmployee(((List) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); - param.setHiredate(JSON.parseArray(reportPO.getHiredateSetting(), Date.class)); + if (reportPO.getTaxAgentSetting() != null) { + param.setTaxAgent(((List) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } + if (reportPO.getSubCompanySetting() != null) { + param.setSubCompany(((List) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } + if (reportPO.getDepartSetting() != null) { + param.setDepart(((List) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } + if (reportPO.getEmployeeSetting() != null) { + param.setEmployee(((List) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } + if (reportPO.getHiredateSetting() != null) { + param.setHiredate(JSON.parseArray(reportPO.getHiredateSetting(), Date.class)); + } SalaryStatisticsReportDataQueryParam queryParam = new SalaryStatisticsReportDataQueryParam(); com.mzlion.core.utils.BeanUtils.copyProperties(param, queryParam); // 获取本期报表分权后的核算人员 @@ -1062,7 +1072,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary List fieldSettings = Optional.ofNullable(Optional.ofNullable(employeeInfoExpandDTO).orElse(new EmployeeInfoExpandDTO()).getFieldSettings()).orElse(new ArrayList<>()); Map> expandEmployeeMap = getSalaryEmployeeService(user).expandEmployeeMap(empIds, employeeInfoExpandDTO); - log.info("扩展属性"+expandEmployeeMap); + log.info("扩展属性" + expandEmployeeMap); // List extEmployees = extEmployeeService.listByIdsWithDeleted(accountDetailPOList.stream().filter(e -> EmployeeTypeEnum.EXT_EMPLOYEE.getValue().equals(e.getEmployeeType())).map(SalaryAcctEmployeePO::getEmployeeId).distinct().collect(Collectors.toList()), data.getTenantKey()); // Map employeeExtByIdMap = SalaryEntityUtil.convert2Map(extEmployees, ExtEmployeePO::getId, ExtEmployeePO::getUsername); @@ -1075,7 +1085,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary temp.put(DM, employeeByIdMap.get(k).getUsername()); fieldSettings.forEach( fieldSetting -> { - temp.put(fieldSetting.getField(), expandEmployeeMap.getOrDefault(k,new HashMap<>()).get(fieldSetting.getField())); + temp.put(fieldSetting.getField(), expandEmployeeMap.getOrDefault(k, new HashMap<>()).get(fieldSetting.getField())); } ); temp.putAll(SalaryStatisticsReportBO.calculateItem(v, lastEmployeeListMap.get(k), sameEmployeeListMap.get(k), salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); From 2685c724e4408337958de4dc7b64a58aaf492798 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 14 Dec 2023 13:59:39 +0800 Subject: [PATCH 014/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=BC=96=E8=BE=91=E9=A1=B5=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF=E8=BF=94=E5=9B=9E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 32186cbbb..f2f3feee7 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -317,6 +317,12 @@ public class SIArchivesBiz { List inputItems = buildPaymentBase(user, schemeId, welfareType); addGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputItems)); dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputComItems)); + dataMap.put("comItems", addComGroups); + } return dataMap; } @@ -344,6 +350,12 @@ public class SIArchivesBiz { List inputItems = buildPaymentBase(user, schemeId, welfareType); addGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputItems)); dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputComItems)); + dataMap.put("comItems", addComGroups); + } return dataMap; } From 7cb0e686238e8e48ce887a84e32d7c5fe9298939 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 15 Dec 2023 09:50:20 +0800 Subject: [PATCH 015/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=BC=96=E8=BE=91=E9=A1=B5=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=9F=BA=E6=95=B0=E4=BF=A1=E6=81=AF=E8=BF=94=E5=9B=9E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/siarchives/bo/InsuranceArchivesBO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBO.java b/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBO.java index a96b96aad..710038513 100644 --- a/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBO.java +++ b/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBO.java @@ -35,6 +35,7 @@ public class InsuranceArchivesBO { .socialStartTime(po.getSocialStartTime()) .schemeAccount(po.getSocialAccount()) .schemePaymentBaseString(po.getSocialPaymentBaseString()) + .schemePaymentComBaseString(po.getSocialPaymentComBaseString()) .underTake(po.getUnderTake() == null ? null : String.valueOf(po.getUnderTake())) .build(); } @@ -52,6 +53,7 @@ public class InsuranceArchivesBO { .fundSchemeId(po.getFundSchemeId()) .paymentOrganization(po.getPaymentOrganization()) .fundPaymentBaseString(po.getFundPaymentBaseString()) + .fundPaymentComBaseString(po.getFundPaymentComBaseString()) .fundStartTime(po.getFundStartTime()) .supplementFundAccount(po.getSupplementFundAccount()) .nonPayment(po.getNonPayment()) @@ -72,6 +74,7 @@ public class InsuranceArchivesBO { .otherName(po.getOtherSchemeId() == null ? null : String.valueOf(po.getOtherSchemeId())) .otherSchemeId(po.getOtherSchemeId()) .otherPaymentBaseString(po.getOtherPaymentBaseString()) + .otherPaymentComBaseString(po.getOtherPaymentComBaseString()) .otherStartTime(po.getOtherStartTime()) .otherEndTime(po.getOtherEndTime()) .paymentOrganization(po.getPaymentOrganization()) From 4f8606b00ee4311c09848fa62f183b56f6fa9940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sat, 16 Dec 2023 12:35:24 +0800 Subject: [PATCH 016/169] =?UTF-8?q?=E7=BC=93=E5=AD=98=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/report/wrapper/SalaryStatisticsReportWrapper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index ce270b1fa..86b7aeb7d 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -216,6 +216,7 @@ public class SalaryStatisticsReportWrapper extends Service { /** * 复制薪资账套 + * * @param id */ public void duplicate(Long id) { @@ -322,7 +323,7 @@ public class SalaryStatisticsReportWrapper extends Service { //报表中缓存的条件 salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id)); if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) { - return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5); + return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); } } @@ -346,7 +347,7 @@ public class SalaryStatisticsReportWrapper extends Service { getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_IDS, salaryReportIds + "," + id); getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id, salaryReportConditions + "," + paramMd5); - getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5, resultMap); + getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5, resultMap); return resultMap; From bda3d7080bee22cb7fab3b869b54840066c4e6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sat, 16 Dec 2023 12:36:56 +0800 Subject: [PATCH 017/169] =?UTF-8?q?=E7=BC=93=E5=AD=98=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/service/impl/SalaryStatisticsReportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 4bb650f92..3f9745f11 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -497,7 +497,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Arrays.asList(salaryReportConditions.split(",")).forEach(paramMd5 -> { if (StringUtils.isNotBlank(paramMd5)) { //条件对应的结果 - getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5); + getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); } } ); From e8223a832bb0c89038a2f3b56811fd88a365abdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sat, 16 Dec 2023 12:40:33 +0800 Subject: [PATCH 018/169] =?UTF-8?q?=E7=BC=93=E5=AD=98=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/report/wrapper/SalaryStatisticsReportWrapper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index 86b7aeb7d..508877028 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -345,6 +345,7 @@ public class SalaryStatisticsReportWrapper extends Service { resultMap.put("reportId", id); + //设置报表缓存 getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_IDS, salaryReportIds + "," + id); getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id, salaryReportConditions + "," + paramMd5); getSalaryCacheService(user).set(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5, resultMap); From b20a3ef10363e20c111ad2fa81f1871345d9ff71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 20 Dec 2023 21:00:48 +0800 Subject: [PATCH 019/169] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/elog/annotation/Elog.java | 23 + .../elog/annotation/ElogDetailField.java | 14 + .../elog/annotation/ElogDetailTable.java | 13 + .../salary/elog/annotation/ElogField.java | 23 + .../elog/annotation/ElogPrimaryKey.java | 9 + .../salary/elog/annotation/ElogTable.java | 16 + .../salary/elog/annotation/LoggerTarget.java | 24 ++ .../elog/annotation/handle/ElogHandler.java | 177 ++++++++ .../annotation/handle/ElogTableScanner.java | 172 ++++++++ .../handle/LoggerTargetHandler.java | 40 ++ .../engine/salary/elog/dto/CancelContext.java | 25 ++ .../engine/salary/elog/dto/DateTypeEnum.java | 16 + .../engine/salary/elog/dto/LoggerContext.java | 408 ++++++++++++++++++ .../salary/elog/dto/LoggerDetailContext.java | 102 +++++ .../engine/salary/elog/dto/RedoContext.java | 24 ++ .../salary/elog/dto/TableChangeBean.java | 53 +++ .../salary/elog/dto/TableColumnBean.java | 155 +++++++ .../engine/salary/elog/util/ElogUtils.java | 50 +++ .../salary/elog/util/LoggerTemplate.java | 164 +++++++ .../elog/util/LoggerTemplateBuilder.java | 21 + 20 files changed, 1529 insertions(+) create mode 100644 src/com/engine/salary/elog/annotation/Elog.java create mode 100644 src/com/engine/salary/elog/annotation/ElogDetailField.java create mode 100644 src/com/engine/salary/elog/annotation/ElogDetailTable.java create mode 100644 src/com/engine/salary/elog/annotation/ElogField.java create mode 100644 src/com/engine/salary/elog/annotation/ElogPrimaryKey.java create mode 100644 src/com/engine/salary/elog/annotation/ElogTable.java create mode 100644 src/com/engine/salary/elog/annotation/LoggerTarget.java create mode 100644 src/com/engine/salary/elog/annotation/handle/ElogHandler.java create mode 100644 src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java create mode 100644 src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java create mode 100644 src/com/engine/salary/elog/dto/CancelContext.java create mode 100644 src/com/engine/salary/elog/dto/DateTypeEnum.java create mode 100644 src/com/engine/salary/elog/dto/LoggerContext.java create mode 100644 src/com/engine/salary/elog/dto/LoggerDetailContext.java create mode 100644 src/com/engine/salary/elog/dto/RedoContext.java create mode 100644 src/com/engine/salary/elog/dto/TableChangeBean.java create mode 100644 src/com/engine/salary/elog/dto/TableColumnBean.java create mode 100644 src/com/engine/salary/elog/util/ElogUtils.java create mode 100644 src/com/engine/salary/elog/util/LoggerTemplate.java create mode 100644 src/com/engine/salary/elog/util/LoggerTemplateBuilder.java diff --git a/src/com/engine/salary/elog/annotation/Elog.java b/src/com/engine/salary/elog/annotation/Elog.java new file mode 100644 index 000000000..7e00ca25e --- /dev/null +++ b/src/com/engine/salary/elog/annotation/Elog.java @@ -0,0 +1,23 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +public @interface Elog { + + String module(); + + String function(); + + String operateType(); + + String operateTypeName(); + + String sql() default ""; + + boolean isLocal() default true; + + String infoMethod() default ""; +} diff --git a/src/com/engine/salary/elog/annotation/ElogDetailField.java b/src/com/engine/salary/elog/annotation/ElogDetailField.java new file mode 100644 index 000000000..129c57da8 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogDetailField.java @@ -0,0 +1,14 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface ElogDetailField { + + String fieldType() default "varchar"; + String length() default "50"; + String fieldName(); + String desc() default "自定义字段"; +} diff --git a/src/com/engine/salary/elog/annotation/ElogDetailTable.java b/src/com/engine/salary/elog/annotation/ElogDetailTable.java new file mode 100644 index 000000000..d5054b7c1 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogDetailTable.java @@ -0,0 +1,13 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface ElogDetailTable { + + String module(); + + String function() default "common"; +} diff --git a/src/com/engine/salary/elog/annotation/ElogField.java b/src/com/engine/salary/elog/annotation/ElogField.java new file mode 100644 index 000000000..3b5df99c2 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogField.java @@ -0,0 +1,23 @@ +package com.engine.salary.elog.annotation; + +import com.engine.salary.elog.dto.DateTypeEnum; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface ElogField { + + DateTypeEnum dataType() default DateTypeEnum.VARCHAR; + + int length() default 50; + + String comment() default "自定义字段"; + + String defaultValue() default ""; + + boolean isNull() default true; + + boolean isKey() default false; +} diff --git a/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java b/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java new file mode 100644 index 000000000..291f82562 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java @@ -0,0 +1,9 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.PARAMETER}) +public @interface ElogPrimaryKey { +} diff --git a/src/com/engine/salary/elog/annotation/ElogTable.java b/src/com/engine/salary/elog/annotation/ElogTable.java new file mode 100644 index 000000000..28f5f853b --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogTable.java @@ -0,0 +1,16 @@ +package com.engine.salary.elog.annotation; + +import org.springframework.stereotype.Component; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +@Component +public @interface ElogTable { + + String module(); + + String function() default "common"; +} diff --git a/src/com/engine/salary/elog/annotation/LoggerTarget.java b/src/com/engine/salary/elog/annotation/LoggerTarget.java new file mode 100644 index 000000000..c1e337ca3 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/LoggerTarget.java @@ -0,0 +1,24 @@ +package com.engine.salary.elog.annotation; + +import org.springframework.core.annotation.AliasFor; + +import java.lang.annotation.*; + +/** + * @ClassName: LoggerTarget + * @Description 日志构造器-自定义注解 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface LoggerTarget { + @AliasFor("module") + String value() default ""; + + @AliasFor("value") + String module() default ""; + + String function() default "common"; +} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogHandler.java b/src/com/engine/salary/elog/annotation/handle/ElogHandler.java new file mode 100644 index 000000000..815191606 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/handle/ElogHandler.java @@ -0,0 +1,177 @@ +package com.engine.salary.elog.annotation.handle; + +import com.weaver.common.async.producer.client.AsyncClient; +import com.weaver.common.distribution.genid.IdGenerator; +import com.weaver.common.elog.annotation.Elog; +import com.weaver.common.elog.annotation.ElogPrimaryKey; +import com.weaver.common.elog.dao.QueryCurretValusMapper; +import com.weaver.common.elog.dto.LoggerContext; +import com.weaver.common.elog.util.LoggerTemplate; +import org.apache.commons.lang3.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Component; +import org.springframework.util.ReflectionUtils; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +/** + * @ClassName: LoggerTargetHandler + * @Description 从Spring扫描到的类中获取到Elog自定义注解类设置function属性 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +@Aspect +@Component +public class ElogHandler { + + @Autowired + ApplicationContext applicationContext; + + @Autowired + protected AsyncClient asyncClient; + + @Autowired + QueryCurretValusMapper queryCurretValusMapper; + + /** + * 切面写入日志 + */ + @Pointcut("@annotation(com.weaver.common.elog.annotation.Elog)" ) + public void writeLog(){} + @Around("writeLog()") + public Object writeLog(ProceedingJoinPoint pjp){ + Object[] args = pjp.getArgs(); + Signature signature = pjp.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + + Elog elog = method.getAnnotation(Elog.class); + String moduleName = elog.module(); + String funtionName = elog.function(); + String operateType = elog.operateType(); + String operateTypeName = elog.operateTypeName(); + boolean isLocal = elog.isLocal(); + Annotation[][] annos = method.getParameterAnnotations(); + + Object id = null; + int keyPosition = -1; + int index = 0; + + Class idClass = null; + // 获取主键id注解 + for(Annotation[] anno : annos) { + if(anno.length > 0) { + for(Annotation annotation : anno) { + if(annotation instanceof ElogPrimaryKey) { + idClass = method.getParameters()[index].getType(); + id = args[index]; + if(StringUtils.isEmpty(id+"")) { + id = idClass.cast(IdGenerator.generate() + ""); + } + keyPosition = index; + break; + } + } + } + index ++; + } + + LoggerContext loggerContext = null; + // 获取日志实体类 + for(Object arg: args) { + if(arg instanceof LoggerContext) { + loggerContext = (LoggerContext) arg; + break; + } + } + + if(loggerContext == null) { + loggerContext = new LoggerContext(); + } + + // 日志实体类的初始化 + // loggerContext.setOperateType("UPDATE"); + loggerContext.setFunctionName(funtionName); + loggerContext.setModuleName(moduleName); + loggerContext.setOperateType(operateType); + loggerContext.setOperateTypeName(operateTypeName); + loggerContext.setDate(new Date()); + loggerContext.setDevice("IOS"); + + String sql = elog.sql(); + String infoMethod = elog.infoMethod(); + + boolean isSql = false; + boolean isMethod = false; + Object currentClass = null; + Method infoMtd = null; + if(StringUtils.isNotEmpty(id+"")) { + if(StringUtils.isNotEmpty(sql)) { + isSql = true; + Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); + loggerContext.setOldValues(oldValue); + } else if(StringUtils.isNotEmpty(infoMethod)){ + isMethod = true; + currentClass = applicationContext.getBean(pjp.getTarget().getClass()); + // 获取方法 + infoMtd = ReflectionUtils.findMethod(pjp.getTarget().getClass(),infoMethod, idClass); + + // todo 为空的情况加异常提醒 + // 反射执行方法 + Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); + if(res != null) { + if(res instanceof List) { + loggerContext.setOldValueList((List) res); + } else { + loggerContext.setOldValues(res); + } + + } + } + } + + LoggerTemplate loggerTemplate = new LoggerTemplate(); + loggerTemplate.setFunction(funtionName); + loggerTemplate.setModule(moduleName); + loggerTemplate.setAsyncClient(asyncClient); + + Object result = null; + try { + args[keyPosition] = id; + result = pjp.proceed(args); + } catch (Throwable throwable) { + throwable.printStackTrace(); + } + if(isSql) { + Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); + loggerContext.setNewValues(oldValue); + } else if(isMethod) { + Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); + if(res != null) { + if(res instanceof List) { + loggerContext.setNewValueList((List) res); + } else { + loggerContext.setNewValues(res); + } + } + } + if(isLocal) + loggerTemplate.write(loggerContext); + else + loggerTemplate.write(loggerContext,false); + return result; + + } +} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java new file mode 100644 index 000000000..2be2f35b6 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java @@ -0,0 +1,172 @@ +package com.engine.salary.elog.annotation.handle; + +import com.engine.salary.elog.annotation.ElogField; +import com.engine.salary.elog.annotation.ElogTable; +import com.engine.salary.elog.dto.TableColumnBean; +import com.engine.salary.elog.util.ElogUtils; +import com.weaver.common.elog.dao.TableCheckerMapper; +import com.weaver.common.elog.dto.DateTypeEnum; +import lombok.extern.slf4j.Slf4j; +import org.reflections.Reflections; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.aop.support.AopUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; + +import javax.annotation.Resource; +import java.lang.reflect.Field; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @ClassName: ElogTableScanner + * @Description 日志操作表扫描 + * @Author tanghj + * @Date 2021/3/12 13:31 + */ +@Slf4j +public class ElogTableScanner { + private Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Resource + private ApplicationContext applicationContext; + + @Autowired + private TableCheckerMapper tableCheckerMapper; + + @Override + public void run(String... args) throws Exception { + + // todo 需要考虑集群下,控制一台机器来跑 + scanElogTable(); + + } + + private void scanElogTable() { + // todo 是否还需要扫描Elog(因为可能不需要本地存储) ELogDetailTable, + Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); + Reflections reflections = new Reflections("com.example.controller"); + Set> restController = reflections.getTypesAnnotatedWith(RestController.class); + + List baseColumns = new ArrayList<>(); + + Map> tableColumns = elogTableHandle(tableBeans,baseColumns); + + for(String tableName : tableColumns.keySet()) { + + // todo 需要处理明细表,如果没有直接初始化原始明细表,如果有加上自定义的 + List columns = tableColumns.get(tableName); + if(columns == null) { + columns = baseColumns; + } else { + columns.addAll(baseColumns); + } + tableCheck(tableName, columns); + } + + } + + private Map> elogTableHandle(Map tableBeans, List baseColumns) { + + + Map> tableMap = new HashMap<>(); + + + for (Map.Entry entry : tableBeans.entrySet()) {//遍历每个controller层 + + List list = new ArrayList<>(); + System.out.println(entry.getKey());//demo1Controller + Object value = entry.getValue(); + Class aClass = AopUtils.getTargetClass(value);//获取class + + ElogTable elogTable = aClass.getAnnotation(ElogTable.class); + + List fields = Arrays.asList(aClass.getDeclaredFields());//获取方法 + for (Field f : fields) { + + ElogField field = f.getAnnotation(ElogField.class); + if(field == null) { + continue; + } + + TableColumnBean tableColumnBean = new TableColumnBean(); + + tableColumnBean.setColumnName(f.getName()); + tableColumnBean.setColumnComment(field.comment()); + tableColumnBean.setColumnDefault(field.defaultValue()); + tableColumnBean.setFieldLength(field.length()); + tableColumnBean.setDataType(field.dataType()); + tableColumnBean.setNullable(field.isNull()); + list.add(tableColumnBean); + } + if(!ElogUtils.BASE_TABLE.equals(elogTable.module())) { + + tableMap.put(ElogUtils.getTableName(elogTable.module(), elogTable.function()), list); + } else { + baseColumns.addAll(list); + } + } + + return tableMap; + } + + private void tableCheck(String tableName, List columns) { + + List oldColumns = tableCheckerMapper.getTableStructure(tableName); + + // 表不存在 + if(oldColumns == null || oldColumns.size() == 0) { + createTable(tableName,columns ); + } else { + Map newcolMap = new HashMap<>(); + Map oldcolMap = new HashMap<>(); + + columns.stream().forEach(tableColumnBean -> newcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean)); + oldColumns.stream().forEach(tableColumnBean -> { + tableColumnBean.setDataType(ElogUtils.getEnumFromString(DateTypeEnum.class, tableColumnBean.getDataTypeStr())); + tableColumnBean.setNullable("YES".equalsIgnoreCase(tableColumnBean.getIsNullableStr())); + oldcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean); + }); + // 只增加或者修改,不删除字段 + for(String key : newcolMap.keySet()) { + if(oldcolMap.containsKey(key)) { + // 字段变动则修改 + if(!(newcolMap.get(key).toSql()).equals(oldcolMap.get(key).toSql())) + this.modifyColumn(tableName, newcolMap.get(key)); + } else { + this.addColumn(tableName, newcolMap.get(key)); + } + } + } + + } + + private void createTable(String tableName, List columns) { + StringBuilder sb = new StringBuilder("create table ").append(tableName).append(" ( "); + sb.append(columns.stream().map( bean -> bean.toSql()).collect(Collectors.joining(","))); + sb.append(")"); + logger.info("创建sql:{}",sb.toString()); + tableCheckerMapper.createElogTable(sb.toString()); + } + + private void addColumn(String tableName, TableColumnBean tableColumnBean) { + StringBuilder sb = new StringBuilder("alter table ") + .append(tableName).append(" ") + .append(" add ") + .append(" column ") + .append(tableColumnBean.toSql()); + logger.info("新增字段sql:{}",sb.toString()); + tableCheckerMapper.createElogTable(sb.toString()); + } + + private void modifyColumn(String tableName, TableColumnBean tableColumnBean) { + StringBuilder sb = new StringBuilder("alter table ") + .append(tableName).append(" ") + .append(" modify ") + .append(" column ") + .append(tableColumnBean.toSql()); + logger.info("修改字段sql:{}",sb.toString()); + tableCheckerMapper.createElogTable(sb.toString()); + } +} diff --git a/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java b/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java new file mode 100644 index 000000000..4a5c44d7b --- /dev/null +++ b/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java @@ -0,0 +1,40 @@ +package com.engine.salary.elog.annotation.handle; + +import com.weaver.common.elog.annotation.LoggerTarget; +import com.weaver.common.elog.util.LoggerTemplate; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Component; + +import java.util.Map; + + +/** + * @ClassName: LoggerTargetHandler + * @Description 从Spring扫描到的类中获取到LoggerTarget自定义注解类设置function属性 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ + +@Component +public class LoggerTargetHandler implements CommandLineRunner { + + @Autowired + ApplicationContext applicationContext; + + @Override + public void run(String... args) throws Exception { + Map loggtemplateMap = applicationContext.getBeansWithAnnotation(LoggerTarget.class); + + for(Object obj : loggtemplateMap.values()) { + if(obj instanceof LoggerTemplate) { + LoggerTarget loggerTarget = obj.getClass().getAnnotation(LoggerTarget.class); + ((LoggerTemplate) obj).setFunction(loggerTarget.function()); + ((LoggerTemplate) obj).setModule(StringUtils.isNotEmpty(loggerTarget.value()) ? loggerTarget.value() : loggerTarget.module()); + } + + } + } +} diff --git a/src/com/engine/salary/elog/dto/CancelContext.java b/src/com/engine/salary/elog/dto/CancelContext.java new file mode 100644 index 000000000..1c9771b69 --- /dev/null +++ b/src/com/engine/salary/elog/dto/CancelContext.java @@ -0,0 +1,25 @@ +package com.engine.salary.elog.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @ClassName: CancelContext + * @Description 撤销实体类 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +@ApiModel("撤销实体类") +public class CancelContext { + + @ApiModelProperty("撤销参数") + private T cancleParams; + + public T getCancleParams() { + return cancleParams; + } + + public void setCancleParams(T cancleParams) { + this.cancleParams = cancleParams; + } +} diff --git a/src/com/engine/salary/elog/dto/DateTypeEnum.java b/src/com/engine/salary/elog/dto/DateTypeEnum.java new file mode 100644 index 000000000..9833cfa86 --- /dev/null +++ b/src/com/engine/salary/elog/dto/DateTypeEnum.java @@ -0,0 +1,16 @@ +package com.engine.salary.elog.dto; + +public enum DateTypeEnum { + VARCHAR, + BIGINT, + INT, + DATETIME, + TEXT, + LONGTEXT, + DOUBLE, + DECIMAL, + TINYINT, + FLOAT; + + +} diff --git a/src/com/engine/salary/elog/dto/LoggerContext.java b/src/com/engine/salary/elog/dto/LoggerContext.java new file mode 100644 index 000000000..248ce45d8 --- /dev/null +++ b/src/com/engine/salary/elog/dto/LoggerContext.java @@ -0,0 +1,408 @@ +package com.engine.salary.elog.dto; + +import com.engine.salary.elog.annotation.ElogField; +import com.engine.salary.elog.annotation.ElogTable; +import com.engine.salary.elog.util.ElogUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: LoggerContext + * @Description 日志实体类。支持通过泛型扩展日志字段 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +@ElogTable(module = ElogUtils.BASE_TABLE) +@ApiModel("日志实体类") +public class LoggerContext { + @ElogField(comment = "ID", dataType = DateTypeEnum.VARCHAR, isKey = true, isNull = false) + @ApiModelProperty("日志ID") + private long id; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 36,comment = "日志UUID") + @ApiModelProperty("日志UUID") + private String uuid; + + @ApiModelProperty("自定义日志字段信息") + private T customInfo; + @ElogField(dataType = DateTypeEnum.DATETIME,comment = "操作时间") + @ApiModelProperty("操作时间") + private Date date; + + @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "终端信息") + @ApiModelProperty("终端信息") + private String device; + + @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "操作人") + @ApiModelProperty("操作人") + private String operator; + + @ElogField(dataType = DateTypeEnum.VARCHAR,length = 100,comment = "操作人姓名") + @ApiModelProperty("操作人姓名") + private String operatorName; + + @ElogField(dataType = DateTypeEnum.VARCHAR,length = 10,comment = "租户id") + @ApiModelProperty("租户id") + private String tenant_key; + + /** + * 要操作的对象在表中的主键值 + */ + @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "操作目标id") + @ApiModelProperty("操作目标id") + private String targetId; + + @ElogField(dataType = DateTypeEnum.TEXT ,comment = "操作目标名称") + @ApiModelProperty("操作目标名称(用于显示)") + private String targetName; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "模块") + @ApiModelProperty("目标对象类型(大分类,模块,服务)") + private String moduleName;// 模块 + + /** + * 目标对象类型(小分类,模块/服务下的子功能。子项目) + * 数据存储是以模块名_子项目名作为最基本的存储单元 + * 如果是子项目下的子项目 命名为:子项目名_子项目名_子项目名(全部小写) + */ + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "服务(方法)") + @ApiModelProperty("目标对象类型(小分类,模块/服务下的子功能。子项目)") + private String functionName; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "访问接口名") + @ApiModelProperty("访问接口名") + private String interfaceName; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "操作类型") + @ApiModelProperty("操作类型(增删改查等)") + private String operateType; + + @ElogField(dataType = DateTypeEnum.TEXT,comment = "操作类型") + @ApiModelProperty("操作类型名称") + private String operateTypeName; + + /** + * 每个TableChangeBean 为一张表,支持记录多张表的前后值 + */ + @ApiModelProperty("修改前、后的值") + private List changeValues;// 操作表名,[字段名,值] + + @ElogField(dataType = DateTypeEnum.TEXT,comment = "操作类型") + @ApiModelProperty("操作详细说明") + private String operatedesc; + + @ApiModelProperty("涉及的相关参数") + private Map params; + + /*@ApiModelProperty("主日志") + private String mainId;//当作为主表,belongMainId不赋值 + + @ApiModelProperty("从表日志") + private String belongMainId;*/ + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "操作IP") + @ApiModelProperty("操作IP") + private String clientIp; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "分组") + @ApiModelProperty("分组") + private String groupId; + + /*@ApiModelProperty("是否明显表") + private boolean isDetail;*/ + + @ElogField(dataType = DateTypeEnum.TEXT, comment = "分组标题") + @ApiModelProperty("分组标题") + private int groupNameLabel; + + @ApiModelProperty("重做业务接口") + private String redoService; + + @ElogField(dataType = DateTypeEnum.LONGTEXT, comment = "重做参数") + @ApiModelProperty("重做参数") + private RedoContext redoContext; + + @ElogField(dataType = DateTypeEnum.VARCHAR, length = 200, comment = "撤销业务接口") + @ApiModelProperty("撤销业务接口") + private String cancelService; + + @ElogField(dataType = DateTypeEnum.LONGTEXT, comment = "撤销参数") + @ApiModelProperty("撤销参数") + private CancelContext cancelContext; + + @ApiModelProperty("日志明细列表(值变化列表-自动赋值、或者自定义字段)") + private List detailContexts; + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public T getCustomInfo() { + return customInfo; + } + + public void setCustomInfo(T customInfo) { + this.customInfo = customInfo; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public String getDevice() { + return device; + } + + public void setDevice(String device) { + this.device = device; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public String getTenant_key() { + return tenant_key; + } + + public void setTenant_key(String tenant_key) { + this.tenant_key = tenant_key; + } + + public String getTargetId() { + return targetId; + } + + public void setTargetId(String targetId) { + this.targetId = targetId; + } + + public String getTargetName() { + return targetName; + } + + public void setTargetName(String targetName) { + this.targetName = targetName; + } + + public String getModuleName() { + return moduleName; + } + + public void setModuleName(String moduleName) { + this.moduleName = moduleName; + } + + public String getFunctionName() { + return functionName; + } + + public void setFunctionName(String functionName) { + this.functionName = functionName; + } + + public String getInterfaceName() { + return interfaceName; + } + + public void setInterfaceName(String interfaceName) { + this.interfaceName = interfaceName; + } + + public String getOperateType() { + return operateType; + } + + public void setOperateType(String operateType) { + this.operateType = operateType; + } + + public List getChangeValues() { + return changeValues; + } + + public void setChangeValues(List changeValues) { + this.changeValues = changeValues; + } + + public String getOperatedesc() { + return operatedesc; + } + + public void setOperatedesc(String operatedesc) { + this.operatedesc = operatedesc; + } + + public Map getParams() { + return params; + } + + public void setParams(Map params) { + this.params = params; + } + + /*public String getMainId() { + return mainId; + } + + public void setMainId(String mainId) { + this.mainId = mainId; + } + + public String getBelongMainId() { + return belongMainId; + } + + public void setBelongMainId(String belongMainId) { + this.belongMainId = belongMainId; + }*/ + + public String getClientIp() { + return clientIp; + } + + public void setClientIp(String clientIp) { + this.clientIp = clientIp; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + +/* public boolean isDetail() { + return isDetail; + } + + public void setDetail(boolean detail) { + isDetail = detail; + }*/ + + public int getGroupNameLabel() { + return groupNameLabel; + } + + public void setGroupNameLabel(int groupNameLabel) { + this.groupNameLabel = groupNameLabel; + } + + public String getRedoService() { + return redoService; + } + + public void setRedoService(String redoService) { + this.redoService = redoService; + } + + public RedoContext getRedoContext() { + return redoContext; + } + + public void setRedoContext(RedoContext redoContext) { + this.redoContext = redoContext; + } + + public CancelContext getCancelContext() { + return cancelContext; + } + + public void setCancelContext(CancelContext cancelContext) { + this.cancelContext = cancelContext; + } + + public String getCancelService() { + return cancelService; + } + public void setCancelService(String cancelService) { + this.cancelService = cancelService; + } + + public List getDetailContexts() { + return detailContexts; + } + + public void setDetailContexts(List detailContexts) { + this.detailContexts = detailContexts; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + public void setOldValues(Object object) { + TableChangeBean bean = new TableChangeBean(); + bean.setOldValue(object); + getChangeList().add(bean); + } + + public void setOldValueList(List list) { + if(list != null) + list.stream().forEach(obj -> setOldValues(obj)); + } + + public void setNewValueList(List list) { + if(list != null) + list.stream().forEach(obj -> setNewValues(obj)); + } + + public void setNewValues(Object object) { + List list = getChangeList(); + + boolean handled = false; + for(TableChangeBean bean : list) { + if(bean.getNewValue() == null) { + bean.setNewValue(object); + handled = true; + break; + } + } + if(!handled) { + TableChangeBean bean = new TableChangeBean(); + bean.setOldValue(object); + list.add(bean); + } + } + + public List getChangeList() { + + if(this.changeValues == null) { + this.changeValues = new ArrayList<>(); + } + + return this.changeValues; + + } + + public String getOperateTypeName() { + return operateTypeName; + } + + public void setOperateTypeName(String operateTypeName) { + this.operateTypeName = operateTypeName; + } +} + diff --git a/src/com/engine/salary/elog/dto/LoggerDetailContext.java b/src/com/engine/salary/elog/dto/LoggerDetailContext.java new file mode 100644 index 000000000..8dd6ec7d9 --- /dev/null +++ b/src/com/engine/salary/elog/dto/LoggerDetailContext.java @@ -0,0 +1,102 @@ +package com.engine.salary.elog.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @ClassName: ValueChangeBean + * @Description 值变化实体类(自动将表字段值变更类转换为该类) + * @Author tanghj + * @Date 2021/3/9 11:06 + */ +@ApiModel("值变化实体类") +public class LoggerDetailContext { + + @ApiModelProperty("同一个bean转换的数据,uuid相同,作为区分标识") + private String uuid; + + @ApiModelProperty("表名") + private String tableName; + + @ApiModelProperty("字段名") + private String fieldName; + + @ApiModelProperty("更新后的值") + private String newValue; + + @ApiModelProperty("更新前的值") + private String oldValue; + + @ApiModelProperty("字段描述") + private String fieldDesc; + + @ApiModelProperty("字段展示顺序") + private int showorder; + + @ApiModelProperty("自定义字段") + private T customDetailInfo; + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getNewValue() { + return newValue; + } + + public void setNewValue(String newValue) { + this.newValue = newValue; + } + + public String getOldValue() { + return oldValue; + } + + public void setOldValue(String oldValue) { + this.oldValue = oldValue; + } + + public String getFieldDesc() { + return fieldDesc; + } + + public void setFieldDesc(String fieldDesc) { + this.fieldDesc = fieldDesc; + } + + public int getShoworder() { + return showorder; + } + + public void setShoworder(int showorder) { + this.showorder = showorder; + } + + public T getCustomDetailInfo() { + return customDetailInfo; + } + + public void setCustomDetailInfo(T customDetailInfo) { + this.customDetailInfo = customDetailInfo; + } +} diff --git a/src/com/engine/salary/elog/dto/RedoContext.java b/src/com/engine/salary/elog/dto/RedoContext.java new file mode 100644 index 000000000..749643aed --- /dev/null +++ b/src/com/engine/salary/elog/dto/RedoContext.java @@ -0,0 +1,24 @@ +package com.engine.salary.elog.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @ClassName: RedoContext + * @Description 重做实体类 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +@ApiModel("重做实体类") +public class RedoContext { + @ApiModelProperty("重做参数") + private T redoParams; + + public T getRedoParams() { + return redoParams; + } + + public void setRedoParams(T redoParams) { + this.redoParams = redoParams; + } +} diff --git a/src/com/engine/salary/elog/dto/TableChangeBean.java b/src/com/engine/salary/elog/dto/TableChangeBean.java new file mode 100644 index 000000000..86cfdb0c3 --- /dev/null +++ b/src/com/engine/salary/elog/dto/TableChangeBean.java @@ -0,0 +1,53 @@ +package com.engine.salary.elog.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @ClassName: TableChangeBean + * @Description 表更新前后值类 + * @Author tanghj + * @Date 2021/3/8 15:58 + */ +@ApiModel("表更新前后值类") +public class TableChangeBean { + + @ApiModelProperty("表名") + private String tableName; + + /** + * 泛型必须是具体的实体类 + */ + @ApiModelProperty("更新前的值") + private T oldValue; + + /** + * 泛型必须是具体的实体类 + */ + @ApiModelProperty("更新后的值") + private T newValue; + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public T getOldValue() { + return oldValue; + } + + public void setOldValue(T oldValue) { + this.oldValue = oldValue; + } + + public T getNewValue() { + return newValue; + } + + public void setNewValue(T newValue) { + this.newValue = newValue; + } +} diff --git a/src/com/engine/salary/elog/dto/TableColumnBean.java b/src/com/engine/salary/elog/dto/TableColumnBean.java new file mode 100644 index 000000000..e4c635cd0 --- /dev/null +++ b/src/com/engine/salary/elog/dto/TableColumnBean.java @@ -0,0 +1,155 @@ +package com.engine.salary.elog.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @ClassName: TableColumnBean + * @Description 表字段类 + * @Author tanghj + * @Date 2021/3/12 11:44 + */ +@ApiModel("表字段类") +public class TableColumnBean { + + @ApiModelProperty("列名") + private String columnName; + + /** + * varchar(20) + */ + @ApiModelProperty("数据类型") + private String columnType; + + @ApiModelProperty("字段类型-字符串") + private String dataTypeStr; + + @ApiModelProperty("字段类型") + private DateTypeEnum dataType; + + @ApiModelProperty("长度") + private long fieldLength; + + @ApiModelProperty("是否为空") + private boolean isNullable; + + @ApiModelProperty("是否为空-字符串") + private String isNullableStr; + + @ApiModelProperty("默认值") + private Object columnDefault; + + @ApiModelProperty("备注") + private String columnComment; + + public String getColumnName() { + return columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public String getColumnType() { + return columnType; + } + + public void setColumnType(String columnType) { + this.columnType = columnType; + } + + public DateTypeEnum getDataType() { + return dataType; + } + + public void setDataType(DateTypeEnum dataType) { + this.dataType = dataType; + } + + public long getFieldLength() { + return fieldLength; + } + + public void setFieldLength(long fieldLength) { + this.fieldLength = fieldLength; + } + + public boolean isNullable() { + return isNullable; + } + + public void setNullable(boolean nullable) { + isNullable = nullable; + } + + public Object getColumnDefault() { + return columnDefault; + } + + public void setColumnDefault(Object columnDefault) { + this.columnDefault = columnDefault; + } + + public String getColumnComment() { + return columnComment; + } + + public void setColumnComment(String columnComment) { + this.columnComment = columnComment; + } + + public String getDataTypeStr() { + return dataTypeStr; + } + + public void setDataTypeStr(String dataTypeStr) { + this.dataTypeStr = dataTypeStr; + } + + public String getIsNullableStr() { + return isNullableStr; + } + + public void setIsNullableStr(String isNullableStr) { + this.isNullableStr = isNullableStr; + } + + public boolean equals(TableColumnBean tableColumnBean) { + + return this.toSql().equals(tableColumnBean.toSql()); + } + + public String toSql() { + + StringBuilder sb = new StringBuilder(this.columnName.toLowerCase()).append(" "); + + if (this.dataType == null) { + return "类型为空"; + } + switch (this.dataType) { + case BIGINT: + case INT: + case TEXT: + case LONGTEXT: + case DATETIME: + case FLOAT: + case TINYINT: + case DOUBLE: + sb.append(this.dataType.name().toLowerCase()).append(" "); + break; + case VARCHAR: + sb.append(this.dataType.name().toLowerCase()).append("(").append(this.fieldLength).append(") "); + break; + case DECIMAL: + long length = (this.fieldLength < 0 || this.fieldLength > 38) ? 0 : this.fieldLength; + sb.append(this.dataType.name().toLowerCase()).append("(").append(38 - length).append(",").append(length).append(") "); + break; + default: + sb.append("varchar").append("(").append(10).append(") "); + } + + sb.append("comment ").append("'").append(this.columnComment).append("' "); + + return sb.toString(); + } +} diff --git a/src/com/engine/salary/elog/util/ElogUtils.java b/src/com/engine/salary/elog/util/ElogUtils.java new file mode 100644 index 000000000..d2203f7ab --- /dev/null +++ b/src/com/engine/salary/elog/util/ElogUtils.java @@ -0,0 +1,50 @@ +package com.engine.salary.elog.util; + +import com.engine.salary.elog.dto.DateTypeEnum; + +/** + * @ClassName: ElogUtils + * @Description TODO + * @Author tanghj + * @Date 2021/3/12 14:17 + */ +public class ElogUtils { + + private static final String TABLE_SPACER = "_"; + private static final String TABLE_SUFFIX = "logs"; + private static final String DETAIL_TABLE_SUFFIX = "detail"; + public static final String BASE_TABLE = "BASE_ELOG_TABLE"; + + + public static String getTableName(String module, String function) { + return getTableName(module, function, false); + } + + public static String getTableName(String module, String function, boolean isDetail){ + + return module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); + } + + /** + * String 转枚举 + * @param c + * @param string + * @param + * @return + */ + public static > T getEnumFromString(Class c, String string) { + if (c != null && string != null) { + try { + return Enum.valueOf(c, string.trim().toUpperCase()); + } catch (IllegalArgumentException ex) { + } + } + return null; + } + + public static void main(String[] args) { + System.out.println(DateTypeEnum.BIGINT.name()); + DateTypeEnum columnTypeEnum = getEnumFromString(DateTypeEnum.class, "varchar"); + System.out.println(columnTypeEnum.equals(DateTypeEnum.VARCHAR)); + } +} diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java new file mode 100644 index 000000000..1041e9375 --- /dev/null +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -0,0 +1,164 @@ +package com.engine.salary.elog.util; + +import com.alibaba.fastjson.JSONObject; +import com.weaver.common.async.bean.AsyncBean; +import com.weaver.common.async.producer.client.AsyncClient; +import com.weaver.common.elog.dto.LoggerContext; +import com.weaver.common.elog.dto.LoggerDetailContext; +import com.weaver.common.elog.dto.TableChangeBean; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.beans.factory.annotation.Autowired; + +import java.lang.reflect.Field; +import java.util.*; + +/** + * @ClassName: LoggerTemplate + * @Description 日志基本功能类 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +public class LoggerTemplate { + protected String function = "common"; + + protected String module; + + protected String logCenterQueue = "Elog_cneterlogQueue"; + + protected String localQueue; + + @Autowired + protected AsyncClient asyncClient; + /** + * 写入日志消息队列 + * @param context 日志实体 + */ + public void write(LoggerContext context){ + this.write(context, true); + } + + /** + * 写入日志消息队列 + * @param context 日志实体 + * @param isLocal true 存储本地, false不存储本地 + */ + public void write(LoggerContext context, boolean isLocal){ + AsyncBean asyncBean = new AsyncBean<>(); + handleContext(context); + asyncBean.setMessage(context); + asyncBean.setQueue(logCenterQueue); + asyncClient.send(asyncBean); + if(isLocal) { + asyncBean.setQueue(localQueue); + asyncClient.send(asyncBean); + } + } + + private void handleContext(LoggerContext context) { + context.setModuleName(module); + context.setFunctionName(function); + + List changeBeans = context.getChangeValues(); + + List valueChangeList = new ArrayList<>(); + int showOrder = 0; + if(changeBeans != null) + for(TableChangeBean changeBean : changeBeans) { + if(changeBean != null && (changeBean.getNewValue() != null || changeBean.getOldValue() != null)) { + ApiModel apiModel = null; + JSONObject newJo = new JSONObject(); + JSONObject oldJo = new JSONObject(); + JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean)); + if(changeBean.getNewValue() != null) { + apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); + newJo = valueChange.getJSONObject("newValue"); + } else { + apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); + } + if(changeBean.getOldValue() != null) { + oldJo = valueChange.getJSONObject("oldValue"); + } + if(apiModel != null) { + Field[] fields = changeBean.getNewValue().getClass().getDeclaredFields(); + for(Field field : fields) { + ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(field.getName()); + valueChangeBean.setFieldDesc(apiModelProperty.value()); + valueChangeBean.setNewValue(newJo.getString(field.getName())); + valueChangeBean.setOldValue(oldJo.getString(field.getName())); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } + } else { + Set keys = new HashSet<>(); + for(String key : newJo.keySet()) { + keys.add(key); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(key); + valueChangeBean.setFieldDesc(key); + valueChangeBean.setNewValue(newJo.getString(key)); + valueChangeBean.setOldValue(oldJo.getString(key)); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } + for(String key : oldJo.keySet()) { + if(keys.contains(key)) + continue; + keys.add(key); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(key); + valueChangeBean.setFieldDesc(key); + valueChangeBean.setNewValue(newJo.getString(key)); + valueChangeBean.setOldValue(oldJo.getString(key)); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } + } + } + } + + if(valueChangeList.size() > 0) + context.setDetailContexts(valueChangeList); + } + + public String getFunction() { + return function; + } + + public void setFunction(String function) { + this.function = function; + } + + public String getModule() { + return module; + } + + /** + * 获取日志实体类 + * @return + */ + public LoggerContext getContext() { + + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUuid(UUID.randomUUID().toString().replace("-","")); + loggerContext.setModuleName(this.module); + loggerContext.setFunctionName(this.function); + + return loggerContext; + + } + + public void setModule(String module) { + this.localQueue = module + "LocalQueue"; + this.module = module; + } + + public void setAsyncClient(AsyncClient asyncClient) { + this.asyncClient = asyncClient; + } +} diff --git a/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java b/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java new file mode 100644 index 000000000..14ae29945 --- /dev/null +++ b/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java @@ -0,0 +1,21 @@ +package com.engine.salary.elog.util; + +/** + * @ClassName: LoggerTemplateBuilder + * @Description 日志基本类构造器 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +public class LoggerTemplateBuilder { + + public static LoggerTemplate build(String module){ + return build(module, "common"); + } + public static LoggerTemplate build(String module, String function){ + LoggerTemplate loggerTemplate = new LoggerTemplate(); + loggerTemplate.setFunction(function); + loggerTemplate.setModule(module); + + return loggerTemplate; + } +} From a5eb86ab068b7f5f36305be0e1a6e9eaad7f1303 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 21 Dec 2023 13:33:21 +0800 Subject: [PATCH 020/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E7=BA=BF=E4=B8=8B?= =?UTF-8?q?=E5=AF=B9=E6=AF=94=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E9=80=82=E9=85=8D=E7=A6=8F=E5=88=A9=E5=9F=BA?= =?UTF-8?q?=E6=95=B0=E4=B8=AA=E4=BA=BA=E5=92=8C=E5=85=AC=E5=8F=B8=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIAccountServiceImpl.java | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 1385b84d7..cbed96243 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -2540,33 +2540,33 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人) for (ICategoryPO po : socialWelPerList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialPer"); + + SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "socialPer"); } //住房公积金个人、补充住房公积金个人 for (ICategoryPO po : fundWelPerList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundPer"); + + SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "fundPer"); } //其他个人(比如企业年金个人) for (ICategoryPO po : otherWelPerList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherPer"); + + SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "otherPer"); } //社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位) for (ICategoryPO po : socialWelComList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialCom"); + + SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "socialCom"); } //住房公积金单位、补充住房公积金单位 for (ICategoryPO po : fundWelComList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundCom"); + + SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "fundCom"); } //其他单位(比如企业年金单位) for (ICategoryPO po : otherWelComList) { result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage())) - + SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherCom"); + + SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "otherCom"); } return result; @@ -2621,11 +2621,12 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { String billMonth = importParam.getBillMonth(); - Map welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder() - .billMonth(billMonth) - .paymentOrganization(importParam.getPaymentOrganization()) - .paymentStatus(PaymentStatusEnum.COMMON.getValue()) - .build()); +// Map welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder() +// .billMonth(billMonth) +// .paymentOrganization(importParam.getPaymentOrganization()) +// .paymentStatus(PaymentStatusEnum.COMMON.getValue()) +// .build()); + Map welColumnNameCodeMap = new HashMap<>(); //存储待更新的InsuranceAccountDetailPO数据 List addCompareList = new ArrayList<>(); //记录待删除hrsa_excel_bill_detail.id @@ -2647,6 +2648,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (taxAgentPoList.size() == 1) { paymentOrganization = taxAgentPoList.get(0).getId(); + welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder() + .billMonth(billMonth) + .paymentOrganization(paymentOrganization.toString()) + .paymentStatus(PaymentStatusEnum.COMMON.getValue()) + .build()); } else { isError = true; Map errorMessageMap = Maps.newHashMap(); From 83a41da11d5c5708c9c57f666797efcedfb8a494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 21 Dec 2023 14:30:21 +0800 Subject: [PATCH 021/169] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/elog/annotation/ElogTable.java | 2 +- .../salary/elog/annotation/LoggerTarget.java | 6 +- .../elog/annotation/handle/ElogHandler.java | 354 +++++++++--------- .../annotation/handle/ElogTableScanner.java | 46 +-- .../handle/LoggerTargetHandler.java | 78 ++-- .../elog/async/LoggerMessageListener.java | 31 ++ .../engine/salary/elog/config/ELogCache.java | 25 ++ .../salary/elog/config/ELogTableChecker.java | 44 +++ .../service/ApplicationContextProvider.java | 67 ++++ .../salary/elog/service/LocalElogService.java | 74 ++++ .../salary/elog/util/LoggerTemplate.java | 142 ++++--- .../formlua/entity/parameter/ExcelFuncs.java | 2 +- .../entity/parameter/FuncDescUtil.java | 2 +- .../mapper/elog/LocalElogDaoMapper.java | 36 ++ .../salary/mapper/elog/LocalElogDaoMapper.xml | 41 ++ .../mapper/elog/QueryCurretValusMapper.java | 8 + .../mapper/elog/QueryCurretValusMapper.xml | 9 + .../mapper/elog/TableCheckerMapper.java | 20 + .../salary/mapper/elog/TableCheckerMapper.xml | 79 ++++ 19 files changed, 735 insertions(+), 331 deletions(-) create mode 100644 src/com/engine/salary/elog/async/LoggerMessageListener.java create mode 100644 src/com/engine/salary/elog/config/ELogCache.java create mode 100644 src/com/engine/salary/elog/config/ELogTableChecker.java create mode 100644 src/com/engine/salary/elog/service/ApplicationContextProvider.java create mode 100644 src/com/engine/salary/elog/service/LocalElogService.java create mode 100644 src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java create mode 100644 src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml create mode 100644 src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java create mode 100644 src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml create mode 100644 src/com/engine/salary/mapper/elog/TableCheckerMapper.java create mode 100644 src/com/engine/salary/mapper/elog/TableCheckerMapper.xml diff --git a/src/com/engine/salary/elog/annotation/ElogTable.java b/src/com/engine/salary/elog/annotation/ElogTable.java index 28f5f853b..a236b5b6e 100644 --- a/src/com/engine/salary/elog/annotation/ElogTable.java +++ b/src/com/engine/salary/elog/annotation/ElogTable.java @@ -7,7 +7,7 @@ import java.lang.annotation.*; @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) -@Component + public @interface ElogTable { String module(); diff --git a/src/com/engine/salary/elog/annotation/LoggerTarget.java b/src/com/engine/salary/elog/annotation/LoggerTarget.java index c1e337ca3..701d4f8e6 100644 --- a/src/com/engine/salary/elog/annotation/LoggerTarget.java +++ b/src/com/engine/salary/elog/annotation/LoggerTarget.java @@ -1,7 +1,5 @@ package com.engine.salary.elog.annotation; -import org.springframework.core.annotation.AliasFor; - import java.lang.annotation.*; /** @@ -14,10 +12,10 @@ import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface LoggerTarget { - @AliasFor("module") +// @AliasFor("module") String value() default ""; - @AliasFor("value") +// @AliasFor("value") String module() default ""; String function() default "common"; diff --git a/src/com/engine/salary/elog/annotation/handle/ElogHandler.java b/src/com/engine/salary/elog/annotation/handle/ElogHandler.java index 815191606..7cb1dda25 100644 --- a/src/com/engine/salary/elog/annotation/handle/ElogHandler.java +++ b/src/com/engine/salary/elog/annotation/handle/ElogHandler.java @@ -1,177 +1,177 @@ -package com.engine.salary.elog.annotation.handle; - -import com.weaver.common.async.producer.client.AsyncClient; -import com.weaver.common.distribution.genid.IdGenerator; -import com.weaver.common.elog.annotation.Elog; -import com.weaver.common.elog.annotation.ElogPrimaryKey; -import com.weaver.common.elog.dao.QueryCurretValusMapper; -import com.weaver.common.elog.dto.LoggerContext; -import com.weaver.common.elog.util.LoggerTemplate; -import org.apache.commons.lang3.StringUtils; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.Signature; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Component; -import org.springframework.util.ReflectionUtils; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.util.Date; -import java.util.List; -import java.util.Map; - - -/** - * @ClassName: LoggerTargetHandler - * @Description 从Spring扫描到的类中获取到Elog自定义注解类设置function属性 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -@Aspect -@Component -public class ElogHandler { - - @Autowired - ApplicationContext applicationContext; - - @Autowired - protected AsyncClient asyncClient; - - @Autowired - QueryCurretValusMapper queryCurretValusMapper; - - /** - * 切面写入日志 - */ - @Pointcut("@annotation(com.weaver.common.elog.annotation.Elog)" ) - public void writeLog(){} - @Around("writeLog()") - public Object writeLog(ProceedingJoinPoint pjp){ - Object[] args = pjp.getArgs(); - Signature signature = pjp.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - - Elog elog = method.getAnnotation(Elog.class); - String moduleName = elog.module(); - String funtionName = elog.function(); - String operateType = elog.operateType(); - String operateTypeName = elog.operateTypeName(); - boolean isLocal = elog.isLocal(); - Annotation[][] annos = method.getParameterAnnotations(); - - Object id = null; - int keyPosition = -1; - int index = 0; - - Class idClass = null; - // 获取主键id注解 - for(Annotation[] anno : annos) { - if(anno.length > 0) { - for(Annotation annotation : anno) { - if(annotation instanceof ElogPrimaryKey) { - idClass = method.getParameters()[index].getType(); - id = args[index]; - if(StringUtils.isEmpty(id+"")) { - id = idClass.cast(IdGenerator.generate() + ""); - } - keyPosition = index; - break; - } - } - } - index ++; - } - - LoggerContext loggerContext = null; - // 获取日志实体类 - for(Object arg: args) { - if(arg instanceof LoggerContext) { - loggerContext = (LoggerContext) arg; - break; - } - } - - if(loggerContext == null) { - loggerContext = new LoggerContext(); - } - - // 日志实体类的初始化 - // loggerContext.setOperateType("UPDATE"); - loggerContext.setFunctionName(funtionName); - loggerContext.setModuleName(moduleName); - loggerContext.setOperateType(operateType); - loggerContext.setOperateTypeName(operateTypeName); - loggerContext.setDate(new Date()); - loggerContext.setDevice("IOS"); - - String sql = elog.sql(); - String infoMethod = elog.infoMethod(); - - boolean isSql = false; - boolean isMethod = false; - Object currentClass = null; - Method infoMtd = null; - if(StringUtils.isNotEmpty(id+"")) { - if(StringUtils.isNotEmpty(sql)) { - isSql = true; - Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); - loggerContext.setOldValues(oldValue); - } else if(StringUtils.isNotEmpty(infoMethod)){ - isMethod = true; - currentClass = applicationContext.getBean(pjp.getTarget().getClass()); - // 获取方法 - infoMtd = ReflectionUtils.findMethod(pjp.getTarget().getClass(),infoMethod, idClass); - - // todo 为空的情况加异常提醒 - // 反射执行方法 - Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); - if(res != null) { - if(res instanceof List) { - loggerContext.setOldValueList((List) res); - } else { - loggerContext.setOldValues(res); - } - - } - } - } - - LoggerTemplate loggerTemplate = new LoggerTemplate(); - loggerTemplate.setFunction(funtionName); - loggerTemplate.setModule(moduleName); - loggerTemplate.setAsyncClient(asyncClient); - - Object result = null; - try { - args[keyPosition] = id; - result = pjp.proceed(args); - } catch (Throwable throwable) { - throwable.printStackTrace(); - } - if(isSql) { - Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); - loggerContext.setNewValues(oldValue); - } else if(isMethod) { - Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); - if(res != null) { - if(res instanceof List) { - loggerContext.setNewValueList((List) res); - } else { - loggerContext.setNewValues(res); - } - } - } - if(isLocal) - loggerTemplate.write(loggerContext); - else - loggerTemplate.write(loggerContext,false); - return result; - - } -} +//package com.engine.salary.elog.annotation.handle; +// +//import com.weaver.common.async.producer.client.AsyncClient; +//import com.weaver.common.distribution.genid.IdGenerator; +//import com.weaver.common.elog.annotation.Elog; +//import com.weaver.common.elog.annotation.ElogPrimaryKey; +//import com.weaver.common.elog.dao.QueryCurretValusMapper; +//import com.weaver.common.elog.dto.LoggerContext; +//import com.weaver.common.elog.util.LoggerTemplate; +//import org.apache.commons.lang3.StringUtils; +//import org.aspectj.lang.ProceedingJoinPoint; +//import org.aspectj.lang.Signature; +//import org.aspectj.lang.annotation.Around; +//import org.aspectj.lang.annotation.Aspect; +//import org.aspectj.lang.annotation.Pointcut; +//import org.aspectj.lang.reflect.MethodSignature; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.ApplicationContext; +//import org.springframework.stereotype.Component; +//import org.springframework.util.ReflectionUtils; +// +//import java.lang.annotation.Annotation; +//import java.lang.reflect.Method; +//import java.util.Date; +//import java.util.List; +//import java.util.Map; +// +// +///** +// * @ClassName: LoggerTargetHandler +// * @Description 从Spring扫描到的类中获取到Elog自定义注解类设置function属性 +// * @Author tanghj +// * @Date 2021/2/10 14:18 +// */ +//@Aspect +// +//public class ElogHandler { +// +// @Autowired +// ApplicationContext applicationContext; +// +// @Autowired +// protected AsyncClient asyncClient; +// +// @Autowired +// QueryCurretValusMapper queryCurretValusMapper; +// +// /** +// * 切面写入日志 +// */ +// @Pointcut("@annotation(com.weaver.common.elog.annotation.Elog)" ) +// public void writeLog(){} +// @Around("writeLog()") +// public Object writeLog(ProceedingJoinPoint pjp){ +// Object[] args = pjp.getArgs(); +// Signature signature = pjp.getSignature(); +// MethodSignature methodSignature = (MethodSignature) signature; +// Method method = methodSignature.getMethod(); +// +// Elog elog = method.getAnnotation(Elog.class); +// String moduleName = elog.module(); +// String funtionName = elog.function(); +// String operateType = elog.operateType(); +// String operateTypeName = elog.operateTypeName(); +// boolean isLocal = elog.isLocal(); +// Annotation[][] annos = method.getParameterAnnotations(); +// +// Object id = null; +// int keyPosition = -1; +// int index = 0; +// +// Class idClass = null; +// // 获取主键id注解 +// for(Annotation[] anno : annos) { +// if(anno.length > 0) { +// for(Annotation annotation : anno) { +// if(annotation instanceof ElogPrimaryKey) { +// idClass = method.getParameters()[index].getType(); +// id = args[index]; +// if(StringUtils.isEmpty(id+"")) { +// id = idClass.cast(IdGenerator.generate() + ""); +// } +// keyPosition = index; +// break; +// } +// } +// } +// index ++; +// } +// +// LoggerContext loggerContext = null; +// // 获取日志实体类 +// for(Object arg: args) { +// if(arg instanceof LoggerContext) { +// loggerContext = (LoggerContext) arg; +// break; +// } +// } +// +// if(loggerContext == null) { +// loggerContext = new LoggerContext(); +// } +// +// // 日志实体类的初始化 +// // loggerContext.setOperateType("UPDATE"); +// loggerContext.setFunctionName(funtionName); +// loggerContext.setModuleName(moduleName); +// loggerContext.setOperateType(operateType); +// loggerContext.setOperateTypeName(operateTypeName); +// loggerContext.setDate(new Date()); +// loggerContext.setDevice("IOS"); +// +// String sql = elog.sql(); +// String infoMethod = elog.infoMethod(); +// +// boolean isSql = false; +// boolean isMethod = false; +// Object currentClass = null; +// Method infoMtd = null; +// if(StringUtils.isNotEmpty(id+"")) { +// if(StringUtils.isNotEmpty(sql)) { +// isSql = true; +// Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); +// loggerContext.setOldValues(oldValue); +// } else if(StringUtils.isNotEmpty(infoMethod)){ +// isMethod = true; +// currentClass = applicationContext.getBean(pjp.getTarget().getClass()); +// // 获取方法 +// infoMtd = ReflectionUtils.findMethod(pjp.getTarget().getClass(),infoMethod, idClass); +// +// // todo 为空的情况加异常提醒 +// // 反射执行方法 +// Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); +// if(res != null) { +// if(res instanceof List) { +// loggerContext.setOldValueList((List) res); +// } else { +// loggerContext.setOldValues(res); +// } +// +// } +// } +// } +// +// LoggerTemplate loggerTemplate = new LoggerTemplate(); +// loggerTemplate.setFunction(funtionName); +// loggerTemplate.setModule(moduleName); +// loggerTemplate.setAsyncClient(asyncClient); +// +// Object result = null; +// try { +// args[keyPosition] = id; +// result = pjp.proceed(args); +// } catch (Throwable throwable) { +// throwable.printStackTrace(); +// } +// if(isSql) { +// Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); +// loggerContext.setNewValues(oldValue); +// } else if(isMethod) { +// Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); +// if(res != null) { +// if(res instanceof List) { +// loggerContext.setNewValueList((List) res); +// } else { +// loggerContext.setNewValues(res); +// } +// } +// } +// if(isLocal) +// loggerTemplate.write(loggerContext); +// else +// loggerTemplate.write(loggerContext,false); +// return result; +// +// } +//} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java index 2be2f35b6..be8abc439 100644 --- a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java +++ b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java @@ -2,19 +2,14 @@ package com.engine.salary.elog.annotation.handle; import com.engine.salary.elog.annotation.ElogField; import com.engine.salary.elog.annotation.ElogTable; +import com.engine.salary.elog.dto.DateTypeEnum; import com.engine.salary.elog.dto.TableColumnBean; import com.engine.salary.elog.util.ElogUtils; -import com.weaver.common.elog.dao.TableCheckerMapper; -import com.weaver.common.elog.dto.DateTypeEnum; import lombok.extern.slf4j.Slf4j; import org.reflections.Reflections; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.aop.support.AopUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import javax.annotation.Resource; import java.lang.reflect.Field; import java.util.*; import java.util.stream.Collectors; @@ -29,14 +24,10 @@ import java.util.stream.Collectors; public class ElogTableScanner { private Logger logger = LoggerFactory.getLogger(this.getClass()); - @Resource - private ApplicationContext applicationContext; +// private TableCheckerMapper tableCheckerMapper; - @Autowired - private TableCheckerMapper tableCheckerMapper; - - @Override - public void run(String... args) throws Exception { +// @Override + public void run() throws Exception { // todo 需要考虑集群下,控制一台机器来跑 scanElogTable(); @@ -45,9 +36,10 @@ public class ElogTableScanner { private void scanElogTable() { // todo 是否还需要扫描Elog(因为可能不需要本地存储) ELogDetailTable, - Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); - Reflections reflections = new Reflections("com.example.controller"); - Set> restController = reflections.getTypesAnnotatedWith(RestController.class); +// Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); + Reflections reflections = new Reflections("com.engine.salary.elog"); + Set> tableBeans = reflections.getTypesAnnotatedWith(ElogTable.class); + List baseColumns = new ArrayList<>(); @@ -67,18 +59,11 @@ public class ElogTableScanner { } - private Map> elogTableHandle(Map tableBeans, List baseColumns) { - - + private Map> elogTableHandle(Set> tableBeans, List baseColumns) { Map> tableMap = new HashMap<>(); - - - for (Map.Entry entry : tableBeans.entrySet()) {//遍历每个controller层 + for (Class aClass :tableBeans) {//遍历每个controller层 List list = new ArrayList<>(); - System.out.println(entry.getKey());//demo1Controller - Object value = entry.getValue(); - Class aClass = AopUtils.getTargetClass(value);//获取class ElogTable elogTable = aClass.getAnnotation(ElogTable.class); @@ -101,7 +86,6 @@ public class ElogTableScanner { list.add(tableColumnBean); } if(!ElogUtils.BASE_TABLE.equals(elogTable.module())) { - tableMap.put(ElogUtils.getTableName(elogTable.module(), elogTable.function()), list); } else { baseColumns.addAll(list); @@ -112,8 +96,8 @@ public class ElogTableScanner { } private void tableCheck(String tableName, List columns) { - - List oldColumns = tableCheckerMapper.getTableStructure(tableName); + List oldColumns = new ArrayList<>(); +// List oldColumns = tableCheckerMapper.getTableStructure(tableName); // 表不存在 if(oldColumns == null || oldColumns.size() == 0) { @@ -147,7 +131,7 @@ public class ElogTableScanner { sb.append(columns.stream().map( bean -> bean.toSql()).collect(Collectors.joining(","))); sb.append(")"); logger.info("创建sql:{}",sb.toString()); - tableCheckerMapper.createElogTable(sb.toString()); +// tableCheckerMapper.createElogTable(sb.toString()); } private void addColumn(String tableName, TableColumnBean tableColumnBean) { @@ -157,7 +141,7 @@ public class ElogTableScanner { .append(" column ") .append(tableColumnBean.toSql()); logger.info("新增字段sql:{}",sb.toString()); - tableCheckerMapper.createElogTable(sb.toString()); +// tableCheckerMapper.createElogTable(sb.toString()); } private void modifyColumn(String tableName, TableColumnBean tableColumnBean) { @@ -167,6 +151,6 @@ public class ElogTableScanner { .append(" column ") .append(tableColumnBean.toSql()); logger.info("修改字段sql:{}",sb.toString()); - tableCheckerMapper.createElogTable(sb.toString()); +// tableCheckerMapper.createElogTable(sb.toString()); } } diff --git a/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java b/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java index 4a5c44d7b..b1934e4d3 100644 --- a/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java +++ b/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java @@ -1,40 +1,38 @@ -package com.engine.salary.elog.annotation.handle; - -import com.weaver.common.elog.annotation.LoggerTarget; -import com.weaver.common.elog.util.LoggerTemplate; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Component; - -import java.util.Map; - - -/** - * @ClassName: LoggerTargetHandler - * @Description 从Spring扫描到的类中获取到LoggerTarget自定义注解类设置function属性 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ - -@Component -public class LoggerTargetHandler implements CommandLineRunner { - - @Autowired - ApplicationContext applicationContext; - - @Override - public void run(String... args) throws Exception { - Map loggtemplateMap = applicationContext.getBeansWithAnnotation(LoggerTarget.class); - - for(Object obj : loggtemplateMap.values()) { - if(obj instanceof LoggerTemplate) { - LoggerTarget loggerTarget = obj.getClass().getAnnotation(LoggerTarget.class); - ((LoggerTemplate) obj).setFunction(loggerTarget.function()); - ((LoggerTemplate) obj).setModule(StringUtils.isNotEmpty(loggerTarget.value()) ? loggerTarget.value() : loggerTarget.module()); - } - - } - } -} +//package com.engine.salary.elog.annotation.handle; +// +//import com.weaver.common.elog.annotation.LoggerTarget; +//import com.weaver.common.elog.util.LoggerTemplate; +//import org.apache.commons.lang3.StringUtils; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.CommandLineRunner; +//import org.springframework.context.ApplicationContext; +//import org.springframework.stereotype.Component; +// +//import java.util.Map; +// +// +///** +// * @ClassName: LoggerTargetHandler +// * @Description 从Spring扫描到的类中获取到LoggerTarget自定义注解类设置function属性 +// * @Author tanghj +// * @Date 2021/2/10 14:18 +// */ +// +//public class LoggerTargetHandler { +// +// ApplicationContext applicationContext; +// +// @Override +// public void run(String... args) throws Exception { +// Map loggtemplateMap = applicationContext.getBeansWithAnnotation(LoggerTarget.class); +// +// for(Object obj : loggtemplateMap.values()) { +// if(obj instanceof LoggerTemplate) { +// LoggerTarget loggerTarget = obj.getClass().getAnnotation(LoggerTarget.class); +// ((LoggerTemplate) obj).setFunction(loggerTarget.function()); +// ((LoggerTemplate) obj).setModule(StringUtils.isNotEmpty(loggerTarget.value()) ? loggerTarget.value() : loggerTarget.module()); +// } +// +// } +// } +//} diff --git a/src/com/engine/salary/elog/async/LoggerMessageListener.java b/src/com/engine/salary/elog/async/LoggerMessageListener.java new file mode 100644 index 000000000..45f2e1b90 --- /dev/null +++ b/src/com/engine/salary/elog/async/LoggerMessageListener.java @@ -0,0 +1,31 @@ +package com.engine.salary.elog.async; + +import com.alibaba.fastjson.JSON; +import com.engine.salary.elog.config.ELogTableChecker; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.service.LocalElogService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * @ClassName: LoggerMessageListener + * @Description 本地日志存储消息队列监听类 + * @Author tanghj + * @Date 2021/2/10 14:18 + */ +public class LoggerMessageListener { + + private final Log logger = LogFactory.getLog(getClass()); + + // @Autowired + LocalElogService localElogService = new LocalElogService(); + // @Autowired + private ELogTableChecker eLogTableChecker = new ELogTableChecker(); + + public String receive(LoggerContext messageBean) { + logger.info("日志SDK消费到消息" + JSON.toJSONString(messageBean)); + eLogTableChecker.check(messageBean); + localElogService.insertLocalElog(messageBean); + return ""; + } +} diff --git a/src/com/engine/salary/elog/config/ELogCache.java b/src/com/engine/salary/elog/config/ELogCache.java new file mode 100644 index 000000000..d5de0885a --- /dev/null +++ b/src/com/engine/salary/elog/config/ELogCache.java @@ -0,0 +1,25 @@ +package com.engine.salary.elog.config; + +import com.engine.salary.mapper.elog.TableCheckerMapper; +import com.engine.salary.util.db.MapperProxyFactory; + +import java.util.HashMap; +import java.util.Map; + +public class ELogCache { + + private Map tableCache = new HashMap<>(); + + private TableCheckerMapper getTableCheckerMapper() { + return MapperProxyFactory.getProxy(TableCheckerMapper.class); + } + + public Long getVersion(String mainTable) { + Long version = tableCache.get(mainTable); + if (version == null) { + version = getTableCheckerMapper().getVersion(mainTable); + tableCache.put(mainTable, version); + } + return version; + } +} diff --git a/src/com/engine/salary/elog/config/ELogTableChecker.java b/src/com/engine/salary/elog/config/ELogTableChecker.java new file mode 100644 index 000000000..0fee08932 --- /dev/null +++ b/src/com/engine/salary/elog/config/ELogTableChecker.java @@ -0,0 +1,44 @@ +package com.engine.salary.elog.config; + +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.mapper.elog.TableCheckerMapper; +import com.engine.salary.util.db.MapperProxyFactory; +import dm.jdbc.util.IdGenerator; + + +public class ELogTableChecker { + private static final long version = 0; + private ELogCache eLogCache = new ELogCache(); + + private TableCheckerMapper getTableCheckerMapper() { + return MapperProxyFactory.getProxy(TableCheckerMapper.class); + } + + public void check(LoggerContext loggerContext) { + String module = loggerContext.getModuleName(); + String function = loggerContext.getFunctionName(); + String mainTable = String.format("%s_%slogs", module, function); + Long v = eLogCache.getVersion(mainTable); + boolean noTable = v == null; + if (noTable) { + this.initTable(mainTable); + v = version; + } else { + this.checkVersion(mainTable, v); + } + + } + + private void checkVersion(String mainTable, Long v) { + if (v == version) { + return; + } + } + + + private void initTable(String mainTable) { + getTableCheckerMapper().recordVersion(IdGenerator.generate(), mainTable, version); + getTableCheckerMapper().createMainTable(mainTable); + getTableCheckerMapper().createDetailTable(mainTable + "_detail"); + } +} diff --git a/src/com/engine/salary/elog/service/ApplicationContextProvider.java b/src/com/engine/salary/elog/service/ApplicationContextProvider.java new file mode 100644 index 000000000..d1bc541d4 --- /dev/null +++ b/src/com/engine/salary/elog/service/ApplicationContextProvider.java @@ -0,0 +1,67 @@ +//package com.engine.salary.elog.service; +// +//import org.springframework.beans.BeansException; +//import org.springframework.context.ApplicationContext; +//import org.springframework.context.ApplicationContextAware; +//import org.springframework.stereotype.Component; +// +///** +// * 获取Spring上下文 +// * +// * @author tanghj +// * @date on 2020-10-19 +// */ +// +//public class ApplicationContextProvider implements ApplicationContextAware { +// /** +// * 上下文对象实例 +// */ +// private static ApplicationContext applicationContext; +// +// @Override +// public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { +// this.applicationContext = applicationContext; +// } +// +// /** +// * 获取applicationContext +// * +// * @return +// */ +// public static ApplicationContext getApplicationContext() { +// return applicationContext; +// } +// +// /** +// * 通过name获取 Bean. +// * +// * @param name +// * @return +// */ +// public static Object getBean(String name) { +// return getApplicationContext().getBean(name); +// } +// +// /** +// * 通过class获取Bean. +// * +// * @param clazz +// * @param +// * @return +// */ +// public static T getBean(Class clazz) { +// return getApplicationContext().getBean(clazz); +// } +// +// /** +// * 通过name,以及Clazz返回指定的Bean +// * +// * @param name +// * @param clazz +// * @param +// * @return +// */ +// public static T getBean(String name, Class clazz) { +// return getApplicationContext().getBean(name, clazz); +// } +//} diff --git a/src/com/engine/salary/elog/service/LocalElogService.java b/src/com/engine/salary/elog/service/LocalElogService.java new file mode 100644 index 000000000..a9a368533 --- /dev/null +++ b/src/com/engine/salary/elog/service/LocalElogService.java @@ -0,0 +1,74 @@ +package com.engine.salary.elog.service; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.mapper.elog.LocalElogDaoMapper; +import com.engine.salary.util.db.MapperProxyFactory; +import org.apache.commons.lang3.StringUtils; + +import java.util.Set; +import java.util.UUID; + +/** + * @ClassName: LocalElogService + * @Description TODO + * @Author tanghj + * @Date 2021/2/24 11:03 + */ +public class LocalElogService { + + private LocalElogDaoMapper getLocalElogDaoMapper() { + return MapperProxyFactory.getProxy(LocalElogDaoMapper.class); + } + + public int insertLocalElog(LoggerContext context) { + if (StringUtils.isEmpty(context.getUuid())) { + context.setUuid(UUID.randomUUID().toString().replace("-", "")); + } + + String cusColumns = ""; + String cusValus = ""; + if (context.getCustomInfo() != null) { + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(context.getCustomInfo())); + + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + cusValus = cusValus + ",'" + custom.getString(key) + "'"; + } + + } + + String params = context.getParams() == null ? null : JSONObject.toJSONString(context.getParams()); + + String tableName = context.getModuleName() + "_" + context.getFunctionName() + "logs"; + + getLocalElogDaoMapper().insertElogContext(context, params, cusColumns, cusValus, tableName); + if (context.getDetailContexts() != null) { + String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; + for (LoggerDetailContext detailContext : context.getDetailContexts()) { + insertElogDetail(detailContext, context.getUuid(), detailTableName); + } + + } + + return 1; + } + + private int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName) { + String cusColumns = ""; + String cusValus = ""; + if (loggerDetailContext.getCustomDetailInfo() != null) { + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(loggerDetailContext.getCustomDetailInfo())); + + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + cusValus = cusValus + ",'" + custom.getString(key) + "'"; + } + } + getLocalElogDaoMapper().insertElogDetail(loggerDetailContext, mainId, cusColumns, cusValus, detailTableName); + return 1; + } + +} diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index 1041e9375..6dc03b33c 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -1,14 +1,12 @@ package com.engine.salary.elog.util; import com.alibaba.fastjson.JSONObject; -import com.weaver.common.async.bean.AsyncBean; -import com.weaver.common.async.producer.client.AsyncClient; -import com.weaver.common.elog.dto.LoggerContext; -import com.weaver.common.elog.dto.LoggerDetailContext; -import com.weaver.common.elog.dto.TableChangeBean; +import com.engine.salary.elog.async.LoggerMessageListener; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.dto.TableChangeBean; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.springframework.beans.factory.annotation.Autowired; import java.lang.reflect.Field; import java.util.*; @@ -28,30 +26,25 @@ public class LoggerTemplate { protected String localQueue; - @Autowired - protected AsyncClient asyncClient; /** * 写入日志消息队列 + * * @param context 日志实体 */ - public void write(LoggerContext context){ + public void write(LoggerContext context) { this.write(context, true); } /** * 写入日志消息队列 + * * @param context 日志实体 * @param isLocal true 存储本地, false不存储本地 */ - public void write(LoggerContext context, boolean isLocal){ - AsyncBean asyncBean = new AsyncBean<>(); + public void write(LoggerContext context, boolean isLocal) { handleContext(context); - asyncBean.setMessage(context); - asyncBean.setQueue(logCenterQueue); - asyncClient.send(asyncBean); - if(isLocal) { - asyncBean.setQueue(localQueue); - asyncClient.send(asyncBean); + if (isLocal) { + new LoggerMessageListener().receive(context); } } @@ -63,66 +56,66 @@ public class LoggerTemplate { List valueChangeList = new ArrayList<>(); int showOrder = 0; - if(changeBeans != null) - for(TableChangeBean changeBean : changeBeans) { - if(changeBean != null && (changeBean.getNewValue() != null || changeBean.getOldValue() != null)) { - ApiModel apiModel = null; - JSONObject newJo = new JSONObject(); - JSONObject oldJo = new JSONObject(); - JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean)); - if(changeBean.getNewValue() != null) { - apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); - newJo = valueChange.getJSONObject("newValue"); - } else { - apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); - } - if(changeBean.getOldValue() != null) { - oldJo = valueChange.getJSONObject("oldValue"); - } - if(apiModel != null) { - Field[] fields = changeBean.getNewValue().getClass().getDeclaredFields(); - for(Field field : fields) { - ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setTableName(changeBean.getTableName()); - valueChangeBean.setFieldName(field.getName()); - valueChangeBean.setFieldDesc(apiModelProperty.value()); - valueChangeBean.setNewValue(newJo.getString(field.getName())); - valueChangeBean.setOldValue(oldJo.getString(field.getName())); - valueChangeBean.setShoworder(showOrder++); - valueChangeList.add(valueChangeBean); + if (changeBeans != null) + for (TableChangeBean changeBean : changeBeans) { + if (changeBean != null && (changeBean.getNewValue() != null || changeBean.getOldValue() != null)) { + ApiModel apiModel = null; + JSONObject newJo = new JSONObject(); + JSONObject oldJo = new JSONObject(); + JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean)); + if (changeBean.getNewValue() != null) { + apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); + newJo = valueChange.getJSONObject("newValue"); + } else { + apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); } - } else { - Set keys = new HashSet<>(); - for(String key : newJo.keySet()) { - keys.add(key); - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setTableName(changeBean.getTableName()); - valueChangeBean.setFieldName(key); - valueChangeBean.setFieldDesc(key); - valueChangeBean.setNewValue(newJo.getString(key)); - valueChangeBean.setOldValue(oldJo.getString(key)); - valueChangeBean.setShoworder(showOrder++); - valueChangeList.add(valueChangeBean); + if (changeBean.getOldValue() != null) { + oldJo = valueChange.getJSONObject("oldValue"); } - for(String key : oldJo.keySet()) { - if(keys.contains(key)) - continue; - keys.add(key); - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setTableName(changeBean.getTableName()); - valueChangeBean.setFieldName(key); - valueChangeBean.setFieldDesc(key); - valueChangeBean.setNewValue(newJo.getString(key)); - valueChangeBean.setOldValue(oldJo.getString(key)); - valueChangeBean.setShoworder(showOrder++); - valueChangeList.add(valueChangeBean); + if (apiModel != null) { + Field[] fields = changeBean.getNewValue().getClass().getDeclaredFields(); + for (Field field : fields) { + ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(field.getName()); + valueChangeBean.setFieldDesc(apiModelProperty.value()); + valueChangeBean.setNewValue(newJo.getString(field.getName())); + valueChangeBean.setOldValue(oldJo.getString(field.getName())); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } + } else { + Set keys = new HashSet<>(); + for (String key : (Set) newJo.keySet()) { + keys.add(key); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(key); + valueChangeBean.setFieldDesc(key); + valueChangeBean.setNewValue(newJo.getString(key)); + valueChangeBean.setOldValue(oldJo.getString(key)); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } + for (String key : (Set)oldJo.keySet()) { + if (keys.contains(key)) + continue; + keys.add(key); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setFieldName(key); + valueChangeBean.setFieldDesc(key); + valueChangeBean.setNewValue(newJo.getString(key)); + valueChangeBean.setOldValue(oldJo.getString(key)); + valueChangeBean.setShoworder(showOrder++); + valueChangeList.add(valueChangeBean); + } } } } - } - if(valueChangeList.size() > 0) + if (valueChangeList.size() > 0) context.setDetailContexts(valueChangeList); } @@ -140,12 +133,13 @@ public class LoggerTemplate { /** * 获取日志实体类 + * * @return */ public LoggerContext getContext() { LoggerContext loggerContext = new LoggerContext(); - loggerContext.setUuid(UUID.randomUUID().toString().replace("-","")); + loggerContext.setUuid(UUID.randomUUID().toString().replace("-", "")); loggerContext.setModuleName(this.module); loggerContext.setFunctionName(this.function); @@ -157,8 +151,4 @@ public class LoggerTemplate { this.localQueue = module + "LocalQueue"; this.module = module; } - - public void setAsyncClient(AsyncClient asyncClient) { - this.asyncClient = asyncClient; - } } diff --git a/src/com/engine/salary/formlua/entity/parameter/ExcelFuncs.java b/src/com/engine/salary/formlua/entity/parameter/ExcelFuncs.java index 437d8376e..6ba9cb7bd 100644 --- a/src/com/engine/salary/formlua/entity/parameter/ExcelFuncs.java +++ b/src/com/engine/salary/formlua/entity/parameter/ExcelFuncs.java @@ -12,7 +12,7 @@ import java.util.LinkedList; import java.util.List; -@Component + public class ExcelFuncs { protected final Logger logger = LoggerFactory.getLogger(getClass()); final static private String ALLFORM="all"; diff --git a/src/com/engine/salary/formlua/entity/parameter/FuncDescUtil.java b/src/com/engine/salary/formlua/entity/parameter/FuncDescUtil.java index d4e5fcee3..666135c26 100644 --- a/src/com/engine/salary/formlua/entity/parameter/FuncDescUtil.java +++ b/src/com/engine/salary/formlua/entity/parameter/FuncDescUtil.java @@ -9,7 +9,7 @@ import java.util.HashMap; import java.util.Map; -@Component + public class FuncDescUtil { protected final Logger logger = LoggerFactory.getLogger(FuncDescUtil.class); Map funcMap = new HashMap(); diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java new file mode 100644 index 000000000..56dddcd45 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java @@ -0,0 +1,36 @@ +package com.engine.salary.mapper.elog; + +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: LocalElogDao + * @Description 本地操作日志持久层 + * @Author tanghj + * @Date 2021/2/24 9:35 + */ +public interface LocalElogDaoMapper { + + int insertElogContext(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "params") String params, + @Param(value = "cusColumns") String cusColumns, + @Param(value = "cusValus") String cusValus, + @Param(value = "tableName") String tableName); + + List> queryElogList(@Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName); + + Map elogCount(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName); + + int insertElogDetail(@Param(value = "detailContext") LoggerDetailContext loggerDetailContext, + @Param(value = "mainid") String mainid, + @Param(value = "cusColumns") String cusColumns, + @Param(value = "cusValus") String cusValus, + @Param(value = "detailTableName") String tableName); +} diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml new file mode 100644 index 000000000..7349e7026 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml @@ -0,0 +1,41 @@ + + + + + + insert into ${tableName} (uuid, date, tenant_key, modulename, functionName, + operator, operatorname, targetid, targetname, interfacename, operatetype, operatedesc, + params, clientIp, groupnamelabel, redoservice, redocontext, cancelservice, cancelcontext, device, groupid + ${cusColumns}) + values + (#{logContent.uuid}, #{logContent.date}, + #{logContent.tenant_key}, #{logContent.moduleName}, #{logContent.functionName}, #{logContent.operator}, #{logContent.operatorName}, #{logContent.targetId} + , #{logContent.targetName}, #{logContent.interfaceName}, #{logContent.operateType}, #{logContent.operatedesc}, + #{params}, #{logContent.clientIp}, #{logContent.groupNameLabel}, #{logContent.redoService}, + #{logContent.redoContext}, #{logContent.cancelService}, #{logContent.cancelContext}, #{logContent.device}, #{logContent.groupId} + ${cusValus}) + + + + + + + + insert into ${detailTableName} (mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder + ${cusColumns}) + values( + #{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder} + ${cusValus} + ) + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java new file mode 100644 index 000000000..0a8e14928 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java @@ -0,0 +1,8 @@ +package com.engine.salary.mapper.elog; + +import java.util.Map; + +public interface QueryCurretValusMapper { + + Map queryValues(String sql); +} diff --git a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml new file mode 100644 index 000000000..c3d7a16d1 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/elog/TableCheckerMapper.java b/src/com/engine/salary/mapper/elog/TableCheckerMapper.java new file mode 100644 index 000000000..5270ed5fe --- /dev/null +++ b/src/com/engine/salary/mapper/elog/TableCheckerMapper.java @@ -0,0 +1,20 @@ +package com.engine.salary.mapper.elog; + +import com.engine.salary.elog.dto.TableColumnBean; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface TableCheckerMapper { + Long getVersion(@Param("mainTable") String mainTable); + + void recordVersion(@Param("id") long id, @Param("mainTable") String mainTable, @Param("version") long version); + + void createMainTable(@Param("mainTable") String mainTable); + + void createDetailTable(@Param("detailTable") String detailTable); + + List getTableStructure(@Param("tableName") String tableName); + + void createElogTable(@Param("createElogSql") String createElogSql); +} diff --git a/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml new file mode 100644 index 000000000..a9e4436d3 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml @@ -0,0 +1,79 @@ + + + + + insert into elog_version (id, maintable, version) + values (#{id}, #{mainTable}, #{version}); + + + + create table ${mainTable} + ( + id bigint comment 'ID', + create_time datetime, + update_time datetime, + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid char(36), + date datetime, + operator varchar(50), + operatorName varchar(50), + targetId varchar(50), + targetName varchar(1000), + module varchar(100), + `function` varchar(100), + interfaceName varchar(100), + operateType varchar(50), + desc varchar(1000), + params longtext, + clientIp varchar(50), + device varchar(200), + groupNameLabel varchar(500), + redoService varchar(200), + redoContext longtext, + cancelService varchar(200), + cancelContext longtext + ) + + + create table ${detailTable} + ( + id bigint comment 'ID', + create_time datetime, + update_time datetime, + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid varchar(36), + tableName varchar(200), + fieldName char(200), + newValue longtext, + oldValue longtext, + fieldDesc varchar(200), + showorder int default 0 + ) + + + + + + + ${createElogSql} + + \ No newline at end of file From 7e980db4b3d0171461c09e5f88a88156482f4ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 21 Dec 2023 20:25:00 +0800 Subject: [PATCH 022/169] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/config/SalaryElogConfig.java | 418 ++++++++++ .../salary/config/SalaryPermissionConfig.java | 194 +++++ .../salary/elog/annotation/ElogField.java | 4 +- .../salary/elog/annotation/ElogTransform.java | 28 + .../annotation/handle/ElogTableScanner.java | 4 +- .../elog/async/LoggerMessageListener.java | 21 +- .../engine/salary/elog/config/ELogCache.java | 6 +- .../salary/elog/config/ELogTableChecker.java | 6 +- .../{DateTypeEnum.java => DataTypeEnum.java} | 2 +- .../engine/salary/elog/dto/LoggerContext.java | 583 ++++++++++++-- .../salary/elog/dto/LoggerDetailContext.java | 230 +++++- .../salary/elog/dto/TableChangeBean.java | 102 ++- .../salary/elog/dto/TableColumnBean.java | 6 +- .../engine/salary/elog/enums/ElogConsts.java | 22 + .../salary/elog/enums/FromTerminalType.java | 48 ++ .../engine/salary/elog/enums/LinkType.java | 173 ++++ .../salary/elog/enums/OperateAuditType.java | 14 + .../service/ApplicationContextProvider.java | 67 -- .../elog/service/ILocalElogService.java | 13 + .../salary/elog/service/LocalElogService.java | 74 -- .../elog/service/impl/LocalElogService.java | 435 ++++++++++ .../elog/threadlocal/ElogThreadLocal.java | 75 ++ .../engine/salary/elog/util/ElogUtils.java | 755 +++++++++++++++++- .../salary/elog/util/LoggerTemplate.java | 511 +++++++++++- ...apper.java => ElogTableCheckerMapper.java} | 12 +- .../mapper/elog/ElogTableCheckerMapper.xml | 451 +++++++++++ .../mapper/elog/LocalElogAopDaoMapper.java | 45 ++ .../mapper/elog/LocalElogAopDaoMapper.xml | 150 ++++ .../salary/mapper/elog/TableCheckerMapper.xml | 79 -- .../service/impl/SalaryItemServiceImpl.java | 42 +- 30 files changed, 4220 insertions(+), 350 deletions(-) create mode 100644 src/com/engine/salary/config/SalaryElogConfig.java create mode 100644 src/com/engine/salary/config/SalaryPermissionConfig.java create mode 100644 src/com/engine/salary/elog/annotation/ElogTransform.java rename src/com/engine/salary/elog/dto/{DateTypeEnum.java => DataTypeEnum.java} (85%) create mode 100644 src/com/engine/salary/elog/enums/ElogConsts.java create mode 100644 src/com/engine/salary/elog/enums/FromTerminalType.java create mode 100644 src/com/engine/salary/elog/enums/LinkType.java create mode 100644 src/com/engine/salary/elog/enums/OperateAuditType.java delete mode 100644 src/com/engine/salary/elog/service/ApplicationContextProvider.java create mode 100644 src/com/engine/salary/elog/service/ILocalElogService.java delete mode 100644 src/com/engine/salary/elog/service/LocalElogService.java create mode 100644 src/com/engine/salary/elog/service/impl/LocalElogService.java create mode 100644 src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java rename src/com/engine/salary/mapper/elog/{TableCheckerMapper.java => ElogTableCheckerMapper.java} (60%) create mode 100644 src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml create mode 100644 src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java create mode 100644 src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml delete mode 100644 src/com/engine/salary/mapper/elog/TableCheckerMapper.xml diff --git a/src/com/engine/salary/config/SalaryElogConfig.java b/src/com/engine/salary/config/SalaryElogConfig.java new file mode 100644 index 000000000..006e75a94 --- /dev/null +++ b/src/com/engine/salary/config/SalaryElogConfig.java @@ -0,0 +1,418 @@ +package com.engine.salary.config; + +import com.engine.salary.elog.util.LoggerTemplate; +import com.engine.salary.elog.util.LoggerTemplateBuilder; + +/** + * @description: elog日志 + * @author: xiajun + * @modified By: xiajun + * @date: Created in 10/22/21 10:27 AM + * @version:v1.0 + */ +public class SalaryElogConfig { + +// /** +// * 个税税率表 +// * +// * @return +// */ +// @Bean("taxRateLoggerTemplate") +// public LoggerTemplate taxRateLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "taxrate"); +// } + + /** + * 薪资项目 + * + * @return + */ + public static LoggerTemplate salaryItemLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "adc"); + } + +// /** +// * 个税扣缴义务人 +// * +// * @return +// */ +// @Bean("taxAgentLoggerTemplate") +// public LoggerTemplate taxAgentLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "taxagent"); +// } +// +// @Bean("siCategoryLoggerTemplate") +// public LoggerTemplate siCategoryLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "siCategory"); +// } +// +// @Bean("siSchemeLoggerTemplate") +// public LoggerTemplate siSchemeLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "siScheme"); +// } +// +// @Bean("totalSchemeLoggerTemplate") +// public LoggerTemplate totalSchemeLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "totalScheme"); +// } +// +// /** +// * 累计情况 +// * +// * @return +// */ +// @Bean("addUpSituationLoggerTemplate") +// public LoggerTemplate addUpSituationLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "addupsituation"); +// } +// +// /** +// * 累计专项附加扣除 +// * +// * @return +// */ +// @Bean("addUpDeductionLoggerTemplate") +// public LoggerTemplate addUpDeductionLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "addupdeduction"); +// } +// +// /** +// * 其他免税扣除 +// * +// * @return +// */ +// @Bean("otherDeductionLoggerTemplate") +// public LoggerTemplate otherDeductionLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "otherdeduction"); +// } +// +// /** +// * 减税 +// * +// * @return +// */ +// @Bean("derateDeductionLoggerTemplate") +// public LoggerTemplate derateDeductionLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "deratededuction"); +// } +// +// /** +// * 税延养老保险 +// * +// * @return +// */ +// @Bean("endowmentInsuranceLoggerTemplate") +// public LoggerTemplate endowmentInsuranceLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "endowmentinsurance"); +// } +// +// /** +// * 税延养老保险 +// * +// * @return +// */ +// @Bean("freeIncomeLoggerTemplate") +// public LoggerTemplate freeIncomeLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "freeincome"); +// } +// +// /** +// * 捐赠免税 +// * +// * @return +// */ +// @Bean("grantDonationLoggerTemplate") +// public LoggerTemplate grantDonationLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "grantdonation"); +// } +// +// /** +// * 捐赠免税 +// * +// * @return +// */ +// @Bean("healthInsuranceLoggerTemplate") +// public LoggerTemplate healthInsuranceLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "healthinsurance"); +// } +// +// /** +// * 其他免税扣除 +// * +// * @return +// */ +// @Bean("otherDerateDeductionLoggerTemplate") +// public LoggerTemplate otherDerateDeductionLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "otherderatededuction"); +// } +// +// /** +// * 考勤引用 +// * +// * @return +// */ +// @Bean("attendQuoteLoggerTemplate") +// public LoggerTemplate attendQuoteLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "attendquote"); +// } +// +// /** +// * 考勤引用字段管理 +// * +// * @return +// */ +// @Bean("attendQuoteFieldLoggerTemplate") +// public LoggerTemplate attendQuoteFieldLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "attendfield"); +// } +// +// /** +// * 考勤引用字段设置 +// * +// * @return +// */ +// @Bean("attendQuoteFieldSettingLoggerTemplate") +// public LoggerTemplate attendQuoteFieldSettingLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "attendfieldset"); +// } +// +// /** +// * 薪资账套 +// * +// * @return +// */ +// @Bean("salarySobLoggerTemplate") +// public LoggerTemplate salarySobLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarysob"); +// } +// +// /** +// * 薪资核算 +// * +// * @return +// */ +// @Bean("salaryAcctRecordLoggerTemplate") +// public LoggerTemplate salaryAcctRecordLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "acctrecord"); +// } +// +// /** +// * 个税申报表 +// * +// * @return +// */ +// @Bean("taxDeclarationLoggerTemplate") +// public LoggerTemplate taxDeclarationLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "taxdecla"); +// } +// +// /** +// * 福利档案 +// * +// * @return +// */ +// @Bean("siArchivesLoggerTemplate") +// public LoggerTemplate siArchivesLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "siarchives"); +// } +// +// /** +// * 社保规则 +// */ +// @Bean("archiveRuleLoggerTemplate") +// public LoggerTemplate archiveRuleLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "archiverule"); +// } +// +// /** +// * 代缴机构 +// * +// * @return +// */ +// @Bean("paymentAgencyLoggerTemplate") +// public LoggerTemplate paymentAgencyLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "paymentagency"); +// } +// +// /** +// * 福利核算 +// * +// * @return +// */ +// @Bean("siAccountLoggerTemplate") +// public LoggerTemplate siAccountLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "siaccount"); +// } +// +// /** +// * 工资单模板 +// * +// * @return +// */ +// @Bean("salaryTemplateLoggerTemplate") +// public LoggerTemplate salaryTemplateLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarytemplate"); +// } +// +// /** +// * 工资单发放 +// * +// * @return +// */ +// @Bean("salarySendLoggerTemplate") +// public LoggerTemplate salarySendLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarysend"); +// } +// +// /** +// * 外部人员 +// * +// * @return +// */ +// @Bean("extEmployeeLoggerTemplate") +// public LoggerTemplate extEmployeeLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "extemployee"); +// } +// +// /** +// * 薪资档案 +// * +// * @return +// */ +// @Bean("salaryArchiveLoggerTemplate") +// public LoggerTemplate salaryArchiveLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salaryarchive"); +// } +// +// /** +// * 薪资档案-字段 +// * +// * @return +// */ +// @Bean("salaryArchiveFieldLoggerTemplate") +// public LoggerTemplate salaryArchiveFieldLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarcfield"); +// } +// +// /** +// * 薪资档案-薪资项目调整 +// * +// * @return +// */ +// @Bean("salaryArchiveItemAdjustLoggerTemplate") +// public LoggerTemplate salaryArchiveItemAdjustLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarcitemadj"); +// } +// +// /** +// * 薪资档案-批量调薪 +// * +// * @return +// */ +// @Bean("salaryArchiveBatchAdjustLoggerTemplate") +// public LoggerTemplate salaryArchiveBatchAdjustLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "salarcbatadj"); +// } +// +// /** +// * 自定义业务数据设置 +// * +// * @return +// */ +// @Bean("customDataSetLoggerTemplate") +// public LoggerTemplate customDataSetLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "customdataset"); +// } +// +// /** +// * 自定义业务数据 +// * +// * @return +// */ +// @Bean("customDataLoggerTemplate") +// public LoggerTemplate customDataLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "customdata"); +// } +// +// +// /** +// * 人员报送 +// * +// * @return +// */ +// @Bean("employeeDeclareLoggerTemplate") +// public LoggerTemplate employeeDeclareLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "empdeclare"); +// } +// +// /** +// * 单位扣款账号 +// * +// * @return +// */ +// @Bean("withholdAccountLoggerTemplate") +// public LoggerTemplate withholdAccountLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "whaccount"); +// } +// +// /** +// * 银行报盘 +// * +// * @return +// */ +// @Bean("bankOfferLoggerTemplate") +// public LoggerTemplate bankOfferLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "bankoffer"); +// } +// +// /** +// * 银行报盘模板 +// * +// * @return +// */ +// @Bean("bankOfferTemplateLoggerTemplate") +// public LoggerTemplate bankOfferTemplateLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "botemplate"); +// } +// +// /** +// * 薪酬体系标准(岗薪制) +// * +// * @return +// */ +// @Bean("postSalaryLoggerTemplate") +// public LoggerTemplate postSalaryLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "postsalary"); +// } +// +// /** +// * 银行报盘模板 +// * +// * @return +// */ +// @Bean("taxFreeDetailLoggerTemplate") +// public LoggerTemplate taxFreeDetailLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "taxfreedetail"); +// } +// +// /** +// * 最优年终奖计税方案 +// * +// * @return +// */ +// @Bean("annualBonusPlanLoggerTemplate") +// public LoggerTemplate annualBonusPlanLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "annualplan"); +// } +// +// /** +// * 最优年终奖计税方案-累计情况 +// * 最优年终奖计税方案-优化方案详情 +// * +// * @return +// */ +// @Bean("annualBonusLoggerTemplate") +// public LoggerTemplate annualBonusLoggerTemplate() { +// return LoggerTemplateBuilder.build("hrsa", "annualbonus"); +// } +} diff --git a/src/com/engine/salary/config/SalaryPermissionConfig.java b/src/com/engine/salary/config/SalaryPermissionConfig.java new file mode 100644 index 000000000..7703e9267 --- /dev/null +++ b/src/com/engine/salary/config/SalaryPermissionConfig.java @@ -0,0 +1,194 @@ +//package com.engine.salary.config; +// +//import com.weaver.common.component.permission.container.FrontDataContainer; +//import com.weaver.common.mybatis.permission.config.PermissionConfig; +//import com.weaver.common.mybatis.permission.container.PermissionDataContainer; +//import com.weaver.common.mybatis.permission.model.PermissionModuleSourceBean; +//import com.weaver.common.mybatis.permission.model.PermissionModuleTargetBean; +//import com.weaver.common.mybatis.permission.service.PermissionModuleSourceService; +//import com.weaver.common.mybatis.permission.service.PermissionModuleTargetService; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.annotation.Configuration; +// +//import javax.annotation.PostConstruct; +// +///** +// * @description: 数据权限配置 +// * @author: xiajun +// * @modified By: xiajun +// * @date: Created in 2023/6/7 10:28 +// * @version:v1.0 +// */ +//@Configuration +//public class SalaryPermissionConfig { +// +// @Autowired +// private PermissionConfig permissionConfig; +// @Autowired +// private PermissionModuleSourceService permissionModuleSourceService; +// @Autowired +// private PermissionModuleTargetService permissionModuleTargetService; +// +// public static final String TABLE_NAME = "hrsa"; +// public static final String PERMISSION_ID = "salary_standard_share"; +// +// /** +// * 初始化模块支持的权限类型 +// */ +// @PostConstruct +// public void init() { +// +// // 初始化权限字典数据 +// permissionConfig.initPermissionData(); +// +// // 给permissionId指定sourceType 类型 ,可以是多个 +// PermissionModuleSourceBean permissionModuleSourceBean = new PermissionModuleSourceBean(); +// permissionModuleSourceBean.setPermissionId(PERMISSION_ID); +// permissionModuleSourceBean.setSourceType(1); // 指定资源 +// permissionModuleSourceService.addBySql(permissionModuleSourceBean); +// +// // 给permissionId指定targetType 类型 ,可以是多个 +// PermissionModuleTargetBean resourceTarget = new PermissionModuleTargetBean(); +// resourceTarget.setPermissionId(PERMISSION_ID); +// resourceTarget.setTargetType(1); // 人力资源 +// permissionModuleTargetService.addBySql(resourceTarget); +// +// PermissionModuleTargetBean departmentTarget = new PermissionModuleTargetBean(); +// departmentTarget.setPermissionId(PERMISSION_ID); +// departmentTarget.setTargetType(2); // 部门+安全级别 +// permissionModuleTargetService.addBySql(departmentTarget); +// +// PermissionModuleTargetBean departmentTarget2 = new PermissionModuleTargetBean(); +// departmentTarget2.setPermissionId(PERMISSION_ID); +// departmentTarget2.setTargetType(2001); // 部门+包含兼职部门 +// permissionModuleTargetService.addBySql(departmentTarget2); +// +// PermissionModuleTargetBean departmentTarget3 = new PermissionModuleTargetBean(); +// departmentTarget3.setPermissionId(PERMISSION_ID); +// departmentTarget3.setTargetType(3); // 部门+所有下级部门+安全级别 +// permissionModuleTargetService.addBySql(departmentTarget3); +// +// PermissionModuleTargetBean departmentTarget4 = new PermissionModuleTargetBean(); +// departmentTarget4.setPermissionId(PERMISSION_ID); +// departmentTarget4.setTargetType(3001); // 部门+所有下级部门+包含兼职部门 +// permissionModuleTargetService.addBySql(departmentTarget4); +// +// PermissionModuleTargetBean departmentTarget5 = new PermissionModuleTargetBean(); +// departmentTarget5.setPermissionId(PERMISSION_ID); +// departmentTarget5.setTargetType(3002); // 部门+所有下级部门+包含兼职部门+安全级别 +// permissionModuleTargetService.addBySql(departmentTarget5); +// +// PermissionModuleTargetBean departmentTarget6 = new PermissionModuleTargetBean(); +// departmentTarget6.setPermissionId(PERMISSION_ID); +// departmentTarget6.setTargetType(2002); // 部门+包含兼职部门+安全级别 +// permissionModuleTargetService.addBySql(departmentTarget6); +// +// PermissionModuleTargetBean branchTarget = new PermissionModuleTargetBean(); +// branchTarget.setPermissionId(PERMISSION_ID); +// branchTarget.setTargetType(5); // 分部+安全级别 +// permissionModuleTargetService.addBySql(branchTarget); +// +// PermissionModuleTargetBean branchTarget501 = new PermissionModuleTargetBean(); +// branchTarget501.setPermissionId(PERMISSION_ID); +// branchTarget501.setTargetType(501); // 分部+安全级别 +// permissionModuleTargetService.addBySql(branchTarget501); +// +// PermissionModuleTargetBean branchTarget502 = new PermissionModuleTargetBean(); +// branchTarget502.setPermissionId(PERMISSION_ID); +// branchTarget502.setTargetType(502); // 分部+安全级别+兼职 +// permissionModuleTargetService.addBySql(branchTarget502); +// +// PermissionModuleTargetBean branchTarget2 = new PermissionModuleTargetBean(); +// branchTarget2.setPermissionId(PERMISSION_ID); +// branchTarget2.setTargetType(6); // 分部+所有下级分部+安全级别 +// permissionModuleTargetService.addBySql(branchTarget2); +// +// PermissionModuleTargetBean roleTarget = new PermissionModuleTargetBean(); +// roleTarget.setPermissionId(PERMISSION_ID); +// roleTarget.setTargetType(10); // 角色+角色级别+安全级别 +// permissionModuleTargetService.addBySql(roleTarget); +// +// PermissionModuleTargetBean allPeopleTarget = new PermissionModuleTargetBean(); +// allPeopleTarget.setPermissionId(PERMISSION_ID); +// allPeopleTarget.setTargetType(11); // 所有人+安全级别 +// permissionModuleTargetService.addBySql(allPeopleTarget); +// +// PermissionModuleTargetBean positionTarget = new PermissionModuleTargetBean(); +// positionTarget.setPermissionId(PERMISSION_ID); +// positionTarget.setTargetType(12); // 岗位+指定部门 +// permissionModuleTargetService.addBySql(positionTarget); +// +// PermissionModuleTargetBean positionTarget12001 = new PermissionModuleTargetBean(); +// positionTarget12001.setPermissionId(PERMISSION_ID); +// positionTarget12001.setTargetType(12001); // 岗位+指定部门+安全级别 +// permissionModuleTargetService.addBySql(positionTarget12001); +// +// PermissionModuleTargetBean positionTarget12111 = new PermissionModuleTargetBean(); +// positionTarget12111.setPermissionId(PERMISSION_ID); +// positionTarget12111.setTargetType(12111); // 岗位+指定部门+包含兼职岗位 +// permissionModuleTargetService.addBySql(positionTarget12111); +// +// PermissionModuleTargetBean positionTarget12112 = new PermissionModuleTargetBean(); +// positionTarget12112.setPermissionId(PERMISSION_ID); +// positionTarget12112.setTargetType(12112); // 岗位+指定部门+包含兼职岗位+安全级别 +// permissionModuleTargetService.addBySql(positionTarget12112); +// +// PermissionModuleTargetBean positionTarget1201 = new PermissionModuleTargetBean(); +// positionTarget1201.setPermissionId(PERMISSION_ID); +// positionTarget1201.setTargetType(1201); // 兼职岗位+安全级别 +// permissionModuleTargetService.addBySql(positionTarget1201); +// +// PermissionModuleTargetBean positionTarget2 = new PermissionModuleTargetBean(); +// positionTarget2.setPermissionId(PERMISSION_ID); +// positionTarget2.setTargetType(13); // 岗位+指定分部 +// permissionModuleTargetService.addBySql(positionTarget2); +// +// PermissionModuleTargetBean positionTarget13001 = new PermissionModuleTargetBean(); +// positionTarget13001.setPermissionId(PERMISSION_ID); +// positionTarget13001.setTargetType(13001); // 岗位+指定分部+安全级别 +// permissionModuleTargetService.addBySql(positionTarget13001); +// +// PermissionModuleTargetBean positionTarget13110 = new PermissionModuleTargetBean(); +// positionTarget13110.setPermissionId(PERMISSION_ID); +// positionTarget13110.setTargetType(13110); // 岗位+指定分部+包含兼职岗位 + 安全级别 +// permissionModuleTargetService.addBySql(positionTarget13110); +// +// PermissionModuleTargetBean positionTarget1311 = new PermissionModuleTargetBean(); +// positionTarget1311.setPermissionId(PERMISSION_ID); +// positionTarget1311.setTargetType(1311); // 岗位+总部 +// permissionModuleTargetService.addBySql(positionTarget1311); +// +// PermissionModuleTargetBean positionTarget1312 = new PermissionModuleTargetBean(); +// positionTarget1312.setPermissionId(PERMISSION_ID); +// positionTarget1312.setTargetType(1312); // 岗位+总部+安全级别 +// permissionModuleTargetService.addBySql(positionTarget1312); +// +// PermissionModuleTargetBean positionTarget13111 = new PermissionModuleTargetBean(); +// positionTarget13111.setPermissionId(PERMISSION_ID); +// positionTarget13111.setTargetType(13111); // 岗位+总部+包含兼职岗位 +// permissionModuleTargetService.addBySql(positionTarget13111); +// +// PermissionModuleTargetBean positionTarget13112 = new PermissionModuleTargetBean(); +// positionTarget13112.setPermissionId(PERMISSION_ID); +// positionTarget13112.setTargetType(13112); // 岗位+总部+包含兼职岗位+安全级别 +// permissionModuleTargetService.addBySql(positionTarget13112); +// +// PermissionModuleTargetBean groupTarget = new PermissionModuleTargetBean(); +// groupTarget.setPermissionId(PERMISSION_ID); +// groupTarget.setTargetType(14); // 群组+安全级别 +// permissionModuleTargetService.addBySql(groupTarget); +// +// PermissionModuleTargetBean groupTarget2 = new PermissionModuleTargetBean(); +// groupTarget2.setPermissionId(PERMISSION_ID); +// groupTarget2.setTargetType(1411); // 群组 +// permissionModuleTargetService.addBySql(groupTarget2); +// +// // 创建权限表 +// // 一般模块要创建固定的权限表,类似流程模块可以调用这个接口,其他环境一般没有建表权限,以脚本的形式提供 +// // databaseService.createPermissionTable(TABLE_NAME,PERMISSION_ID); +// +// // 初始化permissionId和权限表的关系 +// FrontDataContainer.permissionFrontDataMap.put(PERMISSION_ID, TABLE_NAME); +// PermissionDataContainer.permissionDataContainer.put(PERMISSION_ID, TABLE_NAME); +// } +//} diff --git a/src/com/engine/salary/elog/annotation/ElogField.java b/src/com/engine/salary/elog/annotation/ElogField.java index 3b5df99c2..557a14f3c 100644 --- a/src/com/engine/salary/elog/annotation/ElogField.java +++ b/src/com/engine/salary/elog/annotation/ElogField.java @@ -1,6 +1,6 @@ package com.engine.salary.elog.annotation; -import com.engine.salary.elog.dto.DateTypeEnum; +import com.engine.salary.elog.dto.DataTypeEnum; import java.lang.annotation.*; @@ -9,7 +9,7 @@ import java.lang.annotation.*; @Target({ElementType.FIELD}) public @interface ElogField { - DateTypeEnum dataType() default DateTypeEnum.VARCHAR; + DataTypeEnum dataType() default DataTypeEnum.VARCHAR; int length() default 50; diff --git a/src/com/engine/salary/elog/annotation/ElogTransform.java b/src/com/engine/salary/elog/annotation/ElogTransform.java new file mode 100644 index 000000000..b876b18b2 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/ElogTransform.java @@ -0,0 +1,28 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.*; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.TYPE}) +public @interface ElogTransform { + + String tablename() default ""; + + String name(); + + int labelId() default -1; + + String type() default ""; + + String valuesKVPairs() default ""; + + boolean ignore() default false; + + boolean analyticSubclass() default false; + + boolean analyticList() default false; + + Class analyticListClass() default void.class; + +} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java index be8abc439..4e75cf8bb 100644 --- a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java +++ b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java @@ -2,7 +2,7 @@ package com.engine.salary.elog.annotation.handle; import com.engine.salary.elog.annotation.ElogField; import com.engine.salary.elog.annotation.ElogTable; -import com.engine.salary.elog.dto.DateTypeEnum; +import com.engine.salary.elog.dto.DataTypeEnum; import com.engine.salary.elog.dto.TableColumnBean; import com.engine.salary.elog.util.ElogUtils; import lombok.extern.slf4j.Slf4j; @@ -108,7 +108,7 @@ public class ElogTableScanner { columns.stream().forEach(tableColumnBean -> newcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean)); oldColumns.stream().forEach(tableColumnBean -> { - tableColumnBean.setDataType(ElogUtils.getEnumFromString(DateTypeEnum.class, tableColumnBean.getDataTypeStr())); + tableColumnBean.setDataType(ElogUtils.getEnumFromString(DataTypeEnum.class, tableColumnBean.getDataTypeStr())); tableColumnBean.setNullable("YES".equalsIgnoreCase(tableColumnBean.getIsNullableStr())); oldcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean); }); diff --git a/src/com/engine/salary/elog/async/LoggerMessageListener.java b/src/com/engine/salary/elog/async/LoggerMessageListener.java index 45f2e1b90..6687a0603 100644 --- a/src/com/engine/salary/elog/async/LoggerMessageListener.java +++ b/src/com/engine/salary/elog/async/LoggerMessageListener.java @@ -1,11 +1,10 @@ package com.engine.salary.elog.async; -import com.alibaba.fastjson.JSON; import com.engine.salary.elog.config.ELogTableChecker; import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.service.LocalElogService; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import com.engine.salary.elog.service.impl.LocalElogService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @ClassName: LoggerMessageListener @@ -15,17 +14,17 @@ import org.apache.commons.logging.LogFactory; */ public class LoggerMessageListener { - private final Log logger = LogFactory.getLog(getClass()); + private final Logger logger = LoggerFactory.getLogger(getClass()); - // @Autowired LocalElogService localElogService = new LocalElogService(); - // @Autowired - private ELogTableChecker eLogTableChecker = new ELogTableChecker(); - public String receive(LoggerContext messageBean) { - logger.info("日志SDK消费到消息" + JSON.toJSONString(messageBean)); - eLogTableChecker.check(messageBean); + public String receiveold(LoggerContext messageBean) { + + new ELogTableChecker().check(messageBean); localElogService.insertLocalElog(messageBean); + return ""; } + + } diff --git a/src/com/engine/salary/elog/config/ELogCache.java b/src/com/engine/salary/elog/config/ELogCache.java index d5de0885a..841bddf18 100644 --- a/src/com/engine/salary/elog/config/ELogCache.java +++ b/src/com/engine/salary/elog/config/ELogCache.java @@ -1,6 +1,6 @@ package com.engine.salary.elog.config; -import com.engine.salary.mapper.elog.TableCheckerMapper; +import com.engine.salary.mapper.elog.ElogTableCheckerMapper; import com.engine.salary.util.db.MapperProxyFactory; import java.util.HashMap; @@ -10,8 +10,8 @@ public class ELogCache { private Map tableCache = new HashMap<>(); - private TableCheckerMapper getTableCheckerMapper() { - return MapperProxyFactory.getProxy(TableCheckerMapper.class); + private ElogTableCheckerMapper getTableCheckerMapper() { + return MapperProxyFactory.getProxy(ElogTableCheckerMapper.class); } public Long getVersion(String mainTable) { diff --git a/src/com/engine/salary/elog/config/ELogTableChecker.java b/src/com/engine/salary/elog/config/ELogTableChecker.java index 0fee08932..acbb1dc89 100644 --- a/src/com/engine/salary/elog/config/ELogTableChecker.java +++ b/src/com/engine/salary/elog/config/ELogTableChecker.java @@ -1,7 +1,7 @@ package com.engine.salary.elog.config; import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.mapper.elog.TableCheckerMapper; +import com.engine.salary.mapper.elog.ElogTableCheckerMapper; import com.engine.salary.util.db.MapperProxyFactory; import dm.jdbc.util.IdGenerator; @@ -10,8 +10,8 @@ public class ELogTableChecker { private static final long version = 0; private ELogCache eLogCache = new ELogCache(); - private TableCheckerMapper getTableCheckerMapper() { - return MapperProxyFactory.getProxy(TableCheckerMapper.class); + private ElogTableCheckerMapper getTableCheckerMapper() { + return MapperProxyFactory.getProxy(ElogTableCheckerMapper.class); } public void check(LoggerContext loggerContext) { diff --git a/src/com/engine/salary/elog/dto/DateTypeEnum.java b/src/com/engine/salary/elog/dto/DataTypeEnum.java similarity index 85% rename from src/com/engine/salary/elog/dto/DateTypeEnum.java rename to src/com/engine/salary/elog/dto/DataTypeEnum.java index 9833cfa86..4b46cdd33 100644 --- a/src/com/engine/salary/elog/dto/DateTypeEnum.java +++ b/src/com/engine/salary/elog/dto/DataTypeEnum.java @@ -1,6 +1,6 @@ package com.engine.salary.elog.dto; -public enum DateTypeEnum { +public enum DataTypeEnum { VARCHAR, BIGINT, INT, diff --git a/src/com/engine/salary/elog/dto/LoggerContext.java b/src/com/engine/salary/elog/dto/LoggerContext.java index 248ce45d8..8c4b3aa0e 100644 --- a/src/com/engine/salary/elog/dto/LoggerContext.java +++ b/src/com/engine/salary/elog/dto/LoggerContext.java @@ -1,11 +1,14 @@ package com.engine.salary.elog.dto; +import com.alibaba.fastjson.annotation.JSONField; import com.engine.salary.elog.annotation.ElogField; import com.engine.salary.elog.annotation.ElogTable; -import com.engine.salary.elog.util.ElogUtils; +import com.engine.salary.elog.enums.ElogConsts; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.apache.commons.lang3.StringUtils; +import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -17,51 +20,55 @@ import java.util.Map; * @Author tanghj * @Date 2021/2/10 14:18 */ -@ElogTable(module = ElogUtils.BASE_TABLE) +@ElogTable(module = ElogConsts.BASE_TABLE) @ApiModel("日志实体类") -public class LoggerContext { - @ElogField(comment = "ID", dataType = DateTypeEnum.VARCHAR, isKey = true, isNull = false) +public class LoggerContext implements Serializable { + + private static final long serialVersionUID = 15869325700230992L; + + @ElogField(comment = "ID", dataType = DataTypeEnum.BIGINT, isKey = true) @ApiModelProperty("日志ID") private long id; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 36,comment = "日志UUID") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36, comment = "日志UUID") @ApiModelProperty("日志UUID") - private String uuid; + private String uuid = ""; @ApiModelProperty("自定义日志字段信息") private T customInfo; - @ElogField(dataType = DateTypeEnum.DATETIME,comment = "操作时间") + @ElogField(dataType = DataTypeEnum.DATETIME, comment = "操作时间") @ApiModelProperty("操作时间") - private Date date; + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private Date date = new Date(); - @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "终端信息") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 500, comment = "终端信息") @ApiModelProperty("终端信息") - private String device; + private String device = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "操作人") + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "操作人") @ApiModelProperty("操作人") - private String operator; + private String operator = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR,length = 100,comment = "操作人姓名") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "操作人姓名") @ApiModelProperty("操作人姓名") - private String operatorName; + private String operatorName = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR,length = 10,comment = "租户id") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 10, comment = "租户id") @ApiModelProperty("租户id") - private String tenant_key; + private String tenant_key = ""; /** - * 要操作的对象在表中的主键值 + * 要操作的对象在表中的主键值 */ - @ElogField(dataType = DateTypeEnum.VARCHAR,length = 50,comment = "操作目标id") + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "操作目标id") @ApiModelProperty("操作目标id") - private String targetId; + private String targetId = ""; - @ElogField(dataType = DateTypeEnum.TEXT ,comment = "操作目标名称") + @ElogField(dataType = DataTypeEnum.TEXT, comment = "操作目标名称") @ApiModelProperty("操作目标名称(用于显示)") - private String targetName; + private String targetName = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "模块") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "模块") @ApiModelProperty("目标对象类型(大分类,模块,服务)") private String moduleName;// 模块 @@ -70,21 +77,29 @@ public class LoggerContext { * 数据存储是以模块名_子项目名作为最基本的存储单元 * 如果是子项目下的子项目 命名为:子项目名_子项目名_子项目名(全部小写) */ - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "服务(方法)") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "服务(方法)") @ApiModelProperty("目标对象类型(小分类,模块/服务下的子功能。子项目)") private String functionName; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 100,comment = "访问接口名") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "访问接口名") @ApiModelProperty("访问接口名") - private String interfaceName; + private String interfaceName = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "操作类型") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "请求全路径") + @ApiModelProperty("请求全路径") + private String requestUrl = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "请求地址") + @ApiModelProperty("请求地址") + private String requestUri = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "操作类型") @ApiModelProperty("操作类型(增删改查等)") - private String operateType; + private String operateType = ""; - @ElogField(dataType = DateTypeEnum.TEXT,comment = "操作类型") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "操作类型名称") @ApiModelProperty("操作类型名称") - private String operateTypeName; + private String operateTypeName = ""; /** * 每个TableChangeBean 为一张表,支持记录多张表的前后值 @@ -92,52 +107,202 @@ public class LoggerContext { @ApiModelProperty("修改前、后的值") private List changeValues;// 操作表名,[字段名,值] - @ElogField(dataType = DateTypeEnum.TEXT,comment = "操作类型") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 3000, comment = "操作详细说明") @ApiModelProperty("操作详细说明") - private String operatedesc; + private String operatedesc = ""; + @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "涉及的相关参数") @ApiModelProperty("涉及的相关参数") private Map params; - /*@ApiModelProperty("主日志") - private String mainId;//当作为主表,belongMainId不赋值 + @ApiModelProperty("涉及的相关参数-转string存储") + private String paramsStr; - @ApiModelProperty("从表日志") - private String belongMainId;*/ + /** + * 当作为主表,belongMainId不赋值 + */ + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36, comment = "所属主表uuid") + @ApiModelProperty("所属主表uuid") + private String belongMainId = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "操作IP") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "操作IP") @ApiModelProperty("操作IP") - private String clientIp; + private String clientIp = ""; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 50,comment = "分组") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "分组") @ApiModelProperty("分组") - private String groupId; + private String groupId = ""; /*@ApiModelProperty("是否明显表") private boolean isDetail;*/ - @ElogField(dataType = DateTypeEnum.TEXT, comment = "分组标题") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 1000, comment = "分组标题") @ApiModelProperty("分组标题") - private int groupNameLabel; + private String groupNameLabel = ""; + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "重做业务接口") @ApiModelProperty("重做业务接口") - private String redoService; + private String redoService = ""; - @ElogField(dataType = DateTypeEnum.LONGTEXT, comment = "重做参数") + @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "重做参数") @ApiModelProperty("重做参数") private RedoContext redoContext; - @ElogField(dataType = DateTypeEnum.VARCHAR, length = 200, comment = "撤销业务接口") - @ApiModelProperty("撤销业务接口") - private String cancelService; + @ApiModelProperty("重做参数-转String存储") + private String redoContextStr; - @ElogField(dataType = DateTypeEnum.LONGTEXT, comment = "撤销参数") + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "撤销业务接口") + @ApiModelProperty("撤销业务接口") + private String cancelService = ""; + + @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "撤销参数") @ApiModelProperty("撤销参数") private CancelContext cancelContext; + @ApiModelProperty("撤销参数-转String存储") + private String cancelContextStr; + @ApiModelProperty("日志明细列表(值变化列表-自动赋值、或者自定义字段)") private List detailContexts; + @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "创建时间") + @ApiModelProperty("创建时间") + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private Date create_time; + + @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "修改时间") + @ApiModelProperty("修改时间") + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private Date update_time; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "创建人id") + @ApiModelProperty("创建人id") + private long creator; + + @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0", comment = "是否删除") + @ApiModelProperty("是否删除") + private int delete_type; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "总运行时长") + @ApiModelProperty("总运行时长") + private long totalRunTime; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "主方法运行时长") + @ApiModelProperty("主方法运行时长") + private long mainRunTime; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, defaultValue = "", comment = "运行结果标识") + @ApiModelProperty("运行结果标识") + private String result = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, defaultValue = "", comment = "来自pc web") + @ApiModelProperty("来自终端") + private String fromTerminal = ""; + + @ElogField(dataType = DataTypeEnum.TEXT, comment = "运行结果描述") + @ApiModelProperty("运行结果描述") + private String resultDesc = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 3000, comment = "原先内容") + @ApiModelProperty("原先内容(et用)") + private String old_content = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 20, comment = "链接类型") + @ApiModelProperty("链接类型(et用)") + private String link_type = ""; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "链接id") + @ApiModelProperty("链接id(et用)") + private long link_id; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "原先链接id") + @ApiModelProperty("原先链接id(et用)") + private long old_link_id; + + /** + * 开发可以自由传中间临时参数,不会入库 + */ + @ApiModelProperty("临时参数") + private Object tempParams; + + /** + * 是否忽略该日志,不进行数据记录 + */ + @ApiModelProperty("是否忽略该日志,不进行数据记录") + private boolean logIgnore; + + /** + * 审计操作类型 + */ + @ApiModelProperty("审计操作类型") + protected String operateAuditType; + + /** + * 操作人账号 + */ + @ApiModelProperty("操作人账号") + protected String operateAccount; + + @ApiModelProperty("操作人id(兼容数据库用)") + protected long logOperator; + + @ApiModelProperty("操作人id(兼容数据库用)") + protected long logTargetid; + + @ApiModelProperty("ES存储大字段功能标识") + protected Boolean esFunction; + + @ApiModelProperty("params参数是否忽略记录") + private Boolean paramsIgnore = Boolean.FALSE; + + @ApiModelProperty("params请求体keys") + private List paramsBodyKeys; + + @ApiModelProperty("日志弱控记录") + private Boolean weakElogReocrd = Boolean.FALSE; + + private List clobFieldList; + + public List getClobFieldList() { + return clobFieldList; + } + + public void setClobFieldList(List clobFieldList) { + this.clobFieldList = clobFieldList; + } + + public Boolean getWeakElogReocrd() { + return weakElogReocrd; + } + + public void setWeakElogReocrd(Boolean weakElogReocrd) { + this.weakElogReocrd = weakElogReocrd; + } + + public Boolean getParamsIgnore() { + return paramsIgnore; + } + + public void setParamsIgnore(Boolean paramsIgnore) { + this.paramsIgnore = paramsIgnore; + } + + public List getParamsBodyKeys() { + return paramsBodyKeys; + } + + public void setParamsBodyKeys(List paramsBodyKeys) { + this.paramsBodyKeys = paramsBodyKeys; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + public String getUuid() { return uuid; } @@ -298,11 +463,11 @@ public class LoggerContext { isDetail = detail; }*/ - public int getGroupNameLabel() { + public String getGroupNameLabel() { return groupNameLabel; } - public void setGroupNameLabel(int groupNameLabel) { + public void setGroupNameLabel(String groupNameLabel) { this.groupNameLabel = groupNameLabel; } @@ -333,6 +498,7 @@ public class LoggerContext { public String getCancelService() { return cancelService; } + public void setCancelService(String cancelService) { this.cancelService = cancelService; } @@ -345,6 +511,24 @@ public class LoggerContext { this.detailContexts = detailContexts; } + public void addDetailContext(LoggerDetailContext loggerDetailContext) { + if (this.detailContexts != null) { + this.detailContexts.add(loggerDetailContext); + } else { + this.detailContexts = new ArrayList<>(); + this.detailContexts.add(loggerDetailContext); + } + } + + public void addDetailContext(List list) { + if (this.detailContexts != null) { + this.detailContexts.addAll(list); + } else { + this.detailContexts = new ArrayList<>(); + this.detailContexts.addAll(list); + } + } + public String getOperatorName() { return operatorName; } @@ -360,12 +544,12 @@ public class LoggerContext { } public void setOldValueList(List list) { - if(list != null) + if (list != null) list.stream().forEach(obj -> setOldValues(obj)); } public void setNewValueList(List list) { - if(list != null) + if (list != null) list.stream().forEach(obj -> setNewValues(obj)); } @@ -373,23 +557,97 @@ public class LoggerContext { List list = getChangeList(); boolean handled = false; - for(TableChangeBean bean : list) { - if(bean.getNewValue() == null) { + for (TableChangeBean bean : list) { + if (bean.getNewValue() == null) { bean.setNewValue(object); handled = true; break; } } - if(!handled) { + if (!handled) { TableChangeBean bean = new TableChangeBean(); - bean.setOldValue(object); + bean.setNewValue(object); + list.add(bean); + } + } + + public void setOldValues(Object object, String tableName, String dataId, String belongDataid) { + setOldValues(object, tableName, dataId, belongDataid, false); + } + + public void setOldValues(Object object, String tableName, String dataId, String belongDataid, boolean isDetail) { + TableChangeBean bean = new TableChangeBean(); + if (StringUtils.isNotEmpty(tableName)) + bean.setTableName(tableName); + if (StringUtils.isNotEmpty(dataId)) + bean.setDataid(dataId); + if (StringUtils.isNotEmpty(belongDataid)) + bean.setBelongDataid(belongDataid); + if (isDetail) + bean.setIsDetail(1); + bean.setOldValue(object); + getChangeList().add(bean); + } + + public void setOldValueList(List list, String tableName, String dataId, String belongDataid) { + setOldValueList(list, tableName, dataId, belongDataid, false); + } + + public void setNewValueList(List list, String tableName, String dataId, String belongDataid) { + setNewValueList(list, tableName, dataId, belongDataid, false); + } + + public void setOldValueList(List list, String tableName, String dataId, String belongDataid, boolean isDetail) { + if (list != null) + list.stream().forEach(obj -> setOldValues(obj, tableName, dataId, belongDataid, isDetail)); + } + + public void setNewValueList(List list, String tableName, String dataId, String belongDataid, boolean isDetail) { + if (list != null) + list.stream().forEach(obj -> setNewValues(obj, tableName, dataId, belongDataid, isDetail)); + } + + public void setNewValues(Object object, String tableName, String dataId, String belongDataid) { + setNewValues(object, tableName, dataId, belongDataid, false); + } + + public void setNewValues(Object object, String tableName, String dataId, String belongDataid, boolean isDetail) { + List list = getChangeList(); + + boolean handled = false; + for (TableChangeBean bean : list) { + if (bean.getNewValue() == null) { + bean.setNewValue(object); + if (StringUtils.isNotEmpty(tableName)) + bean.setTableName(tableName); + if (StringUtils.isNotEmpty(dataId)) + bean.setDataid(dataId); + if (StringUtils.isNotEmpty(belongDataid)) + bean.setBelongDataid(belongDataid); + if (isDetail) + bean.setIsDetail(1); + handled = true; + break; + } + } + if (!handled) { + TableChangeBean bean = new TableChangeBean(); + if (StringUtils.isNotEmpty(tableName)) + bean.setTableName(tableName); + if (StringUtils.isNotEmpty(dataId)) + bean.setDataid(dataId); + if (StringUtils.isNotEmpty(belongDataid)) + bean.setBelongDataid(belongDataid); + if (isDetail) + bean.setIsDetail(1); + bean.setNewValue(object); list.add(bean); } } public List getChangeList() { - if(this.changeValues == null) { + if (this.changeValues == null) { this.changeValues = new ArrayList<>(); } @@ -397,6 +655,10 @@ public class LoggerContext { } + public Object getParam(String id) { + return this.params.get(id); + } + public String getOperateTypeName() { return operateTypeName; } @@ -404,5 +666,214 @@ public class LoggerContext { public void setOperateTypeName(String operateTypeName) { this.operateTypeName = operateTypeName; } + + public String getParamsStr() { + return paramsStr; + } + + public void setParamsStr(String paramsStr) { + this.paramsStr = paramsStr; + } + + public String getRedoContextStr() { + return redoContextStr; + } + + public void setRedoContextStr(String redoContextStr) { + this.redoContextStr = redoContextStr; + } + + public String getCancelContextStr() { + return cancelContextStr; + } + + public void setCancelContextStr(String cancelContextStr) { + this.cancelContextStr = cancelContextStr; + } + + public String getBelongMainId() { + return belongMainId; + } + + public void setBelongMainId(String belongMainId) { + this.belongMainId = belongMainId; + } + + public String getRequestUrl() { + return requestUrl; + } + + public void setRequestUrl(String requestUrl) { + this.requestUrl = requestUrl; + } + + public String getRequestUri() { + return requestUri; + } + + public void setRequestUri(String requestUri) { + this.requestUri = requestUri; + } + + public Date getCreate_time() { + return create_time; + } + + public void setCreate_time(Date create_time) { + this.create_time = create_time; + } + + public Date getUpdate_time() { + return update_time; + } + + public void setUpdate_time(Date update_time) { + this.update_time = update_time; + } + + public long getCreator() { + return creator; + } + + public void setCreator(long creator) { + this.creator = creator; + } + + public int getDelete_type() { + return delete_type; + } + + public void setDelete_type(int delete_type) { + this.delete_type = delete_type; + } + + public long getTotalRunTime() { + return totalRunTime; + } + + public void setTotalRunTime(long totalRunTime) { + this.totalRunTime = totalRunTime; + } + + public long getMainRunTime() { + return mainRunTime; + } + + public void setMainRunTime(long mainRunTime) { + this.mainRunTime = mainRunTime; + } + + public Object getTempParams() { + return tempParams; + } + + public void setTempParams(Object tempParams) { + this.tempParams = tempParams; + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + + public String getFromTerminal() { + return fromTerminal; + } + + public void setFromTerminal(String fromTerminal) { + this.fromTerminal = fromTerminal; + } + + public String getResultDesc() { + return resultDesc; + } + + public void setResultDesc(String resultDesc) { + this.resultDesc = resultDesc; + } + + public String getOld_content() { + return old_content; + } + + public void setOld_content(String old_content) { + this.old_content = old_content; + } + + public String getLink_type() { + return link_type; + } + + public void setLink_type(String link_type) { + this.link_type = link_type; + } + + public long getLink_id() { + return link_id; + } + + public void setLink_id(long link_id) { + this.link_id = link_id; + } + + public long getOld_link_id() { + return old_link_id; + } + + public void setOld_link_id(long old_link_id) { + this.old_link_id = old_link_id; + } + + public String getOperateAuditType() { + return operateAuditType; + } + + public void setOperateAuditType(String operateAuditType) { + this.operateAuditType = operateAuditType; + } + + public String getOperateAccount() { + return operateAccount; + } + + public void setOperateAccount(String operateAccount) { + this.operateAccount = operateAccount; + } + + public long getLogOperator() { + return logOperator; + } + + public void setLogOperator(long logOperator) { + this.logOperator = logOperator; + } + + public long getLogTargetid() { + return logTargetid; + } + + public void setLogTargetid(long logTargetid) { + this.logTargetid = logTargetid; + } + + public boolean getLogIgnore() { + return logIgnore; + } + + public void setLogIgnore(boolean logIgnore) { + this.logIgnore = logIgnore; + } + + public Boolean getEsFunction() { + return esFunction; + } + + public void setEsFunction(Boolean esFunction) { + this.esFunction = esFunction; + } + } diff --git a/src/com/engine/salary/elog/dto/LoggerDetailContext.java b/src/com/engine/salary/elog/dto/LoggerDetailContext.java index 8dd6ec7d9..7bb64e1ff 100644 --- a/src/com/engine/salary/elog/dto/LoggerDetailContext.java +++ b/src/com/engine/salary/elog/dto/LoggerDetailContext.java @@ -1,41 +1,148 @@ package com.engine.salary.elog.dto; +import com.engine.salary.elog.annotation.ElogDetailTable; +import com.engine.salary.elog.annotation.ElogField; +import com.engine.salary.elog.enums.ElogConsts; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; + /** * @ClassName: ValueChangeBean * @Description 值变化实体类(自动将表字段值变更类转换为该类) * @Author tanghj * @Date 2021/3/9 11:06 */ +@ElogDetailTable(module = ElogConsts.BASE_TABLE) @ApiModel("值变化实体类") -public class LoggerDetailContext { +public class LoggerDetailContext implements Serializable { + private static final long serialVersionUID = 15869325700230992L; + + @ElogField(comment = "ID", dataType = DataTypeEnum.BIGINT, isKey = true) + @ApiModelProperty("ID") + private long id; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36,comment = "日志UUID") @ApiModelProperty("同一个bean转换的数据,uuid相同,作为区分标识") - private String uuid; + private String uuid = ""; + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36,comment = "主表id") + @ApiModelProperty("主表id") + private String mainid = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50,comment = "数据id") + @ApiModelProperty("数据id") + private String dataid = ""; + + /** + * 当作为主表,belongDataId不赋值 + */ + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50,comment = "主表数据id") + @ApiModelProperty("主表数据id") + private String belongDataid = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200,comment = "表名") @ApiModelProperty("表名") - private String tableName; + private String tableName =""; + @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue = "-1", length = 50,comment = "表名labelid") + @ApiModelProperty("表名labelid") + private String tableNameLabelId = "-1"; + @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue="",isNull = false,length = 50,comment = "对应数据库的表") + @ApiModelProperty("对应数据库的表") + private String tableNameDesc = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200,comment = "字段名") @ApiModelProperty("字段名") - private String fieldName; + private String fieldName =""; + @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue = "-1", length = 50,comment = "字段名labelid") + @ApiModelProperty("字段名labelid") + private String fieldNameLabelId = "-1"; + + @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新后的值") @ApiModelProperty("更新后的值") - private String newValue; + private String newValue = ""; + @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新前的值") @ApiModelProperty("更新前的值") - private String oldValue; + private String oldValue = ""; + @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新后的显示值") + @ApiModelProperty("更新后的显示值") + private String newRealValue = ""; + + @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新前的显示值") + @ApiModelProperty("更新前的显示值") + private String oldRealValue = ""; + + @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "字段名") @ApiModelProperty("字段描述") - private String fieldDesc; + private String fieldDesc = ""; + @ElogField(dataType = DataTypeEnum.INT, comment = "字段名") @ApiModelProperty("字段展示顺序") - private int showorder; + private int showorder = 0; @ApiModelProperty("自定义字段") private T customDetailInfo; + @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "创建时间") + @ApiModelProperty("创建时间") + private Date create_time; + + @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "修改时间") + @ApiModelProperty("修改时间") + private Date update_time; + + @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "创建人id") + @ApiModelProperty("创建人id") + private long creator; + + @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0" , comment = "是否删除") + @ApiModelProperty("是否删除") + private int delete_type; + + @ElogField(dataType = DataTypeEnum.VARCHAR,length = 10,comment = "租户id") + @ApiModelProperty("租户id") + private String tenant_key = ""; + + @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0" , comment = "是否明细字段") + @ApiModelProperty("是否明细字段") + private int isDetail = 0; + + + private String cusValus; + + public String getCusValus() { + return cusValus; + } + + public void setCusValus(String cusValus) { + this.cusValus = cusValus; + } + + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getMainid() { + return mainid; + } + + public void setMainid(String mainid) { + this.mainid = mainid; + } + public String getUuid() { return uuid; } @@ -99,4 +206,111 @@ public class LoggerDetailContext { public void setCustomDetailInfo(T customDetailInfo) { this.customDetailInfo = customDetailInfo; } + + public String getDataid() { + return dataid; + } + + public void setDataid(String dataid) { + this.dataid = dataid; + } + + public String getBelongDataid() { + return belongDataid; + } + + public void setBelongDataid(String belongDataid) { + this.belongDataid = belongDataid; + } + + public Date getCreate_time() { + return create_time; + } + + public void setCreate_time(Date create_time) { + this.create_time = create_time; + } + + public Date getUpdate_time() { + return update_time; + } + + public void setUpdate_time(Date update_time) { + this.update_time = update_time; + } + + public long getCreator() { + return creator; + } + + public void setCreator(long creator) { + this.creator = creator; + } + + public int getDelete_type() { + return delete_type; + } + + public void setDelete_type(int delete_type) { + this.delete_type = delete_type; + } + + public String getTenant_key() { + return tenant_key; + } + + public void setTenant_key(String tenant_key) { + this.tenant_key = tenant_key; + } + + public int getIsDetail() { + return isDetail; + } + + public void setIsDetail(int isDetail) { + this.isDetail = isDetail; + } + + public String getNewRealValue() { + return newRealValue; + } + + public void setNewRealValue(String newRealValue) { + this.newRealValue = newRealValue; + } + + public String getOldRealValue() { + return oldRealValue; + } + + public void setOldRealValue(String oldRealValue) { + this.oldRealValue = oldRealValue; + } + + public String getTableNameLabelId() { + return tableNameLabelId; + } + + public void setTableNameLabelId(String tableNameLabelId) { + this.tableNameLabelId = tableNameLabelId; + } + + public String getFieldNameLabelId() { + return fieldNameLabelId; + } + + public void setFieldNameLabelId(String fieldNameLabelId) { + this.fieldNameLabelId = fieldNameLabelId; + } + + public String getTableNameDesc() { + return tableNameDesc; + } + + public void setTableNameDesc(String tableNameDesc) { + this.tableNameDesc = tableNameDesc; + } + + + } diff --git a/src/com/engine/salary/elog/dto/TableChangeBean.java b/src/com/engine/salary/elog/dto/TableChangeBean.java index 86cfdb0c3..463d9dd73 100644 --- a/src/com/engine/salary/elog/dto/TableChangeBean.java +++ b/src/com/engine/salary/elog/dto/TableChangeBean.java @@ -3,6 +3,8 @@ package com.engine.salary.elog.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + /** * @ClassName: TableChangeBean * @Description 表更新前后值类 @@ -10,11 +12,22 @@ import io.swagger.annotations.ApiModelProperty; * @Date 2021/3/8 15:58 */ @ApiModel("表更新前后值类") -public class TableChangeBean { +public class TableChangeBean implements Serializable { + + private static final long serialVersionUID = 15869325700230992L; @ApiModelProperty("表名") private String tableName; + @ApiModelProperty("数据id") + private String dataid; + + @ApiModelProperty("所属主表数据id") + private String belongDataid; + + @ApiModelProperty("是否为明细表(0,否;1,是)") + private int isDetail = 0; + /** * 泛型必须是具体的实体类 */ @@ -27,6 +40,29 @@ public class TableChangeBean { @ApiModelProperty("更新后的值") private T newValue; + /** + * 泛型必须是具体的实体类 + */ + @ApiModelProperty("更新前显示的值") + private T oldRealValue; + + /** + * 泛型必须是具体的实体类 + */ + @ApiModelProperty("更新后显示的值") + private T newRealValue; + + + @ApiModelProperty("字段对应的labelid") + private String fieldNameLabelId; + + @ApiModelProperty("表对应的labelid") + private String tableNameLabelId; + + @ApiModelProperty("对应数据库的表") + private String tableNameDesc; + + public String getTableName() { return tableName; } @@ -50,4 +86,68 @@ public class TableChangeBean { public void setNewValue(T newValue) { this.newValue = newValue; } + + public String getDataid() { + return dataid; + } + + public void setDataid(String dataid) { + this.dataid = dataid; + } + + public String getBelongDataid() { + return belongDataid; + } + + public void setBelongDataid(String belongDataid) { + this.belongDataid = belongDataid; + } + + public int getIsDetail() { + return isDetail; + } + + public void setIsDetail(int isDetail) { + this.isDetail = isDetail; + } + + public T getOldRealValue() { + return oldRealValue; + } + + public void setOldRealValue(T oldRealValue) { + this.oldRealValue = oldRealValue; + } + + public T getNewRealValue() { + return newRealValue; + } + + public String getFieldNameLabelId() { + return fieldNameLabelId; + } + + public void setFieldNameLabelId(String fieldNameLabelId) { + this.fieldNameLabelId = fieldNameLabelId; + } + + public String getTableNameLabelId() { + return tableNameLabelId; + } + + public void setTableNameLabelId(String tableNameLabelId) { + this.tableNameLabelId = tableNameLabelId; + } + + public String getTableNameDesc() { + return tableNameDesc; + } + + public void setTableNameDesc(String tableNameDesc) { + this.tableNameDesc = tableNameDesc; + } + + public void setNewRealValue(T newRealValue) { + this.newRealValue = newRealValue; + } } diff --git a/src/com/engine/salary/elog/dto/TableColumnBean.java b/src/com/engine/salary/elog/dto/TableColumnBean.java index e4c635cd0..cf8609c61 100644 --- a/src/com/engine/salary/elog/dto/TableColumnBean.java +++ b/src/com/engine/salary/elog/dto/TableColumnBean.java @@ -25,7 +25,7 @@ public class TableColumnBean { private String dataTypeStr; @ApiModelProperty("字段类型") - private DateTypeEnum dataType; + private DataTypeEnum dataType; @ApiModelProperty("长度") private long fieldLength; @@ -58,11 +58,11 @@ public class TableColumnBean { this.columnType = columnType; } - public DateTypeEnum getDataType() { + public DataTypeEnum getDataType() { return dataType; } - public void setDataType(DateTypeEnum dataType) { + public void setDataType(DataTypeEnum dataType) { this.dataType = dataType; } diff --git a/src/com/engine/salary/elog/enums/ElogConsts.java b/src/com/engine/salary/elog/enums/ElogConsts.java new file mode 100644 index 000000000..a895b95b8 --- /dev/null +++ b/src/com/engine/salary/elog/enums/ElogConsts.java @@ -0,0 +1,22 @@ +package com.engine.salary.elog.enums; + +/** + * @date: 2022/3/30 20:32 + * @author: deli.xu + * @description: 日志常量 + */ +public class ElogConsts { + + public static final String ORACLE = "oracle"; + public static final String SQLSERVER = "sqlserver"; + public static final String MYSQL = "mysql"; + public static final String POSTGRESQL = "postgresql"; + + public static final String BASE_TABLE = "BASE_ELOG_TABLE"; + + public static final String TABLE_SPACER = "_"; + public static final String TABLE_SUFFIX = "logs"; + public static final String DETAIL_TABLE_SUFFIX = "_detail"; + + public static final String ES = "ES"; +} diff --git a/src/com/engine/salary/elog/enums/FromTerminalType.java b/src/com/engine/salary/elog/enums/FromTerminalType.java new file mode 100644 index 000000000..d637bb0f9 --- /dev/null +++ b/src/com/engine/salary/elog/enums/FromTerminalType.java @@ -0,0 +1,48 @@ +package com.engine.salary.elog.enums; + +/** + * @ClassName: FromTerminalType + * @Description TODO + * @Author tanghj + * @Date 2021/6/8 11:35 + */ +public enum FromTerminalType { + PC("pc","来自 pc web"), + ANDROID("android","来自 安卓"), + IOS("ios","来自 iphone"), + IPHONE("iphone","来自 iphone"), + PC_CLIENT("pc_client","来自 windows客户端"), + MAC_CLIENT("mac_client","来自 mac客户端"), + H5("H5","来自 手机H5"), + MOBILEWEB("mobileWeb","来自 手机H5"), + MICO_MSG("mico_msg","来自 微信"), + WECHAT("wechat","来自 企业微信"), + APP_H5("app_h5","来自 app_h5"), + BROWSER("browser", "来自 网页"), + MOBILE("mobile","来自 移动端"); + + private String code; + private String face; + + FromTerminalType(String code, String face) { + this.code = code; + this.face = face; + } + + public String getCode() { + return code; + } + + public String getFace() { + return face; + } + + public static FromTerminalType fromString(String name) { + try { + FromTerminalType type = FromTerminalType.valueOf(name); + return type; + } catch (Exception e) { + return null; + } + } +} diff --git a/src/com/engine/salary/elog/enums/LinkType.java b/src/com/engine/salary/elog/enums/LinkType.java new file mode 100644 index 000000000..ff78362f0 --- /dev/null +++ b/src/com/engine/salary/elog/enums/LinkType.java @@ -0,0 +1,173 @@ +package com.engine.salary.elog.enums; + +/** + * @date: 2022/5/13 21:13 + * @author: deli.xu + * @description: 链接类型 用之前老eteams-base-bean + */ + +/** + * 链接类型 + * + * @author gk + */ +public enum LinkType { + + // 主线 + mainline("项目"), + + blog("工作日报"), + + workreport("计划报告"), + + clue("线索"), + + crmcontact("联系人-用于全局搜索"), + + marketactivity("活动"), + + crmSummary("报表"), + + statisticalReport("统计报表"), + + attend("出勤"), + + singalForm("表单应用"), + + biaoge("表格"), + + // 标签 + tag("标签"), + + // 表单标签 + formtag("表单标签"), + + // 附件 + attachment("附件"), + + // 用户 + user("用户"), + + // 任务 + task("任务"), + + // 子任务 + subtask("子任务"), + + // 文档 + document("文档"), + + // 文件夹 + folder("文件夹"), + + // 客户 + customer("客户"), + + // 联系人 + contact("联系人"), + + // 销售商机 + saleChance("销售商机"), + + // 产品 + production("产品"), + + // 合同 + contract("合同"), + + // 竞争对手 + competitor("竞争对手"), + + // 公告 + placard("公告"), + + // 审批 + workflow("审批"), + + // 部门 + department("部门"), + + // 岗位 + position("岗位"), + + // 日程 + calendar("日程"), + + // 群组 + group("群组"), + + // 合同 + hrcontract("人事合同"), + + //人事管理 + hr("人事"), + + //KPI + kpi("绩效考核"),kpiFlow("绩效考核流程"), + + // 全部 + all("所有人"), + + formdatareport("数据上报"), + + form("表单"), + + userSetting("不可见成员"), + + sms("短信"), + + wechatEnterprise("企业微信"), + + wechatService("微信服务号"), + + salarybill("工资单"), + + staffPosition("员工位置")/*定制化模块*/, + + app("应用")/*自定义应用*/, + + email("邮件"), + + workTrends("工作动态"), + + tenantLogo("个性化定制"), + + module("模块"), + + orderform("订单"), + + price("价格"), + + capital("资金"), + + quote("报价"), + + room("会议室管理"), + + //模板任务 + mtTask("模板任务"), + + watchMe("关注我的"), + // crm + crm("CRM"), + + // 空 + blank(""), + + role("角色"), + + externalUser("外部联系人"), + + subcompany("分部"); + + private String displayName; + + LinkType(String displayName) { + this.displayName = displayName; + } + + public String getDisplayName() { + return displayName; + } + +} diff --git a/src/com/engine/salary/elog/enums/OperateAuditType.java b/src/com/engine/salary/elog/enums/OperateAuditType.java new file mode 100644 index 000000000..5d3850c38 --- /dev/null +++ b/src/com/engine/salary/elog/enums/OperateAuditType.java @@ -0,0 +1,14 @@ +package com.engine.salary.elog.enums; + +public class OperateAuditType { + //自动 + public static final String AUTO = "AUTO"; + //信息 + public static final String INFO = "INFO"; + //错误 + public static final String ERROR = "ERROR"; + //警告 + public static final String WARNING = "WARNING"; + //重大事件 + public static final String EVENT = "EVENT"; +} \ No newline at end of file diff --git a/src/com/engine/salary/elog/service/ApplicationContextProvider.java b/src/com/engine/salary/elog/service/ApplicationContextProvider.java deleted file mode 100644 index d1bc541d4..000000000 --- a/src/com/engine/salary/elog/service/ApplicationContextProvider.java +++ /dev/null @@ -1,67 +0,0 @@ -//package com.engine.salary.elog.service; -// -//import org.springframework.beans.BeansException; -//import org.springframework.context.ApplicationContext; -//import org.springframework.context.ApplicationContextAware; -//import org.springframework.stereotype.Component; -// -///** -// * 获取Spring上下文 -// * -// * @author tanghj -// * @date on 2020-10-19 -// */ -// -//public class ApplicationContextProvider implements ApplicationContextAware { -// /** -// * 上下文对象实例 -// */ -// private static ApplicationContext applicationContext; -// -// @Override -// public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { -// this.applicationContext = applicationContext; -// } -// -// /** -// * 获取applicationContext -// * -// * @return -// */ -// public static ApplicationContext getApplicationContext() { -// return applicationContext; -// } -// -// /** -// * 通过name获取 Bean. -// * -// * @param name -// * @return -// */ -// public static Object getBean(String name) { -// return getApplicationContext().getBean(name); -// } -// -// /** -// * 通过class获取Bean. -// * -// * @param clazz -// * @param -// * @return -// */ -// public static T getBean(Class clazz) { -// return getApplicationContext().getBean(clazz); -// } -// -// /** -// * 通过name,以及Clazz返回指定的Bean -// * -// * @param name -// * @param clazz -// * @param -// * @return -// */ -// public static T getBean(String name, Class clazz) { -// return getApplicationContext().getBean(name, clazz); -// } -//} diff --git a/src/com/engine/salary/elog/service/ILocalElogService.java b/src/com/engine/salary/elog/service/ILocalElogService.java new file mode 100644 index 000000000..9d721b69c --- /dev/null +++ b/src/com/engine/salary/elog/service/ILocalElogService.java @@ -0,0 +1,13 @@ +package com.engine.salary.elog.service; + +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; + +public interface ILocalElogService { + + int insertLocalElog(LoggerContext context); + + int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName); + +// void rollBackElog(LoggerContext context); +} diff --git a/src/com/engine/salary/elog/service/LocalElogService.java b/src/com/engine/salary/elog/service/LocalElogService.java deleted file mode 100644 index a9a368533..000000000 --- a/src/com/engine/salary/elog/service/LocalElogService.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.engine.salary.elog.service; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; -import com.engine.salary.mapper.elog.LocalElogDaoMapper; -import com.engine.salary.util.db.MapperProxyFactory; -import org.apache.commons.lang3.StringUtils; - -import java.util.Set; -import java.util.UUID; - -/** - * @ClassName: LocalElogService - * @Description TODO - * @Author tanghj - * @Date 2021/2/24 11:03 - */ -public class LocalElogService { - - private LocalElogDaoMapper getLocalElogDaoMapper() { - return MapperProxyFactory.getProxy(LocalElogDaoMapper.class); - } - - public int insertLocalElog(LoggerContext context) { - if (StringUtils.isEmpty(context.getUuid())) { - context.setUuid(UUID.randomUUID().toString().replace("-", "")); - } - - String cusColumns = ""; - String cusValus = ""; - if (context.getCustomInfo() != null) { - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(context.getCustomInfo())); - - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - cusValus = cusValus + ",'" + custom.getString(key) + "'"; - } - - } - - String params = context.getParams() == null ? null : JSONObject.toJSONString(context.getParams()); - - String tableName = context.getModuleName() + "_" + context.getFunctionName() + "logs"; - - getLocalElogDaoMapper().insertElogContext(context, params, cusColumns, cusValus, tableName); - if (context.getDetailContexts() != null) { - String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; - for (LoggerDetailContext detailContext : context.getDetailContexts()) { - insertElogDetail(detailContext, context.getUuid(), detailTableName); - } - - } - - return 1; - } - - private int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName) { - String cusColumns = ""; - String cusValus = ""; - if (loggerDetailContext.getCustomDetailInfo() != null) { - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(loggerDetailContext.getCustomDetailInfo())); - - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - cusValus = cusValus + ",'" + custom.getString(key) + "'"; - } - } - getLocalElogDaoMapper().insertElogDetail(loggerDetailContext, mainId, cusColumns, cusValus, detailTableName); - return 1; - } - -} diff --git a/src/com/engine/salary/elog/service/impl/LocalElogService.java b/src/com/engine/salary/elog/service/impl/LocalElogService.java new file mode 100644 index 000000000..d12163a29 --- /dev/null +++ b/src/com/engine/salary/elog/service/impl/LocalElogService.java @@ -0,0 +1,435 @@ +package com.engine.salary.elog.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.enums.ElogConsts; +import com.engine.salary.elog.service.ILocalElogService; +import com.engine.salary.elog.util.ElogUtils; +import com.engine.salary.mapper.elog.LocalElogAopDaoMapper; +import com.engine.salary.util.db.MapperProxyFactory; +import dm.jdbc.util.IdGenerator; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.CollectionUtils; +import weaver.conn.RecordSet; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +/** + * @ClassName: LocalElogService + * @Description 日志本地持久化 + * @Author tanghj + * @Date 2021/2/24 11:03 + */ +public class LocalElogService implements ILocalElogService { + + private static final Logger logger = LoggerFactory.getLogger(LocalElogService.class); + + private LocalElogAopDaoMapper getLocalElogAopDaoMapper() { + return MapperProxyFactory.getProxy(LocalElogAopDaoMapper.class); + } + +// private RestHighLevelClient client; +// +// private LazyRollBack lazyRollBack; + + //数据库类型 + private static final String databaseId = new RecordSet().getDBType(); + + /** + * @param context + * @param + * @return + */ + @Override + public int insertLocalElog(LoggerContext context) { +// logger.error("接收到的数据,context:{}",JSONObject.toJSONString(context)); +// logger.info("接收到数据的时间:log_date:{}",context.getDate()); + if (StringUtils.isEmpty(context.getUuid())) { + context.setUuid(UUID.randomUUID().toString().replace("-", "")); + } + + String cusColumns = ""; + String cusValus = ""; + if (context.getCustomInfo() != null) { + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(context.getCustomInfo())); + List clobFieldList = context.getClobFieldList(); + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + String keystr = custom.getString(key); + //如果keystr包含单引号,将单引号去掉 + if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { + keystr = keystr.replace("'", "''"); + } + //如果是Oracle数据库 + if (ElogConsts.ORACLE.equals(databaseId)) { + //clob字段集合不为空且包含此字段 + if (!CollectionUtils.isEmpty(clobFieldList) && clobFieldList.contains(key)) { + String clobColumnStr = ElogUtils.handleClobColumn(keystr); + cusValus = cusValus + ",TO_CLOB( " + clobColumnStr + " )"; + } else if (checkStrIsDate(keystr)) { + //并且字符串为时间类型格式 则进行特殊处理 + cusValus = cusValus + ",TO_DATE('" + keystr + "', 'SYYYY-MM-DD HH24:MI:SS')"; + } else { + cusValus = cusValus + ",'" + keystr + "'"; + } + } else { + cusValus = cusValus + ",'" + keystr + "'"; + } + } + + } + + normalizationContext(context); + + String tableName = context.getModuleName() + "_" + context.getFunctionName() + "logs"; + //context.setId(IdGenerator.generate()); + Integer id = getLocalElogAopDaoMapper().queryElogContextById(context.getId(), tableName); + if (id != null) { + return 1; + } +// logger.info("插入前的数据:context:{}",JSONObject.toJSONString(context)); + int count = getLocalElogAopDaoMapper().insertElogContext(context, cusColumns, cusValus, tableName); + if (context.getDetailContexts() != null) { + String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; + insertBatchDetailPrepared(detailTableName, context); + + } + return count; + } + + /** + * 预编译 + * + * @param detailTableName + * @param context + */ + private void insertBatchDetailPrepared(String detailTableName, LoggerContext context) { + // 用mapper + //分两种 有无自定义字段 + List detailContexts = context.getDetailContexts(); + Boolean hasCustonInfo = false; + String cusColumns = ""; + if (Objects.nonNull(detailContexts.get(0).getCustomDetailInfo())) { + hasCustonInfo = true; + //有自定义明细字段 + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContexts.get(0).getCustomDetailInfo())); + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + } + + } + for (LoggerDetailContext detailContext : detailContexts) { + if (StringUtils.isNotEmpty(detailContext.getNewValue())) { + String str = detailContext.getNewValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); + detailContext.setNewValue(str); + } + if (StringUtils.isNotEmpty(detailContext.getOldValue())) { + String str = detailContext.getOldValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); + detailContext.setOldValue(str); + } + if (StringUtils.isNotEmpty(detailContext.getNewRealValue())) { + String str = detailContext.getNewRealValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); + detailContext.setNewRealValue(str); + } + if (StringUtils.isNotEmpty(detailContext.getOldRealValue())) { + String str = detailContext.getOldRealValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); + detailContext.setOldRealValue(str); + } + + + detailContext.setTenant_key(context.getTenant_key()); + detailContext.setCreate_time(new Date()); + detailContext.setUpdate_time(new Date()); + detailContext.setCreator(context.getLogOperator()); + detailContext.setId(IdGenerator.generate()); + if (hasCustonInfo) { + String cusValus = ""; + //如果有明细 + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContext.getCustomDetailInfo())); + for (String key : (Set) custom.keySet()) { + String keystr = custom.getString(key); + //如果keystr包含单引号,将单引号去掉 + if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { + keystr = keystr.replace("'", "''"); + } + cusValus = cusValus + ",'" + keystr + "'"; + } + detailContext.setCusValus(cusValus); + } + } + + + if (hasCustonInfo) { + getLocalElogAopDaoMapper().insertElogDetailPreparedHasCustonInfo(detailTableName, detailContexts, context.getUuid(), cusColumns); + } else { + getLocalElogAopDaoMapper().insertElogDetailPrepared(detailTableName, detailContexts, context.getUuid()); + } + } + + + private void normalizationContext(LoggerContext context) { + String params = ""; + if (StringUtils.isNotEmpty(context.getParamsStr())) { + params = context.getParamsStr(); + } else if (context.getParams() != null) { + params = ElogUtils.compress(JSONObject.toJSONString(context.getParams())); + } + + context.setParamsStr(params); + if (StringUtils.isBlank(context.getCancelContextStr())) { + context.setCancelContextStr(context.getCancelContext() == null ? "" : JSONObject.toJSONString(context.getCancelContext())); + } + if (StringUtils.isBlank(context.getRedoContextStr())) { + context.setRedoContextStr(context.getRedoContext() == null ? "" : JSONObject.toJSONString(context.getRedoContext())); + } + + if (StringUtils.isEmpty(context.getOperatedesc())) { + context.setOperatedesc(""); + } else { + //todo 兼容emojo特殊字符 没有时间 先暴力替换 + String str = context.getOperatedesc().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); + context.setOperatedesc(str); + } + + if (Objects.isNull(context.getDate())) { + context.setDate(new Date()); + } + + if (StringUtils.isEmpty(context.getOperator())) { + context.setLogOperator(-1l); + } else { + context.setLogOperator(Long.parseLong(context.getOperator())); + } + if (StringUtils.isEmpty(context.getTargetId())) { + context.setLogTargetid(-1l); + } else { + context.setLogTargetid(Long.parseLong(context.getTargetId())); + } + if (StringUtils.isEmpty(context.getClientIp())) { + context.setClientIp("127.0.0.1"); + } + if (Objects.isNull(context.getCreate_time())) { + context.setCreate_time(new Date()); + } + if (Objects.isNull(context.getUpdate_time())) { + context.setUpdate_time(new Date()); + } + if (Objects.isNull(context.getDelete_type())) { + context.setDelete_type(0); + } + } + + private void insertBatchDetailSql(String detailTableName, LoggerContext context) { + String standardField = "id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, oldRealValue,tableNameDesc, tableNameLabelId,fieldNameLabelId, create_time, update_time"; + + Boolean hasCustonInfo = false; + StringBuilder sb = new StringBuilder(); + sb.append("INSERT INTO ").append(detailTableName).append("(").append(standardField); + //List collect = detailContexts.stream().filter(s -> Objects.nonNull(s.getCustomDetailInfo())).collect(Collectors.toList()); + List detailContexts = context.getDetailContexts(); + if (Objects.nonNull(detailContexts.get(0).getCustomDetailInfo())) { + hasCustonInfo = true; + //有自定义明细字段 + String cusColumns = ""; + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContexts.get(0).getCustomDetailInfo())); + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + } + sb.append(cusColumns); + } + sb.append(")"); + if ("oracle".equalsIgnoreCase(databaseId)) { + sb.append(" ").append(String.join(" UNION ALL ", getBatchInsertValue(context, hasCustonInfo, true))); + } else { + sb.append(" VALUES ").append(String.join(",", getBatchInsertValue(context, hasCustonInfo, false))); + } + + try { + getLocalElogAopDaoMapper().batchInsertDetail(sb.toString()); + } catch (Exception e) { + logger.error("明细批量添加sql是:{},批量插入明细失败,{}", sb.toString(), e.getMessage(), e); + } + + + } + + + private List getBatchInsertValue(LoggerContext context, boolean hasCustomInfo, boolean isOracle) { + + LocalDateTime localDateTime = LocalDateTime.now(); + String nowDate = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + List detailContexts = context.getDetailContexts(); + List batchValue = new ArrayList<>(); + for (LoggerDetailContext detailContext : detailContexts) { + detailContext.setTenant_key(context.getTenant_key()); + detailContext.setCreator(context.getLogOperator()); + detailContext.setId(IdGenerator.generate()); + + StringBuilder sb = new StringBuilder(); + sb.append(isOracle ? " SELECT " : " ( "); + sb.append(detailContext.getId()) + .append(",'").append(context.getUuid()).append("'") + .append(",'").append(detailContext.getUuid()).append("'") + .append(",'").append(detailContext.getTableName()).append("'") + .append(",'").append(detailContext.getFieldName()).append("'") + .append(",'").append(transferString(detailContext.getNewValue())).append("'") + .append(",'").append(transferString(detailContext.getOldValue())).append("'") + .append(",'").append(detailContext.getFieldDesc()).append("'") + .append(",'").append(detailContext.getShoworder()).append("'") + .append(",'").append(detailContext.getDataid()).append("'") + .append(",'").append(detailContext.getBelongDataid()).append("'") + .append(",'").append(detailContext.getIsDetail()).append("'") + .append(",'").append(detailContext.getTenant_key()).append("'") + .append(",'").append(detailContext.getCreator()).append("'") + .append(",'").append(transferString(detailContext.getNewRealValue())).append("'") + .append(",'").append(transferString(detailContext.getOldRealValue())).append("'") + .append(",'").append(detailContext.getTableNameDesc()).append("'") + .append(",'").append(detailContext.getTableNameLabelId()).append("'") + .append(",'").append(detailContext.getFieldNameLabelId()).append("'") + .append(",").append(handleValue(nowDate, databaseId)) + .append(",").append(handleValue(nowDate, databaseId)); + + if (hasCustomInfo) { + String cusValus = ""; + //如果有明细 + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContext.getCustomDetailInfo())); + for (String key : (Set) custom.keySet()) { + String keystr = custom.getString(key); + //如果keystr包含单引号,将单引号去掉 + if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { + keystr = keystr.replace("'", "''"); + } + cusValus = cusValus + ",'" + keystr + "'"; + } + sb.append(cusValus); + } + String sql = isOracle ? sb.append(" from dual ").toString() : sb.append(")").toString(); + + batchValue.add(sql); + } + + return batchValue; + } + + private String transferString(String str) { + if (StringUtils.isNotEmpty(str)) { + str = str.replaceAll("#\\{", "\\\\\\\\#{"); + if (str.contains("'")) { + str = str.replace("'", "''"); + } + } + return str; + } + + + private String handleValue(String nowDate, String databaseId) { + switch (databaseId) { + case "mysql": + return "'" + nowDate + "'"; + case "oracle": + return "TO_DATE('" + nowDate + "','YYYY-MM-DD HH24:MI:SS')"; + case "sqlserver": + return "'" + nowDate + "'"; + case "postgresql": + return "'" + nowDate + "'"; + + } + return nowDate; + } + +// private void insertESElogCenter(LoggerContext context, String customInfo, String tableName) { +// //将数据转换为ES的数据格式 +// LogESDoc logESDoc = LogESDoc.context2Doc(context, customInfo, tableName); +// String json = JSON.toJSONString(logESDoc); +// String elogESTableName = ElogEsUtils.getElogESTableName(true, ElogEsUtils.getDateStr(context.getDate())); +// IndexRequest indexRequest = new IndexRequest(elogESTableName).id(logESDoc.getId().toString()); +// indexRequest.source(json, XContentType.JSON); +// +// try { +// client.index(indexRequest, RequestOptions.DEFAULT); +// } catch (IOException e) { +//// logger.info("主表数据添加失败:{}",e.getMessage()); +// } +// } + + + @Override + public int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName) { + String cusColumns = ""; + String cusValus = ""; + if (loggerDetailContext.getCustomDetailInfo() != null) { + JSONObject custom = JSONObject.parseObject(JSON.toJSONString(loggerDetailContext.getCustomDetailInfo())); + + for (String key : (Set) custom.keySet()) { + cusColumns = cusColumns + ", " + key; + String keystr = custom.getString(key); + //如果keystr包含单引号,将单引号去掉 + if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { + keystr = keystr.replace("'", "''"); + } + cusValus = cusValus + ",'" + keystr + "'"; + } + } + loggerDetailContext.setId(IdGenerator.generate()); + return getLocalElogAopDaoMapper().insertElogDetail(loggerDetailContext, mainId, cusColumns, cusValus, detailTableName); + + } + +// @Override +// public void rollBackElog(LoggerContext context) { +// //根据ID 判断数据是否存在 +// +// String tableName = getElogTableName(context.getModuleName(), context.getFunctionName()); +// Integer id = getLocalElogAopDaoMapper().queryElogContextById(context.getId(), tableName); +// //没查到就直接返回 +// if (id == null) { +// lazyRollBack.delayedRollBack(context); +// return; +// } +// getLocalElogAopDaoMapper().rollBackElogById(context.getId(), tableName); +// +//// if (context.getDetailContexts() != null) { +// String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; +// //根据uuid回滚 +// getLocalElogAopDaoMapper().rollBackDetailElogByUUID(context.getUuid(), detailTableName); +//// } +// +// +// } + + /** + * 判断字符串是否为日期格式 + */ + public static Boolean checkStrIsDate(String str) { + if (StringUtils.isBlank(str)) { + return false; + } else { + try { + LocalDateTime.parse(str, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + return true; + } catch (Exception e) { + return false; + } + } + } + + private String getElogTableName(String moduleName, String functionName) { + +// List list = Arrays.asList("meetingTopic", "meetingService", "meetingDecision", "meetingSign", "meetingSignSet", "meetingMember", "meetingShare"); + +// if (list.contains(moduleName)) { +// return "meeting"+ "_" + functionName + "logs"; +// } + + return moduleName + "_" + functionName + "logs"; + + } + +} diff --git a/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java b/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java new file mode 100644 index 000000000..81eb070f0 --- /dev/null +++ b/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java @@ -0,0 +1,75 @@ +package com.engine.salary.elog.threadlocal; + +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.LoggerContext; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Date: 2022/5/18 20:26 + * @Author: deli.xu + * @Description: + **/ +public class ElogThreadLocal { + + private static final ThreadLocal> loggerContextList = new ThreadLocal<>(); + private static final ThreadLocal requestBody = new ThreadLocal<>(); + + public static LoggerContext currentLoggerContext() { + List list = loggerContextList.get(); + + if(list == null || list.size() == 0) { + return null; + } else { + return list.get(list.size() -1); + } + } + + public static void addLoggerContext(LoggerContext loggerContext) { + if(loggerContext == null) + return; + List list = loggerContextList.get(); + if(list == null) { + list = new ArrayList<>(); + loggerContextList.set(list); + } + + list.add(loggerContext); + + } + + public static List getLoggerContextList() { + return loggerContextList.get(); + } + + public static void clear() { + loggerContextList.set(null); + } + + public static void removeLast() { + List list = loggerContextList.get(); + + if(list != null) { + int size = list.size(); + if(size > 0) + list.remove(size - 1); + } + } + + public static void remove() { + loggerContextList.remove(); + } + + public static JSONObject getRequestBody() { + return requestBody.get(); + } + + public static void setRequestBody(JSONObject json) { + requestBody.set(json); + } + + public static void removeRequestBody() { + requestBody.remove(); + } +} diff --git a/src/com/engine/salary/elog/util/ElogUtils.java b/src/com/engine/salary/elog/util/ElogUtils.java index d2203f7ab..5e792fbdd 100644 --- a/src/com/engine/salary/elog/util/ElogUtils.java +++ b/src/com/engine/salary/elog/util/ElogUtils.java @@ -1,6 +1,27 @@ package com.engine.salary.elog.util; -import com.engine.salary.elog.dto.DateTypeEnum; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.enums.FromTerminalType; +import com.engine.salary.elog.threadlocal.ElogThreadLocal; +import org.apache.commons.lang3.StringUtils; +import org.apache.dubbo.common.utils.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; /** * @ClassName: ElogUtils @@ -8,25 +29,44 @@ import com.engine.salary.elog.dto.DateTypeEnum; * @Author tanghj * @Date 2021/3/12 14:17 */ +@Component public class ElogUtils { + private static final Logger logger = LoggerFactory.getLogger(ElogUtils.class); + + + private static final String TABLE_SPACER = "_"; private static final String TABLE_SUFFIX = "logs"; - private static final String DETAIL_TABLE_SUFFIX = "detail"; + private static final String DETAIL_TABLE_SUFFIX = "_detail"; public static final String BASE_TABLE = "BASE_ELOG_TABLE"; + public String getApplicationName() { + return applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + +// @Value("${spring.application.name}") + public static String applicationName; + + public static String getTableName(String module, String function) { return getTableName(module, function, false); } - public static String getTableName(String module, String function, boolean isDetail){ - - return module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); + public static String getTableName(String module, String function, boolean isDetail) { + String tablename = module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); +// SecurityUtil.sqlCheck(tablename); + return tablename; } /** * String 转枚举 + * * @param c * @param string * @param @@ -42,9 +82,706 @@ public class ElogUtils { return null; } - public static void main(String[] args) { - System.out.println(DateTypeEnum.BIGINT.name()); - DateTypeEnum columnTypeEnum = getEnumFromString(DateTypeEnum.class, "varchar"); - System.out.println(columnTypeEnum.equals(DateTypeEnum.VARCHAR)); + /** + * 获取ip地址 + * + * @param request + * @return + */ + public static String getIp(HttpServletRequest request) { + String ipAddress = request.getHeader("x-forwarded-for"); + String unknown = "unknown"; + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + String benji = "127.0.0.1"; + String bj = "0:0:0:0:0:0:0:1"; + if (benji.equals(ipAddress) || bj.equals(ipAddress)) { + ///根据网卡取本机配置的IP + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + logger.error("UnknownHostException", e); + } + if (inet != null) { + ipAddress = inet.getHostAddress(); + } + } + } + ///对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + int i = 15; + String s = ","; + if (ipAddress != null && ipAddress.length() > i) { + if (ipAddress.indexOf(s) > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + return ipAddress; } + + /** + * 获取设备信息 + * + * @param request + * @return + */ + public static String getDevice(HttpServletRequest request) { + return request.getHeader("User-Agent"); + } + + /** + * 获取来自终端的信息 + * + * @param context + * @param request + * @return + */ + public static void getFromTerminal(LoggerContext context, HttpServletRequest request) { + String fromTerminal = context.getFromTerminal(); + if (StringUtils.isEmpty(fromTerminal)) { + String device = getDevice(request); + String setFT = ""; + if (StringUtils.isNotEmpty(device)) { + context.setFromTerminal(getFromTerminal(device)); + } + } + } + + public static void initRequestInfo(HttpServletRequest request, LoggerContext context) { + if (StringUtils.isEmpty(context.getRequestUrl())) { + context.setRequestUrl(getRequestUrl(request)); + } + if (StringUtils.isEmpty(context.getRequestUri())) { + context.setRequestUri(getRequestMethod(request) + ":" + getRequestUri(request)); + } + //if (context.getParams() == null) { + //默认记录params,此参数给true时 或报表服务,不记录 + if (!context.getParamsIgnore() && !applicationName.equalsIgnoreCase("weaver-edcreportd-service")) { + context.setParams(getRequstParam(request,context)); + } + // } + if (StringUtils.isEmpty(context.getClientIp())) { + context.setClientIp(getIp(request)); + } + if (StringUtils.isEmpty(context.getDevice())) { + context.setDevice(getDevice(request)); + } + if (StringUtils.isEmpty(context.getFromTerminal())) { + context.setFromTerminal(getFromTerminal(getDevice(request))); + } + if (StringUtils.isEmpty(context.getBelongMainId())) { + context.setBelongMainId(getTraceId(request)); + } + + } + + private static String getTraceId(HttpServletRequest request) { + String traceId = request.getHeader("traceId"); + if (StringUtils.isNotBlank(traceId)) { + //System.out.println("traceId:====="+traceId); + return traceId; + } + return ""; + } + + /** + * @param request + * @return localhost:9080/api/fs/demo/updateReport + */ + public static String getRequestUrl(HttpServletRequest request) { + if (Objects.isNull(request) || Objects.isNull(request.getRequestURL())) { + return null; + } + return request.getRequestURL().toString(); + } + + /** + * @param request + * @return /api/fs/demo/updateReport + */ + public static String getRequestUri(HttpServletRequest request) { + return request.getRequestURI(); + } + + /** + * @param request + * @return GET/POST + */ + public static String getRequestMethod(HttpServletRequest request) { + return request.getMethod(); + } + + public static Map getRequstParam(HttpServletRequest request, LoggerContext context) { + return request2Map(request, context); + } + + /** + * 获取当前方法中的日志实体类 + * + * @return + */ + public static LoggerContext currentElogContext() { + return ElogThreadLocal.currentLoggerContext(); + } + + public static Map request2Map(HttpServletRequest request, LoggerContext context) { + // 参数Map + Map properties = request.getParameterMap(); + // 返回值Map + Map returnMap = new HashMap(); + Iterator entries = properties.entrySet().iterator(); + Map.Entry entry; + String name = ""; + Object value = null; + while (entries.hasNext()) { + entry = (Map.Entry) entries.next(); + name = (String) entry.getKey(); + Object valueObj = entry.getValue(); + if (null == valueObj) { + value = null; + } else if (valueObj instanceof String[]) { + String[] values = (String[]) valueObj; + if (values.length == 1) { + value = values[0]; + } else { + value = values; + } + } else { + value = valueObj.toString(); + } + returnMap.put(name, value); + } + //放入ip + returnMap.put("param_ip", getIp(request)); + returnMap.put("request_header_user_agent", request.getHeader("user-agent")); + JSONObject body = ElogThreadLocal.getRequestBody(); + if (body != null) { +// returnMap.put("request_body", body); + setReturnMapBody(returnMap,context.getParamsBodyKeys(),body); + } + return returnMap; + } + + public static void setReturnMapBody(Map returnMap,List keys,JSONObject body) { + //模块没设置则全部记录 + if (CollectionUtils.isEmpty(keys)) { + returnMap.put("request_body", body); + }else { + JSONObject newBody = new JSONObject(); + for (String key : keys) { + newBody.put(key,body.get(key)); + } + returnMap.put("request_body", newBody); + } + } + + public static int getIntValue(String v) { + return getIntValue(v, -1); + } + + public static int getIntValue(String v, int def) { + try { + return Integer.parseInt(v); + } catch (Exception var3) { + return def; + } + } + + public static long getLongValue(String v) { + return getLongValue(v, -1l); + } + + public static long getLongValue(String v, long def) { + try { + return Long.parseLong(v); + } catch (Exception var3) { + return def; + } + } + + public static boolean isLongValue(String v) { + try { + Long.parseLong(v); + } catch (Exception e) { + return false; + } + return true; + } + + public static int currentLanguage() { +// String employeeId = getEmployeeId(); +// if (employeeId != null) { +// return I18nLanguageUtil.getLangId(Long.parseLong(employeeId)); +// } else { +// return 7; +// } + return 7; + } + +// /** +// * 获取request请求 +// * +// * @return +// */ +// public static HttpServletRequest getRequest() { +// return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); +// } + + /** + * 将对象转换程字符串 + * + * @param obj 目标对象 + * @param def 如果为null时的默认值 + * @return + */ + public static String null2String(Object obj, String def) { + return obj == null ? def : obj.toString(); + } + + public static String null2String(Object obj) { + return null2String(obj, ""); + } + + public static int getIntValue(Object obj, int def) { + try { + return Integer.parseInt(null2String(obj)); + } catch (Exception ex) { + return def; + } + } + +// public static Page getPage() { +// HttpServletRequest request = getRequest(); +// String num = request.getParameter("pageNum"); +// String size = request.getParameter("pageSize"); +// +// Page page = new Page(ElogUtils.getIntValue(num, 1), ElogUtils.getIntValue(size, 10)); +// return page; +// } + +// public static void main(String[] args) { +// //System.out.println(getTableName("select", "from")); +// //DataTypeEnum columnTypeEnum = getEnumFromString(DataTypeEnum.class, "varchar"); +// } + + public static List switchString(List list) { + if (list != null) { + return list.stream().map(m -> { + Set en = m.entrySet(); + for (Map.Entry entry : en) { + if (entry.getValue() != null) { + entry.setValue(String.valueOf(entry.getValue())); + } + } + return m; + }).collect(Collectors.toList()); + } else { + return list; + } + } + + public static List switchComplexString(List list) { + if (list != null) { + return list.stream().map(m -> { + Iterator iterator = m.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry next = iterator.next(); + if (next.getValue() != null) { + if (next.getValue() instanceof Map && "parmas".equals(next.getKey())) { + next.setValue(String.valueOf(next.getValue())); + } + if (next.getValue() instanceof List) { + } else { + next.setValue(String.valueOf(next.getValue())); + } + } + } + return m; + }).collect(Collectors.toList()); + } else { + return list; + } + } + +// public static String getTenantKey() { +// +// String tenantKey = TenantRpcContext.getTenantKey(); +// if (StringUtils.isNotBlank(tenantKey)) { +// return tenantKey; +// } +// +// return ""; +// } +// +// public static String getEmployeeId() { +// +// String employeeId = TenantRpcContext.getEmployeeId(); +// if (StringUtils.isNotBlank(employeeId)) { +// return employeeId; +// } +// +// return ""; +// } + + public static String getUserName() { + +// String employeeId = getEmployeeId(); +// if (StringUtils.isNotEmpty(employeeId)) { +// HrmEmployeeComInfo simpleEmployee = null; +// try { +// ComInfoCache bean = SpringUtils.getBean(ComInfoCache.class); +// if (bean != null) { +// simpleEmployee = bean.getCacheById(HrmEmployeeComInfo.class, ElogUtils.getLongValue(employeeId)); +// } +// } catch (Exception e) { +// logger.error("Exception", e); +// } +// if (simpleEmployee != null) { +// if (StringUtils.isNotBlank(simpleEmployee.getUsername())) { +// return simpleEmployee.getUsername(); +// } +// } +// } + + + return ""; + } + + /** + * 获取rpc信息(客户端ip和来源设备) + * + * @param context + */ + public static void initRpcInfo(LoggerContext context) { +// String device = ""; +// String clientIp = ""; +// String traceId = ""; +// try { +// device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); +// clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); +// traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); +//// logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); +// } catch (Exception e) { +// logger.error("Exception", e); +// } +// if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { +// context.setDevice(device); +// } +// if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { +// context.setFromTerminal(getFromTerminal(device)); +// } +// +// if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { +// context.setClientIp(clientIp); +// } +// if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { +// context.setBelongMainId(traceId); +// } + } + + public static String getFromTerminal(String device) { + String setFT = ""; + if (StringUtils.isNotEmpty(device)) { + if (!device.contains("wxwork") && device.contains("MicroMessenger")) {//来自微信 + setFT = FromTerminalType.MICO_MSG.getCode(); + } else if (device.contains("wxwork") && device.contains("MicroMessenger")) {//企业微信 + setFT = FromTerminalType.WECHAT.getCode(); + } else if (device.contains("iPhone") && device.contains("Mac")) {//来自 Iphone + setFT = FromTerminalType.IOS.getCode(); + } else if (device.contains("Mac OS") && !device.contains("iPhone") && device.contains("weapp-pc")) {//来自 mac_client + setFT = FromTerminalType.MAC_CLIENT.getCode();//mac_client + } else if (!device.contains("wxwork") && device.contains("Mobile")) {//移动端 + setFT = FromTerminalType.H5.getCode(); + } else if (device.contains("Android") && !device.contains("wxwork")) {//来自安卓 包含安卓并且不包含微信 + setFT = FromTerminalType.ANDROID.getCode(); + } else {//pc + setFT = FromTerminalType.PC.getCode(); + } + } + return setFT; + } + + /** + * sql连接条件注入sql + * + * @param condition + * @return + */ + public static String checkConditionSql(String condition) { + if ("AND".equalsIgnoreCase(condition) || + "OR".equalsIgnoreCase(condition) + ) { + return condition; + } + return "AND"; + } + + public static String checkTypeSql(String type) { + if ("LIKE".equalsIgnoreCase(type) || + "IN".equalsIgnoreCase(type) || + "!<>".equalsIgnoreCase(type) || + "!=".equalsIgnoreCase(type) || + "BETWEEN".equalsIgnoreCase(type) || + "IS NULL".equalsIgnoreCase(type) || + "IS NULL".equalsIgnoreCase(type) || + "=".equalsIgnoreCase(type) || + "IS NOT NULL".equalsIgnoreCase(type)) { + return type; + } + return "="; + } + + /** + * sql条件防止注入 + * + * @param value + * @return + */ + public static String checkValSql(String value) { + Pattern p = Pattern.compile("\\s+"); + Matcher m = p.matcher(value); + String val = m.replaceAll(" "); + String[] keywords = {"master", "truncate", "declare", "alert", "create", "drop", "version", + "show", "table", "index", "insert", "into", "from", + "insert", "select", "delete", "update", "chr", "mid", "master", "truncate", "char", "declare", "union"}; + + + int count = 0; + String filterVal = ""; + for (String keyddlword : keywords) { + if (val.toLowerCase().contains(keyddlword)) { + count++; + if (count == 1) { + filterVal = keyddlword; + } + } + } + + if (count > 2) { + return filterVal; + } +// value = SecurityUtil.ecodeForSql(value); + + return value; + } + + /** + * 压缩工具类- + * + * @param str + * @return desc:version 0.0.1 基于jdk自带 GZIP 压缩。最后转成base64。 + * 市面上有其他压缩像jdk 的 deflate 可以设置压缩级别,但是都是主动的,需要改业务方法, + * snappy 压缩适用于大数据压缩。大数据量比较快 hadoop首选,但是压缩后比例比较大。 + * xz 下的 压缩比率大,但是解压比较慢-不提倡,空间换时间了 + * common下的压缩其实和jdk差不多,网上说优于jdk,但是相差不大。 + * weaver 压缩基于jdk + */ + public static String compress(String str) { + if (str == null || str.trim().length() == 0) { + return str; + } + try (ByteArrayOutputStream out = new ByteArrayOutputStream(); + GZIPOutputStream gzip = new GZIPOutputStream(out)) { + gzip.write(str.getBytes()); + gzip.close(); + return Base64.getEncoder().encodeToString(out.toByteArray()); + } catch (Exception e) { + logger.error("压缩失败", e.getMessage()); + return str; + } + + } + + + /** + * 解压缩 + * + * @param str + * @return + */ + public static String uncompress(String str) { + byte[] decode = Base64.getDecoder().decode(str); + if (str == null || str.trim().length() == 0) { + return str; + } + try (ByteArrayOutputStream out = new ByteArrayOutputStream(); + ByteArrayInputStream in = new ByteArrayInputStream(decode)) { + GZIPInputStream ungzip = new GZIPInputStream(in); + byte[] buffer = new byte[2048]; + int n; + while ((n = ungzip.read(buffer)) >= 0) { + out.write(buffer, 0, n); + } + return new String(out.toByteArray()); + } catch (Exception e) { + logger.error("解缩失败:{}", e.getMessage()); + return str; + } + } + + public static LoggerContext getEsField(LoggerContext context, String field) { + + switch (field.toLowerCase()) { + case "interfacename": + context.setInterfaceName(""); + break; + case "operatetype": + context.setOperateType(""); + break; + case "operatedesc": + context.setOperatedesc(""); + break; + case "params": + context.setParamsStr("ES"); + break; + case "clientip": + context.setClientIp(""); + break; + case "groupnamelabel": + context.setGroupNameLabel(""); + break; + case "redoservice": + context.setRedoService(""); + break; + case "redocontext": + context.setRedoContextStr(""); + break; + case "cancelservice": + context.setCancelService(""); + break; + case "cancelcontext": + context.setCancelContextStr(""); + break; + case "device": + context.setDevice(""); + break; + case "groupid": + context.setGroupId(""); + break; + case "belongmainid": + context.setBelongMainId(""); + break; + case "requesturl": + context.setRequestUrl(""); + break; + case "requesturi": + context.setRequestUri(""); + break; + case "log_result": + context.setResult(""); + break; + case "fromterminal": + context.setFromTerminal(""); + break; + case "resultdesc": + context.setResultDesc(""); + break; + case "old_content": + context.setOld_content(""); + break; + case "link_type": + context.setLink_type(""); + break; + } + + return context; + } + + public static String[] getESfields(String value) { + String[] split = value.split(","); + List list = new ArrayList<>(); + for (String s : split) { + switch (s.toLowerCase()) { + case "interfacename": + list.add("interfacename"); + break; + case "operatetype": + list.add("operatetype"); + break; + case "operatedesc": + list.add("operatedesc"); + break; + case "params": + list.add("params"); + break; + case "clientip": + list.add("clientip"); + break; + case "groupnamelabel": + list.add("groupnamelabel"); + break; + case "redoservice": + list.add("redoservice"); + break; + case "redocontext": + list.add("redocontext"); + break; + case "cancelservice": + list.add("cancelservice"); + break; + case "cancelcontext": + list.add("cancelcontext"); + break; + case "device": + list.add("device"); + break; + case "groupid": + list.add("groupid"); + break; + case "belongmainid": + list.add("belongmainid"); + break; + case "requesturl": + list.add("requesturl"); + break; + case "requesturi": + list.add("requesturi"); + break; + case "log_result": + list.add("logResult"); + break; + case "fromterminal": + list.add("fromterminal"); + break; + case "resultdesc": + list.add("resultdesc"); + break; + case "old_content": + list.add("oldContent"); + break; + case "link_type": + list.add("linkType"); + break; + } + } + //list转为数组 + if (list.size() > 0) { + String[] strings = list.toArray(new String[list.size()]); + return strings; + } + return null; + } + + public static String handleClobColumn(String value) { + // 处理超长字符串,oracle插入报错ORA-01704: string literal too long + if (StringUtils.isBlank(value)){ + return ""; + } + StringBuilder formatValue = new StringBuilder(); + String[] split = StrUtil.split(value, 1000); + for (int i = 0; i < split.length; i++) { + formatValue.append("TO_CLOB('").append(split[i]).append("')"); + if (i != split.length - 1) { + formatValue.append("||"); + } + } + return formatValue.toString(); + } + } diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index 6dc03b33c..c5584bc62 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -1,12 +1,23 @@ package com.engine.salary.elog.util; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.elog.async.LoggerMessageListener; import com.engine.salary.elog.dto.LoggerContext; import com.engine.salary.elog.dto.LoggerDetailContext; import com.engine.salary.elog.dto.TableChangeBean; +import dm.jdbc.util.IdGenerator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.dubbo.common.utils.AnnotationUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.lang.reflect.Field; import java.util.*; @@ -17,6 +28,7 @@ import java.util.*; * @Author tanghj * @Date 2021/2/10 14:18 */ +//@Component public class LoggerTemplate { protected String function = "common"; @@ -24,8 +36,38 @@ public class LoggerTemplate { protected String logCenterQueue = "Elog_cneterlogQueue"; + public static final String AUDITLOGQUEUE = "AuditLog"; + public static final String ELOG = "Elog"; + protected String localQueue; + protected String moduleName; + + protected static String applicationName; + + public void setApplicationName(String applicationName) { + LoggerTemplate.applicationName = applicationName; + } + + public String getApplicationName() { + return applicationName; + } + + private static final Logger logger = LoggerFactory.getLogger(LoggerTemplate.class); + + protected static String publishkitGroup; + + public void setPublishkitGroup(String publishkitGroup) { + LoggerTemplate.publishkitGroup = publishkitGroup; + } + + public String getPublishkitGroup() { + return publishkitGroup; + } + + + LoggerMessageListener loggerMessageListener = new LoggerMessageListener(); + /** * 写入日志消息队列 * @@ -42,15 +84,198 @@ public class LoggerTemplate { * @param isLocal true 存储本地, false不存储本地 */ public void write(LoggerContext context, boolean isLocal) { - handleContext(context); - if (isLocal) { - new LoggerMessageListener().receive(context); + String elogLocalQueue = ELOG + this.applicationName; + if (StringUtils.isEmpty(this.localQueue)) + this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue" + this.publishkitGroup; + try { + handleContext(context); + } catch (Exception e) { + logger.error("handleContext方法异常!{}", e.getMessage(), e); } + loggerMessageListener.receiveold(context); + } +// public void writeLocal(LoggerContext context){ +// String elogLocalQueue = ELOG + this.applicationName; +// if(StringUtils.isEmpty(this.localQueue)) +// this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue" + this.publishkitGroup; +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// if (context.getWeakElogReocrd() && CollectionUtils.isEmpty(context.getDetailContexts() )) { +// logger.info("日志弱控且没有明细记录,不记录日志,modulename:{},functionname:{}",context.getModuleName(),context.getFunctionName()); +// return; +// } +// +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(localQueue); +// asyncClient.send(asyncBean); +// } catch (Exception e) { +// logger.error("发送writeLocal-mq消息异常!{}",e.getMessage(),e); +// } +// } + + +// public void checkAsyncBean(AsyncBean asyncBean) { +// int length = JSON.toJSON(asyncBean).toString().getBytes(StandardCharsets.UTF_8).length / 1000; +// boolean checkPass = length <= 5120; +// if (!checkPass) +// throw new RuntimeException("消息体超出5M,不支持发送!"); +// } + +// /** +// * 没有明细变化可以不写入日志 +// * @param context 日志信息 +// * @param isLocal 是否写入本地 +// * @param notChangeDetailSendLog 没有明细变化不写入日志 +// */ +// public void write(LoggerContext context, boolean isLocal,boolean notChangeDetailSendLog){ +// String elogLocalQueue = ELOG + this.applicationName; +// if(StringUtils.isEmpty(this.localQueue)) +// this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue"; +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// +// if (notChangeDetailSendLog && (context.getDetailContexts() == null || context.getDetailContexts().size() == 0)) { +// return; +// } +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(logCenterQueue); +// asyncClient.send(asyncBean); +// writeHrmLog(context); +// if(isLocal) { +// asyncBean.setQueue(localQueue); +// asyncClient.send(asyncBean); +// } +// } catch (Exception e) { +// logger.error("发送mq消息异常!{}",e.getMessage(),e); +// } +// +// } + +// /** +// * 支持了向其他模块服务发送业务日志 +// * @param context +// * @param isLocal +// * @param moduleName +// */ +// public void write(LoggerContext context, boolean isLocal, String moduleName){ +// +// if(StringUtils.isNotEmpty(moduleName)) { +// String localQueue = moduleName + "LocalQueue"; +// // context.setModuleName(moduleName); +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(logCenterQueue); +// asyncClient.send(asyncBean); +// writeHrmLog(context); +// if(isLocal) { +// asyncBean.setQueue(localQueue); +// asyncClient.send(asyncBean); +// } +// } catch (Exception e) { +// logger.error("发送mq消息异常!:{}",e.getMessage()); +// } +// } else { +// write(context, isLocal); +// } +// +// } + +// public void writeHrmLog(LoggerContext context) { +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// asyncBean.setMessage(context); +// //asyncBean.setTopic(WRITEAUDITLOGTOPIC); +// asyncBean.setQueue(AUDITLOGQUEUE); +// asyncClient.send(asyncBean); +// +// } + +// /** +// * 支持了向其他模块服务发送业务日志 +// * @param context +// * @param isLocal +// * @param moduleName +// */ +// public void write(LoggerContext context, boolean isLocal, String moduleName,String functionName,String queueName){ +// +// if (StringUtils.isNotEmpty(moduleName) && StringUtils.isNotEmpty(functionName)) { +// context.setModuleName(moduleName); +// context.setFunctionName(functionName); +// this.localQueue = queueName + "LocalQueue"; +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(logCenterQueue); +// asyncClient.send(asyncBean); +// writeHrmLog(context); +// if (isLocal) { +// asyncBean.setQueue(localQueue); +// asyncClient.send(asyncBean); +// } +// } catch (Exception e) { +// logger.error("发送mq消息异常!,{}!",e); +// } +// } else { +// write(context, isLocal); +// } +// +// } + private void handleContext(LoggerContext context) { - context.setModuleName(module); - context.setFunctionName(function); + if (StringUtils.isEmpty(context.getModuleName())) + context.setModuleName(module); + if (StringUtils.isEmpty(context.getFunctionName())) + context.setFunctionName(function); + if (!(context.getId() > 0)) + context.setId(IdGenerator.generate()); + if (StringUtils.isEmpty(context.getUuid())) { + context.setUuid(UUID.randomUUID().toString().replace("-", "")); + } + + context.setTempParams(null); + //User user = UserContext.getCurrentUser(); + //if(user != null) { + // 通过统一登录获取 + String employeeId = "92"; + String tenantKey = SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; + String userName = ElogUtils.getUserName(); + //String userName = TenantRpcContext.getEmployeeId(); + if (StringUtils.isEmpty(context.getOperator()) && StringUtils.isNotEmpty(employeeId)) { + context.setOperator(employeeId + ""); + } + + if (StringUtils.isEmpty(context.getTenant_key()) && StringUtils.isNotEmpty(tenantKey)) { + context.setTenant_key(tenantKey); + } + if (StringUtils.isEmpty(context.getOperatorName()) && StringUtils.isNotEmpty(userName)) { + context.setOperatorName(userName); + } + //} + + if (StringUtils.isBlank(context.getOperator()) || "null".equals(context.getOperator())) { + context.setOperator("-1"); + } + if (StringUtils.isBlank(context.getTargetId()) || "null".equals(context.getTargetId())) { + context.setTargetId("-1"); + } + +// RequestAttributes requestAttributes = WeaverRequestContextHolder.getRequestAttributesSafely(); +// if ((requestAttributes instanceof ServletRequestAttributes)) { +// HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); +// ElogUtils.initRequestInfo(request, context);z +// } else { +// if (StringUtils.isEmpty(context.getRequestUrl())) { +// context.setRequestUrl("非http请求"); +// } +// ElogUtils.initRpcInfo(context); +// } List changeBeans = context.getChangeValues(); @@ -59,29 +284,81 @@ public class LoggerTemplate { if (changeBeans != null) for (TableChangeBean changeBean : changeBeans) { if (changeBean != null && (changeBean.getNewValue() != null || changeBean.getOldValue() != null)) { + String uuid = UUID.randomUUID().toString().replace("-", ""); ApiModel apiModel = null; + ElogTransform tableTransform = null; JSONObject newJo = new JSONObject(); JSONObject oldJo = new JSONObject(); - JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean)); + JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean, SerializerFeature.WriteDateUseDateFormat), Feature.OrderedField); + Field[] fields = null; if (changeBean.getNewValue() != null) { apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); + tableTransform = changeBean.getNewValue().getClass().getAnnotation(ElogTransform.class); + //增加处理被动态代理对象注解的逻辑 + if (Objects.isNull(tableTransform)) { + tableTransform = AnnotationUtils.findAnnotation(changeBean.getNewValue().getClass(), ElogTransform.class); + } + //fields = changeBean.getNewValue().getClass().getDeclaredFields(); + fields = getAllFields(changeBean.getNewValue().getClass()); newJo = valueChange.getJSONObject("newValue"); } else { apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); + tableTransform = changeBean.getOldValue().getClass().getAnnotation(ElogTransform.class); + if (Objects.isNull(tableTransform)) { + tableTransform = AnnotationUtils.findAnnotation(changeBean.getOldValue().getClass(), ElogTransform.class); + } + //fields = changeBean.getOldValue().getClass().getDeclaredFields(); + fields = getAllFields(changeBean.getOldValue().getClass()); } if (changeBean.getOldValue() != null) { oldJo = valueChange.getJSONObject("oldValue"); } - if (apiModel != null) { - Field[] fields = changeBean.getNewValue().getClass().getDeclaredFields(); + if ((apiModel != null || tableTransform != null) && fields != null) { + for (Field field : fields) { + if (StringUtils.isEmpty(newJo.getString(field.getName())) && StringUtils.isEmpty(oldJo.getString(field.getName()))) { + continue; + } + if (StringUtils.isNotEmpty(newJo.getString(field.getName())) && newJo.getString(field.getName()).equals(oldJo.getString(field.getName()))) { + continue; + } + ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); + ElogTransform fieldElogTransform = field.getAnnotation(ElogTransform.class); LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setTableName(changeBean.getTableName()); + if (fieldElogTransform != null && fieldElogTransform.ignore()) { + continue; + } + + //todo 若analyticList为true 且 新旧值属于JSONArray 解析List + if (fieldElogTransform != null && fieldElogTransform.analyticList() && fieldElogTransform.analyticListClass() != void.class) { + analyticListMethod(field, newJo, oldJo, valueChangeList, fieldElogTransform); + continue; + } + + valueChangeBean.setUuid(uuid); + valueChangeBean.setTableName(tableTransform != null && StringUtils.isNotEmpty(tableTransform.name()) ? tableTransform.name() : changeBean.getTableName()); + valueChangeBean.setTableNameDesc(tableTransform != null && StringUtils.isNotEmpty(tableTransform.tablename()) ? tableTransform.tablename() : ""); + valueChangeBean.setTableNameLabelId(tableTransform != null && tableTransform.labelId() != -1 ? tableTransform.labelId() + "" : ""); + valueChangeBean.setIsDetail(changeBean.getIsDetail()); valueChangeBean.setFieldName(field.getName()); - valueChangeBean.setFieldDesc(apiModelProperty.value()); + valueChangeBean.setFieldDesc(fieldElogTransform != null ? fieldElogTransform.name() : apiModelProperty != null ? apiModelProperty.value() : field.getName()); + valueChangeBean.setFieldNameLabelId(fieldElogTransform != null ? fieldElogTransform.labelId() + "" : "-1"); + valueChangeBean.setDataid(StringUtils.isNotEmpty(changeBean.getDataid()) ? changeBean.getDataid() : + StringUtils.isNoneEmpty(newJo.getString("id")) ? newJo.getString("id") : oldJo.getString("id")); + valueChangeBean.setBelongDataid(StringUtils.isNotEmpty(changeBean.getBelongDataid()) ? changeBean.getBelongDataid() : ""); + valueChangeBean.setNewValue(newJo.getString(field.getName())); valueChangeBean.setOldValue(oldJo.getString(field.getName())); + valueChangeBean.setCreator(-1l); + try { + extracted(newJo, oldJo, field, fieldElogTransform, valueChangeBean); + } catch (Exception e) { + logger.error("转换出错:{}", e); + //System.out.println("转换出错:" + e.getMessage()); + } + + valueChangeBean.setShoworder(showOrder++); valueChangeList.add(valueChangeBean); } @@ -89,26 +366,40 @@ public class LoggerTemplate { Set keys = new HashSet<>(); for (String key : (Set) newJo.keySet()) { keys.add(key); + if (newJo.getString(key).equals(oldJo.getString(key))) { + continue; + } LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + valueChangeBean.setUuid(uuid); valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setIsDetail(changeBean.getIsDetail()); + valueChangeBean.setDataid(StringUtils.isNotEmpty(changeBean.getDataid()) ? changeBean.getDataid() : + StringUtils.isNoneEmpty(newJo.getString("id")) ? newJo.getString("id") : oldJo.getString("id")); + valueChangeBean.setBelongDataid(StringUtils.isNotEmpty(changeBean.getBelongDataid()) ? changeBean.getBelongDataid() : ""); valueChangeBean.setFieldName(key); valueChangeBean.setFieldDesc(key); valueChangeBean.setNewValue(newJo.getString(key)); valueChangeBean.setOldValue(oldJo.getString(key)); valueChangeBean.setShoworder(showOrder++); + valueChangeBean.setCreator(-1l); valueChangeList.add(valueChangeBean); } - for (String key : (Set)oldJo.keySet()) { + for (String key : (Set) oldJo.keySet()) { if (keys.contains(key)) continue; keys.add(key); + if (oldJo.getString(key).equals(newJo.getString(key))) { + continue; + } LoggerDetailContext valueChangeBean = new LoggerDetailContext(); valueChangeBean.setTableName(changeBean.getTableName()); + valueChangeBean.setIsDetail(changeBean.getIsDetail()); valueChangeBean.setFieldName(key); valueChangeBean.setFieldDesc(key); valueChangeBean.setNewValue(newJo.getString(key)); valueChangeBean.setOldValue(oldJo.getString(key)); valueChangeBean.setShoworder(showOrder++); + valueChangeBean.setCreator(-1l); valueChangeList.add(valueChangeBean); } } @@ -119,6 +410,110 @@ public class LoggerTemplate { context.setDetailContexts(valueChangeList); } + + private void analyticListMethod(Field field, JSONObject newJo, JSONObject oldJo, List valueChangeList, ElogTransform tableTransform) { + JSONArray newValueArr = newJo.get(field.getName()) == null ? new JSONArray() : (JSONArray) newJo.get(field.getName()); + JSONArray oldvalueArr = oldJo.get(field.getName()) == null ? new JSONArray() : (JSONArray) oldJo.get(field.getName()); + Field[] allFields = getAllFields(tableTransform.analyticListClass()); + + + Boolean oldvalueIsNull = false; + Boolean newvalueIsNull = false; + + if (oldvalueArr.size() == 0) { + oldvalueIsNull = true; + } + if (newValueArr.size() == 0) { + newvalueIsNull = true; + } + if ((oldvalueIsNull && newvalueIsNull) || (!oldvalueIsNull && !newvalueIsNull && oldvalueArr.size() != newValueArr.size())) { + //如果新、旧没值或新旧值list数量对不上 直接返回 + return; + } + + JSONArray foreachArr = oldvalueIsNull ? newValueArr : oldvalueArr; + + //遍历list + for (int i = 0; i < foreachArr.size(); i++) { + //默认另一个list关系是一一对应的 + JSONObject oldValue = oldvalueIsNull ? new JSONObject() : (JSONObject) oldvalueArr.get(i); + JSONObject newValue = newvalueIsNull ? new JSONObject() : (JSONObject) newValueArr.get(i); + + //dataid uuid showOrder + long dataid = IdGenerator.generate(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + int showOrder = 0; + + //遍历字段 + for (Field allField : allFields) { + if (StringUtils.isEmpty(newValue.getString(allField.getName())) && StringUtils.isEmpty(oldValue.getString(allField.getName()))) { + continue; + } + if (StringUtils.isNotEmpty(newValue.getString(allField.getName())) && newValue.getString(allField.getName()).equals(oldValue.getString(allField.getName()))) { + continue; + } + + ApiModelProperty apiModelProperty = allField.getAnnotation(ApiModelProperty.class); + ElogTransform fieldElogTransform = allField.getAnnotation(ElogTransform.class); + LoggerDetailContext valueChangeBean = new LoggerDetailContext(); + + valueChangeBean.setUuid(uuid); + valueChangeBean.setTableName(tableTransform != null && StringUtils.isNotEmpty(tableTransform.name()) ? tableTransform.name() : field.getName()); + valueChangeBean.setTableNameDesc(tableTransform != null && StringUtils.isNotEmpty(tableTransform.tablename()) ? tableTransform.tablename() : ""); + valueChangeBean.setTableNameLabelId(tableTransform != null && tableTransform.labelId() != -1 ? tableTransform.labelId() + "" : ""); + valueChangeBean.setIsDetail(1); + valueChangeBean.setFieldName(allField.getName()); + valueChangeBean.setNewValue(newValue.getString(allField.getName())); + valueChangeBean.setOldValue(oldValue.getString(allField.getName())); + valueChangeBean.setCreator(-1l); + valueChangeBean.setBelongDataid(""); + valueChangeBean.setDataid(String.valueOf(dataid)); + + if (fieldElogTransform != null) { + if (fieldElogTransform.ignore()) { + continue; + } + + valueChangeBean.setFieldDesc(fieldElogTransform != null ? fieldElogTransform.name() : apiModelProperty != null ? apiModelProperty.value() : field.getName()); + valueChangeBean.setFieldNameLabelId(fieldElogTransform != null ? fieldElogTransform.labelId() + "" : "-1"); + + try { + extracted(newValue, oldValue, allField, fieldElogTransform, valueChangeBean); + } catch (Exception e) { + logger.error("转换出错", e); + //System.out.println("转换出错:" + e.getMessage()); + } + + valueChangeBean.setShoworder(showOrder++); + } else { + valueChangeBean.setFieldDesc(allField.getName()); + valueChangeBean.setShoworder(showOrder++); + + } + valueChangeList.add(valueChangeBean); + } + } + } + + private void extracted(JSONObject newJo, JSONObject oldJo, Field field, ElogTransform fieldElogTransform, LoggerDetailContext valueChangeBean) { + JSONObject jo = null; + if (fieldElogTransform != null && StringUtils.isNotEmpty(fieldElogTransform.valuesKVPairs())) { + jo = JSONObject.parseObject(fieldElogTransform.valuesKVPairs()); + if (jo != null) { + valueChangeBean.setNewRealValue(jo.getString(newJo.getString(field.getName()))); + valueChangeBean.setOldRealValue(jo.getString(oldJo.getString(field.getName()))); + } + } + } + + public void setModuleName(String moduleName) { + this.moduleName = moduleName; + } + + public void setLocalQueue(String localQueue) { + this.localQueue = localQueue; + } + public String getFunction() { return function; } @@ -148,7 +543,99 @@ public class LoggerTemplate { } public void setModule(String module) { - this.localQueue = module + "LocalQueue"; this.module = module; } + +// public void setAsyncClient(AsyncClient asyncClient) { +// this.asyncClient = asyncClient; +// } + + + public static Field[] getAllFields(Class obj) { + Class superclass = obj.getSuperclass(); + Field[] superField = null; + //获取父类 + if (superclass != Object.class) { + superField = superclass.getDeclaredFields(); + } + //获取当前类 + Field[] nowfield = obj.getDeclaredFields(); + return addFields(superField, nowfield); + } + + public static Field[] addFields(Field[] superFields, Field[] fields) { + + return ArrayUtils.addAll(superFields, fields); + + } + + public void write(List context, boolean isLocal) { + context.forEach(loggerContext -> { + this.write(loggerContext, isLocal); + }); + } + + + public void write(List context) { + context.forEach(loggerContext -> { + this.write(loggerContext); + }); + } + +// public void writeAsync(LoggerContext context, boolean isLocal){ +// String applicationNameBak = this.applicationName; +// String localQueueBak = this.localQueue; +// String moduleNameBak = this.moduleName; +// String pk = this.publishkitGroup; +// LocalRunnable localRunnable = new LocalRunnable() { +// @Override +// public void execute() { +// String localQueueBakBak = localQueueBak; +// String elogLocalQueue = ELOG + applicationNameBak; +// if(StringUtils.isEmpty(localQueueBakBak)) +// localQueueBakBak = (StringUtils.isNotEmpty(moduleNameBak) ? moduleNameBak : elogLocalQueue) + "LocalQueue" + pk; +// AsyncBean asyncBean = new AsyncBean<>(); +// handleContext(context); +// if (context.getWeakElogReocrd() && CollectionUtils.isEmpty(context.getDetailContexts() )) { +// logger.info("日志弱控且没有明细记录,不记录日志,modulename:{},functionname:{}",context.getModuleName(),context.getFunctionName()); +// return; +// } +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(logCenterQueue); +// checkAsyncBean(asyncBean);//检查消息体大小 +// asyncClient.send(asyncBean); +// writeHrmLog(context); +// if(isLocal) { +// asyncBean.setQueue(localQueueBakBak); +// asyncClient.send(asyncBean); +// } +// } catch (Exception e) { +// logger.error("发送mq消息异常!{}",e.getMessage(),e); +// } +// } +// }; +// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "LoggerTemplate_writeAsync", localRunnable); +// +// } +// +// /** +// * 回滚队列 +// * +// * @param context +// */ +// public void writeRollBack(LoggerContext context){ +// String elogRollBackQueue = ELOG + this.applicationName + "RollBackQueue" + this.publishkitGroup; +// AsyncBean asyncBean = new AsyncBean<>(); +// +// try { +// asyncBean.setMessage(context); +// asyncBean.setQueue(elogRollBackQueue); +// checkAsyncBean(asyncBean);//检查消息体大小 +// asyncClient.send(asyncBean); +// } catch (Exception e) { +// logger.error("发送mq消息异常!{}",e.getMessage(),e); +// } +// } + } diff --git a/src/com/engine/salary/mapper/elog/TableCheckerMapper.java b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java similarity index 60% rename from src/com/engine/salary/mapper/elog/TableCheckerMapper.java rename to src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java index 5270ed5fe..5171e2641 100644 --- a/src/com/engine/salary/mapper/elog/TableCheckerMapper.java +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java @@ -4,8 +4,10 @@ import com.engine.salary.elog.dto.TableColumnBean; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; +import java.util.Set; -public interface TableCheckerMapper { +public interface ElogTableCheckerMapper { Long getVersion(@Param("mainTable") String mainTable); void recordVersion(@Param("id") long id, @Param("mainTable") String mainTable, @Param("version") long version); @@ -17,4 +19,12 @@ public interface TableCheckerMapper { List getTableStructure(@Param("tableName") String tableName); void createElogTable(@Param("createElogSql") String createElogSql); + + Map getTableIndex(@Param("tableName") String tableName, @Param("columnName") String columnName); + + Map getDataBase(); + + void createTableIndex(@Param("tableName") String tableName, @Param("columnName") String columnName, @Param("id") long id); + + List getAllExistTables(@Param("tableNames") Set tables); } diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml new file mode 100644 index 000000000..c345b7aba --- /dev/null +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -0,0 +1,451 @@ + + + + + insert into elog_version (id, maintable, version) values (#{id},#{mainTable},#{version}) + + + + create table ${mainTable} + ( + id bigint comment 'ID', + create_time datetime default current_timestamp , + update_time datetime default current_timestamp , + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid char(36), + log_date datetime default current_timestamp , + log_operator varchar(50), + operatorName varchar(50), + targetId varchar(50), + targetName text, + modulename varchar(100), + functionname varchar(100), + interfaceName varchar(100), + requesturl varchar(200), + requesturi varchar(200), + operateType varchar(50), + operatetypename varchar(100), + operatedesc varchar(1000), + params longtext, + belongmainid varchar(36), + clientIp varchar(50), + groupid varchar(50), + device varchar(200), + groupNameLabel varchar(500), + redoService varchar(200), + redoContext longtext, + cancelService varchar(200), + cancelContext longtext, + totalruntime bigint, + mainruntime bigint, + log_result varchar(100), + fromterminal varchar(100), + resultdesc text, + old_content varchar(1000), + link_type varchar(20), + link_id bigint, + old_link_id bigint, + PRIMARY KEY (id) + ) + + + + create table ${mainTable} + ( + id number(*,0) not null primary key, + create_time date default sysdate, + update_time date default sysdate, + creator number(*,0), + delete_type number(*,0), + tenant_key varchar2(10), + uuid varchar2(36), + log_date date default sysdate, + log_operator varchar2(50), + operatorName varchar2(50), + targetId varchar2(50), + targetName varchar2(4000), + modulename varchar2(100), + functionname varchar2(100), + interfaceName varchar2(100), + requesturl varchar2(200), + requesturi varchar2(200), + operateType varchar2(50), + operatetypename varchar2(100), + operatedesc varchar2(1000), + params clob, + belongmainid varchar2(36), + clientIp varchar2(200), + groupid varchar2(50), + device varchar2(200), + groupNameLabel varchar2(500), + redoService varchar2(200), + redoContext varchar2(4000), + cancelService varchar2(200), + cancelContext varchar2(4000), + totalruntime number(*,0), + mainruntime number(*,0), + log_result varchar2(4000), + fromterminal varchar2(100), + resultdesc varchar2(4000), + old_content varchar2(1000), + link_type varchar2(20), + link_id number(*,0), + old_link_id number(*,0) + ) + + + create table ${mainTable} + ( + id bigint not null primary key, + create_time datetime default getdate(), + update_time datetime default getdate(), + creator bigint default '-1', + delete_type bigint default 0, + tenant_key nvarchar(10), + uuid nvarchar(36), + log_date datetime default getdate(), + device nvarchar(500), + log_operator bigint default '-1', + operatorname nvarchar(100), + targetid bigint default '-1', + targetname nvarchar(3000), + modulename nvarchar(100), + functionname nvarchar(100), + interfacename nvarchar(100), + requesturl nvarchar(200), + requesturi nvarchar(200), + operatetype nvarchar(50), + operatetypename nvarchar(100), + operatedesc nvarchar(3000), + params ntext, + belongmainid nvarchar(36), + clientip nvarchar(200), + groupid nvarchar(50), + groupnamelabel nvarchar(1000), + redoservice nvarchar(200), + redocontext nvarchar(3000), + cancelservice nvarchar(200), + cancelcontext nvarchar(3000), + totalruntime bigint default 0, + mainruntime bigint default 0, + log_result nvarchar(100), + fromterminal nvarchar(100), + resultdesc nvarchar(3000), + old_content nvarchar(3000), + link_type nvarchar(20), + link_id bigint default 0, + old_link_id bigint default 0 + ) + + + create table ${mainTable} + ( + id int8 not null primary key, + create_time timestamp default current_timestamp, + update_time timestamp default current_timestamp, + creator int8, + delete_type int, + tenant_key varchar(10), + uuid varchar(36), + log_date timestamp default current_timestamp, + log_operator varchar(50), + operatorName varchar(50), + targetId varchar(50), + targetName text, + modulename varchar(100), + functionname varchar(100), + interfaceName varchar(100), + requesturl varchar(200), + requesturi varchar(200), + operateType varchar(50), + operatetypename varchar(100), + operatedesc varchar(1000), + params text, + belongmainid varchar(36), + clientIp varchar(200), + groupid varchar(50), + device varchar(200), + groupNameLabel varchar(500), + redoService varchar(200), + redoContext text, + cancelService varchar(200), + cancelContext text, + totalruntime int4, + mainruntime int4, + log_result varchar(100), + fromterminal varchar(100), + resultdesc text, + old_content varchar(1000), + link_type varchar(20), + link_id int4, + old_link_id int4 + ) + + + create table ${detailTable} + ( + id bigint not null primary key, + create_time datetime default current_timestamp , + update_time datetime default current_timestamp , + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid varchar(36), + mainid varchar(36), + dataid varchar(50), + belongdataid varchar(50), + tableName varchar(200), + tablenamelabelid varchar(50), + tablenamedesc varchar(50), + fieldName varchar(200), + fieldnamelabelid varchar(200), + newValue longtext, + oldValue longtext, + newrealvalue longtext, + oldrealvalue longtext, + fieldDesc varchar(200), + showorder int default 0, + isdetail int default 0 + ) + + + create table ${detailTable} + ( + id int8 not null primary key, + create_time timestamp default current_timestamp , + update_time timestamp default current_timestamp , + creator int8, + delete_type int8, + tenant_key varchar(10), + uuid varchar(36), + mainid varchar(36), + dataid varchar(50), + belongdataid varchar(50), + tableName varchar(200), + tablenamelabelid varchar(50), + tablenamedesc varchar(50), + fieldName varchar(200), + fieldnamelabelid varchar(200), + newValue text, + oldValue text, + newrealvalue text, + oldrealvalue text, + fieldDesc varchar(200), + showorder int8 default 0, + isdetail int8 default 0 + ) + + + create table ${detailTable} + ( + id number(*,0) not null primary key, + create_time date default sysdate, + update_time date default sysdate, + creator number(*,0), + delete_type number(*,0), + tenant_key varchar2(10), + uuid varchar2(36), + mainid varchar2(36), + dataid varchar2(50), + belongdataid varchar2(50), + tableName varchar2(200), + tablenamelabelid varchar2(50), + tablenamedesc varchar2(50), + fieldName varchar2(200), + fieldnamelabelid varchar2(200), + newValue varchar2(4000), + oldValue varchar2(4000), + newrealvalue varchar2(4000), + oldrealvalue varchar2(4000), + fieldDesc varchar2(200), + showorder number(*,0) default 0, + isdetail number(*,0) default 0 + ) + + + create table ${detailTable} + ( + id bigint not null primary key, + create_time datetime default getdate(), + update_time datetime default getdate(), + creator bigint, + delete_type bigint, + tenant_key nvarchar(10), + uuid nvarchar(36), + mainid nvarchar(36), + dataid nvarchar(50), + belongdataid nvarchar(50), + tableName nvarchar(200), + tablenamelabelid nvarchar(50), + tablenamedesc nvarchar(50), + fieldName nvarchar(200), + fieldnamelabelid nvarchar(200), + newValue ntext, + oldValue ntext, + newrealvalue ntext, + oldrealvalue ntext, + fieldDesc varchar(200), + showorder bigint default 0, + isdetail bigint default 0 + ) + + + + + + + + + + + ${createElogSql} + + + + + + + + + + + + + + + + create index idx${id} on ${tableName} (${columnName}) + + + + create index idx${id} on ${tableName} (${columnName}) + + + + create index idx${id} on ${tableName} (${columnName}) + + + + + + + + + + diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java new file mode 100644 index 000000000..6a969c83e --- /dev/null +++ b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java @@ -0,0 +1,45 @@ +package com.engine.salary.mapper.elog; + + +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.LoggerDetailContext; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @ClassName: LocalElogAopDaoMapper + * @Description 本地操作日志持久层 + * @Author tanghj + * @Date 2021/2/24 9:35 + */ +public interface LocalElogAopDaoMapper { + + int insertElogContext(@Param(value="logContent") LoggerContext loggerContext, + @Param(value="cusColumns")String cusColumns , + @Param(value="cusValus")String cusValus, + @Param(value="tableName")String tableName); + + + + int insertElogDetail(@Param(value="detailContext") LoggerDetailContext loggerDetailContext, + @Param(value="mainid")String mainid, + @Param(value="cusColumns")String cusColumns , + @Param(value="cusValus")String cusValus, + @Param(value="detailTableName")String tableName); + + + Integer queryElogContextById(@Param(value="id")Long id, + @Param(value="tableName")String tableName); + + void batchInsertDetail(@Param("sql") String sql); + + void insertElogDetailPrepared(@Param("tablename") String detailTableName, @Param("list") List detailContexts, @Param("mainid") String mainid); + + void insertElogDetailPreparedHasCustonInfo(@Param("tablename") String detailTableName, @Param("list") List detailContexts, @Param("mainid") String mainid, @Param(value="cusColumns")String cusColumns); + + void rollBackElogById(@Param("id") Long id,@Param("tableName") String tableName); + + void rollBackDetailElogByUUID(@Param("mainid") String uuid,@Param("tableName") String detailTableName); + +} diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml new file mode 100644 index 000000000..4bd8ea6d2 --- /dev/null +++ b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml @@ -0,0 +1,150 @@ + + + + + + insert into ${tableName} (id, uuid, log_date, tenant_key, modulename, functionName, operatetypename, + log_operator, operatorname, targetid, targetname, interfacename, operatetype, + operatedesc, + params, clientIp, groupnamelabel, redoservice, redocontext, cancelservice, + cancelcontext, device, groupid, + belongMainId, requestUrl, requestUri, totalRunTime, mainRunTime, log_result, + fromTerminal, resultDesc, old_content, + link_type, link_id, old_link_id, create_time, update_time, delete_type, creator + ${cusColumns}) + values (#{logContent.id}, #{logContent.uuid}, #{logContent.date}, + #{logContent.tenant_key}, #{logContent.moduleName}, #{logContent.functionName}, + #{logContent.operateTypeName}, #{logContent.logOperator}, #{logContent.operatorName}, + #{logContent.logTargetid} + , #{logContent.targetName}, #{logContent.interfaceName}, #{logContent.operateType}, + #{logContent.operatedesc}, + #{logContent.paramsStr}, #{logContent.clientIp}, #{logContent.groupNameLabel}, + #{logContent.redoService}, + #{logContent.redoContextStr}, #{logContent.cancelService}, #{logContent.cancelContextStr}, + #{logContent.device}, #{logContent.groupId}, + #{logContent.belongMainId}, #{logContent.requestUrl}, #{logContent.requestUri}, + #{logContent.totalRunTime}, #{logContent.mainRunTime} + , #{logContent.result}, #{logContent.fromTerminal}, #{logContent.resultDesc}, + #{logContent.old_content}, #{logContent.link_type} + , #{logContent.link_id}, #{logContent.old_link_id}, #{logContent.create_time}, + #{logContent.update_time}, #{logContent.delete_type}, #{logContent.logOperator} + ${cusValus}) + + + + insert into ${detailTableName} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key, creator, + newRealValue, oldRealValue, tableNameDesc, + tableNameLabelId, fieldNameLabelId, create_time, update_time + ${cusColumns}) + values (#{detailContext.id}, #{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, + #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, #{detailContext.tenant_key}, + #{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId}, #{detailContext.create_time}, #{detailContext.update_time} + ${cusValus}) + + + ${sql} + + + + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + values + + ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{logContent.delete_type}) + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time + ${cusColumns}) + values + + ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time} + ${detailContext.cusValus}) + + + + + update ${tableName} + set delete_type = 3 + where id = #{id} + + + update ${tableName} + set delete_type = 3 + where mainid = #{mainid} + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + + SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{logContent.delete_type} + FROM DUAL + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time + ${cusColumns}) + + SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time} + ${detailContext.cusValus} + FROM DUAL + + + + diff --git a/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml deleted file mode 100644 index a9e4436d3..000000000 --- a/src/com/engine/salary/mapper/elog/TableCheckerMapper.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - insert into elog_version (id, maintable, version) - values (#{id}, #{mainTable}, #{version}); - - - - create table ${mainTable} - ( - id bigint comment 'ID', - create_time datetime, - update_time datetime, - creator bigint, - delete_type int, - tenant_key varchar(10), - uuid char(36), - date datetime, - operator varchar(50), - operatorName varchar(50), - targetId varchar(50), - targetName varchar(1000), - module varchar(100), - `function` varchar(100), - interfaceName varchar(100), - operateType varchar(50), - desc varchar(1000), - params longtext, - clientIp varchar(50), - device varchar(200), - groupNameLabel varchar(500), - redoService varchar(200), - redoContext longtext, - cancelService varchar(200), - cancelContext longtext - ) - - - create table ${detailTable} - ( - id bigint comment 'ID', - create_time datetime, - update_time datetime, - creator bigint, - delete_type int, - tenant_key varchar(10), - uuid varchar(36), - tableName varchar(200), - fieldName char(200), - newValue longtext, - oldValue longtext, - fieldDesc varchar(200), - showorder int default 0 - ) - - - - - - - ${createElogSql} - - \ No newline at end of file diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index 3c30540a4..f53e0ddeb 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -5,6 +5,9 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SalaryItemBiz; import com.engine.salary.biz.SysSalaryItemBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.salaryformula.po.FormulaPO; import com.engine.salary.entity.salaryformula.po.FormulaVar; import com.engine.salary.entity.salaryitem.bo.SalaryItemBO; @@ -17,6 +20,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalarySystemTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; import com.engine.salary.enums.sicategory.SharedTypeEnum; @@ -76,6 +80,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService return ServiceUtil.getService(SalarySobServiceImpl.class, user); } + private LoggerTemplate salaryItemLoggerTemplate = SalaryElogConfig.salaryItemLoggerTemplate(); + private SysSalaryItemBiz sysSalaryItemBiz = new SysSalaryItemBiz(); // @Autowired @@ -202,15 +208,15 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService } SalaryItemPO salaryItemPO = SalaryItemBO.convert2SalaryItemPO(saveParam, (long) user.getUID()); salaryItemBiz.insert(salaryItemPO); - // todo 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); -// loggerContext.setTargetName(salaryItemPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目") + ": " + salaryItemPO.getName()); -// loggerContext.setNewValues(salaryItemPO); -// salaryItemLoggerTemplate.write(loggerContext); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setNewValues(salaryItemPO); + salaryItemLoggerTemplate.write(loggerContext); } @Override @@ -284,15 +290,15 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); -// loggerContext.setTargetName(newSalaryItemPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); -// loggerContext.setOldValues(salaryItemPO); -// loggerContext.setNewValues(newSalaryItemPO); -// salaryItemLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); + loggerContext.setTargetName(newSalaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + loggerContext.setNewValues(newSalaryItemPO); + salaryItemLoggerTemplate.write(loggerContext); } private void changeName(SalaryItemPO salaryItemPO, String oldName, String newName, String itemPrefix, String fieldNamePrefix) { From bd0edcf8e23e04d7a0ea124a8aaffe0f005acaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 22 Dec 2023 14:50:16 +0800 Subject: [PATCH 023/169] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/config/SalaryElogConfig.java | 760 +++++++++--------- .../engine/salary/elog/dto/LoggerContext.java | 11 + .../engine/salary/elog/util/ElogUtils.java | 116 +-- .../salary/elog/util/LoggerTemplate.java | 15 +- .../mapper/elog/LocalElogAopDaoMapper.xml | 4 +- .../service/impl/SalaryItemServiceImpl.java | 2 + .../engine/salary/util/ResponseResult.java | 15 +- .../salary/web/SalaryItemController.java | 8 +- 8 files changed, 416 insertions(+), 515 deletions(-) diff --git a/src/com/engine/salary/config/SalaryElogConfig.java b/src/com/engine/salary/config/SalaryElogConfig.java index 006e75a94..7156eeff4 100644 --- a/src/com/engine/salary/config/SalaryElogConfig.java +++ b/src/com/engine/salary/config/SalaryElogConfig.java @@ -4,23 +4,23 @@ import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.elog.util.LoggerTemplateBuilder; /** - * @description: elog日志 - * @author: xiajun - * @modified By: xiajun - * @date: Created in 10/22/21 10:27 AM - * @version:v1.0 - */ + * elog日志 + *

Copyright: Copyright (c) 2023

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ public class SalaryElogConfig { -// /** -// * 个税税率表 -// * -// * @return -// */ -// @Bean("taxRateLoggerTemplate") -// public LoggerTemplate taxRateLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "taxrate"); -// } + /** + * 个税税率表 + * + * @return + */ + public static LoggerTemplate taxRateLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "taxrate"); + } /** * 薪资项目 @@ -28,391 +28,351 @@ public class SalaryElogConfig { * @return */ public static LoggerTemplate salaryItemLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "adc"); + return LoggerTemplateBuilder.build("hrsa", "salaryitem"); } -// /** -// * 个税扣缴义务人 -// * -// * @return -// */ -// @Bean("taxAgentLoggerTemplate") -// public LoggerTemplate taxAgentLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "taxagent"); -// } -// -// @Bean("siCategoryLoggerTemplate") -// public LoggerTemplate siCategoryLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "siCategory"); -// } -// -// @Bean("siSchemeLoggerTemplate") -// public LoggerTemplate siSchemeLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "siScheme"); -// } -// -// @Bean("totalSchemeLoggerTemplate") -// public LoggerTemplate totalSchemeLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "totalScheme"); -// } -// -// /** -// * 累计情况 -// * -// * @return -// */ -// @Bean("addUpSituationLoggerTemplate") -// public LoggerTemplate addUpSituationLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "addupsituation"); -// } -// -// /** -// * 累计专项附加扣除 -// * -// * @return -// */ -// @Bean("addUpDeductionLoggerTemplate") -// public LoggerTemplate addUpDeductionLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "addupdeduction"); -// } -// -// /** -// * 其他免税扣除 -// * -// * @return -// */ -// @Bean("otherDeductionLoggerTemplate") -// public LoggerTemplate otherDeductionLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "otherdeduction"); -// } -// -// /** -// * 减税 -// * -// * @return -// */ -// @Bean("derateDeductionLoggerTemplate") -// public LoggerTemplate derateDeductionLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "deratededuction"); -// } -// -// /** -// * 税延养老保险 -// * -// * @return -// */ -// @Bean("endowmentInsuranceLoggerTemplate") -// public LoggerTemplate endowmentInsuranceLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "endowmentinsurance"); -// } -// -// /** -// * 税延养老保险 -// * -// * @return -// */ -// @Bean("freeIncomeLoggerTemplate") -// public LoggerTemplate freeIncomeLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "freeincome"); -// } -// -// /** -// * 捐赠免税 -// * -// * @return -// */ -// @Bean("grantDonationLoggerTemplate") -// public LoggerTemplate grantDonationLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "grantdonation"); -// } -// -// /** -// * 捐赠免税 -// * -// * @return -// */ -// @Bean("healthInsuranceLoggerTemplate") -// public LoggerTemplate healthInsuranceLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "healthinsurance"); -// } -// -// /** -// * 其他免税扣除 -// * -// * @return -// */ -// @Bean("otherDerateDeductionLoggerTemplate") -// public LoggerTemplate otherDerateDeductionLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "otherderatededuction"); -// } -// -// /** -// * 考勤引用 -// * -// * @return -// */ -// @Bean("attendQuoteLoggerTemplate") -// public LoggerTemplate attendQuoteLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "attendquote"); -// } -// -// /** -// * 考勤引用字段管理 -// * -// * @return -// */ -// @Bean("attendQuoteFieldLoggerTemplate") -// public LoggerTemplate attendQuoteFieldLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "attendfield"); -// } -// -// /** -// * 考勤引用字段设置 -// * -// * @return -// */ -// @Bean("attendQuoteFieldSettingLoggerTemplate") -// public LoggerTemplate attendQuoteFieldSettingLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "attendfieldset"); -// } -// -// /** -// * 薪资账套 -// * -// * @return -// */ -// @Bean("salarySobLoggerTemplate") -// public LoggerTemplate salarySobLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarysob"); -// } -// -// /** -// * 薪资核算 -// * -// * @return -// */ -// @Bean("salaryAcctRecordLoggerTemplate") -// public LoggerTemplate salaryAcctRecordLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "acctrecord"); -// } -// -// /** -// * 个税申报表 -// * -// * @return -// */ -// @Bean("taxDeclarationLoggerTemplate") -// public LoggerTemplate taxDeclarationLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "taxdecla"); -// } -// -// /** -// * 福利档案 -// * -// * @return -// */ -// @Bean("siArchivesLoggerTemplate") -// public LoggerTemplate siArchivesLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "siarchives"); -// } -// -// /** -// * 社保规则 -// */ -// @Bean("archiveRuleLoggerTemplate") -// public LoggerTemplate archiveRuleLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "archiverule"); -// } -// -// /** -// * 代缴机构 -// * -// * @return -// */ -// @Bean("paymentAgencyLoggerTemplate") -// public LoggerTemplate paymentAgencyLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "paymentagency"); -// } -// -// /** -// * 福利核算 -// * -// * @return -// */ -// @Bean("siAccountLoggerTemplate") -// public LoggerTemplate siAccountLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "siaccount"); -// } -// -// /** -// * 工资单模板 -// * -// * @return -// */ -// @Bean("salaryTemplateLoggerTemplate") -// public LoggerTemplate salaryTemplateLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarytemplate"); -// } -// -// /** -// * 工资单发放 -// * -// * @return -// */ -// @Bean("salarySendLoggerTemplate") -// public LoggerTemplate salarySendLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarysend"); -// } -// -// /** -// * 外部人员 -// * -// * @return -// */ -// @Bean("extEmployeeLoggerTemplate") -// public LoggerTemplate extEmployeeLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "extemployee"); -// } -// -// /** -// * 薪资档案 -// * -// * @return -// */ -// @Bean("salaryArchiveLoggerTemplate") -// public LoggerTemplate salaryArchiveLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salaryarchive"); -// } -// -// /** -// * 薪资档案-字段 -// * -// * @return -// */ -// @Bean("salaryArchiveFieldLoggerTemplate") -// public LoggerTemplate salaryArchiveFieldLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarcfield"); -// } -// -// /** -// * 薪资档案-薪资项目调整 -// * -// * @return -// */ -// @Bean("salaryArchiveItemAdjustLoggerTemplate") -// public LoggerTemplate salaryArchiveItemAdjustLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarcitemadj"); -// } -// -// /** -// * 薪资档案-批量调薪 -// * -// * @return -// */ -// @Bean("salaryArchiveBatchAdjustLoggerTemplate") -// public LoggerTemplate salaryArchiveBatchAdjustLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "salarcbatadj"); -// } -// -// /** -// * 自定义业务数据设置 -// * -// * @return -// */ -// @Bean("customDataSetLoggerTemplate") -// public LoggerTemplate customDataSetLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "customdataset"); -// } -// -// /** -// * 自定义业务数据 -// * -// * @return -// */ -// @Bean("customDataLoggerTemplate") -// public LoggerTemplate customDataLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "customdata"); -// } -// -// -// /** -// * 人员报送 -// * -// * @return -// */ -// @Bean("employeeDeclareLoggerTemplate") -// public LoggerTemplate employeeDeclareLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "empdeclare"); -// } -// -// /** -// * 单位扣款账号 -// * -// * @return -// */ -// @Bean("withholdAccountLoggerTemplate") -// public LoggerTemplate withholdAccountLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "whaccount"); -// } -// -// /** -// * 银行报盘 -// * -// * @return -// */ -// @Bean("bankOfferLoggerTemplate") -// public LoggerTemplate bankOfferLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "bankoffer"); -// } -// -// /** -// * 银行报盘模板 -// * -// * @return -// */ -// @Bean("bankOfferTemplateLoggerTemplate") -// public LoggerTemplate bankOfferTemplateLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "botemplate"); -// } -// -// /** -// * 薪酬体系标准(岗薪制) -// * -// * @return -// */ -// @Bean("postSalaryLoggerTemplate") -// public LoggerTemplate postSalaryLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "postsalary"); -// } -// -// /** -// * 银行报盘模板 -// * -// * @return -// */ -// @Bean("taxFreeDetailLoggerTemplate") -// public LoggerTemplate taxFreeDetailLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "taxfreedetail"); -// } -// -// /** -// * 最优年终奖计税方案 -// * -// * @return -// */ -// @Bean("annualBonusPlanLoggerTemplate") -// public LoggerTemplate annualBonusPlanLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "annualplan"); -// } -// -// /** -// * 最优年终奖计税方案-累计情况 -// * 最优年终奖计税方案-优化方案详情 -// * -// * @return -// */ -// @Bean("annualBonusLoggerTemplate") -// public LoggerTemplate annualBonusLoggerTemplate() { -// return LoggerTemplateBuilder.build("hrsa", "annualbonus"); -// } + /** + * 个税扣缴义务人 + * + * @return + */ + public static LoggerTemplate taxAgentLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "taxagent"); + } + + public static LoggerTemplate siCategoryLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "siCategory"); + } + + public static LoggerTemplate siSchemeLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "siScheme"); + } + + public static LoggerTemplate totalSchemeLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "totalScheme"); + } + + /** + * 累计情况 + * + * @return + */ + public static LoggerTemplate addUpSituationLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "addupsituation"); + } + + /** + * 累计专项附加扣除 + * + * @return + */ + public static LoggerTemplate addUpDeductionLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "addupdeduction"); + } + + /** + * 其他免税扣除 + * + * @return + */ + public static LoggerTemplate otherDeductionLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "otherdeduction"); + } + + /** + * 减税 + * + * @return + */ + public static LoggerTemplate derateDeductionLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "deratededuction"); + } + + /** + * 税延养老保险 + * + * @return + */ + public static LoggerTemplate endowmentInsuranceLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "endowmentinsurance"); + } + + /** + * 税延养老保险 + * + * @return + */ + public static LoggerTemplate freeIncomeLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "freeincome"); + } + + /** + * 捐赠免税 + * + * @return + */ + public static LoggerTemplate grantDonationLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "grantdonation"); + } + + /** + * 捐赠免税 + * + * @return + */ + public static LoggerTemplate healthInsuranceLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "healthinsurance"); + } + + /** + * 其他免税扣除 + * + * @return + */ + public static LoggerTemplate otherDerateDeductionLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "otherderatededuction"); + } + + /** + * 考勤引用 + * + * @return + */ + public static LoggerTemplate attendQuoteLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "attendquote"); + } + + /** + * 考勤引用字段管理 + * + * @return + */ + public static LoggerTemplate attendQuoteFieldLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "attendfield"); + } + + /** + * 考勤引用字段设置 + * + * @return + */ + public static LoggerTemplate attendQuoteFieldSettingLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "attendfieldset"); + } + + /** + * 薪资账套 + * + * @return + */ + public static LoggerTemplate salarySobLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarysob"); + } + + /** + * 薪资核算 + * + * @return + */ + public static LoggerTemplate salaryAcctRecordLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "acctrecord"); + } + + /** + * 个税申报表 + * + * @return + */ + public static LoggerTemplate taxDeclarationLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "taxdecla"); + } + + /** + * 福利档案 + * + * @return + */ + public static LoggerTemplate siArchivesLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "siarchives"); + } + + /** + * 社保规则 + */ + public static LoggerTemplate archiveRuleLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "archiverule"); + } + + /** + * 代缴机构 + * + * @return + */ + public static LoggerTemplate paymentAgencyLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "paymentagency"); + } + + /** + * 福利核算 + * + * @return + */ + public static LoggerTemplate siAccountLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "siaccount"); + } + + /** + * 工资单模板 + * + * @return + */ + public static LoggerTemplate salaryTemplateLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarytemplate"); + } + + /** + * 工资单发放 + * + * @return + */ + public static LoggerTemplate salarySendLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarysend"); + } + + /** + * 外部人员 + * + * @return + */ + public static LoggerTemplate extEmployeeLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "extemployee"); + } + + /** + * 薪资档案 + * + * @return + */ + public static LoggerTemplate salaryArchiveLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salaryarchive"); + } + + /** + * 薪资档案-字段 + * + * @return + */ + public static LoggerTemplate salaryArchiveFieldLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarcfield"); + } + + /** + * 薪资档案-薪资项目调整 + * + * @return + */ + public static LoggerTemplate salaryArchiveItemAdjustLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarcitemadj"); + } + + /** + * 薪资档案-批量调薪 + * + * @return + */ + public static LoggerTemplate salaryArchiveBatchAdjustLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "salarcbatadj"); + } + + /** + * 自定义业务数据设置 + * + * @return + */ + public static LoggerTemplate customDataSetLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "customdataset"); + } + + /** + * 自定义业务数据 + * + * @return + */ + public static LoggerTemplate customDataLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "customdata"); + } + + + /** + * 人员报送 + * + * @return + */ + public static LoggerTemplate employeeDeclareLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "empdeclare"); + } + + /** + * 单位扣款账号 + * + * @return + */ + public static LoggerTemplate withholdAccountLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "whaccount"); + } + + /** + * 银行报盘 + * + * @return + */ + public static LoggerTemplate bankOfferLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "bankoffer"); + } + + /** + * 银行报盘模板 + * + * @return + */ + public static LoggerTemplate bankOfferTemplateLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "botemplate"); + } + + /** + * 薪酬体系标准(岗薪制) + * + * @return + */ + public static LoggerTemplate postSalaryLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "postsalary"); + } + + /** + * 银行报盘模板 + * + * @return + */ + public static LoggerTemplate taxFreeDetailLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "taxfreedetail"); + } + + /** + * 最优年终奖计税方案 + * + * @return + */ + public static LoggerTemplate annualBonusPlanLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "annualplan"); + } + + /** + * 最优年终奖计税方案-累计情况 + * 最优年终奖计税方案-优化方案详情 + * + * @return + */ + public static LoggerTemplate annualBonusLoggerTemplate() { + return LoggerTemplateBuilder.build("hrsa", "annualbonus"); + } } diff --git a/src/com/engine/salary/elog/dto/LoggerContext.java b/src/com/engine/salary/elog/dto/LoggerContext.java index 8c4b3aa0e..5b00005f0 100644 --- a/src/com/engine/salary/elog/dto/LoggerContext.java +++ b/src/com/engine/salary/elog/dto/LoggerContext.java @@ -7,6 +7,7 @@ import com.engine.salary.elog.enums.ElogConsts; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.StringUtils; +import weaver.hrm.User; import java.io.Serializable; import java.util.ArrayList; @@ -26,6 +27,8 @@ public class LoggerContext implements Serializable { private static final long serialVersionUID = 15869325700230992L; + private User user; + @ElogField(comment = "ID", dataType = DataTypeEnum.BIGINT, isKey = true) @ApiModelProperty("日志ID") private long id; @@ -263,6 +266,14 @@ public class LoggerContext implements Serializable { private List clobFieldList; + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + public List getClobFieldList() { return clobFieldList; } diff --git a/src/com/engine/salary/elog/util/ElogUtils.java b/src/com/engine/salary/elog/util/ElogUtils.java index 5e792fbdd..077593ee6 100644 --- a/src/com/engine/salary/elog/util/ElogUtils.java +++ b/src/com/engine/salary/elog/util/ElogUtils.java @@ -10,6 +10,7 @@ import org.apache.dubbo.common.utils.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; +import weaver.hrm.User; import javax.servlet.http.HttpServletRequest; import java.io.ByteArrayInputStream; @@ -305,33 +306,6 @@ public class ElogUtils { } } - public static boolean isLongValue(String v) { - try { - Long.parseLong(v); - } catch (Exception e) { - return false; - } - return true; - } - - public static int currentLanguage() { -// String employeeId = getEmployeeId(); -// if (employeeId != null) { -// return I18nLanguageUtil.getLangId(Long.parseLong(employeeId)); -// } else { -// return 7; -// } - return 7; - } - -// /** -// * 获取request请求 -// * -// * @return -// */ -// public static HttpServletRequest getRequest() { -// return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); -// } /** * 将对象转换程字符串 @@ -409,80 +383,32 @@ public class ElogUtils { } } -// public static String getTenantKey() { -// -// String tenantKey = TenantRpcContext.getTenantKey(); -// if (StringUtils.isNotBlank(tenantKey)) { -// return tenantKey; -// } -// -// return ""; -// } -// -// public static String getEmployeeId() { -// -// String employeeId = TenantRpcContext.getEmployeeId(); -// if (StringUtils.isNotBlank(employeeId)) { -// return employeeId; -// } -// -// return ""; -// } - - public static String getUserName() { - -// String employeeId = getEmployeeId(); -// if (StringUtils.isNotEmpty(employeeId)) { -// HrmEmployeeComInfo simpleEmployee = null; -// try { -// ComInfoCache bean = SpringUtils.getBean(ComInfoCache.class); -// if (bean != null) { -// simpleEmployee = bean.getCacheById(HrmEmployeeComInfo.class, ElogUtils.getLongValue(employeeId)); -// } -// } catch (Exception e) { -// logger.error("Exception", e); -// } -// if (simpleEmployee != null) { -// if (StringUtils.isNotBlank(simpleEmployee.getUsername())) { -// return simpleEmployee.getUsername(); -// } -// } -// } - - - return ""; - } - /** * 获取rpc信息(客户端ip和来源设备) * * @param context */ public static void initRpcInfo(LoggerContext context) { -// String device = ""; -// String clientIp = ""; -// String traceId = ""; -// try { -// device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); -// clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); -// traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); -//// logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); -// } catch (Exception e) { -// logger.error("Exception", e); -// } -// if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { -// context.setDevice(device); -// } -// if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { -// context.setFromTerminal(getFromTerminal(device)); -// } -// -// if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { -// context.setClientIp(clientIp); -// } -// if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { -// context.setBelongMainId(traceId); -// } + User user = context.getUser(); + if(user == null){ + return; + } + String device = user.getLogintype(); + String clientIp = user.getLoginip(); + String traceId = ""; + if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { + context.setDevice(device); + } + if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { + context.setFromTerminal(getFromTerminal(device)); + } + + if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { + context.setClientIp(clientIp); + } + if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { + context.setBelongMainId(traceId); + } } public static String getFromTerminal(String device) { diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index c5584bc62..f3fca954a 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.dubbo.common.utils.AnnotationUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import weaver.hrm.User; import java.lang.reflect.Field; import java.util.*; @@ -240,17 +241,12 @@ public class LoggerTemplate { } context.setTempParams(null); - //User user = UserContext.getCurrentUser(); - //if(user != null) { - // 通过统一登录获取 - String employeeId = "92"; + String employeeId = Optional.ofNullable(context.getUser()).map(User::getUID).orElse(0).toString(); String tenantKey = SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; - String userName = ElogUtils.getUserName(); - //String userName = TenantRpcContext.getEmployeeId(); + String userName = Optional.ofNullable(context.getUser()).map(User::getUsername).orElse("").toString(); if (StringUtils.isEmpty(context.getOperator()) && StringUtils.isNotEmpty(employeeId)) { context.setOperator(employeeId + ""); } - if (StringUtils.isEmpty(context.getTenant_key()) && StringUtils.isNotEmpty(tenantKey)) { context.setTenant_key(tenantKey); } @@ -266,16 +262,17 @@ public class LoggerTemplate { context.setTargetId("-1"); } -// RequestAttributes requestAttributes = WeaverRequestContextHolder.getRequestAttributesSafely(); +// RequestAttributes requestAttributes = SalaryContext.get().getRequestAttributesSafely(); // if ((requestAttributes instanceof ServletRequestAttributes)) { // HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); -// ElogUtils.initRequestInfo(request, context);z +// ElogUtils.initRequestInfo(request, context); // } else { // if (StringUtils.isEmpty(context.getRequestUrl())) { // context.setRequestUrl("非http请求"); // } // ElogUtils.initRpcInfo(context); // } + ElogUtils.initRpcInfo(context); List changeBeans = context.getChangeValues(); diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml index 4bd8ea6d2..41e8003ef 100644 --- a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml +++ b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml @@ -74,7 +74,7 @@ #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time}, #{logContent.delete_type}) + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type}) @@ -122,7 +122,7 @@ #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time}, #{logContent.delete_type} + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} FROM DUAL diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index f53e0ddeb..1eebda42e 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -210,6 +210,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService salaryItemBiz.insert(salaryItemPO); // 记录日志 LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); loggerContext.setTargetName(salaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); @@ -291,6 +292,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService // 记录日志 LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); loggerContext.setTargetName(newSalaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); diff --git a/src/com/engine/salary/util/ResponseResult.java b/src/com/engine/salary/util/ResponseResult.java index 7755bc673..2036fd1a2 100644 --- a/src/com/engine/salary/util/ResponseResult.java +++ b/src/com/engine/salary/util/ResponseResult.java @@ -3,9 +3,8 @@ package com.engine.salary.util; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.serializer.SerializerFeature; -import com.engine.common.service.HrmCommonService; -import com.engine.common.service.impl.HrmCommonServiceImpl; import com.engine.core.exception.ECException; +import com.engine.salary.common.SalaryContext; import com.engine.salary.exception.ExceptionUtil; import com.engine.salary.exception.SalaryRunTimeException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -14,6 +13,8 @@ import lombok.extern.slf4j.Slf4j; import weaver.general.BaseBean; import weaver.hrm.User; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; @@ -35,14 +36,20 @@ public class ResponseResult { private final User user; - private final HrmCommonService hrmCommonService = new HrmCommonServiceImpl(); - private final BaseBean baseBean = new BaseBean(); private final Boolean isLog = "true".equals(baseBean.getPropValue("hrmSalary", "log")); public ResponseResult(User user) { this.user = user; + SalaryContext.get().setValue("user", user); + } + + public ResponseResult(HttpServletRequest request, HttpServletResponse response, User user) { + this.user = user; + SalaryContext.get().setValue("user", user); + SalaryContext.get().setValue("request", request); + SalaryContext.get().setValue("response", response); } diff --git a/src/com/engine/salary/web/SalaryItemController.java b/src/com/engine/salary/web/SalaryItemController.java index 39131b9f4..cae184b9b 100644 --- a/src/com/engine/salary/web/SalaryItemController.java +++ b/src/com/engine/salary/web/SalaryItemController.java @@ -1,7 +1,6 @@ package com.engine.salary.web; import com.engine.common.util.ServiceUtil; -import com.engine.salary.common.SalaryContext; import com.engine.salary.component.WeaFormOption; import com.engine.salary.entity.salaryitem.dto.SalaryItemFormDTO; import com.engine.salary.entity.salaryitem.dto.SalaryItemListDTO; @@ -41,7 +40,6 @@ import java.util.Map; public class SalaryItemController { private SalaryItemWrapper getSalaryItemWrapper(User user) { - SalaryContext.get().setValue("user",user); return ServiceUtil.getService(SalaryItemWrapper.class, user); } @@ -60,7 +58,7 @@ public class SalaryItemController { @Produces(MediaType.APPLICATION_JSON) public String listSalaryItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryItemSearchParam searchParam) { User user = HrmUserVarify.getUser(request, response); - return new ResponseResult>(user).run(getSalaryItemWrapper(user)::listPage, searchParam); + return new ResponseResult>(request, response, user).run(getSalaryItemWrapper(user)::listPage, searchParam); } @@ -168,9 +166,9 @@ public class SalaryItemController { public String saveSalaryItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryItemSaveParam saveParam) { User user = HrmUserVarify.getUser(request, response); if (saveParam.getId() == null || saveParam.getId() <= 0) { - return new ResponseResult(user).run(getSalaryItemWrapper(user)::save, saveParam); + return new ResponseResult(request, response, user).run(getSalaryItemWrapper(user)::save, saveParam); } else { - return new ResponseResult(user).run(getSalaryItemWrapper(user)::update, saveParam); + return new ResponseResult(request, response, user).run(getSalaryItemWrapper(user)::update, saveParam); } } From 7a2332474494a760122fa2bdbefe6d7b703fac90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 22 Dec 2023 14:52:09 +0800 Subject: [PATCH 024/169] =?UTF-8?q?=E4=BF=AE=E6=94=B9elog=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml index c345b7aba..a0410827b 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -3,10 +3,10 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - insert into elog_version (id, maintable, version) values (#{id},#{mainTable},#{version}) + insert into hrsa_elog_version (id, maintable, version) values (#{id},#{mainTable},#{version}) create table ${mainTable} From ea8d51c493ccad7f4f9db32ffe3a7c5315e1830d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 22 Dec 2023 16:36:11 +0800 Subject: [PATCH 025/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SalaryItemServiceImpl.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index 1eebda42e..0110994fa 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -354,17 +354,18 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService // 删除薪资项目 ids = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getId); salaryItemBiz.deleteByIds(ids); - //todo 记录删除日志 -// salaryItemPOS.forEach(salaryItemPO -> { -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); -// loggerContext.setTargetName(salaryItemPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目") + ": " + salaryItemPO.getName()); -// loggerContext.setOldValues(salaryItemPO); -// salaryItemLoggerTemplate.write(loggerContext); -// }); + // 记录删除日志 + salaryItemPOS.forEach(salaryItemPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + salaryItemLoggerTemplate.write(loggerContext); + }); } From 8b5703c8948f8370cfbfeedd8f11183547d7de8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 25 Dec 2023 09:36:23 +0800 Subject: [PATCH 026/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/salary/web/LoggerTableController.java | 15 + .../salary/elog/annotation/HandleElog.java | 17 + src/com/engine/salary/elog/dto/ElogBean.java | 116 + .../salary/elog/dto/FilterConditionDto.java | 91 + .../engine/salary/elog/dto/ShowColumsDto.java | 105 + .../elog/service/ILoggerTableService.java | 39 + .../elog/service/impl/LoggerTableService.java | 1972 +++++++++++++++++ .../salary/elog/util/ElogServiceUtils.java | 92 + .../elog/util/ElogSeviceSwitchUtils.java | 1394 ++++++++++++ .../salary/elog/util/ElogSeviceUtils.java | 547 +++++ .../elog/web/LoggerTableController.java | 178 ++ 11 files changed, 4566 insertions(+) create mode 100644 src/com/api/salary/web/LoggerTableController.java create mode 100644 src/com/engine/salary/elog/annotation/HandleElog.java create mode 100644 src/com/engine/salary/elog/dto/ElogBean.java create mode 100644 src/com/engine/salary/elog/dto/FilterConditionDto.java create mode 100644 src/com/engine/salary/elog/dto/ShowColumsDto.java create mode 100644 src/com/engine/salary/elog/service/ILoggerTableService.java create mode 100644 src/com/engine/salary/elog/service/impl/LoggerTableService.java create mode 100644 src/com/engine/salary/elog/util/ElogServiceUtils.java create mode 100644 src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java create mode 100644 src/com/engine/salary/elog/util/ElogSeviceUtils.java create mode 100644 src/com/engine/salary/elog/web/LoggerTableController.java diff --git a/src/com/api/salary/web/LoggerTableController.java b/src/com/api/salary/web/LoggerTableController.java new file mode 100644 index 000000000..eb33772ce --- /dev/null +++ b/src/com/api/salary/web/LoggerTableController.java @@ -0,0 +1,15 @@ +package com.api.salary.web; + +import javax.ws.rs.Path; + +/** + * 日志列表公共接口暴漏 + *

Copyright: Copyright (c) 2023

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +@Path("/bs/hrmsalary/elog") +public class LoggerTableController { +} diff --git a/src/com/engine/salary/elog/annotation/HandleElog.java b/src/com/engine/salary/elog/annotation/HandleElog.java new file mode 100644 index 000000000..387666b18 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/HandleElog.java @@ -0,0 +1,17 @@ +package com.engine.salary.elog.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface HandleElog { + + String modulename() default ""; + + String functionname() default ""; + + String service() default ""; +} diff --git a/src/com/engine/salary/elog/dto/ElogBean.java b/src/com/engine/salary/elog/dto/ElogBean.java new file mode 100644 index 000000000..d4239b9a7 --- /dev/null +++ b/src/com/engine/salary/elog/dto/ElogBean.java @@ -0,0 +1,116 @@ +package com.engine.salary.elog.dto; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @Date: 2022/5/2 21:51 + * @Author: deli.xu + * @Description: 日志中心bean + **/ +public class ElogBean implements Serializable { + + + private static final long serialVersionUID = 5357552376749564256L; + private String module; + private String function; + private String pageNum; + private String pageSize; + private String dataset; + private String searchMap; + private List showColumns = new ArrayList<>(); + private List filterConditionDtos = new ArrayList<>(); + private String downloadSize; + private String transMethod; + private Map authParamsJson; + + public String getModule() { + return module; + } + + public void setModule(String module) { + this.module = module; + } + + public String getFunction() { + return function; + } + + public void setFunction(String function) { + this.function = function; + } + + public String getPageNum() { + return pageNum; + } + + public void setPageNum(String pageNum) { + this.pageNum = pageNum; + } + + public String getPageSize() { + return pageSize; + } + + public void setPageSize(String pageSize) { + this.pageSize = pageSize; + } + + public String getDataset() { + return dataset; + } + + public void setDataset(String dataset) { + this.dataset = dataset; + } + + public String getSearchMap() { + return searchMap; + } + + public void setSearchMap(String searchMap) { + this.searchMap = searchMap; + } + + public List getShowColumns() { + return showColumns; + } + + public void setShowColumns(List showColumns) { + this.showColumns = showColumns; + } + + public List getFilterConditionDtos() { + return filterConditionDtos; + } + + public void setFilterConditionDtos(List filterConditionDtos) { + this.filterConditionDtos = filterConditionDtos; + } + + public String getDownloadSize() { + return downloadSize; + } + + public void setDownloadSize(String downloadSize) { + this.downloadSize = downloadSize; + } + + public String getTransMethod() { + return transMethod; + } + + public void setTransMethod(String transMethod) { + this.transMethod = transMethod; + } + + public Map getAuthParamsJson() { + return authParamsJson; + } + + public void setAuthParamsJson(Map authParamsJson) { + this.authParamsJson = authParamsJson; + } +} diff --git a/src/com/engine/salary/elog/dto/FilterConditionDto.java b/src/com/engine/salary/elog/dto/FilterConditionDto.java new file mode 100644 index 000000000..d276b1b27 --- /dev/null +++ b/src/com/engine/salary/elog/dto/FilterConditionDto.java @@ -0,0 +1,91 @@ +package com.engine.salary.elog.dto; + +import java.io.Serializable; + +/** + * @date: 2021/5/25 17:23 + * @author: deli.xu + * @description: + */ +public class FilterConditionDto implements Serializable { + + private static final long serialVersionUID = -3399942468474767859L; + + /** + * 列名 + */ + private String columIndex; + /** + * 值 + */ + private String value; + + /** + * 过滤类型 + */ + private String type; + + /** + * 模糊搜索 + */ + private Like like; + + /** + * 关联条件 + */ + private String connectCondition; + + /** + * sql条件 + */ + private String sql; + + + public String getColumIndex() { + return columIndex; + } + + public void setColumIndex(String columIndex) { + this.columIndex = columIndex; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Like getLike() { + return like; + } + + public void setLike(Like like) { + this.like = like; + } + + public String getConnectCondition() { + return connectCondition; + } + + public void setConnectCondition(String connectCondition) { + this.connectCondition = connectCondition; + } + + public String getSql() { + return sql; + } + + public void setSql(String sql) { + this.sql = sql; + } +} diff --git a/src/com/engine/salary/elog/dto/ShowColumsDto.java b/src/com/engine/salary/elog/dto/ShowColumsDto.java new file mode 100644 index 000000000..828474be5 --- /dev/null +++ b/src/com/engine/salary/elog/dto/ShowColumsDto.java @@ -0,0 +1,105 @@ +package com.engine.salary.elog.dto; + + +import java.io.Serializable; + +/** + * @date: 2021/5/11 18:46 + * @author: deli.xu + * @description: 显示列对象 + */ +public class ShowColumsDto implements Serializable { + + private static final long serialVersionUID = 4650449925605408753L; + + /** + * 列名 + */ + private String columName; + /** + * 列别名 + */ + private String aliasColumName; + + /** + * 列名index + */ + private String columIndex; + + /** + * 是否隐藏 默认显示 + */ + private boolean isHide = false; + + /** + * 宽度 + */ + private String width; + + /** + * 是否转多语言 + */ + private boolean isTransfLanguage = false; + + /** + * 是否换行 + * @param width + */ + private boolean newLine = false; + + public void setWidth(String width){ + this.width =width; + } + + public String getWidth(){ + return width; + } + public String getColumName() { + return columName; + } + + public void setColumName(String columName) { + this.columName = columName; + } + + public String getAliasColumName() { + return aliasColumName; + } + + public void setAliasColumName(String aliasColumName) { + this.aliasColumName = aliasColumName; + } + + public boolean isHide() { + return isHide; + } + + public void setHide(boolean hide) { + isHide = hide; + } + + public String getColumIndex() { + return columIndex; + } + + public void setColumIndex(String columIndex) { + this.columIndex = columIndex; + } + + public boolean isTransfLanguage() { + return isTransfLanguage; + } + + public boolean isNewLine() { + return newLine; + } + + public void setNewLine(boolean newLine) { + this.newLine = newLine; + } + + public void setTransfLanguage(boolean transfLanguage) { + + isTransfLanguage = transfLanguage; + } +} diff --git a/src/com/engine/salary/elog/service/ILoggerTableService.java b/src/com/engine/salary/elog/service/ILoggerTableService.java new file mode 100644 index 000000000..00c5b6327 --- /dev/null +++ b/src/com/engine/salary/elog/service/ILoggerTableService.java @@ -0,0 +1,39 @@ +package com.engine.salary.elog.service; + +import com.weaver.common.batch.entity.BatchDocumentMessage; +import com.weaver.common.component.table.WeaTable; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +public interface ILoggerTableService { + WeaTable queryLogs(String data); + + WeaTable queryLogsPapi(String data, HttpServletRequest request); + + List getDetailChanges(String module, String function, String mainid,String transMethod); + + List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request); + + List queryLogList(String module, String function, String current, String pageSize, String condition); + + List queryCardLogList(String data); + + Map countLog(String module, String function); + + List queryDetailLogList(String module, String function, String current, String pageSize, String condition, String mainId); + + Map countDestailLog(String module, String function, String mainId); + + WeaTable queryElogTraceInfo(String traceId, String module, String function, Integer currentPage, Integer pageSize,String traceTransMethod); + + List queryLogInfoByCustom(String module, String function, String field, String value, boolean isDetail); + + List queryLogInfoByCustom(String module, String function, String field, String value); + + BatchDocumentMessage downloadLog(String data); + + WeaTable getDetailChangePages(String module, String function, String mainid, String detailTransMethod, String current, String pageSize); + +} diff --git a/src/com/engine/salary/elog/service/impl/LoggerTableService.java b/src/com/engine/salary/elog/service/impl/LoggerTableService.java new file mode 100644 index 000000000..bb5dfc812 --- /dev/null +++ b/src/com/engine/salary/elog/service/impl/LoggerTableService.java @@ -0,0 +1,1972 @@ +package com.engine.salary.elog.service.impl; + +import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.ElogBean; +import com.engine.salary.elog.dto.FilterConditionDto; +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.dto.ShowColumsDto; +import com.engine.salary.elog.service.ILoggerTableService; +import com.engine.salary.elog.util.ElogServiceUtils; +import com.engine.salary.elog.util.ElogSeviceUtils; +import com.engine.salary.mapper.elog.LocalElogDaoMapper; +import com.weaver.common.batch.consts.FileType; +import com.weaver.common.batch.consts.HandlerFileMethod; +import com.weaver.common.batch.entity.BatchDocumentMessage; +import com.weaver.common.batch.entity.BatchFile; +import com.weaver.common.batch.entity.ExcelSheet; +import com.weaver.common.batch.sender.BatchExportSender; +import com.weaver.common.cache.tablecache.impl.ComInfoCache; +import com.weaver.common.component.table.WeaTable; +import com.weaver.common.component.table.column.WeaTableColumn; +import com.weaver.common.component.table.page.Page; +import com.weaver.common.distribution.genid.IdGenerator; +import com.weaver.common.elog.annotation.HandleElog; +import com.weaver.common.elog.annotation.OperateType; +import com.weaver.common.elog.annotation.handle.ElogMethodHandler; +import com.weaver.common.elog.annotation.handle.MethodHandler; +import com.weaver.common.elog.consts.ElogEsTableConsts; +import com.weaver.common.elog.dao.QueryCommonTabeMapper; +import com.weaver.common.elog.dto.*; +import com.weaver.common.elog.enums.ElogConsts; +import com.weaver.common.elog.service.ApplicationContextProvider; +import com.weaver.common.elog.service.ElogHandleService; +import com.weaver.common.elog.util.*; +import com.weaver.common.hrm.cache.HrmAvatarComInfo; +import com.weaver.common.hrm.cache.HrmEmployeeComInfo; +import com.weaver.common.hrm.domain.organization.HrmConditionResultType; +import com.weaver.common.hrm.domain.organization.HrmOrgEmpCondition; +import com.weaver.common.hrm.entity.employee.HrmEmployee; +import com.weaver.common.hrm.service.HrmCommonEmployeeService; +import com.weaver.common.hrm.util.HrmCommonUtil; +import com.weaver.common.hrm.util.HrmI18nUtil; +import com.weaver.common.i18n.label.SystemEnv; +import com.weaver.common.i18n.tool.config.date.format.DateRangeTransformer; +import com.weaver.common.i18n.tool.util.I18nUtil; +import com.weaver.common.mybatis.baseConfig.WeaDatabaseIdProvider; +import com.weaver.common.mybatis.util.DatabaseUtil; +import com.weaver.common.security.util.SecurityUtil; +import com.weaver.framework.rpc.context.impl.TenantRpcContext; +import com.weaver.teams.security.context.UserContext; +import com.weaver.teams.security.user.User; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.elasticsearch.action.admin.indices.get.GetIndexRequest; +import org.elasticsearch.action.search.SearchRequest; +import org.elasticsearch.action.search.SearchResponse; +import org.elasticsearch.client.RequestOptions; +import org.elasticsearch.client.RestHighLevelClient; +import org.elasticsearch.client.indices.CreateIndexRequest; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.search.SearchHit; +import org.elasticsearch.search.SearchHits; +import org.elasticsearch.search.builder.SearchSourceBuilder; +import org.elasticsearch.xcontent.XContentType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.annotation.AnnotationUtils; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.util.*; +import java.util.stream.Collectors; + +import static com.weaver.common.elog.consts.LogConstants.MAPPING_TEMPLATE; + +public class LoggerTableService implements ILoggerTableService { + + private static final Logger logger = LoggerFactory.getLogger(LoggerTableService.class); + + @Autowired + private LocalElogDaoMapper localElogDaoMapper; + + @Autowired + private ComInfoCache comInfoCache; + + @Autowired + private HrmCommonUtil hrmCommonUtil; + + @Autowired + private QueryCommonTabeMapper queryCommonTabeMapper; + + @Autowired + private RestHighLevelClient restHighLevelClient; + + @Resource + private BatchExportSender batchExportSender; + + + @Resource + private DateRangeTransformer dateRangeTransformer; + + @Autowired + private HrmCommonEmployeeService hrmCommonEmployeeService; + + + private static final String databaseId = DatabaseUtil.getDatabaseId(); + + @Override + public WeaTable queryLogs(String data) { + //解析数据 + ElogBean elogBean = ElogServiceUtils.getElogBean(data); + // columIndex统一转为小写 + Optional.ofNullable(elogBean.getShowColumns()) + .ifPresent(list -> { + list.forEach(x -> { + if (StringUtils.isNotBlank(x.getColumIndex())) { + x.setColumIndex(x.getColumIndex().toLowerCase()); + } + }); + }); + + List showColums = elogBean.getShowColumns(); + String module = elogBean.getModule(); + String function = elogBean.getFunction(); + String searchMap = elogBean.getSearchMap(); + String pageSize = elogBean.getPageSize(); + String pageNum = elogBean.getPageNum(); + String downloadSize = elogBean.getDownloadSize(); + List filterConditionDtos = elogBean.getFilterConditionDtos(); + String transMethod = elogBean.getTransMethod(); + Map authParamsJson = elogBean.getAuthParamsJson(); + + //获取 context 数据 + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + context.setTenant_key(getTenantKey()); +// context.setOperator(getEmployeeId()); + //获取主表 + String tableName = ElogSeviceUtils.getTableName(module, function); + //获取weaTable + WeaTable weaTable = new WeaTable(); + List recordColumns = getWeaColumns(data, showColums, module, function, weaTable); + //获取条件sql + String searchMapsql = getSearchMapSql(searchMap, module, function,elogBean.getShowColumns()); + String sb = getQueryCondition(filterConditionDtos); + sb = searchMapsql.concat(sb); + //处理数据权限 + Map res = getCustomAuthSql(transMethod, authParamsJson, "auth"); + if (!res.isEmpty()) { + Object flag = res.get("flag"); + if (flag != null && flag instanceof Boolean) { + boolean f = (boolean) flag; + if (!f) { + weaTable.setCustomParameters(res); + return weaTable; + } + } + } + String customSql = getCustomSql(transMethod, sb, "before"); + //处理数据权限(前缀) + Map hashMap = addPermissionHandler(transMethod); + logger.info("查询条件sql:{}", customSql); + //处理数据权限(对接权限sql) + PermissionParams permissionParams = getPermissionParams(hashMap); + String permissionId = permissionParams.getPermissionId(); + String permissionType = permissionParams.getPermissionType(); + String mainDataTable = permissionParams.getMainDataTable(); + String mainDataTableAlias = permissionParams.getMainDataTableAlias(); + String primaryKey = permissionParams.getPrimaryKey(); + String permissionTargetId = permissionParams.getPermissionTargetId(); + String permissionConfigSourceId = permissionParams.getPermissionConfigSourceId(); + + + // 设置操作菜单 + //weaTable.getOperates().add(new WeaTableOperate("查看", 1)); + + // 分页 + //Page page = ElogSeviceUtils.getPage(); + Page page = null; + if (StringUtils.isEmpty(downloadSize)) { + page = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); + } else { + int pagesize = ElogSeviceUtils.getIntValue(downloadSize, 5000); + page = new Page(1, pagesize); + } + + String columns = getshowColumsStr(showColums); + + Map countMap = new HashMap<>(); + Long countNum = 0l; + + //最终查询前 + List interceptChain = ApplicationContextProvider.getServiceBean(ElogHandleService.class) + .stream().filter(Objects::nonNull) + .filter(x -> x instanceof ElogHandleService) + .map(x -> (ElogHandleService) x) + .collect(Collectors.toList()); + + if (CollectionUtils.isNotEmpty(interceptChain)) { + for (ElogHandleService handleService : interceptChain) { + Class itemClass = handleService.getClass(); + HandleElog annotation = itemClass.getAnnotation(HandleElog.class); + if(Objects.isNull(annotation)){ + annotation = AnnotationUtils.findAnnotation(itemClass, HandleElog.class); + } + if(Objects.nonNull(annotation)){ + if(module.equalsIgnoreCase(annotation.modulename())){ + String employeeId = getUserId(); + long id = StringUtils.isEmpty(employeeId) ? -1 : Long.parseLong(employeeId); + ElogHandleDto elogHandleDto = new ElogHandleDto(module,function,context.getTenant_key(),id,customSql,filterConditionDtos); + boolean preQuery = handleService.preQuery(elogHandleDto); + customSql = elogHandleDto.getSql(); + } + } + } + } + + // 查询 + List list = new ArrayList<>(); + if (StringUtils.isNotEmpty(permissionId) || StringUtils.isNotEmpty(permissionType) || StringUtils.isNotEmpty(mainDataTableAlias) || StringUtils.isNotEmpty(mainDataTable) || StringUtils.isNotEmpty(permissionTargetId) || StringUtils.isNotEmpty(permissionConfigSourceId)) { + list = localElogDaoMapper.queryElogList(page, context, null, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId,"*"); + countNum = localElogDaoMapper.elogCountOnlyNum(context, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId); + } else { + list = localElogDaoMapper.queryElogList(page, context, null, tableName, customSql,"*"); + countMap = localElogDaoMapper.elogCount(context, tableName, customSql); + + } + + String databaseId = WeaDatabaseIdProvider.databaseId; + if ("st".equals(databaseId)) { + //st数据库 date类型特殊处理 + list.forEach(map -> { + map.forEach((k, v) -> { + if (v instanceof Date) { + map.put(k, DateUtil.format((Date) v, "yyyy-MM-dd HH:mm:ss")); + } + }); + }); + + } + + String propertiesValue = module + "." + function + ".es"; + String value = ApplicationContextProvider.getPropertiesValue(propertiesValue); + logger.info("propertiesValue:{},value:{}", propertiesValue,value); + if (StringUtils.isNotEmpty(value) && !value.equalsIgnoreCase("${" + propertiesValue + "}")) { + //if判断通过说明走了自定义ES存储es + String[] fields = getESfields(value); + if (fields != null && fields.length > 0) { + for (Map map : list) { + String logDate = map.get("log_date").toString(); + logger.info("logDate:{}" ,logDate); + String esDate = logDate.substring(0, 10); + //先判断表存不存在,不存在创建 + if (checkEsTableIsExist(esDate)) { + // 根据id通过es查询大字段(params)然后赋值 + SearchRequest searchRequest = new SearchRequest(getElogESTableName(true,esDate)); + SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); + // 只获取指定字段 + searchSourceBuilder.fetchSource(fields, null); + // 根据id匹配 + searchSourceBuilder.query(QueryBuilders.termQuery("id",map.get("id").toString())); + searchRequest.source(searchSourceBuilder); + + SearchResponse searchResponse = null; + try { + searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT); + } catch (IOException e) { + logger.info("查询ES出现异常:{}",e.getMessage()); + } + SearchHits hits = searchResponse.getHits(); + SearchHit[] searchHits = hits.getHits(); + if (searchHits != null && searchHits.length > 0) { + // 根据id匹配唯一,所以直接取第一个 + Map sourceAsMap = searchHits[0].getSourceAsMap(); + if (Objects.nonNull(sourceAsMap) && sourceAsMap.size() > 0) { + logger.info("ES查出来的sourceAsMap:{}",JSON.toJSONString(sourceAsMap)); + map.putAll(sourceAsMap); + } + } + } + } + } + } + //处理转换其他数据库类型值 + list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); + //处理用户信息Data + + // 大小写转换 + ElogSeviceSwitchUtils.changKey2Lower(list); + + transSwitchDataInfo(list,recordColumns); + //转换多语言 + //ElogSeviceSwitchUtils.switchValues(list, recordColumns, true); + //ElogSeviceSwitchUtils.switchChangeValues(list); + logger.info("开始执行转换方法"); + if (Util.isNotEmpty(transMethod)) { + logger.info("转换方法:{}", transMethod); + // 消费到消息,通过MethodHandler调用对应的方法 + MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(transMethod); + if (methodHandler != null) { + try { + logger.info("执行方法前的数据:{}", JSON.toJSONString(list)); + methodHandler.execute(list); + logger.info("执行方法后的数据:{}", JSON.toJSONString(list)); + } catch (Exception e) { + logger.error("转换出错:" + e); + } + } + + } + page.setTotal(ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); + page.setRecords(switchString(list)); + if (!countNum.equals(0l)) { + //countNum不为0 则覆盖 + page.setTotal(countNum); + + } + // 处理后的数据 + // weaTable.setDisplayData(DataTransform.userProcessData(page.getRecords())); + + // 处理操作菜单权限 + //weaTable.setOperatesPermission(DataTransform.userOperatesPermission(page.getRecords())); + + // 处理选择框权限 + //weaTable.setCheckBoxPermission(DataTransform.userCheckBoxPermission(page.getRecords())); + + // 存放结果集 + weaTable.setPage(page); + return weaTable; + } + + @Override + public WeaTable queryLogsPapi(String data, HttpServletRequest request) { + return null; + } + + @Override + public List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request) { + return null; + } + + + private String getshowColumsStr(List showColums) { + StringBuffer sb = new StringBuffer(); + sb.append("id,uuid,targetid,params,operatetype,link_id,link_type,"); + for (ShowColumsDto showColum : showColums) { + String columIndex = showColum.getColumIndex(); + if ("date".equalsIgnoreCase(columIndex) || "createdate".equalsIgnoreCase(columIndex)){ + columIndex = "log_date"; + }else if ("operator".equalsIgnoreCase(columIndex)){ + columIndex = "log_operator"; + }else if ("modulenamespan".equalsIgnoreCase(columIndex)){ + columIndex = "modulename"; + } else if ("functionnameespan".equalsIgnoreCase(columIndex)){ + columIndex = "functionname"; + } else if ("avatar".equals(columIndex)) { + continue; + } + sb.append(columIndex).append(","); + } + String substring = sb.toString().substring(0, sb.toString().length() - 1); + return substring; + } + + private PermissionParams getPermissionParams(Map hashMap) { + PermissionParams permissionParams = new PermissionParams(); + String permissionId = getPermissionStr(hashMap, "permissionId"); + String permissionType = getPermissionStr(hashMap, "permissionType"); + String mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); + String mainDataTable = getPermissionStr(hashMap, "mainDataTable"); + String primaryKey = getPermissionStr(hashMap, "primaryKey"); + String permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); + String permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); + + permissionParams.setPermissionId(permissionId); + permissionParams.setPermissionType(permissionType); + permissionParams.setMainDataTableAlias(mainDataTableAlias); + permissionParams.setMainDataTable(mainDataTable); + permissionParams.setPrimaryKey(primaryKey); + permissionParams.setPermissionTargetId(permissionTargetId); + permissionParams.setPermissionConfigSourceId(permissionConfigSourceId); + + return permissionParams; + + } + + private List getWeaColumns(String data, List showColums, String module, String function, WeaTable weaTable) { + // 每一个Table的唯一标识 + weaTable.setPageUid(IdGenerator.generate() + ""); + // 表头 + //weaTable.getColumns().add(new WeaTableColumn("id","id", true)); + List recordColumns = new ArrayList<>(); + if (showColums != null && showColums.size() > 0) { + for (ShowColumsDto showColum : showColums) { + if (showColum.isTransfLanguage()) { + recordColumns.add(showColum.getColumIndex()); + } + if (StringUtils.isNotBlank(showColum.getAliasColumName())) { + WeaTableColumn weaTableColumn = new WeaTableColumn(showColum.getAliasColumName(), showColum.getColumIndex(), getColumnsWidth(showColum), "", showColum.isHide()); + if (showColum.isNewLine()) { + weaTableColumn.setNewLine(showColum.isNewLine()); + } + weaTable.getColumns().add(weaTableColumn); + } else if (StringUtils.isNotBlank(showColum.getColumName())) { + WeaTableColumn weaTableColumn = new WeaTableColumn(FieldNameMap.getMainFieldNameMap(data, function, showColum.getColumName()), showColum.getColumIndex(), getColumnsWidth(showColum), "", showColum.isHide()); + if (showColum.isNewLine()) { + weaTableColumn.setNewLine(showColum.isNewLine()); + } + weaTable.getColumns().add(weaTableColumn); + } + } + } else { + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "moduleName"), "modulenamespan", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "functionName"), "functionnamespan", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "clientIp"), "clientip", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "operateTypeName"), "operatetypename", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "targetName"), "targetname", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "date"), "createdate", "5%")); + weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "operatorName"), "operatorname", "5%")); + } + return recordColumns; + } + + private String getTargetid(List filterConditionDtos) { + if (!filterConditionDtos.isEmpty()) { + for (FilterConditionDto filterConditionDto : filterConditionDtos) { + if ("targetid".equalsIgnoreCase(filterConditionDto.getColumIndex())) { + return filterConditionDto.getValue(); + } + } + } + return ""; + } + + private String getPermissionStr(Map hashMap, String str) { + if (hashMap != null && hashMap.size() > 0) { + Object obj = hashMap.get(str); + if (obj != null) { + return obj.toString(); + } + } + return ""; + } + + /** + * 处理数据权限 + * + * @param transMethod + * @return + */ + private Map addPermissionHandler(String transMethod) { + Map hashMap = new HashMap(); + hashMap.put("permissionId", ""); + hashMap.put("permissionType", ""); + hashMap.put("mainDataTableAlias", ""); + hashMap.put("mainDataTable", ""); + hashMap.put("primaryKey", ""); + hashMap.put("permissionTargetId", ""); + hashMap.put("permissionConfigSourceId", ""); + + MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler("permission" + transMethod); + if (beforeMethodHandler != null) { + try { + Object execute = beforeMethodHandler.execute(hashMap); + if (execute != null) { + if (execute instanceof Map) { + return (Map) execute; + } + } + } catch (Exception e) { + logger.error("转换出错:" + e); + throw new RuntimeException(e.getMessage()); + } + } + return hashMap; + } + + private Map getCustomAuthSql(String transMethod, Map params, String prefix) { + MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); + Map hashMap = new HashMap<>(); + if (beforeMethodHandler != null) { + try { + hashMap.put("flag", true); + hashMap.put("msg", ""); + hashMap.putAll(params); + Object execute = beforeMethodHandler.execute(hashMap); + if (execute != null && execute instanceof Map) { + Map map = (Map) execute; + return map; + } + } catch (Exception e) { + logger.error("转换出错:" + e); + throw new RuntimeException(e.getMessage()); + } + } + return hashMap; + } + + + private String getCustomSql(String transMethod, String sql, String prefix) { + MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); + boolean flag = false; + if (beforeMethodHandler != null) { + try { + String subSql = ""; + if (sql.length() > 5) { + flag = true; + subSql = sql.substring(5, sql.length()); + } + Object execute = beforeMethodHandler.execute(subSql); + if (execute != null) { + if (execute instanceof String) { + StringBuffer sb = null; + if(execute.toString().length()==0){ + sb = new StringBuffer(); + } else if (flag || execute.toString().length() > 0) { + sb = new StringBuffer(" and "); + } else { + sb = new StringBuffer(); + } + + sb.append(execute.toString()); + return sb.toString(); + } + } + } catch (Exception e) { + logger.error("转换出错:" + e); + throw new RuntimeException(e.getMessage()); + } + } + return sql; + } + + private void transUserInfo(List list) { + List operators = new ArrayList<>(); + if (list != null && list.size() > 0) { + for (Map map : list) { + //避免暴露内网地址 + map.remove("requesturl"); + + Object operator = map.get("operator"); + if (operator != null && StringUtils.isNotBlank(operator.toString())) { + operators.add(ElogSeviceUtils.getLongValue(operator.toString())); + } + } + } + List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); + Map infoHashMap = new HashMap<>(); + if (cacheList != null && cacheList.size() > 0) { + for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { + HrmAvatarComInfo hrmAvatarComInfo = (HrmAvatarComInfo) comInfoCache.getCacheById(HrmAvatarComInfo.class, hrmEmployeeComInfo.getAvatar()); + ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); + if (hrmAvatarComInfo != null) { + info.setAvatarP3Id(hrmAvatarComInfo.getP3()); + } + info.setId(hrmEmployeeComInfo.getId()); + info.setUserName(hrmEmployeeComInfo.getUsername()); + infoHashMap.put(hrmEmployeeComInfo.getId(), info); + } + } + if (list != null && list.size() > 0) { + for (Map map : list) { + Object operator = map.get("operator"); + if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { + map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); + } + map.put("dboperatorname", Util.null2String(map.get("operatorname"))); + if (operator != null && StringUtils.isNotBlank(operator.toString())) { + Map i18nOperatorMap = new HashMap<>(); + ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); + if (hrmEmployeeComInfo != null) { + //获取最新的人员名称并进行多语言转换 + i18nOperatorMap.put(Long.parseLong(operator.toString()),hrmEmployeeComInfo.getUserName()); + Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); + map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); + +// if (StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { +// map.put("operatorname", hrmEmployeeComInfo.getUserName()); +// } + if (hrmEmployeeComInfo.getAvatarP3Id() != null) { + map.put("avatar", hrmEmployeeComInfo.getAvatarP3Id()); + } + } + } + } + } + } + + private void transSwitchDataInfo(List list, List recordColumns) { + List operators = new ArrayList<>(); + if (list != null && list.size() > 0) { + for (Map map : list) { + //避免暴露内网地址 + map.remove("requesturl"); + + map.put("dboperatorname", Util.null2String(map.get("operatorname"))); + ElogSeviceSwitchUtils.switchDatabaseField(map); + Object operator = map.get("operator"); + if (operator != null && StringUtils.isNotBlank(operator.toString())) { + operators.add(ElogSeviceUtils.getLongValue(operator.toString())); + } + if (map.get("PARAMS") != null) { + map.put("params", JSONObject.toJSON(map.get("PARAMS"))); + } else if (map.get("params") != null) { + map.put("params", JSONObject.toJSON(map.get("params"))); + } + for (String recordColumn : recordColumns) { + Object val = map.get(recordColumn); + if (val != null) { + map.put(recordColumn, ElogSeviceSwitchUtils.transfi18Method(val.toString())); + } + } + Object modulename = map.get("modulename"); + if (modulename != null) { + map.put("modulenamespan", ElogSeviceSwitchUtils.getModuleName(modulename.toString())); + } + + } + } + List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); + Map infoHashMap = new HashMap<>(); + if (cacheList != null && cacheList.size() > 0) { + for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { + ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); + info.setId(hrmEmployeeComInfo.getId()); + info.setUserName(hrmEmployeeComInfo.getUsername()); + infoHashMap.put(hrmEmployeeComInfo.getId(), info); + } + } + if (list != null && list.size() > 0) { + for (Map map : list) { + Object operator = map.get("operator"); + if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { + map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); + map.put("params",SecurityUtil.encodeForHtml(map.get("params").toString(), true)); + + } + //获取最新的人员名称并进行多语言转换 + if (operator != null && StringUtils.isNotBlank(operator.toString())) { + Map i18nOperatorMap = new HashMap<>(); + ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); + if (hrmEmployeeComInfo != null && StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { + i18nOperatorMap.put(Long.parseLong(operator.toString()),hrmEmployeeComInfo.getUserName()); + Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); + map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); +// map.put("operatorname", hrmEmployeeComInfo.getUserName()); + } + } + } + } + } + + /** + * 查询头像相关信息 + * + * @param id + * @return + */ +// private String queryAvatarInfo(long id) { +// Map avatarInfoMap = queryAvatarInfoMapper.queryAvatarInfo(id); +// if (avatarInfoMap != null) { +// if (avatarInfoMap.get("p3") != null) { +// return avatarInfoMap.get("p3").toString(); +// } +// } +// return ""; +// } + + /** + * 获取宽度 + * + * @param showColum + * @return + */ + private String getColumnsWidth(ShowColumsDto showColum) { + if (StringUtils.isBlank(showColum.getWidth())) { + return "5%"; + } else { + return showColum.getWidth(); + } + } + + private String getTenantKey() { + User currentUser = UserContext.getCurrentUser(); + if (currentUser != null) { + return currentUser.getTenantKey(); + } else { + String tenantKey = TenantRpcContext.getTenantKey(); + if (StringUtils.isNotBlank(tenantKey)) { + return tenantKey; + } + } + return ""; + } + + private String getEmployeeId() { + + User currentUser = UserContext.getCurrentUser(); + if (currentUser != null&&!currentUser.isAdmin()) { + String employeeId = TenantRpcContext.getEmployeeId(); + return StringUtils.isNotBlank(employeeId) ? employeeId : ""; + } + return ""; + } + + private String getUserId(){ + User currentUser = UserContext.getCurrentUser(); + if (currentUser != null) { + return currentUser.getEmployeeId().toString(); + } + String employeeId = TenantRpcContext.getEmployeeId(); + return StringUtils.isNotBlank(employeeId) ? employeeId : ""; + } + + /** + * 拼接搜索条件 + * + * @param searchMap + * @param module + * @param function + * @return + */ + private String getSearchMapSql(String searchMap, String module, String function, List showColumns) { + StringBuffer sb = new StringBuffer(); + Map map = JSON.parseObject(searchMap); + if (map == null) return sb.toString(); + Iterator> iterators = map.entrySet().iterator(); + while (iterators.hasNext()) { + Map.Entry next = iterators.next(); + String key = next.getKey(); + SecurityUtil.sqlCheck(key); + if ("date".equals(key) || "createdate".equals(key)) { + Object date = next.getValue(); + if (date != null) { + if (StringUtils.isNotBlank(date.toString())) { + List dates = (List) date; + if (dates != null && dates.size() == 2) { + Object startDate = dates.get(0); + Object endDate = dates.get(1); + startDate = ElogSeviceUtils.checkValSql(startDate.toString()); + endDate = ElogSeviceUtils.checkValSql(endDate.toString()); + if (StringUtils.isNotBlank(startDate.toString()) && StringUtils.isNotBlank(endDate.toString())) { + startDate = startDate.toString().replaceAll("'", "''"); + endDate = endDate.toString().replaceAll("'", "''"); + String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); + String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); + sb.append(" and log_date ").append(" between ").append(getSwithDatabaseDate(dateRangeAfter)).append(" and ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); + } else if (StringUtils.isNotBlank(startDate.toString())) { + String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); + sb.append(" and log_date ").append(" >= ").append(getSwithDatabaseDate(dateRangeAfter)).append(" "); + } else if (StringUtils.isNotBlank(endDate.toString())) { + String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); + sb.append(" and log_date ").append(" <= ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); + } + } + } + } + } else if ("operator".equals(next.getKey())) { + Object operator = next.getValue(); + if (operator != null) { + if (StringUtils.isNotBlank(operator.toString())) { + operator = ElogSeviceUtils.checkValSql(operator.toString()); + operator = operator.toString().replaceAll("'", "''"); + if (StringUtils.isNumeric(operator.toString()) && operator.toString().length() > 15 ) { + sb.append(" and log_operator = ").append(operator.toString()).append(" "); + } else { + List likeNameHrmEmployeeList = hrmCommonEmployeeService.queryEmpsByCondidtion( + new HrmOrgEmpCondition().setNameLikeList(Arrays.asList(operator.toString())).setTenantKey(getTenantKey()), + HrmConditionResultType.BEAN.name()); + if (likeNameHrmEmployeeList != null && likeNameHrmEmployeeList.size() > 0) { + List ids = likeNameHrmEmployeeList.stream().map(HrmEmployee::getId).collect(Collectors.toList()); + if (ids != null && ids.size() > 0) { + sb.append(" and ( operatorname like '%").append(operator.toString()).append("%' ") + .append(" or log_operator in (").append(StringUtils.join(ids, ",")).append(")) "); + } + } else { + sb.append(" and operatorname like '%").append(operator.toString()).append("%' "); + } + } + } + } + } else if ("modulename".equals(next.getKey())) { + Object moduleName = next.getValue(); + if (moduleName != null) { + moduleName = moduleName.toString().replaceAll("'", "''"); + if (StringUtils.isNotBlank(moduleName.toString())) { + moduleName = ElogSeviceUtils.checkValSql(moduleName.toString()); + //sb.append(" and modulename = '").append(moduleName.toString()).append("' "); + StringBuffer stringBuffer = new StringBuffer(); + if (isEnglish(moduleName.toString())) { + Map moduleMap = ElogSeviceSwitchUtils.moduleMap; + Iterator> iterator = moduleMap.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry nextObj = iterator.next(); + if (nextObj.getKey().contains(moduleName.toString())) { + stringBuffer.append("'").append(nextObj.getKey()).append("',"); + } + } + + } else { + Map moduleMap = ElogSeviceSwitchUtils.moduleMap; + Iterator> iterator = moduleMap.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry nextObj = iterator.next(); + String val = ElogSeviceSwitchUtils.getModuleName(nextObj.getValue() + ""); + if (val.contains(moduleName.toString())) { + stringBuffer.append("'").append(nextObj.getKey()).append("',"); + } + } + } + String str = ""; + if (stringBuffer.toString().length() > 0) { + str = stringBuffer.substring(0, stringBuffer.length() - 1); + String inVals = str.toString().replaceAll("''", "'"); + sb.append(" and modulename in (").append(inVals).append(") "); + } else { + sb.append(" and modulename = '").append(moduleName.toString()).append("' "); + } + } + } + } else if (databaseId.equalsIgnoreCase(ElogConsts.POSTGRESQL) && "targetid".equalsIgnoreCase(next.getKey())){ + //兼容PG环境int类型不支持模糊搜索的问题 + String value = next.getValue().toString().replaceAll("'", "''"); + value = ElogSeviceUtils.checkValSql(value.toString()); + if (value.startsWith("_")) { + value = value.replace("_", "\\_"); + } + //将类型转为varchar再进行查询 + sb.append(" and ").append("cast(").append(key).append(" as VARCHAR(255) )").append(" like '%").append(value).append("%' "); + } else { + + if (next.getValue() != null && StringUtils.isNotBlank(key) && StringUtils.isNotBlank(next.getValue().toString())) { + String value = next.getValue().toString().replaceAll("'", "''"); + value = ElogSeviceUtils.checkValSql(value.toString()); + StringBuilder stringBuffer = new StringBuilder(); + if (isLikeSearch(showColumns, key)) { + String logSearchSql = I18nUtil.getLogSearchSql(ElogSeviceUtils.getTableName(module, function), key, value); + String sql = logSearchSql.replaceAll("%_", "%\\\\_"); + try { + logger.error("执行多语言sql:{}",sql); + List maps = queryCommonTabeMapper.queryLabelIds(sql); + if (maps != null && maps.size() > 0) { + for (Map map1 : maps) { + Object indexid = map1.get(key); + if (indexid == null || StringUtils.isEmpty(indexid.toString())) { + indexid = map1.get(key.toLowerCase()); + } + if (indexid != null && StringUtils.isNotEmpty(indexid.toString())) { + String val = indexid.toString().replace("'", "''"); + if (ElogSeviceUtils.checkIsNumber(map.get(key))) { + val = "-"+val; + value = "-"+value; + } + stringBuffer.append("'").append(val).append("',"); + } + } + } + } catch (Exception e) { + logger.error("i18查询sql报错:{}",e.getMessage(),e); + } + + } + String str = ""; + if (stringBuffer.toString().length() > 0) { + str = stringBuffer.substring(0, stringBuffer.length() - 1); + if (value.startsWith("_")) { + value = value.replace("_", "\\_"); + } + sb.append(" and (").append(key).append(" like '%").append(value).append("%' "); + //String inVals = str.toString().replaceAll("''", "'"); + if (str.startsWith("_")) { + str = str.replace("_", "\\_"); + } + if ("operatetypename".equals(key)) { + String s = ElogSeviceUtils.checkValSql(next.getValue().toString()); + sb.append(matchOperatetype(s)); + } + sb.append(" or ").append(key).append(" in (").append(str).append(")) "); + } else { + if ("operatetypename".equals(key)) { + sb.append(" and (").append(key).append(" like '%").append(value).append("%' "); + String s = ElogSeviceUtils.checkValSql(next.getValue().toString()); + sb.append(matchOperatetype(s)).append(")"); + } else { + if (value.startsWith("_")) { + value = value.replace("_", "\\_"); + } + sb.append(" and ").append(key).append(" like '%").append(value).append("%' "); + } + } + + } + } + } + return sb.toString(); + } + + /** + * 是否模糊搜索 + * @param showColumns + * @param key + * @return + */ + private boolean isLikeSearch(List showColumns, String key) { + for (ShowColumsDto showColumn : showColumns) { + if (key.equalsIgnoreCase(showColumn.getColumIndex()) && showColumn.isTransfLanguage()) { + return true; + } + } + return false; + } + + private String getSwithDatabaseDate(String date) { + SecurityUtil.ecodeForSql(date); + if (ElogConsts.ORACLE.equals(DatabaseUtil.getDatabaseId())) { + return " to_date('"+date+"','yyyy-mm-dd hh24:mi:ss') "; + } else if (ElogConsts.POSTGRESQL.equals(DatabaseUtil.getDatabaseId())) { + return " to_timestamp('"+date+"', 'YYYY-MM-DD HH24:MI:SS') "; + } else if (ElogConsts.SQLSERVER.equals(DatabaseUtil.getDatabaseId())) { + return " convert(nvarchar(19),'"+date+"',120) "; + } else { + return " DATE_FORMAT('"+date+"','%Y-%m-%d %H:%i:%s') "; + } + } + + public String matchOperatetype(String str) { + if (ElogSeviceUtils.currentLanguage() != 8) { + return ""; + } + List list = new ArrayList(); + list.add(OperateType.add); + list.add(OperateType.update); + list.add(OperateType.view); + list.add(OperateType.delete); + + StringBuffer sb = new StringBuffer(); + for (String o : list) { + if (o.toLowerCase().contains(str.toLowerCase())) { + sb.append("'").append(o).append("',"); + } + } + if ("new".toLowerCase().contains(str.toLowerCase())) { + sb.append("'add',"); + } + String sql = ""; + if (sb.length() > 0) { + sql = sb.toString().substring(0, sb.length() - 1); + sql = "or operatetype in (" + sql + ")"; + } + + return sql; + + } + + + public static boolean isEnglish(String charaString) { + return charaString.matches("^[a-zA-Z]*"); + + } + + /** + * 获取搜索条件 + * + * @param filterConditionDtos + * @return + */ + private String getQueryCondition(List filterConditionDtos) { + StringBuffer sb = new StringBuffer(); + if (filterConditionDtos != null && filterConditionDtos.size() > 0) { + for (FilterConditionDto filterConditionDto : filterConditionDtos) { + if (StringUtils.isNotBlank(filterConditionDto.getColumIndex())) { + sb.append(getsql(filterConditionDto)); + } + } + } + return sb.toString(); + } + + /** + * 拼接sql + * + * @param filterConditionDto + * @return + */ + private String getsql(FilterConditionDto filterConditionDto) { + StringBuffer sb = new StringBuffer(); + /* if (StringUtils.isNotBlank(filterConditionDto.getSql())) { + sb.append(" ").append(filterConditionDto.getSql()).append(" "); + return sb.toString(); + }*/ + SecurityUtil.sqlCheck(filterConditionDto.getColumIndex()); + filterConditionDto.setConnectCondition(ElogSeviceUtils.checkConditionSql(filterConditionDto.getConnectCondition())); + filterConditionDto.setType(ElogSeviceUtils.checkTypeSql(filterConditionDto.getType())); + filterConditionDto.setValue(ElogSeviceUtils.checkValSql(filterConditionDto.getValue())); + switchDatabaseFieldIndex(filterConditionDto); + if ("LIKE".equalsIgnoreCase(filterConditionDto.getType())) { + if (filterConditionDto.getLike() != null) { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" '"). + append(filterConditionDto.getLike().getPrefix() != null ? filterConditionDto.getLike().getPrefix() : ""). + append(filterConditionDto.getValue()). + append(filterConditionDto.getLike().getSuffix() != null ? filterConditionDto.getLike().getSuffix() : ""). + append("' "); + } + } else if ("IN".equalsIgnoreCase(filterConditionDto.getType())) { + String[] split = filterConditionDto.getValue().split("\",\""); + if (split.length > 0) { + StringBuffer str = new StringBuffer("("); + String value = ""; + if ("targetid".equals(filterConditionDto.getColumIndex()) || "log_operator".equals(filterConditionDto.getColumIndex())) { + List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); + for (String s : list) { + str.append(s).append(","); + } + } else { + List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); + for (String s : list) { + str.append("'").append(s).append("',"); + } + } + + value = str.toString().substring(0, str.length() - 1); + value += ")"; + switchDatabaseFieldIndex(filterConditionDto); + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(value). + append(" "); + + } else if (split.length == 0) { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" ('"). + append(filterConditionDto.getValue()). + append("') "); + } + } else if ("IS NULL".equalsIgnoreCase(filterConditionDto.getType()) || "IS NOT NULL".equalsIgnoreCase(filterConditionDto.getType())) { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" "); + } else if ("BETWEEN".equalsIgnoreCase(filterConditionDto.getType())) { + String[] split = filterConditionDto.getValue().split("\",\""); + StringBuffer stringBuffer = new StringBuffer(); + if (split.length > 0) { + List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); + String str = ""; + for (String s : list) { + stringBuffer.append(" '").append(s).append("' AND"); + } + str = stringBuffer.toString().substring(0, stringBuffer.length() - 3); + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(str). + append(" "); + } else if (split.length == 0) { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" '"). + append(filterConditionDto.getValue()). + append("' "); + } + } else { + if ("targetid".equals(filterConditionDto.getColumIndex()) || "log_operator".equals(filterConditionDto.getColumIndex())) { + if (StringUtils.isNotBlank(filterConditionDto.getValue())) { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" "). + append(filterConditionDto.getValue()). + append(" "); + } else { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" "). + append(-1). + append(" "); + } + } else { + sb.append(" "). + append(getConnectCondition(filterConditionDto.getConnectCondition())). + append(" "). + append(filterConditionDto.getColumIndex()). + append(" "). + append(getQueryType(filterConditionDto.getType())). + append(" '"). + append(filterConditionDto.getValue()). + append("' "); + } + + } + return sb.toString(); + } + + private void switchDatabaseFieldIndex(FilterConditionDto filterConditionDto) { + if ("operator".equalsIgnoreCase(filterConditionDto.getColumIndex())) { + filterConditionDto.setColumIndex("log_operator"); + } else if ("date".equalsIgnoreCase(filterConditionDto.getColumIndex())) { + filterConditionDto.setColumIndex("log_date"); + } else if ("result".equalsIgnoreCase(filterConditionDto.getColumIndex())) { + filterConditionDto.setColumIndex("log_result"); + } + } + + + /** + * 获取查询类型 + * + * @param type + * @return + */ + private String getQueryType(String type) { + //如果不填默认是= + if (StringUtils.isBlank(type)) { + return " = "; + } + return type; + } + + /** + * 获取连接条件 + * + * @param connectCondition + * @return + */ + private String getConnectCondition(String connectCondition) { + //如果不填默认是AND + if (StringUtils.isBlank(connectCondition)) { + return " AND "; + } + return connectCondition; + } + + @Override + public List> getDetailChanges(String module, String function, String mainid, String detailTransMethod) { + List> list = getDetailChangesMethod(module, function, mainid, detailTransMethod, null); + return list; + + } + + /** + * 明细分页查询 + * @param module + * @param function + * @param mainid + * @param detailTransMethod + * @param current + * @param pageSize + * @return + */ + @Override + public WeaTable getDetailChangePages(String module, String function, String mainid, String detailTransMethod, String current, String pageSize) { + + Integer pageNum = Util.getIntValue(current, 1); + Integer size = Util.getIntValue(pageSize, 10); + Page page = new Page(pageNum,size); + + List> list = getDetailChangesMethod(module, function, mainid, null, page); + + //查询分页总数 + String tableName = ElogSeviceUtils.getTableName(module, function, true); + Integer total = localElogDaoMapper.queryAllChangesPageCounts(tableName, mainid); + page.setTotal(total); + WeaTable weaTable =new WeaTable(); + weaTable.setColumns(getDetailColumns(list)); + weaTable.setPage(page); + weaTable.setData(list); + + if (Util.isNotEmpty(detailTransMethod)) { + // 消费到消息,通过MethodHandler调用对应的方法 + MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(detailTransMethod); + if (methodHandler != null) { + try { + methodHandler.execute(weaTable); + } catch (Exception e) { + logger.error("转换出错:" + e); + } + } + } + return weaTable; + } + + private List getDetailColumns(List> list) { + + List columns = new ArrayList<>(); + if (Util.isNotEmpty(list)) { + List detailcontexts= (List) list.get(0).get("detailcontexts"); + if (Util.isNotEmpty(detailcontexts)) { + for (Map map : detailcontexts) { + WeaTableColumn weaTableColumn = new WeaTableColumn(); + // 列表属性名 + weaTableColumn.setDataIndex((String) map.get("fieldname")); + //显示名称 多语言转换 fieldnamelabelid + weaTableColumn.setTitle((String) map.get("fieldname")); + columns.add(weaTableColumn); + } + } + } + return columns; + } + + public List> getDetailChangesMethod(String module, String function, String mainid, String detailTransMethod,Page page) { + + List list = new ArrayList<>(); + String tableName = ElogSeviceUtils.getTableName(module, function, true); + String maintableName = ElogSeviceUtils.getTableName(module, function, false); + List maps = localElogDaoMapper.queryAllMainData(maintableName, mainid); + + for (Map map : maps) { + + if (map.get("params") != null && ElogConsts.ES.equalsIgnoreCase(map.get("params").toString())) { + + String logDate = map.get("log_date").toString(); + logger.info("logDate:{}" ,logDate); + String esDate = logDate.substring(0, 10); + //先判断表存不存在,不存在创建 + if (checkEsTableIsExist(esDate)) { + // 根据id通过es查询大字段(params)然后赋值 + SearchRequest searchRequest = new SearchRequest(getElogESTableName(true,esDate)); + + SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); + // 只获取指定字段 + String[] fields = {"params"}; + searchSourceBuilder.fetchSource(fields, null); + // 根据id匹配 + searchSourceBuilder.query(QueryBuilders.termQuery("id",map.get("id").toString())); + searchRequest.source(searchSourceBuilder); + + SearchResponse searchResponse = null; + try { + searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT); + } catch (IOException e) { + logger.info("查询ES出现异常:{}",e.getMessage()); + } + + SearchHits hits = searchResponse.getHits(); + SearchHit[] searchHits = hits.getHits(); + if (searchHits != null && searchHits.length > 0) { + // 根据id匹配唯一,所以直接取第一个 + Map sourceAsMap = searchHits[0].getSourceAsMap(); + if (Objects.nonNull(sourceAsMap) && Objects.nonNull(sourceAsMap.get("params")) && StringUtils.isNotEmpty(sourceAsMap.get("params").toString())) { + logger.info("ES查出来的params:{}",sourceAsMap.get("params")); + map.put("params",sourceAsMap.get("params")); + } + } + } + } + if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { + map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); + map.put("params",SecurityUtil.encodeForHtml(map.get("params").toString(), true)); + } + } + + maps = ElogSeviceSwitchUtils.getSwitchDatabaseData(maps); + ElogSeviceSwitchUtils.changKey2Lower(maps); + List allChangesData = new ArrayList<>(); + //如果有分页数据则走分页方法 + if (Objects.nonNull(page) ) { +// Integer offset = (pageNum - 1) * size; + //分页查询明细数据 + allChangesData = localElogDaoMapper.queryAllChangesDataPages(tableName, mainid, page); + } else { + //没有被则不分页 + allChangesData = localElogDaoMapper.queryAllChangesData(tableName, mainid); + } + ElogSeviceSwitchUtils.changKey2Lower(allChangesData); + allChangesData = ElogSeviceSwitchUtils.getSwitchDatabaseData(allChangesData); + List mainlist = new ArrayList<>(); + List detaillist = new ArrayList<>(); + if (allChangesData != null && allChangesData.size() > 0) { + for (Map allChangesDatum : allChangesData) { + Object o = allChangesDatum.get("isdetail"); + if (o != null) { + if ("0".equals(o.toString())) { + mainlist.add(allChangesDatum); + } else { + detaillist.add(allChangesDatum); + } + } + } + } +// List mainlist = localElogDaoMapper.queryAllMainChanges(tableName, mainid); +// List detaillist = localElogDaoMapper.queryAllDetailChanges(tableName, mainid); + //List moduleInfo = queryCommonTabeMapper.queryModuleNameInfo(module); + List moduleInfo = new ArrayList<>(); + processDetailInfo(mainlist, detaillist, moduleInfo); + Map map = ElogSeviceSwitchUtils.switchChangeValue(mainlist, maps); + Map detailMap = ElogSeviceSwitchUtils.switchDetailChangeValue(detaillist); + map.putAll(detailMap); + if (maps != null && maps.size() > 0) { + Map maininfoMap = maps.get(0); + String operatetypename = (String)maininfoMap.get("operatetypename"); + String targetname = (String)maininfoMap.get("targetname"); + //长度大于1避免部分模块为1,2,3这类的操作类型 + if (StringUtils.isNumeric(operatetypename) && operatetypename.length() > 1 && operatetypename.length() < 10) { + String transfOperatetypename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(operatetypename), operatetypename); + maininfoMap.put("operatetypename",transfOperatetypename); + } + if (StringUtils.isNumeric(targetname) && targetname.length() > 1 && targetname.length() < 10) { + String transfTargetname = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(targetname), targetname); + maininfoMap.put("targetname",transfTargetname); + } + map.put("maininfo",maininfoMap); + + map.put("detailtitle", ""); + } + + list.add(map); + if (Util.isNotEmpty(detailTransMethod)) { + // 消费到消息,通过MethodHandler调用对应的方法 + MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(detailTransMethod); + if (methodHandler != null) { + try { + methodHandler.execute(list); + } catch (Exception e) { + logger.error("转换出错:" + e); + } + } + } + //List transfLanguageData = ElogSeviceSwitchUtils.transfLanguageData(list); + return list; + + } + + /** + * 处理修改详情转多语言(主表和明细表) + * + * @param mainlist + * @param detaillist + * @param commonTableInfo + * @return + */ + private void processDetailInfo(List mainlist, List detaillist, List commonTableInfo) { + Map tablenameMap = new HashMap<>(); + Map fieldnameMap = new HashMap<>(); + Map valueMap = new HashMap<>(); + + if (commonTableInfo != null && commonTableInfo.size() > 0) { + for (Map commonTableInfoMap : commonTableInfo) { + JSONObject commonTableInfoMapJs = JSONObject.parseObject(JSONObject.toJSONString(commonTableInfoMap)); + String tablename = commonTableInfoMapJs.getString("table_name"); + String tablename_labelid = commonTableInfoMapJs.getString("tablename_labelid"); + String fieldname = commonTableInfoMapJs.getString("field_name"); + String fieldname_labelid = commonTableInfoMapJs.getString("fieldname_labelid"); + String values_kvpairs = commonTableInfoMapJs.getString("values_kvpairs"); + fieldnameMap.put(fieldname, fieldname_labelid); + if (StringUtils.isNotBlank(fieldname) && StringUtils.isNotBlank(values_kvpairs)) { + JSONObject jsonObject = JSONObject.parseObject(values_kvpairs); + valueMap.put(fieldname, jsonObject); + } + Object tablenameObj = tablenameMap.get(tablename); + if (tablenameObj == null) { + tablenameMap.put(tablename, tablename_labelid); + } + } + } + + + if (mainlist != null && mainlist.size() > 0 && fieldnameMap.size() > 0 && valueMap.size() > 0) { + for (Map mainlistMap : mainlist) { + JSONObject mainMapJs = JSONObject.parseObject(JSONObject.toJSONString(mainlistMap)); + String fielddesc = mainMapJs.getString("fielddesc"); + String oldvalue = mainMapJs.getString("oldvalue"); + String newvalue = mainMapJs.getString("newvalue"); + if (fieldnameMap.get(fielddesc) != null) { + mainlistMap.put("fielddesc", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(fieldnameMap.get(fielddesc).toString()), fieldnameMap.get(fielddesc).toString())); + } + if (valueMap.get(fielddesc) != null) { + JSONObject jsonObject = JSONObject.parseObject(valueMap.get(fielddesc).toString()); + String oldvalueStr = jsonObject.getString(oldvalue); + String newvalueStr = jsonObject.getString(newvalue); + if (StringUtils.isNotBlank(oldvalueStr)) { + mainlistMap.put("oldvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(oldvalueStr), oldvalue)); + } + if (StringUtils.isNotBlank(newvalueStr)) { + mainlistMap.put("newvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(newvalueStr), newvalue)); + } + } + } + } + + if (detaillist != null && detaillist.size() > 0 && fieldnameMap.size() > 0 && valueMap.size() > 0) { + for (Map detaillistMap : detaillist) { + JSONObject mainMapJs = JSONObject.parseObject(JSONObject.toJSONString(detaillistMap)); + String tablename = mainMapJs.getString("tablename"); + String fielddesc = mainMapJs.getString("fielddesc"); + String oldvalue = mainMapJs.getString("oldvalue"); + String newvalue = mainMapJs.getString("newvalue"); + if (tablenameMap.get(tablename) != null) { + detaillistMap.put("tablename", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(tablenameMap.get(tablename).toString()), tablenameMap.get(tablename).toString())); + } + if (fieldnameMap.get(fielddesc) != null) { + detaillistMap.put("fielddesc", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(fieldnameMap.get(fielddesc).toString()), fieldnameMap.get(fielddesc).toString())); + } + if (valueMap.get(fielddesc) != null) { + JSONObject jsonObject = JSONObject.parseObject(valueMap.get(fielddesc).toString()); + String oldvalueStr = jsonObject.getString(oldvalue); + String newvalueStr = jsonObject.getString(newvalue); + if (StringUtils.isNotBlank(oldvalueStr)) { + detaillistMap.put("oldvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(oldvalueStr), oldvalue)); + } + if (StringUtils.isNotBlank(newvalueStr)) { + detaillistMap.put("newvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(newvalueStr), newvalue)); + } + } + } + } + + } + + @Override + public List queryLogList(String module, String function, String current, String pageSize, String condition) { + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + int pagenum = Util.getIntValue(current, 1) - 1; + int size = Util.getIntValue(pageSize, 10); + int start = pagenum * size; + int end = start + size; + Page page = new Page(pagenum, size); + String limit = " limit " + start + "," + (end - start); + + String tableName = ElogSeviceUtils.getTableName(module, function); + List list = localElogDaoMapper.queryElogList(page, context, null, tableName, null,"*"); + list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); + return switchString(list); + } + + @Override + public List queryCardLogList(String data) { + JSONObject map = JSONObject.parseObject(data); + String module = ""; + String function = ""; + String pageNum = ""; + String pageSize = ""; + String dataset = ""; + String searchMap = ""; + String sColum = ""; + String fColum = ""; + String transMethod = null; + List showColums = new ArrayList<>(); + List filterConditionDtos = new ArrayList<>(); + String authParams = ""; + Map jsonObject = new HashMap(); + if (map != null) { + module = map.getString("module"); + function = map.getString("function"); + pageNum = map.getString("pageNum"); + pageSize = map.getString("pageSize"); + //dataset = map.get("dataset").toString(); + searchMap = map.getString("searchMap"); + sColum = map.getString("showColums"); + showColums = JSONArray.parseArray(sColum, ShowColumsDto.class); + fColum = map.getString("filterConditions"); + transMethod = map.getString("transMethod"); + filterConditionDtos = JSONArray.parseArray(fColum, FilterConditionDto.class); + authParams = map.getString("authParams"); + jsonObject = JSONObject.parseObject(authParams); + } + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + context.setTenant_key(getTenantKey().toLowerCase()); + // 分页 + //Page pages = ElogSeviceUtils.getPage(); + String sb = getQueryCondition(filterConditionDtos); + logger.info("elog查询条件拼接sql:{}", sb); + // 消费到消息,通过MethodHandler调用对应的方法 + //String targetid = getTargetid(filterConditionDtos); + Map customAuthMap = getCustomAuthSql(transMethod, jsonObject, "auth"); + if (!customAuthMap.isEmpty()) { + Object flag = customAuthMap.get("flag"); + if (flag != null && flag instanceof Boolean) { + boolean f = (boolean) flag; + if (!f) { + List list = new ArrayList<>(); + list.add(customAuthMap); + return list; + } + } + } + String customSql = getCustomSql(transMethod, sb, "before"); + + Page pages = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); + int page = Util.getIntValue(pages.getCurrent() + "", 1) - 1; + int size = Util.getIntValue(pages.getSize() + "", 10); + int start = page * size; + int end = start + size; + String limit = " limit " + start + "," + (end - start); + String tableName = ElogSeviceUtils.getTableName(module, function); + long l = System.currentTimeMillis(); + Map hashMap = addPermissionHandler(transMethod); + String permissionId = ""; + String permissionType = ""; + String mainDataTableAlias = ""; + String mainDataTable = ""; + String primaryKey = ""; + String permissionTargetId = ""; + String permissionConfigSourceId = ""; + + permissionId = getPermissionStr(hashMap, "permissionId"); + permissionType = getPermissionStr(hashMap, "permissionType"); + mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); + mainDataTable = getPermissionStr(hashMap, "mainDataTable"); + primaryKey = getPermissionStr(hashMap, "primaryKey"); + permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); + permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); + + //String columns = getshowColumsStr(showColums); + List list = new ArrayList<>(); + Map countMap = new HashMap<>(); + if (StringUtils.isNotEmpty(permissionId) || StringUtils.isNotEmpty(permissionType) || StringUtils.isNotEmpty(mainDataTableAlias) || StringUtils.isNotEmpty(mainDataTable) || StringUtils.isNotEmpty(permissionTargetId) || StringUtils.isNotEmpty(permissionConfigSourceId)) { + list = localElogDaoMapper.queryElogList(pages, context, null, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId,"*"); + countMap = localElogDaoMapper.elogCountByMorePermission(context, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey, permissionTargetId,permissionConfigSourceId); + } else { + list = localElogDaoMapper.queryElogList(pages, context, null, tableName, customSql,"*"); + long l1 = System.currentTimeMillis(); + logger.info("elog查询列表耗时:{}", (l1 - l)); + countMap = localElogDaoMapper.elogCount(context, tableName, customSql); + long l2 = System.currentTimeMillis(); + logger.info("elog查询总数耗时:{}", (l2 - l1)); + } + list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); + + if (list != null && list.size() > 0) { + //if ("1".equals(pageNum)){ + list.get(0).put("total", ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); + //} + } + transUserInfo(list); + long l3 = System.currentTimeMillis(); + //System.out.println("elog查询名称和头像耗时:{}"+ (l3-l2)); + transfLanguageData(list, showColums); + if (Util.isNotEmpty(transMethod)) { + // 消费到消息,通过MethodHandler调用对应的方法 + MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(transMethod); + if (methodHandler != null) { + try { + methodHandler.execute(list); + } catch (Exception e) { + logger.error("转换出错:" + e); + } + } + + } + long l4 = System.currentTimeMillis(); + logger.info("elog查询转换耗时:{}", (l4 - l3)); + List res = switchString(list); + logger.info("elog查询总耗时:{}", (l4 - l)); + return res; + } + + /** + * 转换数据成多语言,结合前端转 + * + * @param lists + * @param showColums + */ + public static List transfLanguageData(List lists, List showColums) { + if (lists != null && lists.size() > 0) { + for (Map map : lists) { + if (map != null) { + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + for (ShowColumsDto showColum : showColums) { + if (StringUtils.isNotBlank(showColum.getColumIndex()) && showColum.isTransfLanguage() && entry.getKey().equals(showColum.getColumIndex()) && !Objects.isNull(entry.getValue()) && StringUtils.isNumeric(entry.getValue().toString())) { + if (entry.getValue() instanceof Integer || entry.getValue() instanceof Long || entry.getValue() instanceof String) { + map.put(entry.getKey(), ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()), entry.getValue().toString())); + } else { + //map.put(entry.getKey(), ElogSeviceSwitchUtils.handlerBaseDataMethod(entry.getValue().toString())); + map.put(entry.getKey(), entry.getValue()); + } + } else if (StringUtils.isNotBlank(showColum.getColumIndex()) && showColum.isTransfLanguage() && entry.getKey().equals(showColum.getColumIndex()) && !Objects.isNull(entry.getValue())) { + //read view add edit update delete + if ("add".equals(entry.getValue().toString()) || "创建".equals(entry.getValue().toString())) { + map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63252, "新增")); + } else if ("read".equals(entry.getValue().toString()) || "view".equals(entry.getValue().toString()) || "查看".equals(entry.getValue().toString())) { + map.put(entry.getKey(), SystemEnv.getHtmlLabelName(55172, "查看")); + } else if ("edit".equals(entry.getValue().toString()) || "update".equals(entry.getValue().toString()) || "更新".equals(entry.getValue().toString())) { + map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63253, "修改")); + } else if ("delete".equals(entry.getValue().toString()) || "删除".equals(entry.getValue().toString()) ) { + map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63254, "删除")); + } else if (entry.getValue().toString().contains("取消关联标签 ")) { + String val = entry.getValue().toString().replace("取消关联标签 ", SystemEnv.getHtmlLabelName(83237, "取消关联标签 ") + " "); + map.put(entry.getKey(), val); + } else if (entry.getValue().toString().contains("关联标签 ")) { + String val = entry.getValue().toString().replace("关联标签 ", SystemEnv.getHtmlLabelName(83236, "关联标签 ") + " "); + map.put(entry.getKey(), val); + } + } + } + } + } + } + } + return lists; + } + + + @Override + public Map countLog(String module, String function) { + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + context.setTenant_key(getTenantKey()); + String tableName = ElogSeviceUtils.getTableName(module, function); + return localElogDaoMapper.elogCount(context, tableName, null); + } + + @Override + public List queryDetailLogList(String module, String function, String current, String pageSize, String condition, String mainId) { + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + context.setTenant_key(getTenantKey()); + context.setUuid(mainId); + int page = Util.getIntValue(current, 1) - 1; + int size = Util.getIntValue(pageSize, 10); + int start = page * size; + int end = start + size; + String limit = " limit " + start + "," + (end - start); + // 还需要支持下查询 + String tableName = ElogSeviceUtils.getTableName(module, function, true); + List list = localElogDaoMapper.queryDetailElogList(context, limit, tableName, null); + list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); + return switchString(list); + } + + @Override + public Map countDestailLog(String module, String function, String mainId) { + LoggerContext context = new LoggerContext(); + context.setModuleName(module); + context.setFunctionName(function); + context.setTenant_key(getTenantKey()); + context.setUuid(mainId); + String tableName = ElogSeviceUtils.getTableName(module, function, true); + return localElogDaoMapper.elogDetailCount(context, tableName, null); + } + + @Override + public WeaTable queryElogTraceInfo(String traceId, String module, String function, Integer currentPage, Integer pageSize, String traceTransMethod) { + WeaTable weaTable = new WeaTable(); + if (StringUtils.isNotEmpty(traceId)) { + String tableName = ElogSeviceUtils.getTableName(module, function); + Integer offset = (currentPage - 1) * pageSize; + List list = localElogDaoMapper.queryElogTraceInfo(traceId, tableName, offset, pageSize); + for (Map map : list) { + if (map.get("modulename") != null) { + map.put("modulenamespan", ElogSeviceSwitchUtils.getModuleName(map.get("modulename").toString())); + } + } + //list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); + int count = localElogDaoMapper.queryElogTraceInfoCount(traceId, tableName); + weaTable.setTotal(count); + Page page = new Page(); + page.setTotal(count); + page.setSize(pageSize); + page.setCurrent(currentPage); + weaTable.setPage(page); + if (Util.isNotEmpty(traceTransMethod)) { + // 消费到消息,通过MethodHandler调用对应的方法 + MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(traceTransMethod); + if (methodHandler != null) { + try { + methodHandler.execute(list); + } catch (Exception e) { + logger.error("转换出错:" + e); + } + } + } + weaTable.setData(list); + } + + return weaTable; + } + + @Override + public List queryLogInfoByCustom(String module, String function, String field, String value, boolean isDetail) { + List list = new ArrayList(); + String tableName = ElogSeviceUtils.getTableName(module, function, isDetail); + if (StringUtils.isNotBlank(field) && StringUtils.isNotBlank(value)) { + StringBuffer sql = new StringBuffer(); + sql.append(field).append(" = '").append(value).append("' "); + + list = localElogDaoMapper.queryLogInfoByCustom(tableName, sql.toString()); + } + return list; + } + + + @Override + public List queryLogInfoByCustom(String module, String function, String field, String value) { + return queryLogInfoByCustom(module, function, field, value, false); + } + + public List switchString(List list) { + if (list != null) { + return list.stream().map(m -> { + Set en = m.entrySet(); + for (Map.Entry entry : en) { + if (entry.getValue() != null) { + entry.setValue(String.valueOf(entry.getValue())); + } + } + return m; + }).collect(Collectors.toList()); + } else { + return list; + } + } + + @Override + public BatchDocumentMessage downloadLog(String data) { + JSONObject jsonObject = JSONObject.parseObject(data); + String module = jsonObject.getString("downloadmodule"); + String function = jsonObject.getString("function"); + String serviceName = jsonObject.getString("serviceName"); + String fileName = jsonObject.getString("fileName"); + String passWord = jsonObject.getString("passWord"); + + if (StringUtils.isEmpty(fileName)) { + fileName = SystemEnv.getHtmlLabelName(191432,"日志记录"); + } + + BatchDocumentMessage batchDocumentMessage = new BatchDocumentMessage(); + WeaTable weaTable = queryLogs(data); + List columns = weaTable.getColumns(); + List headers = new ArrayList<>(); + if (columns != null && !columns.isEmpty()) { + for (WeaTableColumn column : columns) { + Map header = new HashMap<>(); + header.put("key", column.getDataIndex()); + header.put("name", column.getTitle()); + headers.add(header); + } + } + List> dataList = weaTable.getData(); + List> maps = new ArrayList<>(); + if (dataList != null && !dataList.isEmpty()) { + dataList.stream().forEach(m -> { + Map map = new HashMap<>(); + headers.stream().forEach(h -> { + map.put(h.get("key").toString(), m.get(h.get("key"))); + }); + maps.add(map); + }); + } + + //必传--业务id + batchDocumentMessage.setBizId(IdGenerator.generate() + ""); + //必传-处理名称 + batchDocumentMessage.setHandlerName("ebatchdemo"); + //必传-服务名称 + batchDocumentMessage.setServiceName(serviceName); + //必传-数据类型 + batchDocumentMessage.setDataType(fileName); + //任务id + batchDocumentMessage.setBatchTaskId(IdGenerator.generate()); + //必传-模块 + batchDocumentMessage.setModule(module); //com.weaver.teams.domain.EntityType 中的module(没有的话需要找温明刚维护下) + //必传-功能 + batchDocumentMessage.setFunction(function); + //必传-eteamsid + batchDocumentMessage.setEteamsId(TenantRpcContext.getEteamsId()); + + //非必传 + if (StringUtils.isNotBlank(passWord)) { + batchDocumentMessage.setPassword(passWord); + } + + //必传 + BatchFile batchFile = new BatchFile(); + batchFile.setName(fileName); + //必传 + batchFile.setFileType(FileType.EXCEL); + //必传 + batchFile.setHandlerFileMethod(HandlerFileMethod.HANDLER_EXCEL_WITH_DATA); + batchFile.setTemplateId(1l); + List excelSheets = new ArrayList<>(); + ExcelSheet excelSheet = new ExcelSheet(); + + excelSheet.setHeader(headers); + excelSheet.setData(maps); + excelSheet.setName(fileName); + excelSheets.add(excelSheet); + batchFile.setExcelSheets(excelSheets); + batchDocumentMessage.setBatchFile(batchFile); + batchDocumentMessage.setChunk(false);//不分片 + batchExportSender.sendBatchExport(batchDocumentMessage); + + return batchDocumentMessage; + } + + public Boolean checkEsTableIsExist(String date) { + try { + String esMainIndex = getElogESTableName(true, date); + //先检查表是否存在 不存在则创建 + boolean existsLog = isExistsIndex(esMainIndex); + return existsLog; + } catch (Exception e) { + logger.info("创建相关ES表失败:{}", e.getMessage(), e); + } + return false; + } + + /** + * 判断一个索引是否存在 + * + * @param indexName + * @return + */ + public boolean isExistsIndex(String indexName) { + GetIndexRequest request = new GetIndexRequest(); + try { + boolean exists = restHighLevelClient.indices().exists(request.indices(indexName), RequestOptions.DEFAULT); + return exists; + } catch (Exception e) { + logger.info("判断索引是否存在出现异常:{}", e.getMessage()); + + } + return false; + } + + /** + * 创建主表语句 + * + * @throws IOException + */ + private void createLogIndex(String esMainIndex) { + // 1.创建Request对象 + CreateIndexRequest request = new CreateIndexRequest(esMainIndex); + // 2.准备请求的参数:DSL语句 + request.source(MAPPING_TEMPLATE, XContentType.JSON); + // 3.发送请求 + try { + restHighLevelClient.indices().create(request, RequestOptions.DEFAULT); + } catch (IOException e) { + logger.info("创建ES主表失败:{}", e.getMessage()); + + } + } + + private String getElogESTableName(boolean flag, String date) { + String currentDate = ""; + if (StringUtils.isEmpty(date)) { + currentDate = DateUtils.getCurrentDate().replaceAll("-", ""); + } else { + currentDate = date.replaceAll("-", ""); + } + return getEsMainIndex(flag, currentDate); + } + + private String getEsMainIndex(boolean flag, String date) { + if (flag) { + return ElogEsTableConsts.ELOG_CENTER_LOGS_ES + date; + } + return ElogEsTableConsts.ELOG_CENTER_LOGSDETAIL_ES + date; + } + + private String[] getESfields(String value) { + String[] split = value.split(","); + List list = new ArrayList<>(); + for (String s : split) { + switch (s.toLowerCase()) { + case "interfacename": + list.add("interfacename"); + break; + case "operatetype": + list.add("operatetype"); + break; + case "operatedesc": + list.add("operatedesc"); + break; + case "params": + list.add("params"); + break; + case "clientip": + list.add("clientip"); + break; + case "groupnamelabel": + list.add("groupnamelabel"); + break; + case "redoservice": + list.add("redoservice"); + break; + case "redocontext": + list.add("redocontext"); + break; + case "cancelservice": + list.add("cancelservice"); + break; + case "cancelcontext": + list.add("cancelcontext"); + break; + case "device": + list.add("device"); + break; + case "groupid": + list.add("groupid"); + break; + case "belongmainid": + list.add("belongmainid"); + break; + case "requesturl": + list.add("requesturl"); + break; + case "requesturi": + list.add("requesturi"); + break; + case "log_result": + list.add("logResult"); + break; + case "fromterminal": + list.add("fromterminal"); + break; + case "resultdesc": + list.add("resultdesc"); + break; + case "old_content": + list.add("oldContent"); + break; + case "link_type": + list.add("linkType"); + break; + } + } + //list转为数组 + if (list.size() > 0) { + String[] strings = list.toArray(new String[list.size()]); + return strings; + } + return null; + } + +} diff --git a/src/com/engine/salary/elog/util/ElogServiceUtils.java b/src/com/engine/salary/elog/util/ElogServiceUtils.java new file mode 100644 index 000000000..1e7428366 --- /dev/null +++ b/src/com/engine/salary/elog/util/ElogServiceUtils.java @@ -0,0 +1,92 @@ +package com.engine.salary.elog.util; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.engine.salary.elog.dto.ElogBean; +import com.engine.salary.elog.dto.FilterConditionDto; +import com.engine.salary.elog.dto.ShowColumsDto; +import com.engine.salary.elog.enums.ElogConsts; + +import java.util.List; +import java.util.Map; + +/** + * @Date: 2022/5/18 19:19 + * @Author: deli.xu + * @Description: elog服务工具类 + **/ +public class ElogServiceUtils { + + public static String getTableName(String module, String function) { + return getTableName(module, function, false); + } + + public static String getTableName(String module, String function, boolean isDetail) { + String tablename = module + ElogConsts.TABLE_SPACER + function + ElogConsts.TABLE_SUFFIX + (isDetail ? ElogConsts.DETAIL_TABLE_SUFFIX : ""); + sqlCheck(tablename); + return tablename; + } + + public static void sqlCheck(String value) { + if (value != null) { + if (!value.matches("^[A-Za-z][a-zA-Z0-9_\\.,]{0,31}$")) { + throw new RuntimeException("sqlCheck failed ! value :" + value); + } + } + } + + public static ElogBean getElogBean(String data) { + JSONObject datas = JSONObject.parseObject(data); + ElogBean elogBean = new ElogBean(); + String module = datas.getString("module"); + String function = datas.getString("function"); + String pageNum = datas.getString("pageNum"); + String pageSize = datas.getString("pageSize"); + String searchMap = datas.getString("searchMap"); + String transMethod = datas.getString("transMethod"); + String authParams = datas.getString("authParams"); + String showColums = datas.getString("showColums"); + String filterConditions = datas.getString("filterConditions"); + String downloadSize = datas.getString("downloadSize"); + List showColumsDtos = JSONArray.parseArray(showColums, ShowColumsDto.class); + List filterConditionDtos = JSONArray.parseArray(filterConditions, FilterConditionDto.class); + Map authParamsJson = JSONObject.parseObject(authParams); + elogBean.setModule(module); + elogBean.setFunction(function); + elogBean.setPageNum(pageNum); + elogBean.setPageSize(pageSize); + elogBean.setSearchMap(searchMap); + elogBean.setTransMethod(transMethod); + elogBean.setDownloadSize(downloadSize); + elogBean.setShowColumns(showColumsDtos); + elogBean.setFilterConditionDtos(filterConditionDtos); + elogBean.setAuthParamsJson(authParamsJson); + return elogBean; + } + + public static int getIntValue(String v) { + return getIntValue(v, -1); + } + + public static int getIntValue(String v, int def) { + try { + return Integer.parseInt(v); + } catch (Exception var3) { + return def; + } + } + + public static long getLongValue(String v) { + return getLongValue(v, -1l); + } + + public static long getLongValue(String v, long def) { + try { + return Long.parseLong(v); + } catch (Exception var3) { + return def; + } + } + + +} diff --git a/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java b/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java new file mode 100644 index 000000000..f6d55aece --- /dev/null +++ b/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java @@ -0,0 +1,1394 @@ +//package com.engine.salary.elog.util; +// +//import cn.hutool.core.map.CaseInsensitiveMap; +//import com.alibaba.druid.proxy.jdbc.ClobProxyImpl; +//import com.alibaba.fastjson.JSON; +//import com.alibaba.fastjson.JSONArray; +//import com.alibaba.fastjson.JSONObject; +//import com.weaver.common.component.table.WeaTable; +//import com.weaver.common.component.table.column.WeaTableColumn; +//import com.weaver.common.elog.annotation.OperateType; +//import com.weaver.common.elog.enums.ElogConsts; +//import com.weaver.common.i18n.label.SystemEnv; +//import com.weaver.common.mybatis.util.DatabaseUtil; +//import com.weaver.common.security.util.SecurityUtil; +//import org.apache.commons.lang3.StringUtils; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +// +//import java.sql.Clob; +//import java.util.*; +//import java.util.regex.Matcher; +//import java.util.regex.Pattern; +// +///** +// * @Date: 2022/5/18 19:34 +// * @Author: deli.xu +// * @Description: elog服务转换类 +// **/ +//public class ElogSeviceSwitchUtils { +// +// private static final Logger logger = LoggerFactory.getLogger(ElogSeviceSwitchUtils.class); +// // TODO 后续需要考虑多语言label写法 +// public static final Map moduleMap = new HashMap<>(); +// +// private static final Map> moduleFuctionMap = new HashMap<>(); +// +// static { +// /*moduleMap.put("elog", SystemEnv.getHtmlLabelName(62975, ElogSeviceUtils.currentLanguage(), "日志")); +// moduleMap.put("report", SystemEnv.getHtmlLabelName(62976, ElogSeviceUtils.currentLanguage(), "报表")); +// moduleMap.put("edc", SystemEnv.getHtmlLabelName(62977, ElogSeviceUtils.currentLanguage(), "数据中心")); +// moduleMap.put("hrm", SystemEnv.getHtmlLabelName(62978, ElogSeviceUtils.currentLanguage(), "人力资源")); +// moduleMap.put("crm", SystemEnv.getHtmlLabelName(62979, ElogSeviceUtils.currentLanguage(), "资产")); +// moduleMap.put("demo", SystemEnv.getHtmlLabelName(62980, ElogSeviceUtils.currentLanguage(), "示例")); +// moduleMap.put("attc", SystemEnv.getHtmlLabelName(62981, ElogSeviceUtils.currentLanguage(), "出勤打卡")); +// moduleMap.put("attm", SystemEnv.getHtmlLabelName(62982, ElogSeviceUtils.currentLanguage(), "出勤机")); +// moduleMap.put("attw", SystemEnv.getHtmlLabelName(62983, ElogSeviceUtils.currentLanguage(), "出勤报表")); +// moduleMap.put("auth", SystemEnv.getHtmlLabelName(62984, ElogSeviceUtils.currentLanguage(), "系统权限")); +// moduleMap.put("bank", SystemEnv.getHtmlLabelName(62985, ElogSeviceUtils.currentLanguage(), "银企直联")); +// moduleMap.put("bap", SystemEnv.getHtmlLabelName(62986, ElogSeviceUtils.currentLanguage(), "云办公")); +// moduleMap.put("base", SystemEnv.getHtmlLabelName(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); +// moduleMap.put("batc", SystemEnv.getHtmlLabelName(62988, ElogSeviceUtils.currentLanguage(), "导入导出")); +// moduleMap.put("blog", SystemEnv.getHtmlLabelName(62989, ElogSeviceUtils.currentLanguage(), "日报微博")); +// moduleMap.put("cld", SystemEnv.getHtmlLabelName(62990, ElogSeviceUtils.currentLanguage(), "日程管理")); +// moduleMap.put("cmca", SystemEnv.getHtmlLabelName(62991, ElogSeviceUtils.currentLanguage(), "资金管理")); +// moduleMap.put("cmcl", SystemEnv.getHtmlLabelName(62992, ElogSeviceUtils.currentLanguage(), "线索管理")); +// moduleMap.put("cmco", SystemEnv.getHtmlLabelName(62993, ElogSeviceUtils.currentLanguage(), "联系人管理")); +// moduleMap.put("cmcp", SystemEnv.getHtmlLabelName(62994, ElogSeviceUtils.currentLanguage(), "对手管理")); +// moduleMap.put("cmcu", SystemEnv.getHtmlLabelName(62995, ElogSeviceUtils.currentLanguage(), "客户管理")); +// moduleMap.put("cmex", SystemEnv.getHtmlLabelName(62996, ElogSeviceUtils.currentLanguage(), "批量操作")); +// moduleMap.put("cmmk", SystemEnv.getHtmlLabelName(62997, ElogSeviceUtils.currentLanguage(), "营销管理")); +// moduleMap.put("cmor", SystemEnv.getHtmlLabelName(62998, ElogSeviceUtils.currentLanguage(), "订单管理")); +// moduleMap.put("cmpc", SystemEnv.getHtmlLabelName(62999, ElogSeviceUtils.currentLanguage(), "价格管理")); +// moduleMap.put("cmpr", SystemEnv.getHtmlLabelName(63000, ElogSeviceUtils.currentLanguage(), "产品管理")); +// moduleMap.put("cmpt", SystemEnv.getHtmlLabelName(63001, ElogSeviceUtils.currentLanguage(), "外部门户")); +// moduleMap.put("cmqu", SystemEnv.getHtmlLabelName(63002, ElogSeviceUtils.currentLanguage(), "报价管理")); +// moduleMap.put("cmsa", SystemEnv.getHtmlLabelName(63003, ElogSeviceUtils.currentLanguage(), "商机管理")); +// moduleMap.put("cmtr", SystemEnv.getHtmlLabelName(63004, ElogSeviceUtils.currentLanguage(), "合同管理")); +// moduleMap.put("comp", SystemEnv.getHtmlLabelName(63005, ElogSeviceUtils.currentLanguage(), "文档对比")); +// moduleMap.put("cs", SystemEnv.getHtmlLabelName(63006, ElogSeviceUtils.currentLanguage(), "云商店")); +// moduleMap.put("cowork", SystemEnv.getHtmlLabelName(63007, ElogSeviceUtils.currentLanguage(), "协作区")); +// moduleMap.put("dbs", SystemEnv.getHtmlLabelName(63008, ElogSeviceUtils.currentLanguage(), "文档公共模块")); +// moduleMap.put("dcad", SystemEnv.getHtmlLabelName(63009, ElogSeviceUtils.currentLanguage(), "数据中心运行")); +// moduleMap.put("dcap", SystemEnv.getHtmlLabelName(63010, ElogSeviceUtils.currentLanguage(), "数据中心分析开发配置")); +// moduleMap.put("dcrd", SystemEnv.getHtmlLabelName(63011, ElogSeviceUtils.currentLanguage(), "数据中心开发配置")); +// moduleMap.put("dcre", SystemEnv.getHtmlLabelName(63012, ElogSeviceUtils.currentLanguage(), "数据中心分析生产运行")); +// moduleMap.put("dcs", SystemEnv.getHtmlLabelName(63013, ElogSeviceUtils.currentLanguage(), "文档目录模块")); +// moduleMap.put("dds", SystemEnv.getHtmlLabelName(63014, ElogSeviceUtils.currentLanguage(), "文档模块")); +// moduleMap.put("dps", SystemEnv.getHtmlLabelName(63015, ElogSeviceUtils.currentLanguage(), "文档权限模块")); +// moduleMap.put("drle", SystemEnv.getHtmlLabelName(63016, ElogSeviceUtils.currentLanguage(), "数据规则库")); +// moduleMap.put("ds", SystemEnv.getHtmlLabelName(63017, ElogSeviceUtils.currentLanguage(), "数据安全")); +// moduleMap.put("dw_etl", SystemEnv.getHtmlLabelName(63018, ElogSeviceUtils.currentLanguage(), "ETL(抽取,转换,治理)")); +// moduleMap.put("dw_model", SystemEnv.getHtmlLabelName(63019, ElogSeviceUtils.currentLanguage(), "建模服务")); +// moduleMap.put("dw_process", SystemEnv.getHtmlLabelName(63020, ElogSeviceUtils.currentLanguage(), "计算服务")); +// moduleMap.put("dw_search", SystemEnv.getHtmlLabelName(63021, ElogSeviceUtils.currentLanguage(), "查询服务")); +// moduleMap.put("dw_sync", SystemEnv.getHtmlLabelName(63022, ElogSeviceUtils.currentLanguage(), "数据抽取")); +// moduleMap.put("eb", SystemEnv.getHtmlLabelName(63023, ElogSeviceUtils.currentLanguage(), "云桥")); +// moduleMap.put("ebda", SystemEnv.getHtmlLabelName(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); +// moduleMap.put("ebdd", SystemEnv.getHtmlLabelName(63024, ElogSeviceUtils.currentLanguage(), "页面设计")); +// moduleMap.put("ebdf", SystemEnv.getHtmlLabelName(63025, ElogSeviceUtils.currentLanguage(), "表单服务")); +// moduleMap.put("ebdp", SystemEnv.getHtmlLabelName(63026, ElogSeviceUtils.currentLanguage(), "页面管理")); +// moduleMap.put("ecod", SystemEnv.getHtmlLabelName(63027, ElogSeviceUtils.currentLanguage(), "ecode")); +// moduleMap.put("ei", SystemEnv.getHtmlLabelName(63028, ElogSeviceUtils.currentLanguage(), "数据导出导入")); +// moduleMap.put("em", SystemEnv.getHtmlLabelName(63029, ElogSeviceUtils.currentLanguage(), "移动相关")); +// moduleMap.put("es", SystemEnv.getHtmlLabelName(63030, ElogSeviceUtils.currentLanguage(), "微搜搜索")); +// moduleMap.put("esa", SystemEnv.getHtmlLabelName(63031, ElogSeviceUtils.currentLanguage(), "微搜文件分析")); +// moduleMap.put("esb", SystemEnv.getHtmlLabelName(63032, ElogSeviceUtils.currentLanguage(), "ESB")); +// moduleMap.put("esch", SystemEnv.getHtmlLabelName(63033, ElogSeviceUtils.currentLanguage(), "计划任务")); +// moduleMap.put("esd", SystemEnv.getHtmlLabelName(63034, ElogSeviceUtils.currentLanguage(), "微搜索引数据")); +// moduleMap.put("exfo", SystemEnv.getHtmlLabelName(63035, ElogSeviceUtils.currentLanguage(), "excel函数引擎")); +// moduleMap.put("fbdg", SystemEnv.getHtmlLabelName(63036, ElogSeviceUtils.currentLanguage(), "预算编制")); +// moduleMap.put("fdt", SystemEnv.getHtmlLabelName(63037, ElogSeviceUtils.currentLanguage(), "表单数据")); +// moduleMap.put("fexs", SystemEnv.getHtmlLabelName(63038, ElogSeviceUtils.currentLanguage(), "费用管理")); +// moduleMap.put("file", SystemEnv.getHtmlLabelName(63039, ElogSeviceUtils.currentLanguage(), "文件服务")); +// moduleMap.put("finc", SystemEnv.getHtmlLabelName(63040, ElogSeviceUtils.currentLanguage(), "微报账")); +// moduleMap.put("fnar", SystemEnv.getHtmlLabelName(63041, ElogSeviceUtils.currentLanguage(), "财务报表")); +// moduleMap.put("fomo", SystemEnv.getHtmlLabelName(63042, ElogSeviceUtils.currentLanguage(), "表单监控")); +// moduleMap.put("form", SystemEnv.getHtmlLabelName(63043, ElogSeviceUtils.currentLanguage(), "表单服务")); +// moduleMap.put("frpt", SystemEnv.getHtmlLabelName(63043, ElogSeviceUtils.currentLanguage(), "业务表单")); +// moduleMap.put("fvou", SystemEnv.getHtmlLabelName(63044, ElogSeviceUtils.currentLanguage(), "凭证集成")); +// moduleMap.put("hp", SystemEnv.getHtmlLabelName(63045, ElogSeviceUtils.currentLanguage(), "门户")); +// moduleMap.put("hr", SystemEnv.getHtmlLabelName(63046, ElogSeviceUtils.currentLanguage(), "人事档案")); +// moduleMap.put("ic", SystemEnv.getHtmlLabelName(63047, ElogSeviceUtils.currentLanguage(), "集成服务")); +// moduleMap.put("il", SystemEnv.getHtmlLabelName(63048, ElogSeviceUtils.currentLanguage(), "集成登录")); +// moduleMap.put("im", SystemEnv.getHtmlLabelName(63049, ElogSeviceUtils.currentLanguage(), "IM相关服务")); +// moduleMap.put("inc", SystemEnv.getHtmlLabelName(63050, ElogSeviceUtils.currentLanguage(), "发票云服务")); +// moduleMap.put("iua", SystemEnv.getHtmlLabelName(63051, ElogSeviceUtils.currentLanguage(), "统一认证")); +// moduleMap.put("iut", SystemEnv.getHtmlLabelName(63052, ElogSeviceUtils.currentLanguage(), "统一待办")); +// moduleMap.put("mail", SystemEnv.getHtmlLabelName(63053, ElogSeviceUtils.currentLanguage(), "邮件服务")); +// moduleMap.put("mc", SystemEnv.getHtmlLabelName(63054, ElogSeviceUtils.currentLanguage(), "消息服务")); +// moduleMap.put("mt", SystemEnv.getHtmlLabelName(63055, ElogSeviceUtils.currentLanguage(), "会议管理")); +// moduleMap.put("my", SystemEnv.getHtmlLabelName(63056, ElogSeviceUtils.currentLanguage(), "关注&收藏&标签")); +// moduleMap.put("odoc", SystemEnv.getHtmlLabelName(63057, ElogSeviceUtils.currentLanguage(), "公文管理")); +// moduleMap.put("odoc_exchange", SystemEnv.getHtmlLabelName(63058, ElogSeviceUtils.currentLanguage(), "公文交换平台")); +// moduleMap.put("open", SystemEnv.getHtmlLabelName(63059, ElogSeviceUtils.currentLanguage(), "开放平台")); +// moduleMap.put("pr", SystemEnv.getHtmlLabelName(63060, ElogSeviceUtils.currentLanguage(), "工作画像")); +// moduleMap.put("proj", SystemEnv.getHtmlLabelName(63061, ElogSeviceUtils.currentLanguage(), "项目管理")); +// moduleMap.put("prt", SystemEnv.getHtmlLabelName(63062, ElogSeviceUtils.currentLanguage(), "打印服务")); +// moduleMap.put("pspt", SystemEnv.getHtmlLabelName(63063, ElogSeviceUtils.currentLanguage(), "系统登录")); +// moduleMap.put("rptc", SystemEnv.getHtmlLabelName(63064, ElogSeviceUtils.currentLanguage(), "数据协作")); +// moduleMap.put("rpts", SystemEnv.getHtmlLabelName(63065, ElogSeviceUtils.currentLanguage(), "上报调查")); +// moduleMap.put("sala", SystemEnv.getHtmlLabelName(63066, ElogSeviceUtils.currentLanguage(), "薪资管理")); +// moduleMap.put("sign", SystemEnv.getHtmlLabelName(63067, ElogSeviceUtils.currentLanguage(), "印控中心")); +// moduleMap.put("sms", SystemEnv.getHtmlLabelName(63068, ElogSeviceUtils.currentLanguage(), "短信")); +// moduleMap.put("task", SystemEnv.getHtmlLabelName(63069, ElogSeviceUtils.currentLanguage(), "任务管理")); +// moduleMap.put("tnt", SystemEnv.getHtmlLabelName(63070, ElogSeviceUtils.currentLanguage(), "租户管理")); +// moduleMap.put("wf", SystemEnv.getHtmlLabelName(63071, ElogSeviceUtils.currentLanguage(), "路径定义")); +// moduleMap.put("wfc", SystemEnv.getHtmlLabelName(63072, ElogSeviceUtils.currentLanguage(), "流程流转")); +// moduleMap.put("wfr", SystemEnv.getHtmlLabelName(63073, ElogSeviceUtils.currentLanguage(), "流程规则路由")); +// moduleMap.put("wrgm", SystemEnv.getHtmlLabelName(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); +// moduleMap.put("wrgp", SystemEnv.getHtmlLabelName(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); +// moduleMap.put("wrpr", SystemEnv.getHtmlLabelName(63076, ElogSeviceUtils.currentLanguage(), "计划报告")); +// moduleMap.put("doc", SystemEnv.getHtmlLabelName(63077, ElogSeviceUtils.currentLanguage(), "文档服务")); +// moduleMap.put("placard", SystemEnv.getHtmlLabelName(63078, ElogSeviceUtils.currentLanguage(), "团队公告")); +// moduleMap.put("fna", SystemEnv.getHtmlLabelName(135042, ElogSeviceUtils.currentLanguage(), "云报销")); +// moduleMap.put("meeting", SystemEnv.getHtmlLabelName(63080, ElogSeviceUtils.currentLanguage(), "会议")); +// moduleMap.put("wfp", SystemEnv.getHtmlLabelName(63081, ElogSeviceUtils.currentLanguage(), "流程")); +// moduleMap.put("portal", SystemEnv.getHtmlLabelName(63045, ElogSeviceUtils.currentLanguage(), "门户")); +// moduleMap.put("workreport", SystemEnv.getHtmlLabelName(63082, ElogSeviceUtils.currentLanguage(), "工作报告")); +// moduleMap.put("goal", SystemEnv.getHtmlLabelName(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); +// moduleMap.put("performance", SystemEnv.getHtmlLabelName(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); +// moduleMap.put("intlogin", SystemEnv.getHtmlLabelName(63083, ElogSeviceUtils.currentLanguage(), "集成登录设置")); +// moduleMap.put("i18n", SystemEnv.getHtmlLabelName(64559, ElogSeviceUtils.currentLanguage(), "国际化")); +// moduleMap.put("timecard", SystemEnv.getHtmlLabelName(63085, ElogSeviceUtils.currentLanguage(), "出勤")); +// moduleMap.put("market", SystemEnv.getHtmlLabelName(63086, ElogSeviceUtils.currentLanguage(), "营销")); +// moduleMap.put("excelformula", SystemEnv.getHtmlLabelName(64560, ElogSeviceUtils.currentLanguage(), "函数服务")); +// moduleMap.put("ic_ldap", SystemEnv.getHtmlLabelName(70081, ElogSeviceUtils.currentLanguage(), "Ldap集成")); +// moduleMap.put("iut_c_c", SystemEnv.getHtmlLabelName(70303, ElogSeviceUtils.currentLanguage(), "统一待办推送设置")); +// moduleMap.put("plan", SystemEnv.getHtmlLabelName(70303, ElogSeviceUtils.currentLanguage(), "计划报告")); +// moduleMap.put("document", SystemEnv.getHtmlLabelName(34218, ElogSeviceUtils.currentLanguage(), "文档")); +// moduleMap.put("taskCustStatus", SystemEnv.getHtmlLabelName(73988, ElogSeviceUtils.currentLanguage(), "任务状态")); +// moduleMap.put("project", SystemEnv.getHtmlLabelName(55158, ElogSeviceUtils.currentLanguage(), "项目")); +// moduleMap.put("calendar", SystemEnv.getHtmlLabelName(74186, ElogSeviceUtils.currentLanguage(), "日历")); +// moduleMap.put("web", SystemEnv.getHtmlLabelName(75598, ElogSeviceUtils.currentLanguage(), "浏览")); +// moduleMap.put("formdatareport", SystemEnv.getHtmlLabelName(76068, ElogSeviceUtils.currentLanguage(), "来自上报数据")); +// moduleMap.put("mainline", SystemEnv.getHtmlLabelName(31898, ElogSeviceUtils.currentLanguage(), "主线")); +// moduleMap.put("customer", SystemEnv.getHtmlLabelName(32726, ElogSeviceUtils.currentLanguage(), "客户")); +// moduleMap.put("contract", SystemEnv.getHtmlLabelName(32864, ElogSeviceUtils.currentLanguage(), "合同")); +// moduleMap.put("group", SystemEnv.getHtmlLabelName(19426, ElogSeviceUtils.currentLanguage(), "分组")); +// moduleMap.put("workflow", SystemEnv.getHtmlLabelName(81851, ElogSeviceUtils.currentLanguage(), "工作流程")); +// moduleMap.put("biaoge", SystemEnv.getHtmlLabelName(30919, ElogSeviceUtils.currentLanguage(), "表格")); +// moduleMap.put("clue", SystemEnv.getHtmlLabelName(28908, ElogSeviceUtils.currentLanguage(), "线索")); +// moduleMap.put("competitor", SystemEnv.getHtmlLabelName(81852, ElogSeviceUtils.currentLanguage(), "竞争对手")); +// moduleMap.put("kpiFlow", SystemEnv.getHtmlLabelName(81853, ElogSeviceUtils.currentLanguage(), "kpil流程")); +// moduleMap.put("mainlineCustStatus", SystemEnv.getHtmlLabelName(81854, ElogSeviceUtils.currentLanguage(), "主线客户状态")); +// moduleMap.put("marketactivity", SystemEnv.getHtmlLabelName(34221, ElogSeviceUtils.currentLanguage(), "市场活动")); +// moduleMap.put("mtPhase", SystemEnv.getHtmlLabelName(81855, ElogSeviceUtils.currentLanguage(), "mt阶段")); +// moduleMap.put("production", SystemEnv.getHtmlLabelName(29329, ElogSeviceUtils.currentLanguage(), "产品")); +// moduleMap.put("quote", SystemEnv.getHtmlLabelName(34231, ElogSeviceUtils.currentLanguage(), "报价")); +// moduleMap.put("saleChance", SystemEnv.getHtmlLabelName(32863, ElogSeviceUtils.currentLanguage(), "商机")); +// moduleMap.put("orderform", SystemEnv.getHtmlLabelName(34230, ElogSeviceUtils.currentLanguage(), "订单")); +// moduleMap.put("contact", SystemEnv.getHtmlLabelName(32711, ElogSeviceUtils.currentLanguage(), "联系人")); +// moduleMap.put("price", SystemEnv.getHtmlLabelName(31922, ElogSeviceUtils.currentLanguage(), "价格")); +// moduleMap.put("capital", SystemEnv.getHtmlLabelName(83428, ElogSeviceUtils.currentLanguage(), "资金")); +// moduleMap.put("ice", SystemEnv.getHtmlLabelName(94360, ElogSeviceUtils.currentLanguage(), "日程会议集成")); +// moduleMap.put("ic_hr", SystemEnv.getHtmlLabelName(84284, ElogSeviceUtils.currentLanguage(), "HR同步")); +// moduleMap.put("intunifyauth", SystemEnv.getHtmlLabelName(84467, ElogSeviceUtils.currentLanguage(), "统一认证接入管理")); +// moduleMap.put("signcenter", SystemEnv.getHtmlLabelName(84691, ElogSeviceUtils.currentLanguage(), "电子签")); +// moduleMap.put("iut_s_c", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-异构系统")); +// moduleMap.put("iut_s_c1", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统")); +// moduleMap.put("iut_s_c2", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办中心")); +// moduleMap.put("iut_s_c3", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统-流程类型")); +// moduleMap.put("ic_mail", SystemEnv.getHtmlLabelName(100715, ElogSeviceUtils.currentLanguage(), "邮箱集成")); +// moduleMap.put("hrsa", SystemEnv.getHtmlLabelName(105038, ElogSeviceUtils.currentLanguage(), "薪酬管理")); +// moduleMap.put("icc", SystemEnv.getHtmlLabelName(113884, ElogSeviceUtils.currentLanguage(), "转换规则")); +// moduleMap.put("basicserver", SystemEnv.getHtmlLabelName(113885, ElogSeviceUtils.currentLanguage(), "整体基础")); +// moduleMap.put("dw", SystemEnv.getHtmlLabelName(115549, ElogSeviceUtils.currentLanguage(), "数据仓库")); +// moduleMap.put("msg", SystemEnv.getHtmlLabelName(115563, ElogSeviceUtils.currentLanguage(), "工作消息")); +// moduleMap.put("intunifybase", SystemEnv.getHtmlLabelName(115599, ElogSeviceUtils.currentLanguage(), "统一认证服务")); +// moduleMap.put("esearch", SystemEnv.getHtmlLabelName(21694, ElogSeviceUtils.currentLanguage(), "全文检索")); +// moduleMap.put("iaauthserver", SystemEnv.getHtmlLabelName(115603, ElogSeviceUtils.currentLanguage(), "统一认证注册应用")); +// moduleMap.put("excel", SystemEnv.getHtmlLabelName(115543, ElogSeviceUtils.currentLanguage(), "excel函数")); +// moduleMap.put("scene", SystemEnv.getHtmlLabelName(115539, ElogSeviceUtils.currentLanguage(), "绘图")); +// moduleMap.put("bcw", SystemEnv.getHtmlLabelName(115651, ElogSeviceUtils.currentLanguage(), "公共模块")); +// moduleMap.put("folder", SystemEnv.getHtmlLabelName(10734, ElogSeviceUtils.currentLanguage(), "文件夹")); +// moduleMap.put("pdfcnv", SystemEnv.getHtmlLabelName(115957, ElogSeviceUtils.currentLanguage(), "PDF转换服务")); +// moduleMap.put("ebform", SystemEnv.getHtmlLabelName(121462, ElogSeviceUtils.currentLanguage(), "e-Builder表单")); +// moduleMap.put("statistics", SystemEnv.getHtmlLabelName(17745, ElogSeviceUtils.currentLanguage(), "自定义统计")); +// moduleMap.put("edcapp", SystemEnv.getHtmlLabelName(121631, ElogSeviceUtils.currentLanguage(), "多级填报")); +// +// */ +// +// moduleMap.put("elog", 62975); +// moduleMap.put("report", 62976); +// moduleMap.put("edc", 52689); +// moduleMap.put("hrm", 62978); +// moduleMap.put("crm", 62979); +// moduleMap.put("demo", 62980); +// moduleMap.put("attc", 62981); +// moduleMap.put("attm", 62982); +// moduleMap.put("attw", 62983); +// moduleMap.put("auth", 62984); +// moduleMap.put("bank", 62985); +// moduleMap.put("bap", 62986); +// moduleMap.put("base", 62987); +// moduleMap.put("batc", 62988); +// moduleMap.put("blog", 62989); +// moduleMap.put("cld", 62990); +// moduleMap.put("cmca", 62991); +// moduleMap.put("cmcl", 62992); +// moduleMap.put("cmco", 62993); +// moduleMap.put("cmcp", 62994); +// moduleMap.put("cmcu", 62995); +// moduleMap.put("cmex", 62996); +// moduleMap.put("cmmk", 62997); +// moduleMap.put("cmor", 62998); +// moduleMap.put("cmpc", 62999); +// moduleMap.put("cmpr", 63000); +// moduleMap.put("cmpt", 63001); +// moduleMap.put("cmqu", 63002); +// moduleMap.put("cmsa", 63003); +// moduleMap.put("cmtr", 63004); +// moduleMap.put("comp", 63005); +// moduleMap.put("cs", 63006); +// moduleMap.put("cowork", 63007); +// moduleMap.put("dbs", 63008); +// moduleMap.put("dcad", 63009); +// moduleMap.put("dcap", 63010); +// moduleMap.put("dcrd", 63011); +// moduleMap.put("dcre", 63012); +// moduleMap.put("dcs", 63013); +// moduleMap.put("dds", 63014); +// moduleMap.put("dps", 63015); +// moduleMap.put("drle", 63016); +// moduleMap.put("ds", 63017); +// moduleMap.put("dw_etl", 63018); +// moduleMap.put("dw_model", 63019); +// moduleMap.put("dw_process", 63020); +// moduleMap.put("dw_search", 63021); +// moduleMap.put("dw_sync", 63022); +// moduleMap.put("eb", 63023); +// moduleMap.put("ebda", 62987); +// moduleMap.put("ebdd", 63024); +// moduleMap.put("ebdf", 63025); +// moduleMap.put("ebdp", 63026); +// moduleMap.put("ecod", 63027); +// moduleMap.put("ei", 63028); +// moduleMap.put("em", 63029); +// moduleMap.put("es", 63030); +// moduleMap.put("esa", 63031); +// moduleMap.put("esb", 63032); +// moduleMap.put("esch", 63033); +// moduleMap.put("esd", 63034); +// moduleMap.put("exfo", 63035); +// moduleMap.put("fbdg", 63036); +// moduleMap.put("fdt",63037); +// moduleMap.put("fexs", 63038); +// moduleMap.put("file", 63039); +// moduleMap.put("finc", 63040); +// moduleMap.put("fnar", 63041); +// moduleMap.put("fomo", 63042); +// moduleMap.put("form", 63043); +// moduleMap.put("frpt", 63043); +// moduleMap.put("fvou", 63044); +// moduleMap.put("hp", 63045); +// moduleMap.put("hr", 63046); +// moduleMap.put("ic", 63047); +// moduleMap.put("il", 63048); +// moduleMap.put("im", 63049); +// moduleMap.put("inc", 63050); +// moduleMap.put("iua", 63051); +// moduleMap.put("iut", 63052); +// moduleMap.put("mail", 63053); +// moduleMap.put("mc", 63054); +// moduleMap.put("mt", 63055); +// moduleMap.put("my", 63056); +// moduleMap.put("odoc", 63057); +// moduleMap.put("odoc_exchange", 63058); +// moduleMap.put("open", 63059); +// moduleMap.put("pr", 63060); +// moduleMap.put("proj", 63061); +// moduleMap.put("prt", 63062); +// moduleMap.put("pspt", 63063); +// moduleMap.put("rptc", 63064); +// moduleMap.put("rpts", 63065); +// moduleMap.put("sala", 63066); +// moduleMap.put("sign", 63067); +// moduleMap.put("sms", 63068); +// moduleMap.put("task", 63069); +// moduleMap.put("tnt", 63070); +// moduleMap.put("wf", 63071); +// moduleMap.put("wfc", 63072); +// moduleMap.put("wfr", 63073); +// moduleMap.put("wrgm", 63074); +// moduleMap.put("wrgp", 63075); +// moduleMap.put("wrpr", 63076); +// moduleMap.put("doc", 63077); +// moduleMap.put("placard", 63078); +// moduleMap.put("fna", 135042); +// moduleMap.put("meeting", 63080); +// moduleMap.put("wfp", 63081); +// moduleMap.put("portal", 63045); +// moduleMap.put("workreport", 63082); +// moduleMap.put("goal", 63074); +// moduleMap.put("performance", 63075); +// moduleMap.put("intlogin", 63083); +// moduleMap.put("i18n", 64559); +// moduleMap.put("timecard", 63085); +// moduleMap.put("market", 63086); +// moduleMap.put("excelformula", 64560); +// moduleMap.put("ebatch", 69280); +// moduleMap.put("ic_ldap", 70081); +// moduleMap.put("iut_c_c", 96493); +// moduleMap.put("plan", 63076); +// moduleMap.put("document", 34218); +// moduleMap.put("taskCustStatus", 73988); +// moduleMap.put("calendar", 74186); +// moduleMap.put("batch", 69280); +// moduleMap.put("project", 55158); +// moduleMap.put("web", 75598); +// moduleMap.put("formdatareport", 76068); +// moduleMap.put("mainline", 31898); +// moduleMap.put("customer", 32726); +// moduleMap.put("contract", 32864); +// moduleMap.put("group", 19426); +// moduleMap.put("workflow", 81851); +// moduleMap.put("biaoge", 30919); +// moduleMap.put("clue", 28908); +// moduleMap.put("competitor", 81852); +// moduleMap.put("kpiFlow", 81853); +// moduleMap.put("mainlineCustStatus", 81854); +// moduleMap.put("marketactivity", 34221); +// moduleMap.put("mtPhase", 81855); +// moduleMap.put("production", 29329); +// moduleMap.put("quote", 34231); +// moduleMap.put("saleChance", 32863); +// moduleMap.put("orderform", 34230); +// moduleMap.put("contact", 32711); +// moduleMap.put("price", 31922); +// moduleMap.put("capital", 83428); +// moduleMap.put("ice", 87722); +// moduleMap.put("ic_hr", 84284); +// moduleMap.put("intunifyauth", 84508); +// moduleMap.put("signcenter", 84691); +// moduleMap.put("iut_s_c", 91503); +// moduleMap.put("iut_s_c1", 95218); +// moduleMap.put("iut_s_c2", 95219); +// moduleMap.put("iut_s_c3", 95220); +// moduleMap.put("iut_c_log", 96494); +// moduleMap.put("ic_mail", 100715); +// moduleMap.put("hrsa", 105038); +// moduleMap.put("icc", 113884); +// moduleMap.put("basicserver", 113885); +// moduleMap.put("dw", 115549); +// moduleMap.put("msg", 115563); +// moduleMap.put("intunifybase", 115599); +// moduleMap.put("esearch", 21694); +// moduleMap.put("iaauthserver", 115603); +// moduleMap.put("excel", 115543); +// moduleMap.put("scene", 115539); +// moduleMap.put("bcw", 115651); +// moduleMap.put("folder", 10734); +// moduleMap.put("pdfcnv", 115957); +// moduleMap.put("login", 63063); +// moduleMap.put("ebform", 121462); +// moduleMap.put("statistics", 17745); +// moduleMap.put("edcapp", 121631); +// moduleMap.put("cusapp", 16381); +// moduleMap.put("e10-allinone-base", 141083); +// moduleMap.put("voice", 142713); +// moduleMap.put("filter", 147832); +// moduleMap.put("ias", 146674); +// moduleMap.put("device", 153666); +// moduleMap.put("meetingTopic", 180274); +// moduleMap.put("meetingService", 180276); +// moduleMap.put("meetingDecision", 180277); +// moduleMap.put("meetingSign", 180278); +// moduleMap.put("meetingSignSet", 61601); +// moduleMap.put("meetingMember", 180280); +// moduleMap.put("meetingShare", 180281); +// moduleMap.put("int", 40031); +// moduleMap.put("print", 160051); +// moduleMap.put("wcwIconUpdate", 182661); +// moduleMap.put("wcwIconRelease", 183123); +// moduleMap.put("wcwIconUse", 183124); +// moduleMap.put("wcw", 29385); +// moduleMap.put("component", 115651); +// moduleMap.put("ic_exchange", 87722); +// moduleMap.put("iut_c_c", 240048); +// moduleMap.put("iut_c_set", 240049); +// +// Map elogMap = new HashMap<>(); +// Map reportMap = new HashMap<>(); +// Map edcMap = new HashMap<>(); +// Map hrmMap = new HashMap<>(); +// Map crmMap = new HashMap<>(); +// Map demoMap = new HashMap<>(); +// +// moduleFuctionMap.put("elog", elogMap); +// moduleFuctionMap.put("report", reportMap); +// moduleFuctionMap.put("edc", edcMap); +// moduleFuctionMap.put("hrm", hrmMap); +// moduleFuctionMap.put("crm", crmMap); +// moduleFuctionMap.put("demo", demoMap); +// +// +// +// elogMap.put("operator", "日志操作"); +// elogMap.put("reportcusinfo","报表自定义"); +// edcMap.put("dataset","数据集合"); +// +// demoMap.put("reportcusinfo","报表自定义字段"); +// } +// +// /** +// * 获取模块名称 +// * @param module +// * @return +// */ +// public static String getModuleName(String module) { +// String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); +// +// return ElogSeviceUtils.isLongValue(modulename) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulename),modulename) : modulename; +// } +// +// /** +// * 获取模块名称 +// * @param module +// * @return +// */ +// public static String getModuleNamePapi(String module) { +// String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); +// +// return ElogSeviceUtils.isLongValue(modulename) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulename),modulename) : modulename; +// } +// +// +// /** +// * 获取方法名称 +// * @param module +// * @param function +// * @return +// */ +// public static String getFunctionName(String module, String function) { +// Map functionMap = moduleFuctionMap.get(module); +// +// if(functionMap != null) +// function = ElogSeviceUtils.null2String(functionMap.get(function),function); +// +// return ElogSeviceUtils.isLongValue(function) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(function),function) : function; +// } +// +// public static void switchValues(List resultMap, List recordColumns) { +// +// switchValues(resultMap,recordColumns,false); +// +// } +// +// +// public static void switchValues(List list,List recordColumns, boolean islocal) { +//// if(!islocal) { +//// changKey2Lower(list); +//// } +// for(Map map : list) { +// Iterator> iterator = map.entrySet().iterator(); +// while (iterator.hasNext()) { +// Map.Entry next = iterator.next(); +// for (String recordColumn : recordColumns) { +// if (next.getKey().equals(recordColumn) && next.getValue() instanceof String) { +// map.put(next.getKey(), transfi18Method(next.getValue())); +// } +// } +// } +// map.put("modulenamespan", getModuleName(map.get("modulename"))); +// //map.put("functionnamespan", getFunctionName(map.get("modulename"), map.get("functionname"))); +// //switchDatabaseField(map); +// } +// +// } +// +// public static void switchDatabaseField(Map map) { +// map.put("date", map.get("log_date")); +// map.put("operator", map.get("log_operator")); +// map.put("result", map.get("log_result")); +// } +// +// /** +// * 转换数据成多语言 +// * @param lists +// */ +// public static List transfLanguageData(List lists) { +// if (lists != null && lists.size() > 0) { +// for (Map map : lists) { +// if (map != null) { +// Iterator> iterator = map.entrySet().iterator(); +// while (iterator.hasNext()) { +// Map.Entry entry = iterator.next(); +// if (entry.getValue() instanceof Integer ||entry.getValue() instanceof Long||entry.getValue()instanceof String) { +// map.put(entry.getKey(), transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()),entry.getValue().toString())); +// }else{ +// map.put(entry.getKey(), entry.getValue()); +// } +// } +// } +// } +// } +// return lists; +// } +// +// public static String transfi18Method(String str) { +// if ("新增".equals(str)){ +// return transfLanguageLableid(63252l,str); +// } else if ("查看".equals(str)) { +// return transfLanguageLableid(55172l,str); +// }else if ("修改".equals(str)) { +// return transfLanguageLableid(63253l,str); +// }else if ("更新".equals(str)) { +// return transfLanguageLableid(29540l,str); +// }else if ("删除".equals(str)) { +// return transfLanguageLableid(63254l,str); +// }else if (StringUtils.isNumeric(str) && str.length()< 10) { +// return transfLanguageLableid(Long.parseLong(str),str); +// }else { +// return str; +// } +// } +// +// public static String transfLanguageLableid(Long lableid) { +// return SystemEnv.getHtmlLabelName(lableid, lableid.toString()); +// } +// +// /** +// * 转换多语言 +// * @param lableid +// * @param def +// * @return +// */ +// public static String transfLanguageLableid(Long lableid,String def) { +// return SystemEnv.getHtmlLabelName(lableid, def); +// } +// +// +// /** +// * 日志本地服务-更新明细转换 +// * +// * @param mainlist +// * @param list +// * @return +// */ +// public static Map switchChangeValue(List mainlist, List list) { +// Map res = new HashMap<>(); +// StringBuilder valuesChange = new StringBuilder(); +// List valuesChanges = new ArrayList<>(); +// String values = ""; +// String operatetypeName = ""; +// int oldCount = 0; +// int newCount = 0; +// String operatetype = ""; +// CaseInsensitiveMap map = null; +// if (list != null && list.size() > 0) { +// for (Map hashmap : list) { +// map = new CaseInsensitiveMap<>(hashmap); +// Object obj = map.get("operatetype"); +// if (obj != null) { +// operatetype = obj.toString(); +// } +// } +// } +// if (mainlist != null && mainlist.size() > 0) { +// for (Map hashMap : mainlist) { +// map = new CaseInsensitiveMap<>(hashMap); +// Object isdetail = map.get("isdetail"); +// if (isdetail != null) { +// if (StringUtils.isBlank(isdetail.toString())||!"0".equals(isdetail.toString())){ +// continue; +// } +// }else{ +// continue; +// } +// Object oldvalue = map.get("oldvalue"); +// if (oldvalue != null) { +// if (StringUtils.isNotBlank(oldvalue.toString())) { +// oldCount++; +// } +// } +// +// Object newvalue = map.get("newvalue"); +// if (newvalue != null) { +// if (StringUtils.isNotBlank(newvalue.toString())) { +// newCount++; +// } +// } +// +// } +// } +// CaseInsensitiveMap jo = null; +// for(int i = 0 ; i < mainlist.size(); i++) { +// Map jomap = mainlist.get(i); +// jo = new CaseInsensitiveMap<>(jomap); +// String fieldName = jo.get("fielddesc"); +// String oldvalue = obj2String(jo.get("oldvalue")); +// String oldrealvalue = obj2String(jo.get("oldrealvalue")); +// String newValue = obj2String(jo.get("newvalue")); +// String newrealvalue = obj2String(jo.get("newrealvalue")); +// // oracle.sql.CLOB类型处理 +// jomap.put("oldvalue", oldvalue); +// jomap.put("oldrealvalue", oldrealvalue); +// jomap.put("newvalue", newValue); +// jomap.put("newrealvalue", newrealvalue); +// +// String fieldNameLabelId = jo.get("fieldnamelabelid"); +// if (StringUtils.isNotBlank(fieldNameLabelId)&&StringUtils.isNumeric(fieldNameLabelId)) { +// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId),fieldName); +// } else if (StringUtils.isNotBlank(fieldNameLabelId)&&!StringUtils.isNumeric(fieldNameLabelId) && !"-1".equals(fieldNameLabelId)) { +// fieldName = fieldNameLabelId; +// } else if (StringUtils.isNotBlank(fieldName)&&StringUtils.isNumeric(fieldName)) { +// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldName),fieldName); +// } +// if (StringUtils.isNotBlank(oldrealvalue)&&StringUtils.isNumeric(oldrealvalue)) { +// oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue),oldvalue); +// }else if (StringUtils.isNotBlank(oldrealvalue)&&!StringUtils.isNumeric(oldrealvalue)) { +// oldvalue = oldrealvalue; +// } +// if (StringUtils.isNotBlank(newrealvalue)&&StringUtils.isNumeric(newrealvalue)) { +// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue),newValue); +// }else if (StringUtils.isNotBlank(newrealvalue)&&!StringUtils.isNumeric(newrealvalue)) { +// newValue = newrealvalue; +// } +// +// //oldvalue,newValue 避免xss漏洞 分别进行转义 +// oldvalue = StringConversionForXSS(oldvalue); +// newValue = StringConversionForXSS(newValue); +// +// if (oldCount != 0) { +// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); +// +// } else if (oldCount == 0 || newCount==0 || operatetype.startsWith(OperateType.add)||operatetype.startsWith(OperateType.delete)) { +// valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); +// +// } else { +// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); +// } +// //} +// /*if (valuesChange.length() > 3) { +// values = valuesChange.substring(0, valuesChange.length() - 3); +// }*/ +// } +// +// res.put("valueschanges", valuesChanges); +// res.put("detailcontexts", mainlist); +// return res; +// } +// +// private static String obj2String(Object o) { +// if (o == null) { +// return ""; +// } +// if (o instanceof String) { +// return (String) o; +// } +// return JSON.toJSONString(o); +// } +// +// /** +// * 服务中心结果集转换 +// */ +// public static void switchChangeValues(List list) { +// CaseInsensitiveMap map = null; +// for(Map hashMap : list) { +// map = new CaseInsensitiveMap<>(hashMap); +// int count = 0; +// StringBuilder valuesChange = new StringBuilder(); +// List valuesChanges = new ArrayList(); +// Object detailContexts = map.get("detailcontexts"); +// if(detailContexts != null) { +// JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); +// for(int i = 0 ; i < jsonArray.size(); i++) { +// JSONObject jo = jsonArray.getJSONObject(i); +// String isDetail = jo.getString("isDetail"); +// if (StringUtils.isBlank(isDetail)||!"0".equals(isDetail)){ +// continue; +// } +// String oldvalue = jo.getString("oldValue"); +// if (StringUtils.isNotBlank(oldvalue)) { +// count++; +// } +// } +// } +// +// if(detailContexts != null) { +// JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); +// for(int i = 0 ; i < jsonArray.size(); i++) { +// JSONObject jo = jsonArray.getJSONObject(i); +// String isDetail = jo.getString("isDetail"); +// if (StringUtils.isBlank(isDetail)||!"0".equals(isDetail)){ +// continue; +// } +// String fieldName = jo.getString("fieldDesc"); +// String oldvalue = jo.getString("oldValue"); +// String oldrealvalue = jo.getString("oldRealValue"); +// String newValue = jo.getString("newValue"); +// String newrealvalue = jo.getString("newRealValue"); +// String fieldNameLabelId = jo.getString("fieldNameLabelId"); +// if (StringUtils.isNotBlank(fieldNameLabelId)&&StringUtils.isNumeric(fieldNameLabelId)) { +// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId)); +// } +// if (StringUtils.isNotBlank(oldrealvalue)&&StringUtils.isNumeric(oldrealvalue)) { +// oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue)); +// } +// if (StringUtils.isNotBlank(newrealvalue)&&StringUtils.isNumeric(newrealvalue)) { +// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue)); +// } +// if (count == 0) { +// valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); +// } else { +// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); +// } +// +// } +// /*String values = ""; +// if (valuesChange.length() > 3) { +// values = valuesChange.substring(0, valuesChange.length() - 3); +// }*/ +// +// map.put("valueschanges", valuesChanges); +// } +// +// } +// } +// +// public static String valueChangeNewFormat(){ +// return "【%s】:%s"; +// } +// public static String valueChangeFormat(){ +// return "【%s】:"+SystemEnv.getHtmlLabelName(61695,"由")+ +// "[%s] "+SystemEnv.getHtmlLabelName(61697,"改为")+" [%s]"; +// } +// +// public static void changKey2Lower(List list) { +// +// List newList = new ArrayList<>(); +// for(Map orgMap : list) { +// Map resultMap = new HashMap<>(); +// +// if (orgMap == null || orgMap.isEmpty()) { +// newList.add(resultMap); +// continue; +// } +// +// Set keySet = orgMap.keySet(); +// for (String key : keySet) { +// resultMap.put(key != null ? key.toLowerCase() : "", orgMap.get(key)); +// } +// newList.add(resultMap); +// } +// list.clear(); +// list.addAll(newList); +// } +// +// /** +// * 查看详细表的数据 +// * @param list +// */ +// public static Map switchDetailChangeValue(List list) { +// Map res = new HashMap<>(); +// List> lists = new ArrayList<>(); +// HashMap repeatTableName = new HashMap<>(); +// CaseInsensitiveMap map = null; +// for (Map hashMap : list) { +// map = new CaseInsensitiveMap<>(hashMap); +// List detailmap = new ArrayList<>(); +// HashMap detailoldMap= new HashMap<>(); +// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",map.get("dataid")); +// HashMap detailnewMap= new HashMap<>(); +// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",map.get("dataid")); +// detailmap.add(detailoldMap); +// detailmap.add(detailnewMap); +// WeaTable wea = new WeaTable(); +// wea.getColumns().add(new WeaTableColumn(SystemEnv.getHtmlLabelName(63250,"操作"), "operator", "5%")); +// wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); +// Object tablename = map.get("tablename"); +// Object tablenamelabelid = map.get("tablenamelabelid"); +// if (tablenamelabelid != null) { +// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { +// tablename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); +// } +// } +// Map m = new HashMap<>(); +// if (tablename!=null&&StringUtils.isNotBlank(tablename.toString())) { +// String temptablename = repeatTableName.get(tablename.toString()); +// if (tablename.toString().equals(temptablename)) { +// continue; +// } +// repeatTableName.put(tablename.toString(), tablename.toString()); +// m.put("tablename", tablename.toString()); +// m.put("detailmap", detailmap); +// m.put("column", wea); +// lists.add(m); +// } else { +// tablename = tablename!=null?tablename:""; +// String temptablename = repeatTableName.get(tablename.toString()); +// if (tablename.toString().equals(temptablename)) { +// continue; +// } +// repeatTableName.put(tablename.toString(), tablename.toString()); +// m.put("tablename", ""); +// m.put("detailmap", detailmap); +// m.put("column", wea); +// lists.add(m); +// } +// } +// +// for (Map hashMap : list) { +// map = new CaseInsensitiveMap<>(hashMap); +// Object isDetail = map.get("isdetail"); +// if (isDetail != null) { +// if ("0".equals(isDetail.toString())) { +// continue; +// } +// } else { +// continue; +// } +// String title = ""; +// String dataIndex = ""; +// String oldValue = ""; +// String newValue = ""; +// String tableName = ""; +// String dataId = ""; +// +// Object fieldDesc = map.get("fielddesc"); +// if (fieldDesc != null) { +// if (StringUtils.isNotBlank(fieldDesc.toString())) { +// title = fieldDesc.toString(); +// } +// } +// +// Object fieldnamelabelid = map.get("fieldnamelabelid"); +// if (fieldnamelabelid != null) { +// if (StringUtils.isNotBlank(fieldnamelabelid.toString())&&StringUtils.isNumeric(fieldnamelabelid.toString())) { +// title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); +// } +// } +// +// Object fieldName = map.get("fieldname"); +// if (fieldName != null) { +// if (StringUtils.isNotBlank(fieldName.toString())) { +// dataIndex = fieldName.toString(); +// } +// } +// Object oValue = map.get("oldvalue"); +// if (oValue != null) { +// if (StringUtils.isNotBlank(oValue.toString())) { +// oldValue = oValue.toString(); +// } +// } +// Object nValue = map.get("newvalue"); +// if (nValue != null) { +// if (StringUtils.isNotBlank(nValue.toString())) { +// newValue = nValue.toString(); +// } +// } +// Object oldRealValue = map.get("oldrealvalue"); +// if (oldRealValue != null) { +// if (StringUtils.isNotBlank(oldRealValue.toString())&&StringUtils.isNumeric(oldRealValue.toString())) { +// oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); +// } +// } +// +// Object newrealvalue = map.get("newrealvalue"); +// if (newrealvalue != null) { +// if (StringUtils.isNotBlank(newrealvalue.toString())&&StringUtils.isNumeric(newrealvalue.toString())) { +// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); +// } +// } +// +// Object tablename = map.get("tablename"); +// if (StringUtils.isNotBlank(tablename.toString())) { +// tableName = tablename.toString(); +// } else { +// tableName = ""; +// } +// Object tablenamelabelid = map.get("tablenamelabelid"); +// if (tablenamelabelid != null) { +// if (tablenamelabelid != null) { +// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { +// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); +// } +// } +// } +// Object dataid = map.get("dataid"); +// if (StringUtils.isNotBlank(dataid.toString())) { +// dataId = dataid.toString(); +// } else { +// dataId = ""; +// } +// for (Map m : lists) { +// Object o = m.get("tablename"); +// if (o != null) { +// if (tableName.equals(o)) { +// List details = (List) m.get("detailmap"); +// List newDetails = new ArrayList<>(); +// if (details != null && details.size() > 0) { +// for (Map detail : details) { +// Object data_id = detail.get("dataid"); +// if (data_id != null) { +// if (dataId.equals(data_id)) { +// Object operator = detail.get("operator"); +// if (operator != null) { +// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { +// detail.put(dataIndex, oldValue); +// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { +// detail.put(dataIndex, newValue); +// } +// } +// }else{ +// if (newDetails.size() > 2) { +// for (Map newDetail : newDetails) { +// if (dataId.equals(newDetail.get("dataid"))) { +// Object operator = detail.get("operator"); +// if (operator != null) { +// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { +// detail.put(dataIndex, oldValue); +// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { +// detail.put(dataIndex, newValue); +// } +// } +// }else{ +// HashMap detailoldMap= new HashMap<>(); +// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",map.get("dataid")); +// detailoldMap.put(dataIndex, oldValue); +// HashMap detailnewMap= new HashMap<>(); +// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",map.get("dataid")); +// detailnewMap.put(dataIndex, newValue); +// newDetails.add(detailoldMap); +// newDetails.add(detailnewMap); +// } +// } +// }else if (newDetails.size() == 0) { +// int count = 0; +// for (Map mapdetail : details) { +// Object dataid_ = mapdetail.get("dataid"); +// if (dataid_ != null && dataid_.equals(dataId)) { +// count++; +// } +// } +// if (count == 0) { +// HashMap detailoldMap= new HashMap<>(); +// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",map.get("dataid")); +// detailoldMap.put(dataIndex, oldValue); +// HashMap detailnewMap= new HashMap<>(); +// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",map.get("dataid")); +// detailnewMap.put(dataIndex, newValue); +// newDetails.add(detailoldMap); +// newDetails.add(detailnewMap); +// } +// } +// } +// } +// } +// } +// if (newDetails.size() > 0) { +// details.addAll(newDetails); +// newDetails.clear(); +// } +// +// WeaTable column = (WeaTable) m.get("column"); +// if (column != null) { +// List columns = column.getColumns(); +// if (columns != null && columns.size() > 0) { +// Boolean flag = true; +// for (Object object : columns) { +// WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); +// if (weaTableColumn != null) { +// String title1 = weaTableColumn.getTitle(); +// if (title.equals(title1)) { +// flag = false; +// break; +// } +// } +// } +// if (flag) { +// column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); +// m.put("column", column); +// } +// } +// } +// } +// } +// } +// } +// res.put("detail", lists); +// return res; +// } +// +// +// public static void switchDetailChangeValues(List list) { +// for (Map map : list) { +// Map repeatTableName = new HashMap<>(); +// List detailContexts = (List) map.get("detailcontexts"); +// List lists = new ArrayList<>(); +// if (detailContexts != null) { +// for (Map detailContext : detailContexts) { +// List detailmap = new ArrayList<>(); +// HashMap detailoldMap = new HashMap<>(); +// detailoldMap.put("operator", SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",detailContext.get("dataid")); +// HashMap detailnewMap = new HashMap<>(); +// detailnewMap.put("operator", SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",detailContext.get("dataid")); +// detailmap.add(detailoldMap); +// detailmap.add(detailnewMap); +// WeaTable wea = new WeaTable(); +// wea.getColumns().add(new WeaTableColumn(SystemEnv.getHtmlLabelName(63250,"操作"), "operator", "5%")); +// wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); +// Object tableName = detailContext.get("tableName"); +// Object tablenamelabelid = detailContext.get("tableNameLabelId"); +// if (tablenamelabelid != null) { +// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { +// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); +// } +// } +// Map m = new HashMap<>(); +// if (StringUtils.isNotBlank(tableName.toString())) { +// String temptablename = repeatTableName.get(tableName.toString()); +// if (tableName.toString().equals(temptablename)) { +// continue; +// } +// repeatTableName.put(tableName.toString(), tableName.toString()); +// m.put("tablename", tableName.toString()); +// m.put("detailmap", detailmap); +// m.put("column", wea); +// lists.add(m); +// map.put("detail", lists); +// } else { +// String temptablename = repeatTableName.get(tableName.toString()); +// if (tableName.toString().equals(temptablename)) { +// continue; +// } +// repeatTableName.put(tableName.toString(), tableName.toString()); +// m.put("tablename", ""); +// m.put("detailmap", detailmap); +// m.put("column", wea); +// lists.add(m); +// map.put("detail", lists); +// } +// } +// } +// List details = (List) map.get("detail"); +// if (details != null) { +// int size = details.size(); +// int start = 0; +// while (start < size) { +// start++; +// +// for (int i = 0; i < size; i++) { +// Map detail = details.get(i); +// +// //for (Map detail : details) { +// if (details.size() > size) { +// break; +// } +// for (Map detailContext : detailContexts) { +// Object isDetail = detailContext.get("isDetail"); +// if (isDetail != null) { +// if ("0".equals(isDetail.toString())) { +// continue; +// } +// } else { +// continue; +// } +// String title = ""; +// String dataIndex = ""; +// String oldValue = ""; +// String newValue = ""; +// String tableName = ""; +// String dataId = ""; +// Object fieldDesc = detailContext.get("fieldDesc"); +// if (StringUtils.isNotBlank(fieldDesc.toString())) { +// title = fieldDesc.toString(); +// } +// Object fieldnamelabelid = detailContext.get("fieldNameLabelId"); +// if (fieldnamelabelid != null) { +// if (StringUtils.isNotBlank(fieldnamelabelid.toString())&&StringUtils.isNumeric(fieldnamelabelid.toString())) { +// title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); +// } +// } +// Object fieldName = detailContext.get("fieldName"); +// if (StringUtils.isNotBlank(fieldName.toString())) { +// dataIndex = fieldName.toString(); +// } +// Object oValue = detailContext.get("oldValue"); +// if (StringUtils.isNotBlank(oValue.toString())) { +// oldValue = oValue.toString(); +// } +// Object nValue = detailContext.get("newValue"); +// if (StringUtils.isNotBlank(nValue.toString())) { +// newValue = nValue.toString(); +// } +// Object oldRealValue = detailContext.get("oldRealValue"); +// if (oldRealValue != null) { +// if (StringUtils.isNotBlank(oldRealValue.toString())&&StringUtils.isNumeric(oldRealValue.toString())) { +// oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); +// } +// } +// +// Object newrealvalue = detailContext.get("newRealValue"); +// if (newrealvalue != null) { +// if (StringUtils.isNotBlank(newrealvalue.toString())&&StringUtils.isNumeric(newrealvalue.toString())) { +// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); +// } +// } +// Object tablename = detailContext.get("tableName"); +// if (StringUtils.isNotBlank(tablename.toString())) { +// tableName = tablename.toString(); +// } else { +// tableName = ""; +// } +// Object tablenamelabelid = detailContext.get("tableNameLabelId"); +// if (tablenamelabelid != null) { +// if (tablenamelabelid != null) { +// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { +// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); +// } +// } +// } +// Object dataid = detailContext.get("dataid"); +// if (StringUtils.isNotBlank(dataid.toString())) { +// dataId = dataid.toString(); +// } else { +// dataId = ""; +// } +// Object detailtablename = detail.get("tablename"); +// if (detailtablename != null) { +// if (tableName.equals(detailtablename.toString())) { +// List detailmap = (List) detail.get("detailmap"); +// List newDetails = new ArrayList<>(); +// if (detailmap != null && detailmap.size() > 0) { +// for (Map d : detailmap) { +// Object data_id = d.get("dataid"); +// if (data_id != null) { +// if (dataId.equals(data_id)) { +// Object operator = d.get("operator"); +// if (operator != null) { +// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { +// d.put(dataIndex, oldValue); +// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { +// d.put(dataIndex, newValue); +// } +// } +// }else{ +// if (newDetails.size() > 2) { +// for (Map newDetail : newDetails) { +// if (dataId.equals(newDetail.get("dataid"))) { +// Object operator = d.get("operator"); +// if (operator != null) { +// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { +// d.put(dataIndex, oldValue); +// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { +// d.put(dataIndex, newValue); +// } +// } +// }else{ +// HashMap detailoldMap= new HashMap<>(); +// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",detailContext.get("dataid")); +// detailoldMap.put(dataIndex, oldValue); +// HashMap detailnewMap= new HashMap<>(); +// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",detailContext.get("dataid")); +// detailnewMap.put(dataIndex, newValue); +// newDetails.add(detailoldMap); +// newDetails.add(detailnewMap); +// } +// } +// }else if (newDetails.size() == 0) { +// int count = 0; +// for (Map mapdetail : detailmap) { +// Object dataid_ = mapdetail.get("dataid"); +// if (dataid_ != null && dataid_.equals(dataId)) { +// count++; +// } +// } +// if (count == 0) { +// HashMap detailoldMap= new HashMap<>(); +// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); +// detailoldMap.put("dataid",detailContext.get("dataid")); +// detailoldMap.put(dataIndex, oldValue); +// HashMap detailnewMap= new HashMap<>(); +// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); +// detailnewMap.put("dataid",detailContext.get("dataid")); +// detailnewMap.put(dataIndex, newValue); +// newDetails.add(detailoldMap); +// newDetails.add(detailnewMap); +// } +// } +// } +// } +// } +// } +// if (newDetails.size() > 0) { +// details.addAll(newDetails); +// newDetails.clear(); +// //detailmap = new ArrayList<>(); +// //detail.put("detailmap", detailmap); +// } +// +// WeaTable column = (WeaTable) detail.get("column"); +// if (column != null) { +// List columns = column.getColumns(); +// if (columns != null && columns.size() > 0) { +// Boolean flag = true; +// for (Object object : columns) { +// WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); +// if (weaTableColumn != null) { +// String title1 = weaTableColumn.getTitle(); +// if (title.equals(title1)) { +// flag = false; +// break; +// }else{ +// flag = true; +// } +// } +// } +// if (flag) { +// column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); +// detail.put("column", column); +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// +// public static List getSwitchDatabaseData(List list) { +// if (ElogConsts.ORACLE.equalsIgnoreCase(DatabaseUtil.getDatabaseId()) || ElogConsts.SQLSERVER.equalsIgnoreCase(DatabaseUtil.getDatabaseId())) { +// List arrayList = new ArrayList<>(); +// for (Map map : list) { +// Set en = map.entrySet(); +// Map hashMap = new HashMap<>(); +// for (Map.Entry entry : en) { +// Object key = entry.getKey(); +// Object val = null; +// if ("PARAMS".equalsIgnoreCase(key.toString())||"CUSTOMINFO".equalsIgnoreCase(key.toString()) +// || entry.getValue() instanceof ClobProxyImpl || entry.getValue() instanceof Clob) { +// val = JSONObject.toJSON(entry.getValue()); +// }else{ +// val = entry.getValue(); +// } +// hashMap.put(key.toString().toLowerCase(),val ); +// } +// switchDatabaseField(hashMap); +// arrayList.add(hashMap); +// } +// return arrayList; +// }else{ +// for (Map map : list) { +// switchDatabaseField(map); +// } +// return list; +// } +// } +// +// public static List getSwitchDatabaseAnalysisData(List list,Map keys) { +// if (!ElogConsts.MYSQL.equalsIgnoreCase(DatabaseUtil.getDatabaseId())) { +// List arrayList = new ArrayList<>(); +// +// for (Map map : list) { +// Set en = map.entrySet(); +// Map hashMap = new HashMap<>(); +// for (Map.Entry entry : en) { +// Object key = entry.getKey(); +// Object val = entry.getValue(); +// if (key.toString().equalsIgnoreCase(keys.get(key.toString().toLowerCase()))){ +// key = keys.get(key.toString().toLowerCase()); +// }else { +// key = key.toString().toLowerCase(); +// } +// hashMap.put(key.toString(),val ); +// } +// arrayList.add(hashMap); +// } +// return arrayList; +// } +// return list; +// } +// +// /** +// * 获取多个模块名称 +// * @param modules +// * @return +// */ +// public static Map getModuleNames(List modules) { +// Map hashMap = new HashMap<>(); +// if (modules == null || modules.size() == 0) { +// return hashMap; +// } +// for (String module : modules) { +// String modulenum = ElogSeviceUtils.null2String(moduleMap.get(module), module); +// String modulename = ElogSeviceUtils.isLongValue(modulenum) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulenum), modulenum) : modulenum; +// hashMap.put(module, modulename); +// } +// return hashMap; +// +// } +// +// private static String StringConversionForXSS(String str) { +// if (StringUtils.isBlank(str)) +// return str; +// //判断是否是json串 是json串的话也直接返回 +// if (isJSONString(str)) +// return str; +// // 判断是否为前端标签类型字符串或带< 或 >的字符串,用false方法 /<(\\w+)[^>]*>(.*?<\\/\\1>)?/ +// Pattern pattern = Pattern.compile("[<>]"); +// Matcher matcher = pattern.matcher(str); +// if (matcher.find()) +// return SecurityUtil.encodeForHtml(str, false); +// //都不是则用true方法 +// return SecurityUtil.encodeForHtml(str, true); +// +// } +// +// +// /** +// * 判断是否为json字符串 +// * +// * @param content +// * @return +// */ +// public static boolean isJSONString(String content) { +// if (StringUtils.isEmpty(content)) { +// return false; +// } +// if (!content.startsWith("{") || !content.endsWith("}")) { +// if (!content.startsWith("[") || !content.endsWith("]")) { +// return false; +// } +// } +// try { +// JSONObject.parse(content); +// return true; +// } catch (Exception e) { +// return false; +// } +// } +// public static List getNameModule(String module) { +// if(StringUtils.isBlank(module)){ +// return new ArrayList<>(); +// } +// Map> dataMap = new HashMap<>(); +// moduleMap.forEach( (k,v)->{ +// List list=new ArrayList<>(); +// Integer moduleCode = moduleMap.get(k); +// String htmlLabelName = SystemEnv.getHtmlLabelName(moduleCode.longValue(), ""); +// if(dataMap.containsKey(htmlLabelName)){ +// list= dataMap.get(htmlLabelName); +// list .add(k); +// }else { +// list.add(k); +// } +// dataMap.put(htmlLabelName,list); +// }); +// return Objects.isNull(dataMap.get(module))?Arrays.asList(module):dataMap.get(module); +// } +//} diff --git a/src/com/engine/salary/elog/util/ElogSeviceUtils.java b/src/com/engine/salary/elog/util/ElogSeviceUtils.java new file mode 100644 index 000000000..3ee65acaa --- /dev/null +++ b/src/com/engine/salary/elog/util/ElogSeviceUtils.java @@ -0,0 +1,547 @@ +package com.engine.salary.elog.util; + +import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.enums.FromTerminalType; +import com.weaver.common.component.table.page.Page; +import com.weaver.common.security.util.SecurityUtil; +import com.weaver.framework.log4j2.constant.ApmConstant; +import com.weaver.framework.rpc.context.impl.TenantRpcContext; +import com.weaver.framework.web.constant.EteamsConstant; +import org.apache.commons.lang3.StringUtils; +import org.apache.dubbo.rpc.RpcContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +/** + * @Date: 2022/5/18 23:34 + * @Author: deli.xu + * @Description: elog服务工具类 + **/ +public class ElogSeviceUtils { + + private static final Logger logger = LoggerFactory.getLogger(ElogSeviceUtils.class); + + /*@Autowired + private ComInfoCache comInfoCache; + private static ComInfoCache baseComInfoCache; + + @PostConstruct + public void init() { + baseComInfoCache = comInfoCache; + }*/ + + private static final String TABLE_SPACER = "_"; + private static final String TABLE_SUFFIX = "logs"; + private static final String DETAIL_TABLE_SUFFIX = "_detail"; + public static final String BASE_TABLE = "BASE_ELOG_TABLE"; + + + public static String getTableName(String module, String function) { + return getTableName(module, function, false); + } + + public static String getTableName(String module, String function, boolean isDetail) { + String tablename = module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); +// SecurityUtil.sqlCheck(tablename); + return tablename; + } + + /** + * String 转枚举 + * + * @param c + * @param string + * @param + * @return + */ + public static > T getEnumFromString(Class c, String string) { + if (c != null && string != null) { + try { + return Enum.valueOf(c, string.trim().toUpperCase()); + } catch (IllegalArgumentException ex) { + } + } + return null; + } + + /** + * 获取ip地址 + * + * @param request + * @return + */ + public static String getIp(HttpServletRequest request) { + String ipAddress = request.getHeader("x-forwarded-for"); + String unknown = "unknown"; + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + String benji = "127.0.0.1"; + String bj = "0:0:0:0:0:0:0:1"; + if (benji.equals(ipAddress) || bj.equals(ipAddress)) { + ///根据网卡取本机配置的IP + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + logger.error("UnknownHostException", e); + } + if (inet != null) { + ipAddress = inet.getHostAddress(); + } + } + } + ///对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + int i = 15; + String s = ","; + if (ipAddress != null && ipAddress.length() > i) { + if (ipAddress.indexOf(s) > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + return ipAddress; + } + + /** + * 获取设备信息 + * + * @param request + * @return + */ + public static String getDevice(HttpServletRequest request) { + return request.getHeader("User-Agent"); + } + + /** + * 获取来自终端的信息 + * + * @param context + * @param request + * @return + */ + public static void getFromTerminal(LoggerContext context, HttpServletRequest request) { + String fromTerminal = context.getFromTerminal(); + if (StringUtils.isEmpty(fromTerminal)) { + String device = getDevice(request); + String setFT = ""; + if (StringUtils.isNotEmpty(device)) { + context.setFromTerminal(getFromTerminal(device)); + } + } + } + + + private static String getTraceId(HttpServletRequest request) { + String traceId = request.getHeader("traceId"); + if (StringUtils.isNotBlank(traceId)) { + //System.out.println("traceId:====="+traceId); + return traceId; + } + return ""; + } + + /** + * @param request + * @return localhost:9080/api/fs/demo/updateReport + */ + public static String getRequestUrl(HttpServletRequest request) { + if (Objects.isNull(request) || Objects.isNull(request.getRequestURL())) { + return null; + } + return request.getRequestURL().toString(); + } + + /** + * @param request + * @return /api/fs/demo/updateReport + */ + public static String getRequestUri(HttpServletRequest request) { + return request.getRequestURI(); + } + + /** + * @param request + * @return GET/POST + */ + public static String getRequestMethod(HttpServletRequest request) { + return request.getMethod(); + } + + +// /** +// * 获取当前方法中的日志实体类 +// * @return +// */ +// public static LoggerContext currentElogContext() { +// return ElogThreadLocal.currentLoggerContext(); +// } + + + public static int getIntValue(String v) { + return getIntValue(v, -1); + } + + public static int getIntValue(String v, int def) { + try { + return Integer.parseInt(v); + } catch (Exception var3) { + return def; + } + } + + public static long getLongValue(String v) { + return getLongValue(v, -1l); + } + + public static long getLongValue(String v, long def) { + try { + return Long.parseLong(v); + } catch (Exception var3) { + return def; + } + } + + public static boolean isLongValue(String v) { + try { + Long.parseLong(v); + } catch (Exception e) { + return false; + } + return true; + } + + + + /** + * 获取request请求 + * + * @return + */ + public static HttpServletRequest getRequest() { + return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + } + + /** + * 将对象转换程字符串 + * + * @param obj 目标对象 + * @param def 如果为null时的默认值 + * @return + */ + public static String null2String(Object obj, String def) { + return obj == null ? def : obj.toString(); + } + + public static String null2String(Object obj) { + return null2String(obj, ""); + } + + public static int getIntValue(Object obj, int def) { + try { + return Integer.parseInt(null2String(obj)); + } catch (Exception ex) { + return def; + } + } + + public static Page getPage() { + HttpServletRequest request = getRequest(); + String num = request.getParameter("pageNum"); + String size = request.getParameter("pageSize"); + + Page page = new Page(ElogSeviceUtils.getIntValue(num, 1), ElogSeviceUtils.getIntValue(size, 10)); + return page; + } + +// public static void main(String[] args) { +// //System.out.println(getTableName("select", "from")); +// //DataTypeEnum columnTypeEnum = getEnumFromString(DataTypeEnum.class, "varchar"); +// } + + public static List switchString(List list) { + if (list != null) { + return list.stream().map(m -> { + Set en = m.entrySet(); + for (Map.Entry entry : en) { + if (entry.getValue() != null) { + entry.setValue(String.valueOf(entry.getValue())); + } + } + return m; + }).collect(Collectors.toList()); + } else { + return list; + } + } + + public static List switchComplexString(List list) { + if (list != null) { + return list.stream().map(m -> { + Iterator iterator = m.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry next = iterator.next(); + if (next.getValue() != null) { + if (next.getValue() instanceof Map && "parmas".equals(next.getKey())) { + next.setValue(String.valueOf(next.getValue())); + } + if (next.getValue() instanceof List) { + } else { + next.setValue(String.valueOf(next.getValue())); + } + } + } + return m; + }).collect(Collectors.toList()); + } else { + return list; + } + } + + public static String getTenantKey() { + + String tenantKey = TenantRpcContext.getTenantKey(); + if (StringUtils.isNotBlank(tenantKey)) { + return tenantKey; + } + + return ""; + } + + public static String getEmployeeId() { + + String employeeId = TenantRpcContext.getEmployeeId(); + if (StringUtils.isNotBlank(employeeId)) { + return employeeId; + } + + return ""; + } + +// public static String getUserName() { +// +// String employeeId = getEmployeeId(); +// if (StringUtils.isNotEmpty(employeeId)) { +// SimpleEmployee simpleEmployee = null; +// try { +// HrmCommonUtil hrmCommonUtil = (HrmCommonUtil) ApplicationContextProvider.getBean("hrmCommonUtil"); +// simpleEmployee = hrmCommonUtil.getSimpleEmployee(ElogSeviceUtils.getLongValue(employeeId)); +// } catch (Exception e) { +// logger.error("Exception", e); +// } +// if (simpleEmployee != null) { +// if (StringUtils.isNotBlank(simpleEmployee.getUsername())) { +// return simpleEmployee.getUsername(); +// } +// } +// } +// +// +// return ""; +// } + + /** + * 获取rpc信息(客户端ip和来源设备) + * + * @param context + */ + public static void initRpcInfo(LoggerContext context) { + String device = ""; + String clientIp = ""; + String traceId = ""; + try { + device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); + clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); + traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); + logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); + } catch (Exception e) { + logger.error("Exception", e); + } + if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { + context.setDevice(device); + } + if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { + context.setFromTerminal(getFromTerminal(device)); + } + + if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { + context.setClientIp(clientIp); + } + if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { + context.setBelongMainId(traceId); + } + } + + public static String getFromTerminal(String device) { + String setFT = ""; + if (StringUtils.isNotEmpty(device)) { + if (!device.contains("wxwork") && device.contains("MicroMessenger")) {//来自微信 + setFT = FromTerminalType.MICO_MSG.getCode(); + } else if (device.contains("wxwork") && device.contains("MicroMessenger")) {//企业微信 + setFT = FromTerminalType.WECHAT.getCode(); + } else if (device.contains("iPhone") && device.contains("Mac")) {//来自 Iphone + setFT = FromTerminalType.IOS.getCode(); + } else if (device.contains("Mac OS") && !device.contains("iPhone") && device.contains("weapp-pc")) {//来自 mac_client + setFT = FromTerminalType.MAC_CLIENT.getCode();//mac_client + } else if (!device.contains("wxwork") && device.contains("Mobile")) {//移动端 + setFT = FromTerminalType.H5.getCode(); + } else if (device.contains("Android") && !device.contains("wxwork")) {//来自安卓 包含安卓并且不包含微信 + setFT = FromTerminalType.ANDROID.getCode(); + } else {//pc + setFT = FromTerminalType.PC.getCode(); + } + } + return setFT; + } + + /** + * sql连接条件注入sql + * + * @param condition + * @return + */ + public static String checkConditionSql(String condition) { + if ("AND".equalsIgnoreCase(condition) || + "OR".equalsIgnoreCase(condition) + ) { + return condition; + } + return "AND"; + } + + public static String checkTypeSql(String type) { + if ("LIKE".equalsIgnoreCase(type) || + "IN".equalsIgnoreCase(type) || + "!<>".equalsIgnoreCase(type) || + "!=".equalsIgnoreCase(type) || + "BETWEEN".equalsIgnoreCase(type) || + "IS NULL".equalsIgnoreCase(type) || + "IS NULL".equalsIgnoreCase(type) || + "=".equalsIgnoreCase(type) || + "IS NOT NULL".equalsIgnoreCase(type)) { + return type; + } + return "="; + } + + /** + * sql条件防止注入 + * + * @param value + * @return + */ + public static String checkValSql(String value) { + if (StringUtils.isBlank(value)) { + return ""; + } + Pattern p = Pattern.compile("\\s+"); + Matcher m = p.matcher(value); + String val = m.replaceAll(" "); + String[] keywords = {"master ", "truncate ", "declare ", "alert ", "create ", "drop ", " version", + "show ", "table ", "index ", "insert ", "into ", "from ", + "select ", "delete ", "update ", "mid ", "master ", "char ","union "}; + + String replaceStr = val.replaceAll(" ", ""); + if (replaceStr.contains("1=1") || replaceStr.contains(";")) { + return "-1"; + } + int count = 0; + String filterVal = ""; + for (String keyddlword : keywords) { + if (val.toLowerCase().contains(keyddlword)) { + count++; + if (count == 1) { + filterVal = keyddlword; + } + } + } + + if (count > 2) { + return filterVal; + } + value = SecurityUtil.ecodeForSql(value); + + return value; + } + + /** + * 压缩工具类- + * + * @param str + * @return desc:version 0.0.1 基于jdk自带 GZIP 压缩。最后转成base64。 + * 市面上有其他压缩像jdk 的 deflate 可以设置压缩级别,但是都是主动的,需要改业务方法, + * snappy 压缩适用于大数据压缩。大数据量比较快 hadoop首选,但是压缩后比例比较大。 + * xz 下的 压缩比率大,但是解压比较慢-不提倡,空间换时间了 + * common下的压缩其实和jdk差不多,网上说优于jdk,但是相差不大。 + * weaver 压缩基于jdk + */ + public static String compress(String str) { + if (str == null || str.trim().length() == 0) { + return str; + } + try (ByteArrayOutputStream out = new ByteArrayOutputStream(); + GZIPOutputStream gzip = new GZIPOutputStream(out)) { + gzip.write(str.getBytes()); + gzip.close(); + return Base64.getEncoder().encodeToString(out.toByteArray()); + } catch (Exception e) { + logger.error("压缩失败", e.getMessage()); + return str; + } + + } + + + /** + * 解压缩 + * + * @param str + * @return + */ + public static String uncompress(String str) { + byte[] decode = Base64.getDecoder().decode(str); + if (str == null || str.trim().length() == 0) { + return str; + } + try (ByteArrayOutputStream out = new ByteArrayOutputStream(); + ByteArrayInputStream in = new ByteArrayInputStream(decode)) { + GZIPInputStream ungzip = new GZIPInputStream(in); + byte[] buffer = new byte[2048]; + int n; + while ((n = ungzip.read(buffer)) >= 0) { + out.write(buffer, 0, n); + } + return new String(out.toByteArray()); + } catch (Exception e) { + logger.error("解缩失败:{}", e.getMessage()); + return str; + } + } + + public static Boolean checkIsNumber(Object obj) { + if (obj == null) { + return false; + } + + return StringUtils.isNumeric(obj.toString()); + + } +} diff --git a/src/com/engine/salary/elog/web/LoggerTableController.java b/src/com/engine/salary/elog/web/LoggerTableController.java new file mode 100644 index 000000000..279bffdfe --- /dev/null +++ b/src/com/engine/salary/elog/web/LoggerTableController.java @@ -0,0 +1,178 @@ +package com.engine.salary.elog.web; + +import com.weaver.common.authority.annotation.WeaPermission; +import com.weaver.common.base.entity.result.WeaResult; +import com.weaver.common.batch.entity.BatchDocumentMessage; +import com.weaver.common.component.table.WeaTable; +import com.weaver.common.elog.service.ApplicationContextProvider; +import com.weaver.common.elog.service.ILoggerTableService; +import com.weaver.common.elog.service.impl.LoggerTableService; +import com.weaver.framework.spring.annotation.AopClass; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; +import java.util.Map; + +public class LoggerTableController { + + @Autowired + @Qualifier("loggerTableService") + private LoggerTableService loggerTableService; + + @ApiOperation("获取日志") + @RequestMapping(path = "getLogs", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult getLogs(@RequestBody(required = false) @ApiParam("数据") String data){ + + WeaTable weaTable = loggerTableService.queryLogs(data); + return WeaResult.success(weaTable); + } + + @ApiOperation("获取日志(卡片)") + @RequestMapping(path = "getCardLogs", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult>> carddatas(@RequestBody(required = false) @ApiParam("数据") String data){ + List> list = loggerTableService.queryCardLogList(data); + return WeaResult.success(list); + } + + @ApiOperation("获取单条操作记录的更新明细") + @RequestMapping(path = "getDetailChanges", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult>> getDetailChanges(@PathVariable("module") @ApiParam("服务(模块)名")String module, + @PathVariable("function") @ApiParam("方法名")String function, + @RequestParam("mainid") @ApiParam("主键id") String mainid, + @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod) { + return WeaResult.success(loggerTableService.getDetailChanges(module, function,mainid,detailTransMethod)); + } + + /** + * 获取单条操作记录的更新明细(分页) + * @param module 服务(模块)名 + * @param function 方法名 + * @param mainid 主键id + * @param detailTransMethod 转换方法 + * @param current 页码 + * @param pageSize 每页条数 + * @return WeaTable + */ + @ApiOperation("获取单条操作记录的更新明细(分页)") + @RequestMapping(path = "getDetailChangePages", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult getDetailChangePages(@PathVariable("module") @ApiParam("服务(模块)名")String module, + @PathVariable("function") @ApiParam("方法名")String function, + @RequestParam("mainid") @ApiParam("主键id") String mainid, + @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod, + @RequestParam("page") @ApiParam("页码") String current, + @RequestParam("pageSize") @ApiParam("每页条数") String pageSize) { + return WeaResult.success(loggerTableService.getDetailChangePages(module, function,mainid,detailTransMethod,current,pageSize)); + } + + + @ApiOperation("获取日志列表") + @RequestMapping(path = "datas", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult>> datas(@PathVariable("module") @ApiParam("服务(模块)名")String module, + @PathVariable("function") @ApiParam("方法名")String function, + @Param("pageSize") @ApiParam("每页多少数据")String pageSize, + @Param("current") @ApiParam("当前页")String current, + @ApiParam("查询条件") String condition){ + + if("datasecurity".equals(module) && "auditLog".equals(function)) { + try { + ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); + if(tableService != null){ + List> list = tableService.queryLogList(module, function, current, pageSize, condition); + return WeaResult.success(list); + } + } catch ( Exception e) { + + } + } + List> list = loggerTableService.queryLogList(module, function, current, pageSize, condition); + return WeaResult.success(list); + } + + @ApiOperation("获取日志总数") + @RequestMapping(path = "counts", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult> counts(@PathVariable("module") @ApiParam("服务(模块)名") String module, + @PathVariable("function") @ApiParam("方法名")String function){ + return WeaResult.success(loggerTableService.countLog(module,function), "success"); + } + + @ApiOperation("获取明细日志列表") + @RequestMapping(path = "detaildatas", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult>> detaildatas(@PathVariable("module") @ApiParam("服务(模块)名")String module, + @PathVariable("function") @ApiParam("方法名")String function, + @Param("pageSize") @ApiParam("每页多少数据")String pageSize, + @Param("current") @ApiParam("当前页")String current, + @Param("mainId") @ApiParam("主表id") String mainId, + @ApiParam("查询条件") String condition){ + + if("datasecurity".equals(module) && "auditLog".equals(function)) { + try { + ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); + if(tableService != null){ + List> list = tableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); + return WeaResult.success(list); + } + } catch ( Exception e) { + + } + } + List> list = loggerTableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); + return WeaResult.success(list); + } + + @ApiOperation("获取日志总数") + @RequestMapping(path = "detailcounts", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult> detailcounts(@PathVariable("module") @ApiParam("服务(模块)名") String module, + @PathVariable("function") @ApiParam("方法名")String function, + @Param("mainId") @ApiParam("主表id") String mainId){ + return WeaResult.success(loggerTableService.countDestailLog(module,function, mainId), "success"); + } + + @ApiOperation("根据traceId获取链路列表") + @RequestMapping(path = "queryLogTraceInfo", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult queryLogTraceInfo(@PathVariable("module") @ApiParam("服务(模块)名") String module, + @PathVariable("function") @ApiParam("方法名")String function, + @Param("traceId") @ApiParam("traceId") String traceId, + @Param("currentPage") @ApiParam("currentPage") Integer currentPage, + @Param("pageSize") @ApiParam("pageSize") Integer pageSize, + @Param("traceTransMethod") @ApiParam("traceTransMethod") String traceTransMethod + ){ + + if("datasecurity".equals(module) && "auditLog".equals(function)) { + try { + ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); + if(tableService != null){ + return WeaResult.success(tableService.queryElogTraceInfo(traceId,module,function,currentPage,pageSize,traceTransMethod ), "success"); + } + } catch ( Exception e) { + + } + } + + return WeaResult.success(loggerTableService.queryElogTraceInfo(traceId,module,function,currentPage,pageSize,traceTransMethod ), "success"); + } + + @ApiOperation("日志下载") + @RequestMapping(path = "downloadLog", method = {RequestMethod.GET, RequestMethod.POST}) + @WeaPermission(publicPermission = true) + public WeaResult downloadLog(@RequestBody(required = false) @ApiParam("数据") String data){ + + BatchDocumentMessage message = loggerTableService.downloadLog(data); + return WeaResult.success(message); + } +} From b7435554e87fe5fae4aa133ad6e6a04b4d6fc396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 26 Dec 2023 16:12:44 +0800 Subject: [PATCH 027/169] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/salary/web/LoggerTableController.java | 2 +- .../salary/elog/annotation/ElogField.java | 2 +- .../salary/elog/annotation/OperateType.java | 15 + .../annotation/handle/ElogTableScanner.java | 4 +- .../elog/async/LoggerMessageListener.java | 2 +- .../salary/elog/config/ELogTableChecker.java | 2 +- .../elog/{ => entity}/dto/CancelContext.java | 2 +- .../elog/{ => entity}/dto/DataTypeEnum.java | 2 +- .../elog/{ => entity}/dto/ElogBean.java | 2 +- .../{ => entity}/dto/FilterConditionDto.java | 2 +- .../engine/salary/elog/entity/dto/Like.java | 31 + .../elog/{ => entity}/dto/LoggerContext.java | 2 +- .../{ => entity}/dto/LoggerDetailContext.java | 2 +- .../elog/entity/dto/ReadInfoEntity.java | 40 + .../elog/{ => entity}/dto/RedoContext.java | 2 +- .../elog/{ => entity}/dto/ShowColumsDto.java | 2 +- .../{ => entity}/dto/TableChangeBean.java | 2 +- .../{ => entity}/dto/TableColumnBean.java | 2 +- .../elog/entity/param/ELogGetLogParam.java | 35 + .../elog/service/ILocalElogService.java | 4 +- .../elog/service/ILoggerTableService.java | 11 +- .../elog/service/impl/LocalElogService.java | 4 +- .../elog/service/impl/LoggerTableService.java | 1419 +++------ .../elog/threadlocal/ElogThreadLocal.java | 2 +- .../salary/elog/util/ElogServiceUtils.java | 6 +- .../elog/util/ElogSeviceSwitchUtils.java | 2746 +++++++++-------- .../salary/elog/util/ElogSeviceUtils.java | 121 +- .../engine/salary/elog/util/ElogUtils.java | 2 +- .../engine/salary/elog/util/FieldNameMap.java | 94 + .../salary/elog/util/LoggerTemplate.java | 6 +- .../elog/web/LoggerTableController.java | 331 +- .../mapper/elog/ElogTableCheckerMapper.java | 2 +- .../mapper/elog/ElogTableCheckerMapper.xml | 8 +- .../mapper/elog/LocalElogAopDaoMapper.java | 4 +- .../mapper/elog/LocalElogDaoMapper.java | 215 +- .../salary/mapper/elog/LocalElogDaoMapper.xml | 429 ++- .../impl/SalaryAcctEmployeeServiceImpl.java | 32 +- .../service/impl/SalaryItemServiceImpl.java | 2 +- 38 files changed, 2922 insertions(+), 2669 deletions(-) create mode 100644 src/com/engine/salary/elog/annotation/OperateType.java rename src/com/engine/salary/elog/{ => entity}/dto/CancelContext.java (92%) rename src/com/engine/salary/elog/{ => entity}/dto/DataTypeEnum.java (78%) rename src/com/engine/salary/elog/{ => entity}/dto/ElogBean.java (98%) rename src/com/engine/salary/elog/{ => entity}/dto/FilterConditionDto.java (97%) create mode 100644 src/com/engine/salary/elog/entity/dto/Like.java rename src/com/engine/salary/elog/{ => entity}/dto/LoggerContext.java (99%) rename src/com/engine/salary/elog/{ => entity}/dto/LoggerDetailContext.java (99%) create mode 100644 src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java rename src/com/engine/salary/elog/{ => entity}/dto/RedoContext.java (91%) rename src/com/engine/salary/elog/{ => entity}/dto/ShowColumsDto.java (97%) rename src/com/engine/salary/elog/{ => entity}/dto/TableChangeBean.java (98%) rename src/com/engine/salary/elog/{ => entity}/dto/TableColumnBean.java (98%) create mode 100644 src/com/engine/salary/elog/entity/param/ELogGetLogParam.java create mode 100644 src/com/engine/salary/elog/util/FieldNameMap.java diff --git a/src/com/api/salary/web/LoggerTableController.java b/src/com/api/salary/web/LoggerTableController.java index eb33772ce..ddf2b4f41 100644 --- a/src/com/api/salary/web/LoggerTableController.java +++ b/src/com/api/salary/web/LoggerTableController.java @@ -11,5 +11,5 @@ import javax.ws.rs.Path; * @version 1.0 **/ @Path("/bs/hrmsalary/elog") -public class LoggerTableController { +public class LoggerTableController extends com.engine.salary.elog.web.LoggerTableController{ } diff --git a/src/com/engine/salary/elog/annotation/ElogField.java b/src/com/engine/salary/elog/annotation/ElogField.java index 557a14f3c..a60c1f6a7 100644 --- a/src/com/engine/salary/elog/annotation/ElogField.java +++ b/src/com/engine/salary/elog/annotation/ElogField.java @@ -1,6 +1,6 @@ package com.engine.salary.elog.annotation; -import com.engine.salary.elog.dto.DataTypeEnum; +import com.engine.salary.elog.entity.dto.DataTypeEnum; import java.lang.annotation.*; diff --git a/src/com/engine/salary/elog/annotation/OperateType.java b/src/com/engine/salary/elog/annotation/OperateType.java new file mode 100644 index 000000000..7dbb84303 --- /dev/null +++ b/src/com/engine/salary/elog/annotation/OperateType.java @@ -0,0 +1,15 @@ +package com.engine.salary.elog.annotation; + +public class OperateType { + public static final String view = "view"; + public static final String viewSpan = "查看"; + + public static final String add = "add"; + public static final String addSpan = "新增"; + + public static final String update = "update"; + public static final String updateSpan = "更新"; + + public static final String delete = "delete"; + public static final String deleteSpan = "删除"; +} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java index 4e75cf8bb..a024d3478 100644 --- a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java +++ b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java @@ -2,8 +2,8 @@ package com.engine.salary.elog.annotation.handle; import com.engine.salary.elog.annotation.ElogField; import com.engine.salary.elog.annotation.ElogTable; -import com.engine.salary.elog.dto.DataTypeEnum; -import com.engine.salary.elog.dto.TableColumnBean; +import com.engine.salary.elog.entity.dto.DataTypeEnum; +import com.engine.salary.elog.entity.dto.TableColumnBean; import com.engine.salary.elog.util.ElogUtils; import lombok.extern.slf4j.Slf4j; import org.reflections.Reflections; diff --git a/src/com/engine/salary/elog/async/LoggerMessageListener.java b/src/com/engine/salary/elog/async/LoggerMessageListener.java index 6687a0603..2bf5dc957 100644 --- a/src/com/engine/salary/elog/async/LoggerMessageListener.java +++ b/src/com/engine/salary/elog/async/LoggerMessageListener.java @@ -1,7 +1,7 @@ package com.engine.salary.elog.async; import com.engine.salary.elog.config.ELogTableChecker; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.service.impl.LocalElogService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/com/engine/salary/elog/config/ELogTableChecker.java b/src/com/engine/salary/elog/config/ELogTableChecker.java index acbb1dc89..272da15a7 100644 --- a/src/com/engine/salary/elog/config/ELogTableChecker.java +++ b/src/com/engine/salary/elog/config/ELogTableChecker.java @@ -1,6 +1,6 @@ package com.engine.salary.elog.config; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.mapper.elog.ElogTableCheckerMapper; import com.engine.salary.util.db.MapperProxyFactory; import dm.jdbc.util.IdGenerator; diff --git a/src/com/engine/salary/elog/dto/CancelContext.java b/src/com/engine/salary/elog/entity/dto/CancelContext.java similarity index 92% rename from src/com/engine/salary/elog/dto/CancelContext.java rename to src/com/engine/salary/elog/entity/dto/CancelContext.java index 1c9771b69..d7ecccb7b 100644 --- a/src/com/engine/salary/elog/dto/CancelContext.java +++ b/src/com/engine/salary/elog/entity/dto/CancelContext.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/com/engine/salary/elog/dto/DataTypeEnum.java b/src/com/engine/salary/elog/entity/dto/DataTypeEnum.java similarity index 78% rename from src/com/engine/salary/elog/dto/DataTypeEnum.java rename to src/com/engine/salary/elog/entity/dto/DataTypeEnum.java index 4b46cdd33..b31b8e490 100644 --- a/src/com/engine/salary/elog/dto/DataTypeEnum.java +++ b/src/com/engine/salary/elog/entity/dto/DataTypeEnum.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; public enum DataTypeEnum { VARCHAR, diff --git a/src/com/engine/salary/elog/dto/ElogBean.java b/src/com/engine/salary/elog/entity/dto/ElogBean.java similarity index 98% rename from src/com/engine/salary/elog/dto/ElogBean.java rename to src/com/engine/salary/elog/entity/dto/ElogBean.java index d4239b9a7..b79b0f66e 100644 --- a/src/com/engine/salary/elog/dto/ElogBean.java +++ b/src/com/engine/salary/elog/entity/dto/ElogBean.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import java.io.Serializable; import java.util.ArrayList; diff --git a/src/com/engine/salary/elog/dto/FilterConditionDto.java b/src/com/engine/salary/elog/entity/dto/FilterConditionDto.java similarity index 97% rename from src/com/engine/salary/elog/dto/FilterConditionDto.java rename to src/com/engine/salary/elog/entity/dto/FilterConditionDto.java index d276b1b27..28cb451e5 100644 --- a/src/com/engine/salary/elog/dto/FilterConditionDto.java +++ b/src/com/engine/salary/elog/entity/dto/FilterConditionDto.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import java.io.Serializable; diff --git a/src/com/engine/salary/elog/entity/dto/Like.java b/src/com/engine/salary/elog/entity/dto/Like.java new file mode 100644 index 000000000..2caead76c --- /dev/null +++ b/src/com/engine/salary/elog/entity/dto/Like.java @@ -0,0 +1,31 @@ +package com.engine.salary.elog.entity.dto; + +import java.io.Serializable; + +/** + * @date: 2021/6/1 17:50 + * @author: deli.xu + * @description: + */ +public class Like implements Serializable { + private static final long serialVersionUID = -3399942468474767851L; + private String prefix; + private String suffix; + + + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } +} diff --git a/src/com/engine/salary/elog/dto/LoggerContext.java b/src/com/engine/salary/elog/entity/dto/LoggerContext.java similarity index 99% rename from src/com/engine/salary/elog/dto/LoggerContext.java rename to src/com/engine/salary/elog/entity/dto/LoggerContext.java index 5b00005f0..f9be10c8f 100644 --- a/src/com/engine/salary/elog/dto/LoggerContext.java +++ b/src/com/engine/salary/elog/entity/dto/LoggerContext.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import com.alibaba.fastjson.annotation.JSONField; import com.engine.salary.elog.annotation.ElogField; diff --git a/src/com/engine/salary/elog/dto/LoggerDetailContext.java b/src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java similarity index 99% rename from src/com/engine/salary/elog/dto/LoggerDetailContext.java rename to src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java index 7bb64e1ff..ef4a66503 100644 --- a/src/com/engine/salary/elog/dto/LoggerDetailContext.java +++ b/src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import com.engine.salary.elog.annotation.ElogDetailTable; import com.engine.salary.elog.annotation.ElogField; diff --git a/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java b/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java new file mode 100644 index 000000000..3f7a364e4 --- /dev/null +++ b/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java @@ -0,0 +1,40 @@ +package com.engine.salary.elog.entity.dto; + +import java.io.Serializable; +import java.util.Date; + +/** + * @date: 2022/5/14 13:52 + * @author: deli.xu + * @description: + */ + +public class ReadInfoEntity implements Serializable { + private static final long serialVersionUID = -8890667941835568289L; + private Long employeeId; + private Date date; + + public Long getEmployeeId() { + return this.employeeId; + } + + public void setEmployeeId(Long employeeId) { + this.employeeId = employeeId; + } + + public Date getDate() { + return this.date; + } + + public void setDate(Date date) { + this.date = date; + } + + public ReadInfoEntity() { + } + + public ReadInfoEntity(Long employeeId, Date date) { + this.employeeId = employeeId; + this.date = date; + } +} \ No newline at end of file diff --git a/src/com/engine/salary/elog/dto/RedoContext.java b/src/com/engine/salary/elog/entity/dto/RedoContext.java similarity index 91% rename from src/com/engine/salary/elog/dto/RedoContext.java rename to src/com/engine/salary/elog/entity/dto/RedoContext.java index 749643aed..3ec87adb3 100644 --- a/src/com/engine/salary/elog/dto/RedoContext.java +++ b/src/com/engine/salary/elog/entity/dto/RedoContext.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/com/engine/salary/elog/dto/ShowColumsDto.java b/src/com/engine/salary/elog/entity/dto/ShowColumsDto.java similarity index 97% rename from src/com/engine/salary/elog/dto/ShowColumsDto.java rename to src/com/engine/salary/elog/entity/dto/ShowColumsDto.java index 828474be5..b5f47e084 100644 --- a/src/com/engine/salary/elog/dto/ShowColumsDto.java +++ b/src/com/engine/salary/elog/entity/dto/ShowColumsDto.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import java.io.Serializable; diff --git a/src/com/engine/salary/elog/dto/TableChangeBean.java b/src/com/engine/salary/elog/entity/dto/TableChangeBean.java similarity index 98% rename from src/com/engine/salary/elog/dto/TableChangeBean.java rename to src/com/engine/salary/elog/entity/dto/TableChangeBean.java index 463d9dd73..445bd8510 100644 --- a/src/com/engine/salary/elog/dto/TableChangeBean.java +++ b/src/com/engine/salary/elog/entity/dto/TableChangeBean.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/com/engine/salary/elog/dto/TableColumnBean.java b/src/com/engine/salary/elog/entity/dto/TableColumnBean.java similarity index 98% rename from src/com/engine/salary/elog/dto/TableColumnBean.java rename to src/com/engine/salary/elog/entity/dto/TableColumnBean.java index cf8609c61..a6fdf6148 100644 --- a/src/com/engine/salary/elog/dto/TableColumnBean.java +++ b/src/com/engine/salary/elog/entity/dto/TableColumnBean.java @@ -1,4 +1,4 @@ -package com.engine.salary.elog.dto; +package com.engine.salary.elog.entity.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java b/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java new file mode 100644 index 000000000..77132c908 --- /dev/null +++ b/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java @@ -0,0 +1,35 @@ +package com.engine.salary.elog.entity.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ELogGetLogParam { + /** + * 服务(模块)名 + */ + String module; + /** + * 方法名 + */ + String function; + /** + * 查询条件 + */ + String condition; + /** + * 每页多少数据 + */ + String pageSize; + /** + * ' + * 当前页 + */ + String current; + +} diff --git a/src/com/engine/salary/elog/service/ILocalElogService.java b/src/com/engine/salary/elog/service/ILocalElogService.java index 9d721b69c..af12b54c8 100644 --- a/src/com/engine/salary/elog/service/ILocalElogService.java +++ b/src/com/engine/salary/elog/service/ILocalElogService.java @@ -1,7 +1,7 @@ package com.engine.salary.elog.service; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerDetailContext; public interface ILocalElogService { diff --git a/src/com/engine/salary/elog/service/ILoggerTableService.java b/src/com/engine/salary/elog/service/ILoggerTableService.java index 00c5b6327..e59fde3fb 100644 --- a/src/com/engine/salary/elog/service/ILoggerTableService.java +++ b/src/com/engine/salary/elog/service/ILoggerTableService.java @@ -1,14 +1,15 @@ package com.engine.salary.elog.service; -import com.weaver.common.batch.entity.BatchDocumentMessage; -import com.weaver.common.component.table.WeaTable; +import com.cloudstore.eccom.pc.table.WeaTable; +import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.util.page.PageInfo; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; public interface ILoggerTableService { - WeaTable queryLogs(String data); + PageInfo queryLogs(String data); WeaTable queryLogsPapi(String data, HttpServletRequest request); @@ -16,7 +17,7 @@ public interface ILoggerTableService { List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request); - List queryLogList(String module, String function, String current, String pageSize, String condition); + List queryLogList(ELogGetLogParam param); List queryCardLogList(String data); @@ -32,7 +33,7 @@ public interface ILoggerTableService { List queryLogInfoByCustom(String module, String function, String field, String value); - BatchDocumentMessage downloadLog(String data); +// BatchDocumentMessage downloadLog(String data); WeaTable getDetailChangePages(String module, String function, String mainid, String detailTransMethod, String current, String pageSize); diff --git a/src/com/engine/salary/elog/service/impl/LocalElogService.java b/src/com/engine/salary/elog/service/impl/LocalElogService.java index d12163a29..3900f4727 100644 --- a/src/com/engine/salary/elog/service/impl/LocalElogService.java +++ b/src/com/engine/salary/elog/service/impl/LocalElogService.java @@ -2,8 +2,8 @@ package com.engine.salary.elog.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerDetailContext; import com.engine.salary.elog.enums.ElogConsts; import com.engine.salary.elog.service.ILocalElogService; import com.engine.salary.elog.util.ElogUtils; diff --git a/src/com/engine/salary/elog/service/impl/LoggerTableService.java b/src/com/engine/salary/elog/service/impl/LoggerTableService.java index bb5dfc812..f81a8c0ab 100644 --- a/src/com/engine/salary/elog/service/impl/LoggerTableService.java +++ b/src/com/engine/salary/elog/service/impl/LoggerTableService.java @@ -4,113 +4,75 @@ import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.ElogBean; -import com.engine.salary.elog.dto.FilterConditionDto; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.ShowColumsDto; +import com.cloudstore.eccom.pc.table.WeaTable; +import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.engine.core.impl.Service; +import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.annotation.OperateType; +import com.engine.salary.elog.entity.dto.ElogBean; +import com.engine.salary.elog.entity.dto.FilterConditionDto; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.ShowColumsDto; +import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.elog.enums.ElogConsts; import com.engine.salary.elog.service.ILoggerTableService; import com.engine.salary.elog.util.ElogServiceUtils; +import com.engine.salary.elog.util.ElogSeviceSwitchUtils; import com.engine.salary.elog.util.ElogSeviceUtils; +import com.engine.salary.elog.util.FieldNameMap; import com.engine.salary.mapper.elog.LocalElogDaoMapper; -import com.weaver.common.batch.consts.FileType; -import com.weaver.common.batch.consts.HandlerFileMethod; -import com.weaver.common.batch.entity.BatchDocumentMessage; -import com.weaver.common.batch.entity.BatchFile; -import com.weaver.common.batch.entity.ExcelSheet; -import com.weaver.common.batch.sender.BatchExportSender; -import com.weaver.common.cache.tablecache.impl.ComInfoCache; -import com.weaver.common.component.table.WeaTable; -import com.weaver.common.component.table.column.WeaTableColumn; -import com.weaver.common.component.table.page.Page; -import com.weaver.common.distribution.genid.IdGenerator; -import com.weaver.common.elog.annotation.HandleElog; -import com.weaver.common.elog.annotation.OperateType; -import com.weaver.common.elog.annotation.handle.ElogMethodHandler; -import com.weaver.common.elog.annotation.handle.MethodHandler; -import com.weaver.common.elog.consts.ElogEsTableConsts; -import com.weaver.common.elog.dao.QueryCommonTabeMapper; -import com.weaver.common.elog.dto.*; -import com.weaver.common.elog.enums.ElogConsts; -import com.weaver.common.elog.service.ApplicationContextProvider; -import com.weaver.common.elog.service.ElogHandleService; -import com.weaver.common.elog.util.*; -import com.weaver.common.hrm.cache.HrmAvatarComInfo; -import com.weaver.common.hrm.cache.HrmEmployeeComInfo; -import com.weaver.common.hrm.domain.organization.HrmConditionResultType; -import com.weaver.common.hrm.domain.organization.HrmOrgEmpCondition; -import com.weaver.common.hrm.entity.employee.HrmEmployee; -import com.weaver.common.hrm.service.HrmCommonEmployeeService; -import com.weaver.common.hrm.util.HrmCommonUtil; -import com.weaver.common.hrm.util.HrmI18nUtil; -import com.weaver.common.i18n.label.SystemEnv; -import com.weaver.common.i18n.tool.config.date.format.DateRangeTransformer; -import com.weaver.common.i18n.tool.util.I18nUtil; -import com.weaver.common.mybatis.baseConfig.WeaDatabaseIdProvider; -import com.weaver.common.mybatis.util.DatabaseUtil; -import com.weaver.common.security.util.SecurityUtil; -import com.weaver.framework.rpc.context.impl.TenantRpcContext; -import com.weaver.teams.security.context.UserContext; -import com.weaver.teams.security.user.User; -import org.apache.commons.collections.CollectionUtils; +import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.MapperProxyFactory; +import com.engine.salary.util.page.Column; +import com.engine.salary.util.page.PageInfo; +import com.engine.salary.util.page.SalaryPageUtil; +import com.github.pagehelper.Page; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.elasticsearch.action.admin.indices.get.GetIndexRequest; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.RequestOptions; -import org.elasticsearch.client.RestHighLevelClient; -import org.elasticsearch.client.indices.CreateIndexRequest; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xcontent.XContentType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.annotation.AnnotationUtils; +import weaver.conn.RecordSet; +import weaver.general.Util; -import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import java.io.IOException; import java.util.*; import java.util.stream.Collectors; -import static com.weaver.common.elog.consts.LogConstants.MAPPING_TEMPLATE; - -public class LoggerTableService implements ILoggerTableService { +public class LoggerTableService extends Service implements ILoggerTableService { private static final Logger logger = LoggerFactory.getLogger(LoggerTableService.class); - @Autowired - private LocalElogDaoMapper localElogDaoMapper; + private LocalElogDaoMapper getLocalElogDaoMapper() { + return MapperProxyFactory.getProxy(LocalElogDaoMapper.class); + } - @Autowired - private ComInfoCache comInfoCache; - - @Autowired - private HrmCommonUtil hrmCommonUtil; - - @Autowired - private QueryCommonTabeMapper queryCommonTabeMapper; - - @Autowired - private RestHighLevelClient restHighLevelClient; - - @Resource - private BatchExportSender batchExportSender; - - - @Resource - private DateRangeTransformer dateRangeTransformer; - - @Autowired - private HrmCommonEmployeeService hrmCommonEmployeeService; - - - private static final String databaseId = DatabaseUtil.getDatabaseId(); + // +// private ComInfoCache comInfoCache; +// +// +// private HrmCommonUtil hrmCommonUtil; +// +// +// private QueryCommonTabeMapper queryCommonTabeMapper; +// +// +// private RestHighLevelClient restHighLevelClient; +// +// @Resource +// private BatchExportSender batchExportSender; +// +// +// @Resource +// private DateRangeTransformer dateRangeTransformer; +// +// +// private HrmCommonEmployeeService hrmCommonEmployeeService; +// +// + private final String databaseId = new RecordSet().getDBType(); @Override - public WeaTable queryLogs(String data) { + public PageInfo queryLogs(String data) { //解析数据 ElogBean elogBean = ElogServiceUtils.getElogBean(data); // columIndex统一转为小写 @@ -143,44 +105,14 @@ public class LoggerTableService implements ILoggerTableService { //获取主表 String tableName = ElogSeviceUtils.getTableName(module, function); //获取weaTable - WeaTable weaTable = new WeaTable(); - List recordColumns = getWeaColumns(data, showColums, module, function, weaTable); + List columns = getWeaColumns(data, showColums, module, function); //获取条件sql - String searchMapsql = getSearchMapSql(searchMap, module, function,elogBean.getShowColumns()); + String searchMapsql = getSearchMapSql(searchMap, module, function, elogBean.getShowColumns()); String sb = getQueryCondition(filterConditionDtos); sb = searchMapsql.concat(sb); - //处理数据权限 - Map res = getCustomAuthSql(transMethod, authParamsJson, "auth"); - if (!res.isEmpty()) { - Object flag = res.get("flag"); - if (flag != null && flag instanceof Boolean) { - boolean f = (boolean) flag; - if (!f) { - weaTable.setCustomParameters(res); - return weaTable; - } - } - } String customSql = getCustomSql(transMethod, sb, "before"); - //处理数据权限(前缀) - Map hashMap = addPermissionHandler(transMethod); - logger.info("查询条件sql:{}", customSql); - //处理数据权限(对接权限sql) - PermissionParams permissionParams = getPermissionParams(hashMap); - String permissionId = permissionParams.getPermissionId(); - String permissionType = permissionParams.getPermissionType(); - String mainDataTable = permissionParams.getMainDataTable(); - String mainDataTableAlias = permissionParams.getMainDataTableAlias(); - String primaryKey = permissionParams.getPrimaryKey(); - String permissionTargetId = permissionParams.getPermissionTargetId(); - String permissionConfigSourceId = permissionParams.getPermissionConfigSourceId(); - - - // 设置操作菜单 - //weaTable.getOperates().add(new WeaTableOperate("查看", 1)); // 分页 - //Page page = ElogSeviceUtils.getPage(); Page page = null; if (StringUtils.isEmpty(downloadSize)) { page = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); @@ -189,49 +121,9 @@ public class LoggerTableService implements ILoggerTableService { page = new Page(1, pagesize); } - String columns = getshowColumsStr(showColums); + List list = getLocalElogDaoMapper().queryElogList(page, context, null, tableName, customSql, "*"); + Map countMap = getLocalElogDaoMapper().elogCount(context, tableName, customSql); - Map countMap = new HashMap<>(); - Long countNum = 0l; - - //最终查询前 - List interceptChain = ApplicationContextProvider.getServiceBean(ElogHandleService.class) - .stream().filter(Objects::nonNull) - .filter(x -> x instanceof ElogHandleService) - .map(x -> (ElogHandleService) x) - .collect(Collectors.toList()); - - if (CollectionUtils.isNotEmpty(interceptChain)) { - for (ElogHandleService handleService : interceptChain) { - Class itemClass = handleService.getClass(); - HandleElog annotation = itemClass.getAnnotation(HandleElog.class); - if(Objects.isNull(annotation)){ - annotation = AnnotationUtils.findAnnotation(itemClass, HandleElog.class); - } - if(Objects.nonNull(annotation)){ - if(module.equalsIgnoreCase(annotation.modulename())){ - String employeeId = getUserId(); - long id = StringUtils.isEmpty(employeeId) ? -1 : Long.parseLong(employeeId); - ElogHandleDto elogHandleDto = new ElogHandleDto(module,function,context.getTenant_key(),id,customSql,filterConditionDtos); - boolean preQuery = handleService.preQuery(elogHandleDto); - customSql = elogHandleDto.getSql(); - } - } - } - } - - // 查询 - List list = new ArrayList<>(); - if (StringUtils.isNotEmpty(permissionId) || StringUtils.isNotEmpty(permissionType) || StringUtils.isNotEmpty(mainDataTableAlias) || StringUtils.isNotEmpty(mainDataTable) || StringUtils.isNotEmpty(permissionTargetId) || StringUtils.isNotEmpty(permissionConfigSourceId)) { - list = localElogDaoMapper.queryElogList(page, context, null, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId,"*"); - countNum = localElogDaoMapper.elogCountOnlyNum(context, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId); - } else { - list = localElogDaoMapper.queryElogList(page, context, null, tableName, customSql,"*"); - countMap = localElogDaoMapper.elogCount(context, tableName, customSql); - - } - - String databaseId = WeaDatabaseIdProvider.databaseId; if ("st".equals(databaseId)) { //st数据库 date类型特殊处理 list.forEach(map -> { @@ -243,49 +135,6 @@ public class LoggerTableService implements ILoggerTableService { }); } - - String propertiesValue = module + "." + function + ".es"; - String value = ApplicationContextProvider.getPropertiesValue(propertiesValue); - logger.info("propertiesValue:{},value:{}", propertiesValue,value); - if (StringUtils.isNotEmpty(value) && !value.equalsIgnoreCase("${" + propertiesValue + "}")) { - //if判断通过说明走了自定义ES存储es - String[] fields = getESfields(value); - if (fields != null && fields.length > 0) { - for (Map map : list) { - String logDate = map.get("log_date").toString(); - logger.info("logDate:{}" ,logDate); - String esDate = logDate.substring(0, 10); - //先判断表存不存在,不存在创建 - if (checkEsTableIsExist(esDate)) { - // 根据id通过es查询大字段(params)然后赋值 - SearchRequest searchRequest = new SearchRequest(getElogESTableName(true,esDate)); - SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); - // 只获取指定字段 - searchSourceBuilder.fetchSource(fields, null); - // 根据id匹配 - searchSourceBuilder.query(QueryBuilders.termQuery("id",map.get("id").toString())); - searchRequest.source(searchSourceBuilder); - - SearchResponse searchResponse = null; - try { - searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT); - } catch (IOException e) { - logger.info("查询ES出现异常:{}",e.getMessage()); - } - SearchHits hits = searchResponse.getHits(); - SearchHit[] searchHits = hits.getHits(); - if (searchHits != null && searchHits.length > 0) { - // 根据id匹配唯一,所以直接取第一个 - Map sourceAsMap = searchHits[0].getSourceAsMap(); - if (Objects.nonNull(sourceAsMap) && sourceAsMap.size() > 0) { - logger.info("ES查出来的sourceAsMap:{}",JSON.toJSONString(sourceAsMap)); - map.putAll(sourceAsMap); - } - } - } - } - } - } //处理转换其他数据库类型值 list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); //处理用户信息Data @@ -293,45 +142,11 @@ public class LoggerTableService implements ILoggerTableService { // 大小写转换 ElogSeviceSwitchUtils.changKey2Lower(list); - transSwitchDataInfo(list,recordColumns); - //转换多语言 - //ElogSeviceSwitchUtils.switchValues(list, recordColumns, true); - //ElogSeviceSwitchUtils.switchChangeValues(list); - logger.info("开始执行转换方法"); - if (Util.isNotEmpty(transMethod)) { - logger.info("转换方法:{}", transMethod); - // 消费到消息,通过MethodHandler调用对应的方法 - MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(transMethod); - if (methodHandler != null) { - try { - logger.info("执行方法前的数据:{}", JSON.toJSONString(list)); - methodHandler.execute(list); - logger.info("执行方法后的数据:{}", JSON.toJSONString(list)); - } catch (Exception e) { - logger.error("转换出错:" + e); - } - } - - } - page.setTotal(ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); - page.setRecords(switchString(list)); - if (!countNum.equals(0l)) { - //countNum不为0 则覆盖 - page.setTotal(countNum); - - } - // 处理后的数据 - // weaTable.setDisplayData(DataTransform.userProcessData(page.getRecords())); - - // 处理操作菜单权限 - //weaTable.setOperatesPermission(DataTransform.userOperatesPermission(page.getRecords())); - - // 处理选择框权限 - //weaTable.setCheckBoxPermission(DataTransform.userCheckBoxPermission(page.getRecords())); - // 存放结果集 - weaTable.setPage(page); - return weaTable; + PageInfo pageInfo = SalaryPageUtil.buildPage(page.getPageNum(), page.getPageSize(), switchString(list)); + pageInfo.setTotal(ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); + pageInfo.setColumns(columns); + return pageInfo; } @Override @@ -350,13 +165,13 @@ public class LoggerTableService implements ILoggerTableService { sb.append("id,uuid,targetid,params,operatetype,link_id,link_type,"); for (ShowColumsDto showColum : showColums) { String columIndex = showColum.getColumIndex(); - if ("date".equalsIgnoreCase(columIndex) || "createdate".equalsIgnoreCase(columIndex)){ + if ("date".equalsIgnoreCase(columIndex) || "createdate".equalsIgnoreCase(columIndex)) { columIndex = "log_date"; - }else if ("operator".equalsIgnoreCase(columIndex)){ + } else if ("operator".equalsIgnoreCase(columIndex)) { columIndex = "log_operator"; - }else if ("modulenamespan".equalsIgnoreCase(columIndex)){ + } else if ("modulenamespan".equalsIgnoreCase(columIndex)) { columIndex = "modulename"; - } else if ("functionnameespan".equalsIgnoreCase(columIndex)){ + } else if ("functionnameespan".equalsIgnoreCase(columIndex)) { columIndex = "functionname"; } else if ("avatar".equals(columIndex)) { continue; @@ -367,63 +182,48 @@ public class LoggerTableService implements ILoggerTableService { return substring; } - private PermissionParams getPermissionParams(Map hashMap) { - PermissionParams permissionParams = new PermissionParams(); - String permissionId = getPermissionStr(hashMap, "permissionId"); - String permissionType = getPermissionStr(hashMap, "permissionType"); - String mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); - String mainDataTable = getPermissionStr(hashMap, "mainDataTable"); - String primaryKey = getPermissionStr(hashMap, "primaryKey"); - String permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); - String permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); +// private PermissionParams getPermissionParams(Map hashMap) { +// PermissionParams permissionParams = new PermissionParams(); +// String permissionId = getPermissionStr(hashMap, "permissionId"); +// String permissionType = getPermissionStr(hashMap, "permissionType"); +// String mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); +// String mainDataTable = getPermissionStr(hashMap, "mainDataTable"); +// String primaryKey = getPermissionStr(hashMap, "primaryKey"); +// String permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); +// String permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); +// +// permissionParams.setPermissionId(permissionId); +// permissionParams.setPermissionType(permissionType); +// permissionParams.setMainDataTableAlias(mainDataTableAlias); +// permissionParams.setMainDataTable(mainDataTable); +// permissionParams.setPrimaryKey(primaryKey); +// permissionParams.setPermissionTargetId(permissionTargetId); +// permissionParams.setPermissionConfigSourceId(permissionConfigSourceId); +// +// return permissionParams; +// +// } - permissionParams.setPermissionId(permissionId); - permissionParams.setPermissionType(permissionType); - permissionParams.setMainDataTableAlias(mainDataTableAlias); - permissionParams.setMainDataTable(mainDataTable); - permissionParams.setPrimaryKey(primaryKey); - permissionParams.setPermissionTargetId(permissionTargetId); - permissionParams.setPermissionConfigSourceId(permissionConfigSourceId); - - return permissionParams; - - } - - private List getWeaColumns(String data, List showColums, String module, String function, WeaTable weaTable) { - // 每一个Table的唯一标识 - weaTable.setPageUid(IdGenerator.generate() + ""); - // 表头 - //weaTable.getColumns().add(new WeaTableColumn("id","id", true)); - List recordColumns = new ArrayList<>(); + private List getWeaColumns(String data, List showColums, String module, String function) { + List columns = new ArrayList<>(); if (showColums != null && showColums.size() > 0) { for (ShowColumsDto showColum : showColums) { - if (showColum.isTransfLanguage()) { - recordColumns.add(showColum.getColumIndex()); - } if (StringUtils.isNotBlank(showColum.getAliasColumName())) { - WeaTableColumn weaTableColumn = new WeaTableColumn(showColum.getAliasColumName(), showColum.getColumIndex(), getColumnsWidth(showColum), "", showColum.isHide()); - if (showColum.isNewLine()) { - weaTableColumn.setNewLine(showColum.isNewLine()); - } - weaTable.getColumns().add(weaTableColumn); + columns.add(new Column(showColum.getAliasColumName(), showColum.getColumIndex(), showColum.getColumIndex())); } else if (StringUtils.isNotBlank(showColum.getColumName())) { - WeaTableColumn weaTableColumn = new WeaTableColumn(FieldNameMap.getMainFieldNameMap(data, function, showColum.getColumName()), showColum.getColumIndex(), getColumnsWidth(showColum), "", showColum.isHide()); - if (showColum.isNewLine()) { - weaTableColumn.setNewLine(showColum.isNewLine()); - } - weaTable.getColumns().add(weaTableColumn); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(data, function, showColum.getColumName()), showColum.getColumIndex(), showColum.getColumIndex())); } } } else { - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "moduleName"), "modulenamespan", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "functionName"), "functionnamespan", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "clientIp"), "clientip", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "operateTypeName"), "operatetypename", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "targetName"), "targetname", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "date"), "createdate", "5%")); - weaTable.getColumns().add(new WeaTableColumn(FieldNameMap.getMainFieldNameMap(module, function, "operatorName"), "operatorname", "5%")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "moduleName"), "modulenamespan", "modulenamespan")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "functionName"), "functionnamespan", "functionnamespan")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "clientIp"), "clientip", "clientip")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "operateTypeName"), "operatetypename", "operatetypename")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "targetName"), "targetname", "targetname")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "date"), "createdate", "createdate")); + columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "operatorName"), "operatorname", "operatorname")); } - return recordColumns; + return columns; } private String getTargetid(List filterConditionDtos) { @@ -447,229 +247,116 @@ public class LoggerTableService implements ILoggerTableService { return ""; } - /** - * 处理数据权限 - * - * @param transMethod - * @return - */ - private Map addPermissionHandler(String transMethod) { - Map hashMap = new HashMap(); - hashMap.put("permissionId", ""); - hashMap.put("permissionType", ""); - hashMap.put("mainDataTableAlias", ""); - hashMap.put("mainDataTable", ""); - hashMap.put("primaryKey", ""); - hashMap.put("permissionTargetId", ""); - hashMap.put("permissionConfigSourceId", ""); - - MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler("permission" + transMethod); - if (beforeMethodHandler != null) { - try { - Object execute = beforeMethodHandler.execute(hashMap); - if (execute != null) { - if (execute instanceof Map) { - return (Map) execute; - } - } - } catch (Exception e) { - logger.error("转换出错:" + e); - throw new RuntimeException(e.getMessage()); - } - } - return hashMap; - } - - private Map getCustomAuthSql(String transMethod, Map params, String prefix) { - MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); - Map hashMap = new HashMap<>(); - if (beforeMethodHandler != null) { - try { - hashMap.put("flag", true); - hashMap.put("msg", ""); - hashMap.putAll(params); - Object execute = beforeMethodHandler.execute(hashMap); - if (execute != null && execute instanceof Map) { - Map map = (Map) execute; - return map; - } - } catch (Exception e) { - logger.error("转换出错:" + e); - throw new RuntimeException(e.getMessage()); - } - } - return hashMap; - } +// private Map getCustomAuthSql(String transMethod, Map params, String prefix) { +// MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); +// Map hashMap = new HashMap<>(); +// if (beforeMethodHandler != null) { +// try { +// hashMap.put("flag", true); +// hashMap.put("msg", ""); +// hashMap.putAll(params); +// Object execute = beforeMethodHandler.execute(hashMap); +// if (execute != null && execute instanceof Map) { +// Map map = (Map) execute; +// return map; +// } +// } catch (Exception e) { +// logger.error("转换出错:" + e); +// throw new RuntimeException(e.getMessage()); +// } +// } +// return hashMap; +// } private String getCustomSql(String transMethod, String sql, String prefix) { - MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); - boolean flag = false; - if (beforeMethodHandler != null) { - try { - String subSql = ""; - if (sql.length() > 5) { - flag = true; - subSql = sql.substring(5, sql.length()); - } - Object execute = beforeMethodHandler.execute(subSql); - if (execute != null) { - if (execute instanceof String) { - StringBuffer sb = null; - if(execute.toString().length()==0){ - sb = new StringBuffer(); - } else if (flag || execute.toString().length() > 0) { - sb = new StringBuffer(" and "); - } else { - sb = new StringBuffer(); - } - - sb.append(execute.toString()); - return sb.toString(); - } - } - } catch (Exception e) { - logger.error("转换出错:" + e); - throw new RuntimeException(e.getMessage()); - } - } +// MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); +// boolean flag = false; +// if (beforeMethodHandler != null) { +// try { +// String subSql = ""; +// if (sql.length() > 5) { +// flag = true; +// subSql = sql.substring(5, sql.length()); +// } +// Object execute = beforeMethodHandler.execute(subSql); +// if (execute != null) { +// if (execute instanceof String) { +// StringBuffer sb = null; +// if(execute.toString().length()==0){ +// sb = new StringBuffer(); +// } else if (flag || execute.toString().length() > 0) { +// sb = new StringBuffer(" and "); +// } else { +// sb = new StringBuffer(); +// } +// +// sb.append(execute.toString()); +// return sb.toString(); +// } +// } +// } catch (Exception e) { +// logger.error("转换出错:" + e); +// throw new RuntimeException(e.getMessage()); +// } +// } return sql; } private void transUserInfo(List list) { - List operators = new ArrayList<>(); - if (list != null && list.size() > 0) { - for (Map map : list) { - //避免暴露内网地址 - map.remove("requesturl"); - - Object operator = map.get("operator"); - if (operator != null && StringUtils.isNotBlank(operator.toString())) { - operators.add(ElogSeviceUtils.getLongValue(operator.toString())); - } - } - } - List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); - Map infoHashMap = new HashMap<>(); - if (cacheList != null && cacheList.size() > 0) { - for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { - HrmAvatarComInfo hrmAvatarComInfo = (HrmAvatarComInfo) comInfoCache.getCacheById(HrmAvatarComInfo.class, hrmEmployeeComInfo.getAvatar()); - ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); - if (hrmAvatarComInfo != null) { - info.setAvatarP3Id(hrmAvatarComInfo.getP3()); - } - info.setId(hrmEmployeeComInfo.getId()); - info.setUserName(hrmEmployeeComInfo.getUsername()); - infoHashMap.put(hrmEmployeeComInfo.getId(), info); - } - } - if (list != null && list.size() > 0) { - for (Map map : list) { - Object operator = map.get("operator"); - if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { - map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); - } - map.put("dboperatorname", Util.null2String(map.get("operatorname"))); - if (operator != null && StringUtils.isNotBlank(operator.toString())) { - Map i18nOperatorMap = new HashMap<>(); - ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); - if (hrmEmployeeComInfo != null) { - //获取最新的人员名称并进行多语言转换 - i18nOperatorMap.put(Long.parseLong(operator.toString()),hrmEmployeeComInfo.getUserName()); - Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); - map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); - -// if (StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { -// map.put("operatorname", hrmEmployeeComInfo.getUserName()); -// } - if (hrmEmployeeComInfo.getAvatarP3Id() != null) { - map.put("avatar", hrmEmployeeComInfo.getAvatarP3Id()); - } - } - } - } - } - } - - private void transSwitchDataInfo(List list, List recordColumns) { - List operators = new ArrayList<>(); - if (list != null && list.size() > 0) { - for (Map map : list) { - //避免暴露内网地址 - map.remove("requesturl"); - - map.put("dboperatorname", Util.null2String(map.get("operatorname"))); - ElogSeviceSwitchUtils.switchDatabaseField(map); - Object operator = map.get("operator"); - if (operator != null && StringUtils.isNotBlank(operator.toString())) { - operators.add(ElogSeviceUtils.getLongValue(operator.toString())); - } - if (map.get("PARAMS") != null) { - map.put("params", JSONObject.toJSON(map.get("PARAMS"))); - } else if (map.get("params") != null) { - map.put("params", JSONObject.toJSON(map.get("params"))); - } - for (String recordColumn : recordColumns) { - Object val = map.get(recordColumn); - if (val != null) { - map.put(recordColumn, ElogSeviceSwitchUtils.transfi18Method(val.toString())); - } - } - Object modulename = map.get("modulename"); - if (modulename != null) { - map.put("modulenamespan", ElogSeviceSwitchUtils.getModuleName(modulename.toString())); - } - - } - } - List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); - Map infoHashMap = new HashMap<>(); - if (cacheList != null && cacheList.size() > 0) { - for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { - ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); - info.setId(hrmEmployeeComInfo.getId()); - info.setUserName(hrmEmployeeComInfo.getUsername()); - infoHashMap.put(hrmEmployeeComInfo.getId(), info); - } - } - if (list != null && list.size() > 0) { - for (Map map : list) { - Object operator = map.get("operator"); - if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { - map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); - map.put("params",SecurityUtil.encodeForHtml(map.get("params").toString(), true)); - - } - //获取最新的人员名称并进行多语言转换 - if (operator != null && StringUtils.isNotBlank(operator.toString())) { - Map i18nOperatorMap = new HashMap<>(); - ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); - if (hrmEmployeeComInfo != null && StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { - i18nOperatorMap.put(Long.parseLong(operator.toString()),hrmEmployeeComInfo.getUserName()); - Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); - map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); -// map.put("operatorname", hrmEmployeeComInfo.getUserName()); - } - } - } - } - } - - /** - * 查询头像相关信息 - * - * @param id - * @return - */ -// private String queryAvatarInfo(long id) { -// Map avatarInfoMap = queryAvatarInfoMapper.queryAvatarInfo(id); -// if (avatarInfoMap != null) { -// if (avatarInfoMap.get("p3") != null) { -// return avatarInfoMap.get("p3").toString(); +// List operators = new ArrayList<>(); +// if (list != null && list.size() > 0) { +// for (Map map : list) { +// //避免暴露内网地址 +// map.remove("requesturl"); +// +// Object operator = map.get("operator"); +// if (operator != null && StringUtils.isNotBlank(operator.toString())) { +// operators.add(ElogSeviceUtils.getLongValue(operator.toString())); +// } // } // } -// return ""; -// } +// List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); +// Map infoHashMap = new HashMap<>(); +// if (cacheList != null && cacheList.size() > 0) { +// for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { +// HrmAvatarComInfo hrmAvatarComInfo = (HrmAvatarComInfo) comInfoCache.getCacheById(HrmAvatarComInfo.class, hrmEmployeeComInfo.getAvatar()); +// ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); +// if (hrmAvatarComInfo != null) { +// info.setAvatarP3Id(hrmAvatarComInfo.getP3()); +// } +// info.setId(hrmEmployeeComInfo.getId()); +// info.setUserName(hrmEmployeeComInfo.getUsername()); +// infoHashMap.put(hrmEmployeeComInfo.getId(), info); +// } +// } +// if (list != null && list.size() > 0) { +// for (Map map : list) { +// Object operator = map.get("operator"); +// if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { +// map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); +// } +// map.put("dboperatorname", Util.null2String(map.get("operatorname"))); +// if (operator != null && StringUtils.isNotBlank(operator.toString())) { +// Map i18nOperatorMap = new HashMap<>(); +// ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); +// if (hrmEmployeeComInfo != null) { +// //获取最新的人员名称并进行多语言转换 +// i18nOperatorMap.put(Long.parseLong(operator.toString()), hrmEmployeeComInfo.getUserName()); +// Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); +// map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); +// +//// if (StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { +//// map.put("operatorname", hrmEmployeeComInfo.getUserName()); +//// } +// if (hrmEmployeeComInfo.getAvatarP3Id() != null) { +// map.put("avatar", hrmEmployeeComInfo.getAvatarP3Id()); +// } +// } +// } +// } +// } + } /** * 获取宽度 @@ -686,36 +373,36 @@ public class LoggerTableService implements ILoggerTableService { } private String getTenantKey() { - User currentUser = UserContext.getCurrentUser(); - if (currentUser != null) { - return currentUser.getTenantKey(); - } else { - String tenantKey = TenantRpcContext.getTenantKey(); - if (StringUtils.isNotBlank(tenantKey)) { - return tenantKey; - } - } - return ""; +// User currentUser = UserContext.getCurrentUser(); +// if (currentUser != null) { +// return currentUser.getTenantKey(); +// } else { +// String tenantKey = TenantRpcContext.getTenantKey(); +// if (StringUtils.isNotBlank(tenantKey)) { +// return tenantKey; +// } +// } + return SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; } - private String getEmployeeId() { - - User currentUser = UserContext.getCurrentUser(); - if (currentUser != null&&!currentUser.isAdmin()) { - String employeeId = TenantRpcContext.getEmployeeId(); - return StringUtils.isNotBlank(employeeId) ? employeeId : ""; - } - return ""; - } - - private String getUserId(){ - User currentUser = UserContext.getCurrentUser(); - if (currentUser != null) { - return currentUser.getEmployeeId().toString(); - } - String employeeId = TenantRpcContext.getEmployeeId(); - return StringUtils.isNotBlank(employeeId) ? employeeId : ""; - } +// private String getEmployeeId() { +// +// User currentUser = UserContext.getCurrentUser(); +// if (currentUser != null && !currentUser.isAdmin()) { +// String employeeId = TenantRpcContext.getEmployeeId(); +// return StringUtils.isNotBlank(employeeId) ? employeeId : ""; +// } +// return ""; +// } +// +// private String getUserId() { +// User currentUser = UserContext.getCurrentUser(); +// if (currentUser != null) { +// return currentUser.getEmployeeId().toString(); +// } +// String employeeId = TenantRpcContext.getEmployeeId(); +// return StringUtils.isNotBlank(employeeId) ? employeeId : ""; +// } /** * 拼接搜索条件 @@ -733,31 +420,31 @@ public class LoggerTableService implements ILoggerTableService { while (iterators.hasNext()) { Map.Entry next = iterators.next(); String key = next.getKey(); - SecurityUtil.sqlCheck(key); +// SecurityUtil.sqlCheck(key); if ("date".equals(key) || "createdate".equals(key)) { Object date = next.getValue(); if (date != null) { if (StringUtils.isNotBlank(date.toString())) { List dates = (List) date; - if (dates != null && dates.size() == 2) { - Object startDate = dates.get(0); - Object endDate = dates.get(1); - startDate = ElogSeviceUtils.checkValSql(startDate.toString()); - endDate = ElogSeviceUtils.checkValSql(endDate.toString()); - if (StringUtils.isNotBlank(startDate.toString()) && StringUtils.isNotBlank(endDate.toString())) { - startDate = startDate.toString().replaceAll("'", "''"); - endDate = endDate.toString().replaceAll("'", "''"); - String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); - String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); - sb.append(" and log_date ").append(" between ").append(getSwithDatabaseDate(dateRangeAfter)).append(" and ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); - } else if (StringUtils.isNotBlank(startDate.toString())) { - String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); - sb.append(" and log_date ").append(" >= ").append(getSwithDatabaseDate(dateRangeAfter)).append(" "); - } else if (StringUtils.isNotBlank(endDate.toString())) { - String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); - sb.append(" and log_date ").append(" <= ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); - } - } +// if (dates != null && dates.size() == 2) { +// Object startDate = dates.get(0); +// Object endDate = dates.get(1); +// startDate = ElogSeviceUtils.checkValSql(startDate.toString()); +// endDate = ElogSeviceUtils.checkValSql(endDate.toString()); +// if (StringUtils.isNotBlank(startDate.toString()) && StringUtils.isNotBlank(endDate.toString())) { +// startDate = startDate.toString().replaceAll("'", "''"); +// endDate = endDate.toString().replaceAll("'", "''"); +// String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); +// String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); +// sb.append(" and log_date ").append(" between ").append(getSwithDatabaseDate(dateRangeAfter)).append(" and ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); +// } else if (StringUtils.isNotBlank(startDate.toString())) { +// String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); +// sb.append(" and log_date ").append(" >= ").append(getSwithDatabaseDate(dateRangeAfter)).append(" "); +// } else if (StringUtils.isNotBlank(endDate.toString())) { +// String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); +// sb.append(" and log_date ").append(" <= ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); +// } +// } } } } else if ("operator".equals(next.getKey())) { @@ -766,22 +453,24 @@ public class LoggerTableService implements ILoggerTableService { if (StringUtils.isNotBlank(operator.toString())) { operator = ElogSeviceUtils.checkValSql(operator.toString()); operator = operator.toString().replaceAll("'", "''"); - if (StringUtils.isNumeric(operator.toString()) && operator.toString().length() > 15 ) { + if (StringUtils.isNumeric(operator.toString()) && operator.toString().length() > 15) { sb.append(" and log_operator = ").append(operator.toString()).append(" "); - } else { - List likeNameHrmEmployeeList = hrmCommonEmployeeService.queryEmpsByCondidtion( - new HrmOrgEmpCondition().setNameLikeList(Arrays.asList(operator.toString())).setTenantKey(getTenantKey()), - HrmConditionResultType.BEAN.name()); - if (likeNameHrmEmployeeList != null && likeNameHrmEmployeeList.size() > 0) { - List ids = likeNameHrmEmployeeList.stream().map(HrmEmployee::getId).collect(Collectors.toList()); - if (ids != null && ids.size() > 0) { - sb.append(" and ( operatorname like '%").append(operator.toString()).append("%' ") - .append(" or log_operator in (").append(StringUtils.join(ids, ",")).append(")) "); - } - } else { - sb.append(" and operatorname like '%").append(operator.toString()).append("%' "); - } } + +// else { +// List likeNameHrmEmployeeList = hrmCommonEmployeeService.queryEmpsByCondidtion( +// new HrmOrgEmpCondition().setNameLikeList(Arrays.asList(operator.toString())).setTenantKey(getTenantKey()), +// HrmConditionResultType.BEAN.name()); +// if (likeNameHrmEmployeeList != null && likeNameHrmEmployeeList.size() > 0) { +// List ids = likeNameHrmEmployeeList.stream().map(HrmEmployee::getId).collect(Collectors.toList()); +// if (ids != null && ids.size() > 0) { +// sb.append(" and ( operatorname like '%").append(operator.toString()).append("%' ") +// .append(" or log_operator in (").append(StringUtils.join(ids, ",")).append(")) "); +// } +// } else { +// sb.append(" and operatorname like '%").append(operator.toString()).append("%' "); +// } +// } } } } else if ("modulename".equals(next.getKey())) { @@ -823,7 +512,7 @@ public class LoggerTableService implements ILoggerTableService { } } } - } else if (databaseId.equalsIgnoreCase(ElogConsts.POSTGRESQL) && "targetid".equalsIgnoreCase(next.getKey())){ + } else if (databaseId.equalsIgnoreCase(ElogConsts.POSTGRESQL) && "targetid".equalsIgnoreCase(next.getKey())) { //兼容PG环境int类型不支持模糊搜索的问题 String value = next.getValue().toString().replaceAll("'", "''"); value = ElogSeviceUtils.checkValSql(value.toString()); @@ -838,33 +527,32 @@ public class LoggerTableService implements ILoggerTableService { String value = next.getValue().toString().replaceAll("'", "''"); value = ElogSeviceUtils.checkValSql(value.toString()); StringBuilder stringBuffer = new StringBuilder(); - if (isLikeSearch(showColumns, key)) { - String logSearchSql = I18nUtil.getLogSearchSql(ElogSeviceUtils.getTableName(module, function), key, value); - String sql = logSearchSql.replaceAll("%_", "%\\\\_"); - try { - logger.error("执行多语言sql:{}",sql); - List maps = queryCommonTabeMapper.queryLabelIds(sql); - if (maps != null && maps.size() > 0) { - for (Map map1 : maps) { - Object indexid = map1.get(key); - if (indexid == null || StringUtils.isEmpty(indexid.toString())) { - indexid = map1.get(key.toLowerCase()); - } - if (indexid != null && StringUtils.isNotEmpty(indexid.toString())) { - String val = indexid.toString().replace("'", "''"); - if (ElogSeviceUtils.checkIsNumber(map.get(key))) { - val = "-"+val; - value = "-"+value; - } - stringBuffer.append("'").append(val).append("',"); - } - } - } - } catch (Exception e) { - logger.error("i18查询sql报错:{}",e.getMessage(),e); - } - - } +// if (isLikeSearch(showColumns, key)) { +// String logSearchSql = I18nUtil.getLogSearchSql(ElogSeviceUtils.getTableName(module, function), key, value); +// String sql = logSearchSql.replaceAll("%_", "%\\\\_"); +// try { +// List maps = queryCommonTabeMapper.queryLabelIds(sql); +// if (maps != null && maps.size() > 0) { +// for (Map map1 : maps) { +// Object indexid = map1.get(key); +// if (indexid == null || StringUtils.isEmpty(indexid.toString())) { +// indexid = map1.get(key.toLowerCase()); +// } +// if (indexid != null && StringUtils.isNotEmpty(indexid.toString())) { +// String val = indexid.toString().replace("'", "''"); +// if (ElogSeviceUtils.checkIsNumber(map.get(key))) { +// val = "-" + val; +// value = "-" + value; +// } +// stringBuffer.append("'").append(val).append("',"); +// } +// } +// } +// } catch (Exception e) { +// logger.error("i18查询sql报错:{}", e.getMessage(), e); +// } +// +// } String str = ""; if (stringBuffer.toString().length() > 0) { str = stringBuffer.substring(0, stringBuffer.length() - 1); @@ -900,38 +588,38 @@ public class LoggerTableService implements ILoggerTableService { return sb.toString(); } - /** - * 是否模糊搜索 - * @param showColumns - * @param key - * @return - */ - private boolean isLikeSearch(List showColumns, String key) { - for (ShowColumsDto showColumn : showColumns) { - if (key.equalsIgnoreCase(showColumn.getColumIndex()) && showColumn.isTransfLanguage()) { - return true; - } - } - return false; - } +// /** +// * 是否模糊搜索 +// * +// * @param showColumns +// * @param key +// * @return +// */ +// private boolean isLikeSearch(List showColumns, String key) { +// for (ShowColumsDto showColumn : showColumns) { +// if (key.equalsIgnoreCase(showColumn.getColumIndex()) && showColumn.isTransfLanguage()) { +// return true; +// } +// } +// return false; +// } - private String getSwithDatabaseDate(String date) { - SecurityUtil.ecodeForSql(date); - if (ElogConsts.ORACLE.equals(DatabaseUtil.getDatabaseId())) { - return " to_date('"+date+"','yyyy-mm-dd hh24:mi:ss') "; - } else if (ElogConsts.POSTGRESQL.equals(DatabaseUtil.getDatabaseId())) { - return " to_timestamp('"+date+"', 'YYYY-MM-DD HH24:MI:SS') "; - } else if (ElogConsts.SQLSERVER.equals(DatabaseUtil.getDatabaseId())) { - return " convert(nvarchar(19),'"+date+"',120) "; - } else { - return " DATE_FORMAT('"+date+"','%Y-%m-%d %H:%i:%s') "; - } - } +// private String getSwithDatabaseDate(String date) { +// if (ElogConsts.ORACLE.equals(DatabaseUtil.getDatabaseId())) { +// return " to_date('" + date + "','yyyy-mm-dd hh24:mi:ss') "; +// } else if (ElogConsts.POSTGRESQL.equals(DatabaseUtil.getDatabaseId())) { +// return " to_timestamp('" + date + "', 'YYYY-MM-DD HH24:MI:SS') "; +// } else if (ElogConsts.SQLSERVER.equals(DatabaseUtil.getDatabaseId())) { +// return " convert(nvarchar(19),'" + date + "',120) "; +// } else { +// return " DATE_FORMAT('" + date + "','%Y-%m-%d %H:%i:%s') "; +// } +// } public String matchOperatetype(String str) { - if (ElogSeviceUtils.currentLanguage() != 8) { - return ""; - } +// if (ElogSeviceUtils.currentLanguage() != 8) { +// return ""; +// } List list = new ArrayList(); list.add(OperateType.add); list.add(OperateType.update); @@ -989,11 +677,6 @@ public class LoggerTableService implements ILoggerTableService { */ private String getsql(FilterConditionDto filterConditionDto) { StringBuffer sb = new StringBuffer(); - /* if (StringUtils.isNotBlank(filterConditionDto.getSql())) { - sb.append(" ").append(filterConditionDto.getSql()).append(" "); - return sb.toString(); - }*/ - SecurityUtil.sqlCheck(filterConditionDto.getColumIndex()); filterConditionDto.setConnectCondition(ElogSeviceUtils.checkConditionSql(filterConditionDto.getConnectCondition())); filterConditionDto.setType(ElogSeviceUtils.checkTypeSql(filterConditionDto.getType())); filterConditionDto.setValue(ElogSeviceUtils.checkValSql(filterConditionDto.getValue())); @@ -1176,6 +859,7 @@ public class LoggerTableService implements ILoggerTableService { /** * 明细分页查询 + * * @param module * @param function * @param mainid @@ -1189,45 +873,35 @@ public class LoggerTableService implements ILoggerTableService { Integer pageNum = Util.getIntValue(current, 1); Integer size = Util.getIntValue(pageSize, 10); - Page page = new Page(pageNum,size); + Page page = new Page(pageNum, size); List> list = getDetailChangesMethod(module, function, mainid, null, page); //查询分页总数 String tableName = ElogSeviceUtils.getTableName(module, function, true); - Integer total = localElogDaoMapper.queryAllChangesPageCounts(tableName, mainid); - page.setTotal(total); - WeaTable weaTable =new WeaTable(); + Integer total = getLocalElogDaoMapper().queryAllChangesPageCounts(tableName, mainid); + WeaTable weaTable = new WeaTable(); weaTable.setColumns(getDetailColumns(list)); - weaTable.setPage(page); - weaTable.setData(list); - if (Util.isNotEmpty(detailTransMethod)) { - // 消费到消息,通过MethodHandler调用对应的方法 - MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(detailTransMethod); - if (methodHandler != null) { - try { - methodHandler.execute(weaTable); - } catch (Exception e) { - logger.error("转换出错:" + e); - } - } - } + + PageInfo pageInfo = SalaryPageUtil.buildPage(pageNum, size, list); + pageInfo.setTotal(total); + return weaTable; } private List getDetailColumns(List> list) { List columns = new ArrayList<>(); - if (Util.isNotEmpty(list)) { - List detailcontexts= (List) list.get(0).get("detailcontexts"); - if (Util.isNotEmpty(detailcontexts)) { + if (CollectionUtils.isNotEmpty(list)) { + List detailcontexts = (List) list.get(0).get("detailcontexts"); + if (CollectionUtils.isNotEmpty(detailcontexts)) { for (Map map : detailcontexts) { WeaTableColumn weaTableColumn = new WeaTableColumn(); // 列表属性名 - weaTableColumn.setDataIndex((String) map.get("fieldname")); + weaTableColumn.setColumn((String) map.get("fieldname")); //显示名称 多语言转换 fieldnamelabelid - weaTableColumn.setTitle((String) map.get("fieldname")); + weaTableColumn.setText((String) map.get("fieldname")); columns.add(weaTableColumn); } } @@ -1235,69 +909,24 @@ public class LoggerTableService implements ILoggerTableService { return columns; } - public List> getDetailChangesMethod(String module, String function, String mainid, String detailTransMethod,Page page) { + public List> getDetailChangesMethod(String module, String function, String mainid, String detailTransMethod, Page page) { List list = new ArrayList<>(); String tableName = ElogSeviceUtils.getTableName(module, function, true); String maintableName = ElogSeviceUtils.getTableName(module, function, false); - List maps = localElogDaoMapper.queryAllMainData(maintableName, mainid); - - for (Map map : maps) { - - if (map.get("params") != null && ElogConsts.ES.equalsIgnoreCase(map.get("params").toString())) { - - String logDate = map.get("log_date").toString(); - logger.info("logDate:{}" ,logDate); - String esDate = logDate.substring(0, 10); - //先判断表存不存在,不存在创建 - if (checkEsTableIsExist(esDate)) { - // 根据id通过es查询大字段(params)然后赋值 - SearchRequest searchRequest = new SearchRequest(getElogESTableName(true,esDate)); - - SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); - // 只获取指定字段 - String[] fields = {"params"}; - searchSourceBuilder.fetchSource(fields, null); - // 根据id匹配 - searchSourceBuilder.query(QueryBuilders.termQuery("id",map.get("id").toString())); - searchRequest.source(searchSourceBuilder); - - SearchResponse searchResponse = null; - try { - searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT); - } catch (IOException e) { - logger.info("查询ES出现异常:{}",e.getMessage()); - } - - SearchHits hits = searchResponse.getHits(); - SearchHit[] searchHits = hits.getHits(); - if (searchHits != null && searchHits.length > 0) { - // 根据id匹配唯一,所以直接取第一个 - Map sourceAsMap = searchHits[0].getSourceAsMap(); - if (Objects.nonNull(sourceAsMap) && Objects.nonNull(sourceAsMap.get("params")) && StringUtils.isNotEmpty(sourceAsMap.get("params").toString())) { - logger.info("ES查出来的params:{}",sourceAsMap.get("params")); - map.put("params",sourceAsMap.get("params")); - } - } - } - } - if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { - map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); - map.put("params",SecurityUtil.encodeForHtml(map.get("params").toString(), true)); - } - } + List maps = getLocalElogDaoMapper().queryAllMainData(maintableName, mainid); maps = ElogSeviceSwitchUtils.getSwitchDatabaseData(maps); ElogSeviceSwitchUtils.changKey2Lower(maps); List allChangesData = new ArrayList<>(); //如果有分页数据则走分页方法 - if (Objects.nonNull(page) ) { + if (Objects.nonNull(page)) { // Integer offset = (pageNum - 1) * size; //分页查询明细数据 - allChangesData = localElogDaoMapper.queryAllChangesDataPages(tableName, mainid, page); + allChangesData = getLocalElogDaoMapper().queryAllChangesDataPages(tableName, mainid, page); } else { //没有被则不分页 - allChangesData = localElogDaoMapper.queryAllChangesData(tableName, mainid); + allChangesData = getLocalElogDaoMapper().queryAllChangesData(tableName, mainid); } ElogSeviceSwitchUtils.changKey2Lower(allChangesData); allChangesData = ElogSeviceSwitchUtils.getSwitchDatabaseData(allChangesData); @@ -1315,8 +944,8 @@ public class LoggerTableService implements ILoggerTableService { } } } -// List mainlist = localElogDaoMapper.queryAllMainChanges(tableName, mainid); -// List detaillist = localElogDaoMapper.queryAllDetailChanges(tableName, mainid); +// List mainlist = getLocalElogDaoMapper().queryAllMainChanges(tableName, mainid); +// List detaillist = getLocalElogDaoMapper().queryAllDetailChanges(tableName, mainid); //List moduleInfo = queryCommonTabeMapper.queryModuleNameInfo(module); List moduleInfo = new ArrayList<>(); processDetailInfo(mainlist, detaillist, moduleInfo); @@ -1325,34 +954,23 @@ public class LoggerTableService implements ILoggerTableService { map.putAll(detailMap); if (maps != null && maps.size() > 0) { Map maininfoMap = maps.get(0); - String operatetypename = (String)maininfoMap.get("operatetypename"); - String targetname = (String)maininfoMap.get("targetname"); + String operatetypename = (String) maininfoMap.get("operatetypename"); + String targetname = (String) maininfoMap.get("targetname"); //长度大于1避免部分模块为1,2,3这类的操作类型 if (StringUtils.isNumeric(operatetypename) && operatetypename.length() > 1 && operatetypename.length() < 10) { String transfOperatetypename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(operatetypename), operatetypename); - maininfoMap.put("operatetypename",transfOperatetypename); + maininfoMap.put("operatetypename", transfOperatetypename); } if (StringUtils.isNumeric(targetname) && targetname.length() > 1 && targetname.length() < 10) { String transfTargetname = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(targetname), targetname); - maininfoMap.put("targetname",transfTargetname); + maininfoMap.put("targetname", transfTargetname); } - map.put("maininfo",maininfoMap); + map.put("maininfo", maininfoMap); map.put("detailtitle", ""); } list.add(map); - if (Util.isNotEmpty(detailTransMethod)) { - // 消费到消息,通过MethodHandler调用对应的方法 - MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(detailTransMethod); - if (methodHandler != null) { - try { - methodHandler.execute(list); - } catch (Exception e) { - logger.error("转换出错:" + e); - } - } - } //List transfLanguageData = ElogSeviceSwitchUtils.transfLanguageData(list); return list; @@ -1445,19 +1063,19 @@ public class LoggerTableService implements ILoggerTableService { } @Override - public List queryLogList(String module, String function, String current, String pageSize, String condition) { + public List queryLogList(ELogGetLogParam param) { LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - int pagenum = Util.getIntValue(current, 1) - 1; - int size = Util.getIntValue(pageSize, 10); + context.setModuleName(param.getModule()); + context.setFunctionName(param.getFunction()); + int pagenum = Util.getIntValue(param.getCurrent(), 1) - 1; + int size = Util.getIntValue(param.getPageSize(), 10); int start = pagenum * size; int end = start + size; Page page = new Page(pagenum, size); String limit = " limit " + start + "," + (end - start); - String tableName = ElogSeviceUtils.getTableName(module, function); - List list = localElogDaoMapper.queryElogList(page, context, null, tableName, null,"*"); + String tableName = ElogSeviceUtils.getTableName(param.getModule(), param.getFunction()); + List list = getLocalElogDaoMapper().queryElogList(page, context, null, tableName, null, "*"); list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); return switchString(list); } @@ -1502,60 +1120,21 @@ public class LoggerTableService implements ILoggerTableService { String sb = getQueryCondition(filterConditionDtos); logger.info("elog查询条件拼接sql:{}", sb); // 消费到消息,通过MethodHandler调用对应的方法 - //String targetid = getTargetid(filterConditionDtos); - Map customAuthMap = getCustomAuthSql(transMethod, jsonObject, "auth"); - if (!customAuthMap.isEmpty()) { - Object flag = customAuthMap.get("flag"); - if (flag != null && flag instanceof Boolean) { - boolean f = (boolean) flag; - if (!f) { - List list = new ArrayList<>(); - list.add(customAuthMap); - return list; - } - } - } String customSql = getCustomSql(transMethod, sb, "before"); Page pages = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); - int page = Util.getIntValue(pages.getCurrent() + "", 1) - 1; - int size = Util.getIntValue(pages.getSize() + "", 10); + int page = Util.getIntValue(pages.getPageNum() + "", 1) - 1; + int size = Util.getIntValue(pages.getPageSize() + "", 10); int start = page * size; int end = start + size; String limit = " limit " + start + "," + (end - start); String tableName = ElogSeviceUtils.getTableName(module, function); - long l = System.currentTimeMillis(); - Map hashMap = addPermissionHandler(transMethod); - String permissionId = ""; - String permissionType = ""; - String mainDataTableAlias = ""; - String mainDataTable = ""; - String primaryKey = ""; - String permissionTargetId = ""; - String permissionConfigSourceId = ""; - - permissionId = getPermissionStr(hashMap, "permissionId"); - permissionType = getPermissionStr(hashMap, "permissionType"); - mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); - mainDataTable = getPermissionStr(hashMap, "mainDataTable"); - primaryKey = getPermissionStr(hashMap, "primaryKey"); - permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); - permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); //String columns = getshowColumsStr(showColums); List list = new ArrayList<>(); Map countMap = new HashMap<>(); - if (StringUtils.isNotEmpty(permissionId) || StringUtils.isNotEmpty(permissionType) || StringUtils.isNotEmpty(mainDataTableAlias) || StringUtils.isNotEmpty(mainDataTable) || StringUtils.isNotEmpty(permissionTargetId) || StringUtils.isNotEmpty(permissionConfigSourceId)) { - list = localElogDaoMapper.queryElogList(pages, context, null, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey,permissionTargetId,permissionConfigSourceId,"*"); - countMap = localElogDaoMapper.elogCountByMorePermission(context, tableName, customSql, mainDataTable, permissionId, permissionType, mainDataTableAlias, primaryKey, permissionTargetId,permissionConfigSourceId); - } else { - list = localElogDaoMapper.queryElogList(pages, context, null, tableName, customSql,"*"); - long l1 = System.currentTimeMillis(); - logger.info("elog查询列表耗时:{}", (l1 - l)); - countMap = localElogDaoMapper.elogCount(context, tableName, customSql); - long l2 = System.currentTimeMillis(); - logger.info("elog查询总数耗时:{}", (l2 - l1)); - } + list = getLocalElogDaoMapper().queryElogList(pages, context, null, tableName, customSql, "*"); + countMap = getLocalElogDaoMapper().elogCount(context, tableName, customSql); list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); if (list != null && list.size() > 0) { @@ -1564,25 +1143,9 @@ public class LoggerTableService implements ILoggerTableService { //} } transUserInfo(list); - long l3 = System.currentTimeMillis(); //System.out.println("elog查询名称和头像耗时:{}"+ (l3-l2)); transfLanguageData(list, showColums); - if (Util.isNotEmpty(transMethod)) { - // 消费到消息,通过MethodHandler调用对应的方法 - MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(transMethod); - if (methodHandler != null) { - try { - methodHandler.execute(list); - } catch (Exception e) { - logger.error("转换出错:" + e); - } - } - - } - long l4 = System.currentTimeMillis(); - logger.info("elog查询转换耗时:{}", (l4 - l3)); List res = switchString(list); - logger.info("elog查询总耗时:{}", (l4 - l)); return res; } @@ -1610,18 +1173,18 @@ public class LoggerTableService implements ILoggerTableService { } else if (StringUtils.isNotBlank(showColum.getColumIndex()) && showColum.isTransfLanguage() && entry.getKey().equals(showColum.getColumIndex()) && !Objects.isNull(entry.getValue())) { //read view add edit update delete if ("add".equals(entry.getValue().toString()) || "创建".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63252, "新增")); + map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "新增")); } else if ("read".equals(entry.getValue().toString()) || "view".equals(entry.getValue().toString()) || "查看".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SystemEnv.getHtmlLabelName(55172, "查看")); + map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "查看")); } else if ("edit".equals(entry.getValue().toString()) || "update".equals(entry.getValue().toString()) || "更新".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63253, "修改")); - } else if ("delete".equals(entry.getValue().toString()) || "删除".equals(entry.getValue().toString()) ) { - map.put(entry.getKey(), SystemEnv.getHtmlLabelName(63254, "删除")); + map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "修改")); + } else if ("delete".equals(entry.getValue().toString()) || "删除".equals(entry.getValue().toString())) { + map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(63254, "删除")); } else if (entry.getValue().toString().contains("取消关联标签 ")) { - String val = entry.getValue().toString().replace("取消关联标签 ", SystemEnv.getHtmlLabelName(83237, "取消关联标签 ") + " "); + String val = entry.getValue().toString().replace("取消关联标签 ", SalaryI18nUtil.getI18nLabel(1111111, "取消关联标签 ") + " "); map.put(entry.getKey(), val); } else if (entry.getValue().toString().contains("关联标签 ")) { - String val = entry.getValue().toString().replace("关联标签 ", SystemEnv.getHtmlLabelName(83236, "关联标签 ") + " "); + String val = entry.getValue().toString().replace("关联标签 ", SalaryI18nUtil.getI18nLabel(1111111, "关联标签 ") + " "); map.put(entry.getKey(), val); } } @@ -1641,7 +1204,7 @@ public class LoggerTableService implements ILoggerTableService { context.setFunctionName(function); context.setTenant_key(getTenantKey()); String tableName = ElogSeviceUtils.getTableName(module, function); - return localElogDaoMapper.elogCount(context, tableName, null); + return getLocalElogDaoMapper().elogCount(context, tableName, null); } @Override @@ -1658,7 +1221,7 @@ public class LoggerTableService implements ILoggerTableService { String limit = " limit " + start + "," + (end - start); // 还需要支持下查询 String tableName = ElogSeviceUtils.getTableName(module, function, true); - List list = localElogDaoMapper.queryDetailElogList(context, limit, tableName, null); + List list = getLocalElogDaoMapper().queryDetailElogList(context, limit, tableName, null); list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); return switchString(list); } @@ -1671,7 +1234,7 @@ public class LoggerTableService implements ILoggerTableService { context.setTenant_key(getTenantKey()); context.setUuid(mainId); String tableName = ElogSeviceUtils.getTableName(module, function, true); - return localElogDaoMapper.elogDetailCount(context, tableName, null); + return getLocalElogDaoMapper().elogDetailCount(context, tableName, null); } @Override @@ -1680,32 +1243,17 @@ public class LoggerTableService implements ILoggerTableService { if (StringUtils.isNotEmpty(traceId)) { String tableName = ElogSeviceUtils.getTableName(module, function); Integer offset = (currentPage - 1) * pageSize; - List list = localElogDaoMapper.queryElogTraceInfo(traceId, tableName, offset, pageSize); + List list = getLocalElogDaoMapper().queryElogTraceInfo(traceId, tableName, offset, pageSize); for (Map map : list) { if (map.get("modulename") != null) { map.put("modulenamespan", ElogSeviceSwitchUtils.getModuleName(map.get("modulename").toString())); } } //list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - int count = localElogDaoMapper.queryElogTraceInfoCount(traceId, tableName); - weaTable.setTotal(count); - Page page = new Page(); - page.setTotal(count); - page.setSize(pageSize); - page.setCurrent(currentPage); - weaTable.setPage(page); - if (Util.isNotEmpty(traceTransMethod)) { - // 消费到消息,通过MethodHandler调用对应的方法 - MethodHandler methodHandler = ElogMethodHandler.loadMethodHandler(traceTransMethod); - if (methodHandler != null) { - try { - methodHandler.execute(list); - } catch (Exception e) { - logger.error("转换出错:" + e); - } - } - } - weaTable.setData(list); + int count = getLocalElogDaoMapper().queryElogTraceInfoCount(traceId, tableName); + PageInfo pageInfo = SalaryPageUtil.buildPage(currentPage, pageSize, list); +// pageInfo.setColumns(); + pageInfo.setTotal(count); } return weaTable; @@ -1719,7 +1267,7 @@ public class LoggerTableService implements ILoggerTableService { StringBuffer sql = new StringBuffer(); sql.append(field).append(" = '").append(value).append("' "); - list = localElogDaoMapper.queryLogInfoByCustom(tableName, sql.toString()); + list = getLocalElogDaoMapper().queryLogInfoByCustom(tableName, sql.toString()); } return list; } @@ -1746,153 +1294,88 @@ public class LoggerTableService implements ILoggerTableService { } } - @Override - public BatchDocumentMessage downloadLog(String data) { - JSONObject jsonObject = JSONObject.parseObject(data); - String module = jsonObject.getString("downloadmodule"); - String function = jsonObject.getString("function"); - String serviceName = jsonObject.getString("serviceName"); - String fileName = jsonObject.getString("fileName"); - String passWord = jsonObject.getString("passWord"); - - if (StringUtils.isEmpty(fileName)) { - fileName = SystemEnv.getHtmlLabelName(191432,"日志记录"); - } - - BatchDocumentMessage batchDocumentMessage = new BatchDocumentMessage(); - WeaTable weaTable = queryLogs(data); - List columns = weaTable.getColumns(); - List headers = new ArrayList<>(); - if (columns != null && !columns.isEmpty()) { - for (WeaTableColumn column : columns) { - Map header = new HashMap<>(); - header.put("key", column.getDataIndex()); - header.put("name", column.getTitle()); - headers.add(header); - } - } - List> dataList = weaTable.getData(); - List> maps = new ArrayList<>(); - if (dataList != null && !dataList.isEmpty()) { - dataList.stream().forEach(m -> { - Map map = new HashMap<>(); - headers.stream().forEach(h -> { - map.put(h.get("key").toString(), m.get(h.get("key"))); - }); - maps.add(map); - }); - } - - //必传--业务id - batchDocumentMessage.setBizId(IdGenerator.generate() + ""); - //必传-处理名称 - batchDocumentMessage.setHandlerName("ebatchdemo"); - //必传-服务名称 - batchDocumentMessage.setServiceName(serviceName); - //必传-数据类型 - batchDocumentMessage.setDataType(fileName); - //任务id - batchDocumentMessage.setBatchTaskId(IdGenerator.generate()); - //必传-模块 - batchDocumentMessage.setModule(module); //com.weaver.teams.domain.EntityType 中的module(没有的话需要找温明刚维护下) - //必传-功能 - batchDocumentMessage.setFunction(function); - //必传-eteamsid - batchDocumentMessage.setEteamsId(TenantRpcContext.getEteamsId()); - - //非必传 - if (StringUtils.isNotBlank(passWord)) { - batchDocumentMessage.setPassword(passWord); - } - - //必传 - BatchFile batchFile = new BatchFile(); - batchFile.setName(fileName); - //必传 - batchFile.setFileType(FileType.EXCEL); - //必传 - batchFile.setHandlerFileMethod(HandlerFileMethod.HANDLER_EXCEL_WITH_DATA); - batchFile.setTemplateId(1l); - List excelSheets = new ArrayList<>(); - ExcelSheet excelSheet = new ExcelSheet(); - - excelSheet.setHeader(headers); - excelSheet.setData(maps); - excelSheet.setName(fileName); - excelSheets.add(excelSheet); - batchFile.setExcelSheets(excelSheets); - batchDocumentMessage.setBatchFile(batchFile); - batchDocumentMessage.setChunk(false);//不分片 - batchExportSender.sendBatchExport(batchDocumentMessage); - - return batchDocumentMessage; - } - - public Boolean checkEsTableIsExist(String date) { - try { - String esMainIndex = getElogESTableName(true, date); - //先检查表是否存在 不存在则创建 - boolean existsLog = isExistsIndex(esMainIndex); - return existsLog; - } catch (Exception e) { - logger.info("创建相关ES表失败:{}", e.getMessage(), e); - } - return false; - } - - /** - * 判断一个索引是否存在 - * - * @param indexName - * @return - */ - public boolean isExistsIndex(String indexName) { - GetIndexRequest request = new GetIndexRequest(); - try { - boolean exists = restHighLevelClient.indices().exists(request.indices(indexName), RequestOptions.DEFAULT); - return exists; - } catch (Exception e) { - logger.info("判断索引是否存在出现异常:{}", e.getMessage()); - - } - return false; - } - - /** - * 创建主表语句 - * - * @throws IOException - */ - private void createLogIndex(String esMainIndex) { - // 1.创建Request对象 - CreateIndexRequest request = new CreateIndexRequest(esMainIndex); - // 2.准备请求的参数:DSL语句 - request.source(MAPPING_TEMPLATE, XContentType.JSON); - // 3.发送请求 - try { - restHighLevelClient.indices().create(request, RequestOptions.DEFAULT); - } catch (IOException e) { - logger.info("创建ES主表失败:{}", e.getMessage()); - - } - } - - private String getElogESTableName(boolean flag, String date) { - String currentDate = ""; - if (StringUtils.isEmpty(date)) { - currentDate = DateUtils.getCurrentDate().replaceAll("-", ""); - } else { - currentDate = date.replaceAll("-", ""); - } - return getEsMainIndex(flag, currentDate); - } - - private String getEsMainIndex(boolean flag, String date) { - if (flag) { - return ElogEsTableConsts.ELOG_CENTER_LOGS_ES + date; - } - return ElogEsTableConsts.ELOG_CENTER_LOGSDETAIL_ES + date; - } +// @Override +// public BatchDocumentMessage downloadLog(String data) { +// JSONObject jsonObject = JSONObject.parseObject(data); +// String module = jsonObject.getString("downloadmodule"); +// String function = jsonObject.getString("function"); +// String serviceName = jsonObject.getString("serviceName"); +// String fileName = jsonObject.getString("fileName"); +// String passWord = jsonObject.getString("passWord"); +// +// if (StringUtils.isEmpty(fileName)) { +// fileName = SalaryI18nUtil.getI18nLabel(191432, "日志记录"); +// } +// +// BatchDocumentMessage batchDocumentMessage = new BatchDocumentMessage(); +// WeaTable weaTable = queryLogs(data); +// List columns = weaTable.getColumns(); +// List headers = new ArrayList<>(); +// if (columns != null && !columns.isEmpty()) { +// for (WeaTableColumn column : columns) { +// Map header = new HashMap<>(); +// header.put("key", column.getDataIndex()); +// header.put("name", column.getTitle()); +// headers.add(header); +// } +// } +// List> dataList = weaTable.getData(); +// List> maps = new ArrayList<>(); +// if (dataList != null && !dataList.isEmpty()) { +// dataList.stream().forEach(m -> { +// Map map = new HashMap<>(); +// headers.stream().forEach(h -> { +// map.put(h.get("key").toString(), m.get(h.get("key"))); +// }); +// maps.add(map); +// }); +// } +// +// //必传--业务id +// batchDocumentMessage.setBizId(IdGenerator.generate() + ""); +// //必传-处理名称 +// batchDocumentMessage.setHandlerName("ebatchdemo"); +// //必传-服务名称 +// batchDocumentMessage.setServiceName(serviceName); +// //必传-数据类型 +// batchDocumentMessage.setDataType(fileName); +// //任务id +// batchDocumentMessage.setBatchTaskId(IdGenerator.generate()); +// //必传-模块 +// batchDocumentMessage.setModule(module); //com.weaver.teams.domain.EntityType 中的module(没有的话需要找温明刚维护下) +// //必传-功能 +// batchDocumentMessage.setFunction(function); +// //必传-eteamsid +// batchDocumentMessage.setEteamsId(TenantRpcContext.getEteamsId()); +// +// //非必传 +// if (StringUtils.isNotBlank(passWord)) { +// batchDocumentMessage.setPassword(passWord); +// } +// +// //必传 +// BatchFile batchFile = new BatchFile(); +// batchFile.setName(fileName); +// //必传 +// batchFile.setFileType(FileType.EXCEL); +// //必传 +// batchFile.setHandlerFileMethod(HandlerFileMethod.HANDLER_EXCEL_WITH_DATA); +// batchFile.setTemplateId(1l); +// List excelSheets = new ArrayList<>(); +// ExcelSheet excelSheet = new ExcelSheet(); +// +// excelSheet.setHeader(headers); +// excelSheet.setData(maps); +// excelSheet.setName(fileName); +// excelSheets.add(excelSheet); +// batchFile.setExcelSheets(excelSheets); +// batchDocumentMessage.setBatchFile(batchFile); +// batchDocumentMessage.setChunk(false);//不分片 +// batchExportSender.sendBatchExport(batchDocumentMessage); +// +// return batchDocumentMessage; +// } +// private String[] getESfields(String value) { String[] split = value.split(","); diff --git a/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java b/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java index 81eb070f0..63e188956 100644 --- a/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java +++ b/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java @@ -1,7 +1,7 @@ package com.engine.salary.elog.threadlocal; import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerContext; import java.util.ArrayList; import java.util.List; diff --git a/src/com/engine/salary/elog/util/ElogServiceUtils.java b/src/com/engine/salary/elog/util/ElogServiceUtils.java index 1e7428366..e06225b36 100644 --- a/src/com/engine/salary/elog/util/ElogServiceUtils.java +++ b/src/com/engine/salary/elog/util/ElogServiceUtils.java @@ -2,9 +2,9 @@ package com.engine.salary.elog.util; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.ElogBean; -import com.engine.salary.elog.dto.FilterConditionDto; -import com.engine.salary.elog.dto.ShowColumsDto; +import com.engine.salary.elog.entity.dto.ElogBean; +import com.engine.salary.elog.entity.dto.FilterConditionDto; +import com.engine.salary.elog.entity.dto.ShowColumsDto; import com.engine.salary.elog.enums.ElogConsts; import java.util.List; diff --git a/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java b/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java index f6d55aece..78a78dc94 100644 --- a/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java +++ b/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java @@ -1,1338 +1,1345 @@ -//package com.engine.salary.elog.util; -// -//import cn.hutool.core.map.CaseInsensitiveMap; -//import com.alibaba.druid.proxy.jdbc.ClobProxyImpl; -//import com.alibaba.fastjson.JSON; -//import com.alibaba.fastjson.JSONArray; -//import com.alibaba.fastjson.JSONObject; -//import com.weaver.common.component.table.WeaTable; -//import com.weaver.common.component.table.column.WeaTableColumn; -//import com.weaver.common.elog.annotation.OperateType; -//import com.weaver.common.elog.enums.ElogConsts; -//import com.weaver.common.i18n.label.SystemEnv; -//import com.weaver.common.mybatis.util.DatabaseUtil; -//import com.weaver.common.security.util.SecurityUtil; -//import org.apache.commons.lang3.StringUtils; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; -// -//import java.sql.Clob; -//import java.util.*; -//import java.util.regex.Matcher; -//import java.util.regex.Pattern; -// -///** -// * @Date: 2022/5/18 19:34 -// * @Author: deli.xu -// * @Description: elog服务转换类 -// **/ -//public class ElogSeviceSwitchUtils { -// -// private static final Logger logger = LoggerFactory.getLogger(ElogSeviceSwitchUtils.class); -// // TODO 后续需要考虑多语言label写法 -// public static final Map moduleMap = new HashMap<>(); -// -// private static final Map> moduleFuctionMap = new HashMap<>(); -// -// static { -// /*moduleMap.put("elog", SystemEnv.getHtmlLabelName(62975, ElogSeviceUtils.currentLanguage(), "日志")); -// moduleMap.put("report", SystemEnv.getHtmlLabelName(62976, ElogSeviceUtils.currentLanguage(), "报表")); -// moduleMap.put("edc", SystemEnv.getHtmlLabelName(62977, ElogSeviceUtils.currentLanguage(), "数据中心")); -// moduleMap.put("hrm", SystemEnv.getHtmlLabelName(62978, ElogSeviceUtils.currentLanguage(), "人力资源")); -// moduleMap.put("crm", SystemEnv.getHtmlLabelName(62979, ElogSeviceUtils.currentLanguage(), "资产")); -// moduleMap.put("demo", SystemEnv.getHtmlLabelName(62980, ElogSeviceUtils.currentLanguage(), "示例")); -// moduleMap.put("attc", SystemEnv.getHtmlLabelName(62981, ElogSeviceUtils.currentLanguage(), "出勤打卡")); -// moduleMap.put("attm", SystemEnv.getHtmlLabelName(62982, ElogSeviceUtils.currentLanguage(), "出勤机")); -// moduleMap.put("attw", SystemEnv.getHtmlLabelName(62983, ElogSeviceUtils.currentLanguage(), "出勤报表")); -// moduleMap.put("auth", SystemEnv.getHtmlLabelName(62984, ElogSeviceUtils.currentLanguage(), "系统权限")); -// moduleMap.put("bank", SystemEnv.getHtmlLabelName(62985, ElogSeviceUtils.currentLanguage(), "银企直联")); -// moduleMap.put("bap", SystemEnv.getHtmlLabelName(62986, ElogSeviceUtils.currentLanguage(), "云办公")); -// moduleMap.put("base", SystemEnv.getHtmlLabelName(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); -// moduleMap.put("batc", SystemEnv.getHtmlLabelName(62988, ElogSeviceUtils.currentLanguage(), "导入导出")); -// moduleMap.put("blog", SystemEnv.getHtmlLabelName(62989, ElogSeviceUtils.currentLanguage(), "日报微博")); -// moduleMap.put("cld", SystemEnv.getHtmlLabelName(62990, ElogSeviceUtils.currentLanguage(), "日程管理")); -// moduleMap.put("cmca", SystemEnv.getHtmlLabelName(62991, ElogSeviceUtils.currentLanguage(), "资金管理")); -// moduleMap.put("cmcl", SystemEnv.getHtmlLabelName(62992, ElogSeviceUtils.currentLanguage(), "线索管理")); -// moduleMap.put("cmco", SystemEnv.getHtmlLabelName(62993, ElogSeviceUtils.currentLanguage(), "联系人管理")); -// moduleMap.put("cmcp", SystemEnv.getHtmlLabelName(62994, ElogSeviceUtils.currentLanguage(), "对手管理")); -// moduleMap.put("cmcu", SystemEnv.getHtmlLabelName(62995, ElogSeviceUtils.currentLanguage(), "客户管理")); -// moduleMap.put("cmex", SystemEnv.getHtmlLabelName(62996, ElogSeviceUtils.currentLanguage(), "批量操作")); -// moduleMap.put("cmmk", SystemEnv.getHtmlLabelName(62997, ElogSeviceUtils.currentLanguage(), "营销管理")); -// moduleMap.put("cmor", SystemEnv.getHtmlLabelName(62998, ElogSeviceUtils.currentLanguage(), "订单管理")); -// moduleMap.put("cmpc", SystemEnv.getHtmlLabelName(62999, ElogSeviceUtils.currentLanguage(), "价格管理")); -// moduleMap.put("cmpr", SystemEnv.getHtmlLabelName(63000, ElogSeviceUtils.currentLanguage(), "产品管理")); -// moduleMap.put("cmpt", SystemEnv.getHtmlLabelName(63001, ElogSeviceUtils.currentLanguage(), "外部门户")); -// moduleMap.put("cmqu", SystemEnv.getHtmlLabelName(63002, ElogSeviceUtils.currentLanguage(), "报价管理")); -// moduleMap.put("cmsa", SystemEnv.getHtmlLabelName(63003, ElogSeviceUtils.currentLanguage(), "商机管理")); -// moduleMap.put("cmtr", SystemEnv.getHtmlLabelName(63004, ElogSeviceUtils.currentLanguage(), "合同管理")); -// moduleMap.put("comp", SystemEnv.getHtmlLabelName(63005, ElogSeviceUtils.currentLanguage(), "文档对比")); -// moduleMap.put("cs", SystemEnv.getHtmlLabelName(63006, ElogSeviceUtils.currentLanguage(), "云商店")); -// moduleMap.put("cowork", SystemEnv.getHtmlLabelName(63007, ElogSeviceUtils.currentLanguage(), "协作区")); -// moduleMap.put("dbs", SystemEnv.getHtmlLabelName(63008, ElogSeviceUtils.currentLanguage(), "文档公共模块")); -// moduleMap.put("dcad", SystemEnv.getHtmlLabelName(63009, ElogSeviceUtils.currentLanguage(), "数据中心运行")); -// moduleMap.put("dcap", SystemEnv.getHtmlLabelName(63010, ElogSeviceUtils.currentLanguage(), "数据中心分析开发配置")); -// moduleMap.put("dcrd", SystemEnv.getHtmlLabelName(63011, ElogSeviceUtils.currentLanguage(), "数据中心开发配置")); -// moduleMap.put("dcre", SystemEnv.getHtmlLabelName(63012, ElogSeviceUtils.currentLanguage(), "数据中心分析生产运行")); -// moduleMap.put("dcs", SystemEnv.getHtmlLabelName(63013, ElogSeviceUtils.currentLanguage(), "文档目录模块")); -// moduleMap.put("dds", SystemEnv.getHtmlLabelName(63014, ElogSeviceUtils.currentLanguage(), "文档模块")); -// moduleMap.put("dps", SystemEnv.getHtmlLabelName(63015, ElogSeviceUtils.currentLanguage(), "文档权限模块")); -// moduleMap.put("drle", SystemEnv.getHtmlLabelName(63016, ElogSeviceUtils.currentLanguage(), "数据规则库")); -// moduleMap.put("ds", SystemEnv.getHtmlLabelName(63017, ElogSeviceUtils.currentLanguage(), "数据安全")); -// moduleMap.put("dw_etl", SystemEnv.getHtmlLabelName(63018, ElogSeviceUtils.currentLanguage(), "ETL(抽取,转换,治理)")); -// moduleMap.put("dw_model", SystemEnv.getHtmlLabelName(63019, ElogSeviceUtils.currentLanguage(), "建模服务")); -// moduleMap.put("dw_process", SystemEnv.getHtmlLabelName(63020, ElogSeviceUtils.currentLanguage(), "计算服务")); -// moduleMap.put("dw_search", SystemEnv.getHtmlLabelName(63021, ElogSeviceUtils.currentLanguage(), "查询服务")); -// moduleMap.put("dw_sync", SystemEnv.getHtmlLabelName(63022, ElogSeviceUtils.currentLanguage(), "数据抽取")); -// moduleMap.put("eb", SystemEnv.getHtmlLabelName(63023, ElogSeviceUtils.currentLanguage(), "云桥")); -// moduleMap.put("ebda", SystemEnv.getHtmlLabelName(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); -// moduleMap.put("ebdd", SystemEnv.getHtmlLabelName(63024, ElogSeviceUtils.currentLanguage(), "页面设计")); -// moduleMap.put("ebdf", SystemEnv.getHtmlLabelName(63025, ElogSeviceUtils.currentLanguage(), "表单服务")); -// moduleMap.put("ebdp", SystemEnv.getHtmlLabelName(63026, ElogSeviceUtils.currentLanguage(), "页面管理")); -// moduleMap.put("ecod", SystemEnv.getHtmlLabelName(63027, ElogSeviceUtils.currentLanguage(), "ecode")); -// moduleMap.put("ei", SystemEnv.getHtmlLabelName(63028, ElogSeviceUtils.currentLanguage(), "数据导出导入")); -// moduleMap.put("em", SystemEnv.getHtmlLabelName(63029, ElogSeviceUtils.currentLanguage(), "移动相关")); -// moduleMap.put("es", SystemEnv.getHtmlLabelName(63030, ElogSeviceUtils.currentLanguage(), "微搜搜索")); -// moduleMap.put("esa", SystemEnv.getHtmlLabelName(63031, ElogSeviceUtils.currentLanguage(), "微搜文件分析")); -// moduleMap.put("esb", SystemEnv.getHtmlLabelName(63032, ElogSeviceUtils.currentLanguage(), "ESB")); -// moduleMap.put("esch", SystemEnv.getHtmlLabelName(63033, ElogSeviceUtils.currentLanguage(), "计划任务")); -// moduleMap.put("esd", SystemEnv.getHtmlLabelName(63034, ElogSeviceUtils.currentLanguage(), "微搜索引数据")); -// moduleMap.put("exfo", SystemEnv.getHtmlLabelName(63035, ElogSeviceUtils.currentLanguage(), "excel函数引擎")); -// moduleMap.put("fbdg", SystemEnv.getHtmlLabelName(63036, ElogSeviceUtils.currentLanguage(), "预算编制")); -// moduleMap.put("fdt", SystemEnv.getHtmlLabelName(63037, ElogSeviceUtils.currentLanguage(), "表单数据")); -// moduleMap.put("fexs", SystemEnv.getHtmlLabelName(63038, ElogSeviceUtils.currentLanguage(), "费用管理")); -// moduleMap.put("file", SystemEnv.getHtmlLabelName(63039, ElogSeviceUtils.currentLanguage(), "文件服务")); -// moduleMap.put("finc", SystemEnv.getHtmlLabelName(63040, ElogSeviceUtils.currentLanguage(), "微报账")); -// moduleMap.put("fnar", SystemEnv.getHtmlLabelName(63041, ElogSeviceUtils.currentLanguage(), "财务报表")); -// moduleMap.put("fomo", SystemEnv.getHtmlLabelName(63042, ElogSeviceUtils.currentLanguage(), "表单监控")); -// moduleMap.put("form", SystemEnv.getHtmlLabelName(63043, ElogSeviceUtils.currentLanguage(), "表单服务")); -// moduleMap.put("frpt", SystemEnv.getHtmlLabelName(63043, ElogSeviceUtils.currentLanguage(), "业务表单")); -// moduleMap.put("fvou", SystemEnv.getHtmlLabelName(63044, ElogSeviceUtils.currentLanguage(), "凭证集成")); -// moduleMap.put("hp", SystemEnv.getHtmlLabelName(63045, ElogSeviceUtils.currentLanguage(), "门户")); -// moduleMap.put("hr", SystemEnv.getHtmlLabelName(63046, ElogSeviceUtils.currentLanguage(), "人事档案")); -// moduleMap.put("ic", SystemEnv.getHtmlLabelName(63047, ElogSeviceUtils.currentLanguage(), "集成服务")); -// moduleMap.put("il", SystemEnv.getHtmlLabelName(63048, ElogSeviceUtils.currentLanguage(), "集成登录")); -// moduleMap.put("im", SystemEnv.getHtmlLabelName(63049, ElogSeviceUtils.currentLanguage(), "IM相关服务")); -// moduleMap.put("inc", SystemEnv.getHtmlLabelName(63050, ElogSeviceUtils.currentLanguage(), "发票云服务")); -// moduleMap.put("iua", SystemEnv.getHtmlLabelName(63051, ElogSeviceUtils.currentLanguage(), "统一认证")); -// moduleMap.put("iut", SystemEnv.getHtmlLabelName(63052, ElogSeviceUtils.currentLanguage(), "统一待办")); -// moduleMap.put("mail", SystemEnv.getHtmlLabelName(63053, ElogSeviceUtils.currentLanguage(), "邮件服务")); -// moduleMap.put("mc", SystemEnv.getHtmlLabelName(63054, ElogSeviceUtils.currentLanguage(), "消息服务")); -// moduleMap.put("mt", SystemEnv.getHtmlLabelName(63055, ElogSeviceUtils.currentLanguage(), "会议管理")); -// moduleMap.put("my", SystemEnv.getHtmlLabelName(63056, ElogSeviceUtils.currentLanguage(), "关注&收藏&标签")); -// moduleMap.put("odoc", SystemEnv.getHtmlLabelName(63057, ElogSeviceUtils.currentLanguage(), "公文管理")); -// moduleMap.put("odoc_exchange", SystemEnv.getHtmlLabelName(63058, ElogSeviceUtils.currentLanguage(), "公文交换平台")); -// moduleMap.put("open", SystemEnv.getHtmlLabelName(63059, ElogSeviceUtils.currentLanguage(), "开放平台")); -// moduleMap.put("pr", SystemEnv.getHtmlLabelName(63060, ElogSeviceUtils.currentLanguage(), "工作画像")); -// moduleMap.put("proj", SystemEnv.getHtmlLabelName(63061, ElogSeviceUtils.currentLanguage(), "项目管理")); -// moduleMap.put("prt", SystemEnv.getHtmlLabelName(63062, ElogSeviceUtils.currentLanguage(), "打印服务")); -// moduleMap.put("pspt", SystemEnv.getHtmlLabelName(63063, ElogSeviceUtils.currentLanguage(), "系统登录")); -// moduleMap.put("rptc", SystemEnv.getHtmlLabelName(63064, ElogSeviceUtils.currentLanguage(), "数据协作")); -// moduleMap.put("rpts", SystemEnv.getHtmlLabelName(63065, ElogSeviceUtils.currentLanguage(), "上报调查")); -// moduleMap.put("sala", SystemEnv.getHtmlLabelName(63066, ElogSeviceUtils.currentLanguage(), "薪资管理")); -// moduleMap.put("sign", SystemEnv.getHtmlLabelName(63067, ElogSeviceUtils.currentLanguage(), "印控中心")); -// moduleMap.put("sms", SystemEnv.getHtmlLabelName(63068, ElogSeviceUtils.currentLanguage(), "短信")); -// moduleMap.put("task", SystemEnv.getHtmlLabelName(63069, ElogSeviceUtils.currentLanguage(), "任务管理")); -// moduleMap.put("tnt", SystemEnv.getHtmlLabelName(63070, ElogSeviceUtils.currentLanguage(), "租户管理")); -// moduleMap.put("wf", SystemEnv.getHtmlLabelName(63071, ElogSeviceUtils.currentLanguage(), "路径定义")); -// moduleMap.put("wfc", SystemEnv.getHtmlLabelName(63072, ElogSeviceUtils.currentLanguage(), "流程流转")); -// moduleMap.put("wfr", SystemEnv.getHtmlLabelName(63073, ElogSeviceUtils.currentLanguage(), "流程规则路由")); -// moduleMap.put("wrgm", SystemEnv.getHtmlLabelName(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); -// moduleMap.put("wrgp", SystemEnv.getHtmlLabelName(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); -// moduleMap.put("wrpr", SystemEnv.getHtmlLabelName(63076, ElogSeviceUtils.currentLanguage(), "计划报告")); -// moduleMap.put("doc", SystemEnv.getHtmlLabelName(63077, ElogSeviceUtils.currentLanguage(), "文档服务")); -// moduleMap.put("placard", SystemEnv.getHtmlLabelName(63078, ElogSeviceUtils.currentLanguage(), "团队公告")); -// moduleMap.put("fna", SystemEnv.getHtmlLabelName(135042, ElogSeviceUtils.currentLanguage(), "云报销")); -// moduleMap.put("meeting", SystemEnv.getHtmlLabelName(63080, ElogSeviceUtils.currentLanguage(), "会议")); -// moduleMap.put("wfp", SystemEnv.getHtmlLabelName(63081, ElogSeviceUtils.currentLanguage(), "流程")); -// moduleMap.put("portal", SystemEnv.getHtmlLabelName(63045, ElogSeviceUtils.currentLanguage(), "门户")); -// moduleMap.put("workreport", SystemEnv.getHtmlLabelName(63082, ElogSeviceUtils.currentLanguage(), "工作报告")); -// moduleMap.put("goal", SystemEnv.getHtmlLabelName(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); -// moduleMap.put("performance", SystemEnv.getHtmlLabelName(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); -// moduleMap.put("intlogin", SystemEnv.getHtmlLabelName(63083, ElogSeviceUtils.currentLanguage(), "集成登录设置")); -// moduleMap.put("i18n", SystemEnv.getHtmlLabelName(64559, ElogSeviceUtils.currentLanguage(), "国际化")); -// moduleMap.put("timecard", SystemEnv.getHtmlLabelName(63085, ElogSeviceUtils.currentLanguage(), "出勤")); -// moduleMap.put("market", SystemEnv.getHtmlLabelName(63086, ElogSeviceUtils.currentLanguage(), "营销")); -// moduleMap.put("excelformula", SystemEnv.getHtmlLabelName(64560, ElogSeviceUtils.currentLanguage(), "函数服务")); -// moduleMap.put("ic_ldap", SystemEnv.getHtmlLabelName(70081, ElogSeviceUtils.currentLanguage(), "Ldap集成")); -// moduleMap.put("iut_c_c", SystemEnv.getHtmlLabelName(70303, ElogSeviceUtils.currentLanguage(), "统一待办推送设置")); -// moduleMap.put("plan", SystemEnv.getHtmlLabelName(70303, ElogSeviceUtils.currentLanguage(), "计划报告")); -// moduleMap.put("document", SystemEnv.getHtmlLabelName(34218, ElogSeviceUtils.currentLanguage(), "文档")); -// moduleMap.put("taskCustStatus", SystemEnv.getHtmlLabelName(73988, ElogSeviceUtils.currentLanguage(), "任务状态")); -// moduleMap.put("project", SystemEnv.getHtmlLabelName(55158, ElogSeviceUtils.currentLanguage(), "项目")); -// moduleMap.put("calendar", SystemEnv.getHtmlLabelName(74186, ElogSeviceUtils.currentLanguage(), "日历")); -// moduleMap.put("web", SystemEnv.getHtmlLabelName(75598, ElogSeviceUtils.currentLanguage(), "浏览")); -// moduleMap.put("formdatareport", SystemEnv.getHtmlLabelName(76068, ElogSeviceUtils.currentLanguage(), "来自上报数据")); -// moduleMap.put("mainline", SystemEnv.getHtmlLabelName(31898, ElogSeviceUtils.currentLanguage(), "主线")); -// moduleMap.put("customer", SystemEnv.getHtmlLabelName(32726, ElogSeviceUtils.currentLanguage(), "客户")); -// moduleMap.put("contract", SystemEnv.getHtmlLabelName(32864, ElogSeviceUtils.currentLanguage(), "合同")); -// moduleMap.put("group", SystemEnv.getHtmlLabelName(19426, ElogSeviceUtils.currentLanguage(), "分组")); -// moduleMap.put("workflow", SystemEnv.getHtmlLabelName(81851, ElogSeviceUtils.currentLanguage(), "工作流程")); -// moduleMap.put("biaoge", SystemEnv.getHtmlLabelName(30919, ElogSeviceUtils.currentLanguage(), "表格")); -// moduleMap.put("clue", SystemEnv.getHtmlLabelName(28908, ElogSeviceUtils.currentLanguage(), "线索")); -// moduleMap.put("competitor", SystemEnv.getHtmlLabelName(81852, ElogSeviceUtils.currentLanguage(), "竞争对手")); -// moduleMap.put("kpiFlow", SystemEnv.getHtmlLabelName(81853, ElogSeviceUtils.currentLanguage(), "kpil流程")); -// moduleMap.put("mainlineCustStatus", SystemEnv.getHtmlLabelName(81854, ElogSeviceUtils.currentLanguage(), "主线客户状态")); -// moduleMap.put("marketactivity", SystemEnv.getHtmlLabelName(34221, ElogSeviceUtils.currentLanguage(), "市场活动")); -// moduleMap.put("mtPhase", SystemEnv.getHtmlLabelName(81855, ElogSeviceUtils.currentLanguage(), "mt阶段")); -// moduleMap.put("production", SystemEnv.getHtmlLabelName(29329, ElogSeviceUtils.currentLanguage(), "产品")); -// moduleMap.put("quote", SystemEnv.getHtmlLabelName(34231, ElogSeviceUtils.currentLanguage(), "报价")); -// moduleMap.put("saleChance", SystemEnv.getHtmlLabelName(32863, ElogSeviceUtils.currentLanguage(), "商机")); -// moduleMap.put("orderform", SystemEnv.getHtmlLabelName(34230, ElogSeviceUtils.currentLanguage(), "订单")); -// moduleMap.put("contact", SystemEnv.getHtmlLabelName(32711, ElogSeviceUtils.currentLanguage(), "联系人")); -// moduleMap.put("price", SystemEnv.getHtmlLabelName(31922, ElogSeviceUtils.currentLanguage(), "价格")); -// moduleMap.put("capital", SystemEnv.getHtmlLabelName(83428, ElogSeviceUtils.currentLanguage(), "资金")); -// moduleMap.put("ice", SystemEnv.getHtmlLabelName(94360, ElogSeviceUtils.currentLanguage(), "日程会议集成")); -// moduleMap.put("ic_hr", SystemEnv.getHtmlLabelName(84284, ElogSeviceUtils.currentLanguage(), "HR同步")); -// moduleMap.put("intunifyauth", SystemEnv.getHtmlLabelName(84467, ElogSeviceUtils.currentLanguage(), "统一认证接入管理")); -// moduleMap.put("signcenter", SystemEnv.getHtmlLabelName(84691, ElogSeviceUtils.currentLanguage(), "电子签")); -// moduleMap.put("iut_s_c", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-异构系统")); -// moduleMap.put("iut_s_c1", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统")); -// moduleMap.put("iut_s_c2", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办中心")); -// moduleMap.put("iut_s_c3", SystemEnv.getHtmlLabelName(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统-流程类型")); -// moduleMap.put("ic_mail", SystemEnv.getHtmlLabelName(100715, ElogSeviceUtils.currentLanguage(), "邮箱集成")); -// moduleMap.put("hrsa", SystemEnv.getHtmlLabelName(105038, ElogSeviceUtils.currentLanguage(), "薪酬管理")); -// moduleMap.put("icc", SystemEnv.getHtmlLabelName(113884, ElogSeviceUtils.currentLanguage(), "转换规则")); -// moduleMap.put("basicserver", SystemEnv.getHtmlLabelName(113885, ElogSeviceUtils.currentLanguage(), "整体基础")); -// moduleMap.put("dw", SystemEnv.getHtmlLabelName(115549, ElogSeviceUtils.currentLanguage(), "数据仓库")); -// moduleMap.put("msg", SystemEnv.getHtmlLabelName(115563, ElogSeviceUtils.currentLanguage(), "工作消息")); -// moduleMap.put("intunifybase", SystemEnv.getHtmlLabelName(115599, ElogSeviceUtils.currentLanguage(), "统一认证服务")); -// moduleMap.put("esearch", SystemEnv.getHtmlLabelName(21694, ElogSeviceUtils.currentLanguage(), "全文检索")); -// moduleMap.put("iaauthserver", SystemEnv.getHtmlLabelName(115603, ElogSeviceUtils.currentLanguage(), "统一认证注册应用")); -// moduleMap.put("excel", SystemEnv.getHtmlLabelName(115543, ElogSeviceUtils.currentLanguage(), "excel函数")); -// moduleMap.put("scene", SystemEnv.getHtmlLabelName(115539, ElogSeviceUtils.currentLanguage(), "绘图")); -// moduleMap.put("bcw", SystemEnv.getHtmlLabelName(115651, ElogSeviceUtils.currentLanguage(), "公共模块")); -// moduleMap.put("folder", SystemEnv.getHtmlLabelName(10734, ElogSeviceUtils.currentLanguage(), "文件夹")); -// moduleMap.put("pdfcnv", SystemEnv.getHtmlLabelName(115957, ElogSeviceUtils.currentLanguage(), "PDF转换服务")); -// moduleMap.put("ebform", SystemEnv.getHtmlLabelName(121462, ElogSeviceUtils.currentLanguage(), "e-Builder表单")); -// moduleMap.put("statistics", SystemEnv.getHtmlLabelName(17745, ElogSeviceUtils.currentLanguage(), "自定义统计")); -// moduleMap.put("edcapp", SystemEnv.getHtmlLabelName(121631, ElogSeviceUtils.currentLanguage(), "多级填报")); -// -// */ -// -// moduleMap.put("elog", 62975); -// moduleMap.put("report", 62976); -// moduleMap.put("edc", 52689); -// moduleMap.put("hrm", 62978); -// moduleMap.put("crm", 62979); -// moduleMap.put("demo", 62980); -// moduleMap.put("attc", 62981); -// moduleMap.put("attm", 62982); -// moduleMap.put("attw", 62983); -// moduleMap.put("auth", 62984); -// moduleMap.put("bank", 62985); -// moduleMap.put("bap", 62986); -// moduleMap.put("base", 62987); -// moduleMap.put("batc", 62988); -// moduleMap.put("blog", 62989); -// moduleMap.put("cld", 62990); -// moduleMap.put("cmca", 62991); -// moduleMap.put("cmcl", 62992); -// moduleMap.put("cmco", 62993); -// moduleMap.put("cmcp", 62994); -// moduleMap.put("cmcu", 62995); -// moduleMap.put("cmex", 62996); -// moduleMap.put("cmmk", 62997); -// moduleMap.put("cmor", 62998); -// moduleMap.put("cmpc", 62999); -// moduleMap.put("cmpr", 63000); -// moduleMap.put("cmpt", 63001); -// moduleMap.put("cmqu", 63002); -// moduleMap.put("cmsa", 63003); -// moduleMap.put("cmtr", 63004); -// moduleMap.put("comp", 63005); -// moduleMap.put("cs", 63006); -// moduleMap.put("cowork", 63007); -// moduleMap.put("dbs", 63008); -// moduleMap.put("dcad", 63009); -// moduleMap.put("dcap", 63010); -// moduleMap.put("dcrd", 63011); -// moduleMap.put("dcre", 63012); -// moduleMap.put("dcs", 63013); -// moduleMap.put("dds", 63014); -// moduleMap.put("dps", 63015); -// moduleMap.put("drle", 63016); -// moduleMap.put("ds", 63017); -// moduleMap.put("dw_etl", 63018); -// moduleMap.put("dw_model", 63019); -// moduleMap.put("dw_process", 63020); -// moduleMap.put("dw_search", 63021); -// moduleMap.put("dw_sync", 63022); -// moduleMap.put("eb", 63023); -// moduleMap.put("ebda", 62987); -// moduleMap.put("ebdd", 63024); -// moduleMap.put("ebdf", 63025); -// moduleMap.put("ebdp", 63026); -// moduleMap.put("ecod", 63027); -// moduleMap.put("ei", 63028); -// moduleMap.put("em", 63029); -// moduleMap.put("es", 63030); -// moduleMap.put("esa", 63031); -// moduleMap.put("esb", 63032); -// moduleMap.put("esch", 63033); -// moduleMap.put("esd", 63034); -// moduleMap.put("exfo", 63035); -// moduleMap.put("fbdg", 63036); -// moduleMap.put("fdt",63037); -// moduleMap.put("fexs", 63038); -// moduleMap.put("file", 63039); -// moduleMap.put("finc", 63040); -// moduleMap.put("fnar", 63041); -// moduleMap.put("fomo", 63042); -// moduleMap.put("form", 63043); -// moduleMap.put("frpt", 63043); -// moduleMap.put("fvou", 63044); -// moduleMap.put("hp", 63045); -// moduleMap.put("hr", 63046); -// moduleMap.put("ic", 63047); -// moduleMap.put("il", 63048); -// moduleMap.put("im", 63049); -// moduleMap.put("inc", 63050); -// moduleMap.put("iua", 63051); -// moduleMap.put("iut", 63052); -// moduleMap.put("mail", 63053); -// moduleMap.put("mc", 63054); -// moduleMap.put("mt", 63055); -// moduleMap.put("my", 63056); -// moduleMap.put("odoc", 63057); -// moduleMap.put("odoc_exchange", 63058); -// moduleMap.put("open", 63059); -// moduleMap.put("pr", 63060); -// moduleMap.put("proj", 63061); -// moduleMap.put("prt", 63062); -// moduleMap.put("pspt", 63063); -// moduleMap.put("rptc", 63064); -// moduleMap.put("rpts", 63065); -// moduleMap.put("sala", 63066); -// moduleMap.put("sign", 63067); -// moduleMap.put("sms", 63068); -// moduleMap.put("task", 63069); -// moduleMap.put("tnt", 63070); -// moduleMap.put("wf", 63071); -// moduleMap.put("wfc", 63072); -// moduleMap.put("wfr", 63073); -// moduleMap.put("wrgm", 63074); -// moduleMap.put("wrgp", 63075); -// moduleMap.put("wrpr", 63076); -// moduleMap.put("doc", 63077); -// moduleMap.put("placard", 63078); -// moduleMap.put("fna", 135042); -// moduleMap.put("meeting", 63080); -// moduleMap.put("wfp", 63081); -// moduleMap.put("portal", 63045); -// moduleMap.put("workreport", 63082); -// moduleMap.put("goal", 63074); -// moduleMap.put("performance", 63075); -// moduleMap.put("intlogin", 63083); -// moduleMap.put("i18n", 64559); -// moduleMap.put("timecard", 63085); -// moduleMap.put("market", 63086); -// moduleMap.put("excelformula", 64560); -// moduleMap.put("ebatch", 69280); -// moduleMap.put("ic_ldap", 70081); -// moduleMap.put("iut_c_c", 96493); -// moduleMap.put("plan", 63076); -// moduleMap.put("document", 34218); -// moduleMap.put("taskCustStatus", 73988); -// moduleMap.put("calendar", 74186); -// moduleMap.put("batch", 69280); -// moduleMap.put("project", 55158); -// moduleMap.put("web", 75598); -// moduleMap.put("formdatareport", 76068); -// moduleMap.put("mainline", 31898); -// moduleMap.put("customer", 32726); -// moduleMap.put("contract", 32864); -// moduleMap.put("group", 19426); -// moduleMap.put("workflow", 81851); -// moduleMap.put("biaoge", 30919); -// moduleMap.put("clue", 28908); -// moduleMap.put("competitor", 81852); -// moduleMap.put("kpiFlow", 81853); -// moduleMap.put("mainlineCustStatus", 81854); -// moduleMap.put("marketactivity", 34221); -// moduleMap.put("mtPhase", 81855); -// moduleMap.put("production", 29329); -// moduleMap.put("quote", 34231); -// moduleMap.put("saleChance", 32863); -// moduleMap.put("orderform", 34230); -// moduleMap.put("contact", 32711); -// moduleMap.put("price", 31922); -// moduleMap.put("capital", 83428); -// moduleMap.put("ice", 87722); -// moduleMap.put("ic_hr", 84284); -// moduleMap.put("intunifyauth", 84508); -// moduleMap.put("signcenter", 84691); -// moduleMap.put("iut_s_c", 91503); -// moduleMap.put("iut_s_c1", 95218); -// moduleMap.put("iut_s_c2", 95219); -// moduleMap.put("iut_s_c3", 95220); -// moduleMap.put("iut_c_log", 96494); -// moduleMap.put("ic_mail", 100715); -// moduleMap.put("hrsa", 105038); -// moduleMap.put("icc", 113884); -// moduleMap.put("basicserver", 113885); -// moduleMap.put("dw", 115549); -// moduleMap.put("msg", 115563); -// moduleMap.put("intunifybase", 115599); -// moduleMap.put("esearch", 21694); -// moduleMap.put("iaauthserver", 115603); -// moduleMap.put("excel", 115543); -// moduleMap.put("scene", 115539); -// moduleMap.put("bcw", 115651); -// moduleMap.put("folder", 10734); -// moduleMap.put("pdfcnv", 115957); -// moduleMap.put("login", 63063); -// moduleMap.put("ebform", 121462); -// moduleMap.put("statistics", 17745); -// moduleMap.put("edcapp", 121631); -// moduleMap.put("cusapp", 16381); -// moduleMap.put("e10-allinone-base", 141083); -// moduleMap.put("voice", 142713); -// moduleMap.put("filter", 147832); -// moduleMap.put("ias", 146674); -// moduleMap.put("device", 153666); -// moduleMap.put("meetingTopic", 180274); -// moduleMap.put("meetingService", 180276); -// moduleMap.put("meetingDecision", 180277); -// moduleMap.put("meetingSign", 180278); -// moduleMap.put("meetingSignSet", 61601); -// moduleMap.put("meetingMember", 180280); -// moduleMap.put("meetingShare", 180281); -// moduleMap.put("int", 40031); -// moduleMap.put("print", 160051); -// moduleMap.put("wcwIconUpdate", 182661); -// moduleMap.put("wcwIconRelease", 183123); -// moduleMap.put("wcwIconUse", 183124); -// moduleMap.put("wcw", 29385); -// moduleMap.put("component", 115651); -// moduleMap.put("ic_exchange", 87722); -// moduleMap.put("iut_c_c", 240048); -// moduleMap.put("iut_c_set", 240049); -// -// Map elogMap = new HashMap<>(); -// Map reportMap = new HashMap<>(); -// Map edcMap = new HashMap<>(); -// Map hrmMap = new HashMap<>(); -// Map crmMap = new HashMap<>(); -// Map demoMap = new HashMap<>(); -// -// moduleFuctionMap.put("elog", elogMap); -// moduleFuctionMap.put("report", reportMap); -// moduleFuctionMap.put("edc", edcMap); -// moduleFuctionMap.put("hrm", hrmMap); -// moduleFuctionMap.put("crm", crmMap); -// moduleFuctionMap.put("demo", demoMap); -// -// -// -// elogMap.put("operator", "日志操作"); -// elogMap.put("reportcusinfo","报表自定义"); -// edcMap.put("dataset","数据集合"); -// -// demoMap.put("reportcusinfo","报表自定义字段"); -// } -// -// /** -// * 获取模块名称 -// * @param module -// * @return -// */ -// public static String getModuleName(String module) { +package com.engine.salary.elog.util; + +import cn.hutool.core.map.CaseInsensitiveMap; +import com.alibaba.druid.proxy.jdbc.ClobProxyImpl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.cloudstore.eccom.pc.table.WeaTable; +import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.engine.salary.elog.annotation.OperateType; +import com.engine.salary.elog.enums.ElogConsts; +import com.engine.salary.util.SalaryI18nUtil; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import weaver.conn.RecordSet; + +import java.sql.Clob; +import java.util.*; + +/** + * @Date: 2022/5/18 19:34 + * @Author: deli.xu + * @Description: elog服务转换类 + **/ +public class ElogSeviceSwitchUtils { + + private static final Logger logger = LoggerFactory.getLogger(ElogSeviceSwitchUtils.class); + // TODO 后续需要考虑多语言label写法 + public static final Map moduleMap = new HashMap<>(); + + private static final Map> moduleFuctionMap = new HashMap<>(); + + static { + /*moduleMap.put("elog", SalaryI18nUtil.getI18nLabel(62975, ElogSeviceUtils.currentLanguage(), "日志")); + moduleMap.put("report", SalaryI18nUtil.getI18nLabel(62976, ElogSeviceUtils.currentLanguage(), "报表")); + moduleMap.put("edc", SalaryI18nUtil.getI18nLabel(62977, ElogSeviceUtils.currentLanguage(), "数据中心")); + moduleMap.put("hrm", SalaryI18nUtil.getI18nLabel(62978, ElogSeviceUtils.currentLanguage(), "人力资源")); + moduleMap.put("crm", SalaryI18nUtil.getI18nLabel(62979, ElogSeviceUtils.currentLanguage(), "资产")); + moduleMap.put("demo", SalaryI18nUtil.getI18nLabel(62980, ElogSeviceUtils.currentLanguage(), "示例")); + moduleMap.put("attc", SalaryI18nUtil.getI18nLabel(62981, ElogSeviceUtils.currentLanguage(), "出勤打卡")); + moduleMap.put("attm", SalaryI18nUtil.getI18nLabel(62982, ElogSeviceUtils.currentLanguage(), "出勤机")); + moduleMap.put("attw", SalaryI18nUtil.getI18nLabel(62983, ElogSeviceUtils.currentLanguage(), "出勤报表")); + moduleMap.put("auth", SalaryI18nUtil.getI18nLabel(62984, ElogSeviceUtils.currentLanguage(), "系统权限")); + moduleMap.put("bank", SalaryI18nUtil.getI18nLabel(62985, ElogSeviceUtils.currentLanguage(), "银企直联")); + moduleMap.put("bap", SalaryI18nUtil.getI18nLabel(62986, ElogSeviceUtils.currentLanguage(), "云办公")); + moduleMap.put("base", SalaryI18nUtil.getI18nLabel(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); + moduleMap.put("batc", SalaryI18nUtil.getI18nLabel(62988, ElogSeviceUtils.currentLanguage(), "导入导出")); + moduleMap.put("blog", SalaryI18nUtil.getI18nLabel(62989, ElogSeviceUtils.currentLanguage(), "日报微博")); + moduleMap.put("cld", SalaryI18nUtil.getI18nLabel(62990, ElogSeviceUtils.currentLanguage(), "日程管理")); + moduleMap.put("cmca", SalaryI18nUtil.getI18nLabel(62991, ElogSeviceUtils.currentLanguage(), "资金管理")); + moduleMap.put("cmcl", SalaryI18nUtil.getI18nLabel(62992, ElogSeviceUtils.currentLanguage(), "线索管理")); + moduleMap.put("cmco", SalaryI18nUtil.getI18nLabel(62993, ElogSeviceUtils.currentLanguage(), "联系人管理")); + moduleMap.put("cmcp", SalaryI18nUtil.getI18nLabel(62994, ElogSeviceUtils.currentLanguage(), "对手管理")); + moduleMap.put("cmcu", SalaryI18nUtil.getI18nLabel(62995, ElogSeviceUtils.currentLanguage(), "客户管理")); + moduleMap.put("cmex", SalaryI18nUtil.getI18nLabel(62996, ElogSeviceUtils.currentLanguage(), "批量操作")); + moduleMap.put("cmmk", SalaryI18nUtil.getI18nLabel(62997, ElogSeviceUtils.currentLanguage(), "营销管理")); + moduleMap.put("cmor", SalaryI18nUtil.getI18nLabel(62998, ElogSeviceUtils.currentLanguage(), "订单管理")); + moduleMap.put("cmpc", SalaryI18nUtil.getI18nLabel(62999, ElogSeviceUtils.currentLanguage(), "价格管理")); + moduleMap.put("cmpr", SalaryI18nUtil.getI18nLabel(63000, ElogSeviceUtils.currentLanguage(), "产品管理")); + moduleMap.put("cmpt", SalaryI18nUtil.getI18nLabel(63001, ElogSeviceUtils.currentLanguage(), "外部门户")); + moduleMap.put("cmqu", SalaryI18nUtil.getI18nLabel(63002, ElogSeviceUtils.currentLanguage(), "报价管理")); + moduleMap.put("cmsa", SalaryI18nUtil.getI18nLabel(63003, ElogSeviceUtils.currentLanguage(), "商机管理")); + moduleMap.put("cmtr", SalaryI18nUtil.getI18nLabel(63004, ElogSeviceUtils.currentLanguage(), "合同管理")); + moduleMap.put("comp", SalaryI18nUtil.getI18nLabel(63005, ElogSeviceUtils.currentLanguage(), "文档对比")); + moduleMap.put("cs", SalaryI18nUtil.getI18nLabel(63006, ElogSeviceUtils.currentLanguage(), "云商店")); + moduleMap.put("cowork", SalaryI18nUtil.getI18nLabel(63007, ElogSeviceUtils.currentLanguage(), "协作区")); + moduleMap.put("dbs", SalaryI18nUtil.getI18nLabel(63008, ElogSeviceUtils.currentLanguage(), "文档公共模块")); + moduleMap.put("dcad", SalaryI18nUtil.getI18nLabel(63009, ElogSeviceUtils.currentLanguage(), "数据中心运行")); + moduleMap.put("dcap", SalaryI18nUtil.getI18nLabel(63010, ElogSeviceUtils.currentLanguage(), "数据中心分析开发配置")); + moduleMap.put("dcrd", SalaryI18nUtil.getI18nLabel(63011, ElogSeviceUtils.currentLanguage(), "数据中心开发配置")); + moduleMap.put("dcre", SalaryI18nUtil.getI18nLabel(63012, ElogSeviceUtils.currentLanguage(), "数据中心分析生产运行")); + moduleMap.put("dcs", SalaryI18nUtil.getI18nLabel(63013, ElogSeviceUtils.currentLanguage(), "文档目录模块")); + moduleMap.put("dds", SalaryI18nUtil.getI18nLabel(63014, ElogSeviceUtils.currentLanguage(), "文档模块")); + moduleMap.put("dps", SalaryI18nUtil.getI18nLabel(63015, ElogSeviceUtils.currentLanguage(), "文档权限模块")); + moduleMap.put("drle", SalaryI18nUtil.getI18nLabel(63016, ElogSeviceUtils.currentLanguage(), "数据规则库")); + moduleMap.put("ds", SalaryI18nUtil.getI18nLabel(63017, ElogSeviceUtils.currentLanguage(), "数据安全")); + moduleMap.put("dw_etl", SalaryI18nUtil.getI18nLabel(63018, ElogSeviceUtils.currentLanguage(), "ETL(抽取,转换,治理)")); + moduleMap.put("dw_model", SalaryI18nUtil.getI18nLabel(63019, ElogSeviceUtils.currentLanguage(), "建模服务")); + moduleMap.put("dw_process", SalaryI18nUtil.getI18nLabel(63020, ElogSeviceUtils.currentLanguage(), "计算服务")); + moduleMap.put("dw_search", SalaryI18nUtil.getI18nLabel(63021, ElogSeviceUtils.currentLanguage(), "查询服务")); + moduleMap.put("dw_sync", SalaryI18nUtil.getI18nLabel(63022, ElogSeviceUtils.currentLanguage(), "数据抽取")); + moduleMap.put("eb", SalaryI18nUtil.getI18nLabel(63023, ElogSeviceUtils.currentLanguage(), "云桥")); + moduleMap.put("ebda", SalaryI18nUtil.getI18nLabel(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); + moduleMap.put("ebdd", SalaryI18nUtil.getI18nLabel(63024, ElogSeviceUtils.currentLanguage(), "页面设计")); + moduleMap.put("ebdf", SalaryI18nUtil.getI18nLabel(63025, ElogSeviceUtils.currentLanguage(), "表单服务")); + moduleMap.put("ebdp", SalaryI18nUtil.getI18nLabel(63026, ElogSeviceUtils.currentLanguage(), "页面管理")); + moduleMap.put("ecod", SalaryI18nUtil.getI18nLabel(63027, ElogSeviceUtils.currentLanguage(), "ecode")); + moduleMap.put("ei", SalaryI18nUtil.getI18nLabel(63028, ElogSeviceUtils.currentLanguage(), "数据导出导入")); + moduleMap.put("em", SalaryI18nUtil.getI18nLabel(63029, ElogSeviceUtils.currentLanguage(), "移动相关")); + moduleMap.put("es", SalaryI18nUtil.getI18nLabel(63030, ElogSeviceUtils.currentLanguage(), "微搜搜索")); + moduleMap.put("esa", SalaryI18nUtil.getI18nLabel(63031, ElogSeviceUtils.currentLanguage(), "微搜文件分析")); + moduleMap.put("esb", SalaryI18nUtil.getI18nLabel(63032, ElogSeviceUtils.currentLanguage(), "ESB")); + moduleMap.put("esch", SalaryI18nUtil.getI18nLabel(63033, ElogSeviceUtils.currentLanguage(), "计划任务")); + moduleMap.put("esd", SalaryI18nUtil.getI18nLabel(63034, ElogSeviceUtils.currentLanguage(), "微搜索引数据")); + moduleMap.put("exfo", SalaryI18nUtil.getI18nLabel(63035, ElogSeviceUtils.currentLanguage(), "excel函数引擎")); + moduleMap.put("fbdg", SalaryI18nUtil.getI18nLabel(63036, ElogSeviceUtils.currentLanguage(), "预算编制")); + moduleMap.put("fdt", SalaryI18nUtil.getI18nLabel(63037, ElogSeviceUtils.currentLanguage(), "表单数据")); + moduleMap.put("fexs", SalaryI18nUtil.getI18nLabel(63038, ElogSeviceUtils.currentLanguage(), "费用管理")); + moduleMap.put("file", SalaryI18nUtil.getI18nLabel(63039, ElogSeviceUtils.currentLanguage(), "文件服务")); + moduleMap.put("finc", SalaryI18nUtil.getI18nLabel(63040, ElogSeviceUtils.currentLanguage(), "微报账")); + moduleMap.put("fnar", SalaryI18nUtil.getI18nLabel(63041, ElogSeviceUtils.currentLanguage(), "财务报表")); + moduleMap.put("fomo", SalaryI18nUtil.getI18nLabel(63042, ElogSeviceUtils.currentLanguage(), "表单监控")); + moduleMap.put("form", SalaryI18nUtil.getI18nLabel(63043, ElogSeviceUtils.currentLanguage(), "表单服务")); + moduleMap.put("frpt", SalaryI18nUtil.getI18nLabel(63043, ElogSeviceUtils.currentLanguage(), "业务表单")); + moduleMap.put("fvou", SalaryI18nUtil.getI18nLabel(63044, ElogSeviceUtils.currentLanguage(), "凭证集成")); + moduleMap.put("hp", SalaryI18nUtil.getI18nLabel(63045, ElogSeviceUtils.currentLanguage(), "门户")); + moduleMap.put("hr", SalaryI18nUtil.getI18nLabel(63046, ElogSeviceUtils.currentLanguage(), "人事档案")); + moduleMap.put("ic", SalaryI18nUtil.getI18nLabel(63047, ElogSeviceUtils.currentLanguage(), "集成服务")); + moduleMap.put("il", SalaryI18nUtil.getI18nLabel(63048, ElogSeviceUtils.currentLanguage(), "集成登录")); + moduleMap.put("im", SalaryI18nUtil.getI18nLabel(63049, ElogSeviceUtils.currentLanguage(), "IM相关服务")); + moduleMap.put("inc", SalaryI18nUtil.getI18nLabel(63050, ElogSeviceUtils.currentLanguage(), "发票云服务")); + moduleMap.put("iua", SalaryI18nUtil.getI18nLabel(63051, ElogSeviceUtils.currentLanguage(), "统一认证")); + moduleMap.put("iut", SalaryI18nUtil.getI18nLabel(63052, ElogSeviceUtils.currentLanguage(), "统一待办")); + moduleMap.put("mail", SalaryI18nUtil.getI18nLabel(63053, ElogSeviceUtils.currentLanguage(), "邮件服务")); + moduleMap.put("mc", SalaryI18nUtil.getI18nLabel(63054, ElogSeviceUtils.currentLanguage(), "消息服务")); + moduleMap.put("mt", SalaryI18nUtil.getI18nLabel(63055, ElogSeviceUtils.currentLanguage(), "会议管理")); + moduleMap.put("my", SalaryI18nUtil.getI18nLabel(63056, ElogSeviceUtils.currentLanguage(), "关注&收藏&标签")); + moduleMap.put("odoc", SalaryI18nUtil.getI18nLabel(63057, ElogSeviceUtils.currentLanguage(), "公文管理")); + moduleMap.put("odoc_exchange", SalaryI18nUtil.getI18nLabel(63058, ElogSeviceUtils.currentLanguage(), "公文交换平台")); + moduleMap.put("open", SalaryI18nUtil.getI18nLabel(63059, ElogSeviceUtils.currentLanguage(), "开放平台")); + moduleMap.put("pr", SalaryI18nUtil.getI18nLabel(63060, ElogSeviceUtils.currentLanguage(), "工作画像")); + moduleMap.put("proj", SalaryI18nUtil.getI18nLabel(63061, ElogSeviceUtils.currentLanguage(), "项目管理")); + moduleMap.put("prt", SalaryI18nUtil.getI18nLabel(63062, ElogSeviceUtils.currentLanguage(), "打印服务")); + moduleMap.put("pspt", SalaryI18nUtil.getI18nLabel(63063, ElogSeviceUtils.currentLanguage(), "系统登录")); + moduleMap.put("rptc", SalaryI18nUtil.getI18nLabel(63064, ElogSeviceUtils.currentLanguage(), "数据协作")); + moduleMap.put("rpts", SalaryI18nUtil.getI18nLabel(63065, ElogSeviceUtils.currentLanguage(), "上报调查")); + moduleMap.put("sala", SalaryI18nUtil.getI18nLabel(63066, ElogSeviceUtils.currentLanguage(), "薪资管理")); + moduleMap.put("sign", SalaryI18nUtil.getI18nLabel(63067, ElogSeviceUtils.currentLanguage(), "印控中心")); + moduleMap.put("sms", SalaryI18nUtil.getI18nLabel(63068, ElogSeviceUtils.currentLanguage(), "短信")); + moduleMap.put("task", SalaryI18nUtil.getI18nLabel(63069, ElogSeviceUtils.currentLanguage(), "任务管理")); + moduleMap.put("tnt", SalaryI18nUtil.getI18nLabel(63070, ElogSeviceUtils.currentLanguage(), "租户管理")); + moduleMap.put("wf", SalaryI18nUtil.getI18nLabel(63071, ElogSeviceUtils.currentLanguage(), "路径定义")); + moduleMap.put("wfc", SalaryI18nUtil.getI18nLabel(63072, ElogSeviceUtils.currentLanguage(), "流程流转")); + moduleMap.put("wfr", SalaryI18nUtil.getI18nLabel(63073, ElogSeviceUtils.currentLanguage(), "流程规则路由")); + moduleMap.put("wrgm", SalaryI18nUtil.getI18nLabel(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); + moduleMap.put("wrgp", SalaryI18nUtil.getI18nLabel(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); + moduleMap.put("wrpr", SalaryI18nUtil.getI18nLabel(63076, ElogSeviceUtils.currentLanguage(), "计划报告")); + moduleMap.put("doc", SalaryI18nUtil.getI18nLabel(63077, ElogSeviceUtils.currentLanguage(), "文档服务")); + moduleMap.put("placard", SalaryI18nUtil.getI18nLabel(63078, ElogSeviceUtils.currentLanguage(), "团队公告")); + moduleMap.put("fna", SalaryI18nUtil.getI18nLabel(135042, ElogSeviceUtils.currentLanguage(), "云报销")); + moduleMap.put("meeting", SalaryI18nUtil.getI18nLabel(63080, ElogSeviceUtils.currentLanguage(), "会议")); + moduleMap.put("wfp", SalaryI18nUtil.getI18nLabel(63081, ElogSeviceUtils.currentLanguage(), "流程")); + moduleMap.put("portal", SalaryI18nUtil.getI18nLabel(63045, ElogSeviceUtils.currentLanguage(), "门户")); + moduleMap.put("workreport", SalaryI18nUtil.getI18nLabel(63082, ElogSeviceUtils.currentLanguage(), "工作报告")); + moduleMap.put("goal", SalaryI18nUtil.getI18nLabel(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); + moduleMap.put("performance", SalaryI18nUtil.getI18nLabel(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); + moduleMap.put("intlogin", SalaryI18nUtil.getI18nLabel(63083, ElogSeviceUtils.currentLanguage(), "集成登录设置")); + moduleMap.put("i18n", SalaryI18nUtil.getI18nLabel(64559, ElogSeviceUtils.currentLanguage(), "国际化")); + moduleMap.put("timecard", SalaryI18nUtil.getI18nLabel(63085, ElogSeviceUtils.currentLanguage(), "出勤")); + moduleMap.put("market", SalaryI18nUtil.getI18nLabel(63086, ElogSeviceUtils.currentLanguage(), "营销")); + moduleMap.put("excelformula", SalaryI18nUtil.getI18nLabel(64560, ElogSeviceUtils.currentLanguage(), "函数服务")); + moduleMap.put("ic_ldap", SalaryI18nUtil.getI18nLabel(70081, ElogSeviceUtils.currentLanguage(), "Ldap集成")); + moduleMap.put("iut_c_c", SalaryI18nUtil.getI18nLabel(70303, ElogSeviceUtils.currentLanguage(), "统一待办推送设置")); + moduleMap.put("plan", SalaryI18nUtil.getI18nLabel(70303, ElogSeviceUtils.currentLanguage(), "计划报告")); + moduleMap.put("document", SalaryI18nUtil.getI18nLabel(34218, ElogSeviceUtils.currentLanguage(), "文档")); + moduleMap.put("taskCustStatus", SalaryI18nUtil.getI18nLabel(73988, ElogSeviceUtils.currentLanguage(), "任务状态")); + moduleMap.put("project", SalaryI18nUtil.getI18nLabel(55158, ElogSeviceUtils.currentLanguage(), "项目")); + moduleMap.put("calendar", SalaryI18nUtil.getI18nLabel(74186, ElogSeviceUtils.currentLanguage(), "日历")); + moduleMap.put("web", SalaryI18nUtil.getI18nLabel(75598, ElogSeviceUtils.currentLanguage(), "浏览")); + moduleMap.put("formdatareport", SalaryI18nUtil.getI18nLabel(76068, ElogSeviceUtils.currentLanguage(), "来自上报数据")); + moduleMap.put("mainline", SalaryI18nUtil.getI18nLabel(31898, ElogSeviceUtils.currentLanguage(), "主线")); + moduleMap.put("customer", SalaryI18nUtil.getI18nLabel(32726, ElogSeviceUtils.currentLanguage(), "客户")); + moduleMap.put("contract", SalaryI18nUtil.getI18nLabel(32864, ElogSeviceUtils.currentLanguage(), "合同")); + moduleMap.put("group", SalaryI18nUtil.getI18nLabel(19426, ElogSeviceUtils.currentLanguage(), "分组")); + moduleMap.put("workflow", SalaryI18nUtil.getI18nLabel(81851, ElogSeviceUtils.currentLanguage(), "工作流程")); + moduleMap.put("biaoge", SalaryI18nUtil.getI18nLabel(30919, ElogSeviceUtils.currentLanguage(), "表格")); + moduleMap.put("clue", SalaryI18nUtil.getI18nLabel(28908, ElogSeviceUtils.currentLanguage(), "线索")); + moduleMap.put("competitor", SalaryI18nUtil.getI18nLabel(81852, ElogSeviceUtils.currentLanguage(), "竞争对手")); + moduleMap.put("kpiFlow", SalaryI18nUtil.getI18nLabel(81853, ElogSeviceUtils.currentLanguage(), "kpil流程")); + moduleMap.put("mainlineCustStatus", SalaryI18nUtil.getI18nLabel(81854, ElogSeviceUtils.currentLanguage(), "主线客户状态")); + moduleMap.put("marketactivity", SalaryI18nUtil.getI18nLabel(34221, ElogSeviceUtils.currentLanguage(), "市场活动")); + moduleMap.put("mtPhase", SalaryI18nUtil.getI18nLabel(81855, ElogSeviceUtils.currentLanguage(), "mt阶段")); + moduleMap.put("production", SalaryI18nUtil.getI18nLabel(29329, ElogSeviceUtils.currentLanguage(), "产品")); + moduleMap.put("quote", SalaryI18nUtil.getI18nLabel(34231, ElogSeviceUtils.currentLanguage(), "报价")); + moduleMap.put("saleChance", SalaryI18nUtil.getI18nLabel(32863, ElogSeviceUtils.currentLanguage(), "商机")); + moduleMap.put("orderform", SalaryI18nUtil.getI18nLabel(34230, ElogSeviceUtils.currentLanguage(), "订单")); + moduleMap.put("contact", SalaryI18nUtil.getI18nLabel(32711, ElogSeviceUtils.currentLanguage(), "联系人")); + moduleMap.put("price", SalaryI18nUtil.getI18nLabel(31922, ElogSeviceUtils.currentLanguage(), "价格")); + moduleMap.put("capital", SalaryI18nUtil.getI18nLabel(83428, ElogSeviceUtils.currentLanguage(), "资金")); + moduleMap.put("ice", SalaryI18nUtil.getI18nLabel(94360, ElogSeviceUtils.currentLanguage(), "日程会议集成")); + moduleMap.put("ic_hr", SalaryI18nUtil.getI18nLabel(84284, ElogSeviceUtils.currentLanguage(), "HR同步")); + moduleMap.put("intunifyauth", SalaryI18nUtil.getI18nLabel(84467, ElogSeviceUtils.currentLanguage(), "统一认证接入管理")); + moduleMap.put("signcenter", SalaryI18nUtil.getI18nLabel(84691, ElogSeviceUtils.currentLanguage(), "电子签")); + moduleMap.put("iut_s_c", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-异构系统")); + moduleMap.put("iut_s_c1", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统")); + moduleMap.put("iut_s_c2", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办中心")); + moduleMap.put("iut_s_c3", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统-流程类型")); + moduleMap.put("ic_mail", SalaryI18nUtil.getI18nLabel(100715, ElogSeviceUtils.currentLanguage(), "邮箱集成")); + moduleMap.put("hrsa", SalaryI18nUtil.getI18nLabel(105038, ElogSeviceUtils.currentLanguage(), "薪酬管理")); + moduleMap.put("icc", SalaryI18nUtil.getI18nLabel(113884, ElogSeviceUtils.currentLanguage(), "转换规则")); + moduleMap.put("basicserver", SalaryI18nUtil.getI18nLabel(113885, ElogSeviceUtils.currentLanguage(), "整体基础")); + moduleMap.put("dw", SalaryI18nUtil.getI18nLabel(115549, ElogSeviceUtils.currentLanguage(), "数据仓库")); + moduleMap.put("msg", SalaryI18nUtil.getI18nLabel(115563, ElogSeviceUtils.currentLanguage(), "工作消息")); + moduleMap.put("intunifybase", SalaryI18nUtil.getI18nLabel(115599, ElogSeviceUtils.currentLanguage(), "统一认证服务")); + moduleMap.put("esearch", SalaryI18nUtil.getI18nLabel(21694, ElogSeviceUtils.currentLanguage(), "全文检索")); + moduleMap.put("iaauthserver", SalaryI18nUtil.getI18nLabel(115603, ElogSeviceUtils.currentLanguage(), "统一认证注册应用")); + moduleMap.put("excel", SalaryI18nUtil.getI18nLabel(115543, ElogSeviceUtils.currentLanguage(), "excel函数")); + moduleMap.put("scene", SalaryI18nUtil.getI18nLabel(115539, ElogSeviceUtils.currentLanguage(), "绘图")); + moduleMap.put("bcw", SalaryI18nUtil.getI18nLabel(115651, ElogSeviceUtils.currentLanguage(), "公共模块")); + moduleMap.put("folder", SalaryI18nUtil.getI18nLabel(10734, ElogSeviceUtils.currentLanguage(), "文件夹")); + moduleMap.put("pdfcnv", SalaryI18nUtil.getI18nLabel(115957, ElogSeviceUtils.currentLanguage(), "PDF转换服务")); + moduleMap.put("ebform", SalaryI18nUtil.getI18nLabel(121462, ElogSeviceUtils.currentLanguage(), "e-Builder表单")); + moduleMap.put("statistics", SalaryI18nUtil.getI18nLabel(17745, ElogSeviceUtils.currentLanguage(), "自定义统计")); + moduleMap.put("edcapp", SalaryI18nUtil.getI18nLabel(121631, ElogSeviceUtils.currentLanguage(), "多级填报")); + + */ + + moduleMap.put("elog", 62975); + moduleMap.put("report", 62976); + moduleMap.put("edc", 52689); + moduleMap.put("hrm", 62978); + moduleMap.put("crm", 62979); + moduleMap.put("demo", 62980); + moduleMap.put("attc", 62981); + moduleMap.put("attm", 62982); + moduleMap.put("attw", 62983); + moduleMap.put("auth", 62984); + moduleMap.put("bank", 62985); + moduleMap.put("bap", 62986); + moduleMap.put("base", 62987); + moduleMap.put("batc", 62988); + moduleMap.put("blog", 62989); + moduleMap.put("cld", 62990); + moduleMap.put("cmca", 62991); + moduleMap.put("cmcl", 62992); + moduleMap.put("cmco", 62993); + moduleMap.put("cmcp", 62994); + moduleMap.put("cmcu", 62995); + moduleMap.put("cmex", 62996); + moduleMap.put("cmmk", 62997); + moduleMap.put("cmor", 62998); + moduleMap.put("cmpc", 62999); + moduleMap.put("cmpr", 63000); + moduleMap.put("cmpt", 63001); + moduleMap.put("cmqu", 63002); + moduleMap.put("cmsa", 63003); + moduleMap.put("cmtr", 63004); + moduleMap.put("comp", 63005); + moduleMap.put("cs", 63006); + moduleMap.put("cowork", 63007); + moduleMap.put("dbs", 63008); + moduleMap.put("dcad", 63009); + moduleMap.put("dcap", 63010); + moduleMap.put("dcrd", 63011); + moduleMap.put("dcre", 63012); + moduleMap.put("dcs", 63013); + moduleMap.put("dds", 63014); + moduleMap.put("dps", 63015); + moduleMap.put("drle", 63016); + moduleMap.put("ds", 63017); + moduleMap.put("dw_etl", 63018); + moduleMap.put("dw_model", 63019); + moduleMap.put("dw_process", 63020); + moduleMap.put("dw_search", 63021); + moduleMap.put("dw_sync", 63022); + moduleMap.put("eb", 63023); + moduleMap.put("ebda", 62987); + moduleMap.put("ebdd", 63024); + moduleMap.put("ebdf", 63025); + moduleMap.put("ebdp", 63026); + moduleMap.put("ecod", 63027); + moduleMap.put("ei", 63028); + moduleMap.put("em", 63029); + moduleMap.put("es", 63030); + moduleMap.put("esa", 63031); + moduleMap.put("esb", 63032); + moduleMap.put("esch", 63033); + moduleMap.put("esd", 63034); + moduleMap.put("exfo", 63035); + moduleMap.put("fbdg", 63036); + moduleMap.put("fdt", 63037); + moduleMap.put("fexs", 63038); + moduleMap.put("file", 63039); + moduleMap.put("finc", 63040); + moduleMap.put("fnar", 63041); + moduleMap.put("fomo", 63042); + moduleMap.put("form", 63043); + moduleMap.put("frpt", 63043); + moduleMap.put("fvou", 63044); + moduleMap.put("hp", 63045); + moduleMap.put("hr", 63046); + moduleMap.put("ic", 63047); + moduleMap.put("il", 63048); + moduleMap.put("im", 63049); + moduleMap.put("inc", 63050); + moduleMap.put("iua", 63051); + moduleMap.put("iut", 63052); + moduleMap.put("mail", 63053); + moduleMap.put("mc", 63054); + moduleMap.put("mt", 63055); + moduleMap.put("my", 63056); + moduleMap.put("odoc", 63057); + moduleMap.put("odoc_exchange", 63058); + moduleMap.put("open", 63059); + moduleMap.put("pr", 63060); + moduleMap.put("proj", 63061); + moduleMap.put("prt", 63062); + moduleMap.put("pspt", 63063); + moduleMap.put("rptc", 63064); + moduleMap.put("rpts", 63065); + moduleMap.put("sala", 63066); + moduleMap.put("sign", 63067); + moduleMap.put("sms", 63068); + moduleMap.put("task", 63069); + moduleMap.put("tnt", 63070); + moduleMap.put("wf", 63071); + moduleMap.put("wfc", 63072); + moduleMap.put("wfr", 63073); + moduleMap.put("wrgm", 63074); + moduleMap.put("wrgp", 63075); + moduleMap.put("wrpr", 63076); + moduleMap.put("doc", 63077); + moduleMap.put("placard", 63078); + moduleMap.put("fna", 135042); + moduleMap.put("meeting", 63080); + moduleMap.put("wfp", 63081); + moduleMap.put("portal", 63045); + moduleMap.put("workreport", 63082); + moduleMap.put("goal", 63074); + moduleMap.put("performance", 63075); + moduleMap.put("intlogin", 63083); + moduleMap.put("i18n", 64559); + moduleMap.put("timecard", 63085); + moduleMap.put("market", 63086); + moduleMap.put("excelformula", 64560); + moduleMap.put("ebatch", 69280); + moduleMap.put("ic_ldap", 70081); + moduleMap.put("iut_c_c", 96493); + moduleMap.put("plan", 63076); + moduleMap.put("document", 34218); + moduleMap.put("taskCustStatus", 73988); + moduleMap.put("calendar", 74186); + moduleMap.put("batch", 69280); + moduleMap.put("project", 55158); + moduleMap.put("web", 75598); + moduleMap.put("formdatareport", 76068); + moduleMap.put("mainline", 31898); + moduleMap.put("customer", 32726); + moduleMap.put("contract", 32864); + moduleMap.put("group", 19426); + moduleMap.put("workflow", 81851); + moduleMap.put("biaoge", 30919); + moduleMap.put("clue", 28908); + moduleMap.put("competitor", 81852); + moduleMap.put("kpiFlow", 81853); + moduleMap.put("mainlineCustStatus", 81854); + moduleMap.put("marketactivity", 34221); + moduleMap.put("mtPhase", 81855); + moduleMap.put("production", 29329); + moduleMap.put("quote", 34231); + moduleMap.put("saleChance", 32863); + moduleMap.put("orderform", 34230); + moduleMap.put("contact", 32711); + moduleMap.put("price", 31922); + moduleMap.put("capital", 83428); + moduleMap.put("ice", 87722); + moduleMap.put("ic_hr", 84284); + moduleMap.put("intunifyauth", 84508); + moduleMap.put("signcenter", 84691); + moduleMap.put("iut_s_c", 91503); + moduleMap.put("iut_s_c1", 95218); + moduleMap.put("iut_s_c2", 95219); + moduleMap.put("iut_s_c3", 95220); + moduleMap.put("iut_c_log", 96494); + moduleMap.put("ic_mail", 100715); + moduleMap.put("hrsa", 105038); + moduleMap.put("icc", 113884); + moduleMap.put("basicserver", 113885); + moduleMap.put("dw", 115549); + moduleMap.put("msg", 115563); + moduleMap.put("intunifybase", 115599); + moduleMap.put("esearch", 21694); + moduleMap.put("iaauthserver", 115603); + moduleMap.put("excel", 115543); + moduleMap.put("scene", 115539); + moduleMap.put("bcw", 115651); + moduleMap.put("folder", 10734); + moduleMap.put("pdfcnv", 115957); + moduleMap.put("login", 63063); + moduleMap.put("ebform", 121462); + moduleMap.put("statistics", 17745); + moduleMap.put("edcapp", 121631); + moduleMap.put("cusapp", 16381); + moduleMap.put("e10-allinone-base", 141083); + moduleMap.put("voice", 142713); + moduleMap.put("filter", 147832); + moduleMap.put("ias", 146674); + moduleMap.put("device", 153666); + moduleMap.put("meetingTopic", 180274); + moduleMap.put("meetingService", 180276); + moduleMap.put("meetingDecision", 180277); + moduleMap.put("meetingSign", 180278); + moduleMap.put("meetingSignSet", 61601); + moduleMap.put("meetingMember", 180280); + moduleMap.put("meetingShare", 180281); + moduleMap.put("int", 40031); + moduleMap.put("print", 160051); + moduleMap.put("wcwIconUpdate", 182661); + moduleMap.put("wcwIconRelease", 183123); + moduleMap.put("wcwIconUse", 183124); + moduleMap.put("wcw", 29385); + moduleMap.put("component", 115651); + moduleMap.put("ic_exchange", 87722); + moduleMap.put("iut_c_c", 240048); + moduleMap.put("iut_c_set", 240049); + + Map elogMap = new HashMap<>(); + Map reportMap = new HashMap<>(); + Map edcMap = new HashMap<>(); + Map hrmMap = new HashMap<>(); + Map crmMap = new HashMap<>(); + Map demoMap = new HashMap<>(); + + moduleFuctionMap.put("elog", elogMap); + moduleFuctionMap.put("report", reportMap); + moduleFuctionMap.put("edc", edcMap); + moduleFuctionMap.put("hrm", hrmMap); + moduleFuctionMap.put("crm", crmMap); + moduleFuctionMap.put("demo", demoMap); + + + elogMap.put("operator", "日志操作"); + elogMap.put("reportcusinfo", "报表自定义"); + edcMap.put("dataset", "数据集合"); + + demoMap.put("reportcusinfo", "报表自定义字段"); + } + + /** + * 获取模块名称 + * + * @param module + * @return + */ + public static String getModuleName(String module) { // String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); -// -// return ElogSeviceUtils.isLongValue(modulename) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulename),modulename) : modulename; -// } -// -// /** -// * 获取模块名称 -// * @param module -// * @return -// */ -// public static String getModuleNamePapi(String module) { +// return ElogSeviceUtils.isLongValue(modulename) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(modulename), modulename) : modulename; + return module; + } + + /** + * 获取模块名称 + * + * @param module + * @return + */ + public static String getModuleNamePapi(String module) { // String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); -// -// return ElogSeviceUtils.isLongValue(modulename) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulename),modulename) : modulename; -// } -// -// -// /** -// * 获取方法名称 -// * @param module -// * @param function -// * @return -// */ -// public static String getFunctionName(String module, String function) { +// return ElogSeviceUtils.isLongValue(modulename) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(modulename), modulename) : modulename; + return module; + } + + + /** + * 获取方法名称 + * + * @param module + * @param function + * @return + */ + public static String getFunctionName(String module, String function) { // Map functionMap = moduleFuctionMap.get(module); // -// if(functionMap != null) -// function = ElogSeviceUtils.null2String(functionMap.get(function),function); +// if (functionMap != null) +// function = ElogSeviceUtils.null2String(functionMap.get(function), function); // -// return ElogSeviceUtils.isLongValue(function) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(function),function) : function; -// } -// -// public static void switchValues(List resultMap, List recordColumns) { -// -// switchValues(resultMap,recordColumns,false); -// -// } -// -// -// public static void switchValues(List list,List recordColumns, boolean islocal) { -//// if(!islocal) { -//// changKey2Lower(list); -//// } -// for(Map map : list) { -// Iterator> iterator = map.entrySet().iterator(); -// while (iterator.hasNext()) { -// Map.Entry next = iterator.next(); -// for (String recordColumn : recordColumns) { -// if (next.getKey().equals(recordColumn) && next.getValue() instanceof String) { -// map.put(next.getKey(), transfi18Method(next.getValue())); -// } -// } -// } -// map.put("modulenamespan", getModuleName(map.get("modulename"))); -// //map.put("functionnamespan", getFunctionName(map.get("modulename"), map.get("functionname"))); -// //switchDatabaseField(map); +// return ElogSeviceUtils.isLongValue(function) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(function), function) : function; + return function; + } + + public static void switchValues(List resultMap, List recordColumns) { + + switchValues(resultMap, recordColumns, false); + + } + + + public static void switchValues(List list, List recordColumns, boolean islocal) { +// if(!islocal) { +// changKey2Lower(list); // } -// -// } -// -// public static void switchDatabaseField(Map map) { -// map.put("date", map.get("log_date")); -// map.put("operator", map.get("log_operator")); -// map.put("result", map.get("log_result")); -// } -// -// /** -// * 转换数据成多语言 -// * @param lists -// */ -// public static List transfLanguageData(List lists) { -// if (lists != null && lists.size() > 0) { -// for (Map map : lists) { -// if (map != null) { -// Iterator> iterator = map.entrySet().iterator(); -// while (iterator.hasNext()) { -// Map.Entry entry = iterator.next(); -// if (entry.getValue() instanceof Integer ||entry.getValue() instanceof Long||entry.getValue()instanceof String) { -// map.put(entry.getKey(), transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()),entry.getValue().toString())); -// }else{ -// map.put(entry.getKey(), entry.getValue()); -// } -// } -// } -// } -// } -// return lists; -// } -// -// public static String transfi18Method(String str) { -// if ("新增".equals(str)){ -// return transfLanguageLableid(63252l,str); -// } else if ("查看".equals(str)) { -// return transfLanguageLableid(55172l,str); -// }else if ("修改".equals(str)) { -// return transfLanguageLableid(63253l,str); -// }else if ("更新".equals(str)) { -// return transfLanguageLableid(29540l,str); -// }else if ("删除".equals(str)) { -// return transfLanguageLableid(63254l,str); -// }else if (StringUtils.isNumeric(str) && str.length()< 10) { -// return transfLanguageLableid(Long.parseLong(str),str); -// }else { -// return str; -// } -// } -// -// public static String transfLanguageLableid(Long lableid) { -// return SystemEnv.getHtmlLabelName(lableid, lableid.toString()); -// } -// -// /** -// * 转换多语言 -// * @param lableid -// * @param def -// * @return -// */ -// public static String transfLanguageLableid(Long lableid,String def) { -// return SystemEnv.getHtmlLabelName(lableid, def); -// } -// -// -// /** -// * 日志本地服务-更新明细转换 -// * -// * @param mainlist -// * @param list -// * @return -// */ -// public static Map switchChangeValue(List mainlist, List list) { -// Map res = new HashMap<>(); -// StringBuilder valuesChange = new StringBuilder(); -// List valuesChanges = new ArrayList<>(); -// String values = ""; -// String operatetypeName = ""; -// int oldCount = 0; -// int newCount = 0; -// String operatetype = ""; -// CaseInsensitiveMap map = null; -// if (list != null && list.size() > 0) { -// for (Map hashmap : list) { -// map = new CaseInsensitiveMap<>(hashmap); -// Object obj = map.get("operatetype"); -// if (obj != null) { -// operatetype = obj.toString(); -// } -// } -// } -// if (mainlist != null && mainlist.size() > 0) { -// for (Map hashMap : mainlist) { -// map = new CaseInsensitiveMap<>(hashMap); -// Object isdetail = map.get("isdetail"); -// if (isdetail != null) { -// if (StringUtils.isBlank(isdetail.toString())||!"0".equals(isdetail.toString())){ -// continue; -// } -// }else{ -// continue; -// } -// Object oldvalue = map.get("oldvalue"); -// if (oldvalue != null) { -// if (StringUtils.isNotBlank(oldvalue.toString())) { -// oldCount++; -// } -// } -// -// Object newvalue = map.get("newvalue"); -// if (newvalue != null) { -// if (StringUtils.isNotBlank(newvalue.toString())) { -// newCount++; -// } -// } -// -// } -// } -// CaseInsensitiveMap jo = null; -// for(int i = 0 ; i < mainlist.size(); i++) { -// Map jomap = mainlist.get(i); -// jo = new CaseInsensitiveMap<>(jomap); -// String fieldName = jo.get("fielddesc"); -// String oldvalue = obj2String(jo.get("oldvalue")); -// String oldrealvalue = obj2String(jo.get("oldrealvalue")); -// String newValue = obj2String(jo.get("newvalue")); -// String newrealvalue = obj2String(jo.get("newrealvalue")); -// // oracle.sql.CLOB类型处理 -// jomap.put("oldvalue", oldvalue); -// jomap.put("oldrealvalue", oldrealvalue); -// jomap.put("newvalue", newValue); -// jomap.put("newrealvalue", newrealvalue); -// -// String fieldNameLabelId = jo.get("fieldnamelabelid"); -// if (StringUtils.isNotBlank(fieldNameLabelId)&&StringUtils.isNumeric(fieldNameLabelId)) { -// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId),fieldName); -// } else if (StringUtils.isNotBlank(fieldNameLabelId)&&!StringUtils.isNumeric(fieldNameLabelId) && !"-1".equals(fieldNameLabelId)) { -// fieldName = fieldNameLabelId; -// } else if (StringUtils.isNotBlank(fieldName)&&StringUtils.isNumeric(fieldName)) { -// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldName),fieldName); -// } -// if (StringUtils.isNotBlank(oldrealvalue)&&StringUtils.isNumeric(oldrealvalue)) { -// oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue),oldvalue); -// }else if (StringUtils.isNotBlank(oldrealvalue)&&!StringUtils.isNumeric(oldrealvalue)) { -// oldvalue = oldrealvalue; -// } -// if (StringUtils.isNotBlank(newrealvalue)&&StringUtils.isNumeric(newrealvalue)) { -// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue),newValue); -// }else if (StringUtils.isNotBlank(newrealvalue)&&!StringUtils.isNumeric(newrealvalue)) { -// newValue = newrealvalue; -// } -// -// //oldvalue,newValue 避免xss漏洞 分别进行转义 + for (Map map : list) { + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry next = iterator.next(); + for (String recordColumn : recordColumns) { + if (next.getKey().equals(recordColumn) && next.getValue() instanceof String) { + map.put(next.getKey(), transfi18Method(next.getValue())); + } + } + } + map.put("modulenamespan", getModuleName(map.get("modulename"))); + //map.put("functionnamespan", getFunctionName(map.get("modulename"), map.get("functionname"))); + //switchDatabaseField(map); + } + + } + + public static void switchDatabaseField(Map map) { + map.put("date", map.get("log_date")); + map.put("operator", map.get("log_operator")); + map.put("result", map.get("log_result")); + } + + /** + * 转换数据成多语言 + * + * @param lists + */ + public static List transfLanguageData(List lists) { + if (lists != null && lists.size() > 0) { + for (Map map : lists) { + if (map != null) { + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + if (entry.getValue() instanceof Integer || entry.getValue() instanceof Long || entry.getValue() instanceof String) { + map.put(entry.getKey(), transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()), entry.getValue().toString())); + } else { + map.put(entry.getKey(), entry.getValue()); + } + } + } + } + } + return lists; + } + + public static String transfi18Method(String str) { + if ("新增".equals(str)) { + return transfLanguageLableid(63252l, str); + } else if ("查看".equals(str)) { + return transfLanguageLableid(55172l, str); + } else if ("修改".equals(str)) { + return transfLanguageLableid(63253l, str); + } else if ("更新".equals(str)) { + return transfLanguageLableid(29540l, str); + } else if ("删除".equals(str)) { + return transfLanguageLableid(63254l, str); + } else if (StringUtils.isNumeric(str) && str.length() < 10) { + return transfLanguageLableid(Long.parseLong(str), str); + } else { + return str; + } + } + + public static String transfLanguageLableid(Long lableid) { + return SalaryI18nUtil.getI18nLabel(Integer.parseInt(lableid.toString()), lableid.toString()); + } + + /** + * 转换多语言 + * + * @param lableid + * @param def + * @return + */ + public static String transfLanguageLableid(Long lableid, String def) { + return SalaryI18nUtil.getI18nLabel(Integer.parseInt(lableid.toString()), def); + } + + + /** + * 日志本地服务-更新明细转换 + * + * @param mainlist + * @param list + * @return + */ + public static Map switchChangeValue(List mainlist, List list) { + Map res = new HashMap<>(); + StringBuilder valuesChange = new StringBuilder(); + List valuesChanges = new ArrayList<>(); + String values = ""; + String operatetypeName = ""; + int oldCount = 0; + int newCount = 0; + String operatetype = ""; + CaseInsensitiveMap map = null; + if (list != null && list.size() > 0) { + for (Map hashmap : list) { + map = new CaseInsensitiveMap<>(hashmap); + Object obj = map.get("operatetype"); + if (obj != null) { + operatetype = obj.toString(); + } + } + } + if (mainlist != null && mainlist.size() > 0) { + for (Map hashMap : mainlist) { + map = new CaseInsensitiveMap<>(hashMap); + Object isdetail = map.get("isdetail"); + if (isdetail != null) { + if (StringUtils.isBlank(isdetail.toString()) || !"0".equals(isdetail.toString())) { + continue; + } + } else { + continue; + } + Object oldvalue = map.get("oldvalue"); + if (oldvalue != null) { + if (StringUtils.isNotBlank(oldvalue.toString())) { + oldCount++; + } + } + + Object newvalue = map.get("newvalue"); + if (newvalue != null) { + if (StringUtils.isNotBlank(newvalue.toString())) { + newCount++; + } + } + + } + } + CaseInsensitiveMap jo = null; + for (int i = 0; i < mainlist.size(); i++) { + Map jomap = mainlist.get(i); + jo = new CaseInsensitiveMap<>(jomap); + String fieldName = jo.get("fielddesc"); + String oldvalue = obj2String(jo.get("oldvalue")); + String oldrealvalue = obj2String(jo.get("oldrealvalue")); + String newValue = obj2String(jo.get("newvalue")); + String newrealvalue = obj2String(jo.get("newrealvalue")); + // oracle.sql.CLOB类型处理 + jomap.put("oldvalue", oldvalue); + jomap.put("oldrealvalue", oldrealvalue); + jomap.put("newvalue", newValue); + jomap.put("newrealvalue", newrealvalue); + + String fieldNameLabelId = jo.get("fieldnamelabelid"); + if (StringUtils.isNotBlank(fieldNameLabelId) && StringUtils.isNumeric(fieldNameLabelId)) { + fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId), fieldName); + } else if (StringUtils.isNotBlank(fieldNameLabelId) && !StringUtils.isNumeric(fieldNameLabelId) && !"-1".equals(fieldNameLabelId)) { + fieldName = fieldNameLabelId; + } else if (StringUtils.isNotBlank(fieldName) && StringUtils.isNumeric(fieldName)) { + fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldName), fieldName); + } + if (StringUtils.isNotBlank(oldrealvalue) && StringUtils.isNumeric(oldrealvalue)) { + oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue), oldvalue); + } else if (StringUtils.isNotBlank(oldrealvalue) && !StringUtils.isNumeric(oldrealvalue)) { + oldvalue = oldrealvalue; + } + if (StringUtils.isNotBlank(newrealvalue) && StringUtils.isNumeric(newrealvalue)) { + newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue), newValue); + } else if (StringUtils.isNotBlank(newrealvalue) && !StringUtils.isNumeric(newrealvalue)) { + newValue = newrealvalue; + } + + //oldvalue,newValue 避免xss漏洞 分别进行转义 // oldvalue = StringConversionForXSS(oldvalue); // newValue = StringConversionForXSS(newValue); -// -// if (oldCount != 0) { -// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); -// -// } else if (oldCount == 0 || newCount==0 || operatetype.startsWith(OperateType.add)||operatetype.startsWith(OperateType.delete)) { -// valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); -// -// } else { -// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); -// } -// //} -// /*if (valuesChange.length() > 3) { -// values = valuesChange.substring(0, valuesChange.length() - 3); -// }*/ -// } -// -// res.put("valueschanges", valuesChanges); -// res.put("detailcontexts", mainlist); -// return res; -// } -// -// private static String obj2String(Object o) { -// if (o == null) { -// return ""; -// } -// if (o instanceof String) { -// return (String) o; -// } -// return JSON.toJSONString(o); -// } -// -// /** -// * 服务中心结果集转换 -// */ -// public static void switchChangeValues(List list) { -// CaseInsensitiveMap map = null; -// for(Map hashMap : list) { -// map = new CaseInsensitiveMap<>(hashMap); -// int count = 0; -// StringBuilder valuesChange = new StringBuilder(); -// List valuesChanges = new ArrayList(); -// Object detailContexts = map.get("detailcontexts"); -// if(detailContexts != null) { -// JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); -// for(int i = 0 ; i < jsonArray.size(); i++) { -// JSONObject jo = jsonArray.getJSONObject(i); -// String isDetail = jo.getString("isDetail"); -// if (StringUtils.isBlank(isDetail)||!"0".equals(isDetail)){ -// continue; -// } -// String oldvalue = jo.getString("oldValue"); -// if (StringUtils.isNotBlank(oldvalue)) { -// count++; -// } -// } -// } -// -// if(detailContexts != null) { -// JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); -// for(int i = 0 ; i < jsonArray.size(); i++) { -// JSONObject jo = jsonArray.getJSONObject(i); -// String isDetail = jo.getString("isDetail"); -// if (StringUtils.isBlank(isDetail)||!"0".equals(isDetail)){ -// continue; -// } -// String fieldName = jo.getString("fieldDesc"); -// String oldvalue = jo.getString("oldValue"); -// String oldrealvalue = jo.getString("oldRealValue"); -// String newValue = jo.getString("newValue"); -// String newrealvalue = jo.getString("newRealValue"); -// String fieldNameLabelId = jo.getString("fieldNameLabelId"); -// if (StringUtils.isNotBlank(fieldNameLabelId)&&StringUtils.isNumeric(fieldNameLabelId)) { -// fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId)); -// } -// if (StringUtils.isNotBlank(oldrealvalue)&&StringUtils.isNumeric(oldrealvalue)) { -// oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue)); -// } -// if (StringUtils.isNotBlank(newrealvalue)&&StringUtils.isNumeric(newrealvalue)) { -// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue)); -// } -// if (count == 0) { -// valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); -// } else { -// valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); -// } -// -// } -// /*String values = ""; -// if (valuesChange.length() > 3) { -// values = valuesChange.substring(0, valuesChange.length() - 3); -// }*/ -// -// map.put("valueschanges", valuesChanges); -// } -// -// } -// } -// -// public static String valueChangeNewFormat(){ -// return "【%s】:%s"; -// } -// public static String valueChangeFormat(){ -// return "【%s】:"+SystemEnv.getHtmlLabelName(61695,"由")+ -// "[%s] "+SystemEnv.getHtmlLabelName(61697,"改为")+" [%s]"; -// } -// -// public static void changKey2Lower(List list) { -// -// List newList = new ArrayList<>(); -// for(Map orgMap : list) { -// Map resultMap = new HashMap<>(); -// -// if (orgMap == null || orgMap.isEmpty()) { -// newList.add(resultMap); -// continue; -// } -// -// Set keySet = orgMap.keySet(); -// for (String key : keySet) { -// resultMap.put(key != null ? key.toLowerCase() : "", orgMap.get(key)); -// } -// newList.add(resultMap); -// } -// list.clear(); -// list.addAll(newList); -// } -// -// /** -// * 查看详细表的数据 -// * @param list -// */ -// public static Map switchDetailChangeValue(List list) { -// Map res = new HashMap<>(); -// List> lists = new ArrayList<>(); -// HashMap repeatTableName = new HashMap<>(); -// CaseInsensitiveMap map = null; -// for (Map hashMap : list) { -// map = new CaseInsensitiveMap<>(hashMap); -// List detailmap = new ArrayList<>(); -// HashMap detailoldMap= new HashMap<>(); -// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",map.get("dataid")); -// HashMap detailnewMap= new HashMap<>(); -// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",map.get("dataid")); -// detailmap.add(detailoldMap); -// detailmap.add(detailnewMap); -// WeaTable wea = new WeaTable(); -// wea.getColumns().add(new WeaTableColumn(SystemEnv.getHtmlLabelName(63250,"操作"), "operator", "5%")); + + if (oldCount != 0) { + valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); + + } else if (oldCount == 0 || newCount == 0 || operatetype.startsWith(OperateType.add) || operatetype.startsWith(OperateType.delete)) { + valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); + + } else { + valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); + } + //} + /*if (valuesChange.length() > 3) { + values = valuesChange.substring(0, valuesChange.length() - 3); + }*/ + } + + res.put("valueschanges", valuesChanges); + res.put("detailcontexts", mainlist); + return res; + } + + private static String obj2String(Object o) { + if (o == null) { + return ""; + } + if (o instanceof String) { + return (String) o; + } + return JSON.toJSONString(o); + } + + /** + * 服务中心结果集转换 + */ + public static void switchChangeValues(List list) { + CaseInsensitiveMap map = null; + for (Map hashMap : list) { + map = new CaseInsensitiveMap<>(hashMap); + int count = 0; + StringBuilder valuesChange = new StringBuilder(); + List valuesChanges = new ArrayList(); + Object detailContexts = map.get("detailcontexts"); + if (detailContexts != null) { + JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jo = jsonArray.getJSONObject(i); + String isDetail = jo.getString("isDetail"); + if (StringUtils.isBlank(isDetail) || !"0".equals(isDetail)) { + continue; + } + String oldvalue = jo.getString("oldValue"); + if (StringUtils.isNotBlank(oldvalue)) { + count++; + } + } + } + + if (detailContexts != null) { + JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jo = jsonArray.getJSONObject(i); + String isDetail = jo.getString("isDetail"); + if (StringUtils.isBlank(isDetail) || !"0".equals(isDetail)) { + continue; + } + String fieldName = jo.getString("fieldDesc"); + String oldvalue = jo.getString("oldValue"); + String oldrealvalue = jo.getString("oldRealValue"); + String newValue = jo.getString("newValue"); + String newrealvalue = jo.getString("newRealValue"); + String fieldNameLabelId = jo.getString("fieldNameLabelId"); + if (StringUtils.isNotBlank(fieldNameLabelId) && StringUtils.isNumeric(fieldNameLabelId)) { + fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId)); + } + if (StringUtils.isNotBlank(oldrealvalue) && StringUtils.isNumeric(oldrealvalue)) { + oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue)); + } + if (StringUtils.isNotBlank(newrealvalue) && StringUtils.isNumeric(newrealvalue)) { + newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue)); + } + if (count == 0) { + valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); + } else { + valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); + } + + } + /*String values = ""; + if (valuesChange.length() > 3) { + values = valuesChange.substring(0, valuesChange.length() - 3); + }*/ + + map.put("valueschanges", valuesChanges); + } + + } + } + + public static String valueChangeNewFormat() { + return "【%s】:%s"; + } + + public static String valueChangeFormat() { + return "【%s】:" + SalaryI18nUtil.getI18nLabel(61695, "由") + + "[%s] " + SalaryI18nUtil.getI18nLabel(61697, "改为") + " [%s]"; + } + + public static void changKey2Lower(List list) { + + List newList = new ArrayList<>(); + for (Map orgMap : list) { + Map resultMap = new HashMap<>(); + + if (orgMap == null || orgMap.isEmpty()) { + newList.add(resultMap); + continue; + } + + Set keySet = orgMap.keySet(); + for (String key : keySet) { + resultMap.put(key != null ? key.toLowerCase() : "", orgMap.get(key)); + } + newList.add(resultMap); + } + list.clear(); + list.addAll(newList); + } + + /** + * 查看详细表的数据 + * + * @param list + */ + public static Map switchDetailChangeValue(List list) { + Map res = new HashMap<>(); + List> lists = new ArrayList<>(); + HashMap repeatTableName = new HashMap<>(); + CaseInsensitiveMap map = null; + for (Map hashMap : list) { + map = new CaseInsensitiveMap<>(hashMap); + List detailmap = new ArrayList<>(); + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", map.get("dataid")); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", map.get("dataid")); + detailmap.add(detailoldMap); + detailmap.add(detailnewMap); + WeaTable wea = new WeaTable(); + wea.getColumns().add(new WeaTableColumn("5%",SalaryI18nUtil.getI18nLabel(63250, "操作"), "operator")); // wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); -// Object tablename = map.get("tablename"); -// Object tablenamelabelid = map.get("tablenamelabelid"); -// if (tablenamelabelid != null) { -// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { -// tablename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); -// } -// } -// Map m = new HashMap<>(); -// if (tablename!=null&&StringUtils.isNotBlank(tablename.toString())) { -// String temptablename = repeatTableName.get(tablename.toString()); -// if (tablename.toString().equals(temptablename)) { -// continue; -// } -// repeatTableName.put(tablename.toString(), tablename.toString()); -// m.put("tablename", tablename.toString()); -// m.put("detailmap", detailmap); -// m.put("column", wea); -// lists.add(m); -// } else { -// tablename = tablename!=null?tablename:""; -// String temptablename = repeatTableName.get(tablename.toString()); -// if (tablename.toString().equals(temptablename)) { -// continue; -// } -// repeatTableName.put(tablename.toString(), tablename.toString()); -// m.put("tablename", ""); -// m.put("detailmap", detailmap); -// m.put("column", wea); -// lists.add(m); -// } -// } -// -// for (Map hashMap : list) { -// map = new CaseInsensitiveMap<>(hashMap); -// Object isDetail = map.get("isdetail"); -// if (isDetail != null) { -// if ("0".equals(isDetail.toString())) { -// continue; -// } -// } else { -// continue; -// } -// String title = ""; -// String dataIndex = ""; -// String oldValue = ""; -// String newValue = ""; -// String tableName = ""; -// String dataId = ""; -// -// Object fieldDesc = map.get("fielddesc"); -// if (fieldDesc != null) { -// if (StringUtils.isNotBlank(fieldDesc.toString())) { -// title = fieldDesc.toString(); -// } -// } -// -// Object fieldnamelabelid = map.get("fieldnamelabelid"); -// if (fieldnamelabelid != null) { -// if (StringUtils.isNotBlank(fieldnamelabelid.toString())&&StringUtils.isNumeric(fieldnamelabelid.toString())) { -// title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); -// } -// } -// -// Object fieldName = map.get("fieldname"); -// if (fieldName != null) { -// if (StringUtils.isNotBlank(fieldName.toString())) { -// dataIndex = fieldName.toString(); -// } -// } -// Object oValue = map.get("oldvalue"); -// if (oValue != null) { -// if (StringUtils.isNotBlank(oValue.toString())) { -// oldValue = oValue.toString(); -// } -// } -// Object nValue = map.get("newvalue"); -// if (nValue != null) { -// if (StringUtils.isNotBlank(nValue.toString())) { -// newValue = nValue.toString(); -// } -// } -// Object oldRealValue = map.get("oldrealvalue"); -// if (oldRealValue != null) { -// if (StringUtils.isNotBlank(oldRealValue.toString())&&StringUtils.isNumeric(oldRealValue.toString())) { -// oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); -// } -// } -// -// Object newrealvalue = map.get("newrealvalue"); -// if (newrealvalue != null) { -// if (StringUtils.isNotBlank(newrealvalue.toString())&&StringUtils.isNumeric(newrealvalue.toString())) { -// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); -// } -// } -// -// Object tablename = map.get("tablename"); -// if (StringUtils.isNotBlank(tablename.toString())) { -// tableName = tablename.toString(); -// } else { -// tableName = ""; -// } -// Object tablenamelabelid = map.get("tablenamelabelid"); -// if (tablenamelabelid != null) { -// if (tablenamelabelid != null) { -// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { -// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); -// } -// } -// } -// Object dataid = map.get("dataid"); -// if (StringUtils.isNotBlank(dataid.toString())) { -// dataId = dataid.toString(); -// } else { -// dataId = ""; -// } -// for (Map m : lists) { -// Object o = m.get("tablename"); -// if (o != null) { -// if (tableName.equals(o)) { -// List details = (List) m.get("detailmap"); -// List newDetails = new ArrayList<>(); -// if (details != null && details.size() > 0) { -// for (Map detail : details) { -// Object data_id = detail.get("dataid"); -// if (data_id != null) { -// if (dataId.equals(data_id)) { -// Object operator = detail.get("operator"); -// if (operator != null) { -// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { -// detail.put(dataIndex, oldValue); -// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { -// detail.put(dataIndex, newValue); -// } -// } -// }else{ -// if (newDetails.size() > 2) { -// for (Map newDetail : newDetails) { -// if (dataId.equals(newDetail.get("dataid"))) { -// Object operator = detail.get("operator"); -// if (operator != null) { -// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { -// detail.put(dataIndex, oldValue); -// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { -// detail.put(dataIndex, newValue); -// } -// } -// }else{ -// HashMap detailoldMap= new HashMap<>(); -// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",map.get("dataid")); -// detailoldMap.put(dataIndex, oldValue); -// HashMap detailnewMap= new HashMap<>(); -// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",map.get("dataid")); -// detailnewMap.put(dataIndex, newValue); -// newDetails.add(detailoldMap); -// newDetails.add(detailnewMap); -// } -// } -// }else if (newDetails.size() == 0) { -// int count = 0; -// for (Map mapdetail : details) { -// Object dataid_ = mapdetail.get("dataid"); -// if (dataid_ != null && dataid_.equals(dataId)) { -// count++; -// } -// } -// if (count == 0) { -// HashMap detailoldMap= new HashMap<>(); -// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",map.get("dataid")); -// detailoldMap.put(dataIndex, oldValue); -// HashMap detailnewMap= new HashMap<>(); -// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",map.get("dataid")); -// detailnewMap.put(dataIndex, newValue); -// newDetails.add(detailoldMap); -// newDetails.add(detailnewMap); -// } -// } -// } -// } -// } -// } -// if (newDetails.size() > 0) { -// details.addAll(newDetails); -// newDetails.clear(); -// } -// -// WeaTable column = (WeaTable) m.get("column"); -// if (column != null) { -// List columns = column.getColumns(); -// if (columns != null && columns.size() > 0) { -// Boolean flag = true; -// for (Object object : columns) { -// WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); -// if (weaTableColumn != null) { -// String title1 = weaTableColumn.getTitle(); -// if (title.equals(title1)) { -// flag = false; -// break; -// } -// } -// } -// if (flag) { -// column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); -// m.put("column", column); -// } -// } -// } -// } -// } -// } -// } -// res.put("detail", lists); -// return res; -// } -// -// -// public static void switchDetailChangeValues(List list) { -// for (Map map : list) { -// Map repeatTableName = new HashMap<>(); -// List detailContexts = (List) map.get("detailcontexts"); -// List lists = new ArrayList<>(); -// if (detailContexts != null) { -// for (Map detailContext : detailContexts) { -// List detailmap = new ArrayList<>(); -// HashMap detailoldMap = new HashMap<>(); -// detailoldMap.put("operator", SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",detailContext.get("dataid")); -// HashMap detailnewMap = new HashMap<>(); -// detailnewMap.put("operator", SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",detailContext.get("dataid")); -// detailmap.add(detailoldMap); -// detailmap.add(detailnewMap); -// WeaTable wea = new WeaTable(); -// wea.getColumns().add(new WeaTableColumn(SystemEnv.getHtmlLabelName(63250,"操作"), "operator", "5%")); + Object tablename = map.get("tablename"); + Object tablenamelabelid = map.get("tablenamelabelid"); + if (tablenamelabelid != null) { + if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { + tablename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); + } + } + Map m = new HashMap<>(); + if (tablename != null && StringUtils.isNotBlank(tablename.toString())) { + String temptablename = repeatTableName.get(tablename.toString()); + if (tablename.toString().equals(temptablename)) { + continue; + } + repeatTableName.put(tablename.toString(), tablename.toString()); + m.put("tablename", tablename.toString()); + m.put("detailmap", detailmap); + m.put("column", wea); + lists.add(m); + } else { + tablename = tablename != null ? tablename : ""; + String temptablename = repeatTableName.get(tablename.toString()); + if (tablename.toString().equals(temptablename)) { + continue; + } + repeatTableName.put(tablename.toString(), tablename.toString()); + m.put("tablename", ""); + m.put("detailmap", detailmap); + m.put("column", wea); + lists.add(m); + } + } + + for (Map hashMap : list) { + map = new CaseInsensitiveMap<>(hashMap); + Object isDetail = map.get("isdetail"); + if (isDetail != null) { + if ("0".equals(isDetail.toString())) { + continue; + } + } else { + continue; + } + String title = ""; + String dataIndex = ""; + String oldValue = ""; + String newValue = ""; + String tableName = ""; + String dataId = ""; + + Object fieldDesc = map.get("fielddesc"); + if (fieldDesc != null) { + if (StringUtils.isNotBlank(fieldDesc.toString())) { + title = fieldDesc.toString(); + } + } + + Object fieldnamelabelid = map.get("fieldnamelabelid"); + if (fieldnamelabelid != null) { + if (StringUtils.isNotBlank(fieldnamelabelid.toString()) && StringUtils.isNumeric(fieldnamelabelid.toString())) { + title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); + } + } + + Object fieldName = map.get("fieldname"); + if (fieldName != null) { + if (StringUtils.isNotBlank(fieldName.toString())) { + dataIndex = fieldName.toString(); + } + } + Object oValue = map.get("oldvalue"); + if (oValue != null) { + if (StringUtils.isNotBlank(oValue.toString())) { + oldValue = oValue.toString(); + } + } + Object nValue = map.get("newvalue"); + if (nValue != null) { + if (StringUtils.isNotBlank(nValue.toString())) { + newValue = nValue.toString(); + } + } + Object oldRealValue = map.get("oldrealvalue"); + if (oldRealValue != null) { + if (StringUtils.isNotBlank(oldRealValue.toString()) && StringUtils.isNumeric(oldRealValue.toString())) { + oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); + } + } + + Object newrealvalue = map.get("newrealvalue"); + if (newrealvalue != null) { + if (StringUtils.isNotBlank(newrealvalue.toString()) && StringUtils.isNumeric(newrealvalue.toString())) { + newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); + } + } + + Object tablename = map.get("tablename"); + if (StringUtils.isNotBlank(tablename.toString())) { + tableName = tablename.toString(); + } else { + tableName = ""; + } + Object tablenamelabelid = map.get("tablenamelabelid"); + if (tablenamelabelid != null) { + if (tablenamelabelid != null) { + if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { + tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); + } + } + } + Object dataid = map.get("dataid"); + if (StringUtils.isNotBlank(dataid.toString())) { + dataId = dataid.toString(); + } else { + dataId = ""; + } + for (Map m : lists) { + Object o = m.get("tablename"); + if (o != null) { + if (tableName.equals(o)) { + List details = (List) m.get("detailmap"); + List newDetails = new ArrayList<>(); + if (details != null && details.size() > 0) { + for (Map detail : details) { + Object data_id = detail.get("dataid"); + if (data_id != null) { + if (dataId.equals(data_id)) { + Object operator = detail.get("operator"); + if (operator != null) { + if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { + detail.put(dataIndex, oldValue); + } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { + detail.put(dataIndex, newValue); + } + } + } else { + if (newDetails.size() > 2) { + for (Map newDetail : newDetails) { + if (dataId.equals(newDetail.get("dataid"))) { + Object operator = detail.get("operator"); + if (operator != null) { + if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { + detail.put(dataIndex, oldValue); + } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { + detail.put(dataIndex, newValue); + } + } + } else { + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", map.get("dataid")); + detailoldMap.put(dataIndex, oldValue); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", map.get("dataid")); + detailnewMap.put(dataIndex, newValue); + newDetails.add(detailoldMap); + newDetails.add(detailnewMap); + } + } + } else if (newDetails.size() == 0) { + int count = 0; + for (Map mapdetail : details) { + Object dataid_ = mapdetail.get("dataid"); + if (dataid_ != null && dataid_.equals(dataId)) { + count++; + } + } + if (count == 0) { + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", map.get("dataid")); + detailoldMap.put(dataIndex, oldValue); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", map.get("dataid")); + detailnewMap.put(dataIndex, newValue); + newDetails.add(detailoldMap); + newDetails.add(detailnewMap); + } + } + } + } + } + } + if (newDetails.size() > 0) { + details.addAll(newDetails); + newDetails.clear(); + } + + WeaTable column = (WeaTable) m.get("column"); + if (column != null) { + List columns = column.getColumns(); + if (columns != null && columns.size() > 0) { + Boolean flag = true; + for (Object object : columns) { + WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); + if (weaTableColumn != null) { + String title1 = weaTableColumn.getText(); + if (title.equals(title1)) { + flag = false; + break; + } + } + } + if (flag) { + column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); + m.put("column", column); + } + } + } + } + } + } + } + res.put("detail", lists); + return res; + } + + + public static void switchDetailChangeValues(List list) { + for (Map map : list) { + Map repeatTableName = new HashMap<>(); + List detailContexts = (List) map.get("detailcontexts"); + List lists = new ArrayList<>(); + if (detailContexts != null) { + for (Map detailContext : detailContexts) { + List detailmap = new ArrayList<>(); + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", detailContext.get("dataid")); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", detailContext.get("dataid")); + detailmap.add(detailoldMap); + detailmap.add(detailnewMap); + WeaTable wea = new WeaTable(); + wea.getColumns().add(new WeaTableColumn(SalaryI18nUtil.getI18nLabel(63250, "操作"), "operator", "5%")); // wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); -// Object tableName = detailContext.get("tableName"); -// Object tablenamelabelid = detailContext.get("tableNameLabelId"); -// if (tablenamelabelid != null) { -// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { -// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); -// } -// } -// Map m = new HashMap<>(); -// if (StringUtils.isNotBlank(tableName.toString())) { -// String temptablename = repeatTableName.get(tableName.toString()); -// if (tableName.toString().equals(temptablename)) { -// continue; -// } -// repeatTableName.put(tableName.toString(), tableName.toString()); -// m.put("tablename", tableName.toString()); -// m.put("detailmap", detailmap); -// m.put("column", wea); -// lists.add(m); -// map.put("detail", lists); -// } else { -// String temptablename = repeatTableName.get(tableName.toString()); -// if (tableName.toString().equals(temptablename)) { -// continue; -// } -// repeatTableName.put(tableName.toString(), tableName.toString()); -// m.put("tablename", ""); -// m.put("detailmap", detailmap); -// m.put("column", wea); -// lists.add(m); -// map.put("detail", lists); -// } -// } -// } -// List details = (List) map.get("detail"); -// if (details != null) { -// int size = details.size(); -// int start = 0; -// while (start < size) { -// start++; -// -// for (int i = 0; i < size; i++) { -// Map detail = details.get(i); -// -// //for (Map detail : details) { -// if (details.size() > size) { -// break; -// } -// for (Map detailContext : detailContexts) { -// Object isDetail = detailContext.get("isDetail"); -// if (isDetail != null) { -// if ("0".equals(isDetail.toString())) { -// continue; -// } -// } else { -// continue; -// } -// String title = ""; -// String dataIndex = ""; -// String oldValue = ""; -// String newValue = ""; -// String tableName = ""; -// String dataId = ""; -// Object fieldDesc = detailContext.get("fieldDesc"); -// if (StringUtils.isNotBlank(fieldDesc.toString())) { -// title = fieldDesc.toString(); -// } -// Object fieldnamelabelid = detailContext.get("fieldNameLabelId"); -// if (fieldnamelabelid != null) { -// if (StringUtils.isNotBlank(fieldnamelabelid.toString())&&StringUtils.isNumeric(fieldnamelabelid.toString())) { -// title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); -// } -// } -// Object fieldName = detailContext.get("fieldName"); -// if (StringUtils.isNotBlank(fieldName.toString())) { -// dataIndex = fieldName.toString(); -// } -// Object oValue = detailContext.get("oldValue"); -// if (StringUtils.isNotBlank(oValue.toString())) { -// oldValue = oValue.toString(); -// } -// Object nValue = detailContext.get("newValue"); -// if (StringUtils.isNotBlank(nValue.toString())) { -// newValue = nValue.toString(); -// } -// Object oldRealValue = detailContext.get("oldRealValue"); -// if (oldRealValue != null) { -// if (StringUtils.isNotBlank(oldRealValue.toString())&&StringUtils.isNumeric(oldRealValue.toString())) { -// oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); -// } -// } -// -// Object newrealvalue = detailContext.get("newRealValue"); -// if (newrealvalue != null) { -// if (StringUtils.isNotBlank(newrealvalue.toString())&&StringUtils.isNumeric(newrealvalue.toString())) { -// newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); -// } -// } -// Object tablename = detailContext.get("tableName"); -// if (StringUtils.isNotBlank(tablename.toString())) { -// tableName = tablename.toString(); -// } else { -// tableName = ""; -// } -// Object tablenamelabelid = detailContext.get("tableNameLabelId"); -// if (tablenamelabelid != null) { -// if (tablenamelabelid != null) { -// if (StringUtils.isNotBlank(tablenamelabelid.toString())&&StringUtils.isNumeric(tablenamelabelid.toString())) { -// tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); -// } -// } -// } -// Object dataid = detailContext.get("dataid"); -// if (StringUtils.isNotBlank(dataid.toString())) { -// dataId = dataid.toString(); -// } else { -// dataId = ""; -// } -// Object detailtablename = detail.get("tablename"); -// if (detailtablename != null) { -// if (tableName.equals(detailtablename.toString())) { -// List detailmap = (List) detail.get("detailmap"); -// List newDetails = new ArrayList<>(); -// if (detailmap != null && detailmap.size() > 0) { -// for (Map d : detailmap) { -// Object data_id = d.get("dataid"); -// if (data_id != null) { -// if (dataId.equals(data_id)) { -// Object operator = d.get("operator"); -// if (operator != null) { -// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { -// d.put(dataIndex, oldValue); -// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { -// d.put(dataIndex, newValue); -// } -// } -// }else{ -// if (newDetails.size() > 2) { -// for (Map newDetail : newDetails) { -// if (dataId.equals(newDetail.get("dataid"))) { -// Object operator = d.get("operator"); -// if (operator != null) { -// if (SystemEnv.getHtmlLabelName(63248, "操作(旧)").equals(operator.toString())) { -// d.put(dataIndex, oldValue); -// } else if (SystemEnv.getHtmlLabelName(63249, "操作(新)").equals(operator.toString())) { -// d.put(dataIndex, newValue); -// } -// } -// }else{ -// HashMap detailoldMap= new HashMap<>(); -// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",detailContext.get("dataid")); -// detailoldMap.put(dataIndex, oldValue); -// HashMap detailnewMap= new HashMap<>(); -// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",detailContext.get("dataid")); -// detailnewMap.put(dataIndex, newValue); -// newDetails.add(detailoldMap); -// newDetails.add(detailnewMap); -// } -// } -// }else if (newDetails.size() == 0) { -// int count = 0; -// for (Map mapdetail : detailmap) { -// Object dataid_ = mapdetail.get("dataid"); -// if (dataid_ != null && dataid_.equals(dataId)) { -// count++; -// } -// } -// if (count == 0) { -// HashMap detailoldMap= new HashMap<>(); -// detailoldMap.put("operator",SystemEnv.getHtmlLabelName(63248,"操作(旧)")); -// detailoldMap.put("dataid",detailContext.get("dataid")); -// detailoldMap.put(dataIndex, oldValue); -// HashMap detailnewMap= new HashMap<>(); -// detailnewMap.put("operator",SystemEnv.getHtmlLabelName(63249,"操作(新)")); -// detailnewMap.put("dataid",detailContext.get("dataid")); -// detailnewMap.put(dataIndex, newValue); -// newDetails.add(detailoldMap); -// newDetails.add(detailnewMap); -// } -// } -// } -// } -// } -// } -// if (newDetails.size() > 0) { -// details.addAll(newDetails); -// newDetails.clear(); -// //detailmap = new ArrayList<>(); -// //detail.put("detailmap", detailmap); -// } -// -// WeaTable column = (WeaTable) detail.get("column"); -// if (column != null) { -// List columns = column.getColumns(); -// if (columns != null && columns.size() > 0) { -// Boolean flag = true; -// for (Object object : columns) { -// WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); -// if (weaTableColumn != null) { -// String title1 = weaTableColumn.getTitle(); -// if (title.equals(title1)) { -// flag = false; -// break; -// }else{ -// flag = true; -// } -// } -// } -// if (flag) { -// column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); -// detail.put("column", column); -// } -// } -// } -// } -// } -// } -// } -// } -// } -// } -// } -// -// public static List getSwitchDatabaseData(List list) { -// if (ElogConsts.ORACLE.equalsIgnoreCase(DatabaseUtil.getDatabaseId()) || ElogConsts.SQLSERVER.equalsIgnoreCase(DatabaseUtil.getDatabaseId())) { -// List arrayList = new ArrayList<>(); -// for (Map map : list) { -// Set en = map.entrySet(); -// Map hashMap = new HashMap<>(); -// for (Map.Entry entry : en) { -// Object key = entry.getKey(); -// Object val = null; -// if ("PARAMS".equalsIgnoreCase(key.toString())||"CUSTOMINFO".equalsIgnoreCase(key.toString()) -// || entry.getValue() instanceof ClobProxyImpl || entry.getValue() instanceof Clob) { -// val = JSONObject.toJSON(entry.getValue()); -// }else{ -// val = entry.getValue(); -// } -// hashMap.put(key.toString().toLowerCase(),val ); -// } -// switchDatabaseField(hashMap); -// arrayList.add(hashMap); -// } -// return arrayList; -// }else{ -// for (Map map : list) { -// switchDatabaseField(map); -// } -// return list; -// } -// } -// -// public static List getSwitchDatabaseAnalysisData(List list,Map keys) { -// if (!ElogConsts.MYSQL.equalsIgnoreCase(DatabaseUtil.getDatabaseId())) { -// List arrayList = new ArrayList<>(); -// -// for (Map map : list) { -// Set en = map.entrySet(); -// Map hashMap = new HashMap<>(); -// for (Map.Entry entry : en) { -// Object key = entry.getKey(); -// Object val = entry.getValue(); -// if (key.toString().equalsIgnoreCase(keys.get(key.toString().toLowerCase()))){ -// key = keys.get(key.toString().toLowerCase()); -// }else { -// key = key.toString().toLowerCase(); -// } -// hashMap.put(key.toString(),val ); -// } -// arrayList.add(hashMap); -// } -// return arrayList; -// } -// return list; -// } -// -// /** -// * 获取多个模块名称 -// * @param modules -// * @return -// */ -// public static Map getModuleNames(List modules) { -// Map hashMap = new HashMap<>(); -// if (modules == null || modules.size() == 0) { -// return hashMap; -// } -// for (String module : modules) { -// String modulenum = ElogSeviceUtils.null2String(moduleMap.get(module), module); -// String modulename = ElogSeviceUtils.isLongValue(modulenum) ? SystemEnv.getHtmlLabelName(ElogSeviceUtils.getLongValue(modulenum), modulenum) : modulenum; -// hashMap.put(module, modulename); -// } -// return hashMap; -// -// } -// + Object tableName = detailContext.get("tableName"); + Object tablenamelabelid = detailContext.get("tableNameLabelId"); + if (tablenamelabelid != null) { + if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { + tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); + } + } + Map m = new HashMap<>(); + if (StringUtils.isNotBlank(tableName.toString())) { + String temptablename = repeatTableName.get(tableName.toString()); + if (tableName.toString().equals(temptablename)) { + continue; + } + repeatTableName.put(tableName.toString(), tableName.toString()); + m.put("tablename", tableName.toString()); + m.put("detailmap", detailmap); + m.put("column", wea); + lists.add(m); + map.put("detail", lists); + } else { + String temptablename = repeatTableName.get(tableName.toString()); + if (tableName.toString().equals(temptablename)) { + continue; + } + repeatTableName.put(tableName.toString(), tableName.toString()); + m.put("tablename", ""); + m.put("detailmap", detailmap); + m.put("column", wea); + lists.add(m); + map.put("detail", lists); + } + } + } + List details = (List) map.get("detail"); + if (details != null) { + int size = details.size(); + int start = 0; + while (start < size) { + start++; + + for (int i = 0; i < size; i++) { + Map detail = details.get(i); + + //for (Map detail : details) { + if (details.size() > size) { + break; + } + for (Map detailContext : detailContexts) { + Object isDetail = detailContext.get("isDetail"); + if (isDetail != null) { + if ("0".equals(isDetail.toString())) { + continue; + } + } else { + continue; + } + String title = ""; + String dataIndex = ""; + String oldValue = ""; + String newValue = ""; + String tableName = ""; + String dataId = ""; + Object fieldDesc = detailContext.get("fieldDesc"); + if (StringUtils.isNotBlank(fieldDesc.toString())) { + title = fieldDesc.toString(); + } + Object fieldnamelabelid = detailContext.get("fieldNameLabelId"); + if (fieldnamelabelid != null) { + if (StringUtils.isNotBlank(fieldnamelabelid.toString()) && StringUtils.isNumeric(fieldnamelabelid.toString())) { + title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); + } + } + Object fieldName = detailContext.get("fieldName"); + if (StringUtils.isNotBlank(fieldName.toString())) { + dataIndex = fieldName.toString(); + } + Object oValue = detailContext.get("oldValue"); + if (StringUtils.isNotBlank(oValue.toString())) { + oldValue = oValue.toString(); + } + Object nValue = detailContext.get("newValue"); + if (StringUtils.isNotBlank(nValue.toString())) { + newValue = nValue.toString(); + } + Object oldRealValue = detailContext.get("oldRealValue"); + if (oldRealValue != null) { + if (StringUtils.isNotBlank(oldRealValue.toString()) && StringUtils.isNumeric(oldRealValue.toString())) { + oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); + } + } + + Object newrealvalue = detailContext.get("newRealValue"); + if (newrealvalue != null) { + if (StringUtils.isNotBlank(newrealvalue.toString()) && StringUtils.isNumeric(newrealvalue.toString())) { + newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); + } + } + Object tablename = detailContext.get("tableName"); + if (StringUtils.isNotBlank(tablename.toString())) { + tableName = tablename.toString(); + } else { + tableName = ""; + } + Object tablenamelabelid = detailContext.get("tableNameLabelId"); + if (tablenamelabelid != null) { + if (tablenamelabelid != null) { + if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { + tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); + } + } + } + Object dataid = detailContext.get("dataid"); + if (StringUtils.isNotBlank(dataid.toString())) { + dataId = dataid.toString(); + } else { + dataId = ""; + } + Object detailtablename = detail.get("tablename"); + if (detailtablename != null) { + if (tableName.equals(detailtablename.toString())) { + List detailmap = (List) detail.get("detailmap"); + List newDetails = new ArrayList<>(); + if (detailmap != null && detailmap.size() > 0) { + for (Map d : detailmap) { + Object data_id = d.get("dataid"); + if (data_id != null) { + if (dataId.equals(data_id)) { + Object operator = d.get("operator"); + if (operator != null) { + if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { + d.put(dataIndex, oldValue); + } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { + d.put(dataIndex, newValue); + } + } + } else { + if (newDetails.size() > 2) { + for (Map newDetail : newDetails) { + if (dataId.equals(newDetail.get("dataid"))) { + Object operator = d.get("operator"); + if (operator != null) { + if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { + d.put(dataIndex, oldValue); + } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { + d.put(dataIndex, newValue); + } + } + } else { + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", detailContext.get("dataid")); + detailoldMap.put(dataIndex, oldValue); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", detailContext.get("dataid")); + detailnewMap.put(dataIndex, newValue); + newDetails.add(detailoldMap); + newDetails.add(detailnewMap); + } + } + } else if (newDetails.size() == 0) { + int count = 0; + for (Map mapdetail : detailmap) { + Object dataid_ = mapdetail.get("dataid"); + if (dataid_ != null && dataid_.equals(dataId)) { + count++; + } + } + if (count == 0) { + HashMap detailoldMap = new HashMap<>(); + detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); + detailoldMap.put("dataid", detailContext.get("dataid")); + detailoldMap.put(dataIndex, oldValue); + HashMap detailnewMap = new HashMap<>(); + detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); + detailnewMap.put("dataid", detailContext.get("dataid")); + detailnewMap.put(dataIndex, newValue); + newDetails.add(detailoldMap); + newDetails.add(detailnewMap); + } + } + } + } + } + } + if (newDetails.size() > 0) { + details.addAll(newDetails); + newDetails.clear(); + //detailmap = new ArrayList<>(); + //detail.put("detailmap", detailmap); + } + + WeaTable column = (WeaTable) detail.get("column"); + if (column != null) { + List columns = column.getColumns(); + if (columns != null && columns.size() > 0) { + Boolean flag = true; + for (Object object : columns) { + WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); + if (weaTableColumn != null) { + String title1 = weaTableColumn.getText(); + if (title.equals(title1)) { + flag = false; + break; + } else { + flag = true; + } + } + } + if (flag) { + column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); + detail.put("column", column); + } + } + } + } + } + } + } + } + } + } + } + + public static List getSwitchDatabaseData(List list) { + String databaseId = new RecordSet().getDBType(); + if (ElogConsts.ORACLE.equalsIgnoreCase(databaseId) || ElogConsts.SQLSERVER.equalsIgnoreCase(databaseId)) { + List arrayList = new ArrayList<>(); + for (Map map : list) { + Set en = map.entrySet(); + Map hashMap = new HashMap<>(); + for (Map.Entry entry : en) { + Object key = entry.getKey(); + Object val = null; + if ("PARAMS".equalsIgnoreCase(key.toString()) || "CUSTOMINFO".equalsIgnoreCase(key.toString()) + || entry.getValue() instanceof ClobProxyImpl || entry.getValue() instanceof Clob) { + val = JSONObject.toJSON(entry.getValue()); + } else { + val = entry.getValue(); + } + hashMap.put(key.toString().toLowerCase(), val); + } + switchDatabaseField(hashMap); + arrayList.add(hashMap); + } + return arrayList; + } else { + for (Map map : list) { + switchDatabaseField(map); + } + return list; + } + } + + public static List getSwitchDatabaseAnalysisData(List list, Map keys) { + String databaseId = new RecordSet().getDBType(); + if (!ElogConsts.MYSQL.equalsIgnoreCase(databaseId)) { + List arrayList = new ArrayList<>(); + + for (Map map : list) { + Set en = map.entrySet(); + Map hashMap = new HashMap<>(); + for (Map.Entry entry : en) { + Object key = entry.getKey(); + Object val = entry.getValue(); + if (key.toString().equalsIgnoreCase(keys.get(key.toString().toLowerCase()))) { + key = keys.get(key.toString().toLowerCase()); + } else { + key = key.toString().toLowerCase(); + } + hashMap.put(key.toString(), val); + } + arrayList.add(hashMap); + } + return arrayList; + } + return list; + } + + /** + * 获取多个模块名称 + * + * @param modules + * @return + */ + public static Map getModuleNames(List modules) { + Map hashMap = new HashMap<>(); + if (modules == null || modules.size() == 0) { + return hashMap; + } + for (String module : modules) { + String modulenum = ElogSeviceUtils.null2String(moduleMap.get(module), module); + String modulename = ElogSeviceUtils.isLongValue(modulenum) ? SalaryI18nUtil.getI18nLabel(Integer.parseInt(modulenum), modulenum) : modulenum; + hashMap.put(module, modulename); + } + return hashMap; + + } + // private static String StringConversionForXSS(String str) { // if (StringUtils.isBlank(str)) // return str; @@ -1348,47 +1355,48 @@ // return SecurityUtil.encodeForHtml(str, true); // // } -// -// -// /** -// * 判断是否为json字符串 -// * -// * @param content -// * @return -// */ -// public static boolean isJSONString(String content) { -// if (StringUtils.isEmpty(content)) { -// return false; -// } -// if (!content.startsWith("{") || !content.endsWith("}")) { -// if (!content.startsWith("[") || !content.endsWith("]")) { -// return false; -// } -// } -// try { -// JSONObject.parse(content); -// return true; -// } catch (Exception e) { -// return false; -// } -// } -// public static List getNameModule(String module) { -// if(StringUtils.isBlank(module)){ -// return new ArrayList<>(); -// } -// Map> dataMap = new HashMap<>(); -// moduleMap.forEach( (k,v)->{ -// List list=new ArrayList<>(); -// Integer moduleCode = moduleMap.get(k); -// String htmlLabelName = SystemEnv.getHtmlLabelName(moduleCode.longValue(), ""); -// if(dataMap.containsKey(htmlLabelName)){ -// list= dataMap.get(htmlLabelName); -// list .add(k); -// }else { -// list.add(k); -// } -// dataMap.put(htmlLabelName,list); -// }); -// return Objects.isNull(dataMap.get(module))?Arrays.asList(module):dataMap.get(module); -// } -//} + + + /** + * 判断是否为json字符串 + * + * @param content + * @return + */ + public static boolean isJSONString(String content) { + if (StringUtils.isEmpty(content)) { + return false; + } + if (!content.startsWith("{") || !content.endsWith("}")) { + if (!content.startsWith("[") || !content.endsWith("]")) { + return false; + } + } + try { + JSONObject.parse(content); + return true; + } catch (Exception e) { + return false; + } + } + + public static List getNameModule(String module) { + if (StringUtils.isBlank(module)) { + return new ArrayList<>(); + } + Map> dataMap = new HashMap<>(); + moduleMap.forEach((k, v) -> { + List list = new ArrayList<>(); + Integer moduleCode = moduleMap.get(k); + String htmlLabelName = SalaryI18nUtil.getI18nLabel(moduleCode, ""); + if (dataMap.containsKey(htmlLabelName)) { + list = dataMap.get(htmlLabelName); + list.add(k); + } else { + list.add(k); + } + dataMap.put(htmlLabelName, list); + }); + return Objects.isNull(dataMap.get(module)) ? Arrays.asList(module) : dataMap.get(module); + } +} diff --git a/src/com/engine/salary/elog/util/ElogSeviceUtils.java b/src/com/engine/salary/elog/util/ElogSeviceUtils.java index 3ee65acaa..58ca9ec31 100644 --- a/src/com/engine/salary/elog/util/ElogSeviceUtils.java +++ b/src/com/engine/salary/elog/util/ElogSeviceUtils.java @@ -1,18 +1,11 @@ package com.engine.salary.elog.util; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.enums.FromTerminalType; -import com.weaver.common.component.table.page.Page; -import com.weaver.common.security.util.SecurityUtil; -import com.weaver.framework.log4j2.constant.ApmConstant; -import com.weaver.framework.rpc.context.impl.TenantRpcContext; -import com.weaver.framework.web.constant.EteamsConstant; import org.apache.commons.lang3.StringUtils; -import org.apache.dubbo.rpc.RpcContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; import java.io.ByteArrayInputStream; @@ -231,14 +224,14 @@ public class ElogSeviceUtils { - /** - * 获取request请求 - * - * @return - */ - public static HttpServletRequest getRequest() { - return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); - } +// /** +// * 获取request请求 +// * +// * @return +// */ +// public static HttpServletRequest getRequest() { +// return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); +// } /** * 将对象转换程字符串 @@ -263,14 +256,14 @@ public class ElogSeviceUtils { } } - public static Page getPage() { - HttpServletRequest request = getRequest(); - String num = request.getParameter("pageNum"); - String size = request.getParameter("pageSize"); - - Page page = new Page(ElogSeviceUtils.getIntValue(num, 1), ElogSeviceUtils.getIntValue(size, 10)); - return page; - } +// public static Page getPage() { +// HttpServletRequest request = getRequest(); +// String num = request.getParameter("pageNum"); +// String size = request.getParameter("pageSize"); +// +// Page page = new Page(ElogSeviceUtils.getIntValue(num, 1), ElogSeviceUtils.getIntValue(size, 10)); +// return page; +// } // public static void main(String[] args) { // //System.out.println(getTableName("select", "from")); @@ -317,22 +310,10 @@ public class ElogSeviceUtils { } public static String getTenantKey() { - - String tenantKey = TenantRpcContext.getTenantKey(); - if (StringUtils.isNotBlank(tenantKey)) { - return tenantKey; - } - - return ""; + return SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; } public static String getEmployeeId() { - - String employeeId = TenantRpcContext.getEmployeeId(); - if (StringUtils.isNotBlank(employeeId)) { - return employeeId; - } - return ""; } @@ -358,37 +339,37 @@ public class ElogSeviceUtils { // return ""; // } - /** - * 获取rpc信息(客户端ip和来源设备) - * - * @param context - */ - public static void initRpcInfo(LoggerContext context) { - String device = ""; - String clientIp = ""; - String traceId = ""; - try { - device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); - clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); - traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); - logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); - } catch (Exception e) { - logger.error("Exception", e); - } - if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { - context.setDevice(device); - } - if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { - context.setFromTerminal(getFromTerminal(device)); - } - - if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { - context.setClientIp(clientIp); - } - if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { - context.setBelongMainId(traceId); - } - } +// /** +// * 获取rpc信息(客户端ip和来源设备) +// * +// * @param context +// */ +// public static void initRpcInfo(LoggerContext context) { +// String device = ""; +// String clientIp = ""; +// String traceId = ""; +// try { +// device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); +// clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); +// traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); +// logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); +// } catch (Exception e) { +// logger.error("Exception", e); +// } +// if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { +// context.setDevice(device); +// } +// if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { +// context.setFromTerminal(getFromTerminal(device)); +// } +// +// if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { +// context.setClientIp(clientIp); +// } +// if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { +// context.setBelongMainId(traceId); +// } +// } public static String getFromTerminal(String device) { String setFT = ""; @@ -477,7 +458,7 @@ public class ElogSeviceUtils { if (count > 2) { return filterVal; } - value = SecurityUtil.ecodeForSql(value); +// value = SecurityUtil.ecodeForSql(value); return value; } diff --git a/src/com/engine/salary/elog/util/ElogUtils.java b/src/com/engine/salary/elog/util/ElogUtils.java index 077593ee6..38edd827d 100644 --- a/src/com/engine/salary/elog/util/ElogUtils.java +++ b/src/com/engine/salary/elog/util/ElogUtils.java @@ -2,7 +2,7 @@ package com.engine.salary.elog.util; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.enums.FromTerminalType; import com.engine.salary.elog.threadlocal.ElogThreadLocal; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/elog/util/FieldNameMap.java b/src/com/engine/salary/elog/util/FieldNameMap.java new file mode 100644 index 000000000..dcde0258c --- /dev/null +++ b/src/com/engine/salary/elog/util/FieldNameMap.java @@ -0,0 +1,94 @@ +package com.engine.salary.elog.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName: FieldNameMap + * @Description TODO + * @Author tanghj + * @Date 2021/3/31 14:27 + */ +public class FieldNameMap { + + private static Map mainFieldNameMap = new HashMap<>(); + + private static Map detailFieldNameMap = new HashMap<>(); + + private static Map> mainCusFieldNameMap = new HashMap<>(); + + private static Map> detailCusFieldNameMap = new HashMap<>(); + + + public static void setMainFieldName(Map fieldNameMap) { + mainFieldNameMap.putAll(fieldNameMap); + } + + public static void setDetailFieldName(Map fieldNameMap) { + detailFieldNameMap.putAll(fieldNameMap); + } + + public static void setMainCusFieldName(String module, String function, Map fieldNameMap) { + mainCusFieldNameMap.put(getKey(module, function), fieldNameMap); + } + + public static void setDetailCusFieldName(String module, String function, Map fieldNameMap) { + detailCusFieldNameMap.put(getKey(module, function), fieldNameMap); + } + + + public static String getMainFieldNameMap(String module, String function, String key) { + + String str = key.toLowerCase(); + if(mainFieldNameMap.containsKey(str)) { + return StringUtils.isNotEmpty(mainFieldNameMap.get(str)) ? mainFieldNameMap.get(str) : key; + } else { + return getMainCusFieldNameMap(module, function,key); + } + } + + public static String getDetailFieldNameMap(String module, String function, String key) { + key = key.toLowerCase(); + if(detailFieldNameMap.containsKey(key)) { + return StringUtils.isNotEmpty(detailFieldNameMap.get(key)) ? detailFieldNameMap.get(key) : key; + } else { + return getDetailCusFieldNameMap(module, function, key); + } + } + + public static String getMainCusFieldNameMap(String module, String function, String key) { + + if(mainCusFieldNameMap.containsKey(getKey(module, function))) { + if(mainCusFieldNameMap.get(getKey(module, function)).containsKey(key)) { + return StringUtils.isNotEmpty(mainCusFieldNameMap.get(getKey(module, function)).get(key)) ? + mainCusFieldNameMap.get(getKey(module, function)).get(key) : + key; + } else { + return key; + } + } else { + return key; + } + } + + public static String getDetailCusFieldNameMap(String module, String function, String key) { + + if(detailCusFieldNameMap.containsKey(getKey(module, function))) { + if(detailCusFieldNameMap.get(getKey(module, function)).containsKey(key)) { + return StringUtils.isNotEmpty(detailCusFieldNameMap.get(getKey(module, function)).get(key)) ? + detailCusFieldNameMap.get(getKey(module, function)).get(key) : + key; + } else { + return key; + } + } else { + return key; + } + } + + private static String getKey(String module, String function) { + return module + "@" + function; + } +} diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index f3fca954a..c457291df 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -7,9 +7,9 @@ import com.alibaba.fastjson.serializer.SerializerFeature; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.elog.async.LoggerMessageListener; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; -import com.engine.salary.elog.dto.TableChangeBean; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerDetailContext; +import com.engine.salary.elog.entity.dto.TableChangeBean; import dm.jdbc.util.IdGenerator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/com/engine/salary/elog/web/LoggerTableController.java b/src/com/engine/salary/elog/web/LoggerTableController.java index 279bffdfe..b2969f833 100644 --- a/src/com/engine/salary/elog/web/LoggerTableController.java +++ b/src/com/engine/salary/elog/web/LoggerTableController.java @@ -1,178 +1,187 @@ package com.engine.salary.elog.web; -import com.weaver.common.authority.annotation.WeaPermission; -import com.weaver.common.base.entity.result.WeaResult; -import com.weaver.common.batch.entity.BatchDocumentMessage; -import com.weaver.common.component.table.WeaTable; -import com.weaver.common.elog.service.ApplicationContextProvider; -import com.weaver.common.elog.service.ILoggerTableService; -import com.weaver.common.elog.service.impl.LoggerTableService; -import com.weaver.framework.spring.annotation.AopClass; -import io.swagger.annotations.Api; +import com.engine.common.util.ServiceUtil; +import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.elog.service.ILoggerTableService; +import com.engine.salary.elog.service.impl.LoggerTableService; +import com.engine.salary.util.ResponseResult; +import com.engine.salary.util.page.PageInfo; import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.apache.ibatis.annotations.Param; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestParam; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; import java.util.List; import java.util.Map; public class LoggerTableController { - @Autowired - @Qualifier("loggerTableService") - private LoggerTableService loggerTableService; - - @ApiOperation("获取日志") - @RequestMapping(path = "getLogs", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult getLogs(@RequestBody(required = false) @ApiParam("数据") String data){ - - WeaTable weaTable = loggerTableService.queryLogs(data); - return WeaResult.success(weaTable); - } - - @ApiOperation("获取日志(卡片)") - @RequestMapping(path = "getCardLogs", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult>> carddatas(@RequestBody(required = false) @ApiParam("数据") String data){ - List> list = loggerTableService.queryCardLogList(data); - return WeaResult.success(list); - } - - @ApiOperation("获取单条操作记录的更新明细") - @RequestMapping(path = "getDetailChanges", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult>> getDetailChanges(@PathVariable("module") @ApiParam("服务(模块)名")String module, - @PathVariable("function") @ApiParam("方法名")String function, - @RequestParam("mainid") @ApiParam("主键id") String mainid, - @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod) { - return WeaResult.success(loggerTableService.getDetailChanges(module, function,mainid,detailTransMethod)); + private ILoggerTableService getLoggerTableService(User user) { + return ServiceUtil.getService(LoggerTableService.class, user); } /** - * 获取单条操作记录的更新明细(分页) - * @param module 服务(模块)名 - * @param function 方法名 - * @param mainid 主键id - * @param detailTransMethod 转换方法 - * @param current 页码 - * @param pageSize 每页条数 - * @return WeaTable + * 获取日志 + * + * @param request + * @param response + * @param data + * @return */ - @ApiOperation("获取单条操作记录的更新明细(分页)") - @RequestMapping(path = "getDetailChangePages", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult getDetailChangePages(@PathVariable("module") @ApiParam("服务(模块)名")String module, - @PathVariable("function") @ApiParam("方法名")String function, - @RequestParam("mainid") @ApiParam("主键id") String mainid, - @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod, - @RequestParam("page") @ApiParam("页码") String current, - @RequestParam("pageSize") @ApiParam("每页条数") String pageSize) { - return WeaResult.success(loggerTableService.getDetailChangePages(module, function,mainid,detailTransMethod,current,pageSize)); + @POST + @Path("/getLogs") + @Produces(MediaType.APPLICATION_JSON) + public String getLogs(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getLoggerTableService(user)::queryLogs, data); + } + + @ApiOperation("获取日志(卡片)") + @POST + @Path("/getCardLogs") + @Produces(MediaType.APPLICATION_JSON) + public String carddatas(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult>>(user).run(getLoggerTableService(user)::queryCardLogList, data); + } +// +// @ApiOperation("获取单条操作记录的更新明细") +// @RequestMapping(path = "getDetailChanges", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult>> getDetailChanges(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function, +// @RequestParam("mainid") @ApiParam("主键id") String mainid, +// @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod) { +// return WeaResult.success(getLoggerTableService(user).getDetailChanges(module, function, mainid, detailTransMethod)); +// } +// @ApiOperation("获取单条操作记录的更新明细") +// @POST +// @Path("/getDetailChanges") +// @Produces(MediaType.APPLICATION_JSON) +// public String getDetailChanges(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { +// User user = HrmUserVarify.getUser(request, response); +// return new ResponseResult>>(user).run(getLoggerTableService(user)::getDetailChanges, data); +// } +// +// /** +// * 获取单条操作记录的更新明细(分页) +// * +// * @param module 服务(模块)名 +// * @param function 方法名 +// * @param mainid 主键id +// * @param detailTransMethod 转换方法 +// * @param current 页码 +// * @param pageSize 每页条数 +// * @return WeaTable +// */ +// @ApiOperation("获取单条操作记录的更新明细(分页)") +// @RequestMapping(path = "getDetailChangePages", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult getDetailChangePages(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function, +// @RequestParam("mainid") @ApiParam("主键id") String mainid, +// @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod, +// @RequestParam("page") @ApiParam("页码") String current, +// @RequestParam("pageSize") @ApiParam("每页条数") String pageSize) { +// return WeaResult.success(getLoggerTableService(user).getDetailChangePages(module, function, mainid, detailTransMethod, current, pageSize)); +// } + + /** + * 获取日志列表 + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/datas") + @Produces(MediaType.APPLICATION_JSON) + public String datas(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ELogGetLogParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getLoggerTableService(user)::queryLogList, param); } - @ApiOperation("获取日志列表") - @RequestMapping(path = "datas", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult>> datas(@PathVariable("module") @ApiParam("服务(模块)名")String module, - @PathVariable("function") @ApiParam("方法名")String function, - @Param("pageSize") @ApiParam("每页多少数据")String pageSize, - @Param("current") @ApiParam("当前页")String current, - @ApiParam("查询条件") String condition){ - - if("datasecurity".equals(module) && "auditLog".equals(function)) { - try { - ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); - if(tableService != null){ - List> list = tableService.queryLogList(module, function, current, pageSize, condition); - return WeaResult.success(list); - } - } catch ( Exception e) { - - } - } - List> list = loggerTableService.queryLogList(module, function, current, pageSize, condition); - return WeaResult.success(list); - } - - @ApiOperation("获取日志总数") - @RequestMapping(path = "counts", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult> counts(@PathVariable("module") @ApiParam("服务(模块)名") String module, - @PathVariable("function") @ApiParam("方法名")String function){ - return WeaResult.success(loggerTableService.countLog(module,function), "success"); - } - - @ApiOperation("获取明细日志列表") - @RequestMapping(path = "detaildatas", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult>> detaildatas(@PathVariable("module") @ApiParam("服务(模块)名")String module, - @PathVariable("function") @ApiParam("方法名")String function, - @Param("pageSize") @ApiParam("每页多少数据")String pageSize, - @Param("current") @ApiParam("当前页")String current, - @Param("mainId") @ApiParam("主表id") String mainId, - @ApiParam("查询条件") String condition){ - - if("datasecurity".equals(module) && "auditLog".equals(function)) { - try { - ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); - if(tableService != null){ - List> list = tableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); - return WeaResult.success(list); - } - } catch ( Exception e) { - - } - } - List> list = loggerTableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); - return WeaResult.success(list); - } - - @ApiOperation("获取日志总数") - @RequestMapping(path = "detailcounts", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult> detailcounts(@PathVariable("module") @ApiParam("服务(模块)名") String module, - @PathVariable("function") @ApiParam("方法名")String function, - @Param("mainId") @ApiParam("主表id") String mainId){ - return WeaResult.success(loggerTableService.countDestailLog(module,function, mainId), "success"); - } - - @ApiOperation("根据traceId获取链路列表") - @RequestMapping(path = "queryLogTraceInfo", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult queryLogTraceInfo(@PathVariable("module") @ApiParam("服务(模块)名") String module, - @PathVariable("function") @ApiParam("方法名")String function, - @Param("traceId") @ApiParam("traceId") String traceId, - @Param("currentPage") @ApiParam("currentPage") Integer currentPage, - @Param("pageSize") @ApiParam("pageSize") Integer pageSize, - @Param("traceTransMethod") @ApiParam("traceTransMethod") String traceTransMethod - ){ - - if("datasecurity".equals(module) && "auditLog".equals(function)) { - try { - ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); - if(tableService != null){ - return WeaResult.success(tableService.queryElogTraceInfo(traceId,module,function,currentPage,pageSize,traceTransMethod ), "success"); - } - } catch ( Exception e) { - - } - } - - return WeaResult.success(loggerTableService.queryElogTraceInfo(traceId,module,function,currentPage,pageSize,traceTransMethod ), "success"); - } - - @ApiOperation("日志下载") - @RequestMapping(path = "downloadLog", method = {RequestMethod.GET, RequestMethod.POST}) - @WeaPermission(publicPermission = true) - public WeaResult downloadLog(@RequestBody(required = false) @ApiParam("数据") String data){ - - BatchDocumentMessage message = loggerTableService.downloadLog(data); - return WeaResult.success(message); - } +// @ApiOperation("获取日志总数") +// @RequestMapping(path = "counts", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult> counts(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function) { +// return WeaResult.success(getLoggerTableService(user).countLog(module, function), "success"); +// } +// +// @ApiOperation("获取明细日志列表") +// @RequestMapping(path = "detaildatas", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult>> detaildatas(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function, +// @Param("pageSize") @ApiParam("每页多少数据") String pageSize, +// @Param("current") @ApiParam("当前页") String current, +// @Param("mainId") @ApiParam("主表id") String mainId, +// @ApiParam("查询条件") String condition) { +// +// if ("datasecurity".equals(module) && "auditLog".equals(function)) { +// try { +// ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); +// if (tableService != null) { +// List> list = tableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); +// return WeaResult.success(list); +// } +// } catch (Exception e) { +// +// } +// } +// List> list = getLoggerTableService(user).queryDetailLogList(module, function, current, pageSize, condition, mainId); +// return WeaResult.success(list); +// } +// +// @ApiOperation("获取日志总数") +// @RequestMapping(path = "detailcounts", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult> detailcounts(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function, +// @Param("mainId") @ApiParam("主表id") String mainId) { +// return WeaResult.success(getLoggerTableService(user).countDestailLog(module, function, mainId), "success"); +// } +// +// @ApiOperation("根据traceId获取链路列表") +// @RequestMapping(path = "queryLogTraceInfo", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult queryLogTraceInfo(@PathVariable("module") @ApiParam("服务(模块)名") String module, +// @PathVariable("function") @ApiParam("方法名") String function, +// @Param("traceId") @ApiParam("traceId") String traceId, +// @Param("currentPage") @ApiParam("currentPage") Integer currentPage, +// @Param("pageSize") @ApiParam("pageSize") Integer pageSize, +// @Param("traceTransMethod") @ApiParam("traceTransMethod") String traceTransMethod +// ) { +// +// if ("datasecurity".equals(module) && "auditLog".equals(function)) { +// try { +// ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); +// if (tableService != null) { +// return WeaResult.success(tableService.queryElogTraceInfo(traceId, module, function, currentPage, pageSize, traceTransMethod), "success"); +// } +// } catch (Exception e) { +// +// } +// } +// +// return WeaResult.success(getLoggerTableService(user).queryElogTraceInfo(traceId, module, function, currentPage, pageSize, traceTransMethod), "success"); +// } +// +// @ApiOperation("日志下载") +// @RequestMapping(path = "downloadLog", method = {RequestMethod.GET, RequestMethod.POST}) +// @WeaPermission(publicPermission = true) +// public WeaResult downloadLog(@RequestBody(required = false) @ApiParam("数据") String data) { +// +// BatchDocumentMessage message = getLoggerTableService(user).downloadLog(data); +// return WeaResult.success(message); +// } } diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java index 5171e2641..c5547e753 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java @@ -1,6 +1,6 @@ package com.engine.salary.mapper.elog; -import com.engine.salary.elog.dto.TableColumnBean; +import com.engine.salary.elog.entity.dto.TableColumnBean; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml index a0410827b..03e4028ea 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -297,7 +297,7 @@ - SELECT COLUMN_NAME columnName, DATA_TYPE dataTypeStr, @@ -312,13 +312,13 @@ table_name = #{tableName} and TABLE_SCHEMA = (select database()) - select * from pg_tables where tableowner = (select current_user) and tablename = #{tableName} - SELECT COLUMN_NAME columnName FROM @@ -326,7 +326,7 @@ where TABLE_NAME=UPPER(#{tableName}) - SELECT COLUMN_NAME columnName FROM diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java index 6a969c83e..eda527efa 100644 --- a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java +++ b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java @@ -1,8 +1,8 @@ package com.engine.salary.mapper.elog; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerDetailContext; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java index 56dddcd45..70807d832 100644 --- a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java +++ b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java @@ -1,7 +1,8 @@ package com.engine.salary.mapper.elog; -import com.engine.salary.elog.dto.LoggerContext; -import com.engine.salary.elog.dto.LoggerDetailContext; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.ReadInfoEntity; +import com.github.pagehelper.Page; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -15,22 +16,204 @@ import java.util.Map; */ public interface LocalElogDaoMapper { - int insertElogContext(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "params") String params, - @Param(value = "cusColumns") String cusColumns, - @Param(value = "cusValus") String cusValus, - @Param(value = "tableName") String tableName); - List> queryElogList(@Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName); + List> queryCardElogList(@Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql); + + List queryElogList(@Param(value = "page") Page page, + @Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "columns") String columns); + + List queryElogListPapi(@Param(value = "page") Page page, + @Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "columns") String columns); + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionTargetId = "#{permissionTargetId}", +// permissionConfigSourceId = "#{permissionConfigSourceId}", +// permissionExcept = "true") + List queryElogList(@Param(value = "page") Page page, @Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey, + @Param(value = "permissionTargetId") String permissionTargetId, + @Param(value = "permissionConfigSourceId") String permissionConfigSourceId, + @Param(value = "columns") String columns + ); + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionExcept = "true") + List queryElogListPapi(@Param(value = "page") Page page, @Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey, + @Param(value = "columns") String columns + ); + + List queryAllChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); Map elogCount(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName); + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql); - int insertElogDetail(@Param(value = "detailContext") LoggerDetailContext loggerDetailContext, - @Param(value = "mainid") String mainid, - @Param(value = "cusColumns") String cusColumns, - @Param(value = "cusValus") String cusValus, - @Param(value = "detailTableName") String tableName); + Map elogCountPapi(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql); + + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionTargetId = "#{permissionTargetId}", +// permissionConfigSourceId = "#{permissionConfigSourceId}", +// permissionExcept = "true") + Map elogCountByMorePermission(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey, + @Param(value = "permissionTargetId") String permissionTargetId, + @Param(value = "permissionConfigSourceId") String permissionConfigSourceId); + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionTargetId = "#{permissionTargetId}", +// permissionConfigSourceId = "#{permissionConfigSourceId}", +// permissionCount = "count(*)", +// permissionExcept = "true") + Long elogCountOnlyNum(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey, + @Param(value = "permissionTargetId") String permissionTargetId, + @Param(value = "permissionConfigSourceId") String permissionConfigSourceId); + + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionExcept = "true") + Map elogCount(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey); + + // @WeaDataPermission(mainDataTable = "#{mainDataTable}", +// permissionId = "#{permissionId}", +// permissionType = "#{permissionType}", +// mainDataTableAlias = "#{mainDataTableAlias}", +// primaryKey = "#{primaryKey}", +// permissionExcept = "true") + Map elogCountPapi(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql, + @Param(value = "mainDataTable") String mainDataTable, + @Param(value = "permissionId") String permissionId, + @Param(value = "permissionType") String permissionType, + @Param(value = "mainDataTableAlias") String mainDataTableAlias, + @Param(value = "primaryKey") String primaryKey); + + + List queryDetailElogList(@Param(value = "logContent") LoggerContext loggerContext, + @Param("limit") String limit, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql); + + Map elogDetailCount(@Param(value = "logContent") LoggerContext loggerContext, + @Param(value = "tableName") String tableName, + @Param(value = "conditionSql") String conditionSql); + +// List queryOperators(@Param(value = "tableName") String tableName, +// @Param(value = "targetId") String targetId, +// @Param(value = "operateType") String operateType); + + List queryReadInfoOperators(@Param(value = "tableName") String tableName, + @Param(value = "targetId") String targetId, + @Param(value = "operateType") String operateType, + @Param(value = "flag") Boolean flag); + + List queryReadInfoDateOperators(@Param(value = "tableName") String tableName, + @Param(value = "targetId") String targetId, + @Param(value = "operateType") String operateType, + @Param(value = "flag") Boolean flag, + @Param(value = "startDate") String startDate, + @Param(value = "endDate") String endDate); + + List queryAllMainData(@Param(value = "tableName") String tableName, @Param("uuid") String uuid); + + List queryAllMainChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); + + List queryAllDetailChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); + + Integer queryElogContextById(@Param(value = "id") Long id, + @Param(value = "tableName") String tableName); + + List queryElogTraceInfo(@Param(value = "traceId") String traceId, + @Param(value = "tableName") String tableName, + @Param(value = "offset") Integer offset, + @Param(value = "pageSize") Integer pageSize); + + int queryElogTraceInfoCount(@Param(value = "traceId") String traceId, + @Param(value = "tableName") String tableName); + + List queryLogInfoByCustom(@Param(value = "tableName") String tableName, + @Param(value = "sql") String sql); + + List queryAllChangesData(@Param("tableName") String tableName, @Param("mainid") String mainid); + + List queryTenantKeyOperators(@Param(value = "tableName") String tableName, + @Param(value = "tenantKey") String tenantKey, + @Param(value = "targetId") String targetId, + @Param(value = "operateType") String operateType, + @Param(value = "flag") Boolean flag); + + List queryAllChangesDataPages(@Param("tableName") String tableName, + @Param("mainid") String mainid, + @Param(value = "page") Page page); + + Integer queryAllChangesPageCounts(@Param("tableName") String tableName, @Param("mainid") String mainid); } diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml index 7349e7026..93c233896 100644 --- a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml +++ b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml @@ -2,40 +2,411 @@ - - - insert into ${tableName} (uuid, date, tenant_key, modulename, functionName, - operator, operatorname, targetid, targetname, interfacename, operatetype, operatedesc, - params, clientIp, groupnamelabel, redoservice, redocontext, cancelservice, cancelcontext, device, groupid - ${cusColumns}) - values - (#{logContent.uuid}, #{logContent.date}, - #{logContent.tenant_key}, #{logContent.moduleName}, #{logContent.functionName}, #{logContent.operator}, #{logContent.operatorName}, #{logContent.targetId} - , #{logContent.targetName}, #{logContent.interfaceName}, #{logContent.operateType}, #{logContent.operatedesc}, - #{params}, #{logContent.clientIp}, #{logContent.groupNameLabel}, #{logContent.redoService}, - #{logContent.redoContext}, #{logContent.cancelService}, #{logContent.cancelContext}, #{logContent.device}, #{logContent.groupId} - ${cusValus}) - - + + + + + + + + + + + + + + + + - - insert into ${detailTableName} (mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder - ${cusColumns}) - values( - #{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder} - ${cusValus} - ) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index a0da13747..56d4c84df 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -14,7 +14,6 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobPO; -import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper; @@ -288,7 +287,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct List salaryAcctEmployeePOS = listByParam(queryParam); Set keySet = SalaryEntityUtil.properties(salaryAcctEmployeePOS, salaryAcctEmployeePO -> salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId()); List resultList = Lists.newArrayList(); - if(CollectionUtils.isNotEmpty(keySet)){ + if (CollectionUtils.isNotEmpty(keySet)) { lastMonthSalaryAcctEmployeePOMap.forEach((k, v) -> { if (!keySet.contains(k)) { resultList.add(v); @@ -556,19 +555,22 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct SalaryAcctEmployeePO lambdaQueryChainWrapper = SalaryAcctEmployeePO.builder().build(); // 个税扣缴义务人 - Collection taxAgentList = getTaxAgentService(user).listAllTaxAgents((long) user.getUID()); - if (CollectionUtils.isNotEmpty(taxAgentList)) { - List taxAgentIds = taxAgentList.stream().map(TaxAgentPO::getId).collect(Collectors.toList()); - // 有查询参数就取交集 - if (CollectionUtils.isNotEmpty(param.getTaxAgent())) { - List finalTaxAgentIds = taxAgentIds; - taxAgentIds = param.getTaxAgent().stream().filter(finalTaxAgentIds::contains).collect(Collectors.toList()); - lambdaQueryChainWrapper.setTaxAgentIds(CollectionUtils.isEmpty(taxAgentIds) ? Collections.singletonList(0L) : taxAgentIds); - } else { - lambdaQueryChainWrapper.setTaxAgentIds(taxAgentIds); - } - } else { - lambdaQueryChainWrapper.setTaxAgentIds(Collections.singletonList(0L)); +// Collection taxAgentList = getTaxAgentService(user).listAllTaxAgents((long) user.getUID()); +// if (CollectionUtils.isNotEmpty(taxAgentList)) { +// List taxAgentIds = taxAgentList.stream().map(TaxAgentPO::getId).collect(Collectors.toList()); +// // 有查询参数就取交集 +// if (CollectionUtils.isNotEmpty(param.getTaxAgent())) { +// List finalTaxAgentIds = taxAgentIds; +// taxAgentIds = param.getTaxAgent().stream().filter(finalTaxAgentIds::contains).collect(Collectors.toList()); +// lambdaQueryChainWrapper.setTaxAgentIds(CollectionUtils.isEmpty(taxAgentIds) ? Collections.singletonList(0L) : taxAgentIds); +// } else { +// lambdaQueryChainWrapper.setTaxAgentIds(taxAgentIds); +// } +// } else { +// lambdaQueryChainWrapper.setTaxAgentIds(Collections.singletonList(0L)); +// } + if (CollectionUtils.isNotEmpty(param.getTaxAgent())) { + lambdaQueryChainWrapper.setTaxAgentIds(param.getTaxAgent()); } // 薪资所属月 diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index 0110994fa..14bec72f5 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -6,7 +6,7 @@ import com.engine.core.impl.Service; import com.engine.salary.biz.SalaryItemBiz; import com.engine.salary.biz.SysSalaryItemBiz; import com.engine.salary.config.SalaryElogConfig; -import com.engine.salary.elog.dto.LoggerContext; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.salaryformula.po.FormulaPO; import com.engine.salary.entity.salaryformula.po.FormulaVar; From 7d1ce983dd117ecd2a35e354b4f50f7dba3116de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 26 Dec 2023 17:49:50 +0800 Subject: [PATCH 028/169] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/elog/annotation/ElogTransform.java | 1 + .../entity/param/GetDetailChangesParam.java | 29 +++++++++++++++ .../elog/service/ILoggerTableService.java | 3 +- .../elog/service/impl/LoggerTableService.java | 7 ++-- .../elog/web/LoggerTableController.java | 37 +++++++++++++------ .../entity/salaryitem/po/SalaryItemPO.java | 22 +++++++++++ 6 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java diff --git a/src/com/engine/salary/elog/annotation/ElogTransform.java b/src/com/engine/salary/elog/annotation/ElogTransform.java index b876b18b2..120c41d8d 100644 --- a/src/com/engine/salary/elog/annotation/ElogTransform.java +++ b/src/com/engine/salary/elog/annotation/ElogTransform.java @@ -5,6 +5,7 @@ import java.lang.annotation.*; @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) +@Inherited public @interface ElogTransform { String tablename() default ""; diff --git a/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java b/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java new file mode 100644 index 000000000..aec15823d --- /dev/null +++ b/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java @@ -0,0 +1,29 @@ +package com.engine.salary.elog.entity.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class GetDetailChangesParam { + /** + * 服务(模块)名 + */ + String module; + /** + * 方法名 + */ + String function; + /** + * 主键id + */ + String mainid; + /** + * 转换方法 + */ + String detailTransMethod; +} diff --git a/src/com/engine/salary/elog/service/ILoggerTableService.java b/src/com/engine/salary/elog/service/ILoggerTableService.java index e59fde3fb..8657f0ea6 100644 --- a/src/com/engine/salary/elog/service/ILoggerTableService.java +++ b/src/com/engine/salary/elog/service/ILoggerTableService.java @@ -2,6 +2,7 @@ package com.engine.salary.elog.service; import com.cloudstore.eccom.pc.table.WeaTable; import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.elog.entity.param.GetDetailChangesParam; import com.engine.salary.util.page.PageInfo; import javax.servlet.http.HttpServletRequest; @@ -13,7 +14,7 @@ public interface ILoggerTableService { WeaTable queryLogsPapi(String data, HttpServletRequest request); - List getDetailChanges(String module, String function, String mainid,String transMethod); + List getDetailChanges(GetDetailChangesParam param); List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request); diff --git a/src/com/engine/salary/elog/service/impl/LoggerTableService.java b/src/com/engine/salary/elog/service/impl/LoggerTableService.java index f81a8c0ab..217872e0c 100644 --- a/src/com/engine/salary/elog/service/impl/LoggerTableService.java +++ b/src/com/engine/salary/elog/service/impl/LoggerTableService.java @@ -14,6 +14,7 @@ import com.engine.salary.elog.entity.dto.FilterConditionDto; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.entity.dto.ShowColumsDto; import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.elog.entity.param.GetDetailChangesParam; import com.engine.salary.elog.enums.ElogConsts; import com.engine.salary.elog.service.ILoggerTableService; import com.engine.salary.elog.util.ElogServiceUtils; @@ -851,10 +852,8 @@ public class LoggerTableService extends Service implements ILoggerTableService { } @Override - public List> getDetailChanges(String module, String function, String mainid, String detailTransMethod) { - List> list = getDetailChangesMethod(module, function, mainid, detailTransMethod, null); - return list; - + public List> getDetailChanges(GetDetailChangesParam param) { + return getDetailChangesMethod(param.getModule(), param.getFunction(), param.getMainid(), param.getDetailTransMethod(), null); } /** diff --git a/src/com/engine/salary/elog/web/LoggerTableController.java b/src/com/engine/salary/elog/web/LoggerTableController.java index b2969f833..fe85d3045 100644 --- a/src/com/engine/salary/elog/web/LoggerTableController.java +++ b/src/com/engine/salary/elog/web/LoggerTableController.java @@ -2,11 +2,11 @@ package com.engine.salary.elog.web; import com.engine.common.util.ServiceUtil; import com.engine.salary.elog.entity.param.ELogGetLogParam; +import com.engine.salary.elog.entity.param.GetDetailChangesParam; import com.engine.salary.elog.service.ILoggerTableService; import com.engine.salary.elog.service.impl.LoggerTableService; import com.engine.salary.util.ResponseResult; import com.engine.salary.util.page.PageInfo; -import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.parameters.RequestBody; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; @@ -43,7 +43,14 @@ public class LoggerTableController { return new ResponseResult(user).run(getLoggerTableService(user)::queryLogs, data); } - @ApiOperation("获取日志(卡片)") + /** + * 获取日志(卡片) + * + * @param request + * @param response + * @param data + * @return + */ @POST @Path("/getCardLogs") @Produces(MediaType.APPLICATION_JSON) @@ -51,16 +58,21 @@ public class LoggerTableController { User user = HrmUserVarify.getUser(request, response); return new ResponseResult>>(user).run(getLoggerTableService(user)::queryCardLogList, data); } -// -// @ApiOperation("获取单条操作记录的更新明细") -// @RequestMapping(path = "getDetailChanges", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult>> getDetailChanges(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function, -// @RequestParam("mainid") @ApiParam("主键id") String mainid, -// @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod) { -// return WeaResult.success(getLoggerTableService(user).getDetailChanges(module, function, mainid, detailTransMethod)); -// } + + /** + * 获取单条操作记录的更新明细 + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/getDetailChanges") + @Produces(MediaType.APPLICATION_JSON) + public String getDetailChanges(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody GetDetailChangesParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getLoggerTableService(user)::getDetailChanges, param); + } // @ApiOperation("获取单条操作记录的更新明细") // @POST // @Path("/getDetailChanges") @@ -95,6 +107,7 @@ public class LoggerTableController { /** * 获取日志列表 + * * @param request * @param response * @param param diff --git a/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java b/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java index 3115f0efa..1514cc3c5 100644 --- a/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java +++ b/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.salaryitem.po; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.SalaryRoundingModeEnum; import com.engine.salary.enums.SalarySystemTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; @@ -25,21 +26,25 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_salary_item +@ElogTransform(name = "薪资项目") public class SalaryItemPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 名称 */ + @ElogTransform(name = "名称") private String name; /** * 编号 */ + @ElogTransform(name = "编号") private String code; /** @@ -47,26 +52,31 @@ public class SalaryItemPO { * * @see SalarySystemTypeEnum */ + @ElogTransform(name = "是否是系统项目") private Integer systemType; /** * 系统薪资项目的id(是从哪个系统薪资项目复制过来的) */ + @ElogTransform(name = "系统薪资项目的id") private Long sysSalaryItemId; /** * 默认使用。0:默认不适用、1:默认使用 */ + @ElogTransform(name = "默认使用") private Integer useDefault; /** * 薪资档案引用。0:薪资档案未引用、1:薪资档案引用 */ + @ElogTransform(name = "薪资档案引用") private Integer useInEmployeeSalary; /** * 核算时隐藏 */ + @ElogTransform(name = "核算时隐藏") private Integer hideDefault; /** @@ -74,11 +84,13 @@ public class SalaryItemPO { * * @see SalaryRoundingModeEnum */ + @ElogTransform(name = "进位规则") private Integer roundingMode; /** * 保留的小数位数 */ + @ElogTransform(name = "保留的小数位数") private Integer pattern; /** @@ -86,6 +98,7 @@ public class SalaryItemPO { * * @see SalaryValueTypeEnum */ + @ElogTransform(name = "取值方式") private Integer valueType; /** @@ -93,46 +106,55 @@ public class SalaryItemPO { * * @see SalaryDataTypeEnum */ + @ElogTransform(name = "字段类型") private String dataType; /** * 公式 */ + @ElogTransform(name = "公式") private Long formulaId; /** * 备注 */ + @ElogTransform(name = "备注") private String description; /** * 是否可以编辑。0:不可编辑、1:可编辑 */ + @ElogTransform(name = "是否可以编辑") private Integer canEdit; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; //查询条件 From ed29be3701259010cbf4eda11dc9076b5c3309fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 26 Dec 2023 18:47:45 +0800 Subject: [PATCH 029/169] =?UTF-8?q?=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/elog/util/LoggerTemplate.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index c457291df..8b5b6d377 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -15,7 +15,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.dubbo.common.utils.AnnotationUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import weaver.hrm.User; @@ -291,19 +290,12 @@ public class LoggerTemplate { if (changeBean.getNewValue() != null) { apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); tableTransform = changeBean.getNewValue().getClass().getAnnotation(ElogTransform.class); - //增加处理被动态代理对象注解的逻辑 - if (Objects.isNull(tableTransform)) { - tableTransform = AnnotationUtils.findAnnotation(changeBean.getNewValue().getClass(), ElogTransform.class); - } //fields = changeBean.getNewValue().getClass().getDeclaredFields(); fields = getAllFields(changeBean.getNewValue().getClass()); newJo = valueChange.getJSONObject("newValue"); } else { apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); tableTransform = changeBean.getOldValue().getClass().getAnnotation(ElogTransform.class); - if (Objects.isNull(tableTransform)) { - tableTransform = AnnotationUtils.findAnnotation(changeBean.getOldValue().getClass(), ElogTransform.class); - } //fields = changeBean.getOldValue().getClass().getDeclaredFields(); fields = getAllFields(changeBean.getOldValue().getClass()); } From e976c7aaec276a3df94b98327e3e62d62fda5095 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 27 Dec 2023 09:32:31 +0800 Subject: [PATCH 030/169] =?UTF-8?q?oracle=E5=B7=A5=E8=B5=84=E5=8D=95?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=BF=9D=E5=AD=98=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/mapper/salarybill/SalaryTemplateMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml index a88ac1600..17e371c33 100644 --- a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml @@ -956,7 +956,7 @@ #{tenantKey}, - #{sms_setting}, + #{smsSetting}, From 2befcfd1f2585e6103152ac5c5495c845656b11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 28 Dec 2023 11:08:53 +0800 Subject: [PATCH 031/169] =?UTF-8?q?pg=E8=84=9A=E6=9C=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/PG/sql202206090403.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/sqlupgrade/PG/sql202206090403.sql b/resource/sqlupgrade/PG/sql202206090403.sql index 679a8cc59..8f5d32f79 100644 --- a/resource/sqlupgrade/PG/sql202206090403.sql +++ b/resource/sqlupgrade/PG/sql202206090403.sql @@ -1,3 +1,3 @@ -ALTER TABLE hrsa_tax_declaration ADD COLUMN income_category int NOT NULL ; +ALTER TABLE hrsa_tax_declaration ADD COLUMN income_category int ; -ALTER TABLE hrsa_tax_declaration_detail ADD COLUMN employee_type int NOT NULL ; \ No newline at end of file +ALTER TABLE hrsa_tax_declaration_detail ADD COLUMN employee_type int ; \ No newline at end of file From 06fe3144ba995ac3b3d98792c0a27f28af2dae66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 28 Dec 2023 15:37:01 +0800 Subject: [PATCH 032/169] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/util/excel/DataTypeEnum.java | 32 +++++++++++++++++++ .../engine/salary/util/excel/ExcelHead.java | 28 ++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 src/com/engine/salary/util/excel/DataTypeEnum.java create mode 100644 src/com/engine/salary/util/excel/ExcelHead.java diff --git a/src/com/engine/salary/util/excel/DataTypeEnum.java b/src/com/engine/salary/util/excel/DataTypeEnum.java new file mode 100644 index 000000000..15e845cd9 --- /dev/null +++ b/src/com/engine/salary/util/excel/DataTypeEnum.java @@ -0,0 +1,32 @@ +package com.engine.salary.util.excel; + +import java.util.Arrays; +import java.util.Objects; + +public enum DataTypeEnum { + string("string", "字符类型"), + number("string", "数字类型"), + date("string", "日期类型"); + + private String value; + private String name; + + DataTypeEnum(String value, String name) { + this.value = value; + this.name = name; + } + + public String getValue() { + return value; + } + + public String getName() { + return name; + } + + + public static DataTypeEnum parseByValue(String value) { + return Arrays.stream(DataTypeEnum.values()).filter(typeEnum -> Objects.equals(typeEnum.getValue(), value)).findFirst().orElse(null); + } + +} diff --git a/src/com/engine/salary/util/excel/ExcelHead.java b/src/com/engine/salary/util/excel/ExcelHead.java new file mode 100644 index 000000000..cec7da51d --- /dev/null +++ b/src/com/engine/salary/util/excel/ExcelHead.java @@ -0,0 +1,28 @@ +package com.engine.salary.util.excel; + +import java.lang.annotation.*; + +/** + * 数据列表表头 + *

Copyright: Copyright (c) 2022

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ExcelHead { + + String title() default ""; + + String dataIndex() default ""; + + DataTypeEnum dataType() default DataTypeEnum.string; + + int labelId() default -1; + + String width() default ""; + +} From 7e22711dcd684350c7006efbbc4ecbfa545ab9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 28 Dec 2023 15:47:05 +0800 Subject: [PATCH 033/169] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/TaxDeclarationAnnualListDTO.java | 11 +++++ .../dto/TaxDeclarationLaborListDTO.java | 40 +++++++++++++------ .../dto/TaxDeclarationWageListDTO.java | 26 ++++++++++++ .../impl/TaxDeclarationExcelServiceImpl.java | 28 ++----------- .../engine/salary/util/excel/ExcelUtil.java | 22 ++++++++++ 5 files changed, 89 insertions(+), 38 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationAnnualListDTO.java b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationAnnualListDTO.java index 75b1b3191..696a3f9f7 100644 --- a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationAnnualListDTO.java +++ b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationAnnualListDTO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.taxdeclaration.dto; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.TableTitle; +import com.engine.salary.util.excel.ExcelHead; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; @@ -31,59 +32,69 @@ public class TaxDeclarationAnnualListDTO { text = "工号", width = "10%", column = "jobNum" ) @TableTitle(title ="工号",dataIndex = "jobNum",key = "jobNum") + @ExcelHead(title ="工号",dataIndex = "jobNum") private String jobNum; @SalaryTableColumn( text = "姓名", width = "10%", column = "username" ) @TableTitle(title ="姓名",dataIndex = "username",key = "username") + @ExcelHead(title ="姓名",dataIndex = "username") private String username; @SalaryTableColumn( text = "证件类型", width = "10%", column = "cardType" ) @TableTitle(title ="证件类型",dataIndex = "cardType",key = "cardType") + @ExcelHead(title ="证件类型",dataIndex = "cardType") private String cardType; @SalaryTableColumn( text = "证件号码", width = "10%", column = "cardNum" ) @TableTitle(title ="证件号码",dataIndex = "cardNum",key = "cardNum") + @ExcelHead(title ="证件号码",dataIndex = "cardNum") private String cardNum; @SalaryTableColumn( text = "全年一次性奖金额", width = "10%", column = "annualIncome" ) @TableTitle(title ="全年一次性奖金额",dataIndex = "annualIncome",key = "annualIncome") + @ExcelHead(title ="全年一次性奖金额",dataIndex = "annualIncome") private String annualIncome; @SalaryTableColumn( text = "免税收入", width = "10%", column = "annualTaxFreeIncome" ) @TableTitle(title ="免税收入",dataIndex = "annualTaxFreeIncome",key = "annualTaxFreeIncome") + @ExcelHead(title ="免税收入",dataIndex = "annualTaxFreeIncome") private String annualTaxFreeIncome; @SalaryTableColumn( text = "其他", width = "10%", column = "annualOther" ) @TableTitle(title ="其他",dataIndex = "annualOther",key = "annualOther") + @ExcelHead(title ="其他",dataIndex = "annualOther") private String annualOther; @SalaryTableColumn( text = "准予扣除的捐赠额", width = "10%", column = "annualDonateTax" ) @TableTitle(title ="准予扣除的捐赠额",dataIndex = "annualDonateTax",key = "annualDonateTax") + @ExcelHead(title ="准予扣除的捐赠额",dataIndex = "annualDonateTax") private String annualDonateTax; @SalaryTableColumn( text = "减免税额", width = "10%", column = "annualTaxSavings" ) @TableTitle(title ="减免税额",dataIndex = "annualTaxSavings",key = "annualTaxSavings") + @ExcelHead(title ="减免税额",dataIndex = "annualTaxSavings") private String annualTaxSavings; @SalaryTableColumn( text = "备注", width = "10%", column = "annualRemark" ) @TableTitle(title ="备注",dataIndex = "annualRemark",key = "annualRemark") + @ExcelHead(title ="备注",dataIndex = "annualRemark") private String annualRemark; } diff --git a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationLaborListDTO.java b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationLaborListDTO.java index 73872aa0a..ce03fd52c 100644 --- a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationLaborListDTO.java +++ b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationLaborListDTO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.taxdeclaration.dto; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.TableTitle; +import com.engine.salary.util.excel.ExcelHead; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; @@ -30,78 +31,91 @@ public class TaxDeclarationLaborListDTO { @SalaryTableColumn( text = "工号", width = "10%", column = "jobNum" ) - @TableTitle(title ="工号",dataIndex = "jobNum",key = "jobNum") + @TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum") + @ExcelHead(title = "工号", dataIndex = "jobNum") private String jobNum; @SalaryTableColumn( text = "姓名", width = "10%", column = "username" ) - @TableTitle(title ="姓名",dataIndex = "username",key = "username") + @TableTitle(title = "姓名", dataIndex = "username", key = "username") + @ExcelHead(title = "姓名", dataIndex = "username") private String username; @SalaryTableColumn( text = "证件类型", width = "10%", column = "cardType" ) - @TableTitle(title ="证件类型",dataIndex = "cardType",key = "cardType") + @TableTitle(title = "证件类型", dataIndex = "cardType", key = "cardType") + @ExcelHead(title = "证件类型", dataIndex = "cardType") private String cardType; @SalaryTableColumn( text = "证件号码", width = "10%", column = "cardNum" ) - @TableTitle(title ="证件号码",dataIndex = "cardNum",key = "cardNum") + @TableTitle(title = "证件号码", dataIndex = "cardNum", key = "cardNum") + @ExcelHead(title = "证件号码", dataIndex = "cardNum") private String cardNum; @SalaryTableColumn( text = "所得项目", width = "10%", column = "incomeItems" ) - @TableTitle(title ="所得项目",dataIndex = "incomeItems",key = "incomeItems") + @TableTitle(title = "所得项目", dataIndex = "incomeItems", key = "incomeItems") + @ExcelHead(title = "所得项目", dataIndex = "incomeItems") private String incomeItems; @SalaryTableColumn( text = "劳务收入", width = "10%", column = "laborIncome" ) - @TableTitle(title ="劳务收入",dataIndex = "laborIncome",key = "laborIncome") + @TableTitle(title = "劳务收入", dataIndex = "laborIncome", key = "laborIncome") + @ExcelHead(title = "劳务收入", dataIndex = "laborIncome") private String laborIncome; @SalaryTableColumn( text = "劳务免税收入", width = "10%", column = "laborTaxFreeIncome" ) - @TableTitle(title ="劳务免税收入",dataIndex = "laborTaxFreeIncome",key = "laborTaxFreeIncome") + @TableTitle(title = "劳务免税收入", dataIndex = "laborTaxFreeIncome", key = "laborTaxFreeIncome") + @ExcelHead(title = "劳务免税收入", dataIndex = "laborTaxFreeIncome") private String laborTaxFreeIncome; @SalaryTableColumn( text = "商业健康保险", width = "10%", column = "commercialHealthInsurance" ) - @TableTitle(title ="商业健康保险",dataIndex = "commercialHealthInsurance",key = "commercialHealthInsurance") + @TableTitle(title = "商业健康保险", dataIndex = "commercialHealthInsurance", key = "commercialHealthInsurance") + @ExcelHead(title = "商业健康保险", dataIndex = "commercialHealthInsurance") private String commercialHealthInsurance; @SalaryTableColumn( text = "税延养老保险", width = "10%", column = "taxDeferredEndowmentInsurance" ) - @TableTitle(title ="税延养老保险",dataIndex = "taxDeferredEndowmentInsurance",key = "taxDeferredEndowmentInsurance") + @TableTitle(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance", key = "taxDeferredEndowmentInsurance") + @ExcelHead(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance") private String taxDeferredEndowmentInsurance; @SalaryTableColumn( text = "其他", width = "10%", column = "other" ) - @TableTitle(title ="其他",dataIndex = "other",key = "other") + @TableTitle(title = "其他", dataIndex = "other", key = "other") + @ExcelHead(title = "其他", dataIndex = "other") private String other; @SalaryTableColumn( text = "准予扣除的捐赠额", width = "10%", column = "allowedDonation" ) - @TableTitle(title ="准予扣除的捐赠额",dataIndex = "allowedDonation",key = "allowedDonation") + @TableTitle(title = "准予扣除的捐赠额", dataIndex = "allowedDonation", key = "allowedDonation") + @ExcelHead(title = "准予扣除的捐赠额", dataIndex = "allowedDonation") private String allowedDonation; @SalaryTableColumn( text = "减免税额", width = "10%", column = "taxDeduction" ) - @TableTitle(title ="减免税额",dataIndex = "taxDeduction",key = "taxDeduction") + @TableTitle(title = "减免税额", dataIndex = "taxDeduction", key = "taxDeduction") + @ExcelHead(title = "减免税额", dataIndex = "taxDeduction") private String taxDeduction; @SalaryTableColumn( text = "备注", width = "10%", column = "description" ) - @TableTitle(title ="备注",dataIndex = "description",key = "description") + @TableTitle(title = "备注", dataIndex = "description", key = "description") + @ExcelHead(title = "备注", dataIndex = "description") private String description; } diff --git a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationWageListDTO.java b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationWageListDTO.java index 3725aaf27..419f8f1e0 100644 --- a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationWageListDTO.java +++ b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationWageListDTO.java @@ -4,6 +4,7 @@ import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.TableTitle; +import com.engine.salary.util.excel.ExcelHead; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -35,101 +36,126 @@ public class TaxDeclarationWageListDTO { @SalaryTableColumn(text = "工号", width = "10%", column = "jobNum") @TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum") + @ExcelHead(title = "工号", dataIndex = "jobNum") private String jobNum; @SalaryTableColumn(text = "姓名", width = "10%", column = "username") @TableTitle(title = "姓名", dataIndex = "username", key = "username") + @ExcelHead(title = "姓名", dataIndex = "username") private String username; @SalaryTableColumn(text = "证件类型", width = "10%", column = "cardType") @TableTitle(title = "证件类型", dataIndex = "cardType", key = "cardType") + @ExcelHead(title = "证件类型", dataIndex = "cardType") private String cardType; @SalaryTableColumn(text = "证件号码", width = "10%", column = "cardNum") @TableTitle(title = "证件号码", dataIndex = "cardNum", key = "cardNum") + @ExcelHead(title = "证件号码", dataIndex = "cardNum") private String cardNum; @SalaryTableColumn(text = "本期收入", width = "10%", column = "income") @TableTitle(title = "本期收入", dataIndex = "income", key = "income") + @ExcelHead(title = "本期收入", dataIndex = "income") private String income; @SalaryTableColumn(text = "本期免税收入", width = "10%", column = "taxFreeIncome") @TableTitle(title = "本期免税收入", dataIndex = "taxFreeIncome", key = "taxFreeIncome") + @ExcelHead(title = "本期免税收入", dataIndex = "taxFreeIncome") private String taxFreeIncome; @SalaryTableColumn(text = "基本养老保险费", width = "10%", column = "endowmentInsurance") @TableTitle(title = "基本养老保险费", dataIndex = "endowmentInsurance", key = "endowmentInsurance") + @ExcelHead(title = "基本养老保险费", dataIndex = "endowmentInsurance") private String endowmentInsurance; @SalaryTableColumn(text = "基本医疗保险费", width = "10%", column = "medicalInsurance") @TableTitle(title = "基本医疗保险费", dataIndex = "medicalInsurance", key = "medicalInsurance") + @ExcelHead(title = "基本医疗保险费", dataIndex = "medicalInsurance") private String medicalInsurance; @SalaryTableColumn(text = "失业保险费", width = "10%", column = "unemploymentInsurance") @TableTitle(title = "失业保险费", dataIndex = "unemploymentInsurance", key = "unemploymentInsurance") + @ExcelHead(title = "失业保险费", dataIndex = "unemploymentInsurance") private String unemploymentInsurance; @SalaryTableColumn(text = "住房公积金", width = "10%", column = "housingProvidentFund") @TableTitle(title = "住房公积金", dataIndex = "housingProvidentFund", key = "housingProvidentFund") + @ExcelHead(title = "住房公积金", dataIndex = "housingProvidentFund") private String housingProvidentFund; @SalaryTableColumn(text = "累计子女教育", width = "10%", column = "addUpChildEducation") @TableTitle(title = "累计子女教育", dataIndex = "addUpChildEducation", key = "addUpChildEducation") + @ExcelHead(title = "累计子女教育", dataIndex = "addUpChildEducation") private String addUpChildEducation; @SalaryTableColumn(text = "累计住房贷款利息", width = "10%", column = "addUpHousingLoanInterest") @TableTitle(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest", key = "addUpHousingLoanInterest") + @ExcelHead(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest") private String addUpHousingLoanInterest; @SalaryTableColumn(text = "累计住房租金", width = "10%", column = "addUpHousingRent") @TableTitle(title = "累计住房租金", dataIndex = "addUpHousingRent", key = "addUpHousingRent") + @ExcelHead(title = "累计住房租金", dataIndex = "addUpHousingRent") private String addUpHousingRent; @SalaryTableColumn(text = "累计继续教育", width = "10%", column = "addUpContinuingEducation") @TableTitle(title = "累计继续教育", dataIndex = "addUpContinuingEducation", key = "addUpContinuingEducation") + @ExcelHead(title = "累计继续教育", dataIndex = "addUpContinuingEducation") private String addUpContinuingEducation; @SalaryTableColumn(text = "累计赡养老人", width = "10%", column = "addUpSupportElderly") @TableTitle(title = "累计赡养老人", dataIndex = "addUpSupportElderly", key = "addUpSupportElderly") + @ExcelHead(title = "累计赡养老人", dataIndex = "addUpSupportElderly") private String addUpSupportElderly; @SalaryTableColumn(text = "累计大病医疗", width = "10%", column = "addUpIllnessMedical") @TableTitle(title = "累计大病医疗", dataIndex = "addUpIllnessMedical", key = "addUpIllnessMedical") + @ExcelHead(title = "累计大病医疗", dataIndex = "addUpIllnessMedical") private String addUpIllnessMedical; @SalaryTableColumn(text = "累计3岁以下婴幼儿照护", width = "10%", column = "addUpInfantCare") @TableTitle(title = "累计3岁以下婴幼儿照护", dataIndex = "addUpInfantCare", key = "addUpInfantCare") + @ExcelHead(title = "累计3岁以下婴幼儿照护", dataIndex = "addUpInfantCare") private String addUpInfantCare; @SalaryTableColumn(text = "累计个人养老金", width = "10%", column = "addUpPrivatePension") @TableTitle(title = "累计个人养老金", dataIndex = "addUpPrivatePension", key = "addUpPrivatePension") + @ExcelHead(title = "累计个人养老金", dataIndex = "addUpPrivatePension") private String addUpPrivatePension; @SalaryTableColumn(text = "企业(职业)年金", width = "10%", column = "annuity") @TableTitle(title = "企业(职业)年金", dataIndex = "annuity", key = "annuity") + @ExcelHead(title = "企业(职业)年金", dataIndex = "annuity") private String annuity; @SalaryTableColumn(text = "商业健康保险", width = "10%", column = "commercialHealthInsurance") @TableTitle(title = "商业健康保险", dataIndex = "commercialHealthInsurance", key = "commercialHealthInsurance") + @ExcelHead(title = "商业健康保险", dataIndex = "commercialHealthInsurance") private String commercialHealthInsurance; @SalaryTableColumn(text = "税延养老保险", width = "10%", column = "taxDeferredEndowmentInsurance") @TableTitle(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance", key = "taxDeferredEndowmentInsurance") + @ExcelHead(title = "税延养老保险", dataIndex = "taxDeferredEndowmentInsurance") private String taxDeferredEndowmentInsurance; @SalaryTableColumn(text = "其他", width = "10%", column = "other") @TableTitle(title = "其他", dataIndex = "other", key = "other") + @ExcelHead(title = "其他", dataIndex = "other") private String other; @SalaryTableColumn(text = "准予扣除的捐赠额", width = "10%", column = "allowedDonation") @TableTitle(title = "准予扣除的捐赠额", dataIndex = "allowedDonation", key = "allowedDonation") + @ExcelHead(title = "准予扣除的捐赠额", dataIndex = "allowedDonation") private String allowedDonation; @SalaryTableColumn(text = "减免税额", width = "10%", column = "taxDeduction") @TableTitle(title = "减免税额", dataIndex = "taxDeduction", key = "taxDeduction") + @ExcelHead(title = "减免税额", dataIndex = "taxDeduction") private String taxDeduction; @SalaryTableColumn(text = "备注", width = "10%", column = "description") @TableTitle(title = "备注", dataIndex = "description", key = "description") + @ExcelHead(title = "备注", dataIndex = "description") private String description; } diff --git a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java index 957957790..c9eb8796a 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java @@ -2,7 +2,6 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationAnnualListDTO; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO; @@ -23,7 +22,6 @@ import lombok.extern.slf4j.Slf4j; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.hrm.User; -import java.lang.reflect.Field; import java.util.List; import java.util.Map; import java.util.Objects; @@ -68,7 +66,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar List dataIndexList = Lists.newArrayList(); if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.WAGES_AND_SALARIES.getValue())) { // 解析表头 - parseHeader(TaxDeclarationWageListDTO.class, headerList, dataIndexList); + ExcelUtil.parseHeader(TaxDeclarationWageListDTO.class, headerList, dataIndexList); rows.add(headerList); for (int i = 0; i < totalPages; i++) { TaxDeclarationDetailListQueryParam queryParam = new TaxDeclarationDetailListQueryParam(); @@ -89,7 +87,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar } if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.REMUNERATION_FOR_LABOR.getValue())) { // 解析表头 - parseHeader(TaxDeclarationLaborListDTO.class, headerList, dataIndexList); + ExcelUtil.parseHeader(TaxDeclarationLaborListDTO.class, headerList, dataIndexList); rows.add(headerList); for (int i = 0; i < totalPages; i++) { TaxDeclarationDetailListQueryParam queryParam = new TaxDeclarationDetailListQueryParam(); @@ -111,7 +109,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar if (Objects.equals(taxDeclarationPO.getIncomeCategory(), IncomeCategoryEnum.ONETIME_ANNUAL_BONUS.getValue())) { // 解析表头 - parseHeader(TaxDeclarationAnnualListDTO.class, headerList, dataIndexList); + ExcelUtil.parseHeader(TaxDeclarationAnnualListDTO.class, headerList, dataIndexList); rows.add(headerList); for (int i = 0; i < totalPages; i++) { TaxDeclarationDetailListQueryParam queryParam = new TaxDeclarationDetailListQueryParam(); @@ -133,24 +131,4 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar return ExcelUtil.genWorkbookV2(rows, sheetName); } - - /** - * 解析表头 - * - * @param clazz - * @param headerList - * @param dataIndexList - * @param - */ - private void parseHeader(Class clazz, List headerList, List dataIndexList) { - Field[] declaredFields = clazz.getDeclaredFields(); - for (Field declaredField : declaredFields) { - if (!declaredField.isAnnotationPresent(SalaryTableColumn.class)) { - continue; - } - SalaryTableColumn annotation = declaredField.getAnnotation(SalaryTableColumn.class); - headerList.add(SalaryI18nUtil.getI18nLabel( annotation.labelId(), annotation.text())); - dataIndexList.add(declaredField.getName()); - } - } } diff --git a/src/com/engine/salary/util/excel/ExcelUtil.java b/src/com/engine/salary/util/excel/ExcelUtil.java index c50c11d2b..877714295 100644 --- a/src/com/engine/salary/util/excel/ExcelUtil.java +++ b/src/com/engine/salary/util/excel/ExcelUtil.java @@ -1,6 +1,7 @@ package com.engine.salary.util.excel; import com.engine.salary.util.SalaryDateUtil; +import com.engine.salary.util.SalaryI18nUtil; import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.FillPatternType; @@ -9,6 +10,7 @@ import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.usermodel.*; import java.awt.*; +import java.lang.reflect.Field; import java.util.Date; import java.util.List; @@ -267,4 +269,24 @@ public class ExcelUtil { } return workbook; } + + /** + * 解析表头 + * + * @param clazz + * @param headerList + * @param dataIndexList + * @param + */ + public static void parseHeader(Class clazz, List headerList, List dataIndexList) { + Field[] declaredFields = clazz.getDeclaredFields(); + for (Field declaredField : declaredFields) { + if (!declaredField.isAnnotationPresent(ExcelHead.class)) { + continue; + } + ExcelHead annotation = declaredField.getAnnotation(ExcelHead.class); + headerList.add(SalaryI18nUtil.getI18nLabel(annotation.labelId(), annotation.title())); + dataIndexList.add(declaredField.getName()); + } + } } From f03c0d0147749d0824466bd9caf884239463fc81 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 29 Dec 2023 10:27:35 +0800 Subject: [PATCH 034/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=87=B3=E8=B4=A6=E5=A5=97=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=B2=A1=E6=9C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=9A=84=E8=B4=A6=E5=A5=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/service/impl/SalaryItemServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index 3c30540a4..b287d3792 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -421,6 +421,9 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService List salarySobItemList = getSalarySobItemService(user).listBySalaryItemIds(Collections.singleton(salaryItemId)); Set salarySobIds = SalaryEntityUtil.properties(salarySobItemList, SalarySobItemPO::getSalarySobId); List salarySobs = getSalarySobService(user).listByIds(salarySobIds); + // 获取能够管理的义务人 + Set taxAgentIds = SalaryEntityUtil.properties(getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())), TaxAgentPO::getId); + salarySobs = salarySobs.stream().filter(sob -> taxAgentIds.contains(sob.getTaxAgentId())).collect(Collectors.toList()); return salarySobs.stream().map(m -> { Map map = new HashMap<>(); map.put("id", String.valueOf(m.getId())); From fe00f5c0e74247d579b3fb41b41ae46389d87339 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 2 Jan 2024 14:40:33 +0800 Subject: [PATCH 035/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=91?= =?UTF-8?q?=E9=80=81action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/FileSalaryAcctRecordAction.java | 15 ++- .../salary/action/SendSalaryAction.java | 118 ++++++++++++++++++ .../salary/service/SalarySendService.java | 2 + .../service/impl/SalarySendServiceImpl.java | 5 + 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 src/com/engine/salary/action/SendSalaryAction.java diff --git a/src/com/engine/salary/action/FileSalaryAcctRecordAction.java b/src/com/engine/salary/action/FileSalaryAcctRecordAction.java index 7d6d22fb7..838c4c494 100644 --- a/src/com/engine/salary/action/FileSalaryAcctRecordAction.java +++ b/src/com/engine/salary/action/FileSalaryAcctRecordAction.java @@ -1,12 +1,14 @@ package com.engine.salary.action; import com.engine.common.util.ServiceUtil; +import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SalaryAcctRecordService; import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl; import com.engine.salary.util.db.MapperProxyFactory; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import weaver.general.BaseBean; import weaver.general.Util; import weaver.hrm.User; import weaver.interfaces.workflow.action.Action; @@ -59,8 +61,19 @@ public class FileSalaryAcctRecordAction implements Action { } User user = new User(); user.setUid(1); + Long acctRecordId = Long.valueOf(salaryAcctRecordId); + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(acctRecordId); + if (salaryAcctRecordPO == null) { + requestInfo.getRequestManager().setMessage("薪资核算记录不存在,或已被删除"); + return FAILURE_AND_CONTINUE; + } + if (salaryAcctRecordPO.getStatus() > 1) { + BaseBean baseBean = new BaseBean(); + baseBean.writeLog("核算记录归档action, 该核算记录已经归档:" + salaryAcctRecordPO.getId()); + return SUCCESS; + } try { - getSalaryAcctRecordService(user).file(Long.valueOf(salaryAcctRecordId)); + getSalaryAcctRecordService(user).file(acctRecordId); } catch (Exception e) { requestInfo.getRequestManager().setMessage(e.getMessage()); return FAILURE_AND_CONTINUE; diff --git a/src/com/engine/salary/action/SendSalaryAction.java b/src/com/engine/salary/action/SendSalaryAction.java new file mode 100644 index 000000000..f0f3ef154 --- /dev/null +++ b/src/com/engine/salary/action/SendSalaryAction.java @@ -0,0 +1,118 @@ +package com.engine.salary.action; + +import com.engine.common.util.ServiceUtil; +import com.engine.salary.biz.SalarySendInfoBiz; +import com.engine.salary.entity.salaryBill.param.SalarySendGrantParam; +import com.engine.salary.entity.salaryBill.po.SalarySendPO; +import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; +import com.engine.salary.service.SalaryAcctRecordService; +import com.engine.salary.service.SalaryBillService; +import com.engine.salary.service.SalarySendService; +import com.engine.salary.service.SalaryTemplateService; +import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl; +import com.engine.salary.service.impl.SalaryBillServiceImpl; +import com.engine.salary.service.impl.SalarySendServiceImpl; +import com.engine.salary.service.impl.SalaryTemplateServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import weaver.general.Util; +import weaver.hrm.User; +import weaver.interfaces.workflow.action.Action; +import weaver.soa.workflow.request.Property; +import weaver.soa.workflow.request.RequestInfo; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author Harryxzy + * @ClassName FileSalaryAcctRecordAction + * @date 2023/12/13 9:17 + * @description 工资单发放action + */ +@Slf4j +public class SendSalaryAction implements Action { + + + private SalaryAcctRecordService getSalaryAcctRecordService(User user) { + return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user); + } + + private SalarySendService getSalarySendService(User user) { + return ServiceUtil.getService(SalarySendServiceImpl.class, user); + } + + private SalaryTemplateService getSalaryTemplateService(User user) { + return ServiceUtil.getService(SalaryTemplateServiceImpl.class, user); + } + + private SalarySendInfoBiz salarySendInfoMapper = new SalarySendInfoBiz(); + + private SalaryBillService getSalaryBillService(User user) { + return ServiceUtil.getService(SalaryBillServiceImpl.class, user); + } + + + /** + * 发放id(核算记录id,工资单id)流程字段名 + */ + private String idFieldName; + + /** + * 根据什么id(核算记录id,工资单id)发工资单 + */ + private String sendBy; + + + @Override + public String execute(RequestInfo requestInfo) { + Property[] properties = requestInfo.getMainTableInfo().getProperty(); + Map fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, + property -> Util.null2String(property.getValue()))); + String idStr = fieldMap.get(idFieldName); + if (StringUtils.isBlank(idStr)) { + requestInfo.getRequestManager().setMessage("核算记录id或工资单id不能为空"); + return FAILURE_AND_CONTINUE; + } + User user = new User(); + user.setUid(1); + Long id = Long.valueOf(idStr); + SalarySendPO salarySendPO; + if(!org.h2.util.StringUtils.isNullOrEmpty(sendBy) && sendBy.equals("salaryAcctRecordId")) { + // 根据核算记录id发 + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(id); + if (salaryAcctRecordPO == null) { + requestInfo.getRequestManager().setMessage("薪资核算记录不存在,或已被删除"); + return FAILURE_AND_CONTINUE; + } + if (salaryAcctRecordPO.getStatus() == 1) { + requestInfo.getRequestManager().setMessage("核算记录还未归档,请先归档"); + return FAILURE_AND_CONTINUE; + } + // 获取工资单id + List salarySendPOList = getSalarySendService(user).listSome(SalarySendPO.builder().salaryAccountingId(id).sendStatus(0).build()); + salarySendPO = salarySendPOList.get(0); + } else if (!org.h2.util.StringUtils.isNullOrEmpty(sendBy) && sendBy.equals("salarySendId")) { + // 根据工资单发 + salarySendPO = getSalarySendService(user).getById(id); + } else { + requestInfo.getRequestManager().setMessage("请先维护根据什么id发放工资单的sendBy参数"); + return FAILURE_AND_CONTINUE; + } + + if (salarySendPO == null || salarySendPO.getId() == null) { + requestInfo.getRequestManager().setMessage("工资单不存在或已被删除!"); + return FAILURE_AND_CONTINUE; + } + try { + // 全部发放 + getSalaryBillService(user).grant(SalarySendGrantParam.builder().salarySendId(salarySendPO.getId()).build()); + } catch (Exception e) { + requestInfo.getRequestManager().setMessage(e.getMessage()); + return FAILURE_AND_CONTINUE; + } + return SUCCESS; + } +} diff --git a/src/com/engine/salary/service/SalarySendService.java b/src/com/engine/salary/service/SalarySendService.java index 90da3440f..72fc71423 100644 --- a/src/com/engine/salary/service/SalarySendService.java +++ b/src/com/engine/salary/service/SalarySendService.java @@ -216,4 +216,6 @@ public interface SalarySendService { void autoConfirmSalaryBill(List needAutoIds); List getByIds(List salarySendId); + + List listSome(SalarySendPO param); } diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 5c3a92f0d..20cb9f176 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -1725,4 +1725,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService } return getSalarySendMapper().getByIds(salarySendId); } + + @Override + public List listSome(SalarySendPO param) { + return getSalarySendMapper().listSome(param); + } } From 7945c84fbb5b4c2c47acd930a4e4afdb36bbb467 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 2 Jan 2024 16:37:07 +0800 Subject: [PATCH 036/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salaryacct/bo/SalaryAcctResultBO.java | 16 ++++++++-------- .../entity/salaryitem/bo/SalaryItemBO.java | 5 ++++- .../entity/salaryitem/dto/SalaryItemFormDTO.java | 3 +++ .../entity/salaryitem/dto/SalaryItemListDTO.java | 3 +++ .../salaryitem/param/SalaryItemSaveParam.java | 5 +++++ .../entity/salaryitem/po/SalaryItemPO.java | 5 +++++ .../salarysob/bo/SalarySobItemAggregateBO.java | 1 + .../entity/salarysob/dto/SalarySobItemDTO.java | 3 +++ .../mapper/salaryitem/SalaryItemMapper.xml | 12 +++++++++++- .../service/impl/SalaryItemServiceImpl.java | 1 + .../engine/salary/util/page/SalaryPageUtil.java | 5 ++++- 11 files changed, 48 insertions(+), 11 deletions(-) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 392ac81e6..0cd19d52b 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -170,7 +170,7 @@ public class SalaryAcctResultBO { List columns = Lists.newArrayList(); // 员工信息字段 for (SalarySobEmpFieldDTO salarySobEmpFieldDTO : salarySobItemAggregateDTO.getEmpFields()) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobEmpFieldDTO.getFieldName()), salarySobEmpFieldDTO.getFieldName(), salarySobEmpFieldDTO.getFieldId())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobEmpFieldDTO.getFieldName(), 0), salarySobEmpFieldDTO.getFieldName(), salarySobEmpFieldDTO.getFieldId())); } // 薪资项目分组下的薪资项目 for (SalarySobItemGroupDTO salarySobItemGroupDTO : salarySobItemAggregateDTO.getItemGroups()) { @@ -180,29 +180,29 @@ public class SalaryAcctResultBO { List childrenColumns = Lists.newArrayList(); for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); } else { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); } } - WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName()), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns); + WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns); columns.add(weaTableColumnWapper); } // 没有分类的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); } } // 回算的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern())); } } diff --git a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java index f65c9f924..c11c58954 100644 --- a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java +++ b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java @@ -117,6 +117,7 @@ public class SalaryItemBO { .description(salaryItemPO.getDescription()) .canDelete(true) .canEdit(openFormulaForcedEditing ||Objects.equals(salaryItemPO.getCanEdit(), NumberUtils.INTEGER_ONE)) + .width(salaryItemPO.getWidth()) .build(); } ).collect(Collectors.toList()); @@ -200,7 +201,8 @@ public class SalaryItemBO { .setCanEdit(salaryItemPO.getCanEdit()) .setTaxAgentIds(salaryItemPO.getTaxAgentIds()) .setSharedType(salaryItemPO.getSharedType()) - .setSortedIndex(salaryItemPO.getSortedIndex()); + .setSortedIndex(salaryItemPO.getSortedIndex()) + .setWidth(salaryItemPO.getWidth()); } /** @@ -280,6 +282,7 @@ public class SalaryItemBO { .sharedType(Optional.ofNullable(saveParam.getSharedType()).orElse(0)) .taxAgentIds(saveParam.getTaxAgentIds()) .sortedIndex(saveParam.getSortedIndex()) + .width(saveParam.getWidth()) .build(); // 开启了"薪资档案引用",取值方式固定为输入 // if (Objects.equals(saveParam.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE)) { diff --git a/src/com/engine/salary/entity/salaryitem/dto/SalaryItemFormDTO.java b/src/com/engine/salary/entity/salaryitem/dto/SalaryItemFormDTO.java index 5101bf2e4..da0c6d4d5 100644 --- a/src/com/engine/salary/entity/salaryitem/dto/SalaryItemFormDTO.java +++ b/src/com/engine/salary/entity/salaryitem/dto/SalaryItemFormDTO.java @@ -95,4 +95,7 @@ public class SalaryItemFormDTO { private String taxAgentIds; private Integer sortedIndex; + + // 宽度 + private Integer width; } diff --git a/src/com/engine/salary/entity/salaryitem/dto/SalaryItemListDTO.java b/src/com/engine/salary/entity/salaryitem/dto/SalaryItemListDTO.java index adb0dc4b1..1e0af69d4 100644 --- a/src/com/engine/salary/entity/salaryitem/dto/SalaryItemListDTO.java +++ b/src/com/engine/salary/entity/salaryitem/dto/SalaryItemListDTO.java @@ -105,6 +105,9 @@ public class SalaryItemListDTO { @TableTitle(title = "显示顺序",dataIndex = "sortedIndex",key = "sortedIndex") private Integer sortedIndex; + // 宽度 + private Integer width; + @SalaryTableColumn(text = "操作", width = "20%", column = "operate") private String operate; } diff --git a/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java b/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java index 916342dfd..a200cea77 100644 --- a/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java +++ b/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java @@ -102,4 +102,9 @@ public class SalaryItemSaveParam { * 排序 */ private Integer sortedIndex; + + /** + * 宽度 + */ + private Integer width; } diff --git a/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java b/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java index 3115f0efa..3929bfed4 100644 --- a/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java +++ b/src/com/engine/salary/entity/salaryitem/po/SalaryItemPO.java @@ -159,4 +159,9 @@ public class SalaryItemPO { * 排序 */ private Integer sortedIndex; + + /** + * 宽度 + */ + private Integer width; } diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java index be5bcf6c3..511e946c7 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java @@ -143,6 +143,7 @@ public class SalarySobItemAggregateBO { .sortedIndex(salarySobItemPO.getSortedIndex()) .canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1)) .canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1)) + .width(salaryItemPO.getWidth()) .build()); } } diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java index 81bbc138a..8b23d6446 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java @@ -109,4 +109,7 @@ public class SalarySobItemDTO { * 保留小数位数 */ private Integer pattern; + + // 显示宽度 + private Integer width; } diff --git a/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml b/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml index 7dd705c72..93ec756ca 100644 --- a/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml +++ b/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml @@ -51,7 +51,8 @@ t.shared_type, t.tax_agent_ids, t.sorted_index, - t.hide_default + t.hide_default, + t.width @@ -217,6 +218,9 @@ sorted_index, + + width, + @@ -288,6 +292,9 @@ #{sortedIndex}, + + #{width}, + @@ -359,6 +366,9 @@ tax_agent_ids=#{taxAgentIds}, + + width=#{width}, + sorted_index=#{sortedIndex}, WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index b287d3792..a6afb5bd3 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -254,6 +254,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService newSalaryItemPO.setSharedType(saveParam.getSharedType()); newSalaryItemPO.setTaxAgentIds(saveParam.getTaxAgentIds()); newSalaryItemPO.setSortedIndex(saveParam.getSortedIndex()); + newSalaryItemPO.setWidth(saveParam.getWidth()); salaryItemBiz.updateById(newSalaryItemPO); //改名后更新公式 diff --git a/src/com/engine/salary/util/page/SalaryPageUtil.java b/src/com/engine/salary/util/page/SalaryPageUtil.java index 0e75d79d2..bc8892eee 100644 --- a/src/com/engine/salary/util/page/SalaryPageUtil.java +++ b/src/com/engine/salary/util/page/SalaryPageUtil.java @@ -91,7 +91,10 @@ public class SalaryPageUtil { endIndex > source.size() ? source.size() : endIndex); } - public static String selfAdaption(String chars) { + public static String selfAdaption(String chars, Integer width) { + if (width != null && width != 0){ + return width + ""; + } int adaption = 0; if (chars != null) { From 9ca420b5e6d6961a1dd7662331651e14e5101b6b Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 4 Jan 2024 10:39:41 +0800 Subject: [PATCH 037/169] =?UTF-8?q?fix=E5=88=A0=E9=99=A4=E4=B9=89=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=E6=97=B6=EF=BC=8C=E6=B2=A1=E5=88=86=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/TaxAgentEmpServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java index 7cd9cfd6f..f7fd19a94 100644 --- a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java @@ -53,7 +53,9 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic return; } List idList = taxAgentEmpList.stream().map(TaxAgentEmpPO::getId).collect(Collectors.toList()); - getTaxAgentEmpMapper().deleteByIds(idList); + + List> partition = Lists.partition(idList, 500); + partition.forEach(getTaxAgentEmpMapper()::deleteByIds); } @Override From 681c0fb18eeaadc8d4d5345503db1fc3386976c9 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 8 Jan 2024 10:57:55 +0800 Subject: [PATCH 038/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=B8=AD=E6=9B=B4=E6=96=B0=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E4=B8=BB=E8=A1=A8=E5=92=8C=E5=AD=90=E8=A1=A8=E7=9A=84=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index f2f3feee7..977adaab4 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -705,7 +705,7 @@ public class SIArchivesBiz { /** * @param paramReq - * @param employeeId + * @param */ public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); @@ -781,8 +781,9 @@ public class SIArchivesBiz { if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { //对于非系统人员,编辑后状态切换为正在缴纳 baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); } + baseInfoPO.setOtherArchivesId(updateOtherInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); sqlSession.commit(); } else { otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder() @@ -851,7 +852,7 @@ public class SIArchivesBiz { /** * @param paramReq - * @param employeeId + * @param */ public void fundSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); @@ -927,8 +928,9 @@ public class SIArchivesBiz { if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { //对于非系统人员,编辑后状态切换为正在缴纳 baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); } + baseInfoPO.setFundArchivesId(updateFundInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); sqlSession.commit(); } else { fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder() @@ -1001,7 +1003,7 @@ public class SIArchivesBiz { /** * @param paramReq - * @param employeeId + * @param */ public void socialSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); @@ -1084,8 +1086,9 @@ public class SIArchivesBiz { if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { //对于非系统人员,编辑后状态切换为正在缴纳 baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); } + baseInfoPO.setSocialArchivesId(updateSocialInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); sqlSession.commit(); } else { socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder() From c0c93490fe58359c40d1bc04796efa4384fa9c1f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 8 Jan 2024 15:32:49 +0800 Subject: [PATCH 039/169] sql --- resource/sqlupgrade/DM/sql202401080103.sql | 3 +++ resource/sqlupgrade/GS/sql202401080103.sql | 3 +++ resource/sqlupgrade/JC/sql202401080103.sql | 3 +++ resource/sqlupgrade/Mysql/sql202401080103.sql | 1 + resource/sqlupgrade/Oracle/sql202401080103.sql | 2 ++ resource/sqlupgrade/PG/sql202401080103.sql | 1 + resource/sqlupgrade/SQLServer/sql202401080103.sql | 2 ++ resource/sqlupgrade/ST/sql202401080103.sql | 3 +++ 8 files changed, 18 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202401080103.sql create mode 100644 resource/sqlupgrade/GS/sql202401080103.sql create mode 100644 resource/sqlupgrade/JC/sql202401080103.sql create mode 100644 resource/sqlupgrade/Mysql/sql202401080103.sql create mode 100644 resource/sqlupgrade/Oracle/sql202401080103.sql create mode 100644 resource/sqlupgrade/PG/sql202401080103.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202401080103.sql create mode 100644 resource/sqlupgrade/ST/sql202401080103.sql diff --git a/resource/sqlupgrade/DM/sql202401080103.sql b/resource/sqlupgrade/DM/sql202401080103.sql new file mode 100644 index 000000000..754d4529d --- /dev/null +++ b/resource/sqlupgrade/DM/sql202401080103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_item add width int null; +/ + diff --git a/resource/sqlupgrade/GS/sql202401080103.sql b/resource/sqlupgrade/GS/sql202401080103.sql new file mode 100644 index 000000000..754d4529d --- /dev/null +++ b/resource/sqlupgrade/GS/sql202401080103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_item add width int null; +/ + diff --git a/resource/sqlupgrade/JC/sql202401080103.sql b/resource/sqlupgrade/JC/sql202401080103.sql new file mode 100644 index 000000000..754d4529d --- /dev/null +++ b/resource/sqlupgrade/JC/sql202401080103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_item add width int null; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202401080103.sql b/resource/sqlupgrade/Mysql/sql202401080103.sql new file mode 100644 index 000000000..f5fb1c6f1 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202401080103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_item add width int null; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202401080103.sql b/resource/sqlupgrade/Oracle/sql202401080103.sql new file mode 100644 index 000000000..fc148da4a --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202401080103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_item add width int null +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202401080103.sql b/resource/sqlupgrade/PG/sql202401080103.sql new file mode 100644 index 000000000..f5fb1c6f1 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202401080103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_item add width int null; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202401080103.sql b/resource/sqlupgrade/SQLServer/sql202401080103.sql new file mode 100644 index 000000000..ff92fddf9 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202401080103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_item add width int null +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202401080103.sql b/resource/sqlupgrade/ST/sql202401080103.sql new file mode 100644 index 000000000..754d4529d --- /dev/null +++ b/resource/sqlupgrade/ST/sql202401080103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_item add width int null; +/ + From f5aa425f2cca9b0d11ec3351d8b7465ef4bc2d56 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 9 Jan 2024 13:21:45 +0800 Subject: [PATCH 040/169] =?UTF-8?q?fix=E5=85=AC=E5=BC=8F=EF=BC=8C=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=8A=B6=E6=80=81=E5=8F=98=E9=87=8F=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=80=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/salaryacct/bo/CalculateFormulaVarBO.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java index 74835472d..8251ea51f 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.salaryacct.bo; +import cn.hutool.core.util.NumberUtil; import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.salary.common.LocalDateRange; import com.engine.salary.constant.SalaryFormulaFieldConstant; @@ -18,6 +19,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveTaxAgentDataDTO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobAdjustRulePO; +import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum; import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum; import com.engine.salary.enums.salarysob.SalarySobAdjustRuleTypeEnum; @@ -551,6 +553,10 @@ public class CalculateFormulaVarBO { } // 填充到返回结果集中 employeeMap.forEach((key, po) -> { + // 获取po的状态 + if(po.getStatus() != null && NumberUtil.isNumber(po.getStatus())) { + po.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(po.getStatus()))); + } List formulaVarValues = resultMap.computeIfAbsent(key, k -> Lists.newArrayList()); Map map = JsonUtil.parseMap(po, String.class); formulaVarValues.addAll(fieldNames.stream().map(fieldName -> { From 3b761341fcc14e9f660e925ea7d87eed366c05e7 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 10 Jan 2024 11:20:36 +0800 Subject: [PATCH 041/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E6=95=B0=E8=87=AA=E5=8A=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 58 +++++++++++++++++++ .../service/impl/SISchemeServiceImpl.java | 35 ++++++++++- .../sys/constant/SalarySysConstant.java | 5 ++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 977adaab4..4f62417c6 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -1217,6 +1217,64 @@ public class SIArchivesBiz { return true; } + + /** + * 校验福利基数是否符合上下限要求,并返回符合要求的数据 + * @param primaryId + * @param paymentBaseString + * @return + */ + public String checkAndBuildWelBaseWithLimit(Long primaryId, String paymentBaseString, Integer paymentScope) { + + if (primaryId ==null || paymentBaseString == null) { + return paymentBaseString; + } + Map paymentBaseJson = JSON.parseObject(paymentBaseString, HashMap.class); + Map newPaymentBaseJson = JSON.parseObject(paymentBaseString, HashMap.class); + if (paymentBaseJson == null) { + return null; + } + + for (Map.Entry entry : paymentBaseJson.entrySet()) { + + //判断福利值是否为空/数字 + if (entry.getValue() == null || entry.getValue().length() == 0) { + continue; + } else if (!isNumeric(entry.getValue())) { + log.info("福利值非数字!"); + newPaymentBaseJson.remove(entry.getKey()); + continue; + } + //根据福利方案id、险种id + List insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey())); + log.info("福利方案id: {},, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + if (insuranceSchemeDetailPOList.size() == 0) { + log.info("根据福利方案id、险种id、缴纳对象查询明细为null!福利方案id: {}, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + newPaymentBaseJson.remove(entry.getKey()); + continue; + } + List checkList = insuranceSchemeDetailPOList.stream() + .filter(f -> f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList()); + if (checkList.size() > 0) { + InsuranceSchemeDetailPO insuranceSchemeDetailPO = checkList.get(0); + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit(); + String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit(); + if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) { + //数值低于对应福利明细下限 + log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit); + newPaymentBaseJson.put(entry.getKey(), lowerLimit); + } + if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) { + //数值高于对应福利明细上限 + log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit); + newPaymentBaseJson.put(entry.getKey(), upperLimit); + } + } + } + return JSON.toJSONString(newPaymentBaseJson); + } + /** * 档案列表 *

diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 5b2552ef9..da2c8b0ae 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -44,6 +44,7 @@ import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.*; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; +import com.engine.salary.sys.enums.OpenEnum; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.*; @@ -74,6 +75,7 @@ import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_AUTO_ADJUST; import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; /** @@ -1263,7 +1265,12 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //生成福利档案基础信息数据 InsuranceArchivesBaseInfoPO insuranceArchivesBaseInfoPO = buildBaseInfoPO(employeeId, singleAccount, paymentNameIdMap, creator, runStatus, employees.get(0).isExtEmp()); - if (!isError) { + + //判断是否福利档案导入时,不符合上下限的基数调整为上限/下限 + SalarySysConfPO welBaseAutoAdjust = getSalarySysConfService(user).getOneByCode(WEL_BASE_AUTO_ADJUST); + boolean welBaseAutoAdjustSign = welBaseAutoAdjust != null && welBaseAutoAdjust.getConfValue().equals(OpenEnum.OPEN.getValue()); + + if (!isError && !welBaseAutoAdjustSign) { insuranceArchivesAccountPO.setSocial(insuranceArchivesSocialSchemePO); insuranceArchivesAccountPO.setFund(insuranceArchivesFundSchemePO); insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO); @@ -1304,6 +1311,32 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { isError = true; } + } else if (!isError) { + //校验福利基数是否符合上下限要求,不符合上下限的基数调整为上限 /下限 + String newSocialPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + String newFundPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + String newOtherPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + + insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); + insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); + insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); + + if (welBaseDiffSign) { + String newSocialPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + String newFundPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + String newOtherPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + + insuranceArchivesSocialSchemePO.setSocialPaymentComBaseString(newSocialPaymentComBaseString); + insuranceArchivesFundSchemePO.setFundPaymentComBaseString(newFundPaymentComBaseString); + insuranceArchivesOtherSchemePO.setOtherPaymentComBaseString(newOtherPaymentComBaseString); + } + + insuranceArchivesAccountPO.setSocial(insuranceArchivesSocialSchemePO); + insuranceArchivesAccountPO.setFund(insuranceArchivesFundSchemePO); + insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO); + insuranceArchivesAccountPO.setBaseInfo(insuranceArchivesBaseInfoPO); + + insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); } return isError; } diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index df5ea5ea2..afe54d3c0 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -110,4 +110,9 @@ public class SalarySysConstant { * 应用设置是否福利档案基数区分个人和单位 */ public static final String WEL_BASE_DIFF_BY_PER_AND_COM = "welBaseDiffByPerAndCom"; + + /** + * 应用设置是否福利档案导入时,不符合上下限的基数调整为上限 /下限 + */ + public static final String WEL_BASE_AUTO_ADJUST = "welBaseAutoAdjust"; } From be68f01145cca15a1f0d5416a0ff6e463a428a85 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 15 Jan 2024 09:45:19 +0800 Subject: [PATCH 042/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8Cmysql=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=ADsql=E8=84=9A=E6=9C=AC=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/Mysql/sql202312130203.sql | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/resource/sqlupgrade/Mysql/sql202312130203.sql b/resource/sqlupgrade/Mysql/sql202312130203.sql index 7ff70da9f..15acb233a 100644 --- a/resource/sqlupgrade/Mysql/sql202312130203.sql +++ b/resource/sqlupgrade/Mysql/sql202312130203.sql @@ -1,17 +1,17 @@ -ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string text NULL; +ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string text NULL; +ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string text NULL; -ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string text NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string text NULL; +ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string text NULL; -ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string text NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string text NULL; +ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string text NULL; -ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL; -ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string text NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string text NULL; +ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string text NULL; ALTER TABLE hrsa_insurance_base_history ADD COLUMN payment_scope varchar(10) NULL; From e38fd9be992244d5aeb32b36fdda0d9bdc7004f9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 15 Jan 2024 10:51:53 +0800 Subject: [PATCH 043/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B5=B7=E5=A7=8B=E3=80=81=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=8F=91=E8=96=AA=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryArchiveQueryParam.java | 22 ++++++++++++ .../mapper/archive/SalaryArchiveMapper.xml | 36 +++++++++++++++++++ .../impl/SalaryArchiveServiceImpl.java | 13 +++++++ 3 files changed, 71 insertions(+) diff --git a/src/com/engine/salary/entity/salaryarchive/param/SalaryArchiveQueryParam.java b/src/com/engine/salary/entity/salaryarchive/param/SalaryArchiveQueryParam.java index 12a02998d..505ce3264 100644 --- a/src/com/engine/salary/entity/salaryarchive/param/SalaryArchiveQueryParam.java +++ b/src/com/engine/salary/entity/salaryarchive/param/SalaryArchiveQueryParam.java @@ -10,6 +10,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.util.Collection; +import java.util.Date; import java.util.List; /** @@ -88,4 +89,25 @@ public class SalaryArchiveQueryParam extends BaseQueryParam { */ private boolean extSalaryArchiveList; + + private String payStartDateStartDateStr; + private String payStartDateEndDateStr; + + // 起始发薪日期起 + private Date payStartDateStartDate; + + // 起始发薪日期止 + private Date payStartDateEndDate; + + // 最后发薪日期起 + private String payEndDateStartDateStr; + // 最后发薪日期止 + private String payEndDateEndDateStr; + + // 最后发薪日期起 + private Date payEndDateStartDate; + + // 最后发薪日期止 + private Date payEndDateEndDate; + } diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index 03facc683..ea4f6498b 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -183,6 +183,18 @@ #{runStatus} + + AND pay_start_date = ]]> #{param.payStartDateStartDate} + + + AND pay_start_date #{param.payStartDateEndDate} + + + AND pay_end_date = ]]> #{param.payEndDateStartDate} + + + AND pay_end_date #{param.payEndDateEndDate} + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -264,6 +276,18 @@ #{runStatus} + + AND pay_start_date = ]]> #{param.payStartDateStartDate} + + + AND pay_start_date = ]]> #{param.payStartDateEndDate} + + + AND pay_end_date = ]]> #{param.payEndDateStartDate} + + + AND pay_end_date = ]]> #{param.payEndDateEndDate} + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} @@ -346,6 +370,18 @@ #{runStatus} + + AND pay_start_date = ]]> #{param.payStartDateStartDate} + + + AND pay_start_date = ]]> #{param.payStartDateEndDate} + + + AND pay_end_date = ]]> #{param.payEndDateStartDate} + + + AND pay_end_date = ]]> #{param.payEndDateEndDate} + ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc} diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 5ba7bd575..1fbe1b525 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -163,6 +163,19 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe if (queryParam.isExtSalaryArchiveList()) { return getSalaryArchiveMapper().listExtSalaryArchive(queryParam); } + if (StringUtils.isNotBlank(queryParam.getPayStartDateStartDateStr())) { + queryParam.setPayStartDateStartDate(SalaryDateUtil.stringToDate(queryParam.getPayStartDateStartDateStr())); + } + if (Objects.nonNull(queryParam.getPayStartDateEndDateStr())) { + queryParam.setPayStartDateEndDate(SalaryDateUtil.stringToDate(queryParam.getPayStartDateEndDateStr())); + } + + if (StringUtils.isNotBlank(queryParam.getPayEndDateStartDateStr())) { + queryParam.setPayEndDateStartDate(SalaryDateUtil.stringToDate(queryParam.getPayEndDateStartDateStr())); + } + if (Objects.nonNull(queryParam.getPayEndDateEndDateStr())) { + queryParam.setPayEndDateEndDate(SalaryDateUtil.stringToDate(queryParam.getPayEndDateEndDateStr())); + } return getSalaryArchiveMapper().list(queryParam); } From 0a6467aaa6e5749b531d3d460a9cd108cdb46812 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 15 Jan 2024 18:48:05 +0800 Subject: [PATCH 044/169] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B5=B7=E5=A7=8B=E3=80=81=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=8F=91=E8=96=AA=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/mapper/archive/SalaryArchiveMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index ea4f6498b..c08dd87e2 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -280,13 +280,13 @@ AND pay_start_date = ]]> #{param.payStartDateStartDate} - AND pay_start_date = ]]> #{param.payStartDateEndDate} + AND pay_start_date #{param.payStartDateEndDate} AND pay_end_date = ]]> #{param.payEndDateStartDate} - AND pay_end_date = ]]> #{param.payEndDateEndDate} + AND pay_end_date #{param.payEndDateEndDate} @@ -374,13 +374,13 @@ AND pay_start_date = ]]> #{param.payStartDateStartDate} - AND pay_start_date = ]]> #{param.payStartDateEndDate} + AND pay_start_date #{param.payStartDateEndDate} AND pay_end_date = ]]> #{param.payEndDateStartDate} - AND pay_end_date = ]]> #{param.payEndDateEndDate} + AND pay_end_date #{param.payEndDateEndDate} From db4b44e62cd5ca7d4746494288ffc34495f91a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 16 Jan 2024 16:35:37 +0800 Subject: [PATCH 045/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BA=BA=E5=91=98=E7=8A=B6=E6=80=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryArchiveServiceImpl.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 5ba7bd575..aa3b0eaf3 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -320,11 +320,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe @Override public void deleteSalaryArchive(Collection salaryArchiveIds) { - if(CollectionUtils.isEmpty(salaryArchiveIds)){ + if (CollectionUtils.isEmpty(salaryArchiveIds)) { throw new SalaryRunTimeException("薪资档案参数为空!"); } SalarySysConfPO canDelete = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_ARCHIVE_DELETE); - if(Objects.isNull(canDelete) || StringUtils.equals(canDelete.getConfValue(),"0") ){ + if (Objects.isNull(canDelete) || StringUtils.equals(canDelete.getConfValue(), "0")) { throw new SalaryRunTimeException("不允许删除薪资档案,请先开启删除档案规则配置!"); } List salaryArchiveList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(salaryArchiveIds).build()); @@ -333,17 +333,17 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe List canDeleteTaxAgentIds = getTaxAgentService(user).listAllTaxAgentsAsAdmin((long) user.getUID()) .stream().map(TaxAgentPO::getId).collect(Collectors.toList()); boolean err = salaryArchiveList.stream().anyMatch(po -> !canDeleteTaxAgentIds.contains(po.getTaxAgentId())); - if(CollectionUtils.isEmpty(salaryArchiveList) || err){ + if (CollectionUtils.isEmpty(salaryArchiveList) || err) { throw new SalaryRunTimeException("薪资档案不存在,或没有权限删除该薪资档案!"); } Optional fixedList = salaryArchiveList.stream().filter(archive -> !StringUtils.equals(archive.getRunStatus(), SalaryArchiveStatusEnum.PENDING.getValue()) && !StringUtils.equals(archive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())).findFirst(); - if(fixedList.isPresent()){ + if (fixedList.isPresent()) { throw new SalaryRunTimeException("发薪员工、待停薪员工、停薪_来自待停薪,无法删除薪资档案!"); } List deleteIds = salaryArchiveList.stream().map(SalaryArchivePO::getId).collect(Collectors.toList()); // 删除薪资档案及档案项目 - if(CollectionUtils.isNotEmpty(deleteIds)){ + if (CollectionUtils.isNotEmpty(deleteIds)) { getSalaryArchiveMapper().deleteByIds(deleteIds); getSalaryArchiveItemMapper().deleteBySalaryArchiveId(deleteIds); } @@ -432,7 +432,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe List salaryItemIds = salaryItems.stream().map(SalaryItemPO::getId).collect(Collectors.toList()); // 1.获取薪资档案所对应的当前生效的薪资项目数据 List salaryArchiveItemList = Collections.emptyList(); - if(CollectionUtils.isNotEmpty(ids) && CollectionUtils.isNotEmpty(salaryItemIds) || !isPage){ + if (CollectionUtils.isNotEmpty(ids) && CollectionUtils.isNotEmpty(salaryItemIds) || !isPage) { salaryArchiveItemList = getCurrentEffectiveItemList(ids, salaryItemIds); } List finalSalaryArchiveItemList = salaryArchiveItemList; @@ -461,7 +461,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // 3.组装数据 List> listMaps = new ArrayList<>(); salaryArchives.forEach(e -> { - e.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(e.getEmployeeStatus()))); + e.setEmployeeStatus(NumberUtils.isCreatable(e.getEmployeeStatus()) ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(e.getEmployeeStatus())) : ""); Map map = new LinkedHashMap<>(); map.put("id", e.getId()); @@ -757,11 +757,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // 获取核算人员规则 List statusList = Collections.emptyList(); SalarySysConfPO employeeRule = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_ACCT_EMPLOYEE_RULE); - if(Objects.isNull(employeeRule) || StringUtils.equals(employeeRule.getConfValue(), SalaryAcctEmployeeRuleEnum.BYPAYENDTIME.getValue())){ + if (Objects.isNull(employeeRule) || StringUtils.equals(employeeRule.getConfValue(), SalaryAcctEmployeeRuleEnum.BYPAYENDTIME.getValue())) { // 默认包含停薪列表 statusList = Arrays.asList(SalaryArchiveStatusEnum.FIXED.getValue(), SalaryArchiveStatusEnum.SUSPEND.getValue(), - SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue() ); - }else{ + SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()); + } else { // 仅包含发薪、待定薪 statusList = Arrays.asList(SalaryArchiveStatusEnum.FIXED.getValue(), SalaryArchiveStatusEnum.SUSPEND.getValue()); } From a3aa0f5ca10a9228a548b9e16cef3ca64cfe53b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 17 Jan 2024 10:55:42 +0800 Subject: [PATCH 046/169] =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/util/page/SalaryPageUtil.java | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/util/page/SalaryPageUtil.java b/src/com/engine/salary/util/page/SalaryPageUtil.java index bc8892eee..a91fe1d2a 100644 --- a/src/com/engine/salary/util/page/SalaryPageUtil.java +++ b/src/com/engine/salary/util/page/SalaryPageUtil.java @@ -3,6 +3,9 @@ package com.engine.salary.util.page; import com.github.pagehelper.PageHelper; import org.apache.commons.collections4.CollectionUtils; +import java.awt.*; +import java.awt.font.FontRenderContext; +import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -91,18 +94,23 @@ public class SalaryPageUtil { endIndex > source.size() ? source.size() : endIndex); } + + static Font font = new Font("Arial", Font.PLAIN, 12); // 设置字体样式、大小等属性 + static FontRenderContext frc = new FontRenderContext(null, true, false); +// GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + + /** + * 自适应文字长度 + * @param chars + * @param width + * @return + */ public static String selfAdaption(String chars, Integer width) { - if (width != null && width != 0){ + if (width != null && width != 0) { return width + ""; } - int adaption = 0; - - if (chars != null) { - adaption = chars.length() * 12 + 55; - } - if (adaption < 79) { - adaption = 79; - } - return adaption + ""; + Rectangle2D bounds = font.getStringBounds(chars, frc); + int pxLength = (int) Math.ceil(bounds.getWidth()); + return pxLength + 55 + ""; } } From 29e5c27ffb15d6072c37cea9eff14f5fed8b5255 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 17 Jan 2024 16:07:27 +0800 Subject: [PATCH 047/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=B9=B6=E5=BD=92=E6=A1=A3=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/siaccount/param/AccountParam.java | 3 + .../salary/service/SIAccountService.java | 7 + .../service/impl/SIAccountServiceImpl.java | 1139 ++++++++++++++++- .../salary/timer/AutoSiAccountAndFileJob.java | 107 ++ 4 files changed, 1223 insertions(+), 33 deletions(-) create mode 100644 src/com/engine/salary/timer/AutoSiAccountAndFileJob.java diff --git a/src/com/engine/salary/entity/siaccount/param/AccountParam.java b/src/com/engine/salary/entity/siaccount/param/AccountParam.java index ceff087e9..34e11c6e5 100644 --- a/src/com/engine/salary/entity/siaccount/param/AccountParam.java +++ b/src/com/engine/salary/entity/siaccount/param/AccountParam.java @@ -42,4 +42,7 @@ public class AccountParam { @DataCheck(require = true,message = "个税扣缴义务人不能为空") private Long paymentOrganization; + // 是否核算后归档 + private boolean fileFlag = false; + } diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java index 99c157855..60d06ed86 100644 --- a/src/com/engine/salary/service/SIAccountService.java +++ b/src/com/engine/salary/service/SIAccountService.java @@ -84,6 +84,13 @@ public interface SIAccountService { */ String save(AccountParam param); + /** + * 新建核算并归档 + * @param param + * @return + */ + String saveAndFile(AccountParam param); + /** * 正常缴纳页核算 * @param saveCommonAccountParam diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index cbed96243..6bb0fd1f2 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1,6 +1,7 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; import com.api.browser.bean.SearchConditionGroup; import com.api.browser.bean.SearchConditionItem; import com.api.browser.bean.SearchConditionOption; @@ -10,24 +11,20 @@ import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.*; +import com.engine.salary.cache.SalaryCacheKey; import com.engine.salary.component.SalaryWeaTable; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; +import com.engine.salary.entity.progress.ProgressDTO; import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; import com.engine.salary.entity.siaccount.dto.InsuranceAcctDetailImportFieldDTO; import com.engine.salary.entity.siaccount.param.*; -import com.engine.salary.entity.siaccount.po.ExcelInsuranceDetailPO; -import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; -import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; -import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO; +import com.engine.salary.entity.siaccount.po.*; +import com.engine.salary.entity.siarchives.po.*; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.siexport.param.InsuranceExportParam; import com.engine.salary.entity.siexport.po.AccountExportPO; @@ -40,12 +37,10 @@ import com.engine.salary.enums.siaccount.*; import com.engine.salary.enums.sicategory.*; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.InsuranceExportMapper; -import com.engine.salary.mapper.siaccount.ExcelInsuranceDetailMapper; -import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; -import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; -import com.engine.salary.mapper.siaccount.InsuranceAccountInspectMapper; +import com.engine.salary.mapper.siaccount.*; import com.engine.salary.mapper.siarchives.FundSchemeMapper; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; +import com.engine.salary.mapper.siarchives.OtherSchemeMapper; import com.engine.salary.mapper.siarchives.SocialSchemeMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; @@ -53,14 +48,13 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.sys.SalarySysConfMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.*; +import com.engine.salary.sys.constant.SalarySysConstant; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; +import com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum; 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.SalaryFormItemUtil; -import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.*; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; @@ -73,13 +67,16 @@ import com.engine.salary.util.valid.ValidUtil; import com.engine.salary.wrapper.SalaryFormulaWrapper; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.mzlion.core.utils.BeanUtils; import dm.jdbc.util.IdGenerator; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.BeanUtils; import weaver.file.ImageFileManager; import weaver.general.Util; import weaver.hrm.User; @@ -89,6 +86,7 @@ import java.math.BigDecimal; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.function.Function; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -102,6 +100,7 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; * @Date 2022/4/11 * @Version V1.0 **/ +@Slf4j public class SIAccountServiceImpl extends Service implements SIAccountService { // private SIAccountBiz siAccountBiz = new SIAccountBiz(); @@ -180,6 +179,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return MapperProxyFactory.getProxy(FundSchemeMapper.class); } + private OtherSchemeMapper getOtherSchemeMapper() { + return MapperProxyFactory.getProxy(OtherSchemeMapper.class); + } + private TaxAgentBiz taxAgentBiz = new TaxAgentBiz(); private ICategoryMapper getICategoryMapper() { @@ -210,6 +213,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return (SIBalanceService) ServiceUtil.getService(SIBalanceServiceImpl.class, user); } + private ProgressService getSalaryAcctProgressService(User user) { + return ServiceUtil.getService(ProgressServiceImpl.class, user); + } + + private SIAccountDetailTempMapper getSIAccountDetailTempMapper() { + return MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class); + } + + private InsuranceCompensationMapper getInsuranceCompensationMapper() { + return MapperProxyFactory.getProxy(InsuranceCompensationMapper.class); + } + @Override public Map listPage(InsuranceAccountBatchParam queryParam) { Long employeeId = (long) user.getUID(); @@ -563,20 +578,22 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public String save(AccountParam param) { - ValidUtil.doValidator(param); - - Long employeeId = (long) user.getUID(); - String lastName = user.getLastname(); - return getSiAccountBiz(user).save(param.isFlag(), param, employeeId, lastName); +// ValidUtil.doValidator(param); +// +// Long employeeId = (long) user.getUID(); +// String lastName = user.getLastname(); +// return getSiAccountBiz(user).save(param.isFlag(), param, employeeId, lastName); + return saveAndFile(param); } @Override public void commonAccount(SaveCommonAccountParam param) { - ValidUtil.doValidator(param); - - Long employeeId = (long) user.getUID(); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).saveCommonAccount(param, employeeId, currentUserName); +// ValidUtil.doValidator(param); +// +// Long employeeId = (long) user.getUID(); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).saveCommonAccount(param, employeeId, currentUserName); + siSaveCommonAccount(param); } @Override @@ -587,9 +604,31 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public void saveCommonAccount(SaveCommonAccountParam accountParam) { - Long employeeId = (long) user.getUID(); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).saveCommonAccount(accountParam, employeeId, currentUserName); +// Long employeeId = (long) user.getUID(); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).saveCommonAccount(accountParam, employeeId, currentUserName); + siSaveCommonAccount(accountParam); + } + + /** + * 福利台账正常缴纳页-核算 + */ + public void siSaveCommonAccount(SaveCommonAccountParam param) { + ValidUtil.doValidator(param); + + List collect; + SalaryAssert.notEmpty(param.getIncludes(), SalaryI18nUtil.getI18nLabel(100466, "参数为空")); + SalaryAssert.notNull(param.getBillMonth(), SalaryI18nUtil.getI18nLabel(100467, "账单月为空")); + if (CollectionUtils.isNotEmpty(param.getExcludes())) { + collect = param.getIncludes().stream().filter(item -> !param.getExcludes().contains(item)).collect(Collectors.toList()); + } else { + collect = param.getIncludes(); + } + SalaryAssert.notEmpty(collect, SalaryI18nUtil.getI18nLabel(99920, "无核算人员")); + AccountParam accountParam = new AccountParam(); + accountParam.setBillMonth(param.getBillMonth()); + accountParam.setIds(collect); + siAccounting(accountParam); } @Override @@ -618,9 +657,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public void file(AccountParam accountParam) { - Long employeeId = (long) user.getUID(); - String billMonth = accountParam.getBillMonth(); - getSiAccountBiz(user).file(billMonth, employeeId, accountParam.getPaymentOrganization()); +// Long employeeId = (long) user.getUID(); +// String billMonth = accountParam.getBillMonth(); +// getSiAccountBiz(user).file(billMonth, employeeId, accountParam.getPaymentOrganization()); + siFile(accountParam.getBillMonth(), accountParam.getPaymentOrganization()); } @Override @@ -4279,4 +4319,1037 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { insuranceAccountDetailPO.setOtherComSum(otherComSum.toPlainString()); return insuranceAccountDetailPO; } + + /** + * 新建核算并归档 + * @param param + * @return + */ + @Override + public String saveAndFile(AccountParam param) { + ValidUtil.doValidator(param); + if (param.isFlag()) { + InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization()); + insuranceAccountBatchPO = encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + SalaryAssert.isNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(0, "所属月份存在核算数据")); + + InsuranceAccountBatchPO build = InsuranceAccountBatchPO.builder() + .paymentOrganization(param.getPaymentOrganization()) + .accountant(user.getLastname()) + .billMonth(param.getBillMonth()) + .billStatus(BillStatusEnum.NOT_ARCHIVED.getValue()) + .remarks(param.getRemarks()) + .creator((long) user.getUID()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .createTime(new Date()) + .updateTime(new Date()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .paymentOrganization(param.getPaymentOrganization()) + .socialPay("0") + .fundPay("0") + .otherPay("0") + .build(); + encryptUtil.encrypt(build, InsuranceAccountBatchPO.class); + getInsuranceAccountBatchMapper().insert(build); +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(build.getId())); +// insuranceSchemeContext.setTargetName(build.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); +// insuranceSchemeContext.setNewValues(build); +// siAccountLoggerTemplate.write(insuranceSchemeContext); + } + try { + List employeeIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(param.getPaymentOrganization()); + if (CollectionUtils.isEmpty(employeeIds)) { + List list = Lists.newArrayList(getInsuranceAccountDetailMapper().queryNormalListByBillMonth(param.getBillMonth(), param.getPaymentOrganization())); + encryptUtil.decryptList(list, InsuranceAccountDetailPO.class); + if (CollectionUtils.isNotEmpty(list)) { + list.stream().forEach(f -> { + getInsuranceAccountDetailMapper().deleteById(f.getId()); + }); + } + } + SalaryAssert.notEmpty(employeeIds, SalaryI18nUtil.getI18nLabel(0, "没有需要核算的人员")); +// AccountParam selectParam = new AccountParam(); +// selectParam.setBillMonth(param.getBillMonth()); +// selectParam.setPaymentOrganization(param.getPaymentOrganization()); + ExecutorService taskExecutor = Executors.newCachedThreadPool(); + taskExecutor.execute(() -> { + siAccounting(param); + if (param.isFileFlag()) { + siFile(param.getBillMonth(), param.getPaymentOrganization()); + } + }); + } catch (Exception e) { + // 回滚 + List list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization())); + list = encryptUtil.decryptList(list, InsuranceAccountBatchPO.class); + if (CollectionUtils.isNotEmpty(list)) { + list.stream().forEach(f -> { + getInsuranceAccountBatchMapper().deleteById(f.getId()); + }); + } + throw new SalaryRunTimeException(e.getMessage()); + } + return String.valueOf(user.getUID()); + } + + + public void siAccounting(AccountParam param) { + //福利核算进度 + ProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth()); + if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.isStatus() && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) { + return; + } + + log.info("开始核算,当前操作人为:{}", user.getLastname()); + log.info("核算时间:{}, 核算月份:{}, 个税扣缴义务人:{}, 是否首次核算:{}", new Date(), param.getBillMonth(), param.getPaymentOrganization(), param.isFlag()); + try { + List ids; + List validIds = new ArrayList<>(); + if (CollectionUtils.isEmpty(param.getIds())) { + List empIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(param.getPaymentOrganization()); + // 获取薪资核算人员规则 + SalarySysConfPO salaryAcctEmployeeRule = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_ACCT_EMPLOYEE_RULE); + List status = new ArrayList<>(); + if(Objects.isNull(salaryAcctEmployeeRule) || StringUtils.equals(salaryAcctEmployeeRule.getConfValue(), SalaryAcctEmployeeRuleEnum.BYPAYENDTIME.getValue()) ){ + // 包含停缴 + status = Arrays.asList(EmployeeStatusEnum.PAYING.getValue(),EmployeeStatusEnum.STAY_DEL.getValue(), + EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue()); + }else{ + status = Arrays.asList(EmployeeStatusEnum.PAYING.getValue(),EmployeeStatusEnum.STAY_DEL.getValue()); + } + List finalStatus = status; + //过滤出需要核算的人员,即福利档案基础信息表中runStatus为正在缴纳和待减员的人员 + List baseInfoPOList = getInsuranceBaseInfoMapper().listAll(); + List canAccountIds = baseInfoPOList.stream() + .filter(f->f.getPaymentOrganization().equals(param.getPaymentOrganization()) + && (finalStatus.contains(f.getRunStatus()) )) + .map(InsuranceArchivesBaseInfoPO::getEmployeeId) + .collect(Collectors.toList()); + + //20231122逻辑优化,过滤出不在起始缴纳月和最后缴纳月区间的人员 + List empIdsInPayMonthRange = listCanPayEmpIds(param.getPaymentOrganization(), param.getBillMonth()); + empIds = empIds.stream().filter(f->canAccountIds.contains(f) && empIdsInPayMonthRange.contains(f)).collect(Collectors.toList()); + + List socials = siArchivesBiz.getSocialByEmployeeIds(empIds); + //过滤出目标个税扣缴义务人相关信息 + socials = socials.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); + List emp1 = socials.stream() + .filter(s -> !(StringUtils.isBlank(s.getSocialEndTime()) && StringUtils.isBlank(s.getSocialStartTime())) && + (StringUtils.isBlank(s.getSocialEndTime()) || (SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01")))) ) + .map(InsuranceArchivesSocialSchemePO::getEmployeeId) + .collect(Collectors.toList()); + + List funds = siArchivesBiz.getFundByEmployeeIds(empIds); + //过滤出目标个税扣缴义务人相关信息 + funds = funds.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); + List emp2 = funds.stream() + .filter(s -> !(StringUtils.isBlank(s.getFundStartTime()) && StringUtils.isBlank(s.getFundEndTime())) && + (StringUtils.isBlank(s.getFundEndTime()) || (SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01"))))) + .map(InsuranceArchivesFundSchemePO::getEmployeeId) + .collect(Collectors.toList()); + + List others = siArchivesBiz.getOtherByEmployeeIds(empIds); + //过滤出目标个税扣缴义务人相关信息 + others = others.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); + List emp3 = others.stream() + .filter(s -> !(StringUtils.isBlank(s.getOtherStartTime()) && StringUtils.isBlank(s.getOtherEndTime())) && + (StringUtils.isBlank(s.getOtherEndTime()) || (SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01") != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01"))))) + .map(InsuranceArchivesOtherSchemePO::getEmployeeId) + .collect(Collectors.toList()); + validIds.addAll(emp1); + validIds.addAll(emp2); + validIds.addAll(emp3); + + List finalValidIds = validIds.stream().distinct().collect(Collectors.toList()); + ids = empIds.stream().filter(finalValidIds::contains).collect(Collectors.toList()); + } else { + ids = param.getIds(); + } + + // 初始化进度 + ProgressDTO initProgress = new ProgressDTO() + .setTitle(SalaryI18nUtil.getI18nLabel(0, "核算中")) + .setTitleLabelId(97515L) + .setTotalQuantity(ids.size()) + .setCalculatedQuantity(NumberUtils.INTEGER_ZERO) + .setProgress(BigDecimal.ZERO) + .setStatus(true) + .setMessage(StringUtils.EMPTY); + getSalaryAcctProgressService(user).initProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), initProgress); + + if (CollectionUtils.isEmpty(ids)) { + getSalaryAcctProgressService(user).finish(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), true); + return; + } + + log.info("开始生成福利核算数据,待处理人员数量:{}", ids.size()); + siCommonAccount(param.getBillMonth(), ids, param.getPaymentOrganization()); + log.info("福利核算数据生成完毕,开始数据处理"); + + handleData(ids, param); + log.info("福利核算数据处理完毕!"); + + List> partition = Lists.partition((List) ids, 100); + partition.forEach(part -> { + getSIAccountDetailTempMapper().batchDelByEmpIdsAndMonthAndPayOrg(part, param.getBillMonth(), param.getPaymentOrganization()); + }); + log.info("更新福利核算进度······"); + getSalaryAcctProgressService(user).finish(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), true); + log.info("福利核算进度完成!"); + } catch (Exception e) { + log.error("account run fail", e); + getSalaryAcctProgressService(user).fail(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), SalaryI18nUtil.getI18nLabel(0, "福利核算出错") + ": " + e.getMessage()); + + List list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization())); + if (CollectionUtils.isNotEmpty(list)) { + list.stream().forEach(f -> { + getInsuranceAccountBatchMapper().deleteById(f.getId()); + }); + } + + } + + } + + public void siCommonAccount(String billMonth, List ids, Long paymentOrganization) { + SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + Map insuranceArchivesAccountPOS = siArchivesBiz.buildBatchAccount(ids, paymentOrganization); + List list = new ArrayList<>(); + int count = 0; + for (Map.Entry entry : insuranceArchivesAccountPOS.entrySet()) { + Long k = entry.getKey(); + InsuranceArchivesAccountPO v = entry.getValue(); + InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO(); + insuranceAccountDetailPO.setBillMonth(billMonth); + insuranceAccountDetailPO.setBillStatus(BillStatusEnum.NOT_ARCHIVED.getValue()); + insuranceAccountDetailPO.setCreator((long) user.getUID()); + insuranceAccountDetailPO.setCreateTime(new Date()); + insuranceAccountDetailPO.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + insuranceAccountDetailPO.setEmployeeId(k); + insuranceAccountDetailPO.setUpdateTime(new Date()); + insuranceAccountDetailPO.setPaymentStatus(PaymentStatusEnum.COMMON.getValue()); + insuranceAccountDetailPO.setResourceFrom(ResourceFromEnum.SYSTEM.getValue()); + insuranceAccountDetailPO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + insuranceAccountDetailPO.setPaymentOrganization(paymentOrganization); + + //核算社保 + accountSocial(insuranceAccountDetailPO, v, billMonth); + //核算公积金 + accountFund(insuranceAccountDetailPO, v, billMonth); + //核算其他福利 + accountOther(insuranceAccountDetailPO, v, billMonth); + //计算合计 + account(insuranceAccountDetailPO); + //临时表PO + InsuranceAccountDetailTempPO insuranceAccountDetailTempPO = new InsuranceAccountDetailTempPO(); + BeanUtils.copyProperties(insuranceAccountDetailPO, insuranceAccountDetailTempPO); + list.add(insuranceAccountDetailTempPO); + count++; + + if (count % 50 == 0 || count >= ids.size()) { + if (count >= ids.size()) { + getSalaryAcctProgressService(user).updateProgress(SalaryCacheKey.ACCT_PROGRESS + billMonth, BigDecimal.valueOf(0.99), false); + log.info("更新福利核算进度,当前进度为:{}", getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + billMonth)); + } else { + getSalaryAcctProgressService(user).getAndAddCalculatedQty(SalaryCacheKey.ACCT_PROGRESS + billMonth, count >= ids.size() ? count % 50 : 50); + log.info("更新福利核算进度,当前进度为:{}", getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + billMonth)); + } + + } + + } + //临时表入库前先对(可能存在的)历史数据进行删除 + List> partition = Lists.partition((List) ids, 100); + partition.forEach(part -> { + getSIAccountDetailTempMapper().batchDelByEmpIdsAndMonthAndPayOrg(part, billMonth, paymentOrganization); + }); + //临时表数据入库 + if (CollectionUtils.isNotEmpty(list)) { + encryptUtil.encryptList(list, InsuranceAccountDetailTempPO.class); + List> lists = splitList(list, 40); + lists.forEach(subList -> { + getSIAccountDetailTempMapper().batchSaveAccountTempDetails(subList); + }); + } + + } + + public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + if (accountPO.getOther() != null) { + InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther(); + insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization()); + insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId()); + insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString()); + insuranceAccountDetailPO.setOtherPaymentComBaseString(otherPO.getOtherPaymentComBaseString()); + //判断是否在起始缴纳月和最后缴纳月之间 + Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime()); + if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) { + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(otherPO.getOtherSchemeId()); + encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); + //方案中包含的需要缴纳其他的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; + Map otherPerson = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesPerson = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + //需要核算其他的福利id 个人 + List needArchivesPerson = new ArrayList<>(); + if (archivesPerson != null) { + archivesPerson.forEach((id, value) -> { + if (otherPerson.containsKey(Long.valueOf(id))) { + needArchivesPerson.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(otherPerson.size() > 0) { + otherPerson.forEach((id, object) -> { + if (!needArchivesPerson.contains(id)) { + needArchivesPerson.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(otherPerson, billMonth, otherPO.getOtherStartTime()); + + List otherPer = new ArrayList<>(); + Map otherPerJsonMap = new HashMap<>(); + needArchivesPerson.stream().forEach(e -> { + InsuranceSchemeDetailPO po = otherPerson.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (po.getPaymentCycle() != null && po.getPaymentCycle() == 1) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + otherPerJsonMap.put(String.valueOf(e), result.toPlainString()); + otherPer.add(result); + }); + insuranceAccountDetailPO.setOtherPerJson(JSON.toJSONString(otherPerJsonMap)); + BigDecimal otherPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : otherPer) { + otherPerSum = otherPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setOtherPerSum(otherPerSum.toPlainString()); + + //方案中包含的需要缴纳公积金的单位福利 + Map otherCom = detailPOS.stream() + .filter( + item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap().getClass()); + } + //需要核算其他的福利id 单位 + List needArchivesCom = new ArrayList<>(); + if (archivesCom != null) { + archivesCom.forEach((id, value) -> { + if (otherCom.containsKey(Long.valueOf(id))) { + needArchivesCom.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(otherCom.size() > 0) { + otherCom.forEach((id, object) -> { + if (!needArchivesCom.contains(id)) { + needArchivesCom.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(otherCom, billMonth, otherPO.getOtherStartTime()); + + List otherComList = new ArrayList<>(); + Map otherComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; + needArchivesCom.stream().forEach(e -> { + InsuranceSchemeDetailPO po = otherCom.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + otherComJsonMap.put(String.valueOf(e), result.toPlainString()); + otherComList.add(result); + }); + insuranceAccountDetailPO.setOtherComJson(JSON.toJSONString(otherComJsonMap)); + BigDecimal otherComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : otherComList) { + otherComSum = otherComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setOtherComSum(otherComSum.toPlainString()); + } + } + return insuranceAccountDetailPO; + } + + + public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + if (accountPO.getFund() != null) { + InsuranceArchivesFundSchemePO fundPO = accountPO.getFund(); + insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization()); + insuranceAccountDetailPO.setFundAccount(fundPO.getFundAccount()); + insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount()); + insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId()); + insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString()); + insuranceAccountDetailPO.setFundPaymentComBaseString(fundPO.getFundPaymentComBaseString()); + //判断是否在起始缴纳月和最后缴纳月之间 + Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime()); + if ((NonPaymentEnum.YES.getValue().equals(fundPO.getNonPayment()) || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) { + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(fundPO.getFundSchemeId()); + encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); + //方案中包含的需要缴纳社保的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; + Map fundperson = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesPerson = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + //需要核算公积金的福利id 个人 + List needArchivesPerson = new ArrayList<>(); + if (archivesPerson != null) { + archivesPerson.forEach((id, value) -> { + if (fundperson.containsKey(Long.valueOf(id))) { + needArchivesPerson.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(fundperson.size() > 0) { + fundperson.forEach((id, object) -> { + if (!needArchivesPerson.contains(id)) { + needArchivesPerson.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(fundperson, billMonth, fundPO.getFundStartTime()); + + List fundPer = new ArrayList<>(); + Map fundPerJsonMap = new HashMap<>(); + needArchivesPerson.stream().forEach(e -> { + InsuranceSchemeDetailPO po = fundperson.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + fundPerJsonMap.put(String.valueOf(e), result.toPlainString()); + fundPer.add(result); + }); + insuranceAccountDetailPO.setFundPerJson(JSON.toJSONString(fundPerJsonMap)); + BigDecimal funPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : fundPer) { + funPerSum = funPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setFundPerSum(funPerSum.toPlainString()); + + //方案中包含的需要缴纳公积金的单位福利 + Map fundCom = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(fundPO.getFundPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap().getClass()); + } + //需要核算公积金的福利id 单位 + List needArchivesCom = new ArrayList<>(); + if (archivesCom != null) { + archivesCom.forEach((id, value) -> { + if (fundCom.containsKey(Long.valueOf(id))) { + needArchivesCom.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(fundCom.size() > 0) { + fundCom.forEach((id, object) -> { + if (!needArchivesCom.contains(id)) { + needArchivesCom.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(fundCom, billMonth, fundPO.getFundStartTime()); + + List fundComList = new ArrayList<>(); + Map fundComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; + needArchivesCom.stream().forEach(e -> { + InsuranceSchemeDetailPO po = fundCom.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + fundComJsonMap.put(String.valueOf(e), result.toPlainString()); + fundComList.add(result); + }); + insuranceAccountDetailPO.setFundComJson(JSON.toJSONString(fundComJsonMap)); + BigDecimal fundComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : fundComList) { + fundComSum = fundComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setFundComSum(fundComSum.toPlainString()); + } + } + return insuranceAccountDetailPO; + } + + + public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { + boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + if (accountPO.getSocial() != null) { + InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); + insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); + insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount()); + insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId()); + insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString()); + insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString()); + //判断是否在起始缴纳月和最后缴纳月之间 + Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime()); + if ((NonPaymentEnum.YES.getValue().equals(socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) { + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialPO.getSocialSchemeId()); + encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); + //方案中包含的需要缴纳社保的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; + Map schemeperson = detailPOS.stream() + .filter(item -> + Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && + Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) && + (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))) + ) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesPerson = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + //需要核算社保的福利id 个人 + List needArchivesPerson = new ArrayList<>(); + if (archivesPerson != null) { + archivesPerson.forEach((id, value) -> { + if (schemeperson.containsKey(Long.valueOf(id))) { + needArchivesPerson.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(schemeperson.size() > 0) { + schemeperson.forEach((id, object) -> { + if (!needArchivesPerson.contains(id)) { + needArchivesPerson.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(schemeperson, billMonth, socialPO.getSocialStartTime()); + + List socialPer = new ArrayList<>(); + Map socialPerJsonMap = new HashMap<>(); + needArchivesPerson.forEach(e -> { + InsuranceSchemeDetailPO po = schemeperson.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + socialPerJsonMap.put(String.valueOf(e), result.toPlainString()); + socialPer.add(result); + }); + insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerJsonMap)); + BigDecimal socialPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialPer) { + socialPerSum = socialPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialPerSum(socialPerSum.toPlainString()); + //方案中包含的需要缴纳社保的单位福利 + Map schemeCom = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) && + (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesCom = new HashMap<>(); + if (welBaseDiffSign) { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentComBaseString(), new HashMap().getClass()); + } else { + archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + } + //需要核算社保的福利id 单位 + List needArchivesCom = new ArrayList<>(); + if (archivesCom != null) { + archivesCom.forEach((id, value) -> { + if (schemeCom.containsKey(Long.valueOf(id))) { + needArchivesCom.add(Long.valueOf(id)); + } + }); + } + //避免福利档案的方案未设置基数,导致核算时遗漏这些福利项的核算,遍历下方案相关福利项,并将遗漏的福利项id添加 + if(schemeCom.size() > 0) { + schemeCom.forEach((id, object) -> { + if (!needArchivesCom.contains(id)) { + needArchivesCom.add(id); + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(schemeCom, billMonth, socialPO.getSocialStartTime()); + + List socialCom = new ArrayList<>(); + Map sociaComJsonMap = new HashMap<>(); + HashMap finalArchivesCom = archivesCom; + needArchivesCom.stream().forEach(e -> { + InsuranceSchemeDetailPO po = schemeCom.get(e); + BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + sociaComJsonMap.put(String.valueOf(e), result.toPlainString()); + socialCom.add(result); + + }); + insuranceAccountDetailPO.setSocialComJson(JSON.toJSONString(sociaComJsonMap)); + BigDecimal socialComSum = new BigDecimal("0"); + for (BigDecimal decimal : socialCom) { + socialComSum = socialComSum.add(decimal); + } + insuranceAccountDetailPO.setSocialComSum(socialComSum.toPlainString()); + } + + } + return insuranceAccountDetailPO; + } + + /** + * 对于核算月和福利起始缴纳月处于同年时,要避免根据周期缴纳福利费用时,可能出现的多余费用缴纳情况 + * @param schemeDetail 福利方案明细 + * @param billMonth 核算月 + * @param startMonth 福利起始缴纳月 + * @return + */ + public Map checkCycleSettingWithStartMonth(Map schemeDetail, String billMonth, String startMonth) { + String billYear = billMonth.substring(0,4); + if (StringUtils.isNotBlank(startMonth) && billYear.equals(startMonth.substring(0,4))) { + int startMonthIndex = Integer.parseInt(startMonth.split("-")[1]) - 1; + schemeDetail.forEach((k, v) -> { + if (v.getPaymentCycle() != null && v.getPaymentCycle().equals(1) && startMonthIndex != 0) { + StringBuilder newCycleSetting = new StringBuilder(v.getCycleSetting()); + newCycleSetting.setCharAt(startMonthIndex - 1, '1'); + v.setCycleSetting(newCycleSetting.toString()); + } + }); + + } + return schemeDetail; + } + + private List> splitList(List list, int groupSize) { + int length = list.size(); + // 计算可以分成多少组 + int num = (length + groupSize - 1) / groupSize; + List> newList = new ArrayList<>(num); + for (int i = 0; i < num; i++) { + // 开始位置 + int fromIndex = i * groupSize; + // 结束位置 + int toIndex = (i + 1) * groupSize < length ? (i + 1) * groupSize : length; + newList.add(list.subList(fromIndex, toIndex)); + } + return newList; + } + + /** + * 根据个税扣缴义务人和账单月,获取三类福利档案中符合缴纳开始结束月区间的人员id + * @param paymentOrganization + * @param billMonth + * @return + */ + public List listCanPayEmpIds(Long paymentOrganization, String billMonth) { + List listCanPayEmpIds = new ArrayList<>(); + //社保档案中可进行缴纳的人员 + List socialCanPayEmpIds = getSocialSchemeMapper().listCanPayEmpIds(paymentOrganization, billMonth); + //公积金档案中可进行缴纳的人员 + List fundCanPayEmpIds = getFundSchemeMapper().listCanPayEmpIds(paymentOrganization, billMonth); + //其他福利档案中可进行缴纳的人员 + List otherCanPayEmpIds = getOtherSchemeMapper().listCanPayEmpIds(paymentOrganization, billMonth); + if (socialCanPayEmpIds != null && socialCanPayEmpIds.size() > 0) { + listCanPayEmpIds.addAll(socialCanPayEmpIds); + } + if (fundCanPayEmpIds != null && fundCanPayEmpIds.size() > 0) { + listCanPayEmpIds.addAll(fundCanPayEmpIds); + } + if (otherCanPayEmpIds != null && otherCanPayEmpIds.size() > 0) { + listCanPayEmpIds.addAll(otherCanPayEmpIds); + } + //去重 + listCanPayEmpIds = listCanPayEmpIds.stream().distinct().collect(Collectors.toList()); + return listCanPayEmpIds; + } + + private void handleData(List ids, AccountParam param) { + String billMonth = param.getBillMonth(); + try { + List list = new ArrayList<>(); + List> partitionDetailTempInfo = Lists.partition((List) ids, 100); + partitionDetailTempInfo.forEach(part -> list.addAll( + getSIAccountDetailTempMapper().getListByEmployeeIdsAndBillMonth(part, billMonth, param.getPaymentOrganization()))); + + encryptUtil.decryptList(list, InsuranceAccountDetailTempPO.class); + Integer paymentStatus = 0; + log.info("核算明细临时表 hrsa_bill_detail_temp待处理数量:{}", list.size()); + List> partitionIds = Lists.partition((List) ids, 100); + log.info("bill_detail入库前删除数据数量:{}", ids.size()); + for (List part : partitionIds) { + getInsuranceAccountDetailMapper().batchDelAccountDetails(part, billMonth, param.getPaymentOrganization(), paymentStatus); + + //删除账单月份+个税扣缴义务人+人员id下的调差数据 + getInsuranceCompensationMapper().deleteByBillMonthPayOrgEmpIds(InsuranceCompensationPO.builder() + .billMonth(billMonth) + .paymentOrganization(param.getPaymentOrganization()) + .employeeIds(part) + .build()); + } + + //生成bill_detail入库数据 + List collect = list.stream().map(item -> { + InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO(); + BeanUtils.copyProperties(item, insuranceAccountDetailPO); + return insuranceAccountDetailPO; + }).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(collect)) { + log.info("bill_detail入库数据数量:{}", collect.size()); + batchSaveAccountInspectDetail(collect); + encryptUtil.encryptList(collect, InsuranceAccountDetailPO.class); + List> lists = splitDetailList(collect, 20); + lists.forEach(subList -> { + getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList); + }); + updateBatchAccount(param); + } + } catch (Exception e) { + log.error("福利核算数据处理失败", e); + getSalaryAcctProgressService(user).fail(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), SalaryI18nUtil.getI18nLabel(0, "福利核算出错") + ": " + e.getMessage()); + throw e; + } + } + + public void batchSaveAccountInspectDetail(List list) { + List insuranceAccountInspectAllPOS = accountInspect(list, true); + batchDelInspectDetail(insuranceAccountInspectAllPOS); + List insuranceAccountInspectPOS = accountInspect(list, false); + if (CollectionUtils.isNotEmpty(insuranceAccountInspectPOS)) { + batchSaveInspectDetail(insuranceAccountInspectPOS); + } + } + public void batchDelInspectDetail(List list) { + List> lists = Lists.partition(list, 100); + lists.forEach(getInsuranceAccountInspectMapper()::batchDelInspectDetails); + + } + + public void batchSaveInspectDetail(List list) { + List> lists = Lists.partition(list, 100); + lists.forEach(getInsuranceAccountInspectMapper()::batchSaveInspectDetails); + } + + public List accountInspect(List list, boolean isAll) { + List insuranceAccountInspectPOS = new ArrayList<>(); + for (InsuranceAccountDetailPO e : list) { + if (isAll || detailCheck(e.getSocialPerJson()) || detailCheck(e.getSocialComJson()) + || detailCheck(e.getFundPerJson()) || detailCheck(e.getFundComJson()) + || detailCheck(e.getOtherPerJson()) || detailCheck(e.getOtherComJson())) { + InsuranceAccountInspectPO insuranceAccountInspectPO = InsuranceAccountInspectPO.builder().build(); + insuranceAccountInspectPO.setSupplementaryProjects(e.getSupplementaryProjects()); + insuranceAccountInspectPO.setInspectStatus(InspectStatusEnum.IGNORE.getValue()); + insuranceAccountInspectPO.setBillMonth(e.getBillMonth()); + insuranceAccountInspectPO.setCreator(e.getCreator()); + insuranceAccountInspectPO.setCreateTime(new Date()); + insuranceAccountInspectPO.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + insuranceAccountInspectPO.setEmployeeId(e.getEmployeeId()); + insuranceAccountInspectPO.setPaymentStatus(e.getPaymentStatus()); + insuranceAccountInspectPO.setSupplementaryMonth(e.getSupplementaryMonth()); + insuranceAccountInspectPO.setTenantKey(e.getTenantKey()); + insuranceAccountInspectPO.setUpdateTime(new Date()); + insuranceAccountInspectPOS.add(insuranceAccountInspectPO); + } + } + return insuranceAccountInspectPOS; + } + + public boolean detailCheck(String baseString) { + if (StringUtils.isEmpty(baseString)) { + return false; + } + Map baseStringMap = JSON.parseObject(baseString, new TypeReference>() { + }); + if (baseStringMap == null || baseStringMap.size() == 0) { + return false; + } + return baseStringMap.values().stream().anyMatch(item -> StringUtils.isEmpty(item) || Pattern.matches("^([0].?[0]*)$", item)); + + } + + private List> splitDetailList(List list, int groupSize) { + int length = list.size(); + // 计算可以分成多少组 + int num = (length + groupSize - 1) / groupSize; + List> newList = new ArrayList<>(num); + for (int i = 0; i < num; i++) { + // 开始位置 + int fromIndex = i * groupSize; + // 结束位置 + int toIndex = (i + 1) * groupSize < length ? (i + 1) * groupSize : length; + newList.add(list.subList(fromIndex, toIndex)); + } + return newList; + } + + /** + * 更新台账接口 + */ + public void updateBatchAccount(AccountParam param) { + String billMonth = param.getBillMonth(); + + List insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(billMonth, param.getPaymentOrganization()); + Map> map = insuranceAccountDetailPOS.stream().filter(item -> item.getEmployeeId() != null) + .collect(Collectors.groupingBy(InsuranceAccountDetailPO::getEmployeeId)); + int socialAccountPerson = 0; + int funcAccountPerson = 0; + int otherAccountPerson = 0; + BigDecimal socialSum = new BigDecimal("0"); + BigDecimal fundSum = new BigDecimal("0"); + BigDecimal otherSum = new BigDecimal("0"); + for (Map.Entry> entry : map.entrySet()) { + List v = entry.getValue(); + BigDecimal socialTemp = new BigDecimal("0"); + BigDecimal fundTemp = new BigDecimal("0"); + BigDecimal otherTemp = new BigDecimal("0"); + encryptUtil.decryptList(v, InsuranceAccountDetailPO.class); + boolean socialPersonFlag = false; + boolean fundPersonFlag = false; + boolean otherPersonFlag = false; + for (InsuranceAccountDetailPO item : v) { + // 判断社保是否为0 + socialPersonFlag = (StringUtils.isBlank(item.getSocialSum()) || SalaryEntityUtil.StringEqZERO(item.getSocialSum())); + BigDecimal socialPerson = socialPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getSocialSum()); + fundPersonFlag = (StringUtils.isBlank(item.getFundSum()) || SalaryEntityUtil.StringEqZERO(item.getFundSum())); + BigDecimal fundPerson = fundPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getFundSum()); + otherPersonFlag = (StringUtils.isBlank(item.getOtherSum()) || SalaryEntityUtil.StringEqZERO(item.getOtherSum())); + BigDecimal otherPerson = otherPersonFlag ? new BigDecimal("0") : new BigDecimal(item.getOtherSum()); + socialTemp = socialTemp.add(socialPerson); + fundTemp = fundTemp.add(fundPerson); + otherTemp = otherTemp.add(otherPerson); + if (!socialPersonFlag && !item.getPaymentStatus().equals(PaymentStatusEnum.BALANCE.getValue())) { + socialAccountPerson += 1; + } + if (!fundPersonFlag && !item.getPaymentStatus().equals(PaymentStatusEnum.BALANCE.getValue())) { + funcAccountPerson += 1; + } + if (!otherPersonFlag && !item.getPaymentStatus().equals(PaymentStatusEnum.BALANCE.getValue())) { + otherAccountPerson += 1; + } + } + + if (!"0".equals(socialTemp.toPlainString())) { + socialSum = socialSum.add(socialTemp); + } + if (!"0".equals(fundTemp.toPlainString())) { + fundSum = fundSum.add(fundTemp); + } + if (!"0".equals(otherTemp.toPlainString())) { + otherSum = otherSum.add(otherTemp); + } + } + InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization()); + encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + + insuranceAccountBatchPO.setAccountant(user.getLastname()); + insuranceAccountBatchPO.setUpdateTime(new Date()); + insuranceAccountBatchPO.setSocialPay(socialSum.toPlainString()); + insuranceAccountBatchPO.setSocialNum(socialAccountPerson); + insuranceAccountBatchPO.setFundNum(funcAccountPerson); + insuranceAccountBatchPO.setFundPay(fundSum.toPlainString()); + insuranceAccountBatchPO.setOtherNum(otherAccountPerson); + insuranceAccountBatchPO.setOtherPay(otherSum.toPlainString()); + encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO); +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); +// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100491, "更新台账")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100491, "更新台账")); +// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO); +// siAccountLoggerTemplate.write(insuranceSchemeContext); + + } + + public void siFile(String billMonth, Long paymentOrganization) { + + //开始归档数据 + InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillStatus(billMonth, BillStatusEnum.NOT_ARCHIVED.getValue(), paymentOrganization); + encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + SalaryAssert.notNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(0, "月份账单不存在")); + SalaryAssert.isFalse(Objects.equals(insuranceAccountBatchPO.getBillStatus(), BillStatusEnum.ARCHIVED.getValue()), SalaryI18nUtil.getI18nLabel(0, "月份账单已归档")); + insuranceAccountBatchPO.setBillStatus(BillStatusEnum.ARCHIVED.getValue()); + encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO); + //日志记录 +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); +// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100506, "台账归档")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100506, "台账归档")); +// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO); +// siAccountLoggerTemplate.write(insuranceSchemeContext); + } } diff --git a/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java new file mode 100644 index 000000000..7d1b8f757 --- /dev/null +++ b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java @@ -0,0 +1,107 @@ +package com.engine.salary.timer; + +import cn.hutool.core.util.StrUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.salary.common.SalaryContext; +import com.engine.salary.entity.siaccount.param.AccountParam; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.formlua.util.RegularUtil; +import com.engine.salary.service.SIAccountService; +import com.engine.salary.service.TaxAgentService; +import com.engine.salary.service.impl.SIAccountServiceImpl; +import com.engine.salary.service.impl.TaxAgentServiceImpl; +import lombok.extern.slf4j.Slf4j; +import weaver.hrm.User; +import weaver.interfaces.schedule.BaseCronJob; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Calendar; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Author: sy + * @Description: 福利台账核算并归档任务 + * @Date: 2024/1/15 + **/ +@Slf4j +public class AutoSiAccountAndFileJob extends BaseCronJob { + + private String diffToCurrentMonth; + + public String getDiffToCurrentMonth() { + return diffToCurrentMonth; + } + + public void setDiffToCurrentMonth(String diffToCurrentMonth) { + this.diffToCurrentMonth = diffToCurrentMonth; + } + + private String taxAgentNames; + + public String getTaxAgentNames() { + return taxAgentNames; + } + + public void setTaxAgentNames(String taxAgentNames) { + this.taxAgentNames = taxAgentNames; + } + + private String fileFlag; + + public String getFileFlag() { + return fileFlag; + } + + public void setFileFlag(String fileFlag) { + this.fileFlag = fileFlag; + } + + private TaxAgentService getTaxAgentService(User user) { + SalaryContext.get().setValue("user",user); + return ServiceUtil.getService(TaxAgentServiceImpl.class, user); + } + + public SIAccountService getSIAccountService(User user) { + SalaryContext.get().setValue("user",user); + return ServiceUtil.getService(SIAccountServiceImpl.class, user); + } + + @Override + public void execute() { + if (StrUtil.isNotBlank(diffToCurrentMonth) && RegularUtil.isInteger(diffToCurrentMonth)) { + User user = new User(); + user.setUid(1); + user.setLoginid("sysadmin"); + user.setLastname("sysadmin"); + + Calendar accountTime= Calendar.getInstance(); +// prevMonth.setTimeInMillis(System.currentTimeMillis()); + accountTime.set(Calendar.MONTH, accountTime.get(Calendar.MONTH) + Integer.parseInt(diffToCurrentMonth)); + SimpleDateFormat s=new SimpleDateFormat("yyyy-MM"); + + String accountMonth = s.format(accountTime.getTime()); + boolean isFile = false; + if (StrUtil.isNotBlank(fileFlag) && "true".equals(fileFlag)) { + isFile = true; + } + //核算并归档 + List taxAgentList = getTaxAgentService(user).listAll(); + //判断是否过滤个税扣缴义务人 + if (StrUtil.isNotBlank(taxAgentNames)) { + List taxAgentNameList = Arrays.stream(taxAgentNames.split(",")).map(String::new).collect(Collectors.toList()); + taxAgentList = taxAgentList.stream().filter(f -> taxAgentNameList.contains(f.getName())).collect(Collectors.toList()); + } + for (TaxAgentPO po : taxAgentList) { + try { + getSIAccountService(user).saveAndFile(AccountParam.builder().paymentOrganization(po.getId()).billMonth(accountMonth).flag(true).fileFlag(isFile).build()); + } catch (Exception e) { + log.info("个税扣缴义务人-" + po.getName() + ",新建账单月份" + accountMonth + "的福利核算(并归档)过程失败,原因:" + e.getMessage()); + } + } + + } + + } +} From 40013d698bb891dbe936170ad3f423a5b4acc714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 18 Jan 2024 15:12:00 +0800 Subject: [PATCH 048/169] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalaryStatisticsReportServiceImpl.java | 118 ++++++++++++++---- .../SalaryStatisticsDimensionWrapper.java | 3 +- .../SalaryStatisticsReportWrapper.java | 14 +-- 3 files changed, 104 insertions(+), 31 deletions(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 3f9745f11..65a672424 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -495,12 +495,11 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary String salaryReportConditions = getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id); if (StringUtils.isNotBlank(salaryReportConditions)) { Arrays.asList(salaryReportConditions.split(",")).forEach(paramMd5 -> { - if (StringUtils.isNotBlank(paramMd5)) { - //条件对应的结果 - getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); - } - } - ); + if (StringUtils.isNotBlank(paramMd5)) { + //条件对应的结果 + getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); + } + }); getSalaryCacheService(user).remove(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id); } } @@ -523,14 +522,13 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary List c = new ArrayList<>(); if (StringUtils.isNotBlank(salaryReportConditions)) { Arrays.asList(salaryReportConditions.split(",")).forEach(paramMd5 -> { - if (StringUtils.isNotBlank(paramMd5)) { - Map data = getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5); - Map kv = new HashMap<>(); - kv.put(paramMd5, data); - c.add(kv); - } - } - ); + if (StringUtils.isNotBlank(paramMd5)) { + Map data = getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + paramMd5); + Map kv = new HashMap<>(); + kv.put(paramMd5, data); + c.add(kv); + } + }); report.add(c); } } @@ -639,7 +637,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary case SalaryStatisticsDimensionConstant.DM_COMPANY_YEAR: return buildCompanyYearRecords(data, salaryAcctResultValueMap); default: - return new PageInfo<>(); + return buildSalaryItemRecords(data, dimension.getDimCode(), salaryAcctResultValueMap); } // 定量-组距式分组 } else if (SalaryStatisticsDimensionTypeEnum.RATION_GROUP_SPACING.getValue().equals(dimension.getDimType())) { @@ -1063,9 +1061,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Map> sameEmployeeListMap = data.getSameList().stream().collect(Collectors.groupingBy(SalaryAcctEmployeePO::getEmployeeId)); List empIds = accountDetailPOList.stream().map(SalaryAcctEmployeePO::getEmployeeId).distinct().collect(Collectors.toList()); - Map employeeByIdMap = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds) - .stream() - .collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, o -> o)); + Map employeeByIdMap = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds).stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, o -> o)); //人员维度扩展属性 EmployeeInfoExpandDTO employeeInfoExpandDTO = getSalaryStatisticsDimensionService(user).getExpandFieldSettings("dim_employee"); @@ -1083,11 +1079,9 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Map temp = new HashMap<>(); // temp.put(DM, Objects.nonNull(employeeByIdMap.get(k)) ? employeeByIdMap.get(k) : employeeExtByIdMap.get(k)); temp.put(DM, employeeByIdMap.get(k).getUsername()); - fieldSettings.forEach( - fieldSetting -> { - temp.put(fieldSetting.getField(), expandEmployeeMap.getOrDefault(k, new HashMap<>()).get(fieldSetting.getField())); - } - ); + fieldSettings.forEach(fieldSetting -> { + temp.put(fieldSetting.getField(), expandEmployeeMap.getOrDefault(k, new HashMap<>()).get(fieldSetting.getField())); + }); temp.putAll(SalaryStatisticsReportBO.calculateItem(v, lastEmployeeListMap.get(k), sameEmployeeListMap.get(k), salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); records.add(temp); } else if (StringUtils.equals(dimensionValue, employeeByIdMap.get(k).getUsername())) { @@ -1926,6 +1920,84 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary return result; } + private PageInfo> buildSalaryItemRecords(SalaryStatisticsReportDataDTO data, String dimCode, Map> salaryAcctResultValueMap) { + + //查询薪资项目存在的种类 + Set itemValues = new HashSet<>(); + for (Long k : salaryAcctResultValueMap.keySet()) { + Map map = salaryAcctResultValueMap.get(k); + itemValues.add(map.getOrDefault(dimCode, "")); + } + + + PageInfo> result = new PageInfo<>(); + List> records = new ArrayList<>(); + Map> simpleUserInfoMap = getSimpleUserInfoList(data); + if (simpleUserInfoMap.isEmpty()) { + return result; + } + + + Set companyYearSet = new HashSet<>(); + + Map empIdCompanyYearMap = new HashMap<>(); + Map lastEmpIdCompanyYearMap = new HashMap<>(); + Map sameEmpIdCompanyYearMap = new HashMap<>(); + simpleUserInfoMap.get(NOW_INFO).forEach(employee -> { + if (employee.getCompanyWorkYear() != null) { + companyYearSet.add(Util.null2String(employee.getCompanyWorkYear())); + empIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); + } + }); + simpleUserInfoMap.get(LAST_INFO).forEach(employee -> { + if (employee.getCompanyWorkYear() != null) { + lastEmpIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); + } + }); + simpleUserInfoMap.get(SAME_INFO).forEach(employee -> { + if (employee.getCompanyWorkYear() != null) { + sameEmpIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); + } + }); + + List companyYears = Lists.newArrayList(companyYearSet); + companyYears = companyYears.stream().sorted().collect(Collectors.toList()); + + String dimensionValue = data.getDimensionValue(); + companyYears.forEach(k -> { + if (dimensionValue == null) { + List salaryAcctEmployees = data.getList().stream().filter(po -> Objects.equals(empIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + List lastSalaryAcctEmployees = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + List sameSalaryAcctEmployees = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + Map temp = new HashMap<>(); + temp.put(DM, k); + temp.putAll(SalaryStatisticsReportBO.calculateItem(salaryAcctEmployees, lastSalaryAcctEmployees, sameSalaryAcctEmployees, salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); + records.add(temp); + } else if (StringUtils.equals(dimensionValue, k)) { + List salaryAcctEmployees = data.getList().stream().filter(po -> Objects.equals(empIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + data.setListByDimensionValue(salaryAcctEmployees); + } + }); + + if (dimensionValue == null) { + List noGroupingList = data.getList().stream().filter(po -> empIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); + List lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); + List sameNoGroupingList = data.getSameList().stream().filter(po -> sameEmpIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(noGroupingList)) { + Map noGrouping = new HashMap<>(); + noGrouping.put(DM, SalaryI18nUtil.getI18nLabel(153462, "无分组")); + noGrouping.putAll(SalaryStatisticsReportBO.calculateItem(noGroupingList, lastNoGroupingList, sameNoGroupingList, salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); + records.add(noGrouping); + } + } else if (StringUtils.equals(dimensionValue, "无分组")) { + List noGroupingList = data.getList().stream().filter(po -> empIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); + data.setListByDimensionValue(noGroupingList); + } + + result.setList(records); + return result; + } + // private PageInfo> buildRationGroupSpacing4NoItemRecords(SalaryStatisticsDimensionPO dimension, SalaryStatisticsReportDataDTO data, Map> salaryAcctResultValueMap) { // PageInfo> result = new PageInfo<>(); // List> records = new ArrayList<>(); diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java index 7e8c8a374..70261fc4d 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java @@ -114,6 +114,7 @@ public class SalaryStatisticsDimensionWrapper extends Service { * @return */ public SalaryStatisticsDimensionFormDTO getFrom(Long id) { + List salaryItemList = salaryItemService(user).listAll(); List statsDimOptions = Lists.newArrayList(); // statsDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_SEX, SalaryI18nUtil.getI18nLabel(98622, "性别"))); @@ -129,12 +130,12 @@ public class SalaryStatisticsDimensionWrapper extends Service { // statsDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_AGE, SalaryI18nUtil.getI18nLabel(174001, "年龄"))); statsDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_WORK_YEAR, SalaryI18nUtil.getI18nLabel(174000, "工龄"))); statsDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_COMPANY_YEAR, SalaryI18nUtil.getI18nLabel(174003, "司龄"))); + statsDimOptions.addAll(salaryItemList.stream().map(item -> new WeaFormOption(item.getId().toString(), item.getName())).collect(Collectors.toList())); List groupDimOptions = Lists.newArrayList(); // groupDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_AGE, SalaryI18nUtil.getI18nLabel(174001, "年龄"))); groupDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_WORK_YEAR, SalaryI18nUtil.getI18nLabel(174000, "工龄"))); groupDimOptions.add(new WeaFormOption(SalaryStatisticsDimensionConstant.DM_COMPANY_YEAR, SalaryI18nUtil.getI18nLabel(174003, "司龄"))); - List salaryItemList = salaryItemService(user).listAll(); groupDimOptions.addAll(salaryItemList.stream() .filter(item -> SalaryDataTypeEnum.NUMBER.getValue().equals(item.getDataType())) .map(item -> new WeaFormOption(item.getId().toString(), item.getName())).collect(Collectors.toList())); diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index 508877028..0da317ee9 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -319,13 +319,13 @@ public class SalaryStatisticsReportWrapper extends Service { //已缓存的报表id String salaryReportIds = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_IDS)); String salaryReportConditions = ""; - if (StringUtils.isNotBlank(salaryReportIds) && salaryReportIds.contains(id + "")) { - //报表中缓存的条件 - salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id)); - if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) { - return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); - } - } +// if (StringUtils.isNotBlank(salaryReportIds) && salaryReportIds.contains(id + "")) { +// //报表中缓存的条件 +// salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id)); +// if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) { +// return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); +// } +// } // 列表data From f236b8e655da64dacb98662097419a93f861b846 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 19 Jan 2024 11:35:11 +0800 Subject: [PATCH 049/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B3=95=E6=A2=B3=E7=90=86=E5=92=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/SIAccountService.java | 2 + .../service/impl/SIAccountServiceImpl.java | 935 +++++++++++++++++- .../service/impl/SIExportServiceImpl.java | 6 +- .../salary/timer/AutoSiAccountAndFileJob.java | 1 - .../engine/salary/web/SIExportController.java | 13 +- 5 files changed, 918 insertions(+), 39 deletions(-) diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java index 60d06ed86..6a496845b 100644 --- a/src/com/engine/salary/service/SIAccountService.java +++ b/src/com/engine/salary/service/SIAccountService.java @@ -314,5 +314,7 @@ public interface SIAccountService { boolean checkBalance(InsuranceAccountDetailPO po); boolean checkBalancePayInsurance(InsuranceAccountDetailPO po); + + List buildRecords(List list, Map paymentMap); } diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 6bb0fd1f2..43168124a 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -18,10 +18,7 @@ import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.progress.ProgressDTO; import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO; -import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO; -import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; -import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; -import com.engine.salary.entity.siaccount.dto.InsuranceAcctDetailImportFieldDTO; +import com.engine.salary.entity.siaccount.dto.*; import com.engine.salary.entity.siaccount.param.*; import com.engine.salary.entity.siaccount.po.*; import com.engine.salary.entity.siarchives.po.*; @@ -67,6 +64,7 @@ import com.engine.salary.util.valid.ValidUtil; import com.engine.salary.wrapper.SalaryFormulaWrapper; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.wbi.util.StringUtil; import dm.jdbc.util.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -83,6 +81,7 @@ import weaver.hrm.User; import java.io.InputStream; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -103,7 +102,6 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; @Slf4j public class SIAccountServiceImpl extends Service implements SIAccountService { -// private SIAccountBiz siAccountBiz = new SIAccountBiz(); private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); @@ -113,9 +111,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return ServiceUtil.getService(RecordsBuildServiceImpl.class, user); } - public SIAccountBiz getSiAccountBiz(User user) { - return ServiceUtil.getService(SIAccountBiz.class, user); - } +// public SIAccountBiz getSiAccountBiz(User user) { +// return ServiceUtil.getService(SIAccountBiz.class, user); +// } public ColumnBuildService getColumnBuildService(User user) { return ServiceUtil.getService(ColumnBuildServiceImpl.class, user); @@ -225,6 +223,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return MapperProxyFactory.getProxy(InsuranceCompensationMapper.class); } + private SIAccountUtilMapper getSIAccountUtilMapper() { + return MapperProxyFactory.getProxy(SIAccountUtilMapper.class); + } + @Override public Map listPage(InsuranceAccountBatchParam queryParam) { Long employeeId = (long) user.getUID(); @@ -244,7 +246,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } //福利台账列表 - PageInfo pageInfo = getSiAccountBiz(user).listPage(queryParam); +// PageInfo pageInfo = getSiAccountBiz(user).listPage(queryParam); + PageInfo pageInfo = siBatchListPage(queryParam); Collection insuranceAccountBatchPOS = pageInfo.getList(); List insuranceAccountBatchListDTOS = InsuranceAccountBO.buildAccountBatchDTOList(insuranceAccountBatchPOS); @@ -313,7 +316,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Map datas = new HashMap<>(); //正常缴纳列表 - PageInfo pageInfo = getSiAccountBiz(user).listCommonPage(queryParam); +// PageInfo pageInfo = getSiAccountBiz(user).listCommonPage(queryParam); + PageInfo pageInfo = siBatchListCommonPage(queryParam); List insuranceAccountDetailPOS = pageInfo.getList(); //数据组装 @@ -599,7 +603,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public void delete(AccountParam accountParam) { Long employeeId = (long) user.getUID(); - getSiAccountBiz(user).delete(accountParam, employeeId); +// getSiAccountBiz(user).delete(accountParam, employeeId); + siDelete(accountParam); } @Override @@ -635,24 +640,27 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { public void saveSupplementaryAccount(SaveSupplementaryAccountParam saveSupplementaryAccountParam) { ValidUtil.doValidator(saveSupplementaryAccountParam); - Long employeeId = (long) user.getUID(); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).saveSupplementaryAccount(saveSupplementaryAccountParam, employeeId, currentUserName); +// Long employeeId = (long) user.getUID(); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).saveSupplementaryAccount(saveSupplementaryAccountParam, employeeId, currentUserName); + siSaveSupplementaryAccount(saveSupplementaryAccountParam); } @Override public void deleteCommonAccount(SaveCommonAccountParam param) { ValidUtil.doValidator(param); - Long employeeId = (long) user.getUID(); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).deleteCommonAccount(param, employeeId, currentUserName); +// Long employeeId = (long) user.getUID(); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).deleteCommonAccount(param, employeeId, currentUserName); + siDeleteCommonAccount(param); } @Override public void deleteSummplementaryAccount(List supplementAccountBaseParams) { - Long employeeId = (long) user.getUID(); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).deleteSupplementaryAccount(supplementAccountBaseParams, employeeId, currentUserName); +// Long employeeId = (long) user.getUID(); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).deleteSupplementaryAccount(supplementAccountBaseParams, employeeId, currentUserName); + siDeleteSupplementaryAccount(supplementAccountBaseParams); } @Override @@ -799,10 +807,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public void accountInspect(InspectAccountParam param) { - Long employeeId = (long) user.getUID(); +// Long employeeId = (long) user.getUID(); ValidUtil.doValidator(param); - String currentUserName = user.getLastname(); - getSiAccountBiz(user).accountInspect(param.getIds(), param.getBillMonth(), employeeId, currentUserName, param.getPaymentOrganization()); +// String currentUserName = user.getLastname(); +// getSiAccountBiz(user).accountInspect(param.getIds(), param.getBillMonth(), employeeId, currentUserName, param.getPaymentOrganization()); + accountInspect(param.getIds(), param.getBillMonth(), param.getPaymentOrganization()); } @Override @@ -926,7 +935,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public PageInfo overView(InsuranceAccountDetailParam queryParam) { - PageInfo pageInfos = getSiAccountBiz(user).overView(queryParam); +// PageInfo pageInfos = getSiAccountBiz(user).overView(queryParam); + PageInfo pageInfos = siOverView(queryParam); return pageInfos; } @@ -1521,13 +1531,15 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public void socialSecurityBenefitsRecalculate(InsuranceAccountBatchPO param) { //fixme 重新核算的校验逻辑 1、先取台账对应扣缴义务人下的所有账套 2、取账套下所有核算记录 3、判断核算记录有没有使用对应月份的福利台账 - int num = getSiAccountBiz(user).checkIfBusinessaccounting(param); +// int num = getSiAccountBiz(user).checkIfBusinessaccounting(param); + int num = checkIfBusinessAccounting(param); //表示已经被核算过不能重新核算 if (num > 0) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "已被薪酬核算给核算过,无法重新核算!")); } param.setBillStatus(0); - getSiAccountBiz(user).updateById(param); +// getSiAccountBiz(user).updateById(param); + updateById(param); } /** @@ -1804,7 +1816,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { encryptUtil.encryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class); //更新 for(InsuranceAccountDetailPO po : updateInsuranceAccountDetailList) { - getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po); +// getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po); + updateByEmployeeIdAndBillMonth(po); } //刷新hrsa_bill_batch中数据统计信息 @@ -3667,7 +3680,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { encryptUtil.encryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class); //更新 for(InsuranceAccountDetailPO po : updateInsuranceAccountDetailList) { - getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po); +// getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po); + updateByEmployeeIdAndBillMonth(po); } } if (createInsuranceAccountDetailList.size() > 0) { @@ -3705,7 +3719,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // 正常缴纳列表 queryParam.setPageSize(10000000); - PageInfo pageInfo = getSiAccountBiz(user).listCommonPage(queryParam); +// PageInfo pageInfo = getSiAccountBiz(user).listCommonPage(queryParam); + PageInfo pageInfo = siBatchListCommonPage(queryParam); List insuranceAccountDetailPOS = pageInfo.getList(); // 数据组装 List> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId); @@ -4319,6 +4334,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { insuranceAccountDetailPO.setOtherComSum(otherComSum.toPlainString()); return insuranceAccountDetailPO; } + /*****以下代码为SIAccountBiz中逻辑迁移,旨在减少Biz类的使用*****/ /** * 新建核算并归档 @@ -5352,4 +5368,865 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // insuranceSchemeContext.setNewValues(insuranceAccountBatchPO); // siAccountLoggerTemplate.write(insuranceSchemeContext); } + + + public PageInfo siBatchListPage(InsuranceAccountBatchParam queryParam) { + List list = getInsuranceAccountBatchMapper().list(queryParam); + PageInfo page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), + list, InsuranceAccountBatchPO.class); + encryptUtil.decryptList(page.getList(), InsuranceAccountBatchPO.class); + return page; + } + + public PageInfo siBatchListCommonPage(InsuranceAccountDetailParam queryParam) { + queryParam.setPaymentStatus(PaymentStatusEnum.COMMON.getValue()); + //排序配置 + OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); + queryParam.setOrderRule(orderRule); + //系统人员福利台账明细 + List list = getInsuranceAccountDetailMapper().list(queryParam); + //非系统各人员台账明细 + List extList = getInsuranceAccountDetailMapper().extList(queryParam); + list.addAll(extList); + PageInfo pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), + list, InsuranceAccountDetailPO.class); + encryptUtil.decryptList(pageInfo.getList(), InsuranceAccountDetailPO.class); + return pageInfo; + } + + public void siDelete(AccountParam param) { + InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization()); + encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); + SalaryAssert.notNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(0, "参数错误")); +// if (insuranceAccountBatchPO.getBillStatus().equals(BillStatusEnum.ARCHIVED.getValue())) { +// int num = checkIfBusinessAccounting(insuranceAccountBatchPO); +// //表示已经被核算过不能重新核算 +// if (num > 0) { +// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "已被薪酬核算给核算过,无法删除!")); +// } +// } + +// if(param.getPaymentOrganization()==null){ +// throw new SalaryRunTimeException("个税扣缴义务人为空"); +// } + getInsuranceAccountBatchMapper().deleteById(insuranceAccountBatchPO.getId()); + getInsuranceAccountDetailMapper().batchDeleteNotFile(param.getBillMonth(), param.getPaymentOrganization()); + + //删除账单月份+个税扣缴义务人下的调差数据 + getInsuranceCompensationMapper().deleteByBillMonthAndPayOrg(param.getBillMonth(), param.getPaymentOrganization()); +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); +// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantkey, employeeId, 100464, "删除台账")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantkey, employeeId, 100464, "删除台账")); +// insuranceSchemeContext.setNewValues(insuranceAccountBatchPO); +// siAccountLoggerTemplate.write(insuranceSchemeContext); + } + + public void siSaveSupplementaryAccount(SaveSupplementaryAccountParam param) { + if (StringUtils.isBlank(param.getBillMonth()) || CollectionUtils.isEmpty(param.getBillMonthList()) || CollectionUtils.isEmpty(param.getProjects()) + || CollectionUtils.isEmpty(param.getIncludes())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误")); + } + //需要补缴的月份 + if (param.getBillMonthList().contains(param.getBillMonth())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "当前月走正常缴纳")); + } + //需要补缴的员工id + List employeeIds = param.getIncludes(); + if (CollectionUtils.isNotEmpty(param.getExcludes())) { + employeeIds = employeeIds.stream().filter(item -> !param.getExcludes().contains(item)).collect(Collectors.toList()); + } + //校验补缴人员是否存在福利档案基础信息,并且runStatus处于正在缴纳或者待减员 + List insuranceBaseInfoList = getInsuranceBaseInfoMapper().getSocialByPaymentOrganization(param.getPaymentOrganization()); + List finalEmployeeIds = employeeIds; + List filterList = insuranceBaseInfoList.stream().filter(e -> { + for (Long uId : finalEmployeeIds) { + if (e.getEmployeeId().equals(uId) && (e.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()) || e.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()))) { + return true; + } + } + return false; + }).collect(Collectors.toList()); + if (filterList.size() != employeeIds.size()) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补缴人员中存在未设置福利档案人员或相关人员不在福利在缴人员中,不可新建补缴信息!")); + } + //20231122逻辑优化,过滤出不在起始缴纳月和最后缴纳月区间的人员 + List empIdsInPayMonthRange = listCanPayEmpIds(param.getPaymentOrganization(), param.getBillMonth()); + employeeIds = employeeIds.stream().filter(f -> empIdsInPayMonthRange.contains(f)).collect(Collectors.toList()); + + SalaryAssert.notEmpty(employeeIds, SalaryI18nUtil.getI18nLabel(0, "无核算人员")); + List baseList = new ArrayList<>(); + employeeIds.stream().forEach(id -> { + param.getBillMonthList().stream().forEach(month -> { + SupplementAccountBaseParam supplementAccountBaseParam = SupplementAccountBaseParam.builder() + .supplementaryMonth(month) + .employeeId(id) + .paymentOrganization(param.getPaymentOrganization()) + .projects(param.getProjects()) + .billMonth(param.getBillMonth()) + .supplementType(param.getSupplementType()) + .build(); + if ("2".equals(param.getSupplementType())) { + supplementAccountBaseParam.setSocialPaymentBaseString(param.getSocialPaymentBaseString()); + supplementAccountBaseParam.setFundPaymentBaseString(param.getFundPaymentBaseString()); + supplementAccountBaseParam.setOtherPaymentBaseString(param.getOtherPaymentBaseString()); + } else if("3".equals(param.getSupplementType())) { + supplementAccountBaseParam.setSocialPaymentPerString(param.getSocialPaymentPerString()); + supplementAccountBaseParam.setSocialPaymentComString(param.getSocialPaymentComString()); + supplementAccountBaseParam.setFundPaymentPerString(param.getFundPaymentPerString()); + supplementAccountBaseParam.setFundPaymentComString(param.getFundPaymentComString()); + supplementAccountBaseParam.setOtherPaymentPerString(param.getOtherPaymentPerString()); + supplementAccountBaseParam.setOtherPaymentComString(param.getOtherPaymentComString()); + } + baseList.add(supplementAccountBaseParam); + }); + }); + //核算开始 + accountSupplement(baseList, employeeIds, param.getPaymentOrganization()); + + updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build()); + } + + /** + * @param baseList 员工id-账单月份-补缴月份(单挑)-补缴项 集合 + * @param employeeIds 需要补缴的员工id + * @return + */ + public String accountSupplement(List baseList, List employeeIds, Long paymentOrganization) { + //(k,v) k-员工id v-员工对应的福利档案数据 + Map longInsuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); + //核算结果集 + List pos = new ArrayList<>(); + baseList.forEach(baseParam -> { + //判断人员id+账单月份+补缴月份在表中的唯一性 + List supplementList = getInsuranceAccountDetailMapper().querySupplementList(baseParam.getBillMonth(), baseParam.getPaymentOrganization(), baseParam.getEmployeeId(), baseParam.getSupplementaryMonth()); + if (supplementList.size() > 0) { + throw new SalaryRunTimeException("当前人员和账单月份已存在该补缴月份的数据!无法再次创建!"); + } + InsuranceAccountDetailPO insuranceAccountDetailPO = accountSingleEmployeeBill(baseParam, longInsuranceArchivesAccountPOMap.get(baseParam.getEmployeeId())); + pos.add(insuranceAccountDetailPO); + }); + batchSaveSupplementAccount(pos); + return SalaryI18nUtil.getI18nLabel(0, "核算完成,数据保存成功"); + } + + public InsuranceAccountDetailPO accountSingleEmployeeBill(SupplementAccountBaseParam baseParam, InsuranceArchivesAccountPO accountPO) { + InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO(); + List projects = baseParam.getProjects(); + insuranceAccountDetailPO.setBillMonth(baseParam.getBillMonth()); + insuranceAccountDetailPO.setBillStatus(BillStatusEnum.NOT_ARCHIVED.getValue()); + insuranceAccountDetailPO.setCreator((long) user.getUID()); + insuranceAccountDetailPO.setCreateTime(new Date()); + insuranceAccountDetailPO.setUpdateTime(new Date()); + insuranceAccountDetailPO.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + insuranceAccountDetailPO.setId(IdGenerator.generate()); + insuranceAccountDetailPO.setEmployeeId(baseParam.getEmployeeId()); + insuranceAccountDetailPO.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue()); + insuranceAccountDetailPO.setSupplementaryMonth(baseParam.getSupplementaryMonth()); + insuranceAccountDetailPO.setPaymentOrganization(baseParam.getPaymentOrganization()); + insuranceAccountDetailPO.setSupplementaryProjects( + String.join(",", + baseParam.getProjects() == null ? new ArrayList<>() : baseParam.getProjects().stream().map(String::valueOf).collect(Collectors.toList()))); + insuranceAccountDetailPO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + insuranceAccountDetailPO.setResourceFrom(ResourceFromEnum.SYSTEM.getValue()); + //缴纳组织=个税扣缴义务人 + insuranceAccountDetailPO.setSocialPayOrg(baseParam.getPaymentOrganization()); + if (projects.contains(ProjectTypeEnum.ALL.getValue())) { + if ("2".equals(baseParam.getSupplementType())) { + if (accountPO.getSocial() != null) { + accountPO.getSocial().setSocialPaymentBaseString(baseParam.getSocialPaymentBaseString()); + } + if (accountPO.getFund() != null) { + accountPO.getFund().setFundPaymentBaseString(baseParam.getFundPaymentBaseString()); + } + if (accountPO.getOther() != null) { + accountPO.getOther().setOtherPaymentBaseString(baseParam.getOtherPaymentBaseString()); + } + accountSocial(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + accountOther(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } else if ("3".equals(baseParam.getSupplementType())) { + accountSupSocialByData(insuranceAccountDetailPO, baseParam); + accountSupFundByData(insuranceAccountDetailPO, baseParam); + accountSupOtherByData(insuranceAccountDetailPO, baseParam); + } else { + accountSocial(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + accountOther(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } + + return account(insuranceAccountDetailPO); + } + if (projects.contains(ProjectTypeEnum.SOCIAL.getValue())) { + if ("2".equals(baseParam.getSupplementType())) { + if (accountPO.getSocial() != null) { + accountPO.getSocial().setSocialPaymentBaseString(baseParam.getSocialPaymentBaseString()); + } + accountSocial(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } else if ("3".equals(baseParam.getSupplementType())) { + accountSupSocialByData(insuranceAccountDetailPO, baseParam); + } else { + accountSocial(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } + + } + if (!projects.contains(ProjectTypeEnum.SOCIAL.getValue())) { + List ids = new ArrayList<>(); + List list = getICategoryMapper().listByDataType(DataTypeEnum.SYSTEM.getValue()); + + if (projects.contains(ProjectTypeEnum.ENDOWMENT_INSURANCE.getValue())) { + ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(0, "养老保险").equals(item.getInsuranceName())).findFirst() + .get(); + ids.add(insuranceCategoryPO.getId()); + } + if (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue())) { + ICategoryPO insuranceCategoryPO = list.stream().filter(item -> SalaryI18nUtil.getI18nLabel(0, "医疗保险").equals(item.getInsuranceName())).findFirst() + .get(); + ids.add(insuranceCategoryPO.getId()); + } + if ("2".equals(baseParam.getSupplementType())) { + if (accountPO.getSocial() != null) { + accountPO.getSocial().setSocialPaymentBaseString(baseParam.getSocialPaymentBaseString()); + } + accountEndowmentInsurance(insuranceAccountDetailPO, accountPO, ids, baseParam.getSupplementaryMonth()); + } else if ("3".equals(baseParam.getSupplementType())) { + accountSupEndowmentInsuranceByData(insuranceAccountDetailPO, baseParam, ids); + } else { + accountEndowmentInsurance(insuranceAccountDetailPO, accountPO, ids, baseParam.getSupplementaryMonth()); + } + + } + if (projects.contains(ProjectTypeEnum.FUND.getValue())) { + if ("2".equals(baseParam.getSupplementType())) { + if (accountPO.getFund() != null) { + accountPO.getFund().setFundPaymentBaseString(baseParam.getFundPaymentBaseString()); + } + accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } else if ("3".equals(baseParam.getSupplementType())) { + accountSupFundByData(insuranceAccountDetailPO, baseParam); + } else { + accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } + } + if (projects.contains(ProjectTypeEnum.OTHER.getValue())) { + + if ("2".equals(baseParam.getSupplementType())) { + if (accountPO.getOther() != null) { + accountPO.getOther().setOtherPaymentBaseString(baseParam.getOtherPaymentBaseString()); + } + accountOther(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } else if ("3".equals(baseParam.getSupplementType())) { + accountSupOtherByData(insuranceAccountDetailPO, baseParam); + } else { + accountOther(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth()); + } + + } + + return account(insuranceAccountDetailPO); + } + + public void accountSupFundByData(InsuranceAccountDetailPO insuranceAccountDetailPO, SupplementAccountBaseParam baseParam) { + //公积金个人 + if (StringUtils.isNotBlank(baseParam.getFundPaymentPerString())) { + List fundPer = new ArrayList<>(); + HashMap fundPerson = JSON.parseObject(baseParam.getFundPaymentPerString(), new HashMap().getClass()); + fundPerson.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + fundPer.add(result); + }); + insuranceAccountDetailPO.setFundPerJson(baseParam.getFundPaymentPerString()); + BigDecimal fundPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : fundPer) { + fundPerSum = fundPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setFundPerSum(fundPerSum.toPlainString()); + } + //公积金单位 + if (StringUtils.isNotBlank(baseParam.getFundPaymentComString())) { + List fundCom = new ArrayList<>(); + HashMap fundComMap = JSON.parseObject(baseParam.getFundPaymentComString(), new HashMap().getClass()); + fundComMap.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + fundCom.add(result); + }); + insuranceAccountDetailPO.setFundComJson(baseParam.getFundPaymentComString()); + BigDecimal fundComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : fundCom) { + fundComSum = fundComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setFundComSum(fundComSum.toPlainString()); + } + } + + public void accountSupOtherByData(InsuranceAccountDetailPO insuranceAccountDetailPO, SupplementAccountBaseParam baseParam) { + //其他福利个人 + if (StringUtils.isNotBlank(baseParam.getOtherPaymentPerString())) { + List otherPer = new ArrayList<>(); + HashMap otherPerMap = JSON.parseObject(baseParam.getOtherPaymentPerString(), new HashMap().getClass()); + otherPerMap.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + otherPer.add(result); + }); + insuranceAccountDetailPO.setOtherPerJson(baseParam.getOtherPaymentPerString()); + BigDecimal otherPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : otherPer) { + otherPerSum = otherPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setOtherPerSum(otherPerSum.toPlainString()); + } + //其他福利单位 + if (StringUtils.isNotBlank(baseParam.getOtherPaymentComString())) { + List otherCom = new ArrayList<>(); + HashMap otherComMap = JSON.parseObject(baseParam.getOtherPaymentComString(), new HashMap().getClass()); + otherComMap.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + otherCom.add(result); + }); + insuranceAccountDetailPO.setOtherComJson(baseParam.getOtherPaymentComString()); + BigDecimal otherComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : otherCom) { + otherComSum = otherComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setOtherComSum(otherComSum.toPlainString()); + } + } + + public void accountSupSocialByData(InsuranceAccountDetailPO insuranceAccountDetailPO, SupplementAccountBaseParam baseParam) { + //社保个人 + if (StringUtils.isNotBlank(baseParam.getSocialPaymentPerString())) { + List socialPer = new ArrayList<>(); + HashMap archivesPerson = JSON.parseObject(baseParam.getSocialPaymentPerString(), new HashMap().getClass()); + archivesPerson.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + socialPer.add(result); + }); + insuranceAccountDetailPO.setSocialPerJson(baseParam.getSocialPaymentPerString()); + BigDecimal socialPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialPer) { + socialPerSum = socialPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialPerSum(socialPerSum.toPlainString()); + } + //社保单位 + if (StringUtils.isNotBlank(baseParam.getSocialPaymentComString())) { + List socialCom = new ArrayList<>(); + HashMap archivesCom = JSON.parseObject(baseParam.getSocialPaymentComString(), new HashMap().getClass()); + archivesCom.forEach((k, v) -> { + BigDecimal result = new BigDecimal(v); + socialCom.add(result); + }); + insuranceAccountDetailPO.setSocialComJson(baseParam.getSocialPaymentComString()); + BigDecimal socialComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialCom) { + socialComSum = socialComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialComSum(socialComSum.toPlainString()); + } + } + + public InsuranceAccountDetailPO accountEndowmentInsurance(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, List categoryIds, String billMonth) { + if (accountPO.getSocial() != null) { + InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); + insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); + insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount()); + insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId()); + insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString()); + insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString()); + //判断是否在起始缴纳月和最后缴纳月之间 + Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime()); + + if ((Objects.equals(NonPaymentEnum.YES.getValue(), socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) { + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialPO.getSocialSchemeId()); + encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); + //方案中包含的需要缴纳社保的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; + Map schemeperson = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) + && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesPerson = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + //需要核算社保的福利id 个人 + List needArchivesPerson = new ArrayList<>(); + if (archivesPerson != null) { + categoryIds.forEach(item -> { + if (archivesPerson.containsKey(String.valueOf(item)) && schemeperson.containsKey(item)) { + if (StringUtils.isNotBlank(archivesPerson.get(String.valueOf(item)))) { + needArchivesPerson.add(item); + } + } + }); + } + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(schemeperson, billMonth, socialPO.getSocialStartTime()); + + List socialPer = new ArrayList<>(); + Map socialPerJsonMap = new HashMap<>(); + needArchivesPerson.forEach(e -> { + InsuranceSchemeDetailPO po = schemeperson.get(e); + BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + socialPerJsonMap.put(String.valueOf(e), result.toPlainString()); + socialPer.add(result); + }); + insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerJsonMap)); + BigDecimal socialPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialPer) { + socialPerSum = socialPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialPerSum(socialPerSum.toPlainString()); + //方案中包含的需要缴纳社保的单位福利 + Map schemeCom = detailPOS.stream() + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) && + (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) + .collect( + Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); + //档案中包含的基数信息 + HashMap archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap().getClass()); + //需要核算社保的福利id 单位 + List needArchivesCom = new ArrayList<>(); + if (archivesCom != null) { + categoryIds.forEach(item -> { + if (archivesCom.containsKey(String.valueOf(item)) && schemeCom.containsKey(item)) { + if (StringUtils.isNotBlank(archivesCom.get(String.valueOf(item)))) { + needArchivesCom.add(item); + } + } + }); + //判断核算周期、核算月、福利起始缴纳月的关系 + checkCycleSettingWithStartMonth(schemeCom, billMonth, socialPO.getSocialStartTime()); + } + List socialCom = new ArrayList<>(); + Map sociaComJsonMap = new HashMap<>(); + needArchivesCom.forEach(e -> { + InsuranceSchemeDetailPO po = schemeCom.get(e); + BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100")); + BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); + BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); + Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } + + sociaComJsonMap.put(String.valueOf(e), result.toPlainString()); + socialCom.add(result); + + }); + insuranceAccountDetailPO.setSocialComJson(JSON.toJSONString(sociaComJsonMap)); + BigDecimal socialComSum = new BigDecimal("0"); + for (BigDecimal decimal : socialCom) { + socialComSum = socialComSum.add(decimal); + } + insuranceAccountDetailPO.setSocialComSum(socialComSum.toPlainString()); + } + } + return insuranceAccountDetailPO; + } + + public void accountSupEndowmentInsuranceByData(InsuranceAccountDetailPO insuranceAccountDetailPO, SupplementAccountBaseParam baseParam, List ids) { + //社保个人 + if (StringUtils.isNotBlank(baseParam.getSocialPaymentPerString())) { + List socialPer = new ArrayList<>(); + HashMap archivesPerson = JSON.parseObject(baseParam.getSocialPaymentPerString(), new HashMap().getClass()); + HashMap socialPerson = new HashMap<>(); + archivesPerson.forEach((k, v) -> { + if (ids.contains(Long.valueOf(k))) { + socialPerson.put(k, v); + BigDecimal result = new BigDecimal(v); + socialPer.add(result); + } + + }); + insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerson)); + BigDecimal socialPerSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialPer) { + socialPerSum = socialPerSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialPerSum(socialPerSum.toPlainString()); + } + //社保单位 + if (StringUtils.isNotBlank(baseParam.getSocialPaymentComString())) { + List socialCom = new ArrayList<>(); + HashMap archivesCom = JSON.parseObject(baseParam.getSocialPaymentComString(), new HashMap().getClass()); + HashMap socialComMap = new HashMap<>(); + archivesCom.forEach((k, v) -> { + if (ids.contains(Long.valueOf(k))) { + socialComMap.put(k, v); + BigDecimal result = new BigDecimal(v); + socialCom.add(result); + } + }); + insuranceAccountDetailPO.setSocialComJson(JSON.toJSONString(socialComMap)); + BigDecimal socialComSum = new BigDecimal("0"); + for (BigDecimal bigDecimal : socialCom) { + socialComSum = socialComSum.add(bigDecimal); + } + insuranceAccountDetailPO.setSocialComSum(socialComSum.toPlainString()); + } + } + + public void batchSaveSupplementAccount(List pos) { + if (CollectionUtils.isEmpty(pos)) { + return; + } + batchSaveAccountInspectDetail(pos); + getInsuranceAccountDetailMapper().batchDelSupplementAccountDetails(pos); + encryptUtil.encryptList(pos, InsuranceAccountDetailPO.class); + List> lists = splitDetailList(pos, 20); + lists.forEach(subList -> { + getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList); + }); + //删除日志 +// pos.stream().forEach(item -> { +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(item.getId())); +// insuranceSchemeContext.setTargetName(String.valueOf(item.getEmployeeId())); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100448, "删除核算记录")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100448, "删除核算记录")); +// insuranceSchemeContext.setNewValues(item); +// siAccountLoggerTemplate.write(insuranceSchemeContext); +// }); + //插入日志 +// pos.stream().forEach(item -> { +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.valueOf(item.getId())); +// insuranceSchemeContext.setTargetName(String.valueOf(item.getEmployeeId())); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100494, "新建核算记录")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100494, "新建核算记录")); +// insuranceSchemeContext.setNewValues(item); +// siAccountLoggerTemplate.write(insuranceSchemeContext); +// }); + } + + public void siDeleteCommonAccount(SaveCommonAccountParam param) { + ValidUtil.doValidator(param); + SalaryAssert.notEmpty(param.getIncludes(), SalaryI18nUtil.getI18nLabel(0, "参数错误")); + //根据id批量删除 + if (param.getIds().size() > 0) { + getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds()); + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "请勾选需要删除的数据项!")); + } + //记录日志 +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetId(String.join(",", param.getIncludes().stream().map(item -> String.valueOf(item)).collect(Collectors.toList()))); +// insuranceSchemeContext.setTargetName(param.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); +// insuranceSchemeContext.setNewValues(param); +// siAccountLoggerTemplate.write(insuranceSchemeContext); + updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build()); + } + + public void siDeleteSupplementaryAccount(List param) { + SalaryAssert.notEmpty(param, SalaryI18nUtil.getI18nLabel(0, "参数错误")); + boolean valid = param.stream().anyMatch(item -> item.getEmployeeId() == null + || StringUtils.isBlank(item.getSupplementaryMonth()) + || StringUtils.isBlank(item.getBillMonth())); + if (valid) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误")); + } + getInsuranceAccountDetailMapper().batchDelSupplementDetailsByIds(param); +// param.stream().forEach(item -> { +// LoggerContext insuranceSchemeContext = new LoggerContext(); +// insuranceSchemeContext.setTargetName(item.getBillMonth()); +// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue()); +// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录")); +// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录")); +// insuranceSchemeContext.setNewValues(item); +// siAccountLoggerTemplate.write(insuranceSchemeContext); +// }); + updateBatchAccount(AccountParam.builder().billMonth(param.get(0).getBillMonth()).paymentOrganization(param.get(0).getPaymentOrganization()).build()); + } + + public void accountInspect(Collection ids, String billMonth, Long paymentOrganization) { + List insuranceAccountInspectPOS = allInspects(ids, billMonth); + SalaryAssert.notEmpty(insuranceAccountInspectPOS, SalaryI18nUtil.getI18nLabel(0, "无核算数据")); + List commonInspects = insuranceAccountInspectPOS.stream() + .filter(e -> Objects.equals(e.getPaymentStatus(), PaymentStatusEnum.COMMON.getValue())) + .collect(Collectors.toList()); + List supplementInspects = insuranceAccountInspectPOS.stream() + .filter(e -> Objects.equals(e.getPaymentStatus(), PaymentStatusEnum.REPAIR.getValue())) + .collect(Collectors.toList()); + //核算正常缴纳 + if (CollectionUtils.isNotEmpty(commonInspects)) { + SaveCommonAccountParam param = new SaveCommonAccountParam(); + param.setBillMonth(billMonth); + param.setIncludes(commonInspects.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList())); + siSaveCommonAccount(param); + } + //核算补缴 + if (CollectionUtils.isNotEmpty(supplementInspects)) { + List baseList = new ArrayList<>(); + supplementInspects.forEach(e -> { + SupplementAccountBaseParam base = new SupplementAccountBaseParam(); + base.setBillMonth(billMonth); + base.setProjects( + e.getSupplementaryProjects() == null ? null : Arrays.stream(e.getSupplementaryProjects().split(",")).map(Integer::valueOf).collect(Collectors.toList())); + base.setEmployeeId(e.getEmployeeId()); + base.setSupplementaryMonth(e.getSupplementaryMonth()); + baseList.add(base); + }); + accountSupplement(baseList, baseList.stream().map(SupplementAccountBaseParam::getEmployeeId).collect(Collectors.toList()), paymentOrganization); + } + } + + public PageInfo siOverView(InsuranceAccountDetailParam queryParam) { + + List insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtil.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization())); + encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class); + //获取扣缴义务人信息 + List paymentList = getTaxAgentMapper().listAll(); + SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(0, "该租户无扣缴义务人")); + Map paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgentPO::getId, Function.identity())); + List insuranceAccountViewListDTOS = buildRecords(insuranceAccountDetailPOS, paymentMap); + + PageInfo insuranceAccountViewListDTOPage = new PageInfo<>(insuranceAccountViewListDTOS, InsuranceAccountViewListDTO.class); + insuranceAccountViewListDTOPage.setTotal(insuranceAccountViewListDTOS.size()); + return insuranceAccountViewListDTOPage; + } + + @Override + public List buildRecords(List list, Map paymentMap) { + Map result = new HashMap<>(); + //根据组织分组,对社保进行统计 + Map> socialCollect = list.stream().filter(item -> item.getSocialPayOrg() != null) + .collect(Collectors.groupingBy(InsuranceAccountDetailPO::getSocialPayOrg)); + socialCollect.forEach((k, v) -> { + if (result.get(k) == null) { + InsuranceAccountViewListDTO temp = new InsuranceAccountViewListDTO(); + temp.setPayOrg(paymentMap.get(k).getName()); + result.put(k, temp); + } + InsuranceAccountViewListDTO insuranceAccountViewListDTO = result.get(k); + accountSocialView(insuranceAccountViewListDTO, v); + }); + //根据组织分组,对公积金进行统计 + Map> fundCollect = list.stream().filter(item -> item.getSocialPayOrg() != null) + .collect(Collectors.groupingBy(InsuranceAccountDetailPO::getSocialPayOrg)); + fundCollect.forEach((k, v) -> { + if (result.get(k) == null) { + InsuranceAccountViewListDTO temp = new InsuranceAccountViewListDTO(); + temp.setPayOrg(paymentMap.get(k).getName()); + result.put(k, temp); + } + InsuranceAccountViewListDTO insuranceAccountViewListDTO = result.get(k); + accountFundView(insuranceAccountViewListDTO, v); + }); + //根据组织分组,对其他福利进行统计 + Map> otherCollect = list.stream().filter(item -> item.getSocialPayOrg() != null) + .collect(Collectors.groupingBy(InsuranceAccountDetailPO::getSocialPayOrg)); + otherCollect.forEach((k, v) -> { + if (result.get(k) == null) { + InsuranceAccountViewListDTO temp = new InsuranceAccountViewListDTO(); + temp.setPayOrg(paymentMap.get(k).getName()); + result.put(k, temp); + } + InsuranceAccountViewListDTO insuranceAccountViewListDTO = result.get(k); + accountOtherView(insuranceAccountViewListDTO, v); + }); + //对各组织进行金额合计 + List viewDTOS = new ArrayList<>(); + result.forEach((k, v) -> { + BigDecimal socialPaySum = StringUtils.isBlank(v.getSocialPaySum()) ? new BigDecimal("0") : new BigDecimal(v.getSocialPaySum()); + BigDecimal fundPaySum = StringUtils.isBlank(v.getFundPaySum()) ? new BigDecimal("0") : new BigDecimal(v.getFundPaySum()); + BigDecimal otherPaySum = StringUtils.isBlank(v.getOtherPaySum()) ? new BigDecimal("0") : new BigDecimal(v.getOtherPaySum()); + v.setIndex(k); + BigDecimal sum = socialPaySum.add(fundPaySum).add(otherPaySum); + v.setSum(sum.toPlainString()); + viewDTOS.add(v); + }); + //合计 + InsuranceAccountViewListDTO insuranceAccountViewListDTO = new InsuranceAccountViewListDTO(); + int socialNum = 0; + int fundNum = 0; + int otherNum = 0; + BigDecimal socialSum = new BigDecimal("0"); + BigDecimal fundSum = new BigDecimal("0"); + BigDecimal otherSum = new BigDecimal("0"); + BigDecimal sum = new BigDecimal("0"); + for (InsuranceAccountViewListDTO item : viewDTOS) { + if (item.getSocialNum() != null) { + socialNum += item.getSocialNum(); + } + if (item.getFundNum() != null) { + fundNum += item.getFundNum(); + } + if (item.getOtherNum() != null) { + otherNum += item.getOtherNum(); + } + if (StringUtils.isNotBlank(item.getSocialPaySum())) { + socialSum = socialSum.add(new BigDecimal(item.getSocialPaySum())); + } + if (StringUtils.isNotBlank(item.getFundPaySum())) { + fundSum = fundSum.add(new BigDecimal(item.getFundPaySum())); + } + if (StringUtils.isNotBlank(item.getOtherPaySum())) { + otherSum = otherSum.add(new BigDecimal(item.getOtherPaySum())); + } + if (StringUtils.isNotBlank(item.getSum())) { + sum = sum.add(new BigDecimal(item.getSum())); + } + } + insuranceAccountViewListDTO.setSum(sum.toPlainString()); + insuranceAccountViewListDTO.setSocialPaySum(socialSum.toPlainString()); + insuranceAccountViewListDTO.setPayOrg(SalaryI18nUtil.getI18nLabel(0, "合计")); + insuranceAccountViewListDTO.setFundPaySum(fundSum.toPlainString()); + insuranceAccountViewListDTO.setOtherPaySum(otherSum.toPlainString()); + insuranceAccountViewListDTO.setSocialNum(socialNum); + insuranceAccountViewListDTO.setFundNum(fundNum); + insuranceAccountViewListDTO.setOtherNum(otherNum); + viewDTOS.add(insuranceAccountViewListDTO); + viewDTOS.forEach(e -> { + e.setSocialPaySum(StringUtils.isBlank(e.getSocialPaySum()) ? "0" : e.getSocialPaySum()); + e.setSocialNum(e.getSocialNum() == null ? 0 : e.getSocialNum()); + e.setFundNum(e.getFundNum() == null ? 0 : e.getFundNum()); + e.setFundPaySum(StringUtils.isBlank(e.getFundPaySum()) ? "0" : e.getFundPaySum()); + e.setOtherPaySum(StringUtils.isBlank(e.getOtherPaySum()) ? "0" : e.getOtherPaySum()); + e.setOtherNum(e.getOtherNum() == null ? 0 : e.getOtherNum()); + e.setSum(SalaryEntityUtil.thousandthConvert(e.getSum())); + e.setSocialPaySum(SalaryEntityUtil.thousandthConvert(e.getSocialPaySum())); + e.setOtherPaySum(SalaryEntityUtil.thousandthConvert(e.getOtherPaySum())); + e.setFundPaySum(SalaryEntityUtil.thousandthConvert(e.getFundPaySum())); + }); + return viewDTOS; + } + + public void accountOtherView(InsuranceAccountViewListDTO dto, List pos) { + int otherNum = 0; + BigDecimal otherPaySum = new BigDecimal("0"); + for (InsuranceAccountDetailPO item : pos) { + if (StringUtils.isNotBlank(item.getOtherSum()) && SalaryEntityUtil.string2DoubleDefault0(item.getOtherSum()) != 0.0) { + if (!PaymentStatusEnum.BALANCE.getValue().equals(item.getPaymentStatus())) { + otherNum += 1; + } + otherPaySum = otherPaySum.add(new BigDecimal(item.getOtherSum())); + } + } + dto.setOtherNum(otherNum); + dto.setOtherPaySum(otherPaySum.toPlainString()); + } + + public void accountFundView(InsuranceAccountViewListDTO dto, List pos) { + int fundNum = 0; + BigDecimal fundPaySum = new BigDecimal("0"); + for (InsuranceAccountDetailPO item : pos) { + if (StringUtils.isNotBlank(item.getFundSum()) && SalaryEntityUtil.string2DoubleDefault0(item.getFundSum()) != 0.0) { + if (!PaymentStatusEnum.BALANCE.getValue().equals(item.getPaymentStatus())) { + fundNum += 1; + } + fundPaySum = fundPaySum.add(new BigDecimal(item.getFundSum())); + } + } + dto.setFundNum(fundNum); + dto.setFundPaySum(fundPaySum.toPlainString()); + } + + public void accountSocialView(InsuranceAccountViewListDTO dto, List pos) { + int socialNum = 0; + BigDecimal socialPaySum = new BigDecimal("0"); + for (InsuranceAccountDetailPO item : pos) { + if (StringUtils.isNotBlank(item.getSocialSum()) && SalaryEntityUtil.string2DoubleDefault0(item.getSocialSum()) != 0.0 ) { + if (!PaymentStatusEnum.BALANCE.getValue().equals(item.getPaymentStatus())) { + socialNum += 1; + } + socialPaySum = socialPaySum.add(new BigDecimal(item.getSocialSum())); + } + } + dto.setSocialNum(socialNum); + dto.setSocialPaySum(socialPaySum.toPlainString()); + } + + /** + * 查询台账id是否已经薪资核算核算过 + * + * @param param + * @return + */ + public int checkIfBusinessAccounting(InsuranceAccountBatchPO param) { + List list = getSIAccountUtilMapper().checkIfBusinessaccounting(param.getId()); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); + return (int) list.stream().filter( f -> { + String billMonthBySob = sdf.format(convertSalaryMonthToBillMonth(f.getSalaryMonth(), f.getSocialSecurityCycleType())); + return f.getBillmonth().equals(billMonthBySob.substring(0, 7)); + }).count(); + } + + public Date convertSalaryMonthToBillMonth(Date salaryMonth, Integer socialSecurityCycleType) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(salaryMonth); + calendar.add(Calendar.MONTH, socialSecurityCycleType - 3); + return calendar.getTime(); + } + + /** + * 更新薪资台账 + * + * @param param + * @return + */ + public void updateById(InsuranceAccountBatchPO param) { + getInsuranceAccountBatchMapper().updateById(param); + } + + /** + * 更新福利台账 + */ + public void updateByEmployeeIdAndBillMonth(InsuranceAccountDetailPO insuranceAccountDetailPO) { + getInsuranceAccountDetailMapper().updateByEmployeeIdAndBillMonth(insuranceAccountDetailPO); + } + + /*****以上代码为SIAccountBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ + } diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index ac3ec8488..93c929e46 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIAccountBiz; import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; @@ -68,7 +67,7 @@ public class SIExportServiceImpl extends Service implements SIExportService { private EncryptUtil encryptUtil = new EncryptUtil(); - private SIAccountBiz siAccountBiz = new SIAccountBiz(); +// private SIAccountBiz siAccountBiz = new SIAccountBiz(); private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); @@ -117,7 +116,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { List paymentList =getTaxAgentMapper().listAll(); SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(100341, "该租户无扣缴义务人")); Map paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgentPO::getId, Function.identity())); - List insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap); +// List insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap); + List insuranceAccountViewListDTOS = getSIAccountService(user).buildRecords(insuranceAccountDetailPOS, paymentMap); List> excelSheetData = new ArrayList<>(); // 1.工作簿名称 diff --git a/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java index 7d1b8f757..646024f3d 100644 --- a/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java +++ b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java @@ -77,7 +77,6 @@ public class AutoSiAccountAndFileJob extends BaseCronJob { user.setLastname("sysadmin"); Calendar accountTime= Calendar.getInstance(); -// prevMonth.setTimeInMillis(System.currentTimeMillis()); accountTime.set(Calendar.MONTH, accountTime.get(Calendar.MONTH) + Integer.parseInt(diffToCurrentMonth)); SimpleDateFormat s=new SimpleDateFormat("yyyy-MM"); diff --git a/src/com/engine/salary/web/SIExportController.java b/src/com/engine/salary/web/SIExportController.java index a37cd05c8..f3636c8dd 100644 --- a/src/com/engine/salary/web/SIExportController.java +++ b/src/com/engine/salary/web/SIExportController.java @@ -2,7 +2,6 @@ package com.engine.salary.web; import cn.hutool.core.util.BooleanUtil; import com.engine.common.util.ServiceUtil; -import com.engine.salary.biz.SIAccountBiz; import com.engine.salary.entity.siaccount.param.InspectAccountParam; import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; @@ -85,8 +84,9 @@ public class SIExportController { @QueryParam("ids")List ids,@QueryParam("billMonth") String billMonth) { InspectAccountParam param = InspectAccountParam.builder().ids(ids).billMonth(billMonth).build(); User user = HrmUserVarify.getUser(request, response); - SIAccountBiz siAccountBiz = new SIAccountBiz(); - List insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth()); +// SIAccountBiz siAccountBiz = new SIAccountBiz(); +// List insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth()); + List insuranceAccountInspectPOS = getService(user).allInspects(param.getIds(), param.getBillMonth()); InsuranceArchivesListParam req = new InsuranceArchivesListParam(); req.setEmployeeIds(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getEmployeeId).distinct().collect(Collectors.toList())); XSSFWorkbook workbook = getSIExportWrapper(user).export(req); @@ -236,12 +236,13 @@ public class SIExportController { @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response exportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response) { InsuranceArchivesListParam param = buildParam(request); - SIAccountBiz siAccountBiz = new SIAccountBiz(); + User user = HrmUserVarify.getUser(request, response); +// SIAccountBiz siAccountBiz = new SIAccountBiz(); if (param.getInspectAll() != null && param.getInspectAll()) { - List insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth()); +// List insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth()); + List insuranceAccountInspectPOS = getService(user).allInspects(param.getIds(), param.getBillMonth()); param.setEmployeeIds(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getEmployeeId).distinct().collect(Collectors.toList())); } - User user = HrmUserVarify.getUser(request, response); XSSFWorkbook workbook = getSIImportWrapper(user).exportTemplate(param); String time = LocalDate.now().toString(); String fileName = ""; From e8aee9ab64e1fa81304c38353a20fbe7ceca94a4 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 19 Jan 2024 17:32:52 +0800 Subject: [PATCH 050/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E7=BC=BA=E5=A4=B1=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E9=A1=B9=E6=95=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 103 +++++++++++++++---- 1 file changed, 85 insertions(+), 18 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 4f62417c6..ff5fe4727 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -1,5 +1,6 @@ package com.engine.salary.biz; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; @@ -69,6 +70,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_AUTO_ADJUST; import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_DIFF_BY_PER_AND_COM; @@ -279,15 +281,19 @@ public class SIArchivesBiz { //判断是否要区分个人和单位福利基数 SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + //判断是否要自动调整基数 + SalarySysConfPO welBaseAutoAdjust = getSalarySysConfService(user).getOneByCode(WEL_BASE_AUTO_ADJUST); + boolean welBaseAutoAdjustSign = welBaseAutoAdjust != null && welBaseAutoAdjust.getConfValue().equals(OpenEnum.OPEN.getValue()); + switch (welfareType) { case SOCIAL_SECURITY: - data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); + data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); break; case ACCUMULATION_FUND: - data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); + data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); break; case OTHER: - data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign); + data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); break; default: } @@ -302,19 +308,30 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { + public Map buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { Map dataMap = new HashMap<>(); InsuranceArchivesOtherSchemeDTO data = buildOtherForm(employeeId, operateId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); if (data != null) { - dataMap.put("data", JSONObject.parseObject(data.getOtherPaymentBaseString(), new TypeReference>() { - })); + insuranceValueMap = StrUtil.isNotBlank(data.getOtherPaymentBaseString()) + ? JSONObject.parseObject(data.getOtherPaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); if (welBaseDiffSign) { - dataMap.put("comData", JSONObject.parseObject(data.getOtherPaymentComBaseString(), new TypeReference>() { - })); + insuranceComValueMap = StrUtil.isNotBlank(data.getOtherPaymentComBaseString()) + ? JSONObject.parseObject(data.getOtherPaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); } } List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); addGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputItems)); dataMap.put("items", addGroups); if (welBaseDiffSign) { @@ -322,6 +339,15 @@ public class SIArchivesBiz { List inputComItems = buildPaymentComBase(user, schemeId, welfareType); addComGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputComItems)); dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); } return dataMap; } @@ -334,20 +360,32 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { + public Map buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { Map dataMap = new HashMap<>(); InsuranceArchivesFundSchemeDTO data = buildFundForm(employeeId, operateId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); if (data != null) { - dataMap.put("data", JSONObject.parseObject(data.getFundPaymentBaseString(), new TypeReference>() { - })); + insuranceValueMap = StrUtil.isNotBlank(data.getFundPaymentBaseString()) + ? JSONObject.parseObject(data.getFundPaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); if (welBaseDiffSign) { - dataMap.put("comData", JSONObject.parseObject(data.getFundPaymentComBaseString(), new TypeReference>() { - })); + insuranceComValueMap = StrUtil.isNotBlank(data.getFundPaymentComBaseString()) + ? JSONObject.parseObject(data.getFundPaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); } } + List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); addGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputItems)); dataMap.put("items", addGroups); if (welBaseDiffSign) { @@ -355,6 +393,15 @@ public class SIArchivesBiz { List inputComItems = buildPaymentComBase(user, schemeId, welfareType); addComGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputComItems)); dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); } return dataMap; } @@ -367,20 +414,31 @@ public class SIArchivesBiz { * @param operateId * @return */ - public Map buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) { + public Map buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { Map dataMap = new HashMap<>(); InsuranceArchivesSocialSchemeDTO data = buildSocialForm(employeeId, operateId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); if (data != null) { - dataMap.put("data", JSONObject.parseObject(data.getSchemePaymentBaseString(), new TypeReference>() { - })); + insuranceValueMap = StrUtil.isNotBlank(data.getSchemePaymentBaseString()) + ? JSONObject.parseObject(data.getSchemePaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); if (welBaseDiffSign) { - dataMap.put("comData", JSONObject.parseObject(data.getSchemePaymentComBaseString(), new TypeReference>() { - })); + insuranceComValueMap = StrUtil.isNotBlank(data.getSchemePaymentComBaseString()) + ? JSONObject.parseObject(data.getSchemePaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); } } List addGroups = new ArrayList<>(); List inputItems = buildPaymentBase(user, schemeId, welfareType); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); addGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputItems)); dataMap.put("items", addGroups); if (welBaseDiffSign) { @@ -388,6 +446,15 @@ public class SIArchivesBiz { List inputComItems = buildPaymentComBase(user, schemeId, welfareType); addComGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputComItems)); dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); } return dataMap; From d09034b17b3f6301c3662ec1562e6986a1308d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 22 Jan 2024 10:38:18 +0800 Subject: [PATCH 051/169] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/bo/SalaryStatisticsReportBO.java | 27 ++++++++ .../entity/po/SalaryStatisticsItemPO.java | 38 +++++----- .../SalaryStatisticsReportServiceImpl.java | 69 ++++--------------- 3 files changed, 59 insertions(+), 75 deletions(-) diff --git a/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java b/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java index 10e42f83a..2f6986f7a 100644 --- a/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java +++ b/src/com/engine/salary/report/entity/bo/SalaryStatisticsReportBO.java @@ -1,5 +1,6 @@ package com.engine.salary.report.entity.bo; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; @@ -932,6 +933,16 @@ public class SalaryStatisticsReportBO { return sumDecimal; } + private static String handle4GroupValue(String dimCode, SalaryAcctEmployeePO sa, Map> salaryAcctResultValueMap, SalaryStatisticsItemPO item) { + if (salaryAcctResultValueMap.get(sa.getId()) != null) { + String value = salaryAcctResultValueMap.get(sa.getId()).get(dimCode); + if (StringUtils.isNotBlank(value)) { + return value; + } + } + return ""; + } + /** * 定量-单项式分组list分割 * @@ -960,6 +971,22 @@ public class SalaryStatisticsReportBO { return list.stream().filter(i -> ids.contains(i.getId())).collect(Collectors.toList()); } + public static List listAcctEmpByRationGroupIndividual(String groupIndividual, String dimCode, List list, Map yearMap, Map> salaryAcctResultValueMap, List salaryStatisticsItemList) { + Set ids = Sets.newHashSet(); + + for (SalaryAcctEmployeePO sa : list) { + salaryStatisticsItemList.forEach(item -> { + String value = handle4GroupValue(dimCode, sa, salaryAcctResultValueMap, item); + + if (StrUtil.equals(groupIndividual, value)) { + ids.add(sa.getId()); + } + }); + } + + return list.stream().filter(i -> ids.contains(i.getId())).collect(Collectors.toList()); + } + public static Map checkLoad(List salaryStatisticsItemList) { boolean isNow = false; boolean isLast = false; diff --git a/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java b/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java index bcf430d57..e87d1b282 100644 --- a/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java +++ b/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java @@ -12,22 +12,22 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor @ToString -//hrsa_salary_statistics_item") -//薪酬报表统计子表自定义统计项") +//hrsa_salary_statistics_item +//薪酬报表统计子表自定义统计项 public class SalaryStatisticsItemPO implements Serializable { private static final long serialVersionUID = 5335849418826222822L; - //主键id") + //主键id private Long id; - //统计报表id") + //统计报表id private Long statReportId; - //统计项名称") + //统计项名称 private String itemName; - //统计项集合") + //统计项集合 private String itemValue; /** @@ -43,7 +43,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //计数规则") + //计数规则 private String countRule; /** @@ -59,7 +59,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //求和规则") + //求和规则 private String sumRule; /** @@ -75,7 +75,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //平均值规则") + //平均值规则 private String avgRule; /** @@ -91,7 +91,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //最大值规则") + //最大值规则 private String maxRule; /** @@ -107,7 +107,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //最小值规则") + //最小值规则 private String minRule; /** @@ -123,7 +123,7 @@ public class SalaryStatisticsItemPO implements Serializable { * } * jsonToString */ - //中位数规则") + //中位数规则 private String medianRule; @@ -161,7 +161,7 @@ public class SalaryStatisticsItemPO implements Serializable { */ private String tileRule; - //顺序") + //顺序 private Integer indexValue; /** @@ -169,22 +169,22 @@ public class SalaryStatisticsItemPO implements Serializable { * * @see UnitTypeEnum */ - //统计单位") + //统计单位 private Integer unitType; - //创建时间") + //创建时间 private Date createTime; - //更新时间") + //更新时间 private Date updateTime; - //创建人") + //创建人 private Long creator; - //是否删除") + //是否删除 private Integer deleteType; - //租户key") + //租户key private String tenantKey; private Collection ids; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 65a672424..19290c385 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -637,7 +637,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary case SalaryStatisticsDimensionConstant.DM_COMPANY_YEAR: return buildCompanyYearRecords(data, salaryAcctResultValueMap); default: - return buildSalaryItemRecords(data, dimension.getDimCode(), salaryAcctResultValueMap); + return buildSalaryItemRecords(dimension, data, salaryAcctResultValueMap); } // 定量-组距式分组 } else if (SalaryStatisticsDimensionTypeEnum.RATION_GROUP_SPACING.getValue().equals(dimension.getDimType())) { @@ -1920,80 +1920,37 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary return result; } - private PageInfo> buildSalaryItemRecords(SalaryStatisticsReportDataDTO data, String dimCode, Map> salaryAcctResultValueMap) { + private PageInfo> buildSalaryItemRecords(SalaryStatisticsDimensionPO dimension, SalaryStatisticsReportDataDTO data, Map> salaryAcctResultValueMap) { - //查询薪资项目存在的种类 - Set itemValues = new HashSet<>(); + //查询薪资项目存在的种类(维度) + Set dimensionSet = new HashSet<>(); for (Long k : salaryAcctResultValueMap.keySet()) { Map map = salaryAcctResultValueMap.get(k); - itemValues.add(map.getOrDefault(dimCode, "")); + dimensionSet.add(map.getOrDefault(dimension.getDimCode(), "未分组")); } - PageInfo> result = new PageInfo<>(); List> records = new ArrayList<>(); - Map> simpleUserInfoMap = getSimpleUserInfoList(data); - if (simpleUserInfoMap.isEmpty()) { - return result; - } - - Set companyYearSet = new HashSet<>(); - - Map empIdCompanyYearMap = new HashMap<>(); - Map lastEmpIdCompanyYearMap = new HashMap<>(); - Map sameEmpIdCompanyYearMap = new HashMap<>(); - simpleUserInfoMap.get(NOW_INFO).forEach(employee -> { - if (employee.getCompanyWorkYear() != null) { - companyYearSet.add(Util.null2String(employee.getCompanyWorkYear())); - empIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); - } - }); - simpleUserInfoMap.get(LAST_INFO).forEach(employee -> { - if (employee.getCompanyWorkYear() != null) { - lastEmpIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); - } - }); - simpleUserInfoMap.get(SAME_INFO).forEach(employee -> { - if (employee.getCompanyWorkYear() != null) { - sameEmpIdCompanyYearMap.put(employee.getEmployeeId(), Util.null2String(employee.getCompanyWorkYear())); - } - }); - - List companyYears = Lists.newArrayList(companyYearSet); - companyYears = companyYears.stream().sorted().collect(Collectors.toList()); + Map empIdYearMap = new HashMap<>(); + Map lastEmpIdYearMap = new HashMap<>(); + Map sameEmpIdYearMap = new HashMap<>(); String dimensionValue = data.getDimensionValue(); - companyYears.forEach(k -> { + dimensionSet.forEach(k -> { if (dimensionValue == null) { - List salaryAcctEmployees = data.getList().stream().filter(po -> Objects.equals(empIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); - List lastSalaryAcctEmployees = data.getLastList().stream().filter(po -> Objects.equals(lastEmpIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); - List sameSalaryAcctEmployees = data.getSameList().stream().filter(po -> Objects.equals(sameEmpIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + List salaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getList(), empIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); + List lastSalaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getLastList(), lastEmpIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); + List sameSalaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getSameList(), sameEmpIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); Map temp = new HashMap<>(); temp.put(DM, k); temp.putAll(SalaryStatisticsReportBO.calculateItem(salaryAcctEmployees, lastSalaryAcctEmployees, sameSalaryAcctEmployees, salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); records.add(temp); } else if (StringUtils.equals(dimensionValue, k)) { - List salaryAcctEmployees = data.getList().stream().filter(po -> Objects.equals(empIdCompanyYearMap.get(po.getEmployeeId()), k)).collect(Collectors.toList()); + List salaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getList(), empIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); data.setListByDimensionValue(salaryAcctEmployees); } }); - - if (dimensionValue == null) { - List noGroupingList = data.getList().stream().filter(po -> empIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); - List lastNoGroupingList = data.getLastList().stream().filter(po -> lastEmpIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); - List sameNoGroupingList = data.getSameList().stream().filter(po -> sameEmpIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(noGroupingList)) { - Map noGrouping = new HashMap<>(); - noGrouping.put(DM, SalaryI18nUtil.getI18nLabel(153462, "无分组")); - noGrouping.putAll(SalaryStatisticsReportBO.calculateItem(noGroupingList, lastNoGroupingList, sameNoGroupingList, salaryAcctResultValueMap, data.getSalaryStatisticsItemList())); - records.add(noGrouping); - } - } else if (StringUtils.equals(dimensionValue, "无分组")) { - List noGroupingList = data.getList().stream().filter(po -> empIdCompanyYearMap.get(po.getEmployeeId()) == null).collect(Collectors.toList()); - data.setListByDimensionValue(noGroupingList); - } - result.setList(records); return result; } From 5d3a371f56b80f872a6efc4190971682cdf372f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 22 Jan 2024 11:45:40 +0800 Subject: [PATCH 052/169] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SalaryStatisticsReportServiceImpl.java | 6 +++--- 1 file changed, 3 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 19290c385..9f1b4e245 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -398,7 +398,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Map> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId); Map> map = new HashMap<>(); salaryAcctEmpResultMap.forEach((k, v) -> { - Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2o(p.getResultValue()), (key1, key2) -> key2)); + Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2)); map.put(k, collect); }); @@ -444,7 +444,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary List finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds); Map> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId); salaryAcctEmpResultMap.forEach((k, v) -> { - Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2o(p.getResultValue()), (key1, key2) -> key2)); + Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2)); resultMap.put(k, collect); }); salaryAcctEmployeeIds.stream().forEach(id -> { @@ -1926,7 +1926,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Set dimensionSet = new HashSet<>(); for (Long k : salaryAcctResultValueMap.keySet()) { Map map = salaryAcctResultValueMap.get(k); - dimensionSet.add(map.getOrDefault(dimension.getDimCode(), "未分组")); + dimensionSet.add(map.getOrDefault(dimension.getDimCode(), "")); } PageInfo> result = new PageInfo<>(); From 6ee8b5f044f711ff75eb92c48c4171810cb460d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 22 Jan 2024 15:41:38 +0800 Subject: [PATCH 053/169] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E4=B8=8D=E6=8D=A2=E8=A1=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/entity/salaryBill/bo/SalaryBillBO.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 6075a27f7..8f016b34f 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -368,7 +368,8 @@ public class SalaryBillBO { return; } - content = content.replace("{薪资所属月}", SalaryDateUtil.getFormatYearMonth(salaryBillSendParam.getSalaryDate())); + content = content.replace("\n", "\r\n") + .replace("{薪资所属月}", SalaryDateUtil.getFormatYearMonth(salaryBillSendParam.getSalaryDate())); for (SalaryTemplateSalaryItemListDTO item : salaryBillSendParam.getEmployeeInformation().getItems()) { content = content.replace("{" + item.getName() + "}", item.getSalaryItemValue()); @@ -644,7 +645,7 @@ public class SalaryBillBO { boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) - && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString()))==0); + && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); if (!isHide) { // 4.2.薪资项目 emailContent.append(""); @@ -724,7 +725,7 @@ public class SalaryBillBO { boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) - && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString()))==0); + && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); if (!isHide) { // 4.2.薪资项目 emailContent.append(""); From a3e281b3fe2fe929448b21ed4949f24709268efd Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 23 Jan 2024 10:00:26 +0800 Subject: [PATCH 054/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BA=BA=E5=91=98=E6=90=9C=E7=B4=A2=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/TaxAgentManageRangeServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index 6e19d15a5..2c1a38017 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -566,6 +566,9 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM } List taxAgentExtRangePOS = getTaxAgentExtRangeMapper().list(TaxAgentExtRangePO.builder().taxAgentId(param.getTaxAgentId()).build()); + if(StringUtils.isNotBlank(param.getTargetName())) { + taxAgentExtRangePOS = taxAgentExtRangePOS.stream().filter(po -> po.getTargetName().contains(param.getTargetName())).collect(Collectors.toList()); + } return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), taxAgentExtRangePOS, TaxAgentExtRangePO.class); } From 94d72cd93c646a5ea80b211cb34ec95a5f7b1e96 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 23 Jan 2024 10:52:53 +0800 Subject: [PATCH 055/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryTemplateCopyParam.java | 2 + .../impl/SalaryTemplateServiceImpl.java | 56 ++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateCopyParam.java b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateCopyParam.java index bf0e24f1e..53fb50eaf 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateCopyParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateCopyParam.java @@ -23,6 +23,8 @@ public class SalaryTemplateCopyParam { // 模板名称") private String name; + private Long salarySobId; + public static void checkParam(SalaryTemplateCopyParam copyParam) { if (copyParam.getId() == null) { throw new SalaryRunTimeException("id必选"); diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index 591261abb..cf325731f 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -2,6 +2,7 @@ package com.engine.salary.service.impl; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySobBiz; @@ -16,15 +17,17 @@ import com.engine.salary.entity.salaryBill.param.SalaryTemplateQueryParam; import com.engine.salary.entity.salaryBill.param.SalaryTemplateSaveParam; import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO; import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO; +import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO; -import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; -import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.enums.salarybill.SalaryTemplateWhetherEnum; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.salarysob.SalarySobEmpFieldMapper; import com.engine.salary.service.*; import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.mzlion.core.utils.BeanUtils; @@ -68,6 +71,14 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate return ServiceUtil.getService(SalaryBillItemNameServiceImpl.class, user); } + private SalarySobEmpFieldService getSalarySobEmpFieldService(User user) { + return (SalarySobEmpFieldService) ServiceUtil.getService(SalarySobEmpFieldServiceImpl.class, user); + } + + private SalarySobEmpFieldMapper getSalarySobEmpFieldMapper() { + return MapperProxyFactory.getProxy(SalarySobEmpFieldMapper.class); + } + @Override public SalaryTemplatePO getById(Long id) { return mapper.getById(id); @@ -272,6 +283,47 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate salaryTemplateNew.setId(null); salaryTemplateNew.setName(copyParam.getName()); salaryTemplateNew.setUseType(SalaryTemplateWhetherEnum.FALSE.getValue()); + + //20240122逻辑变更,拷贝工资单模板时,可变更薪资账套 + if (copyParam.getSalarySobId() != null && !copyParam.getSalarySobId().equals(salaryTemplate.getSalarySobId())) { + // 查询薪资账套的员工信息字段 + List salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(copyParam.getSalarySobId()); + List empFieldCodeList = salarySobEmpFieldPOS.stream().map(SalarySobEmpFieldPO::getFieldCode).collect(Collectors.toList()); + Map empFieldCodeWithIdMap = SalaryEntityUtil.convert2Map(salarySobEmpFieldPOS, SalarySobEmpFieldPO::getFieldCode, SalarySobEmpFieldPO::getId); + // 查询薪资账套的薪资项目副本 + List salarySobItemPOS = getSalarySobItemService(user).listBySalarySobIdWithHideItem(copyParam.getSalarySobId()); + List salaryItemIdList = salarySobItemPOS.stream().map(SalarySobItemPO::getSalaryItemId).collect(Collectors.toList()); + //拷贝数据中的薪资项目 + List salaryItemSettingList = JSONArray.parseArray(salaryTemplate.getSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class); + for (SalaryTemplateSalaryItemSetListDTO salaryItemSetting : salaryItemSettingList) { + if ("111111111111111111".equals(salaryItemSetting.getGroupId()) && salaryItemSetting.getItems() != null) { + List newItems = new ArrayList<>(); + for (SalaryTemplateSalaryItemListDTO templateItem : salaryItemSetting.getItems()) { + SalarySobEmpFieldPO empFieldPO = getSalarySobEmpFieldMapper().getById(Long.valueOf(templateItem.getSalaryItemId())); + if (empFieldCodeList.contains(empFieldPO.getFieldCode()) && empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()) != null) { + templateItem.setId(empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()).toString()); + templateItem.setSalaryItemId(empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()).toString()); + newItems.add(templateItem); + } + } + salaryItemSetting.setItems(newItems); + } else { + List newItems = new ArrayList<>(); + for (SalaryTemplateSalaryItemListDTO templateItem : salaryItemSetting.getItems()) { + SalarySobEmpFieldPO empFieldPO = getSalarySobEmpFieldMapper().getById(Long.valueOf(templateItem.getSalaryItemId())); + if (empFieldCodeList.contains(empFieldPO.getFieldCode()) && empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()) != null) { + templateItem.setId(empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()).toString()); + templateItem.setSalaryItemId(empFieldCodeWithIdMap.get(empFieldPO.getFieldCode()).toString()); + newItems.add(templateItem); + } + } + salaryItemSetting.setItems(newItems); + } + } + List replenishSalaryItemSettingList = JSONArray.parseArray(salaryTemplate.getReplenishSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class); + + } + mapper.insert(salaryTemplateNew); // 复制工资单自定义名称信息 From 2d24fbfa231e1ed88f52de05ceb40f7c73f9d7b9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 23 Jan 2024 11:34:36 +0800 Subject: [PATCH 056/169] =?UTF-8?q?=E5=9B=9E=E7=AE=97=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=90=8E=E4=B8=8D=E8=83=BD=E5=86=8D?= =?UTF-8?q?=E6=AC=A1=E5=9B=9E=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/salaryacct/bo/SalaryAcctRecordBO.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java index 53eb473b6..e0fad94bd 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctRecordBO.java @@ -73,7 +73,9 @@ public class SalaryAcctRecordBO { } else if (SalaryAcctRecordStatusEnum.ARCHIVED == salaryAcctRecordStatusEnum && ( salarySendMap.get(salaryAcctRecordPO.getId()) ==Boolean.TRUE ) ){ btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); - btnList.add(new WeaTableOperate("回算", null, "5")); + if(salaryAcctRecordPO.getBackCalcStatus() == null || salaryAcctRecordPO.getBackCalcStatus() == NumberUtils.INTEGER_ZERO) { + btnList.add(new WeaTableOperate("回算", null, "5")); + } } else { btnList.add(new WeaTableOperate("查看", null, "3")); btnList.add(new WeaTableOperate("重新核算", null, "4")); From 2a67ca9238c65bb721f5c4abfcb1645c90994d92 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 23 Jan 2024 13:55:49 +0800 Subject: [PATCH 057/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=E6=94=B9=E9=80=A02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryTemplateServiceImpl.java | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index cf325731f..c778138ad 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -294,7 +295,8 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate List salarySobItemPOS = getSalarySobItemService(user).listBySalarySobIdWithHideItem(copyParam.getSalarySobId()); List salaryItemIdList = salarySobItemPOS.stream().map(SalarySobItemPO::getSalaryItemId).collect(Collectors.toList()); //拷贝数据中的薪资项目 - List salaryItemSettingList = JSONArray.parseArray(salaryTemplate.getSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class); + List salaryItemSettingList = StrUtil.isNotBlank(salaryTemplate.getSalaryItemSetting()) + ? JSONArray.parseArray(salaryTemplate.getSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class) : new ArrayList<>(); for (SalaryTemplateSalaryItemSetListDTO salaryItemSetting : salaryItemSettingList) { if ("111111111111111111".equals(salaryItemSetting.getGroupId()) && salaryItemSetting.getItems() != null) { List newItems = new ArrayList<>(); @@ -307,7 +309,20 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate } } salaryItemSetting.setItems(newItems); - } else { + } else if (salaryItemSetting.getItems() != null){ + List newItems = new ArrayList<>(); + for (SalaryTemplateSalaryItemListDTO templateItem : salaryItemSetting.getItems()) { + if (salaryItemIdList.contains(Long.valueOf(templateItem.getSalaryItemId()))) { + newItems.add(templateItem); + } + } + salaryItemSetting.setItems(newItems); + } + } + List replenishSalaryItemSettingList = StrUtil.isNotBlank(salaryTemplate.getReplenishSalaryItemSetting()) + ? JSONArray.parseArray(salaryTemplate.getReplenishSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class): new ArrayList<>(); + for (SalaryTemplateSalaryItemSetListDTO salaryItemSetting : replenishSalaryItemSettingList) { + if ("111111111111111111".equals(salaryItemSetting.getGroupId()) && salaryItemSetting.getItems() != null) { List newItems = new ArrayList<>(); for (SalaryTemplateSalaryItemListDTO templateItem : salaryItemSetting.getItems()) { SalarySobEmpFieldPO empFieldPO = getSalarySobEmpFieldMapper().getById(Long.valueOf(templateItem.getSalaryItemId())); @@ -318,10 +333,19 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate } } salaryItemSetting.setItems(newItems); + } else if (!"333333333333333333".equals(salaryItemSetting.getGroupId()) && salaryItemSetting.getItems() != null){ + List newItems = new ArrayList<>(); + for (SalaryTemplateSalaryItemListDTO templateItem : salaryItemSetting.getItems()) { + if (salaryItemIdList.contains(Long.valueOf(templateItem.getSalaryItemId()))) { + newItems.add(templateItem); + } + } + salaryItemSetting.setItems(newItems); } } - List replenishSalaryItemSettingList = JSONArray.parseArray(salaryTemplate.getReplenishSalaryItemSetting(), SalaryTemplateSalaryItemSetListDTO.class); - + salaryTemplateNew.setSalaryItemSetting(salaryItemSettingList.size() > 0 ? JSONUtil.toJsonStr(salaryItemSettingList) : ""); + salaryTemplateNew.setReplenishSalaryItemSetting(replenishSalaryItemSettingList.size() > 0 ? JSONUtil.toJsonStr(replenishSalaryItemSettingList) : ""); + salaryTemplateNew.setSalarySobId(copyParam.getSalarySobId()); } mapper.insert(salaryTemplateNew); From 887ec2084a32aec3dfdfd2ef5bcd1c9c92efb3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 23 Jan 2024 14:06:56 +0800 Subject: [PATCH 058/169] =?UTF-8?q?=E5=AF=BC=E5=87=BAexcel=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/util/excel/ExcelUtil.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/com/engine/salary/util/excel/ExcelUtil.java b/src/com/engine/salary/util/excel/ExcelUtil.java index 877714295..2a482e42d 100644 --- a/src/com/engine/salary/util/excel/ExcelUtil.java +++ b/src/com/engine/salary/util/excel/ExcelUtil.java @@ -1,7 +1,9 @@ package com.engine.salary.util.excel; +import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.FillPatternType; @@ -10,7 +12,12 @@ import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.usermodel.*; import java.awt.*; +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -69,6 +76,41 @@ public class ExcelUtil { return workbook; } + public static XSSFWorkbook genWorkbook(String sheetName, List rowList) { + List headerList = Lists.newArrayList(); + List dataIndexList = Lists.newArrayList(); + // 解析表头 + ExcelUtil.parseHeader(TaxDeclarationLaborListDTO.class, headerList, dataIndexList); + + List> rows = new ArrayList<>(); + rows.add(headerList); + for (int i = 0; i < rowList.size(); i++) { + List row = Lists.newArrayListWithExpectedSize(dataIndexList.size()); + for (int j = 0; j < dataIndexList.size(); j++) { + Object value = getValue(rowList.get(i), dataIndexList.get(j)); + row.add(value); + } + rows.add(row); + } + return genWorkbookV2(rows, sheetName); + } + + private static Object getValue(T t, String fieldName) { + Object value = null; + try { + BeanInfo beanInfo = Introspector.getBeanInfo(t.getClass()); + PropertyDescriptor[] props = beanInfo.getPropertyDescriptors(); + for (PropertyDescriptor property : props) { + if (fieldName.equals(property.getName())) { + Method method = property.getReadMethod(); + value = method.invoke(t, new Object[]{}); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return value; + } public static XSSFWorkbook genWorkbookV2(List> rowList, String sheetName) { XSSFWorkbook workbook = new XSSFWorkbook(); From 60e792d4813f69bac11a4b523584b5d8e7c8078a Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 23 Jan 2024 14:46:29 +0800 Subject: [PATCH 059/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=B9=B6=E5=BD=92=E6=A1=A3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/timer/AutoSiAccountAndFileJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java index 646024f3d..47dd04994 100644 --- a/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java +++ b/src/com/engine/salary/timer/AutoSiAccountAndFileJob.java @@ -70,7 +70,7 @@ public class AutoSiAccountAndFileJob extends BaseCronJob { @Override public void execute() { - if (StrUtil.isNotBlank(diffToCurrentMonth) && RegularUtil.isInteger(diffToCurrentMonth)) { + if (StrUtil.isNotBlank(diffToCurrentMonth) && (RegularUtil.isInteger(diffToCurrentMonth) || "0".equals(diffToCurrentMonth))) { User user = new User(); user.setUid(1); user.setLoginid("sysadmin"); From e1ca39e8598591dd1b56728ea8b6acdeffd95e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 23 Jan 2024 15:00:46 +0800 Subject: [PATCH 060/169] =?UTF-8?q?elog=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202401230403.sql | 8 ++++++++ resource/sqlupgrade/GS/sql202401230403.sql | 8 ++++++++ resource/sqlupgrade/JC/sql202401230403.sql | 8 ++++++++ resource/sqlupgrade/Mysql/sql202401230403.sql | 6 ++++++ resource/sqlupgrade/Oracle/sql202401230403.sql | 7 +++++++ resource/sqlupgrade/PG/sql202401230403.sql | 6 ++++++ resource/sqlupgrade/SQLServer/sql202401230403.sql | 7 +++++++ resource/sqlupgrade/ST/sql202401230403.sql | 8 ++++++++ 8 files changed, 58 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202401230403.sql create mode 100644 resource/sqlupgrade/GS/sql202401230403.sql create mode 100644 resource/sqlupgrade/JC/sql202401230403.sql create mode 100644 resource/sqlupgrade/Mysql/sql202401230403.sql create mode 100644 resource/sqlupgrade/Oracle/sql202401230403.sql create mode 100644 resource/sqlupgrade/PG/sql202401230403.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202401230403.sql create mode 100644 resource/sqlupgrade/ST/sql202401230403.sql diff --git a/resource/sqlupgrade/DM/sql202401230403.sql b/resource/sqlupgrade/DM/sql202401230403.sql new file mode 100644 index 000000000..9549b4a38 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202401230403.sql @@ -0,0 +1,8 @@ +CREATE TABLE hrsa_elog_version +( + id NUMBER(38,0) primary key NOT NULL, + mainTable varchar2(255), + version NUMBER(38,0) +); +/ + diff --git a/resource/sqlupgrade/GS/sql202401230403.sql b/resource/sqlupgrade/GS/sql202401230403.sql new file mode 100644 index 000000000..9549b4a38 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202401230403.sql @@ -0,0 +1,8 @@ +CREATE TABLE hrsa_elog_version +( + id NUMBER(38,0) primary key NOT NULL, + mainTable varchar2(255), + version NUMBER(38,0) +); +/ + diff --git a/resource/sqlupgrade/JC/sql202401230403.sql b/resource/sqlupgrade/JC/sql202401230403.sql new file mode 100644 index 000000000..9549b4a38 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202401230403.sql @@ -0,0 +1,8 @@ +CREATE TABLE hrsa_elog_version +( + id NUMBER(38,0) primary key NOT NULL, + mainTable varchar2(255), + version NUMBER(38,0) +); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202401230403.sql b/resource/sqlupgrade/Mysql/sql202401230403.sql new file mode 100644 index 000000000..23e6f1e06 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202401230403.sql @@ -0,0 +1,6 @@ +CREATE TABLE hrsa_elog_version ( + id bigint(0) NOT NULL, + mainTable varchar(255) NULL, + version bigint(0) NULL, + PRIMARY KEY (id) USING BTREE +) ; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202401230403.sql b/resource/sqlupgrade/Oracle/sql202401230403.sql new file mode 100644 index 000000000..e0a34b233 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202401230403.sql @@ -0,0 +1,7 @@ +CREATE TABLE hrsa_elog_version +( + id NUMBER(38,0) primary key NOT NULL, + mainTable varchar2(255), + version NUMBER(38,0) +) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202401230403.sql b/resource/sqlupgrade/PG/sql202401230403.sql new file mode 100644 index 000000000..23b66fe53 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202401230403.sql @@ -0,0 +1,6 @@ +CREATE TABLE hrsa_elog_version ( + id bigint NOT NULL, + version bigint NOT NULL, + mainTable varchar(255), + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202401230403.sql b/resource/sqlupgrade/SQLServer/sql202401230403.sql new file mode 100644 index 000000000..16a1bb858 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202401230403.sql @@ -0,0 +1,7 @@ +create table hrsa_elog_version +( + id bigint primary key , + mainTable varchar(255), + version bigint +) +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202401230403.sql b/resource/sqlupgrade/ST/sql202401230403.sql new file mode 100644 index 000000000..9549b4a38 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202401230403.sql @@ -0,0 +1,8 @@ +CREATE TABLE hrsa_elog_version +( + id NUMBER(38,0) primary key NOT NULL, + mainTable varchar2(255), + version NUMBER(38,0) +); +/ + From 56bb9a5af385258cb23e18f3ca7cf796d30714e6 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 23 Jan 2024 15:08:53 +0800 Subject: [PATCH 061/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E8=AF=A6=E6=83=85=E8=BF=94=E5=9B=9E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A1=86=E5=AF=B9=E5=BA=94=E5=8F=82=E6=95=B0=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index ff5fe4727..be722d87c 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -322,7 +322,7 @@ public class SIArchivesBiz { } } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -376,7 +376,7 @@ public class SIArchivesBiz { } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -429,7 +429,7 @@ public class SIArchivesBiz { } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -466,13 +466,22 @@ public class SIArchivesBiz { * @param schemeId * @return */ - public List buildPaymentBase(User user, Long schemeId, Integer welfareType) { + public List buildPaymentBase(User user, Long schemeId, Integer welfareType, boolean welBaseDiffSign) { List inputItems = new ArrayList<>(); if (schemeId == null) { return new ArrayList<>(); } List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList()); + if (!welBaseDiffSign) { + List perInsuranceIdList = list.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + List moreComList = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue()) && !perInsuranceIdList.contains(f.getInsuranceId())).collect(Collectors.toList()); + if (moreComList.size() > 0) { + list.addAll(moreComList); + } + } + SICategoryBiz siCategoryBiz = new SICategoryBiz(); list.forEach(insuranceSchemeDetail -> { ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); From 71f90882d32d006f84b5524c264495514d84f207 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 23 Jan 2024 16:45:09 +0800 Subject: [PATCH 062/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E5=8C=BA=E5=88=86pc=E5=92=8C=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salaryBill/bo/SalaryTemplateBO.java | 1 + .../salaryBill/dto/SalaryBillAckFeedbackDTO.java | 6 ++++++ .../salaryBill/dto/SalaryTemplateBaseSetDTO.java | 6 ++++++ .../param/SalaryTemplateSaveParam.java | 5 +++++ .../entity/salaryBill/po/SalaryTemplatePO.java | 7 +++++++ .../mapper/salarybill/SalaryTemplateMapper.xml | 16 ++++++++++++++++ .../impl/SalaryBillBaseSetServiceImpl.java | 7 ++++++- .../service/impl/SalarySendServiceImpl.java | 5 +++++ .../service/impl/SalaryTemplateServiceImpl.java | 1 + .../salary/sys/constant/SalarySysConstant.java | 5 +++++ .../salary/wrapper/SalaryTemplateWrapper.java | 1 + 11 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java index cd7af96ba..32fd9f0d6 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java @@ -80,6 +80,7 @@ public class SalaryTemplateBO { .ackFeedbackStatus(saveParam.getAckFeedbackStatus()?1:0) .autoAckDays(saveParam.getAutoAckDays()) .feedbackUrl(saveParam.getFeedbackUrl()) + .mobileFeedbackUrl(saveParam.getMobileFeedbackUrl()) .createTime(new Date()) .updateTime(new Date()) .creator(employeeId) diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java index 340e97387..767d6ccac 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java @@ -27,6 +27,12 @@ public class SalaryBillAckFeedbackDTO { */ private String feedBackUrl; + + /** + * 移动端反馈地址 + */ + private String mobileFeedBackUrl; + /** * 超时自动确认天数 */ diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java index 3f76a30a8..47f4eb854 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java @@ -92,4 +92,10 @@ public class SalaryTemplateBaseSetDTO { * */ private String feedbackUrl; + + /** + * 移动端反馈流程地址 + * + */ + private String mobileFeedbackUrl; } diff --git a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java index 7f13c13c6..df1996e6d 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java @@ -110,6 +110,11 @@ public class SalaryTemplateSaveParam { */ private String feedbackUrl; + /** + * 移动端反馈流程地址 + */ + private String mobileFeedbackUrl; + List salaryBillItemNameSetting; public static void checkParam(SalaryTemplateSaveParam saveParam) { diff --git a/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java b/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java index a428a68ed..5ffcbaf24 100644 --- a/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java +++ b/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java @@ -192,6 +192,13 @@ public class SalaryTemplatePO { private String feedbackUrl; + /** + * 移动端反馈流程地址 + * + */ + private String mobileFeedbackUrl; + + private Collection salarySobIds; } diff --git a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml index 17e371c33..07898826c 100644 --- a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml @@ -92,6 +92,7 @@ ack_feedback_status, auto_ack_days, feedback_url, + mobile_feedback_url, create_time, update_time, creator, @@ -534,6 +535,9 @@ feedback_url=#{feedbackUrl}, + + mobile_feedback_url=#{mobileFeedbackUrl}, + create_time=#{createTime}, @@ -636,6 +640,9 @@ feedback_url, + + mobile_feedback_url, + create_time, @@ -734,6 +741,9 @@ #{feedbackUrl}, + + #{mobileFeedbackUrl}, + #{createTime}, @@ -842,6 +852,9 @@ feedback_url, + + mobile_feedback_url, + create_time, @@ -940,6 +953,9 @@ #{feedbackUrl}, + + #{mobileFeedbackUrl}, + #{createTime}, diff --git a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java index e5f6d51d3..5cafea060 100644 --- a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java @@ -100,6 +100,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB if (StringUtils.equals(ackFeedbackSetting.getAckStatus(), "1")) { // 2.保存反馈地址 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getFeedBackUrl(), SALARY_FEEDBACK_URL, "工资单反馈地址", "billSend"); + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getMobileFeedBackUrl(), SALARY_FEEDBACK_URL_MOBILE, "移动端工资单反馈地址", "billSend"); // 3.保存自动确认时间 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAutoAckDays().toString(), SALARY_AUTO_ACK_DAYS, "工资单反馈自动确认", "billSend"); } @@ -126,7 +127,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB @Override public SalaryBillAckFeedbackDTO getDefaultAckFeedbackSetting() { // 获取反馈开启状态、自动确认时长、反馈地址 - List codes = Arrays.asList(SalarySysConstant.SALARY_SEND_FEEDBACK, SalarySysConstant.SALARY_AUTO_ACK_DAYS, SalarySysConstant.SALARY_FEEDBACK_URL); + List codes = Arrays.asList(SalarySysConstant.SALARY_SEND_FEEDBACK, SalarySysConstant.SALARY_AUTO_ACK_DAYS, SalarySysConstant.SALARY_FEEDBACK_URL, SALARY_FEEDBACK_URL_MOBILE); List sysConfList = getSalarySysConfService(user).getListByCodes(codes); Map sysConfMap = SalaryEntityUtil.convert2Map(sysConfList, SalarySysConfPO::getConfKey, SalarySysConfPO::getConfValue); @@ -137,6 +138,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB defaultAckFeedBackDTO.setAckStatus("0"); defaultAckFeedBackDTO.setAutoAckDays(0); defaultAckFeedBackDTO.setFeedBackUrl("/"); + defaultAckFeedBackDTO.setMobileFeedBackUrl("/"); return defaultAckFeedBackDTO; } defaultAckFeedBackDTO.setAckStatus(ackStatus); @@ -146,6 +148,9 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB // 反馈地址 String feedbackUrl = sysConfMap.getOrDefault(SalarySysConstant.SALARY_FEEDBACK_URL, ""); defaultAckFeedBackDTO.setFeedBackUrl(feedbackUrl); + + String mobileFeedbackUrl = sysConfMap.getOrDefault(SALARY_FEEDBACK_URL_MOBILE, ""); + defaultAckFeedBackDTO.setMobileFeedBackUrl(mobileFeedbackUrl); return defaultAckFeedBackDTO; } diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 20cb9f176..2a5f9b688 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -524,6 +524,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService } SalaryTemplatePO salaryTemplate = buildSalaryTemplateContent(salaryTemplateContent); + if (StringUtils.isNotBlank(salaryTemplate.getFeedbackUrl()) && StringUtils.isBlank(salaryTemplate.getMobileFeedbackUrl())) { + // 如果设置了pc反馈地址,没有设置移动端反馈地址,则移动端反馈地址默认等于pc反馈地址 + salaryTemplate.setMobileFeedbackUrl(salaryTemplate.getFeedbackUrl()); + } // 判断是否是补发 boolean isReplenish = NumberUtils.INTEGER_ONE.equals(salarySendInfo.getSalaryAcctType()); @@ -826,6 +830,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService .ackFeedbackStatus(Integer.valueOf(map.getOrDefault("ackFeedbackStatus", "0").toString())) .autoAckDays(Integer.valueOf(map.getOrDefault("autoAckDays", "0").toString())) .feedbackUrl(map.getOrDefault("feedbackUrl", "").toString()) + .feedbackUrl(map.getOrDefault("mobileFeedbackUrl", "").toString()) .name(map.getOrDefault("name", "").toString()) .salarySobId(Long.valueOf(map.getOrDefault("salarySobId", "0").toString())) .useType(Integer.valueOf(map.getOrDefault("useType", "0").toString())) diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index 591261abb..df24535aa 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -217,6 +217,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate salaryTemplateNew.setAckFeedbackStatus(saveParam.getAckFeedbackStatus() ? 1 : 0); salaryTemplateNew.setAutoAckDays(saveParam.getAutoAckDays()); salaryTemplateNew.setFeedbackUrl(saveParam.getFeedbackUrl()); + salaryTemplateNew.setMobileFeedbackUrl(saveParam.getMobileFeedbackUrl()); // todo 薪资项目设置检查校验 salaryTemplateNew.setSalaryItemSetting(saveParam.getSalaryItemSetting() != null ? JSONUtil.toJsonStr(saveParam.getSalaryItemSetting()) : ""); salaryTemplateNew.setReplenishSalaryItemSetting(saveParam.getReplenishSalaryItemSetting() != null ? JSONUtil.toJsonStr(saveParam.getReplenishSalaryItemSetting()) : ""); diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index afe54d3c0..081702d22 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -96,6 +96,11 @@ public class SalarySysConstant { */ public static final String SALARY_FEEDBACK_URL = "SALARY_FEEDBACK_URL"; + /** + * 工资单反馈地址-移动端 + */ + public static final String SALARY_FEEDBACK_URL_MOBILE = "SALARY_FEEDBACK_URL_MOBILE"; + /** * 工资单查询限制 */ diff --git a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java index 6149b500e..22aac4134 100644 --- a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java @@ -199,6 +199,7 @@ public class SalaryTemplateWrapper extends Service { salaryTemplateBaseSetDTO.setAckFeedbackStatus(StringUtils.equals(defaultAckFeedback.getAckStatus(), "1")); salaryTemplateBaseSetDTO.setAutoAckDays(defaultAckFeedback.getAutoAckDays()); salaryTemplateBaseSetDTO.setFeedbackUrl(defaultAckFeedback.getFeedBackUrl()); + salaryTemplateBaseSetDTO.setMobileFeedbackUrl(defaultAckFeedback.getMobileFeedBackUrl()); } Map salaryTemplateBase = new HashMap<>(); salaryTemplateBase.put("data", salaryTemplateBaseSetDTO); From 5bf00a98aa2178c843df583abd127251315fce30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 24 Jan 2024 09:50:58 +0800 Subject: [PATCH 063/169] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/elog/util/LoggerTemplate.java | 2 +- .../salaryacct/po/SalaryAcctEmployeePO.java | 14 +++ .../engine/salary/enums/OperateTypeEnum.java | 15 ++- .../salaryacct/SalaryAcctManager.java | 1 - .../impl/SalaryAcctEmployeeServiceImpl.java | 48 ++++----- .../impl/SalaryAcctExcelServiceImpl.java | 99 ++++++++++++------- .../impl/SalaryAcctRecordServiceImpl.java | 95 +++++++++--------- .../impl/SalaryAcctResultServiceImpl.java | 60 ++++++----- 8 files changed, 192 insertions(+), 142 deletions(-) diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index 8b5b6d377..a82021433 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -240,7 +240,7 @@ public class LoggerTemplate { } context.setTempParams(null); - String employeeId = Optional.ofNullable(context.getUser()).map(User::getUID).orElse(0).toString(); + String employeeId = Optional.ofNullable(context.getUser()).map(User::getUID).orElse(0).toString(); String tenantKey = SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; String userName = Optional.ofNullable(context.getUser()).map(User::getUsername).orElse("").toString(); if (StringUtils.isEmpty(context.getOperator()) && StringUtils.isNotEmpty(employeeId)) { diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java index 7d6c82f58..55afc5d0b 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.salaryacct.po; import com.engine.salary.annotation.SalaryFormulaVar; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -25,28 +26,33 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_salary_acct_emp +@ElogTransform(name = "薪资核算人员") public class SalaryAcctEmployeePO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 薪资核算的id */ + @ElogTransform(name = "核算记录id") @SalaryFormulaVar(defaultLabel = "核算记录id", labelId = 86321, dataType = "number") private Long salaryAcctRecordId; /** * 薪资账套id */ + @ElogTransform(name = "薪资账套id") @SalaryFormulaVar(defaultLabel = "薪资账套id", labelId = 86321, dataType = "number") private Long salarySobId; /** * 人员id */ + @ElogTransform(name = "人员id") @SalaryFormulaVar(defaultLabel = "人员id", labelId = 86321, dataType = "number") private Long employeeId; @@ -55,43 +61,51 @@ public class SalaryAcctEmployeePO { * * @see DataCollectionEmployeeTypeEnum */ + @ElogTransform(name = "人员类型") private Integer employeeType; /** * 个税扣缴义务人id */ + @ElogTransform(name = "个税扣缴义务人id") @SalaryFormulaVar(defaultLabel = "个税扣缴义务人id", labelId = 86321, dataType = "number") private Long taxAgentId; /** * 薪资所属月 */ + @ElogTransform(name = "薪资所属月") @SalaryFormulaVar(defaultLabel = "薪资所属月", labelId = 86321, dataType = "string") private Date salaryMonth; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; //--------条件---------- diff --git a/src/com/engine/salary/enums/OperateTypeEnum.java b/src/com/engine/salary/enums/OperateTypeEnum.java index 142abd5f7..697e1aea6 100644 --- a/src/com/engine/salary/enums/OperateTypeEnum.java +++ b/src/com/engine/salary/enums/OperateTypeEnum.java @@ -1,15 +1,20 @@ package com.engine.salary.enums; /** - * @Description: 操作类型 - * @Author: wangxiangzhong - * @Date: 2021/11/1 13:17 - */ + * 操作类型 + *

Copyright: Copyright (c) 2023

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ public enum OperateTypeEnum { + READ("0", "查看"), ADD("1", "新增"), UPDATE("2", "更新"), - DELETE("4", "删除"); + DELETE("4", "删除"), + EXPORT("5", "导出"); private String value; diff --git a/src/com/engine/salary/maintainer/salaryacct/SalaryAcctManager.java b/src/com/engine/salary/maintainer/salaryacct/SalaryAcctManager.java index 207bd1649..6b1943962 100644 --- a/src/com/engine/salary/maintainer/salaryacct/SalaryAcctManager.java +++ b/src/com/engine/salary/maintainer/salaryacct/SalaryAcctManager.java @@ -121,7 +121,6 @@ public class SalaryAcctManager extends Service { private SalaryAcctResultTempService getSalaryAcctResultTempService(User user) { return ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user); } -// private LoggerTemplate salaryAcctRecordLoggerTemplate; private SIAccountService getSIAccountService(User user) { return ServiceUtil.getService(SIAccountServiceImpl.class, user); diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index 56d4c84df..36cf1186f 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -4,7 +4,10 @@ import cn.hutool.core.date.DateUtil; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO; @@ -14,6 +17,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper; @@ -51,9 +55,7 @@ import java.util.stream.Collectors; **/ @Slf4j public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcctEmployeeService { - - - private SalaryAcctEmployeeMapper salaryAcctEmployeeMapper; + private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctEmployeeMapper getSalaryAcctEmployeeMapper() { return MapperProxyFactory.getProxy(SalaryAcctEmployeeMapper.class); @@ -91,8 +93,6 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct return ServiceUtil.getService(TaxAgentServiceImpl.class, user); } -// private LoggerTemplate salaryAcctRecordLoggerTemplate; - private SalarySysConfMapper getSalarySysConfMapper() { return SqlProxyHandle.getProxy(SalarySysConfMapper.class); } @@ -394,15 +394,16 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct // 记录日志 -// String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员") + ":" + targetName); -// loggerContext.setNewValueList(salaryAcctEmployeePOS); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员") + ":" + targetName); + loggerContext.setNewValueList(salaryAcctEmployeePOS); + salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override @@ -460,15 +461,16 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98769, "薪资账套不存在或已被删除")); } // 记录日志 -// String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员") + ":" + targetName); -// loggerContext.setOldValueList(salaryAcctEmployeePOS); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员") + ":" + targetName); + loggerContext.setOldValueList(salaryAcctEmployeePOS); + salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 8840d9302..0626e4aa2 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -5,8 +5,11 @@ import com.cloudstore.dev.api.util.Util_DataCache; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.component.WeaTableColumnGroup; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.constant.SalaryItemConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.report.po.SalaryAcctResultReportPO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO; @@ -24,7 +27,9 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO; import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO; import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; +import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryaccounting.LockStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctResultDataSourceEnum; @@ -38,6 +43,7 @@ import com.engine.salary.sys.enums.OpenEnum; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.JsonUtil; +import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.excel.ExcelParseHelper; @@ -81,12 +87,16 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; **/ @Slf4j public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExcelService { - + private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctRecordService getSalaryAcctRecordService(User user) { return (SalaryAcctRecordService) ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user); } + private SalarySobService getSalarySobService(User user) { + return ServiceUtil.getService(SalarySobServiceImpl.class, user); + } + private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) { return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user); } @@ -237,7 +247,20 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // 3.表数据 List> lists = convert2ExcelRow(salaryAcctEmployees); rows.addAll(lists); -// return ExcelUtil.genWorkbookV2(rows, sheetName); + + // 记录日志 + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId()); + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员") + ":" + targetName); + salaryAcctRecordLoggerTemplate.write(loggerContext); + return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -289,10 +312,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc //判断是否按照自定义字段导出表头 List finalWeaTableColumns = new ArrayList<>(); - if (queryParam.getSalaryItemIds() != null ) { + if (queryParam.getSalaryItemIds() != null) { //获取人员基本信息字段(汇总) Collection> empFieldList = getSalarySobItemWrapper(user).empFieldList(); - List empFieldIdList= new ArrayList<>(); + List empFieldIdList = new ArrayList<>(); empFieldList.forEach(f -> empFieldIdList.add(f.get("id"))); // 必须选择导出所需的薪资项目 if (CollectionUtils.isEmpty(queryParam.getSalaryItemIds())) { @@ -311,7 +334,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc columnGroupItem.setChildren(childrenColumns); finalWeaTableColumns.add(columnGroupItem); } - } else if (empFieldIdList.contains(tableColumn.getColumn()) || headerRangeList.contains(tableColumn.getColumn())){ + } else if (empFieldIdList.contains(tableColumn.getColumn()) || headerRangeList.contains(tableColumn.getColumn())) { finalWeaTableColumns.add(columnGroupItem); } @@ -334,12 +357,12 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) { total = true; Map sumRow = getSalaryAcctResultService(user).sumRow(queryParam); - sumRow.forEach((k,v) -> { + sumRow.forEach((k, v) -> { if (NumberUtils.isCreatable(v.toString())) { - sumRow.put(k,new BigDecimal(v.toString())); + sumRow.put(k, new BigDecimal(v.toString())); } }); - if(sumRow !=null){ + if (sumRow != null) { sumRow.put("taxAgentName", "总计"); resultMapList.add(sumRow); } @@ -354,7 +377,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc for (WeaTableColumnGroup weaTableColumn : headerColumnGroup) { String fieldType = (String) map.getOrDefault(weaTableColumn.getColumn().toString() + DATA_TYPE_SUFFIX, StringUtils.EMPTY); if (StringUtils.equals("number", fieldType)) { - row.add(new BigDecimal(StringUtils.isBlank(map.get(weaTableColumn.getColumn()).toString()) ? "0" :map.get(weaTableColumn.getColumn()).toString())); + row.add(new BigDecimal(StringUtils.isBlank(map.get(weaTableColumn.getColumn()).toString()) ? "0" : map.get(weaTableColumn.getColumn()).toString())); } else { row.add(map.getOrDefault(weaTableColumn.getColumn(), StringUtils.EMPTY)); } @@ -380,7 +403,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc SalaryAcctRecordPO byId = getSalaryAcctRecordService(user).getById(salaryAcctRecordPO.getId()); boolean isBackCalc = Objects.equals(byId.getBackCalcStatus(), 1); // 查询薪资账套下的薪资项目+员工信息字段 - SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId(),isBackCalc); + SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId(), isBackCalc); // 构建薪资核算结果列表表头 List columnList = SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds())); // 获取固定列头数 @@ -450,27 +473,27 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc SalaryAcctResultBO.sortItem(salarySobItemPOMap); // 根据账套分组封装薪资项目的值 List itemsByGroup = new ArrayList<>(); - for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){ - List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList()); + for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) { + List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList()); List items = groupItems.stream() .map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder() - .salaryItemId(salarySobItemPO.getSalaryItemId()) - .salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY)) - .dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue())) - .build()) + .salaryItemId(salarySobItemPO.getSalaryItemId()) + .salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY)) + .dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue())) + .build()) .collect(Collectors.toList()); itemsByGroup.add(SalaryAcctImportFieldDTO.ImportFieldByGroupDTO.builder() .salarySobItemGroupId(groupPO.getId()) .salarySobItemGroupName(groupPO.getName()) .salaryItems(items) - .sortedIndex(groupPO.getSortedIndex()).build() ); + .sortedIndex(groupPO.getSortedIndex()).build()); } // 未分类 List noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList()); - if(CollectionUtils.isNotEmpty(noGroupItems)){ + if (CollectionUtils.isNotEmpty(noGroupItems)) { List items = noGroupItems.stream() - .map(salarySobItemPO ->SalaryAcctImportFieldDTO.ImportFieldDTO.builder() + .map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder() .salaryItemId(salarySobItemPO.getSalaryItemId()) .salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY)) .dataType(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getDataType).orElse(SalaryDataTypeEnum.NUMBER.getValue())) @@ -510,7 +533,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // .collect(Collectors.toList()); // 缓存勾选 String cacheKey = user.getUID() + SalaryItemConstant.RESULT_IMPORT_FIELD_SIGN; - String cacheValue = (String)Util_DataCache.getObjVal(cacheKey); + String cacheValue = (String) Util_DataCache.getObjVal(cacheKey); List checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class); // 转换成dto // return SalaryAcctImportFieldDTO.builder().formulaItems(formulaItems).sqlItems(sqlItems).inputItems(inputItems).checkItems(checkItems).build(); @@ -541,8 +564,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc SalaryAcctResultBO.sortItem(salarySobItemPOMap); // 根据账套分组封装薪资项目的值 List itemsByGroup = new ArrayList<>(); - for(SalarySobItemGroupPO groupPO : salarySobItemGroupPOS){ - List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(),Collections.emptyList()); + for (SalarySobItemGroupPO groupPO : salarySobItemGroupPOS) { + List groupItems = salarySobItemPOMap.getOrDefault(groupPO.getId(), Collections.emptyList()); List items = groupItems.stream() .map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder() .salaryItemId(salarySobItemPO.getSalaryItemId()) @@ -554,13 +577,13 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc .salarySobItemGroupId(groupPO.getId()) .salarySobItemGroupName(groupPO.getName()) .salaryItems(items) - .sortedIndex(groupPO.getSortedIndex()).build() ); + .sortedIndex(groupPO.getSortedIndex()).build()); } // 未分类 List noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList()); - if(CollectionUtils.isNotEmpty(noGroupItems)){ + if (CollectionUtils.isNotEmpty(noGroupItems)) { List items = noGroupItems.stream() - .map(salarySobItemPO ->SalaryAcctImportFieldDTO.ImportFieldDTO.builder() + .map(salarySobItemPO -> SalaryAcctImportFieldDTO.ImportFieldDTO.builder() .salaryItemId(salarySobItemPO.getSalaryItemId()) .salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY)) .build()) @@ -574,7 +597,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc } // 缓存勾选 String cacheKey = user.getUID() + SalaryItemConstant.RESULT_EXPORT_FIELD_SIGN; - String cacheValue = (String)Util_DataCache.getObjVal(cacheKey); + String cacheValue = (String) Util_DataCache.getObjVal(cacheKey); List checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class); // 转换成dto // return SalaryAcctImportFieldDTO.builder().formulaItems(formulaItems).sqlItems(sqlItems).inputItems(inputItems).checkItems(checkItems).build(); @@ -586,7 +609,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // ValidUtil.doValidator(param); // 从缓存中获取所选的薪资项目 String cacheKey = user.getUID() + SalaryItemConstant.RESULT_IMPORT_FIELD_SIGN; - String cacheValue = (String)Util_DataCache.getObjVal(cacheKey); + String cacheValue = (String) Util_DataCache.getObjVal(cacheKey); List checkItems = JsonUtil.parseList(cacheValue, Long.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, Long.class); // 必须选择导入模板所需的薪资项目 if (CollectionUtils.isEmpty(checkItems)) { @@ -691,7 +714,6 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc } - @Override public XSSFWorkbook exportComparisonResult(SalaryComparisonResultQueryParam queryParam) { ValidUtil.doValidator(queryParam); @@ -827,7 +849,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // 查询薪资核算所用的薪资账套的员工信息字段 List salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId()); List salarySobEmpFieldDTOS = new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS); - salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName())))); + salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName())))); for (WeaTableColumnGroup tableColumn : weaTableColumns) { WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) tableColumn; if (columnGroupItem.getChildren() != null) { @@ -992,16 +1014,16 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // List headers = ExcelSupport.getSheetHeader(sheet, 0); List headers; // if (StringUtils.equals("importSalaryAcctResult", importType)) { - headers = ExcelSupport.getSheetHeader(sheet, 1); + headers = ExcelSupport.getSheetHeader(sheet, 1); // } else { // headers = ExcelSupport.getSheetHeader(sheet, 0); // } - // 处理数值 + // 处理数值 // List> data = ExcelParseHelper.parse2Map(sheet, 1); List> data; // if (StringUtils.equals("importSalaryAcctResult", importType)) { - data = ExcelParseHelper.parse2Map(sheet, 2, 1); + data = ExcelParseHelper.parse2Map(sheet, 2, 1); // } else { // data = ExcelParseHelper.parse2Map(sheet, 1); // } @@ -1248,7 +1270,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc getSalaryComparisonResultService(user).deleteBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordId)); if (CollectionUtils.isNotEmpty(excelAcctResults)) { excelAcctResults.stream().forEach(result -> { - if(StringUtils.isEmpty(result.getResultValue())){ + if (StringUtils.isEmpty(result.getResultValue())) { result.setResultValue(" "); } }); @@ -1282,7 +1304,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc } } SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK); - if(autoLock != null && StringUtils.equals(autoLock.getConfValue(),"1")){ + if (autoLock != null && StringUtils.equals(autoLock.getConfValue(), "1")) { // 导入的列都自动锁定 SalaryAcctResultUpdateLockStatusParam updateLockStatusParam = SalaryAcctResultUpdateLockStatusParam.builder() .salaryItemIds(excelSalaryItemIds) @@ -1305,7 +1327,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc } /** - * 存储薪资核算结果数据来源日志 + * 存储薪资核算结果数据来源日志 + * * @param salaryAcctResults */ private void handleSalaryAcctResultLog(List salaryAcctResults) { @@ -1315,14 +1338,14 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc List salaryAcctResultList = getSalaryAcctResultService(user).listByAcctEmployeeIdsAndSalaryItemIds(salaryAcctEmpIds, salaryItemIds); Long uid = Long.valueOf(user.getUID()); List needInsertList = SalaryAcctResultLogBO.buildSalaryAcctResultLog(salaryAcctResultList, uid, SalaryAcctResultDataSourceEnum.IMPORT); - if(CollectionUtils.isNotEmpty(needInsertList)){ + if (CollectionUtils.isNotEmpty(needInsertList)) { getSalaryAcctResultLogService(user).batchInsert(needInsertList); } } /** - * @description * @return void + * @description * @author Harryxzy * @date 2022/12/26 22:36 */ @@ -1330,7 +1353,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc Map> deleteMap = SalaryEntityUtil.group2Map(deleteResults, po -> po.getSalaryAcctEmpId() + "-" + po.getSalaryItemId()); salaryAcctResults.stream().forEach(result -> { List salaryAcctResultPOS = deleteMap.get(result.getSalaryAcctEmpId() + "-" + result.getSalaryItemId()); - if(salaryAcctResultPOS != null && salaryAcctResultPOS.size() > 0 ){ + if (salaryAcctResultPOS != null && salaryAcctResultPOS.size() > 0) { result.setOriginResultValue(salaryAcctResultPOS.get(0).getOriginResultValue()); } }); diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index d6924e489..1d3e300ef 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -4,9 +4,9 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.common.LocalDateRange; -import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.entity.datacollection.DataCollectionEmployee; -import com.engine.salary.entity.report.po.SalaryAcctResultReportPO; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.salaryBill.po.SalarySendPO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO; import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam; @@ -15,8 +15,8 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; -import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -35,14 +35,11 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; -import dm.jdbc.util.IdGenerator; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import weaver.hrm.User; -import java.time.YearMonth; import java.util.*; import java.util.stream.Collectors; @@ -55,7 +52,7 @@ import java.util.stream.Collectors; * @version 1.0 **/ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRecordService { - + private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctRecordMapper getSalaryAcctRecordMapper() { return MapperProxyFactory.getProxy(SalaryAcctRecordMapper.class); @@ -303,15 +300,16 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe // 初始化薪资核算人员 getSalaryAcctEmployeeService(user).initBySalaryAcctRecord(salaryAcctRecordPO); // 记录日志 -// String targetName = getLogTargetNameById(salaryAcctRecordPO.getId(), tenantKey); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算") + ": " + targetName); -// loggerContext.setNewValues(salaryAcctRecordPO); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = getLogTargetNameById(salaryAcctRecordPO.getId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算") + ": " + targetName); + loggerContext.setNewValues(salaryAcctRecordPO); + salaryAcctRecordLoggerTemplate.write(loggerContext); // 返回薪资核算记录id return salaryAcctRecordPO.getId(); } @@ -534,18 +532,19 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe } // 记录日志 -// salaryAcctRecordPOS.forEach(salaryAcctRecordPO -> { -// SalarySobPO salarySobPO = salarySobPOMap.get(salaryAcctRecordPO.getSalarySobId()); -// String targetName = salarySobPO.getName() + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算") + ":" + targetName); -// loggerContext.setNewValues(salaryAcctRecordPO); -// salaryAcctRecordLoggerTemplate.write(loggerContext); -// }); + salaryAcctRecordPOS.forEach(salaryAcctRecordPO -> { + SalarySobPO salarySobPO = salarySobPOMap.get(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算") + ":" + targetName); + loggerContext.setNewValues(salaryAcctRecordPO); + salaryAcctRecordLoggerTemplate.write(loggerContext); + }); } @Override @@ -577,15 +576,16 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe // 记录日志 -// String targetName = getLogTargetNameById(salaryAcctRecordId); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档") + ": " + targetName); -// loggerContext.setNewValues(salaryAcctRecordPO); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = getLogTargetNameById(salaryAcctRecordId); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档") + ": " + targetName); + loggerContext.setNewValues(salaryAcctRecordPO); + salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override @@ -626,15 +626,16 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe // salaryAcctRecordPO.setUpdateTime(new Date()); // getSalaryAcctRecordMapper().updateIgnoreNull(salaryAcctRecordPO); // 记录日志 -// String targetName = getLogTargetNameById(salaryAcctRecordPO.getId(), tenantKey); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98820, "重新核算")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98820, "重新核算") + ": " + targetName); -// loggerContext.setNewValues(salaryAcctRecordPO); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = getLogTargetNameById(salaryAcctRecordPO.getId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98820, "重新核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98820, "重新核算") + ": " + targetName); + loggerContext.setNewValues(salaryAcctRecordPO); + salaryAcctRecordLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 5369fea9e..fef331259 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -4,7 +4,10 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.cache.SalaryCacheKey; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO; @@ -23,9 +26,10 @@ import com.engine.salary.entity.salarysob.dto.*; import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.entity.taxagent.po.TaxAgentAdminPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; -import com.engine.salary.enums.common.FilterEnum; import com.engine.salary.enums.UserStatusEnum; +import com.engine.salary.enums.common.FilterEnum; import com.engine.salary.enums.salaryaccounting.LockStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctResultDataSourceEnum; @@ -82,6 +86,7 @@ import java.util.stream.Collectors; **/ @Slf4j public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctResultService { + private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private EncryptUtil encryptUtil = new EncryptUtil(); private SalaryAcctResultMapper getSalaryAcctResultMapper() { @@ -145,7 +150,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe private SalaryAcctResultTempService getSalaryAcctResultTempService(User user) { return ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user); } -// private LoggerTemplate salaryAcctRecordLoggerTemplate; private SIAccountService getSIAccountService(User user) { return ServiceUtil.getService(SIAccountServiceImpl.class, user); @@ -355,7 +359,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe //其他条件 List otherConditions = queryParam.getOtherConditions(); - if(CollectionUtils.isNotEmpty(otherConditions)){ + if (CollectionUtils.isNotEmpty(otherConditions)) { List items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList()); List list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items); for (int i = 0; i < otherConditions.size(); i++) { @@ -646,21 +650,22 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe saveSalaryAcctResultLog(salaryAcctResultPOSOld, salaryAcctResultPOS); // 查询操作日志的targetName -// String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(salaryAcctEmployeePO.getSalaryAcctRecordId()); - // 查询人员信息 -// DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salaryAcctEmployeePO.getEmployeeId()); - // 查询个税扣缴义务人 -// TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(salaryAcctEmployeePO.getTaxAgentId()); - // 记录日志 -// String operateDesc = simpleEmployee.getUsername() + "(" + Optional.ofNullable(taxAgentPO).map(TaxAgentPO::getName).orElse(StringUtils.EMPTY) + ")"; -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(salaryAcctEmployeePO.getSalaryAcctRecordId())); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); -// loggerContext.setNewValueList(Lists.newArrayList(salaryAcctResultPOS)); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(salaryAcctEmployeePO.getSalaryAcctRecordId()); +// 查询人员信息 + DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salaryAcctEmployeePO.getEmployeeId()); +// 查询个税扣缴义务人 + TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(salaryAcctEmployeePO.getTaxAgentId()); +// 记录日志 + String operateDesc = simpleEmployee.getUsername() + "(" + Optional.ofNullable(taxAgentPO).map(TaxAgentPO::getName).orElse(StringUtils.EMPTY) + ")"; + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryAcctEmployeePO.getSalaryAcctRecordId())); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); + loggerContext.setNewValueList(Lists.newArrayList(salaryAcctResultPOS)); + salaryAcctRecordLoggerTemplate.write(loggerContext); } /** @@ -856,14 +861,15 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe }.start(); // 记录日志 // 查询操作日志的targetName -// String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(calculateParam.getSalaryAcctRecordId()); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(calculateParam.getSalaryAcctRecordId())); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); -// salaryAcctRecordLoggerTemplate.write(loggerContext); + String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(calculateParam.getSalaryAcctRecordId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(calculateParam.getSalaryAcctRecordId())); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); + salaryAcctRecordLoggerTemplate.write(loggerContext); } catch (Exception e) { log.info("薪资核算出错:{}", e.getMessage(), e); // throw new SalaryRunTimeException(e); @@ -1191,7 +1197,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe batchSave(needInsertList); // 报表入库前先删除 - getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(param.getIdList(), Collections.singletonList(param.getSalaryItemId()) ); + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(param.getIdList(), Collections.singletonList(param.getSalaryItemId())); getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); } From 4da07b9e8071a3229819860fa5ebe9aa4552b57b Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 24 Jan 2024 14:35:55 +0800 Subject: [PATCH 064/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E3=80=81=E5=8F=B0=E8=B4=A6?= =?UTF-8?q?=EF=BC=8C=E5=9F=BA=E6=95=B0=E8=B0=83=E6=95=B4=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E6=9D=83=EF=BC=8C=E5=8F=B0=E8=B4=A6=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryBill/dto/SalaryTemplateListDTO.java | 3 +++ .../mapper/salarybill/SalaryTemplateMapper.xml | 9 ++++++--- .../salary/service/impl/SIAccountServiceImpl.java | 4 +++- .../salary/service/impl/SIArchivesServiceImpl.java | 14 ++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateListDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateListDTO.java index 60182ae3f..887f36905 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateListDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateListDTO.java @@ -54,4 +54,7 @@ public class SalaryTemplateListDTO { @SalaryTableColumn(text = "备注", width = "20%", column = "description") @TableTitle(title = "备注", dataIndex = "description", key = "description") private String description; + + // 薪资账套id + private Long salarySobId; } diff --git a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml index 17e371c33..9912f302d 100644 --- a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml @@ -366,7 +366,8 @@ t.replenish_name as replenishName, s.name as salarysob, t.use_type as useType, - t.description + t.description, + t.salary_sob_id from hrsa_salary_template t left join hrsa_salary_sob s on t.salary_sob_id = s.id where t.delete_type = 0 @@ -398,7 +399,8 @@ t.replenish_name as replenishName, s.name as salarysob, t.use_type as useType, - t.description + t.description, + t.salary_sob_id from hrsa_salary_template t left join hrsa_salary_sob s on t.salary_sob_id = s.id where t.delete_type = 0 @@ -430,7 +432,8 @@ t.replenish_name as replenishName, s.name as salarysob, t.use_type as useType, - t.description + t.description, + t.salary_sob_id from hrsa_salary_template t left join hrsa_salary_sob s on t.salary_sob_id = s.id where t.delete_type = 0 diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 43168124a..8b8da3b77 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -232,6 +232,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Long employeeId = (long) user.getUID(); Map datas = new HashMap<>(); + List paymentOrganizationIds = queryParam.getTaxAgents(); // 分权逻辑 Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); if (needAuth) { @@ -240,7 +241,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (CollectionUtils.isEmpty(taxAgents)) { //防止普通用户查询 queryParam.setTaxAgents(Collections.singletonList(-1L)); - } else { + } else if (paymentOrganizationIds != null && paymentOrganizationIds.size() > 0){ + taxAgents.retainAll(paymentOrganizationIds); queryParam.setTaxAgents(taxAgents); } } diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 8738c66f9..071dde24e 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -1159,6 +1159,20 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService public PageInfo historyListByEmployeeIdAndOperator(SIArchiveBaseHistoryListParam param) { List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); + + // 分权逻辑 + Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); + if (needAuth) { + Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgents((long) user.getUID()); + List taxAgents = taxAgentPOS.stream().map(TaxAgentPO::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(taxAgents)) { + //防止普通用户查询 + adjustHistoryDTOS = new ArrayList<>(); + } else { + adjustHistoryDTOS = adjustHistoryDTOS.stream().filter(f -> taxAgents.contains(f.getPaymentOrganization())).collect(Collectors.toList()); + } + } + adjustHistoryDTOS.forEach(f -> { if (StringUtils.isNotBlank(f.getPaymentScope())) { if(f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue().toString())) { From 6fc8d8fdeef90a088075d009f22cee737bdca9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 25 Jan 2024 11:38:38 +0800 Subject: [PATCH 065/169] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=BE=BE=E6=A2=A6?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 2 +- src/com/engine/salary/biz/SIArchivesBiz.java | 2 +- .../entity/agency/bo/PaymentAgencyBO.java | 2 +- .../report/bo/SalaryAcctResultReportBO.java | 2 +- .../salaryacct/bo/SalaryAcctResultLogBO.java | 2 +- .../salaryarchive/bo/SalaryArchiveBO.java | 2 +- .../bo/SalaryArchiveExcelBO.java | 2 +- .../entity/salaryitem/bo/SalaryItemBO.java | 2 +- .../entity/salaryitem/bo/SysSalaryItemBO.java | 2 +- .../salarysob/bo/SalarySobBackItemBO.java | 2 +- .../salarysob/bo/SalarySobDuplicateBO.java | 2 +- .../entity/salarysob/bo/SalarySobItemBO.java | 2 +- .../bo/InsuranceArchivesBaseInfoBO.java | 2 +- .../entity/sicategory/bo/ICategoryBO.java | 2 +- .../salary/entity/taxagent/bo/TaxAgentBO.java | 2 +- .../taxdeclaration/bo/TaxDeclarationBO.java | 2 +- .../SalaryStatisticsDimensionServiceImpl.java | 2 +- .../SalaryStatisticsEchartsServiceImpl.java | 2 +- .../impl/SalaryStatisticsItemServiceImpl.java | 2 +- .../impl/SalaryStatisticsPushServiceImpl.java | 2 +- .../SalaryStatisticsReportServiceImpl.java | 2 +- .../impl/AttendQuoteDataServiceImpl.java | 2 +- .../service/impl/ExtEmpServiceImpl.java | 2 +- .../service/impl/SIAccountServiceImpl.java | 2 +- .../service/impl/SIBalanceServiceImpl.java | 2 +- .../impl/SICompensationServiceImpl.java | 2 +- .../service/impl/SISchemeServiceImpl.java | 2 +- .../impl/SalaryAcctExcelServiceImpl.java | 2 +- .../impl/SalaryAcctRecordServiceImpl.java | 2 +- .../impl/SalaryAcctResultServiceImpl.java | 2 +- .../impl/SalaryArchiveServiceImpl.java | 2 +- .../impl/SalaryBillBaseSetServiceImpl.java | 2 +- .../impl/SalaryBillItemNameServiceImpl.java | 2 +- .../impl/SalaryEmployeeServiceImpl.java | 2 +- .../impl/SalaryFormulaServiceImpl.java | 2 +- .../service/impl/SalarySendServiceImpl.java | 2 +- .../impl/SalarySobExtRangeServiceImpl.java | 2 +- .../impl/SalarySobItemServiceImpl.java | 2 +- .../service/impl/SalarySobServiceImpl.java | 2 +- .../impl/SalaryTemplateServiceImpl.java | 2 +- .../impl/TaxAgentAdminServiceImpl.java | 2 +- .../service/impl/TaxAgentBaseServiceImpl.java | 2 +- .../service/impl/TaxAgentEmpServiceImpl.java | 2 +- .../impl/TaxAgentManageRangeServiceImpl.java | 2 +- .../impl/SalarySysConfServiceImpl.java | 2 +- .../timer/SyncTaxAgentEmp2SobEmpJob.java | 2 +- .../engine/salary/util/SalaryTokenUtil.java | 2 +- .../engine/salary/util/db/IdGenerator.java | 46 +++++++++++++++++++ .../salary/wrapper/SalarySobWrapper.java | 2 +- 49 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 src/com/engine/salary/util/db/IdGenerator.java diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 7c661b682..2fba1d08f 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -50,7 +50,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.wbi.util.StringUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.math.NumberUtils; diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index be722d87c..2639788c3 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -51,7 +51,7 @@ import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.wrapper.TaxAgentWrapper; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; diff --git a/src/com/engine/salary/entity/agency/bo/PaymentAgencyBO.java b/src/com/engine/salary/entity/agency/bo/PaymentAgencyBO.java index 0fbe29e78..25956b123 100644 --- a/src/com/engine/salary/entity/agency/bo/PaymentAgencyBO.java +++ b/src/com/engine/salary/entity/agency/bo/PaymentAgencyBO.java @@ -4,7 +4,7 @@ import com.engine.salary.entity.agency.dto.PaymentAgencyFormDTO; import com.engine.salary.entity.agency.dto.PaymentAgencyListDTO; import com.engine.salary.entity.agency.po.PaymentAgencyPO; import com.engine.salary.enums.sicategory.DeleteTypeEnum; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import java.time.LocalDateTime; diff --git a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java index 06cb10a8a..5b6c4d2c9 100644 --- a/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java +++ b/src/com/engine/salary/entity/report/bo/SalaryAcctResultReportBO.java @@ -6,7 +6,7 @@ import com.engine.salary.entity.report.po.SalaryAcctResultReportPO; import com.engine.salary.entity.salaryacct.param.SalaryAcctResultSaveParam; import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTempPO; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultLogBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultLogBO.java index 985880f3c..f8270bb5b 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultLogBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultLogBO.java @@ -3,7 +3,7 @@ package com.engine.salary.entity.salaryacct.bo; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultLogPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.enums.salaryaccounting.SalaryAcctResultDataSourceEnum; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.lang3.math.NumberUtils; import java.util.ArrayList; diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java index 552856821..62d9196a6 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java @@ -18,7 +18,7 @@ import com.engine.salary.enums.taxagent.TaxAgentEmpChangeTypeEnum; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java index 5a72e9641..02eb78dda 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java @@ -25,7 +25,7 @@ import com.engine.salary.util.excel.ExcelComment; import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java index c11c58954..1048360fa 100644 --- a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java +++ b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java @@ -257,7 +257,7 @@ public class SalaryItemBO { */ public static SalaryItemPO convert2SalaryItemPO(SalaryItemSaveParam saveParam, Long employeeId) { Date now = new Date(); - long id = dm.jdbc.util.IdGenerator.generate(); + long id = com.engine.salary.util.db.IdGenerator.generate(); SalaryItemPO salaryItemPO = SalaryItemPO.builder() .id(id) .code(IdGenerator.getUUID()) diff --git a/src/com/engine/salary/entity/salaryitem/bo/SysSalaryItemBO.java b/src/com/engine/salary/entity/salaryitem/bo/SysSalaryItemBO.java index 544550acf..6defd200c 100644 --- a/src/com/engine/salary/entity/salaryitem/bo/SysSalaryItemBO.java +++ b/src/com/engine/salary/entity/salaryitem/bo/SysSalaryItemBO.java @@ -10,7 +10,7 @@ import com.engine.salary.enums.SalarySystemTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; import com.engine.salary.util.SalaryI18nUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobBackItemBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobBackItemBO.java index e4348149e..93447575c 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobBackItemBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobBackItemBO.java @@ -8,7 +8,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobDefaultBackItemPO; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections.CollectionUtils; import java.util.Collections; diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobDuplicateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobDuplicateBO.java index 28f6b8b69..6a64f4912 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobDuplicateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobDuplicateBO.java @@ -4,7 +4,7 @@ import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.entity.salarysob.po.*; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.AllArgsConstructor; import lombok.Data; import org.apache.commons.collections4.CollectionUtils; diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java index 3e2513908..0b4ae442d 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java @@ -7,7 +7,7 @@ import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.Data; import lombok.experimental.Accessors; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBaseInfoBO.java b/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBaseInfoBO.java index 8c22ae58f..15a58cef6 100644 --- a/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBaseInfoBO.java +++ b/src/com/engine/salary/entity/siarchives/bo/InsuranceArchivesBaseInfoBO.java @@ -7,7 +7,7 @@ import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeTypeEnum; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/src/com/engine/salary/entity/sicategory/bo/ICategoryBO.java b/src/com/engine/salary/entity/sicategory/bo/ICategoryBO.java index ae0af9555..8bf7052ac 100644 --- a/src/com/engine/salary/entity/sicategory/bo/ICategoryBO.java +++ b/src/com/engine/salary/entity/sicategory/bo/ICategoryBO.java @@ -5,7 +5,7 @@ import com.engine.salary.entity.sicategory.dto.ICategoryFormDTO; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.enums.sicategory.DataTypeEnum; import com.engine.salary.util.SalaryEnumUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import java.util.Date; import java.util.Objects; diff --git a/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java b/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java index 5eb60c561..7078723af 100644 --- a/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java +++ b/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java @@ -27,7 +27,7 @@ import com.engine.salary.util.page.Column; import com.engine.salary.util.page.PageInfo; import com.google.common.base.Joiner; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationBO.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationBO.java index 4fe0d32c3..e9500c680 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationBO.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationBO.java @@ -22,7 +22,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.page.PageInfo; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.Data; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java index c855e0037..d62cdd1b3 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java @@ -21,7 +21,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsEchartsServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsEchartsServiceImpl.java index 6828d2899..d09400752 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsEchartsServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsEchartsServiceImpl.java @@ -11,7 +11,7 @@ import com.engine.salary.report.service.SalaryStatisticsEchartsService; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java index ab3600c5e..41b3fb90b 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java @@ -13,7 +13,7 @@ import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java index 97b67c878..82156264d 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java @@ -32,7 +32,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 3f9745f11..368918f4c 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -37,7 +37,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java index e71480f4a..8e9f4282a 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java @@ -55,7 +55,7 @@ import com.engine.salary.util.valid.ValidUtil; import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java index dcb3b5f1f..cf833a66f 100644 --- a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java @@ -27,7 +27,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index cbed96243..c5ce7e289 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -74,7 +74,7 @@ import com.engine.salary.wrapper.SalaryFormulaWrapper; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.mzlion.core.utils.BeanUtils; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Sheet; diff --git a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java index 80dd92f67..28387d55c 100644 --- a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java @@ -34,7 +34,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.hrm.User; diff --git a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java index 8d0e1f579..9a97d7ce5 100644 --- a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java @@ -33,7 +33,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.Column; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.springframework.beans.BeanUtils; import weaver.hrm.User; diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index da2c8b0ae..19a670559 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -58,7 +58,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 8840d9302..766ebc9f2 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -49,7 +49,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.wbi.util.Util; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index d6924e489..9f88c40cb 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -35,7 +35,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 5369fea9e..6fcd32486 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -54,7 +54,7 @@ import com.google.common.collect.Sets; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.constant.ModulePoolEnum; import com.weaver.util.threadPool.entity.LocalRunnable; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 2ab7a1bdd..e4d2fe9eb 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -48,7 +48,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.time.DateUtils; diff --git a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java index e5f6d51d3..6739ddac0 100644 --- a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java @@ -22,7 +22,7 @@ import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.JsonUtil; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalaryBillItemNameServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillItemNameServiceImpl.java index 427f28ada..65e7f0f83 100644 --- a/src/com/engine/salary/service/impl/SalaryBillItemNameServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillItemNameServiceImpl.java @@ -14,7 +14,7 @@ import com.engine.salary.service.SalaryItemService; import com.engine.salary.service.SalaryTemplateService; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index e1f096f63..3e4528309 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -28,7 +28,7 @@ import com.engine.salary.service.SalarySobRangeService; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java b/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java index e15006e2b..9d1a125df 100644 --- a/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryFormulaServiceImpl.java @@ -22,7 +22,7 @@ import com.engine.salary.util.JsonUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 20cb9f176..11ce7a692 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -61,7 +61,7 @@ import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; diff --git a/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java index 54808736d..78d313366 100644 --- a/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java @@ -20,7 +20,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import weaver.hrm.User; diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index fa0a889fc..268912117 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -25,7 +25,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.valid.ValidUtil; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/service/impl/SalarySobServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobServiceImpl.java index e640a2b3f..722149a40 100644 --- a/src/com/engine/salary/service/impl/SalarySobServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobServiceImpl.java @@ -36,7 +36,7 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.RuntimeTypeEnum; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.ObjectUtils; diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index 591261abb..03df3c980 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -28,7 +28,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.mzlion.core.utils.BeanUtils; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; diff --git a/src/com/engine/salary/service/impl/TaxAgentAdminServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentAdminServiceImpl.java index 5d6cf042c..72838fc10 100644 --- a/src/com/engine/salary/service/impl/TaxAgentAdminServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentAdminServiceImpl.java @@ -7,7 +7,7 @@ import com.engine.salary.mapper.taxagent.TaxAgentAdminMapper; import com.engine.salary.service.TaxAgentAdminService; import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import java.util.Collection; diff --git a/src/com/engine/salary/service/impl/TaxAgentBaseServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentBaseServiceImpl.java index 25cae8472..d31a2a6de 100644 --- a/src/com/engine/salary/service/impl/TaxAgentBaseServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentBaseServiceImpl.java @@ -15,7 +15,7 @@ import com.engine.salary.service.SalaryAcctRecordService; import com.engine.salary.service.TaxAgentBaseService; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import weaver.hrm.User; diff --git a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java index f7fd19a94..c595c9139 100644 --- a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java @@ -17,7 +17,7 @@ import com.engine.salary.service.TaxAgentEmpService; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import weaver.hrm.User; diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index 2c1a38017..caf96a0f9 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -38,7 +38,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.entity.LocalRunnable; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java index 74ead2a26..cf3c4b893 100644 --- a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java +++ b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java @@ -50,7 +50,7 @@ import com.google.common.collect.Lists; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.constant.ModulePoolEnum; import com.weaver.util.threadPool.entity.LocalRunnable; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/src/com/engine/salary/timer/SyncTaxAgentEmp2SobEmpJob.java b/src/com/engine/salary/timer/SyncTaxAgentEmp2SobEmpJob.java index 5df6d7b5e..d1a823059 100644 --- a/src/com/engine/salary/timer/SyncTaxAgentEmp2SobEmpJob.java +++ b/src/com/engine/salary/timer/SyncTaxAgentEmp2SobEmpJob.java @@ -8,7 +8,7 @@ import com.engine.salary.service.SalarySobRangeService; import com.engine.salary.service.SalarySobService; import com.engine.salary.service.impl.SalarySobRangeServiceImpl; import com.engine.salary.service.impl.SalarySobServiceImpl; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import weaver.general.BaseBean; diff --git a/src/com/engine/salary/util/SalaryTokenUtil.java b/src/com/engine/salary/util/SalaryTokenUtil.java index ba2509350..68446cf30 100644 --- a/src/com/engine/salary/util/SalaryTokenUtil.java +++ b/src/com/engine/salary/util/SalaryTokenUtil.java @@ -3,7 +3,7 @@ package com.engine.salary.util; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.engine.salary.exception.SalaryRunTimeException; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; import weaver.general.BaseBean; diff --git a/src/com/engine/salary/util/db/IdGenerator.java b/src/com/engine/salary/util/db/IdGenerator.java new file mode 100644 index 000000000..3a900a8d6 --- /dev/null +++ b/src/com/engine/salary/util/db/IdGenerator.java @@ -0,0 +1,46 @@ +package com.engine.salary.util.db; + +import java.util.concurrent.atomic.AtomicLong; + +public class IdGenerator { + private static AtomicLong next = new AtomicLong(1L); + public static final int ID_LENGTH_36 = 36; + + public IdGenerator() { + } + + public static long generate() { + return System.currentTimeMillis() + next.getAndIncrement(); + } + + public static String generateId() { + return System.currentTimeMillis() + String.valueOf(next.getAndIncrement()); + } + + public static String generateStrId() { + return System.currentTimeMillis() + generateStrId(36); + } + + public static String generateStrId(int idLength) { + if (idLength >= 1 && idLength <= 36) { + char[] srcChars = new char[]{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'g', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; + char[] chars = new char[idLength]; + + for(int i = 0; i < idLength; ++i) { + if (i != 8 && i != 13 && i != 18 && i != 23) { + if (i == 0) { + chars[i] = srcChars[(int)(Math.random() * 26.0D) % 26]; + } else { + chars[i] = srcChars[(int)(Math.random() * 36.0D) % 36]; + } + } else { + chars[i] = '_'; + } + } + + return new String(chars); + } else { + return ""; + } + } +} diff --git a/src/com/engine/salary/wrapper/SalarySobWrapper.java b/src/com/engine/salary/wrapper/SalarySobWrapper.java index c9f1ddd8e..e8259d52a 100644 --- a/src/com/engine/salary/wrapper/SalarySobWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySobWrapper.java @@ -27,7 +27,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.SalarySobUtil; import com.engine.salary.util.page.PageInfo; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import weaver.hrm.User; From e92e134d2136d22b8200cc038b8c1c0705c2e479 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 25 Jan 2024 11:41:35 +0800 Subject: [PATCH 066/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=E6=94=B9=E9=80=A0=EF=BC=8C=E8=A1=A5?= =?UTF-8?q?=E5=8F=91=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SalaryTemplateServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index c778138ad..cd7b1bc8e 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -28,6 +28,7 @@ import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salarysob.SalarySobEmpFieldMapper; import com.engine.salary.service.*; import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -283,6 +284,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate BeanUtils.copyProperties(salaryTemplate, salaryTemplateNew); salaryTemplateNew.setId(null); salaryTemplateNew.setName(copyParam.getName()); + salaryTemplateNew.setReplenishName(copyParam.getName() + "-" + SalaryI18nUtil.getI18nLabel(0, "补发工资单")); salaryTemplateNew.setUseType(SalaryTemplateWhetherEnum.FALSE.getValue()); //20240122逻辑变更,拷贝工资单模板时,可变更薪资账套 From 78f96c5008d4f6ef6e53d1432740aae2a693374a Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 25 Jan 2024 13:37:35 +0800 Subject: [PATCH 067/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=EF=BC=8C=E6=8B=89=E5=8F=9620240101=E5=88=86=E6=94=AF=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=86=85=E5=AE=B9=EF=BC=8C=E5=B9=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/service/impl/SIAccountServiceImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 0095dcbf2..857196426 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -67,7 +67,6 @@ import com.google.common.collect.Maps; import com.mzlion.core.utils.BeanUtils; import com.engine.salary.util.db.IdGenerator; import com.wbi.util.StringUtil; -import dm.jdbc.util.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.math.NumberUtils; @@ -76,7 +75,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.springframework.beans.BeanUtils; import weaver.file.ImageFileManager; import weaver.general.Util; import weaver.hrm.User; From 2aa4ed05d882563da12b796763a335105599380e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 25 Jan 2024 13:56:18 +0800 Subject: [PATCH 068/169] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=BE=BE=E6=A2=A6?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 2639788c3..bbaf325ab 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -756,7 +756,7 @@ public class SIArchivesBiz { * 新增 * * @param param - * @param employeeId + * @param user */ public void insert(InsuranceArchivesSaveParam param, User user) { SalaryAssert.notNull(param.getWelfareType(), "福利类型为空"); From f215b45afaab663c07377a2f5267c1539f22de02 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 26 Jan 2024 10:04:53 +0800 Subject: [PATCH 069/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=E6=94=B9=E9=80=A0=EF=BC=8C=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=B8=A6=E9=80=89=E6=8B=A9=E8=96=AA=E8=B5=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=80=BB=E8=BE=91=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryBillSalaryItemQueryParam.java | 2 ++ .../entity/salarysob/po/SalarySobItemGroupPO.java | 2 +- .../salary/wrapper/SalaryTemplateWrapper.java | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/param/SalaryBillSalaryItemQueryParam.java b/src/com/engine/salary/entity/salaryBill/param/SalaryBillSalaryItemQueryParam.java index 26c819771..fa5540965 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalaryBillSalaryItemQueryParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalaryBillSalaryItemQueryParam.java @@ -16,6 +16,8 @@ public class SalaryBillSalaryItemQueryParam extends BaseQueryParam { private Long groupId; + private String groupName; + private Boolean isReplenish; private List existSalaryItemIds; diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java index 4a6b5502a..64ef8a52f 100644 --- a/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java @@ -34,7 +34,7 @@ public class SalarySobItemGroupPO { private Long salarySobId; /** - * 薪资账套的名称 + * 薪资账套中薪资项目分组的名称 */ private String name; diff --git a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java index 6149b500e..a1d54e5da 100644 --- a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java @@ -9,16 +9,19 @@ import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO; import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; +import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.salarybill.SalaryTemplateReplenishRuleEnum; import com.engine.salary.enums.salarybill.SalaryTemplateVarEnum; import com.engine.salary.enums.salarybill.SalaryTemplateWhetherEnum; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.salarysob.SalarySobItemGroupMapper; import com.engine.salary.service.*; import com.engine.salary.service.impl.*; import com.engine.salary.util.JsonUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.mzlion.core.utils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; @@ -71,6 +74,10 @@ public class SalaryTemplateWrapper extends Service { return ServiceUtil.getService(SalaryBillItemNameServiceImpl.class, user); } + private SalarySobItemGroupMapper getSalarySobItemGroupMapper() { + return MapperProxyFactory.getProxy(SalarySobItemGroupMapper.class); + } + /** * 工资单模板列表 * @@ -479,7 +486,13 @@ public class SalaryTemplateWrapper extends Service { Boolean isReplenish = Optional.ofNullable(param.getIsReplenish()).orElse(false); List salaryItemSet = getSalaryTemplateService(user).getSalaryItemSetContainHide(param.getSalarySobId(), param.getSalaryTemplateId(), isReplenish); Long groupId = param.getGroupId(); - return salaryItemSet.stream().filter(s -> Objects.equals(s.getGroupId(), groupId + "")).map(SalaryTemplateSalaryItemSetListDTO::getItems).findFirst().orElse(Collections.emptyList()).stream().filter(item -> !Optional.ofNullable(param.getExistSalaryItemIds()).orElse(Collections.emptyList()).contains(item.getId())).collect(Collectors.toList()); + //工资单模板copy可能导致groupId不匹配 + List salarySobItemGroupPOS = getSalarySobItemGroupMapper().listSome(SalarySobItemGroupPO.builder().salarySobId(param.getSalarySobId()).name(param.getGroupName()).build()); + if (salarySobItemGroupPOS != null && salarySobItemGroupPOS.size() > 0) { + groupId = salarySobItemGroupPOS.get(0).getId(); + } + Long finalGroupId = groupId; + return salaryItemSet.stream().filter(s -> Objects.equals(s.getGroupId(), finalGroupId + "")).map(SalaryTemplateSalaryItemSetListDTO::getItems).findFirst().orElse(Collections.emptyList()).stream().filter(item -> !Optional.ofNullable(param.getExistSalaryItemIds()).orElse(Collections.emptyList()).contains(item.getId())).collect(Collectors.toList()); } /** From 5e9956fbbf5f35a8884f7c018b962c1f3fe5675b Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 26 Jan 2024 14:56:58 +0800 Subject: [PATCH 070/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF=E6=97=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=A8=A1=E6=9D=BFid=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E6=97=B6?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E4=BA=86=E5=85=B6=E4=BB=96=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E5=91=BD=E5=90=8D=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SalaryTemplateServiceImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index 03df3c980..444a799d8 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -363,10 +363,14 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate public List getSalaryItemSetContainHide(Long salarySobId, Long salaryTemplateId, boolean isReplenish) { SalarySobItemAggregateDTO salarySobItemAggregate = getSalarySobItemService(user).getAggregateBySalarySobId(salarySobId); // 获取工资单薪资项目展示名信息 - List billItemNameList = getSalaryBillItemNameService(user).ListByTemplateAndType( - SalaryBillItemNamePO.builder().salaryTemplateId(salaryTemplateId) - .salaryBillType(isReplenish ? 1 : 0) - .build()); + List billItemNameList = Collections.emptyList(); + if (salaryTemplateId != null) { + billItemNameList = getSalaryBillItemNameService(user).ListByTemplateAndType( + SalaryBillItemNamePO.builder().salaryTemplateId(salaryTemplateId) + .salaryBillType(isReplenish ? 1 : 0) + .build()); + } + Map itemShowNameMap = SalaryEntityUtil.convert2Map(billItemNameList, SalaryBillItemNamePO::getSalaryItemId, SalaryBillItemNamePO::getSalaryItemShowName); List salaryTemplateSalaryItemSetListDTOS = SalaryTemplateBO.convertSalarySobItemAggregateToSalaryItemSet(salarySobItemAggregate, new Long(user.getUID()), isReplenish); From 6a8c9aebe338d4ea011b9958f25036da04ab933c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 29 Jan 2024 10:05:30 +0800 Subject: [PATCH 071/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E6=95=B0=E6=8D=AE=E5=A4=B1=E8=B4=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/biz/AttendQuoteDataValueBiz.java | 28 ++++++++++++------- .../po/AttendQuoteDataValuePO.java | 4 +-- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java index 9096fce51..a9a7c96cc 100644 --- a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java +++ b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java @@ -31,17 +31,25 @@ public class AttendQuoteDataValueBiz { public List listSome(AttendQuoteDataValuePO param) { + List list = new ArrayList<>(); SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class); - return mapper.listSome(param); + + List employeeIds = param.getEmployeeIds(); + List> partition = Lists.partition(employeeIds, 100); + partition.forEach(empIds -> { + param.setEmployeeIds(empIds); + list.addAll(mapper.listSome(param)); + }); } finally { sqlSession.close(); } + return list; } public void insertData(List values) { - if(CollectionUtils.isEmpty(values)){ + if (CollectionUtils.isEmpty(values)) { return; } SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); @@ -68,14 +76,14 @@ public class AttendQuoteDataValueBiz { public void updateDataValue(AttendQuoteDataValuePO po) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class); - mapper.updateDataValueByFiledIdAndEmployeeId(po); - sqlSession.commit(); - } finally { - sqlSession.close(); - } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class); + mapper.updateDataValueByFiledIdAndEmployeeId(po); + sqlSession.commit(); + } finally { + sqlSession.close(); + } } } diff --git a/src/com/engine/salary/entity/datacollection/po/AttendQuoteDataValuePO.java b/src/com/engine/salary/entity/datacollection/po/AttendQuoteDataValuePO.java index 9e76422f0..b9c8cd84f 100644 --- a/src/com/engine/salary/entity/datacollection/po/AttendQuoteDataValuePO.java +++ b/src/com/engine/salary/entity/datacollection/po/AttendQuoteDataValuePO.java @@ -5,8 +5,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.Collection; import java.util.Date; +import java.util.List; /** * 考勤引用数据值表 @@ -63,6 +63,6 @@ public class AttendQuoteDataValuePO { private String tenantKey; //查询参数 - private Collection employeeIds; + private List employeeIds; } \ No newline at end of file From c4adecf436dc5cd1b2dbc93f2d3879b55e51a8d9 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 29 Jan 2024 11:30:04 +0800 Subject: [PATCH 072/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=87=8F=E5=91=98?= =?UTF-8?q?action=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/StayDelToStopSIArchiveAction.java | 19 +++++++++- .../salary/service/SIArchivesService.java | 5 +++ .../service/impl/SIArchivesServiceImpl.java | 38 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/action/StayDelToStopSIArchiveAction.java b/src/com/engine/salary/action/StayDelToStopSIArchiveAction.java index c7aa0a8bf..1c75d42c0 100644 --- a/src/com/engine/salary/action/StayDelToStopSIArchiveAction.java +++ b/src/com/engine/salary/action/StayDelToStopSIArchiveAction.java @@ -1,14 +1,18 @@ package com.engine.salary.action; +import cn.hutool.core.util.StrUtil; import com.engine.common.util.ServiceUtil; import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; +import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SIArchivesService; import com.engine.salary.service.impl.SIArchivesServiceImpl; +import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -84,6 +88,12 @@ public class StayDelToStopSIArchiveAction implements Action { Long taxAgentId = Long.valueOf( taxAgentPOS.get(0).getId() ); Long employeeId = Long.valueOf(importDataMap.getOrDefault("员工id", "-1").toString()); + String payEndYearMonth = importDataMap.getOrDefault("最后缴纳月", "").toString(); + if (StrUtil.isNotBlank(payEndYearMonth) && !SalaryDateUtil.checkYearMonth(payEndYearMonth)) { + requestInfo.getRequestManager().setMessage("最后缴纳月格式有误,正确格式示例为'2021-01'"); + return FAILURE_AND_CONTINUE; + } + //操作人 String uid = importDataMap.getOrDefault("操作人","1").toString(); User user = new User(Integer.parseInt(uid)); @@ -92,12 +102,17 @@ public class StayDelToStopSIArchiveAction implements Action { if(insuranceArchivesBaseInfoPO == null){ requestInfo.getRequestManager().setMessage("该个税扣缴义务人下该员工不存在福利档案,请检查后重试!"); return FAILURE_AND_CONTINUE; - } else if(!insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())){ + } else if(StrUtil.isBlank(payEndYearMonth) && !insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())){ requestInfo.getRequestManager().setMessage("该个税扣缴义务人下该员工的福利档案状态不是待减员,无法进行减员操作,请检查后重试!"); return FAILURE_AND_CONTINUE; } //减员 - Map resultMap = getSIArchivesService(user).stayDelToStop(Collections.singletonList(insuranceArchivesBaseInfoPO.getId())); + Map resultMap = new HashMap<>(); + if (StrUtil.isBlank(payEndYearMonth)) { + resultMap = getSIArchivesService(user).stayDelToStop(Collections.singletonList(insuranceArchivesBaseInfoPO.getId())); + } else { + resultMap = getSIArchivesService(user).stopWithoutLimit(Collections.singletonList(insuranceArchivesBaseInfoPO.getId()), payEndYearMonth); + } if (resultMap.get("type").toString().equals("fail")) { requestInfo.getRequestManager().setMessage(resultMap.get("msg").toString()); return FAILURE_AND_CONTINUE; diff --git a/src/com/engine/salary/service/SIArchivesService.java b/src/com/engine/salary/service/SIArchivesService.java index 3e98c15d3..0bdc90cd9 100644 --- a/src/com/engine/salary/service/SIArchivesService.java +++ b/src/com/engine/salary/service/SIArchivesService.java @@ -74,6 +74,11 @@ public interface SIArchivesService { */ Map stayDelToStop(Collection ids); + /** + * 批量减员,直接减员,并给予最后缴纳月 + */ + Map stopWithoutLimit(Collection ids, String yearMonth); + /** * 全量减员 */ diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 8738c66f9..6e1f5e94a 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -876,6 +876,44 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return resultMap; } + @Override + public Map stopWithoutLimit(Collection ids, String yearMonth) { + + if (CollectionUtils.isEmpty(ids)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "没有可以操作的记录")); + } + List baseInfoPOList = getInsuranceBaseInfoMapper().listByIds(ids); + + //分别新建福利档案基础信息相关的社保、公积金、其他福利档案列表 + List socialList = new ArrayList<>(); + List fundList = new ArrayList<>(); + List otherList = new ArrayList<>(); + //获取待处理的福利档案基础信息id列表 + List baseInfoIds = baseInfoPOList.stream().map(InsuranceArchivesBaseInfoPO::getId).collect(Collectors.toList()); + //分别获取福利档案基础信息相关的社保、公积金、其他福利档案id列表 + List socialIds = baseInfoPOList.stream().map(InsuranceArchivesBaseInfoPO::getSocialArchivesId).collect(Collectors.toList()); + List fundIds = baseInfoPOList.stream().map(InsuranceArchivesBaseInfoPO::getFundArchivesId).collect(Collectors.toList()); + List otherIds = baseInfoPOList.stream().map(InsuranceArchivesBaseInfoPO::getOtherArchivesId).collect(Collectors.toList()); + //进行减员操作 + if (baseInfoIds.size() > 0) { + getInsuranceBaseInfoMapper().updateRunStatusByIds(InsuranceArchivesBaseInfoPO.builder() + .ids(baseInfoIds).runStatus(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue()).build()); + + getSocialSchemeMapper().batchUpdateEndTime(socialIds, yearMonth); + getFundSchemeMapper().batchUpdateEndTime(fundIds, yearMonth); + getOtherSchemeMapper().batchUpdateEndTime(otherIds, yearMonth); + } + + + Map resultMap = new HashMap<>(2); + String resultMsg = "操作成功"; + String resultType = "success"; + + resultMap.put("type", resultType); + resultMap.put("msg", resultMsg); + return resultMap; + } + /** * 全量减员 */ From a78a10cad6209cd656346cdf0c8211e6fc40be9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 29 Jan 2024 15:12:12 +0800 Subject: [PATCH 073/169] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/elog/config/ELogTableChecker.java | 2 +- src/com/engine/salary/elog/service/impl/LocalElogService.java | 2 +- src/com/engine/salary/elog/util/LoggerTemplate.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/elog/config/ELogTableChecker.java b/src/com/engine/salary/elog/config/ELogTableChecker.java index 272da15a7..741dea65c 100644 --- a/src/com/engine/salary/elog/config/ELogTableChecker.java +++ b/src/com/engine/salary/elog/config/ELogTableChecker.java @@ -2,8 +2,8 @@ package com.engine.salary.elog.config; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.mapper.elog.ElogTableCheckerMapper; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; -import dm.jdbc.util.IdGenerator; public class ELogTableChecker { diff --git a/src/com/engine/salary/elog/service/impl/LocalElogService.java b/src/com/engine/salary/elog/service/impl/LocalElogService.java index 3900f4727..404bea1db 100644 --- a/src/com/engine/salary/elog/service/impl/LocalElogService.java +++ b/src/com/engine/salary/elog/service/impl/LocalElogService.java @@ -8,8 +8,8 @@ import com.engine.salary.elog.enums.ElogConsts; import com.engine.salary.elog.service.ILocalElogService; import com.engine.salary.elog.util.ElogUtils; import com.engine.salary.mapper.elog.LocalElogAopDaoMapper; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; -import dm.jdbc.util.IdGenerator; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java index a82021433..842f72783 100644 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ b/src/com/engine/salary/elog/util/LoggerTemplate.java @@ -10,7 +10,7 @@ import com.engine.salary.elog.async.LoggerMessageListener; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.entity.dto.LoggerDetailContext; import com.engine.salary.elog.entity.dto.TableChangeBean; -import dm.jdbc.util.IdGenerator; +import com.engine.salary.util.db.IdGenerator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.ArrayUtils; From 3a0646df9cdf336ccda192d986d294fd3772bd38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 29 Jan 2024 16:21:17 +0800 Subject: [PATCH 074/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/elog/entity/dto/ElogBean.java | 10 +++++----- .../salary/elog/service/impl/LoggerTableService.java | 2 +- src/com/engine/salary/elog/util/ElogServiceUtils.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/engine/salary/elog/entity/dto/ElogBean.java b/src/com/engine/salary/elog/entity/dto/ElogBean.java index b79b0f66e..84a24cfd9 100644 --- a/src/com/engine/salary/elog/entity/dto/ElogBean.java +++ b/src/com/engine/salary/elog/entity/dto/ElogBean.java @@ -16,7 +16,7 @@ public class ElogBean implements Serializable { private static final long serialVersionUID = 5357552376749564256L; private String module; private String function; - private String pageNum; + private String current; private String pageSize; private String dataset; private String searchMap; @@ -42,12 +42,12 @@ public class ElogBean implements Serializable { this.function = function; } - public String getPageNum() { - return pageNum; + public String getCurrent() { + return current; } - public void setPageNum(String pageNum) { - this.pageNum = pageNum; + public void setCurrent(String current) { + this.current = current; } public String getPageSize() { diff --git a/src/com/engine/salary/elog/service/impl/LoggerTableService.java b/src/com/engine/salary/elog/service/impl/LoggerTableService.java index 217872e0c..a40f63488 100644 --- a/src/com/engine/salary/elog/service/impl/LoggerTableService.java +++ b/src/com/engine/salary/elog/service/impl/LoggerTableService.java @@ -91,7 +91,7 @@ public class LoggerTableService extends Service implements ILoggerTableService { String function = elogBean.getFunction(); String searchMap = elogBean.getSearchMap(); String pageSize = elogBean.getPageSize(); - String pageNum = elogBean.getPageNum(); + String pageNum = elogBean.getCurrent(); String downloadSize = elogBean.getDownloadSize(); List filterConditionDtos = elogBean.getFilterConditionDtos(); String transMethod = elogBean.getTransMethod(); diff --git a/src/com/engine/salary/elog/util/ElogServiceUtils.java b/src/com/engine/salary/elog/util/ElogServiceUtils.java index e06225b36..fb2ecafc6 100644 --- a/src/com/engine/salary/elog/util/ElogServiceUtils.java +++ b/src/com/engine/salary/elog/util/ElogServiceUtils.java @@ -40,7 +40,7 @@ public class ElogServiceUtils { ElogBean elogBean = new ElogBean(); String module = datas.getString("module"); String function = datas.getString("function"); - String pageNum = datas.getString("pageNum"); + String pageNum = datas.getString("current"); String pageSize = datas.getString("pageSize"); String searchMap = datas.getString("searchMap"); String transMethod = datas.getString("transMethod"); @@ -53,7 +53,7 @@ public class ElogServiceUtils { Map authParamsJson = JSONObject.parseObject(authParams); elogBean.setModule(module); elogBean.setFunction(function); - elogBean.setPageNum(pageNum); + elogBean.setCurrent(pageNum); elogBean.setPageSize(pageSize); elogBean.setSearchMap(searchMap); elogBean.setTransMethod(transMethod); From a8bfe83030cbdf174974c3fc6a6aa409455a3dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 09:58:13 +0800 Subject: [PATCH 075/169] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/AddUpDeductionBiz.java | 64 +------ .../engine/salary/biz/AddUpSituationBiz.java | 16 -- .../engine/salary/biz/OtherDeductionBiz.java | 16 -- .../salary/config/SalaryElogConfig.java | 170 +++++------------- .../impl/AddUpDeductionServiceImpl.java | 61 ++++++- .../impl/AddUpSituationServiceImpl.java | 120 +++++++++---- .../impl/OtherDeductionServiceImpl.java | 67 ++++++- .../impl/SalaryAcctEmployeeServiceImpl.java | 6 +- .../impl/SalaryAcctExcelServiceImpl.java | 6 +- .../impl/SalaryAcctRecordServiceImpl.java | 10 +- .../impl/SalaryAcctResultServiceImpl.java | 5 +- .../service/impl/SalaryItemServiceImpl.java | 10 +- .../impl/SalarySobAdjustRuleServiceImpl.java | 25 ++- .../impl/SalarySobCheckRuleServiceImpl.java | 64 +++---- .../impl/SalarySobExtRangeServiceImpl.java | 2 - .../impl/SalarySobItemServiceImpl.java | 25 +-- .../impl/SalarySobRangeServiceImpl.java | 30 ++-- .../impl/SysSalaryItemServiceImpl.java | 29 +-- .../engine/salary/util/SalaryLoggerUtil.java | 139 +++++++------- 19 files changed, 433 insertions(+), 432 deletions(-) diff --git a/src/com/engine/salary/biz/AddUpDeductionBiz.java b/src/com/engine/salary/biz/AddUpDeductionBiz.java index 8b9ffa0a4..ef512160b 100644 --- a/src/com/engine/salary/biz/AddUpDeductionBiz.java +++ b/src/com/engine/salary/biz/AddUpDeductionBiz.java @@ -12,8 +12,8 @@ import org.apache.ibatis.session.SqlSession; import weaver.conn.mybatis.MyBatisFactory; import weaver.general.BaseBean; -import java.util.*; -import java.util.stream.Collectors; +import java.util.ArrayList; +import java.util.List; public class AddUpDeductionBiz extends BaseBean { @@ -145,67 +145,7 @@ public class AddUpDeductionBiz extends BaseBean { } - /** - * 处理导入数据 - * - * @param pos - */ - public void handleImportData(List pos) { - if (CollectionUtils.isEmpty(pos)) { - return; - } - AddUpDeduction po = pos.get(0); - // 多条相同人的则以第一条为准,如果逆序排列(用于重复的则以最后一条为准)Collections.reverse(pos); - // 去重(通过记录的唯一条件(申报月份,人员id,个税扣缴义务人id)拼接) - List finalPos = pos.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getEmployeeId() + "-" + f.getTaxAgentId()))), ArrayList::new)); - // 查询已有数据 - List list = listSome(AddUpDeduction.builder().declareMonth(po.getDeclareMonth()).build()); - // 待修改的 本地已存在则更新【交集】 - List updateList = list.stream().map(m -> { - Optional optional = finalPos.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); - AddUpDeduction temp = null; - if (optional.isPresent()) { - temp = optional.get(); - // 换成本地库的id - temp.setId(m.getId()); - } - return temp; - }).filter(Objects::nonNull).collect(Collectors.toList()); - // 待新增的 导入比本地多,则新增【差集(导入 - local)】 - List saveList = finalPos.stream().map(m -> { - Optional optional = list.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); - AddUpDeduction temp = null; - if (!optional.isPresent()) { - temp = m; - } - return temp; - }).filter(Objects::nonNull).collect(Collectors.toList()); - // 修改 - if (CollectionUtils.isNotEmpty(updateList)) { - batchUpdate(updateList); - } - // 保存 - if (CollectionUtils.isNotEmpty(saveList)) { - batchSave(saveList); - } - // 记录操作日志 -// saveList.addAll(updateList); -// -// if (CollectionUtils.isNotEmpty(saveList)) { -// LoggerContext loggerContext = new LoggerContext(); -// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setNewValueList(saveList); -// loggerContext.setTenant_key(message.getTenantKey()); -// loggerContext.setOperator(message.getUserId().toString()); -// loggerContext.setOperatorName(message.getOpreator()); -// loggerContext.setClientIp(message.getClientIp()); -// addUpDeductionLoggerTemplate.write(loggerContext); -// } - } public void batchDeleteByIDS(List ids) { diff --git a/src/com/engine/salary/biz/AddUpSituationBiz.java b/src/com/engine/salary/biz/AddUpSituationBiz.java index e1fbdb901..b3d47b935 100644 --- a/src/com/engine/salary/biz/AddUpSituationBiz.java +++ b/src/com/engine/salary/biz/AddUpSituationBiz.java @@ -185,22 +185,6 @@ public class AddUpSituationBiz extends BaseBean { if (CollectionUtils.isNotEmpty(saveList)) { batchSave(saveList); } - // 记录操作日志 -// saveList.addAll(updateList); -// -// if (CollectionUtils.isNotEmpty(saveList)) { -// LoggerContext loggerContext = new LoggerContext(); -// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setNewValueList(saveList); -// loggerContext.setTenant_key(message.getTenantKey()); -// loggerContext.setOperator(message.getUserId().toString()); -// loggerContext.setOperatorName(message.getOpreator()); -// loggerContext.setClientIp(message.getClientIp()); -// AddUpSituationLoggerTemplate.write(loggerContext); -// } } diff --git a/src/com/engine/salary/biz/OtherDeductionBiz.java b/src/com/engine/salary/biz/OtherDeductionBiz.java index 1b107764c..5a843f8ee 100644 --- a/src/com/engine/salary/biz/OtherDeductionBiz.java +++ b/src/com/engine/salary/biz/OtherDeductionBiz.java @@ -169,22 +169,6 @@ public class OtherDeductionBiz extends BaseBean { if (CollectionUtils.isNotEmpty(saveList)) { batchSave(saveList); } - // 记录操作日志 -// saveList.addAll(updateList); -// -// if (CollectionUtils.isNotEmpty(saveList)) { -// LoggerContext loggerContext = new LoggerContext(); -// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(message.getTenantKey(), message.getUserId(), 100351, "导入累计专项附加扣除")); -// loggerContext.setNewValueList(saveList); -// loggerContext.setTenant_key(message.getTenantKey()); -// loggerContext.setOperator(message.getUserId().toString()); -// loggerContext.setOperatorName(message.getOpreator()); -// loggerContext.setClientIp(message.getClientIp()); -// addUpDeductionLoggerTemplate.write(loggerContext); -// } } diff --git a/src/com/engine/salary/config/SalaryElogConfig.java b/src/com/engine/salary/config/SalaryElogConfig.java index 7156eeff4..9f72846ea 100644 --- a/src/com/engine/salary/config/SalaryElogConfig.java +++ b/src/com/engine/salary/config/SalaryElogConfig.java @@ -18,289 +18,219 @@ public class SalaryElogConfig { * * @return */ - public static LoggerTemplate taxRateLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "taxrate"); - } + public final static LoggerTemplate taxRateLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "taxrate"); /** * 薪资项目 * * @return */ - public static LoggerTemplate salaryItemLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salaryitem"); - } + public static LoggerTemplate salaryItemLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salaryitem"); /** * 个税扣缴义务人 * * @return */ - public static LoggerTemplate taxAgentLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "taxagent"); - } + public static LoggerTemplate taxAgentLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "taxagent"); - public static LoggerTemplate siCategoryLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "siCategory"); - } + public static LoggerTemplate siCategoryLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "siCategory"); - public static LoggerTemplate siSchemeLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "siScheme"); - } + public static LoggerTemplate siSchemeLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "siScheme"); - public static LoggerTemplate totalSchemeLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "totalScheme"); - } + public static LoggerTemplate totalSchemeLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "totalScheme"); /** * 累计情况 * * @return */ - public static LoggerTemplate addUpSituationLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "addupsituation"); - } + public static LoggerTemplate addUpSituationLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "addupsituation"); /** * 累计专项附加扣除 * * @return */ - public static LoggerTemplate addUpDeductionLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "addupdeduction"); - } + public static LoggerTemplate addUpDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "addupdeduction"); /** * 其他免税扣除 * * @return */ - public static LoggerTemplate otherDeductionLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "otherdeduction"); - } + public static LoggerTemplate otherDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "otherdeduction"); /** * 减税 * * @return */ - public static LoggerTemplate derateDeductionLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "deratededuction"); - } + public static LoggerTemplate derateDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "deratededuction"); /** * 税延养老保险 * * @return */ - public static LoggerTemplate endowmentInsuranceLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "endowmentinsurance"); - } + public static LoggerTemplate endowmentInsuranceLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "endowmentinsurance"); /** * 税延养老保险 * * @return */ - public static LoggerTemplate freeIncomeLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "freeincome"); - } + public static LoggerTemplate freeIncomeLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "freeincome"); /** * 捐赠免税 * * @return */ - public static LoggerTemplate grantDonationLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "grantdonation"); - } + public static LoggerTemplate grantDonationLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "grantdonation"); /** * 捐赠免税 * * @return */ - public static LoggerTemplate healthInsuranceLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "healthinsurance"); - } + public static LoggerTemplate healthInsuranceLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "healthinsurance"); /** * 其他免税扣除 * * @return */ - public static LoggerTemplate otherDerateDeductionLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "otherderatededuction"); - } + public static LoggerTemplate otherDerateDeductionLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "otherderatededuction"); /** * 考勤引用 * * @return */ - public static LoggerTemplate attendQuoteLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "attendquote"); - } + public static LoggerTemplate attendQuoteLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "attendquote"); /** * 考勤引用字段管理 * * @return */ - public static LoggerTemplate attendQuoteFieldLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "attendfield"); - } + public static LoggerTemplate attendQuoteFieldLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "attendfield"); /** * 考勤引用字段设置 * * @return */ - public static LoggerTemplate attendQuoteFieldSettingLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "attendfieldset"); - } + public static LoggerTemplate attendQuoteFieldSettingLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "attendfieldset"); /** * 薪资账套 * * @return */ - public static LoggerTemplate salarySobLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarysob"); - } + public static LoggerTemplate salarySobLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarysob"); /** * 薪资核算 * * @return */ - public static LoggerTemplate salaryAcctRecordLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "acctrecord"); - } - + public static LoggerTemplate salaryAcctRecordLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "acctrecord"); /** * 个税申报表 * * @return */ - public static LoggerTemplate taxDeclarationLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "taxdecla"); - } + public static LoggerTemplate taxDeclarationLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "taxdecla"); /** * 福利档案 * * @return */ - public static LoggerTemplate siArchivesLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "siarchives"); - } + public static LoggerTemplate siArchivesLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "siarchives"); /** * 社保规则 */ - public static LoggerTemplate archiveRuleLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "archiverule"); - } + public static LoggerTemplate archiveRuleLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "archiverule"); /** * 代缴机构 * * @return */ - public static LoggerTemplate paymentAgencyLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "paymentagency"); - } + public static LoggerTemplate paymentAgencyLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "paymentagency"); /** * 福利核算 * * @return */ - public static LoggerTemplate siAccountLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "siaccount"); - } + public static LoggerTemplate siAccountLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "siaccount"); /** * 工资单模板 * * @return */ - public static LoggerTemplate salaryTemplateLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarytemplate"); - } + public static LoggerTemplate salaryTemplateLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarytemplate"); /** * 工资单发放 * * @return */ - public static LoggerTemplate salarySendLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarysend"); - } + public static LoggerTemplate salarySendLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarysend"); /** * 外部人员 * * @return */ - public static LoggerTemplate extEmployeeLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "extemployee"); - } + public static LoggerTemplate extEmployeeLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "extemployee"); /** * 薪资档案 * * @return */ - public static LoggerTemplate salaryArchiveLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salaryarchive"); - } + public static LoggerTemplate salaryArchiveLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salaryarchive"); /** * 薪资档案-字段 * * @return */ - public static LoggerTemplate salaryArchiveFieldLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarcfield"); - } - + public static LoggerTemplate salaryArchiveFieldLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarcfield"); /** * 薪资档案-薪资项目调整 * * @return */ - public static LoggerTemplate salaryArchiveItemAdjustLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarcitemadj"); - } + public static LoggerTemplate salaryArchiveItemAdjustLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarcitemadj"); /** * 薪资档案-批量调薪 * * @return */ - public static LoggerTemplate salaryArchiveBatchAdjustLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "salarcbatadj"); - } + public static LoggerTemplate salaryArchiveBatchAdjustLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "salarcbatadj"); /** * 自定义业务数据设置 * * @return */ - public static LoggerTemplate customDataSetLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "customdataset"); - } + public static LoggerTemplate customDataSetLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "customdataset"); /** * 自定义业务数据 * * @return */ - public static LoggerTemplate customDataLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "customdata"); - } + public static LoggerTemplate customDataLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "customdata"); /** @@ -308,63 +238,49 @@ public class SalaryElogConfig { * * @return */ - public static LoggerTemplate employeeDeclareLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "empdeclare"); - } + public static LoggerTemplate employeeDeclareLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "empdeclare"); /** * 单位扣款账号 * * @return */ - public static LoggerTemplate withholdAccountLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "whaccount"); - } + public static LoggerTemplate withholdAccountLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "whaccount"); /** * 银行报盘 * * @return */ - public static LoggerTemplate bankOfferLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "bankoffer"); - } + public static LoggerTemplate bankOfferLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "bankoffer"); /** * 银行报盘模板 * * @return */ - public static LoggerTemplate bankOfferTemplateLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "botemplate"); - } + public static LoggerTemplate bankOfferTemplateLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "botemplate"); /** * 薪酬体系标准(岗薪制) * * @return */ - public static LoggerTemplate postSalaryLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "postsalary"); - } + public static LoggerTemplate postSalaryLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "postsalary"); /** * 银行报盘模板 * * @return */ - public static LoggerTemplate taxFreeDetailLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "taxfreedetail"); - } + public static LoggerTemplate taxFreeDetailLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "taxfreedetail"); /** * 最优年终奖计税方案 * * @return */ - public static LoggerTemplate annualBonusPlanLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "annualplan"); - } + public static LoggerTemplate annualBonusPlanLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "annualplan"); /** * 最优年终奖计税方案-累计情况 @@ -372,7 +288,5 @@ public class SalaryElogConfig { * * @return */ - public static LoggerTemplate annualBonusLoggerTemplate() { - return LoggerTemplateBuilder.build("hrsa", "annualbonus"); - } + public static LoggerTemplate annualBonusLoggerTemplate = LoggerTemplateBuilder.build("hrsa", "annualbonus"); } diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index bb0242cf4..ee208bf2d 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -11,6 +11,8 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.AddUpDeductionBiz; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -27,6 +29,7 @@ import com.engine.salary.entity.taxagent.bo.TaxAgentBO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -385,7 +388,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } } //入库 - addUpDeductionBiz.handleImportData(eligibleData); + handleImportData(eligibleData); apidatas.put("successCount", successCount); apidatas.put("errorCount", errorCount); apidatas.put("errorData", errorData); @@ -396,6 +399,60 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction return apidatas; } + public void handleImportData(List pos) { + if (CollectionUtils.isEmpty(pos)) { + return; + } + AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz(); + AddUpDeduction po = pos.get(0); + // 多条相同人的则以第一条为准,如果逆序排列(用于重复的则以最后一条为准)Collections.reverse(pos); + // 去重(通过记录的唯一条件(申报月份,人员id,个税扣缴义务人id)拼接) + List finalPos = pos.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getEmployeeId() + "-" + f.getTaxAgentId()))), ArrayList::new)); + // 查询已有数据 + List list = addUpDeductionBiz.listSome(AddUpDeduction.builder().declareMonth(po.getDeclareMonth()).build()); + // 待修改的 本地已存在则更新【交集】 + List updateList = list.stream().map(m -> { + Optional optional = finalPos.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + AddUpDeduction temp = null; + if (optional.isPresent()) { + temp = optional.get(); + // 换成本地库的id + temp.setId(m.getId()); + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + // 待新增的 导入比本地多,则新增【差集(导入 - local)】 + List saveList = finalPos.stream().map(m -> { + Optional optional = list.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + AddUpDeduction temp = null; + if (!optional.isPresent()) { + temp = m; + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + + // 修改 + if (CollectionUtils.isNotEmpty(updateList)) { + addUpDeductionBiz.batchUpdate(updateList); + } + // 保存 + if (CollectionUtils.isNotEmpty(saveList)) { + addUpDeductionBiz.batchSave(saveList); + } + // 记录操作日志 + saveList.addAll(updateList); + + if (CollectionUtils.isNotEmpty(saveList)) { + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setNewValueList(saveList); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + } + } @Override public void editAddUpDeduction(AddUpDeductionRecordParam addUpDeduction) { @@ -529,7 +586,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction addUpDeduction.setAddUpInfantCare(Util.null2String(addUpDeductionRecordParam.getAddUpInfantCare())); insertData.add(addUpDeduction); //入库 - addUpDeductionBiz.handleImportData(insertData); + handleImportData(insertData); } @Override diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index e4965928c..ecc029dbb 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -8,6 +8,8 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.AddUpSituationBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.AddUpSituation; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -20,6 +22,7 @@ import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam; import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.AddUpSituationMapper; @@ -274,7 +277,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation // excel标题 final List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计收入额", "累计减除费用", "累计社保个人合计", "累计公积金个人合计", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", - "累计大病医疗", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护","累计个人养老金"); + "累计大病医疗", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护", "累计个人养老金"); //排序配置 OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); @@ -340,7 +343,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation //excel标题 List title = Arrays.asList("姓名", "税款所属期", "个税扣缴义务人", "部门", "手机号", "工号", "累计收入额", "累计减除费用", "累计社保个人合计", "累计公积金个人合计", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计企业(职业)年金及其他福利", - "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护","累计个人养老金"); + "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护", "累计个人养老金"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); //查询详细信息 @@ -609,7 +612,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation // 获取已经核算的数据(获取税款所属期下一个月的数据) YearMonth nextTaxYearMonth = SalaryDateUtil.String2YearMonth(taxYearMonthStr); String nextTaxYearMonthStr = taxYearMonthStr; - if( !Objects.equals(nextTaxYearMonth.getMonthValue(),12) ){ + if (!Objects.equals(nextTaxYearMonth.getMonthValue(), 12)) { nextTaxYearMonth = nextTaxYearMonth.plusMonths(1); nextTaxYearMonthStr = nextTaxYearMonth.format(SalaryDateUtil.MONTH_FORMATTER); } @@ -693,7 +696,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation errorMessageMap.put("message", rowIndex + "员工信息不存在或者存在多个员工"); errorData.add(errorMessageMap); errorSum += 1; - }else { + } else { Long employeeId = CollectionUtils.isNotEmpty(employeeSameIds) && employeeSameIds.size() == 1 ? employeeSameIds.get(0).getEmployeeId() : null; po.setEmployeeId(employeeId); } @@ -744,7 +747,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation // } // 判断是否有核算过 - if (CollectionUtils.isNotEmpty(salaryAcctEmployees) && !Objects.equals(taxYearMonthStr.split("-")[1], "12") ) { + if (CollectionUtils.isNotEmpty(salaryAcctEmployees) && !Objects.equals(taxYearMonthStr.split("-")[1], "12")) { Optional optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId())).findFirst(); boolean isExist = list.stream().anyMatch(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId())); if (optionalAcctEmp.isPresent() && isExist) { @@ -815,7 +818,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } //入库 - biz.handleImportData(eligibleData); + handleImportData(eligibleData); apidatas.put("successCount", successCount); apidatas.put("errorCount", errorCount); @@ -827,6 +830,61 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation return apidatas; } + public void handleImportData(List pos) { + if (CollectionUtils.isEmpty(pos)) { + return; + } + AddUpSituationBiz biz = new AddUpSituationBiz(); + AddUpSituation po = pos.get(0); + // 多条相同人的则以第一条为准,如果逆序排列(用于重复的则以最后一条为准)Collections.reverse(pos); + // 去重(通过记录的唯一条件(申报月份,人员id,个税扣缴义务人id)拼接) + List finalPos = pos.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getEmployeeId() + "-" + f.getTaxAgentId()))), ArrayList::new)); + // 查询已有数据 + List list = biz.listSome(AddUpSituation.builder().taxYearMonth(po.getTaxYearMonth()).build()); + // 待修改的 本地已存在则更新【交集】 + List updateList = list.stream().map(m -> { + Optional optional = finalPos.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + AddUpSituation temp = null; + if (optional.isPresent()) { + temp = optional.get(); + // 换成本地库的id + temp.setId(m.getId()); + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + // 待新增的 导入比本地多,则新增【差集(导入 - local)】 + List saveList = finalPos.stream().map(m -> { + Optional optional = list.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + AddUpSituation temp = null; + if (!optional.isPresent()) { + temp = m; + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + + // 修改 + if (CollectionUtils.isNotEmpty(updateList)) { + biz.batchUpdate(updateList); + } + // 保存 + if (CollectionUtils.isNotEmpty(saveList)) { + batchSave(saveList); + } +// 记录操作日志 + saveList.addAll(updateList); + + if (CollectionUtils.isNotEmpty(saveList)) { + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setNewValueList(saveList); + SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); + } + } + private void checkImportParam(AddUpSituationImportParam importParam) { @@ -846,8 +904,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } /** - * @description 编辑数据 * @return void + * @description 编辑数据 * @author Harryxzy * @date 2022/10/27 21:32 */ @@ -860,12 +918,12 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation // 获取所有个税扣缴义务人 Collection taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); AddUpSituation byId = biz.getById(addUpSituationParam.getId()); - if(byId == null){ + if (byId == null) { throw new SalaryRunTimeException("该数据不存在!"); } Long taxAgentId = byId.getTaxAgentId(); - boolean canEdit = taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId() , taxAgentId)); - if(!canEdit){ + boolean canEdit = taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), taxAgentId)); + if (!canEdit) { //没有编辑权限 throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!"); } @@ -873,14 +931,14 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation // 获取已经核算的数据(获取税款所属期下一个月的数据) YearMonth nextTaxYearMonth = SalaryDateUtil.String2YearMonth(taxYearMonthStr); String nextTaxYearMonthStr = taxYearMonthStr; - if( !Objects.equals(nextTaxYearMonth.getMonthValue(),12) ){ + if (!Objects.equals(nextTaxYearMonth.getMonthValue(), 12)) { nextTaxYearMonth = nextTaxYearMonth.plusMonths(1); nextTaxYearMonthStr = nextTaxYearMonth.format(SalaryDateUtil.MONTH_FORMATTER); } List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeDataByTaxYearMonth(nextTaxYearMonthStr); // 判断是否有核算过 - if (CollectionUtils.isNotEmpty(salaryAcctEmployees) && !Objects.equals(taxYearMonthStr.split("-")[1], "12")) { + if (CollectionUtils.isNotEmpty(salaryAcctEmployees) && !Objects.equals(taxYearMonthStr.split("-")[1], "12")) { Optional optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(addUpSituationParam.getEmployeeId()) && f.getTaxAgentId().equals(addUpSituationParam.getTaxAgentId())).findFirst(); if (optionalAcctEmp.isPresent()) { throw new SalaryRunTimeException("该年月这条数据已经核算过,不可进行编辑!"); @@ -903,8 +961,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } /** - * @description 新建数据 * @return void + * @description 新建数据 * @author Harryxzy * @date 2022/10/27 22:04 */ @@ -947,8 +1005,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - boolean employeeSameId = employees.stream().anyMatch(e -> Objects.equals(e.getEmployeeId() , addUpSituationParam.getEmployeeId())); - if(!employeeSameId){ + boolean employeeSameId = employees.stream().anyMatch(e -> Objects.equals(e.getEmployeeId(), addUpSituationParam.getEmployeeId())); + if (!employeeSameId) { throw new SalaryRunTimeException("员工信息不存在"); } po.setEmployeeId(addUpSituationParam.getEmployeeId()); @@ -967,7 +1025,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } } - // fixme 分权判断,若员工离职后,不在扣缴义务人范围内,会有异常 + // fixme 分权判断,若员工离职后,不在扣缴义务人范围内,会有异常 // if (openDevolution) { // Optional optionalTaxAgentEmp = taxAgentEmployees.stream().filter(f -> f.getEmployeeId().equals(po.getEmployeeId())).findFirst(); // if (!optionalTaxAgentEmp.isPresent()) { @@ -1036,7 +1094,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation insertList.add(po); //入库 - biz.handleImportData(insertList); + handleImportData(insertList); } @Override @@ -1055,15 +1113,15 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(format); // 判断是否有核算过 List deleteList = new ArrayList<>(); - for(int i=0; i first = taxAgentList.stream().filter(m -> Objects.equals(m.getTaxAgentId() , byId.getTaxAgentId())).findFirst(); - if(!first.isPresent()){ + Optional first = taxAgentList.stream().filter(m -> Objects.equals(m.getTaxAgentId(), byId.getTaxAgentId())).findFirst(); + if (!first.isPresent()) { throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内"); } // 判断用户是否存在 @@ -1089,23 +1147,23 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation AddUpSituationBiz biz = new AddUpSituationBiz(); Date declareMonthDate = new Date(); try { - declareMonthDate = (sdf.parse(declareMonthStr+"-01")); - }catch (Exception e){ + declareMonthDate = (sdf.parse(declareMonthStr + "-01")); + } catch (Exception e) { throw new SalaryRunTimeException("日期异常"); } AddUpSituation queryParam = null; - if(deleteParam.getTaxAgentId() != null && !deleteParam.getTaxAgentId().isEmpty()){ + if (deleteParam.getTaxAgentId() != null && !deleteParam.getTaxAgentId().isEmpty()) { // 设置了个税扣缴义务人 Long taxAgentId = SalaryEntityUtil.string2Long(deleteParam.getTaxAgentId()); - boolean canDelete = taxAgentIds.stream().anyMatch(t -> Objects.equals(t , taxAgentId)); - if(!canDelete){ + boolean canDelete = taxAgentIds.stream().anyMatch(t -> Objects.equals(t, taxAgentId)); + if (!canDelete) { throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内!"); } ArrayList tai = new ArrayList<>(); tai.add(taxAgentId); - queryParam = AddUpSituation.builder().taxYearMonth(declareMonthDate).taxAgentIds(tai).build(); - }else { + queryParam = AddUpSituation.builder().taxYearMonth(declareMonthDate).taxAgentIds(tai).build(); + } else { queryParam = AddUpSituation.builder().taxYearMonth(declareMonthDate).taxAgentIds(taxAgentIds).build(); } @@ -1115,7 +1173,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation String format = salaryMonthDate.plusMonths(1).atStartOfDay().format(DateTimeFormatter.ofPattern("yyyy-MM")); // 获取已经核算的数据 List employees = getAddUpDeductionService(user).getAccountedEmployeeData(format); - for(AddUpSituation item : list){ + for (AddUpSituation item : list) { if (CollectionUtils.isNotEmpty(employees)) { Optional optionalAcctEmp = employees.stream().filter(f -> f.getEmployeeId().equals(item.getEmployeeId()) && f.getTaxAgentId().equals(item.getTaxAgentId())).findFirst(); if (optionalAcctEmp.isPresent()) { @@ -1137,11 +1195,11 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation ids.add(addUpSituationParam.getId()); AddUpSituationQueryParam build = AddUpSituationQueryParam.builder().ids(ids).build(); List list = biz.recordList(build); - if(list == null || list.size()==0){ + if (list == null || list.size() == 0) { throw new SalaryRunTimeException("该数据不存在!"); } String taxAgentName = list.get(0).getTaxAgentName(); - if(!taxAgentNames.contains(taxAgentName)){ + if (!taxAgentNames.contains(taxAgentName)) { throw new SalaryRunTimeException("您无权查看该数据!"); } return list.get(0); diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index dbe2e113b..e8cd2de13 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -5,7 +5,9 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.OtherDeductionBiz; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO; @@ -15,6 +17,7 @@ import com.engine.salary.entity.datacollection.po.OtherDeductionPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.OtherDeductionMapper; @@ -370,6 +373,66 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction return apidatas; } + /** + * 处理导入数据 + * + * @param pos + */ + public void handleImportData(List pos) { + if (CollectionUtils.isEmpty(pos)) { + return; + } + OtherDeductionBiz otherDeductionBiz = new OtherDeductionBiz(); + OtherDeductionPO po = pos.get(0); + // 多条相同人的则以第一条为准,如果逆序排列(用于重复的则以最后一条为准)Collections.reverse(pos); + // 去重(通过记录的唯一条件(申报月份,人员id,个税扣缴义务人id)拼接) + List finalPos = pos.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getEmployeeId() + "-" + f.getTaxAgentId()))), ArrayList::new)); + // 查询已有数据 + List list = otherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(po.getDeclareMonth()).build()); + // 待修改的 本地已存在则更新【交集】 + List updateList = list.stream().map(m -> { + Optional optional = finalPos.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + OtherDeductionPO temp = null; + if (optional.isPresent()) { + temp = optional.get(); + // 换成本地库的id + temp.setId(m.getId()); + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + // 待新增的 导入比本地多,则新增【差集(导入 - local)】 + List saveList = finalPos.stream().map(m -> { + Optional optional = list.stream().filter(p -> (p.getEmployeeId() + "-" + p.getTaxAgentId()).equals(m.getEmployeeId() + "-" + m.getTaxAgentId())).findFirst(); + OtherDeductionPO temp = null; + if (!optional.isPresent()) { + temp = m; + } + return temp; + }).filter(Objects::nonNull).collect(Collectors.toList()); + + // 修改 + if (CollectionUtils.isNotEmpty(updateList)) { + otherDeductionBiz.batchUpdate(updateList); + } + // 保存 + if (CollectionUtils.isNotEmpty(saveList)) { + otherDeductionBiz.batchSave(saveList); + } + // 记录操作日志 + saveList.addAll(updateList); + + if (CollectionUtils.isNotEmpty(saveList)) { + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 100351, "新增累计专项附加扣除")); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 100351, "新增计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 100351, "新增累计专项附加扣除")); + loggerContext.setNewValueList(saveList); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + } + } + private void checkImportParam(OtherDeductionImportParam importParam) { //excel文件id String imageId = Util.null2String(importParam.getImageId()); @@ -513,7 +576,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction */ private List> getExcelRowDetailList(OtherDeductionQueryParam param) { //excel标题 - List title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "手机号", "工号", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额","个人养老金"); + List title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "手机号", "工号", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); //查询详细信息 @@ -676,7 +739,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } insertData.add(po); //入库 - OtherDeductionBiz.handleImportData(insertData); + handleImportData(insertData); } @Override diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index 36cf1186f..b6ca36e33 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -7,7 +7,6 @@ import com.engine.core.impl.Service; import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO; import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO; @@ -55,7 +54,6 @@ import java.util.stream.Collectors; **/ @Slf4j public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcctEmployeeService { - private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctEmployeeMapper getSalaryAcctEmployeeMapper() { return MapperProxyFactory.getProxy(SalaryAcctEmployeeMapper.class); @@ -403,7 +401,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员") + ":" + targetName); loggerContext.setNewValueList(salaryAcctEmployeePOS); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override @@ -470,7 +468,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员") + ":" + targetName); loggerContext.setOldValueList(salaryAcctEmployeePOS); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index a4c1a8512..3ce380565 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -9,7 +9,6 @@ import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.constant.SalaryItemConstant; import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.report.po.SalaryAcctResultReportPO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO; @@ -46,6 +45,7 @@ import com.engine.salary.util.JsonUtil; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtilPlus; @@ -55,7 +55,6 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.wbi.util.Util; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; @@ -87,7 +86,6 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; **/ @Slf4j public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExcelService { - private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctRecordService getSalaryAcctRecordService(User user) { return (SalaryAcctRecordService) ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user); @@ -259,7 +257,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员") + ":" + targetName); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 1d3e300ef..c13e6ca71 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -6,7 +6,6 @@ import com.engine.core.impl.Service; import com.engine.salary.common.LocalDateRange; import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.salaryBill.po.SalarySendPO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO; import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam; @@ -52,7 +51,6 @@ import java.util.stream.Collectors; * @version 1.0 **/ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRecordService { - private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private SalaryAcctRecordMapper getSalaryAcctRecordMapper() { return MapperProxyFactory.getProxy(SalaryAcctRecordMapper.class); @@ -309,7 +307,7 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); // 返回薪资核算记录id return salaryAcctRecordPO.getId(); } @@ -543,7 +541,7 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算") + ":" + targetName); loggerContext.setNewValues(salaryAcctRecordPO); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); }); } @@ -585,7 +583,7 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @Override @@ -635,7 +633,7 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98820, "重新核算")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98820, "重新核算") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 2f5bd2403..d0527642e 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -86,7 +86,6 @@ import java.util.stream.Collectors; **/ @Slf4j public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctResultService { - private final LoggerTemplate salaryAcctRecordLoggerTemplate = SalaryElogConfig.salaryAcctRecordLoggerTemplate(); private EncryptUtil encryptUtil = new EncryptUtil(); private SalaryAcctResultMapper getSalaryAcctResultMapper() { @@ -665,7 +664,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); loggerContext.setNewValueList(Lists.newArrayList(salaryAcctResultPOS)); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } /** @@ -869,7 +868,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); - salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } catch (Exception e) { log.info("薪资核算出错:{}", e.getMessage(), e); // throw new SalaryRunTimeException(e); diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index db4639b2c..c43393c10 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -7,7 +7,6 @@ import com.engine.salary.biz.SalaryItemBiz; import com.engine.salary.biz.SysSalaryItemBiz; import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.entity.salaryformula.po.FormulaPO; import com.engine.salary.entity.salaryformula.po.FormulaVar; import com.engine.salary.entity.salaryitem.bo.SalaryItemBO; @@ -80,9 +79,6 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService return ServiceUtil.getService(SalarySobServiceImpl.class, user); } - private LoggerTemplate salaryItemLoggerTemplate = SalaryElogConfig.salaryItemLoggerTemplate(); - - private SysSalaryItemBiz sysSalaryItemBiz = new SysSalaryItemBiz(); // @Autowired // private LoggerTemplate salaryItemLoggerTemplate; @@ -217,7 +213,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目") + ": " + salaryItemPO.getName()); loggerContext.setNewValues(salaryItemPO); - salaryItemLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); } @Override @@ -301,7 +297,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); loggerContext.setOldValues(salaryItemPO); loggerContext.setNewValues(newSalaryItemPO); - salaryItemLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); } private void changeName(SalaryItemPO salaryItemPO, String oldName, String newName, String itemPrefix, String fieldNamePrefix) { @@ -365,7 +361,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目") + ": " + salaryItemPO.getName()); loggerContext.setOldValues(salaryItemPO); - salaryItemLoggerTemplate.write(loggerContext); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); }); } diff --git a/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java index 989fc9ce7..c068f377d 100644 --- a/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java @@ -2,10 +2,13 @@ package com.engine.salary.service.impl; import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySobAdjustRuleBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salarysob.bo.SalarySobAdjustRuleBO; import com.engine.salary.entity.salarysob.param.SalarySobAdjustRuleSaveParam; import com.engine.salary.entity.salarysob.po.SalarySobAdjustRulePO; import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salarysob.SalarySobAdjustRuleMapper; import com.engine.salary.mapper.salarysob.SalarySobMapper; @@ -40,7 +43,6 @@ public class SalarySobAdjustRuleServiceImpl extends Service implements SalarySob return MapperProxyFactory.getProxy(SalarySobAdjustRuleMapper.class); } -// private LoggerTemplate salarySobLoggerTemplate; @Override public List listBySalarySobId(Long salarySobId) { @@ -76,20 +78,13 @@ public class SalarySobAdjustRuleServiceImpl extends Service implements SalarySob salarySobAdjustRuleMapper.batchInsert(salarySobAdjustRulePOS); } // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(salarySobPO.getId())); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); -// salarySobLoggerTemplate.write(loggerContext); -// } catch (Exception e) { -// sqlSession.rollback(); -// throw new SalaryRunTimeException(e); -// }finally { -// sqlSession.commit(); -// sqlSession.close(); -// } + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(String.valueOf(salarySobPO.getId())); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java index 58f90b4e2..7d22fe009 100644 --- a/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java @@ -3,12 +3,15 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySobCheckRuleBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salarysob.bo.SalarySobCheckRuleBO; import com.engine.salary.entity.salarysob.param.SalarySobCheckRuleQueryParam; import com.engine.salary.entity.salarysob.param.SalarySobCheckRuleSaveParam; import com.engine.salary.entity.salarysob.param.UpdateCheckRuleFormulaParam; import com.engine.salary.entity.salarysob.po.SalarySobCheckRulePO; import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.SalarySobCheckRuleService; import com.engine.salary.service.SalarySobService; @@ -37,7 +40,6 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC private SalarySobService getSalarySobService(User user) { return (SalarySobService) ServiceUtil.getService(SalarySobServiceImpl.class, user); } -// private LoggerTemplate salarySobLoggerTemplate; @Override public SalarySobCheckRulePO getById(Long id) { @@ -84,15 +86,15 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC SalarySobCheckRulePO salarySobCheckRulePO = SalarySobCheckRuleBO.convert2PO(saveParam, (long) user.getUID()); // 保存 salarySobCheckRuleMapper.insert(salarySobCheckRulePO); - //todo 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93872, "添加校验规则")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93872, "添加校验规则") + ": " + salarySobCheckRulePO.getName()); -// loggerContext.setNewValues(salarySobCheckRulePO); -// salarySobLoggerTemplate.write(loggerContext); + //记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93872, "添加校验规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93872, "添加校验规则") + ": " + salarySobCheckRulePO.getName()); + loggerContext.setNewValues(salarySobCheckRulePO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override @@ -129,15 +131,16 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC newSalarySobCheckRulePO.setUpdateTime(new Date()); salarySobCheckRuleMapper.updateById(newSalarySobCheckRulePO); //todo 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则") + ": " + newSalarySobCheckRulePO.getName()); -// loggerContext.setOldValues(salarySobCheckRulePO); -// loggerContext.setNewValues(newSalarySobCheckRulePO); -// salarySobLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则") + ": " + newSalarySobCheckRulePO.getName()); + loggerContext.setOldValues(salarySobCheckRulePO); + loggerContext.setNewValues(newSalarySobCheckRulePO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override @@ -175,17 +178,18 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC // 将薪资账套list转换成map Map salarySobPOMap = SalaryEntityUtil.convert2Map(salarySobPOS, SalarySobPO::getId); //todo 记录日志 -// salarySobCheckRulePOS.forEach(salarySobCheckRulePO -> { -// SalarySobPO salarySobPO = salarySobPOMap.get(salarySobCheckRulePO.getSalarySobId()); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则") + ": " + salarySobCheckRulePO.getName()); -// loggerContext.setOldValues(salarySobCheckRulePO); -// salarySobLoggerTemplate.write(loggerContext); -// }); + salarySobCheckRulePOS.forEach(salarySobCheckRulePO -> { + SalarySobPO salarySobPO = salarySobPOMap.get(salarySobCheckRulePO.getSalarySobId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则") + ": " + salarySobCheckRulePO.getName()); + loggerContext.setOldValues(salarySobCheckRulePO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); + }); } @Override diff --git a/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java index 78d313366..e959b3fd6 100644 --- a/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobExtRangeServiceImpl.java @@ -59,8 +59,6 @@ public class SalarySobExtRangeServiceImpl extends Service implements SalarySobEx return SqlProxyHandle.getProxy(SalarySobExtRangeMapper.class); } -// private ComInfoCache comInfoCache; -// private LoggerTemplate salarySobLoggerTemplate; @Override public List listByIds(Collection ids) { diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 268912117..216e6499e 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -6,7 +6,9 @@ import com.engine.salary.biz.SalarySobBiz; import com.engine.salary.biz.SalarySobItemBiz; import com.engine.salary.biz.SalarySobItemGroupBiz; import com.engine.salary.biz.SalarySobItemHideBiz; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryformula.ExpressFormula; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.bo.SalarySobItemAggregateBO; @@ -15,6 +17,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemFormDTO; import com.engine.salary.entity.salarysob.param.SalarySobItemSaveParam; import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salarysob.SalarySobDefaultItemMapper; @@ -23,9 +26,9 @@ import com.engine.salary.mapper.salarysob.SalarySobItemMapper; import com.engine.salary.service.*; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.valid.ValidUtil; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -93,7 +96,6 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe private SalarySobDefaultItemMapper getSalarySobDefaultItemMapper() { return MapperProxyFactory.getProxy(SalarySobDefaultItemMapper.class); } -// private LoggerTemplate salarySobLoggerTemplate; @Override public List list() { @@ -260,14 +262,17 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe //保存 saveSobItem(saveParam); - //todo 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); -// salarySobLoggerTemplate.write(loggerContext); + SalarySobPO salarySob = salarySobBiz.getById(salarySobId); + + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySob.getId()); + loggerContext.setTargetName(salarySob.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } /** diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index 257ab6d72..ef2caa4d8 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -6,6 +6,8 @@ import com.engine.core.impl.Service; import com.engine.hrm.biz.OrganizationShowSetBiz; import com.engine.salary.biz.SalarySobRangeBiz; import com.engine.salary.biz.SpecialAddDeductionBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.hrm.DeptInfo; import com.engine.salary.entity.hrm.PositionInfo; @@ -20,6 +22,7 @@ import com.engine.salary.entity.salarysob.param.SalarySobRangeSaveParam; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.salarysob.po.SalarySobRangePO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum; import com.engine.salary.enums.salarysob.TargetTypeEnum; @@ -87,10 +90,6 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange private SalarySobExtRangeMapper getSalarySobExtRangeMapper() { return SqlProxyHandle.getProxy(SalarySobExtRangeMapper.class); } - -// private ComInfoCache comInfoCache; -// private LoggerTemplate salarySobLoggerTemplate; - @Override public List listByIds(Collection ids) { if (CollectionUtils.isEmpty(ids)) { @@ -185,17 +184,18 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange if (CollectionUtils.isNotEmpty(result.getNeedUpdateSalarySobRanges())) { result.getNeedUpdateSalarySobRanges().forEach(e -> salarySobRangeBiz.updateById(e)); } - // todo 记录日志 -// String operateTypeName = Objects.equals(saveParam.getIncludeType(), NumberUtils.INTEGER_ONE) ? -// SalaryI18nUtil.getI18nLabel(98601, "关联人员范围新增对象") : SalaryI18nUtil.getI18nLabel(98602, "从范围中排除新增对象"); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(operateTypeName); -// loggerContext.setOperatedesc(operateTypeName); -// loggerContext.setNewValues(saveParam); -// salarySobLoggerTemplate.write(loggerContext); + //记录日志 + String operateTypeName = Objects.equals(saveParam.getIncludeType(), 1) ? + SalaryI18nUtil.getI18nLabel(98601, "关联人员范围新增对象") : SalaryI18nUtil.getI18nLabel(98602, "从范围中排除新增对象"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(operateTypeName); + loggerContext.setOperatedesc(operateTypeName); + loggerContext.setNewValues(saveParam); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java index 2c0f56bb0..18f1500ab 100644 --- a/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java @@ -3,9 +3,12 @@ package com.engine.salary.service.impl; import com.engine.core.impl.Service; import com.engine.salary.biz.SalaryItemBiz; import com.engine.salary.biz.SysSalaryItemBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalarySystemTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salaryitem.SysSalaryItemMapper; @@ -30,7 +33,6 @@ import java.util.Set; * @version 1.0 **/ public class SysSalaryItemServiceImpl extends Service implements SysSalaryItemService { - private SysSalaryItemBiz sysSalaryItemMapper = new SysSalaryItemBiz(); private SalaryItemBiz salaryItemService = new SalaryItemBiz(); @@ -87,19 +89,20 @@ public class SysSalaryItemServiceImpl extends Service implements SysSalaryItemSe throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98350, "已经添加过的系统薪资项目不能重复添加")); } // 保存 - List salaryItems = SysSalaryItemBO.convert2SalaryItemPO(sysSalaryItemPOS,(long)user.getUID()); + List salaryItems = SysSalaryItemBO.convert2SalaryItemPO(sysSalaryItemPOS, (long) user.getUID()); salaryItemService.batchSave(salaryItems); - //todo 记录日志 -// sysSalaryItemPOS.forEach(sysSalaryItemPO -> { -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(sysSalaryItemPO.getId())); -// loggerContext.setTargetName(sysSalaryItemPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目") + ": " + sysSalaryItemPO.getName()); -// loggerContext.setNewValues(sysSalaryItemPO); -// salaryItemLoggerTemplate.write(loggerContext); -// }); + // 记录日志 + sysSalaryItemPOS.forEach(sysSalaryItemPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(sysSalaryItemPO.getId())); + loggerContext.setTargetName(sysSalaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目") + ": " + sysSalaryItemPO.getName()); + loggerContext.setNewValues(sysSalaryItemPO); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); + }); } @Override diff --git a/src/com/engine/salary/util/SalaryLoggerUtil.java b/src/com/engine/salary/util/SalaryLoggerUtil.java index e8d0c60de..e6d49943f 100644 --- a/src/com/engine/salary/util/SalaryLoggerUtil.java +++ b/src/com/engine/salary/util/SalaryLoggerUtil.java @@ -1,73 +1,80 @@ package com.engine.salary.util; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.elog.util.LoggerTemplate; +import com.engine.salary.enums.OperateTypeEnum; + /** - * @Description: 操作日志工具类 - * @Author: wangxiangzhong - * @Date: 2021/11/1 11:31 - */ + * 操作日志工具类 + *

Copyright: Copyright (c) 2023

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ public class SalaryLoggerUtil { -// /** -// * 记录单个对象新增操作日志 -// * @param loggerTemplate -// * @param targetId -// * @param targetName -// * @param operateTypeName -// * @param operatedesc -// * @param newValues -// */ -// public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues) { -// recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues); -// } -// -// /** -// * 记录单个对象修改操作日志 -// * @param loggerTemplate -// * @param targetId -// * @param targetName -// * @param operateTypeName -// * @param operatedesc -// * @param oldValues -// * @param newValues -// */ -// public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { -// recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues); -// } -// -// /** -// * 记录单个对象删除操作日志 -// * @param loggerTemplate -// * @param targetId -// * @param targetName -// * @param operateTypeName -// * @param operatedesc -// * @param oldValues -// */ -// public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues) { -// recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null); -// } -// -// /** -// * 记录单个对象日志 -// * @param loggerTemplate -// * @param targetId -// * @param targetName -// * @param operateType -// * @param operateTypeName -// * @param operatedesc -// * @param oldValues -// * @param newValues -// */ -// private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { -// LoggerContext loggerContext = new LoggerContext(); -// loggerContext.setTargetId(String.valueOf(targetId)); -// loggerContext.setTargetName(targetName); -// loggerContext.setOperateType(operateType); -// loggerContext.setOperateTypeName(operateTypeName); -// loggerContext.setOperatedesc(operatedesc); -// loggerContext.setOldValues(oldValues); -// loggerContext.setNewValues(newValues); -// loggerTemplate.write(loggerContext); -// } + /** + * 记录单个对象新增操作日志 + * @param loggerTemplate + * @param targetId + * @param targetName + * @param operateTypeName + * @param operatedesc + * @param newValues + */ + public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues); + } + + /** + * 记录单个对象修改操作日志 + * @param loggerTemplate + * @param targetId + * @param targetName + * @param operateTypeName + * @param operatedesc + * @param oldValues + * @param newValues + */ + public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues); + } + + /** + * 记录单个对象删除操作日志 + * @param loggerTemplate + * @param targetId + * @param targetName + * @param operateTypeName + * @param operatedesc + * @param oldValues + */ + public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null); + } + + /** + * 记录单个对象日志 + * @param loggerTemplate + * @param targetId + * @param targetName + * @param operateType + * @param operateTypeName + * @param operatedesc + * @param oldValues + * @param newValues + */ + private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setTargetId(String.valueOf(targetId)); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(operateType); + loggerContext.setOperateTypeName(operateTypeName); + loggerContext.setOperatedesc(operatedesc); + loggerContext.setOldValues(oldValues); + loggerContext.setNewValues(newValues); + loggerTemplate.write(loggerContext); + } } From 65f972846faca8d235811c2f0b5cb80ef38928e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 10:26:44 +0800 Subject: [PATCH 076/169] =?UTF-8?q?=E5=A4=84=E7=90=86id=E8=B6=85=E8=BF=872?= =?UTF-8?q?100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryAcctEmployeeQueryParam.java | 2 +- .../impl/SalaryAcctEmployeeServiceImpl.java | 27 +++++++++++++++++-- .../impl/SalaryAcctResultServiceImpl.java | 6 ++--- .../SalaryComparisonResultServiceImpl.java | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctEmployeeQueryParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctEmployeeQueryParam.java index cfe97aae9..81266c2d3 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctEmployeeQueryParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctEmployeeQueryParam.java @@ -57,7 +57,7 @@ public class SalaryAcctEmployeeQueryParam extends BaseQueryParam { private LocalDateRange dismissDate; //薪资核算人员列表主键id") - private Collection ids; + private List ids; private String workcode; } diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index a0da13747..2991cf398 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; @@ -288,7 +289,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct List salaryAcctEmployeePOS = listByParam(queryParam); Set keySet = SalaryEntityUtil.properties(salaryAcctEmployeePOS, salaryAcctEmployeePO -> salaryAcctEmployeePO.getEmployeeId() + "-" + salaryAcctEmployeePO.getTaxAgentId()); List resultList = Lists.newArrayList(); - if(CollectionUtils.isNotEmpty(keySet)){ + if (CollectionUtils.isNotEmpty(keySet)) { lastMonthSalaryAcctEmployeePOMap.forEach((k, v) -> { if (!keySet.contains(k)) { resultList.add(v); @@ -336,7 +337,18 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct // 查询合并计税的薪资核算人员 Set otherSalaryAcctRecordIds = SalaryEntityUtil.properties(otherSalaryAcctRecordPOS, SalaryAcctRecordPO::getId); // 分页参数 - List salaryAcctEmployeePOS = getSalaryAcctEmployeeMapper().listPage4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam); + List salaryAcctEmployeePOS = new ArrayList<>(); + if (CollUtil.isNotEmpty(queryParam.getIds())) { + List list = new ArrayList<>(); + List> partition = Lists.partition(queryParam.getIds(), 500); + partition.forEach(ids -> { + queryParam.setIds(ids); + list.addAll(getSalaryAcctEmployeeMapper().list4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam)); + }); + salaryAcctEmployeePOS = list; + } else { + salaryAcctEmployeePOS = getSalaryAcctEmployeeMapper().listPage4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam); + } return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), salaryAcctEmployeePOS, SalaryAcctEmployeePO.class); } @@ -353,6 +365,17 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct } // 查询合并计税的薪资核算人员 Set otherSalaryAcctRecordIds = SalaryEntityUtil.properties(otherSalaryAcctRecordPOS, SalaryAcctRecordPO::getId); + + List list = new ArrayList<>(); + if (CollUtil.isNotEmpty(queryParam.getIds())) { + List> partition = Lists.partition(queryParam.getIds(), 500); + partition.forEach(ids -> { + queryParam.setIds(ids); + list.addAll(getSalaryAcctEmployeeMapper().list4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam)); + }); + return list; + } + return getSalaryAcctEmployeeMapper().list4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 6fcd32486..6cf502c44 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -355,7 +355,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe //其他条件 List otherConditions = queryParam.getOtherConditions(); - if(CollectionUtils.isNotEmpty(otherConditions)){ + if (CollectionUtils.isNotEmpty(otherConditions)) { List items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList()); List list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items); for (int i = 0; i < otherConditions.size(); i++) { @@ -470,7 +470,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe salaryAcctEmployeeIds4ConsolidatedTax = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getId); } else { // 如果查询条件中没有包含"合并计税",那么就需要查询出存在合并计税的人,标记给前端 - SalaryAcctEmployeeQueryParam accEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryAcctRecordId(queryParam.getSalaryAcctRecordId()).ids(SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getId)).build(); + SalaryAcctEmployeeQueryParam accEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryAcctRecordId(queryParam.getSalaryAcctRecordId()).ids(SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getId, Collectors.toList())).build(); List salaryAcctEmployeePOS4ConsolidatedTax = getSalaryAcctEmployeeService(user).listByParam4ConsolidatedTax(accEmployeeQueryParam); salaryAcctEmployeeIds4ConsolidatedTax = SalaryEntityUtil.properties(salaryAcctEmployeePOS4ConsolidatedTax, SalaryAcctEmployeePO::getId); } @@ -1191,7 +1191,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe batchSave(needInsertList); // 报表入库前先删除 - getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(param.getIdList(), Collections.singletonList(param.getSalaryItemId()) ); + getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(param.getIdList(), Collections.singletonList(param.getSalaryItemId())); getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); } diff --git a/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java index 25e926aaf..3f3c3fd71 100644 --- a/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java @@ -215,7 +215,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary } else { SalaryAcctEmployeeQueryParam accEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder() .salaryAcctRecordId(queryParam.getSalaryAcctRecordId()) - .ids(SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getId)) + .ids(SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getId, Collectors.toList())) .build(); List salaryAcctEmployeePOS4ConsolidatedTax = getSalaryAcctEmployeeService(user).listByParam4ConsolidatedTax(accEmployeeQueryParam); salaryAcctEmployeeIds4ConsolidatedTax = SalaryEntityUtil.properties(salaryAcctEmployeePOS4ConsolidatedTax, SalaryAcctEmployeePO::getId); From e5a0a8517988b89649d868dd53a1e08b0a081dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 11:18:54 +0800 Subject: [PATCH 077/169] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=96=AA?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=EF=BC=8C=E6=99=8B=E5=8D=87=E3=80=81=E9=99=8D?= =?UTF-8?q?=E8=81=8C=E3=80=81=E8=B0=83=E5=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalaryArchiveItemAdjustReasonEnum.java | 3 + .../impl/SalaryArchiveExcelServiceImpl.java | 2 +- src/com/engine/salary/util/EnumUtil.java | 357 ++++++++++++++++++ 3 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 src/com/engine/salary/util/EnumUtil.java diff --git a/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java index 373999a91..fb3f761cc 100644 --- a/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java +++ b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java @@ -19,6 +19,9 @@ public enum SalaryArchiveItemAdjustReasonEnum implements BaseEnum { ONBOARD("ONBOARD", "入职", 85901), PROBATION_REVIEW("PROBATION_REVIEW", "转正", 85984), SALARY_ADJUSTMENT("SALARY_ADJUSTMENT", "调薪", 85985), + PROMOTION("SALARY_ADJUSTMENT", "晋升", 85985), + DEMOTION("SALARY_ADJUSTMENT", "降职", 85985), + JOB_TRANSFER("SALARY_ADJUSTMENT", "调岗", 85985), POSITION_OR_SALARY_ADJUSTMENT("POSITION_OR_SALARY_ADJUSTMENT", "调岗调薪", 85986), DIMISSION("DIMISSION", "离职", 85902), OTHER("OTHER", "其他", 84500), diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index 87137b0e8..001f5ee36 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -404,7 +404,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); excelComments.add(new ExcelComment(8, 0, 10, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); } else if (isSalaryItemAdjust) { - excelComments.add(new ExcelComment(6, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,可填写如:入职,转正,调薪,调岗调薪,离职,其他,初始化"))); + excelComments.add(new ExcelComment(6, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,可填写如:入职,转正,调薪,晋升,降职,调岗,调岗调薪,离职,其他,初始化"))); excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); } } else if (isSuspendList) { diff --git a/src/com/engine/salary/util/EnumUtil.java b/src/com/engine/salary/util/EnumUtil.java new file mode 100644 index 000000000..aad5269e0 --- /dev/null +++ b/src/com/engine/salary/util/EnumUtil.java @@ -0,0 +1,357 @@ +package com.engine.salary.util; + + +import lombok.extern.slf4j.Slf4j; +import sun.reflect.ConstructorAccessor; +import sun.reflect.FieldAccessor; +import sun.reflect.MethodAccessor; +import sun.reflect.ReflectionFactory; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@Slf4j +public class EnumUtil { + + /** + * 扩展枚举(把新枚举的值加入旧枚举里,从旧枚举里删除不要的枚举值) + * @param oldEnumClass 旧枚举类 + * @param newEnumClass 需要扩展的枚举类 + * @param removeOldEnums 需要删除的旧枚举值 + * @param + * @param + * @throws Exception + */ + public static void extendEnum(Class oldEnumClass,Class newEnumClass,O... removeOldEnums) throws Exception { + boolean needToRemoveOldEnum = removeOldEnums!=null&&removeOldEnums.length>0; + if(needToRemoveOldEnum){ + removeEnum(oldEnumClass,removeOldEnums); + } + List newEnums = values(newEnumClass); + Field[] fields = getFields(newEnumClass); + for (Object newEnumObject : newEnums) { + Enum newEnum = Enum.class.cast(newEnumObject); + + List fieldTypeList = new ArrayList<>(); + //枚举名称的类型:String.class + fieldTypeList.add(String.class); + for (Field field : fields) { + fieldTypeList.add(field.getType()); + } + List fieldValueList = new ArrayList<>(); + //枚举名称 + fieldValueList.add(newEnum.name()); + for (Field field : fields) { + Object value = field.get(newEnum); + fieldValueList.add(value); + } + + Class[] fieldTypes = fieldTypeList.toArray(new Class[]{}); + String[] fieldValues = fieldValueList.toArray(new String[]{}); + addEnum(oldEnumClass,fieldTypes,fieldValues); + } + } + + /** + * 新增枚举值 + * @param enumClass 枚举类型 + * @param fieldTypes 字段的类型,第一个是枚举名类型String + * @param fieldValues 字段的值,第一个是枚举名称 + * @throws Exception + */ + public static > T addEnum(Class enumClass, Class[] fieldTypes, Object[] fieldValues) throws Exception { + if(fieldTypes==null||fieldTypes.length==0){ + throw new RuntimeException("参数fieldTypes为空"); + } + if(fieldValues==null||fieldValues.length==0){ + throw new RuntimeException("参数fieldValues为空"); + } + if(fieldTypes[0]!=String.class){ + throw new RuntimeException("参数fieldTypes[0]不是String.class"); + } + if(!(fieldValues[0] instanceof String)){ + throw new RuntimeException("参数fieldValues[0]不是字符串"); + } + if(fieldTypes.length!=fieldValues.length){ + throw new RuntimeException("参数fieldTypes和参数fieldValues的长度不一致"); + } + ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory(); + String enumName = fieldValues[0].toString(); + synchronized (enumClass){ + //判断name是否已经添加过了 + if(hasEnumName(enumClass,enumName)){ + log.info("枚举类{}中已存在该枚举名:{}",enumClass.getSimpleName(),enumName); + return getEnum(enumClass,enumName); + } + //name,ordinal,其他自定义字段 + List allFieldClass = new ArrayList<>(fieldTypes.length + 1); + allFieldClass.add(String.class); + allFieldClass.add(int.class); + for (int i = 1; i < fieldTypes.length; i++) { + allFieldClass.add(fieldTypes[i]); + } + Class[] classes = allFieldClass.toArray(new Class[]{}); + Constructor constructor = enumClass.getDeclaredConstructor(classes); + ConstructorAccessor constructorAccessor = reflectionFactory.newConstructorAccessor(constructor); + List allFields = new ArrayList<>(fieldValues.length + 1); + allFields.add(enumName); + int maxOrdinal = getMaxOrdinal(enumClass); + allFields.add(maxOrdinal+1); + for (int i = 1; i < fieldValues.length; i++) { + allFields.add(fieldValues[i]); + } + //调用枚举的构造方法,创建新的枚举值 + T newEnum = (T) constructorAccessor.newInstance(allFields.toArray()); + log.info("新增枚举:{}" , newEnum); + Field valuesField = enumClass.getDeclaredField("$VALUES"); + valuesField.setAccessible(true); + + //解除values属性的final限制 + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + int modifiers = modifiersField.getInt(valuesField); + modifiers &= ~Modifier.FINAL; + modifiersField.setInt(valuesField, modifiers); + + //将新增的枚举值加入values属性里 + FieldAccessor fieldAccessor = reflectionFactory.newFieldAccessor(valuesField, false); + T[] ts = (T[]) fieldAccessor.get(enumClass); + List list = new ArrayList<>(Arrays.asList(ts)); + list.add(newEnum); + fieldAccessor.set(enumClass, list.toArray(ts)); + + //将Class对象的enumConstants和enumConstantDirectory清空(Enum.valueOf()方法会给它们赋值) + /** + * Enum.valueOf()逻辑: + * 1.取enumConstantDirectory + * 1.1如果有值则直接返回 + * 1.2如果没值,则取enumConstants,并拷贝到enumConstantDirectory,下次可直接返回 + * 1.2.1如果enumConstants有值,则返回 + * 1.2.2如果enumConstants没值,则取枚举的values属性,并拷贝到enumConstants,下次可直接返回 + * 2.enumConstantDirectory.get(name)返回 + */ + Field enumConstantDirectoryField = enumClass.getClass().getDeclaredField("enumConstantDirectory"); + enumConstantDirectoryField.setAccessible(true); + FieldAccessor enumConstantDirectoryFieldAccessor = reflectionFactory.newFieldAccessor(enumConstantDirectoryField, false); + enumConstantDirectoryFieldAccessor.set(enumClass,null); + Field enumConstantsField = enumClass.getClass().getDeclaredField("enumConstants"); + enumConstantsField.setAccessible(true); + FieldAccessor enumConstantsFieldAccessor = reflectionFactory.newFieldAccessor(enumConstantsField, false); + enumConstantsFieldAccessor.set(enumClass,null); + return newEnum; + } + } + + /** + * 获取枚举类当前最大序号 + * @param enumClass 枚举类型 + * @param + * @return + * @throws Exception + */ + public static > int getMaxOrdinal(Class enumClass) throws Exception { + List values = values(enumClass); + if(values==null||values.size()==0){ + return 0; + } + int maxOrdinal = 0; + for (T value : values) { + if(maxOrdinal + */ + public static > void removeEnum(Class enumClass, Enum... removeOldEnums) throws Exception { + if(removeOldEnums==null||removeOldEnums.length==0){ + log.warn("removeOldEnums为空"); + return; + } + ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory(); + synchronized (enumClass){ + Field valuesField = enumClass.getDeclaredField("$VALUES"); + valuesField.setAccessible(true); + + //解除values属性的final限制 + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + int modifiers = modifiersField.getInt(valuesField); + modifiers &= ~Modifier.FINAL; + modifiersField.setInt(valuesField, modifiers); + + FieldAccessor fieldAccessor = reflectionFactory.newFieldAccessor(valuesField, false); + T[] oldEnumArray = (T[]) fieldAccessor.get(enumClass); + List enumList = new ArrayList<>(Arrays.asList(oldEnumArray)); + for (Enum removeOldEnum : removeOldEnums) { + //将指定的枚举值从values属性里删除 + enumList.remove(removeOldEnum); + log.info("删除枚举值:{}",removeOldEnum); + } + //把List转成数组 + T[] newEnumArray = (T[]) Arrays.copyOf(enumList.toArray(), enumList.size(), oldEnumArray.getClass()); + fieldAccessor.set(enumClass, newEnumArray); + } + } + /** + * 修改枚举属性 + * @param enumClass 枚举类型 + * @param enumName 枚举名称 + * @param attributeName 属性名 + * @param attributeValue 属性值 + * @param + * @throws Exception + */ + public static > void setAttribute(Class enumClass,String enumName,String attributeName,Object attributeValue) throws Exception { + List values = values(enumClass); + T target = null; + for (T t:values){ + if(t.name().equals(enumName)){ + target = t; + break; + } + } + if(target==null){ + throw new RuntimeException("该枚举类没有枚举名:"+enumName); + } + Field declaredField = target.getClass().getDeclaredField(attributeName); + declaredField.setAccessible(true); + declaredField.set(target,attributeValue); + } + + /** + * 修改枚举属性 + * @param targetEnum 枚举值 + * @param attributeName 属性名 + * @param attributeValue 属性值 + * @param + * @throws Exception + */ + public static > void setAttribute(T targetEnum,String attributeName,Object attributeValue) throws Exception { + Field declaredField = targetEnum.getClass().getDeclaredField(attributeName); + declaredField.setAccessible(true); + declaredField.set(targetEnum,attributeValue); + } + + /** + * 判断枚举类是否包含了指定枚举名 + * @param clazz + * @param enumName + * @param + * @return + */ + public static > boolean hasEnumName(Class clazz, String enumName) throws Exception { +// 不要用valueOf方法,因为它会初始化enumConstantDirectory使得后续调用valueOf方法后拿不到后面加入的枚举值 +// try{ +// T t = Enum.valueOf(clazz, enumName); +// if(t!=null){ +// return true; +// } +// }catch (Exception e){ +// e.printStackTrace(); +// System.err.println(e.getMessage()); +// } + List values = values(clazz); + for (T t:values){ + if(t.name().equals(enumName)){ + return true; + } + } + return false; + } + + /** + * 根据枚举类型和枚举名获取枚举值 + * @param clazz 枚举类型 + * @param enumName 枚举名称 + * @param + * @return + * @throws Exception + */ + public static > T getEnum(Class clazz, String enumName) throws Exception { + List values = values(clazz); + for (T t:values){ + if(t.name().equals(enumName)){ + return t; + } + } + return null; + } + + /** + * 获取枚举类的所有枚举值 + * @param clazz 枚举类型 + * @param + * @return + * @throws Exception + */ + public static > List values(Class clazz) throws Exception { + ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory(); + Field valuesField = clazz.getDeclaredField("$VALUES"); + valuesField.setAccessible(true); + FieldAccessor fieldAccessor = reflectionFactory.newFieldAccessor(valuesField, false); + T[] ts = (T[]) fieldAccessor.get(clazz); + List list = new ArrayList<>(Arrays.asList(ts)); + return list; + } + + /** + * 获取枚举类的所有枚举值 + * @param clazz 枚举类型 + * @param + * @return + * @throws Exception + */ + public static > List values2(Class clazz) throws Exception { + ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory(); + Method valuesMethod = clazz.getDeclaredMethod("values"); + valuesMethod.setAccessible(true); + MethodAccessor methodAccessor = reflectionFactory.newMethodAccessor(valuesMethod); + T[] ts = (T[]) methodAccessor.invoke(clazz, null); + List list = new ArrayList<>(Arrays.asList(ts)); + return list; + } + + /** + * 获取枚举的字段(排除数组类型、枚举类型) + * @param enumClass + * @return + */ + public static Field[] getFields(Class enumClass){ + List result = new ArrayList<>(); + Field[] declaredFields = enumClass.getDeclaredFields(); + for (Field field : declaredFields) { + Class type = field.getType(); + //排除数组类型(values)、枚举类型(枚举值) + if(type!=enumClass && !type.isArray()){ + field.setAccessible(true); + result.add(field); + } + } + return result.toArray(new Field[]{}); + } + + /** + * 打印枚举值 + * @param enumClass 枚举类型 + * @throws Exception + */ + public static void printEnum(Class enumClass) throws Exception { + System.out.println("+++++++++++++++++++++++"); + List values = values(enumClass); + values.stream().forEach(System.out::println); + System.out.println("+++++++++++++++++++++++"); + } + +} From 12f66512df934de30844e5b47af87b0133c50d65 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 30 Jan 2024 13:50:05 +0800 Subject: [PATCH 078/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E5=8C=BA=E5=88=86pc=E5=92=8C=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java | 2 +- .../salary/mapper/salarybill/SalaryTemplateMapper.xml | 1 + .../service/impl/SalaryBillBaseSetServiceImpl.java | 6 +++--- .../salary/service/impl/SalarySendServiceImpl.java | 2 +- src/com/engine/salary/wrapper/SalaryTemplateWrapper.java | 9 ++++++++- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java index 767d6ccac..fc9a7abf4 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java @@ -31,7 +31,7 @@ public class SalaryBillAckFeedbackDTO { /** * 移动端反馈地址 */ - private String mobileFeedBackUrl; + private String mobileFeedbackUrl; /** * 超时自动确认天数 diff --git a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml index 07898826c..538ae335e 100644 --- a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml @@ -59,6 +59,7 @@ , t.ack_feedback_status , t.auto_ack_days , t.feedback_url + , t.mobile_feedback_url , t.create_time , t.update_time , t.creator diff --git a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java index 5cafea060..9400d83cc 100644 --- a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java @@ -100,7 +100,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB if (StringUtils.equals(ackFeedbackSetting.getAckStatus(), "1")) { // 2.保存反馈地址 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getFeedBackUrl(), SALARY_FEEDBACK_URL, "工资单反馈地址", "billSend"); - getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getMobileFeedBackUrl(), SALARY_FEEDBACK_URL_MOBILE, "移动端工资单反馈地址", "billSend"); + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getMobileFeedbackUrl(), SALARY_FEEDBACK_URL_MOBILE, "移动端工资单反馈地址", "billSend"); // 3.保存自动确认时间 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAutoAckDays().toString(), SALARY_AUTO_ACK_DAYS, "工资单反馈自动确认", "billSend"); } @@ -138,7 +138,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB defaultAckFeedBackDTO.setAckStatus("0"); defaultAckFeedBackDTO.setAutoAckDays(0); defaultAckFeedBackDTO.setFeedBackUrl("/"); - defaultAckFeedBackDTO.setMobileFeedBackUrl("/"); + defaultAckFeedBackDTO.setMobileFeedbackUrl("/"); return defaultAckFeedBackDTO; } defaultAckFeedBackDTO.setAckStatus(ackStatus); @@ -150,7 +150,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB defaultAckFeedBackDTO.setFeedBackUrl(feedbackUrl); String mobileFeedbackUrl = sysConfMap.getOrDefault(SALARY_FEEDBACK_URL_MOBILE, ""); - defaultAckFeedBackDTO.setMobileFeedBackUrl(mobileFeedbackUrl); + defaultAckFeedBackDTO.setMobileFeedbackUrl(mobileFeedbackUrl); return defaultAckFeedBackDTO; } diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 2a5f9b688..f79d2b74b 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -830,7 +830,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService .ackFeedbackStatus(Integer.valueOf(map.getOrDefault("ackFeedbackStatus", "0").toString())) .autoAckDays(Integer.valueOf(map.getOrDefault("autoAckDays", "0").toString())) .feedbackUrl(map.getOrDefault("feedbackUrl", "").toString()) - .feedbackUrl(map.getOrDefault("mobileFeedbackUrl", "").toString()) + .mobileFeedbackUrl(map.getOrDefault("mobileFeedbackUrl", "").toString()) .name(map.getOrDefault("name", "").toString()) .salarySobId(Long.valueOf(map.getOrDefault("salarySobId", "0").toString())) .useType(Integer.valueOf(map.getOrDefault("useType", "0").toString())) diff --git a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java index 22aac4134..25a0d96ef 100644 --- a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java @@ -176,6 +176,7 @@ public class SalaryTemplateWrapper extends Service { } + // 查询所有启用的薪资账套 List salarySobs = getSalarySobService(user).listByDisable(NumberUtils.INTEGER_ZERO); List> salarySobOptions = salarySobs.stream().map(salarySobPO -> { @@ -199,8 +200,14 @@ public class SalaryTemplateWrapper extends Service { salaryTemplateBaseSetDTO.setAckFeedbackStatus(StringUtils.equals(defaultAckFeedback.getAckStatus(), "1")); salaryTemplateBaseSetDTO.setAutoAckDays(defaultAckFeedback.getAutoAckDays()); salaryTemplateBaseSetDTO.setFeedbackUrl(defaultAckFeedback.getFeedBackUrl()); - salaryTemplateBaseSetDTO.setMobileFeedbackUrl(defaultAckFeedback.getMobileFeedBackUrl()); + salaryTemplateBaseSetDTO.setMobileFeedbackUrl(defaultAckFeedback.getMobileFeedbackUrl()); } + + // 如果设置了pc端反馈流程地址,移动端没有设置,则移动端与pc端一致 + if (StringUtils.isNotBlank(salaryTemplateBaseSetDTO.getFeedbackUrl()) && StringUtils.isBlank(salaryTemplateBaseSetDTO.getMobileFeedbackUrl())) { + salaryTemplateBaseSetDTO.setMobileFeedbackUrl(salaryTemplateBaseSetDTO.getFeedbackUrl()); + } + Map salaryTemplateBase = new HashMap<>(); salaryTemplateBase.put("data", salaryTemplateBaseSetDTO); salaryTemplateBase.put("salarySobOptions", salarySobOptions); From b6f7281cbd3e42637c3a9c75dca0435ada6a765c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 14:17:06 +0800 Subject: [PATCH 079/169] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalarySobRangeServiceImpl.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index ef2caa4d8..0e30a3fd9 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -209,21 +209,22 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange // 删除薪资账套的人员范围 salarySobRangeBiz.deleteByIds(ids); // 查询薪资账套 -// Set salarySobIds = SalaryEntityUtil.properties(salarySobRangePOS, SalarySobRangePO::getSalarySobId); -// List salarySobPOS = getSalarySobService(user).listByIds(salarySobIds); -// // 是"关联人员范围"还是"从范围中排除" -// Integer includeType = salarySobRangePOS.get(0).getIncludeType(); -// // todo 记录日志 -// String operateTypeName = Objects.equals(includeType, NumberUtils.INTEGER_ONE) ? -// SalaryI18nUtil.getI18nLabel(98605, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(98606, "从范围中排除删除对象"); -// salarySobPOS.forEach(salarySobPO -> { -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(operateTypeName); -// loggerContext.setOperatedesc(operateTypeName); -// }); + Set salarySobIds = SalaryEntityUtil.properties(salarySobRangePOS, SalarySobRangePO::getSalarySobId); + List salarySobPOS = getSalarySobService(user).listByIds(salarySobIds); + // 是"关联人员范围"还是"从范围中排除" + Integer includeType = salarySobRangePOS.get(0).getIncludeType(); + //记录日志 + String operateTypeName = Objects.equals(includeType, 1) ? + SalaryI18nUtil.getI18nLabel(98605, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(98606, "从范围中排除删除对象"); + salarySobPOS.forEach(salarySobPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(operateTypeName); + loggerContext.setOperatedesc(operateTypeName); + }); } @Override From b1d3d2c445d276208d6b02b78eeb384115c6e5db Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 30 Jan 2024 14:31:21 +0800 Subject: [PATCH 080/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=A4=8D=E5=88=B6?= =?UTF-8?q?action=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/CopyToPaySIArchiveAction.java | 149 ++++++++++++++++++ .../mapper/siarchives/OtherSchemeMapper.java | 7 + .../mapper/siarchives/OtherSchemeMapper.xml | 9 ++ .../salary/service/SIArchivesService.java | 9 ++ .../service/impl/SIArchivesServiceImpl.java | 124 +++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 src/com/engine/salary/action/CopyToPaySIArchiveAction.java diff --git a/src/com/engine/salary/action/CopyToPaySIArchiveAction.java b/src/com/engine/salary/action/CopyToPaySIArchiveAction.java new file mode 100644 index 000000000..6ff38ee6d --- /dev/null +++ b/src/com/engine/salary/action/CopyToPaySIArchiveAction.java @@ -0,0 +1,149 @@ +package com.engine.salary.action; + +import cn.hutool.core.util.StrUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.mapper.taxagent.TaxAgentMapper; +import com.engine.salary.service.SIArchivesService; +import com.engine.salary.service.impl.SIArchivesServiceImpl; +import com.engine.salary.util.SalaryDateUtil; +import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.db.MapperProxyFactory; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import weaver.conn.RecordSet; +import weaver.general.Util; +import weaver.hrm.User; +import weaver.interfaces.workflow.action.Action; +import weaver.soa.workflow.request.Property; +import weaver.soa.workflow.request.RequestInfo; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author: sy + * @Description: 拷贝福利档案并置为在缴 + * @Date: 2024/1/29 + **/ +@Slf4j +public class CopyToPaySIArchiveAction implements Action { + + private TaxAgentMapper getTaxAgentMapper() { + return MapperProxyFactory.getProxy(TaxAgentMapper.class); + } + + private SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class,user); + } + + private String tableName; + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + @Override + public String execute(RequestInfo requestInfo) { + try { + Property[] properties = requestInfo.getMainTableInfo().getProperty(); + Map fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName, + property -> Util.null2String(property.getValue()))); + + RecordSet rs = new RecordSet(); + + String queryImageId = "select salaryname,processfield from " + tableName + " where workflowid = ?"; + rs.executeQuery(queryImageId, requestInfo.getWorkflowid()); + + List list = new ArrayList<>(); + while (rs.next()) { + String processField = rs.getString("processfield"); + String salaryName = rs.getString("salaryname"); + String value = fieldMap.get(processField); + list.add(new CopyToPaySIArchiveAction.SalaryField(processField, salaryName, value)); + } + List> importData = new ArrayList<>(); + importData.add(SalaryEntityUtil.convert2Map(list, CopyToPaySIArchiveAction.SalaryField::getSalaryName, CopyToPaySIArchiveAction.SalaryField::getValue)); + //操作人 + String uid = list.stream().filter(f -> f.salaryName.equals("操作人")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("1"); + //增员 + String toCopyTaxAgentName = importData.get(0).get("待复制个税扣缴义务人").toString(); + String toUpdateTaxAgentName = importData.get(0).get("待更新个税扣缴义务人").toString(); + String payStartYearMonth = importData.get(0).getOrDefault("起始缴纳月", "").toString(); + if (StrUtil.isNotBlank(payStartYearMonth) && !SalaryDateUtil.checkYearMonth(payStartYearMonth)) { + requestInfo.getRequestManager().setMessage("起始缴纳月格式有误,正确格式示例为'2021-01'"); + return FAILURE_AND_CONTINUE; + } + + List toCopyTaxAgentPOS = getTaxAgentMapper().listByName(toCopyTaxAgentName); + List toUpdateTaxAgentPOS = getTaxAgentMapper().listByName(toUpdateTaxAgentName); + if(CollectionUtils.isEmpty(toCopyTaxAgentPOS)){ + requestInfo.getRequestManager().setMessage("待复制个税扣缴义务人不存在!"); + return FAILURE_AND_CONTINUE; + } + if(CollectionUtils.isEmpty(toUpdateTaxAgentPOS)){ + requestInfo.getRequestManager().setMessage("待更新个税扣缴义务人不存在!"); + return FAILURE_AND_CONTINUE; + } + Long toCopyTaxAgentId = toCopyTaxAgentPOS.get(0).getId(); + Long toUpdateTaxAgentId = toUpdateTaxAgentPOS.get(0).getId(); + Long employeeId = Long.valueOf(list.stream().filter(f -> f.salaryName.equals("员工id")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("-1")); + User user = new User(Integer.parseInt(uid)); + //拷贝福利档案并置为在缴 + Map resultMap = getSIArchivesService(user).copyToPay(toCopyTaxAgentId, toUpdateTaxAgentId, employeeId, payStartYearMonth); + if (!"success".equals(resultMap.get("type").toString())) { + requestInfo.getRequestManager().setMessage(resultMap.get("msg").toString()); + return FAILURE_AND_CONTINUE; + } + + } catch (Exception e) { + log.error("福利档案复制并置为在缴异常", e); + requestInfo.getRequestManager().setMessage(e.getMessage()); + return FAILURE_AND_CONTINUE; + } + return SUCCESS; + } + + class SalaryField { + + private String processField; + + private String salaryName; + + private String value; + + public String getProcessField() { + return processField; + } + + public void setProcessField(String processField) { + this.processField = processField; + } + + public String getSalaryName() { + return salaryName; + } + + public void setSalaryName(String salaryName) { + this.salaryName = salaryName; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public SalaryField(String processField, String salaryName, String value) { + this.processField = processField; + this.salaryName = salaryName; + this.value = value; + } + } +} diff --git a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.java b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.java index f468b0d45..6ad9fbe78 100644 --- a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.java +++ b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.java @@ -36,6 +36,13 @@ public interface OtherSchemeMapper { */ List getOtherById(@Param("ids")List ids); + /** + * 根据id获取单条 + * @param id + * @return + */ + InsuranceArchivesOtherSchemePO getOneById(@Param("id")Long id); + /** * 批量删除 * @param singletonList diff --git a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml index 2d67257b4..12adf7fb4 100644 --- a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml @@ -80,6 +80,15 @@ + + + UPDATE hrsa_other_archives diff --git a/src/com/engine/salary/service/SIArchivesService.java b/src/com/engine/salary/service/SIArchivesService.java index 0bdc90cd9..7f2f31866 100644 --- a/src/com/engine/salary/service/SIArchivesService.java +++ b/src/com/engine/salary/service/SIArchivesService.java @@ -94,6 +94,15 @@ public interface SIArchivesService { */ Map stayAddToPay(Collection ids); + /** + * 拷贝福利档案到新的个税扣缴义务人并置为在缴 + * @param toCopyTaxAgentId 被拷贝的福利档案所属个税扣缴义务人id + * @param toUpdateTaxAgentId 被更新的福利档案所属个税扣缴义务人id + * @param employeeId 福利档案所属人员id + * @return + */ + Map copyToPay(Long toCopyTaxAgentId, Long toUpdateTaxAgentId, Long employeeId, String payStartYearMonth); + /** * 待减员页面的删除待办 */ diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 6e1f5e94a..8871548f4 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -6,6 +6,7 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd; +import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBaseInfoBO; import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; @@ -71,6 +72,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + private EncryptUtil encryptUtil = new EncryptUtil(); + private TaxAgentService getTaxAgentService(User user) { return ServiceUtil.getService(TaxAgentServiceImpl.class, user); } @@ -1217,4 +1220,125 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return listPage; } + /** + * 拷贝福利档案到新的个税扣缴义务人并置为在缴 + */ + @Override + public Map copyToPay(Long toCopyTaxAgentId, Long toUpdateTaxAgentId, Long employeeId, String payStartYearMonth) { + if (toCopyTaxAgentId == null || toUpdateTaxAgentId == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "个税扣缴义务人不能为空")); + } + if (employeeId == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "人员id不能为空")); + } + //获取待拷贝的福利档案明细 + InsuranceArchivesBaseInfoPO toCopyBaseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(toCopyTaxAgentId, employeeId); + if(toCopyBaseInfoPO == null){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "待复制个税扣缴义务人下该员工不存在福利档案,请检查后重试!")); + } + InsuranceArchivesSocialSchemePO toCopySocialInfo = getSocialSchemeMapper().getOneById(toCopyBaseInfoPO.getSocialArchivesId()); + InsuranceArchivesFundSchemePO toCopyFundInfo = getFundSchemeMapper().getOneById(toCopyBaseInfoPO.getFundArchivesId()); + InsuranceArchivesOtherSchemePO toCopyOtherInfo = getOtherSchemeMapper().getOneById(toCopyBaseInfoPO.getOtherArchivesId()); + //获取待更新的福利档案 + InsuranceArchivesBaseInfoPO toUpdateBaseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(toUpdateTaxAgentId, employeeId); + if(toUpdateBaseInfoPO == null){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "待更新个税扣缴义务人下该员工不存在福利档案,请检查后重试!")); + } + InsuranceArchivesSocialSchemePO toUpdateSocialInfo = getSocialSchemeMapper().getOneById(toUpdateBaseInfoPO.getSocialArchivesId()); + InsuranceArchivesFundSchemePO toUpdateFundInfo = getFundSchemeMapper().getOneById(toUpdateBaseInfoPO.getFundArchivesId()); + InsuranceArchivesOtherSchemePO toUpdateOtherInfo = getOtherSchemeMapper().getOneById(toUpdateBaseInfoPO.getOtherArchivesId()); + //设置福利档案基数调整记录数据 + encryptUtil.decrypt(toCopySocialInfo, InsuranceArchivesSocialSchemePO.class); + encryptUtil.decrypt(toUpdateSocialInfo, InsuranceArchivesSocialSchemePO.class); + encryptUtil.decrypt(toCopyFundInfo, InsuranceArchivesFundSchemePO.class); + encryptUtil.decrypt(toUpdateFundInfo, InsuranceArchivesFundSchemePO.class); + encryptUtil.decrypt(toCopyOtherInfo, InsuranceArchivesOtherSchemePO.class); + encryptUtil.decrypt(toUpdateOtherInfo, InsuranceArchivesOtherSchemePO.class); + + InsuranceArchivesBaseHistoryDTO socialAdjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(toCopySocialInfo.getSocialSchemeId()) + .adjustAfterBaseJson(toCopySocialInfo.getSocialPaymentBaseString()) + .adjustAfterComBaseJson(toCopySocialInfo.getSocialPaymentComBaseString()) + .welfareType(toUpdateSocialInfo.getWelfareType()) + .employeeId(toUpdateSocialInfo.getEmployeeId()) + .paymentOrganization(toUpdateSocialInfo.getPaymentOrganization()) + .adjustBeforeSchemeId(toUpdateSocialInfo.getSocialSchemeId()) + .adjustBeforeBaseJson(toUpdateSocialInfo.getSocialPaymentBaseString()) + .adjustBeforeComBaseJson(toUpdateSocialInfo.getSocialPaymentComBaseString()) + .build(); + InsuranceArchivesBaseHistoryDTO fundAdjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(toCopyFundInfo.getFundSchemeId()) + .adjustAfterBaseJson(toCopyFundInfo.getFundPaymentBaseString()) + .adjustAfterComBaseJson(toCopyFundInfo.getFundPaymentComBaseString()) + .welfareType(toUpdateFundInfo.getWelfareType()) + .employeeId(toUpdateFundInfo.getEmployeeId()) + .paymentOrganization(toUpdateFundInfo.getPaymentOrganization()) + .adjustBeforeSchemeId(toUpdateFundInfo.getFundSchemeId()) + .adjustBeforeBaseJson(toUpdateFundInfo.getFundPaymentBaseString()) + .adjustBeforeComBaseJson(toUpdateFundInfo.getFundPaymentComBaseString()) + .build(); + InsuranceArchivesBaseHistoryDTO otherAdjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(toCopyOtherInfo.getOtherSchemeId()) + .adjustAfterBaseJson(toCopyOtherInfo.getOtherPaymentBaseString()) + .adjustAfterComBaseJson(toCopyOtherInfo.getOtherPaymentComBaseString()) + .welfareType(toUpdateOtherInfo.getWelfareType()) + .employeeId(toUpdateOtherInfo.getEmployeeId()) + .paymentOrganization(toUpdateOtherInfo.getPaymentOrganization()) + .adjustBeforeSchemeId(toUpdateOtherInfo.getOtherSchemeId()) + .adjustBeforeBaseJson(toUpdateOtherInfo.getOtherPaymentBaseString()) + .adjustBeforeComBaseJson(toUpdateOtherInfo.getOtherPaymentComBaseString()) + .build(); + List adjustHistoryList = new ArrayList<>(); + adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(socialAdjustInfo, (long) user.getUID())); + adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(fundAdjustInfo, (long) user.getUID())); + adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(otherAdjustInfo, (long) user.getUID())); + //更新字段 + toUpdateBaseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + + toUpdateSocialInfo.setSocialAccount(toCopySocialInfo.getSocialAccount()); + toUpdateSocialInfo.setSocialSchemeId(toCopySocialInfo.getSocialSchemeId()); + toUpdateSocialInfo.setSocialPaymentBaseString(toCopySocialInfo.getSocialPaymentBaseString()); + toUpdateSocialInfo.setSocialPaymentComBaseString(toCopySocialInfo.getSocialPaymentComBaseString()); + toUpdateSocialInfo.setNonPayment(toCopySocialInfo.getNonPayment()); + toUpdateSocialInfo.setUnderTake(toCopySocialInfo.getUnderTake()); + toUpdateSocialInfo.setSocialStartTime(StringUtils.isNotBlank(payStartYearMonth) ? payStartYearMonth : toCopySocialInfo.getSocialStartTime()); + toUpdateSocialInfo.setUpdateTime(new Date()); + + toUpdateFundInfo.setFundAccount(toCopyFundInfo.getFundAccount()); + toUpdateFundInfo.setSupplementFundAccount(toCopyFundInfo.getSupplementFundAccount()); + toUpdateFundInfo.setFundSchemeId(toCopyFundInfo.getFundSchemeId()); + toUpdateFundInfo.setFundPaymentBaseString(toCopyFundInfo.getFundPaymentBaseString()); + toUpdateFundInfo.setFundPaymentComBaseString(toCopyFundInfo.getFundPaymentComBaseString()); + toUpdateFundInfo.setNonPayment(toCopyFundInfo.getNonPayment()); + toUpdateFundInfo.setUnderTake(toCopyFundInfo.getUnderTake()); + toUpdateFundInfo.setFundStartTime(StringUtils.isNotBlank(payStartYearMonth) ? payStartYearMonth : toCopyFundInfo.getFundStartTime()); + toUpdateFundInfo.setUpdateTime(new Date()); + + toUpdateOtherInfo.setOtherSchemeId(toCopyOtherInfo.getOtherSchemeId()); + toUpdateOtherInfo.setOtherPaymentBaseString(toCopyOtherInfo.getOtherPaymentBaseString()); + toUpdateOtherInfo.setOtherPaymentComBaseString(toCopyOtherInfo.getOtherPaymentComBaseString()); + toUpdateOtherInfo.setNonPayment(toCopyOtherInfo.getNonPayment()); + toUpdateOtherInfo.setUnderTake(toCopyOtherInfo.getUnderTake()); + toUpdateOtherInfo.setOtherStartTime(StringUtils.isNotBlank(payStartYearMonth) ? payStartYearMonth : toCopyOtherInfo.getOtherStartTime()); + toUpdateOtherInfo.setUpdateTime(new Date()); + //档案入库 + encryptUtil.encrypt(toUpdateSocialInfo, InsuranceArchivesSocialSchemePO.class); + encryptUtil.encrypt(toUpdateFundInfo, InsuranceArchivesFundSchemePO.class); + encryptUtil.encrypt(toUpdateOtherInfo, InsuranceArchivesOtherSchemePO.class); + + getInsuranceBaseInfoMapper().updateById(toUpdateBaseInfoPO); + getSocialSchemeMapper().updateById(toUpdateSocialInfo); + getFundSchemeMapper().updateById(toUpdateFundInfo); + getOtherSchemeMapper().updateById(toUpdateOtherInfo); + //基数调整记录入库 + siArchivesBiz.batchInsertAdjustHistory(adjustHistoryList, (long) user.getUID()); + + Map resultMap = new HashMap<>(2); + String resultMsg = "操作成功"; + String resultType = "success"; + + resultMap.put("type", resultType); + resultMap.put("msg", resultMsg); + return resultMap; + } } From 336aaeabea3274ca67f11ed28f19feaf8e19d180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 15:45:48 +0800 Subject: [PATCH 081/169] =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E5=88=86=E7=BB=84=E6=8E=92=E5=BA=8F=E6=94=BE?= =?UTF-8?q?=E5=88=B0=E6=9C=AB=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryStatisticsReportServiceImpl.java | 6 +++--- .../wrapper/SalaryStatisticsReportWrapper.java | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 5819ce821..261e6292b 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -31,13 +31,13 @@ import com.engine.salary.report.util.ReportTimeUtil; import com.engine.salary.service.*; import com.engine.salary.service.impl.*; import com.engine.salary.util.*; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -472,7 +472,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Map> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId); Map> map = new HashMap<>(); salaryAcctEmpResultMap.forEach((k, v) -> { - Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2o(p.getResultValue()), (key1, key2) -> key2)); + Map collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2String(p.getResultValue()), (key1, key2) -> key2)); map.put(k, collect); }); @@ -1937,7 +1937,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary Map sameEmpIdYearMap = new HashMap<>(); String dimensionValue = data.getDimensionValue(); - dimensionSet.forEach(k -> { + dimensionSet.stream().sorted((a,b)->b.length()-a.length()).forEach(k -> { if (dimensionValue == null) { List salaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getList(), empIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); List lastSalaryAcctEmployees = SalaryStatisticsReportBO.listAcctEmpByRationGroupIndividual(k, dimension.getDimCode(), data.getLastList(), lastEmpIdYearMap, salaryAcctResultValueMap, data.getSalaryStatisticsItemList()); diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index 0da317ee9..508877028 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -319,13 +319,13 @@ public class SalaryStatisticsReportWrapper extends Service { //已缓存的报表id String salaryReportIds = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_IDS)); String salaryReportConditions = ""; -// if (StringUtils.isNotBlank(salaryReportIds) && salaryReportIds.contains(id + "")) { -// //报表中缓存的条件 -// salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id)); -// if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) { -// return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); -// } -// } + if (StringUtils.isNotBlank(salaryReportIds) && salaryReportIds.contains(id + "")) { + //报表中缓存的条件 + salaryReportConditions = Utils.null2String(getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_CONDITIONS + id)); + if (StringUtils.isNotBlank(salaryReportConditions) && salaryReportConditions.contains(paramMd5)) { + return getSalaryCacheService(user).get(SalaryCacheKey.SALARY_REPORT_DATA + id + "_" + paramMd5); + } + } // 列表data From 2331ef354ef3d50b3089cf1398398d9f444f2003 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 30 Jan 2024 15:53:55 +0800 Subject: [PATCH 082/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=92=8C=E5=8F=8D=E9=A6=88=E6=8C=89=E9=92=AE=E5=88=86?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryBill/bo/SalaryTemplateBO.java | 1 + .../dto/SalaryBillAckFeedbackDTO.java | 7 +++- .../dto/SalaryTemplateBaseSetDTO.java | 5 +++ .../param/SalaryTemplateSaveParam.java | 7 +++- .../salaryBill/po/SalaryTemplatePO.java | 5 +++ .../salarybill/SalaryTemplateMapper.xml | 17 ++++++++ .../impl/SalaryBillBaseSetServiceImpl.java | 39 ++++++++++++------- .../service/impl/SalarySendServiceImpl.java | 39 +++++++++++++++---- .../impl/SalaryTemplateServiceImpl.java | 1 + .../sys/constant/SalarySysConstant.java | 7 +++- .../salary/wrapper/SalaryTemplateWrapper.java | 7 ++++ 11 files changed, 111 insertions(+), 24 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java index 32fd9f0d6..d436117c1 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java @@ -78,6 +78,7 @@ public class SalaryTemplateBO { .autoSendDayOfMonth(saveParam.getAutoSendDayOfMonth()) .autoSendTimeOfDay(saveParam.getAutoSendTimeOfDay()) .ackFeedbackStatus(saveParam.getAckFeedbackStatus()?1:0) + .ackFeedbackStatus(saveParam.getFeedbackStatus()?1:0) .autoAckDays(saveParam.getAutoAckDays()) .feedbackUrl(saveParam.getFeedbackUrl()) .mobileFeedbackUrl(saveParam.getMobileFeedbackUrl()) diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java index fc9a7abf4..15b336d69 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryBillAckFeedbackDTO.java @@ -18,10 +18,15 @@ import lombok.NoArgsConstructor; public class SalaryBillAckFeedbackDTO { /** - * 工资单确认反馈是否开启。0:否,1:是 + * 工资单确认是否开启。0:否,1:是 */ private String ackStatus; + /** + * 工资单反馈是否开启。0:否,1:是 + */ + private String feedbackStatus; + /** * 反馈地址 */ diff --git a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java index 47f4eb854..93f0ec5e6 100644 --- a/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java +++ b/src/com/engine/salary/entity/salaryBill/dto/SalaryTemplateBaseSetDTO.java @@ -82,6 +82,11 @@ public class SalaryTemplateBaseSetDTO { */ private Boolean ackFeedbackStatus; + /** + * 工资单确认反馈状态 + */ + private Boolean feedbackStatus; + /** * 自动确认超时天数 */ diff --git a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java index df1996e6d..2f5bbb11a 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java @@ -96,10 +96,15 @@ public class SalaryTemplateSaveParam { private List replenishSalaryItemSetting; /** - * 工资单确认反馈状态 + * 工资单确认状态 */ private Boolean ackFeedbackStatus; + /** + * 工资单反馈状态 + */ + private Boolean feedbackStatus; + /** * 自动确认超时天数 */ diff --git a/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java b/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java index 5ffcbaf24..6057d23f5 100644 --- a/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java +++ b/src/com/engine/salary/entity/salaryBill/po/SalaryTemplatePO.java @@ -180,6 +180,11 @@ public class SalaryTemplatePO { */ private Integer ackFeedbackStatus; + /** + * 工资单确认反馈状态 + */ + private Integer feedbackStatus; + /** * 自动确认超时天数 */ diff --git a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml index 538ae335e..31cbf0088 100644 --- a/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalaryTemplateMapper.xml @@ -57,6 +57,7 @@ , t.auto_send_day_of_month , t.auto_send_time_of_day , t.ack_feedback_status + , t.feedback_status , t.auto_ack_days , t.feedback_url , t.mobile_feedback_url @@ -91,6 +92,7 @@ auto_send_day_of_month, auto_send_time_of_day, ack_feedback_status, + feedback_status, auto_ack_days, feedback_url, mobile_feedback_url, @@ -530,6 +532,9 @@ ack_feedback_status=#{ackFeedbackStatus}, + + feedback_status=#{feedbackStatus}, + auto_ack_days=#{autoAckDays}, @@ -635,6 +640,9 @@ ack_feedback_status, + + feedback_status, + auto_ack_days, @@ -736,6 +744,9 @@ #{ackFeedbackStatus}, + + #{feedbackStatus}, + #{autoAckDays}, @@ -847,6 +858,9 @@ ack_feedback_status, + + feedback_status, + auto_ack_days, @@ -948,6 +962,9 @@ #{ackFeedbackStatus}, + + #{feedbackStatus}, + #{autoAckDays}, diff --git a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java index 9400d83cc..581b8f20d 100644 --- a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java @@ -96,13 +96,17 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB // 工资单确认和反馈 =========================================================== SalaryBillAckFeedbackDTO ackFeedbackSetting = saveParam.getAckFeedbackSetting(); // 1.保存确认反馈开关状态 - getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAckStatus(), SALARY_SEND_FEEDBACK, "工资单确认反馈状态", "billSend"); + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAckStatus(), SALARY_SEND_FEEDBACK, "工资单确认状态", "billSend"); + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAckStatus(), SALARY_SEND_FEEDBACK_FK, "工资单反馈状态", "billSend"); if (StringUtils.equals(ackFeedbackSetting.getAckStatus(), "1")) { - // 2.保存反馈地址 + // 保存自动确认时间 + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAutoAckDays().toString(), SALARY_AUTO_ACK_DAYS, "工资单反馈自动确认", "billSend"); + } + + if (StringUtils.equals(ackFeedbackSetting.getFeedbackStatus(), "1")) { + // 保存反馈地址 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getFeedBackUrl(), SALARY_FEEDBACK_URL, "工资单反馈地址", "billSend"); getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getMobileFeedbackUrl(), SALARY_FEEDBACK_URL_MOBILE, "移动端工资单反馈地址", "billSend"); - // 3.保存自动确认时间 - getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAutoAckDays().toString(), SALARY_AUTO_ACK_DAYS, "工资单反馈自动确认", "billSend"); } // 工资单时效性设置 @@ -127,21 +131,30 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB @Override public SalaryBillAckFeedbackDTO getDefaultAckFeedbackSetting() { // 获取反馈开启状态、自动确认时长、反馈地址 - List codes = Arrays.asList(SalarySysConstant.SALARY_SEND_FEEDBACK, SalarySysConstant.SALARY_AUTO_ACK_DAYS, SalarySysConstant.SALARY_FEEDBACK_URL, SALARY_FEEDBACK_URL_MOBILE); + List codes = Arrays.asList(SalarySysConstant.SALARY_SEND_FEEDBACK, SalarySysConstant.SALARY_SEND_FEEDBACK_FK ,SalarySysConstant.SALARY_AUTO_ACK_DAYS, SalarySysConstant.SALARY_FEEDBACK_URL, SALARY_FEEDBACK_URL_MOBILE); List sysConfList = getSalarySysConfService(user).getListByCodes(codes); Map sysConfMap = SalaryEntityUtil.convert2Map(sysConfList, SalarySysConfPO::getConfKey, SalarySysConfPO::getConfValue); SalaryBillAckFeedbackDTO defaultAckFeedBackDTO = SalaryBillAckFeedbackDTO.builder().build(); String ackStatus = sysConfMap.getOrDefault(SalarySysConstant.SALARY_SEND_FEEDBACK, "0"); - if (StringUtils.equals(ackStatus, "0")) { - // 未开启工资单确认 - defaultAckFeedBackDTO.setAckStatus("0"); - defaultAckFeedBackDTO.setAutoAckDays(0); - defaultAckFeedBackDTO.setFeedBackUrl("/"); - defaultAckFeedBackDTO.setMobileFeedbackUrl("/"); - return defaultAckFeedBackDTO; - } + // if (StringUtils.equals(ackStatus, "0")) { + // // 未开启工资单确认 + // defaultAckFeedBackDTO.setAckStatus("0"); + // defaultAckFeedBackDTO.setAutoAckDays(0); + // defaultAckFeedBackDTO.setFeedBackUrl("/"); + // defaultAckFeedBackDTO.setMobileFeedbackUrl("/"); + // return defaultAckFeedBackDTO; + // } defaultAckFeedBackDTO.setAckStatus(ackStatus); + + + String feedbackStatus = sysConfMap.get(SALARY_SEND_FEEDBACK_FK); + if (feedbackStatus == null) { + // 处理历史数据 + feedbackStatus = ackStatus; + } + defaultAckFeedBackDTO.setFeedbackStatus(feedbackStatus); + // 获取超时自动确认时间 Integer autoAckDays = Integer.valueOf(sysConfMap.getOrDefault(SalarySysConstant.SALARY_AUTO_ACK_DAYS, "7")); defaultAckFeedBackDTO.setAutoAckDays(autoAckDays); diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index f79d2b74b..fb68130fb 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -630,18 +630,34 @@ public class SalarySendServiceImpl extends Service implements SalarySendService handleSalaryWatermark(salaryTemplate, salarySendInfo, currentEmployeeId); map.put("salaryTemplate", salaryTemplate); map.put("salaryAcctResult", salaryAcctResultS); - // 工资单发送人、是否已确认 + + // 工资单确认按钮 if (NumberUtils.compare(salaryTemplate.getAckFeedbackStatus(), 1) == 0) { - // 反馈后还可以确认或反馈按钮,确认后2个按钮消失 - Integer confirmStatus = salarySendInfo.getBillConfirmStatus(); - if (confirmStatus == null || confirmStatus != BillConfimStatusEnum.CONFIRMED.getValue()) { - map.put("confirmStatus", "0"); + // 开启了工资单确认 + Integer ackStatus = salarySendInfo.getBillConfirmStatus(); + if (ackStatus == null || ackStatus != BillConfimStatusEnum.CONFIRMED.getValue()) { + map.put("showAck", "1"); } else { - map.put("confirmStatus", "1"); + map.put("showAck", "0"); } map.put("sendEmployeeId", salarySendInfo.getSendEmployeeId()); } else { - map.put("confirmStatus", "1"); + map.put("showAck", "0"); + } + + + // 工资单反馈 + if (NumberUtils.compare(salaryTemplate.getFeedbackStatus(), 1) == 0) { + // 开启了工资单反馈按钮 + Integer confirmStatus = salarySendInfo.getBillConfirmStatus(); + map.put("showFeedback", "1"); + // 除非确认状态为已确认否则可以一直反馈 + if (NumberUtils.compare(salaryTemplate.getAckFeedbackStatus(), 1) == 0 && confirmStatus != null && confirmStatus == BillConfimStatusEnum.CONFIRMED.getValue()) { + map.put("showFeedback", "0"); + } + map.put("sendEmployeeId", salarySendInfo.getSendEmployeeId()); + } else { + map.put("showFeedback", "0"); } return map; @@ -825,7 +841,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService */ private SalaryTemplatePO buildSalaryTemplateContent(String salaryTemplateContent) { Map map = JsonUtil.parseMap(salaryTemplateContent, Object.class); - return SalaryTemplatePO.builder() + SalaryTemplatePO build = SalaryTemplatePO.builder() .id(Long.valueOf(map.getOrDefault("id", "0").toString())) .ackFeedbackStatus(Integer.valueOf(map.getOrDefault("ackFeedbackStatus", "0").toString())) .autoAckDays(Integer.valueOf(map.getOrDefault("autoAckDays", "0").toString())) @@ -849,6 +865,13 @@ public class SalarySendServiceImpl extends Service implements SalarySendService .replenishName(map.getOrDefault("replenishName", "").toString()) .replenishSalaryItemSetting(map.getOrDefault("replenishSalaryItemSetting", "").toString()) .build(); + Object feedbackStatus = map.get("feedbackStatus"); + if (feedbackStatus == null) { + build.setFeedbackStatus(build.getAckFeedbackStatus()); + } else { + Integer.valueOf(map.get("ackFeedbackStatus").toString()); + } + return build; } /** diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index df24535aa..9243eced6 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -215,6 +215,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate salaryTemplateNew.setAutoSendStatus(saveParam.getAutoSendStatus() ? 1 : 0); salaryTemplateNew.setAutoSendCycleType(saveParam.getAutoSendCycleType()); salaryTemplateNew.setAckFeedbackStatus(saveParam.getAckFeedbackStatus() ? 1 : 0); + salaryTemplateNew.setAckFeedbackStatus(saveParam.getFeedbackStatus() ? 1 : 0); salaryTemplateNew.setAutoAckDays(saveParam.getAutoAckDays()); salaryTemplateNew.setFeedbackUrl(saveParam.getFeedbackUrl()); salaryTemplateNew.setMobileFeedbackUrl(saveParam.getMobileFeedbackUrl()); diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index 081702d22..80ce94227 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -82,10 +82,15 @@ public class SalarySysConstant { public static final String SALARY_ARCHIVE_DELETE = "salaryArchiveDelete"; /** - * 工资单确认反馈状态 + * 工资单确认状态 */ public static final String SALARY_SEND_FEEDBACK = "SALARY_SEND_FEEDBACK"; + /** + * 工资单反馈状态 + */ + public static final String SALARY_SEND_FEEDBACK_FK = "SALARY_SEND_FEEDBACK_FK"; + /** * 工资单反馈自动确认 */ diff --git a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java index 25a0d96ef..c4b622c69 100644 --- a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java @@ -166,6 +166,12 @@ public class SalaryTemplateWrapper extends Service { salaryTemplateBaseSetDTO.setSendEmail(po.getSendEmailId()); salaryTemplateBaseSetDTO.setAutoSendStatus(po.getAutoSendStatus() != null && po.getAutoSendStatus().equals(SalaryTemplateWhetherEnum.TRUE.getValue())); salaryTemplateBaseSetDTO.setAckFeedbackStatus(po.getAckFeedbackStatus() != null && NumberUtils.compare(po.getAckFeedbackStatus(), 1) == 0); + if (po.getFeedbackStatus() == null) { + salaryTemplateBaseSetDTO.setFeedbackStatus(salaryTemplateBaseSetDTO.getAckFeedbackStatus()); + } else { + salaryTemplateBaseSetDTO.setFeedbackStatus(NumberUtils.compare(po.getAckFeedbackStatus(), 1) == 0); + } + salaryTemplateBaseSetDTO.setAutoAckDays(ObjectUtils.isEmpty(po.getAutoAckDays()) ? 7 : po.getAutoAckDays()); // 规则赋值 如果为ALL传“” 如果为byRule传薪资项目ID salaryTemplateBaseSetDTO.setReplenishRule(SalaryTemplateReplenishRuleEnum.ALL.getValue().equals(po.getReplenishRule()) ? "" : po.getReplenishRule()); @@ -199,6 +205,7 @@ public class SalaryTemplateWrapper extends Service { SalaryBillAckFeedbackDTO defaultAckFeedback = getSalaryBillBaseSetService(user).getDefaultAckFeedbackSetting(); salaryTemplateBaseSetDTO.setAckFeedbackStatus(StringUtils.equals(defaultAckFeedback.getAckStatus(), "1")); salaryTemplateBaseSetDTO.setAutoAckDays(defaultAckFeedback.getAutoAckDays()); + salaryTemplateBaseSetDTO.setFeedbackStatus(StringUtils.equals(defaultAckFeedback.getFeedbackStatus(), "1")); salaryTemplateBaseSetDTO.setFeedbackUrl(defaultAckFeedback.getFeedBackUrl()); salaryTemplateBaseSetDTO.setMobileFeedbackUrl(defaultAckFeedback.getMobileFeedbackUrl()); } From 3281b138faeb3bb4ea74e23cf42754f3d08317c5 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 30 Jan 2024 15:58:42 +0800 Subject: [PATCH 083/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=A4=8D=E5=88=B6?= =?UTF-8?q?action=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/action/CopyToPaySIArchiveAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/action/CopyToPaySIArchiveAction.java b/src/com/engine/salary/action/CopyToPaySIArchiveAction.java index 6ff38ee6d..2fcfb6596 100644 --- a/src/com/engine/salary/action/CopyToPaySIArchiveAction.java +++ b/src/com/engine/salary/action/CopyToPaySIArchiveAction.java @@ -91,8 +91,9 @@ public class CopyToPaySIArchiveAction implements Action { } Long toCopyTaxAgentId = toCopyTaxAgentPOS.get(0).getId(); Long toUpdateTaxAgentId = toUpdateTaxAgentPOS.get(0).getId(); - Long employeeId = Long.valueOf(list.stream().filter(f -> f.salaryName.equals("员工id")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("-1")); + Long employeeId = Long.valueOf(list.stream().filter(f -> "员工id".equals(f.salaryName)).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("-1")); User user = new User(Integer.parseInt(uid)); + user.setLanguage(7); //拷贝福利档案并置为在缴 Map resultMap = getSIArchivesService(user).copyToPay(toCopyTaxAgentId, toUpdateTaxAgentId, employeeId, payStartYearMonth); if (!"success".equals(resultMap.get("type").toString())) { From acbffb205baa0477a3b9bf7ff28669d9cf20be2f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 30 Jan 2024 16:00:50 +0800 Subject: [PATCH 084/169] sql --- resource/sqlupgrade/DM/sql202401300303.sql | 3 +++ resource/sqlupgrade/GS/sql202401300303.sql | 3 +++ resource/sqlupgrade/JC/sql202401300303.sql | 3 +++ resource/sqlupgrade/Mysql/sql202401300303.sql | 1 + resource/sqlupgrade/Oracle/sql202401300303.sql | 2 ++ resource/sqlupgrade/PG/sql202401300303.sql | 1 + resource/sqlupgrade/SQLServer/sql202401300303.sql | 2 ++ resource/sqlupgrade/ST/sql202401300303.sql | 3 +++ 8 files changed, 18 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202401300303.sql create mode 100644 resource/sqlupgrade/GS/sql202401300303.sql create mode 100644 resource/sqlupgrade/JC/sql202401300303.sql create mode 100644 resource/sqlupgrade/Mysql/sql202401300303.sql create mode 100644 resource/sqlupgrade/Oracle/sql202401300303.sql create mode 100644 resource/sqlupgrade/PG/sql202401300303.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202401300303.sql create mode 100644 resource/sqlupgrade/ST/sql202401300303.sql diff --git a/resource/sqlupgrade/DM/sql202401300303.sql b/resource/sqlupgrade/DM/sql202401300303.sql new file mode 100644 index 000000000..edf082294 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202401300303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); +/ + diff --git a/resource/sqlupgrade/GS/sql202401300303.sql b/resource/sqlupgrade/GS/sql202401300303.sql new file mode 100644 index 000000000..edf082294 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202401300303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); +/ + diff --git a/resource/sqlupgrade/JC/sql202401300303.sql b/resource/sqlupgrade/JC/sql202401300303.sql new file mode 100644 index 000000000..edf082294 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202401300303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202401300303.sql b/resource/sqlupgrade/Mysql/sql202401300303.sql new file mode 100644 index 000000000..847c44d97 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202401300303.sql @@ -0,0 +1 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202401300303.sql b/resource/sqlupgrade/Oracle/sql202401300303.sql new file mode 100644 index 000000000..6211d28fa --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202401300303.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202401300303.sql b/resource/sqlupgrade/PG/sql202401300303.sql new file mode 100644 index 000000000..847c44d97 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202401300303.sql @@ -0,0 +1 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202401300303.sql b/resource/sqlupgrade/SQLServer/sql202401300303.sql new file mode 100644 index 000000000..96f40257b --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202401300303.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500) +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202401300303.sql b/resource/sqlupgrade/ST/sql202401300303.sql new file mode 100644 index 000000000..edf082294 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202401300303.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add mobile_feedback_url varchar(500); +/ + From 335964e2df8e6178547f9188fe6a0b7b5fe8ef0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 30 Jan 2024 17:21:13 +0800 Subject: [PATCH 085/169] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=A0=E6=95=88?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../annotation/handle/ElogTableScanner.java | 312 +++++++++--------- 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java index a024d3478..709e8e0cb 100644 --- a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java +++ b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java @@ -1,156 +1,156 @@ -package com.engine.salary.elog.annotation.handle; - -import com.engine.salary.elog.annotation.ElogField; -import com.engine.salary.elog.annotation.ElogTable; -import com.engine.salary.elog.entity.dto.DataTypeEnum; -import com.engine.salary.elog.entity.dto.TableColumnBean; -import com.engine.salary.elog.util.ElogUtils; -import lombok.extern.slf4j.Slf4j; -import org.reflections.Reflections; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.lang.reflect.Field; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @ClassName: ElogTableScanner - * @Description 日志操作表扫描 - * @Author tanghj - * @Date 2021/3/12 13:31 - */ -@Slf4j -public class ElogTableScanner { - private Logger logger = LoggerFactory.getLogger(this.getClass()); - -// private TableCheckerMapper tableCheckerMapper; - -// @Override - public void run() throws Exception { - - // todo 需要考虑集群下,控制一台机器来跑 - scanElogTable(); - - } - - private void scanElogTable() { - // todo 是否还需要扫描Elog(因为可能不需要本地存储) ELogDetailTable, -// Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); - Reflections reflections = new Reflections("com.engine.salary.elog"); - Set> tableBeans = reflections.getTypesAnnotatedWith(ElogTable.class); - - - List baseColumns = new ArrayList<>(); - - Map> tableColumns = elogTableHandle(tableBeans,baseColumns); - - for(String tableName : tableColumns.keySet()) { - - // todo 需要处理明细表,如果没有直接初始化原始明细表,如果有加上自定义的 - List columns = tableColumns.get(tableName); - if(columns == null) { - columns = baseColumns; - } else { - columns.addAll(baseColumns); - } - tableCheck(tableName, columns); - } - - } - - private Map> elogTableHandle(Set> tableBeans, List baseColumns) { - Map> tableMap = new HashMap<>(); - for (Class aClass :tableBeans) {//遍历每个controller层 - - List list = new ArrayList<>(); - - ElogTable elogTable = aClass.getAnnotation(ElogTable.class); - - List fields = Arrays.asList(aClass.getDeclaredFields());//获取方法 - for (Field f : fields) { - - ElogField field = f.getAnnotation(ElogField.class); - if(field == null) { - continue; - } - - TableColumnBean tableColumnBean = new TableColumnBean(); - - tableColumnBean.setColumnName(f.getName()); - tableColumnBean.setColumnComment(field.comment()); - tableColumnBean.setColumnDefault(field.defaultValue()); - tableColumnBean.setFieldLength(field.length()); - tableColumnBean.setDataType(field.dataType()); - tableColumnBean.setNullable(field.isNull()); - list.add(tableColumnBean); - } - if(!ElogUtils.BASE_TABLE.equals(elogTable.module())) { - tableMap.put(ElogUtils.getTableName(elogTable.module(), elogTable.function()), list); - } else { - baseColumns.addAll(list); - } - } - - return tableMap; - } - - private void tableCheck(String tableName, List columns) { - List oldColumns = new ArrayList<>(); -// List oldColumns = tableCheckerMapper.getTableStructure(tableName); - - // 表不存在 - if(oldColumns == null || oldColumns.size() == 0) { - createTable(tableName,columns ); - } else { - Map newcolMap = new HashMap<>(); - Map oldcolMap = new HashMap<>(); - - columns.stream().forEach(tableColumnBean -> newcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean)); - oldColumns.stream().forEach(tableColumnBean -> { - tableColumnBean.setDataType(ElogUtils.getEnumFromString(DataTypeEnum.class, tableColumnBean.getDataTypeStr())); - tableColumnBean.setNullable("YES".equalsIgnoreCase(tableColumnBean.getIsNullableStr())); - oldcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean); - }); - // 只增加或者修改,不删除字段 - for(String key : newcolMap.keySet()) { - if(oldcolMap.containsKey(key)) { - // 字段变动则修改 - if(!(newcolMap.get(key).toSql()).equals(oldcolMap.get(key).toSql())) - this.modifyColumn(tableName, newcolMap.get(key)); - } else { - this.addColumn(tableName, newcolMap.get(key)); - } - } - } - - } - - private void createTable(String tableName, List columns) { - StringBuilder sb = new StringBuilder("create table ").append(tableName).append(" ( "); - sb.append(columns.stream().map( bean -> bean.toSql()).collect(Collectors.joining(","))); - sb.append(")"); - logger.info("创建sql:{}",sb.toString()); -// tableCheckerMapper.createElogTable(sb.toString()); - } - - private void addColumn(String tableName, TableColumnBean tableColumnBean) { - StringBuilder sb = new StringBuilder("alter table ") - .append(tableName).append(" ") - .append(" add ") - .append(" column ") - .append(tableColumnBean.toSql()); - logger.info("新增字段sql:{}",sb.toString()); -// tableCheckerMapper.createElogTable(sb.toString()); - } - - private void modifyColumn(String tableName, TableColumnBean tableColumnBean) { - StringBuilder sb = new StringBuilder("alter table ") - .append(tableName).append(" ") - .append(" modify ") - .append(" column ") - .append(tableColumnBean.toSql()); - logger.info("修改字段sql:{}",sb.toString()); -// tableCheckerMapper.createElogTable(sb.toString()); - } -} +//package com.engine.salary.elog.annotation.handle; +// +//import com.engine.salary.elog.annotation.ElogField; +//import com.engine.salary.elog.annotation.ElogTable; +//import com.engine.salary.elog.entity.dto.DataTypeEnum; +//import com.engine.salary.elog.entity.dto.TableColumnBean; +//import com.engine.salary.elog.util.ElogUtils; +//import lombok.extern.slf4j.Slf4j; +//import org.reflections.Reflections; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +// +//import java.lang.reflect.Field; +//import java.util.*; +//import java.util.stream.Collectors; +// +///** +// * @ClassName: ElogTableScanner +// * @Description 日志操作表扫描 +// * @Author tanghj +// * @Date 2021/3/12 13:31 +// */ +//@Slf4j +//public class ElogTableScanner { +// private Logger logger = LoggerFactory.getLogger(this.getClass()); +// +//// private TableCheckerMapper tableCheckerMapper; +// +//// @Override +// public void run() throws Exception { +// +// // todo 需要考虑集群下,控制一台机器来跑 +// scanElogTable(); +// +// } +// +// private void scanElogTable() { +// // todo 是否还需要扫描Elog(因为可能不需要本地存储) ELogDetailTable, +//// Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); +// Reflections reflections = new Reflections("com.engine.salary.elog"); +// Set> tableBeans = reflections.getTypesAnnotatedWith(ElogTable.class); +// +// +// List baseColumns = new ArrayList<>(); +// +// Map> tableColumns = elogTableHandle(tableBeans,baseColumns); +// +// for(String tableName : tableColumns.keySet()) { +// +// // todo 需要处理明细表,如果没有直接初始化原始明细表,如果有加上自定义的 +// List columns = tableColumns.get(tableName); +// if(columns == null) { +// columns = baseColumns; +// } else { +// columns.addAll(baseColumns); +// } +// tableCheck(tableName, columns); +// } +// +// } +// +// private Map> elogTableHandle(Set> tableBeans, List baseColumns) { +// Map> tableMap = new HashMap<>(); +// for (Class aClass :tableBeans) {//遍历每个controller层 +// +// List list = new ArrayList<>(); +// +// ElogTable elogTable = aClass.getAnnotation(ElogTable.class); +// +// List fields = Arrays.asList(aClass.getDeclaredFields());//获取方法 +// for (Field f : fields) { +// +// ElogField field = f.getAnnotation(ElogField.class); +// if(field == null) { +// continue; +// } +// +// TableColumnBean tableColumnBean = new TableColumnBean(); +// +// tableColumnBean.setColumnName(f.getName()); +// tableColumnBean.setColumnComment(field.comment()); +// tableColumnBean.setColumnDefault(field.defaultValue()); +// tableColumnBean.setFieldLength(field.length()); +// tableColumnBean.setDataType(field.dataType()); +// tableColumnBean.setNullable(field.isNull()); +// list.add(tableColumnBean); +// } +// if(!ElogUtils.BASE_TABLE.equals(elogTable.module())) { +// tableMap.put(ElogUtils.getTableName(elogTable.module(), elogTable.function()), list); +// } else { +// baseColumns.addAll(list); +// } +// } +// +// return tableMap; +// } +// +// private void tableCheck(String tableName, List columns) { +// List oldColumns = new ArrayList<>(); +//// List oldColumns = tableCheckerMapper.getTableStructure(tableName); +// +// // 表不存在 +// if(oldColumns == null || oldColumns.size() == 0) { +// createTable(tableName,columns ); +// } else { +// Map newcolMap = new HashMap<>(); +// Map oldcolMap = new HashMap<>(); +// +// columns.stream().forEach(tableColumnBean -> newcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean)); +// oldColumns.stream().forEach(tableColumnBean -> { +// tableColumnBean.setDataType(ElogUtils.getEnumFromString(DataTypeEnum.class, tableColumnBean.getDataTypeStr())); +// tableColumnBean.setNullable("YES".equalsIgnoreCase(tableColumnBean.getIsNullableStr())); +// oldcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean); +// }); +// // 只增加或者修改,不删除字段 +// for(String key : newcolMap.keySet()) { +// if(oldcolMap.containsKey(key)) { +// // 字段变动则修改 +// if(!(newcolMap.get(key).toSql()).equals(oldcolMap.get(key).toSql())) +// this.modifyColumn(tableName, newcolMap.get(key)); +// } else { +// this.addColumn(tableName, newcolMap.get(key)); +// } +// } +// } +// +// } +// +// private void createTable(String tableName, List columns) { +// StringBuilder sb = new StringBuilder("create table ").append(tableName).append(" ( "); +// sb.append(columns.stream().map( bean -> bean.toSql()).collect(Collectors.joining(","))); +// sb.append(")"); +// logger.info("创建sql:{}",sb.toString()); +//// tableCheckerMapper.createElogTable(sb.toString()); +// } +// +// private void addColumn(String tableName, TableColumnBean tableColumnBean) { +// StringBuilder sb = new StringBuilder("alter table ") +// .append(tableName).append(" ") +// .append(" add ") +// .append(" column ") +// .append(tableColumnBean.toSql()); +// logger.info("新增字段sql:{}",sb.toString()); +//// tableCheckerMapper.createElogTable(sb.toString()); +// } +// +// private void modifyColumn(String tableName, TableColumnBean tableColumnBean) { +// StringBuilder sb = new StringBuilder("alter table ") +// .append(tableName).append(" ") +// .append(" modify ") +// .append(" column ") +// .append(tableColumnBean.toSql()); +// logger.info("修改字段sql:{}",sb.toString()); +//// tableCheckerMapper.createElogTable(sb.toString()); +// } +//} From 9074fb46fcd41e55b34e9c65e5779c2f2d6832ee Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 2 Feb 2024 15:23:26 +0800 Subject: [PATCH 086/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8CSIArchivesBiz?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E8=BF=81=E7=A7=BB=E5=88=B0=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E6=98=AF=E5=AE=9E=E7=8E=B0=E7=B1=BB=EF=BC=8C=E5=B9=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=B0=83=E7=94=A8=E6=96=B9=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cmd/siarchives/SIArchivesTipsCmd.java | 18 +- .../salary/service/SIArchivesService.java | 32 +- .../service/impl/ColumnBuildServiceImpl.java | 19 +- .../service/impl/RecordsBuildServiceImpl.java | 43 +- .../impl/SIAComparisonResultServiceImpl.java | 16 +- .../service/impl/SIAccountServiceImpl.java | 47 +- .../service/impl/SIArchivesServiceImpl.java | 2569 ++++++++++++++++- .../service/impl/SIExportServiceImpl.java | 45 +- .../service/impl/SIImportServiceImpl.java | 16 +- .../service/impl/SISchemeServiceImpl.java | 101 +- .../AutoSyncResignationEmpArchiveJob.java | 11 +- 11 files changed, 2766 insertions(+), 151 deletions(-) diff --git a/src/com/engine/salary/cmd/siarchives/SIArchivesTipsCmd.java b/src/com/engine/salary/cmd/siarchives/SIArchivesTipsCmd.java index 561a395a4..5d4eea819 100644 --- a/src/com/engine/salary/cmd/siarchives/SIArchivesTipsCmd.java +++ b/src/com/engine/salary/cmd/siarchives/SIArchivesTipsCmd.java @@ -3,9 +3,13 @@ package com.engine.salary.cmd.siarchives; import com.engine.common.biz.AbstractCommonCommand; import com.engine.common.entity.BizLogContext; import com.engine.core.interceptor.CommandContext; -import com.engine.salary.biz.SIArchivesBiz; +import com.engine.salary.mapper.siarchives.SocialSchemeMapper; +import com.engine.salary.util.SalaryAssert; +import org.apache.ibatis.session.SqlSession; +import weaver.conn.mybatis.MyBatisFactory; import weaver.hrm.User; +import java.util.List; import java.util.Map; /** @@ -28,8 +32,16 @@ public class SIArchivesTipsCmd extends AbstractCommonCommand @Override public Map execute(CommandContext commandContext) { - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - siArchivesBiz.tips(); + + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + List employeeIds = socialSchemeMapper.tips(); + SalaryAssert.isEmpty(employeeIds, "当前有离职人员档案存在福利缴纳起始月,未维护福利最后缴纳月,请尽快处理"); + + } finally { + sqlSession.close(); + } return null; } } diff --git a/src/com/engine/salary/service/SIArchivesService.java b/src/com/engine/salary/service/SIArchivesService.java index 7f2f31866..4f98cc742 100644 --- a/src/com/engine/salary/service/SIArchivesService.java +++ b/src/com/engine/salary/service/SIArchivesService.java @@ -1,11 +1,11 @@ package com.engine.salary.service; +import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam; import com.engine.salary.entity.siarchives.param.SIArchiveBaseHistoryListParam; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; -import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO; +import com.engine.salary.entity.siarchives.po.*; import com.engine.salary.util.page.PageInfo; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -124,4 +124,32 @@ public interface SIArchivesService { PageInfo getAdjustHistoryList(SIArchiveBaseHistoryListParam param); PageInfo historyListByEmployeeIdAndOperator(SIArchiveBaseHistoryListParam param); + + List> buildTableData(List insuranceArchivesEmployeePOS); + + List buildWeaTableColumns(List insuranceArchivesEmployeePOS); + + boolean isDiffWelBase(); + + List payInsuranceIds(Long socialSchemeId, Integer paymentScope); + + List payInsuranceIds(Long socialSchemeId); + + List getSocialByEmployeeIds(List employeeIds); + List getFundByEmployeeIds(List employeeIds); + List getOtherByEmployeeIds(List employeeIds); + + Map buildBatchAccount(List ids, Long paymentOrganization); + + Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope); + + String checkAndBuildWelBaseWithLimit(Long primaryId, String paymentBaseString, Integer paymentScope); + + List dealSocialBaseAdjustInfoList(List adjustList, Long creator); + List dealFundBaseAdjustInfoList(List adjustList, Long creator); + List dealOtherBaseAdjustInfoList(List adjustList, Long creator); + + void batchInsertAdjustHistory(List adjustHistoryList); + + List listEndDateIsNull(List employeeIds); } diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index 5312f1c51..a03f1e529 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -4,8 +4,8 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.constant.WeaBoolAttr; import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesAccountPO; @@ -17,9 +17,11 @@ import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.service.ColumnBuildService; +import com.engine.salary.service.SIArchivesService; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import org.apache.commons.lang3.StringUtils; +import weaver.hrm.User; import java.util.*; import java.util.stream.Collectors; @@ -32,11 +34,16 @@ import java.util.stream.Collectors; **/ public class ColumnBuildServiceImpl extends Service implements ColumnBuildService { - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private ICategoryMapper getICategoryMapper() { return MapperProxyFactory.getProxy(ICategoryMapper.class); } + + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class, user); + } + @Override public List buildCommonColumnsWithStyle(List pos, Long employeeId, String tenantKey, Integer paymentStatus) { List list = new ArrayList<>(); @@ -125,7 +132,8 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic } private Map> buildPaymentTitle(List pos, Map categoryIdNameMap, Long employeeId, String tenantKey) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); @@ -440,9 +448,10 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic @Override public List buildInspectColumns(List pos, Long paymentOrganization) { List list = new ArrayList<>(); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + List employeeIds = pos.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList()); - Map insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); +// Map insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); + Map insuranceArchivesAccountPOMap = getSIArchivesService(user).buildBatchAccount(employeeIds, paymentOrganization); Map categoryIdNameMap = getICategoryMapper().listAll().stream().collect(Collectors.toMap(ICategoryPO -> String.valueOf(ICategoryPO.getId()), ICategoryPO::getInsuranceName)); Map> columns = buildInspectTableTitle(new ArrayList<>(insuranceArchivesAccountPOMap.values()), categoryIdNameMap); WeaTableColumn weaTableNameColumn = new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName"); diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java index a18ca32e0..2976579d4 100644 --- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO; @@ -21,6 +20,7 @@ import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.RecordsBuildService; +import com.engine.salary.service.SIArchivesService; import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryDateUtil; @@ -62,11 +62,16 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class, user); + } @Override public List> buildCommonRecords(List list, Long employeeId) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); List> result = new ArrayList<>(); if (CollectionUtils.isEmpty(list)) { return result; @@ -114,7 +119,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ if (welBaseDiffSign) { if (socialJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); socialJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialPerBase", v); @@ -125,7 +131,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ }); if (socialComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); socialComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialComBase", v); @@ -135,7 +142,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ } else { if (socialJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId()); socialJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialBase", v); @@ -158,7 +166,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ if (welBaseDiffSign) { if (fundJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); fundJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundPerBase", v); @@ -169,7 +178,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ }); if (fundComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); fundComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundComBase", v); @@ -179,7 +189,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ } else { if (fundJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId()); fundJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundBase", v); @@ -200,7 +211,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ if (welBaseDiffSign) { if (otherJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); otherJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherPerBase", v); @@ -211,7 +223,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ }); if (otherComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); otherComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherComBase", v); @@ -221,7 +234,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ } else { if (otherJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId()); otherJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherBase", v); @@ -311,7 +325,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ @Override public List> buildInspectRecords(List list, Long paymentOrganization) { List> result = new ArrayList<>(); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + if (CollectionUtils.isEmpty(list)) { return result; } @@ -325,7 +339,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ return result; } Map collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity())); - Map insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); +// Map insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); + Map insuranceArchivesAccountPOMap = getSIArchivesService(user).buildBatchAccount(employeeIds, paymentOrganization); list.forEach(item -> { Map record = new HashMap<>(); DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId()) == null ? new DataCollectionEmployee() : collect.get(item.getEmployeeId()); diff --git a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java index 389e4ef2b..05512c23c 100644 --- a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java @@ -2,7 +2,6 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.bo.InsuranceComparisonResultBO; import com.engine.salary.entity.siaccount.dto.InsuranceComparisonResultListDTO; @@ -19,19 +18,18 @@ import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; import com.engine.salary.service.SIAComparisonResultService; +import com.engine.salary.service.SIArchivesService; import com.engine.salary.service.SISchemeService; 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.db.MapperProxyFactory; -import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.Column; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; -import com.wbi.util.Util; import org.apache.commons.lang3.BooleanUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.hrm.User; @@ -47,7 +45,7 @@ import java.util.stream.Collectors; public class SIAComparisonResultServiceImpl extends Service implements SIAComparisonResultService { private EncryptUtil encryptUtil = new EncryptUtil(); - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private InsuranceExportMapper getInsuranceExportMapper() { return MapperProxyFactory.getProxy(InsuranceExportMapper.class); @@ -73,6 +71,10 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar return ServiceUtil.getService(SISchemeServiceImpl.class, user); } + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class, user); + } + /** * 根据列表查询条件查询线下对比结果(分页) */ @@ -144,7 +146,8 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar */ private InsuranceComparisonResultListDTO listByParam(boolean needPage, InsuranceComparisonResultQueryParam queryParam) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); //排序配置 OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); @@ -232,7 +235,8 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar } private Set welfareInfo() { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); Set info = new HashSet<>(); List listAll = getICategoryMapper().listAll(); diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 857196426..08b7fc624 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -103,7 +103,7 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; public class SIAccountServiceImpl extends Service implements SIAccountService { - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private EncryptUtil encryptUtil = new EncryptUtil(); @@ -227,6 +227,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return MapperProxyFactory.getProxy(SIAccountUtilMapper.class); } + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class, user); + } + @Override public Map listPage(InsuranceAccountBatchParam queryParam) { Long employeeId = (long) user.getUID(); @@ -761,13 +765,15 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { PageInfo pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), insuranceArchivesEmployeePOS, InsuranceArchivesEmployeePO.class); - List> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS); +// List> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS); + List> records = getSIArchivesService(user).buildTableData(insuranceArchivesEmployeePOS); PageInfo> pageInfos = new PageInfo<>(records); pageInfos.setTotal(pageInfo.getTotal()); pageInfos.setPageNum(param.getCurrent()); pageInfos.setPageSize(param.getPageSize()); - List weaTableColumns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, employeeId); +// List weaTableColumns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, employeeId); + List weaTableColumns = getSIArchivesService(user).buildWeaTableColumns(insuranceArchivesEmployeePOS); WeaTable table = new WeaTable(); table.setPageUID(UUID.randomUUID().toString()); @@ -2349,7 +2355,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } public Map> createWelColumnMap(InsuranceAccountDetailParam param) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); //查询线上福利核算记录 InsuranceExportParam insuranceExportParam = new InsuranceExportParam(); insuranceExportParam.setBillMonth(param.getBillMonth()); @@ -2496,7 +2503,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } public Map welColumnNameCodeMap(InsuranceAccountDetailParam param) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); //查询线上福利核算记录 InsuranceExportParam insuranceExportParam = new InsuranceExportParam(); insuranceExportParam.setBillMonth(param.getBillMonth()); @@ -2821,7 +2829,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { * @param baseMap excel导入的对比数据 */ private ExcelInsuranceDetailPO handleExcelInsuranceDetail(String billMonth, Long employeeId, Long paymentOrganization, Map baseMap, Map welColumnNameCodeMap) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); ExcelInsuranceDetailPO excelInsuranceDetailPO = new ExcelInsuranceDetailPO(); excelInsuranceDetailPO.setId(IdGenerator.generate()); @@ -4452,7 +4461,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List empIdsInPayMonthRange = listCanPayEmpIds(param.getPaymentOrganization(), param.getBillMonth()); empIds = empIds.stream().filter(f->canAccountIds.contains(f) && empIdsInPayMonthRange.contains(f)).collect(Collectors.toList()); - List socials = siArchivesBiz.getSocialByEmployeeIds(empIds); +// List socials = siArchivesBiz.getSocialByEmployeeIds(empIds); + List socials = getSIArchivesService(user).getSocialByEmployeeIds(empIds); //过滤出目标个税扣缴义务人相关信息 socials = socials.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); List emp1 = socials.stream() @@ -4461,7 +4471,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { .map(InsuranceArchivesSocialSchemePO::getEmployeeId) .collect(Collectors.toList()); - List funds = siArchivesBiz.getFundByEmployeeIds(empIds); +// List funds = siArchivesBiz.getFundByEmployeeIds(empIds); + List funds = getSIArchivesService(user).getFundByEmployeeIds(empIds); //过滤出目标个税扣缴义务人相关信息 funds = funds.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); List emp2 = funds.stream() @@ -4470,7 +4481,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { .map(InsuranceArchivesFundSchemePO::getEmployeeId) .collect(Collectors.toList()); - List others = siArchivesBiz.getOtherByEmployeeIds(empIds); +// List others = siArchivesBiz.getOtherByEmployeeIds(empIds); + List others = getSIArchivesService(user).getOtherByEmployeeIds(empIds); //过滤出目标个税扣缴义务人相关信息 others = others.stream().filter(f -> f.getPaymentOrganization().equals(param.getPaymentOrganization())).collect(Collectors.toList()); List emp3 = others.stream() @@ -4534,8 +4546,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } public void siCommonAccount(String billMonth, List ids, Long paymentOrganization) { - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - Map insuranceArchivesAccountPOS = siArchivesBiz.buildBatchAccount(ids, paymentOrganization); + +// Map insuranceArchivesAccountPOS = siArchivesBiz.buildBatchAccount(ids, paymentOrganization); + Map insuranceArchivesAccountPOS = getSIArchivesService(user).buildBatchAccount(ids, paymentOrganization); List list = new ArrayList<>(); int count = 0; for (Map.Entry entry : insuranceArchivesAccountPOS.entrySet()) { @@ -4597,7 +4610,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (accountPO.getOther() != null) { InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther(); insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization()); @@ -4759,7 +4773,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (accountPO.getFund() != null) { InsuranceArchivesFundSchemePO fundPO = accountPO.getFund(); insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization()); @@ -4922,7 +4937,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (accountPO.getSocial() != null) { InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); @@ -5498,7 +5514,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { */ public String accountSupplement(List baseList, List employeeIds, Long paymentOrganization) { //(k,v) k-员工id v-员工对应的福利档案数据 - Map longInsuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); +// Map longInsuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); + Map longInsuranceArchivesAccountPOMap = getSIArchivesService(user).buildBatchAccount(employeeIds, paymentOrganization); //核算结果集 List pos = new ArrayList<>(); baseList.forEach(baseParam -> { diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 641118a29..29859d236 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -1,63 +1,94 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.api.browser.bean.SearchConditionGroup; +import com.api.browser.bean.SearchConditionItem; +import com.api.browser.bean.SearchConditionOption; +import com.api.browser.util.ConditionFactory; +import com.api.browser.util.ConditionType; import com.cloudstore.dev.api.util.Util_DataCache; +import com.cloudstore.eccom.pc.table.WeaTable; +import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom; import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; +import com.engine.salary.biz.SICategoryBiz; +import com.engine.salary.biz.SISchemeBiz; import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd; +import com.engine.salary.common.SalaryContext; +import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.EncryptUtil; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; +import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO; import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBaseInfoBO; -import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; -import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; -import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam; -import com.engine.salary.entity.siarchives.param.SIArchiveBaseHistoryListParam; +import com.engine.salary.entity.siarchives.dto.*; +import com.engine.salary.entity.siarchives.param.*; import com.engine.salary.entity.siarchives.po.*; +import com.engine.salary.entity.sicategory.po.ICategoryPO; +import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; +import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.UserStatusEnum; +import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; -import com.engine.salary.enums.sicategory.DeleteTypeEnum; -import com.engine.salary.enums.sicategory.NonPaymentEnum; -import com.engine.salary.enums.sicategory.PaymentScopeEnum; -import com.engine.salary.enums.sicategory.WelfareTypeEnum; +import com.engine.salary.enums.sicategory.*; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum; import com.engine.salary.exception.SalaryRunTimeException; -import com.engine.salary.mapper.siarchives.FundSchemeMapper; -import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; -import com.engine.salary.mapper.siarchives.OtherSchemeMapper; -import com.engine.salary.mapper.siarchives.SocialSchemeMapper; +import com.engine.salary.mapper.siarchives.*; +import com.engine.salary.mapper.sicategory.ICategoryMapper; +import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; +import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; +import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SIArchivesService; +import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentEmpChangeService; import com.engine.salary.service.TaxAgentService; import com.engine.salary.sys.constant.SalarySysConstant; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; +import com.engine.salary.sys.enums.OpenEnum; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; -import com.engine.salary.util.SalaryEntityUtil; -import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.*; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; +import com.engine.salary.wrapper.TaxAgentWrapper; 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.ibatis.session.SqlSession; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.BeanUtils; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StopWatch; +import weaver.conn.mybatis.MyBatisFactory; import weaver.general.BaseBean; import weaver.general.Util; import weaver.hrm.User; +import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; +import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_AUTO_ADJUST; +import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_DIFF_BY_PER_AND_COM; + /** * @Author weaver_cl * @Description: @@ -70,7 +101,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService private final Boolean isLog = "true".equals(baseBean.getPropValue("hrmSalary", "log")); - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private EncryptUtil encryptUtil = new EncryptUtil(); @@ -102,6 +133,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return MapperProxyFactory.getProxy(OtherSchemeMapper.class); } + private TaxAgentMapper getTaxAgentMapper() { + return MapperProxyFactory.getProxy(TaxAgentMapper.class); + } + + private InsuranceSchemeDetailMapper getInsuranceSchemeDetailMapper() { + return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class); + } + + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + + private TaxAgentWrapper getTaxAgentWrapper(User user) { + return ServiceUtil.getService(TaxAgentWrapper.class, user); + } + @Override public Map getTips(Map params) { return commandExecutor.execute(new SIArchivesTipsCmd(params, user)); @@ -114,20 +161,20 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId); Map apidatas = new HashMap<>(16); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - siArchivesBiz.setNeedAuth(needAuth); - siArchivesBiz.setTaxAgentPOS(taxAgentPOS); +// SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +//// siArchivesBiz.setNeedAuth(needAuth); +//// siArchivesBiz.setTaxAgentPOS(taxAgentPOS); WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum) params.get("welfareTypeEnum"); Long employeeId = Long.valueOf(Util.null2String(params.get("employeeId"))); Long paymentOrganization = welfareTypeEnum != null ? Long.valueOf(Util.null2String(params.get("paymentOrganization"))) : null; - apidatas = siArchivesBiz.getBaseForm(welfareTypeEnum, employeeId, (long) user.getUID(), user, paymentOrganization); +// apidatas = siArchivesBiz.getBaseForm(welfareTypeEnum, employeeId, (long) user.getUID(), user, paymentOrganization); + apidatas = getBaseForm(welfareTypeEnum, employeeId, paymentOrganization, taxAgentPOS); return apidatas; } @Override public Map getPaymentForm(Map params) { Map apidatas = new HashMap<>(16); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum) params.get("welfareTypeEnum"); Long employeeId = Long.valueOf(Util.null2String(params.get("employeeId"))); String schemeIdStr = Util.null2String(params.get("schemeId")); @@ -136,16 +183,31 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (StringUtils.isNotBlank(schemeIdStr)) { schemeId = Long.valueOf(schemeIdStr); } - - apidatas = siArchivesBiz.getPaymentForm(user, welfareTypeEnum, employeeId, (long) user.getUID(), schemeId, paymentOrganization); +// apidatas = siArchivesBiz.getPaymentForm(user, welfareTypeEnum, employeeId, (long) user.getUID(), schemeId, paymentOrganization); + apidatas = getPaymentForm(user, welfareTypeEnum, employeeId, schemeId, paymentOrganization); return apidatas; } @Override public String insert(InsuranceArchivesSaveParam param) { - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - siArchivesBiz.insert(param, user); + SalaryAssert.notNull(param.getWelfareType(), "福利类型为空"); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + switch (param.getWelfareType()) { + case SOCIAL_SECURITY: + socialSave(param, user, welBaseDiffSign); + break; + case ACCUMULATION_FUND: + fundSave(param, user, welBaseDiffSign); + break; + case OTHER: + otherSave(param, user, welBaseDiffSign); + break; + default: + throw new SalaryRunTimeException("福利类型不存在"); + } return null; } @@ -187,8 +249,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } Map apidatas = new HashMap<>(16); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - apidatas = siArchivesBiz.listPage(param, (long) user.getUID()); +// apidatas = siArchivesBiz.listPage(param, (long) user.getUID()); + apidatas = listPage(param, (long) user.getUID()); log.info("各操作计时 {}", sw.prettyPrint()); return apidatas; @@ -200,8 +262,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService */ private void handleHistoryData(long currentEmployeeId) { //如果触发历史数据处理,则进行一次全量增员 - if (siArchivesBiz.createOldInsuranceBaseInfo(currentEmployeeId)) { - + if (createOldInsuranceBaseInfo(currentEmployeeId)) { //批量增员 List allBaseInfoList = getInsuranceBaseInfoMapper().listAll(); Collection stayAddIds = allBaseInfoList.stream().filter(f->f.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue())) @@ -576,8 +637,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public Map getSearchCondition(Map param) { Map apidatas = new HashMap<>(16); - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - apidatas = siArchivesBiz.getSearchCondition(user); +// apidatas = siArchivesBiz.getSearchCondition(user); + apidatas = getSearchCondition(); return apidatas; } @@ -607,8 +668,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (insuranceArchivesEmployeePOS == null) { insuranceArchivesEmployeePOS = new ArrayList<>(); } - List> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS); - List columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID()); +// List> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS); + List> records = buildTableData(insuranceArchivesEmployeePOS); +// List columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID()); + List columns = buildWeaTableColumns(insuranceArchivesEmployeePOS); //工作簿list List> excelSheetData = new ArrayList<>(); @@ -1185,7 +1248,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (param.getWelfareTypeEnum() == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误")); } - List adjustHistoryDTOS = siArchivesBiz.getAdjustHistoryList(param.getPaymentOrganization(), param.getEmployeeId()); +// List adjustHistoryDTOS = siArchivesBiz.getAdjustHistoryList(param.getPaymentOrganization(), param.getEmployeeId()); + List adjustHistoryDTOS = getAdjustHistoryList(param.getPaymentOrganization(), param.getEmployeeId()); List targetHistory = adjustHistoryDTOS.stream() .filter(f -> f.getWelfareType().equals(param.getWelfareTypeEnum().getValue())).collect(Collectors.toList()); @@ -1199,7 +1263,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public PageInfo historyListByEmployeeIdAndOperator(SIArchiveBaseHistoryListParam param) { - List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); +// List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); + List adjustHistoryDTOS = getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); // 分权逻辑 Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); @@ -1303,9 +1368,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .adjustBeforeComBaseJson(toUpdateOtherInfo.getOtherPaymentComBaseString()) .build(); List adjustHistoryList = new ArrayList<>(); - adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(socialAdjustInfo, (long) user.getUID())); - adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(fundAdjustInfo, (long) user.getUID())); - adjustHistoryList.addAll(siArchivesBiz.createAdjustInfo(otherAdjustInfo, (long) user.getUID())); + adjustHistoryList.addAll(createAdjustInfo(socialAdjustInfo, (long) user.getUID())); + adjustHistoryList.addAll(createAdjustInfo(fundAdjustInfo, (long) user.getUID())); + adjustHistoryList.addAll(createAdjustInfo(otherAdjustInfo, (long) user.getUID())); //更新字段 toUpdateBaseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); @@ -1345,7 +1410,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService getFundSchemeMapper().updateById(toUpdateFundInfo); getOtherSchemeMapper().updateById(toUpdateOtherInfo); //基数调整记录入库 - siArchivesBiz.batchInsertAdjustHistory(adjustHistoryList, (long) user.getUID()); +// siArchivesBiz.batchInsertAdjustHistory(adjustHistoryList, (long) user.getUID()); + batchInsertAdjustHistory(adjustHistoryList); Map resultMap = new HashMap<>(2); String resultMsg = "操作成功"; @@ -1355,4 +1421,2429 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService resultMap.put("msg", resultMsg); return resultMap; } + + /*****以下代码为SIArchivesBiz中逻辑迁移,旨在减少Biz类的使用*****/ + /** + * 判断是否需要生成历史福利档案基本信息 + */ + public Boolean createOldInsuranceBaseInfo(Long creator) { + + + log.info("判断是否需要生成历史数据"); + List nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList(); + if (nowBaseInfoList.size() == 0) { + StopWatch sw = new StopWatch(); + log.info("福利档案基础信息表为空,开始生成历史数据:"); + //处理公积金、其他福利档案中个税扣缴义务人为空的情况 + sw.start("处理公积金、其他福利档案中个税扣缴义务人为空的情况"); + List socialList = getSocialSchemeMapper().listAll(); + List fundList = getFundSchemeMapper().listAll(); + List otherList = getOtherSchemeMapper().listAll(); + + List updateFundList = new ArrayList<>(); + List updateOtherList = new ArrayList<>(); + for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) { + List toDealFundList = fundList.stream().filter(f -> f.getEmployeeId().equals(socialSchemePO.getEmployeeId()) && f.getPaymentOrganization() == null).collect(Collectors.toList()); + if (toDealFundList.size() > 0) { + InsuranceArchivesFundSchemePO toDealFundPO = toDealFundList.get(0); + toDealFundPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); + updateFundList.add(toDealFundPO); + } + + List toDealOtherList = otherList.stream().filter(f -> f.getEmployeeId().equals(socialSchemePO.getEmployeeId()) && f.getPaymentOrganization() == null).collect(Collectors.toList()); + if (toDealOtherList.size() > 0) { + InsuranceArchivesOtherSchemePO toDealOtherPO = toDealOtherList.get(0); + toDealOtherPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); + updateOtherList.add(toDealOtherPO); + + } + + } + log.info("重置个税扣缴义务人id的公积金档案数:{}", updateFundList.size()); + log.info("重置个税扣缴义务人id的其他福利档案数:{}", updateOtherList.size()); + //更新公积金和其他福利档案 + updateFundList.forEach(getFundSchemeMapper()::updateById); + updateOtherList.forEach(getOtherSchemeMapper()::updateById); + sw.stop(); + + sw.start("处理待入库的历史福利档案基础信息并入库"); + List addBaseInfoList = new ArrayList<>(); + + List oldBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoListByInsuranceDetail(null); + log.info("获取待生成的历史福利档案基础信息条数:{}", oldBaseInfoList.size()); + //去重 + oldBaseInfoList = oldBaseInfoList.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); + log.info("去重后的待生成历史福利档案基础信息条数:{}", oldBaseInfoList.size()); + if (oldBaseInfoList.size() > 0) { + //设置基本信息表字段 + for (InsuranceArchivesBaseInfoPO po : oldBaseInfoList) { + po.setId(IdGenerator.generate()); + po.setCreateTime(new Date()); + po.setDeleteType(0); + po.setCreator(creator); + po.setRunStatus(EmployeeStatusEnum.STAY_ADD.getValue()); + po.setUpdateTime(new Date()); + po.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + + addBaseInfoList.add(po); + } + //将历史基本信息入库 + List> partition = Lists.partition(addBaseInfoList, 50); + partition.forEach(getInsuranceBaseInfoMapper()::batchSave); + + sw.stop(); + log.info("各操作计时 {}", sw.prettyPrint()); + return true; + }else { + return false; + } + + + } else { + return false; + } + + } + @Override + public List> buildTableData(List insuranceArchivesEmployeePOS) { + return buildTableData(insuranceArchivesEmployeePOS, false); + } + + /** + * @param insuranceArchivesEmployeePOS + * @return + */ + public List> buildTableData(List insuranceArchivesEmployeePOS, boolean export) { + + boolean welBaseDiffSign = isDiffWelBase(); + + List taxAgentPOS = getTaxAgentMapper().listAll(); + Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); + + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + List> records = new ArrayList<>(); + try { + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + + Map socialSchemePOMap = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getId, Function.identity())); + + Map fundSchemePOMap = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getId, Function.identity())); + List otherByEmployeeList = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); + encryptUtil.decryptList(otherByEmployeeList, InsuranceArchivesOtherSchemePO.class); + Map otherSchemePOMap = otherByEmployeeList + .stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getId, Function.identity())); + insuranceArchivesEmployeePOS.forEach(item -> { + InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId()); + InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId()); + InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId()); + Map map = new HashMap<>(); + map.put("employeeName", item.getUserName()); + map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); + map.put("employeeId", item.getEmployeeId()); + map.put("departmentName", item.getDepartmentName()); + map.put("subcompanyName", item.getSubcompanyName()); + map.put("departmentId", item.getDepartmentId()); + map.put("jobNum", item.getJobNum()); + map.put("companystartdate", item.getCompanystartdate()); + map.put("dismissdate", item.getDimissionDate()); + map.put("mobile", item.getTelephone()); + map.put("siSchemeId", item.getSiSchemeId()); + map.put("fundSchemeId", item.getFundSchemeId()); + map.put("otherSchemeId", item.getOtherSchemeId()); + map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : ""); + map.put("baseInfo", item.getBaseInfoId()); + map.put("paymentOrganization", item.getPaymentOrganization()); + if (socialItem != null) { + map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId())); + Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } + } + + map.put("socialAccount", socialItem.getSocialAccount()); + map.put("socialStartTime", socialItem.getSocialStartTime()); + map.put("socialEndTime", socialItem.getSocialEndTime()); + } + if (fundItem != null) { + map.put("fundName", insuranceSchemeMapper.querySchemeName(fundItem.getFundSchemeId())); + map.put("fundAccount", fundItem.getFundAccount()); + Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } + } + + map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); + map.put("fundStartTime", fundItem.getFundStartTime()); + map.put("fundEndTime", fundItem.getFundEndTime()); + + } + if (otherItem != null) { + map.put("otherName", insuranceSchemeMapper.querySchemeName(otherItem.getOtherSchemeId())); + Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } + } + + map.put("otherStartTime", otherItem.getOtherStartTime()); + map.put("otherEndTime", otherItem.getOtherEndTime()); + } + records.add(map); + }); + return records; + + } finally { + sqlSession.close(); + } + } + + @Override + public boolean isDiffWelBase() { + User user = (User) SalaryContext.get().getValue("user"); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + + return welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + } + + /** + * 根据人员id和个税扣缴人id获取记录 + */ + public List getSocialByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(po); + if (socialList.size() > 0) { + allList.add(socialList.get(0)); + } + } + return allList; + } finally { + sqlSession.close(); + } + } + + public List getFundByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(po); + if (fundList.size() > 0) { + allList.add(fundList.get(0)); + } + } + return allList; + } finally { + sqlSession.close(); + } + } + + public List getOtherByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(po); + if (otherList.size() > 0) { + allList.add(otherList.get(0)); + } + } + return allList; + } finally { + sqlSession.close(); + } + } + + @Override + public List payInsuranceIds(Long socialSchemeId, Integer paymentScope) { + //查询该福利方案下开启缴纳的福利项 + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialSchemeId); + List insuranceIdList = new ArrayList<>(); + if (detailPOS != null && detailPOS.size() > 0) { + //开启缴纳的 + insuranceIdList = detailPOS.stream().filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)) + .map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + } + return insuranceIdList; + } + + @Override + public List payInsuranceIds(Long socialSchemeId) { + //查询该福利方案下开启缴纳的福利项 + List detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialSchemeId); + List insuranceIdList = new ArrayList<>(); + if (detailPOS != null && detailPOS.size() > 0) { + //开启缴纳的 + insuranceIdList = detailPOS.stream().filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue())).map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + } + return insuranceIdList; + } + + @Override + public List buildWeaTableColumns(List insuranceArchivesEmployeePOS) { + + Map> titleMap = buildColumnTitle(insuranceArchivesEmployeePOS); + List list = new ArrayList<>(); + WeaTableColumn nameColumn = new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "姓名"), "employeeName"); + nameColumn.setFixed("left"); + list.add(nameColumn); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "个税扣缴义务人"), "paymentOrganizationName")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "分部"), "subcompanyName")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "部门"), "departmentName")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "手机号"), "mobile")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum")); + + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate")); +// list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "合同到期日期"), "dismissdate")); + + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName")); + titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保起始缴纳月"), "socialStartTime")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保最后缴纳月"), "socialEndTime")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "公积金方案名称"), "fundName")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "公积金账号"), "fundAccount")); + titleMap.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "补充公积金账号"), "supplementFundAccount")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "公积金起始缴纳月"), "fundStartTime")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "公积金最后缴纳月"), "fundEndTime")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "其他福利方案名称"), "otherName")); + titleMap.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "其他福利起始缴纳月"), "otherStartTime")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "其他福利最后缴纳月"), "otherEndTime")); + return list; + } + + public Map> buildColumnTitle(List insuranceArchivesEmployeePOS) { + + boolean welBaseDiffSign = isDiffWelBase(); + + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + Map> result = new HashMap<>(); + + insuranceArchivesEmployeePOS = insuranceArchivesEmployeePOS.stream() + .filter(f -> f.getEmployeeId() != null) + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceArchivesEmployeePO::getEmployeeId))), ArrayList::new)); + try { + + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); + OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + + Set socialSet = new HashSet<>(); + Set fundSet = new HashSet<>(); + Set otherSet = new HashSet<>(); + + Set socialComSet = new HashSet<>(); + Set fundComSet = new HashSet<>(); + Set otherComSet = new HashSet<>(); + + insuranceArchivesEmployeePOS.forEach(item -> { + List socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId())); + encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); + List fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId())); + encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); + List otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId())); + encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); + if (socialList.size() > 0) { + for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) { + + Map socialJson = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new TypeReference>() { + }); + if (socialJson != null) { + socialJson.forEach((k, v) -> socialSet.add(k)); + } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map socialComJson = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new TypeReference>() { + }); + if (socialComJson != null) { + socialComJson.forEach((k, v) -> socialComSet.add(k)); + } + } + } + + } + if (fundList.size() > 0) { + for (InsuranceArchivesFundSchemePO fundSchemePO : fundList) { + Map fundJson = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new TypeReference>() { + }); + if (fundJson != null) { + fundJson.forEach((k, v) -> fundSet.add(k)); + } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map fundComJson = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new TypeReference>() { + }); + if (fundComJson != null) { + fundComJson.forEach((k, v) -> fundComSet.add(k)); + } + } + } + + } + if (otherList.size() > 0) { + for (InsuranceArchivesOtherSchemePO otherSchemePO : otherList) { + Map otherJson = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new TypeReference>() { + }); + if (otherJson != null) { + otherJson.forEach((k, v) -> otherSet.add(k)); + } + //如果需要区分个人和公司福利基数 + if (welBaseDiffSign) { + Map otherComJson = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + otherComJson.forEach((k, v) -> otherComSet.add(k)); + } + } + } + + } + }); + Map socialMap = new HashMap<>(); + Map socialComMap = new HashMap<>(); + Map socialCollect = new HashMap<>(); + Map customSocial = iCategoryMapper.listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null) + .stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + + Map sysSocial = iCategoryMapper.listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), DataTypeEnum.SYSTEM.getValue()) + .stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + + socialCollect.putAll(customSocial); + socialCollect.putAll(sysSocial); + + if (welBaseDiffSign) { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + socialComSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + socialSet.forEach(item -> { + if (socialCollect.containsKey(Long.valueOf(item))) { + socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } + Map fundMap = new HashMap<>(); + Map fundComMap = new HashMap<>(); + Map fundCollect = new HashMap<>(); + Map customFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + Map sysFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + fundCollect.putAll(customFund); + fundCollect.putAll(sysFund); + if (welBaseDiffSign) { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + fundComSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + fundSet.forEach(item -> { + if (fundCollect.containsKey(Long.valueOf(item))) { + fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } + Map otherMap = new HashMap<>(); + Map otherComMap = new HashMap<>(); + Map otherCollect = new HashMap<>(); + Map customOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + Map sysOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity())); + otherCollect.putAll(customOther); + otherCollect.putAll(sysOther); + + if (welBaseDiffSign) { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"个人")); + } + }); + otherComSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + + SalaryI18nUtil.getI18nLabel(0, "申报基数") + + SalaryI18nUtil.getI18nLabel(0,"单位")); + } + }); + } else { + otherSet.forEach(item -> { + if (otherCollect.containsKey(Long.valueOf(item))) { + otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数")); + } + }); + } + // map根据key排序 + LinkedHashMap socialMapWithAscKey = socialMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundMapWithAscKey = fundMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherMapWithAscKey = otherMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + if (welBaseDiffSign) { + LinkedHashMap socialComMapWithAscKey = socialComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundComMapWithAscKey = fundComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherComMapWithAscKey = otherComMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + socialMapWithAscKey.putAll(socialComMapWithAscKey); + fundMapWithAscKey.putAll(fundComMapWithAscKey); + otherMapWithAscKey.putAll(otherComMapWithAscKey); + } + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey); + result.put(WelfareTypeEnum.OTHER.getValue(), otherMapWithAscKey); + return result; + } finally { + sqlSession.close(); + } + + + } + + /** + * 获取福利档案基数调整记录 + * + */ + public List getAdjustHistoryList(Long paymentOrganization, Long employeeId) { + + if (paymentOrganization == null && employeeId == null) { + return null; + } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); + List list = mapper.listByEmployeeIdAndPayOrg(paymentOrganization, employeeId); + return list; + } finally { + sqlSession.close(); + } + } + + /** + * 获取福利档案基数调整记录 + * + */ + public List getBaseHistoryByEmployeeIdAndOperator(Long operator, Long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); + List empList = mapper.listByEmployeeIdAndOperator(operator, employeeId); + List extEmpList = mapper.listByExtEmpIdAndOperator(operator, employeeId); + if (extEmpList != null) { + empList.addAll(extEmpList); + empList = empList.stream().filter(f -> org.apache.commons.lang.StringUtils.isNotBlank(f.getEmployeeName())) + .sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList()); + } + return empList; + } finally { + sqlSession.close(); + } + } + + //生成基数调整记录(基数单元未变化则忽略) + public List createAdjustInfo(InsuranceArchivesBaseHistoryDTO adjustInfo, Long creator) { + Date now = new Date(); + boolean welBaseDiffSign = isDiffWelBase(); + + List toCreateAdjustHistoryList = new ArrayList<>(); + //旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。 + if(org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && org.apache.commons.lang.StringUtils.isBlank(adjustInfo.getAdjustBeforeBaseJson())) { + Map adjustAfterBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterBaseJson(), new TypeReference>() { + }); + for (String key : adjustAfterBaseMap.keySet()) { + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustAfterBaseValue((String) adjustAfterBaseMap.get(key)); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + toCreateAdjustHistoryList.add(adjustItem); + } + } else if (org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustBeforeBaseJson())) { + Map adjustAfterBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterBaseJson(), new TypeReference>() { + }); + Map adjustBeforeBaseMap = JSON.parseObject(adjustInfo.getAdjustBeforeBaseJson(), new TypeReference>() { + }); + Map reDealMap = new HashMap<>(); + if (adjustAfterBaseMap != null) { + reDealMap.putAll(adjustAfterBaseMap); + } + if (adjustBeforeBaseMap != null) { + reDealMap.putAll(adjustBeforeBaseMap); + } + if (reDealMap.size() >0) { + for (String key : reDealMap.keySet()) { + String beforeValue = (String) adjustBeforeBaseMap.get(key); + String afterValue = (String) adjustAfterBaseMap.get(key); + if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) { + continue; + } + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustBeforeBaseValue(beforeValue); + adjustItem.setAdjustAfterBaseValue(afterValue); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + + toCreateAdjustHistoryList.add(adjustItem); + } + } + + } + //如果系统应用设置拆分了个人和公司福利基数,则对adjustBeforeComBaseJson,adjustAfterComBaseJson也进行处理 + if (welBaseDiffSign) { + //旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。 + if(org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && org.apache.commons.lang.StringUtils.isBlank(adjustInfo.getAdjustBeforeComBaseJson())) { + Map adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference>() { + }); + for (String key : adjustAfterComBaseMap.keySet()) { + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustAfterBaseValue((String) adjustAfterComBaseMap.get(key)); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope(PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + toCreateAdjustHistoryList.add(adjustItem); + } + } else if (org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && org.apache.commons.lang.StringUtils.isNotBlank(adjustInfo.getAdjustBeforeComBaseJson())) { + Map adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference>() { + }); + Map adjustBeforeComBaseMap = JSON.parseObject(adjustInfo.getAdjustBeforeComBaseJson(), new TypeReference>() { + }); + Map reDealMap = new HashMap<>(); + if (adjustAfterComBaseMap != null) { + reDealMap.putAll(adjustAfterComBaseMap); + } + if (adjustBeforeComBaseMap != null) { + reDealMap.putAll(adjustBeforeComBaseMap); + } + if (reDealMap.size() >0) { + for (String key : reDealMap.keySet()) { + String beforeValue = (String) adjustBeforeComBaseMap.get(key); + String afterValue = (String) adjustAfterComBaseMap.get(key); + if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) { + continue; + } + InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO(); + BeanUtils.copyProperties(adjustInfo, adjustItem); + adjustItem.setAdjustWelfareItemId(Long.valueOf(key)); + adjustItem.setAdjustBeforeBaseValue(beforeValue); + adjustItem.setAdjustAfterBaseValue(afterValue); + adjustItem.setOperateTime(now); + adjustItem.setOperator(creator); + adjustItem.setCreator(creator); + adjustItem.setCreateTime(now); + adjustItem.setUpdateTime(now); + adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue()); + adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY); + adjustItem.setId(IdGenerator.generate()); + adjustItem.setPaymentScope( PaymentScopeEnum.SCOPE_COMPANY.getValue().toString()); + + toCreateAdjustHistoryList.add(adjustItem); + } + } + + } + } + return toCreateAdjustHistoryList; + } + + /** + * 新增福利档案基数调整记录 + * + */ + @Override + public void batchInsertAdjustHistory(List adjustHistoryList) { + + if (org.apache.commons.collections.CollectionUtils.isEmpty(adjustHistoryList)) { + return; + } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); + List> partition = Lists.partition(adjustHistoryList, 100); + partition.forEach(mapper::batchSave); + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + public Map getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long paymentOrganization, Collection taxAgentPOS) { + Map data = new HashMap<>(16); + SalaryAssert.notNull(employeeId, SalaryI18nUtil.getI18nLabel(0, "员工id不可为空")); + List employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(employeeId)); + SalaryAssert.notEmpty(employeeByIds, SalaryI18nUtil.getI18nLabel(0, "员工信息不存在")); + DataCollectionEmployee item = employeeByIds.get(0); + + + if (welfareType == null) { + //基础信息表单 + InsuranceArchivesBaseDTO insuranceArchivesBaseDTO = InsuranceArchivesBaseDTO.builder().department(item.getDepartmentName()) + .hiredate(item.getCompanystartdate()) + .position(item.getJobtitleName()) + .username(item.getUsername()) + .telephone(item.getMobile()) + .dimissionDate(item.getDismissdate()) + .build(); + + data.put("data", insuranceArchivesBaseDTO); + return data; + } + + SISchemeBiz siSchemeBiz = new SISchemeBiz(); + List list = siSchemeBiz.listAll(); + // 过滤可见性范围 + list = filterList(list, taxAgentPOS); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + List paymentOptions = paymentOrganizationOptions(taxAgentPOS); + List underTakeOptions = Arrays.stream(UndertakerEnum.values()) + .map(e -> new SearchConditionOption(e.getValue().toString(), e.getDefaultLabel())).collect(Collectors.toList()); + + + //返回数据 + switch (welfareType) { + case SOCIAL_SECURITY: + InsuranceArchivesSocialSchemeDTO insuranceArchivesSocialSchemeDTO = buildSocialForm(employeeId, paymentOrganization); + List socialList = list.stream().filter(e -> Objects.equals(e.getWelfareType(), WelfareTypeEnum.SOCIAL_SECURITY.getValue())).collect(Collectors.toList()); + List socialOptions = new ArrayList<>(); + socialList.forEach(social -> { + socialOptions.add(new SearchConditionOption(Util.null2String(social.getId()), social.getSchemeName())); + }); + SearchConditionItem socialName = SalaryFormItemUtil.selectItem(user, socialOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialSchemeId"); + SearchConditionItem organizationName = SalaryFormItemUtil.selectItem(user, paymentOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "社保缴纳组织"), "paymentOrganization"); + SearchConditionItem underTakeName = SalaryFormItemUtil.selectItem(user, underTakeOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "社保个人实际承担方"), "underTake"); + + selectItems.add(socialName); + selectItems.add(organizationName); + selectItems.add(underTakeName); + + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "社保基础信息"), true, selectItems)); + data.put("data", insuranceArchivesSocialSchemeDTO); + data.put("items", addGroups); + break; + case ACCUMULATION_FUND: + InsuranceArchivesFundSchemeDTO insuranceArchivesFundSchemeDTO = buildFundForm(employeeId, paymentOrganization); + List fundList = list.stream().filter(e -> Objects.equals(e.getWelfareType(), WelfareTypeEnum.ACCUMULATION_FUND.getValue())).collect(Collectors.toList()); + List fundOptions = new ArrayList<>(); + fundList.forEach(social -> { + fundOptions.add(new SearchConditionOption(Util.null2String(social.getId()), social.getSchemeName())); + }); + SearchConditionItem fundName = SalaryFormItemUtil.selectItem(user, fundOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "公积金方案名称"), "fundSchemeId"); + SearchConditionItem organizationFundName = SalaryFormItemUtil.selectItem(user, paymentOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "公积金缴纳组织"), "paymentOrganization"); + SearchConditionItem underTakeFundName = SalaryFormItemUtil.selectItem(user, underTakeOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "公积金个人实际承担方"), "underTake"); + + selectItems.add(fundName); + selectItems.add(organizationFundName); + selectItems.add(underTakeFundName); + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "公积金基础信息"), true, selectItems)); + data.put("data", insuranceArchivesFundSchemeDTO); + data.put("items", addGroups); + break; + case OTHER: + InsuranceArchivesOtherSchemeDTO insuranceArchivesOtherSchemeDTO = buildOtherForm(employeeId, paymentOrganization); + List otherList = list.stream().filter(e -> Objects.equals(e.getWelfareType(), WelfareTypeEnum.OTHER.getValue())).collect(Collectors.toList()); + List otherOptions = new ArrayList<>(); + otherList.forEach(social -> { + otherOptions.add(new SearchConditionOption(Util.null2String(social.getId()), social.getSchemeName())); + }); + SearchConditionItem otherName = SalaryFormItemUtil.selectItem(user, otherOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "其他福利名称"), "otherSchemeId"); + SearchConditionItem organizationOtherName = SalaryFormItemUtil.selectItem(user, paymentOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "其他福利缴纳组织"), "paymentOrganization"); + SearchConditionItem underTakeOtherName = SalaryFormItemUtil.selectItem(user, underTakeOptions, 2, 12, 6, false, SalaryI18nUtil.getI18nLabel(0, "其他福利个人实际承担方"), "underTake"); + + selectItems.add(otherName); + selectItems.add(organizationOtherName); + selectItems.add(underTakeOtherName); + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "其他福利基础信息"), true, selectItems)); + data.put("data", insuranceArchivesOtherSchemeDTO); + data.put("items", addGroups); + break; + default: + } + return data; + } + + /*** + * @description 过滤没有权限访问的 + * @return List + * @author Harryxzy + * @date 2022/9/19 18:32 + */ + List filterList(List list, Collection taxAgentPOS){ + List ids = taxAgentPOS.stream().map(i -> String.valueOf(i.getId())).collect(Collectors.toList()); + List result = list.stream().filter(item -> { + boolean flag = true; + if (item.getSharedType()!= null && item.getSharedType().equals("1")) { + flag = false; + String taxAgentIds = item.getTaxAgentIds(); + if(org.apache.commons.lang.StringUtils.isNotBlank(taxAgentIds)){ + String splitFlag = ","; + String[] split = taxAgentIds.split(splitFlag); + for (int i = 0; i < split.length; i++) { + if (ids.contains(split[i])) { + flag = true; + } + } + } + } + return flag; + }).collect(Collectors.toList()); + return result; + } + + /** + * 社保缴纳组织 + * + * @return + */ + public List paymentOrganizationOptions(Collection taxAgentPOS) { + Collection list = taxAgentPOS; + if (org.apache.commons.collections.CollectionUtils.isEmpty(list)) { + return new ArrayList<>(); + } + return list + .stream() + .map(item -> new SearchConditionOption(String.valueOf(item.getId()), item.getName())).collect(Collectors.toList()); + } + + /** + * 其它基础表单 + * + * @param employeeId + * @return + */ + public InsuranceArchivesOtherSchemeDTO buildOtherForm(Long employeeId, Long paymentOrganization) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); + InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null; + InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId); + if (insuranceArchivesOtherSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); + } + return data; + } finally { + sqlSession.close(); + } + + } + + /** + * 公积金基础表单 + * + * @param employeeId + * @return + */ + public InsuranceArchivesFundSchemeDTO buildFundForm(Long employeeId, Long paymentOrganization) { + + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); + List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); + InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null; + InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId); + if (insuranceArchivesFundSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); + } + return data; + } finally { + sqlSession.close(); + } + + } + + /** + * 社保基础表单 + * + * @param employeeId + * @return + */ + public InsuranceArchivesSocialSchemeDTO buildSocialForm(Long employeeId, Long paymentOrganization) { + InsuranceArchivesSocialSchemePO insuranceArchivesSocialSchemePO = getSocialByEmployeeId(employeeId, paymentOrganization); + InsuranceArchivesSocialSchemeDTO data = InsuranceArchivesBO.convertSocialPOtoDTO(insuranceArchivesSocialSchemePO, employeeId); + if (insuranceArchivesSocialSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); + } + return data; + } + + /** + * 获取社保档案表 + * + * @param employeeId + * @return + */ + public InsuranceArchivesSocialSchemePO getSocialByEmployeeId(Long employeeId, Long paymentOrganization) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); + return socialList.size() != 0 ? socialList.get(0) : null; + } finally { + sqlSession.close(); + } + } + + /** + * 获取详细表单 + * + * @param user + * @param welfareType + * @param employeeId + * @param schemeId + * @return + */ + public Map getPaymentForm(User user, WelfareTypeEnum welfareType, Long employeeId, Long schemeId, Long paymentOrganization) { + Map data = new HashMap<>(16); + //判断是否要区分个人和单位福利基数 + SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM); + boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue()); + //判断是否要自动调整基数 + SalarySysConfPO welBaseAutoAdjust = getSalarySysConfService(user).getOneByCode(WEL_BASE_AUTO_ADJUST); + boolean welBaseAutoAdjustSign = welBaseAutoAdjust != null && welBaseAutoAdjust.getConfValue().equals(OpenEnum.OPEN.getValue()); + + switch (welfareType) { + case SOCIAL_SECURITY: + data = buildSocialPaymentForm(user, employeeId, schemeId,welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); + break; + case ACCUMULATION_FUND: + data = buildFundPaymentForm(user, employeeId, schemeId, welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); + break; + case OTHER: + data = buildOtherPaymentForm(user, employeeId, schemeId, welfareType.getValue(), paymentOrganization, welBaseDiffSign, welBaseAutoAdjustSign); + break; + default: + } + return data; + } + + /** + * 其他payForm + * + * @param employeeId + * @param schemeId + * @return + */ + public Map buildOtherPaymentForm(User user, Long employeeId, Long schemeId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { + Map dataMap = new HashMap<>(); + InsuranceArchivesOtherSchemeDTO data = buildOtherForm(employeeId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); + if (data != null) { + insuranceValueMap = StrUtil.isNotBlank(data.getOtherPaymentBaseString()) + ? JSONObject.parseObject(data.getOtherPaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); + if (welBaseDiffSign) { + insuranceComValueMap = StrUtil.isNotBlank(data.getOtherPaymentComBaseString()) + ? JSONObject.parseObject(data.getOtherPaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); + } + } + List addGroups = new ArrayList<>(); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "其他福利缴纳基数"), true, inputItems)); + dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "其他福利缴纳基数"), true, inputComItems)); + dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); + } + return dataMap; + } + + /** + * 公积金payForm + * + * @param employeeId + * @param schemeId + * @return + */ + public Map buildFundPaymentForm(User user, Long employeeId, Long schemeId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { + + Map dataMap = new HashMap<>(); + InsuranceArchivesFundSchemeDTO data = buildFundForm(employeeId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); + if (data != null) { + insuranceValueMap = StrUtil.isNotBlank(data.getFundPaymentBaseString()) + ? JSONObject.parseObject(data.getFundPaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); + if (welBaseDiffSign) { + insuranceComValueMap = StrUtil.isNotBlank(data.getFundPaymentComBaseString()) + ? JSONObject.parseObject(data.getFundPaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); + } + } + + List addGroups = new ArrayList<>(); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "公积金缴纳基数"), true, inputItems)); + dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "公积金缴纳基数"), true, inputComItems)); + dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); + } + return dataMap; + } + + /** + * 社保payForm + * + * @param employeeId + * @param schemeId + * @return + */ + public Map buildSocialPaymentForm(User user, Long employeeId, Long schemeId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign, boolean welBaseAutoAdjustSign) { + Map dataMap = new HashMap<>(); + InsuranceArchivesSocialSchemeDTO data = buildSocialForm(employeeId, paymentOrganization); + Map insuranceValueMap = new HashMap<>(); + Map insuranceComValueMap = new HashMap<>(); + if (data != null) { + insuranceValueMap = StrUtil.isNotBlank(data.getSchemePaymentBaseString()) + ? JSONObject.parseObject(data.getSchemePaymentBaseString(), new TypeReference>() {}) : new HashMap<>(); + if (welBaseDiffSign) { + insuranceComValueMap = StrUtil.isNotBlank(data.getSchemePaymentComBaseString()) + ? JSONObject.parseObject(data.getSchemePaymentComBaseString(), new TypeReference>() {}) : new HashMap<>(); + } + } + + List addGroups = new ArrayList<>(); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); + //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 + for (SearchConditionItem item : inputItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("data", insuranceValueMap); + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "社保缴纳基数"), true, inputItems)); + dataMap.put("items", addGroups); + if (welBaseDiffSign) { + List addComGroups = new ArrayList<>(); + List inputComItems = buildPaymentComBase(user, schemeId, welfareType); + addComGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0, "社保缴纳基数"), true, inputComItems)); + dataMap.put("comItems", addComGroups); + + for (SearchConditionItem item : inputComItems) { + String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; + if (StrUtil.isNotBlank(insuranceId) && insuranceComValueMap.get(insuranceId) == null) { + String basicValue = welBaseAutoAdjustSign ? ("0.000".equals(item.getMin()) ? "0" : item.getMin()) : "0"; + insuranceComValueMap.put(insuranceId, basicValue); + } + } + dataMap.put("comData", insuranceComValueMap); + } + return dataMap; + + } + + /** + * 构造payment(items) + * + * @param schemeId + * @return + */ + public List buildPaymentBase(User user, Long schemeId, Integer welfareType, boolean welBaseDiffSign) { + List inputItems = new ArrayList<>(); + if (schemeId == null) { + return new ArrayList<>(); + } + List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList()); + if (!welBaseDiffSign) { + List perInsuranceIdList = list.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + List moreComList = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue()) && !perInsuranceIdList.contains(f.getInsuranceId())).collect(Collectors.toList()); + if (moreComList.size() > 0) { + list.addAll(moreComList); + } + } + + SICategoryBiz siCategoryBiz = new SICategoryBiz(); + list.forEach(insuranceSchemeDetail -> { + ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); + if (iCategoryPO != null) { +// inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()))); + inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()) + , insuranceSchemeDetail.getUpperLimit(), insuranceSchemeDetail.getLowerLimit())); + } + }); + return inputItems; + } + + public List buildPaymentComBase(User user, Long schemeId, Integer welfareType) { + List inputItems = new ArrayList<>(); + if (schemeId == null) { + return new ArrayList<>(); + } + List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue())).collect(Collectors.toList()); + SICategoryBiz siCategoryBiz = new SICategoryBiz(); + list.forEach(insuranceSchemeDetail -> { + ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); + if (iCategoryPO != null) { +// inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()))); + inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()) + , insuranceSchemeDetail.getUpperLimit(), insuranceSchemeDetail.getLowerLimit())); + } + }); + return inputItems; + } + + /** + * 获取方案明细 + * + * @param schemeId + * @return + */ + public List queryListByPrimaryIdIsPayment(Long schemeId, Integer welfareType) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; + } finally { + sqlSession.close(); + } + } + + public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + + InsuranceArchivesOtherSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesOtherSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0, "员工id为空"), param, param.getEmployeeId()); + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + + List otherIds = new ArrayList(); + otherIds.add(param.getId()); + List oldOtherInfoList = otherSchemeMapper.getOtherById(otherIds); + + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getOtherSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + + if (oldOtherInfoList.size() == 1) { + InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0); + //设置福利档案基数调整记录数据 + encryptUtil.decrypt(oldOtherInfo, InsuranceArchivesOtherSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldOtherInfo.getOtherPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldOtherInfo.getOtherSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldOtherInfo.getOtherPaymentComBaseString()); + //新数据 + InsuranceArchivesOtherSchemePO updateOtherInfo = + InsuranceArchivesOtherSchemePO.builder() + .id(oldOtherInfo.getId()) + .otherSchemeId(param.getOtherSchemeId()) + .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) + .underTake(param.getUnderTake()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .welfareType(paramReq.getWelfareType().getValue()) + .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) + .employeeId(param.getEmployeeId()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .updateTime(new Date()) + .nonPayment(param.getNonPayment()) + .creator(employeeId) + .paymentOrganization(param.getPaymentOrganization()) + .otherPaymentBaseString(paramReq.getPaymentForm()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class); + otherSchemeMapper.updateById(updateOtherInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setOtherArchivesId(updateOtherInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + sqlSession.commit(); + } else { + otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesOtherSchemePO insertOtherInfo = InsuranceArchivesOtherSchemePO.builder() + .otherSchemeId(param.getOtherSchemeId()) + .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) + .underTake(param.getUnderTake()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .welfareType(paramReq.getWelfareType().getValue()) + .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) + .employeeId(param.getEmployeeId()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .createTime(new Date()) + .updateTime(new Date()) + .nonPayment(param.getNonPayment()) + .creator(employeeId) + .paymentOrganization(param.getPaymentOrganization()) + .otherPaymentBaseString(paramReq.getPaymentForm()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class); + otherSchemeMapper.insert(insertOtherInfo); + sqlSession.commit(); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List otherInfos = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + baseInfoPO.setOtherArchivesId(otherInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); + } + } + + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); + + } finally { + sqlSession.close(); + } + } + + /** + * @param paramReq + * @param + */ + public void fundSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); + InsuranceArchivesFundSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesFundSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) && !SalaryDateUtil.checkYearMonth(param.getFundStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) && !SalaryDateUtil.checkYearMonth(param.getFundEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + + List fundIds = new ArrayList(); + fundIds.add(param.getId()); + List oldFundInfoList = fundSchemeMapper.getFundById(fundIds); + + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getFundSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + + if (oldFundInfoList.size() == 1) { + InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0); + //设置福利档案基数调整记录数据 + encryptUtil.decrypt(oldFundInfo, InsuranceArchivesFundSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldFundInfo.getFundPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldFundInfo.getFundSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldFundInfo.getFundPaymentComBaseString()); + //新数据 + InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder() + .id(oldFundInfo.getId()) + .fundSchemeId(param.getFundSchemeId()) + .fundAccount(param.getFundAccount()) + .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) + .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) + .fundPaymentBaseString(paramReq.getPaymentForm()) + .supplementFundAccount(param.getSupplementFundAccount()) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .underTake(param.getUnderTake()) + .paymentOrganization(param.getPaymentOrganization()) + .updateTime(new Date()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class); + fundSchemeMapper.updateById(updateFundInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setFundArchivesId(updateFundInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + sqlSession.commit(); + } else { + fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesFundSchemePO insertFundInfo = InsuranceArchivesFundSchemePO.builder() + .fundSchemeId(param.getFundSchemeId()) + .fundAccount(param.getFundAccount()) + .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) + .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) + .fundPaymentBaseString(paramReq.getPaymentForm()) + .supplementFundAccount(param.getSupplementFundAccount()) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .underTake(param.getUnderTake()) + .paymentOrganization(param.getPaymentOrganization()) + .createTime(new Date()) + .updateTime(new Date()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class); + fundSchemeMapper.insert(insertFundInfo); + sqlSession.commit(); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List fundInfos = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + baseInfoPO.setFundArchivesId(fundInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); + } + + } + + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); + + } finally { + sqlSession.close(); + } + + } + + /** + * @param paramReq + * @param + */ + public void socialSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { + long employeeId = user.getUID(); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + + InsuranceArchivesSocialSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesSocialSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + +// //删除社保数据 +// socialSchemeMapper.batchDeleteByEmployeeIds(Collections.singletonList(param.getEmployeeId())); + + //查询已有数据 + List socialIds = new ArrayList(); + socialIds.add(param.getId()); + List oldSocialInfoList = socialSchemeMapper.getSocialById(socialIds); + + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getSocialSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + + //组装新数据 + if (oldSocialInfoList.size() == 1) { + //老数据 + InsuranceArchivesSocialSchemePO oldSocialInfo = oldSocialInfoList.get(0); + //设置福利档案基数调整记录数据 + encryptUtil.decrypt(oldSocialInfo, InsuranceArchivesSocialSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldSocialInfo.getSocialPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldSocialInfo.getSocialSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldSocialInfo.getSocialPaymentComBaseString()); + //新数据 + InsuranceArchivesSocialSchemePO updateSocialInfo = + InsuranceArchivesSocialSchemePO.builder() + .id(oldSocialInfo.getId()) + .welfareType(paramReq.getWelfareType().getValue()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .socialPaymentBaseString(paramReq.getPaymentForm()) + .socialSchemeId(param.getSocialSchemeId()) + .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) + .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .employeeId(param.getEmployeeId()) + .updateTime(new Date()) + .underTake(param.getUnderTake()) + .socialAccount(param.getSchemeAccount()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class); + socialSchemeMapper.updateById(updateSocialInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setSocialArchivesId(updateSocialInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + sqlSession.commit(); + } else { + socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesSocialSchemePO insertSocialInfo = + InsuranceArchivesSocialSchemePO.builder() + .welfareType(paramReq.getWelfareType().getValue()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .socialPaymentBaseString(paramReq.getPaymentForm()) + .socialSchemeId(param.getSocialSchemeId()) + .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) + .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .employeeId(param.getEmployeeId()) + .createTime(new Date()) + .updateTime(new Date()) + .underTake(param.getUnderTake()) + .socialAccount(param.getSchemeAccount()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + } + encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class); + socialSchemeMapper.insert(insertSocialInfo); + sqlSession.commit(); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List socialInfos = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + baseInfoPO.setSocialArchivesId(socialInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); + } + + } + + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); + } finally { + sqlSession.close(); + } + } + + /** + * 校验福利基数是否符合上下限要求 + * @param primaryId + * @param paymentBaseString + * @return + */ + @Override + public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) { + + if (primaryId ==null || paymentBaseString == null) { + return true; + } + Map paymentBaseJson = JSON.parseObject(paymentBaseString, new HashMap().getClass()); + if (paymentBaseJson == null) { + return true; + } + + for (Map.Entry entry : paymentBaseJson.entrySet()) { + + //判断福利值是否为空/数字 + if (entry.getValue() == null || entry.getValue().length() == 0) { + continue; + } else if (!isNumeric(entry.getValue())) { + log.info("福利值非数字!"); + return false; + } + + //根据福利方案id、险种id、缴纳对象、缴费状态查询明细 + List insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey())); + log.info("福利方案id: {},, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + if (insuranceSchemeDetailPOList.size() == 0) { + log.info("根据福利方案id、险种id、缴纳对象查询明细为null!福利方案id: {}, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + return false; + } + List isPaymentList = insuranceSchemeDetailPOList.stream() + .filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList()); + if (isPaymentList.size() > 0) { + InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0); + + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit(); + String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit(); + if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) { + //数值低于对应福利明细下限 + log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit); + return false; + } + if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) { + //数值高于对应福利明细上限 + log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit); + return false; + } + } else { + log.info("福利明细项属于未缴费状态,不对上下限进行约束"); + } + + + } + return true; + } + + + /** + * 校验福利基数是否符合上下限要求,并返回符合要求的数据 + * @param primaryId + * @param paymentBaseString + * @return + */ + @Override + public String checkAndBuildWelBaseWithLimit(Long primaryId, String paymentBaseString, Integer paymentScope) { + + if (primaryId ==null || paymentBaseString == null) { + return paymentBaseString; + } + Map paymentBaseJson = JSON.parseObject(paymentBaseString, HashMap.class); + Map newPaymentBaseJson = JSON.parseObject(paymentBaseString, HashMap.class); + if (paymentBaseJson == null) { + return null; + } + + for (Map.Entry entry : paymentBaseJson.entrySet()) { + + //判断福利值是否为空/数字 + if (entry.getValue() == null || entry.getValue().length() == 0) { + continue; + } else if (!isNumeric(entry.getValue())) { + log.info("福利值非数字!"); + newPaymentBaseJson.remove(entry.getKey()); + continue; + } + //根据福利方案id、险种id + List insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().getByPI(primaryId, Long.valueOf(entry.getKey())); + log.info("福利方案id: {},, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + if (insuranceSchemeDetailPOList.size() == 0) { + log.info("根据福利方案id、险种id、缴纳对象查询明细为null!福利方案id: {}, 福利明细项id:{}", primaryId, Long.valueOf(entry.getKey())); + newPaymentBaseJson.remove(entry.getKey()); + continue; + } + List checkList = insuranceSchemeDetailPOList.stream() + .filter(f -> f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList()); + if (checkList.size() > 0) { + InsuranceSchemeDetailPO insuranceSchemeDetailPO = checkList.get(0); + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit(); + String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit(); + if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) { + //数值低于对应福利明细下限 + log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit); + newPaymentBaseJson.put(entry.getKey(), lowerLimit); + } + if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) { + //数值高于对应福利明细上限 + log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit); + newPaymentBaseJson.put(entry.getKey(), upperLimit); + } + } + } + return JSON.toJSONString(newPaymentBaseJson); + } + + /** + * 判断字符串是否为整数或者小数或者负数 + */ + public static boolean isNumeric(String str){ + + Pattern pattern = Pattern.compile("^-?\\d+(\\.\\d+)?$"); + Matcher isNum = pattern.matcher(str); + if (!isNum.matches()) { + return false; + } + return true; + + } + + /** + * 档案列表 + *

+ * 这里是一个含有比较多动态字段的列表,用的是手动拼装的方式 + * + * @param param 高级搜索条件 + * @param operateId 操作员id + * @return table + */ + public Map listPage(InsuranceArchivesListParam param, long operateId) { + Map apidatas = new HashMap<>(16); + InsuranceArchivesListParam request = InsuranceArchivesListParam.builder().build(); + if (param.getHireDate() != null && param.getHireDate().length == 2) { + param.setHiredateStart(param.getHireDate()[0]); + param.setHiredateEnd(param.getHireDate()[1]); + } + if (param.getDimissionDate() != null && param.getDimissionDate().length == 2) { + param.setDimissionDateStart(param.getDimissionDate()[0]); + param.setDimissionDateEnd(param.getDimissionDate()[1]); + } + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getDepartmentIdsStr())) { + request.setDepartmentIds(Arrays.stream(param.getDepartmentIdsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList())); + } + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSubcompanyIdsStr())) { + request.setSubcompanyIds(Arrays.stream(param.getSubcompanyIdsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList())); + } + + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getPositionsStr())) { + request.setPositions(Arrays.stream(param.getPositionsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList())); + } + + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getStatusesStr())) { + request.setStatuses(Arrays.stream(param.getStatusesStr().split(",")).map(String::new).collect(Collectors.toList())); + } + + request.setNeedAuth(param.getNeedAuth()); + request.setTaxAgentEmployeeIds(param.getTaxAgentEmployeeIds()); + request.setTaxAgentIds(param.getTaxAgentIds()); + + Integer current = param.getCurrent() == null ? 1 : param.getCurrent(); + Integer pageSize = param.getPageSize() == null ? 10 : param.getPageSize(); + long startNum = (current - 1) * pageSize; + param.setStartNum(startNum); + param.setPageSize(pageSize); +// request.setStatuses(param.getStatuses()); + request.setKeyword(param.getUserName()); + + request.setSiSchemeId(param.getSiSchemeId()); + request.setFundSchemeId(param.getFundSchemeId()); + request.setOtherSchemeId(param.getOtherSchemeId()); + + request.setPageSize(param.getPageSize()); + request.setCurrent(param.getCurrent()); + + request.setJobNum(param.getJobNum()); + + request.setOrderRule(param.getOrderRule()); + + request.setRunStatuses(param.getRunStatuses()); + + request.setTaxAgentId(param.getTaxAgentId()); + + request.setExtWelArchiveList(param.isExtWelArchiveList()); + + apidatas = listPageEmployeePOS(request, operateId); + + return apidatas; + } + + /** + * 获取员工的基本信息 + *

+ * 此处主要是一个公共接口,有多处引用。我们薪资系统只保存员工id(employeeId), + * 但是页面上需要展示员工的更多信息(姓名,部门,状态。。。), + * 所以这里主要是用于接收联表数据的一个接口 + * + * @param param 高级搜索条件,用于过滤数据 + * @param operateId 操作员id + * @return list + */ + public Map listPageEmployeePOS(InsuranceArchivesListParam param, long operateId) { + //是否分权 + Boolean needAuth = param.getNeedAuth(); + StopWatch sw = new StopWatch(); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + Map datas = new HashMap<>(16); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + List page = new ArrayList<>(); + PageInfo pageInfo = new PageInfo<>(InsuranceArchivesEmployeePO.class); + //获取福利档案列表数据 + if (needAuth) { + Collection taxAgentEmployeeIds = param.getTaxAgentEmployeeIds(); + Collection taxAgentIds = param.getTaxAgentIds(); + log.info("从数据库获取档案列表数据开始"); + sw.start("获取福利档案列表数据"); + if (param.isExtWelArchiveList()) { + page = socialSchemeMapper.queryExtEmployeeList(param); + } else { + page = socialSchemeMapper.queryEmployeeList(param); + } + sw.stop(); + log.info("从数据库获取档案列表数据完成!"); + page = page.stream().filter(f -> +// taxAgentEmployeeIds.contains(f.getEmployeeId())|| + taxAgentIds.contains(f.getPaymentOrganization()) + ).collect(Collectors.toList()); + // 填充总数和当页数据 + // 分页参数 + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), InsuranceArchivesEmployeePO.class); + pageInfo.setTotal(page.size()); + pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page)); + } else { + log.info("从数据库获取档案列表数据开始"); + sw.start("获取档案列表数据"); + if (param.isExtWelArchiveList()) { + page = socialSchemeMapper.queryExtEmployeeList(param); + } else { + page = socialSchemeMapper.queryEmployeeList(param); + } + sw.stop(); + log.info("从数据库获取档案列表数据完成!"); + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), + page, InsuranceArchivesEmployeePO.class); + } + List> records = null; + log.info("buildTableData方法处理福利档案列表数据开始"); + sw.start("buildTableData方法处理福利档案列表数据"); + if (param.getExportData() != null && param.getExportData()) { + records = buildTableData(pageInfo.getList(), true); + } else { + records = buildTableData(pageInfo.getList(), false); + } + sw.stop(); + log.info("buildTableData方法处理福利档案列表数据完成!"); + + log.info("buildWeaTableColumns方法处理福利档案列表数据开始"); + sw.start("buildWeaTableColumns方法处理福利档案列表数据"); + List columns = buildWeaTableColumns(pageInfo.getList()); + sw.stop(); + log.info("buildWeaTableColumns方法处理福利档案列表数据完成!"); + WeaTable table = new WeaTable(); + table.setColumns(columns); + //设置check是否可用 + List checkboxpopedomList = new ArrayList<>(); + WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); + checkboxpopedom.setPopedompara("column:system_type"); + checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom"); + checkboxpopedomList.add(checkboxpopedom); + table.setCheckboxList(checkboxpopedomList); + table.setCheckboxpopedom(null); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + + datas.put("pageInfo", pageInfo); + datas.put("datas", records); + datas.put("columns", columns); + datas.put("dataKey", result.getResultMap()); + + log.info("各操作计时 {}", sw.prettyPrint()); + return datas; + + } finally { + sqlSession.close(); + } + } + + /** + * 高级搜索 + * + * @return + */ + public Map getSearchCondition() { + + List userStatusOptions = Arrays.stream(UserStatusEnum.values()).map(e -> new SearchConditionOption(String.valueOf(e.getValue()), e.getDefaultLabel())).collect(Collectors.toList()); + List list = new SISchemeBiz().listAll(); + + List schemeOption = list.stream().filter(item -> Objects.equals(item.getWelfareType(), WelfareTypeEnum.SOCIAL_SECURITY.getValue())) + .collect(Collectors.toList()) + .stream().map(item -> new SearchConditionOption(item.getId().toString(), item.getSchemeName())).collect(Collectors.toList()); + + List fundOption = list.stream().filter(item -> Objects.equals(item.getWelfareType(), WelfareTypeEnum.ACCUMULATION_FUND.getValue())) + .collect(Collectors.toList()) + .stream().map(item -> new SearchConditionOption(item.getId().toString(), item.getSchemeName())).collect(Collectors.toList()); + + List otherOption = list.stream().filter(item -> Objects.equals(item.getWelfareType(), WelfareTypeEnum.OTHER.getValue())) + .collect(Collectors.toList()) + .stream().map(item -> new SearchConditionOption(item.getId().toString(), item.getSchemeName())).collect(Collectors.toList()); + + List> taxAgentList = getTaxAgentWrapper(user).selectListAsAdmin(); + List taxAgentOption = taxAgentList.stream().map(item -> new SearchConditionOption(item.get("id").toString(), item.get("content").toString())).collect(Collectors.toList()); + + + Map apidatas = new HashMap(); + ConditionFactory conditionFactory = new ConditionFactory(user); + + //条件组 + List addGroups = new ArrayList(); + + List conditionItems = new ArrayList(); + + //文本输入框 + SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username"); + username.setInputType("input"); + username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行 + username.setFieldcol(16); //条件输入框所占宽度,默认值18 + username.setLabelcol(8); + username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2 + username.setLabel(SalaryI18nUtil.getI18nLabel(0,"姓名")); //设置文本值 这个将覆盖多语言标签的值 + conditionItems.add(username); + + //文本输入框 + SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT, 25034, "jobNum"); + jobNum.setInputType("input"); + jobNum.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行 + jobNum.setFieldcol(16); //条件输入框所占宽度,默认值18 + jobNum.setLabelcol(8); + jobNum.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2 + jobNum.setLabel(SalaryI18nUtil.getI18nLabel(0,"工号")); //设置文本值 这个将覆盖多语言标签的值 + conditionItems.add(jobNum); + + + SearchConditionItem departmentIds = conditionFactory.createCondition(ConditionType.BROWSER, 502329, "departmentIdsStr", "57"); + departmentIds.setColSpan(2); + departmentIds.setFieldcol(16); + departmentIds.setLabelcol(8); + departmentIds.setLabel(SalaryI18nUtil.getI18nLabel(0,"部门")); + conditionItems.add(departmentIds); + + + SearchConditionItem statuses = conditionFactory.createCondition(ConditionType.SELECT, 502327, "statusesStr"); + statuses.setInputType("select"); + statuses.setMultiple(true); + statuses.setOptions(userStatusOptions); + statuses.setColSpan(2); + statuses.setFieldcol(16); + statuses.setLabelcol(8); + statuses.setIsQuickSearch(true); + statuses.setLabel(SalaryI18nUtil.getI18nLabel(0,"状态")); + conditionItems.add(statuses); + + + SearchConditionItem positions = conditionFactory.createCondition(ConditionType.BROWSER, 502327, "positionsStr", "278"); + positions.setInputType("browser"); + positions.setColSpan(2); + positions.setFieldcol(16); + positions.setLabelcol(8); + positions.setIsQuickSearch(true); + positions.setLabel(SalaryI18nUtil.getI18nLabel(0,"岗位")); + conditionItems.add(positions); + + SearchConditionItem subcompanyIds = conditionFactory.createCondition(ConditionType.BROWSER, 502327, "subcompanyIdsStr", "194"); + subcompanyIds.setInputType("browser"); + subcompanyIds.setColSpan(2); + subcompanyIds.setFieldcol(16); + subcompanyIds.setLabelcol(8); + subcompanyIds.setIsQuickSearch(true); + subcompanyIds.setLabel(SalaryI18nUtil.getI18nLabel(0,"分部")); + conditionItems.add(subcompanyIds); + +// SearchConditionItem hireDate = conditionFactory.createCondition(ConditionType.TIMEPICKER,502327,new String[]{"hireDate", "hireDate"}); +// hireDate.setInputType("timepicker"); +// hireDate.setColSpan(2); +// hireDate.setFieldcol(16); +// hireDate.setViewAttr(8); +// hireDate.setFormat("yyyy-MM-dd"); +// hireDate.setLabel(SalaryI18nUtil.getI18nLabel(0,"入职日期")); +// conditionItems.add(hireDate); +// +// +// SearchConditionItem dimissionDate = conditionFactory.createCondition(ConditionType.TIMEPICKER,502327,new String[]{"dimissionDate", "dimissionDate"}); +// dimissionDate.setInputType("timepicker"); +// dimissionDate.setColSpan(2); +// dimissionDate.setFieldcol(16); +// dimissionDate.setViewAttr(8); +// dimissionDate.setFormat("yyyy-MM-dd"); +// dimissionDate.setLabel(SalaryI18nUtil.getI18nLabel(0,"离职日期")); +// conditionItems.add(dimissionDate); + + + SearchConditionItem siSchemeId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "siSchemeId"); + siSchemeId.setInputType("select"); + siSchemeId.setOptions(schemeOption); + siSchemeId.setColSpan(2); + siSchemeId.setFieldcol(16); + siSchemeId.setLabelcol(8); + siSchemeId.setIsQuickSearch(true); + siSchemeId.setLabel(SalaryI18nUtil.getI18nLabel(0,"社保方案")); + conditionItems.add(siSchemeId); + + + SearchConditionItem fundSchemeId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "fundSchemeId"); + fundSchemeId.setInputType("select"); + fundSchemeId.setOptions(fundOption); + fundSchemeId.setColSpan(2); + fundSchemeId.setFieldcol(16); + fundSchemeId.setLabelcol(8); + fundSchemeId.setIsQuickSearch(true); + fundSchemeId.setLabel(SalaryI18nUtil.getI18nLabel(0,"公积金方案")); + conditionItems.add(fundSchemeId); + + SearchConditionItem otherSchemeId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "otherSchemeId"); + otherSchemeId.setInputType("select"); + otherSchemeId.setOptions(otherOption); + otherSchemeId.setColSpan(2); + otherSchemeId.setFieldcol(16); + otherSchemeId.setLabelcol(8); + otherSchemeId.setIsQuickSearch(true); + otherSchemeId.setLabel(SalaryI18nUtil.getI18nLabel(0,"其他福利方案")); + conditionItems.add(otherSchemeId); + + SearchConditionItem taxAgentId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "taxAgentId"); + taxAgentId.setInputType("select"); + taxAgentId.setOptions(taxAgentOption); + taxAgentId.setColSpan(2); + taxAgentId.setFieldcol(16); + taxAgentId.setLabelcol(8); + taxAgentId.setIsQuickSearch(true); + taxAgentId.setLabel(SalaryI18nUtil.getI18nLabel(0,"个税扣缴义务人")); + conditionItems.add(taxAgentId); + + addGroups.add(new SearchConditionGroup(SalaryI18nUtil.getI18nLabel(0,"常用条件"), true, conditionItems)); + apidatas.put("condition", addGroups); + return apidatas; + } + + @Override + public List getSocialByEmployeeIds(List employeeIds) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List socialList = socialSchemeMapper.getSocialByEmployeeId(longs); + allList.addAll(socialList); + } + return allList; + } finally { + sqlSession.close(); + } + } + + @Override + public List getFundByEmployeeIds(List employeeIds) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List fundList = fundSchemeMapper.getFundByEmployeeId(longs); + allList.addAll(fundList); + } + return allList; + } finally { + sqlSession.close(); + } + } + + @Override + public List getOtherByEmployeeIds(List employeeIds) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List otherList = otherSchemeMapper.getOtherByEmployeeId(longs); + allList.addAll(otherList); + } + return allList; + } finally { + sqlSession.close(); + } + } + + /** + * 组装员工的社保,公积金,其他福利数据 + * + * @param ids 员工id集合 + * @return map + */ + @Override + public Map buildBatchAccount(List ids, Long paymentOrganization) { + if (org.apache.commons.collections.CollectionUtils.isEmpty(ids)) { + return new HashMap<>(); + } + //设置获取社保/公积金/其他福利档案方法的入参 + List insuranceArchivesEmployeePOS = new ArrayList<>(); + for (Long employeeId : ids) { + insuranceArchivesEmployeePOS.add(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + } + + Map result = new HashMap<>(); + Map socialMap = new HashMap<>(); + Map funMap = new HashMap<>(); + Map otherMap = new HashMap<>(); + List socialPOS = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class); + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(socialPOS)) { + socialMap = socialPOS.stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getEmployeeId, Function.identity())); + } + List fundPOS = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class); + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(fundPOS)) { + funMap = fundPOS.stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getEmployeeId, Function.identity())); + } + List otherPOS = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); + encryptUtil.decryptList(otherPOS, InsuranceArchivesOtherSchemePO.class); + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(otherPOS)) { + otherMap = otherPOS.stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getEmployeeId, Function.identity())); + } + for (Long id : ids) { + InsuranceArchivesAccountPO po = new InsuranceArchivesAccountPO(); + po.setSocial(socialMap.get(id)); + po.setFund(funMap.get(id)); + po.setOther(otherMap.get(id)); + result.put(id, po); + } + return result; + } + + @Override + public List dealSocialBaseAdjustInfoList(List adjustList, Long creator) { + List adjustHistoryList = new ArrayList<>(); + if (adjustList.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesSocialSchemePO po : adjustList) { + List oldBaseInfoList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(po.getSocialSchemeId()) + .adjustAfterBaseJson(po.getSocialPaymentBaseString()) + .adjustAfterComBaseJson(po.getSocialPaymentComBaseString()) + .welfareType(po.getWelfareType()) + .employeeId(po.getEmployeeId()) + .paymentOrganization(po.getPaymentOrganization()) + .build(); + if (oldBaseInfoList.size() == 1) { + //新增调整记录,变更 + InsuranceArchivesSocialSchemePO oldBaseInfo = oldBaseInfoList.get(0); + encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesSocialSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getSocialPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getSocialPaymentComBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getSocialSchemeId()); + } else if (oldBaseInfoList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保档案存在冗余数据!")); + } + adjustHistoryList.addAll(createAdjustInfo(adjustInfo, creator)); + } + } + return adjustHistoryList; + + } + + @Override + public List dealFundBaseAdjustInfoList(List adjustList, Long creator) { + List adjustHistoryList = new ArrayList<>(); + if (adjustList.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesFundSchemePO po : adjustList) { + List oldBaseInfoList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(po.getFundSchemeId()) + .adjustAfterBaseJson(po.getFundPaymentBaseString()) + .adjustAfterComBaseJson(po.getFundPaymentComBaseString()) + .welfareType(po.getWelfareType()) + .employeeId(po.getEmployeeId()) + .paymentOrganization(po.getPaymentOrganization()) + .build(); + if (oldBaseInfoList.size() == 1) { + //新增调整记录,变更 + InsuranceArchivesFundSchemePO oldBaseInfo = oldBaseInfoList.get(0); + encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesFundSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getFundPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getFundPaymentComBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getFundSchemeId()); + } else if (oldBaseInfoList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金档案存在冗余数据!")); + } + adjustHistoryList.addAll(createAdjustInfo(adjustInfo, creator)); + } + } + return adjustHistoryList; + } + + @Override + public List dealOtherBaseAdjustInfoList(List adjustList, Long creator) { + List adjustHistoryList = new ArrayList<>(); + if (adjustList.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesOtherSchemePO po : adjustList) { + List oldBaseInfoList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(po.getOtherSchemeId()) + .adjustAfterBaseJson(po.getOtherPaymentBaseString()) + .adjustAfterComBaseJson(po.getOtherPaymentComBaseString()) + .welfareType(po.getWelfareType()) + .employeeId(po.getEmployeeId()) + .paymentOrganization(po.getPaymentOrganization()) + .build(); + if (oldBaseInfoList.size() == 1) { + //新增调整记录,变更 + InsuranceArchivesOtherSchemePO oldBaseInfo = oldBaseInfoList.get(0); + encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesOtherSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getOtherPaymentBaseString()); + adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getOtherPaymentComBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getOtherSchemeId()); + } else if (oldBaseInfoList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利档案存在冗余数据!")); + } + adjustHistoryList.addAll(createAdjustInfo(adjustInfo, creator)); + } + } + return adjustHistoryList; + } + + /** + * 获取没有设置社保、公积金最后缴纳月的档案 + * @param employeeIds + * @return + */ + @Override + public List listEndDateIsNull(List employeeIds) { + if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) { + return Collections.emptyList(); + } + return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds); + } + /*****以上代码为SIArchivesBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ } diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index 93c929e46..f3432aa33 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam; @@ -25,10 +24,7 @@ import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; -import com.engine.salary.service.SIAccountService; -import com.engine.salary.service.SIExportService; -import com.engine.salary.service.SISchemeService; -import com.engine.salary.service.TaxAgentService; +import com.engine.salary.service.*; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; import com.engine.salary.sys.enums.OpenEnum; @@ -69,7 +65,7 @@ public class SIExportServiceImpl extends Service implements SIExportService { // private SIAccountBiz siAccountBiz = new SIAccountBiz(); - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private SISchemeService getSISchemeService(User user) { return ServiceUtil.getService(SISchemeServiceImpl.class, user); @@ -107,6 +103,10 @@ public class SIExportServiceImpl extends Service implements SIExportService { return ServiceUtil.getService(SIAccountServiceImpl.class, user); } + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class, user); + } + @Override public XSSFWorkbook exportOverView(InsuranceExportParam queryParam) { List insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtils.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization())); @@ -253,7 +253,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { @Override public List> buildCommonRecords(List list) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); List> result = new ArrayList<>(); List paymentList = getTaxAgentMapper().listAll(); @@ -287,7 +288,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { if (welBaseDiffSign) { if (socialJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); socialJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialPerBase", v); @@ -298,7 +300,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { }); if (socialComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); socialComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialComBase", v); @@ -308,7 +311,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { } else { if (socialJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getSocialSchemeId()); socialJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "socialBase", v); @@ -332,7 +336,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { if (welBaseDiffSign) { if (fundJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); fundJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundPerBase", v); @@ -343,7 +348,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { }); if (fundComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); fundComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundComBase", v); @@ -353,7 +359,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { } else { if (fundJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getFundSchemeId()); fundJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "fundBase", v); @@ -375,7 +382,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { if (welBaseDiffSign) { if (otherJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); otherJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherPerBase", v); @@ -386,7 +394,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { }); if (otherComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); otherComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherComBase", v); @@ -396,7 +405,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { } else { if (otherJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(item.getOtherSchemeId()); otherJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { record.put(k + "otherBase", v); @@ -731,7 +741,8 @@ public class SIExportServiceImpl extends Service implements SIExportService { } private Map> buildPaymentTitle(List pos, Map categoryIdNameMap) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); diff --git a/src/com/engine/salary/service/impl/SIImportServiceImpl.java b/src/com/engine/salary/service/impl/SIImportServiceImpl.java index c8b41704c..64623943d 100644 --- a/src/com/engine/salary/service/impl/SIImportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIImportServiceImpl.java @@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO; @@ -26,7 +25,6 @@ import com.engine.salary.service.SIImportService; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; -import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -51,7 +49,7 @@ import java.util.stream.Collectors; public class SIImportServiceImpl extends Service implements SIImportService { private EncryptUtil encryptUtil = new EncryptUtil(); - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); public SIArchivesService getSIArchivesService(User user) { return ServiceUtil.getService(SIArchivesServiceImpl.class,user); @@ -195,7 +193,8 @@ public class SIImportServiceImpl extends Service implements SIImportService { * @return */ public List buildHeader() { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); List result = new ArrayList<>(); result.add(SalaryI18nUtil.getI18nLabel( 85429, "姓名")); result.add(SalaryI18nUtil.getI18nLabel( 86184, "个税扣缴义务人")); @@ -294,19 +293,22 @@ public class SIImportServiceImpl extends Service implements SIImportService { } List employeeIds = insuranceArchivesEmployeePOS.stream().map(InsuranceArchivesEmployeePO::getEmployeeId).collect(Collectors.toList()); Map socialSchemePOMap = new HashMap<>(); - List socialSchemePOList = siArchivesBiz.getSocialByEmployeeIds(employeeIds); +// List socialSchemePOList = siArchivesBiz.getSocialByEmployeeIds(employeeIds); + List socialSchemePOList = getSIArchivesService(user).getSocialByEmployeeIds(employeeIds); encryptUtil.decryptList(socialSchemePOList, InsuranceArchivesSocialSchemePO.class); if (CollectionUtils.isNotEmpty(socialSchemePOList)) { socialSchemePOMap = socialSchemePOList.stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getEmployeeId, Function.identity())); } - List fundSchemePOList = siArchivesBiz.getFundByEmployeeIds(employeeIds); +// List fundSchemePOList = siArchivesBiz.getFundByEmployeeIds(employeeIds); + List fundSchemePOList = getSIArchivesService(user).getFundByEmployeeIds(employeeIds); encryptUtil.encryptList(fundSchemePOList, InsuranceArchivesFundSchemePO.class); Map fundSchemePOMap = new HashMap<>(); if (CollectionUtils.isNotEmpty(fundSchemePOList)) { fundSchemePOMap = fundSchemePOList.stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getEmployeeId, Function.identity())); } Map otherSchemePOMap = new HashMap<>(); - List otherSchemePOList = siArchivesBiz.getOtherByEmployeeIds(employeeIds); +// List otherSchemePOList = siArchivesBiz.getOtherByEmployeeIds(employeeIds); + List otherSchemePOList = getSIArchivesService(user).getOtherByEmployeeIds(employeeIds); encryptUtil.decryptList(otherSchemePOList, InsuranceArchivesOtherSchemePO.class); if (CollectionUtils.isNotEmpty(otherSchemePOList)) { otherSchemePOMap = otherSchemePOList.stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getEmployeeId, Function.identity())); diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 19a670559..3ab971917 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -6,11 +6,9 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.biz.SISchemeBiz; import com.engine.salary.cmd.sischeme.*; import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.encrypt.AESEncryptUtil; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; @@ -51,7 +49,6 @@ import com.engine.salary.util.*; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; -import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.excel.ExcelUtilPlus; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -129,7 +126,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { return ServiceUtil.getService(SIImportServiceImpl.class, user); } - private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); +// private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private SISchemeBiz siSchemeBiz = new SISchemeBiz(); private SalaryEmployeeService getSalaryEmployeeService(User user) { @@ -152,6 +149,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { return ServiceUtil.getService(TaxAgentManageRangeServiceImpl.class, user); } + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class,user); + } + @Override public Map getForm(Map params) { return commandExecutor.execute(new SISchemeGetFormCmd(params, user)); @@ -264,7 +265,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { @Override public List> buildTableData(List insuranceArchivesEmployeePOS) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); List> records = new ArrayList<>(); List taxAgentPOS = getTaxAgentMapper().listAll(); Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); @@ -282,9 +284,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { end = employeeIds.size(); } List ids = employeeIds.subList(i, end); - socialList.addAll(encryptUtil.decryptList(siArchivesBiz.getSocialByEmployeeIds(ids), InsuranceArchivesSocialSchemePO.class)); - fundList.addAll(encryptUtil.decryptList(siArchivesBiz.getFundByEmployeeIds(ids), InsuranceArchivesFundSchemePO.class)); - otherList.addAll(encryptUtil.decryptList(siArchivesBiz.getOtherByEmployeeIds(ids), InsuranceArchivesOtherSchemePO.class)); + socialList.addAll(encryptUtil.decryptList(getSIArchivesService(user).getSocialByEmployeeIds(ids), InsuranceArchivesSocialSchemePO.class)); + fundList.addAll(encryptUtil.decryptList(getSIArchivesService(user).getFundByEmployeeIds(ids), InsuranceArchivesFundSchemePO.class)); + otherList.addAll(encryptUtil.decryptList(getSIArchivesService(user).getOtherByEmployeeIds(ids), InsuranceArchivesOtherSchemePO.class)); } Map socialSchemePOMap = SalaryEntityUtil.convert2Map(socialList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId()); Map fundSchemePOMap = SalaryEntityUtil.convert2Map(fundList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId()); @@ -311,7 +313,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (welBaseDiffSign) { if (socialJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); socialJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "per", v); @@ -322,7 +325,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { }); if (socialComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); socialComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "com", v); @@ -352,7 +356,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (welBaseDiffSign) { if (fundJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); fundJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "per", v); @@ -363,7 +368,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { }); if (fundComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); fundComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "com", v); @@ -393,7 +399,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (welBaseDiffSign) { if (otherJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); otherJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "per", v); @@ -404,7 +411,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { }); if (otherComJson != null) { //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); +// List insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + List insuranceIdList = getSIArchivesService(user).payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); otherComJson.forEach((k, v) -> { if (insuranceIdList.contains(Long.valueOf(k))) { map.put(k + "com", v); @@ -587,7 +595,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { public Map> buildColumnTitle(List insuranceArchivesEmployeePOS, Long employeeId) { - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); Map> result = new HashMap<>(); Set socialSet = new HashSet<>(); @@ -599,7 +608,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Set otherComSet = new HashSet<>(); insuranceArchivesEmployeePOS.forEach(item -> { - List socialByEmployeeId = siArchivesBiz.getSocialByEmployeeIds(new ArrayList() {{ + List socialByEmployeeId = getSIArchivesService(user).getSocialByEmployeeIds(new ArrayList() {{ add(item.getEmployeeId()); }}); encryptUtil.decryptList(socialByEmployeeId, InsuranceArchivesSocialSchemePO.class); @@ -609,7 +618,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } InsuranceArchivesFundSchemePO fundItem = null; - List fundByEmployeeId = siArchivesBiz.getFundByEmployeeIds(new ArrayList() {{ + List fundByEmployeeId = getSIArchivesService(user).getFundByEmployeeIds(new ArrayList() {{ add(item.getEmployeeId()); }}); encryptUtil.decryptList(fundByEmployeeId, InsuranceArchivesFundSchemePO.class); @@ -619,7 +628,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } InsuranceArchivesOtherSchemePO otherItem = null; - List otherByEmployeeId = siArchivesBiz.getOtherByEmployeeIds(new ArrayList() {{ + List otherByEmployeeId = getSIArchivesService(user).getOtherByEmployeeIds(new ArrayList() {{ add(item.getEmployeeId()); }}); encryptUtil.decryptList(otherByEmployeeId, InsuranceArchivesOtherSchemePO.class); @@ -809,6 +818,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { /** * 导入的数据插入到数据库中 */ + @Override public Map batchImportEbatch(SIArchiveImportParam param) { ValidUtil.doValidator(param); param.setProcess(false); @@ -1229,7 +1239,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesOtherSchemePO = buildOtherPO(employeeId, welfareMap, singleAccount, schemeNameIdMap, paymentNameIdMap, creator); } /**************校验申报基数**************/ - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (welBaseDiffSign) { for (Map.Entry entry : welfareMap.entrySet()) { String keyPerName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"); @@ -1276,19 +1287,19 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO); insuranceArchivesAccountPO.setBaseInfo(insuranceArchivesBaseInfoPO); //校验福利基数是否符合上下限要求, - Boolean socialCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + Boolean socialCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - Boolean fundCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + Boolean fundCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); Boolean socialCheckComBase = true; Boolean fundCheckComBase = true; Boolean otherCheckComBase = true; if (welBaseDiffSign) { - socialCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); - fundCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); - otherCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); } if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) { insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO); @@ -1313,18 +1324,18 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } else if (!isError) { //校验福利基数是否符合上下限要求,不符合上下限的基数调整为上限 /下限 - String newSocialPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - String newFundPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - String newOtherPaymentBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + String newSocialPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + String newFundPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + String newOtherPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue()); insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString); insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString); insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString); if (welBaseDiffSign) { - String newSocialPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); - String newFundPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); - String newOtherPaymentComBaseString = siArchivesBiz.checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + String newFundPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); + String newOtherPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue()); insuranceArchivesSocialSchemePO.setSocialPaymentComBaseString(newSocialPaymentComBaseString); insuranceArchivesFundSchemePO.setFundPaymentComBaseString(newFundPaymentComBaseString); @@ -1413,7 +1424,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesSocialSchemePO.getSocialSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); HashMap socialPaymentBase = new HashMap<>(); @@ -1525,7 +1537,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesFundSchemePO.getFundSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); HashMap fundPaymentBase = new HashMap<>(); @@ -1627,7 +1640,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceArchivesOtherSchemePO.setEmployeeId(employeeId); List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesOtherSchemePO.getOtherSchemeId()); encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); +// boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); + boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { List insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); HashMap otherPaymentBase = new HashMap<>(); @@ -1705,7 +1719,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); //生成福利档案基数调整历史记录 - List adjustSocialHistoryPOList = siArchivesBiz.dealSocialBaseAdjustInfoList(socialSchemePOS, (long) user.getUID()); +// List adjustSocialHistoryPOList = siArchivesBiz.dealSocialBaseAdjustInfoList(socialSchemePOS, (long) user.getUID()); + List adjustSocialHistoryPOList = getSIArchivesService(user).dealSocialBaseAdjustInfoList(socialSchemePOS, (long) user.getUID()); //根据人员id和个税扣缴义务人id删除对应旧档案 socialSchemePOS.forEach(getSocialSchemeMapper()::deleteByEmployeeIdAndPayOrg); @@ -1716,7 +1731,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { partition.forEach(getSocialSchemeMapper()::batchSave); //新建福利档案基数调整历史记录 - siArchivesBiz.batchInsertAdjustHistory(adjustSocialHistoryPOList, user.getUID()); +// siArchivesBiz.batchInsertAdjustHistory(adjustSocialHistoryPOList, user.getUID()); + getSIArchivesService(user).batchInsertAdjustHistory(adjustSocialHistoryPOList); } //导入公积金档案 List fundSchemePOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getFund).collect(Collectors.toList()); @@ -1727,7 +1743,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); //生成福利档案基数调整历史记录 - List adjustFundHistoryPOList = siArchivesBiz.dealFundBaseAdjustInfoList(fundSchemePOS, (long) user.getUID()); +// List adjustFundHistoryPOList = siArchivesBiz.dealFundBaseAdjustInfoList(fundSchemePOS, (long) user.getUID()); + List adjustFundHistoryPOList = getSIArchivesService(user).dealFundBaseAdjustInfoList(fundSchemePOS, (long) user.getUID()); //根据人员id和个税扣缴义务人id删除对应档案 fundSchemePOS.forEach(getFundSchemeMapper()::deleteByEmployeeIdAndPayOrg); //新建新档案 @@ -1735,7 +1752,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List> partition = Lists.partition(insuranceArchivesFundSchemePOS, 100); partition.forEach(getFundSchemeMapper()::batchSave); //新建福利档案基数调整历史记录 - siArchivesBiz.batchInsertAdjustHistory(adjustFundHistoryPOList, user.getUID()); +// siArchivesBiz.batchInsertAdjustHistory(adjustFundHistoryPOList, user.getUID()); + getSIArchivesService(user).batchInsertAdjustHistory(adjustFundHistoryPOList); } //导入其他福利档案 List otherSchemePOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getOther).collect(Collectors.toList()); @@ -1746,7 +1764,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); //生成福利档案基数调整历史记录 - List adjustOtherHistoryPOList = siArchivesBiz.dealOtherBaseAdjustInfoList(otherSchemePOS, (long) user.getUID()); +// List adjustOtherHistoryPOList = siArchivesBiz.dealOtherBaseAdjustInfoList(otherSchemePOS, (long) user.getUID()); + List adjustOtherHistoryPOList = getSIArchivesService(user).dealOtherBaseAdjustInfoList(otherSchemePOS, (long) user.getUID()); //根据人员id和个税扣缴义务人id删除对应档案 otherSchemePOS.forEach(getOtherSchemeMapper()::deleteByEmployeeIdAndPayOrg); @@ -1755,7 +1774,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List> partition = Lists.partition(insuranceArchivesOtherSchemePOS, 100); partition.forEach(getOtherSchemeMapper()::batchSave); //新建福利档案基数调整历史记录 - siArchivesBiz.batchInsertAdjustHistory(adjustOtherHistoryPOList, user.getUID()); +// siArchivesBiz.batchInsertAdjustHistory(adjustOtherHistoryPOList, user.getUID()); + getSIArchivesService(user).batchInsertAdjustHistory(adjustOtherHistoryPOList); } //导入福利档案基础信息 List baseInfoPOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getBaseInfo).collect(Collectors.toList()); @@ -1801,6 +1821,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * * @param param 是否导出带档案数据的模板 */ + @Override public XSSFWorkbook exportTemplate(InsuranceArchivesListParam param) { return getSIImportService().exportTemplate(param); diff --git a/src/com/engine/salary/timer/AutoSyncResignationEmpArchiveJob.java b/src/com/engine/salary/timer/AutoSyncResignationEmpArchiveJob.java index b62f8ce6d..0505d7670 100644 --- a/src/com/engine/salary/timer/AutoSyncResignationEmpArchiveJob.java +++ b/src/com/engine/salary/timer/AutoSyncResignationEmpArchiveJob.java @@ -1,15 +1,16 @@ package com.engine.salary.timer; import com.engine.common.util.ServiceUtil; -import com.engine.salary.biz.SIArchivesBiz; import com.engine.salary.biz.SalaryArchiveBiz; import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; import com.engine.salary.mapper.siarchives.FundSchemeMapper; import com.engine.salary.mapper.siarchives.OtherSchemeMapper; import com.engine.salary.mapper.siarchives.SocialSchemeMapper; +import com.engine.salary.service.SIArchivesService; import com.engine.salary.service.SalaryArchiveService; import com.engine.salary.service.SalaryEmployeeService; +import com.engine.salary.service.impl.SIArchivesServiceImpl; import com.engine.salary.service.impl.SalaryArchiveServiceImpl; import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; import com.engine.salary.util.SalaryDateUtil; @@ -54,6 +55,10 @@ public class AutoSyncResignationEmpArchiveJob extends BaseCronJob { private String preMonth; + public SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class,user); + } + @Override public void execute() { User user = new User(); @@ -85,8 +90,8 @@ public class AutoSyncResignationEmpArchiveJob extends BaseCronJob { } // 获取离职人员中没有设置最后缴纳月的社保福利档案 - SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - List needSyncList = siArchivesBiz.listEndDateIsNull(new ArrayList<>(resignationMap.keySet())); +// List needSyncList = siArchivesBiz.listEndDateIsNull(new ArrayList<>(resignationMap.keySet())); + List needSyncList = getSIArchivesService(user).listEndDateIsNull(new ArrayList<>(resignationMap.keySet())); // 设置社保、公积金最后缴纳月 for(InsuranceArchivesBaseInfoPO po : needSyncList){ String dismissDate = resignationMap.get(po.getEmployeeId()); From 306af482913d67dfd405e2795be9f0e04d64ba99 Mon Sep 17 00:00:00 2001 From: sy Date: Sun, 4 Feb 2024 10:11:10 +0800 Subject: [PATCH 087/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8CSICategoryBiz?= =?UTF-8?q?=E3=80=81SISchemeBiz=E6=96=B9=E6=B3=95=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E5=AF=B9=E5=BA=94=E6=98=AF=E5=AE=9E=E7=8E=B0=E7=B1=BB?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=BF=AE=E6=94=B9=E8=B0=83=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/SICategoryService.java | 6 + .../salary/service/SISchemeService.java | 3 + .../service/impl/SIAccountServiceImpl.java | 8 +- .../service/impl/SIArchivesServiceImpl.java | 30 +- .../service/impl/SICategoryServiceImpl.java | 241 +++++++- .../service/impl/SISchemeServiceImpl.java | 548 +++++++++++++++++- 6 files changed, 801 insertions(+), 35 deletions(-) diff --git a/src/com/engine/salary/service/SICategoryService.java b/src/com/engine/salary/service/SICategoryService.java index dfaa84349..b1c9b37f7 100644 --- a/src/com/engine/salary/service/SICategoryService.java +++ b/src/com/engine/salary/service/SICategoryService.java @@ -3,10 +3,12 @@ package com.engine.salary.service; import com.engine.salary.entity.sicategory.dto.ICategoryDTO; import com.engine.salary.entity.sicategory.dto.ICategoryFormDTO; import com.engine.salary.entity.sicategory.dto.ICategoryListDTO; +import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.util.page.PageInfo; +import java.util.List; import java.util.Map; /** @@ -65,4 +67,8 @@ public interface SICategoryService { Map updateCategoryNameAndPayScope(ICategoryFormDTO iCategoryFormDTO); Map deleteCustomCategory(ICategoryFormDTO iCategoryFormDTO); + + ICategoryPO getICategoryPOByID(Long id); + + List listByName(String insuranceName); } diff --git a/src/com/engine/salary/service/SISchemeService.java b/src/com/engine/salary/service/SISchemeService.java index 5e0b8d8de..e465d2740 100644 --- a/src/com/engine/salary/service/SISchemeService.java +++ b/src/com/engine/salary/service/SISchemeService.java @@ -8,6 +8,7 @@ import com.engine.salary.entity.sischeme.dto.InsuranceSchemeListDTO; import com.engine.salary.entity.sischeme.param.InsuranceSchemeDetailUpdateParam; import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; +import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.util.page.PageInfo; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -80,4 +81,6 @@ public interface SISchemeService { * @param schemeDetailList */ List updateSchemeDetail(List schemeDetailList); + + List listAll(); } diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 08b7fc624..f08af7c81 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -147,7 +147,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return MapperProxyFactory.getProxy(TaxAgentMapper.class); } - SICategoryBiz siCategoryBiz = new SICategoryBiz(); +// SICategoryBiz siCategoryBiz = new SICategoryBiz(); private SalarySysConfMapper getSalarySysConfMapper() { return SqlProxyHandle.getProxy(SalarySysConfMapper.class); @@ -2027,7 +2027,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { String payScope = keyName.substring(keyName.length() - 2); //获取福利类型 Integer welfareType; - List categoryPOList = siCategoryBiz.listByName(entry.getKey().substring(0, keyName.length() - 2)); +// List categoryPOList = siCategoryBiz.listByName(entry.getKey().substring(0, keyName.length() - 2)); + List categoryPOList = getSICategoryService(user).listByName(entry.getKey().substring(0, keyName.length() - 2)); if (categoryPOList.size() == 1) { ICategoryPO iCategoryPO = categoryPOList.get(0); welfareType = iCategoryPO.getWelfareType(); @@ -3254,7 +3255,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { for (Map.Entry entry : toDealMap.entrySet()) { //获取福利项信息 - ICategoryPO iCategoryPO = siCategoryBiz.getByID(Long.valueOf(entry.getKey())); +// ICategoryPO iCategoryPO = siCategoryBiz.getByID(Long.valueOf(entry.getKey())); + ICategoryPO iCategoryPO = getSICategoryService(user).getICategoryPOByID(Long.valueOf(entry.getKey())); if (iCategoryPO != null) { String name = groupPrefix + iCategoryPO.getId().toString(); String label = iCategoryPO.getInsuranceName(); diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 29859d236..798eed713 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -16,8 +16,6 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SICategoryBiz; -import com.engine.salary.biz.SISchemeBiz; import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd; import com.engine.salary.common.SalaryContext; import com.engine.salary.constant.SalaryDefaultTenantConstant; @@ -47,10 +45,7 @@ import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; -import com.engine.salary.service.SIArchivesService; -import com.engine.salary.service.SalaryEmployeeService; -import com.engine.salary.service.TaxAgentEmpChangeService; -import com.engine.salary.service.TaxAgentService; +import com.engine.salary.service.*; import com.engine.salary.sys.constant.SalarySysConstant; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; @@ -149,6 +144,14 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return ServiceUtil.getService(TaxAgentWrapper.class, user); } + public SICategoryService getSICategoryService(User user) { + return ServiceUtil.getService(SICategoryServiceImpl.class, user); + } + + private SISchemeService getSISchemeService(User user) { + return ServiceUtil.getService(SISchemeServiceImpl.class,user); + } + @Override public Map getTips(Map params) { return commandExecutor.execute(new SIArchivesTipsCmd(params, user)); @@ -2249,8 +2252,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return data; } - SISchemeBiz siSchemeBiz = new SISchemeBiz(); - List list = siSchemeBiz.listAll(); +// List list = siSchemeBiz.listAll(); + List list = getSISchemeService(user).listAll(); // 过滤可见性范围 list = filterList(list, taxAgentPOS); List selectItems = new ArrayList<>(); @@ -2671,9 +2674,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } } - SICategoryBiz siCategoryBiz = new SICategoryBiz(); list.forEach(insuranceSchemeDetail -> { - ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); +// ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); + ICategoryPO iCategoryPO = getSICategoryService(user).getICategoryPOByID(insuranceSchemeDetail.getInsuranceId()); if (iCategoryPO != null) { // inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()))); inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()) @@ -2690,9 +2693,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue())).collect(Collectors.toList()); - SICategoryBiz siCategoryBiz = new SICategoryBiz(); list.forEach(insuranceSchemeDetail -> { - ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); +// ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId()); + ICategoryPO iCategoryPO = getSICategoryService(user).getICategoryPOByID(insuranceSchemeDetail.getInsuranceId()); if (iCategoryPO != null) { // inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()))); inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId()) @@ -3484,7 +3487,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService public Map getSearchCondition() { List userStatusOptions = Arrays.stream(UserStatusEnum.values()).map(e -> new SearchConditionOption(String.valueOf(e.getValue()), e.getDefaultLabel())).collect(Collectors.toList()); - List list = new SISchemeBiz().listAll(); +// List list = new SISchemeBiz().listAll(); + List list = getSISchemeService(user).listAll(); List schemeOption = list.stream().filter(item -> Objects.equals(item.getWelfareType(), WelfareTypeEnum.SOCIAL_SECURITY.getValue())) .collect(Collectors.toList()) diff --git a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java index 5cf300cf5..b610a2afb 100644 --- a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java @@ -1,19 +1,22 @@ package com.engine.salary.service.impl; +import com.api.browser.bean.SearchConditionItem; +import com.api.browser.bean.SearchConditionOption; +import com.api.browser.util.ConditionFactory; +import com.api.browser.util.ConditionType; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.cmd.sicategory.SICategoryGetFormCmd; -import com.engine.salary.cmd.sicategory.SICategoryInsertCmd; -import com.engine.salary.cmd.sicategory.SICategoryUpdateCmd; -import com.engine.salary.cmd.sicategory.SICategoryUpdateStatusByIdCmd; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; +import com.engine.salary.entity.sicategory.bo.ICategoryBO; import com.engine.salary.entity.sicategory.dto.ICategoryDTO; import com.engine.salary.entity.sicategory.dto.ICategoryFormDTO; import com.engine.salary.entity.sicategory.dto.ICategoryListDTO; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam; +import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; import com.engine.salary.enums.sicategory.DataTypeEnum; +import com.engine.salary.enums.sicategory.IsPaymentEnum; import com.engine.salary.enums.sicategory.PaymentScopeEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -21,15 +24,19 @@ import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.service.RecordsBuildService; import com.engine.salary.service.SICategoryService; +import com.engine.salary.service.SISchemeService; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryEnumUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; +import com.mzlion.core.utils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.session.SqlSession; +import weaver.conn.mybatis.MyBatisFactory; import weaver.hrm.User; import java.util.*; @@ -57,24 +64,93 @@ public class SICategoryServiceImpl extends Service implements SICategoryService private EncryptUtil encryptUtil = new EncryptUtil(); + private SISchemeService getSISchemeService(User user) { + return ServiceUtil.getService(SISchemeServiceImpl.class,user); + } + @Override public Map getForm(Map params) { - return commandExecutor.execute(new SICategoryGetFormCmd(params,user)); +// return commandExecutor.execute(new SICategoryGetFormCmd(params,user)); + Map apidatas = new HashMap<>(16); + Long id = (Long) params.get("id"); +// ICategoryFormDTO form = siCategoryBiz.getForm(id); + ICategoryFormDTO form = getForm(id); + apidatas.put("form",form); + ConditionFactory conditionFactory = new ConditionFactory(user); + Map items = new HashMap<>(); + + SearchConditionItem input = conditionFactory.createCondition(ConditionType.INPUT,0, "insuranceName"); + input.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行 + input.setFieldcol(12); //条件输入框所占宽度,默认值18 + input.setViewAttr(3); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2 + input.setLength(10); // 设置输入长度 + input.setLabel(SalaryI18nUtil.getI18nLabel(0,"福利名称")); //设置文本值 这个将覆盖多语言标签的值 + input.setRules("required"); //设置字段填入规则 + + items.put("insuranceName",input); + + SearchConditionItem radio = conditionFactory.createCondition(ConditionType.RADIO,0,"welfareType"); + List radioOptions = new ArrayList <>(); + radioOptions.add(new SearchConditionOption("SOCIAL_SECURITY",SalaryI18nUtil.getI18nLabel(0,"社保"),true)); + radioOptions.add(new SearchConditionOption("ACCUMULATION_FUND",SalaryI18nUtil.getI18nLabel(0,"公积金"))); + radioOptions.add(new SearchConditionOption("OTHER",SalaryI18nUtil.getI18nLabel(0,"企业年金及其他福利"))); + radio.setColSpan(2); + radio.setFieldcol(12); + radio.setLabelcol(6); + radio.setViewAttr(3); + radio.setIsQuickSearch(false); + radio.setOptions(radioOptions); + radio.setLabel(SalaryI18nUtil.getI18nLabel(0,"类型")); + radio.setRules("required"); + items.put("welfareType",radio); + + SearchConditionItem checkbox = conditionFactory.createCondition(ConditionType.CHECKBOX,0,"paymentScope"); + List checkOptions = new ArrayList <>(); + checkOptions.add(new SearchConditionOption("SCOPE_COMPANY",SalaryI18nUtil.getI18nLabel(0,"公司"))); + checkOptions.add(new SearchConditionOption("SCOPE_PERSON",SalaryI18nUtil.getI18nLabel(0,"个人"))); + checkbox.setColSpan(2); + checkbox.setFieldcol(12); + checkbox.setLabelcol(6); + checkbox.setViewAttr(3); + checkbox.setIsQuickSearch(false); + checkbox.setOptions(checkOptions); + checkbox.setLabel(SalaryI18nUtil.getI18nLabel(0,"缴纳对象")); + checkbox.setRules("required"); + items.put("paymentScope",checkbox); + + apidatas.put("item",items); + return apidatas; } @Override public Map insert(Map params) { - return commandExecutor.execute(new SICategoryInsertCmd(params,user)); +// return commandExecutor.execute(new SICategoryInsertCmd(params,user)); + Map apidatas = new HashMap<>(16); + ICategoryFormDTO iCategoryFormDTO = (ICategoryFormDTO)params.get("iCategoryFormDTO"); +// siCategoryBiz.save(iCategoryFormDTO,(long) user.getUID()); + save(iCategoryFormDTO,(long) user.getUID()); + return apidatas; } @Override public Map update(Map params) { - return commandExecutor.execute(new SICategoryUpdateCmd(params,user)); +// return commandExecutor.execute(new SICategoryUpdateCmd(params,user)); + Map apidatas = new HashMap(16); + ICategoryFormDTO iCategoryFormDTO = (ICategoryFormDTO) params.get("iCategoryFormDTO"); +// siCategoryBiz.update(iCategoryFormDTO, (long) user.getUID()); + update(iCategoryFormDTO); + return apidatas; } @Override public Map updateStatusById(Map params) { - return commandExecutor.execute(new SICategoryUpdateStatusByIdCmd(params,user)); +// return commandExecutor.execute(new SICategoryUpdateStatusByIdCmd(params,user)); + Map apidatas = new HashMap(16); + Long id = (Long) params.get("id"); + Integer isUse = (Integer) params.get("isUse"); +// siCategoryBiz.updateStatusById(id, isUse,(long) user.getUID()); + updateStatusById(id, isUse); + return apidatas; } @Override @@ -238,4 +314,153 @@ public class SICategoryServiceImpl extends Service implements SICategoryService List collect = paymentScopes.stream().map(scope -> PaymentScopeEnum.getDefaultLabelByValue(SalaryEntityUtil.string2Integer(scope))).collect(Collectors.toList()); return StringUtils.join(collect, ","); } + /*****以下代码为SICategoryBiz中逻辑迁移,旨在减少Biz类的使用*****/ + + /** + * 自定义福利表单 + * id == null ? 新建表单 : 查看已有数据内容表单 + * @param id 自定义福利主键 + * @return 表单 + */ + public ICategoryFormDTO getForm(Long id) { + if (id != null) { + ICategoryPO iCategoryPO = getICategoryPOByID(id); + ICategoryFormDTO iCategoryFormDTO = new ICategoryFormDTO(); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); + } + BeanUtils.copyProperties(iCategoryPO,iCategoryFormDTO); + return iCategoryFormDTO; + } + + return ICategoryFormDTO.builder().welfareType(WelfareTypeEnum.SOCIAL_SECURITY).build(); + } + + /** + * 根据id获取 + * @param id + * @return + */ + @Override + public ICategoryPO getICategoryPOByID(Long id) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + ICategoryPO iCategoryPO = iCategoryMapper.getById(id); + return iCategoryPO; + + } finally { + sqlSession.close(); + } + } + + /** + * 根据名称获取 + * @param insuranceName + * @return + */ + @Override + public List listByName(String insuranceName) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + + try{ + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + List iCategoryPOS = iCategoryMapper.listByName(insuranceName); + return iCategoryPOS; + + } finally { + sqlSession.close(); + } + } + + /** + * 保存 + * @param iCategoryFormDTO + * @param employeeId DataTypeEnum.SYSTEM.getValue() + */ + public void save(ICategoryFormDTO iCategoryFormDTO, long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + iCategoryFormDTO.setInsuranceName(StringUtils.trim(iCategoryFormDTO.getInsuranceName())); + List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); + if (CollectionUtils.isNotEmpty(iCategoryPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); + } + ICategoryPO iCategoryPO = ICategoryBO.convertToInsuranceCategoryPO(iCategoryFormDTO, employeeId); + iCategoryMapper.insert(iCategoryPO); + + sqlSession.commit(); + + } finally { + sqlSession.close(); + } + } + + /** + * 更新 + * @param iCategoryFormDTO + */ + public void update(ICategoryFormDTO iCategoryFormDTO) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try{ + if (iCategoryFormDTO.getId() == null) { + throw new SalaryRunTimeException("id is required"); + } + ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId()); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); + } + List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); + if (CollectionUtils.isNotEmpty(iCategoryPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); + } + iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName()); +// iCategoryPO.setWelfareType(iCategoryFormDTO.getWelfareType().getValue()); +// iCategoryPO.setPaymentScope(SalaryEnumUtil.enumArrToString(iCategoryFormDTO.getPaymentScope())); + iCategoryPO.setUpdateTime(new Date()); + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + iCategoryMapper.update(iCategoryPO); + + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + /** + * 更新状态 + * @param id + * @param isUse + */ + public void updateStatusById(Long id, Integer isUse) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + if(id == null) { + throw new SalaryRunTimeException("id is required"); + } + if (isUse == null) { + throw new SalaryRunTimeException("isUse is required"); + } +// List insuranceSchemeDetailPOS = new SISchemeBiz().queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); + List insuranceSchemeDetailPOS = getSISchemeService(user).queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); + if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS) && isUse == 0) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该福利开启缴费,不可删除(或停用)")); + } + ICategoryPO iCategoryPO = getICategoryPOByID(id); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据记录不存在")); + } + iCategoryPO.setIsUse(isUse); + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + iCategoryMapper.updateById(iCategoryPO); + + sqlSession.commit(); + }finally { + sqlSession.close(); + } + } + + /*****以上代码为SICategoryBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ + } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 3ab971917..dbe70e770 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.SISchemeBiz; -import com.engine.salary.cmd.sischeme.*; +import com.engine.salary.component.SalaryWeaTable; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -15,11 +15,17 @@ import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.SIArchiveImportParam; import com.engine.salary.entity.siarchives.po.*; import com.engine.salary.entity.sicategory.po.ICategoryPO; +import com.engine.salary.entity.sischeme.bo.InsuranceSchemeBO; +import com.engine.salary.entity.sischeme.dto.InsuranceSchemeDTO; +import com.engine.salary.entity.sischeme.dto.InsuranceSchemeDetailDTO; import com.engine.salary.entity.sischeme.dto.InsuranceSchemeListDTO; import com.engine.salary.entity.sischeme.param.InsuranceSchemeDetailUpdateParam; import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam; +import com.engine.salary.entity.sischeme.param.InsuranceSchemeReqParam; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; +import com.engine.salary.entity.sischeme.vo.InsuranceSchemeFormVO; +import com.engine.salary.entity.sischeme.vo.SISchemeTableVO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.param.TaxAgentManageRangeSaveParam; @@ -30,6 +36,7 @@ import com.engine.salary.enums.salarysob.TargetTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import com.engine.salary.enums.sicategory.*; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.siaccount.SIAccountUtilMapper; import com.engine.salary.mapper.siarchives.FundSchemeMapper; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.siarchives.OtherSchemeMapper; @@ -60,16 +67,21 @@ 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.ibatis.session.SqlSession; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.BeanUtils; +import weaver.conn.mybatis.MyBatisFactory; import weaver.file.ImageFileManager; +import weaver.general.Util; import weaver.hrm.User; import java.io.InputStream; +import java.math.BigDecimal; import java.util.*; import java.util.function.Function; +import java.util.regex.Pattern; import java.util.stream.Collectors; import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_AUTO_ADJUST; @@ -127,7 +139,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } // private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); - private SISchemeBiz siSchemeBiz = new SISchemeBiz(); +// private SISchemeBiz siSchemeBiz = new SISchemeBiz(); private SalaryEmployeeService getSalaryEmployeeService(User user) { return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); @@ -153,39 +165,134 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { return ServiceUtil.getService(SIArchivesServiceImpl.class,user); } + private SIAccountUtilMapper getSIAccountUtilMapper() { + return SqlProxyHandle.getProxy(SIAccountUtilMapper.class); + } + @Override public Map getForm(Map params) { - return commandExecutor.execute(new SISchemeGetFormCmd(params, user)); +// return commandExecutor.execute(new SISchemeGetFormCmd(params, user)); + Map apidatas = new HashMap<>(16); + + Long id = null; + if (Objects.nonNull(params.get("id"))) { + id =Long.valueOf(Util.null2String(params.get("id"))); + } + WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum)params.get("welfareTypeEnum"); +// InsuranceSchemeFormVO form = siSchemeBiz.getForm(id, welfareTypeEnum); + InsuranceSchemeFormVO form = getForm(id, welfareTypeEnum); + apidatas.put("form",form); + return apidatas; } @Override public Map insertScheme(Map params) { - return commandExecutor.execute(new SISchemeInsertCmd(params, user)); +// return commandExecutor.execute(new SISchemeInsertCmd(params, user)); + Map apidatas = new HashMap(16); + InsuranceSchemeReqParam insuranceSchemeReqParam = (InsuranceSchemeReqParam) params.get("insuranceSchemeReqParam"); +// siSchemeBiz.save(insuranceSchemeReqParam, (long) user.getUID()); + save(insuranceSchemeReqParam, (long) user.getUID()); + return apidatas; } @Override public Map update(Map params) { - return commandExecutor.execute(new SISchemeUpdateCmd(params, user)); +// return commandExecutor.execute(new SISchemeUpdateCmd(params, user)); + Map apidatas = new HashMap(16); + InsuranceSchemeReqParam insuranceSchemeReqParam = (InsuranceSchemeReqParam) params.get("insuranceSchemeReqParam"); +// siSchemeBiz.update(insuranceSchemeReqParam, (long) user.getUID()); + update(insuranceSchemeReqParam, (long) user.getUID()); + return apidatas; } @Override public Map delete(Map params) { - return commandExecutor.execute(new SISchemeDeleteCmd(params, user)); +// return commandExecutor.execute(new SISchemeDeleteCmd(params, user)); + Map apidatas = new HashMap(16); + Collection ids = (Collection)params.get("ids"); + if (CollectionUtils.isEmpty(ids)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"参数错误")); + } + //校验带上类型 + int welfareTypeId = (Integer) params.get("welfareTypeId"); + if(WelfareTypeEnum.SOCIAL_SECURITY.getValue() == welfareTypeId){ +// int num = siSchemeBiz.checkBeforeDeleteSocialscheme(params); + int num = checkBeforeDeleteSocialscheme(params); + if (num > 0){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该社保方案已被使用")); + } + } + if(WelfareTypeEnum.ACCUMULATION_FUND.getValue() == welfareTypeId){ +// int accumulationfundNum = siSchemeBiz.checkBeforeDeleteAccumulationfund(params); + int accumulationfundNum = checkBeforeDeleteAccumulationfund(params); + if (accumulationfundNum > 0){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该公积金方案已被使用")); + } + } + if(WelfareTypeEnum.OTHER.getValue() == welfareTypeId){ +// int otherschemeNum = siSchemeBiz.checkBeforeDeleteOtherscheme(params); + int otherschemeNum = checkBeforeDeleteOtherscheme(params); + if (otherschemeNum > 0){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该其他福利方案已被使用")); + } + } + +// int billNum = siSchemeBiz.checkBeforeDeleteBill(params,welfareTypeId); + int billNum = checkBeforeDeleteBill(params,welfareTypeId); + if (billNum > 0){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该福利方案已被核算")); + } +// siSchemeBiz.deleteSocialscheme(params); + deleteSocialscheme(params); + + return apidatas; } @Override public Map copyScheme(Map params) { - return commandExecutor.execute(new SISchemeCopyCmd(params, user)); +// return commandExecutor.execute(new SISchemeCopyCmd(params, user)); + Map apidatas = new HashMap(16); + Long id = (Long) params.get("id"); + String schemeName = Util.null2String(params.get("schemeName")); +// siSchemeBiz.copy(id,schemeName,(long) user.getUID()); + copy(id,schemeName,(long) user.getUID()); + return apidatas; } @Override public List queryListByInsuranceIdIsPayment(Long insuranceId, Integer isPayment) { - return new SISchemeBiz().queryListByInsuranceIdIsPayment(insuranceId, isPayment); +// return new SISchemeBiz().queryListByInsuranceIdIsPayment(insuranceId, isPayment); + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + List insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId, isPayment); + encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOList; + } finally { + sqlSession.close(); + } } @Override public Map listPage(Map params) { - return commandExecutor.execute(new SISchemeListCmd(params, user)); +// return commandExecutor.execute(new SISchemeListCmd(params, user)); + SalaryWeaTable table = new SalaryWeaTable<>(user,SISchemeTableVO.class); + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + private String buildSqlWhere(Map params) { + String sqlWhere = "where a.id = b.primary_id and b.insurance_id = c.id and a.delete_Type = 0"; + Integer welfareType = (Integer)params.get("welfareType"); + if (Objects.nonNull(welfareType)){ + sqlWhere += " and a.welfare_type ="+welfareType; + } + return sqlWhere; } @Override @@ -1991,7 +2098,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { schemeDetailList.forEach(f -> { schemeDetailUpdateMap.put(f.getInsuranceId() + "-" + f.getPaymentScope(), f); }); - List schemeDetailPOS = siSchemeBiz.listByPrimaryId(primaryId); +// List schemeDetailPOS = siSchemeBiz.listByPrimaryId(primaryId); + List schemeDetailPOS = listByPrimaryId(primaryId); //替换修改字段 if (schemeDetailPOS.size() > 0) { schemeDetailPOS.forEach(f -> { @@ -2012,5 +2120,423 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } return errorInfo; } + /*****以下代码为SISchemeBiz中逻辑迁移,旨在减少Biz类的使用*****/ + /** + * 获取社保方案 + * + * @param id + * @param welfareTypeEnum + * @return + */ + public InsuranceSchemeFormVO getForm(Long id, WelfareTypeEnum welfareTypeEnum) { + InsuranceSchemeDTO insuranceSchemeDTO = getSchemeFormDTO(welfareTypeEnum, id); + List insuranceSchemeDetailDTOList = getSchemeDetailFormDTO(welfareTypeEnum, id); + return InsuranceSchemeFormVO.builder().schemeBatch(insuranceSchemeDTO).schemeDetailList(insuranceSchemeDetailDTOList).build(); + } + + /** + * 获取方案主表信息 新建|详情 + * + * @param welfareTypeEnum 福利类型 + * @param id 方案主键id + * @return form + */ + private InsuranceSchemeDTO getSchemeFormDTO(WelfareTypeEnum welfareTypeEnum, Long id) { + InsuranceSchemeDTO insuranceSchemeDTO = InsuranceSchemeDTO.builder().paymentType(PaymentTypeEnum.SCHEME_TOWN).welfareType(welfareTypeEnum).build(); + if (id != null) { + InsuranceSchemePO insuranceSchemePO = getById(id); + SalaryAssert.notNull(insuranceSchemePO, SalaryI18nUtil.getI18nLabel(0,"福利方案不存在")); + //BeanUtils.copyProperties(insuranceSchemePO, insuranceSchemeDTO); + insuranceSchemeDTO.setId(insuranceSchemePO.getId()); + insuranceSchemeDTO.setPaymentArea(insuranceSchemePO.getPaymentArea()); + insuranceSchemeDTO.setRemarks(insuranceSchemePO.getRemarks()); + insuranceSchemeDTO.setSchemeName(insuranceSchemePO.getSchemeName()); + insuranceSchemeDTO.setPaymentType(SalaryEnumUtil.enumMatchByValue(insuranceSchemePO.getPaymentType(), PaymentTypeEnum.values(), PaymentTypeEnum.class)); + insuranceSchemeDTO.setWelfareType(welfareTypeEnum); + insuranceSchemeDTO.setSharedType(StringUtils.isBlank(insuranceSchemePO.getSharedType()) ? "0" : insuranceSchemePO.getSharedType()); + insuranceSchemeDTO.setTaxAgentIds(insuranceSchemePO.getTaxAgentIds()); + } + return insuranceSchemeDTO; + } + + /** + * 获取方案明细表集合 新建|详情 + * + * @param welfareTypeEnum 福利类型 + * @param id 方案主键id + * @return form + */ + public List getSchemeDetailFormDTO(WelfareTypeEnum welfareTypeEnum, Long id) { + List insuranceCategoryPOS = listByWelfareType(welfareTypeEnum.getValue()); + List insuranceSchemeDetailDTOList = new ArrayList<>(); + insuranceCategoryPOS.forEach(item -> { + PaymentScopeEnum[] paymentScopeEnums = SalaryEnumUtil.stringToEnums(item.getPaymentScope(), ","); + Arrays.stream(paymentScopeEnums).forEach(e -> { + InsuranceSchemeDetailDTO insuranceSchemeDetailDTO = InsuranceSchemeDetailDTO.builder().build(); + InsuranceSchemeDetailPO insuranceSchemeDetailPO = getByPPI(id, e.getValue(), item.getId()); + if (insuranceSchemeDetailPO == null) { + insuranceSchemeDetailDTO = InsuranceSchemeDetailDTO.builder() + .id((long) (Math.random() * 10000)) + .insuranceId(item.getId()) + .insuranceName(item.getInsuranceName()) + .paymentScope(e.getDefaultLabel()) + .rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue())) + .cycleSetting("000000000000") + .paymentCycle("0") + .accountType("0") + .build(); + if (Objects.equals(item.getDataType(), DataTypeEnum.SYSTEM.getValue())) { + insuranceSchemeDetailDTO.setIsPayment(true); + } else { + insuranceSchemeDetailDTO.setIsPayment(false); + } + } else { + //BeanUtils.copyProperties(insuranceSchemeDetailPO, insuranceSchemeDetailDTO); + insuranceSchemeDetailDTO.setEffectiveTime(insuranceSchemeDetailPO.getEffectiveTime()); + insuranceSchemeDetailDTO.setExpirationTime(insuranceSchemeDetailPO.getExpirationTime()); + insuranceSchemeDetailDTO.setId(insuranceSchemeDetailPO.getId()); + insuranceSchemeDetailDTO.setInsuranceId(insuranceSchemeDetailPO.getInsuranceId()); + insuranceSchemeDetailDTO.setPaymentScopeValue(insuranceSchemeDetailPO.getPaymentScope()); + insuranceSchemeDetailDTO.setPrimaryId(insuranceSchemeDetailPO.getPrimaryId()); + insuranceSchemeDetailDTO.setValidNum(insuranceSchemeDetailPO.getValidNum()); + + if (insuranceSchemeDetailPO.getIsPayment() != null) { + insuranceSchemeDetailDTO.setIsPayment(Objects.equals(insuranceSchemeDetailPO.getIsPayment(), IsPaymentEnum.YES.getValue())); + } + if (insuranceSchemeDetailPO.getPaymentCycle() != null) { + insuranceSchemeDetailDTO.setPaymentCycle(insuranceSchemeDetailPO.getPaymentCycle() + ""); + } else { + insuranceSchemeDetailDTO.setPaymentCycle("0"); + } + if (insuranceSchemeDetailPO.getAccountType() != null) { + insuranceSchemeDetailDTO.setAccountType(insuranceSchemeDetailPO.getAccountType() + ""); + } else { + insuranceSchemeDetailDTO.setAccountType("0"); + } + if (insuranceSchemeDetailPO.getCycleSetting() == null) { + insuranceSchemeDetailDTO.setCycleSetting("000000000000"); + } else { + insuranceSchemeDetailDTO.setCycleSetting(insuranceSchemeDetailPO.getCycleSetting()); + } + if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getUpperLimit())) { + BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getUpperLimit()); + insuranceSchemeDetailDTO.setUpperLimit(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal); + } + if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getLowerLimit())) { + BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getLowerLimit()); + insuranceSchemeDetailDTO.setLowerLimit(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal); + } + if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getPaymentProportion())) { + BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getPaymentProportion()); + insuranceSchemeDetailDTO.setPaymentProportion(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal); + } + if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getFixedCost())) { + BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getFixedCost()); + insuranceSchemeDetailDTO.setFixedCost(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal); + } + insuranceSchemeDetailDTO.setInsuranceName(item.getInsuranceName()); + insuranceSchemeDetailDTO.setRententionRule(String.valueOf(insuranceSchemeDetailPO.getRententionRule())); + insuranceSchemeDetailDTO.setPaymentScope(e.getDefaultLabel()); + + } + insuranceSchemeDetailDTO.setPaymentScopeValue(e.getValue()); + insuranceSchemeDetailDTOList.add(insuranceSchemeDetailDTO); + }); + }); + return insuranceSchemeDetailDTOList; + } + + /** + * 社保方案基础信息主表 + * + * @param id + * @return + */ + public InsuranceSchemePO getById(Long id) { + + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + InsuranceSchemePO insuranceSchemePO = insuranceSchemeMapper.getById(id); + + return insuranceSchemePO; + } finally { + sqlSession.close(); + } + } + + /** + * 根据福利类型获取 + * + * @param welfareType + * @return + */ + public List listByWelfareType(Integer welfareType) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); + List insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType, null); + return insuranceCategoryPOS; + } finally { + sqlSession.close(); + } + } + + public boolean numberCheck(String number) { + return Pattern.compile("^0\\.[0]*").matcher(number).matches(); + } + + private InsuranceSchemeDetailPO getByPPI(Long primaryId, Integer paymentScope, Long insuranceId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailMapper.getByPPI(primaryId, paymentScope, insuranceId); + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPO; + } finally { + sqlSession.close(); + } + } + + /** + * 新增 + * + * @param saveParam + * @param employeeId + */ + public void save(InsuranceSchemeReqParam saveParam, long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + //保存福利项目主表 + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + saveParam.getInsuranceScheme().setSchemeName(StringUtils.trim(saveParam.getInsuranceScheme().getSchemeName())); + List listResult = insuranceSchemeMapper.listByName(saveParam.getInsuranceScheme().getSchemeName()); + SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"该福利名称已经存在,福利名称系统全局唯一")); + + InsuranceSchemePO insuranceSchemePO = InsuranceSchemeBO.convert2BatchPO(saveParam.getInsuranceScheme(), employeeId); + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); + } + } + insuranceSchemeMapper.insert(insuranceSchemePO); + //保存福利项目明细表 + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(saveParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); + encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailMapper::insert); + + sqlSession.commit(); + + } finally { + sqlSession.close(); + } + } + + /** + * 更新 + * + * @param updateParam + * @param employeeId + */ + public void update(InsuranceSchemeReqParam updateParam, long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + + //查询是否存在福利方案 + InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId()); + if (Objects.isNull(insuranceSchemePO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利方案不存在")); + } + //去除入参中方案名称的空格 + updateParam.getInsuranceScheme().setSchemeName(StringUtils.trim(updateParam.getInsuranceScheme().getSchemeName())); + //福利方案名称重复 + List insuranceSchemePOList = insuranceSchemeMapper.listByName(updateParam.getInsuranceScheme().getSchemeName()); + if (CollectionUtils.isNotEmpty(insuranceSchemePOList)) { + boolean repeat = insuranceSchemePOList.stream().anyMatch(item -> !Objects.equals(item.getId(), updateParam.getInsuranceScheme().getId())); + SalaryAssert.isTrue(!repeat, SalaryI18nUtil.getI18nLabel(0,"福利方案名称重复")); + } + + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); + } + } + + //更新福利方案主表 + InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme()); + insuranceSchemeMapper.update(insuranceSchemePO1); + + //更新福利方案明细表 先删后插 + insuranceSchemeDetailMapper.batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId())); + //更新明细表 + List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(updateParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); + encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailMapper::insert); + + //记录操作日志 + + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + public int checkBeforeDeleteSocialscheme(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteSocialscheme((Collection) params.get("ids")).get(0).getNum(); + } + + public int checkBeforeDeleteAccumulationfund(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteAccumulationfund((Collection) params.get("ids")).get(0).getNum(); + } + + public int checkBeforeDeleteOtherscheme(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteOtherscheme((Collection) params.get("ids")).get(0).getNum(); + } + + public int checkBeforeDeleteBill(Map params, Integer welfareTypeId) { + return getSIAccountUtilMapper().checkBeforeDeleteBill((Collection) params.get("ids"), welfareTypeId).get(0).getNum(); + } + + public void deleteSocialscheme(Map params) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + + insuranceSchemeMapper.deleteByIds((Collection) params.get("ids")); + insuranceSchemeDetailMapper.deleteByIds((Collection) params.get("ids")); + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + /** + * 复制方案 + * + * @param id + * @param schemeName + * @param employeeId + */ + public void copy(Long id, String schemeName, long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + //去除入参中方案名称的空格 + schemeName = StringUtils.trim(schemeName); + + List listResult = insuranceSchemeMapper.listByName(schemeName); + SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); + + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + if (Objects.isNull(id)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案id为空")); + } + + if (Objects.isNull(schemeName)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"复制方案名为空")); + } + + InsuranceSchemePO insuranceSchemePO = getById(id); + if (Objects.isNull(insuranceSchemePO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案不存在")); + } + + if (insuranceSchemePO.getSchemeName().equals(schemeName)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); + } + + InsuranceSchemePO batchPO = InsuranceSchemePO.builder() + .creator(employeeId) + .createTime(new Date()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .schemeName(schemeName) + .paymentArea(insuranceSchemePO.getPaymentArea()) + .updateTime(new Date()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .paymentType(insuranceSchemePO.getPaymentType()) + .remarks(insuranceSchemePO.getRemarks()) + .welfareType(insuranceSchemePO.getWelfareType()) + .isUse(insuranceSchemePO.getIsUse()) + .build(); + insuranceSchemeMapper.insert(batchPO); + + List detailList = insuranceSchemeDetailMapper.queryListBySchemeId(id); + detailList = encryptUtil.decryptList(detailList,InsuranceSchemeDetailPO.class); + if (CollectionUtils.isNotEmpty(detailList)) { + List detailPOS = detailList.stream().map(item -> InsuranceSchemeDetailPO.builder() + .creator(employeeId) + .createTime(new Date()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .effectiveTime(item.getEffectiveTime()) + .expirationTime(item.getExpirationTime()) + .fixedCost(item.getFixedCost()) + .insuranceId(item.getInsuranceId()) + .isPayment(item.getIsPayment()) + .lowerLimit(item.getLowerLimit()) + .paymentScope(item.getPaymentScope()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .paymentProportion(item.getPaymentProportion()) + .updateTime(new Date()) + .primaryId(batchPO.getId()) + .rententionRule(item.getRententionRule()) + .upperLimit(item.getUpperLimit()) + .validNum(item.getValidNum()) + .build() + ).collect(Collectors.toList()); + encryptUtil.encryptList(detailPOS, InsuranceSchemeDetailPO.class); + detailPOS.forEach(insuranceSchemeDetailMapper::insert); + } + + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + /** + * 社保方案基础信息明细表 + * + * @param primaryId + * @return + */ + public List listByPrimaryId(Long primaryId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); + List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListBySchemeId(primaryId); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; + } finally { + sqlSession.close(); + } + + } + + /** + * 获取所有方案 + * + * @return + */ + @Override + public List listAll(){ + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); + List insuranceSchemePOList = insuranceSchemeMapper.listAll(); + return insuranceSchemePOList; + } finally { + sqlSession.close(); + } + } + + /*****以上代码为SISchemeBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ } From 6efbd9deb0ca9b05227ea399bbb17a1be8fda8dc Mon Sep 17 00:00:00 2001 From: sy Date: Sun, 4 Feb 2024 15:10:35 +0800 Subject: [PATCH 088/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E9=83=A8=E5=88=86=E6=96=B0=E5=A2=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=ADlabelId=E5=85=A5=E5=8F=82=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA0=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=90=8E?= =?UTF-8?q?=E6=9C=9F=E5=A4=9A=E8=AF=AD=E8=A8=80=E9=80=BB=E8=BE=91=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=97=B6=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AddUpDeductionServiceImpl.java | 6 +++--- .../service/impl/AddUpSituationServiceImpl.java | 6 +++--- .../service/impl/OtherDeductionServiceImpl.java | 6 +++--- .../impl/SalaryAcctEmployeeServiceImpl.java | 8 ++++---- .../service/impl/SalaryAcctExcelServiceImpl.java | 4 ++-- .../impl/SalaryAcctRecordServiceImpl.java | 16 ++++++++-------- .../impl/SalaryAcctResultServiceImpl.java | 8 ++++---- .../service/impl/SalaryItemServiceImpl.java | 12 ++++++------ .../impl/SalarySobCheckRuleServiceImpl.java | 8 ++++---- .../service/impl/SalarySobItemServiceImpl.java | 4 ++-- .../service/impl/SalarySobRangeServiceImpl.java | 4 ++-- .../service/impl/SysSalaryItemServiceImpl.java | 4 ++-- 12 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index ee208bf2d..4c3eef869 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -445,10 +445,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction if (CollectionUtils.isNotEmpty(saveList)) { LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); loggerContext.setNewValueList(saveList); SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index ecc029dbb..bbeb0506b 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -876,10 +876,10 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation if (CollectionUtils.isNotEmpty(saveList)) { LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100351, "新增累计专项附加扣除")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); loggerContext.setNewValueList(saveList); SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index e8cd2de13..b831a5463 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -424,10 +424,10 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction if (CollectionUtils.isNotEmpty(saveList)) { LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 100351, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 100351, "新增计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 100351, "新增累计专项附加扣除")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除")); loggerContext.setNewValueList(saveList); SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index e87ab0f2e..fa43ef846 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -421,8 +421,8 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "添加薪资核算人员") + ":" + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "添加薪资核算人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "添加薪资核算人员") + ":" + targetName); loggerContext.setNewValueList(salaryAcctEmployeePOS); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @@ -488,8 +488,8 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98835, "删除薪资核算人员") + ":" + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资核算人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资核算人员") + ":" + targetName); loggerContext.setOldValueList(salaryAcctEmployeePOS); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 3ce380565..964837f26 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -255,8 +255,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98837, "导出环比增加人员") + ":" + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导出环比增加人员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导出环比增加人员") + ":" + targetName); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); return ExcelUtilPlus.genWorkbookV2(rows, sheetName); diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index c13e6ca71..dfc42d16c 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -304,8 +304,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98768, "新建薪资核算") + ": " + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资核算") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); // 返回薪资核算记录id @@ -538,8 +538,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98821, "删除薪资核算") + ":" + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资核算") + ":" + targetName); loggerContext.setNewValues(salaryAcctRecordPO); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); }); @@ -580,8 +580,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98817, "薪资核算归档") + ": " + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "薪资核算归档")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "薪资核算归档") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @@ -630,8 +630,8 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId("" + salaryAcctRecordPO.getId()); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98820, "重新核算")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98820, "重新核算") + ": " + targetName); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "重新核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "重新核算") + ": " + targetName); loggerContext.setNewValues(salaryAcctRecordPO); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 6117667a3..fb441a434 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -661,8 +661,8 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId(String.valueOf(salaryAcctEmployeePO.getSalaryAcctRecordId())); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "编辑薪资核算结果") + ": " + operateDesc); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资核算结果") + ": " + operateDesc); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资核算结果") + ": " + operateDesc); loggerContext.setNewValueList(Lists.newArrayList(salaryAcctResultPOS)); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } @@ -866,8 +866,8 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe loggerContext.setTargetId(String.valueOf(calculateParam.getSalaryAcctRecordId())); loggerContext.setTargetName(targetName); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(95783, "薪资核算")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "薪资核算")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "薪资核算")); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); } catch (Exception e) { log.info("薪资核算出错:{}", e.getMessage(), e); diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index c43393c10..e18e8569a 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -210,8 +210,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); loggerContext.setTargetName(salaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98329, "新建薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目") + ": " + salaryItemPO.getName()); loggerContext.setNewValues(salaryItemPO); SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); } @@ -293,8 +293,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); loggerContext.setTargetName(newSalaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93892, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); loggerContext.setOldValues(salaryItemPO); loggerContext.setNewValues(newSalaryItemPO); SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); @@ -358,8 +358,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); loggerContext.setTargetName(salaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98323, "删除薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目") + ": " + salaryItemPO.getName()); loggerContext.setOldValues(salaryItemPO); SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); }); diff --git a/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java index 7d22fe009..103b62de8 100644 --- a/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobCheckRuleServiceImpl.java @@ -136,8 +136,8 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC loggerContext.setTargetId("" + salarySobPO.getId()); loggerContext.setTargetName(salarySobPO.getName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93870, "编辑校验规则") + ": " + newSalarySobCheckRulePO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑校验规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑校验规则") + ": " + newSalarySobCheckRulePO.getName()); loggerContext.setOldValues(salarySobCheckRulePO); loggerContext.setNewValues(newSalarySobCheckRulePO); SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); @@ -185,8 +185,8 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC loggerContext.setTargetId("" + salarySobPO.getId()); loggerContext.setTargetName(salarySobPO.getName()); loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98646, "删除校验规则") + ": " + salarySobCheckRulePO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除校验规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除校验规则") + ": " + salarySobCheckRulePO.getName()); loggerContext.setOldValues(salarySobCheckRulePO); SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); }); diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 216e6499e..8a90a0049 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -270,8 +270,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe loggerContext.setTargetId("" + salarySob.getId()); loggerContext.setTargetName(salarySob.getName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98613, "编辑薪资账套薪资项目")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套薪资项目")); SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index 0e30a3fd9..232b17e96 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -186,7 +186,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange } //记录日志 String operateTypeName = Objects.equals(saveParam.getIncludeType(), 1) ? - SalaryI18nUtil.getI18nLabel(98601, "关联人员范围新增对象") : SalaryI18nUtil.getI18nLabel(98602, "从范围中排除新增对象"); + SalaryI18nUtil.getI18nLabel(0, "关联人员范围新增对象") : SalaryI18nUtil.getI18nLabel(0, "从范围中排除新增对象"); LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setTargetId("" + salarySobPO.getId()); @@ -215,7 +215,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange Integer includeType = salarySobRangePOS.get(0).getIncludeType(); //记录日志 String operateTypeName = Objects.equals(includeType, 1) ? - SalaryI18nUtil.getI18nLabel(98605, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(98606, "从范围中排除删除对象"); + SalaryI18nUtil.getI18nLabel(0, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(0, "从范围中排除删除对象"); salarySobPOS.forEach(salarySobPO -> { LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); diff --git a/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java index 18f1500ab..883c886dd 100644 --- a/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SysSalaryItemServiceImpl.java @@ -98,8 +98,8 @@ public class SysSalaryItemServiceImpl extends Service implements SysSalaryItemSe loggerContext.setTargetId(String.valueOf(sysSalaryItemPO.getId())); loggerContext.setTargetName(sysSalaryItemPO.getName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(93891, "添加系统薪资项目") + ": " + sysSalaryItemPO.getName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "添加系统薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "添加系统薪资项目") + ": " + sysSalaryItemPO.getName()); loggerContext.setNewValues(sysSalaryItemPO); SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); }); From 133933e2879c017e23a5a6bcb848608a76596eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 5 Feb 2024 14:04:47 +0800 Subject: [PATCH 089/169] =?UTF-8?q?=E4=BF=AE=E6=94=B9sqlserver=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=8F=92=E5=85=A5=E5=92=8Coracle=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/elog/ElogTableCheckerMapper.xml | 8 ++++---- .../mapper/elog/LocalElogAopDaoMapper.xml | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml index 03e4028ea..71b2cd9e6 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -258,10 +258,10 @@ tablenamedesc varchar2(50), fieldName varchar2(200), fieldnamelabelid varchar2(200), - newValue varchar2(4000), - oldValue varchar2(4000), - newrealvalue varchar2(4000), - oldrealvalue varchar2(4000), + newValue CLOB, + oldValue CLOB, + newrealvalue CLOB, + oldrealvalue CLOB, fieldDesc varchar2(200), showorder number(*,0) default 0, isdetail number(*,0) default 0 diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml index 41e8003ef..81eb589f2 100644 --- a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml +++ b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml @@ -78,6 +78,26 @@ + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + VALUES + ( + #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} + ) + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, From 5783342b01be4116c5c8fcb8541b1d19f270c460 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 5 Feb 2024 14:06:52 +0800 Subject: [PATCH 090/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=EF=BC=8C=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E3=80=81=E5=A4=8D=E5=88=B6=E3=80=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sicategory/dto/ICategoryListDTO.java | 2 +- .../sischeme/po/InsuranceSchemeDetailPO.java | 23 ++ .../entity/sischeme/po/InsuranceSchemePO.java | 16 + .../sischeme/InsuranceSchemeDetailMapper.java | 2 + .../sischeme/InsuranceSchemeDetailMapper.xml | 12 + .../sischeme/InsuranceSchemeMapper.java | 2 + .../mapper/sischeme/InsuranceSchemeMapper.xml | 11 + .../service/impl/SICategoryServiceImpl.java | 2 + .../service/impl/SISchemeServiceImpl.java | 290 ++++++++++++------ 9 files changed, 258 insertions(+), 102 deletions(-) diff --git a/src/com/engine/salary/entity/sicategory/dto/ICategoryListDTO.java b/src/com/engine/salary/entity/sicategory/dto/ICategoryListDTO.java index 5fc4a6cd1..238d4ec13 100644 --- a/src/com/engine/salary/entity/sicategory/dto/ICategoryListDTO.java +++ b/src/com/engine/salary/entity/sicategory/dto/ICategoryListDTO.java @@ -49,7 +49,7 @@ public class ICategoryListDTO { @SalaryTableColumn(column = "payment_scope", width = "30%", text = "缴纳对象",transmethod = "com.engine.salary.transmethod.ICategoryTransMethod.getPaymentcopeTypeName") - @TableTitle(title = "缴纳对象",dataIndex = "paymentScopt",key = "paymentScopt") + @TableTitle(title = "缴纳对象",dataIndex = "paymentScope",key = "paymentScope") private String paymentScope; private String paymentScopeSpan; diff --git a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemeDetailPO.java b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemeDetailPO.java index a65ce19d7..3d4200f65 100644 --- a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemeDetailPO.java +++ b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemeDetailPO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.sischeme.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -20,114 +21,136 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_scheme_detail +@ElogTransform(name = "福利方案明细") public class InsuranceSchemeDetailPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 社保方案主表id */ + @ElogTransform(name = "方案主表id") private Long primaryId; /** * 险种id */ + @ElogTransform(name = "福利项id") private Long insuranceId; /** * 生效年月(含) */ + @ElogTransform(name = "生效年月") private String effectiveTime; /** * 失效年月(不含) */ + @ElogTransform(name = "失效年月") private String expirationTime; /** * 是否缴费 0-否 1-是 */ + @ElogTransform(name = "是否缴费") private Integer isPayment; /** * 缴纳对象 */ + @ElogTransform(name = "缴纳对象") private Integer paymentScope; /** * 基数上限 */ @Encrypt + @ElogTransform(name = "基数上限") private String upperLimit; /** * 基数下限 */ @Encrypt + @ElogTransform(name = "基数下限") private String lowerLimit; /** * 缴纳比例 */ + @ElogTransform(name = "缴纳比例") private String paymentProportion; /** * 固定费用 */ @Encrypt + @ElogTransform(name = "固定费用") private String fixedCost; /** * 有效小数位 */ + @ElogTransform(name = "有效小数位") private Integer validNum; /** * 进位规则 */ + @ElogTransform(name = "进位规则") private Integer rententionRule; /** * 缴纳周期,0不进行周期缴纳,1进行周期缴纳 */ + @ElogTransform(name = "是否周期缴纳") private Integer paymentCycle; /** * 核算方式 */ + @ElogTransform(name = "核算方式") private Integer accountType; /** * 缴纳周期规则设置 */ + @ElogTransform(name = "缴纳周期规则设置") private String cycleSetting; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; } diff --git a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java index cf97a990f..8cdcc7f6c 100644 --- a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java +++ b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.sischeme.po; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.sicategory.SharedTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -20,31 +21,37 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_social_security_scheme +@ElogTransform(name = "福利方案") public class InsuranceSchemePO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 缴纳地区 */ + @ElogTransform(name = "缴纳地区") private String paymentArea; /** * 方案名称 */ + @ElogTransform(name = "方案名称") private String schemeName; /** * 缴纳类型 */ + @ElogTransform(name = "缴纳类型") private Integer paymentType; /** * 福利类型 */ + @ElogTransform(name = "福利类型") private Integer welfareType; /** @@ -52,46 +59,55 @@ public class InsuranceSchemePO { * * @see SharedTypeEnum */ + @ElogTransform(name = "共享权限") private String sharedType; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人") private String taxAgentIds; /** * 是否启用 0-停用 1-启用 */ + @ElogTransform(name = "是否启用") private Integer isUse; /** * 备注 */ + @ElogTransform(name = "备注") private String remarks; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; } diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.java b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.java index 52c98c89d..9af378c42 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.java +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.java @@ -74,6 +74,8 @@ public interface InsuranceSchemeDetailMapper { List listAll(); + List listBySchemeIds(@Param("schemeIds")Collection schemeIds); + int batchUpdate(@Param("collection") List insuranceSchemeDetailPos); int updateAll(InsuranceSchemeDetailPO insuranceSchemeDetailPo); diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml index dba56d9b9..d4b15075f 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml @@ -270,6 +270,18 @@ WHERE delete_type = 0 + + update hrsa_scheme_detail diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.java b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.java index 7403a8511..11cbfd0b2 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.java +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.java @@ -51,6 +51,8 @@ public interface InsuranceSchemeMapper { */ List listAll(); + List listBySchemeIds(@Param("schemeIds")Collection schemeIds); + /** * 获取名称 diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml index d6a671a92..d70a73724 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml @@ -87,6 +87,17 @@ ORDER BY id DESC + listResult = insuranceSchemeMapper.listByName(saveParam.getInsuranceScheme().getSchemeName()); - SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"该福利名称已经存在,福利名称系统全局唯一")); - InsuranceSchemePO insuranceSchemePO = InsuranceSchemeBO.convert2BatchPO(saveParam.getInsuranceScheme(), employeeId); - if (insuranceSchemePO.getSharedType() == null) { - insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); - } else { - if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); - } + //保存福利项目主表 + saveParam.getInsuranceScheme().setSchemeName(StringUtils.trim(saveParam.getInsuranceScheme().getSchemeName())); + List listResult = getInsuranceSchemeMapper().listByName(saveParam.getInsuranceScheme().getSchemeName()); + SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"该福利名称已经存在,福利名称系统全局唯一")); + + InsuranceSchemePO insuranceSchemePO = InsuranceSchemeBO.convert2BatchPO(saveParam.getInsuranceScheme(), employeeId); + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); } - insuranceSchemeMapper.insert(insuranceSchemePO); - //保存福利项目明细表 - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(saveParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); - encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailMapper::insert); - - sqlSession.commit(); - - } finally { - sqlSession.close(); } + getInsuranceSchemeMapper().insert(insuranceSchemePO); + //记录操作日志 + List schemePOList = getInsuranceSchemeMapper().listByName(insuranceSchemePO.getSchemeName()); + InsuranceSchemePO targetPO = new InsuranceSchemePO(); + if (schemePOList != null && schemePOList.size() > 0) { + targetPO = schemePOList.get(0); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(targetPO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建福利方案")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建福利方案") + ": " + targetPO.getSchemeName()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + } + //保存福利项目明细表 + List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(saveParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); + //加密入库 + encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); + //记录操作日志 + if (insuranceSchemeDetailPOS.size() > 0) { + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + List allCategoryList = getICategoryMapper().listAll(); + Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); + + InsuranceSchemePO finalTargetPO = targetPO; + insuranceSchemeDetailPOS.forEach(schemeDetailPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(finalTargetPO.getId())); + loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建福利方案明细")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建福利方案明细") + ": " + + categoryNameMap.get(schemeDetailPO.getInsuranceId()) + + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); + loggerContext.setNewValues(schemeDetailPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + }); + } + } /** @@ -2406,17 +2439,49 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } public void deleteSocialscheme(Map params) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - insuranceSchemeMapper.deleteByIds((Collection) params.get("ids")); - insuranceSchemeDetailMapper.deleteByIds((Collection) params.get("ids")); - sqlSession.commit(); - } finally { - sqlSession.close(); + Collection schemeIds = (Collection) params.get("ids"); + List targetPoList = getInsuranceSchemeMapper().listBySchemeIds(schemeIds); + List targetDetailPoList = getInsuranceSchemeDetailMapper().listBySchemeIds(schemeIds); + getInsuranceSchemeMapper().deleteByIds(schemeIds); + getInsuranceSchemeDetailMapper().deleteByIds(schemeIds); + + //记录操作日志 + if (targetPoList.size() > 0) { + targetPoList.forEach(targetPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(targetPO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利方案") + ": " + targetPO.getSchemeName()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + }); } + if (targetDetailPoList.size() > 0) { + List allCategoryList = getICategoryMapper().listAll(); + Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); + Map> targetDetailMap = targetDetailPoList.stream() + .collect(Collectors.groupingBy(InsuranceSchemeDetailPO::getPrimaryId)); + targetDetailMap.forEach((k, v) -> { + v.forEach(schemeDetailPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(k)); + loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案明细")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利方案明细") + ": " + + categoryNameMap.get(schemeDetailPO.getInsuranceId()) + + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); + loggerContext.setNewValues(schemeDetailPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + }); + }); + } + } /** @@ -2427,79 +2492,102 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @param employeeId */ public void copy(Long id, String schemeName, long employeeId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - //去除入参中方案名称的空格 - schemeName = StringUtils.trim(schemeName); - - List listResult = insuranceSchemeMapper.listByName(schemeName); - SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); - - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - if (Objects.isNull(id)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案id为空")); - } - - if (Objects.isNull(schemeName)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"复制方案名为空")); - } - - InsuranceSchemePO insuranceSchemePO = getById(id); - if (Objects.isNull(insuranceSchemePO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案不存在")); - } - - if (insuranceSchemePO.getSchemeName().equals(schemeName)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); - } - - InsuranceSchemePO batchPO = InsuranceSchemePO.builder() + //去除入参中方案名称的空格 + schemeName = StringUtils.trim(schemeName); + List listResult = getInsuranceSchemeMapper().listByName(schemeName); + SalaryAssert.isEmpty(listResult, SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); + if (Objects.isNull(id)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案id为空")); + } + if (Objects.isNull(schemeName)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"复制方案名为空")); + } + InsuranceSchemePO insuranceSchemePO = getById(id); + if (Objects.isNull(insuranceSchemePO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案不存在")); + } + if (insuranceSchemePO.getSchemeName().equals(schemeName)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案名称重复")); + } + InsuranceSchemePO batchPO = InsuranceSchemePO.builder() + .creator(employeeId) + .createTime(new Date()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .schemeName(schemeName) + .paymentArea(insuranceSchemePO.getPaymentArea()) + .updateTime(new Date()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .paymentType(insuranceSchemePO.getPaymentType()) + .remarks(insuranceSchemePO.getRemarks()) + .welfareType(insuranceSchemePO.getWelfareType()) + .isUse(insuranceSchemePO.getIsUse()) + .build(); + getInsuranceSchemeMapper().insert(batchPO); + //记录操作日志 + List schemePOList = getInsuranceSchemeMapper().listByName(insuranceSchemePO.getSchemeName()); + InsuranceSchemePO targetPO = new InsuranceSchemePO(); + if (schemePOList != null && schemePOList.size() > 0) { + targetPO = schemePOList.get(0); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(targetPO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制福利方案")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "复制(新建)福利方案") + ": " + targetPO.getSchemeName()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + } + List detailList = getInsuranceSchemeDetailMapper().queryListBySchemeId(id); + detailList = encryptUtil.decryptList(detailList,InsuranceSchemeDetailPO.class); + if (CollectionUtils.isNotEmpty(detailList)) { + List detailPOS = detailList.stream().map(item -> InsuranceSchemeDetailPO.builder() .creator(employeeId) .createTime(new Date()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .schemeName(schemeName) - .paymentArea(insuranceSchemePO.getPaymentArea()) - .updateTime(new Date()) .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .paymentType(insuranceSchemePO.getPaymentType()) - .remarks(insuranceSchemePO.getRemarks()) - .welfareType(insuranceSchemePO.getWelfareType()) - .isUse(insuranceSchemePO.getIsUse()) - .build(); - insuranceSchemeMapper.insert(batchPO); + .effectiveTime(item.getEffectiveTime()) + .expirationTime(item.getExpirationTime()) + .fixedCost(item.getFixedCost()) + .insuranceId(item.getInsuranceId()) + .isPayment(item.getIsPayment()) + .lowerLimit(item.getLowerLimit()) + .paymentScope(item.getPaymentScope()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .paymentProportion(item.getPaymentProportion()) + .updateTime(new Date()) + .primaryId(batchPO.getId()) + .rententionRule(item.getRententionRule()) + .upperLimit(item.getUpperLimit()) + .validNum(item.getValidNum()) + .build() + ).collect(Collectors.toList()); - List detailList = insuranceSchemeDetailMapper.queryListBySchemeId(id); - detailList = encryptUtil.decryptList(detailList,InsuranceSchemeDetailPO.class); - if (CollectionUtils.isNotEmpty(detailList)) { - List detailPOS = detailList.stream().map(item -> InsuranceSchemeDetailPO.builder() - .creator(employeeId) - .createTime(new Date()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .effectiveTime(item.getEffectiveTime()) - .expirationTime(item.getExpirationTime()) - .fixedCost(item.getFixedCost()) - .insuranceId(item.getInsuranceId()) - .isPayment(item.getIsPayment()) - .lowerLimit(item.getLowerLimit()) - .paymentScope(item.getPaymentScope()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .paymentProportion(item.getPaymentProportion()) - .updateTime(new Date()) - .primaryId(batchPO.getId()) - .rententionRule(item.getRententionRule()) - .upperLimit(item.getUpperLimit()) - .validNum(item.getValidNum()) - .build() - ).collect(Collectors.toList()); - encryptUtil.encryptList(detailPOS, InsuranceSchemeDetailPO.class); - detailPOS.forEach(insuranceSchemeDetailMapper::insert); + //加密入库 + encryptUtil.encryptList(detailPOS, InsuranceSchemeDetailPO.class); + detailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); + //记录操作日志 + if (detailPOS.size() > 0) { + encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); + List allCategoryList = getICategoryMapper().listAll(); + Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); + + InsuranceSchemePO finalTargetPO = targetPO; + detailPOS.forEach(schemeDetailPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(finalTargetPO.getId())); + loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制福利方案明细")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "复制(新建)福利方案明细") + ": " + + categoryNameMap.get(schemeDetailPO.getInsuranceId()) + + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); + loggerContext.setNewValues(schemeDetailPO); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + }); } - - sqlSession.commit(); - } finally { - sqlSession.close(); } + } /** From 1c252b79da1ba8300695659c11e62c4b4064ac7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 5 Feb 2024 14:34:16 +0800 Subject: [PATCH 091/169] =?UTF-8?q?sqlserver=E5=AD=97=E6=AE=B5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=94=B9=E6=88=90nvarchar(max)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/mapper/elog/ElogTableCheckerMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml index 71b2cd9e6..efffc05ab 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -285,10 +285,10 @@ tablenamedesc nvarchar(50), fieldName nvarchar(200), fieldnamelabelid nvarchar(200), - newValue ntext, - oldValue ntext, - newrealvalue ntext, - oldrealvalue ntext, + newValue nvarchar(max), + oldValue nvarchar(max), + newrealvalue nvarchar(max), + oldrealvalue nvarchar(max), fieldDesc varchar(200), showorder bigint default 0, isdetail bigint default 0 From 395d3f567f1f9808b33a67f83350e54a98964aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 5 Feb 2024 14:48:29 +0800 Subject: [PATCH 092/169] =?UTF-8?q?sqlserver=E5=AD=97=E6=AE=B5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=94=B9=E6=88=90nvarchar(max)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml index efffc05ab..3581e1039 100644 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml @@ -122,7 +122,7 @@ operatetype nvarchar(50), operatetypename nvarchar(100), operatedesc nvarchar(3000), - params ntext, + params nvarchar(max), belongmainid nvarchar(36), clientip nvarchar(200), groupid nvarchar(50), From 1c61c0004d209746bfb710615525fb22e94f9551 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 5 Feb 2024 15:04:39 +0800 Subject: [PATCH 093/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=EF=BC=8C=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E7=BC=96=E8=BE=91=E5=B9=B6=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E4=B8=BB=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SISchemeServiceImpl.java | 92 ++++++++++--------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index cf93763f7..22e584b4f 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -13,7 +13,7 @@ import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; -import com.engine.salary.entity.salaryitem.po.SalaryItemPO; +import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.SIArchiveImportParam; import com.engine.salary.entity.siarchives.po.*; @@ -2376,50 +2376,54 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @param employeeId */ public void update(InsuranceSchemeReqParam updateParam, long employeeId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - - //查询是否存在福利方案 - InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId()); - if (Objects.isNull(insuranceSchemePO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利方案不存在")); - } - //去除入参中方案名称的空格 - updateParam.getInsuranceScheme().setSchemeName(StringUtils.trim(updateParam.getInsuranceScheme().getSchemeName())); - //福利方案名称重复 - List insuranceSchemePOList = insuranceSchemeMapper.listByName(updateParam.getInsuranceScheme().getSchemeName()); - if (CollectionUtils.isNotEmpty(insuranceSchemePOList)) { - boolean repeat = insuranceSchemePOList.stream().anyMatch(item -> !Objects.equals(item.getId(), updateParam.getInsuranceScheme().getId())); - SalaryAssert.isTrue(!repeat, SalaryI18nUtil.getI18nLabel(0,"福利方案名称重复")); - } - - if (insuranceSchemePO.getSharedType() == null) { - insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); - } else { - if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); - } - } - - //更新福利方案主表 - InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme()); - insuranceSchemeMapper.update(insuranceSchemePO1); - - //更新福利方案明细表 先删后插 - insuranceSchemeDetailMapper.batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId())); - //更新明细表 - List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(updateParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); - encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailMapper::insert); - - //记录操作日志 - - sqlSession.commit(); - } finally { - sqlSession.close(); + //查询是否存在福利方案 + InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId()); + if (Objects.isNull(insuranceSchemePO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利方案不存在")); } + //去除入参中方案名称的空格 + updateParam.getInsuranceScheme().setSchemeName(StringUtils.trim(updateParam.getInsuranceScheme().getSchemeName())); + //福利方案名称重复 + List insuranceSchemePOList = getInsuranceSchemeMapper().listByName(updateParam.getInsuranceScheme().getSchemeName()); + if (CollectionUtils.isNotEmpty(insuranceSchemePOList)) { + boolean repeat = insuranceSchemePOList.stream().anyMatch(item -> !Objects.equals(item.getId(), updateParam.getInsuranceScheme().getId())); + SalaryAssert.isTrue(!repeat, SalaryI18nUtil.getI18nLabel(0,"福利方案名称重复")); + } + + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); + } + } + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(insuranceSchemePO.getId().toString()); + loggerContext.setTargetName(insuranceSchemePO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利方案保存")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案保存") + ": " + insuranceSchemePO.getSchemeName()); + loggerContext.setOldValues(insuranceSchemePO); + //更新福利方案主表 + InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme()); + getInsuranceSchemeMapper().update(insuranceSchemePO1); + //记录操作日志 + loggerContext.setNewValues(insuranceSchemePO1); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); + List oldInsuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(updateParam.getInsuranceScheme().getId()); + encryptUtil.decryptList(oldInsuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + + //更新福利方案明细表 先删后插 + getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId())); + //更新明细表 + List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(updateParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); + encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); + //记录操作日志, todo + + } public int checkBeforeDeleteSocialscheme(Map params) { From 405fe226d992c06a9ddbdd3667720b841e37a3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 5 Feb 2024 16:33:43 +0800 Subject: [PATCH 094/169] =?UTF-8?q?=E5=88=A0=E9=99=A4elog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/salary/web/LoggerTableController.java | 15 - .../engine/salary/elog/annotation/Elog.java | 23 - .../elog/annotation/ElogDetailField.java | 14 - .../elog/annotation/ElogDetailTable.java | 13 - .../salary/elog/annotation/ElogField.java | 23 - .../elog/annotation/ElogPrimaryKey.java | 9 - .../salary/elog/annotation/ElogTable.java | 16 - .../salary/elog/annotation/ElogTransform.java | 29 - .../salary/elog/annotation/HandleElog.java | 17 - .../salary/elog/annotation/LoggerTarget.java | 22 - .../salary/elog/annotation/OperateType.java | 15 - .../elog/annotation/handle/ElogHandler.java | 177 -- .../annotation/handle/ElogTableScanner.java | 156 -- .../handle/LoggerTargetHandler.java | 38 - .../elog/async/LoggerMessageListener.java | 30 - .../engine/salary/elog/config/ELogCache.java | 25 - .../salary/elog/config/ELogTableChecker.java | 44 - .../salary/elog/entity/dto/CancelContext.java | 25 - .../salary/elog/entity/dto/DataTypeEnum.java | 16 - .../salary/elog/entity/dto/ElogBean.java | 116 -- .../elog/entity/dto/FilterConditionDto.java | 91 -- .../engine/salary/elog/entity/dto/Like.java | 31 - .../salary/elog/entity/dto/LoggerContext.java | 890 ---------- .../elog/entity/dto/LoggerDetailContext.java | 316 ---- .../elog/entity/dto/ReadInfoEntity.java | 40 - .../salary/elog/entity/dto/RedoContext.java | 24 - .../salary/elog/entity/dto/ShowColumsDto.java | 105 -- .../elog/entity/dto/TableChangeBean.java | 153 -- .../elog/entity/dto/TableColumnBean.java | 155 -- .../elog/entity/param/ELogGetLogParam.java | 35 - .../entity/param/GetDetailChangesParam.java | 29 - .../engine/salary/elog/enums/ElogConsts.java | 22 - .../salary/elog/enums/FromTerminalType.java | 48 - .../engine/salary/elog/enums/LinkType.java | 173 -- .../salary/elog/enums/OperateAuditType.java | 14 - .../elog/service/ILocalElogService.java | 13 - .../elog/service/ILoggerTableService.java | 41 - .../elog/service/impl/LocalElogService.java | 435 ----- .../elog/service/impl/LoggerTableService.java | 1454 ----------------- .../elog/threadlocal/ElogThreadLocal.java | 75 - .../salary/elog/util/ElogServiceUtils.java | 92 -- .../elog/util/ElogSeviceSwitchUtils.java | 1402 ---------------- .../salary/elog/util/ElogSeviceUtils.java | 528 ------ .../engine/salary/elog/util/ElogUtils.java | 713 -------- .../engine/salary/elog/util/FieldNameMap.java | 94 -- .../salary/elog/util/LoggerTemplate.java | 630 ------- .../elog/util/LoggerTemplateBuilder.java | 21 - .../elog/web/LoggerTableController.java | 200 --- .../mapper/elog/ElogTableCheckerMapper.java | 30 - .../mapper/elog/ElogTableCheckerMapper.xml | 451 ----- .../mapper/elog/LocalElogAopDaoMapper.java | 45 - .../mapper/elog/LocalElogAopDaoMapper.xml | 170 -- .../mapper/elog/LocalElogDaoMapper.java | 219 --- .../salary/mapper/elog/LocalElogDaoMapper.xml | 412 ----- .../mapper/elog/QueryCurretValusMapper.java | 8 - .../mapper/elog/QueryCurretValusMapper.xml | 9 - 56 files changed, 9991 deletions(-) delete mode 100644 src/com/api/salary/web/LoggerTableController.java delete mode 100644 src/com/engine/salary/elog/annotation/Elog.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogDetailField.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogDetailTable.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogField.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogPrimaryKey.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogTable.java delete mode 100644 src/com/engine/salary/elog/annotation/ElogTransform.java delete mode 100644 src/com/engine/salary/elog/annotation/HandleElog.java delete mode 100644 src/com/engine/salary/elog/annotation/LoggerTarget.java delete mode 100644 src/com/engine/salary/elog/annotation/OperateType.java delete mode 100644 src/com/engine/salary/elog/annotation/handle/ElogHandler.java delete mode 100644 src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java delete mode 100644 src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java delete mode 100644 src/com/engine/salary/elog/async/LoggerMessageListener.java delete mode 100644 src/com/engine/salary/elog/config/ELogCache.java delete mode 100644 src/com/engine/salary/elog/config/ELogTableChecker.java delete mode 100644 src/com/engine/salary/elog/entity/dto/CancelContext.java delete mode 100644 src/com/engine/salary/elog/entity/dto/DataTypeEnum.java delete mode 100644 src/com/engine/salary/elog/entity/dto/ElogBean.java delete mode 100644 src/com/engine/salary/elog/entity/dto/FilterConditionDto.java delete mode 100644 src/com/engine/salary/elog/entity/dto/Like.java delete mode 100644 src/com/engine/salary/elog/entity/dto/LoggerContext.java delete mode 100644 src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java delete mode 100644 src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java delete mode 100644 src/com/engine/salary/elog/entity/dto/RedoContext.java delete mode 100644 src/com/engine/salary/elog/entity/dto/ShowColumsDto.java delete mode 100644 src/com/engine/salary/elog/entity/dto/TableChangeBean.java delete mode 100644 src/com/engine/salary/elog/entity/dto/TableColumnBean.java delete mode 100644 src/com/engine/salary/elog/entity/param/ELogGetLogParam.java delete mode 100644 src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java delete mode 100644 src/com/engine/salary/elog/enums/ElogConsts.java delete mode 100644 src/com/engine/salary/elog/enums/FromTerminalType.java delete mode 100644 src/com/engine/salary/elog/enums/LinkType.java delete mode 100644 src/com/engine/salary/elog/enums/OperateAuditType.java delete mode 100644 src/com/engine/salary/elog/service/ILocalElogService.java delete mode 100644 src/com/engine/salary/elog/service/ILoggerTableService.java delete mode 100644 src/com/engine/salary/elog/service/impl/LocalElogService.java delete mode 100644 src/com/engine/salary/elog/service/impl/LoggerTableService.java delete mode 100644 src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java delete mode 100644 src/com/engine/salary/elog/util/ElogServiceUtils.java delete mode 100644 src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java delete mode 100644 src/com/engine/salary/elog/util/ElogSeviceUtils.java delete mode 100644 src/com/engine/salary/elog/util/ElogUtils.java delete mode 100644 src/com/engine/salary/elog/util/FieldNameMap.java delete mode 100644 src/com/engine/salary/elog/util/LoggerTemplate.java delete mode 100644 src/com/engine/salary/elog/util/LoggerTemplateBuilder.java delete mode 100644 src/com/engine/salary/elog/web/LoggerTableController.java delete mode 100644 src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java delete mode 100644 src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml delete mode 100644 src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java delete mode 100644 src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml delete mode 100644 src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java delete mode 100644 src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml delete mode 100644 src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java delete mode 100644 src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml diff --git a/src/com/api/salary/web/LoggerTableController.java b/src/com/api/salary/web/LoggerTableController.java deleted file mode 100644 index ddf2b4f41..000000000 --- a/src/com/api/salary/web/LoggerTableController.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.api.salary.web; - -import javax.ws.rs.Path; - -/** - * 日志列表公共接口暴漏 - *

Copyright: Copyright (c) 2023

- *

Company: 泛微软件

- * - * @author qiantao - * @version 1.0 - **/ -@Path("/bs/hrmsalary/elog") -public class LoggerTableController extends com.engine.salary.elog.web.LoggerTableController{ -} diff --git a/src/com/engine/salary/elog/annotation/Elog.java b/src/com/engine/salary/elog/annotation/Elog.java deleted file mode 100644 index 7e00ca25e..000000000 --- a/src/com/engine/salary/elog/annotation/Elog.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface Elog { - - String module(); - - String function(); - - String operateType(); - - String operateTypeName(); - - String sql() default ""; - - boolean isLocal() default true; - - String infoMethod() default ""; -} diff --git a/src/com/engine/salary/elog/annotation/ElogDetailField.java b/src/com/engine/salary/elog/annotation/ElogDetailField.java deleted file mode 100644 index 129c57da8..000000000 --- a/src/com/engine/salary/elog/annotation/ElogDetailField.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD}) -public @interface ElogDetailField { - - String fieldType() default "varchar"; - String length() default "50"; - String fieldName(); - String desc() default "自定义字段"; -} diff --git a/src/com/engine/salary/elog/annotation/ElogDetailTable.java b/src/com/engine/salary/elog/annotation/ElogDetailTable.java deleted file mode 100644 index d5054b7c1..000000000 --- a/src/com/engine/salary/elog/annotation/ElogDetailTable.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface ElogDetailTable { - - String module(); - - String function() default "common"; -} diff --git a/src/com/engine/salary/elog/annotation/ElogField.java b/src/com/engine/salary/elog/annotation/ElogField.java deleted file mode 100644 index a60c1f6a7..000000000 --- a/src/com/engine/salary/elog/annotation/ElogField.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.engine.salary.elog.annotation; - -import com.engine.salary.elog.entity.dto.DataTypeEnum; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD}) -public @interface ElogField { - - DataTypeEnum dataType() default DataTypeEnum.VARCHAR; - - int length() default 50; - - String comment() default "自定义字段"; - - String defaultValue() default ""; - - boolean isNull() default true; - - boolean isKey() default false; -} diff --git a/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java b/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java deleted file mode 100644 index 291f82562..000000000 --- a/src/com/engine/salary/elog/annotation/ElogPrimaryKey.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.PARAMETER}) -public @interface ElogPrimaryKey { -} diff --git a/src/com/engine/salary/elog/annotation/ElogTable.java b/src/com/engine/salary/elog/annotation/ElogTable.java deleted file mode 100644 index a236b5b6e..000000000 --- a/src/com/engine/salary/elog/annotation/ElogTable.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.engine.salary.elog.annotation; - -import org.springframework.stereotype.Component; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) - -public @interface ElogTable { - - String module(); - - String function() default "common"; -} diff --git a/src/com/engine/salary/elog/annotation/ElogTransform.java b/src/com/engine/salary/elog/annotation/ElogTransform.java deleted file mode 100644 index 120c41d8d..000000000 --- a/src/com/engine/salary/elog/annotation/ElogTransform.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD, ElementType.TYPE}) -@Inherited -public @interface ElogTransform { - - String tablename() default ""; - - String name(); - - int labelId() default -1; - - String type() default ""; - - String valuesKVPairs() default ""; - - boolean ignore() default false; - - boolean analyticSubclass() default false; - - boolean analyticList() default false; - - Class analyticListClass() default void.class; - -} diff --git a/src/com/engine/salary/elog/annotation/HandleElog.java b/src/com/engine/salary/elog/annotation/HandleElog.java deleted file mode 100644 index 387666b18..000000000 --- a/src/com/engine/salary/elog/annotation/HandleElog.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) -public @interface HandleElog { - - String modulename() default ""; - - String functionname() default ""; - - String service() default ""; -} diff --git a/src/com/engine/salary/elog/annotation/LoggerTarget.java b/src/com/engine/salary/elog/annotation/LoggerTarget.java deleted file mode 100644 index 701d4f8e6..000000000 --- a/src/com/engine/salary/elog/annotation/LoggerTarget.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.engine.salary.elog.annotation; - -import java.lang.annotation.*; - -/** - * @ClassName: LoggerTarget - * @Description 日志构造器-自定义注解 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -public @interface LoggerTarget { -// @AliasFor("module") - String value() default ""; - -// @AliasFor("value") - String module() default ""; - - String function() default "common"; -} diff --git a/src/com/engine/salary/elog/annotation/OperateType.java b/src/com/engine/salary/elog/annotation/OperateType.java deleted file mode 100644 index 7dbb84303..000000000 --- a/src/com/engine/salary/elog/annotation/OperateType.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.engine.salary.elog.annotation; - -public class OperateType { - public static final String view = "view"; - public static final String viewSpan = "查看"; - - public static final String add = "add"; - public static final String addSpan = "新增"; - - public static final String update = "update"; - public static final String updateSpan = "更新"; - - public static final String delete = "delete"; - public static final String deleteSpan = "删除"; -} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogHandler.java b/src/com/engine/salary/elog/annotation/handle/ElogHandler.java deleted file mode 100644 index 7cb1dda25..000000000 --- a/src/com/engine/salary/elog/annotation/handle/ElogHandler.java +++ /dev/null @@ -1,177 +0,0 @@ -//package com.engine.salary.elog.annotation.handle; -// -//import com.weaver.common.async.producer.client.AsyncClient; -//import com.weaver.common.distribution.genid.IdGenerator; -//import com.weaver.common.elog.annotation.Elog; -//import com.weaver.common.elog.annotation.ElogPrimaryKey; -//import com.weaver.common.elog.dao.QueryCurretValusMapper; -//import com.weaver.common.elog.dto.LoggerContext; -//import com.weaver.common.elog.util.LoggerTemplate; -//import org.apache.commons.lang3.StringUtils; -//import org.aspectj.lang.ProceedingJoinPoint; -//import org.aspectj.lang.Signature; -//import org.aspectj.lang.annotation.Around; -//import org.aspectj.lang.annotation.Aspect; -//import org.aspectj.lang.annotation.Pointcut; -//import org.aspectj.lang.reflect.MethodSignature; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.ApplicationContext; -//import org.springframework.stereotype.Component; -//import org.springframework.util.ReflectionUtils; -// -//import java.lang.annotation.Annotation; -//import java.lang.reflect.Method; -//import java.util.Date; -//import java.util.List; -//import java.util.Map; -// -// -///** -// * @ClassName: LoggerTargetHandler -// * @Description 从Spring扫描到的类中获取到Elog自定义注解类设置function属性 -// * @Author tanghj -// * @Date 2021/2/10 14:18 -// */ -//@Aspect -// -//public class ElogHandler { -// -// @Autowired -// ApplicationContext applicationContext; -// -// @Autowired -// protected AsyncClient asyncClient; -// -// @Autowired -// QueryCurretValusMapper queryCurretValusMapper; -// -// /** -// * 切面写入日志 -// */ -// @Pointcut("@annotation(com.weaver.common.elog.annotation.Elog)" ) -// public void writeLog(){} -// @Around("writeLog()") -// public Object writeLog(ProceedingJoinPoint pjp){ -// Object[] args = pjp.getArgs(); -// Signature signature = pjp.getSignature(); -// MethodSignature methodSignature = (MethodSignature) signature; -// Method method = methodSignature.getMethod(); -// -// Elog elog = method.getAnnotation(Elog.class); -// String moduleName = elog.module(); -// String funtionName = elog.function(); -// String operateType = elog.operateType(); -// String operateTypeName = elog.operateTypeName(); -// boolean isLocal = elog.isLocal(); -// Annotation[][] annos = method.getParameterAnnotations(); -// -// Object id = null; -// int keyPosition = -1; -// int index = 0; -// -// Class idClass = null; -// // 获取主键id注解 -// for(Annotation[] anno : annos) { -// if(anno.length > 0) { -// for(Annotation annotation : anno) { -// if(annotation instanceof ElogPrimaryKey) { -// idClass = method.getParameters()[index].getType(); -// id = args[index]; -// if(StringUtils.isEmpty(id+"")) { -// id = idClass.cast(IdGenerator.generate() + ""); -// } -// keyPosition = index; -// break; -// } -// } -// } -// index ++; -// } -// -// LoggerContext loggerContext = null; -// // 获取日志实体类 -// for(Object arg: args) { -// if(arg instanceof LoggerContext) { -// loggerContext = (LoggerContext) arg; -// break; -// } -// } -// -// if(loggerContext == null) { -// loggerContext = new LoggerContext(); -// } -// -// // 日志实体类的初始化 -// // loggerContext.setOperateType("UPDATE"); -// loggerContext.setFunctionName(funtionName); -// loggerContext.setModuleName(moduleName); -// loggerContext.setOperateType(operateType); -// loggerContext.setOperateTypeName(operateTypeName); -// loggerContext.setDate(new Date()); -// loggerContext.setDevice("IOS"); -// -// String sql = elog.sql(); -// String infoMethod = elog.infoMethod(); -// -// boolean isSql = false; -// boolean isMethod = false; -// Object currentClass = null; -// Method infoMtd = null; -// if(StringUtils.isNotEmpty(id+"")) { -// if(StringUtils.isNotEmpty(sql)) { -// isSql = true; -// Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); -// loggerContext.setOldValues(oldValue); -// } else if(StringUtils.isNotEmpty(infoMethod)){ -// isMethod = true; -// currentClass = applicationContext.getBean(pjp.getTarget().getClass()); -// // 获取方法 -// infoMtd = ReflectionUtils.findMethod(pjp.getTarget().getClass(),infoMethod, idClass); -// -// // todo 为空的情况加异常提醒 -// // 反射执行方法 -// Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); -// if(res != null) { -// if(res instanceof List) { -// loggerContext.setOldValueList((List) res); -// } else { -// loggerContext.setOldValues(res); -// } -// -// } -// } -// } -// -// LoggerTemplate loggerTemplate = new LoggerTemplate(); -// loggerTemplate.setFunction(funtionName); -// loggerTemplate.setModule(moduleName); -// loggerTemplate.setAsyncClient(asyncClient); -// -// Object result = null; -// try { -// args[keyPosition] = id; -// result = pjp.proceed(args); -// } catch (Throwable throwable) { -// throwable.printStackTrace(); -// } -// if(isSql) { -// Map oldValue = queryCurretValusMapper.queryValues(String.format(sql, id)); -// loggerContext.setNewValues(oldValue); -// } else if(isMethod) { -// Object res= ReflectionUtils.invokeMethod(infoMtd,currentClass, id); -// if(res != null) { -// if(res instanceof List) { -// loggerContext.setNewValueList((List) res); -// } else { -// loggerContext.setNewValues(res); -// } -// } -// } -// if(isLocal) -// loggerTemplate.write(loggerContext); -// else -// loggerTemplate.write(loggerContext,false); -// return result; -// -// } -//} diff --git a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java b/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java deleted file mode 100644 index 709e8e0cb..000000000 --- a/src/com/engine/salary/elog/annotation/handle/ElogTableScanner.java +++ /dev/null @@ -1,156 +0,0 @@ -//package com.engine.salary.elog.annotation.handle; -// -//import com.engine.salary.elog.annotation.ElogField; -//import com.engine.salary.elog.annotation.ElogTable; -//import com.engine.salary.elog.entity.dto.DataTypeEnum; -//import com.engine.salary.elog.entity.dto.TableColumnBean; -//import com.engine.salary.elog.util.ElogUtils; -//import lombok.extern.slf4j.Slf4j; -//import org.reflections.Reflections; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; -// -//import java.lang.reflect.Field; -//import java.util.*; -//import java.util.stream.Collectors; -// -///** -// * @ClassName: ElogTableScanner -// * @Description 日志操作表扫描 -// * @Author tanghj -// * @Date 2021/3/12 13:31 -// */ -//@Slf4j -//public class ElogTableScanner { -// private Logger logger = LoggerFactory.getLogger(this.getClass()); -// -//// private TableCheckerMapper tableCheckerMapper; -// -//// @Override -// public void run() throws Exception { -// -// // todo 需要考虑集群下,控制一台机器来跑 -// scanElogTable(); -// -// } -// -// private void scanElogTable() { -// // todo 是否还需要扫描Elog(因为可能不需要本地存储) ELogDetailTable, -//// Map tableBeans = this.applicationContext.getBeansWithAnnotation(ElogTable.class); -// Reflections reflections = new Reflections("com.engine.salary.elog"); -// Set> tableBeans = reflections.getTypesAnnotatedWith(ElogTable.class); -// -// -// List baseColumns = new ArrayList<>(); -// -// Map> tableColumns = elogTableHandle(tableBeans,baseColumns); -// -// for(String tableName : tableColumns.keySet()) { -// -// // todo 需要处理明细表,如果没有直接初始化原始明细表,如果有加上自定义的 -// List columns = tableColumns.get(tableName); -// if(columns == null) { -// columns = baseColumns; -// } else { -// columns.addAll(baseColumns); -// } -// tableCheck(tableName, columns); -// } -// -// } -// -// private Map> elogTableHandle(Set> tableBeans, List baseColumns) { -// Map> tableMap = new HashMap<>(); -// for (Class aClass :tableBeans) {//遍历每个controller层 -// -// List list = new ArrayList<>(); -// -// ElogTable elogTable = aClass.getAnnotation(ElogTable.class); -// -// List fields = Arrays.asList(aClass.getDeclaredFields());//获取方法 -// for (Field f : fields) { -// -// ElogField field = f.getAnnotation(ElogField.class); -// if(field == null) { -// continue; -// } -// -// TableColumnBean tableColumnBean = new TableColumnBean(); -// -// tableColumnBean.setColumnName(f.getName()); -// tableColumnBean.setColumnComment(field.comment()); -// tableColumnBean.setColumnDefault(field.defaultValue()); -// tableColumnBean.setFieldLength(field.length()); -// tableColumnBean.setDataType(field.dataType()); -// tableColumnBean.setNullable(field.isNull()); -// list.add(tableColumnBean); -// } -// if(!ElogUtils.BASE_TABLE.equals(elogTable.module())) { -// tableMap.put(ElogUtils.getTableName(elogTable.module(), elogTable.function()), list); -// } else { -// baseColumns.addAll(list); -// } -// } -// -// return tableMap; -// } -// -// private void tableCheck(String tableName, List columns) { -// List oldColumns = new ArrayList<>(); -//// List oldColumns = tableCheckerMapper.getTableStructure(tableName); -// -// // 表不存在 -// if(oldColumns == null || oldColumns.size() == 0) { -// createTable(tableName,columns ); -// } else { -// Map newcolMap = new HashMap<>(); -// Map oldcolMap = new HashMap<>(); -// -// columns.stream().forEach(tableColumnBean -> newcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean)); -// oldColumns.stream().forEach(tableColumnBean -> { -// tableColumnBean.setDataType(ElogUtils.getEnumFromString(DataTypeEnum.class, tableColumnBean.getDataTypeStr())); -// tableColumnBean.setNullable("YES".equalsIgnoreCase(tableColumnBean.getIsNullableStr())); -// oldcolMap.put(tableColumnBean.getColumnName().toLowerCase(), tableColumnBean); -// }); -// // 只增加或者修改,不删除字段 -// for(String key : newcolMap.keySet()) { -// if(oldcolMap.containsKey(key)) { -// // 字段变动则修改 -// if(!(newcolMap.get(key).toSql()).equals(oldcolMap.get(key).toSql())) -// this.modifyColumn(tableName, newcolMap.get(key)); -// } else { -// this.addColumn(tableName, newcolMap.get(key)); -// } -// } -// } -// -// } -// -// private void createTable(String tableName, List columns) { -// StringBuilder sb = new StringBuilder("create table ").append(tableName).append(" ( "); -// sb.append(columns.stream().map( bean -> bean.toSql()).collect(Collectors.joining(","))); -// sb.append(")"); -// logger.info("创建sql:{}",sb.toString()); -//// tableCheckerMapper.createElogTable(sb.toString()); -// } -// -// private void addColumn(String tableName, TableColumnBean tableColumnBean) { -// StringBuilder sb = new StringBuilder("alter table ") -// .append(tableName).append(" ") -// .append(" add ") -// .append(" column ") -// .append(tableColumnBean.toSql()); -// logger.info("新增字段sql:{}",sb.toString()); -//// tableCheckerMapper.createElogTable(sb.toString()); -// } -// -// private void modifyColumn(String tableName, TableColumnBean tableColumnBean) { -// StringBuilder sb = new StringBuilder("alter table ") -// .append(tableName).append(" ") -// .append(" modify ") -// .append(" column ") -// .append(tableColumnBean.toSql()); -// logger.info("修改字段sql:{}",sb.toString()); -//// tableCheckerMapper.createElogTable(sb.toString()); -// } -//} diff --git a/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java b/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java deleted file mode 100644 index b1934e4d3..000000000 --- a/src/com/engine/salary/elog/annotation/handle/LoggerTargetHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -//package com.engine.salary.elog.annotation.handle; -// -//import com.weaver.common.elog.annotation.LoggerTarget; -//import com.weaver.common.elog.util.LoggerTemplate; -//import org.apache.commons.lang3.StringUtils; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.boot.CommandLineRunner; -//import org.springframework.context.ApplicationContext; -//import org.springframework.stereotype.Component; -// -//import java.util.Map; -// -// -///** -// * @ClassName: LoggerTargetHandler -// * @Description 从Spring扫描到的类中获取到LoggerTarget自定义注解类设置function属性 -// * @Author tanghj -// * @Date 2021/2/10 14:18 -// */ -// -//public class LoggerTargetHandler { -// -// ApplicationContext applicationContext; -// -// @Override -// public void run(String... args) throws Exception { -// Map loggtemplateMap = applicationContext.getBeansWithAnnotation(LoggerTarget.class); -// -// for(Object obj : loggtemplateMap.values()) { -// if(obj instanceof LoggerTemplate) { -// LoggerTarget loggerTarget = obj.getClass().getAnnotation(LoggerTarget.class); -// ((LoggerTemplate) obj).setFunction(loggerTarget.function()); -// ((LoggerTemplate) obj).setModule(StringUtils.isNotEmpty(loggerTarget.value()) ? loggerTarget.value() : loggerTarget.module()); -// } -// -// } -// } -//} diff --git a/src/com/engine/salary/elog/async/LoggerMessageListener.java b/src/com/engine/salary/elog/async/LoggerMessageListener.java deleted file mode 100644 index 2bf5dc957..000000000 --- a/src/com/engine/salary/elog/async/LoggerMessageListener.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.engine.salary.elog.async; - -import com.engine.salary.elog.config.ELogTableChecker; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.service.impl.LocalElogService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @ClassName: LoggerMessageListener - * @Description 本地日志存储消息队列监听类 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -public class LoggerMessageListener { - - private final Logger logger = LoggerFactory.getLogger(getClass()); - - LocalElogService localElogService = new LocalElogService(); - - public String receiveold(LoggerContext messageBean) { - - new ELogTableChecker().check(messageBean); - localElogService.insertLocalElog(messageBean); - - return ""; - } - - -} diff --git a/src/com/engine/salary/elog/config/ELogCache.java b/src/com/engine/salary/elog/config/ELogCache.java deleted file mode 100644 index 841bddf18..000000000 --- a/src/com/engine/salary/elog/config/ELogCache.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.engine.salary.elog.config; - -import com.engine.salary.mapper.elog.ElogTableCheckerMapper; -import com.engine.salary.util.db.MapperProxyFactory; - -import java.util.HashMap; -import java.util.Map; - -public class ELogCache { - - private Map tableCache = new HashMap<>(); - - private ElogTableCheckerMapper getTableCheckerMapper() { - return MapperProxyFactory.getProxy(ElogTableCheckerMapper.class); - } - - public Long getVersion(String mainTable) { - Long version = tableCache.get(mainTable); - if (version == null) { - version = getTableCheckerMapper().getVersion(mainTable); - tableCache.put(mainTable, version); - } - return version; - } -} diff --git a/src/com/engine/salary/elog/config/ELogTableChecker.java b/src/com/engine/salary/elog/config/ELogTableChecker.java deleted file mode 100644 index 741dea65c..000000000 --- a/src/com/engine/salary/elog/config/ELogTableChecker.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.engine.salary.elog.config; - -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.mapper.elog.ElogTableCheckerMapper; -import com.engine.salary.util.db.IdGenerator; -import com.engine.salary.util.db.MapperProxyFactory; - - -public class ELogTableChecker { - private static final long version = 0; - private ELogCache eLogCache = new ELogCache(); - - private ElogTableCheckerMapper getTableCheckerMapper() { - return MapperProxyFactory.getProxy(ElogTableCheckerMapper.class); - } - - public void check(LoggerContext loggerContext) { - String module = loggerContext.getModuleName(); - String function = loggerContext.getFunctionName(); - String mainTable = String.format("%s_%slogs", module, function); - Long v = eLogCache.getVersion(mainTable); - boolean noTable = v == null; - if (noTable) { - this.initTable(mainTable); - v = version; - } else { - this.checkVersion(mainTable, v); - } - - } - - private void checkVersion(String mainTable, Long v) { - if (v == version) { - return; - } - } - - - private void initTable(String mainTable) { - getTableCheckerMapper().recordVersion(IdGenerator.generate(), mainTable, version); - getTableCheckerMapper().createMainTable(mainTable); - getTableCheckerMapper().createDetailTable(mainTable + "_detail"); - } -} diff --git a/src/com/engine/salary/elog/entity/dto/CancelContext.java b/src/com/engine/salary/elog/entity/dto/CancelContext.java deleted file mode 100644 index d7ecccb7b..000000000 --- a/src/com/engine/salary/elog/entity/dto/CancelContext.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * @ClassName: CancelContext - * @Description 撤销实体类 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -@ApiModel("撤销实体类") -public class CancelContext { - - @ApiModelProperty("撤销参数") - private T cancleParams; - - public T getCancleParams() { - return cancleParams; - } - - public void setCancleParams(T cancleParams) { - this.cancleParams = cancleParams; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/DataTypeEnum.java b/src/com/engine/salary/elog/entity/dto/DataTypeEnum.java deleted file mode 100644 index b31b8e490..000000000 --- a/src/com/engine/salary/elog/entity/dto/DataTypeEnum.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -public enum DataTypeEnum { - VARCHAR, - BIGINT, - INT, - DATETIME, - TEXT, - LONGTEXT, - DOUBLE, - DECIMAL, - TINYINT, - FLOAT; - - -} diff --git a/src/com/engine/salary/elog/entity/dto/ElogBean.java b/src/com/engine/salary/elog/entity/dto/ElogBean.java deleted file mode 100644 index 84a24cfd9..000000000 --- a/src/com/engine/salary/elog/entity/dto/ElogBean.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * @Date: 2022/5/2 21:51 - * @Author: deli.xu - * @Description: 日志中心bean - **/ -public class ElogBean implements Serializable { - - - private static final long serialVersionUID = 5357552376749564256L; - private String module; - private String function; - private String current; - private String pageSize; - private String dataset; - private String searchMap; - private List showColumns = new ArrayList<>(); - private List filterConditionDtos = new ArrayList<>(); - private String downloadSize; - private String transMethod; - private Map authParamsJson; - - public String getModule() { - return module; - } - - public void setModule(String module) { - this.module = module; - } - - public String getFunction() { - return function; - } - - public void setFunction(String function) { - this.function = function; - } - - public String getCurrent() { - return current; - } - - public void setCurrent(String current) { - this.current = current; - } - - public String getPageSize() { - return pageSize; - } - - public void setPageSize(String pageSize) { - this.pageSize = pageSize; - } - - public String getDataset() { - return dataset; - } - - public void setDataset(String dataset) { - this.dataset = dataset; - } - - public String getSearchMap() { - return searchMap; - } - - public void setSearchMap(String searchMap) { - this.searchMap = searchMap; - } - - public List getShowColumns() { - return showColumns; - } - - public void setShowColumns(List showColumns) { - this.showColumns = showColumns; - } - - public List getFilterConditionDtos() { - return filterConditionDtos; - } - - public void setFilterConditionDtos(List filterConditionDtos) { - this.filterConditionDtos = filterConditionDtos; - } - - public String getDownloadSize() { - return downloadSize; - } - - public void setDownloadSize(String downloadSize) { - this.downloadSize = downloadSize; - } - - public String getTransMethod() { - return transMethod; - } - - public void setTransMethod(String transMethod) { - this.transMethod = transMethod; - } - - public Map getAuthParamsJson() { - return authParamsJson; - } - - public void setAuthParamsJson(Map authParamsJson) { - this.authParamsJson = authParamsJson; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/FilterConditionDto.java b/src/com/engine/salary/elog/entity/dto/FilterConditionDto.java deleted file mode 100644 index 28cb451e5..000000000 --- a/src/com/engine/salary/elog/entity/dto/FilterConditionDto.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import java.io.Serializable; - -/** - * @date: 2021/5/25 17:23 - * @author: deli.xu - * @description: - */ -public class FilterConditionDto implements Serializable { - - private static final long serialVersionUID = -3399942468474767859L; - - /** - * 列名 - */ - private String columIndex; - /** - * 值 - */ - private String value; - - /** - * 过滤类型 - */ - private String type; - - /** - * 模糊搜索 - */ - private Like like; - - /** - * 关联条件 - */ - private String connectCondition; - - /** - * sql条件 - */ - private String sql; - - - public String getColumIndex() { - return columIndex; - } - - public void setColumIndex(String columIndex) { - this.columIndex = columIndex; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Like getLike() { - return like; - } - - public void setLike(Like like) { - this.like = like; - } - - public String getConnectCondition() { - return connectCondition; - } - - public void setConnectCondition(String connectCondition) { - this.connectCondition = connectCondition; - } - - public String getSql() { - return sql; - } - - public void setSql(String sql) { - this.sql = sql; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/Like.java b/src/com/engine/salary/elog/entity/dto/Like.java deleted file mode 100644 index 2caead76c..000000000 --- a/src/com/engine/salary/elog/entity/dto/Like.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import java.io.Serializable; - -/** - * @date: 2021/6/1 17:50 - * @author: deli.xu - * @description: - */ -public class Like implements Serializable { - private static final long serialVersionUID = -3399942468474767851L; - private String prefix; - private String suffix; - - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - public String getSuffix() { - return suffix; - } - - public void setSuffix(String suffix) { - this.suffix = suffix; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/LoggerContext.java b/src/com/engine/salary/elog/entity/dto/LoggerContext.java deleted file mode 100644 index f9be10c8f..000000000 --- a/src/com/engine/salary/elog/entity/dto/LoggerContext.java +++ /dev/null @@ -1,890 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import com.alibaba.fastjson.annotation.JSONField; -import com.engine.salary.elog.annotation.ElogField; -import com.engine.salary.elog.annotation.ElogTable; -import com.engine.salary.elog.enums.ElogConsts; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.apache.commons.lang3.StringUtils; -import weaver.hrm.User; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * @ClassName: LoggerContext - * @Description 日志实体类。支持通过泛型扩展日志字段 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -@ElogTable(module = ElogConsts.BASE_TABLE) -@ApiModel("日志实体类") -public class LoggerContext implements Serializable { - - private static final long serialVersionUID = 15869325700230992L; - - private User user; - - @ElogField(comment = "ID", dataType = DataTypeEnum.BIGINT, isKey = true) - @ApiModelProperty("日志ID") - private long id; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36, comment = "日志UUID") - @ApiModelProperty("日志UUID") - private String uuid = ""; - - @ApiModelProperty("自定义日志字段信息") - private T customInfo; - @ElogField(dataType = DataTypeEnum.DATETIME, comment = "操作时间") - @ApiModelProperty("操作时间") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date date = new Date(); - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 500, comment = "终端信息") - @ApiModelProperty("终端信息") - private String device = ""; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "操作人") - @ApiModelProperty("操作人") - private String operator = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "操作人姓名") - @ApiModelProperty("操作人姓名") - private String operatorName = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 10, comment = "租户id") - @ApiModelProperty("租户id") - private String tenant_key = ""; - - /** - * 要操作的对象在表中的主键值 - */ - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "操作目标id") - @ApiModelProperty("操作目标id") - private String targetId = ""; - - @ElogField(dataType = DataTypeEnum.TEXT, comment = "操作目标名称") - @ApiModelProperty("操作目标名称(用于显示)") - private String targetName = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "模块") - @ApiModelProperty("目标对象类型(大分类,模块,服务)") - private String moduleName;// 模块 - - /** - * 目标对象类型(小分类,模块/服务下的子功能。子项目) - * 数据存储是以模块名_子项目名作为最基本的存储单元 - * 如果是子项目下的子项目 命名为:子项目名_子项目名_子项目名(全部小写) - */ - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "服务(方法)") - @ApiModelProperty("目标对象类型(小分类,模块/服务下的子功能。子项目)") - private String functionName; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "访问接口名") - @ApiModelProperty("访问接口名") - private String interfaceName = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "请求全路径") - @ApiModelProperty("请求全路径") - private String requestUrl = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "请求地址") - @ApiModelProperty("请求地址") - private String requestUri = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "操作类型") - @ApiModelProperty("操作类型(增删改查等)") - private String operateType = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, comment = "操作类型名称") - @ApiModelProperty("操作类型名称") - private String operateTypeName = ""; - - /** - * 每个TableChangeBean 为一张表,支持记录多张表的前后值 - */ - @ApiModelProperty("修改前、后的值") - private List changeValues;// 操作表名,[字段名,值] - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 3000, comment = "操作详细说明") - @ApiModelProperty("操作详细说明") - private String operatedesc = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "涉及的相关参数") - @ApiModelProperty("涉及的相关参数") - private Map params; - - @ApiModelProperty("涉及的相关参数-转string存储") - private String paramsStr; - - /** - * 当作为主表,belongMainId不赋值 - */ - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36, comment = "所属主表uuid") - @ApiModelProperty("所属主表uuid") - private String belongMainId = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "操作IP") - @ApiModelProperty("操作IP") - private String clientIp = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50, comment = "分组") - @ApiModelProperty("分组") - private String groupId = ""; - - /*@ApiModelProperty("是否明显表") - private boolean isDetail;*/ - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 1000, comment = "分组标题") - @ApiModelProperty("分组标题") - private String groupNameLabel = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "重做业务接口") - @ApiModelProperty("重做业务接口") - private String redoService = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "重做参数") - @ApiModelProperty("重做参数") - private RedoContext redoContext; - - @ApiModelProperty("重做参数-转String存储") - private String redoContextStr; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "撤销业务接口") - @ApiModelProperty("撤销业务接口") - private String cancelService = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT, comment = "撤销参数") - @ApiModelProperty("撤销参数") - private CancelContext cancelContext; - - @ApiModelProperty("撤销参数-转String存储") - private String cancelContextStr; - - @ApiModelProperty("日志明细列表(值变化列表-自动赋值、或者自定义字段)") - private List detailContexts; - - @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "创建时间") - @ApiModelProperty("创建时间") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date create_time; - - @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "修改时间") - @ApiModelProperty("修改时间") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date update_time; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "创建人id") - @ApiModelProperty("创建人id") - private long creator; - - @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0", comment = "是否删除") - @ApiModelProperty("是否删除") - private int delete_type; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "总运行时长") - @ApiModelProperty("总运行时长") - private long totalRunTime; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "主方法运行时长") - @ApiModelProperty("主方法运行时长") - private long mainRunTime; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, defaultValue = "", comment = "运行结果标识") - @ApiModelProperty("运行结果标识") - private String result = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 100, defaultValue = "", comment = "来自pc web") - @ApiModelProperty("来自终端") - private String fromTerminal = ""; - - @ElogField(dataType = DataTypeEnum.TEXT, comment = "运行结果描述") - @ApiModelProperty("运行结果描述") - private String resultDesc = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 3000, comment = "原先内容") - @ApiModelProperty("原先内容(et用)") - private String old_content = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 20, comment = "链接类型") - @ApiModelProperty("链接类型(et用)") - private String link_type = ""; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "链接id") - @ApiModelProperty("链接id(et用)") - private long link_id; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "0", comment = "原先链接id") - @ApiModelProperty("原先链接id(et用)") - private long old_link_id; - - /** - * 开发可以自由传中间临时参数,不会入库 - */ - @ApiModelProperty("临时参数") - private Object tempParams; - - /** - * 是否忽略该日志,不进行数据记录 - */ - @ApiModelProperty("是否忽略该日志,不进行数据记录") - private boolean logIgnore; - - /** - * 审计操作类型 - */ - @ApiModelProperty("审计操作类型") - protected String operateAuditType; - - /** - * 操作人账号 - */ - @ApiModelProperty("操作人账号") - protected String operateAccount; - - @ApiModelProperty("操作人id(兼容数据库用)") - protected long logOperator; - - @ApiModelProperty("操作人id(兼容数据库用)") - protected long logTargetid; - - @ApiModelProperty("ES存储大字段功能标识") - protected Boolean esFunction; - - @ApiModelProperty("params参数是否忽略记录") - private Boolean paramsIgnore = Boolean.FALSE; - - @ApiModelProperty("params请求体keys") - private List paramsBodyKeys; - - @ApiModelProperty("日志弱控记录") - private Boolean weakElogReocrd = Boolean.FALSE; - - private List clobFieldList; - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public List getClobFieldList() { - return clobFieldList; - } - - public void setClobFieldList(List clobFieldList) { - this.clobFieldList = clobFieldList; - } - - public Boolean getWeakElogReocrd() { - return weakElogReocrd; - } - - public void setWeakElogReocrd(Boolean weakElogReocrd) { - this.weakElogReocrd = weakElogReocrd; - } - - public Boolean getParamsIgnore() { - return paramsIgnore; - } - - public void setParamsIgnore(Boolean paramsIgnore) { - this.paramsIgnore = paramsIgnore; - } - - public List getParamsBodyKeys() { - return paramsBodyKeys; - } - - public void setParamsBodyKeys(List paramsBodyKeys) { - this.paramsBodyKeys = paramsBodyKeys; - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public T getCustomInfo() { - return customInfo; - } - - public void setCustomInfo(T customInfo) { - this.customInfo = customInfo; - } - - public Date getDate() { - return date; - } - - public void setDate(Date date) { - this.date = date; - } - - public String getDevice() { - return device; - } - - public void setDevice(String device) { - this.device = device; - } - - public String getOperator() { - return operator; - } - - public void setOperator(String operator) { - this.operator = operator; - } - - public String getTenant_key() { - return tenant_key; - } - - public void setTenant_key(String tenant_key) { - this.tenant_key = tenant_key; - } - - public String getTargetId() { - return targetId; - } - - public void setTargetId(String targetId) { - this.targetId = targetId; - } - - public String getTargetName() { - return targetName; - } - - public void setTargetName(String targetName) { - this.targetName = targetName; - } - - public String getModuleName() { - return moduleName; - } - - public void setModuleName(String moduleName) { - this.moduleName = moduleName; - } - - public String getFunctionName() { - return functionName; - } - - public void setFunctionName(String functionName) { - this.functionName = functionName; - } - - public String getInterfaceName() { - return interfaceName; - } - - public void setInterfaceName(String interfaceName) { - this.interfaceName = interfaceName; - } - - public String getOperateType() { - return operateType; - } - - public void setOperateType(String operateType) { - this.operateType = operateType; - } - - public List getChangeValues() { - return changeValues; - } - - public void setChangeValues(List changeValues) { - this.changeValues = changeValues; - } - - public String getOperatedesc() { - return operatedesc; - } - - public void setOperatedesc(String operatedesc) { - this.operatedesc = operatedesc; - } - - public Map getParams() { - return params; - } - - public void setParams(Map params) { - this.params = params; - } - - /*public String getMainId() { - return mainId; - } - - public void setMainId(String mainId) { - this.mainId = mainId; - } - - public String getBelongMainId() { - return belongMainId; - } - - public void setBelongMainId(String belongMainId) { - this.belongMainId = belongMainId; - }*/ - - public String getClientIp() { - return clientIp; - } - - public void setClientIp(String clientIp) { - this.clientIp = clientIp; - } - - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - -/* public boolean isDetail() { - return isDetail; - } - - public void setDetail(boolean detail) { - isDetail = detail; - }*/ - - public String getGroupNameLabel() { - return groupNameLabel; - } - - public void setGroupNameLabel(String groupNameLabel) { - this.groupNameLabel = groupNameLabel; - } - - public String getRedoService() { - return redoService; - } - - public void setRedoService(String redoService) { - this.redoService = redoService; - } - - public RedoContext getRedoContext() { - return redoContext; - } - - public void setRedoContext(RedoContext redoContext) { - this.redoContext = redoContext; - } - - public CancelContext getCancelContext() { - return cancelContext; - } - - public void setCancelContext(CancelContext cancelContext) { - this.cancelContext = cancelContext; - } - - public String getCancelService() { - return cancelService; - } - - public void setCancelService(String cancelService) { - this.cancelService = cancelService; - } - - public List getDetailContexts() { - return detailContexts; - } - - public void setDetailContexts(List detailContexts) { - this.detailContexts = detailContexts; - } - - public void addDetailContext(LoggerDetailContext loggerDetailContext) { - if (this.detailContexts != null) { - this.detailContexts.add(loggerDetailContext); - } else { - this.detailContexts = new ArrayList<>(); - this.detailContexts.add(loggerDetailContext); - } - } - - public void addDetailContext(List list) { - if (this.detailContexts != null) { - this.detailContexts.addAll(list); - } else { - this.detailContexts = new ArrayList<>(); - this.detailContexts.addAll(list); - } - } - - public String getOperatorName() { - return operatorName; - } - - public void setOperatorName(String operatorName) { - this.operatorName = operatorName; - } - - public void setOldValues(Object object) { - TableChangeBean bean = new TableChangeBean(); - bean.setOldValue(object); - getChangeList().add(bean); - } - - public void setOldValueList(List list) { - if (list != null) - list.stream().forEach(obj -> setOldValues(obj)); - } - - public void setNewValueList(List list) { - if (list != null) - list.stream().forEach(obj -> setNewValues(obj)); - } - - public void setNewValues(Object object) { - List list = getChangeList(); - - boolean handled = false; - for (TableChangeBean bean : list) { - if (bean.getNewValue() == null) { - bean.setNewValue(object); - handled = true; - break; - } - } - if (!handled) { - TableChangeBean bean = new TableChangeBean(); - bean.setNewValue(object); - list.add(bean); - } - } - - public void setOldValues(Object object, String tableName, String dataId, String belongDataid) { - setOldValues(object, tableName, dataId, belongDataid, false); - } - - public void setOldValues(Object object, String tableName, String dataId, String belongDataid, boolean isDetail) { - TableChangeBean bean = new TableChangeBean(); - if (StringUtils.isNotEmpty(tableName)) - bean.setTableName(tableName); - if (StringUtils.isNotEmpty(dataId)) - bean.setDataid(dataId); - if (StringUtils.isNotEmpty(belongDataid)) - bean.setBelongDataid(belongDataid); - if (isDetail) - bean.setIsDetail(1); - bean.setOldValue(object); - getChangeList().add(bean); - } - - public void setOldValueList(List list, String tableName, String dataId, String belongDataid) { - setOldValueList(list, tableName, dataId, belongDataid, false); - } - - public void setNewValueList(List list, String tableName, String dataId, String belongDataid) { - setNewValueList(list, tableName, dataId, belongDataid, false); - } - - public void setOldValueList(List list, String tableName, String dataId, String belongDataid, boolean isDetail) { - if (list != null) - list.stream().forEach(obj -> setOldValues(obj, tableName, dataId, belongDataid, isDetail)); - } - - public void setNewValueList(List list, String tableName, String dataId, String belongDataid, boolean isDetail) { - if (list != null) - list.stream().forEach(obj -> setNewValues(obj, tableName, dataId, belongDataid, isDetail)); - } - - public void setNewValues(Object object, String tableName, String dataId, String belongDataid) { - setNewValues(object, tableName, dataId, belongDataid, false); - } - - public void setNewValues(Object object, String tableName, String dataId, String belongDataid, boolean isDetail) { - List list = getChangeList(); - - boolean handled = false; - for (TableChangeBean bean : list) { - if (bean.getNewValue() == null) { - bean.setNewValue(object); - if (StringUtils.isNotEmpty(tableName)) - bean.setTableName(tableName); - if (StringUtils.isNotEmpty(dataId)) - bean.setDataid(dataId); - if (StringUtils.isNotEmpty(belongDataid)) - bean.setBelongDataid(belongDataid); - if (isDetail) - bean.setIsDetail(1); - handled = true; - break; - } - } - if (!handled) { - TableChangeBean bean = new TableChangeBean(); - if (StringUtils.isNotEmpty(tableName)) - bean.setTableName(tableName); - if (StringUtils.isNotEmpty(dataId)) - bean.setDataid(dataId); - if (StringUtils.isNotEmpty(belongDataid)) - bean.setBelongDataid(belongDataid); - if (isDetail) - bean.setIsDetail(1); - bean.setNewValue(object); - list.add(bean); - } - } - - public List getChangeList() { - - if (this.changeValues == null) { - this.changeValues = new ArrayList<>(); - } - - return this.changeValues; - - } - - public Object getParam(String id) { - return this.params.get(id); - } - - public String getOperateTypeName() { - return operateTypeName; - } - - public void setOperateTypeName(String operateTypeName) { - this.operateTypeName = operateTypeName; - } - - public String getParamsStr() { - return paramsStr; - } - - public void setParamsStr(String paramsStr) { - this.paramsStr = paramsStr; - } - - public String getRedoContextStr() { - return redoContextStr; - } - - public void setRedoContextStr(String redoContextStr) { - this.redoContextStr = redoContextStr; - } - - public String getCancelContextStr() { - return cancelContextStr; - } - - public void setCancelContextStr(String cancelContextStr) { - this.cancelContextStr = cancelContextStr; - } - - public String getBelongMainId() { - return belongMainId; - } - - public void setBelongMainId(String belongMainId) { - this.belongMainId = belongMainId; - } - - public String getRequestUrl() { - return requestUrl; - } - - public void setRequestUrl(String requestUrl) { - this.requestUrl = requestUrl; - } - - public String getRequestUri() { - return requestUri; - } - - public void setRequestUri(String requestUri) { - this.requestUri = requestUri; - } - - public Date getCreate_time() { - return create_time; - } - - public void setCreate_time(Date create_time) { - this.create_time = create_time; - } - - public Date getUpdate_time() { - return update_time; - } - - public void setUpdate_time(Date update_time) { - this.update_time = update_time; - } - - public long getCreator() { - return creator; - } - - public void setCreator(long creator) { - this.creator = creator; - } - - public int getDelete_type() { - return delete_type; - } - - public void setDelete_type(int delete_type) { - this.delete_type = delete_type; - } - - public long getTotalRunTime() { - return totalRunTime; - } - - public void setTotalRunTime(long totalRunTime) { - this.totalRunTime = totalRunTime; - } - - public long getMainRunTime() { - return mainRunTime; - } - - public void setMainRunTime(long mainRunTime) { - this.mainRunTime = mainRunTime; - } - - public Object getTempParams() { - return tempParams; - } - - public void setTempParams(Object tempParams) { - this.tempParams = tempParams; - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result; - } - - public String getFromTerminal() { - return fromTerminal; - } - - public void setFromTerminal(String fromTerminal) { - this.fromTerminal = fromTerminal; - } - - public String getResultDesc() { - return resultDesc; - } - - public void setResultDesc(String resultDesc) { - this.resultDesc = resultDesc; - } - - public String getOld_content() { - return old_content; - } - - public void setOld_content(String old_content) { - this.old_content = old_content; - } - - public String getLink_type() { - return link_type; - } - - public void setLink_type(String link_type) { - this.link_type = link_type; - } - - public long getLink_id() { - return link_id; - } - - public void setLink_id(long link_id) { - this.link_id = link_id; - } - - public long getOld_link_id() { - return old_link_id; - } - - public void setOld_link_id(long old_link_id) { - this.old_link_id = old_link_id; - } - - public String getOperateAuditType() { - return operateAuditType; - } - - public void setOperateAuditType(String operateAuditType) { - this.operateAuditType = operateAuditType; - } - - public String getOperateAccount() { - return operateAccount; - } - - public void setOperateAccount(String operateAccount) { - this.operateAccount = operateAccount; - } - - public long getLogOperator() { - return logOperator; - } - - public void setLogOperator(long logOperator) { - this.logOperator = logOperator; - } - - public long getLogTargetid() { - return logTargetid; - } - - public void setLogTargetid(long logTargetid) { - this.logTargetid = logTargetid; - } - - public boolean getLogIgnore() { - return logIgnore; - } - - public void setLogIgnore(boolean logIgnore) { - this.logIgnore = logIgnore; - } - - public Boolean getEsFunction() { - return esFunction; - } - - public void setEsFunction(Boolean esFunction) { - this.esFunction = esFunction; - } - -} - diff --git a/src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java b/src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java deleted file mode 100644 index ef4a66503..000000000 --- a/src/com/engine/salary/elog/entity/dto/LoggerDetailContext.java +++ /dev/null @@ -1,316 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import com.engine.salary.elog.annotation.ElogDetailTable; -import com.engine.salary.elog.annotation.ElogField; -import com.engine.salary.elog.enums.ElogConsts; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; -import java.util.Date; - -/** - * @ClassName: ValueChangeBean - * @Description 值变化实体类(自动将表字段值变更类转换为该类) - * @Author tanghj - * @Date 2021/3/9 11:06 - */ -@ElogDetailTable(module = ElogConsts.BASE_TABLE) -@ApiModel("值变化实体类") -public class LoggerDetailContext implements Serializable { - - private static final long serialVersionUID = 15869325700230992L; - - @ElogField(comment = "ID", dataType = DataTypeEnum.BIGINT, isKey = true) - @ApiModelProperty("ID") - private long id; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36,comment = "日志UUID") - @ApiModelProperty("同一个bean转换的数据,uuid相同,作为区分标识") - private String uuid = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 36,comment = "主表id") - @ApiModelProperty("主表id") - private String mainid = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50,comment = "数据id") - @ApiModelProperty("数据id") - private String dataid = ""; - - /** - * 当作为主表,belongDataId不赋值 - */ - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 50,comment = "主表数据id") - @ApiModelProperty("主表数据id") - private String belongDataid = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200,comment = "表名") - @ApiModelProperty("表名") - private String tableName =""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue = "-1", length = 50,comment = "表名labelid") - @ApiModelProperty("表名labelid") - private String tableNameLabelId = "-1"; - @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue="",isNull = false,length = 50,comment = "对应数据库的表") - @ApiModelProperty("对应数据库的表") - private String tableNameDesc = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200,comment = "字段名") - @ApiModelProperty("字段名") - private String fieldName =""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, defaultValue = "-1", length = 50,comment = "字段名labelid") - @ApiModelProperty("字段名labelid") - private String fieldNameLabelId = "-1"; - - @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新后的值") - @ApiModelProperty("更新后的值") - private String newValue = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新前的值") - @ApiModelProperty("更新前的值") - private String oldValue = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新后的显示值") - @ApiModelProperty("更新后的显示值") - private String newRealValue = ""; - - @ElogField(dataType = DataTypeEnum.LONGTEXT,comment = "更新前的显示值") - @ApiModelProperty("更新前的显示值") - private String oldRealValue = ""; - - @ElogField(dataType = DataTypeEnum.VARCHAR, length = 200, comment = "字段名") - @ApiModelProperty("字段描述") - private String fieldDesc = ""; - - @ElogField(dataType = DataTypeEnum.INT, comment = "字段名") - @ApiModelProperty("字段展示顺序") - private int showorder = 0; - - @ApiModelProperty("自定义字段") - private T customDetailInfo; - - @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "创建时间") - @ApiModelProperty("创建时间") - private Date create_time; - - @ElogField(dataType = DataTypeEnum.DATETIME, defaultValue = "CURRENT_TIMESTAMP", comment = "修改时间") - @ApiModelProperty("修改时间") - private Date update_time; - - @ElogField(dataType = DataTypeEnum.BIGINT, defaultValue = "-1", comment = "创建人id") - @ApiModelProperty("创建人id") - private long creator; - - @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0" , comment = "是否删除") - @ApiModelProperty("是否删除") - private int delete_type; - - @ElogField(dataType = DataTypeEnum.VARCHAR,length = 10,comment = "租户id") - @ApiModelProperty("租户id") - private String tenant_key = ""; - - @ElogField(dataType = DataTypeEnum.INT, defaultValue = "0" , comment = "是否明细字段") - @ApiModelProperty("是否明细字段") - private int isDetail = 0; - - - private String cusValus; - - public String getCusValus() { - return cusValus; - } - - public void setCusValus(String cusValus) { - this.cusValus = cusValus; - } - - - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getMainid() { - return mainid; - } - - public void setMainid(String mainid) { - this.mainid = mainid; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public String getTableName() { - return tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public String getFieldName() { - return fieldName; - } - - public void setFieldName(String fieldName) { - this.fieldName = fieldName; - } - - public String getNewValue() { - return newValue; - } - - public void setNewValue(String newValue) { - this.newValue = newValue; - } - - public String getOldValue() { - return oldValue; - } - - public void setOldValue(String oldValue) { - this.oldValue = oldValue; - } - - public String getFieldDesc() { - return fieldDesc; - } - - public void setFieldDesc(String fieldDesc) { - this.fieldDesc = fieldDesc; - } - - public int getShoworder() { - return showorder; - } - - public void setShoworder(int showorder) { - this.showorder = showorder; - } - - public T getCustomDetailInfo() { - return customDetailInfo; - } - - public void setCustomDetailInfo(T customDetailInfo) { - this.customDetailInfo = customDetailInfo; - } - - public String getDataid() { - return dataid; - } - - public void setDataid(String dataid) { - this.dataid = dataid; - } - - public String getBelongDataid() { - return belongDataid; - } - - public void setBelongDataid(String belongDataid) { - this.belongDataid = belongDataid; - } - - public Date getCreate_time() { - return create_time; - } - - public void setCreate_time(Date create_time) { - this.create_time = create_time; - } - - public Date getUpdate_time() { - return update_time; - } - - public void setUpdate_time(Date update_time) { - this.update_time = update_time; - } - - public long getCreator() { - return creator; - } - - public void setCreator(long creator) { - this.creator = creator; - } - - public int getDelete_type() { - return delete_type; - } - - public void setDelete_type(int delete_type) { - this.delete_type = delete_type; - } - - public String getTenant_key() { - return tenant_key; - } - - public void setTenant_key(String tenant_key) { - this.tenant_key = tenant_key; - } - - public int getIsDetail() { - return isDetail; - } - - public void setIsDetail(int isDetail) { - this.isDetail = isDetail; - } - - public String getNewRealValue() { - return newRealValue; - } - - public void setNewRealValue(String newRealValue) { - this.newRealValue = newRealValue; - } - - public String getOldRealValue() { - return oldRealValue; - } - - public void setOldRealValue(String oldRealValue) { - this.oldRealValue = oldRealValue; - } - - public String getTableNameLabelId() { - return tableNameLabelId; - } - - public void setTableNameLabelId(String tableNameLabelId) { - this.tableNameLabelId = tableNameLabelId; - } - - public String getFieldNameLabelId() { - return fieldNameLabelId; - } - - public void setFieldNameLabelId(String fieldNameLabelId) { - this.fieldNameLabelId = fieldNameLabelId; - } - - public String getTableNameDesc() { - return tableNameDesc; - } - - public void setTableNameDesc(String tableNameDesc) { - this.tableNameDesc = tableNameDesc; - } - - - -} diff --git a/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java b/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java deleted file mode 100644 index 3f7a364e4..000000000 --- a/src/com/engine/salary/elog/entity/dto/ReadInfoEntity.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import java.io.Serializable; -import java.util.Date; - -/** - * @date: 2022/5/14 13:52 - * @author: deli.xu - * @description: - */ - -public class ReadInfoEntity implements Serializable { - private static final long serialVersionUID = -8890667941835568289L; - private Long employeeId; - private Date date; - - public Long getEmployeeId() { - return this.employeeId; - } - - public void setEmployeeId(Long employeeId) { - this.employeeId = employeeId; - } - - public Date getDate() { - return this.date; - } - - public void setDate(Date date) { - this.date = date; - } - - public ReadInfoEntity() { - } - - public ReadInfoEntity(Long employeeId, Date date) { - this.employeeId = employeeId; - this.date = date; - } -} \ No newline at end of file diff --git a/src/com/engine/salary/elog/entity/dto/RedoContext.java b/src/com/engine/salary/elog/entity/dto/RedoContext.java deleted file mode 100644 index 3ec87adb3..000000000 --- a/src/com/engine/salary/elog/entity/dto/RedoContext.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * @ClassName: RedoContext - * @Description 重做实体类 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -@ApiModel("重做实体类") -public class RedoContext { - @ApiModelProperty("重做参数") - private T redoParams; - - public T getRedoParams() { - return redoParams; - } - - public void setRedoParams(T redoParams) { - this.redoParams = redoParams; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/ShowColumsDto.java b/src/com/engine/salary/elog/entity/dto/ShowColumsDto.java deleted file mode 100644 index b5f47e084..000000000 --- a/src/com/engine/salary/elog/entity/dto/ShowColumsDto.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.engine.salary.elog.entity.dto; - - -import java.io.Serializable; - -/** - * @date: 2021/5/11 18:46 - * @author: deli.xu - * @description: 显示列对象 - */ -public class ShowColumsDto implements Serializable { - - private static final long serialVersionUID = 4650449925605408753L; - - /** - * 列名 - */ - private String columName; - /** - * 列别名 - */ - private String aliasColumName; - - /** - * 列名index - */ - private String columIndex; - - /** - * 是否隐藏 默认显示 - */ - private boolean isHide = false; - - /** - * 宽度 - */ - private String width; - - /** - * 是否转多语言 - */ - private boolean isTransfLanguage = false; - - /** - * 是否换行 - * @param width - */ - private boolean newLine = false; - - public void setWidth(String width){ - this.width =width; - } - - public String getWidth(){ - return width; - } - public String getColumName() { - return columName; - } - - public void setColumName(String columName) { - this.columName = columName; - } - - public String getAliasColumName() { - return aliasColumName; - } - - public void setAliasColumName(String aliasColumName) { - this.aliasColumName = aliasColumName; - } - - public boolean isHide() { - return isHide; - } - - public void setHide(boolean hide) { - isHide = hide; - } - - public String getColumIndex() { - return columIndex; - } - - public void setColumIndex(String columIndex) { - this.columIndex = columIndex; - } - - public boolean isTransfLanguage() { - return isTransfLanguage; - } - - public boolean isNewLine() { - return newLine; - } - - public void setNewLine(boolean newLine) { - this.newLine = newLine; - } - - public void setTransfLanguage(boolean transfLanguage) { - - isTransfLanguage = transfLanguage; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/TableChangeBean.java b/src/com/engine/salary/elog/entity/dto/TableChangeBean.java deleted file mode 100644 index 445bd8510..000000000 --- a/src/com/engine/salary/elog/entity/dto/TableChangeBean.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; - -/** - * @ClassName: TableChangeBean - * @Description 表更新前后值类 - * @Author tanghj - * @Date 2021/3/8 15:58 - */ -@ApiModel("表更新前后值类") -public class TableChangeBean implements Serializable { - - private static final long serialVersionUID = 15869325700230992L; - - @ApiModelProperty("表名") - private String tableName; - - @ApiModelProperty("数据id") - private String dataid; - - @ApiModelProperty("所属主表数据id") - private String belongDataid; - - @ApiModelProperty("是否为明细表(0,否;1,是)") - private int isDetail = 0; - - /** - * 泛型必须是具体的实体类 - */ - @ApiModelProperty("更新前的值") - private T oldValue; - - /** - * 泛型必须是具体的实体类 - */ - @ApiModelProperty("更新后的值") - private T newValue; - - /** - * 泛型必须是具体的实体类 - */ - @ApiModelProperty("更新前显示的值") - private T oldRealValue; - - /** - * 泛型必须是具体的实体类 - */ - @ApiModelProperty("更新后显示的值") - private T newRealValue; - - - @ApiModelProperty("字段对应的labelid") - private String fieldNameLabelId; - - @ApiModelProperty("表对应的labelid") - private String tableNameLabelId; - - @ApiModelProperty("对应数据库的表") - private String tableNameDesc; - - - public String getTableName() { - return tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public T getOldValue() { - return oldValue; - } - - public void setOldValue(T oldValue) { - this.oldValue = oldValue; - } - - public T getNewValue() { - return newValue; - } - - public void setNewValue(T newValue) { - this.newValue = newValue; - } - - public String getDataid() { - return dataid; - } - - public void setDataid(String dataid) { - this.dataid = dataid; - } - - public String getBelongDataid() { - return belongDataid; - } - - public void setBelongDataid(String belongDataid) { - this.belongDataid = belongDataid; - } - - public int getIsDetail() { - return isDetail; - } - - public void setIsDetail(int isDetail) { - this.isDetail = isDetail; - } - - public T getOldRealValue() { - return oldRealValue; - } - - public void setOldRealValue(T oldRealValue) { - this.oldRealValue = oldRealValue; - } - - public T getNewRealValue() { - return newRealValue; - } - - public String getFieldNameLabelId() { - return fieldNameLabelId; - } - - public void setFieldNameLabelId(String fieldNameLabelId) { - this.fieldNameLabelId = fieldNameLabelId; - } - - public String getTableNameLabelId() { - return tableNameLabelId; - } - - public void setTableNameLabelId(String tableNameLabelId) { - this.tableNameLabelId = tableNameLabelId; - } - - public String getTableNameDesc() { - return tableNameDesc; - } - - public void setTableNameDesc(String tableNameDesc) { - this.tableNameDesc = tableNameDesc; - } - - public void setNewRealValue(T newRealValue) { - this.newRealValue = newRealValue; - } -} diff --git a/src/com/engine/salary/elog/entity/dto/TableColumnBean.java b/src/com/engine/salary/elog/entity/dto/TableColumnBean.java deleted file mode 100644 index a6fdf6148..000000000 --- a/src/com/engine/salary/elog/entity/dto/TableColumnBean.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.engine.salary.elog.entity.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * @ClassName: TableColumnBean - * @Description 表字段类 - * @Author tanghj - * @Date 2021/3/12 11:44 - */ -@ApiModel("表字段类") -public class TableColumnBean { - - @ApiModelProperty("列名") - private String columnName; - - /** - * varchar(20) - */ - @ApiModelProperty("数据类型") - private String columnType; - - @ApiModelProperty("字段类型-字符串") - private String dataTypeStr; - - @ApiModelProperty("字段类型") - private DataTypeEnum dataType; - - @ApiModelProperty("长度") - private long fieldLength; - - @ApiModelProperty("是否为空") - private boolean isNullable; - - @ApiModelProperty("是否为空-字符串") - private String isNullableStr; - - @ApiModelProperty("默认值") - private Object columnDefault; - - @ApiModelProperty("备注") - private String columnComment; - - public String getColumnName() { - return columnName; - } - - public void setColumnName(String columnName) { - this.columnName = columnName; - } - - public String getColumnType() { - return columnType; - } - - public void setColumnType(String columnType) { - this.columnType = columnType; - } - - public DataTypeEnum getDataType() { - return dataType; - } - - public void setDataType(DataTypeEnum dataType) { - this.dataType = dataType; - } - - public long getFieldLength() { - return fieldLength; - } - - public void setFieldLength(long fieldLength) { - this.fieldLength = fieldLength; - } - - public boolean isNullable() { - return isNullable; - } - - public void setNullable(boolean nullable) { - isNullable = nullable; - } - - public Object getColumnDefault() { - return columnDefault; - } - - public void setColumnDefault(Object columnDefault) { - this.columnDefault = columnDefault; - } - - public String getColumnComment() { - return columnComment; - } - - public void setColumnComment(String columnComment) { - this.columnComment = columnComment; - } - - public String getDataTypeStr() { - return dataTypeStr; - } - - public void setDataTypeStr(String dataTypeStr) { - this.dataTypeStr = dataTypeStr; - } - - public String getIsNullableStr() { - return isNullableStr; - } - - public void setIsNullableStr(String isNullableStr) { - this.isNullableStr = isNullableStr; - } - - public boolean equals(TableColumnBean tableColumnBean) { - - return this.toSql().equals(tableColumnBean.toSql()); - } - - public String toSql() { - - StringBuilder sb = new StringBuilder(this.columnName.toLowerCase()).append(" "); - - if (this.dataType == null) { - return "类型为空"; - } - switch (this.dataType) { - case BIGINT: - case INT: - case TEXT: - case LONGTEXT: - case DATETIME: - case FLOAT: - case TINYINT: - case DOUBLE: - sb.append(this.dataType.name().toLowerCase()).append(" "); - break; - case VARCHAR: - sb.append(this.dataType.name().toLowerCase()).append("(").append(this.fieldLength).append(") "); - break; - case DECIMAL: - long length = (this.fieldLength < 0 || this.fieldLength > 38) ? 0 : this.fieldLength; - sb.append(this.dataType.name().toLowerCase()).append("(").append(38 - length).append(",").append(length).append(") "); - break; - default: - sb.append("varchar").append("(").append(10).append(") "); - } - - sb.append("comment ").append("'").append(this.columnComment).append("' "); - - return sb.toString(); - } -} diff --git a/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java b/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java deleted file mode 100644 index 77132c908..000000000 --- a/src/com/engine/salary/elog/entity/param/ELogGetLogParam.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.engine.salary.elog.entity.param; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ELogGetLogParam { - /** - * 服务(模块)名 - */ - String module; - /** - * 方法名 - */ - String function; - /** - * 查询条件 - */ - String condition; - /** - * 每页多少数据 - */ - String pageSize; - /** - * ' - * 当前页 - */ - String current; - -} diff --git a/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java b/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java deleted file mode 100644 index aec15823d..000000000 --- a/src/com/engine/salary/elog/entity/param/GetDetailChangesParam.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.engine.salary.elog.entity.param; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class GetDetailChangesParam { - /** - * 服务(模块)名 - */ - String module; - /** - * 方法名 - */ - String function; - /** - * 主键id - */ - String mainid; - /** - * 转换方法 - */ - String detailTransMethod; -} diff --git a/src/com/engine/salary/elog/enums/ElogConsts.java b/src/com/engine/salary/elog/enums/ElogConsts.java deleted file mode 100644 index a895b95b8..000000000 --- a/src/com/engine/salary/elog/enums/ElogConsts.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.engine.salary.elog.enums; - -/** - * @date: 2022/3/30 20:32 - * @author: deli.xu - * @description: 日志常量 - */ -public class ElogConsts { - - public static final String ORACLE = "oracle"; - public static final String SQLSERVER = "sqlserver"; - public static final String MYSQL = "mysql"; - public static final String POSTGRESQL = "postgresql"; - - public static final String BASE_TABLE = "BASE_ELOG_TABLE"; - - public static final String TABLE_SPACER = "_"; - public static final String TABLE_SUFFIX = "logs"; - public static final String DETAIL_TABLE_SUFFIX = "_detail"; - - public static final String ES = "ES"; -} diff --git a/src/com/engine/salary/elog/enums/FromTerminalType.java b/src/com/engine/salary/elog/enums/FromTerminalType.java deleted file mode 100644 index d637bb0f9..000000000 --- a/src/com/engine/salary/elog/enums/FromTerminalType.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.engine.salary.elog.enums; - -/** - * @ClassName: FromTerminalType - * @Description TODO - * @Author tanghj - * @Date 2021/6/8 11:35 - */ -public enum FromTerminalType { - PC("pc","来自 pc web"), - ANDROID("android","来自 安卓"), - IOS("ios","来自 iphone"), - IPHONE("iphone","来自 iphone"), - PC_CLIENT("pc_client","来自 windows客户端"), - MAC_CLIENT("mac_client","来自 mac客户端"), - H5("H5","来自 手机H5"), - MOBILEWEB("mobileWeb","来自 手机H5"), - MICO_MSG("mico_msg","来自 微信"), - WECHAT("wechat","来自 企业微信"), - APP_H5("app_h5","来自 app_h5"), - BROWSER("browser", "来自 网页"), - MOBILE("mobile","来自 移动端"); - - private String code; - private String face; - - FromTerminalType(String code, String face) { - this.code = code; - this.face = face; - } - - public String getCode() { - return code; - } - - public String getFace() { - return face; - } - - public static FromTerminalType fromString(String name) { - try { - FromTerminalType type = FromTerminalType.valueOf(name); - return type; - } catch (Exception e) { - return null; - } - } -} diff --git a/src/com/engine/salary/elog/enums/LinkType.java b/src/com/engine/salary/elog/enums/LinkType.java deleted file mode 100644 index ff78362f0..000000000 --- a/src/com/engine/salary/elog/enums/LinkType.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.engine.salary.elog.enums; - -/** - * @date: 2022/5/13 21:13 - * @author: deli.xu - * @description: 链接类型 用之前老eteams-base-bean - */ - -/** - * 链接类型 - * - * @author gk - */ -public enum LinkType { - - // 主线 - mainline("项目"), - - blog("工作日报"), - - workreport("计划报告"), - - clue("线索"), - - crmcontact("联系人-用于全局搜索"), - - marketactivity("活动"), - - crmSummary("报表"), - - statisticalReport("统计报表"), - - attend("出勤"), - - singalForm("表单应用"), - - biaoge("表格"), - - // 标签 - tag("标签"), - - // 表单标签 - formtag("表单标签"), - - // 附件 - attachment("附件"), - - // 用户 - user("用户"), - - // 任务 - task("任务"), - - // 子任务 - subtask("子任务"), - - // 文档 - document("文档"), - - // 文件夹 - folder("文件夹"), - - // 客户 - customer("客户"), - - // 联系人 - contact("联系人"), - - // 销售商机 - saleChance("销售商机"), - - // 产品 - production("产品"), - - // 合同 - contract("合同"), - - // 竞争对手 - competitor("竞争对手"), - - // 公告 - placard("公告"), - - // 审批 - workflow("审批"), - - // 部门 - department("部门"), - - // 岗位 - position("岗位"), - - // 日程 - calendar("日程"), - - // 群组 - group("群组"), - - // 合同 - hrcontract("人事合同"), - - //人事管理 - hr("人事"), - - //KPI - kpi("绩效考核"),kpiFlow("绩效考核流程"), - - // 全部 - all("所有人"), - - formdatareport("数据上报"), - - form("表单"), - - userSetting("不可见成员"), - - sms("短信"), - - wechatEnterprise("企业微信"), - - wechatService("微信服务号"), - - salarybill("工资单"), - - staffPosition("员工位置")/*定制化模块*/, - - app("应用")/*自定义应用*/, - - email("邮件"), - - workTrends("工作动态"), - - tenantLogo("个性化定制"), - - module("模块"), - - orderform("订单"), - - price("价格"), - - capital("资金"), - - quote("报价"), - - room("会议室管理"), - - //模板任务 - mtTask("模板任务"), - - watchMe("关注我的"), - // crm - crm("CRM"), - - // 空 - blank(""), - - role("角色"), - - externalUser("外部联系人"), - - subcompany("分部"); - - private String displayName; - - LinkType(String displayName) { - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } - -} diff --git a/src/com/engine/salary/elog/enums/OperateAuditType.java b/src/com/engine/salary/elog/enums/OperateAuditType.java deleted file mode 100644 index 5d3850c38..000000000 --- a/src/com/engine/salary/elog/enums/OperateAuditType.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.engine.salary.elog.enums; - -public class OperateAuditType { - //自动 - public static final String AUTO = "AUTO"; - //信息 - public static final String INFO = "INFO"; - //错误 - public static final String ERROR = "ERROR"; - //警告 - public static final String WARNING = "WARNING"; - //重大事件 - public static final String EVENT = "EVENT"; -} \ No newline at end of file diff --git a/src/com/engine/salary/elog/service/ILocalElogService.java b/src/com/engine/salary/elog/service/ILocalElogService.java deleted file mode 100644 index af12b54c8..000000000 --- a/src/com/engine/salary/elog/service/ILocalElogService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.engine.salary.elog.service; - -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.LoggerDetailContext; - -public interface ILocalElogService { - - int insertLocalElog(LoggerContext context); - - int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName); - -// void rollBackElog(LoggerContext context); -} diff --git a/src/com/engine/salary/elog/service/ILoggerTableService.java b/src/com/engine/salary/elog/service/ILoggerTableService.java deleted file mode 100644 index 8657f0ea6..000000000 --- a/src/com/engine/salary/elog/service/ILoggerTableService.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.engine.salary.elog.service; - -import com.cloudstore.eccom.pc.table.WeaTable; -import com.engine.salary.elog.entity.param.ELogGetLogParam; -import com.engine.salary.elog.entity.param.GetDetailChangesParam; -import com.engine.salary.util.page.PageInfo; - -import javax.servlet.http.HttpServletRequest; -import java.util.List; -import java.util.Map; - -public interface ILoggerTableService { - PageInfo queryLogs(String data); - - WeaTable queryLogsPapi(String data, HttpServletRequest request); - - List getDetailChanges(GetDetailChangesParam param); - - List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request); - - List queryLogList(ELogGetLogParam param); - - List queryCardLogList(String data); - - Map countLog(String module, String function); - - List queryDetailLogList(String module, String function, String current, String pageSize, String condition, String mainId); - - Map countDestailLog(String module, String function, String mainId); - - WeaTable queryElogTraceInfo(String traceId, String module, String function, Integer currentPage, Integer pageSize,String traceTransMethod); - - List queryLogInfoByCustom(String module, String function, String field, String value, boolean isDetail); - - List queryLogInfoByCustom(String module, String function, String field, String value); - -// BatchDocumentMessage downloadLog(String data); - - WeaTable getDetailChangePages(String module, String function, String mainid, String detailTransMethod, String current, String pageSize); - -} diff --git a/src/com/engine/salary/elog/service/impl/LocalElogService.java b/src/com/engine/salary/elog/service/impl/LocalElogService.java deleted file mode 100644 index 404bea1db..000000000 --- a/src/com/engine/salary/elog/service/impl/LocalElogService.java +++ /dev/null @@ -1,435 +0,0 @@ -package com.engine.salary.elog.service.impl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.LoggerDetailContext; -import com.engine.salary.elog.enums.ElogConsts; -import com.engine.salary.elog.service.ILocalElogService; -import com.engine.salary.elog.util.ElogUtils; -import com.engine.salary.mapper.elog.LocalElogAopDaoMapper; -import com.engine.salary.util.db.IdGenerator; -import com.engine.salary.util.db.MapperProxyFactory; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; -import weaver.conn.RecordSet; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; - -/** - * @ClassName: LocalElogService - * @Description 日志本地持久化 - * @Author tanghj - * @Date 2021/2/24 11:03 - */ -public class LocalElogService implements ILocalElogService { - - private static final Logger logger = LoggerFactory.getLogger(LocalElogService.class); - - private LocalElogAopDaoMapper getLocalElogAopDaoMapper() { - return MapperProxyFactory.getProxy(LocalElogAopDaoMapper.class); - } - -// private RestHighLevelClient client; -// -// private LazyRollBack lazyRollBack; - - //数据库类型 - private static final String databaseId = new RecordSet().getDBType(); - - /** - * @param context - * @param - * @return - */ - @Override - public int insertLocalElog(LoggerContext context) { -// logger.error("接收到的数据,context:{}",JSONObject.toJSONString(context)); -// logger.info("接收到数据的时间:log_date:{}",context.getDate()); - if (StringUtils.isEmpty(context.getUuid())) { - context.setUuid(UUID.randomUUID().toString().replace("-", "")); - } - - String cusColumns = ""; - String cusValus = ""; - if (context.getCustomInfo() != null) { - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(context.getCustomInfo())); - List clobFieldList = context.getClobFieldList(); - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - String keystr = custom.getString(key); - //如果keystr包含单引号,将单引号去掉 - if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { - keystr = keystr.replace("'", "''"); - } - //如果是Oracle数据库 - if (ElogConsts.ORACLE.equals(databaseId)) { - //clob字段集合不为空且包含此字段 - if (!CollectionUtils.isEmpty(clobFieldList) && clobFieldList.contains(key)) { - String clobColumnStr = ElogUtils.handleClobColumn(keystr); - cusValus = cusValus + ",TO_CLOB( " + clobColumnStr + " )"; - } else if (checkStrIsDate(keystr)) { - //并且字符串为时间类型格式 则进行特殊处理 - cusValus = cusValus + ",TO_DATE('" + keystr + "', 'SYYYY-MM-DD HH24:MI:SS')"; - } else { - cusValus = cusValus + ",'" + keystr + "'"; - } - } else { - cusValus = cusValus + ",'" + keystr + "'"; - } - } - - } - - normalizationContext(context); - - String tableName = context.getModuleName() + "_" + context.getFunctionName() + "logs"; - //context.setId(IdGenerator.generate()); - Integer id = getLocalElogAopDaoMapper().queryElogContextById(context.getId(), tableName); - if (id != null) { - return 1; - } -// logger.info("插入前的数据:context:{}",JSONObject.toJSONString(context)); - int count = getLocalElogAopDaoMapper().insertElogContext(context, cusColumns, cusValus, tableName); - if (context.getDetailContexts() != null) { - String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; - insertBatchDetailPrepared(detailTableName, context); - - } - return count; - } - - /** - * 预编译 - * - * @param detailTableName - * @param context - */ - private void insertBatchDetailPrepared(String detailTableName, LoggerContext context) { - // 用mapper - //分两种 有无自定义字段 - List detailContexts = context.getDetailContexts(); - Boolean hasCustonInfo = false; - String cusColumns = ""; - if (Objects.nonNull(detailContexts.get(0).getCustomDetailInfo())) { - hasCustonInfo = true; - //有自定义明细字段 - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContexts.get(0).getCustomDetailInfo())); - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - } - - } - for (LoggerDetailContext detailContext : detailContexts) { - if (StringUtils.isNotEmpty(detailContext.getNewValue())) { - String str = detailContext.getNewValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); - detailContext.setNewValue(str); - } - if (StringUtils.isNotEmpty(detailContext.getOldValue())) { - String str = detailContext.getOldValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); - detailContext.setOldValue(str); - } - if (StringUtils.isNotEmpty(detailContext.getNewRealValue())) { - String str = detailContext.getNewRealValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); - detailContext.setNewRealValue(str); - } - if (StringUtils.isNotEmpty(detailContext.getOldRealValue())) { - String str = detailContext.getOldRealValue().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); - detailContext.setOldRealValue(str); - } - - - detailContext.setTenant_key(context.getTenant_key()); - detailContext.setCreate_time(new Date()); - detailContext.setUpdate_time(new Date()); - detailContext.setCreator(context.getLogOperator()); - detailContext.setId(IdGenerator.generate()); - if (hasCustonInfo) { - String cusValus = ""; - //如果有明细 - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContext.getCustomDetailInfo())); - for (String key : (Set) custom.keySet()) { - String keystr = custom.getString(key); - //如果keystr包含单引号,将单引号去掉 - if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { - keystr = keystr.replace("'", "''"); - } - cusValus = cusValus + ",'" + keystr + "'"; - } - detailContext.setCusValus(cusValus); - } - } - - - if (hasCustonInfo) { - getLocalElogAopDaoMapper().insertElogDetailPreparedHasCustonInfo(detailTableName, detailContexts, context.getUuid(), cusColumns); - } else { - getLocalElogAopDaoMapper().insertElogDetailPrepared(detailTableName, detailContexts, context.getUuid()); - } - } - - - private void normalizationContext(LoggerContext context) { - String params = ""; - if (StringUtils.isNotEmpty(context.getParamsStr())) { - params = context.getParamsStr(); - } else if (context.getParams() != null) { - params = ElogUtils.compress(JSONObject.toJSONString(context.getParams())); - } - - context.setParamsStr(params); - if (StringUtils.isBlank(context.getCancelContextStr())) { - context.setCancelContextStr(context.getCancelContext() == null ? "" : JSONObject.toJSONString(context.getCancelContext())); - } - if (StringUtils.isBlank(context.getRedoContextStr())) { - context.setRedoContextStr(context.getRedoContext() == null ? "" : JSONObject.toJSONString(context.getRedoContext())); - } - - if (StringUtils.isEmpty(context.getOperatedesc())) { - context.setOperatedesc(""); - } else { - //todo 兼容emojo特殊字符 没有时间 先暴力替换 - String str = context.getOperatedesc().replaceAll("[\\x{1F600}-\\x{1F64F}\\x{1F300}-\\x{1F5FF}]", ""); - context.setOperatedesc(str); - } - - if (Objects.isNull(context.getDate())) { - context.setDate(new Date()); - } - - if (StringUtils.isEmpty(context.getOperator())) { - context.setLogOperator(-1l); - } else { - context.setLogOperator(Long.parseLong(context.getOperator())); - } - if (StringUtils.isEmpty(context.getTargetId())) { - context.setLogTargetid(-1l); - } else { - context.setLogTargetid(Long.parseLong(context.getTargetId())); - } - if (StringUtils.isEmpty(context.getClientIp())) { - context.setClientIp("127.0.0.1"); - } - if (Objects.isNull(context.getCreate_time())) { - context.setCreate_time(new Date()); - } - if (Objects.isNull(context.getUpdate_time())) { - context.setUpdate_time(new Date()); - } - if (Objects.isNull(context.getDelete_type())) { - context.setDelete_type(0); - } - } - - private void insertBatchDetailSql(String detailTableName, LoggerContext context) { - String standardField = "id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, oldRealValue,tableNameDesc, tableNameLabelId,fieldNameLabelId, create_time, update_time"; - - Boolean hasCustonInfo = false; - StringBuilder sb = new StringBuilder(); - sb.append("INSERT INTO ").append(detailTableName).append("(").append(standardField); - //List collect = detailContexts.stream().filter(s -> Objects.nonNull(s.getCustomDetailInfo())).collect(Collectors.toList()); - List detailContexts = context.getDetailContexts(); - if (Objects.nonNull(detailContexts.get(0).getCustomDetailInfo())) { - hasCustonInfo = true; - //有自定义明细字段 - String cusColumns = ""; - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContexts.get(0).getCustomDetailInfo())); - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - } - sb.append(cusColumns); - } - sb.append(")"); - if ("oracle".equalsIgnoreCase(databaseId)) { - sb.append(" ").append(String.join(" UNION ALL ", getBatchInsertValue(context, hasCustonInfo, true))); - } else { - sb.append(" VALUES ").append(String.join(",", getBatchInsertValue(context, hasCustonInfo, false))); - } - - try { - getLocalElogAopDaoMapper().batchInsertDetail(sb.toString()); - } catch (Exception e) { - logger.error("明细批量添加sql是:{},批量插入明细失败,{}", sb.toString(), e.getMessage(), e); - } - - - } - - - private List getBatchInsertValue(LoggerContext context, boolean hasCustomInfo, boolean isOracle) { - - LocalDateTime localDateTime = LocalDateTime.now(); - String nowDate = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); - - List detailContexts = context.getDetailContexts(); - List batchValue = new ArrayList<>(); - for (LoggerDetailContext detailContext : detailContexts) { - detailContext.setTenant_key(context.getTenant_key()); - detailContext.setCreator(context.getLogOperator()); - detailContext.setId(IdGenerator.generate()); - - StringBuilder sb = new StringBuilder(); - sb.append(isOracle ? " SELECT " : " ( "); - sb.append(detailContext.getId()) - .append(",'").append(context.getUuid()).append("'") - .append(",'").append(detailContext.getUuid()).append("'") - .append(",'").append(detailContext.getTableName()).append("'") - .append(",'").append(detailContext.getFieldName()).append("'") - .append(",'").append(transferString(detailContext.getNewValue())).append("'") - .append(",'").append(transferString(detailContext.getOldValue())).append("'") - .append(",'").append(detailContext.getFieldDesc()).append("'") - .append(",'").append(detailContext.getShoworder()).append("'") - .append(",'").append(detailContext.getDataid()).append("'") - .append(",'").append(detailContext.getBelongDataid()).append("'") - .append(",'").append(detailContext.getIsDetail()).append("'") - .append(",'").append(detailContext.getTenant_key()).append("'") - .append(",'").append(detailContext.getCreator()).append("'") - .append(",'").append(transferString(detailContext.getNewRealValue())).append("'") - .append(",'").append(transferString(detailContext.getOldRealValue())).append("'") - .append(",'").append(detailContext.getTableNameDesc()).append("'") - .append(",'").append(detailContext.getTableNameLabelId()).append("'") - .append(",'").append(detailContext.getFieldNameLabelId()).append("'") - .append(",").append(handleValue(nowDate, databaseId)) - .append(",").append(handleValue(nowDate, databaseId)); - - if (hasCustomInfo) { - String cusValus = ""; - //如果有明细 - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(detailContext.getCustomDetailInfo())); - for (String key : (Set) custom.keySet()) { - String keystr = custom.getString(key); - //如果keystr包含单引号,将单引号去掉 - if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { - keystr = keystr.replace("'", "''"); - } - cusValus = cusValus + ",'" + keystr + "'"; - } - sb.append(cusValus); - } - String sql = isOracle ? sb.append(" from dual ").toString() : sb.append(")").toString(); - - batchValue.add(sql); - } - - return batchValue; - } - - private String transferString(String str) { - if (StringUtils.isNotEmpty(str)) { - str = str.replaceAll("#\\{", "\\\\\\\\#{"); - if (str.contains("'")) { - str = str.replace("'", "''"); - } - } - return str; - } - - - private String handleValue(String nowDate, String databaseId) { - switch (databaseId) { - case "mysql": - return "'" + nowDate + "'"; - case "oracle": - return "TO_DATE('" + nowDate + "','YYYY-MM-DD HH24:MI:SS')"; - case "sqlserver": - return "'" + nowDate + "'"; - case "postgresql": - return "'" + nowDate + "'"; - - } - return nowDate; - } - -// private void insertESElogCenter(LoggerContext context, String customInfo, String tableName) { -// //将数据转换为ES的数据格式 -// LogESDoc logESDoc = LogESDoc.context2Doc(context, customInfo, tableName); -// String json = JSON.toJSONString(logESDoc); -// String elogESTableName = ElogEsUtils.getElogESTableName(true, ElogEsUtils.getDateStr(context.getDate())); -// IndexRequest indexRequest = new IndexRequest(elogESTableName).id(logESDoc.getId().toString()); -// indexRequest.source(json, XContentType.JSON); -// -// try { -// client.index(indexRequest, RequestOptions.DEFAULT); -// } catch (IOException e) { -//// logger.info("主表数据添加失败:{}",e.getMessage()); -// } -// } - - - @Override - public int insertElogDetail(LoggerDetailContext loggerDetailContext, String mainId, String detailTableName) { - String cusColumns = ""; - String cusValus = ""; - if (loggerDetailContext.getCustomDetailInfo() != null) { - JSONObject custom = JSONObject.parseObject(JSON.toJSONString(loggerDetailContext.getCustomDetailInfo())); - - for (String key : (Set) custom.keySet()) { - cusColumns = cusColumns + ", " + key; - String keystr = custom.getString(key); - //如果keystr包含单引号,将单引号去掉 - if (StringUtils.isNotEmpty(keystr) && keystr.contains("'")) { - keystr = keystr.replace("'", "''"); - } - cusValus = cusValus + ",'" + keystr + "'"; - } - } - loggerDetailContext.setId(IdGenerator.generate()); - return getLocalElogAopDaoMapper().insertElogDetail(loggerDetailContext, mainId, cusColumns, cusValus, detailTableName); - - } - -// @Override -// public void rollBackElog(LoggerContext context) { -// //根据ID 判断数据是否存在 -// -// String tableName = getElogTableName(context.getModuleName(), context.getFunctionName()); -// Integer id = getLocalElogAopDaoMapper().queryElogContextById(context.getId(), tableName); -// //没查到就直接返回 -// if (id == null) { -// lazyRollBack.delayedRollBack(context); -// return; -// } -// getLocalElogAopDaoMapper().rollBackElogById(context.getId(), tableName); -// -//// if (context.getDetailContexts() != null) { -// String detailTableName = context.getModuleName() + "_" + context.getFunctionName() + "logs_detail"; -// //根据uuid回滚 -// getLocalElogAopDaoMapper().rollBackDetailElogByUUID(context.getUuid(), detailTableName); -//// } -// -// -// } - - /** - * 判断字符串是否为日期格式 - */ - public static Boolean checkStrIsDate(String str) { - if (StringUtils.isBlank(str)) { - return false; - } else { - try { - LocalDateTime.parse(str, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); - return true; - } catch (Exception e) { - return false; - } - } - } - - private String getElogTableName(String moduleName, String functionName) { - -// List list = Arrays.asList("meetingTopic", "meetingService", "meetingDecision", "meetingSign", "meetingSignSet", "meetingMember", "meetingShare"); - -// if (list.contains(moduleName)) { -// return "meeting"+ "_" + functionName + "logs"; -// } - - return moduleName + "_" + functionName + "logs"; - - } - -} diff --git a/src/com/engine/salary/elog/service/impl/LoggerTableService.java b/src/com/engine/salary/elog/service/impl/LoggerTableService.java deleted file mode 100644 index a40f63488..000000000 --- a/src/com/engine/salary/elog/service/impl/LoggerTableService.java +++ /dev/null @@ -1,1454 +0,0 @@ -package com.engine.salary.elog.service.impl; - -import cn.hutool.core.date.DateUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.cloudstore.eccom.pc.table.WeaTable; -import com.cloudstore.eccom.pc.table.WeaTableColumn; -import com.engine.core.impl.Service; -import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.elog.annotation.OperateType; -import com.engine.salary.elog.entity.dto.ElogBean; -import com.engine.salary.elog.entity.dto.FilterConditionDto; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.ShowColumsDto; -import com.engine.salary.elog.entity.param.ELogGetLogParam; -import com.engine.salary.elog.entity.param.GetDetailChangesParam; -import com.engine.salary.elog.enums.ElogConsts; -import com.engine.salary.elog.service.ILoggerTableService; -import com.engine.salary.elog.util.ElogServiceUtils; -import com.engine.salary.elog.util.ElogSeviceSwitchUtils; -import com.engine.salary.elog.util.ElogSeviceUtils; -import com.engine.salary.elog.util.FieldNameMap; -import com.engine.salary.mapper.elog.LocalElogDaoMapper; -import com.engine.salary.util.SalaryI18nUtil; -import com.engine.salary.util.db.MapperProxyFactory; -import com.engine.salary.util.page.Column; -import com.engine.salary.util.page.PageInfo; -import com.engine.salary.util.page.SalaryPageUtil; -import com.github.pagehelper.Page; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import weaver.conn.RecordSet; -import weaver.general.Util; - -import javax.servlet.http.HttpServletRequest; -import java.util.*; -import java.util.stream.Collectors; - -public class LoggerTableService extends Service implements ILoggerTableService { - - private static final Logger logger = LoggerFactory.getLogger(LoggerTableService.class); - - private LocalElogDaoMapper getLocalElogDaoMapper() { - return MapperProxyFactory.getProxy(LocalElogDaoMapper.class); - } - - // -// private ComInfoCache comInfoCache; -// -// -// private HrmCommonUtil hrmCommonUtil; -// -// -// private QueryCommonTabeMapper queryCommonTabeMapper; -// -// -// private RestHighLevelClient restHighLevelClient; -// -// @Resource -// private BatchExportSender batchExportSender; -// -// -// @Resource -// private DateRangeTransformer dateRangeTransformer; -// -// -// private HrmCommonEmployeeService hrmCommonEmployeeService; -// -// - private final String databaseId = new RecordSet().getDBType(); - - @Override - public PageInfo queryLogs(String data) { - //解析数据 - ElogBean elogBean = ElogServiceUtils.getElogBean(data); - // columIndex统一转为小写 - Optional.ofNullable(elogBean.getShowColumns()) - .ifPresent(list -> { - list.forEach(x -> { - if (StringUtils.isNotBlank(x.getColumIndex())) { - x.setColumIndex(x.getColumIndex().toLowerCase()); - } - }); - }); - - List showColums = elogBean.getShowColumns(); - String module = elogBean.getModule(); - String function = elogBean.getFunction(); - String searchMap = elogBean.getSearchMap(); - String pageSize = elogBean.getPageSize(); - String pageNum = elogBean.getCurrent(); - String downloadSize = elogBean.getDownloadSize(); - List filterConditionDtos = elogBean.getFilterConditionDtos(); - String transMethod = elogBean.getTransMethod(); - Map authParamsJson = elogBean.getAuthParamsJson(); - - //获取 context 数据 - LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - context.setTenant_key(getTenantKey()); -// context.setOperator(getEmployeeId()); - //获取主表 - String tableName = ElogSeviceUtils.getTableName(module, function); - //获取weaTable - List columns = getWeaColumns(data, showColums, module, function); - //获取条件sql - String searchMapsql = getSearchMapSql(searchMap, module, function, elogBean.getShowColumns()); - String sb = getQueryCondition(filterConditionDtos); - sb = searchMapsql.concat(sb); - String customSql = getCustomSql(transMethod, sb, "before"); - - // 分页 - Page page = null; - if (StringUtils.isEmpty(downloadSize)) { - page = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); - } else { - int pagesize = ElogSeviceUtils.getIntValue(downloadSize, 5000); - page = new Page(1, pagesize); - } - - List list = getLocalElogDaoMapper().queryElogList(page, context, null, tableName, customSql, "*"); - Map countMap = getLocalElogDaoMapper().elogCount(context, tableName, customSql); - - if ("st".equals(databaseId)) { - //st数据库 date类型特殊处理 - list.forEach(map -> { - map.forEach((k, v) -> { - if (v instanceof Date) { - map.put(k, DateUtil.format((Date) v, "yyyy-MM-dd HH:mm:ss")); - } - }); - }); - - } - //处理转换其他数据库类型值 - list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - //处理用户信息Data - - // 大小写转换 - ElogSeviceSwitchUtils.changKey2Lower(list); - - // 存放结果集 - PageInfo pageInfo = SalaryPageUtil.buildPage(page.getPageNum(), page.getPageSize(), switchString(list)); - pageInfo.setTotal(ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); - pageInfo.setColumns(columns); - return pageInfo; - } - - @Override - public WeaTable queryLogsPapi(String data, HttpServletRequest request) { - return null; - } - - @Override - public List getDetailChangesPapi(String module, String function, String mainid, String transMethod, HttpServletRequest request) { - return null; - } - - - private String getshowColumsStr(List showColums) { - StringBuffer sb = new StringBuffer(); - sb.append("id,uuid,targetid,params,operatetype,link_id,link_type,"); - for (ShowColumsDto showColum : showColums) { - String columIndex = showColum.getColumIndex(); - if ("date".equalsIgnoreCase(columIndex) || "createdate".equalsIgnoreCase(columIndex)) { - columIndex = "log_date"; - } else if ("operator".equalsIgnoreCase(columIndex)) { - columIndex = "log_operator"; - } else if ("modulenamespan".equalsIgnoreCase(columIndex)) { - columIndex = "modulename"; - } else if ("functionnameespan".equalsIgnoreCase(columIndex)) { - columIndex = "functionname"; - } else if ("avatar".equals(columIndex)) { - continue; - } - sb.append(columIndex).append(","); - } - String substring = sb.toString().substring(0, sb.toString().length() - 1); - return substring; - } - -// private PermissionParams getPermissionParams(Map hashMap) { -// PermissionParams permissionParams = new PermissionParams(); -// String permissionId = getPermissionStr(hashMap, "permissionId"); -// String permissionType = getPermissionStr(hashMap, "permissionType"); -// String mainDataTableAlias = getPermissionStr(hashMap, "mainDataTableAlias"); -// String mainDataTable = getPermissionStr(hashMap, "mainDataTable"); -// String primaryKey = getPermissionStr(hashMap, "primaryKey"); -// String permissionTargetId = getPermissionStr(hashMap, "permissionTargetId"); -// String permissionConfigSourceId = getPermissionStr(hashMap, "permissionConfigSourceId"); -// -// permissionParams.setPermissionId(permissionId); -// permissionParams.setPermissionType(permissionType); -// permissionParams.setMainDataTableAlias(mainDataTableAlias); -// permissionParams.setMainDataTable(mainDataTable); -// permissionParams.setPrimaryKey(primaryKey); -// permissionParams.setPermissionTargetId(permissionTargetId); -// permissionParams.setPermissionConfigSourceId(permissionConfigSourceId); -// -// return permissionParams; -// -// } - - private List getWeaColumns(String data, List showColums, String module, String function) { - List columns = new ArrayList<>(); - if (showColums != null && showColums.size() > 0) { - for (ShowColumsDto showColum : showColums) { - if (StringUtils.isNotBlank(showColum.getAliasColumName())) { - columns.add(new Column(showColum.getAliasColumName(), showColum.getColumIndex(), showColum.getColumIndex())); - } else if (StringUtils.isNotBlank(showColum.getColumName())) { - columns.add(new Column(FieldNameMap.getMainFieldNameMap(data, function, showColum.getColumName()), showColum.getColumIndex(), showColum.getColumIndex())); - } - } - } else { - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "moduleName"), "modulenamespan", "modulenamespan")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "functionName"), "functionnamespan", "functionnamespan")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "clientIp"), "clientip", "clientip")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "operateTypeName"), "operatetypename", "operatetypename")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "targetName"), "targetname", "targetname")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "date"), "createdate", "createdate")); - columns.add(new Column(FieldNameMap.getMainFieldNameMap(module, function, "operatorName"), "operatorname", "operatorname")); - } - return columns; - } - - private String getTargetid(List filterConditionDtos) { - if (!filterConditionDtos.isEmpty()) { - for (FilterConditionDto filterConditionDto : filterConditionDtos) { - if ("targetid".equalsIgnoreCase(filterConditionDto.getColumIndex())) { - return filterConditionDto.getValue(); - } - } - } - return ""; - } - - private String getPermissionStr(Map hashMap, String str) { - if (hashMap != null && hashMap.size() > 0) { - Object obj = hashMap.get(str); - if (obj != null) { - return obj.toString(); - } - } - return ""; - } - -// private Map getCustomAuthSql(String transMethod, Map params, String prefix) { -// MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); -// Map hashMap = new HashMap<>(); -// if (beforeMethodHandler != null) { -// try { -// hashMap.put("flag", true); -// hashMap.put("msg", ""); -// hashMap.putAll(params); -// Object execute = beforeMethodHandler.execute(hashMap); -// if (execute != null && execute instanceof Map) { -// Map map = (Map) execute; -// return map; -// } -// } catch (Exception e) { -// logger.error("转换出错:" + e); -// throw new RuntimeException(e.getMessage()); -// } -// } -// return hashMap; -// } - - - private String getCustomSql(String transMethod, String sql, String prefix) { -// MethodHandler beforeMethodHandler = ElogMethodHandler.loadMethodHandler(prefix + transMethod); -// boolean flag = false; -// if (beforeMethodHandler != null) { -// try { -// String subSql = ""; -// if (sql.length() > 5) { -// flag = true; -// subSql = sql.substring(5, sql.length()); -// } -// Object execute = beforeMethodHandler.execute(subSql); -// if (execute != null) { -// if (execute instanceof String) { -// StringBuffer sb = null; -// if(execute.toString().length()==0){ -// sb = new StringBuffer(); -// } else if (flag || execute.toString().length() > 0) { -// sb = new StringBuffer(" and "); -// } else { -// sb = new StringBuffer(); -// } -// -// sb.append(execute.toString()); -// return sb.toString(); -// } -// } -// } catch (Exception e) { -// logger.error("转换出错:" + e); -// throw new RuntimeException(e.getMessage()); -// } -// } - return sql; - } - - private void transUserInfo(List list) { -// List operators = new ArrayList<>(); -// if (list != null && list.size() > 0) { -// for (Map map : list) { -// //避免暴露内网地址 -// map.remove("requesturl"); -// -// Object operator = map.get("operator"); -// if (operator != null && StringUtils.isNotBlank(operator.toString())) { -// operators.add(ElogSeviceUtils.getLongValue(operator.toString())); -// } -// } -// } -// List cacheList = comInfoCache.getCacheList(HrmEmployeeComInfo.class, operators); -// Map infoHashMap = new HashMap<>(); -// if (cacheList != null && cacheList.size() > 0) { -// for (HrmEmployeeComInfo hrmEmployeeComInfo : cacheList) { -// HrmAvatarComInfo hrmAvatarComInfo = (HrmAvatarComInfo) comInfoCache.getCacheById(HrmAvatarComInfo.class, hrmEmployeeComInfo.getAvatar()); -// ElogHrmSimpleEmployeeInfo info = new ElogHrmSimpleEmployeeInfo(); -// if (hrmAvatarComInfo != null) { -// info.setAvatarP3Id(hrmAvatarComInfo.getP3()); -// } -// info.setId(hrmEmployeeComInfo.getId()); -// info.setUserName(hrmEmployeeComInfo.getUsername()); -// infoHashMap.put(hrmEmployeeComInfo.getId(), info); -// } -// } -// if (list != null && list.size() > 0) { -// for (Map map : list) { -// Object operator = map.get("operator"); -// if (map.get("params") != null && map.get("params").toString().startsWith("H4s")) { -// map.put("params", ElogSeviceUtils.uncompress(map.get("params").toString())); -// } -// map.put("dboperatorname", Util.null2String(map.get("operatorname"))); -// if (operator != null && StringUtils.isNotBlank(operator.toString())) { -// Map i18nOperatorMap = new HashMap<>(); -// ElogHrmSimpleEmployeeInfo hrmEmployeeComInfo = infoHashMap.get(Long.parseLong(operator.toString())); -// if (hrmEmployeeComInfo != null) { -// //获取最新的人员名称并进行多语言转换 -// i18nOperatorMap.put(Long.parseLong(operator.toString()), hrmEmployeeComInfo.getUserName()); -// Map parseI18nOperator = HrmI18nUtil.batchCovertEmployee(i18nOperatorMap, map.get("tenant_key").toString()); -// map.put("operatorname", parseI18nOperator.get(Long.parseLong(operator.toString()))); -// -//// if (StringUtils.isNotEmpty(hrmEmployeeComInfo.getUserName())) { -//// map.put("operatorname", hrmEmployeeComInfo.getUserName()); -//// } -// if (hrmEmployeeComInfo.getAvatarP3Id() != null) { -// map.put("avatar", hrmEmployeeComInfo.getAvatarP3Id()); -// } -// } -// } -// } -// } - } - - /** - * 获取宽度 - * - * @param showColum - * @return - */ - private String getColumnsWidth(ShowColumsDto showColum) { - if (StringUtils.isBlank(showColum.getWidth())) { - return "5%"; - } else { - return showColum.getWidth(); - } - } - - private String getTenantKey() { -// User currentUser = UserContext.getCurrentUser(); -// if (currentUser != null) { -// return currentUser.getTenantKey(); -// } else { -// String tenantKey = TenantRpcContext.getTenantKey(); -// if (StringUtils.isNotBlank(tenantKey)) { -// return tenantKey; -// } -// } - return SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; - } - -// private String getEmployeeId() { -// -// User currentUser = UserContext.getCurrentUser(); -// if (currentUser != null && !currentUser.isAdmin()) { -// String employeeId = TenantRpcContext.getEmployeeId(); -// return StringUtils.isNotBlank(employeeId) ? employeeId : ""; -// } -// return ""; -// } -// -// private String getUserId() { -// User currentUser = UserContext.getCurrentUser(); -// if (currentUser != null) { -// return currentUser.getEmployeeId().toString(); -// } -// String employeeId = TenantRpcContext.getEmployeeId(); -// return StringUtils.isNotBlank(employeeId) ? employeeId : ""; -// } - - /** - * 拼接搜索条件 - * - * @param searchMap - * @param module - * @param function - * @return - */ - private String getSearchMapSql(String searchMap, String module, String function, List showColumns) { - StringBuffer sb = new StringBuffer(); - Map map = JSON.parseObject(searchMap); - if (map == null) return sb.toString(); - Iterator> iterators = map.entrySet().iterator(); - while (iterators.hasNext()) { - Map.Entry next = iterators.next(); - String key = next.getKey(); -// SecurityUtil.sqlCheck(key); - if ("date".equals(key) || "createdate".equals(key)) { - Object date = next.getValue(); - if (date != null) { - if (StringUtils.isNotBlank(date.toString())) { - List dates = (List) date; -// if (dates != null && dates.size() == 2) { -// Object startDate = dates.get(0); -// Object endDate = dates.get(1); -// startDate = ElogSeviceUtils.checkValSql(startDate.toString()); -// endDate = ElogSeviceUtils.checkValSql(endDate.toString()); -// if (StringUtils.isNotBlank(startDate.toString()) && StringUtils.isNotBlank(endDate.toString())) { -// startDate = startDate.toString().replaceAll("'", "''"); -// endDate = endDate.toString().replaceAll("'", "''"); -// String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); -// String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); -// sb.append(" and log_date ").append(" between ").append(getSwithDatabaseDate(dateRangeAfter)).append(" and ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); -// } else if (StringUtils.isNotBlank(startDate.toString())) { -// String dateRangeAfter = dateRangeTransformer.getDateRangeAfter(startDate.toString()); -// sb.append(" and log_date ").append(" >= ").append(getSwithDatabaseDate(dateRangeAfter)).append(" "); -// } else if (StringUtils.isNotBlank(endDate.toString())) { -// String dateRangeBefore = dateRangeTransformer.getDateRangeBefore(endDate.toString()); -// sb.append(" and log_date ").append(" <= ").append(getSwithDatabaseDate(dateRangeBefore)).append(" "); -// } -// } - } - } - } else if ("operator".equals(next.getKey())) { - Object operator = next.getValue(); - if (operator != null) { - if (StringUtils.isNotBlank(operator.toString())) { - operator = ElogSeviceUtils.checkValSql(operator.toString()); - operator = operator.toString().replaceAll("'", "''"); - if (StringUtils.isNumeric(operator.toString()) && operator.toString().length() > 15) { - sb.append(" and log_operator = ").append(operator.toString()).append(" "); - } - -// else { -// List likeNameHrmEmployeeList = hrmCommonEmployeeService.queryEmpsByCondidtion( -// new HrmOrgEmpCondition().setNameLikeList(Arrays.asList(operator.toString())).setTenantKey(getTenantKey()), -// HrmConditionResultType.BEAN.name()); -// if (likeNameHrmEmployeeList != null && likeNameHrmEmployeeList.size() > 0) { -// List ids = likeNameHrmEmployeeList.stream().map(HrmEmployee::getId).collect(Collectors.toList()); -// if (ids != null && ids.size() > 0) { -// sb.append(" and ( operatorname like '%").append(operator.toString()).append("%' ") -// .append(" or log_operator in (").append(StringUtils.join(ids, ",")).append(")) "); -// } -// } else { -// sb.append(" and operatorname like '%").append(operator.toString()).append("%' "); -// } -// } - } - } - } else if ("modulename".equals(next.getKey())) { - Object moduleName = next.getValue(); - if (moduleName != null) { - moduleName = moduleName.toString().replaceAll("'", "''"); - if (StringUtils.isNotBlank(moduleName.toString())) { - moduleName = ElogSeviceUtils.checkValSql(moduleName.toString()); - //sb.append(" and modulename = '").append(moduleName.toString()).append("' "); - StringBuffer stringBuffer = new StringBuffer(); - if (isEnglish(moduleName.toString())) { - Map moduleMap = ElogSeviceSwitchUtils.moduleMap; - Iterator> iterator = moduleMap.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry nextObj = iterator.next(); - if (nextObj.getKey().contains(moduleName.toString())) { - stringBuffer.append("'").append(nextObj.getKey()).append("',"); - } - } - - } else { - Map moduleMap = ElogSeviceSwitchUtils.moduleMap; - Iterator> iterator = moduleMap.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry nextObj = iterator.next(); - String val = ElogSeviceSwitchUtils.getModuleName(nextObj.getValue() + ""); - if (val.contains(moduleName.toString())) { - stringBuffer.append("'").append(nextObj.getKey()).append("',"); - } - } - } - String str = ""; - if (stringBuffer.toString().length() > 0) { - str = stringBuffer.substring(0, stringBuffer.length() - 1); - String inVals = str.toString().replaceAll("''", "'"); - sb.append(" and modulename in (").append(inVals).append(") "); - } else { - sb.append(" and modulename = '").append(moduleName.toString()).append("' "); - } - } - } - } else if (databaseId.equalsIgnoreCase(ElogConsts.POSTGRESQL) && "targetid".equalsIgnoreCase(next.getKey())) { - //兼容PG环境int类型不支持模糊搜索的问题 - String value = next.getValue().toString().replaceAll("'", "''"); - value = ElogSeviceUtils.checkValSql(value.toString()); - if (value.startsWith("_")) { - value = value.replace("_", "\\_"); - } - //将类型转为varchar再进行查询 - sb.append(" and ").append("cast(").append(key).append(" as VARCHAR(255) )").append(" like '%").append(value).append("%' "); - } else { - - if (next.getValue() != null && StringUtils.isNotBlank(key) && StringUtils.isNotBlank(next.getValue().toString())) { - String value = next.getValue().toString().replaceAll("'", "''"); - value = ElogSeviceUtils.checkValSql(value.toString()); - StringBuilder stringBuffer = new StringBuilder(); -// if (isLikeSearch(showColumns, key)) { -// String logSearchSql = I18nUtil.getLogSearchSql(ElogSeviceUtils.getTableName(module, function), key, value); -// String sql = logSearchSql.replaceAll("%_", "%\\\\_"); -// try { -// List maps = queryCommonTabeMapper.queryLabelIds(sql); -// if (maps != null && maps.size() > 0) { -// for (Map map1 : maps) { -// Object indexid = map1.get(key); -// if (indexid == null || StringUtils.isEmpty(indexid.toString())) { -// indexid = map1.get(key.toLowerCase()); -// } -// if (indexid != null && StringUtils.isNotEmpty(indexid.toString())) { -// String val = indexid.toString().replace("'", "''"); -// if (ElogSeviceUtils.checkIsNumber(map.get(key))) { -// val = "-" + val; -// value = "-" + value; -// } -// stringBuffer.append("'").append(val).append("',"); -// } -// } -// } -// } catch (Exception e) { -// logger.error("i18查询sql报错:{}", e.getMessage(), e); -// } -// -// } - String str = ""; - if (stringBuffer.toString().length() > 0) { - str = stringBuffer.substring(0, stringBuffer.length() - 1); - if (value.startsWith("_")) { - value = value.replace("_", "\\_"); - } - sb.append(" and (").append(key).append(" like '%").append(value).append("%' "); - //String inVals = str.toString().replaceAll("''", "'"); - if (str.startsWith("_")) { - str = str.replace("_", "\\_"); - } - if ("operatetypename".equals(key)) { - String s = ElogSeviceUtils.checkValSql(next.getValue().toString()); - sb.append(matchOperatetype(s)); - } - sb.append(" or ").append(key).append(" in (").append(str).append(")) "); - } else { - if ("operatetypename".equals(key)) { - sb.append(" and (").append(key).append(" like '%").append(value).append("%' "); - String s = ElogSeviceUtils.checkValSql(next.getValue().toString()); - sb.append(matchOperatetype(s)).append(")"); - } else { - if (value.startsWith("_")) { - value = value.replace("_", "\\_"); - } - sb.append(" and ").append(key).append(" like '%").append(value).append("%' "); - } - } - - } - } - } - return sb.toString(); - } - -// /** -// * 是否模糊搜索 -// * -// * @param showColumns -// * @param key -// * @return -// */ -// private boolean isLikeSearch(List showColumns, String key) { -// for (ShowColumsDto showColumn : showColumns) { -// if (key.equalsIgnoreCase(showColumn.getColumIndex()) && showColumn.isTransfLanguage()) { -// return true; -// } -// } -// return false; -// } - -// private String getSwithDatabaseDate(String date) { -// if (ElogConsts.ORACLE.equals(DatabaseUtil.getDatabaseId())) { -// return " to_date('" + date + "','yyyy-mm-dd hh24:mi:ss') "; -// } else if (ElogConsts.POSTGRESQL.equals(DatabaseUtil.getDatabaseId())) { -// return " to_timestamp('" + date + "', 'YYYY-MM-DD HH24:MI:SS') "; -// } else if (ElogConsts.SQLSERVER.equals(DatabaseUtil.getDatabaseId())) { -// return " convert(nvarchar(19),'" + date + "',120) "; -// } else { -// return " DATE_FORMAT('" + date + "','%Y-%m-%d %H:%i:%s') "; -// } -// } - - public String matchOperatetype(String str) { -// if (ElogSeviceUtils.currentLanguage() != 8) { -// return ""; -// } - List list = new ArrayList(); - list.add(OperateType.add); - list.add(OperateType.update); - list.add(OperateType.view); - list.add(OperateType.delete); - - StringBuffer sb = new StringBuffer(); - for (String o : list) { - if (o.toLowerCase().contains(str.toLowerCase())) { - sb.append("'").append(o).append("',"); - } - } - if ("new".toLowerCase().contains(str.toLowerCase())) { - sb.append("'add',"); - } - String sql = ""; - if (sb.length() > 0) { - sql = sb.toString().substring(0, sb.length() - 1); - sql = "or operatetype in (" + sql + ")"; - } - - return sql; - - } - - - public static boolean isEnglish(String charaString) { - return charaString.matches("^[a-zA-Z]*"); - - } - - /** - * 获取搜索条件 - * - * @param filterConditionDtos - * @return - */ - private String getQueryCondition(List filterConditionDtos) { - StringBuffer sb = new StringBuffer(); - if (filterConditionDtos != null && filterConditionDtos.size() > 0) { - for (FilterConditionDto filterConditionDto : filterConditionDtos) { - if (StringUtils.isNotBlank(filterConditionDto.getColumIndex())) { - sb.append(getsql(filterConditionDto)); - } - } - } - return sb.toString(); - } - - /** - * 拼接sql - * - * @param filterConditionDto - * @return - */ - private String getsql(FilterConditionDto filterConditionDto) { - StringBuffer sb = new StringBuffer(); - filterConditionDto.setConnectCondition(ElogSeviceUtils.checkConditionSql(filterConditionDto.getConnectCondition())); - filterConditionDto.setType(ElogSeviceUtils.checkTypeSql(filterConditionDto.getType())); - filterConditionDto.setValue(ElogSeviceUtils.checkValSql(filterConditionDto.getValue())); - switchDatabaseFieldIndex(filterConditionDto); - if ("LIKE".equalsIgnoreCase(filterConditionDto.getType())) { - if (filterConditionDto.getLike() != null) { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" '"). - append(filterConditionDto.getLike().getPrefix() != null ? filterConditionDto.getLike().getPrefix() : ""). - append(filterConditionDto.getValue()). - append(filterConditionDto.getLike().getSuffix() != null ? filterConditionDto.getLike().getSuffix() : ""). - append("' "); - } - } else if ("IN".equalsIgnoreCase(filterConditionDto.getType())) { - String[] split = filterConditionDto.getValue().split("\",\""); - if (split.length > 0) { - StringBuffer str = new StringBuffer("("); - String value = ""; - if ("targetid".equals(filterConditionDto.getColumIndex()) || "log_operator".equals(filterConditionDto.getColumIndex())) { - List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); - for (String s : list) { - str.append(s).append(","); - } - } else { - List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); - for (String s : list) { - str.append("'").append(s).append("',"); - } - } - - value = str.toString().substring(0, str.length() - 1); - value += ")"; - switchDatabaseFieldIndex(filterConditionDto); - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(value). - append(" "); - - } else if (split.length == 0) { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" ('"). - append(filterConditionDto.getValue()). - append("') "); - } - } else if ("IS NULL".equalsIgnoreCase(filterConditionDto.getType()) || "IS NOT NULL".equalsIgnoreCase(filterConditionDto.getType())) { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" "); - } else if ("BETWEEN".equalsIgnoreCase(filterConditionDto.getType())) { - String[] split = filterConditionDto.getValue().split("\",\""); - StringBuffer stringBuffer = new StringBuffer(); - if (split.length > 0) { - List list = JSONArray.parseArray(filterConditionDto.getValue(), String.class); - String str = ""; - for (String s : list) { - stringBuffer.append(" '").append(s).append("' AND"); - } - str = stringBuffer.toString().substring(0, stringBuffer.length() - 3); - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(str). - append(" "); - } else if (split.length == 0) { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" '"). - append(filterConditionDto.getValue()). - append("' "); - } - } else { - if ("targetid".equals(filterConditionDto.getColumIndex()) || "log_operator".equals(filterConditionDto.getColumIndex())) { - if (StringUtils.isNotBlank(filterConditionDto.getValue())) { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" "). - append(filterConditionDto.getValue()). - append(" "); - } else { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" "). - append(-1). - append(" "); - } - } else { - sb.append(" "). - append(getConnectCondition(filterConditionDto.getConnectCondition())). - append(" "). - append(filterConditionDto.getColumIndex()). - append(" "). - append(getQueryType(filterConditionDto.getType())). - append(" '"). - append(filterConditionDto.getValue()). - append("' "); - } - - } - return sb.toString(); - } - - private void switchDatabaseFieldIndex(FilterConditionDto filterConditionDto) { - if ("operator".equalsIgnoreCase(filterConditionDto.getColumIndex())) { - filterConditionDto.setColumIndex("log_operator"); - } else if ("date".equalsIgnoreCase(filterConditionDto.getColumIndex())) { - filterConditionDto.setColumIndex("log_date"); - } else if ("result".equalsIgnoreCase(filterConditionDto.getColumIndex())) { - filterConditionDto.setColumIndex("log_result"); - } - } - - - /** - * 获取查询类型 - * - * @param type - * @return - */ - private String getQueryType(String type) { - //如果不填默认是= - if (StringUtils.isBlank(type)) { - return " = "; - } - return type; - } - - /** - * 获取连接条件 - * - * @param connectCondition - * @return - */ - private String getConnectCondition(String connectCondition) { - //如果不填默认是AND - if (StringUtils.isBlank(connectCondition)) { - return " AND "; - } - return connectCondition; - } - - @Override - public List> getDetailChanges(GetDetailChangesParam param) { - return getDetailChangesMethod(param.getModule(), param.getFunction(), param.getMainid(), param.getDetailTransMethod(), null); - } - - /** - * 明细分页查询 - * - * @param module - * @param function - * @param mainid - * @param detailTransMethod - * @param current - * @param pageSize - * @return - */ - @Override - public WeaTable getDetailChangePages(String module, String function, String mainid, String detailTransMethod, String current, String pageSize) { - - Integer pageNum = Util.getIntValue(current, 1); - Integer size = Util.getIntValue(pageSize, 10); - Page page = new Page(pageNum, size); - - List> list = getDetailChangesMethod(module, function, mainid, null, page); - - //查询分页总数 - String tableName = ElogSeviceUtils.getTableName(module, function, true); - Integer total = getLocalElogDaoMapper().queryAllChangesPageCounts(tableName, mainid); - WeaTable weaTable = new WeaTable(); - weaTable.setColumns(getDetailColumns(list)); - - - PageInfo pageInfo = SalaryPageUtil.buildPage(pageNum, size, list); - pageInfo.setTotal(total); - - return weaTable; - } - - private List getDetailColumns(List> list) { - - List columns = new ArrayList<>(); - if (CollectionUtils.isNotEmpty(list)) { - List detailcontexts = (List) list.get(0).get("detailcontexts"); - if (CollectionUtils.isNotEmpty(detailcontexts)) { - for (Map map : detailcontexts) { - WeaTableColumn weaTableColumn = new WeaTableColumn(); - // 列表属性名 - weaTableColumn.setColumn((String) map.get("fieldname")); - //显示名称 多语言转换 fieldnamelabelid - weaTableColumn.setText((String) map.get("fieldname")); - columns.add(weaTableColumn); - } - } - } - return columns; - } - - public List> getDetailChangesMethod(String module, String function, String mainid, String detailTransMethod, Page page) { - - List list = new ArrayList<>(); - String tableName = ElogSeviceUtils.getTableName(module, function, true); - String maintableName = ElogSeviceUtils.getTableName(module, function, false); - List maps = getLocalElogDaoMapper().queryAllMainData(maintableName, mainid); - - maps = ElogSeviceSwitchUtils.getSwitchDatabaseData(maps); - ElogSeviceSwitchUtils.changKey2Lower(maps); - List allChangesData = new ArrayList<>(); - //如果有分页数据则走分页方法 - if (Objects.nonNull(page)) { -// Integer offset = (pageNum - 1) * size; - //分页查询明细数据 - allChangesData = getLocalElogDaoMapper().queryAllChangesDataPages(tableName, mainid, page); - } else { - //没有被则不分页 - allChangesData = getLocalElogDaoMapper().queryAllChangesData(tableName, mainid); - } - ElogSeviceSwitchUtils.changKey2Lower(allChangesData); - allChangesData = ElogSeviceSwitchUtils.getSwitchDatabaseData(allChangesData); - List mainlist = new ArrayList<>(); - List detaillist = new ArrayList<>(); - if (allChangesData != null && allChangesData.size() > 0) { - for (Map allChangesDatum : allChangesData) { - Object o = allChangesDatum.get("isdetail"); - if (o != null) { - if ("0".equals(o.toString())) { - mainlist.add(allChangesDatum); - } else { - detaillist.add(allChangesDatum); - } - } - } - } -// List mainlist = getLocalElogDaoMapper().queryAllMainChanges(tableName, mainid); -// List detaillist = getLocalElogDaoMapper().queryAllDetailChanges(tableName, mainid); - //List moduleInfo = queryCommonTabeMapper.queryModuleNameInfo(module); - List moduleInfo = new ArrayList<>(); - processDetailInfo(mainlist, detaillist, moduleInfo); - Map map = ElogSeviceSwitchUtils.switchChangeValue(mainlist, maps); - Map detailMap = ElogSeviceSwitchUtils.switchDetailChangeValue(detaillist); - map.putAll(detailMap); - if (maps != null && maps.size() > 0) { - Map maininfoMap = maps.get(0); - String operatetypename = (String) maininfoMap.get("operatetypename"); - String targetname = (String) maininfoMap.get("targetname"); - //长度大于1避免部分模块为1,2,3这类的操作类型 - if (StringUtils.isNumeric(operatetypename) && operatetypename.length() > 1 && operatetypename.length() < 10) { - String transfOperatetypename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(operatetypename), operatetypename); - maininfoMap.put("operatetypename", transfOperatetypename); - } - if (StringUtils.isNumeric(targetname) && targetname.length() > 1 && targetname.length() < 10) { - String transfTargetname = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(targetname), targetname); - maininfoMap.put("targetname", transfTargetname); - } - map.put("maininfo", maininfoMap); - - map.put("detailtitle", ""); - } - - list.add(map); - //List transfLanguageData = ElogSeviceSwitchUtils.transfLanguageData(list); - return list; - - } - - /** - * 处理修改详情转多语言(主表和明细表) - * - * @param mainlist - * @param detaillist - * @param commonTableInfo - * @return - */ - private void processDetailInfo(List mainlist, List detaillist, List commonTableInfo) { - Map tablenameMap = new HashMap<>(); - Map fieldnameMap = new HashMap<>(); - Map valueMap = new HashMap<>(); - - if (commonTableInfo != null && commonTableInfo.size() > 0) { - for (Map commonTableInfoMap : commonTableInfo) { - JSONObject commonTableInfoMapJs = JSONObject.parseObject(JSONObject.toJSONString(commonTableInfoMap)); - String tablename = commonTableInfoMapJs.getString("table_name"); - String tablename_labelid = commonTableInfoMapJs.getString("tablename_labelid"); - String fieldname = commonTableInfoMapJs.getString("field_name"); - String fieldname_labelid = commonTableInfoMapJs.getString("fieldname_labelid"); - String values_kvpairs = commonTableInfoMapJs.getString("values_kvpairs"); - fieldnameMap.put(fieldname, fieldname_labelid); - if (StringUtils.isNotBlank(fieldname) && StringUtils.isNotBlank(values_kvpairs)) { - JSONObject jsonObject = JSONObject.parseObject(values_kvpairs); - valueMap.put(fieldname, jsonObject); - } - Object tablenameObj = tablenameMap.get(tablename); - if (tablenameObj == null) { - tablenameMap.put(tablename, tablename_labelid); - } - } - } - - - if (mainlist != null && mainlist.size() > 0 && fieldnameMap.size() > 0 && valueMap.size() > 0) { - for (Map mainlistMap : mainlist) { - JSONObject mainMapJs = JSONObject.parseObject(JSONObject.toJSONString(mainlistMap)); - String fielddesc = mainMapJs.getString("fielddesc"); - String oldvalue = mainMapJs.getString("oldvalue"); - String newvalue = mainMapJs.getString("newvalue"); - if (fieldnameMap.get(fielddesc) != null) { - mainlistMap.put("fielddesc", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(fieldnameMap.get(fielddesc).toString()), fieldnameMap.get(fielddesc).toString())); - } - if (valueMap.get(fielddesc) != null) { - JSONObject jsonObject = JSONObject.parseObject(valueMap.get(fielddesc).toString()); - String oldvalueStr = jsonObject.getString(oldvalue); - String newvalueStr = jsonObject.getString(newvalue); - if (StringUtils.isNotBlank(oldvalueStr)) { - mainlistMap.put("oldvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(oldvalueStr), oldvalue)); - } - if (StringUtils.isNotBlank(newvalueStr)) { - mainlistMap.put("newvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(newvalueStr), newvalue)); - } - } - } - } - - if (detaillist != null && detaillist.size() > 0 && fieldnameMap.size() > 0 && valueMap.size() > 0) { - for (Map detaillistMap : detaillist) { - JSONObject mainMapJs = JSONObject.parseObject(JSONObject.toJSONString(detaillistMap)); - String tablename = mainMapJs.getString("tablename"); - String fielddesc = mainMapJs.getString("fielddesc"); - String oldvalue = mainMapJs.getString("oldvalue"); - String newvalue = mainMapJs.getString("newvalue"); - if (tablenameMap.get(tablename) != null) { - detaillistMap.put("tablename", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(tablenameMap.get(tablename).toString()), tablenameMap.get(tablename).toString())); - } - if (fieldnameMap.get(fielddesc) != null) { - detaillistMap.put("fielddesc", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(fieldnameMap.get(fielddesc).toString()), fieldnameMap.get(fielddesc).toString())); - } - if (valueMap.get(fielddesc) != null) { - JSONObject jsonObject = JSONObject.parseObject(valueMap.get(fielddesc).toString()); - String oldvalueStr = jsonObject.getString(oldvalue); - String newvalueStr = jsonObject.getString(newvalue); - if (StringUtils.isNotBlank(oldvalueStr)) { - detaillistMap.put("oldvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(oldvalueStr), oldvalue)); - } - if (StringUtils.isNotBlank(newvalueStr)) { - detaillistMap.put("newvalue", ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(newvalueStr), newvalue)); - } - } - } - } - - } - - @Override - public List queryLogList(ELogGetLogParam param) { - LoggerContext context = new LoggerContext(); - context.setModuleName(param.getModule()); - context.setFunctionName(param.getFunction()); - int pagenum = Util.getIntValue(param.getCurrent(), 1) - 1; - int size = Util.getIntValue(param.getPageSize(), 10); - int start = pagenum * size; - int end = start + size; - Page page = new Page(pagenum, size); - String limit = " limit " + start + "," + (end - start); - - String tableName = ElogSeviceUtils.getTableName(param.getModule(), param.getFunction()); - List list = getLocalElogDaoMapper().queryElogList(page, context, null, tableName, null, "*"); - list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - return switchString(list); - } - - @Override - public List queryCardLogList(String data) { - JSONObject map = JSONObject.parseObject(data); - String module = ""; - String function = ""; - String pageNum = ""; - String pageSize = ""; - String dataset = ""; - String searchMap = ""; - String sColum = ""; - String fColum = ""; - String transMethod = null; - List showColums = new ArrayList<>(); - List filterConditionDtos = new ArrayList<>(); - String authParams = ""; - Map jsonObject = new HashMap(); - if (map != null) { - module = map.getString("module"); - function = map.getString("function"); - pageNum = map.getString("pageNum"); - pageSize = map.getString("pageSize"); - //dataset = map.get("dataset").toString(); - searchMap = map.getString("searchMap"); - sColum = map.getString("showColums"); - showColums = JSONArray.parseArray(sColum, ShowColumsDto.class); - fColum = map.getString("filterConditions"); - transMethod = map.getString("transMethod"); - filterConditionDtos = JSONArray.parseArray(fColum, FilterConditionDto.class); - authParams = map.getString("authParams"); - jsonObject = JSONObject.parseObject(authParams); - } - LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - context.setTenant_key(getTenantKey().toLowerCase()); - // 分页 - //Page pages = ElogSeviceUtils.getPage(); - String sb = getQueryCondition(filterConditionDtos); - logger.info("elog查询条件拼接sql:{}", sb); - // 消费到消息,通过MethodHandler调用对应的方法 - String customSql = getCustomSql(transMethod, sb, "before"); - - Page pages = new Page(ElogSeviceUtils.getIntValue(pageNum, 1), ElogSeviceUtils.getIntValue(pageSize, 10)); - int page = Util.getIntValue(pages.getPageNum() + "", 1) - 1; - int size = Util.getIntValue(pages.getPageSize() + "", 10); - int start = page * size; - int end = start + size; - String limit = " limit " + start + "," + (end - start); - String tableName = ElogSeviceUtils.getTableName(module, function); - - //String columns = getshowColumsStr(showColums); - List list = new ArrayList<>(); - Map countMap = new HashMap<>(); - list = getLocalElogDaoMapper().queryElogList(pages, context, null, tableName, customSql, "*"); - countMap = getLocalElogDaoMapper().elogCount(context, tableName, customSql); - list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - - if (list != null && list.size() > 0) { - //if ("1".equals(pageNum)){ - list.get(0).put("total", ElogSeviceUtils.getLongValue(countMap.get("counts") + "", 0)); - //} - } - transUserInfo(list); - //System.out.println("elog查询名称和头像耗时:{}"+ (l3-l2)); - transfLanguageData(list, showColums); - List res = switchString(list); - return res; - } - - /** - * 转换数据成多语言,结合前端转 - * - * @param lists - * @param showColums - */ - public static List transfLanguageData(List lists, List showColums) { - if (lists != null && lists.size() > 0) { - for (Map map : lists) { - if (map != null) { - Iterator> iterator = map.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = iterator.next(); - for (ShowColumsDto showColum : showColums) { - if (StringUtils.isNotBlank(showColum.getColumIndex()) && showColum.isTransfLanguage() && entry.getKey().equals(showColum.getColumIndex()) && !Objects.isNull(entry.getValue()) && StringUtils.isNumeric(entry.getValue().toString())) { - if (entry.getValue() instanceof Integer || entry.getValue() instanceof Long || entry.getValue() instanceof String) { - map.put(entry.getKey(), ElogSeviceSwitchUtils.transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()), entry.getValue().toString())); - } else { - //map.put(entry.getKey(), ElogSeviceSwitchUtils.handlerBaseDataMethod(entry.getValue().toString())); - map.put(entry.getKey(), entry.getValue()); - } - } else if (StringUtils.isNotBlank(showColum.getColumIndex()) && showColum.isTransfLanguage() && entry.getKey().equals(showColum.getColumIndex()) && !Objects.isNull(entry.getValue())) { - //read view add edit update delete - if ("add".equals(entry.getValue().toString()) || "创建".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "新增")); - } else if ("read".equals(entry.getValue().toString()) || "view".equals(entry.getValue().toString()) || "查看".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "查看")); - } else if ("edit".equals(entry.getValue().toString()) || "update".equals(entry.getValue().toString()) || "更新".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(1111111, "修改")); - } else if ("delete".equals(entry.getValue().toString()) || "删除".equals(entry.getValue().toString())) { - map.put(entry.getKey(), SalaryI18nUtil.getI18nLabel(63254, "删除")); - } else if (entry.getValue().toString().contains("取消关联标签 ")) { - String val = entry.getValue().toString().replace("取消关联标签 ", SalaryI18nUtil.getI18nLabel(1111111, "取消关联标签 ") + " "); - map.put(entry.getKey(), val); - } else if (entry.getValue().toString().contains("关联标签 ")) { - String val = entry.getValue().toString().replace("关联标签 ", SalaryI18nUtil.getI18nLabel(1111111, "关联标签 ") + " "); - map.put(entry.getKey(), val); - } - } - } - } - } - } - } - return lists; - } - - - @Override - public Map countLog(String module, String function) { - LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - context.setTenant_key(getTenantKey()); - String tableName = ElogSeviceUtils.getTableName(module, function); - return getLocalElogDaoMapper().elogCount(context, tableName, null); - } - - @Override - public List queryDetailLogList(String module, String function, String current, String pageSize, String condition, String mainId) { - LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - context.setTenant_key(getTenantKey()); - context.setUuid(mainId); - int page = Util.getIntValue(current, 1) - 1; - int size = Util.getIntValue(pageSize, 10); - int start = page * size; - int end = start + size; - String limit = " limit " + start + "," + (end - start); - // 还需要支持下查询 - String tableName = ElogSeviceUtils.getTableName(module, function, true); - List list = getLocalElogDaoMapper().queryDetailElogList(context, limit, tableName, null); - list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - return switchString(list); - } - - @Override - public Map countDestailLog(String module, String function, String mainId) { - LoggerContext context = new LoggerContext(); - context.setModuleName(module); - context.setFunctionName(function); - context.setTenant_key(getTenantKey()); - context.setUuid(mainId); - String tableName = ElogSeviceUtils.getTableName(module, function, true); - return getLocalElogDaoMapper().elogDetailCount(context, tableName, null); - } - - @Override - public WeaTable queryElogTraceInfo(String traceId, String module, String function, Integer currentPage, Integer pageSize, String traceTransMethod) { - WeaTable weaTable = new WeaTable(); - if (StringUtils.isNotEmpty(traceId)) { - String tableName = ElogSeviceUtils.getTableName(module, function); - Integer offset = (currentPage - 1) * pageSize; - List list = getLocalElogDaoMapper().queryElogTraceInfo(traceId, tableName, offset, pageSize); - for (Map map : list) { - if (map.get("modulename") != null) { - map.put("modulenamespan", ElogSeviceSwitchUtils.getModuleName(map.get("modulename").toString())); - } - } - //list = ElogSeviceSwitchUtils.getSwitchDatabaseData(list); - int count = getLocalElogDaoMapper().queryElogTraceInfoCount(traceId, tableName); - PageInfo pageInfo = SalaryPageUtil.buildPage(currentPage, pageSize, list); -// pageInfo.setColumns(); - pageInfo.setTotal(count); - } - - return weaTable; - } - - @Override - public List queryLogInfoByCustom(String module, String function, String field, String value, boolean isDetail) { - List list = new ArrayList(); - String tableName = ElogSeviceUtils.getTableName(module, function, isDetail); - if (StringUtils.isNotBlank(field) && StringUtils.isNotBlank(value)) { - StringBuffer sql = new StringBuffer(); - sql.append(field).append(" = '").append(value).append("' "); - - list = getLocalElogDaoMapper().queryLogInfoByCustom(tableName, sql.toString()); - } - return list; - } - - - @Override - public List queryLogInfoByCustom(String module, String function, String field, String value) { - return queryLogInfoByCustom(module, function, field, value, false); - } - - public List switchString(List list) { - if (list != null) { - return list.stream().map(m -> { - Set en = m.entrySet(); - for (Map.Entry entry : en) { - if (entry.getValue() != null) { - entry.setValue(String.valueOf(entry.getValue())); - } - } - return m; - }).collect(Collectors.toList()); - } else { - return list; - } - } - -// @Override -// public BatchDocumentMessage downloadLog(String data) { -// JSONObject jsonObject = JSONObject.parseObject(data); -// String module = jsonObject.getString("downloadmodule"); -// String function = jsonObject.getString("function"); -// String serviceName = jsonObject.getString("serviceName"); -// String fileName = jsonObject.getString("fileName"); -// String passWord = jsonObject.getString("passWord"); -// -// if (StringUtils.isEmpty(fileName)) { -// fileName = SalaryI18nUtil.getI18nLabel(191432, "日志记录"); -// } -// -// BatchDocumentMessage batchDocumentMessage = new BatchDocumentMessage(); -// WeaTable weaTable = queryLogs(data); -// List columns = weaTable.getColumns(); -// List headers = new ArrayList<>(); -// if (columns != null && !columns.isEmpty()) { -// for (WeaTableColumn column : columns) { -// Map header = new HashMap<>(); -// header.put("key", column.getDataIndex()); -// header.put("name", column.getTitle()); -// headers.add(header); -// } -// } -// List> dataList = weaTable.getData(); -// List> maps = new ArrayList<>(); -// if (dataList != null && !dataList.isEmpty()) { -// dataList.stream().forEach(m -> { -// Map map = new HashMap<>(); -// headers.stream().forEach(h -> { -// map.put(h.get("key").toString(), m.get(h.get("key"))); -// }); -// maps.add(map); -// }); -// } -// -// //必传--业务id -// batchDocumentMessage.setBizId(IdGenerator.generate() + ""); -// //必传-处理名称 -// batchDocumentMessage.setHandlerName("ebatchdemo"); -// //必传-服务名称 -// batchDocumentMessage.setServiceName(serviceName); -// //必传-数据类型 -// batchDocumentMessage.setDataType(fileName); -// //任务id -// batchDocumentMessage.setBatchTaskId(IdGenerator.generate()); -// //必传-模块 -// batchDocumentMessage.setModule(module); //com.weaver.teams.domain.EntityType 中的module(没有的话需要找温明刚维护下) -// //必传-功能 -// batchDocumentMessage.setFunction(function); -// //必传-eteamsid -// batchDocumentMessage.setEteamsId(TenantRpcContext.getEteamsId()); -// -// //非必传 -// if (StringUtils.isNotBlank(passWord)) { -// batchDocumentMessage.setPassword(passWord); -// } -// -// //必传 -// BatchFile batchFile = new BatchFile(); -// batchFile.setName(fileName); -// //必传 -// batchFile.setFileType(FileType.EXCEL); -// //必传 -// batchFile.setHandlerFileMethod(HandlerFileMethod.HANDLER_EXCEL_WITH_DATA); -// batchFile.setTemplateId(1l); -// List excelSheets = new ArrayList<>(); -// ExcelSheet excelSheet = new ExcelSheet(); -// -// excelSheet.setHeader(headers); -// excelSheet.setData(maps); -// excelSheet.setName(fileName); -// excelSheets.add(excelSheet); -// batchFile.setExcelSheets(excelSheets); -// batchDocumentMessage.setBatchFile(batchFile); -// batchDocumentMessage.setChunk(false);//不分片 -// batchExportSender.sendBatchExport(batchDocumentMessage); -// -// return batchDocumentMessage; -// } -// - - private String[] getESfields(String value) { - String[] split = value.split(","); - List list = new ArrayList<>(); - for (String s : split) { - switch (s.toLowerCase()) { - case "interfacename": - list.add("interfacename"); - break; - case "operatetype": - list.add("operatetype"); - break; - case "operatedesc": - list.add("operatedesc"); - break; - case "params": - list.add("params"); - break; - case "clientip": - list.add("clientip"); - break; - case "groupnamelabel": - list.add("groupnamelabel"); - break; - case "redoservice": - list.add("redoservice"); - break; - case "redocontext": - list.add("redocontext"); - break; - case "cancelservice": - list.add("cancelservice"); - break; - case "cancelcontext": - list.add("cancelcontext"); - break; - case "device": - list.add("device"); - break; - case "groupid": - list.add("groupid"); - break; - case "belongmainid": - list.add("belongmainid"); - break; - case "requesturl": - list.add("requesturl"); - break; - case "requesturi": - list.add("requesturi"); - break; - case "log_result": - list.add("logResult"); - break; - case "fromterminal": - list.add("fromterminal"); - break; - case "resultdesc": - list.add("resultdesc"); - break; - case "old_content": - list.add("oldContent"); - break; - case "link_type": - list.add("linkType"); - break; - } - } - //list转为数组 - if (list.size() > 0) { - String[] strings = list.toArray(new String[list.size()]); - return strings; - } - return null; - } - -} diff --git a/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java b/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java deleted file mode 100644 index 63e188956..000000000 --- a/src/com/engine/salary/elog/threadlocal/ElogThreadLocal.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.engine.salary.elog.threadlocal; - -import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.entity.dto.LoggerContext; - -import java.util.ArrayList; -import java.util.List; - -/** - * @Date: 2022/5/18 20:26 - * @Author: deli.xu - * @Description: - **/ -public class ElogThreadLocal { - - private static final ThreadLocal> loggerContextList = new ThreadLocal<>(); - private static final ThreadLocal requestBody = new ThreadLocal<>(); - - public static LoggerContext currentLoggerContext() { - List list = loggerContextList.get(); - - if(list == null || list.size() == 0) { - return null; - } else { - return list.get(list.size() -1); - } - } - - public static void addLoggerContext(LoggerContext loggerContext) { - if(loggerContext == null) - return; - List list = loggerContextList.get(); - if(list == null) { - list = new ArrayList<>(); - loggerContextList.set(list); - } - - list.add(loggerContext); - - } - - public static List getLoggerContextList() { - return loggerContextList.get(); - } - - public static void clear() { - loggerContextList.set(null); - } - - public static void removeLast() { - List list = loggerContextList.get(); - - if(list != null) { - int size = list.size(); - if(size > 0) - list.remove(size - 1); - } - } - - public static void remove() { - loggerContextList.remove(); - } - - public static JSONObject getRequestBody() { - return requestBody.get(); - } - - public static void setRequestBody(JSONObject json) { - requestBody.set(json); - } - - public static void removeRequestBody() { - requestBody.remove(); - } -} diff --git a/src/com/engine/salary/elog/util/ElogServiceUtils.java b/src/com/engine/salary/elog/util/ElogServiceUtils.java deleted file mode 100644 index fb2ecafc6..000000000 --- a/src/com/engine/salary/elog/util/ElogServiceUtils.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.engine.salary.elog.util; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.entity.dto.ElogBean; -import com.engine.salary.elog.entity.dto.FilterConditionDto; -import com.engine.salary.elog.entity.dto.ShowColumsDto; -import com.engine.salary.elog.enums.ElogConsts; - -import java.util.List; -import java.util.Map; - -/** - * @Date: 2022/5/18 19:19 - * @Author: deli.xu - * @Description: elog服务工具类 - **/ -public class ElogServiceUtils { - - public static String getTableName(String module, String function) { - return getTableName(module, function, false); - } - - public static String getTableName(String module, String function, boolean isDetail) { - String tablename = module + ElogConsts.TABLE_SPACER + function + ElogConsts.TABLE_SUFFIX + (isDetail ? ElogConsts.DETAIL_TABLE_SUFFIX : ""); - sqlCheck(tablename); - return tablename; - } - - public static void sqlCheck(String value) { - if (value != null) { - if (!value.matches("^[A-Za-z][a-zA-Z0-9_\\.,]{0,31}$")) { - throw new RuntimeException("sqlCheck failed ! value :" + value); - } - } - } - - public static ElogBean getElogBean(String data) { - JSONObject datas = JSONObject.parseObject(data); - ElogBean elogBean = new ElogBean(); - String module = datas.getString("module"); - String function = datas.getString("function"); - String pageNum = datas.getString("current"); - String pageSize = datas.getString("pageSize"); - String searchMap = datas.getString("searchMap"); - String transMethod = datas.getString("transMethod"); - String authParams = datas.getString("authParams"); - String showColums = datas.getString("showColums"); - String filterConditions = datas.getString("filterConditions"); - String downloadSize = datas.getString("downloadSize"); - List showColumsDtos = JSONArray.parseArray(showColums, ShowColumsDto.class); - List filterConditionDtos = JSONArray.parseArray(filterConditions, FilterConditionDto.class); - Map authParamsJson = JSONObject.parseObject(authParams); - elogBean.setModule(module); - elogBean.setFunction(function); - elogBean.setCurrent(pageNum); - elogBean.setPageSize(pageSize); - elogBean.setSearchMap(searchMap); - elogBean.setTransMethod(transMethod); - elogBean.setDownloadSize(downloadSize); - elogBean.setShowColumns(showColumsDtos); - elogBean.setFilterConditionDtos(filterConditionDtos); - elogBean.setAuthParamsJson(authParamsJson); - return elogBean; - } - - public static int getIntValue(String v) { - return getIntValue(v, -1); - } - - public static int getIntValue(String v, int def) { - try { - return Integer.parseInt(v); - } catch (Exception var3) { - return def; - } - } - - public static long getLongValue(String v) { - return getLongValue(v, -1l); - } - - public static long getLongValue(String v, long def) { - try { - return Long.parseLong(v); - } catch (Exception var3) { - return def; - } - } - - -} diff --git a/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java b/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java deleted file mode 100644 index 78a78dc94..000000000 --- a/src/com/engine/salary/elog/util/ElogSeviceSwitchUtils.java +++ /dev/null @@ -1,1402 +0,0 @@ -package com.engine.salary.elog.util; - -import cn.hutool.core.map.CaseInsensitiveMap; -import com.alibaba.druid.proxy.jdbc.ClobProxyImpl; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.cloudstore.eccom.pc.table.WeaTable; -import com.cloudstore.eccom.pc.table.WeaTableColumn; -import com.engine.salary.elog.annotation.OperateType; -import com.engine.salary.elog.enums.ElogConsts; -import com.engine.salary.util.SalaryI18nUtil; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import weaver.conn.RecordSet; - -import java.sql.Clob; -import java.util.*; - -/** - * @Date: 2022/5/18 19:34 - * @Author: deli.xu - * @Description: elog服务转换类 - **/ -public class ElogSeviceSwitchUtils { - - private static final Logger logger = LoggerFactory.getLogger(ElogSeviceSwitchUtils.class); - // TODO 后续需要考虑多语言label写法 - public static final Map moduleMap = new HashMap<>(); - - private static final Map> moduleFuctionMap = new HashMap<>(); - - static { - /*moduleMap.put("elog", SalaryI18nUtil.getI18nLabel(62975, ElogSeviceUtils.currentLanguage(), "日志")); - moduleMap.put("report", SalaryI18nUtil.getI18nLabel(62976, ElogSeviceUtils.currentLanguage(), "报表")); - moduleMap.put("edc", SalaryI18nUtil.getI18nLabel(62977, ElogSeviceUtils.currentLanguage(), "数据中心")); - moduleMap.put("hrm", SalaryI18nUtil.getI18nLabel(62978, ElogSeviceUtils.currentLanguage(), "人力资源")); - moduleMap.put("crm", SalaryI18nUtil.getI18nLabel(62979, ElogSeviceUtils.currentLanguage(), "资产")); - moduleMap.put("demo", SalaryI18nUtil.getI18nLabel(62980, ElogSeviceUtils.currentLanguage(), "示例")); - moduleMap.put("attc", SalaryI18nUtil.getI18nLabel(62981, ElogSeviceUtils.currentLanguage(), "出勤打卡")); - moduleMap.put("attm", SalaryI18nUtil.getI18nLabel(62982, ElogSeviceUtils.currentLanguage(), "出勤机")); - moduleMap.put("attw", SalaryI18nUtil.getI18nLabel(62983, ElogSeviceUtils.currentLanguage(), "出勤报表")); - moduleMap.put("auth", SalaryI18nUtil.getI18nLabel(62984, ElogSeviceUtils.currentLanguage(), "系统权限")); - moduleMap.put("bank", SalaryI18nUtil.getI18nLabel(62985, ElogSeviceUtils.currentLanguage(), "银企直联")); - moduleMap.put("bap", SalaryI18nUtil.getI18nLabel(62986, ElogSeviceUtils.currentLanguage(), "云办公")); - moduleMap.put("base", SalaryI18nUtil.getI18nLabel(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); - moduleMap.put("batc", SalaryI18nUtil.getI18nLabel(62988, ElogSeviceUtils.currentLanguage(), "导入导出")); - moduleMap.put("blog", SalaryI18nUtil.getI18nLabel(62989, ElogSeviceUtils.currentLanguage(), "日报微博")); - moduleMap.put("cld", SalaryI18nUtil.getI18nLabel(62990, ElogSeviceUtils.currentLanguage(), "日程管理")); - moduleMap.put("cmca", SalaryI18nUtil.getI18nLabel(62991, ElogSeviceUtils.currentLanguage(), "资金管理")); - moduleMap.put("cmcl", SalaryI18nUtil.getI18nLabel(62992, ElogSeviceUtils.currentLanguage(), "线索管理")); - moduleMap.put("cmco", SalaryI18nUtil.getI18nLabel(62993, ElogSeviceUtils.currentLanguage(), "联系人管理")); - moduleMap.put("cmcp", SalaryI18nUtil.getI18nLabel(62994, ElogSeviceUtils.currentLanguage(), "对手管理")); - moduleMap.put("cmcu", SalaryI18nUtil.getI18nLabel(62995, ElogSeviceUtils.currentLanguage(), "客户管理")); - moduleMap.put("cmex", SalaryI18nUtil.getI18nLabel(62996, ElogSeviceUtils.currentLanguage(), "批量操作")); - moduleMap.put("cmmk", SalaryI18nUtil.getI18nLabel(62997, ElogSeviceUtils.currentLanguage(), "营销管理")); - moduleMap.put("cmor", SalaryI18nUtil.getI18nLabel(62998, ElogSeviceUtils.currentLanguage(), "订单管理")); - moduleMap.put("cmpc", SalaryI18nUtil.getI18nLabel(62999, ElogSeviceUtils.currentLanguage(), "价格管理")); - moduleMap.put("cmpr", SalaryI18nUtil.getI18nLabel(63000, ElogSeviceUtils.currentLanguage(), "产品管理")); - moduleMap.put("cmpt", SalaryI18nUtil.getI18nLabel(63001, ElogSeviceUtils.currentLanguage(), "外部门户")); - moduleMap.put("cmqu", SalaryI18nUtil.getI18nLabel(63002, ElogSeviceUtils.currentLanguage(), "报价管理")); - moduleMap.put("cmsa", SalaryI18nUtil.getI18nLabel(63003, ElogSeviceUtils.currentLanguage(), "商机管理")); - moduleMap.put("cmtr", SalaryI18nUtil.getI18nLabel(63004, ElogSeviceUtils.currentLanguage(), "合同管理")); - moduleMap.put("comp", SalaryI18nUtil.getI18nLabel(63005, ElogSeviceUtils.currentLanguage(), "文档对比")); - moduleMap.put("cs", SalaryI18nUtil.getI18nLabel(63006, ElogSeviceUtils.currentLanguage(), "云商店")); - moduleMap.put("cowork", SalaryI18nUtil.getI18nLabel(63007, ElogSeviceUtils.currentLanguage(), "协作区")); - moduleMap.put("dbs", SalaryI18nUtil.getI18nLabel(63008, ElogSeviceUtils.currentLanguage(), "文档公共模块")); - moduleMap.put("dcad", SalaryI18nUtil.getI18nLabel(63009, ElogSeviceUtils.currentLanguage(), "数据中心运行")); - moduleMap.put("dcap", SalaryI18nUtil.getI18nLabel(63010, ElogSeviceUtils.currentLanguage(), "数据中心分析开发配置")); - moduleMap.put("dcrd", SalaryI18nUtil.getI18nLabel(63011, ElogSeviceUtils.currentLanguage(), "数据中心开发配置")); - moduleMap.put("dcre", SalaryI18nUtil.getI18nLabel(63012, ElogSeviceUtils.currentLanguage(), "数据中心分析生产运行")); - moduleMap.put("dcs", SalaryI18nUtil.getI18nLabel(63013, ElogSeviceUtils.currentLanguage(), "文档目录模块")); - moduleMap.put("dds", SalaryI18nUtil.getI18nLabel(63014, ElogSeviceUtils.currentLanguage(), "文档模块")); - moduleMap.put("dps", SalaryI18nUtil.getI18nLabel(63015, ElogSeviceUtils.currentLanguage(), "文档权限模块")); - moduleMap.put("drle", SalaryI18nUtil.getI18nLabel(63016, ElogSeviceUtils.currentLanguage(), "数据规则库")); - moduleMap.put("ds", SalaryI18nUtil.getI18nLabel(63017, ElogSeviceUtils.currentLanguage(), "数据安全")); - moduleMap.put("dw_etl", SalaryI18nUtil.getI18nLabel(63018, ElogSeviceUtils.currentLanguage(), "ETL(抽取,转换,治理)")); - moduleMap.put("dw_model", SalaryI18nUtil.getI18nLabel(63019, ElogSeviceUtils.currentLanguage(), "建模服务")); - moduleMap.put("dw_process", SalaryI18nUtil.getI18nLabel(63020, ElogSeviceUtils.currentLanguage(), "计算服务")); - moduleMap.put("dw_search", SalaryI18nUtil.getI18nLabel(63021, ElogSeviceUtils.currentLanguage(), "查询服务")); - moduleMap.put("dw_sync", SalaryI18nUtil.getI18nLabel(63022, ElogSeviceUtils.currentLanguage(), "数据抽取")); - moduleMap.put("eb", SalaryI18nUtil.getI18nLabel(63023, ElogSeviceUtils.currentLanguage(), "云桥")); - moduleMap.put("ebda", SalaryI18nUtil.getI18nLabel(62987, ElogSeviceUtils.currentLanguage(), "应用管理")); - moduleMap.put("ebdd", SalaryI18nUtil.getI18nLabel(63024, ElogSeviceUtils.currentLanguage(), "页面设计")); - moduleMap.put("ebdf", SalaryI18nUtil.getI18nLabel(63025, ElogSeviceUtils.currentLanguage(), "表单服务")); - moduleMap.put("ebdp", SalaryI18nUtil.getI18nLabel(63026, ElogSeviceUtils.currentLanguage(), "页面管理")); - moduleMap.put("ecod", SalaryI18nUtil.getI18nLabel(63027, ElogSeviceUtils.currentLanguage(), "ecode")); - moduleMap.put("ei", SalaryI18nUtil.getI18nLabel(63028, ElogSeviceUtils.currentLanguage(), "数据导出导入")); - moduleMap.put("em", SalaryI18nUtil.getI18nLabel(63029, ElogSeviceUtils.currentLanguage(), "移动相关")); - moduleMap.put("es", SalaryI18nUtil.getI18nLabel(63030, ElogSeviceUtils.currentLanguage(), "微搜搜索")); - moduleMap.put("esa", SalaryI18nUtil.getI18nLabel(63031, ElogSeviceUtils.currentLanguage(), "微搜文件分析")); - moduleMap.put("esb", SalaryI18nUtil.getI18nLabel(63032, ElogSeviceUtils.currentLanguage(), "ESB")); - moduleMap.put("esch", SalaryI18nUtil.getI18nLabel(63033, ElogSeviceUtils.currentLanguage(), "计划任务")); - moduleMap.put("esd", SalaryI18nUtil.getI18nLabel(63034, ElogSeviceUtils.currentLanguage(), "微搜索引数据")); - moduleMap.put("exfo", SalaryI18nUtil.getI18nLabel(63035, ElogSeviceUtils.currentLanguage(), "excel函数引擎")); - moduleMap.put("fbdg", SalaryI18nUtil.getI18nLabel(63036, ElogSeviceUtils.currentLanguage(), "预算编制")); - moduleMap.put("fdt", SalaryI18nUtil.getI18nLabel(63037, ElogSeviceUtils.currentLanguage(), "表单数据")); - moduleMap.put("fexs", SalaryI18nUtil.getI18nLabel(63038, ElogSeviceUtils.currentLanguage(), "费用管理")); - moduleMap.put("file", SalaryI18nUtil.getI18nLabel(63039, ElogSeviceUtils.currentLanguage(), "文件服务")); - moduleMap.put("finc", SalaryI18nUtil.getI18nLabel(63040, ElogSeviceUtils.currentLanguage(), "微报账")); - moduleMap.put("fnar", SalaryI18nUtil.getI18nLabel(63041, ElogSeviceUtils.currentLanguage(), "财务报表")); - moduleMap.put("fomo", SalaryI18nUtil.getI18nLabel(63042, ElogSeviceUtils.currentLanguage(), "表单监控")); - moduleMap.put("form", SalaryI18nUtil.getI18nLabel(63043, ElogSeviceUtils.currentLanguage(), "表单服务")); - moduleMap.put("frpt", SalaryI18nUtil.getI18nLabel(63043, ElogSeviceUtils.currentLanguage(), "业务表单")); - moduleMap.put("fvou", SalaryI18nUtil.getI18nLabel(63044, ElogSeviceUtils.currentLanguage(), "凭证集成")); - moduleMap.put("hp", SalaryI18nUtil.getI18nLabel(63045, ElogSeviceUtils.currentLanguage(), "门户")); - moduleMap.put("hr", SalaryI18nUtil.getI18nLabel(63046, ElogSeviceUtils.currentLanguage(), "人事档案")); - moduleMap.put("ic", SalaryI18nUtil.getI18nLabel(63047, ElogSeviceUtils.currentLanguage(), "集成服务")); - moduleMap.put("il", SalaryI18nUtil.getI18nLabel(63048, ElogSeviceUtils.currentLanguage(), "集成登录")); - moduleMap.put("im", SalaryI18nUtil.getI18nLabel(63049, ElogSeviceUtils.currentLanguage(), "IM相关服务")); - moduleMap.put("inc", SalaryI18nUtil.getI18nLabel(63050, ElogSeviceUtils.currentLanguage(), "发票云服务")); - moduleMap.put("iua", SalaryI18nUtil.getI18nLabel(63051, ElogSeviceUtils.currentLanguage(), "统一认证")); - moduleMap.put("iut", SalaryI18nUtil.getI18nLabel(63052, ElogSeviceUtils.currentLanguage(), "统一待办")); - moduleMap.put("mail", SalaryI18nUtil.getI18nLabel(63053, ElogSeviceUtils.currentLanguage(), "邮件服务")); - moduleMap.put("mc", SalaryI18nUtil.getI18nLabel(63054, ElogSeviceUtils.currentLanguage(), "消息服务")); - moduleMap.put("mt", SalaryI18nUtil.getI18nLabel(63055, ElogSeviceUtils.currentLanguage(), "会议管理")); - moduleMap.put("my", SalaryI18nUtil.getI18nLabel(63056, ElogSeviceUtils.currentLanguage(), "关注&收藏&标签")); - moduleMap.put("odoc", SalaryI18nUtil.getI18nLabel(63057, ElogSeviceUtils.currentLanguage(), "公文管理")); - moduleMap.put("odoc_exchange", SalaryI18nUtil.getI18nLabel(63058, ElogSeviceUtils.currentLanguage(), "公文交换平台")); - moduleMap.put("open", SalaryI18nUtil.getI18nLabel(63059, ElogSeviceUtils.currentLanguage(), "开放平台")); - moduleMap.put("pr", SalaryI18nUtil.getI18nLabel(63060, ElogSeviceUtils.currentLanguage(), "工作画像")); - moduleMap.put("proj", SalaryI18nUtil.getI18nLabel(63061, ElogSeviceUtils.currentLanguage(), "项目管理")); - moduleMap.put("prt", SalaryI18nUtil.getI18nLabel(63062, ElogSeviceUtils.currentLanguage(), "打印服务")); - moduleMap.put("pspt", SalaryI18nUtil.getI18nLabel(63063, ElogSeviceUtils.currentLanguage(), "系统登录")); - moduleMap.put("rptc", SalaryI18nUtil.getI18nLabel(63064, ElogSeviceUtils.currentLanguage(), "数据协作")); - moduleMap.put("rpts", SalaryI18nUtil.getI18nLabel(63065, ElogSeviceUtils.currentLanguage(), "上报调查")); - moduleMap.put("sala", SalaryI18nUtil.getI18nLabel(63066, ElogSeviceUtils.currentLanguage(), "薪资管理")); - moduleMap.put("sign", SalaryI18nUtil.getI18nLabel(63067, ElogSeviceUtils.currentLanguage(), "印控中心")); - moduleMap.put("sms", SalaryI18nUtil.getI18nLabel(63068, ElogSeviceUtils.currentLanguage(), "短信")); - moduleMap.put("task", SalaryI18nUtil.getI18nLabel(63069, ElogSeviceUtils.currentLanguage(), "任务管理")); - moduleMap.put("tnt", SalaryI18nUtil.getI18nLabel(63070, ElogSeviceUtils.currentLanguage(), "租户管理")); - moduleMap.put("wf", SalaryI18nUtil.getI18nLabel(63071, ElogSeviceUtils.currentLanguage(), "路径定义")); - moduleMap.put("wfc", SalaryI18nUtil.getI18nLabel(63072, ElogSeviceUtils.currentLanguage(), "流程流转")); - moduleMap.put("wfr", SalaryI18nUtil.getI18nLabel(63073, ElogSeviceUtils.currentLanguage(), "流程规则路由")); - moduleMap.put("wrgm", SalaryI18nUtil.getI18nLabel(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); - moduleMap.put("wrgp", SalaryI18nUtil.getI18nLabel(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); - moduleMap.put("wrpr", SalaryI18nUtil.getI18nLabel(63076, ElogSeviceUtils.currentLanguage(), "计划报告")); - moduleMap.put("doc", SalaryI18nUtil.getI18nLabel(63077, ElogSeviceUtils.currentLanguage(), "文档服务")); - moduleMap.put("placard", SalaryI18nUtil.getI18nLabel(63078, ElogSeviceUtils.currentLanguage(), "团队公告")); - moduleMap.put("fna", SalaryI18nUtil.getI18nLabel(135042, ElogSeviceUtils.currentLanguage(), "云报销")); - moduleMap.put("meeting", SalaryI18nUtil.getI18nLabel(63080, ElogSeviceUtils.currentLanguage(), "会议")); - moduleMap.put("wfp", SalaryI18nUtil.getI18nLabel(63081, ElogSeviceUtils.currentLanguage(), "流程")); - moduleMap.put("portal", SalaryI18nUtil.getI18nLabel(63045, ElogSeviceUtils.currentLanguage(), "门户")); - moduleMap.put("workreport", SalaryI18nUtil.getI18nLabel(63082, ElogSeviceUtils.currentLanguage(), "工作报告")); - moduleMap.put("goal", SalaryI18nUtil.getI18nLabel(63074, ElogSeviceUtils.currentLanguage(), "目标管理")); - moduleMap.put("performance", SalaryI18nUtil.getI18nLabel(63075, ElogSeviceUtils.currentLanguage(), "绩效考核")); - moduleMap.put("intlogin", SalaryI18nUtil.getI18nLabel(63083, ElogSeviceUtils.currentLanguage(), "集成登录设置")); - moduleMap.put("i18n", SalaryI18nUtil.getI18nLabel(64559, ElogSeviceUtils.currentLanguage(), "国际化")); - moduleMap.put("timecard", SalaryI18nUtil.getI18nLabel(63085, ElogSeviceUtils.currentLanguage(), "出勤")); - moduleMap.put("market", SalaryI18nUtil.getI18nLabel(63086, ElogSeviceUtils.currentLanguage(), "营销")); - moduleMap.put("excelformula", SalaryI18nUtil.getI18nLabel(64560, ElogSeviceUtils.currentLanguage(), "函数服务")); - moduleMap.put("ic_ldap", SalaryI18nUtil.getI18nLabel(70081, ElogSeviceUtils.currentLanguage(), "Ldap集成")); - moduleMap.put("iut_c_c", SalaryI18nUtil.getI18nLabel(70303, ElogSeviceUtils.currentLanguage(), "统一待办推送设置")); - moduleMap.put("plan", SalaryI18nUtil.getI18nLabel(70303, ElogSeviceUtils.currentLanguage(), "计划报告")); - moduleMap.put("document", SalaryI18nUtil.getI18nLabel(34218, ElogSeviceUtils.currentLanguage(), "文档")); - moduleMap.put("taskCustStatus", SalaryI18nUtil.getI18nLabel(73988, ElogSeviceUtils.currentLanguage(), "任务状态")); - moduleMap.put("project", SalaryI18nUtil.getI18nLabel(55158, ElogSeviceUtils.currentLanguage(), "项目")); - moduleMap.put("calendar", SalaryI18nUtil.getI18nLabel(74186, ElogSeviceUtils.currentLanguage(), "日历")); - moduleMap.put("web", SalaryI18nUtil.getI18nLabel(75598, ElogSeviceUtils.currentLanguage(), "浏览")); - moduleMap.put("formdatareport", SalaryI18nUtil.getI18nLabel(76068, ElogSeviceUtils.currentLanguage(), "来自上报数据")); - moduleMap.put("mainline", SalaryI18nUtil.getI18nLabel(31898, ElogSeviceUtils.currentLanguage(), "主线")); - moduleMap.put("customer", SalaryI18nUtil.getI18nLabel(32726, ElogSeviceUtils.currentLanguage(), "客户")); - moduleMap.put("contract", SalaryI18nUtil.getI18nLabel(32864, ElogSeviceUtils.currentLanguage(), "合同")); - moduleMap.put("group", SalaryI18nUtil.getI18nLabel(19426, ElogSeviceUtils.currentLanguage(), "分组")); - moduleMap.put("workflow", SalaryI18nUtil.getI18nLabel(81851, ElogSeviceUtils.currentLanguage(), "工作流程")); - moduleMap.put("biaoge", SalaryI18nUtil.getI18nLabel(30919, ElogSeviceUtils.currentLanguage(), "表格")); - moduleMap.put("clue", SalaryI18nUtil.getI18nLabel(28908, ElogSeviceUtils.currentLanguage(), "线索")); - moduleMap.put("competitor", SalaryI18nUtil.getI18nLabel(81852, ElogSeviceUtils.currentLanguage(), "竞争对手")); - moduleMap.put("kpiFlow", SalaryI18nUtil.getI18nLabel(81853, ElogSeviceUtils.currentLanguage(), "kpil流程")); - moduleMap.put("mainlineCustStatus", SalaryI18nUtil.getI18nLabel(81854, ElogSeviceUtils.currentLanguage(), "主线客户状态")); - moduleMap.put("marketactivity", SalaryI18nUtil.getI18nLabel(34221, ElogSeviceUtils.currentLanguage(), "市场活动")); - moduleMap.put("mtPhase", SalaryI18nUtil.getI18nLabel(81855, ElogSeviceUtils.currentLanguage(), "mt阶段")); - moduleMap.put("production", SalaryI18nUtil.getI18nLabel(29329, ElogSeviceUtils.currentLanguage(), "产品")); - moduleMap.put("quote", SalaryI18nUtil.getI18nLabel(34231, ElogSeviceUtils.currentLanguage(), "报价")); - moduleMap.put("saleChance", SalaryI18nUtil.getI18nLabel(32863, ElogSeviceUtils.currentLanguage(), "商机")); - moduleMap.put("orderform", SalaryI18nUtil.getI18nLabel(34230, ElogSeviceUtils.currentLanguage(), "订单")); - moduleMap.put("contact", SalaryI18nUtil.getI18nLabel(32711, ElogSeviceUtils.currentLanguage(), "联系人")); - moduleMap.put("price", SalaryI18nUtil.getI18nLabel(31922, ElogSeviceUtils.currentLanguage(), "价格")); - moduleMap.put("capital", SalaryI18nUtil.getI18nLabel(83428, ElogSeviceUtils.currentLanguage(), "资金")); - moduleMap.put("ice", SalaryI18nUtil.getI18nLabel(94360, ElogSeviceUtils.currentLanguage(), "日程会议集成")); - moduleMap.put("ic_hr", SalaryI18nUtil.getI18nLabel(84284, ElogSeviceUtils.currentLanguage(), "HR同步")); - moduleMap.put("intunifyauth", SalaryI18nUtil.getI18nLabel(84467, ElogSeviceUtils.currentLanguage(), "统一认证接入管理")); - moduleMap.put("signcenter", SalaryI18nUtil.getI18nLabel(84691, ElogSeviceUtils.currentLanguage(), "电子签")); - moduleMap.put("iut_s_c", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-异构系统")); - moduleMap.put("iut_s_c1", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统")); - moduleMap.put("iut_s_c2", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办中心")); - moduleMap.put("iut_s_c3", SalaryI18nUtil.getI18nLabel(91503, ElogSeviceUtils.currentLanguage(), "统一待办-应用系统-流程类型")); - moduleMap.put("ic_mail", SalaryI18nUtil.getI18nLabel(100715, ElogSeviceUtils.currentLanguage(), "邮箱集成")); - moduleMap.put("hrsa", SalaryI18nUtil.getI18nLabel(105038, ElogSeviceUtils.currentLanguage(), "薪酬管理")); - moduleMap.put("icc", SalaryI18nUtil.getI18nLabel(113884, ElogSeviceUtils.currentLanguage(), "转换规则")); - moduleMap.put("basicserver", SalaryI18nUtil.getI18nLabel(113885, ElogSeviceUtils.currentLanguage(), "整体基础")); - moduleMap.put("dw", SalaryI18nUtil.getI18nLabel(115549, ElogSeviceUtils.currentLanguage(), "数据仓库")); - moduleMap.put("msg", SalaryI18nUtil.getI18nLabel(115563, ElogSeviceUtils.currentLanguage(), "工作消息")); - moduleMap.put("intunifybase", SalaryI18nUtil.getI18nLabel(115599, ElogSeviceUtils.currentLanguage(), "统一认证服务")); - moduleMap.put("esearch", SalaryI18nUtil.getI18nLabel(21694, ElogSeviceUtils.currentLanguage(), "全文检索")); - moduleMap.put("iaauthserver", SalaryI18nUtil.getI18nLabel(115603, ElogSeviceUtils.currentLanguage(), "统一认证注册应用")); - moduleMap.put("excel", SalaryI18nUtil.getI18nLabel(115543, ElogSeviceUtils.currentLanguage(), "excel函数")); - moduleMap.put("scene", SalaryI18nUtil.getI18nLabel(115539, ElogSeviceUtils.currentLanguage(), "绘图")); - moduleMap.put("bcw", SalaryI18nUtil.getI18nLabel(115651, ElogSeviceUtils.currentLanguage(), "公共模块")); - moduleMap.put("folder", SalaryI18nUtil.getI18nLabel(10734, ElogSeviceUtils.currentLanguage(), "文件夹")); - moduleMap.put("pdfcnv", SalaryI18nUtil.getI18nLabel(115957, ElogSeviceUtils.currentLanguage(), "PDF转换服务")); - moduleMap.put("ebform", SalaryI18nUtil.getI18nLabel(121462, ElogSeviceUtils.currentLanguage(), "e-Builder表单")); - moduleMap.put("statistics", SalaryI18nUtil.getI18nLabel(17745, ElogSeviceUtils.currentLanguage(), "自定义统计")); - moduleMap.put("edcapp", SalaryI18nUtil.getI18nLabel(121631, ElogSeviceUtils.currentLanguage(), "多级填报")); - - */ - - moduleMap.put("elog", 62975); - moduleMap.put("report", 62976); - moduleMap.put("edc", 52689); - moduleMap.put("hrm", 62978); - moduleMap.put("crm", 62979); - moduleMap.put("demo", 62980); - moduleMap.put("attc", 62981); - moduleMap.put("attm", 62982); - moduleMap.put("attw", 62983); - moduleMap.put("auth", 62984); - moduleMap.put("bank", 62985); - moduleMap.put("bap", 62986); - moduleMap.put("base", 62987); - moduleMap.put("batc", 62988); - moduleMap.put("blog", 62989); - moduleMap.put("cld", 62990); - moduleMap.put("cmca", 62991); - moduleMap.put("cmcl", 62992); - moduleMap.put("cmco", 62993); - moduleMap.put("cmcp", 62994); - moduleMap.put("cmcu", 62995); - moduleMap.put("cmex", 62996); - moduleMap.put("cmmk", 62997); - moduleMap.put("cmor", 62998); - moduleMap.put("cmpc", 62999); - moduleMap.put("cmpr", 63000); - moduleMap.put("cmpt", 63001); - moduleMap.put("cmqu", 63002); - moduleMap.put("cmsa", 63003); - moduleMap.put("cmtr", 63004); - moduleMap.put("comp", 63005); - moduleMap.put("cs", 63006); - moduleMap.put("cowork", 63007); - moduleMap.put("dbs", 63008); - moduleMap.put("dcad", 63009); - moduleMap.put("dcap", 63010); - moduleMap.put("dcrd", 63011); - moduleMap.put("dcre", 63012); - moduleMap.put("dcs", 63013); - moduleMap.put("dds", 63014); - moduleMap.put("dps", 63015); - moduleMap.put("drle", 63016); - moduleMap.put("ds", 63017); - moduleMap.put("dw_etl", 63018); - moduleMap.put("dw_model", 63019); - moduleMap.put("dw_process", 63020); - moduleMap.put("dw_search", 63021); - moduleMap.put("dw_sync", 63022); - moduleMap.put("eb", 63023); - moduleMap.put("ebda", 62987); - moduleMap.put("ebdd", 63024); - moduleMap.put("ebdf", 63025); - moduleMap.put("ebdp", 63026); - moduleMap.put("ecod", 63027); - moduleMap.put("ei", 63028); - moduleMap.put("em", 63029); - moduleMap.put("es", 63030); - moduleMap.put("esa", 63031); - moduleMap.put("esb", 63032); - moduleMap.put("esch", 63033); - moduleMap.put("esd", 63034); - moduleMap.put("exfo", 63035); - moduleMap.put("fbdg", 63036); - moduleMap.put("fdt", 63037); - moduleMap.put("fexs", 63038); - moduleMap.put("file", 63039); - moduleMap.put("finc", 63040); - moduleMap.put("fnar", 63041); - moduleMap.put("fomo", 63042); - moduleMap.put("form", 63043); - moduleMap.put("frpt", 63043); - moduleMap.put("fvou", 63044); - moduleMap.put("hp", 63045); - moduleMap.put("hr", 63046); - moduleMap.put("ic", 63047); - moduleMap.put("il", 63048); - moduleMap.put("im", 63049); - moduleMap.put("inc", 63050); - moduleMap.put("iua", 63051); - moduleMap.put("iut", 63052); - moduleMap.put("mail", 63053); - moduleMap.put("mc", 63054); - moduleMap.put("mt", 63055); - moduleMap.put("my", 63056); - moduleMap.put("odoc", 63057); - moduleMap.put("odoc_exchange", 63058); - moduleMap.put("open", 63059); - moduleMap.put("pr", 63060); - moduleMap.put("proj", 63061); - moduleMap.put("prt", 63062); - moduleMap.put("pspt", 63063); - moduleMap.put("rptc", 63064); - moduleMap.put("rpts", 63065); - moduleMap.put("sala", 63066); - moduleMap.put("sign", 63067); - moduleMap.put("sms", 63068); - moduleMap.put("task", 63069); - moduleMap.put("tnt", 63070); - moduleMap.put("wf", 63071); - moduleMap.put("wfc", 63072); - moduleMap.put("wfr", 63073); - moduleMap.put("wrgm", 63074); - moduleMap.put("wrgp", 63075); - moduleMap.put("wrpr", 63076); - moduleMap.put("doc", 63077); - moduleMap.put("placard", 63078); - moduleMap.put("fna", 135042); - moduleMap.put("meeting", 63080); - moduleMap.put("wfp", 63081); - moduleMap.put("portal", 63045); - moduleMap.put("workreport", 63082); - moduleMap.put("goal", 63074); - moduleMap.put("performance", 63075); - moduleMap.put("intlogin", 63083); - moduleMap.put("i18n", 64559); - moduleMap.put("timecard", 63085); - moduleMap.put("market", 63086); - moduleMap.put("excelformula", 64560); - moduleMap.put("ebatch", 69280); - moduleMap.put("ic_ldap", 70081); - moduleMap.put("iut_c_c", 96493); - moduleMap.put("plan", 63076); - moduleMap.put("document", 34218); - moduleMap.put("taskCustStatus", 73988); - moduleMap.put("calendar", 74186); - moduleMap.put("batch", 69280); - moduleMap.put("project", 55158); - moduleMap.put("web", 75598); - moduleMap.put("formdatareport", 76068); - moduleMap.put("mainline", 31898); - moduleMap.put("customer", 32726); - moduleMap.put("contract", 32864); - moduleMap.put("group", 19426); - moduleMap.put("workflow", 81851); - moduleMap.put("biaoge", 30919); - moduleMap.put("clue", 28908); - moduleMap.put("competitor", 81852); - moduleMap.put("kpiFlow", 81853); - moduleMap.put("mainlineCustStatus", 81854); - moduleMap.put("marketactivity", 34221); - moduleMap.put("mtPhase", 81855); - moduleMap.put("production", 29329); - moduleMap.put("quote", 34231); - moduleMap.put("saleChance", 32863); - moduleMap.put("orderform", 34230); - moduleMap.put("contact", 32711); - moduleMap.put("price", 31922); - moduleMap.put("capital", 83428); - moduleMap.put("ice", 87722); - moduleMap.put("ic_hr", 84284); - moduleMap.put("intunifyauth", 84508); - moduleMap.put("signcenter", 84691); - moduleMap.put("iut_s_c", 91503); - moduleMap.put("iut_s_c1", 95218); - moduleMap.put("iut_s_c2", 95219); - moduleMap.put("iut_s_c3", 95220); - moduleMap.put("iut_c_log", 96494); - moduleMap.put("ic_mail", 100715); - moduleMap.put("hrsa", 105038); - moduleMap.put("icc", 113884); - moduleMap.put("basicserver", 113885); - moduleMap.put("dw", 115549); - moduleMap.put("msg", 115563); - moduleMap.put("intunifybase", 115599); - moduleMap.put("esearch", 21694); - moduleMap.put("iaauthserver", 115603); - moduleMap.put("excel", 115543); - moduleMap.put("scene", 115539); - moduleMap.put("bcw", 115651); - moduleMap.put("folder", 10734); - moduleMap.put("pdfcnv", 115957); - moduleMap.put("login", 63063); - moduleMap.put("ebform", 121462); - moduleMap.put("statistics", 17745); - moduleMap.put("edcapp", 121631); - moduleMap.put("cusapp", 16381); - moduleMap.put("e10-allinone-base", 141083); - moduleMap.put("voice", 142713); - moduleMap.put("filter", 147832); - moduleMap.put("ias", 146674); - moduleMap.put("device", 153666); - moduleMap.put("meetingTopic", 180274); - moduleMap.put("meetingService", 180276); - moduleMap.put("meetingDecision", 180277); - moduleMap.put("meetingSign", 180278); - moduleMap.put("meetingSignSet", 61601); - moduleMap.put("meetingMember", 180280); - moduleMap.put("meetingShare", 180281); - moduleMap.put("int", 40031); - moduleMap.put("print", 160051); - moduleMap.put("wcwIconUpdate", 182661); - moduleMap.put("wcwIconRelease", 183123); - moduleMap.put("wcwIconUse", 183124); - moduleMap.put("wcw", 29385); - moduleMap.put("component", 115651); - moduleMap.put("ic_exchange", 87722); - moduleMap.put("iut_c_c", 240048); - moduleMap.put("iut_c_set", 240049); - - Map elogMap = new HashMap<>(); - Map reportMap = new HashMap<>(); - Map edcMap = new HashMap<>(); - Map hrmMap = new HashMap<>(); - Map crmMap = new HashMap<>(); - Map demoMap = new HashMap<>(); - - moduleFuctionMap.put("elog", elogMap); - moduleFuctionMap.put("report", reportMap); - moduleFuctionMap.put("edc", edcMap); - moduleFuctionMap.put("hrm", hrmMap); - moduleFuctionMap.put("crm", crmMap); - moduleFuctionMap.put("demo", demoMap); - - - elogMap.put("operator", "日志操作"); - elogMap.put("reportcusinfo", "报表自定义"); - edcMap.put("dataset", "数据集合"); - - demoMap.put("reportcusinfo", "报表自定义字段"); - } - - /** - * 获取模块名称 - * - * @param module - * @return - */ - public static String getModuleName(String module) { -// String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); -// return ElogSeviceUtils.isLongValue(modulename) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(modulename), modulename) : modulename; - return module; - } - - /** - * 获取模块名称 - * - * @param module - * @return - */ - public static String getModuleNamePapi(String module) { -// String modulename = ElogSeviceUtils.null2String(moduleMap.get(module), module); -// return ElogSeviceUtils.isLongValue(modulename) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(modulename), modulename) : modulename; - return module; - } - - - /** - * 获取方法名称 - * - * @param module - * @param function - * @return - */ - public static String getFunctionName(String module, String function) { -// Map functionMap = moduleFuctionMap.get(module); -// -// if (functionMap != null) -// function = ElogSeviceUtils.null2String(functionMap.get(function), function); -// -// return ElogSeviceUtils.isLongValue(function) ? SalaryI18nUtil.getI18nLabel(ElogSeviceUtils.getLongValue(function), function) : function; - return function; - } - - public static void switchValues(List resultMap, List recordColumns) { - - switchValues(resultMap, recordColumns, false); - - } - - - public static void switchValues(List list, List recordColumns, boolean islocal) { -// if(!islocal) { -// changKey2Lower(list); -// } - for (Map map : list) { - Iterator> iterator = map.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry next = iterator.next(); - for (String recordColumn : recordColumns) { - if (next.getKey().equals(recordColumn) && next.getValue() instanceof String) { - map.put(next.getKey(), transfi18Method(next.getValue())); - } - } - } - map.put("modulenamespan", getModuleName(map.get("modulename"))); - //map.put("functionnamespan", getFunctionName(map.get("modulename"), map.get("functionname"))); - //switchDatabaseField(map); - } - - } - - public static void switchDatabaseField(Map map) { - map.put("date", map.get("log_date")); - map.put("operator", map.get("log_operator")); - map.put("result", map.get("log_result")); - } - - /** - * 转换数据成多语言 - * - * @param lists - */ - public static List transfLanguageData(List lists) { - if (lists != null && lists.size() > 0) { - for (Map map : lists) { - if (map != null) { - Iterator> iterator = map.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = iterator.next(); - if (entry.getValue() instanceof Integer || entry.getValue() instanceof Long || entry.getValue() instanceof String) { - map.put(entry.getKey(), transfLanguageLableid(ElogSeviceUtils.getLongValue(entry.getValue().toString()), entry.getValue().toString())); - } else { - map.put(entry.getKey(), entry.getValue()); - } - } - } - } - } - return lists; - } - - public static String transfi18Method(String str) { - if ("新增".equals(str)) { - return transfLanguageLableid(63252l, str); - } else if ("查看".equals(str)) { - return transfLanguageLableid(55172l, str); - } else if ("修改".equals(str)) { - return transfLanguageLableid(63253l, str); - } else if ("更新".equals(str)) { - return transfLanguageLableid(29540l, str); - } else if ("删除".equals(str)) { - return transfLanguageLableid(63254l, str); - } else if (StringUtils.isNumeric(str) && str.length() < 10) { - return transfLanguageLableid(Long.parseLong(str), str); - } else { - return str; - } - } - - public static String transfLanguageLableid(Long lableid) { - return SalaryI18nUtil.getI18nLabel(Integer.parseInt(lableid.toString()), lableid.toString()); - } - - /** - * 转换多语言 - * - * @param lableid - * @param def - * @return - */ - public static String transfLanguageLableid(Long lableid, String def) { - return SalaryI18nUtil.getI18nLabel(Integer.parseInt(lableid.toString()), def); - } - - - /** - * 日志本地服务-更新明细转换 - * - * @param mainlist - * @param list - * @return - */ - public static Map switchChangeValue(List mainlist, List list) { - Map res = new HashMap<>(); - StringBuilder valuesChange = new StringBuilder(); - List valuesChanges = new ArrayList<>(); - String values = ""; - String operatetypeName = ""; - int oldCount = 0; - int newCount = 0; - String operatetype = ""; - CaseInsensitiveMap map = null; - if (list != null && list.size() > 0) { - for (Map hashmap : list) { - map = new CaseInsensitiveMap<>(hashmap); - Object obj = map.get("operatetype"); - if (obj != null) { - operatetype = obj.toString(); - } - } - } - if (mainlist != null && mainlist.size() > 0) { - for (Map hashMap : mainlist) { - map = new CaseInsensitiveMap<>(hashMap); - Object isdetail = map.get("isdetail"); - if (isdetail != null) { - if (StringUtils.isBlank(isdetail.toString()) || !"0".equals(isdetail.toString())) { - continue; - } - } else { - continue; - } - Object oldvalue = map.get("oldvalue"); - if (oldvalue != null) { - if (StringUtils.isNotBlank(oldvalue.toString())) { - oldCount++; - } - } - - Object newvalue = map.get("newvalue"); - if (newvalue != null) { - if (StringUtils.isNotBlank(newvalue.toString())) { - newCount++; - } - } - - } - } - CaseInsensitiveMap jo = null; - for (int i = 0; i < mainlist.size(); i++) { - Map jomap = mainlist.get(i); - jo = new CaseInsensitiveMap<>(jomap); - String fieldName = jo.get("fielddesc"); - String oldvalue = obj2String(jo.get("oldvalue")); - String oldrealvalue = obj2String(jo.get("oldrealvalue")); - String newValue = obj2String(jo.get("newvalue")); - String newrealvalue = obj2String(jo.get("newrealvalue")); - // oracle.sql.CLOB类型处理 - jomap.put("oldvalue", oldvalue); - jomap.put("oldrealvalue", oldrealvalue); - jomap.put("newvalue", newValue); - jomap.put("newrealvalue", newrealvalue); - - String fieldNameLabelId = jo.get("fieldnamelabelid"); - if (StringUtils.isNotBlank(fieldNameLabelId) && StringUtils.isNumeric(fieldNameLabelId)) { - fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId), fieldName); - } else if (StringUtils.isNotBlank(fieldNameLabelId) && !StringUtils.isNumeric(fieldNameLabelId) && !"-1".equals(fieldNameLabelId)) { - fieldName = fieldNameLabelId; - } else if (StringUtils.isNotBlank(fieldName) && StringUtils.isNumeric(fieldName)) { - fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldName), fieldName); - } - if (StringUtils.isNotBlank(oldrealvalue) && StringUtils.isNumeric(oldrealvalue)) { - oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue), oldvalue); - } else if (StringUtils.isNotBlank(oldrealvalue) && !StringUtils.isNumeric(oldrealvalue)) { - oldvalue = oldrealvalue; - } - if (StringUtils.isNotBlank(newrealvalue) && StringUtils.isNumeric(newrealvalue)) { - newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue), newValue); - } else if (StringUtils.isNotBlank(newrealvalue) && !StringUtils.isNumeric(newrealvalue)) { - newValue = newrealvalue; - } - - //oldvalue,newValue 避免xss漏洞 分别进行转义 -// oldvalue = StringConversionForXSS(oldvalue); -// newValue = StringConversionForXSS(newValue); - - if (oldCount != 0) { - valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); - - } else if (oldCount == 0 || newCount == 0 || operatetype.startsWith(OperateType.add) || operatetype.startsWith(OperateType.delete)) { - valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); - - } else { - valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); - } - //} - /*if (valuesChange.length() > 3) { - values = valuesChange.substring(0, valuesChange.length() - 3); - }*/ - } - - res.put("valueschanges", valuesChanges); - res.put("detailcontexts", mainlist); - return res; - } - - private static String obj2String(Object o) { - if (o == null) { - return ""; - } - if (o instanceof String) { - return (String) o; - } - return JSON.toJSONString(o); - } - - /** - * 服务中心结果集转换 - */ - public static void switchChangeValues(List list) { - CaseInsensitiveMap map = null; - for (Map hashMap : list) { - map = new CaseInsensitiveMap<>(hashMap); - int count = 0; - StringBuilder valuesChange = new StringBuilder(); - List valuesChanges = new ArrayList(); - Object detailContexts = map.get("detailcontexts"); - if (detailContexts != null) { - JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jo = jsonArray.getJSONObject(i); - String isDetail = jo.getString("isDetail"); - if (StringUtils.isBlank(isDetail) || !"0".equals(isDetail)) { - continue; - } - String oldvalue = jo.getString("oldValue"); - if (StringUtils.isNotBlank(oldvalue)) { - count++; - } - } - } - - if (detailContexts != null) { - JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(detailContexts)); - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject jo = jsonArray.getJSONObject(i); - String isDetail = jo.getString("isDetail"); - if (StringUtils.isBlank(isDetail) || !"0".equals(isDetail)) { - continue; - } - String fieldName = jo.getString("fieldDesc"); - String oldvalue = jo.getString("oldValue"); - String oldrealvalue = jo.getString("oldRealValue"); - String newValue = jo.getString("newValue"); - String newrealvalue = jo.getString("newRealValue"); - String fieldNameLabelId = jo.getString("fieldNameLabelId"); - if (StringUtils.isNotBlank(fieldNameLabelId) && StringUtils.isNumeric(fieldNameLabelId)) { - fieldName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldNameLabelId)); - } - if (StringUtils.isNotBlank(oldrealvalue) && StringUtils.isNumeric(oldrealvalue)) { - oldvalue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldrealvalue)); - } - if (StringUtils.isNotBlank(newrealvalue) && StringUtils.isNumeric(newrealvalue)) { - newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue)); - } - if (count == 0) { - valuesChanges.add(String.format(valueChangeNewFormat(), fieldName, newValue)); - } else { - valuesChanges.add(String.format(valueChangeFormat(), fieldName, oldvalue, newValue)); - } - - } - /*String values = ""; - if (valuesChange.length() > 3) { - values = valuesChange.substring(0, valuesChange.length() - 3); - }*/ - - map.put("valueschanges", valuesChanges); - } - - } - } - - public static String valueChangeNewFormat() { - return "【%s】:%s"; - } - - public static String valueChangeFormat() { - return "【%s】:" + SalaryI18nUtil.getI18nLabel(61695, "由") + - "[%s] " + SalaryI18nUtil.getI18nLabel(61697, "改为") + " [%s]"; - } - - public static void changKey2Lower(List list) { - - List newList = new ArrayList<>(); - for (Map orgMap : list) { - Map resultMap = new HashMap<>(); - - if (orgMap == null || orgMap.isEmpty()) { - newList.add(resultMap); - continue; - } - - Set keySet = orgMap.keySet(); - for (String key : keySet) { - resultMap.put(key != null ? key.toLowerCase() : "", orgMap.get(key)); - } - newList.add(resultMap); - } - list.clear(); - list.addAll(newList); - } - - /** - * 查看详细表的数据 - * - * @param list - */ - public static Map switchDetailChangeValue(List list) { - Map res = new HashMap<>(); - List> lists = new ArrayList<>(); - HashMap repeatTableName = new HashMap<>(); - CaseInsensitiveMap map = null; - for (Map hashMap : list) { - map = new CaseInsensitiveMap<>(hashMap); - List detailmap = new ArrayList<>(); - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", map.get("dataid")); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", map.get("dataid")); - detailmap.add(detailoldMap); - detailmap.add(detailnewMap); - WeaTable wea = new WeaTable(); - wea.getColumns().add(new WeaTableColumn("5%",SalaryI18nUtil.getI18nLabel(63250, "操作"), "operator")); -// wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); - Object tablename = map.get("tablename"); - Object tablenamelabelid = map.get("tablenamelabelid"); - if (tablenamelabelid != null) { - if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { - tablename = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); - } - } - Map m = new HashMap<>(); - if (tablename != null && StringUtils.isNotBlank(tablename.toString())) { - String temptablename = repeatTableName.get(tablename.toString()); - if (tablename.toString().equals(temptablename)) { - continue; - } - repeatTableName.put(tablename.toString(), tablename.toString()); - m.put("tablename", tablename.toString()); - m.put("detailmap", detailmap); - m.put("column", wea); - lists.add(m); - } else { - tablename = tablename != null ? tablename : ""; - String temptablename = repeatTableName.get(tablename.toString()); - if (tablename.toString().equals(temptablename)) { - continue; - } - repeatTableName.put(tablename.toString(), tablename.toString()); - m.put("tablename", ""); - m.put("detailmap", detailmap); - m.put("column", wea); - lists.add(m); - } - } - - for (Map hashMap : list) { - map = new CaseInsensitiveMap<>(hashMap); - Object isDetail = map.get("isdetail"); - if (isDetail != null) { - if ("0".equals(isDetail.toString())) { - continue; - } - } else { - continue; - } - String title = ""; - String dataIndex = ""; - String oldValue = ""; - String newValue = ""; - String tableName = ""; - String dataId = ""; - - Object fieldDesc = map.get("fielddesc"); - if (fieldDesc != null) { - if (StringUtils.isNotBlank(fieldDesc.toString())) { - title = fieldDesc.toString(); - } - } - - Object fieldnamelabelid = map.get("fieldnamelabelid"); - if (fieldnamelabelid != null) { - if (StringUtils.isNotBlank(fieldnamelabelid.toString()) && StringUtils.isNumeric(fieldnamelabelid.toString())) { - title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); - } - } - - Object fieldName = map.get("fieldname"); - if (fieldName != null) { - if (StringUtils.isNotBlank(fieldName.toString())) { - dataIndex = fieldName.toString(); - } - } - Object oValue = map.get("oldvalue"); - if (oValue != null) { - if (StringUtils.isNotBlank(oValue.toString())) { - oldValue = oValue.toString(); - } - } - Object nValue = map.get("newvalue"); - if (nValue != null) { - if (StringUtils.isNotBlank(nValue.toString())) { - newValue = nValue.toString(); - } - } - Object oldRealValue = map.get("oldrealvalue"); - if (oldRealValue != null) { - if (StringUtils.isNotBlank(oldRealValue.toString()) && StringUtils.isNumeric(oldRealValue.toString())) { - oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); - } - } - - Object newrealvalue = map.get("newrealvalue"); - if (newrealvalue != null) { - if (StringUtils.isNotBlank(newrealvalue.toString()) && StringUtils.isNumeric(newrealvalue.toString())) { - newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); - } - } - - Object tablename = map.get("tablename"); - if (StringUtils.isNotBlank(tablename.toString())) { - tableName = tablename.toString(); - } else { - tableName = ""; - } - Object tablenamelabelid = map.get("tablenamelabelid"); - if (tablenamelabelid != null) { - if (tablenamelabelid != null) { - if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { - tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); - } - } - } - Object dataid = map.get("dataid"); - if (StringUtils.isNotBlank(dataid.toString())) { - dataId = dataid.toString(); - } else { - dataId = ""; - } - for (Map m : lists) { - Object o = m.get("tablename"); - if (o != null) { - if (tableName.equals(o)) { - List details = (List) m.get("detailmap"); - List newDetails = new ArrayList<>(); - if (details != null && details.size() > 0) { - for (Map detail : details) { - Object data_id = detail.get("dataid"); - if (data_id != null) { - if (dataId.equals(data_id)) { - Object operator = detail.get("operator"); - if (operator != null) { - if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { - detail.put(dataIndex, oldValue); - } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { - detail.put(dataIndex, newValue); - } - } - } else { - if (newDetails.size() > 2) { - for (Map newDetail : newDetails) { - if (dataId.equals(newDetail.get("dataid"))) { - Object operator = detail.get("operator"); - if (operator != null) { - if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { - detail.put(dataIndex, oldValue); - } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { - detail.put(dataIndex, newValue); - } - } - } else { - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", map.get("dataid")); - detailoldMap.put(dataIndex, oldValue); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", map.get("dataid")); - detailnewMap.put(dataIndex, newValue); - newDetails.add(detailoldMap); - newDetails.add(detailnewMap); - } - } - } else if (newDetails.size() == 0) { - int count = 0; - for (Map mapdetail : details) { - Object dataid_ = mapdetail.get("dataid"); - if (dataid_ != null && dataid_.equals(dataId)) { - count++; - } - } - if (count == 0) { - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", map.get("dataid")); - detailoldMap.put(dataIndex, oldValue); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", map.get("dataid")); - detailnewMap.put(dataIndex, newValue); - newDetails.add(detailoldMap); - newDetails.add(detailnewMap); - } - } - } - } - } - } - if (newDetails.size() > 0) { - details.addAll(newDetails); - newDetails.clear(); - } - - WeaTable column = (WeaTable) m.get("column"); - if (column != null) { - List columns = column.getColumns(); - if (columns != null && columns.size() > 0) { - Boolean flag = true; - for (Object object : columns) { - WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); - if (weaTableColumn != null) { - String title1 = weaTableColumn.getText(); - if (title.equals(title1)) { - flag = false; - break; - } - } - } - if (flag) { - column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); - m.put("column", column); - } - } - } - } - } - } - } - res.put("detail", lists); - return res; - } - - - public static void switchDetailChangeValues(List list) { - for (Map map : list) { - Map repeatTableName = new HashMap<>(); - List detailContexts = (List) map.get("detailcontexts"); - List lists = new ArrayList<>(); - if (detailContexts != null) { - for (Map detailContext : detailContexts) { - List detailmap = new ArrayList<>(); - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", detailContext.get("dataid")); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", detailContext.get("dataid")); - detailmap.add(detailoldMap); - detailmap.add(detailnewMap); - WeaTable wea = new WeaTable(); - wea.getColumns().add(new WeaTableColumn(SalaryI18nUtil.getI18nLabel(63250, "操作"), "operator", "5%")); -// wea.getColumns().add(new WeaTableColumn("dataid", "dataid", true)); - Object tableName = detailContext.get("tableName"); - Object tablenamelabelid = detailContext.get("tableNameLabelId"); - if (tablenamelabelid != null) { - if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { - tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); - } - } - Map m = new HashMap<>(); - if (StringUtils.isNotBlank(tableName.toString())) { - String temptablename = repeatTableName.get(tableName.toString()); - if (tableName.toString().equals(temptablename)) { - continue; - } - repeatTableName.put(tableName.toString(), tableName.toString()); - m.put("tablename", tableName.toString()); - m.put("detailmap", detailmap); - m.put("column", wea); - lists.add(m); - map.put("detail", lists); - } else { - String temptablename = repeatTableName.get(tableName.toString()); - if (tableName.toString().equals(temptablename)) { - continue; - } - repeatTableName.put(tableName.toString(), tableName.toString()); - m.put("tablename", ""); - m.put("detailmap", detailmap); - m.put("column", wea); - lists.add(m); - map.put("detail", lists); - } - } - } - List details = (List) map.get("detail"); - if (details != null) { - int size = details.size(); - int start = 0; - while (start < size) { - start++; - - for (int i = 0; i < size; i++) { - Map detail = details.get(i); - - //for (Map detail : details) { - if (details.size() > size) { - break; - } - for (Map detailContext : detailContexts) { - Object isDetail = detailContext.get("isDetail"); - if (isDetail != null) { - if ("0".equals(isDetail.toString())) { - continue; - } - } else { - continue; - } - String title = ""; - String dataIndex = ""; - String oldValue = ""; - String newValue = ""; - String tableName = ""; - String dataId = ""; - Object fieldDesc = detailContext.get("fieldDesc"); - if (StringUtils.isNotBlank(fieldDesc.toString())) { - title = fieldDesc.toString(); - } - Object fieldnamelabelid = detailContext.get("fieldNameLabelId"); - if (fieldnamelabelid != null) { - if (StringUtils.isNotBlank(fieldnamelabelid.toString()) && StringUtils.isNumeric(fieldnamelabelid.toString())) { - title = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(fieldnamelabelid.toString())); - } - } - Object fieldName = detailContext.get("fieldName"); - if (StringUtils.isNotBlank(fieldName.toString())) { - dataIndex = fieldName.toString(); - } - Object oValue = detailContext.get("oldValue"); - if (StringUtils.isNotBlank(oValue.toString())) { - oldValue = oValue.toString(); - } - Object nValue = detailContext.get("newValue"); - if (StringUtils.isNotBlank(nValue.toString())) { - newValue = nValue.toString(); - } - Object oldRealValue = detailContext.get("oldRealValue"); - if (oldRealValue != null) { - if (StringUtils.isNotBlank(oldRealValue.toString()) && StringUtils.isNumeric(oldRealValue.toString())) { - oldValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(oldRealValue.toString())); - } - } - - Object newrealvalue = detailContext.get("newRealValue"); - if (newrealvalue != null) { - if (StringUtils.isNotBlank(newrealvalue.toString()) && StringUtils.isNumeric(newrealvalue.toString())) { - newValue = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(newrealvalue.toString())); - } - } - Object tablename = detailContext.get("tableName"); - if (StringUtils.isNotBlank(tablename.toString())) { - tableName = tablename.toString(); - } else { - tableName = ""; - } - Object tablenamelabelid = detailContext.get("tableNameLabelId"); - if (tablenamelabelid != null) { - if (tablenamelabelid != null) { - if (StringUtils.isNotBlank(tablenamelabelid.toString()) && StringUtils.isNumeric(tablenamelabelid.toString())) { - tableName = ElogSeviceSwitchUtils.transfLanguageLableid(Long.parseLong(tablenamelabelid.toString())); - } - } - } - Object dataid = detailContext.get("dataid"); - if (StringUtils.isNotBlank(dataid.toString())) { - dataId = dataid.toString(); - } else { - dataId = ""; - } - Object detailtablename = detail.get("tablename"); - if (detailtablename != null) { - if (tableName.equals(detailtablename.toString())) { - List detailmap = (List) detail.get("detailmap"); - List newDetails = new ArrayList<>(); - if (detailmap != null && detailmap.size() > 0) { - for (Map d : detailmap) { - Object data_id = d.get("dataid"); - if (data_id != null) { - if (dataId.equals(data_id)) { - Object operator = d.get("operator"); - if (operator != null) { - if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { - d.put(dataIndex, oldValue); - } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { - d.put(dataIndex, newValue); - } - } - } else { - if (newDetails.size() > 2) { - for (Map newDetail : newDetails) { - if (dataId.equals(newDetail.get("dataid"))) { - Object operator = d.get("operator"); - if (operator != null) { - if (SalaryI18nUtil.getI18nLabel(63248, "操作(旧)").equals(operator.toString())) { - d.put(dataIndex, oldValue); - } else if (SalaryI18nUtil.getI18nLabel(63249, "操作(新)").equals(operator.toString())) { - d.put(dataIndex, newValue); - } - } - } else { - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", detailContext.get("dataid")); - detailoldMap.put(dataIndex, oldValue); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", detailContext.get("dataid")); - detailnewMap.put(dataIndex, newValue); - newDetails.add(detailoldMap); - newDetails.add(detailnewMap); - } - } - } else if (newDetails.size() == 0) { - int count = 0; - for (Map mapdetail : detailmap) { - Object dataid_ = mapdetail.get("dataid"); - if (dataid_ != null && dataid_.equals(dataId)) { - count++; - } - } - if (count == 0) { - HashMap detailoldMap = new HashMap<>(); - detailoldMap.put("operator", SalaryI18nUtil.getI18nLabel(63248, "操作(旧)")); - detailoldMap.put("dataid", detailContext.get("dataid")); - detailoldMap.put(dataIndex, oldValue); - HashMap detailnewMap = new HashMap<>(); - detailnewMap.put("operator", SalaryI18nUtil.getI18nLabel(63249, "操作(新)")); - detailnewMap.put("dataid", detailContext.get("dataid")); - detailnewMap.put(dataIndex, newValue); - newDetails.add(detailoldMap); - newDetails.add(detailnewMap); - } - } - } - } - } - } - if (newDetails.size() > 0) { - details.addAll(newDetails); - newDetails.clear(); - //detailmap = new ArrayList<>(); - //detail.put("detailmap", detailmap); - } - - WeaTable column = (WeaTable) detail.get("column"); - if (column != null) { - List columns = column.getColumns(); - if (columns != null && columns.size() > 0) { - Boolean flag = true; - for (Object object : columns) { - WeaTableColumn weaTableColumn = JSONObject.parseObject(JSON.toJSONString(object), WeaTableColumn.class); - if (weaTableColumn != null) { - String title1 = weaTableColumn.getText(); - if (title.equals(title1)) { - flag = false; - break; - } else { - flag = true; - } - } - } - if (flag) { - column.getColumns().add(new WeaTableColumn(title, dataIndex, "5%")); - detail.put("column", column); - } - } - } - } - } - } - } - } - } - } - } - - public static List getSwitchDatabaseData(List list) { - String databaseId = new RecordSet().getDBType(); - if (ElogConsts.ORACLE.equalsIgnoreCase(databaseId) || ElogConsts.SQLSERVER.equalsIgnoreCase(databaseId)) { - List arrayList = new ArrayList<>(); - for (Map map : list) { - Set en = map.entrySet(); - Map hashMap = new HashMap<>(); - for (Map.Entry entry : en) { - Object key = entry.getKey(); - Object val = null; - if ("PARAMS".equalsIgnoreCase(key.toString()) || "CUSTOMINFO".equalsIgnoreCase(key.toString()) - || entry.getValue() instanceof ClobProxyImpl || entry.getValue() instanceof Clob) { - val = JSONObject.toJSON(entry.getValue()); - } else { - val = entry.getValue(); - } - hashMap.put(key.toString().toLowerCase(), val); - } - switchDatabaseField(hashMap); - arrayList.add(hashMap); - } - return arrayList; - } else { - for (Map map : list) { - switchDatabaseField(map); - } - return list; - } - } - - public static List getSwitchDatabaseAnalysisData(List list, Map keys) { - String databaseId = new RecordSet().getDBType(); - if (!ElogConsts.MYSQL.equalsIgnoreCase(databaseId)) { - List arrayList = new ArrayList<>(); - - for (Map map : list) { - Set en = map.entrySet(); - Map hashMap = new HashMap<>(); - for (Map.Entry entry : en) { - Object key = entry.getKey(); - Object val = entry.getValue(); - if (key.toString().equalsIgnoreCase(keys.get(key.toString().toLowerCase()))) { - key = keys.get(key.toString().toLowerCase()); - } else { - key = key.toString().toLowerCase(); - } - hashMap.put(key.toString(), val); - } - arrayList.add(hashMap); - } - return arrayList; - } - return list; - } - - /** - * 获取多个模块名称 - * - * @param modules - * @return - */ - public static Map getModuleNames(List modules) { - Map hashMap = new HashMap<>(); - if (modules == null || modules.size() == 0) { - return hashMap; - } - for (String module : modules) { - String modulenum = ElogSeviceUtils.null2String(moduleMap.get(module), module); - String modulename = ElogSeviceUtils.isLongValue(modulenum) ? SalaryI18nUtil.getI18nLabel(Integer.parseInt(modulenum), modulenum) : modulenum; - hashMap.put(module, modulename); - } - return hashMap; - - } - -// private static String StringConversionForXSS(String str) { -// if (StringUtils.isBlank(str)) -// return str; -// //判断是否是json串 是json串的话也直接返回 -// if (isJSONString(str)) -// return str; -// // 判断是否为前端标签类型字符串或带< 或 >的字符串,用false方法 /<(\\w+)[^>]*>(.*?<\\/\\1>)?/ -// Pattern pattern = Pattern.compile("[<>]"); -// Matcher matcher = pattern.matcher(str); -// if (matcher.find()) -// return SecurityUtil.encodeForHtml(str, false); -// //都不是则用true方法 -// return SecurityUtil.encodeForHtml(str, true); -// -// } - - - /** - * 判断是否为json字符串 - * - * @param content - * @return - */ - public static boolean isJSONString(String content) { - if (StringUtils.isEmpty(content)) { - return false; - } - if (!content.startsWith("{") || !content.endsWith("}")) { - if (!content.startsWith("[") || !content.endsWith("]")) { - return false; - } - } - try { - JSONObject.parse(content); - return true; - } catch (Exception e) { - return false; - } - } - - public static List getNameModule(String module) { - if (StringUtils.isBlank(module)) { - return new ArrayList<>(); - } - Map> dataMap = new HashMap<>(); - moduleMap.forEach((k, v) -> { - List list = new ArrayList<>(); - Integer moduleCode = moduleMap.get(k); - String htmlLabelName = SalaryI18nUtil.getI18nLabel(moduleCode, ""); - if (dataMap.containsKey(htmlLabelName)) { - list = dataMap.get(htmlLabelName); - list.add(k); - } else { - list.add(k); - } - dataMap.put(htmlLabelName, list); - }); - return Objects.isNull(dataMap.get(module)) ? Arrays.asList(module) : dataMap.get(module); - } -} diff --git a/src/com/engine/salary/elog/util/ElogSeviceUtils.java b/src/com/engine/salary/elog/util/ElogSeviceUtils.java deleted file mode 100644 index 58ca9ec31..000000000 --- a/src/com/engine/salary/elog/util/ElogSeviceUtils.java +++ /dev/null @@ -1,528 +0,0 @@ -package com.engine.salary.elog.util; - -import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.enums.FromTerminalType; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.servlet.http.HttpServletRequest; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; - -/** - * @Date: 2022/5/18 23:34 - * @Author: deli.xu - * @Description: elog服务工具类 - **/ -public class ElogSeviceUtils { - - private static final Logger logger = LoggerFactory.getLogger(ElogSeviceUtils.class); - - /*@Autowired - private ComInfoCache comInfoCache; - private static ComInfoCache baseComInfoCache; - - @PostConstruct - public void init() { - baseComInfoCache = comInfoCache; - }*/ - - private static final String TABLE_SPACER = "_"; - private static final String TABLE_SUFFIX = "logs"; - private static final String DETAIL_TABLE_SUFFIX = "_detail"; - public static final String BASE_TABLE = "BASE_ELOG_TABLE"; - - - public static String getTableName(String module, String function) { - return getTableName(module, function, false); - } - - public static String getTableName(String module, String function, boolean isDetail) { - String tablename = module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); -// SecurityUtil.sqlCheck(tablename); - return tablename; - } - - /** - * String 转枚举 - * - * @param c - * @param string - * @param - * @return - */ - public static > T getEnumFromString(Class c, String string) { - if (c != null && string != null) { - try { - return Enum.valueOf(c, string.trim().toUpperCase()); - } catch (IllegalArgumentException ex) { - } - } - return null; - } - - /** - * 获取ip地址 - * - * @param request - * @return - */ - public static String getIp(HttpServletRequest request) { - String ipAddress = request.getHeader("x-forwarded-for"); - String unknown = "unknown"; - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("WL-Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getRemoteAddr(); - String benji = "127.0.0.1"; - String bj = "0:0:0:0:0:0:0:1"; - if (benji.equals(ipAddress) || bj.equals(ipAddress)) { - ///根据网卡取本机配置的IP - InetAddress inet = null; - try { - inet = InetAddress.getLocalHost(); - } catch (UnknownHostException e) { - logger.error("UnknownHostException", e); - } - if (inet != null) { - ipAddress = inet.getHostAddress(); - } - } - } - ///对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 - int i = 15; - String s = ","; - if (ipAddress != null && ipAddress.length() > i) { - if (ipAddress.indexOf(s) > 0) { - ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); - } - } - return ipAddress; - } - - /** - * 获取设备信息 - * - * @param request - * @return - */ - public static String getDevice(HttpServletRequest request) { - return request.getHeader("User-Agent"); - } - - /** - * 获取来自终端的信息 - * - * @param context - * @param request - * @return - */ - public static void getFromTerminal(LoggerContext context, HttpServletRequest request) { - String fromTerminal = context.getFromTerminal(); - if (StringUtils.isEmpty(fromTerminal)) { - String device = getDevice(request); - String setFT = ""; - if (StringUtils.isNotEmpty(device)) { - context.setFromTerminal(getFromTerminal(device)); - } - } - } - - - private static String getTraceId(HttpServletRequest request) { - String traceId = request.getHeader("traceId"); - if (StringUtils.isNotBlank(traceId)) { - //System.out.println("traceId:====="+traceId); - return traceId; - } - return ""; - } - - /** - * @param request - * @return localhost:9080/api/fs/demo/updateReport - */ - public static String getRequestUrl(HttpServletRequest request) { - if (Objects.isNull(request) || Objects.isNull(request.getRequestURL())) { - return null; - } - return request.getRequestURL().toString(); - } - - /** - * @param request - * @return /api/fs/demo/updateReport - */ - public static String getRequestUri(HttpServletRequest request) { - return request.getRequestURI(); - } - - /** - * @param request - * @return GET/POST - */ - public static String getRequestMethod(HttpServletRequest request) { - return request.getMethod(); - } - - -// /** -// * 获取当前方法中的日志实体类 -// * @return -// */ -// public static LoggerContext currentElogContext() { -// return ElogThreadLocal.currentLoggerContext(); -// } - - - public static int getIntValue(String v) { - return getIntValue(v, -1); - } - - public static int getIntValue(String v, int def) { - try { - return Integer.parseInt(v); - } catch (Exception var3) { - return def; - } - } - - public static long getLongValue(String v) { - return getLongValue(v, -1l); - } - - public static long getLongValue(String v, long def) { - try { - return Long.parseLong(v); - } catch (Exception var3) { - return def; - } - } - - public static boolean isLongValue(String v) { - try { - Long.parseLong(v); - } catch (Exception e) { - return false; - } - return true; - } - - - -// /** -// * 获取request请求 -// * -// * @return -// */ -// public static HttpServletRequest getRequest() { -// return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); -// } - - /** - * 将对象转换程字符串 - * - * @param obj 目标对象 - * @param def 如果为null时的默认值 - * @return - */ - public static String null2String(Object obj, String def) { - return obj == null ? def : obj.toString(); - } - - public static String null2String(Object obj) { - return null2String(obj, ""); - } - - public static int getIntValue(Object obj, int def) { - try { - return Integer.parseInt(null2String(obj)); - } catch (Exception ex) { - return def; - } - } - -// public static Page getPage() { -// HttpServletRequest request = getRequest(); -// String num = request.getParameter("pageNum"); -// String size = request.getParameter("pageSize"); -// -// Page page = new Page(ElogSeviceUtils.getIntValue(num, 1), ElogSeviceUtils.getIntValue(size, 10)); -// return page; -// } - -// public static void main(String[] args) { -// //System.out.println(getTableName("select", "from")); -// //DataTypeEnum columnTypeEnum = getEnumFromString(DataTypeEnum.class, "varchar"); -// } - - public static List switchString(List list) { - if (list != null) { - return list.stream().map(m -> { - Set en = m.entrySet(); - for (Map.Entry entry : en) { - if (entry.getValue() != null) { - entry.setValue(String.valueOf(entry.getValue())); - } - } - return m; - }).collect(Collectors.toList()); - } else { - return list; - } - } - - public static List switchComplexString(List list) { - if (list != null) { - return list.stream().map(m -> { - Iterator iterator = m.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry next = iterator.next(); - if (next.getValue() != null) { - if (next.getValue() instanceof Map && "parmas".equals(next.getKey())) { - next.setValue(String.valueOf(next.getValue())); - } - if (next.getValue() instanceof List) { - } else { - next.setValue(String.valueOf(next.getValue())); - } - } - } - return m; - }).collect(Collectors.toList()); - } else { - return list; - } - } - - public static String getTenantKey() { - return SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; - } - - public static String getEmployeeId() { - return ""; - } - -// public static String getUserName() { -// -// String employeeId = getEmployeeId(); -// if (StringUtils.isNotEmpty(employeeId)) { -// SimpleEmployee simpleEmployee = null; -// try { -// HrmCommonUtil hrmCommonUtil = (HrmCommonUtil) ApplicationContextProvider.getBean("hrmCommonUtil"); -// simpleEmployee = hrmCommonUtil.getSimpleEmployee(ElogSeviceUtils.getLongValue(employeeId)); -// } catch (Exception e) { -// logger.error("Exception", e); -// } -// if (simpleEmployee != null) { -// if (StringUtils.isNotBlank(simpleEmployee.getUsername())) { -// return simpleEmployee.getUsername(); -// } -// } -// } -// -// -// return ""; -// } - -// /** -// * 获取rpc信息(客户端ip和来源设备) -// * -// * @param context -// */ -// public static void initRpcInfo(LoggerContext context) { -// String device = ""; -// String clientIp = ""; -// String traceId = ""; -// try { -// device = RpcContext.getContext().getAttachment(EteamsConstant.DEVICE); -// clientIp = RpcContext.getContext().getAttachment(EteamsConstant.CLIENT_IP); -// traceId = RpcContext.getContext().getAttachment(ApmConstant.TRACE_ID); -// logger.info("rpc调用获取到 device:{},clientIp:{},traceId:{}", device, clientIp, traceId); -// } catch (Exception e) { -// logger.error("Exception", e); -// } -// if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { -// context.setDevice(device); -// } -// if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { -// context.setFromTerminal(getFromTerminal(device)); -// } -// -// if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { -// context.setClientIp(clientIp); -// } -// if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { -// context.setBelongMainId(traceId); -// } -// } - - public static String getFromTerminal(String device) { - String setFT = ""; - if (StringUtils.isNotEmpty(device)) { - if (!device.contains("wxwork") && device.contains("MicroMessenger")) {//来自微信 - setFT = FromTerminalType.MICO_MSG.getCode(); - } else if (device.contains("wxwork") && device.contains("MicroMessenger")) {//企业微信 - setFT = FromTerminalType.WECHAT.getCode(); - } else if (device.contains("iPhone") && device.contains("Mac")) {//来自 Iphone - setFT = FromTerminalType.IOS.getCode(); - } else if (device.contains("Mac OS") && !device.contains("iPhone") && device.contains("weapp-pc")) {//来自 mac_client - setFT = FromTerminalType.MAC_CLIENT.getCode();//mac_client - } else if (!device.contains("wxwork") && device.contains("Mobile")) {//移动端 - setFT = FromTerminalType.H5.getCode(); - } else if (device.contains("Android") && !device.contains("wxwork")) {//来自安卓 包含安卓并且不包含微信 - setFT = FromTerminalType.ANDROID.getCode(); - } else {//pc - setFT = FromTerminalType.PC.getCode(); - } - } - return setFT; - } - - /** - * sql连接条件注入sql - * - * @param condition - * @return - */ - public static String checkConditionSql(String condition) { - if ("AND".equalsIgnoreCase(condition) || - "OR".equalsIgnoreCase(condition) - ) { - return condition; - } - return "AND"; - } - - public static String checkTypeSql(String type) { - if ("LIKE".equalsIgnoreCase(type) || - "IN".equalsIgnoreCase(type) || - "!<>".equalsIgnoreCase(type) || - "!=".equalsIgnoreCase(type) || - "BETWEEN".equalsIgnoreCase(type) || - "IS NULL".equalsIgnoreCase(type) || - "IS NULL".equalsIgnoreCase(type) || - "=".equalsIgnoreCase(type) || - "IS NOT NULL".equalsIgnoreCase(type)) { - return type; - } - return "="; - } - - /** - * sql条件防止注入 - * - * @param value - * @return - */ - public static String checkValSql(String value) { - if (StringUtils.isBlank(value)) { - return ""; - } - Pattern p = Pattern.compile("\\s+"); - Matcher m = p.matcher(value); - String val = m.replaceAll(" "); - String[] keywords = {"master ", "truncate ", "declare ", "alert ", "create ", "drop ", " version", - "show ", "table ", "index ", "insert ", "into ", "from ", - "select ", "delete ", "update ", "mid ", "master ", "char ","union "}; - - String replaceStr = val.replaceAll(" ", ""); - if (replaceStr.contains("1=1") || replaceStr.contains(";")) { - return "-1"; - } - int count = 0; - String filterVal = ""; - for (String keyddlword : keywords) { - if (val.toLowerCase().contains(keyddlword)) { - count++; - if (count == 1) { - filterVal = keyddlword; - } - } - } - - if (count > 2) { - return filterVal; - } -// value = SecurityUtil.ecodeForSql(value); - - return value; - } - - /** - * 压缩工具类- - * - * @param str - * @return desc:version 0.0.1 基于jdk自带 GZIP 压缩。最后转成base64。 - * 市面上有其他压缩像jdk 的 deflate 可以设置压缩级别,但是都是主动的,需要改业务方法, - * snappy 压缩适用于大数据压缩。大数据量比较快 hadoop首选,但是压缩后比例比较大。 - * xz 下的 压缩比率大,但是解压比较慢-不提倡,空间换时间了 - * common下的压缩其实和jdk差不多,网上说优于jdk,但是相差不大。 - * weaver 压缩基于jdk - */ - public static String compress(String str) { - if (str == null || str.trim().length() == 0) { - return str; - } - try (ByteArrayOutputStream out = new ByteArrayOutputStream(); - GZIPOutputStream gzip = new GZIPOutputStream(out)) { - gzip.write(str.getBytes()); - gzip.close(); - return Base64.getEncoder().encodeToString(out.toByteArray()); - } catch (Exception e) { - logger.error("压缩失败", e.getMessage()); - return str; - } - - } - - - /** - * 解压缩 - * - * @param str - * @return - */ - public static String uncompress(String str) { - byte[] decode = Base64.getDecoder().decode(str); - if (str == null || str.trim().length() == 0) { - return str; - } - try (ByteArrayOutputStream out = new ByteArrayOutputStream(); - ByteArrayInputStream in = new ByteArrayInputStream(decode)) { - GZIPInputStream ungzip = new GZIPInputStream(in); - byte[] buffer = new byte[2048]; - int n; - while ((n = ungzip.read(buffer)) >= 0) { - out.write(buffer, 0, n); - } - return new String(out.toByteArray()); - } catch (Exception e) { - logger.error("解缩失败:{}", e.getMessage()); - return str; - } - } - - public static Boolean checkIsNumber(Object obj) { - if (obj == null) { - return false; - } - - return StringUtils.isNumeric(obj.toString()); - - } -} diff --git a/src/com/engine/salary/elog/util/ElogUtils.java b/src/com/engine/salary/elog/util/ElogUtils.java deleted file mode 100644 index 38edd827d..000000000 --- a/src/com/engine/salary/elog/util/ElogUtils.java +++ /dev/null @@ -1,713 +0,0 @@ -package com.engine.salary.elog.util; - -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSONObject; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.enums.FromTerminalType; -import com.engine.salary.elog.threadlocal.ElogThreadLocal; -import org.apache.commons.lang3.StringUtils; -import org.apache.dubbo.common.utils.CollectionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -import weaver.hrm.User; - -import javax.servlet.http.HttpServletRequest; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; - -/** - * @ClassName: ElogUtils - * @Description TODO - * @Author tanghj - * @Date 2021/3/12 14:17 - */ -@Component -public class ElogUtils { - - private static final Logger logger = LoggerFactory.getLogger(ElogUtils.class); - - - - private static final String TABLE_SPACER = "_"; - private static final String TABLE_SUFFIX = "logs"; - private static final String DETAIL_TABLE_SUFFIX = "_detail"; - public static final String BASE_TABLE = "BASE_ELOG_TABLE"; - - public String getApplicationName() { - return applicationName; - } - - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - -// @Value("${spring.application.name}") - public static String applicationName; - - - - public static String getTableName(String module, String function) { - return getTableName(module, function, false); - } - - public static String getTableName(String module, String function, boolean isDetail) { - String tablename = module + TABLE_SPACER + function + TABLE_SUFFIX + (isDetail ? DETAIL_TABLE_SUFFIX : ""); -// SecurityUtil.sqlCheck(tablename); - return tablename; - } - - /** - * String 转枚举 - * - * @param c - * @param string - * @param - * @return - */ - public static > T getEnumFromString(Class c, String string) { - if (c != null && string != null) { - try { - return Enum.valueOf(c, string.trim().toUpperCase()); - } catch (IllegalArgumentException ex) { - } - } - return null; - } - - /** - * 获取ip地址 - * - * @param request - * @return - */ - public static String getIp(HttpServletRequest request) { - String ipAddress = request.getHeader("x-forwarded-for"); - String unknown = "unknown"; - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getHeader("WL-Proxy-Client-IP"); - } - if (ipAddress == null || ipAddress.length() == 0 || unknown.equalsIgnoreCase(ipAddress)) { - ipAddress = request.getRemoteAddr(); - String benji = "127.0.0.1"; - String bj = "0:0:0:0:0:0:0:1"; - if (benji.equals(ipAddress) || bj.equals(ipAddress)) { - ///根据网卡取本机配置的IP - InetAddress inet = null; - try { - inet = InetAddress.getLocalHost(); - } catch (UnknownHostException e) { - logger.error("UnknownHostException", e); - } - if (inet != null) { - ipAddress = inet.getHostAddress(); - } - } - } - ///对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 - int i = 15; - String s = ","; - if (ipAddress != null && ipAddress.length() > i) { - if (ipAddress.indexOf(s) > 0) { - ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); - } - } - return ipAddress; - } - - /** - * 获取设备信息 - * - * @param request - * @return - */ - public static String getDevice(HttpServletRequest request) { - return request.getHeader("User-Agent"); - } - - /** - * 获取来自终端的信息 - * - * @param context - * @param request - * @return - */ - public static void getFromTerminal(LoggerContext context, HttpServletRequest request) { - String fromTerminal = context.getFromTerminal(); - if (StringUtils.isEmpty(fromTerminal)) { - String device = getDevice(request); - String setFT = ""; - if (StringUtils.isNotEmpty(device)) { - context.setFromTerminal(getFromTerminal(device)); - } - } - } - - public static void initRequestInfo(HttpServletRequest request, LoggerContext context) { - if (StringUtils.isEmpty(context.getRequestUrl())) { - context.setRequestUrl(getRequestUrl(request)); - } - if (StringUtils.isEmpty(context.getRequestUri())) { - context.setRequestUri(getRequestMethod(request) + ":" + getRequestUri(request)); - } - //if (context.getParams() == null) { - //默认记录params,此参数给true时 或报表服务,不记录 - if (!context.getParamsIgnore() && !applicationName.equalsIgnoreCase("weaver-edcreportd-service")) { - context.setParams(getRequstParam(request,context)); - } - // } - if (StringUtils.isEmpty(context.getClientIp())) { - context.setClientIp(getIp(request)); - } - if (StringUtils.isEmpty(context.getDevice())) { - context.setDevice(getDevice(request)); - } - if (StringUtils.isEmpty(context.getFromTerminal())) { - context.setFromTerminal(getFromTerminal(getDevice(request))); - } - if (StringUtils.isEmpty(context.getBelongMainId())) { - context.setBelongMainId(getTraceId(request)); - } - - } - - private static String getTraceId(HttpServletRequest request) { - String traceId = request.getHeader("traceId"); - if (StringUtils.isNotBlank(traceId)) { - //System.out.println("traceId:====="+traceId); - return traceId; - } - return ""; - } - - /** - * @param request - * @return localhost:9080/api/fs/demo/updateReport - */ - public static String getRequestUrl(HttpServletRequest request) { - if (Objects.isNull(request) || Objects.isNull(request.getRequestURL())) { - return null; - } - return request.getRequestURL().toString(); - } - - /** - * @param request - * @return /api/fs/demo/updateReport - */ - public static String getRequestUri(HttpServletRequest request) { - return request.getRequestURI(); - } - - /** - * @param request - * @return GET/POST - */ - public static String getRequestMethod(HttpServletRequest request) { - return request.getMethod(); - } - - public static Map getRequstParam(HttpServletRequest request, LoggerContext context) { - return request2Map(request, context); - } - - /** - * 获取当前方法中的日志实体类 - * - * @return - */ - public static LoggerContext currentElogContext() { - return ElogThreadLocal.currentLoggerContext(); - } - - public static Map request2Map(HttpServletRequest request, LoggerContext context) { - // 参数Map - Map properties = request.getParameterMap(); - // 返回值Map - Map returnMap = new HashMap(); - Iterator entries = properties.entrySet().iterator(); - Map.Entry entry; - String name = ""; - Object value = null; - while (entries.hasNext()) { - entry = (Map.Entry) entries.next(); - name = (String) entry.getKey(); - Object valueObj = entry.getValue(); - if (null == valueObj) { - value = null; - } else if (valueObj instanceof String[]) { - String[] values = (String[]) valueObj; - if (values.length == 1) { - value = values[0]; - } else { - value = values; - } - } else { - value = valueObj.toString(); - } - returnMap.put(name, value); - } - //放入ip - returnMap.put("param_ip", getIp(request)); - returnMap.put("request_header_user_agent", request.getHeader("user-agent")); - JSONObject body = ElogThreadLocal.getRequestBody(); - if (body != null) { -// returnMap.put("request_body", body); - setReturnMapBody(returnMap,context.getParamsBodyKeys(),body); - } - return returnMap; - } - - public static void setReturnMapBody(Map returnMap,List keys,JSONObject body) { - //模块没设置则全部记录 - if (CollectionUtils.isEmpty(keys)) { - returnMap.put("request_body", body); - }else { - JSONObject newBody = new JSONObject(); - for (String key : keys) { - newBody.put(key,body.get(key)); - } - returnMap.put("request_body", newBody); - } - } - - public static int getIntValue(String v) { - return getIntValue(v, -1); - } - - public static int getIntValue(String v, int def) { - try { - return Integer.parseInt(v); - } catch (Exception var3) { - return def; - } - } - - public static long getLongValue(String v) { - return getLongValue(v, -1l); - } - - public static long getLongValue(String v, long def) { - try { - return Long.parseLong(v); - } catch (Exception var3) { - return def; - } - } - - - /** - * 将对象转换程字符串 - * - * @param obj 目标对象 - * @param def 如果为null时的默认值 - * @return - */ - public static String null2String(Object obj, String def) { - return obj == null ? def : obj.toString(); - } - - public static String null2String(Object obj) { - return null2String(obj, ""); - } - - public static int getIntValue(Object obj, int def) { - try { - return Integer.parseInt(null2String(obj)); - } catch (Exception ex) { - return def; - } - } - -// public static Page getPage() { -// HttpServletRequest request = getRequest(); -// String num = request.getParameter("pageNum"); -// String size = request.getParameter("pageSize"); -// -// Page page = new Page(ElogUtils.getIntValue(num, 1), ElogUtils.getIntValue(size, 10)); -// return page; -// } - -// public static void main(String[] args) { -// //System.out.println(getTableName("select", "from")); -// //DataTypeEnum columnTypeEnum = getEnumFromString(DataTypeEnum.class, "varchar"); -// } - - public static List switchString(List list) { - if (list != null) { - return list.stream().map(m -> { - Set en = m.entrySet(); - for (Map.Entry entry : en) { - if (entry.getValue() != null) { - entry.setValue(String.valueOf(entry.getValue())); - } - } - return m; - }).collect(Collectors.toList()); - } else { - return list; - } - } - - public static List switchComplexString(List list) { - if (list != null) { - return list.stream().map(m -> { - Iterator iterator = m.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry next = iterator.next(); - if (next.getValue() != null) { - if (next.getValue() instanceof Map && "parmas".equals(next.getKey())) { - next.setValue(String.valueOf(next.getValue())); - } - if (next.getValue() instanceof List) { - } else { - next.setValue(String.valueOf(next.getValue())); - } - } - } - return m; - }).collect(Collectors.toList()); - } else { - return list; - } - } - - /** - * 获取rpc信息(客户端ip和来源设备) - * - * @param context - */ - public static void initRpcInfo(LoggerContext context) { - User user = context.getUser(); - if(user == null){ - return; - } - String device = user.getLogintype(); - String clientIp = user.getLoginip(); - String traceId = ""; - if (StringUtils.isEmpty(context.getDevice()) && StringUtils.isNotEmpty(device)) { - context.setDevice(device); - } - if (StringUtils.isEmpty(context.getFromTerminal()) && StringUtils.isNotEmpty(device)) { - context.setFromTerminal(getFromTerminal(device)); - } - - if (StringUtils.isEmpty(context.getClientIp()) && StringUtils.isNotEmpty(clientIp)) { - context.setClientIp(clientIp); - } - if (StringUtils.isEmpty(context.getBelongMainId()) && StringUtils.isNotEmpty(traceId)) { - context.setBelongMainId(traceId); - } - } - - public static String getFromTerminal(String device) { - String setFT = ""; - if (StringUtils.isNotEmpty(device)) { - if (!device.contains("wxwork") && device.contains("MicroMessenger")) {//来自微信 - setFT = FromTerminalType.MICO_MSG.getCode(); - } else if (device.contains("wxwork") && device.contains("MicroMessenger")) {//企业微信 - setFT = FromTerminalType.WECHAT.getCode(); - } else if (device.contains("iPhone") && device.contains("Mac")) {//来自 Iphone - setFT = FromTerminalType.IOS.getCode(); - } else if (device.contains("Mac OS") && !device.contains("iPhone") && device.contains("weapp-pc")) {//来自 mac_client - setFT = FromTerminalType.MAC_CLIENT.getCode();//mac_client - } else if (!device.contains("wxwork") && device.contains("Mobile")) {//移动端 - setFT = FromTerminalType.H5.getCode(); - } else if (device.contains("Android") && !device.contains("wxwork")) {//来自安卓 包含安卓并且不包含微信 - setFT = FromTerminalType.ANDROID.getCode(); - } else {//pc - setFT = FromTerminalType.PC.getCode(); - } - } - return setFT; - } - - /** - * sql连接条件注入sql - * - * @param condition - * @return - */ - public static String checkConditionSql(String condition) { - if ("AND".equalsIgnoreCase(condition) || - "OR".equalsIgnoreCase(condition) - ) { - return condition; - } - return "AND"; - } - - public static String checkTypeSql(String type) { - if ("LIKE".equalsIgnoreCase(type) || - "IN".equalsIgnoreCase(type) || - "!<>".equalsIgnoreCase(type) || - "!=".equalsIgnoreCase(type) || - "BETWEEN".equalsIgnoreCase(type) || - "IS NULL".equalsIgnoreCase(type) || - "IS NULL".equalsIgnoreCase(type) || - "=".equalsIgnoreCase(type) || - "IS NOT NULL".equalsIgnoreCase(type)) { - return type; - } - return "="; - } - - /** - * sql条件防止注入 - * - * @param value - * @return - */ - public static String checkValSql(String value) { - Pattern p = Pattern.compile("\\s+"); - Matcher m = p.matcher(value); - String val = m.replaceAll(" "); - String[] keywords = {"master", "truncate", "declare", "alert", "create", "drop", "version", - "show", "table", "index", "insert", "into", "from", - "insert", "select", "delete", "update", "chr", "mid", "master", "truncate", "char", "declare", "union"}; - - - int count = 0; - String filterVal = ""; - for (String keyddlword : keywords) { - if (val.toLowerCase().contains(keyddlword)) { - count++; - if (count == 1) { - filterVal = keyddlword; - } - } - } - - if (count > 2) { - return filterVal; - } -// value = SecurityUtil.ecodeForSql(value); - - return value; - } - - /** - * 压缩工具类- - * - * @param str - * @return desc:version 0.0.1 基于jdk自带 GZIP 压缩。最后转成base64。 - * 市面上有其他压缩像jdk 的 deflate 可以设置压缩级别,但是都是主动的,需要改业务方法, - * snappy 压缩适用于大数据压缩。大数据量比较快 hadoop首选,但是压缩后比例比较大。 - * xz 下的 压缩比率大,但是解压比较慢-不提倡,空间换时间了 - * common下的压缩其实和jdk差不多,网上说优于jdk,但是相差不大。 - * weaver 压缩基于jdk - */ - public static String compress(String str) { - if (str == null || str.trim().length() == 0) { - return str; - } - try (ByteArrayOutputStream out = new ByteArrayOutputStream(); - GZIPOutputStream gzip = new GZIPOutputStream(out)) { - gzip.write(str.getBytes()); - gzip.close(); - return Base64.getEncoder().encodeToString(out.toByteArray()); - } catch (Exception e) { - logger.error("压缩失败", e.getMessage()); - return str; - } - - } - - - /** - * 解压缩 - * - * @param str - * @return - */ - public static String uncompress(String str) { - byte[] decode = Base64.getDecoder().decode(str); - if (str == null || str.trim().length() == 0) { - return str; - } - try (ByteArrayOutputStream out = new ByteArrayOutputStream(); - ByteArrayInputStream in = new ByteArrayInputStream(decode)) { - GZIPInputStream ungzip = new GZIPInputStream(in); - byte[] buffer = new byte[2048]; - int n; - while ((n = ungzip.read(buffer)) >= 0) { - out.write(buffer, 0, n); - } - return new String(out.toByteArray()); - } catch (Exception e) { - logger.error("解缩失败:{}", e.getMessage()); - return str; - } - } - - public static LoggerContext getEsField(LoggerContext context, String field) { - - switch (field.toLowerCase()) { - case "interfacename": - context.setInterfaceName(""); - break; - case "operatetype": - context.setOperateType(""); - break; - case "operatedesc": - context.setOperatedesc(""); - break; - case "params": - context.setParamsStr("ES"); - break; - case "clientip": - context.setClientIp(""); - break; - case "groupnamelabel": - context.setGroupNameLabel(""); - break; - case "redoservice": - context.setRedoService(""); - break; - case "redocontext": - context.setRedoContextStr(""); - break; - case "cancelservice": - context.setCancelService(""); - break; - case "cancelcontext": - context.setCancelContextStr(""); - break; - case "device": - context.setDevice(""); - break; - case "groupid": - context.setGroupId(""); - break; - case "belongmainid": - context.setBelongMainId(""); - break; - case "requesturl": - context.setRequestUrl(""); - break; - case "requesturi": - context.setRequestUri(""); - break; - case "log_result": - context.setResult(""); - break; - case "fromterminal": - context.setFromTerminal(""); - break; - case "resultdesc": - context.setResultDesc(""); - break; - case "old_content": - context.setOld_content(""); - break; - case "link_type": - context.setLink_type(""); - break; - } - - return context; - } - - public static String[] getESfields(String value) { - String[] split = value.split(","); - List list = new ArrayList<>(); - for (String s : split) { - switch (s.toLowerCase()) { - case "interfacename": - list.add("interfacename"); - break; - case "operatetype": - list.add("operatetype"); - break; - case "operatedesc": - list.add("operatedesc"); - break; - case "params": - list.add("params"); - break; - case "clientip": - list.add("clientip"); - break; - case "groupnamelabel": - list.add("groupnamelabel"); - break; - case "redoservice": - list.add("redoservice"); - break; - case "redocontext": - list.add("redocontext"); - break; - case "cancelservice": - list.add("cancelservice"); - break; - case "cancelcontext": - list.add("cancelcontext"); - break; - case "device": - list.add("device"); - break; - case "groupid": - list.add("groupid"); - break; - case "belongmainid": - list.add("belongmainid"); - break; - case "requesturl": - list.add("requesturl"); - break; - case "requesturi": - list.add("requesturi"); - break; - case "log_result": - list.add("logResult"); - break; - case "fromterminal": - list.add("fromterminal"); - break; - case "resultdesc": - list.add("resultdesc"); - break; - case "old_content": - list.add("oldContent"); - break; - case "link_type": - list.add("linkType"); - break; - } - } - //list转为数组 - if (list.size() > 0) { - String[] strings = list.toArray(new String[list.size()]); - return strings; - } - return null; - } - - public static String handleClobColumn(String value) { - // 处理超长字符串,oracle插入报错ORA-01704: string literal too long - if (StringUtils.isBlank(value)){ - return ""; - } - StringBuilder formatValue = new StringBuilder(); - String[] split = StrUtil.split(value, 1000); - for (int i = 0; i < split.length; i++) { - formatValue.append("TO_CLOB('").append(split[i]).append("')"); - if (i != split.length - 1) { - formatValue.append("||"); - } - } - return formatValue.toString(); - } - -} diff --git a/src/com/engine/salary/elog/util/FieldNameMap.java b/src/com/engine/salary/elog/util/FieldNameMap.java deleted file mode 100644 index dcde0258c..000000000 --- a/src/com/engine/salary/elog/util/FieldNameMap.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.engine.salary.elog.util; - -import org.apache.commons.lang3.StringUtils; - -import java.util.HashMap; -import java.util.Map; - -/** - * @ClassName: FieldNameMap - * @Description TODO - * @Author tanghj - * @Date 2021/3/31 14:27 - */ -public class FieldNameMap { - - private static Map mainFieldNameMap = new HashMap<>(); - - private static Map detailFieldNameMap = new HashMap<>(); - - private static Map> mainCusFieldNameMap = new HashMap<>(); - - private static Map> detailCusFieldNameMap = new HashMap<>(); - - - public static void setMainFieldName(Map fieldNameMap) { - mainFieldNameMap.putAll(fieldNameMap); - } - - public static void setDetailFieldName(Map fieldNameMap) { - detailFieldNameMap.putAll(fieldNameMap); - } - - public static void setMainCusFieldName(String module, String function, Map fieldNameMap) { - mainCusFieldNameMap.put(getKey(module, function), fieldNameMap); - } - - public static void setDetailCusFieldName(String module, String function, Map fieldNameMap) { - detailCusFieldNameMap.put(getKey(module, function), fieldNameMap); - } - - - public static String getMainFieldNameMap(String module, String function, String key) { - - String str = key.toLowerCase(); - if(mainFieldNameMap.containsKey(str)) { - return StringUtils.isNotEmpty(mainFieldNameMap.get(str)) ? mainFieldNameMap.get(str) : key; - } else { - return getMainCusFieldNameMap(module, function,key); - } - } - - public static String getDetailFieldNameMap(String module, String function, String key) { - key = key.toLowerCase(); - if(detailFieldNameMap.containsKey(key)) { - return StringUtils.isNotEmpty(detailFieldNameMap.get(key)) ? detailFieldNameMap.get(key) : key; - } else { - return getDetailCusFieldNameMap(module, function, key); - } - } - - public static String getMainCusFieldNameMap(String module, String function, String key) { - - if(mainCusFieldNameMap.containsKey(getKey(module, function))) { - if(mainCusFieldNameMap.get(getKey(module, function)).containsKey(key)) { - return StringUtils.isNotEmpty(mainCusFieldNameMap.get(getKey(module, function)).get(key)) ? - mainCusFieldNameMap.get(getKey(module, function)).get(key) : - key; - } else { - return key; - } - } else { - return key; - } - } - - public static String getDetailCusFieldNameMap(String module, String function, String key) { - - if(detailCusFieldNameMap.containsKey(getKey(module, function))) { - if(detailCusFieldNameMap.get(getKey(module, function)).containsKey(key)) { - return StringUtils.isNotEmpty(detailCusFieldNameMap.get(getKey(module, function)).get(key)) ? - detailCusFieldNameMap.get(getKey(module, function)).get(key) : - key; - } else { - return key; - } - } else { - return key; - } - } - - private static String getKey(String module, String function) { - return module + "@" + function; - } -} diff --git a/src/com/engine/salary/elog/util/LoggerTemplate.java b/src/com/engine/salary/elog/util/LoggerTemplate.java deleted file mode 100644 index 842f72783..000000000 --- a/src/com/engine/salary/elog/util/LoggerTemplate.java +++ /dev/null @@ -1,630 +0,0 @@ -package com.engine.salary.elog.util; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.parser.Feature; -import com.alibaba.fastjson.serializer.SerializerFeature; -import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.salary.elog.annotation.ElogTransform; -import com.engine.salary.elog.async.LoggerMessageListener; -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.LoggerDetailContext; -import com.engine.salary.elog.entity.dto.TableChangeBean; -import com.engine.salary.util.db.IdGenerator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import weaver.hrm.User; - -import java.lang.reflect.Field; -import java.util.*; - -/** - * @ClassName: LoggerTemplate - * @Description 日志基本功能类 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -//@Component -public class LoggerTemplate { - protected String function = "common"; - - protected String module; - - protected String logCenterQueue = "Elog_cneterlogQueue"; - - public static final String AUDITLOGQUEUE = "AuditLog"; - public static final String ELOG = "Elog"; - - protected String localQueue; - - protected String moduleName; - - protected static String applicationName; - - public void setApplicationName(String applicationName) { - LoggerTemplate.applicationName = applicationName; - } - - public String getApplicationName() { - return applicationName; - } - - private static final Logger logger = LoggerFactory.getLogger(LoggerTemplate.class); - - protected static String publishkitGroup; - - public void setPublishkitGroup(String publishkitGroup) { - LoggerTemplate.publishkitGroup = publishkitGroup; - } - - public String getPublishkitGroup() { - return publishkitGroup; - } - - - LoggerMessageListener loggerMessageListener = new LoggerMessageListener(); - - /** - * 写入日志消息队列 - * - * @param context 日志实体 - */ - public void write(LoggerContext context) { - this.write(context, true); - } - - /** - * 写入日志消息队列 - * - * @param context 日志实体 - * @param isLocal true 存储本地, false不存储本地 - */ - public void write(LoggerContext context, boolean isLocal) { - String elogLocalQueue = ELOG + this.applicationName; - if (StringUtils.isEmpty(this.localQueue)) - this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue" + this.publishkitGroup; - try { - handleContext(context); - } catch (Exception e) { - logger.error("handleContext方法异常!{}", e.getMessage(), e); - } - loggerMessageListener.receiveold(context); - - } - -// public void writeLocal(LoggerContext context){ -// String elogLocalQueue = ELOG + this.applicationName; -// if(StringUtils.isEmpty(this.localQueue)) -// this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue" + this.publishkitGroup; -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// if (context.getWeakElogReocrd() && CollectionUtils.isEmpty(context.getDetailContexts() )) { -// logger.info("日志弱控且没有明细记录,不记录日志,modulename:{},functionname:{}",context.getModuleName(),context.getFunctionName()); -// return; -// } -// -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(localQueue); -// asyncClient.send(asyncBean); -// } catch (Exception e) { -// logger.error("发送writeLocal-mq消息异常!{}",e.getMessage(),e); -// } -// } - - -// public void checkAsyncBean(AsyncBean asyncBean) { -// int length = JSON.toJSON(asyncBean).toString().getBytes(StandardCharsets.UTF_8).length / 1000; -// boolean checkPass = length <= 5120; -// if (!checkPass) -// throw new RuntimeException("消息体超出5M,不支持发送!"); -// } - -// /** -// * 没有明细变化可以不写入日志 -// * @param context 日志信息 -// * @param isLocal 是否写入本地 -// * @param notChangeDetailSendLog 没有明细变化不写入日志 -// */ -// public void write(LoggerContext context, boolean isLocal,boolean notChangeDetailSendLog){ -// String elogLocalQueue = ELOG + this.applicationName; -// if(StringUtils.isEmpty(this.localQueue)) -// this.localQueue = (StringUtils.isNotEmpty(this.moduleName) ? this.moduleName : elogLocalQueue) + "LocalQueue"; -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// -// if (notChangeDetailSendLog && (context.getDetailContexts() == null || context.getDetailContexts().size() == 0)) { -// return; -// } -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(logCenterQueue); -// asyncClient.send(asyncBean); -// writeHrmLog(context); -// if(isLocal) { -// asyncBean.setQueue(localQueue); -// asyncClient.send(asyncBean); -// } -// } catch (Exception e) { -// logger.error("发送mq消息异常!{}",e.getMessage(),e); -// } -// -// } - -// /** -// * 支持了向其他模块服务发送业务日志 -// * @param context -// * @param isLocal -// * @param moduleName -// */ -// public void write(LoggerContext context, boolean isLocal, String moduleName){ -// -// if(StringUtils.isNotEmpty(moduleName)) { -// String localQueue = moduleName + "LocalQueue"; -// // context.setModuleName(moduleName); -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(logCenterQueue); -// asyncClient.send(asyncBean); -// writeHrmLog(context); -// if(isLocal) { -// asyncBean.setQueue(localQueue); -// asyncClient.send(asyncBean); -// } -// } catch (Exception e) { -// logger.error("发送mq消息异常!:{}",e.getMessage()); -// } -// } else { -// write(context, isLocal); -// } -// -// } - -// public void writeHrmLog(LoggerContext context) { -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// asyncBean.setMessage(context); -// //asyncBean.setTopic(WRITEAUDITLOGTOPIC); -// asyncBean.setQueue(AUDITLOGQUEUE); -// asyncClient.send(asyncBean); -// -// } - -// /** -// * 支持了向其他模块服务发送业务日志 -// * @param context -// * @param isLocal -// * @param moduleName -// */ -// public void write(LoggerContext context, boolean isLocal, String moduleName,String functionName,String queueName){ -// -// if (StringUtils.isNotEmpty(moduleName) && StringUtils.isNotEmpty(functionName)) { -// context.setModuleName(moduleName); -// context.setFunctionName(functionName); -// this.localQueue = queueName + "LocalQueue"; -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(logCenterQueue); -// asyncClient.send(asyncBean); -// writeHrmLog(context); -// if (isLocal) { -// asyncBean.setQueue(localQueue); -// asyncClient.send(asyncBean); -// } -// } catch (Exception e) { -// logger.error("发送mq消息异常!,{}!",e); -// } -// } else { -// write(context, isLocal); -// } -// -// } - - private void handleContext(LoggerContext context) { - if (StringUtils.isEmpty(context.getModuleName())) - context.setModuleName(module); - if (StringUtils.isEmpty(context.getFunctionName())) - context.setFunctionName(function); - if (!(context.getId() > 0)) - context.setId(IdGenerator.generate()); - if (StringUtils.isEmpty(context.getUuid())) { - context.setUuid(UUID.randomUUID().toString().replace("-", "")); - } - - context.setTempParams(null); - String employeeId = Optional.ofNullable(context.getUser()).map(User::getUID).orElse(0).toString(); - String tenantKey = SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; - String userName = Optional.ofNullable(context.getUser()).map(User::getUsername).orElse("").toString(); - if (StringUtils.isEmpty(context.getOperator()) && StringUtils.isNotEmpty(employeeId)) { - context.setOperator(employeeId + ""); - } - if (StringUtils.isEmpty(context.getTenant_key()) && StringUtils.isNotEmpty(tenantKey)) { - context.setTenant_key(tenantKey); - } - if (StringUtils.isEmpty(context.getOperatorName()) && StringUtils.isNotEmpty(userName)) { - context.setOperatorName(userName); - } - //} - - if (StringUtils.isBlank(context.getOperator()) || "null".equals(context.getOperator())) { - context.setOperator("-1"); - } - if (StringUtils.isBlank(context.getTargetId()) || "null".equals(context.getTargetId())) { - context.setTargetId("-1"); - } - -// RequestAttributes requestAttributes = SalaryContext.get().getRequestAttributesSafely(); -// if ((requestAttributes instanceof ServletRequestAttributes)) { -// HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); -// ElogUtils.initRequestInfo(request, context); -// } else { -// if (StringUtils.isEmpty(context.getRequestUrl())) { -// context.setRequestUrl("非http请求"); -// } -// ElogUtils.initRpcInfo(context); -// } - ElogUtils.initRpcInfo(context); - - List changeBeans = context.getChangeValues(); - - List valueChangeList = new ArrayList<>(); - int showOrder = 0; - if (changeBeans != null) - for (TableChangeBean changeBean : changeBeans) { - if (changeBean != null && (changeBean.getNewValue() != null || changeBean.getOldValue() != null)) { - String uuid = UUID.randomUUID().toString().replace("-", ""); - ApiModel apiModel = null; - ElogTransform tableTransform = null; - JSONObject newJo = new JSONObject(); - JSONObject oldJo = new JSONObject(); - JSONObject valueChange = JSONObject.parseObject(JSONObject.toJSONString(changeBean, SerializerFeature.WriteDateUseDateFormat), Feature.OrderedField); - Field[] fields = null; - if (changeBean.getNewValue() != null) { - apiModel = changeBean.getNewValue().getClass().getAnnotation(ApiModel.class); - tableTransform = changeBean.getNewValue().getClass().getAnnotation(ElogTransform.class); - //fields = changeBean.getNewValue().getClass().getDeclaredFields(); - fields = getAllFields(changeBean.getNewValue().getClass()); - newJo = valueChange.getJSONObject("newValue"); - } else { - apiModel = changeBean.getOldValue().getClass().getAnnotation(ApiModel.class); - tableTransform = changeBean.getOldValue().getClass().getAnnotation(ElogTransform.class); - //fields = changeBean.getOldValue().getClass().getDeclaredFields(); - fields = getAllFields(changeBean.getOldValue().getClass()); - } - if (changeBean.getOldValue() != null) { - oldJo = valueChange.getJSONObject("oldValue"); - } - if ((apiModel != null || tableTransform != null) && fields != null) { - - for (Field field : fields) { - if (StringUtils.isEmpty(newJo.getString(field.getName())) && StringUtils.isEmpty(oldJo.getString(field.getName()))) { - continue; - } - if (StringUtils.isNotEmpty(newJo.getString(field.getName())) && newJo.getString(field.getName()).equals(oldJo.getString(field.getName()))) { - continue; - } - - ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); - ElogTransform fieldElogTransform = field.getAnnotation(ElogTransform.class); - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - if (fieldElogTransform != null && fieldElogTransform.ignore()) { - continue; - } - - //todo 若analyticList为true 且 新旧值属于JSONArray 解析List - if (fieldElogTransform != null && fieldElogTransform.analyticList() && fieldElogTransform.analyticListClass() != void.class) { - analyticListMethod(field, newJo, oldJo, valueChangeList, fieldElogTransform); - continue; - } - - valueChangeBean.setUuid(uuid); - valueChangeBean.setTableName(tableTransform != null && StringUtils.isNotEmpty(tableTransform.name()) ? tableTransform.name() : changeBean.getTableName()); - valueChangeBean.setTableNameDesc(tableTransform != null && StringUtils.isNotEmpty(tableTransform.tablename()) ? tableTransform.tablename() : ""); - valueChangeBean.setTableNameLabelId(tableTransform != null && tableTransform.labelId() != -1 ? tableTransform.labelId() + "" : ""); - valueChangeBean.setIsDetail(changeBean.getIsDetail()); - valueChangeBean.setFieldName(field.getName()); - valueChangeBean.setFieldDesc(fieldElogTransform != null ? fieldElogTransform.name() : apiModelProperty != null ? apiModelProperty.value() : field.getName()); - valueChangeBean.setFieldNameLabelId(fieldElogTransform != null ? fieldElogTransform.labelId() + "" : "-1"); - valueChangeBean.setDataid(StringUtils.isNotEmpty(changeBean.getDataid()) ? changeBean.getDataid() : - StringUtils.isNoneEmpty(newJo.getString("id")) ? newJo.getString("id") : oldJo.getString("id")); - valueChangeBean.setBelongDataid(StringUtils.isNotEmpty(changeBean.getBelongDataid()) ? changeBean.getBelongDataid() : ""); - - valueChangeBean.setNewValue(newJo.getString(field.getName())); - valueChangeBean.setOldValue(oldJo.getString(field.getName())); - valueChangeBean.setCreator(-1l); - try { - extracted(newJo, oldJo, field, fieldElogTransform, valueChangeBean); - } catch (Exception e) { - logger.error("转换出错:{}", e); - //System.out.println("转换出错:" + e.getMessage()); - } - - - valueChangeBean.setShoworder(showOrder++); - valueChangeList.add(valueChangeBean); - } - } else { - Set keys = new HashSet<>(); - for (String key : (Set) newJo.keySet()) { - keys.add(key); - if (newJo.getString(key).equals(oldJo.getString(key))) { - continue; - } - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setUuid(uuid); - valueChangeBean.setTableName(changeBean.getTableName()); - valueChangeBean.setIsDetail(changeBean.getIsDetail()); - valueChangeBean.setDataid(StringUtils.isNotEmpty(changeBean.getDataid()) ? changeBean.getDataid() : - StringUtils.isNoneEmpty(newJo.getString("id")) ? newJo.getString("id") : oldJo.getString("id")); - valueChangeBean.setBelongDataid(StringUtils.isNotEmpty(changeBean.getBelongDataid()) ? changeBean.getBelongDataid() : ""); - valueChangeBean.setFieldName(key); - valueChangeBean.setFieldDesc(key); - valueChangeBean.setNewValue(newJo.getString(key)); - valueChangeBean.setOldValue(oldJo.getString(key)); - valueChangeBean.setShoworder(showOrder++); - valueChangeBean.setCreator(-1l); - valueChangeList.add(valueChangeBean); - } - for (String key : (Set) oldJo.keySet()) { - if (keys.contains(key)) - continue; - keys.add(key); - if (oldJo.getString(key).equals(newJo.getString(key))) { - continue; - } - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - valueChangeBean.setTableName(changeBean.getTableName()); - valueChangeBean.setIsDetail(changeBean.getIsDetail()); - valueChangeBean.setFieldName(key); - valueChangeBean.setFieldDesc(key); - valueChangeBean.setNewValue(newJo.getString(key)); - valueChangeBean.setOldValue(oldJo.getString(key)); - valueChangeBean.setShoworder(showOrder++); - valueChangeBean.setCreator(-1l); - valueChangeList.add(valueChangeBean); - } - } - } - } - - if (valueChangeList.size() > 0) - context.setDetailContexts(valueChangeList); - } - - - private void analyticListMethod(Field field, JSONObject newJo, JSONObject oldJo, List valueChangeList, ElogTransform tableTransform) { - JSONArray newValueArr = newJo.get(field.getName()) == null ? new JSONArray() : (JSONArray) newJo.get(field.getName()); - JSONArray oldvalueArr = oldJo.get(field.getName()) == null ? new JSONArray() : (JSONArray) oldJo.get(field.getName()); - Field[] allFields = getAllFields(tableTransform.analyticListClass()); - - - Boolean oldvalueIsNull = false; - Boolean newvalueIsNull = false; - - if (oldvalueArr.size() == 0) { - oldvalueIsNull = true; - } - if (newValueArr.size() == 0) { - newvalueIsNull = true; - } - if ((oldvalueIsNull && newvalueIsNull) || (!oldvalueIsNull && !newvalueIsNull && oldvalueArr.size() != newValueArr.size())) { - //如果新、旧没值或新旧值list数量对不上 直接返回 - return; - } - - JSONArray foreachArr = oldvalueIsNull ? newValueArr : oldvalueArr; - - //遍历list - for (int i = 0; i < foreachArr.size(); i++) { - //默认另一个list关系是一一对应的 - JSONObject oldValue = oldvalueIsNull ? new JSONObject() : (JSONObject) oldvalueArr.get(i); - JSONObject newValue = newvalueIsNull ? new JSONObject() : (JSONObject) newValueArr.get(i); - - //dataid uuid showOrder - long dataid = IdGenerator.generate(); - String uuid = UUID.randomUUID().toString().replace("-", ""); - int showOrder = 0; - - //遍历字段 - for (Field allField : allFields) { - if (StringUtils.isEmpty(newValue.getString(allField.getName())) && StringUtils.isEmpty(oldValue.getString(allField.getName()))) { - continue; - } - if (StringUtils.isNotEmpty(newValue.getString(allField.getName())) && newValue.getString(allField.getName()).equals(oldValue.getString(allField.getName()))) { - continue; - } - - ApiModelProperty apiModelProperty = allField.getAnnotation(ApiModelProperty.class); - ElogTransform fieldElogTransform = allField.getAnnotation(ElogTransform.class); - LoggerDetailContext valueChangeBean = new LoggerDetailContext(); - - valueChangeBean.setUuid(uuid); - valueChangeBean.setTableName(tableTransform != null && StringUtils.isNotEmpty(tableTransform.name()) ? tableTransform.name() : field.getName()); - valueChangeBean.setTableNameDesc(tableTransform != null && StringUtils.isNotEmpty(tableTransform.tablename()) ? tableTransform.tablename() : ""); - valueChangeBean.setTableNameLabelId(tableTransform != null && tableTransform.labelId() != -1 ? tableTransform.labelId() + "" : ""); - valueChangeBean.setIsDetail(1); - valueChangeBean.setFieldName(allField.getName()); - valueChangeBean.setNewValue(newValue.getString(allField.getName())); - valueChangeBean.setOldValue(oldValue.getString(allField.getName())); - valueChangeBean.setCreator(-1l); - valueChangeBean.setBelongDataid(""); - valueChangeBean.setDataid(String.valueOf(dataid)); - - if (fieldElogTransform != null) { - if (fieldElogTransform.ignore()) { - continue; - } - - valueChangeBean.setFieldDesc(fieldElogTransform != null ? fieldElogTransform.name() : apiModelProperty != null ? apiModelProperty.value() : field.getName()); - valueChangeBean.setFieldNameLabelId(fieldElogTransform != null ? fieldElogTransform.labelId() + "" : "-1"); - - try { - extracted(newValue, oldValue, allField, fieldElogTransform, valueChangeBean); - } catch (Exception e) { - logger.error("转换出错", e); - //System.out.println("转换出错:" + e.getMessage()); - } - - valueChangeBean.setShoworder(showOrder++); - } else { - valueChangeBean.setFieldDesc(allField.getName()); - valueChangeBean.setShoworder(showOrder++); - - } - valueChangeList.add(valueChangeBean); - } - } - } - - private void extracted(JSONObject newJo, JSONObject oldJo, Field field, ElogTransform fieldElogTransform, LoggerDetailContext valueChangeBean) { - JSONObject jo = null; - if (fieldElogTransform != null && StringUtils.isNotEmpty(fieldElogTransform.valuesKVPairs())) { - jo = JSONObject.parseObject(fieldElogTransform.valuesKVPairs()); - if (jo != null) { - valueChangeBean.setNewRealValue(jo.getString(newJo.getString(field.getName()))); - valueChangeBean.setOldRealValue(jo.getString(oldJo.getString(field.getName()))); - } - } - } - - public void setModuleName(String moduleName) { - this.moduleName = moduleName; - } - - public void setLocalQueue(String localQueue) { - this.localQueue = localQueue; - } - - public String getFunction() { - return function; - } - - public void setFunction(String function) { - this.function = function; - } - - public String getModule() { - return module; - } - - /** - * 获取日志实体类 - * - * @return - */ - public LoggerContext getContext() { - - LoggerContext loggerContext = new LoggerContext(); - loggerContext.setUuid(UUID.randomUUID().toString().replace("-", "")); - loggerContext.setModuleName(this.module); - loggerContext.setFunctionName(this.function); - - return loggerContext; - - } - - public void setModule(String module) { - this.module = module; - } - -// public void setAsyncClient(AsyncClient asyncClient) { -// this.asyncClient = asyncClient; -// } - - - public static Field[] getAllFields(Class obj) { - Class superclass = obj.getSuperclass(); - Field[] superField = null; - //获取父类 - if (superclass != Object.class) { - superField = superclass.getDeclaredFields(); - } - //获取当前类 - Field[] nowfield = obj.getDeclaredFields(); - return addFields(superField, nowfield); - } - - public static Field[] addFields(Field[] superFields, Field[] fields) { - - return ArrayUtils.addAll(superFields, fields); - - } - - public void write(List context, boolean isLocal) { - context.forEach(loggerContext -> { - this.write(loggerContext, isLocal); - }); - } - - - public void write(List context) { - context.forEach(loggerContext -> { - this.write(loggerContext); - }); - } - -// public void writeAsync(LoggerContext context, boolean isLocal){ -// String applicationNameBak = this.applicationName; -// String localQueueBak = this.localQueue; -// String moduleNameBak = this.moduleName; -// String pk = this.publishkitGroup; -// LocalRunnable localRunnable = new LocalRunnable() { -// @Override -// public void execute() { -// String localQueueBakBak = localQueueBak; -// String elogLocalQueue = ELOG + applicationNameBak; -// if(StringUtils.isEmpty(localQueueBakBak)) -// localQueueBakBak = (StringUtils.isNotEmpty(moduleNameBak) ? moduleNameBak : elogLocalQueue) + "LocalQueue" + pk; -// AsyncBean asyncBean = new AsyncBean<>(); -// handleContext(context); -// if (context.getWeakElogReocrd() && CollectionUtils.isEmpty(context.getDetailContexts() )) { -// logger.info("日志弱控且没有明细记录,不记录日志,modulename:{},functionname:{}",context.getModuleName(),context.getFunctionName()); -// return; -// } -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(logCenterQueue); -// checkAsyncBean(asyncBean);//检查消息体大小 -// asyncClient.send(asyncBean); -// writeHrmLog(context); -// if(isLocal) { -// asyncBean.setQueue(localQueueBakBak); -// asyncClient.send(asyncBean); -// } -// } catch (Exception e) { -// logger.error("发送mq消息异常!{}",e.getMessage(),e); -// } -// } -// }; -// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "LoggerTemplate_writeAsync", localRunnable); -// -// } -// -// /** -// * 回滚队列 -// * -// * @param context -// */ -// public void writeRollBack(LoggerContext context){ -// String elogRollBackQueue = ELOG + this.applicationName + "RollBackQueue" + this.publishkitGroup; -// AsyncBean asyncBean = new AsyncBean<>(); -// -// try { -// asyncBean.setMessage(context); -// asyncBean.setQueue(elogRollBackQueue); -// checkAsyncBean(asyncBean);//检查消息体大小 -// asyncClient.send(asyncBean); -// } catch (Exception e) { -// logger.error("发送mq消息异常!{}",e.getMessage(),e); -// } -// } - -} diff --git a/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java b/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java deleted file mode 100644 index 14ae29945..000000000 --- a/src/com/engine/salary/elog/util/LoggerTemplateBuilder.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.engine.salary.elog.util; - -/** - * @ClassName: LoggerTemplateBuilder - * @Description 日志基本类构造器 - * @Author tanghj - * @Date 2021/2/10 14:18 - */ -public class LoggerTemplateBuilder { - - public static LoggerTemplate build(String module){ - return build(module, "common"); - } - public static LoggerTemplate build(String module, String function){ - LoggerTemplate loggerTemplate = new LoggerTemplate(); - loggerTemplate.setFunction(function); - loggerTemplate.setModule(module); - - return loggerTemplate; - } -} diff --git a/src/com/engine/salary/elog/web/LoggerTableController.java b/src/com/engine/salary/elog/web/LoggerTableController.java deleted file mode 100644 index fe85d3045..000000000 --- a/src/com/engine/salary/elog/web/LoggerTableController.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.engine.salary.elog.web; - -import com.engine.common.util.ServiceUtil; -import com.engine.salary.elog.entity.param.ELogGetLogParam; -import com.engine.salary.elog.entity.param.GetDetailChangesParam; -import com.engine.salary.elog.service.ILoggerTableService; -import com.engine.salary.elog.service.impl.LoggerTableService; -import com.engine.salary.util.ResponseResult; -import com.engine.salary.util.page.PageInfo; -import io.swagger.v3.oas.annotations.parameters.RequestBody; -import weaver.hrm.HrmUserVarify; -import weaver.hrm.User; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import java.util.List; -import java.util.Map; - -public class LoggerTableController { - - private ILoggerTableService getLoggerTableService(User user) { - return ServiceUtil.getService(LoggerTableService.class, user); - } - - /** - * 获取日志 - * - * @param request - * @param response - * @param data - * @return - */ - @POST - @Path("/getLogs") - @Produces(MediaType.APPLICATION_JSON) - public String getLogs(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getLoggerTableService(user)::queryLogs, data); - } - - /** - * 获取日志(卡片) - * - * @param request - * @param response - * @param data - * @return - */ - @POST - @Path("/getCardLogs") - @Produces(MediaType.APPLICATION_JSON) - public String carddatas(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult>>(user).run(getLoggerTableService(user)::queryCardLogList, data); - } - - /** - * 获取单条操作记录的更新明细 - * @param request - * @param response - * @param param - * @return - */ - @POST - @Path("/getDetailChanges") - @Produces(MediaType.APPLICATION_JSON) - public String getDetailChanges(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody GetDetailChangesParam param) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getLoggerTableService(user)::getDetailChanges, param); - } -// @ApiOperation("获取单条操作记录的更新明细") -// @POST -// @Path("/getDetailChanges") -// @Produces(MediaType.APPLICATION_JSON) -// public String getDetailChanges(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody String data) { -// User user = HrmUserVarify.getUser(request, response); -// return new ResponseResult>>(user).run(getLoggerTableService(user)::getDetailChanges, data); -// } -// -// /** -// * 获取单条操作记录的更新明细(分页) -// * -// * @param module 服务(模块)名 -// * @param function 方法名 -// * @param mainid 主键id -// * @param detailTransMethod 转换方法 -// * @param current 页码 -// * @param pageSize 每页条数 -// * @return WeaTable -// */ -// @ApiOperation("获取单条操作记录的更新明细(分页)") -// @RequestMapping(path = "getDetailChangePages", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult getDetailChangePages(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function, -// @RequestParam("mainid") @ApiParam("主键id") String mainid, -// @RequestParam("detailTransMethod") @ApiParam("转换方法") String detailTransMethod, -// @RequestParam("page") @ApiParam("页码") String current, -// @RequestParam("pageSize") @ApiParam("每页条数") String pageSize) { -// return WeaResult.success(getLoggerTableService(user).getDetailChangePages(module, function, mainid, detailTransMethod, current, pageSize)); -// } - - /** - * 获取日志列表 - * - * @param request - * @param response - * @param param - * @return - */ - @POST - @Path("/datas") - @Produces(MediaType.APPLICATION_JSON) - public String datas(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ELogGetLogParam param) { - User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getLoggerTableService(user)::queryLogList, param); - } - - -// @ApiOperation("获取日志总数") -// @RequestMapping(path = "counts", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult> counts(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function) { -// return WeaResult.success(getLoggerTableService(user).countLog(module, function), "success"); -// } -// -// @ApiOperation("获取明细日志列表") -// @RequestMapping(path = "detaildatas", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult>> detaildatas(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function, -// @Param("pageSize") @ApiParam("每页多少数据") String pageSize, -// @Param("current") @ApiParam("当前页") String current, -// @Param("mainId") @ApiParam("主表id") String mainId, -// @ApiParam("查询条件") String condition) { -// -// if ("datasecurity".equals(module) && "auditLog".equals(function)) { -// try { -// ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); -// if (tableService != null) { -// List> list = tableService.queryDetailLogList(module, function, current, pageSize, condition, mainId); -// return WeaResult.success(list); -// } -// } catch (Exception e) { -// -// } -// } -// List> list = getLoggerTableService(user).queryDetailLogList(module, function, current, pageSize, condition, mainId); -// return WeaResult.success(list); -// } -// -// @ApiOperation("获取日志总数") -// @RequestMapping(path = "detailcounts", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult> detailcounts(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function, -// @Param("mainId") @ApiParam("主表id") String mainId) { -// return WeaResult.success(getLoggerTableService(user).countDestailLog(module, function, mainId), "success"); -// } -// -// @ApiOperation("根据traceId获取链路列表") -// @RequestMapping(path = "queryLogTraceInfo", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult queryLogTraceInfo(@PathVariable("module") @ApiParam("服务(模块)名") String module, -// @PathVariable("function") @ApiParam("方法名") String function, -// @Param("traceId") @ApiParam("traceId") String traceId, -// @Param("currentPage") @ApiParam("currentPage") Integer currentPage, -// @Param("pageSize") @ApiParam("pageSize") Integer pageSize, -// @Param("traceTransMethod") @ApiParam("traceTransMethod") String traceTransMethod -// ) { -// -// if ("datasecurity".equals(module) && "auditLog".equals(function)) { -// try { -// ILoggerTableService tableService = ApplicationContextProvider.getBean("auditLogService", ILoggerTableService.class); -// if (tableService != null) { -// return WeaResult.success(tableService.queryElogTraceInfo(traceId, module, function, currentPage, pageSize, traceTransMethod), "success"); -// } -// } catch (Exception e) { -// -// } -// } -// -// return WeaResult.success(getLoggerTableService(user).queryElogTraceInfo(traceId, module, function, currentPage, pageSize, traceTransMethod), "success"); -// } -// -// @ApiOperation("日志下载") -// @RequestMapping(path = "downloadLog", method = {RequestMethod.GET, RequestMethod.POST}) -// @WeaPermission(publicPermission = true) -// public WeaResult downloadLog(@RequestBody(required = false) @ApiParam("数据") String data) { -// -// BatchDocumentMessage message = getLoggerTableService(user).downloadLog(data); -// return WeaResult.success(message); -// } -} diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java deleted file mode 100644 index c5547e753..000000000 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.engine.salary.mapper.elog; - -import com.engine.salary.elog.entity.dto.TableColumnBean; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public interface ElogTableCheckerMapper { - Long getVersion(@Param("mainTable") String mainTable); - - void recordVersion(@Param("id") long id, @Param("mainTable") String mainTable, @Param("version") long version); - - void createMainTable(@Param("mainTable") String mainTable); - - void createDetailTable(@Param("detailTable") String detailTable); - - List getTableStructure(@Param("tableName") String tableName); - - void createElogTable(@Param("createElogSql") String createElogSql); - - Map getTableIndex(@Param("tableName") String tableName, @Param("columnName") String columnName); - - Map getDataBase(); - - void createTableIndex(@Param("tableName") String tableName, @Param("columnName") String columnName, @Param("id") long id); - - List getAllExistTables(@Param("tableNames") Set tables); -} diff --git a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml b/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml deleted file mode 100644 index 3581e1039..000000000 --- a/src/com/engine/salary/mapper/elog/ElogTableCheckerMapper.xml +++ /dev/null @@ -1,451 +0,0 @@ - - - - - insert into hrsa_elog_version (id, maintable, version) values (#{id},#{mainTable},#{version}) - - - - create table ${mainTable} - ( - id bigint comment 'ID', - create_time datetime default current_timestamp , - update_time datetime default current_timestamp , - creator bigint, - delete_type int, - tenant_key varchar(10), - uuid char(36), - log_date datetime default current_timestamp , - log_operator varchar(50), - operatorName varchar(50), - targetId varchar(50), - targetName text, - modulename varchar(100), - functionname varchar(100), - interfaceName varchar(100), - requesturl varchar(200), - requesturi varchar(200), - operateType varchar(50), - operatetypename varchar(100), - operatedesc varchar(1000), - params longtext, - belongmainid varchar(36), - clientIp varchar(50), - groupid varchar(50), - device varchar(200), - groupNameLabel varchar(500), - redoService varchar(200), - redoContext longtext, - cancelService varchar(200), - cancelContext longtext, - totalruntime bigint, - mainruntime bigint, - log_result varchar(100), - fromterminal varchar(100), - resultdesc text, - old_content varchar(1000), - link_type varchar(20), - link_id bigint, - old_link_id bigint, - PRIMARY KEY (id) - ) - - - - create table ${mainTable} - ( - id number(*,0) not null primary key, - create_time date default sysdate, - update_time date default sysdate, - creator number(*,0), - delete_type number(*,0), - tenant_key varchar2(10), - uuid varchar2(36), - log_date date default sysdate, - log_operator varchar2(50), - operatorName varchar2(50), - targetId varchar2(50), - targetName varchar2(4000), - modulename varchar2(100), - functionname varchar2(100), - interfaceName varchar2(100), - requesturl varchar2(200), - requesturi varchar2(200), - operateType varchar2(50), - operatetypename varchar2(100), - operatedesc varchar2(1000), - params clob, - belongmainid varchar2(36), - clientIp varchar2(200), - groupid varchar2(50), - device varchar2(200), - groupNameLabel varchar2(500), - redoService varchar2(200), - redoContext varchar2(4000), - cancelService varchar2(200), - cancelContext varchar2(4000), - totalruntime number(*,0), - mainruntime number(*,0), - log_result varchar2(4000), - fromterminal varchar2(100), - resultdesc varchar2(4000), - old_content varchar2(1000), - link_type varchar2(20), - link_id number(*,0), - old_link_id number(*,0) - ) - - - create table ${mainTable} - ( - id bigint not null primary key, - create_time datetime default getdate(), - update_time datetime default getdate(), - creator bigint default '-1', - delete_type bigint default 0, - tenant_key nvarchar(10), - uuid nvarchar(36), - log_date datetime default getdate(), - device nvarchar(500), - log_operator bigint default '-1', - operatorname nvarchar(100), - targetid bigint default '-1', - targetname nvarchar(3000), - modulename nvarchar(100), - functionname nvarchar(100), - interfacename nvarchar(100), - requesturl nvarchar(200), - requesturi nvarchar(200), - operatetype nvarchar(50), - operatetypename nvarchar(100), - operatedesc nvarchar(3000), - params nvarchar(max), - belongmainid nvarchar(36), - clientip nvarchar(200), - groupid nvarchar(50), - groupnamelabel nvarchar(1000), - redoservice nvarchar(200), - redocontext nvarchar(3000), - cancelservice nvarchar(200), - cancelcontext nvarchar(3000), - totalruntime bigint default 0, - mainruntime bigint default 0, - log_result nvarchar(100), - fromterminal nvarchar(100), - resultdesc nvarchar(3000), - old_content nvarchar(3000), - link_type nvarchar(20), - link_id bigint default 0, - old_link_id bigint default 0 - ) - - - create table ${mainTable} - ( - id int8 not null primary key, - create_time timestamp default current_timestamp, - update_time timestamp default current_timestamp, - creator int8, - delete_type int, - tenant_key varchar(10), - uuid varchar(36), - log_date timestamp default current_timestamp, - log_operator varchar(50), - operatorName varchar(50), - targetId varchar(50), - targetName text, - modulename varchar(100), - functionname varchar(100), - interfaceName varchar(100), - requesturl varchar(200), - requesturi varchar(200), - operateType varchar(50), - operatetypename varchar(100), - operatedesc varchar(1000), - params text, - belongmainid varchar(36), - clientIp varchar(200), - groupid varchar(50), - device varchar(200), - groupNameLabel varchar(500), - redoService varchar(200), - redoContext text, - cancelService varchar(200), - cancelContext text, - totalruntime int4, - mainruntime int4, - log_result varchar(100), - fromterminal varchar(100), - resultdesc text, - old_content varchar(1000), - link_type varchar(20), - link_id int4, - old_link_id int4 - ) - - - create table ${detailTable} - ( - id bigint not null primary key, - create_time datetime default current_timestamp , - update_time datetime default current_timestamp , - creator bigint, - delete_type int, - tenant_key varchar(10), - uuid varchar(36), - mainid varchar(36), - dataid varchar(50), - belongdataid varchar(50), - tableName varchar(200), - tablenamelabelid varchar(50), - tablenamedesc varchar(50), - fieldName varchar(200), - fieldnamelabelid varchar(200), - newValue longtext, - oldValue longtext, - newrealvalue longtext, - oldrealvalue longtext, - fieldDesc varchar(200), - showorder int default 0, - isdetail int default 0 - ) - - - create table ${detailTable} - ( - id int8 not null primary key, - create_time timestamp default current_timestamp , - update_time timestamp default current_timestamp , - creator int8, - delete_type int8, - tenant_key varchar(10), - uuid varchar(36), - mainid varchar(36), - dataid varchar(50), - belongdataid varchar(50), - tableName varchar(200), - tablenamelabelid varchar(50), - tablenamedesc varchar(50), - fieldName varchar(200), - fieldnamelabelid varchar(200), - newValue text, - oldValue text, - newrealvalue text, - oldrealvalue text, - fieldDesc varchar(200), - showorder int8 default 0, - isdetail int8 default 0 - ) - - - create table ${detailTable} - ( - id number(*,0) not null primary key, - create_time date default sysdate, - update_time date default sysdate, - creator number(*,0), - delete_type number(*,0), - tenant_key varchar2(10), - uuid varchar2(36), - mainid varchar2(36), - dataid varchar2(50), - belongdataid varchar2(50), - tableName varchar2(200), - tablenamelabelid varchar2(50), - tablenamedesc varchar2(50), - fieldName varchar2(200), - fieldnamelabelid varchar2(200), - newValue CLOB, - oldValue CLOB, - newrealvalue CLOB, - oldrealvalue CLOB, - fieldDesc varchar2(200), - showorder number(*,0) default 0, - isdetail number(*,0) default 0 - ) - - - create table ${detailTable} - ( - id bigint not null primary key, - create_time datetime default getdate(), - update_time datetime default getdate(), - creator bigint, - delete_type bigint, - tenant_key nvarchar(10), - uuid nvarchar(36), - mainid nvarchar(36), - dataid nvarchar(50), - belongdataid nvarchar(50), - tableName nvarchar(200), - tablenamelabelid nvarchar(50), - tablenamedesc nvarchar(50), - fieldName nvarchar(200), - fieldnamelabelid nvarchar(200), - newValue nvarchar(max), - oldValue nvarchar(max), - newrealvalue nvarchar(max), - oldrealvalue nvarchar(max), - fieldDesc varchar(200), - showorder bigint default 0, - isdetail bigint default 0 - ) - - - - - - - - - - - ${createElogSql} - - - - - - - - - - - - - - - - create index idx${id} on ${tableName} (${columnName}) - - - - create index idx${id} on ${tableName} (${columnName}) - - - - create index idx${id} on ${tableName} (${columnName}) - - - - - - - - - - diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java deleted file mode 100644 index eda527efa..000000000 --- a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.engine.salary.mapper.elog; - - -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.LoggerDetailContext; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @ClassName: LocalElogAopDaoMapper - * @Description 本地操作日志持久层 - * @Author tanghj - * @Date 2021/2/24 9:35 - */ -public interface LocalElogAopDaoMapper { - - int insertElogContext(@Param(value="logContent") LoggerContext loggerContext, - @Param(value="cusColumns")String cusColumns , - @Param(value="cusValus")String cusValus, - @Param(value="tableName")String tableName); - - - - int insertElogDetail(@Param(value="detailContext") LoggerDetailContext loggerDetailContext, - @Param(value="mainid")String mainid, - @Param(value="cusColumns")String cusColumns , - @Param(value="cusValus")String cusValus, - @Param(value="detailTableName")String tableName); - - - Integer queryElogContextById(@Param(value="id")Long id, - @Param(value="tableName")String tableName); - - void batchInsertDetail(@Param("sql") String sql); - - void insertElogDetailPrepared(@Param("tablename") String detailTableName, @Param("list") List detailContexts, @Param("mainid") String mainid); - - void insertElogDetailPreparedHasCustonInfo(@Param("tablename") String detailTableName, @Param("list") List detailContexts, @Param("mainid") String mainid, @Param(value="cusColumns")String cusColumns); - - void rollBackElogById(@Param("id") Long id,@Param("tableName") String tableName); - - void rollBackDetailElogByUUID(@Param("mainid") String uuid,@Param("tableName") String detailTableName); - -} diff --git a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml deleted file mode 100644 index 81eb589f2..000000000 --- a/src/com/engine/salary/mapper/elog/LocalElogAopDaoMapper.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - insert into ${tableName} (id, uuid, log_date, tenant_key, modulename, functionName, operatetypename, - log_operator, operatorname, targetid, targetname, interfacename, operatetype, - operatedesc, - params, clientIp, groupnamelabel, redoservice, redocontext, cancelservice, - cancelcontext, device, groupid, - belongMainId, requestUrl, requestUri, totalRunTime, mainRunTime, log_result, - fromTerminal, resultDesc, old_content, - link_type, link_id, old_link_id, create_time, update_time, delete_type, creator - ${cusColumns}) - values (#{logContent.id}, #{logContent.uuid}, #{logContent.date}, - #{logContent.tenant_key}, #{logContent.moduleName}, #{logContent.functionName}, - #{logContent.operateTypeName}, #{logContent.logOperator}, #{logContent.operatorName}, - #{logContent.logTargetid} - , #{logContent.targetName}, #{logContent.interfaceName}, #{logContent.operateType}, - #{logContent.operatedesc}, - #{logContent.paramsStr}, #{logContent.clientIp}, #{logContent.groupNameLabel}, - #{logContent.redoService}, - #{logContent.redoContextStr}, #{logContent.cancelService}, #{logContent.cancelContextStr}, - #{logContent.device}, #{logContent.groupId}, - #{logContent.belongMainId}, #{logContent.requestUrl}, #{logContent.requestUri}, - #{logContent.totalRunTime}, #{logContent.mainRunTime} - , #{logContent.result}, #{logContent.fromTerminal}, #{logContent.resultDesc}, - #{logContent.old_content}, #{logContent.link_type} - , #{logContent.link_id}, #{logContent.old_link_id}, #{logContent.create_time}, - #{logContent.update_time}, #{logContent.delete_type}, #{logContent.logOperator} - ${cusValus}) - - - - insert into ${detailTableName} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key, creator, - newRealValue, oldRealValue, tableNameDesc, - tableNameLabelId, fieldNameLabelId, create_time, update_time - ${cusColumns}) - values (#{detailContext.id}, #{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, - #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, #{detailContext.tenant_key}, - #{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId}, #{detailContext.create_time}, #{detailContext.update_time} - ${cusValus}) - - - ${sql} - - - - - - - - insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, - oldRealValue,tableNameDesc, - tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) - values - - ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, - #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type}) - - - - - - insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, - oldRealValue,tableNameDesc, - tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) - VALUES - ( - #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, - #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} - ) - - - - - insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, - oldRealValue,tableNameDesc, - tableNameLabelId,fieldNameLabelId, create_time, update_time - ${cusColumns}) - values - - ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, - #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time} - ${detailContext.cusValus}) - - - - - update ${tableName} - set delete_type = 3 - where id = #{id} - - - update ${tableName} - set delete_type = 3 - where mainid = #{mainid} - - - - insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, - oldRealValue,tableNameDesc, - tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) - - SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, - #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} - FROM DUAL - - - - - insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, - fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, - oldRealValue,tableNameDesc, - tableNameLabelId,fieldNameLabelId, create_time, update_time - ${cusColumns}) - - SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, - #{detailContext.fieldName}, #{detailContext.newValue}, - #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, - #{detailContext.belongDataid}, #{detailContext.isDetail}, - #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} - , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, - #{detailContext.fieldNameLabelId} - , #{detailContext.create_time}, #{detailContext.update_time} - ${detailContext.cusValus} - FROM DUAL - - - - diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java deleted file mode 100644 index 70807d832..000000000 --- a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.java +++ /dev/null @@ -1,219 +0,0 @@ -package com.engine.salary.mapper.elog; - -import com.engine.salary.elog.entity.dto.LoggerContext; -import com.engine.salary.elog.entity.dto.ReadInfoEntity; -import com.github.pagehelper.Page; -import org.apache.ibatis.annotations.Param; - -import java.util.List; -import java.util.Map; - -/** - * @ClassName: LocalElogDao - * @Description 本地操作日志持久层 - * @Author tanghj - * @Date 2021/2/24 9:35 - */ -public interface LocalElogDaoMapper { - - - List> queryCardElogList(@Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql); - - List queryElogList(@Param(value = "page") Page page, - @Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "columns") String columns); - - List queryElogListPapi(@Param(value = "page") Page page, - @Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "columns") String columns); - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionTargetId = "#{permissionTargetId}", -// permissionConfigSourceId = "#{permissionConfigSourceId}", -// permissionExcept = "true") - List queryElogList(@Param(value = "page") Page page, @Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey, - @Param(value = "permissionTargetId") String permissionTargetId, - @Param(value = "permissionConfigSourceId") String permissionConfigSourceId, - @Param(value = "columns") String columns - ); - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionExcept = "true") - List queryElogListPapi(@Param(value = "page") Page page, @Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey, - @Param(value = "columns") String columns - ); - - List queryAllChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); - - Map elogCount(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql); - - Map elogCountPapi(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql); - - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionTargetId = "#{permissionTargetId}", -// permissionConfigSourceId = "#{permissionConfigSourceId}", -// permissionExcept = "true") - Map elogCountByMorePermission(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey, - @Param(value = "permissionTargetId") String permissionTargetId, - @Param(value = "permissionConfigSourceId") String permissionConfigSourceId); - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionTargetId = "#{permissionTargetId}", -// permissionConfigSourceId = "#{permissionConfigSourceId}", -// permissionCount = "count(*)", -// permissionExcept = "true") - Long elogCountOnlyNum(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey, - @Param(value = "permissionTargetId") String permissionTargetId, - @Param(value = "permissionConfigSourceId") String permissionConfigSourceId); - - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionExcept = "true") - Map elogCount(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey); - - // @WeaDataPermission(mainDataTable = "#{mainDataTable}", -// permissionId = "#{permissionId}", -// permissionType = "#{permissionType}", -// mainDataTableAlias = "#{mainDataTableAlias}", -// primaryKey = "#{primaryKey}", -// permissionExcept = "true") - Map elogCountPapi(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql, - @Param(value = "mainDataTable") String mainDataTable, - @Param(value = "permissionId") String permissionId, - @Param(value = "permissionType") String permissionType, - @Param(value = "mainDataTableAlias") String mainDataTableAlias, - @Param(value = "primaryKey") String primaryKey); - - - List queryDetailElogList(@Param(value = "logContent") LoggerContext loggerContext, - @Param("limit") String limit, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql); - - Map elogDetailCount(@Param(value = "logContent") LoggerContext loggerContext, - @Param(value = "tableName") String tableName, - @Param(value = "conditionSql") String conditionSql); - -// List queryOperators(@Param(value = "tableName") String tableName, -// @Param(value = "targetId") String targetId, -// @Param(value = "operateType") String operateType); - - List queryReadInfoOperators(@Param(value = "tableName") String tableName, - @Param(value = "targetId") String targetId, - @Param(value = "operateType") String operateType, - @Param(value = "flag") Boolean flag); - - List queryReadInfoDateOperators(@Param(value = "tableName") String tableName, - @Param(value = "targetId") String targetId, - @Param(value = "operateType") String operateType, - @Param(value = "flag") Boolean flag, - @Param(value = "startDate") String startDate, - @Param(value = "endDate") String endDate); - - List queryAllMainData(@Param(value = "tableName") String tableName, @Param("uuid") String uuid); - - List queryAllMainChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); - - List queryAllDetailChanges(@Param(value = "tableName") String tableName, @Param("mainid") String mainid); - - Integer queryElogContextById(@Param(value = "id") Long id, - @Param(value = "tableName") String tableName); - - List queryElogTraceInfo(@Param(value = "traceId") String traceId, - @Param(value = "tableName") String tableName, - @Param(value = "offset") Integer offset, - @Param(value = "pageSize") Integer pageSize); - - int queryElogTraceInfoCount(@Param(value = "traceId") String traceId, - @Param(value = "tableName") String tableName); - - List queryLogInfoByCustom(@Param(value = "tableName") String tableName, - @Param(value = "sql") String sql); - - List queryAllChangesData(@Param("tableName") String tableName, @Param("mainid") String mainid); - - List queryTenantKeyOperators(@Param(value = "tableName") String tableName, - @Param(value = "tenantKey") String tenantKey, - @Param(value = "targetId") String targetId, - @Param(value = "operateType") String operateType, - @Param(value = "flag") Boolean flag); - - List queryAllChangesDataPages(@Param("tableName") String tableName, - @Param("mainid") String mainid, - @Param(value = "page") Page page); - - Integer queryAllChangesPageCounts(@Param("tableName") String tableName, @Param("mainid") String mainid); -} diff --git a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml b/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml deleted file mode 100644 index 93c233896..000000000 --- a/src/com/engine/salary/mapper/elog/LocalElogDaoMapper.xml +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java deleted file mode 100644 index 0a8e14928..000000000 --- a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.engine.salary.mapper.elog; - -import java.util.Map; - -public interface QueryCurretValusMapper { - - Map queryValues(String sql); -} diff --git a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml b/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml deleted file mode 100644 index c3d7a16d1..000000000 --- a/src/com/engine/salary/mapper/elog/QueryCurretValusMapper.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file From 8213eedbc53a5b9ba0146432f4d3ebac0a0c95e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 6 Feb 2024 14:12:24 +0800 Subject: [PATCH 095/169] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/lib/hrmelog.jar | Bin 0 -> 143257 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resource/WEB-INF/lib/hrmelog.jar diff --git a/resource/WEB-INF/lib/hrmelog.jar b/resource/WEB-INF/lib/hrmelog.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b2ea6e7994bf51932e268d3d64c0a907c76194b GIT binary patch literal 143257 zcmb@tbC4xU_AXksZQHhO+qP|^%eK30+h&(-ciHUH?Q`bLdvo8LIlqY;w<2~#{;^g> z#r}|AuFS0<4GaPW00031&=(-80q`$>AOIi$#`d=KpA!H83jeX{cjKQ`h7OkW|G5hO zU#gr9Z48|}|E3t_|6gosV{iUv2MPcL1O!0M|L0$&{|_B9_U7iMPAY~*Hm1V%b}ml# zHa4bCbjCJ@&dxCkveLke2)?JKcGi_kQQKXbpa=a~L=ycAMBf{pZD2Pf*b+!K&SvgN zJZ`{W3WvtmgN5M94oUBie;hLA>0jdm$kiw1M^w{^>Dn;6Os6RB1r>NQOk-#vzY$=D zl{4LSP&uDoiPl757Q0cokYz{SCfbB%+`)*SE~e`6P+oRf+cay2@wGuYD7h%5JWKI8hR&p~8|2Gk(c;Ls{y=CLPNX*~@OA@x zk%9;70?EzF*@tELB_7~P;@YEbjF0W|Ou?Sd{IL2CrXURt@y><|j|B(-F#7xRpHYSW z>uWc)Gq*iU6kc0jZJYfDw;|4GEsr*6#wpPz;Gs zp%h8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l5eou1UasQ6T>+}}CFykAN zacc9tfG_v#$421Y`y2dgo2B^F%)!v~7bMrOL;OqwEEs`tS^_wvw>OdWs#7>B)WMS%WbcS8CWF$PB`D{{SVQ9<$itg z;^qYqw>5pdKIKW?G=zV+wup_wYYU4)`Pb&1^Tf(a9HokN%Hn zZYLVLM*r1d!n>vYMN7X#|0jRW?Md%uW{2AjPvlN9qCK LA_Bh!1N;8~8Xh;+ literal 0 HcmV?d00001 From 6a79b22c1720aeacdbddd8a2d7e8f2b0ba0fe9c5 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 7 Feb 2024 17:39:26 +0800 Subject: [PATCH 096/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../po/InsuranceArchivesBaseInfoPO.java | 15 + .../po/InsuranceArchivesFundSchemePO.java | 20 + .../po/InsuranceArchivesOtherSchemePO.java | 18 + .../po/InsuranceArchivesSocialSchemePO.java | 19 + .../service/impl/SIArchivesServiceImpl.java | 981 +++++++++++------- .../service/impl/SICategoryServiceImpl.java | 112 +- .../service/impl/SISchemeServiceImpl.java | 272 +++-- 7 files changed, 934 insertions(+), 503 deletions(-) diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java index f05cc309d..1ed65489f 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.siarchives.po; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -19,65 +20,78 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_insurance_base_info +@ElogTransform(name = "福利档案主表") public class InsuranceArchivesBaseInfoPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 个税扣缴义务人id */ + @ElogTransform(name = "个税扣缴义务人id") private Long paymentOrganization; /** * 社保档案id */ + @ElogTransform(name = "社保档案id") private Long socialArchivesId; /** * 公积金档案id */ + @ElogTransform(name = "公积金档案id") private Long fundArchivesId; /** * 其他福利档案id */ + @ElogTransform(name = "其他福利档案id") private Long otherArchivesId; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 福利执行状态 */ + @ElogTransform(name = "福利执行状态") private String runStatus; /** @@ -85,6 +99,7 @@ public class InsuranceArchivesBaseInfoPO { * * @see DataCollectionEmployeeTypeEnum */ + @ElogTransform(name = "人员类型") private Integer employeeType; //---------条件------- diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java index fc171c94b..15e37cfb0 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesFundSchemePO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.siarchives.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -19,35 +20,42 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_fund_archives +@ElogTransform(name = "福利档案明细表-公积金信息") public class InsuranceArchivesFundSchemePO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 福利类型 */ + @ElogTransform(name = "福利类型") private Integer welfareType; /** * 暂不缴纳 */ + @ElogTransform(name = "是否暂不缴纳") private Integer nonPayment; /** * 公积金起始缴纳月 */ + @ElogTransform(name = "公积金起始缴纳月") private String fundStartTime; /** * 公积金最后缴纳月 */ + @ElogTransform(name = "公积金最后缴纳月") private String fundEndTime; /** @@ -59,63 +67,75 @@ public class InsuranceArchivesFundSchemePO { /** * 公积金方案id */ + @ElogTransform(name = "公积金方案id") private Long fundSchemeId; /** * 公积金账号 */ + @ElogTransform(name = "公积金账号") private String fundAccount; /** * 补充公积金账号 */ + @ElogTransform(name = "补充公积金账号") private String supplementFundAccount; /** * 公积金缴纳组织 */ + @ElogTransform(name = "公积金缴纳组织") private Long paymentOrganization; /** * 公积金个人实际承担方 */ + @ElogTransform(name = "公积金个人实际承担方") private Integer underTake; /** * 公积金缴纳基数 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数") private String fundPaymentBaseString; /** * 公积金缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数——单位") private String fundPaymentComBaseString; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java index 9ad9d9668..71836e143 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesOtherSchemePO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.siarchives.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -19,35 +20,42 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_other_archives +@ElogTransform(name = "福利档案明细表-其他福利信息") public class InsuranceArchivesOtherSchemePO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 暂不缴纳 */ + @ElogTransform(name = "是否暂不缴纳") private Integer nonPayment; /** * 福利类型 */ + @ElogTransform(name = "福利类型") private Integer welfareType; /** * 其他福利起始缴纳月 */ + @ElogTransform(name = "其他福利起始缴纳月") private String otherStartTime; /** * 其他福利最后缴纳月 */ + @ElogTransform(name = "其他福利最后缴纳月") private String otherEndTime; /** @@ -59,52 +67,62 @@ public class InsuranceArchivesOtherSchemePO { /** * 其他福利方案id */ + @ElogTransform(name = "其他福利方案id") private Long otherSchemeId; /** * 其他福利缴纳组织 */ + @ElogTransform(name = "其他福利缴纳组织") private Long paymentOrganization; /** * 其他福利个人实际承担方 */ + @ElogTransform(name = "其他福利个人实际承担方") private Integer underTake; /** * 其他福利缴纳基数 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数") private String otherPaymentBaseString; /** * 其他福利缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数——单位") private String otherPaymentComBaseString; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java index 645e5215b..5e5c3cf9e 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesSocialSchemePO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.siarchives.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -19,36 +20,43 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_social_archives +@ElogTransform(name = "福利档案明细表-社保信息") public class InsuranceArchivesSocialSchemePO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 暂不缴纳 */ + @ElogTransform(name = "是否暂不缴纳") private Integer nonPayment; /** * 福利类型 */ + @ElogTransform(name = "福利类型") private Integer welfareType; /** * 社保起始缴纳月 */ + @ElogTransform(name = "社保起始缴纳月") private String socialStartTime; /** * 社保最后缴纳月 */ + @ElogTransform(name = "社保最后缴纳月") private String socialEndTime; /** @@ -60,57 +68,68 @@ public class InsuranceArchivesSocialSchemePO { /** * 社保方案id */ + @ElogTransform(name = "社保方案id") private Long socialSchemeId; /** * 社保账号 */ + @ElogTransform(name = "社保账号") private String socialAccount; /** * 社保缴纳组织 */ + @ElogTransform(name = "社保缴纳组织") private Long paymentOrganization; /** * 社保个人实际承担方 */ + @ElogTransform(name = "社保个人实际承担方") private Integer underTake; /** * 社保缴纳基数 */ @Encrypt + @ElogTransform(name = "社保缴纳基数") private String socialPaymentBaseString; /** * 社保缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "社保缴纳基数——单位") private String socialPaymentComBaseString; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; } diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 798eed713..5f317d94b 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -18,7 +18,9 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.cmd.siarchives.SIArchivesTipsCmd; import com.engine.salary.common.SalaryContext; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO; @@ -33,6 +35,7 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum; @@ -40,6 +43,7 @@ import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import com.engine.salary.enums.sicategory.*; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.siarchives.*; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; @@ -152,6 +156,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return ServiceUtil.getService(SISchemeServiceImpl.class,user); } + private EmployMapper getEmployMapper() { + return MapperProxyFactory.getProxy(EmployMapper.class); + } + @Override public Map getTips(Map params) { return commandExecutor.execute(new SIArchivesTipsCmd(params, user)); @@ -172,6 +180,18 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService Long paymentOrganization = welfareTypeEnum != null ? Long.valueOf(Util.null2String(params.get("paymentOrganization"))) : null; // apidatas = siArchivesBiz.getBaseForm(welfareTypeEnum, employeeId, (long) user.getUID(), user, paymentOrganization); apidatas = getBaseForm(welfareTypeEnum, employeeId, paymentOrganization, taxAgentPOS); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); +// loggerContext.setTargetId(String.valueOf(form.getId())); +// loggerContext.setTargetName(form.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看福利档案基础信息")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看福利档案基础信息") + + ": " + "人员id" + "-" + employeeId + "," + "个税扣缴义务人id" + "-" +paymentOrganization + "," + + (welfareTypeEnum == null ? SalaryI18nUtil.getI18nLabel(0, "员工基本信息") + : SalaryI18nUtil.getI18nLabel(welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel()))); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); return apidatas; } @@ -188,6 +208,17 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } // apidatas = siArchivesBiz.getPaymentForm(user, welfareTypeEnum, employeeId, (long) user.getUID(), schemeId, paymentOrganization); apidatas = getPaymentForm(user, welfareTypeEnum, employeeId, schemeId, paymentOrganization); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); +// loggerContext.setTargetId(String.valueOf(form.getId())); +// loggerContext.setTargetName(form.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看福利档案缴纳基数")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看缴纳基数明细") + + ": " + "人员id" + "-" + employeeId + "," + "个税扣缴义务人id" + "-" +paymentOrganization + "," + + SalaryI18nUtil.getI18nLabel(welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel())); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); return apidatas; } @@ -477,7 +508,13 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List socialArchiveDelIds = insuranceArchivesList.stream().map(InsuranceArchivesBaseInfoPO::getSocialArchivesId).collect(Collectors.toList()); List fundArchiveDelIds = insuranceArchivesList.stream().map(InsuranceArchivesBaseInfoPO::getFundArchivesId).collect(Collectors.toList()); List otherArchiveDelIds = insuranceArchivesList.stream().map(InsuranceArchivesBaseInfoPO::getOtherArchivesId).collect(Collectors.toList()); - + //获取子表数据,方便记录操作日志 + List socialArchives = getSocialSchemeMapper().getSocialById(socialArchiveDelIds); + List fundArchives = getFundSchemeMapper().getFundById(fundArchiveDelIds); + List otherArchives = getOtherSchemeMapper().getOtherById(otherArchiveDelIds); + Map socialArchiveMap = SalaryEntityUtil.convert2Map(socialArchives, InsuranceArchivesSocialSchemePO::getId); + Map fundArchiveMap = SalaryEntityUtil.convert2Map(fundArchives, InsuranceArchivesFundSchemePO::getId); + Map otherArchiveMap = SalaryEntityUtil.convert2Map(otherArchives, InsuranceArchivesOtherSchemePO::getId); // 删除社保档案主表及3张明细表数据 if(CollectionUtils.isNotEmpty(archiveDelIds)){ getInsuranceBaseInfoMapper().deleteByIds(archiveDelIds); @@ -491,6 +528,65 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if(CollectionUtils.isNotEmpty(otherArchiveDelIds)){ getOtherSchemeMapper().deleteByIds(otherArchiveDelIds); } + //记录操作日志 + List targetPOList = insuranceArchivesList.stream().filter(f -> archiveDelIds.contains(f.getId())).collect(Collectors.toList()); + if (targetPOList.size() > 0) { + targetPOList.forEach(targetPO -> { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + targetPO.setDeleteType(DeleteTypeEnum.DELETED.getValue()); + //记录主表操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利档案主表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利档案") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + //记录明细表操作日志 + InsuranceArchivesSocialSchemePO socialTargetDetail = socialArchiveMap.get(targetPO.getSocialArchivesId()); + if (socialTargetDetail != null) { + socialTargetDetail.setDeleteType(DeleteTypeEnum.DELETED.getValue()); + LoggerContext detailLoggerContext = new LoggerContext<>(); + detailLoggerContext.setUser(user); + detailLoggerContext.setTargetId(String.valueOf(targetPO.getId())); + detailLoggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + detailLoggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-社保明细")); + detailLoggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-社保明细") + ":" + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setNewValues(socialTargetDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(detailLoggerContext); + } + InsuranceArchivesFundSchemePO fundTargetDetail = fundArchiveMap.get(targetPO.getFundArchivesId()); + if (fundTargetDetail != null) { + fundTargetDetail.setDeleteType(DeleteTypeEnum.DELETED.getValue()); + LoggerContext detailLoggerContext = new LoggerContext<>(); + detailLoggerContext.setUser(user); + detailLoggerContext.setTargetId(String.valueOf(targetPO.getId())); + detailLoggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + detailLoggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-公积金明细")); + detailLoggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-公积金明细") + ":" + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setNewValues(fundTargetDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(detailLoggerContext); + } + InsuranceArchivesOtherSchemePO otherTargetDetail = otherArchiveMap.get(targetPO.getOtherArchivesId()); + if (otherTargetDetail != null) { + otherTargetDetail.setDeleteType(DeleteTypeEnum.DELETED.getValue()); + LoggerContext detailLoggerContext = new LoggerContext<>(); + detailLoggerContext.setUser(user); + detailLoggerContext.setTargetId(String.valueOf(targetPO.getId())); + detailLoggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + detailLoggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-其他福利明细")); + detailLoggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利档案-其他福利明细") + ":" + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + detailLoggerContext.setNewValues(otherTargetDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(detailLoggerContext); + } + }); + } } //新增社保、公积金、其他福利档案、福利档案基础信息 @@ -781,12 +877,28 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } /** - * 批量变更档案列表的runStatus + * 批量变更档案列表的runStatus,目前仅在待增员tab中删除待办使用,后边其他方调用时需修改操作日志记录 */ @Override public void updateRunStatus(InsuranceArchivesBaseInfoPO po) { - getInsuranceBaseInfoMapper().updateRunStatusByIds(po); + //记录操作日志 + List targetPOList = getInsuranceBaseInfoMapper().listByIds(po.getIds()); + if (targetPOList != null && targetPOList.size() > 0) { + targetPOList.forEach(targetPO -> { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "待增员档案-删除待办")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "待增员档案-删除待办") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); +// loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + }); + } } @Override @@ -828,7 +940,23 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (stayDelPO.getIds().size() > 0) { getInsuranceBaseInfoMapper().updateRunStatusByIds(stayDelPO); } - + //记录操作日志 + Map oldBaseInfoMap = SalaryEntityUtil.convert2Map(pos, e -> e.getPaymentOrganization() + "-" + e.getEmployeeId()); + List newPos = getInsuranceBaseInfoMapper().listByIds(ids); + newPos.forEach(targetPO -> { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "停缴档案-取消停缴")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "停缴档案-取消停缴") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOldValues(oldBaseInfoMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId())); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + }); } /** @@ -908,6 +1036,24 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (toStopBaseInfoIdList.size() > 0) { getInsuranceBaseInfoMapper().updateRunStatusByIds(InsuranceArchivesBaseInfoPO.builder() .ids(toStopBaseInfoIdList).runStatus(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue()).build()); + + //记录操作日志 + toStopBaseInfoIdList.forEach(f -> { + InsuranceArchivesBaseInfoPO targetPO = getInsuranceBaseInfoMapper().getById(f); + if (targetPO != null) { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案减员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "停缴一名在缴员工") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + } + }); } Map resultMap = new HashMap<>(2); @@ -1127,6 +1273,23 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .ids(part).runStatus(EmployeeStatusEnum.PAYING.getValue()).build()); }); + //记录操作日志 + toPayBaseInfoIdList.forEach(f -> { + InsuranceArchivesBaseInfoPO targetPO = getInsuranceBaseInfoMapper().getById(f); + if (targetPO != null) { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案增员")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "增加一名在缴员工") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + } + }); } Map resultMap = new HashMap<>(2); @@ -1239,7 +1402,19 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .runStatus(EmployeeStatusEnum.PAYING.getValue()) .build()); }); - + nowList.forEach(targetPO -> { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "待减员档案-删除待办")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "待减员档案-删除待办") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); +// loggerContext.setNewValues(targetPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + }); } } @@ -2725,145 +2900,157 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); + InsuranceArchivesOtherSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesOtherSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0, "员工id为空"), param, param.getEmployeeId()); - InsuranceArchivesOtherSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesOtherSaveParam.class); - SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0, "员工id为空"), param, param.getEmployeeId()); + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + //创建操作日志记录对象 + InsuranceArchivesBaseInfoPO targetPO = new InsuranceArchivesBaseInfoPO(); + InsuranceArchivesOtherSchemePO targetDetailPO = new InsuranceArchivesOtherSchemePO(); - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherStartTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) && !SalaryDateUtil.checkYearMonth(param.getOtherEndTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } - - List otherIds = new ArrayList(); - otherIds.add(param.getId()); - List oldOtherInfoList = otherSchemeMapper.getOtherById(otherIds); + List otherIds = new ArrayList(); + otherIds.add(param.getId()); + List oldOtherInfoList = getOtherSchemeMapper().getOtherById(otherIds); + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getOtherSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + if (oldOtherInfoList.size() == 1) { + InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0); //设置福利档案基数调整记录数据 - InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() - .adjustAfterSchemeId(param.getOtherSchemeId()) - .adjustAfterBaseJson(paramReq.getPaymentForm()) - .adjustAfterComBaseJson(paramReq.getPaymentComForm()) - .welfareType(paramReq.getWelfareType().getValue()) - .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) - .build(); - - if (oldOtherInfoList.size() == 1) { - InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0); - //设置福利档案基数调整记录数据 - encryptUtil.decrypt(oldOtherInfo, InsuranceArchivesOtherSchemePO.class); - adjustInfo.setAdjustBeforeBaseJson(oldOtherInfo.getOtherPaymentBaseString()); - adjustInfo.setAdjustBeforeSchemeId(oldOtherInfo.getOtherSchemeId()); - adjustInfo.setAdjustBeforeComBaseJson(oldOtherInfo.getOtherPaymentComBaseString()); - //新数据 - InsuranceArchivesOtherSchemePO updateOtherInfo = - InsuranceArchivesOtherSchemePO.builder() - .id(oldOtherInfo.getId()) - .otherSchemeId(param.getOtherSchemeId()) - .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) - .underTake(param.getUnderTake()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .welfareType(paramReq.getWelfareType().getValue()) - .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) - .employeeId(param.getEmployeeId()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .updateTime(new Date()) - .nonPayment(param.getNonPayment()) - .creator(employeeId) - .paymentOrganization(param.getPaymentOrganization()) - .otherPaymentBaseString(paramReq.getPaymentForm()) - .build(); - //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + encryptUtil.decrypt(oldOtherInfo, InsuranceArchivesOtherSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldOtherInfo.getOtherPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldOtherInfo.getOtherSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldOtherInfo.getOtherPaymentComBaseString()); + //新数据 + InsuranceArchivesOtherSchemePO updateOtherInfo = + InsuranceArchivesOtherSchemePO.builder() + .id(oldOtherInfo.getId()) + .otherSchemeId(param.getOtherSchemeId()) + .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) + .underTake(param.getUnderTake()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .welfareType(paramReq.getWelfareType().getValue()) + .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) + .employeeId(param.getEmployeeId()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .updateTime(new Date()) + .nonPayment(param.getNonPayment()) + .creator(employeeId) + .paymentOrganization(param.getPaymentOrganization()) + .otherPaymentBaseString(paramReq.getPaymentForm()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } + } + encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class); + getOtherSchemeMapper().updateById(updateOtherInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setOtherArchivesId(updateOtherInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + + targetPO = baseInfoPO; + encryptUtil.decrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class); + targetDetailPO = updateOtherInfo; + } else { + getOtherSchemeMapper().deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesOtherSchemePO insertOtherInfo = InsuranceArchivesOtherSchemePO.builder() + .otherSchemeId(param.getOtherSchemeId()) + .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) + .underTake(param.getUnderTake()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .welfareType(paramReq.getWelfareType().getValue()) + .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) + .employeeId(param.getEmployeeId()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .createTime(new Date()) + .updateTime(new Date()) + .nonPayment(param.getNonPayment()) + .creator(employeeId) + .paymentOrganization(param.getPaymentOrganization()) + .otherPaymentBaseString(paramReq.getPaymentForm()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class); - otherSchemeMapper.updateById(updateOtherInfo); - //更新base_info表状态 - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - //对于非系统人员,编辑后状态切换为正在缴纳 - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - baseInfoPO.setOtherArchivesId(updateOtherInfo.getId()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - sqlSession.commit(); - } else { - otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder() + } + encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class); + getOtherSchemeMapper().insert(insertOtherInfo); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List otherInfos = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) .build()); - //新建社保档案,并关联主表 - InsuranceArchivesOtherSchemePO insertOtherInfo = InsuranceArchivesOtherSchemePO.builder() - .otherSchemeId(param.getOtherSchemeId()) - .otherStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null) - .underTake(param.getUnderTake()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .welfareType(paramReq.getWelfareType().getValue()) - .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) - .employeeId(param.getEmployeeId()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .createTime(new Date()) - .updateTime(new Date()) - .nonPayment(param.getNonPayment()) - .creator(employeeId) - .paymentOrganization(param.getPaymentOrganization()) - .otherPaymentBaseString(paramReq.getPaymentForm()) - .build(); - //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + baseInfoPO.setOtherArchivesId(otherInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } - } - encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class); - otherSchemeMapper.insert(insertOtherInfo); - sqlSession.commit(); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null) { - List otherInfos = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) - .build()); - baseInfoPO.setOtherArchivesId(otherInfos.get(0).getId()); - //对于非系统人员,编辑后状态切换为正在缴纳 - if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - } else { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); - } + targetPO = baseInfoPO; + encryptUtil.decrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class); + targetDetailPO = insertOtherInfo; + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); } - - //生成福利档案基数调整记录数据 - List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); - //福利档案基数调整记录数据入库 - batchInsertAdjustHistory(adjustHistoryList); - - } finally { - sqlSession.close(); } + //记录操作日志 + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细保存")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetDetailPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); + } /** @@ -2872,149 +3059,159 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService */ public void fundSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - InsuranceArchivesFundSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesFundSaveParam.class); - SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); + InsuranceArchivesFundSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesFundSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) && !SalaryDateUtil.checkYearMonth(param.getFundStartTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) && !SalaryDateUtil.checkYearMonth(param.getFundEndTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) && !SalaryDateUtil.checkYearMonth(param.getFundStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) && !SalaryDateUtil.checkYearMonth(param.getFundEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + //创建操作日志记录对象 + InsuranceArchivesBaseInfoPO targetPO = new InsuranceArchivesBaseInfoPO(); + InsuranceArchivesFundSchemePO targetDetailPO = new InsuranceArchivesFundSchemePO(); - List fundIds = new ArrayList(); - fundIds.add(param.getId()); - List oldFundInfoList = fundSchemeMapper.getFundById(fundIds); + List fundIds = new ArrayList(); + fundIds.add(param.getId()); + List oldFundInfoList = getFundSchemeMapper().getFundById(fundIds); + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getFundSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + if (oldFundInfoList.size() == 1) { + InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0); //设置福利档案基数调整记录数据 - InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() - .adjustAfterSchemeId(param.getFundSchemeId()) - .adjustAfterBaseJson(paramReq.getPaymentForm()) - .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + encryptUtil.decrypt(oldFundInfo, InsuranceArchivesFundSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldFundInfo.getFundPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldFundInfo.getFundSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldFundInfo.getFundPaymentComBaseString()); + //新数据 + InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder() + .id(oldFundInfo.getId()) + .fundSchemeId(param.getFundSchemeId()) + .fundAccount(param.getFundAccount()) + .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) + .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) + .fundPaymentBaseString(paramReq.getPaymentForm()) + .supplementFundAccount(param.getSupplementFundAccount()) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .underTake(param.getUnderTake()) + .paymentOrganization(param.getPaymentOrganization()) + .updateTime(new Date()) .welfareType(paramReq.getWelfareType().getValue()) .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) .build(); - - if (oldFundInfoList.size() == 1) { - InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0); - //设置福利档案基数调整记录数据 - encryptUtil.decrypt(oldFundInfo, InsuranceArchivesFundSchemePO.class); - adjustInfo.setAdjustBeforeBaseJson(oldFundInfo.getFundPaymentBaseString()); - adjustInfo.setAdjustBeforeSchemeId(oldFundInfo.getFundSchemeId()); - adjustInfo.setAdjustBeforeComBaseJson(oldFundInfo.getFundPaymentComBaseString()); - //新数据 - InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder() - .id(oldFundInfo.getId()) - .fundSchemeId(param.getFundSchemeId()) - .fundAccount(param.getFundAccount()) - .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) - .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) - .fundPaymentBaseString(paramReq.getPaymentForm()) - .supplementFundAccount(param.getSupplementFundAccount()) - .creator(employeeId) - .nonPayment(param.getNonPayment()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .underTake(param.getUnderTake()) - .paymentOrganization(param.getPaymentOrganization()) - .updateTime(new Date()) - .welfareType(paramReq.getWelfareType().getValue()) - .employeeId(param.getEmployeeId()) - .build(); - //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } + } + encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class); + getFundSchemeMapper().updateById(updateFundInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setFundArchivesId(updateFundInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + + targetPO = baseInfoPO; + encryptUtil.decrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class); + targetDetailPO = updateFundInfo; + } else { + getFundSchemeMapper().deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesFundSchemePO insertFundInfo = InsuranceArchivesFundSchemePO.builder() + .fundSchemeId(param.getFundSchemeId()) + .fundAccount(param.getFundAccount()) + .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) + .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) + .fundPaymentBaseString(paramReq.getPaymentForm()) + .supplementFundAccount(param.getSupplementFundAccount()) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .underTake(param.getUnderTake()) + .paymentOrganization(param.getPaymentOrganization()) + .createTime(new Date()) + .updateTime(new Date()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .build(); + //校验福利基数是否符合上下限要求, + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class); - fundSchemeMapper.updateById(updateFundInfo); - //更新base_info表状态 - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - //对于非系统人员,编辑后状态切换为正在缴纳 - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - baseInfoPO.setFundArchivesId(updateFundInfo.getId()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - sqlSession.commit(); - } else { - fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder() + } + encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class); + getFundSchemeMapper().insert(insertFundInfo); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List fundInfos = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) .build()); - //新建社保档案,并关联主表 - InsuranceArchivesFundSchemePO insertFundInfo = InsuranceArchivesFundSchemePO.builder() - .fundSchemeId(param.getFundSchemeId()) - .fundAccount(param.getFundAccount()) - .fundEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null) - .fundStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null) - .fundPaymentBaseString(paramReq.getPaymentForm()) - .supplementFundAccount(param.getSupplementFundAccount()) - .creator(employeeId) - .nonPayment(param.getNonPayment()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .underTake(param.getUnderTake()) - .paymentOrganization(param.getPaymentOrganization()) - .createTime(new Date()) - .updateTime(new Date()) - .welfareType(paramReq.getWelfareType().getValue()) - .employeeId(param.getEmployeeId()) - .build(); - //校验福利基数是否符合上下限要求, - if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } - } - encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class); - fundSchemeMapper.insert(insertFundInfo); - sqlSession.commit(); - - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null) { - List fundInfos = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) - .build()); - baseInfoPO.setFundArchivesId(fundInfos.get(0).getId()); - //对于非系统人员,编辑后状态切换为正在缴纳 - if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - } else { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); + baseInfoPO.setFundArchivesId(fundInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); } + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + targetPO = baseInfoPO; + encryptUtil.decrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class); + targetDetailPO = insertFundInfo; + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); } - - //生成福利档案基数调整记录数据 - List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); - //福利档案基数调整记录数据入库 - batchInsertAdjustHistory(adjustHistoryList); - - } finally { - sqlSession.close(); } - + //记录操作日志 + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细保存")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetDetailPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); } /** @@ -3023,154 +3220,164 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService */ public void socialSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { long employeeId = user.getUID(); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); + InsuranceArchivesSocialSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesSocialSaveParam.class); + SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); - InsuranceArchivesSocialSaveParam param = JSONObject.parseObject(paramReq.getBaseForm(), InsuranceArchivesSocialSaveParam.class); - SalaryAssert.notNull(SalaryI18nUtil.getI18nLabel(0,"员工id为空"), param, param.getEmployeeId()); - - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialStartTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } - if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialEndTime())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); - } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialStartTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保起始缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } + if (org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) && !SalaryDateUtil.checkYearMonth(param.getSocialEndTime())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "社保最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); + } // //删除社保数据 // socialSchemeMapper.batchDeleteByEmployeeIds(Collections.singletonList(param.getEmployeeId())); - //查询已有数据 - List socialIds = new ArrayList(); - socialIds.add(param.getId()); - List oldSocialInfoList = socialSchemeMapper.getSocialById(socialIds); - + //创建操作日志记录对象 + InsuranceArchivesBaseInfoPO targetPO = new InsuranceArchivesBaseInfoPO(); + InsuranceArchivesSocialSchemePO targetDetailPO = new InsuranceArchivesSocialSchemePO(); + //查询已有数据 + List socialIds = new ArrayList(); + socialIds.add(param.getId()); + List oldSocialInfoList = getSocialSchemeMapper().getSocialById(socialIds); + //设置福利档案基数调整记录数据 + InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() + .adjustAfterSchemeId(param.getSocialSchemeId()) + .adjustAfterBaseJson(paramReq.getPaymentForm()) + .adjustAfterComBaseJson(paramReq.getPaymentComForm()) + .welfareType(paramReq.getWelfareType().getValue()) + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + //组装新数据 + if (oldSocialInfoList.size() == 1) { + //老数据 + InsuranceArchivesSocialSchemePO oldSocialInfo = oldSocialInfoList.get(0); //设置福利档案基数调整记录数据 - InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder() - .adjustAfterSchemeId(param.getSocialSchemeId()) - .adjustAfterBaseJson(paramReq.getPaymentForm()) - .adjustAfterComBaseJson(paramReq.getPaymentComForm()) - .welfareType(paramReq.getWelfareType().getValue()) - .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) - .build(); - - //组装新数据 - if (oldSocialInfoList.size() == 1) { - //老数据 - InsuranceArchivesSocialSchemePO oldSocialInfo = oldSocialInfoList.get(0); - //设置福利档案基数调整记录数据 - encryptUtil.decrypt(oldSocialInfo, InsuranceArchivesSocialSchemePO.class); - adjustInfo.setAdjustBeforeBaseJson(oldSocialInfo.getSocialPaymentBaseString()); - adjustInfo.setAdjustBeforeSchemeId(oldSocialInfo.getSocialSchemeId()); - adjustInfo.setAdjustBeforeComBaseJson(oldSocialInfo.getSocialPaymentComBaseString()); - //新数据 - InsuranceArchivesSocialSchemePO updateSocialInfo = - InsuranceArchivesSocialSchemePO.builder() - .id(oldSocialInfo.getId()) - .welfareType(paramReq.getWelfareType().getValue()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .socialPaymentBaseString(paramReq.getPaymentForm()) - .socialSchemeId(param.getSocialSchemeId()) - .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) - .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) - .creator(employeeId) - .nonPayment(param.getNonPayment()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .employeeId(param.getEmployeeId()) - .updateTime(new Date()) - .underTake(param.getUnderTake()) - .socialAccount(param.getSchemeAccount()) - .paymentOrganization(param.getPaymentOrganization()) - .build(); + encryptUtil.decrypt(oldSocialInfo, InsuranceArchivesSocialSchemePO.class); + adjustInfo.setAdjustBeforeBaseJson(oldSocialInfo.getSocialPaymentBaseString()); + adjustInfo.setAdjustBeforeSchemeId(oldSocialInfo.getSocialSchemeId()); + adjustInfo.setAdjustBeforeComBaseJson(oldSocialInfo.getSocialPaymentComBaseString()); + //新数据 + InsuranceArchivesSocialSchemePO updateSocialInfo = + InsuranceArchivesSocialSchemePO.builder() + .id(oldSocialInfo.getId()) + .welfareType(paramReq.getWelfareType().getValue()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .socialPaymentBaseString(paramReq.getPaymentForm()) + .socialSchemeId(param.getSocialSchemeId()) + .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) + .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .employeeId(param.getEmployeeId()) + .updateTime(new Date()) + .underTake(param.getUnderTake()) + .socialAccount(param.getSchemeAccount()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } + } + encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class); + getSocialSchemeMapper().updateById(updateSocialInfo); + //更新base_info表状态 + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + //对于非系统人员,编辑后状态切换为正在缴纳 + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); + } + baseInfoPO.setSocialArchivesId(updateSocialInfo.getId()); + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + + targetPO = baseInfoPO; + encryptUtil.decrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class); + targetDetailPO = updateSocialInfo; + } else { + getSocialSchemeMapper().deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder() + .employeeId(param.getEmployeeId()) + .paymentOrganization(param.getPaymentOrganization()) + .build()); + //新建社保档案,并关联主表 + InsuranceArchivesSocialSchemePO insertSocialInfo = + InsuranceArchivesSocialSchemePO.builder() + .welfareType(paramReq.getWelfareType().getValue()) + .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .socialPaymentBaseString(paramReq.getPaymentForm()) + .socialSchemeId(param.getSocialSchemeId()) + .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) + .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) + .creator(employeeId) + .nonPayment(param.getNonPayment()) + .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) + .employeeId(param.getEmployeeId()) + .createTime(new Date()) + .updateTime(new Date()) + .underTake(param.getUnderTake()) + .socialAccount(param.getSchemeAccount()) + .paymentOrganization(param.getPaymentOrganization()) + .build(); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); + } + //需要拆分个人和公司福利基数时 + if (welBaseDiffSign) { + insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); + //校验福利基数是否符合上下限要求 + if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); } - encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class); - socialSchemeMapper.updateById(updateSocialInfo); - //更新base_info表状态 - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - //对于非系统人员,编辑后状态切换为正在缴纳 - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - baseInfoPO.setSocialArchivesId(updateSocialInfo.getId()); - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - sqlSession.commit(); - } else { - socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder() + } + encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class); + getSocialSchemeMapper().insert(insertSocialInfo); + + InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); + if(baseInfoPO != null) { + List socialInfos = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() .employeeId(param.getEmployeeId()) .paymentOrganization(param.getPaymentOrganization()) .build()); - //新建社保档案,并关联主表 - InsuranceArchivesSocialSchemePO insertSocialInfo = - InsuranceArchivesSocialSchemePO.builder() - .welfareType(paramReq.getWelfareType().getValue()) - .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) - .socialPaymentBaseString(paramReq.getPaymentForm()) - .socialSchemeId(param.getSocialSchemeId()) - .socialEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null) - .socialStartTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null) - .creator(employeeId) - .nonPayment(param.getNonPayment()) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .employeeId(param.getEmployeeId()) - .createTime(new Date()) - .updateTime(new Date()) - .underTake(param.getUnderTake()) - .socialAccount(param.getSchemeAccount()) - .paymentOrganization(param.getPaymentOrganization()) - .build(); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } - //需要拆分个人和公司福利基数时 - if (welBaseDiffSign) { - insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm()); - //校验福利基数是否符合上下限要求 - if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!")); - } - } - encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class); - socialSchemeMapper.insert(insertSocialInfo); - sqlSession.commit(); - - InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId()); - if(baseInfoPO != null) { - List socialInfos = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(param.getEmployeeId()) - .paymentOrganization(param.getPaymentOrganization()) - .build()); - baseInfoPO.setSocialArchivesId(socialInfos.get(0).getId()); - //对于非系统人员,编辑后状态切换为正在缴纳 - if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { - baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - } - getInsuranceBaseInfoMapper().updateById(baseInfoPO); - } else { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); + baseInfoPO.setSocialArchivesId(socialInfos.get(0).getId()); + //对于非系统人员,编辑后状态切换为正在缴纳 + if (baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) { + baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); } + getInsuranceBaseInfoMapper().updateById(baseInfoPO); + targetPO = baseInfoPO; + encryptUtil.decrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class); + targetDetailPO = insertSocialInfo; + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!")); } - - //生成福利档案基数调整记录数据 - List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); - //福利档案基数调整记录数据入库 - batchInsertAdjustHistory(adjustHistoryList); - } finally { - sqlSession.close(); } + //记录操作日志 + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细保存")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetDetailPO); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + //生成福利档案基数调整记录数据 + List adjustHistoryList = createAdjustInfo(adjustInfo, employeeId); + //福利档案基数调整记录数据入库 + batchInsertAdjustHistory(adjustHistoryList); } /** diff --git a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java index 11b7cf378..453ff9729 100644 --- a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java @@ -6,6 +6,8 @@ import com.api.browser.util.ConditionFactory; import com.api.browser.util.ConditionType; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.sicategory.bo.ICategoryBO; @@ -15,6 +17,7 @@ import com.engine.salary.entity.sicategory.dto.ICategoryListDTO; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.param.InsuranceSchemeParam; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.sicategory.DataTypeEnum; import com.engine.salary.enums.sicategory.IsPaymentEnum; import com.engine.salary.enums.sicategory.PaymentScopeEnum; @@ -119,6 +122,15 @@ public class SICategoryServiceImpl extends Service implements SICategoryService items.put("paymentScope",checkbox); apidatas.put("item",items); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(form.getId())); + loggerContext.setTargetName(form.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看自定义福利明细")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看自定义福利明细") + ": " + form.getInsuranceName()); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); return apidatas; } @@ -250,6 +262,16 @@ public class SICategoryServiceImpl extends Service implements SICategoryService .updateTime(new Date()) .build(); getICategoryMapper().updateNameAndPayScopeById(iCategoryPO); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(iCategoryPO.getId())); + loggerContext.setTargetName(iCategoryPO.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新自定义福利信息")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新自定义福利信息")); + loggerContext.setNewValues(iCategoryPO); + SalaryElogConfig.siCategoryLoggerTemplate.write(loggerContext); return null; } @@ -297,6 +319,16 @@ public class SICategoryServiceImpl extends Service implements SICategoryService //删除自定义福利项 categoryPO.setUpdateTime(new Date()); getICategoryMapper().deleteCustomCategoryById(categoryPO); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(categoryPO.getId())); + loggerContext.setTargetName(categoryPO.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建自定义福利项")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建自定义福利项")); +// loggerContext.setNewValues(categoryPO); + SalaryElogConfig.siCategoryLoggerTemplate.write(loggerContext); return null; } @@ -381,22 +413,23 @@ public class SICategoryServiceImpl extends Service implements SICategoryService * @param employeeId DataTypeEnum.SYSTEM.getValue() */ public void save(ICategoryFormDTO iCategoryFormDTO, long employeeId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - iCategoryFormDTO.setInsuranceName(StringUtils.trim(iCategoryFormDTO.getInsuranceName())); - List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); - if (CollectionUtils.isNotEmpty(iCategoryPOS)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); - } - ICategoryPO iCategoryPO = ICategoryBO.convertToInsuranceCategoryPO(iCategoryFormDTO, employeeId); - iCategoryMapper.insert(iCategoryPO); - - sqlSession.commit(); - - } finally { - sqlSession.close(); + iCategoryFormDTO.setInsuranceName(StringUtils.trim(iCategoryFormDTO.getInsuranceName())); + List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); + if (CollectionUtils.isNotEmpty(iCategoryPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); } + ICategoryPO iCategoryPO = ICategoryBO.convertToInsuranceCategoryPO(iCategoryFormDTO, employeeId); + getICategoryMapper().insert(iCategoryPO); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(iCategoryPO.getId())); + loggerContext.setTargetName(iCategoryPO.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建自定义福利项")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建自定义福利项")); + loggerContext.setNewValues(iCategoryPO); + SalaryElogConfig.siCategoryLoggerTemplate.write(loggerContext); } /** @@ -436,31 +469,34 @@ public class SICategoryServiceImpl extends Service implements SICategoryService * @param isUse */ public void updateStatusById(Long id, Integer isUse) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - if(id == null) { - throw new SalaryRunTimeException("id is required"); - } - if (isUse == null) { - throw new SalaryRunTimeException("isUse is required"); - } -// List insuranceSchemeDetailPOS = new SISchemeBiz().queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); - List insuranceSchemeDetailPOS = getSISchemeService(user).queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); - if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS) && isUse == 0) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该福利开启缴费,不可删除(或停用)")); - } - ICategoryPO iCategoryPO = getICategoryPOByID(id); - if (Objects.isNull(iCategoryPO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据记录不存在")); - } - iCategoryPO.setIsUse(isUse); - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - iCategoryMapper.updateById(iCategoryPO); - sqlSession.commit(); - }finally { - sqlSession.close(); + if(id == null) { + throw new SalaryRunTimeException("id is required"); } + if (isUse == null) { + throw new SalaryRunTimeException("isUse is required"); + } +// List insuranceSchemeDetailPOS = new SISchemeBiz().queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); + List insuranceSchemeDetailPOS = getSISchemeService(user).queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); + if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS) && isUse == 0) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"该福利开启缴费,不可删除(或停用)")); + } + ICategoryPO iCategoryPO = getICategoryPOByID(id); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据记录不存在")); + } + iCategoryPO.setIsUse(isUse); + getICategoryMapper().updateById(iCategoryPO); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(iCategoryPO.getId())); + loggerContext.setTargetName(iCategoryPO.getInsuranceName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新自定义福利状态")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新自定义福利状态")); + loggerContext.setNewValues(iCategoryPO); + SalaryElogConfig.siCategoryLoggerTemplate.write(loggerContext); } /*****以上代码为SICategoryBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 22e584b4f..3c7db3426 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -14,6 +14,7 @@ import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; +import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.SIArchiveImportParam; import com.engine.salary.entity.siarchives.po.*; @@ -40,6 +41,7 @@ import com.engine.salary.enums.salarysob.TargetTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import com.engine.salary.enums.sicategory.*; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.siaccount.SIAccountUtilMapper; import com.engine.salary.mapper.siarchives.FundSchemeMapper; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; @@ -173,6 +175,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { return SqlProxyHandle.getProxy(SIAccountUtilMapper.class); } + private EmployMapper getEmployMapper() { + return MapperProxyFactory.getProxy(EmployMapper.class); + } @Override public Map getForm(Map params) { // return commandExecutor.execute(new SISchemeGetFormCmd(params, user)); @@ -186,6 +191,16 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { // InsuranceSchemeFormVO form = siSchemeBiz.getForm(id, welfareTypeEnum); InsuranceSchemeFormVO form = getForm(id, welfareTypeEnum); apidatas.put("form",form); + //记录操作日志 + InsuranceSchemeDTO schemeBatch = form.getSchemeBatch(); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(schemeBatch.getId())); + loggerContext.setTargetName(schemeBatch.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看福利方案明细")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看福利方案明细") + ": " + schemeBatch.getSchemeName()); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); return apidatas; } @@ -623,6 +638,13 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } rows.add(row); } + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setOperateType(OperateTypeEnum.EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案导出")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案导出")); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); //获取excel return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -1821,10 +1843,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } public void handleImportData(List insuranceArchivesAccountPOS, SIArchiveImportParam param) { + List baseInfoPOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getBaseInfo).collect(Collectors.toList()); + //去除员工id+个税扣缴义务人下重复的数据 + baseInfoPOS = baseInfoPOS.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); + //老数据map + Map oldSocialArchiveMap = getSocialArchiveMap(baseInfoPOS); + Map oldFundArchiveMap = getFundArchiveMap(baseInfoPOS); + Map oldOtherArchiveMap = getOtherArchiveMap(baseInfoPOS); //导入社保档案 List socialSchemePOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getSocial).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(socialSchemePOS)) { - //去除员工id+个税扣缴义务人下重复的数据 socialSchemePOS = socialSchemePOS.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); @@ -1848,7 +1877,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //导入公积金档案 List fundSchemePOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getFund).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(fundSchemePOS)) { - //去除员工id+个税扣缴义务人下重复的数据 fundSchemePOS = fundSchemePOS.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); @@ -1869,7 +1897,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //导入其他福利档案 List otherSchemePOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getOther).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(otherSchemePOS)) { - //去除员工id+个税扣缴义务人下重复的数据 otherSchemePOS = otherSchemePOS.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); @@ -1889,12 +1916,12 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { getSIArchivesService(user).batchInsertAdjustHistory(adjustOtherHistoryPOList); } //导入福利档案基础信息 - List baseInfoPOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getBaseInfo).collect(Collectors.toList()); +// List baseInfoPOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getBaseInfo).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(baseInfoPOS)) { // baseInfoPOS = baseInfoPOS.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceArchivesBaseInfoPO::getEmployeeId))), ArrayList::new)); - //去除员工id+个税扣缴义务人下重复的数据 - baseInfoPOS = baseInfoPOS.stream() - .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); +// //去除员工id+个税扣缴义务人下重复的数据 +// baseInfoPOS = baseInfoPOS.stream() +// .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); //根据人员id和个税扣缴义务人id删除对应档案 baseInfoPOS.forEach(getInsuranceBaseInfoMapper()::deleteByEmployeeIdAndPayOrg); //分批批量删除 @@ -1919,6 +1946,54 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //分批批量入库 List> partition = Lists.partition(newInsuranceArchivesBaseInfoList, 100); partition.forEach(getInsuranceBaseInfoMapper()::batchSave); + //记录操作日志 + //获取新数据map和老数据map + Map newSocialArchiveMap = getSocialArchiveMap(baseInfoPOS); + Map newFundArchiveMap = getFundArchiveMap(baseInfoPOS); + Map newOtherArchiveMap = getOtherArchiveMap(baseInfoPOS); + newInsuranceArchivesBaseInfoList.forEach(targetPO -> { + InsuranceArchivesSocialSchemePO targetSocialDetail = newSocialArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId()); + InsuranceArchivesFundSchemePO targetFundDetail = newFundArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId()); + InsuranceArchivesOtherSchemePO targetOtherDetail = newOtherArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId()); + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetPO.getEmployeeId()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + if (targetSocialDetail != null) { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细导入")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细导入") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOldValues(oldSocialArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId())); + loggerContext.setNewValues(targetSocialDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + } + if (targetFundDetail != null) { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细导入")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细导入") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOldValues(oldFundArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId())); + loggerContext.setNewValues(targetFundDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + } + if (targetOtherDetail != null) { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细导入")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细导入") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + loggerContext.setOldValues(oldOtherArchiveMap.get(targetPO.getPaymentOrganization() + "-" + targetPO.getEmployeeId())); + loggerContext.setNewValues(targetOtherDetail); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); + } + }); } //新增人员范围(会自动生成人员档案) if (CollectionUtils.isNotEmpty(param.getTaxAgentRanges())) { @@ -1926,6 +2001,61 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } } + private Map getSocialArchiveMap(List baseInfoPOS) { + Map map = new HashMap<>(); + if (baseInfoPOS.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesBaseInfoPO po : baseInfoPOS) { + List archiveList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + if (archiveList.size() == 1) { + //新增调整记录,变更 + encryptUtil.decryptList(archiveList, InsuranceArchivesSocialSchemePO.class); + map.put(po.getPaymentOrganization() + "-" + po.getEmployeeId(), archiveList.get(0)); + } else if (archiveList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保档案存在冗余数据!")); + } + } + } + return map; + } + private Map getFundArchiveMap(List baseInfoPOS) { + Map map = new HashMap<>(); + if (baseInfoPOS.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesBaseInfoPO po : baseInfoPOS) { + List archiveList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + if (archiveList.size() == 1) { + //新增调整记录,变更 + encryptUtil.decryptList(archiveList, InsuranceArchivesFundSchemePO.class); + map.put(po.getPaymentOrganization() + "-" + po.getEmployeeId(), archiveList.get(0)); + } else if (archiveList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金档案存在冗余数据!")); + } + } + } + return map; + } + private Map getOtherArchiveMap(List baseInfoPOS) { + Map map = new HashMap<>(); + if (baseInfoPOS.size() > 0) { + //遍历待更新的福利档案数据,对每组档案生成基数调整记录(基数单元未变化则忽略) + for (InsuranceArchivesBaseInfoPO po : baseInfoPOS) { + List archiveList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .paymentOrganization(po.getPaymentOrganization()).employeeId(po.getEmployeeId()).build()); + if (archiveList.size() == 1) { + //新增调整记录,变更 + encryptUtil.decryptList(archiveList, InsuranceArchivesOtherSchemePO.class); + map.put(po.getPaymentOrganization() + "-" + po.getEmployeeId(), archiveList.get(0)); + } else if (archiveList.size() > 1) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保档案存在冗余数据!")); + } + } + } + return map; + } + /** * 导出档案导入所需要的模板,可根据开关选择是否导出现有的档案数据 @@ -2335,8 +2465,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(targetPO.getSchemeName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建福利方案")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建福利方案") + ": " + targetPO.getSchemeName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增福利方案主表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案基础信息") + ": " + targetPO.getSchemeName()); loggerContext.setNewValues(targetPO); SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); } @@ -2345,26 +2475,19 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //加密入库 encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); - //记录操作日志 + //记录明细表操作日志 if (insuranceSchemeDetailPOS.size() > 0) { encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - List allCategoryList = getICategoryMapper().listAll(); - Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); - InsuranceSchemePO finalTargetPO = targetPO; - insuranceSchemeDetailPOS.forEach(schemeDetailPO -> { - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(finalTargetPO.getId())); - loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); - loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建福利方案明细")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建福利方案明细") + ": " - + categoryNameMap.get(schemeDetailPO.getInsuranceId()) - + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); - loggerContext.setNewValues(schemeDetailPO); - SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); - }); + LoggerContext> loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(targetPO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增福利方案明细表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细")); + insuranceSchemeDetailPOS.forEach(loggerContext::setNewValues); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); } } @@ -2397,32 +2520,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"方案可见性为私有时,未设置可见范围")); } } - //记录操作日志 - LoggerContext loggerContext = new LoggerContext<>(); + //记录主表操作日志 + LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setTargetId(insuranceSchemePO.getId().toString()); loggerContext.setTargetName(insuranceSchemePO.getSchemeName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利方案保存")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案保存") + ": " + insuranceSchemePO.getSchemeName()); - loggerContext.setOldValues(insuranceSchemePO); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "修改福利方案主表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案基础信息") + ": " + insuranceSchemePO.getSchemeName()); +// loggerContext.setOldValues(insuranceSchemePO); //更新福利方案主表 InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme()); getInsuranceSchemeMapper().update(insuranceSchemePO1); - //记录操作日志 + //记录主表操作日志 loggerContext.setNewValues(insuranceSchemePO1); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); - List oldInsuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(updateParam.getInsuranceScheme().getId()); - encryptUtil.decryptList(oldInsuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - //更新福利方案明细表 先删后插 getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId())); //更新明细表 List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(updateParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); - //记录操作日志, todo - + //记录明细表操作日志 + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + LoggerContext> insuranceSchemeDetailContext = new LoggerContext<>(); + insuranceSchemeDetailContext.setTargetId(String.valueOf(insuranceSchemePO.getId())); + insuranceSchemeDetailContext.setTargetName(insuranceSchemePO.getSchemeName()); + insuranceSchemeDetailContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + insuranceSchemeDetailContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "修改福利方案明细表")); + insuranceSchemeDetailContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细")); + insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailContext::setNewValues); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(insuranceSchemeDetailContext); } @@ -2451,38 +2579,33 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { getInsuranceSchemeDetailMapper().deleteByIds(schemeIds); //记录操作日志 + Map> targetDetailMap = targetDetailPoList.stream() + .collect(Collectors.groupingBy(InsuranceSchemeDetailPO::getPrimaryId)); if (targetPoList.size() > 0) { targetPoList.forEach(targetPO -> { + //记录主表操作日志 LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(targetPO.getSchemeName()); loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案主表")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利方案") + ": " + targetPO.getSchemeName()); loggerContext.setNewValues(targetPO); SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); - }); - } - if (targetDetailPoList.size() > 0) { - List allCategoryList = getICategoryMapper().listAll(); - Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); - Map> targetDetailMap = targetDetailPoList.stream() - .collect(Collectors.groupingBy(InsuranceSchemeDetailPO::getPrimaryId)); - targetDetailMap.forEach((k, v) -> { - v.forEach(schemeDetailPO -> { - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(k)); - loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); - loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案明细")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除福利方案明细") + ": " - + categoryNameMap.get(schemeDetailPO.getInsuranceId()) - + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); - loggerContext.setNewValues(schemeDetailPO); - SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); - }); + //记录明细表操作日志 + List targetDetails = targetDetailMap.get(targetPO.getId()); + if (targetDetails != null && targetDetails.size() > 0) { + LoggerContext> detailLoggerContext = new LoggerContext<>(); + detailLoggerContext.setUser(user); + detailLoggerContext.setTargetId(String.valueOf(targetPO.getId())); + detailLoggerContext.setTargetName(targetPO.getSchemeName()); + detailLoggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + detailLoggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除福利方案明细")); + detailLoggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细")); + targetDetails.forEach(detailLoggerContext::setNewValues); + SalaryElogConfig.siSchemeLoggerTemplate.write(detailLoggerContext); + } }); } @@ -2537,8 +2660,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(targetPO.getSchemeName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制福利方案")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "复制(新建)福利方案") + ": " + targetPO.getSchemeName()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制新增福利方案主表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案基础信息") + ": " + targetPO.getSchemeName()); loggerContext.setNewValues(targetPO); SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); } @@ -2569,26 +2692,19 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //加密入库 encryptUtil.encryptList(detailPOS, InsuranceSchemeDetailPO.class); detailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); - //记录操作日志 + //记录明细表操作日志 if (detailPOS.size() > 0) { encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); - List allCategoryList = getICategoryMapper().listAll(); - Map categoryNameMap = SalaryEntityUtil.convert2Map(allCategoryList, ICategoryPO::getId, ICategoryPO::getInsuranceName); - InsuranceSchemePO finalTargetPO = targetPO; - detailPOS.forEach(schemeDetailPO -> { - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(finalTargetPO.getId())); - loggerContext.setTargetName(categoryNameMap.get(schemeDetailPO.getInsuranceId())); - loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制福利方案明细")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "复制(新建)福利方案明细") + ": " - + categoryNameMap.get(schemeDetailPO.getInsuranceId()) - + "-" + SalaryEnumUtil.enumMatchByValue(schemeDetailPO.getPaymentScope(), PaymentScopeEnum.values(), PaymentScopeEnum.class)); - loggerContext.setNewValues(schemeDetailPO); - SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); - }); + LoggerContext> loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(targetPO.getSchemeName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "复制新增福利方案明细表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细")); + detailPOS.forEach(loggerContext::setNewValues); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); } } From 8f8bc5256d06407582b3c3174f311e909eca1475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sun, 18 Feb 2024 11:39:49 +0800 Subject: [PATCH 097/169] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/enums/OperateTypeEnum.java | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/src/com/engine/salary/enums/OperateTypeEnum.java b/src/com/engine/salary/enums/OperateTypeEnum.java index 697e1aea6..524a6f603 100644 --- a/src/com/engine/salary/enums/OperateTypeEnum.java +++ b/src/com/engine/salary/enums/OperateTypeEnum.java @@ -1,5 +1,8 @@ package com.engine.salary.enums; +import lombok.AllArgsConstructor; +import lombok.Getter; + /** * 操作类型 *

Copyright: Copyright (c) 2023

@@ -8,28 +11,40 @@ package com.engine.salary.enums; * @author qiantao * @version 1.0 **/ -public enum OperateTypeEnum { +@Getter +@AllArgsConstructor +public enum OperateTypeEnum implements BaseEnum{ - READ("0", "查看"), - ADD("1", "新增"), - UPDATE("2", "更新"), - DELETE("4", "删除"), - EXPORT("5", "导出"); + READ("0", "查看",1111), + ADD("1", "新建", 94607), + UPDATE("2", "更新", 249295), + DELETE("3", "删除", 87061), + FILE("4", "归档", 92144), + CANCEL_FILE("5", "取消归档", 145989), + CLEAR("6", "一键清空", 158473), + CALCULATE("7", "核算", 94146), + SYNC("8", "同步", 93950), + EXCEL_IMPORT("9", "导入", 87622), + EXCEL_EXPORT("9", "导出", 87622); - private String value; + private final String value; - private String label; + private final String defaultLabel; - OperateTypeEnum(String value, String label) { - this.value = value; - this.label = label; - } + private final Integer labelId; + @Override public String getValue() { return value; } - public String getLabel() { - return label; + @Override + public Integer getLabelId() { + return labelId; + } + + @Override + public String getDefaultLabel() { + return defaultLabel; } } From b2972e8acad74a9104308ee0cd2937fee67e77ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sun, 18 Feb 2024 11:40:59 +0800 Subject: [PATCH 098/169] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/service/impl/SISchemeServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 3c7db3426..ac0391195 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -13,8 +13,6 @@ import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; -import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; -import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO; import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam; import com.engine.salary.entity.siarchives.param.SIArchiveImportParam; import com.engine.salary.entity.siarchives.po.*; @@ -59,6 +57,7 @@ import com.engine.salary.sys.enums.OpenEnum; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.*; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; @@ -68,7 +67,6 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -641,7 +639,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { //记录操作日志 LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); - loggerContext.setOperateType(OperateTypeEnum.EXPORT.getValue()); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案导出")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案导出")); SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); From 7fe03ac7a111ae4573262b552444fd0107e0d7dc Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 19 Feb 2024 10:09:49 +0800 Subject: [PATCH 099/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=8F=8D=E9=A6=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java | 2 +- .../salary/service/impl/SalaryBillBaseSetServiceImpl.java | 2 +- src/com/engine/salary/service/impl/SalarySendServiceImpl.java | 4 ++-- .../engine/salary/service/impl/SalaryTemplateServiceImpl.java | 2 +- src/com/engine/salary/wrapper/SalaryTemplateWrapper.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java index d436117c1..7f09f2048 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryTemplateBO.java @@ -78,7 +78,7 @@ public class SalaryTemplateBO { .autoSendDayOfMonth(saveParam.getAutoSendDayOfMonth()) .autoSendTimeOfDay(saveParam.getAutoSendTimeOfDay()) .ackFeedbackStatus(saveParam.getAckFeedbackStatus()?1:0) - .ackFeedbackStatus(saveParam.getFeedbackStatus()?1:0) + .feedbackStatus(saveParam.getFeedbackStatus()?1:0) .autoAckDays(saveParam.getAutoAckDays()) .feedbackUrl(saveParam.getFeedbackUrl()) .mobileFeedbackUrl(saveParam.getMobileFeedbackUrl()) diff --git a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java index 581b8f20d..63d0b5138 100644 --- a/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillBaseSetServiceImpl.java @@ -97,7 +97,7 @@ public class SalaryBillBaseSetServiceImpl extends Service implements SalaryBillB SalaryBillAckFeedbackDTO ackFeedbackSetting = saveParam.getAckFeedbackSetting(); // 1.保存确认反馈开关状态 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAckStatus(), SALARY_SEND_FEEDBACK, "工资单确认状态", "billSend"); - getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAckStatus(), SALARY_SEND_FEEDBACK_FK, "工资单反馈状态", "billSend"); + getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getFeedbackStatus(), SALARY_SEND_FEEDBACK_FK, "工资单反馈状态", "billSend"); if (StringUtils.equals(ackFeedbackSetting.getAckStatus(), "1")) { // 保存自动确认时间 getSalarySysConfService(user).saveSettingByType(ackFeedbackSetting.getAutoAckDays().toString(), SALARY_AUTO_ACK_DAYS, "工资单反馈自动确认", "billSend"); diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index fb68130fb..a14d01c5c 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -866,10 +866,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService .replenishSalaryItemSetting(map.getOrDefault("replenishSalaryItemSetting", "").toString()) .build(); Object feedbackStatus = map.get("feedbackStatus"); - if (feedbackStatus == null) { + if (feedbackStatus == null || StringUtils.isBlank(feedbackStatus.toString())) { build.setFeedbackStatus(build.getAckFeedbackStatus()); } else { - Integer.valueOf(map.get("ackFeedbackStatus").toString()); + build.setFeedbackStatus(Integer.valueOf(feedbackStatus.toString())); } return build; } diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index 9243eced6..6e19ffbd2 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -215,7 +215,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate salaryTemplateNew.setAutoSendStatus(saveParam.getAutoSendStatus() ? 1 : 0); salaryTemplateNew.setAutoSendCycleType(saveParam.getAutoSendCycleType()); salaryTemplateNew.setAckFeedbackStatus(saveParam.getAckFeedbackStatus() ? 1 : 0); - salaryTemplateNew.setAckFeedbackStatus(saveParam.getFeedbackStatus() ? 1 : 0); + salaryTemplateNew.setFeedbackStatus(saveParam.getFeedbackStatus() ? 1 : 0); salaryTemplateNew.setAutoAckDays(saveParam.getAutoAckDays()); salaryTemplateNew.setFeedbackUrl(saveParam.getFeedbackUrl()); salaryTemplateNew.setMobileFeedbackUrl(saveParam.getMobileFeedbackUrl()); diff --git a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java index c4b622c69..a1d36cdea 100644 --- a/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryTemplateWrapper.java @@ -169,7 +169,7 @@ public class SalaryTemplateWrapper extends Service { if (po.getFeedbackStatus() == null) { salaryTemplateBaseSetDTO.setFeedbackStatus(salaryTemplateBaseSetDTO.getAckFeedbackStatus()); } else { - salaryTemplateBaseSetDTO.setFeedbackStatus(NumberUtils.compare(po.getAckFeedbackStatus(), 1) == 0); + salaryTemplateBaseSetDTO.setFeedbackStatus(NumberUtils.compare(po.getFeedbackStatus(), 1) == 0); } salaryTemplateBaseSetDTO.setAutoAckDays(ObjectUtils.isEmpty(po.getAutoAckDays()) ? 7 : po.getAutoAckDays()); From 5525d9881cc78a52a3aa9a7932441d0def1730c1 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 19 Feb 2024 10:33:48 +0800 Subject: [PATCH 100/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=EF=BC=8C=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=A6=8F=E5=88=A9=E9=A1=B9=E8=AF=A6=E6=83=85=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SICategoryBiz.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/engine/salary/biz/SICategoryBiz.java b/src/com/engine/salary/biz/SICategoryBiz.java index 6fb23037d..dec57358b 100644 --- a/src/com/engine/salary/biz/SICategoryBiz.java +++ b/src/com/engine/salary/biz/SICategoryBiz.java @@ -8,6 +8,7 @@ import com.engine.salary.enums.sicategory.IsPaymentEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.sicategory.ICategoryMapper; +import com.engine.salary.util.SalaryEnumUtil; import com.mzlion.core.utils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -41,6 +42,8 @@ public class SICategoryBiz { throw new SalaryRunTimeException("数据不存在"); } BeanUtils.copyProperties(iCategoryPO,iCategoryFormDTO); + iCategoryFormDTO.setWelfareType(SalaryEnumUtil.enumMatchByValue(iCategoryPO.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class)); + iCategoryFormDTO.setPaymentScope(SalaryEnumUtil.stringToEnums(iCategoryPO.getPaymentScope(), ",")); return iCategoryFormDTO; } From c64e9b4b7622fb32aa1a4829243c9cfe7a9a70ca Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 19 Feb 2024 14:01:30 +0800 Subject: [PATCH 101/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=8F=8D=E9=A6=88sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202402190103.sql | 3 +++ resource/sqlupgrade/GS/sql202402190103.sql | 3 +++ resource/sqlupgrade/JC/sql202402190103.sql | 3 +++ resource/sqlupgrade/Mysql/sql202402190103.sql | 1 + resource/sqlupgrade/Oracle/sql202402190103.sql | 2 ++ resource/sqlupgrade/PG/sql202402190103.sql | 1 + resource/sqlupgrade/SQLServer/sql202402190103.sql | 2 ++ resource/sqlupgrade/ST/sql202402190103.sql | 3 +++ src/com/engine/salary/service/impl/SalarySendServiceImpl.java | 4 +++- 9 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 resource/sqlupgrade/DM/sql202402190103.sql create mode 100644 resource/sqlupgrade/GS/sql202402190103.sql create mode 100644 resource/sqlupgrade/JC/sql202402190103.sql create mode 100644 resource/sqlupgrade/Mysql/sql202402190103.sql create mode 100644 resource/sqlupgrade/Oracle/sql202402190103.sql create mode 100644 resource/sqlupgrade/PG/sql202402190103.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202402190103.sql create mode 100644 resource/sqlupgrade/ST/sql202402190103.sql diff --git a/resource/sqlupgrade/DM/sql202402190103.sql b/resource/sqlupgrade/DM/sql202402190103.sql new file mode 100644 index 000000000..ee754d9b3 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202402190103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add feedback_status int; +/ + diff --git a/resource/sqlupgrade/GS/sql202402190103.sql b/resource/sqlupgrade/GS/sql202402190103.sql new file mode 100644 index 000000000..ee754d9b3 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202402190103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add feedback_status int; +/ + diff --git a/resource/sqlupgrade/JC/sql202402190103.sql b/resource/sqlupgrade/JC/sql202402190103.sql new file mode 100644 index 000000000..ee754d9b3 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202402190103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add feedback_status int; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202402190103.sql b/resource/sqlupgrade/Mysql/sql202402190103.sql new file mode 100644 index 000000000..e4806b3ec --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202402190103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_template add feedback_status int; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202402190103.sql b/resource/sqlupgrade/Oracle/sql202402190103.sql new file mode 100644 index 000000000..a45fcae76 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202402190103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_template add feedback_status int +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202402190103.sql b/resource/sqlupgrade/PG/sql202402190103.sql new file mode 100644 index 000000000..e4806b3ec --- /dev/null +++ b/resource/sqlupgrade/PG/sql202402190103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_template add feedback_status int; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202402190103.sql b/resource/sqlupgrade/SQLServer/sql202402190103.sql new file mode 100644 index 000000000..b00318264 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202402190103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_template add feedback_status int +go \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202402190103.sql b/resource/sqlupgrade/ST/sql202402190103.sql new file mode 100644 index 000000000..ee754d9b3 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202402190103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_template add feedback_status int; +/ + diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index a14d01c5c..67041985d 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -725,7 +725,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService throw new SalaryRunTimeException("请先设置工资单模板"); } Integer ackFeedbackStatus = salaryTemplates.get(0).getAckFeedbackStatus(); - if (ackFeedbackStatus != null && NumberUtils.compare(ackFeedbackStatus, 1) == 0) { + Integer feedbackStatus = salaryTemplates.get(0).getFeedbackStatus(); + if ( (ackFeedbackStatus != null && NumberUtils.compare(ackFeedbackStatus, 1) == 0) + || (feedbackStatus != null && NumberUtils.compare(feedbackStatus, 1) == 0)) { // 默认为空时,未读未确认 pageInfo.getList().stream().forEach(obj -> { SalarySendInfoListDTO dto = (SalarySendInfoListDTO) obj; From ee82d1cb9afb97ece6b1bf3d7e0929b77be628c2 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 19 Feb 2024 14:16:47 +0800 Subject: [PATCH 102/169] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=8F=8D=E9=A6=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/wrapper/SalarySendWrapper.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/wrapper/SalarySendWrapper.java b/src/com/engine/salary/wrapper/SalarySendWrapper.java index 75c83f012..e948c7b13 100644 --- a/src/com/engine/salary/wrapper/SalarySendWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySendWrapper.java @@ -151,9 +151,15 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy Optional optional = salaryTemplates.stream().filter(s -> s.getSalarySobId().equals(e.getSalarySobId())).findFirst(); if (optional.isPresent()) { // todo 目前就一个回算,那么没有冻结且是回算,就展示补发名称 - e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? optional.get().getReplenishName() : optional.get().getName()); - e.setTemplateId(optional.get().getId()); - e.setAckFeedbackStatus(optional.get().getAckFeedbackStatus() == null ? 0 : optional.get().getAckFeedbackStatus()); + SalaryTemplatePO salaryTemplatePO = optional.get(); + e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName()); + e.setTemplateId(salaryTemplatePO.getId()); + if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) || + (salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1) ) { + e.setAckFeedbackStatus(1); + } else { + e.setAckFeedbackStatus(0); + } } }); } From cfb82cb9b20f037e082871c670357b4b9143848e Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 19 Feb 2024 17:27:42 +0800 Subject: [PATCH 103/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E3=80=81=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E3=80=81=E5=8F=B0=E8=B4=A6=EF=BC=8C=E7=9B=B8=E5=85=B3=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=B1=BB=E4=BB=A3=E7=A0=81=E6=A2=B3=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4sqlsession=E5=BD=A2=E5=BC=8F=E7=9A=84mpper?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIArchivesServiceImpl.java | 736 ++++++++---------- .../service/impl/SICategoryServiceImpl.java | 59 +- .../service/impl/SISchemeServiceImpl.java | 72 +- 3 files changed, 355 insertions(+), 512 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 5f317d94b..a8aaa54c5 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -140,6 +140,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class); } + private InsuranceSchemeMapper getInsuranceSchemeMapper() { + return MapperProxyFactory.getProxy(InsuranceSchemeMapper.class); + } + private SalaryEmployeeService getSalaryEmployeeService(User user) { return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } @@ -160,6 +164,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return MapperProxyFactory.getProxy(EmployMapper.class); } + private InsuranceBaseAdjustHistoryMapper getInsuranceBaseAdjustHistoryMapper() { + return MapperProxyFactory.getProxy(InsuranceBaseAdjustHistoryMapper.class); + } + + @Override public Map getTips(Map params) { return commandExecutor.execute(new SIArchivesTipsCmd(params, user)); @@ -813,12 +822,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public Map queryInsuranceTabTotal() { long currentEmployeeId = user.getUID(); - // tab页签数量 Map result = new HashMap<>(); - Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId); - //获取管理的人员范围 List taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); Map> taxAgentEmployeesMap = SalaryEntityUtil.convert2Map(taxAgentEmployeeDTOS, TaxAgentManageRangeEmployeeDTO::getTaxAgentId, TaxAgentManageRangeEmployeeDTO::getEmployeeList); @@ -827,22 +833,18 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService // 获取作为管理员的所有个税扣缴义务人列表 Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId); Set taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId); - //获取所有福利档案基础信息 List archiveListDTOS = getInsuranceBaseInfoMapper().listAll(); list = archiveListDTOS.stream().filter(dto -> taxAgentIds.contains(dto.getPaymentOrganization())).collect(Collectors.toList()); - Boolean adminEnable = getTaxAgentService(user).isAdminEnable(currentEmployeeId); //不是管理员看不到数据,返回空 if (!adminEnable) { list = new ArrayList<>(); } - } else { list = getInsuranceBaseInfoMapper().listAll(); } - long stayAddTotal = 0L; long payTotal = 0L; long stayDelTotal = 0L; @@ -915,11 +917,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List oldStayAddList = pos.stream().filter(f -> f.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())).collect(Collectors.toList()); boolean isNotExist = oldStayAddList.stream().anyMatch(te -> taxAgentManageRangeEmployees.stream().noneMatch(p -> p.getEmployeeId() != null && p.getEmployeeId().equals(te.getEmployeeId()) && p.getTaxAgentId().equals(te.getPaymentOrganization()))); - if (isNotExist) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(116196, "不在当前个税扣缴义人的人员范围中,不可取消停缴")); } - for(InsuranceArchivesBaseInfoPO po : pos) { if (po.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())) { //来自待增员的停缴->待增员 @@ -969,12 +969,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "没有可以操作的记录")); } List baseInfoPOList = getInsuranceBaseInfoMapper().listByIds(ids); - //分别新建福利档案基础信息相关的社保、公积金、其他福利档案列表 List socialList = new ArrayList<>(); List fundList = new ArrayList<>(); List otherList = new ArrayList<>(); - //新建最终可以进行减员的福利档案基础信息id列表 List toStopBaseInfoIdList = new ArrayList<>(); //新建最终不可以进行减员的福利档案基础信息id列表 @@ -997,10 +995,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //获取社保档案 socialList = getSocialSchemeMapper().getSocialById(socialIds); //筛选可减员的社保档案相关信息 - toStopSocialIds = socialList.stream().filter(f-> f.getSocialSchemeId() == null || (f.getSocialEndTime() != null && f.getSocialEndTime().length() > 0 && (f.getSocialEndTime().compareTo(todayMonth)) <= 0)) .map(InsuranceArchivesSocialSchemePO::getId).collect(Collectors.toList()); - // + List finalToStopSocialIds = toStopSocialIds; noStopBaseInfoIds = baseInfoPOList.stream().filter(f -> !finalToStopSocialIds.contains(f.getSocialArchivesId())).map(InsuranceArchivesBaseInfoPO::getId).collect(Collectors.toList()); @@ -1028,7 +1025,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //社保、公积金、其他福利档案的可减员的人员信息与入参中的人员信息一致时 toStopBaseInfoIdList = baseInfoIds; } else { - //与最终不可减员的baseInfoId信息做差集 toStopBaseInfoIdList = (List) CollectionUtils.subtract(baseInfoIds, noStopBaseInfoIds); } @@ -1036,7 +1032,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (toStopBaseInfoIdList.size() > 0) { getInsuranceBaseInfoMapper().updateRunStatusByIds(InsuranceArchivesBaseInfoPO.builder() .ids(toStopBaseInfoIdList).runStatus(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue()).build()); - //记录操作日志 toStopBaseInfoIdList.forEach(f -> { InsuranceArchivesBaseInfoPO targetPO = getInsuranceBaseInfoMapper().getById(f); @@ -1163,19 +1158,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (CollectionUtils.isEmpty(ids)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "没有可以操作的记录")); } - // List baseInfoPOList = new ArrayList<>(); List> partitionInfo = Lists.partition((List) ids, 100); partitionInfo.forEach(part -> baseInfoPOList.addAll( getInsuranceBaseInfoMapper().listByIds(part))); - // - //分别新建福利档案基础信息相关的社保、公积金、其他福利档案列表 List socialList = new ArrayList<>(); List fundList = new ArrayList<>(); List otherList = new ArrayList<>(); - //新建最终可以进行增员的福利档案基础信息id列表 List toPayBaseInfoIdList = new ArrayList<>(); //新建最终不可以进行增员的福利档案基础信息id列表 @@ -1360,7 +1351,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (insuranceArchivesBaseInfoPO.getIds() == null || StringUtils.isBlank(insuranceArchivesBaseInfoPO.getRunStatus())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误")); } - if (insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) { List> baseInfoIdsPartition = Lists.partition((List) insuranceArchivesBaseInfoPO.getIds(), 100); List nowList = new ArrayList<>(); @@ -1377,7 +1367,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (isNotExist) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(116196, "个税扣缴义务人不存在或不在权限范围内,删除失败!")); } - //置空社保、公积金、其他福利档案的最后缴纳月信息,并将福利档案基础信息表的状态置为“正在缴纳” if (nowList.size() > 0) { List socialIds = nowList.stream() @@ -1443,7 +1432,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService // List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); List adjustHistoryDTOS = getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); - // 分权逻辑 Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); if (needAuth) { @@ -1605,8 +1593,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * 判断是否需要生成历史福利档案基本信息 */ public Boolean createOldInsuranceBaseInfo(Long creator) { - - log.info("判断是否需要生成历史数据"); List nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList(); if (nowBaseInfoList.size() == 0) { @@ -1633,7 +1619,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService InsuranceArchivesOtherSchemePO toDealOtherPO = toDealOtherList.get(0); toDealOtherPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); updateOtherList.add(toDealOtherPO); - } } @@ -1676,8 +1661,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService }else { return false; } - - } else { return false; } @@ -1693,178 +1676,173 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public List> buildTableData(List insuranceArchivesEmployeePOS, boolean export) { - boolean welBaseDiffSign = isDiffWelBase(); List taxAgentPOS = getTaxAgentMapper().listAll(); Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + List> records = new ArrayList<>(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - Map socialSchemePOMap = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class) - .stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getId, Function.identity())); + Map socialSchemePOMap = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getId, Function.identity())); - Map fundSchemePOMap = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class) - .stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getId, Function.identity())); - List otherByEmployeeList = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); - encryptUtil.decryptList(otherByEmployeeList, InsuranceArchivesOtherSchemePO.class); - Map otherSchemePOMap = otherByEmployeeList - .stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getId, Function.identity())); - insuranceArchivesEmployeePOS.forEach(item -> { - InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId()); - InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId()); - InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId()); - Map map = new HashMap<>(); - map.put("employeeName", item.getUserName()); - map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); - map.put("employeeId", item.getEmployeeId()); - map.put("departmentName", item.getDepartmentName()); - map.put("subcompanyName", item.getSubcompanyName()); - map.put("departmentId", item.getDepartmentId()); - map.put("jobNum", item.getJobNum()); - map.put("companystartdate", item.getCompanystartdate()); - map.put("dismissdate", item.getDimissionDate()); - map.put("mobile", item.getTelephone()); - map.put("siSchemeId", item.getSiSchemeId()); - map.put("fundSchemeId", item.getFundSchemeId()); - map.put("otherSchemeId", item.getOtherSchemeId()); - map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : ""); - map.put("baseInfo", item.getBaseInfoId()); - map.put("paymentOrganization", item.getPaymentOrganization()); - if (socialItem != null) { - map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId())); - Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { - }); - if (welBaseDiffSign) { - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { + Map fundSchemePOMap = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getId, Function.identity())); + List otherByEmployeeList = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); + encryptUtil.decryptList(otherByEmployeeList, InsuranceArchivesOtherSchemePO.class); + Map otherSchemePOMap = otherByEmployeeList + .stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getId, Function.identity())); + insuranceArchivesEmployeePOS.forEach(item -> { + InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId()); + InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId()); + InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId()); + Map map = new HashMap<>(); + map.put("employeeName", item.getUserName()); + map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); + map.put("employeeId", item.getEmployeeId()); + map.put("departmentName", item.getDepartmentName()); + map.put("subcompanyName", item.getSubcompanyName()); + map.put("departmentId", item.getDepartmentId()); + map.put("jobNum", item.getJobNum()); + map.put("companystartdate", item.getCompanystartdate()); + map.put("dismissdate", item.getDimissionDate()); + map.put("mobile", item.getTelephone()); + map.put("siSchemeId", item.getSiSchemeId()); + map.put("fundSchemeId", item.getFundSchemeId()); + map.put("otherSchemeId", item.getOtherSchemeId()); + map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : ""); + map.put("baseInfo", item.getBaseInfoId()); + map.put("paymentOrganization", item.getPaymentOrganization()); + if (socialItem != null) { + map.put("socialName", getInsuranceSchemeMapper().querySchemeName(socialItem.getSocialSchemeId())); + Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } }); - if (socialComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - socialComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("socialAccount", socialItem.getSocialAccount()); - map.put("socialStartTime", socialItem.getSocialStartTime()); - map.put("socialEndTime", socialItem.getSocialEndTime()); - } - if (fundItem != null) { - map.put("fundName", insuranceSchemeMapper.querySchemeName(fundItem.getFundSchemeId())); - map.put("fundAccount", fundItem.getFundAccount()); - Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { }); - if (welBaseDiffSign) { - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } }); - if (fundComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - fundComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); - map.put("fundStartTime", fundItem.getFundStartTime()); - map.put("fundEndTime", fundItem.getFundEndTime()); - } - if (otherItem != null) { - map.put("otherName", insuranceSchemeMapper.querySchemeName(otherItem.getOtherSchemeId())); - Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { + + map.put("socialAccount", socialItem.getSocialAccount()); + map.put("socialStartTime", socialItem.getSocialStartTime()); + map.put("socialEndTime", socialItem.getSocialEndTime()); + } + if (fundItem != null) { + map.put("fundName", getInsuranceSchemeMapper().querySchemeName(fundItem.getFundSchemeId())); + map.put("fundAccount", fundItem.getFundAccount()); + Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { }); - if (welBaseDiffSign) { - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } }); - if (otherComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - otherComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("otherStartTime", otherItem.getOtherStartTime()); - map.put("otherEndTime", otherItem.getOtherEndTime()); } - records.add(map); - }); - return records; - } finally { - sqlSession.close(); - } + map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); + map.put("fundStartTime", fundItem.getFundStartTime()); + map.put("fundEndTime", fundItem.getFundEndTime()); + + } + if (otherItem != null) { + map.put("otherName", getInsuranceSchemeMapper().querySchemeName(otherItem.getOtherSchemeId())); + Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } + } + + map.put("otherStartTime", otherItem.getOtherStartTime()); + map.put("otherEndTime", otherItem.getOtherEndTime()); + } + records.add(map); + }); + return records; + + } @Override @@ -1880,54 +1858,39 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * 根据人员id和个税扣缴人id获取记录 */ public List getSocialByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(po); - if (socialList.size() > 0) { - allList.add(socialList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List socialList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(po); + if (socialList.size() > 0) { + allList.add(socialList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } public List getFundByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(po); - if (fundList.size() > 0) { - allList.add(fundList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List fundList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(po); + if (fundList.size() > 0) { + allList.add(fundList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } public List getOtherByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(po); - if (otherList.size() > 0) { - allList.add(otherList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List otherList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(po); + if (otherList.size() > 0) { + allList.add(otherList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } @Override @@ -2238,20 +2201,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * */ public List getBaseHistoryByEmployeeIdAndOperator(Long operator, Long employeeId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); - List empList = mapper.listByEmployeeIdAndOperator(operator, employeeId); - List extEmpList = mapper.listByExtEmpIdAndOperator(operator, employeeId); - if (extEmpList != null) { - empList.addAll(extEmpList); - empList = empList.stream().filter(f -> org.apache.commons.lang.StringUtils.isNotBlank(f.getEmployeeName())) - .sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList()); - } - return empList; - } finally { - sqlSession.close(); + + List empList = getInsuranceBaseAdjustHistoryMapper().listByEmployeeIdAndOperator(operator, employeeId); + List extEmpList = getInsuranceBaseAdjustHistoryMapper().listByExtEmpIdAndOperator(operator, employeeId); + if (extEmpList != null) { + empList.addAll(extEmpList); + empList = empList.stream().filter(f -> org.apache.commons.lang.StringUtils.isNotBlank(f.getEmployeeName())) + .sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList()); } + return empList; } //生成基数调整记录(基数单元未变化则忽略) @@ -2394,15 +2352,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (org.apache.commons.collections.CollectionUtils.isEmpty(adjustHistoryList)) { return; } - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); - List> partition = Lists.partition(adjustHistoryList, 100); - partition.forEach(mapper::batchSave); - sqlSession.commit(); - } finally { - sqlSession.close(); - } + List> partition = Lists.partition(adjustHistoryList, 100); + partition.forEach(getInsuranceBaseAdjustHistoryMapper()::batchSave); } public Map getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long paymentOrganization, Collection taxAgentPOS) { @@ -2412,7 +2363,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService SalaryAssert.notEmpty(employeeByIds, SalaryI18nUtil.getI18nLabel(0, "员工信息不存在")); DataCollectionEmployee item = employeeByIds.get(0); - if (welfareType == null) { //基础信息表单 InsuranceArchivesBaseDTO insuranceArchivesBaseDTO = InsuranceArchivesBaseDTO.builder().department(item.getDepartmentName()) @@ -2436,8 +2386,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List paymentOptions = paymentOrganizationOptions(taxAgentPOS); List underTakeOptions = Arrays.stream(UndertakerEnum.values()) .map(e -> new SearchConditionOption(e.getValue().toString(), e.getDefaultLabel())).collect(Collectors.toList()); - - //返回数据 switch (welfareType) { case SOCIAL_SECURITY: @@ -2550,25 +2498,19 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public InsuranceArchivesOtherSchemeDTO buildOtherForm(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); - InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null; - InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId); - if (insuranceArchivesOtherSchemePO == null) { - data.setEmployeeId(employeeId); - data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); - } - return data; - } finally { - sqlSession.close(); - } + List otherList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); + InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null; + InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId); + if (insuranceArchivesOtherSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); + } + return data; } /** @@ -2579,25 +2521,18 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService */ public InsuranceArchivesFundSchemeDTO buildFundForm(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); - InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null; - InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId); - if (insuranceArchivesFundSchemePO == null) { - data.setEmployeeId(employeeId); - data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); - } - return data; - } finally { - sqlSession.close(); + List fundList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); + InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null; + InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId); + if (insuranceArchivesFundSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); } - + return data; } /** @@ -2623,18 +2558,13 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public InsuranceArchivesSocialSchemePO getSocialByEmployeeId(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); - return socialList.size() != 0 ? socialList.get(0) : null; - } finally { - sqlSession.close(); - } + + List socialList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); + return socialList.size() != 0 ? socialList.get(0) : null; } /** @@ -2887,15 +2817,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public List queryListByPrimaryIdIsPayment(Long schemeId, Integer welfareType) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType); - encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOS; - } finally { - sqlSession.close(); - } + + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; } public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { @@ -3461,7 +3386,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } for (Map.Entry entry : paymentBaseJson.entrySet()) { - //判断福利值是否为空/数字 if (entry.getValue() == null || entry.getValue().length() == 0) { continue; @@ -3601,89 +3525,83 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //是否分权 Boolean needAuth = param.getNeedAuth(); StopWatch sw = new StopWatch(); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); Map datas = new HashMap<>(16); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List page = new ArrayList<>(); - PageInfo pageInfo = new PageInfo<>(InsuranceArchivesEmployeePO.class); - //获取福利档案列表数据 - if (needAuth) { - Collection taxAgentEmployeeIds = param.getTaxAgentEmployeeIds(); - Collection taxAgentIds = param.getTaxAgentIds(); - log.info("从数据库获取档案列表数据开始"); - sw.start("获取福利档案列表数据"); - if (param.isExtWelArchiveList()) { - page = socialSchemeMapper.queryExtEmployeeList(param); - } else { - page = socialSchemeMapper.queryEmployeeList(param); - } - sw.stop(); - log.info("从数据库获取档案列表数据完成!"); - page = page.stream().filter(f -> + + List page = new ArrayList<>(); + PageInfo pageInfo = new PageInfo<>(InsuranceArchivesEmployeePO.class); + //获取福利档案列表数据 + if (needAuth) { + Collection taxAgentEmployeeIds = param.getTaxAgentEmployeeIds(); + Collection taxAgentIds = param.getTaxAgentIds(); + log.info("从数据库获取档案列表数据开始"); + sw.start("获取福利档案列表数据"); + if (param.isExtWelArchiveList()) { + page = getSocialSchemeMapper().queryExtEmployeeList(param); + } else { + page = getSocialSchemeMapper().queryEmployeeList(param); + } + sw.stop(); + log.info("从数据库获取档案列表数据完成!"); + page = page.stream().filter(f -> // taxAgentEmployeeIds.contains(f.getEmployeeId())|| - taxAgentIds.contains(f.getPaymentOrganization()) - ).collect(Collectors.toList()); - // 填充总数和当页数据 - // 分页参数 - pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), InsuranceArchivesEmployeePO.class); - pageInfo.setTotal(page.size()); - pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page)); + taxAgentIds.contains(f.getPaymentOrganization()) + ).collect(Collectors.toList()); + // 填充总数和当页数据 + // 分页参数 + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), InsuranceArchivesEmployeePO.class); + pageInfo.setTotal(page.size()); + pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page)); + } else { + log.info("从数据库获取档案列表数据开始"); + sw.start("获取档案列表数据"); + if (param.isExtWelArchiveList()) { + page = getSocialSchemeMapper().queryExtEmployeeList(param); } else { - log.info("从数据库获取档案列表数据开始"); - sw.start("获取档案列表数据"); - if (param.isExtWelArchiveList()) { - page = socialSchemeMapper.queryExtEmployeeList(param); - } else { - page = socialSchemeMapper.queryEmployeeList(param); - } - sw.stop(); - log.info("从数据库获取档案列表数据完成!"); - pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), - page, InsuranceArchivesEmployeePO.class); - } - List> records = null; - log.info("buildTableData方法处理福利档案列表数据开始"); - sw.start("buildTableData方法处理福利档案列表数据"); - if (param.getExportData() != null && param.getExportData()) { - records = buildTableData(pageInfo.getList(), true); - } else { - records = buildTableData(pageInfo.getList(), false); + page = getSocialSchemeMapper().queryEmployeeList(param); } sw.stop(); - log.info("buildTableData方法处理福利档案列表数据完成!"); - - log.info("buildWeaTableColumns方法处理福利档案列表数据开始"); - sw.start("buildWeaTableColumns方法处理福利档案列表数据"); - List columns = buildWeaTableColumns(pageInfo.getList()); - sw.stop(); - log.info("buildWeaTableColumns方法处理福利档案列表数据完成!"); - WeaTable table = new WeaTable(); - table.setColumns(columns); - //设置check是否可用 - List checkboxpopedomList = new ArrayList<>(); - WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); - checkboxpopedom.setPopedompara("column:system_type"); - checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom"); - checkboxpopedomList.add(checkboxpopedom); - table.setCheckboxList(checkboxpopedomList); - table.setCheckboxpopedom(null); - - WeaResultMsg result = new WeaResultMsg(false); - result.putAll(table.makeDataResult()); - result.success(); - - datas.put("pageInfo", pageInfo); - datas.put("datas", records); - datas.put("columns", columns); - datas.put("dataKey", result.getResultMap()); - - log.info("各操作计时 {}", sw.prettyPrint()); - return datas; - - } finally { - sqlSession.close(); + log.info("从数据库获取档案列表数据完成!"); + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), + page, InsuranceArchivesEmployeePO.class); } + List> records = null; + log.info("buildTableData方法处理福利档案列表数据开始"); + sw.start("buildTableData方法处理福利档案列表数据"); + if (param.getExportData() != null && param.getExportData()) { + records = buildTableData(pageInfo.getList(), true); + } else { + records = buildTableData(pageInfo.getList(), false); + } + sw.stop(); + log.info("buildTableData方法处理福利档案列表数据完成!"); + + log.info("buildWeaTableColumns方法处理福利档案列表数据开始"); + sw.start("buildWeaTableColumns方法处理福利档案列表数据"); + List columns = buildWeaTableColumns(pageInfo.getList()); + sw.stop(); + log.info("buildWeaTableColumns方法处理福利档案列表数据完成!"); + WeaTable table = new WeaTable(); + table.setColumns(columns); + //设置check是否可用 + List checkboxpopedomList = new ArrayList<>(); + WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); + checkboxpopedom.setPopedompara("column:system_type"); + checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom"); + checkboxpopedomList.add(checkboxpopedom); + table.setCheckboxList(checkboxpopedomList); + table.setCheckboxpopedom(null); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + + datas.put("pageInfo", pageInfo); + datas.put("datas", records); + datas.put("columns", columns); + datas.put("dataKey", result.getResultMap()); + + log.info("各操作计时 {}", sw.prettyPrint()); + return datas; } /** @@ -3712,15 +3630,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List> taxAgentList = getTaxAgentWrapper(user).selectListAsAdmin(); List taxAgentOption = taxAgentList.stream().map(item -> new SearchConditionOption(item.get("id").toString(), item.get("content").toString())).collect(Collectors.toList()); - Map apidatas = new HashMap(); ConditionFactory conditionFactory = new ConditionFactory(user); - //条件组 List addGroups = new ArrayList(); - List conditionItems = new ArrayList(); - //文本输入框 SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username"); username.setInputType("input"); @@ -3730,7 +3644,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2 username.setLabel(SalaryI18nUtil.getI18nLabel(0,"姓名")); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(username); - //文本输入框 SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT, 25034, "jobNum"); jobNum.setInputType("input"); @@ -3741,7 +3654,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService jobNum.setLabel(SalaryI18nUtil.getI18nLabel(0,"工号")); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(jobNum); - SearchConditionItem departmentIds = conditionFactory.createCondition(ConditionType.BROWSER, 502329, "departmentIdsStr", "57"); departmentIds.setColSpan(2); departmentIds.setFieldcol(16); @@ -3749,7 +3661,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService departmentIds.setLabel(SalaryI18nUtil.getI18nLabel(0,"部门")); conditionItems.add(departmentIds); - SearchConditionItem statuses = conditionFactory.createCondition(ConditionType.SELECT, 502327, "statusesStr"); statuses.setInputType("select"); statuses.setMultiple(true); @@ -3761,7 +3672,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService statuses.setLabel(SalaryI18nUtil.getI18nLabel(0,"状态")); conditionItems.add(statuses); - SearchConditionItem positions = conditionFactory.createCondition(ConditionType.BROWSER, 502327, "positionsStr", "278"); positions.setInputType("browser"); positions.setColSpan(2); @@ -3810,7 +3720,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService siSchemeId.setLabel(SalaryI18nUtil.getI18nLabel(0,"社保方案")); conditionItems.add(siSchemeId); - SearchConditionItem fundSchemeId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "fundSchemeId"); fundSchemeId.setInputType("select"); fundSchemeId.setOptions(fundOption); @@ -3848,53 +3757,38 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public List getSocialByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List socialList = socialSchemeMapper.getSocialByEmployeeId(longs); - allList.addAll(socialList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List socialList = getSocialSchemeMapper().getSocialByEmployeeId(longs); + allList.addAll(socialList); } + return allList; } @Override public List getFundByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List fundList = fundSchemeMapper.getFundByEmployeeId(longs); - allList.addAll(fundList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List fundList = getFundSchemeMapper().getFundByEmployeeId(longs); + allList.addAll(fundList); } + return allList; } @Override public List getOtherByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List otherList = otherSchemeMapper.getOtherByEmployeeId(longs); - allList.addAll(otherList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List otherList = getOtherSchemeMapper().getOtherByEmployeeId(longs); + allList.addAll(otherList); } + return allList; } /** diff --git a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java index 453ff9729..7e127f570 100644 --- a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java @@ -38,8 +38,6 @@ import com.mzlion.core.utils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.session.SqlSession; -import weaver.conn.mybatis.MyBatisFactory; import weaver.hrm.User; import java.util.*; @@ -377,15 +375,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService */ @Override public ICategoryPO getICategoryPOByID(Long id) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - ICategoryPO iCategoryPO = iCategoryMapper.getById(id); - return iCategoryPO; - } finally { - sqlSession.close(); - } + ICategoryPO iCategoryPO = getICategoryMapper().getById(id); + return iCategoryPO; + } /** @@ -395,16 +388,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService */ @Override public List listByName(String insuranceName) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try{ - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - List iCategoryPOS = iCategoryMapper.listByName(insuranceName); - return iCategoryPOS; + List iCategoryPOS = getICategoryMapper().listByName(insuranceName); + return iCategoryPOS; - } finally { - sqlSession.close(); - } } /** @@ -437,30 +424,24 @@ public class SICategoryServiceImpl extends Service implements SICategoryService * @param iCategoryFormDTO */ public void update(ICategoryFormDTO iCategoryFormDTO) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try{ - if (iCategoryFormDTO.getId() == null) { - throw new SalaryRunTimeException("id is required"); - } - ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId()); - if (Objects.isNull(iCategoryPO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); - } - List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); - if (CollectionUtils.isNotEmpty(iCategoryPOS)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); - } - iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName()); + if (iCategoryFormDTO.getId() == null) { + throw new SalaryRunTimeException("id is required"); + } + ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId()); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); + } + List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); + if (CollectionUtils.isNotEmpty(iCategoryPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); + } + iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName()); // iCategoryPO.setWelfareType(iCategoryFormDTO.getWelfareType().getValue()); // iCategoryPO.setPaymentScope(SalaryEnumUtil.enumArrToString(iCategoryFormDTO.getPaymentScope())); - iCategoryPO.setUpdateTime(new Date()); - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - iCategoryMapper.update(iCategoryPO); + iCategoryPO.setUpdateTime(new Date()); + + getICategoryMapper().update(iCategoryPO); - sqlSession.commit(); - } finally { - sqlSession.close(); - } } /** diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index ac0391195..491850815 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -279,15 +279,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { @Override public List queryListByInsuranceIdIsPayment(Long insuranceId, Integer isPayment) { // return new SISchemeBiz().queryListByInsuranceIdIsPayment(insuranceId, isPayment); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId, isPayment); - encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOList; - } finally { - sqlSession.close(); - } + + List insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().queryListByInsuranceIdIsPayment(insuranceId, isPayment); + encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOList; } @Override @@ -2387,15 +2382,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { */ public InsuranceSchemePO getById(Long id) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - InsuranceSchemePO insuranceSchemePO = insuranceSchemeMapper.getById(id); - - return insuranceSchemePO; - } finally { - sqlSession.close(); - } + InsuranceSchemePO insuranceSchemePO = getInsuranceSchemeMapper().getById(id); + return insuranceSchemePO; } /** @@ -2405,14 +2393,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @return */ public List listByWelfareType(Integer welfareType) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - List insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType, null); - return insuranceCategoryPOS; - } finally { - sqlSession.close(); - } + + List insuranceCategoryPOS = getICategoryMapper().listByWelfareType(welfareType, null); + return insuranceCategoryPOS; } public boolean numberCheck(String number) { @@ -2420,15 +2403,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } private InsuranceSchemeDetailPO getByPPI(Long primaryId, Integer paymentScope, Long insuranceId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailMapper.getByPPI(primaryId, paymentScope, insuranceId); - encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPO; - } finally { - sqlSession.close(); - } + + InsuranceSchemeDetailPO insuranceSchemeDetailPO = getInsuranceSchemeDetailMapper().getByPPI(primaryId, paymentScope, insuranceId); + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPO; + } /** @@ -2715,16 +2694,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @return */ public List listByPrimaryId(Long primaryId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListBySchemeId(primaryId); - encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOS; - } finally { - sqlSession.close(); - } + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(primaryId); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; } /** @@ -2734,14 +2707,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { */ @Override public List listAll(){ - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - List insuranceSchemePOList = insuranceSchemeMapper.listAll(); - return insuranceSchemePOList; - } finally { - sqlSession.close(); - } + + List insuranceSchemePOList = getInsuranceSchemeMapper().listAll(); + return insuranceSchemePOList; } /*****以上代码为SISchemeBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ From 400d22cc9309713ebd66cdfd0b9a9497e1bc4217 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 20 Feb 2024 10:06:17 +0800 Subject: [PATCH 104/169] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E6=9F=A5=E7=9C=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/AttendQuoteDataValueBiz.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java index a9a7c96cc..5082f23d0 100644 --- a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java +++ b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java @@ -37,11 +37,15 @@ public class AttendQuoteDataValueBiz { AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class); List employeeIds = param.getEmployeeIds(); - List> partition = Lists.partition(employeeIds, 100); - partition.forEach(empIds -> { - param.setEmployeeIds(empIds); + if (CollectionUtils.isNotEmpty(employeeIds)) { + List> partition = Lists.partition(employeeIds, 100); + partition.forEach(empIds -> { + param.setEmployeeIds(empIds); + list.addAll(mapper.listSome(param)); + }); + } else { list.addAll(mapper.listSome(param)); - }); + } } finally { sqlSession.close(); } From 088a5c1d728fa590a3c3cd7da0b6ac914e937f79 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 20 Feb 2024 16:50:45 +0800 Subject: [PATCH 105/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=BC=B4=E7=BA=B3=E9=A1=B5=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siaccount/po/InsuranceAccountBatchPO.java | 19 +++ .../po/InsuranceAccountDetailPO.java | 49 +++++++ .../siaccount/po/InsuranceCompensationPO.java | 18 +++ .../InsuranceAccountBatchMapper.java | 3 + .../siaccount/InsuranceAccountBatchMapper.xml | 9 ++ .../service/impl/SIAccountServiceImpl.java | 138 +++++++++++++----- .../impl/SICompensationServiceImpl.java | 42 ++++++ 7 files changed, 243 insertions(+), 35 deletions(-) diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java index b3296596e..45de6f2ab 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.siaccount.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -20,94 +21,112 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_bill_batch +@ElogTransform(name = "福利台账主表") public class InsuranceAccountBatchPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; /** * 账单状态 0-未归档 1-已归档 */ + @ElogTransform(name = "账单状态") private Integer billStatus; /** * 社保核算人数 */ + @ElogTransform(name = "社保核算人数") private Integer socialNum; /** * 公积金核算人数 */ + @ElogTransform(name = "公积金核算人数") private Integer fundNum; /** * 其他福利核算人数 */ + @ElogTransform(name = "其他福利核算人数") private Integer otherNum; /** * 社保缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "社保缴费总额(单位+个人)") private String socialPay; /** * 公积金缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "公积金缴费总额(单位+个人)") private String fundPay; /** * 其他福利缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "其他福利缴费总额(单位+个人)") private String otherPay; /** * 核算人 */ + @ElogTransform(name = "核算人") private String accountant; /** * 备注 */ + @ElogTransform(name = "备注") private String remarks; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人id") private Long paymentOrganization; diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java index 9cd2ad7f0..9b7c33cef 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java @@ -3,6 +3,7 @@ package com.engine.salary.entity.siaccount.po; import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.Encrypt; import com.engine.salary.annotation.SalaryTable; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,260 +24,308 @@ import java.util.Date; @AllArgsConstructor @SalaryTable(pageId = "2394fba1-1381-428a-8532-4e1e6b86626e", tableType = WeaTableType.CHECKBOX) //hrsa_bill_detail +@ElogTransform(name = "福利台账明细表") public class InsuranceAccountDetailPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; /** * 账单状态 0-未归档 1-已归档 */ + @ElogTransform(name = "账单状态") private Integer billStatus; /** * 缴纳状态 */ + @ElogTransform(name = "缴纳状态") private Integer paymentStatus; /** * 补缴月份/退差月份 */ + @ElogTransform(name = "补缴月份/退差月份") private String supplementaryMonth; /** * 补缴项目 */ + @ElogTransform(name = "补缴项目") private String supplementaryProjects; /** * 数据来源 0-系统核算 1-临时数据 */ + @ElogTransform(name = "数据来源") private Integer resourceFrom; /** * 社保缴纳组织 */ + @ElogTransform(name = "社保缴纳组织") private Long socialPayOrg; /** * 社保账号 */ + @ElogTransform(name = "社保账号") private String socialAccount; /** * 公积金缴纳组织 */ + @ElogTransform(name = "公积金缴纳组织") private Long fundPayOrg; /** * 公积金账号 */ + @ElogTransform(name = "公积金账号") private String fundAccount; /** * 补充公积金账号 */ + @ElogTransform(name = "补充公积金账号") private String supplementFundAccount; /** * 其他福利缴纳组织 */ + @ElogTransform(name = "其他福利缴纳组织") private Long otherPayOrg; /** * 社保方案ID */ + @ElogTransform(name = "社保方案ID") private Long socialSchemeId; /** * 社保缴纳基数 */ @Encrypt + @ElogTransform(name = "社保缴纳基数") private String socialPaymentBaseString; /** * 社保缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "社保缴纳基数——单位") private String socialPaymentComBaseString; /** * 公积金方案ID */ + @ElogTransform(name = "公积金方案ID") private Long fundSchemeId; /** * 公积金缴纳基数 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数") private String fundPaymentBaseString; /** * 公积金缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数——单位") private String fundPaymentComBaseString; /** * 其他福利方案id */ + @ElogTransform(name = "其他福利方案id") private Long otherSchemeId; /** * 其他福利缴纳基数 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数") private String otherPaymentBaseString; /** * 其他福利缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数——单位") private String otherPaymentComBaseString; /** * 社保个人缴费明细 */ @Encrypt + @ElogTransform(name = "社保个人缴费明细") private String socialPerJson; /** * 社保个人合计 */ @Encrypt + @ElogTransform(name = "社保个人合计") private String socialPerSum; /** * 公积金个人缴费明细 */ @Encrypt + @ElogTransform(name = "公积金个人缴费明细") private String fundPerJson; /** * 公积金个人合计 */ @Encrypt + @ElogTransform(name = "公积金个人合计") private String fundPerSum; /** * 其他福利个人缴费明细 */ @Encrypt + @ElogTransform(name = "其他福利个人缴费明细") private String otherPerJson; /** * 其他福利个人合计 */ @Encrypt + @ElogTransform(name = "其他福利个人合计") private String otherPerSum; /** * 个人合计 */ @Encrypt + @ElogTransform(name = "个人合计") private String perSum; /** * 社保单位缴费明细 */ @Encrypt + @ElogTransform(name = "社保单位缴费明细") private String socialComJson; /** * 社保单位合计 */ @Encrypt + @ElogTransform(name = "社保单位合计") private String socialComSum; /** * 公积金单位缴费明细 */ + @ElogTransform(name = "公积金单位缴费明细") private String fundComJson; /** * 公积金单位合计 */ + @ElogTransform(name = "公积金单位合计") private String fundComSum; /** * 其他福利单位缴费明细 */ + @ElogTransform(name = "其他福利单位缴费明细") private String otherComJson; /** * 其他福利单位合计 */ + @ElogTransform(name = "其他福利单位合计") private String otherComSum; /** * 单位合计 */ @Encrypt + @ElogTransform(name = "单位合计") private String comSum; /** * 社保合计 */ @Encrypt + @ElogTransform(name = "社保合计") private String socialSum; /** * 公积金合计 */ @Encrypt + @ElogTransform(name = "公积金合计") private String fundSum; /** * 其他福利合计 */ @Encrypt + @ElogTransform(name = "其他福利合计") private String otherSum; /** * 合计 */ @Encrypt + @ElogTransform(name = "合计") private String total; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人") private Long paymentOrganization; } diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java index 24ebde645..ff9ece22b 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.siaccount.po; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -18,86 +19,103 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_compensation_log +@ElogTransform(name = "福利台账-调差历史表") public class InsuranceCompensationPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 缴纳组织 */ + @ElogTransform(name = "缴纳组织") private Long paymentAgency; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人id") private Long paymentOrganization; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 统计调差福利 */ + @ElogTransform(name = "统计调差福利") private Integer welfareType; /** * 统计调差福利类型 */ + @ElogTransform(name = "统计调差福利类型") private String categoryType; /** * 国家核算金额 */ + @ElogTransform(name = "国家核算金额") private String countryTotal; /** * 公司核算金额 */ + @ElogTransform(name = "公司核算金额") private String companyTotal; /** * 应调差额 */ + @ElogTransform(name = "应调差额") private String adjustmentTotal; /** * 调差到 */ + @ElogTransform(name = "调差到") private Long adjustTo; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; //---------条件------- diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java index 60cd71788..7a183297d 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java @@ -50,6 +50,9 @@ public interface InsuranceAccountBatchMapper { */ void updateById(InsuranceAccountBatchPO pos); + InsuranceAccountBatchPO getById(@Param("id") Long id); + + /** * * @param billMonth diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml index 61223c9b0..4b45cb2f3 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml @@ -244,6 +244,15 @@ + + + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/salarybill/SalarySendMapper.xml b/src/com/engine/salary/mapper/salarybill/SalarySendMapper.xml index c78a00525..e3d729fd4 100644 --- a/src/com/engine/salary/mapper/salarybill/SalarySendMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalarySendMapper.xml @@ -97,7 +97,8 @@ send_total, last_send_time, send_status, - salary_acct_type + salary_acct_type, + creator FROM hrsa_salary_send WHERE delete_type = 0 AND id = #{id} diff --git a/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java b/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java index bcf430d57..d0305777b 100644 --- a/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java +++ b/src/com/engine/salary/report/entity/po/SalaryStatisticsItemPO.java @@ -1,5 +1,6 @@ package com.engine.salary.report.entity.po; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.report.enums.UnitTypeEnum; import lombok.*; @@ -14,20 +15,25 @@ import java.util.Date; @ToString //hrsa_salary_statistics_item") //薪酬报表统计子表自定义统计项") +@ElogTransform(name = "统计项目") public class SalaryStatisticsItemPO implements Serializable { private static final long serialVersionUID = 5335849418826222822L; //主键id") + @ElogTransform(name = "主键id") private Long id; //统计报表id") + @ElogTransform(name = "报表id") private Long statReportId; //统计项名称") + @ElogTransform(name = "统计项名称") private String itemName; //统计项集合") + @ElogTransform(name = "统计项集合") private String itemValue; /** @@ -44,6 +50,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //计数规则") + @ElogTransform(name = "计数规则") private String countRule; /** @@ -60,6 +67,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //求和规则") + @ElogTransform(name = "求和规则") private String sumRule; /** @@ -76,6 +84,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //平均值规则") + @ElogTransform(name = "平均值规则") private String avgRule; /** @@ -92,6 +101,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //最大值规则") + @ElogTransform(name = "最大值规则") private String maxRule; /** @@ -108,6 +118,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //最小值规则") + @ElogTransform(name = "最小值规则") private String minRule; /** @@ -124,6 +135,7 @@ public class SalaryStatisticsItemPO implements Serializable { * jsonToString */ //中位数规则") + @ElogTransform(name = "中位数规则") private String medianRule; @@ -132,6 +144,7 @@ public class SalaryStatisticsItemPO implements Serializable { *

* "totalValue":"1", 是否使用 */ + @ElogTransform(name = "最近值是否使用") private String lastRule; /** @@ -141,6 +154,7 @@ public class SalaryStatisticsItemPO implements Serializable { * "totalValue":"1", 是否使用 * } */ + @ElogTransform(name = "最早值是否使用") private String oldRule; /** @@ -150,6 +164,7 @@ public class SalaryStatisticsItemPO implements Serializable { * "totalValue":"1", 是否使用 * } */ + @ElogTransform(name = "出现最多是否使用") private String frequentRule; /** @@ -159,9 +174,11 @@ public class SalaryStatisticsItemPO implements Serializable { * "totalValue":"1", 是否使用 * } */ + @ElogTransform(name = "平铺是否使用") private String tileRule; //顺序") + @ElogTransform(name = "顺序") private Integer indexValue; /** @@ -170,6 +187,7 @@ public class SalaryStatisticsItemPO implements Serializable { * @see UnitTypeEnum */ //统计单位") + @ElogTransform(name = "统计单位") private Integer unitType; //创建时间") diff --git a/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java b/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java index cdf364f62..da04ef937 100644 --- a/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java +++ b/src/com/engine/salary/report/entity/po/SalaryStatisticsReportPO.java @@ -1,5 +1,6 @@ package com.engine.salary.report.entity.po; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -22,77 +23,105 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_salary_stats_report +@ElogTransform(name = "薪酬统计报表") public class SalaryStatisticsReportPO implements Serializable { private static final long serialVersionUID = 6526480959578343197L; //主键id + @ElogTransform(name = "主键id") private Long id; //报表名称 + @ElogTransform(name = "报表名称") private String reportName; + @ElogTransform(name = "备注") private String remark; + @ElogTransform(name = "二级维度") private String secondDimension; + + @ElogTransform(name = "排序列") private String sortIndex; + + @ElogTransform(name = "排序方式") private String sortType; //时间类型 + @ElogTransform(name = "时间类型") private Integer timeType; //统计维度 + @ElogTransform(name = "统计维度") private String dimension; //薪资所属月-起始 + @ElogTransform(name = "薪资所属月-起始") private Date salaryStartMonth; //薪资所属月-截止 + @ElogTransform(name = "薪资所属月-截止") private Date salaryEndMonth; //个税扣缴义务人配置 + @ElogTransform(name = "个税扣缴义务人配置") private String taxAgentSetting; //收入所得项目配置 + @ElogTransform(name = "收入所得项目配置") private String incomeCategorySetting; //分部配置 + @ElogTransform(name = "分部配置") private String subCompanySetting; //部门配置 + @ElogTransform(name = "部门配置") private String departSetting; //职级配置 + @ElogTransform(name = "职级配置") private String gradeSetting; //岗位配置 + @ElogTransform(name = "岗位配置") private String positionSetting; //人员状态配置 + @ElogTransform(name = "人员状态配置") private String statusSetting; //人员配置 + @ElogTransform(name = "人员配置") private String employeeSetting; //入职日期配置 + @ElogTransform(name = "入职日期配置") private String hiredateSetting; //离职日期配置 + @ElogTransform(name = "离职日期配置") private String leavedateSetting; //租户key + @ElogTransform(name = "租户key", ignore = true) private String tenantKey; //创建人id + @ElogTransform(name = "创建人id", ignore = true) private Long creator; //是否删除 + @ElogTransform(name = "是否删除", ignore = true) private Integer deleteType; //创建时间 + @ElogTransform(name = "创建时间", ignore = true) private Date createTime; //更新时间 + @ElogTransform(name = "更新时间", ignore = true) private Date updateTime; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java index 41b3fb90b..176192125 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsItemServiceImpl.java @@ -1,7 +1,10 @@ package com.engine.salary.report.service.impl; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.report.SalaryStatisticsItemMapper; @@ -12,10 +15,11 @@ import com.engine.salary.report.service.SalaryStatisticsItemService; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; -import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.db.IdGenerator; +import com.engine.salary.util.db.MapperProxyFactory; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; import java.util.*; import java.util.stream.Collectors; @@ -66,15 +70,17 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt List list = this.listByIds(ids); if (CollectionUtils.isNotEmpty(list)) { getSalaryStatisticsItemMapper().deleteByIds(ids); -// list.forEach(po -> { -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(po.getId())); -// loggerContext.setTargetName(po.getItemName()); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152639, "删除统计项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152639, "删除统计项目")); -// salaryStatReportLoggerTemplate.write(loggerContext); -// }); + list.forEach(po -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(po.getId())); + loggerContext.setTargetName(po.getItemName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除统计项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除统计项目")); + loggerContext.setOldValues(po); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); + }); } return StringUtils.EMPTY; } @@ -130,19 +136,24 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt getSalaryStatisticsItemMapper().insertIgnoreNull(subTableItemPO); // 记录操作日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(subTableItemPO.getId())); -// loggerContext.setTargetName(subTableItemPO.getItemName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152643, "新增统计项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152643, "新增统计项目")); -// salaryStatReportLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(subTableItemPO.getId())); + loggerContext.setTargetName(subTableItemPO.getItemName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增统计项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增统计项目")); + loggerContext.setNewValues(subTableItemPO); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); // 更新 } else { SalaryStatisticsItemPO itemPO = this.getById(saveParam.getId()); SalaryAssert.notNull(itemPO, SalaryI18nUtil.getI18nLabel(152591, "统计项目不存在")); Optional.ofNullable(saveParam.getItemName()).ifPresent(itemPO::setItemName); + SalaryStatisticsItemPO oldPO = new SalaryStatisticsItemPO(); + BeanUtils.copyProperties(itemPO, oldPO); + if (Objects.nonNull(saveParam.getUnitType())) { itemPO.setUnitType(saveParam.getUnitType()); } else { @@ -162,13 +173,16 @@ public class SalaryStatisticsItemServiceImpl extends Service implements SalarySt getSalaryStatisticsItemMapper().updateIgnoreNull(itemPO); // 记录操作日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(itemPO.getId())); -// loggerContext.setTargetName(itemPO.getItemName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(152669, "更新统计项目")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(152669, "更新统计项目")); -// salaryStatReportLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(itemPO.getId().toString()); + loggerContext.setTargetName(itemPO.getItemName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增统计项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增统计项目")); + loggerContext.setOldValues(oldPO); + loggerContext.setNewValues(itemPO); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); } return StringUtils.EMPTY; } diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 368918f4c..60acca9fc 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.cache.SalaryCacheKey; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.hrm.dto.EmployeeInfoExpandDTO; import com.engine.salary.entity.hrm.dto.FieldSetting; @@ -13,6 +15,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.report.SalaryStatisticsReportMapper; import com.engine.salary.report.common.constant.SalaryConstant; @@ -31,13 +34,13 @@ import com.engine.salary.report.util.ReportTimeUtil; import com.engine.salary.service.*; import com.engine.salary.service.impl.*; import com.engine.salary.util.*; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -194,13 +197,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary this.getSalaryStatisticsReportMapper().updateIgnoreNull(poNew); // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(poNew.getId())); -// loggerContext.setTargetName(poNew.getReportName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 152565, "更新报表")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 152565, "更新报表")); -// salaryStatReportLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(poNew.getId())); + loggerContext.setTargetName(poNew.getReportName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "更新报表")); + loggerContext.setOldValues(po); + loggerContext.setNewValues(poNew); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); } else { List list = listByName(saveParam.getReportName()); if (CollectionUtils.isNotEmpty(list)) { @@ -211,13 +217,15 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary getSalaryStatisticsReportMapper().insertIgnoreNull(poNew); // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(poNew.getId())); -// loggerContext.setTargetName(poNew.getReportName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 152561, "新增报表")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 152561, "新增报表")); -// salaryStatReportLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(poNew.getId())); + loggerContext.setTargetName(poNew.getReportName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表")); + loggerContext.setNewValues(poNew); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); } return StringUtils.EMPTY; } @@ -233,6 +241,8 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary } SalaryStatisticsReportPO po = getById(param.getId()); + SalaryStatisticsReportPO oldPO = new SalaryStatisticsReportPO(); + BeanUtils.copyProperties(po, oldPO); SalaryAssert.notNull(po, SalaryI18nUtil.getI18nLabel(152563, "报表不存在")); po.setSalaryStartMonth(param.getSalaryStartMonth()); po.setSalaryEndMonth(param.getSalaryEndMonth()); @@ -286,13 +296,16 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary getSalaryStatisticsItemService(user).saveOrUpdateBatch(salaryStatisticsItemList); //记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(po.getId())); -// loggerContext.setTargetName(po.getReportName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(// 152565, "更新报表")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(// 152565, "更新报表")); -// salaryStatReportLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(po.getId())); + loggerContext.setTargetName(po.getReportName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "更新报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新报表")); + loggerContext.setOldValues(oldPO); + loggerContext.setNewValues(po); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); return StringUtils.EMPTY; } @@ -311,16 +324,17 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary getSalaryStatisticsReportMapper().deleteByIds(deleteIds); //删除薪资项 getSalaryStatisticsItemService(user).deleteByReportIds(deleteIds); -// list.forEach(e -> { -// // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(e.getId())); -// loggerContext.setTargetName(e.getReportName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 153162, "删除报表")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 153162, "删除报表")); -// salaryStatReportLoggerTemplate.write(loggerContext); -// }); + list.forEach(e -> { + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(e.getId())); + loggerContext.setTargetName(e.getReportName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "删除报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "删除报表") + e.getReportName()); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); + }); } Map resultMap = new HashMap<>(2); @@ -366,6 +380,17 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary return item; }).collect(Collectors.toList()); getSalaryStatisticsItemService(user).saveOrUpdateBatch(itemList); + + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(po.getId())); + loggerContext.setTargetName(po.getReportName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增报表")); + loggerContext.setNewValues(po); + SalaryElogConfig.salaryStatReportLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/AttendQuoteService.java b/src/com/engine/salary/service/AttendQuoteService.java index 7e06ec6e5..d871b026c 100644 --- a/src/com/engine/salary/service/AttendQuoteService.java +++ b/src/com/engine/salary/service/AttendQuoteService.java @@ -2,6 +2,7 @@ package com.engine.salary.service; import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO; import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam; +import com.engine.salary.entity.datacollection.po.AttendQuotePO; import com.engine.salary.util.page.PageInfo; import java.time.YearMonth; @@ -35,4 +36,6 @@ public interface AttendQuoteService { */ Boolean checkOperation(YearMonth salaryYearMonth, Long salarySobId); + AttendQuotePO getById(Long id); + } diff --git a/src/com/engine/salary/service/SalaryItemService.java b/src/com/engine/salary/service/SalaryItemService.java index c42079fa3..ba661cc27 100644 --- a/src/com/engine/salary/service/SalaryItemService.java +++ b/src/com/engine/salary/service/SalaryItemService.java @@ -99,7 +99,7 @@ public interface SalaryItemService { * * @param saveParam 保存参数 */ - void save(SalaryItemSaveParam saveParam); + SalaryItemPO save(SalaryItemSaveParam saveParam); /** * 批量保存 @@ -113,7 +113,7 @@ public interface SalaryItemService { * * @param saveParam 更新参数 */ - void update(SalaryItemSaveParam saveParam); + SalaryItemPO update(SalaryItemSaveParam saveParam); /** * 根据主键id删除薪资项目 diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 4c3eef869..30aad6422 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -392,7 +392,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction apidatas.put("successCount", successCount); apidatas.put("errorCount", errorCount); apidatas.put("errorData", errorData); - } finally { IOUtils.closeQuietly(fileInputStream); } @@ -439,19 +438,31 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction if (CollectionUtils.isNotEmpty(saveList)) { addUpDeductionBiz.batchSave(saveList); } - // 记录操作日志 - saveList.addAll(updateList); - if (CollectionUtils.isNotEmpty(saveList)) { + // 记录操作日志 + // 根据月份、人员id查出保存的数据 + List empIds = saveList.stream().map(AddUpDeduction::getEmployeeId).collect(Collectors.toList()); + List insertList = addUpDeductionBiz.listSome(AddUpDeduction.builder().declareMonth(po.getDeclareMonth()).employeeIds(empIds).build()); + Map insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId()); + saveList.forEach(save -> { + AddUpDeduction addUpDeduction = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId()); + if (addUpDeduction != null) { + updateList.add(addUpDeduction); + } + }); + + if (CollectionUtils.isNotEmpty(updateList)) { + String formatYearMonth = SalaryDateUtil.getFormatYearMonth(po.getDeclareMonth()); LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "累计专项附加扣除 ") + formatYearMonth); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); - loggerContext.setNewValueList(saveList); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入累计专项附加扣除 ") + formatYearMonth); + loggerContext.setNewValueList(updateList); SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } + } @Override @@ -484,9 +495,24 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } } ArrayList updateList = new ArrayList<>(); - AddUpDeduction build = AddUpDeduction.builder().id(addUpDeduction.getId()).addUpChildEducation(addUpDeduction.getAddUpChildEducation()).addUpContinuingEducation(addUpDeduction.getAddUpContinuingEducation()).addUpHousingLoanInterest(addUpDeduction.getAddUpHousingLoanInterest()).addUpHousingRent(addUpDeduction.getAddUpHousingRent()).addUpSupportElderly(addUpDeduction.getAddUpSupportElderly()).addUpIllnessMedical(addUpDeduction.getAddUpIllnessMedical()).addUpInfantCare(addUpDeduction.getAddUpInfantCare()).build(); + AddUpDeduction build = AddUpDeduction.builder().id(addUpDeduction.getId()).addUpChildEducation(addUpDeduction.getAddUpChildEducation()).addUpContinuingEducation(addUpDeduction.getAddUpContinuingEducation()).addUpHousingLoanInterest(addUpDeduction.getAddUpHousingLoanInterest()).addUpHousingRent(addUpDeduction.getAddUpHousingRent()).addUpSupportElderly(addUpDeduction.getAddUpSupportElderly()).addUpIllnessMedical(addUpDeduction.getAddUpIllnessMedical()).addUpInfantCare(addUpDeduction.getAddUpInfantCare()).createTime(new Date()).build(); updateList.add(build); addUpDeductionBiz.batchUpdate(updateList); + + // 记录日志 + AddUpDeduction newValue = addUpDeductionBiz.getById(build.getId()); + String name = SalaryI18nUtil.getI18nLabel(0, "编辑"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(addUpDeduction.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + addUpDeduction.getId()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "编辑")); + loggerContext.setOldValues(byId); + loggerContext.setNewValues(newValue); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } @Override @@ -589,6 +615,19 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction handleImportData(insertData); } + private void addLogger4Insert(Integer currentEmployeeId, AddUpDeduction addUpDeduction, String targetName) { + String name = SalaryI18nUtil.getI18nLabel(0, "新增") + SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(addUpDeduction.getId().toString()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(name); + loggerContext.setNewValues(addUpDeduction); + loggerContext.setOperator(currentEmployeeId.toString()); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + } + @Override public void deleteSelectAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) { long currentEmployeeId = user.getUID(); @@ -602,9 +641,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction List salaryAcctEmployees = getAccountedEmployeeDataByTaxYearMonth(declareMonthStr); // 判断是否有核算过 List deleteList = new ArrayList<>(); + ArrayList oldAddUpDeductions = new ArrayList<>(); for (int i = 0; i < deleteIds.size(); i++) { Long id = deleteIds.get(i); AddUpDeduction byId = addUpDeductionBiz.getById(id); + if (byId == null) { throw new SalaryRunTimeException("数据不存在或已被删除!"); } @@ -621,8 +662,25 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } } deleteList.add(byId.getId()); + oldAddUpDeductions.add(byId); } addUpDeductionBiz.batchDeleteByIDS(deleteList); + + //记录日志 + if (CollectionUtils.isNotEmpty(oldAddUpDeductions)) { + oldAddUpDeductions.stream().forEach( e -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(e.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + e.getId()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "删除")); + loggerContext.setOldValues(e); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + }); + } } @Override @@ -668,6 +726,20 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } List deleteIds = list.stream().map(AddUpDeductionDTO::getId).collect(Collectors.toList()); addUpDeductionBiz.batchDeleteByIDS(deleteIds); + + // 记录日志 + Collection finalTaxAgentIds = queryParam.getTaxAgentIds(); + List taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())) + .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); + String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ","); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(name); + loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "一键清空:") + name); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } @Override @@ -788,6 +860,31 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction .forEach(l -> getAddUpDeductionMapper().insertData((List) l)); Lists.partition(updateList, 100) .forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List) l)); + + // 记录日志 + // 根据月份、人员id查出保存的数据 + List empIds = insertList.stream().map(AddUpDeduction::getEmployeeId).collect(Collectors.toList()); + List insertLogList = getAddUpDeductionMapper().listSome(AddUpDeduction.builder().declareMonth(yearMonth).employeeIds(empIds).build()); + Map insertMap = SalaryEntityUtil.convert2Map(insertLogList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId()); + insertList.forEach(save -> { + AddUpDeduction addUpDeduction = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId()); + if (addUpDeduction != null) { + updateList.add(addUpDeduction); + } + }); + + if (CollectionUtils.isNotEmpty(updateList)) { + String yearMonthStr = SalaryDateUtil.getFormatYearMonth(yearMonth); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+yearMonthStr)); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键累计专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+ yearMonthStr +" 专项附加扣除")); + loggerContext.setNewValueList(updateList); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + } + if (!errorMessages.isEmpty()) { String userNames = getSalaryEmployeeService(user) .getEmployeeByIdsAll(errorMessages) @@ -980,6 +1077,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction //获取操作按钮资源 List> rowList = getExcelRowDetailList(isChief, queryParam); + //获取excel return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除明细"); } @@ -1149,6 +1247,16 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction //获取操作按钮资源 List> rowList = getExcelRowList(isChief, queryParam); + // 记录日志 + String name = SalaryI18nUtil.getI18nLabel(0, "导出"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除")); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + name); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + //获取excel return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除"); } diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index bbeb0506b..43871ca44 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -259,10 +259,20 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation @Override public XSSFWorkbook export(AddUpSituationQueryParam queryParam) { - //获取操作按钮资源 + // 获取操作按钮资源 List> rowList = getExcelRowList(queryParam); - //获取excel + // 记录日志 + String name = SalaryI18nUtil.getI18nLabel(0, "导出"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况")); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + name); + loggerContext.setUser(user); + SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); + + // 获取excel return ExcelUtil.genWorkbook(rowList, "累计情况"); } @@ -870,17 +880,27 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation if (CollectionUtils.isNotEmpty(saveList)) { batchSave(saveList); } -// 记录操作日志 - saveList.addAll(updateList); - if (CollectionUtils.isNotEmpty(saveList)) { + // 记录操作日志 + // 根据月份、人员id查出保存的数据 + List empIds = saveList.stream().map(AddUpSituation::getEmployeeId).collect(Collectors.toList()); + List insertList = biz.listSome(AddUpSituation.builder().taxYearMonth(po.getTaxYearMonth()).employeeIds(empIds).build()); + Map insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getTaxYearMonth()) + "-" + p.getEmployeeId()); + saveList.forEach(save -> { + AddUpSituation addUpSituation = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getTaxYearMonth()) + "-" + save.getEmployeeId()); + if (addUpSituation != null) { + updateList.add(addUpSituation); + } + }); + + if (CollectionUtils.isNotEmpty(updateList)) { LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增累计专项附加扣除")); - loggerContext.setNewValueList(saveList); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入往期累计情况")); + loggerContext.setNewValueList(updateList); SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); } } @@ -958,6 +978,21 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation .build(); updateList.add(build); biz.batchUpdate(updateList); + + // 记录日志 + AddUpSituation newValue = biz.getById(build.getId()); + String name = SalaryI18nUtil.getI18nLabel(0, "编辑"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(newValue.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + newValue.getId()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil + .getI18nLabel(0, "编辑")); + loggerContext.setOldValues(byId); + loggerContext.setNewValues(newValue); + loggerContext.setUser(user); + SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); } /** @@ -1112,6 +1147,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation String format = salaryMonthDate.atStartOfDay().format(DateTimeFormatter.ofPattern("yyyy-MM")); List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(format); // 判断是否有核算过 + List deletePOList = new ArrayList<>(); List deleteList = new ArrayList<>(); for (int i = 0; i < deleteIds.size(); i++) { Long id = deleteIds.get(i); @@ -1132,8 +1168,23 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } } deleteList.add(byId.getId()); + deletePOList.add(byId); } biz.batchDeleteByIDS(deleteList); + + // 记录日志 + deletePOList.stream().forEach(po -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(po.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + po.getId()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil + .getI18nLabel(0, "删除")); + loggerContext.setOldValues(po); + loggerContext.setUser(user); + SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); + }); } @Override @@ -1183,6 +1234,20 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation } List deleteIds = list.stream().map(AddUpSituation::getId).collect(Collectors.toList()); biz.batchDeleteByIDS(deleteIds); + + // 记录日志 + Collection finalTaxAgentIds = queryParam.getTaxAgentIds(); + List taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())) + .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); + String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ","); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(name); + loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "往期累计情况") + "-" + SalaryI18nUtil + .getI18nLabel(0, "一键清空:") + name); + loggerContext.setUser(user); + SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java index 8e9f4282a..6f968642e 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java @@ -8,9 +8,14 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.biz.*; +import com.engine.salary.biz.AttendQuoteBiz; +import com.engine.salary.biz.AttendQuoteDataBiz; +import com.engine.salary.biz.AttendQuoteDataValueBiz; +import com.engine.salary.biz.AttendQuoteFieldBiz; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.bo.AttendQuoteDataBO; import com.engine.salary.entity.datacollection.dto.*; @@ -24,6 +29,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.salarysob.po.SalarySobRangePO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -34,10 +40,7 @@ import com.engine.salary.mapper.sys.SalarySysConfMapper; import com.engine.salary.remote.attend.entity.Attend4Salary; import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService; import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl; -import com.engine.salary.service.AttendQuoteDataService; -import com.engine.salary.service.AttendQuoteFieldSettingService; -import com.engine.salary.service.SalaryEmployeeService; -import com.engine.salary.service.SalarySobService; +import com.engine.salary.service.*; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.entity.vo.OrderRuleVO; import com.engine.salary.sys.service.SalarySysConfService; @@ -45,6 +48,7 @@ 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.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; @@ -55,7 +59,6 @@ import com.engine.salary.util.valid.ValidUtil; import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -104,6 +107,10 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa return ServiceUtil.getService(SalarySobServiceImpl.class, user); } + private AttendQuoteService getAttendQuoteService(User user) { + return ServiceUtil.getService(AttendQuoteServiceImpl.class, user); + } + private AttendQuoteDataMapper getAttendQuoteDataMapper() { return MapperProxyFactory.getProxy(AttendQuoteDataMapper.class); } @@ -265,6 +272,20 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa } rows.add(row); } + + // 记录日志 + AttendQuotePO attendQuotePO = getAttendQuoteService(user).getById(queryParam.getAttendQuoteId()); + SalarySobPO salarySob = getSalarySobService(user).getById(attendQuotePO.getSalarySobId()); + + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(attendQuotePO.getId())); + loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuotePO.getSalaryYearMonth()) + " " + (salarySob != null ? salarySob.getName() : "")); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导出考勤数据")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "考勤数据")); + SalaryElogConfig.attendQuoteLoggerTemplate.write(loggerContext); + return ExcelUtil.genWorkbookV2(rows, sheetName); } @@ -370,15 +391,30 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa // 6.数据落库处理 handleDataToDB(attendQuote.getId(), pos, values); + // 记录日志 + recordLog(attendQuote); } else { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100368, "暂无考勤数据可以同步")); } - - // todo 记录日志 -// recordLog(attendQuote, currentEmployeeId, currentTenantKey, null); return null; } + private void recordLog(AttendQuotePO attendQuote) { + SalarySobPO salarySob = getSalarySobService(user).getById(attendQuote.getSalarySobId()); + String sourceType = AttendQuoteSourceTypeEnum.getDefaultLabelByValue(attendQuote.getSourceType()); + + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(attendQuote.getId())); + loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuote.getSalaryYearMonth()) + " " + (salarySob != null ? salarySob.getName() : "")); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(sourceType + SalaryI18nUtil.getI18nLabel(0, "考勤数据")); + loggerContext.setOperatedesc(sourceType + SalaryI18nUtil.getI18nLabel(0, "考勤数据")); + loggerContext.setNewValues(attendQuote); + SalaryElogConfig.attendQuoteLoggerTemplate.write(loggerContext); + } + + /** * 获取考勤引用 * @@ -769,8 +805,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa handleDataToDB(attendQuote.getId(), pos, values); - // todo 记录日志 -// recordLog(attendQuote, message.getUserId(), message.getTenantKey(), message.getClientIp()); + // 记录日志 + recordLog(attendQuote); Map apidatas = new HashMap(); apidatas.put("successCount", successCount); @@ -882,35 +918,6 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa return bigDecimalVal == null ? "" : bigDecimalVal.toString(); } -// /** -// * 记录日志 -// * @param attendQuote -// * @param currentEmployeeId -// * @param currentTenantKey -// * @param clientIp -// */ -// private void recordLog(AttendQuotePO attendQuote, Long currentEmployeeId, String currentTenantKey, String clientIp) { -// List salarySobs = new LambdaQueryChainWrapper<>(getSalarySobMapper()) -// .eq(SalarySobPO::getTenantKey, TenantContext.getCurrentTenantKey()) -// .eq(SalarySobPO::getDeleteType, 0) -// .eq(SalarySobPO::getId, attendQuote.getSalarySobId()) -// .list(); -// String sourceType = AttendQuoteSourceTypeEnum.getDefaultLabelByValue(attendQuote.getSourceType(), currentEmployeeId, currentTenantKey); -// -// LoggerContext loggerContext = new LoggerContext(); -// loggerContext.setTargetId(String.valueOf(attendQuote.getId())); -// loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(attendQuote.getSalaryYearMonth())+" "+(CollectionUtils.isNotEmpty(salarySobs)?salarySobs.get(0).getName():"")); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(sourceType+SalaryI18nUtil.getI18nLabel(93931, "考勤数据")); -// loggerContext.setOperatedesc(sourceType+SalaryI18nUtil.getI18nLabel( 93931, "考勤数据")); -// loggerContext.setNewValues(attendQuote); -// loggerContext.setTenant_key(currentTenantKey); -// loggerContext.setOperator(currentEmployeeId.toString()); -// if (StringUtils.isNotEmpty(clientIp)) { -// loggerContext.setClientIp(clientIp); -// } -// attendQuoteLoggerTemplate.write(loggerContext); -// } /** * 检查参数 diff --git a/src/com/engine/salary/service/impl/AttendQuoteFieldServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteFieldServiceImpl.java index 3979c3180..37d3ff3f6 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteFieldServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteFieldServiceImpl.java @@ -5,10 +5,13 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.AttendQuoteFieldBiz; import com.engine.salary.component.SalaryWeaTable; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO; import com.engine.salary.entity.datacollection.param.AttendQuoteFieldQueryParam; import com.engine.salary.entity.datacollection.param.AttendQuoteFieldSaveParam; import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.datacollection.AttendQuoteFieldSourceTypeEnum; import com.engine.salary.enums.datacollection.AttendQuoteFieldTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -16,6 +19,7 @@ import com.engine.salary.mapper.datacollection.AttendQuoteFieldMapper; import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService; import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl; import com.engine.salary.service.AttendQuoteFieldService; +import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -142,6 +146,17 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF // 保存 biz.save(attendQuoteField); + // 记录日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(attendQuoteField.getId())); + loggerContext.setTargetName(attendQuoteField.getFieldName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建自定义字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建自定义字段")); + loggerContext.setNewValues(attendQuoteField); + SalaryElogConfig.attendQuoteFieldLoggerTemplate.write(loggerContext); + return null; } @@ -222,6 +237,18 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF newAttendQuoteField.setUpdateTime(new Date()); // 更新 biz.update(newAttendQuoteField); + + // 记录日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(attendQuoteField.getId())); + loggerContext.setTargetName(attendQuoteField.getFieldName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "启用/停用自定义字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "启用/停用自定义字段")); + loggerContext.setOldValues(attendQuoteField); + loggerContext.setNewValues(newAttendQuoteField); + SalaryElogConfig.attendQuoteFieldLoggerTemplate.write(loggerContext); return null; } diff --git a/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java index 7f4b96a60..9a5878b0b 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java @@ -5,10 +5,12 @@ import com.engine.core.impl.Service; import com.engine.salary.biz.AttendQuoteBiz; import com.engine.salary.biz.AttendQuoteDataBiz; import com.engine.salary.biz.AttendQuoteDataValueBiz; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO; import com.engine.salary.entity.datacollection.param.AttendQuoteDataQueryParam; import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam; import com.engine.salary.entity.datacollection.po.AttendQuoteDataPO; +import com.engine.salary.entity.datacollection.po.AttendQuotePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; @@ -20,6 +22,8 @@ import com.engine.salary.service.SalarySobService; import com.engine.salary.service.TaxAgentService; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.SalaryLoggerUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -130,17 +134,18 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic dataValueBiz.deleteByAttendQuoteDataIds(attendQuoteDataIds); } - //todo 日志 -// attendQuotes.forEach(e -> { -// SalaryLoggerUtil.recordDeleteSingleLog(attendQuoteLoggerTemplate, -// e.getId(), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 85367, "考勤引用"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100412, "删除考勤引用"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100412, "删除考勤引用") + -// ":[" + SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 87614, "薪资所属月") + ":" + e.getSalaryYearMonth() + "," + -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 87615, "关联账套") + ":" + e.getSalarySobName() + "]", -// e); -// }); + // 记录日志 + attendQuotes.forEach(e -> { + SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.attendQuoteLoggerTemplate, + e.getId(), + SalaryI18nUtil.getI18nLabel(0, SalaryDateUtil.getFormatYearMonth(e.getSalaryYearMonth()) + " " + e.getSalarySobName()), + SalaryI18nUtil.getI18nLabel(0, "删除考勤引用"), + SalaryI18nUtil.getI18nLabel(0, "删除考勤引用") + + ":[" + SalaryI18nUtil.getI18nLabel(0, "薪资所属月") + ":" + e.getSalaryYearMonth() + "," + + SalaryI18nUtil.getI18nLabel(0, "关联账套") + ":" + e.getSalarySobName() + "]", + e, + user); + }); return null; } @@ -161,5 +166,11 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic return isEnableOperation.get(); } - + @Override + public AttendQuotePO getById(Long id) { + if (id == null) { + return null; + } + return getAttendQuoteMapper().getById(id); + } } diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index b831a5463..0d8d4669b 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -9,6 +9,7 @@ import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; +import com.engine.salary.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO; import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO; @@ -361,7 +362,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } //入库 - OtherDeductionBiz.handleImportData(eligibleData); + OtherDeductionBiz.handleImportData(eligibleData, user); apidatas.put("successCount", successCount); apidatas.put("errorCount", errorCount); @@ -418,18 +419,27 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction if (CollectionUtils.isNotEmpty(saveList)) { otherDeductionBiz.batchSave(saveList); } - // 记录操作日志 - saveList.addAll(updateList); + // 记录日志 + // 根据月份、人员id查出保存的数据 + List empIds = saveList.stream().map(OtherDeductionPO::getEmployeeId).collect(Collectors.toList()); + List insertList = otherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(po.getDeclareMonth()).employeeIds(empIds).build()); + Map insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId()); + saveList.forEach(save -> { + OtherDeductionPO otherDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId()); + if (otherDeductionPO != null) { + updateList.add(otherDeductionPO); + } + }); - if (CollectionUtils.isNotEmpty(saveList)) { - LoggerContext loggerContext = new LoggerContext(); + if (CollectionUtils.isNotEmpty(updateList)) { + LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "其他免税扣除")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增累计专项附加扣除")); - loggerContext.setNewValueList(saveList); - SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增其他免税扣除")); + loggerContext.setNewValueList(updateList); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); } } @@ -461,6 +471,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction //获取操作按钮资源 List> rowList = getExcelRowList(param); + // 记录日志 + String name = SalaryI18nUtil.getI18nLabel(0, "导出"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除")); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + name); + loggerContext.setUser(user); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); + //获取excel return ExcelUtil.genWorkbook(rowList, "其他免税扣除"); } @@ -655,6 +675,21 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction .build(); updateList.add(build); OtherDeductionBiz.batchUpdate(updateList); + + // 记录日志 + OtherDeductionPO newValue = OtherDeductionBiz.getById(build.getId()); + String name = SalaryI18nUtil.getI18nLabel(0, "编辑"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(newValue.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + newValue.getId()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "编辑")); + loggerContext.setOldValues(byId); + loggerContext.setNewValues(newValue); + loggerContext.setUser(user); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); } @Override @@ -755,6 +790,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr); // 判断是否有核算过 List deleteList = new ArrayList<>(); + List resultList = new ArrayList<>(); for (int i = 0; i < deleteIds.size(); i++) { Long id = deleteIds.get(i); OtherDeductionPO byId = otherDeductionBiz.getById(id); @@ -774,8 +810,22 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } } deleteList.add(byId.getId()); + resultList.add(byId); } otherDeductionBiz.batchDeleteByIDS(deleteList); + // 记录日志 + resultList.stream().forEach(r -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(r.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + r.getId()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "删除")); + loggerContext.setOldValues(r); + loggerContext.setUser(user); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); + }); } @Override @@ -822,6 +872,20 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction } List deleteIds = list.stream().map(OtherDeductionPO::getId).collect(Collectors.toList()); otherDeductionBiz.batchDeleteByIDS(deleteIds); + + // 记录日志 + Collection finalTaxAgentIds = queryParam.getTaxAgentIds(); + List taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())) + .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); + String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ","); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(name); + loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "一键清空:") + name); + loggerContext.setUser(user); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); } @Override @@ -906,6 +970,31 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction getOtherDeductionBiz().batchSave(insertInfo); getOtherDeductionBiz().batchUpdate(updatetInfo); + + //记录日志 + // 根据月份、人员id查出保存的数据 + List empIds = insertInfo.stream().map(OtherDeductionPO::getEmployeeId).collect(Collectors.toList()); + List insertList = getOtherDeductionBiz().listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.stringToDate(param.getDeclareMonth())).employeeIds(empIds).build()); + Map insertMap = SalaryEntityUtil.convert2Map(insertList, p -> p.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(p.getDeclareMonth()) + "-" + p.getEmployeeId()); + insertList.forEach(save -> { + OtherDeductionPO otherDeductionPO = insertMap.get(save.getTaxAgentId() + "-" + SalaryDateUtil.getFormatYearMonth(save.getDeclareMonth()) + "-" + save.getEmployeeId()); + if (otherDeductionPO != null) { + updatetInfo.add(otherDeductionPO); + } + }); + + if (CollectionUtils.isNotEmpty(updatetInfo)) { + String yearMonthStr = SalaryDateUtil.getFormatYearMonth(lastMonth.toLocalDate()) ; + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+yearMonthStr)); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "沿用上月其他免税扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+ yearMonthStr +" 其他免税扣除")); + loggerContext.setNewValueList(updatetInfo); + SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); + } + return ""; } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 964837f26..9a2be0a97 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -41,10 +41,7 @@ import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.sys.enums.OpenEnum; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; -import com.engine.salary.util.JsonUtil; -import com.engine.salary.util.SalaryDateUtil; -import com.engine.salary.util.SalaryEntityUtil; -import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.*; import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; @@ -64,6 +61,7 @@ import org.apache.commons.lang3.math.NumberUtils; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.BeanUtils; import weaver.file.ImageFileManager; import weaver.hrm.User; @@ -156,6 +154,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc public XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam) { ValidUtil.doValidator(queryParam); + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId()); + if (salaryAcctRecordPO == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"薪资核算记录不存在或已被删除")); + } // 1.工作簿名称 String sheetName = SalaryI18nUtil.getI18nLabel(85368, "核算人员范围"); // 2.表头 @@ -180,6 +182,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // 3.表数据 List> lists = convert2ExcelRow(salaryAcctEmployees); rows.addAll(lists); + + // 记录日志 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate, + queryParam.getSalaryAcctRecordId(), + targetName, + SalaryI18nUtil.getI18nLabel(0, "导出薪资核算人员"), + SalaryI18nUtil.getI18nLabel(0, "导出薪资核算人员") + ":" + targetName, + user + ); + // return ExcelUtil.genWorkbookV2(rows, sheetName); return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -188,6 +202,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc @Override public XSSFWorkbook exportReducedEmployee(SalaryAcctEmployeeQueryParam queryParam) { ValidUtil.doValidator(queryParam); + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId()); + if (salaryAcctRecordPO == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "薪资核算记录不存在或已被删除")); + } // 1.工作簿名称 String sheetName = SalaryI18nUtil.getI18nLabel(85368, "环比上月减少人员"); @@ -213,6 +231,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc // 3.表数据 List> lists = convert2ExcelRow(salaryAcctEmployees); rows.addAll(lists); + + // 记录日志 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate, + queryParam.getSalaryAcctRecordId(), + targetName, + SalaryI18nUtil.getI18nLabel(0, "导出环比上月减少人员"), + SalaryI18nUtil.getI18nLabel(0, "导出环比上月减少人员") + ":" + targetName, + user + ); + // return ExcelUtil.genWorkbookV2(rows, sheetName); return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -384,6 +414,18 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc rows.add(row); } + // 记录日志 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate, + queryParam.getSalaryAcctRecordId(), + targetName, + SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果"), + SalaryI18nUtil.getI18nLabel(0, "导出薪资核算结果") + ":" + targetName, + user + ); + + String sheetName = "薪资核算结果"; // return ExcelUtil.genWorkbookV2(rows, sheetName, total); return ExcelUtilPlus.genWorkbookWithChildTitleColumnWithExcelFormat(rows, sheetName, total); @@ -790,6 +832,17 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc rows.add(row); } + // 记录日志 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + SalaryLoggerUtil.recordExportSingleLog(SalaryElogConfig.salaryAcctRecordLoggerTemplate, + queryParam.getSalaryAcctRecordId(), + targetName, + SalaryI18nUtil.getI18nLabel(0, "导出线下对比结果"), + SalaryI18nUtil.getI18nLabel(0, "导出线下对比结果") + ":" + targetName, + user + ); + String sheetName = "线下对比结果"; // return ExcelUtil.genWorkbookV2(rows, sheetName); @@ -1287,7 +1340,28 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc if (CollectionUtils.isNotEmpty(salaryAcctResults)) { // 处理导入薪资项的回算值 handleOriginResultValue(deleteResults, salaryAcctResults); + // 备份一份加密前的值 + List list4log = new ArrayList<>(); + salaryAcctResults.stream().forEach(source -> { + SalaryAcctResultPO target = new SalaryAcctResultPO(); + BeanUtils.copyProperties(source,target); + list4log.add(target); + }); getSalaryAcctResultService(user).batchSave(salaryAcctResults); + + // 记录操作日志 TODO 这里的数据没有id,id是自增的重新查数据太多效率太低 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + String targetName = salarySobPO.getName() + ":" + SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(param.getSalaryAcctRecordId().toString()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "导入薪资核算数据 ") + targetName); + loggerContext.setOldValueList(list4log); + SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); + // 存储薪资核算结果数据来源日志 new Thread() { public void run() { diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index 001f5ee36..e4cecc326 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -3,8 +3,10 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.*; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.constant.SalaryItemConstant; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.bo.SalaryArchiveExcelBO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveInitImportDTO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveListDTO; @@ -29,6 +31,7 @@ import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.SalaryLoggerUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; import com.engine.salary.util.excel.ExcelParseHelper; @@ -823,7 +826,8 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch List taxAgentRanges = importHandleParam.getTaxAgentRanges(); List salaryArchiveSobSaves = importHandleParam.getSalaryArchiveSobSaves(); - + Map empMap = SalaryEntityUtil.convert2Map(importHandleParam.getEmployees(), DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername); + Map taxAgentMap = SalaryEntityUtil.convert2Map(importHandleParam.getTaxAgentList(), TaxAgentManageRangeEmployeeDTO::getTaxAgentId, TaxAgentManageRangeEmployeeDTO::getTaxAgentName); // 新增薪资档案 if (CollectionUtils.isNotEmpty(salaryArchiveSaves)) { // 去除已经存在的,避免重复 @@ -836,8 +840,24 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch } // 修改薪资档案 if (CollectionUtils.isNotEmpty(salaryArchiveUpdates)) { + // 查询更新前档案信息 + List oldArchive = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(salaryArchiveUpdates.stream().map(SalaryArchivePO::getId).collect(Collectors.toList())).build()); + Map oldArchiveMap = SalaryEntityUtil.convert2Map(oldArchive, SalaryArchivePO::getId); // 薪资档案 salaryArchiveMapper.batchUpdate(salaryArchiveUpdates); + // 记录日志 + salaryArchiveUpdates.stream().forEach(a -> { + SalaryArchivePO oldPO = oldArchiveMap.getOrDefault(a.getId(), SalaryArchivePO.builder().build()); + String name = taxAgentMap.getOrDefault(a.getTaxAgentId(), StringUtils.EMPTY) + "-" + empMap.getOrDefault(a.getEmployeeId(), StringUtils.EMPTY); + SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.salaryArchiveLoggerTemplate, + a.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "薪资档案导入更新"), + SalaryI18nUtil.getI18nLabel(0, "薪资档案导入更新") + name, + oldPO, + a, + user); + }); } // 薪资档案-薪资项目 if (CollectionUtils.isNotEmpty(salaryArchiveItemDelSalaryItemIds)) { @@ -845,7 +865,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch } // 薪资档案-薪资项目 if (CollectionUtils.isNotEmpty(salaryArchiveItemSaves)) { - salaryArchiveItemMapper.batchInsert(salaryArchiveItemSaves); + salaryArchiveItemMapper.batchInsert(salaryArchiveItemSaves, user); } // 薪资档案-薪资账套 diff --git a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java index f323b1c9d..19c39e199 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java @@ -5,6 +5,7 @@ import com.engine.core.impl.Service; import com.engine.salary.biz.SalaryArchiveBiz; import com.engine.salary.biz.SalaryArchiveItemBiz; import com.engine.salary.biz.SalaryItemBiz; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO; @@ -25,6 +26,7 @@ import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentService; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.SalaryLoggerUtil; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.valid.ValidUtil; @@ -247,6 +249,20 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi // 构建更新PO SalaryArchiveItemPO updateSalaryArchiveItemPO = buildUpdateSalaryArchiveItemPO(salaryArchiveItemSaveParam, salaryArchiveItems, salaryItemIds, salaryArchiveItem); salaryArchiveItemMapper.updateIgnoreNull(updateSalaryArchiveItemPO); + + // 查询更新后的po + SalaryArchiveItemPO saiNew = salaryArchiveItemMapper.getById(updateSalaryArchiveItemPO.getId()); + // 记录操作日志 + String name = SalaryI18nUtil.getI18nLabel(0, "编辑调薪记录"); + SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.salaryArchiveItemAdjustLoggerTemplate, + saiNew.getId(), + name + ":" + saiNew.getId(), + name, + name + ":" + saiNew.getId(), + salaryArchiveItem, + saiNew, + user + ); } return StringUtils.EMPTY; } @@ -447,7 +463,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi salaryArchiveItemMapper.deleteBatchIds(effectiveSalaryItemDels); } if (CollectionUtils.isNotEmpty(salaryArchiveItemNews)) { - salaryArchiveItemMapper.batchInsert(salaryArchiveItemNews); + salaryArchiveItemMapper.batchInsert(salaryArchiveItemNews, user); } return StringUtils.EMPTY; @@ -565,6 +581,15 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi salaryArchiveItem.setDeleteType(1); // 删除未生效数据 salaryArchiveItemMapper.updateById(salaryArchiveItem); + // 记录日志 + String operateName = SalaryI18nUtil.getI18nLabel(0, "删除调薪记录"); + SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.salaryArchiveItemAdjustLoggerTemplate, + salaryArchiveItem.getId(), + operateName + ":" + salaryArchiveItem.getId(), + operateName, + operateName, + salaryArchiveItem, + user); // } else { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98299, "该薪资项目已生效不可删除")); // } diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index e4d2fe9eb..e102293cb 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -5,8 +5,11 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.*; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.constant.SalaryItemConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.entity.datacollection.AddUpSituation; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.bo.SalaryArchiveBO; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; @@ -21,6 +24,7 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.salaryarchive.*; @@ -39,6 +43,7 @@ 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.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.excel.ExcelSupport; @@ -48,7 +53,6 @@ import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.time.DateUtils; @@ -321,7 +325,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } // 落库处理薪资项目 if (CollectionUtils.isNotEmpty(changeData.getSalaryArchiveItemAddTodos())) { - salaryArchiveItemMapper.batchInsert(changeData.getSalaryArchiveItemAddTodos()); + salaryArchiveItemMapper.batchInsert(changeData.getSalaryArchiveItemAddTodos(), user); } // 删除增量数据 if (CollectionUtils.isNotEmpty(changeData.getChangeIds())) { @@ -586,6 +590,17 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // 3.表数据 // return ExcelUtil.genWorkbookV2(rows, sheetName); + + // 记录日志 + String statusStr = StringUtils.join(queryParam.getRunStatusList().stream().map(status -> SalaryArchiveStatusEnum.parseByValue(status).getDefaultLabel()).collect(Collectors.toList()), ","); + String name = SalaryI18nUtil.getI18nLabel(0, "导出"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "薪资档案 ") + statusStr); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "薪资档案") + "-" + name); + loggerContext.setUser(user); + SalaryElogConfig.salaryArchiveLoggerTemplate.write(loggerContext); return ExcelUtilPlus.genWorkbookV2(rows, sheetName); } @@ -685,7 +700,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe }); // 落库处理薪资档案项目数据 if (CollectionUtils.isNotEmpty(salaryArchiveItemAddTodos)) { - salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddTodos); + salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddTodos, user); } if (CollectionUtils.isNotEmpty(salaryArchiveItemDelTodoIds)) { salaryArchiveItemMapper.deleteBatchIds(salaryArchiveItemDelTodoIds); @@ -724,9 +739,49 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // List salaryArchiveSobSaveList = SalaryArchiveBO.buildSalaryArchiveSob(salaryArchive.getId(), salarySobIds, LocalDateTime.now()); // this.salaryArchiveSobService.saveBatchBySalaryArchiveIdsAndSaves(Collections.singletonList(salaryArchive.getId()), salaryArchiveSobSaveList, currentTenantKey); + // 记录日志 + List newList = Collections.singletonList(this.getById(salaryArchive.getId())); + String operatedesc = SalaryI18nUtil.getI18nLabel(0, "发薪设置"); + recordLog(oldList, newList, operatedesc); + return StringUtils.EMPTY; } + /** + * 记录日志 + * + * @param oldSalaryArchiveList + * @param newSalaryArchiveList + * @param operatedesc + */ + private void recordLog(List oldSalaryArchiveList, List newSalaryArchiveList, String operatedesc) { + if (CollectionUtils.isEmpty(oldSalaryArchiveList) || CollectionUtils.isEmpty(oldSalaryArchiveList)) { + return; + } + List updateEmpIds = newSalaryArchiveList.stream().map(SalaryArchivePO::getEmployeeId).distinct().collect(Collectors.toList()); + List employeeList = getSalaryEmployeeService(user).listByIds(updateEmpIds); + Map empMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername); + + + // 获取所有个税扣缴义务人 + Collection taxAgents = getTaxAgentService(user).listAll(); + Map taxAgentMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName); + String bar = "-"; + oldSalaryArchiveList.forEach(e -> { + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(e.getId())); + loggerContext.setTargetName(Optional.ofNullable(empMap.get(e.getEmployeeId())).orElse(StringUtils.EMPTY) + bar + Optional.ofNullable(taxAgentMap.get(e.getTaxAgentId())).orElse(StringUtils.EMPTY)); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(operatedesc); + loggerContext.setOperatedesc(operatedesc); + loggerContext.setOldValues(e); + Optional optionalNew = newSalaryArchiveList.stream().filter(n -> n.getId().equals(e.getId())).findFirst(); + loggerContext.setNewValues(optionalNew.orElse(null)); + SalaryElogConfig.salaryArchiveLoggerTemplate.write(loggerContext); + }); + } + @Override public List dimissionSets() { @@ -955,7 +1010,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe this.salaryArchiveMapper.batchInsert(salaryArchiveAddList); } if (CollectionUtils.isNotEmpty(salaryArchiveItemAddList)) { - this.salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddList); + this.salaryArchiveItemMapper.batchInsert(salaryArchiveItemAddList, user); } log.info("处理历史数据结束==============="); } @@ -1076,6 +1131,10 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } // 从待定薪到停薪 getSalaryArchiveMapper().deletePendingTodo(ids); + // 记录日志 + List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + String operatedesc = SalaryI18nUtil.getI18nLabel(0, "删除待办"); + recordLog(oldList, newList, operatedesc); return StringUtils.EMPTY; } @@ -1106,6 +1165,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe List> partition = Lists.partition((List) ids, 1000); partition.forEach(getSalaryArchiveMapper()::gotoFixed); + // 记录日志 + List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + String operateDesc = SalaryI18nUtil.getI18nLabel(0, "设为发薪员工"); + recordLog(salaryArchiveList, newList, operateDesc); + // 获取所有可被引用的薪资项目 List salaryItemIds = getSalaryArchiveItemService(user).getCanAdjustSalaryItems().stream().map(SalaryItemPO::getId).collect(Collectors.toList()); List currentEffectiveItemList = getSalaryArchiveItemService(user).getCurrentEffectiveItemListIngoreValue(ids, salaryItemIds) @@ -1170,6 +1234,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // 从待停薪到停薪 getSalaryArchiveMapper().gotoStop(ids); + // 记录日志 + List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + String operatedesc = SalaryI18nUtil.getI18nLabel(0, "停薪"); + recordLog(oldList, newList, operatedesc); + Map resultMap = new HashMap<>(2); String resultMsg = SalaryI18nUtil.getI18nLabel(94620, "操作成功"); String resultType = "success"; @@ -1241,7 +1310,13 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } // 删除最后发薪日期,设置状态为发薪 if (CollectionUtils.isNotEmpty(list)) { - getSalaryArchiveMapper().deleteSuspendTodo(list.stream().map(SalaryArchiveListDTO::getId).collect(Collectors.toList())); + List salaryArchiveIds = list.stream().map(SalaryArchiveListDTO::getId).collect(Collectors.toList()); + getSalaryArchiveMapper().deleteSuspendTodo(salaryArchiveIds); + // 记录日志 + List oldList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(salaryArchiveIds).build()); + List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + String operatedesc = SalaryI18nUtil.getI18nLabel(0, "删除待办"); + recordLog(oldList, newList, operatedesc); } return StringUtils.EMPTY; } @@ -1275,6 +1350,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe // 从停薪到定薪 getSalaryArchiveMapper().gotoFixedFromStop(ids); + // 记录日志 + List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + String operatedesc = SalaryI18nUtil.getI18nLabel(0, "取消停薪"); + recordLog(oldList, newList, operatedesc); + return StringUtils.EMPTY; } diff --git a/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java index 0cda15391..4789efd76 100644 --- a/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java @@ -8,7 +8,9 @@ import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySendBiz; import com.engine.salary.biz.SalarySendInfoBiz; import com.engine.salary.cache.SalaryCacheKey; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.HrmSalaryPayrollConf; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.progress.ProgressDTO; import com.engine.salary.entity.salaryBill.bo.SalaryBillBO; @@ -24,6 +26,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salarybill.*; import com.engine.salary.enums.salarysend.SalarySendGrantTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -758,6 +761,19 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService salarySendNew.setLastSendTime(new Date()); mapper.updateById(salarySendNew); + + // 记录日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setTargetId(String.valueOf(salarySend.getId())); + loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName())); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"工资单发放")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"工资单发放")); + loggerContext.setOldValues(salarySend); + loggerContext.setNewValues(salarySendNew); + loggerContext.setOperator(user.getUID() + StringUtils.EMPTY); + loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername()); + SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext); } // /** diff --git a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java index e18e8569a..ca9160cdd 100644 --- a/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryItemServiceImpl.java @@ -191,7 +191,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService // } @Override - public void save(SalaryItemSaveParam saveParam) { + public SalaryItemPO save(SalaryItemSaveParam saveParam) { // 名称不能和已有的自定义薪资项目重名 List salaryItemPOS = listByName(saveParam.getName()); if (CollectionUtils.isNotEmpty(salaryItemPOS)) { @@ -204,16 +204,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService } SalaryItemPO salaryItemPO = SalaryItemBO.convert2SalaryItemPO(saveParam, (long) user.getUID()); salaryItemBiz.insert(salaryItemPO); - // 记录日志 - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); - loggerContext.setTargetName(salaryItemPO.getName()); - loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目") + ": " + salaryItemPO.getName()); - loggerContext.setNewValues(salaryItemPO); - SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); + return salaryItemPO; } @Override @@ -222,7 +213,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService } @Override - public void update(SalaryItemSaveParam saveParam) { + public SalaryItemPO update(SalaryItemSaveParam saveParam) { // 查询薪资项目,判断薪资项目是否存在 SalaryItemPO salaryItemPO = getById(saveParam.getId()); if (Objects.isNull(salaryItemPO)) { @@ -286,18 +277,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService } } - - // 记录日志 - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); - loggerContext.setTargetName(newSalaryItemPO.getName()); - loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资项目") + ": " + newSalaryItemPO.getName()); - loggerContext.setOldValues(salaryItemPO); - loggerContext.setNewValues(newSalaryItemPO); - SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); + return salaryItemPO; } private void changeName(SalaryItemPO salaryItemPO, String oldName, String newName, String itemPrefix, String fieldNamePrefix) { @@ -351,18 +331,36 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService // 删除薪资项目 ids = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getId); salaryItemBiz.deleteByIds(ids); + Integer useInEmployeeSalary = salaryItemPOS.get(0).getUseInEmployeeSalary(); // 记录删除日志 - salaryItemPOS.forEach(salaryItemPO -> { - LoggerContext loggerContext = new LoggerContext<>(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); - loggerContext.setTargetName(salaryItemPO.getName()); - loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目") + ": " + salaryItemPO.getName()); - loggerContext.setOldValues(salaryItemPO); - SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); - }); + if (useInEmployeeSalary == 0) { + // 薪资项目 + salaryItemPOS.forEach(salaryItemPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); + }); + } else { + // 字段管理 + salaryItemPOS.forEach(salaryItemPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除字段") + ": " + salaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext); + }); + } + } diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 19603ddd4..1189589c8 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -11,10 +11,13 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySendBiz; import com.engine.salary.biz.SalarySendInfoBiz; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryArchiveConstant; import com.engine.salary.constant.SalaryItemConstant; import com.engine.salary.constant.SalaryTemplateSalaryItemSetGroupConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; +import com.engine.salary.entity.datacollection.AddUpSituation; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryBill.bo.SalaryBillBO; import com.engine.salary.entity.salaryBill.dto.*; @@ -35,6 +38,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum; import com.engine.salary.enums.salarybill.BillConfimStatusEnum; @@ -57,11 +61,11 @@ import com.engine.salary.util.JsonUtil; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.google.common.collect.Lists; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; @@ -660,6 +664,17 @@ public class SalarySendServiceImpl extends Service implements SalarySendService map.put("showFeedback", "0"); } + + // 记录查看日志 + String targetName = taxAgentPO.getName() + "-" + SalaryDateUtil.getFormatYearMonth(salarySendInfo.getSalaryMonth()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salarySendInfo.getId())); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看工资单") + ": " + targetName + " " + salaryInfoId); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看工资单") + ": " + targetName); + SalaryElogConfig.mySalaryBillLoggerTemplate.write(loggerContext); return map; } @@ -1409,14 +1424,20 @@ public class SalarySendServiceImpl extends Service implements SalarySendService salarySendNew.setSendTotal(sendTotal); mapper.updateById(salarySendNew); + SalarySobPO salarySob = getSalarySobService(user).getById(salarySend.getSalarySobId()); // 记录日志 -// SalaryLoggerUtil.recordUpdateSingleLog(salarySendLoggerTemplate, -// salarySend.getId(), -// salarySend.getSalaryMonth() + "-" + (CollectionUtils.isNotEmpty(salarySobs) ? salarySobs.get(0).getName() : ""), -// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100521, "撤回工资单发放"), -// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100521, "撤回工资单发放"), -// salarySend, -// salarySendNew); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setTargetId(String.valueOf(salarySend.getId())); + loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName())); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "撤回工资单")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "撤回工资单")); + loggerContext.setOldValues(salarySend); + loggerContext.setNewValues(salarySendNew); + loggerContext.setOperator(user.getUID() + StringUtils.EMPTY); + loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername()); + SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext); + SalarySendGrantParam grantParam = SalarySendGrantParam.builder().ids(param.getIds()).salarySendId(param.getSalarySendId()).build(); @@ -1487,6 +1508,19 @@ public class SalarySendServiceImpl extends Service implements SalarySendService row.add(dto.getSendStatus()); rows.add(row); } + + // 记录操作日志 + SalarySendPO salarySend = mapper.getById(queryParam.getSalarySendId()); + SalarySobPO salarySob = getSalarySobService(user).getById(salarySend.getSalarySobId()); + + String name = SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(name); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "工资单发放") + ":" + name + SalaryI18nUtil.getI18nLabel(0, " 导出")); + loggerContext.setUser(user); + SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext); return ExcelUtil.genWorkbookV2(rows, sheetName); } @@ -1551,6 +1585,19 @@ public class SalarySendServiceImpl extends Service implements SalarySendService rows.add(row); } + + // 记录日志 + SalarySobPO salarySob = getSalarySobService(user).getById(salaryAcctRecord.getSalarySobId()); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setTargetId(String.valueOf(salarySend.getId())); + loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName())); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"导出工资单")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"导出工资单")); + loggerContext.setOperator(user.getUID() + StringUtils.EMPTY); + loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername()); + SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext); + return ExcelUtil.genWorkbookV2(rows, sheetName); } diff --git a/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java index c068f377d..160151c16 100644 --- a/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobAdjustRuleServiceImpl.java @@ -79,11 +79,12 @@ public class SalarySobAdjustRuleServiceImpl extends Service implements SalarySob } // 记录日志 LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(salarySobPO.getId())); loggerContext.setTargetName(salarySobPO.getName()); loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98614, "保存调薪计薪规则")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "保存调薪计薪规则")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "保存调薪计薪规则")); SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } diff --git a/src/com/engine/salary/service/impl/SalarySobServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobServiceImpl.java index 722149a40..07dbcfe61 100644 --- a/src/com/engine/salary/service/impl/SalarySobServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobServiceImpl.java @@ -3,7 +3,9 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.*; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO; @@ -18,6 +20,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentRangeQueryParam; import com.engine.salary.entity.taxagent.po.TaxAgentAdminPO; import com.engine.salary.entity.taxagent.po.TaxAgentExtRangePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.SalarySystemTypeEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum; @@ -30,13 +33,13 @@ import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.engine.salary.util.valid.RuntimeTypeEnum; import com.engine.salary.util.valid.ValidUtil; import com.google.common.collect.Lists; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.ObjectUtils; @@ -281,15 +284,16 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { SalarySobPO salarySobPO = SalarySobBO.convert2PO(saveParam, (long) user.getUID()); // 保存薪资账套 salarySobMapper.insert(salarySobPO); - //todo 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(salarySobPO.getId())); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98404, "新建薪资账套")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98404, "新建薪资账套") + ": " + salarySobPO.getName()); -// loggerContext.setOldValues(salarySobPO); -// salarySobLoggerTemplate.write(loggerContext); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salarySobPO.getId())); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资账套")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资账套") + ": " + salarySobPO.getName()); + loggerContext.setNewValues(salarySobPO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); // 新建薪资账套时,保存默认的员工信息字段 saveDefaultEmpField(salarySobPO); // 新建薪资账套时,保存默认的薪资项目 @@ -531,15 +535,16 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { .setUpdateTime(new Date()); salarySobMapper.updateById(newSalarySobPO); // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId(String.valueOf(newSalarySobPO.getId())); -// loggerContext.setTargetName(newSalarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98526, "编辑薪资账套基础设置")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98526, "编辑薪资账套基础设置")); -// loggerContext.setOldValues(salarySobPO); -// loggerContext.setNewValues(newSalarySobPO); -// salarySobLoggerTemplate.write(loggerContext); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(newSalarySobPO.getId())); + loggerContext.setTargetName(newSalarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套基础设置")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套基础设置")); + loggerContext.setOldValues(salarySobPO); + loggerContext.setNewValues(newSalarySobPO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); // 返回薪资账套的主键id return salarySobPO.getId(); } @@ -548,6 +553,8 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { public void updateDisable(SalarySobDisableParam disableParam) { // 查询薪资账套 SalarySobPO salarySobPO = getById(disableParam.getId()); + SalarySobPO oldSalarySobPO = new SalarySobPO(); + BeanUtils.copyProperties(salarySobPO, oldSalarySobPO); if (Objects.isNull(salarySobPO)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98379, "参数错误,薪资账套不存在或者已被删除")); } @@ -555,16 +562,19 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { salarySobPO.setDisable(disableParam.getDisable()); salarySobPO.setUpdateTime(new Date()); salarySobMapper.updateById(salarySobPO); - // todo 记录日志 -// String operateTypeName = Objects.equals(disableParam.getDisable(), NumberUtils.INTEGER_ONE) ? -// SalaryI18nUtil.getI18nLabel(98591, "禁用薪资账套") : SalaryI18nUtil.getI18nLabel(98592, "启用薪资账套"); -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(operateTypeName); -// loggerContext.setOperatedesc(operateTypeName + ": " + salarySobPO.getName()); -// salarySobLoggerTemplate.write(loggerContext); + // 记录日志 + String operateTypeName = Objects.equals(disableParam.getDisable(), NumberUtils.INTEGER_ONE) ? + SalaryI18nUtil.getI18nLabel(0, "禁用薪资账套") : SalaryI18nUtil.getI18nLabel(0, "启用薪资账套"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(operateTypeName); + loggerContext.setOperatedesc(operateTypeName + ": " + salarySobPO.getName()); + loggerContext.setOldValues(oldSalarySobPO); + loggerContext.setNewValues(salarySobPO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override @@ -619,16 +629,18 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { getSalarySobBackItemService(user).deleteBySalarySobIds(ids); // 删除薪资账套的校验规则 getSalarySobCheckRuleService(user).deleteBySalarySobIds(ids); -// // 记录日志 -// salarySobPOS.forEach(salarySobPO -> { -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + salarySobPO.getId()); -// loggerContext.setTargetName(salarySobPO.getName()); -// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98535, "删除薪资账套")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98535, "删除薪资账套")); -// salarySobLoggerTemplate.write(loggerContext); -// }); + // 记录日志 + salarySobPOS.forEach(salarySobPO -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + salarySobPO.getId()); + loggerContext.setTargetName(salarySobPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除薪资账套")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除薪资账套")); + loggerContext.setOldValues(salarySobPO); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); + }); } @Override @@ -771,14 +783,15 @@ public class SalarySobServiceImpl extends Service implements SalarySobService { if (CollectionUtils.isNotEmpty(result.getSalarySobCheckRules())) { getSalarySobCheckRuleService(user).batchSave(result.getSalarySobCheckRules()); } -// // 记录日志 -// LoggerContext loggerContext = new LoggerContext<>(); -// loggerContext.setTargetId("" + result.getSalarySob().getId()); -// loggerContext.setTargetName(result.getSalarySob().getName()); -// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); -// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套")); -// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套") + ": " + salarySobPO.getName()); -// salarySobLoggerTemplate.write(loggerContext); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + result.getSalarySob().getId()); + loggerContext.setTargetName(result.getSalarySob().getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(98570, "复制薪资账套") + ": " + salarySobPO.getName()); + SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java index dd9d49cd9..c32877e01 100644 --- a/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryTemplateServiceImpl.java @@ -8,6 +8,8 @@ import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SalarySobBiz; import com.engine.salary.biz.SalaryTemplateBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryBill.bo.SalaryTemplateBO; import com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO; import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemListDTO; @@ -18,22 +20,26 @@ import com.engine.salary.entity.salaryBill.param.SalaryTemplateQueryParam; import com.engine.salary.entity.salaryBill.param.SalaryTemplateSaveParam; import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO; import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO; -import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO; -import com.engine.salary.entity.salarysob.po.*; +import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO; +import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; +import com.engine.salary.entity.salarysob.po.SalarySobItemPO; +import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salarybill.SalaryTemplateWhetherEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salarysob.SalarySobEmpFieldMapper; +import com.engine.salary.report.entity.po.SalaryStatisticsReportPO; import com.engine.salary.service.*; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; import com.mzlion.core.utils.BeanUtils; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -116,14 +122,14 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate mapper.updateById(salaryTemplateNew); // 记录日志 -// SalaryLoggerUtil.recordUpdateSingleLog(salaryTemplateLoggerTemplate, -// salaryTemplate.getId(), -// salaryTemplateNew.getName(), -// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100534, "设为默认使用"), -// SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100534, "设为默认使用"), -// salaryTemplate, -// salaryTemplateNew); - + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId())); + loggerContext.setTargetName(salaryTemplateNew.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "设为默认使用")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "设为默认使用")); + SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext); return ""; } @@ -167,12 +173,15 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate saveParam.getSalaryBillItemNameSetting().stream().forEach(set -> set.setSalaryTemplateId(salaryTemplate.getId())); getSalaryBillItemNameService(user).saveItemShowName(saveParam.getSalaryBillItemNameSetting()); // 记录日志 -// SalaryLoggerUtil.recordAddSingleLog(salaryTemplateLoggerTemplate, -// salaryTemplate.getId(), -// salaryTemplate.getName(), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100538, "新增工资单模板"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100538, "新增工资单模板"), -// salaryTemplate); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryTemplate.getId())); + loggerContext.setTargetName(salaryTemplate.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增工资单模板")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增工资单模板")); + loggerContext.setNewValues(salaryTemplate); + SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext); return ""; } @@ -255,13 +264,16 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate getSalaryBillItemNameService(user).deleteByIds(needDeleteIds); // 记录日志 -// SalaryLoggerUtil.recordUpdateSingleLog(salaryTemplateLoggerTemplate, -// salaryTemplate.getId(), -// salaryTemplateNew.getName(), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100539, "编辑工资单模板"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100539, "编辑工资单模板"), -// salaryTemplate, -// salaryTemplateNew); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId())); + loggerContext.setTargetName(salaryTemplateNew.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "编辑工资单模板")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "编辑工资单模板")); + loggerContext.setOldValues(salaryTemplate); + loggerContext.setNewValues(salaryTemplateNew); + SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext); return ""; } @@ -369,12 +381,15 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate getSalaryBillItemNameService(user).batchInsert(needInsertList); } // 记录日志 -// SalaryLoggerUtil.recordAddSingleLog(salaryTemplateLoggerTemplate, -// salaryTemplateNew.getId(), -// salaryTemplateNew.getName(), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100541, "复制工资单模板"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100541, "复制工资单模板"), -// salaryTemplateNew); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryTemplateNew.getId())); + loggerContext.setTargetName(salaryTemplateNew.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "复制工资单模板")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "复制工资单模板")); + loggerContext.setNewValues(salaryTemplateNew); + SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext); return ""; } @@ -393,12 +408,16 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate // 删除工资单重命名表 getSalaryBillItemNameService(user).deleteByTemplateIds(ids); // 记录日志 -// salaryTemplates.forEach(e -> SalaryLoggerUtil.recordDeleteSingleLog(salaryTemplateLoggerTemplate, -// e.getId(), -// e.getName(), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100542, "删除工资单模板"), -// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100542, "删除工资单模板")+":" + e.getName(), -// e)); + salaryTemplates.stream().forEach(template -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(template.getId())); + loggerContext.setTargetName(template.getName() + ":" + template.getId()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "删除工资单模板")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "删除工资单模板")); + SalaryElogConfig.salaryTemplateLoggerTemplate.write(loggerContext); + }); return ""; } diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index 3ac80b609..4585b6fb0 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -4,7 +4,10 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.biz.SpecialAddDeductionBiz; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; +import com.engine.salary.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionListDTO; import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO; @@ -16,6 +19,7 @@ import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.SpecialAddDeductionMapper; @@ -330,7 +334,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd } //入库 - SpecialAddDeductionBiz.handleImportData(eligibleData); + SpecialAddDeductionBiz.handleImportData(eligibleData, user); apidatas.put("successCount", successCount); apidatas.put("errorCount", errorCount); @@ -365,6 +369,16 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd //获取操作按钮资源 List> rowList = getExcelRowList(param, isTemplate); + // 记录操作日志 + String name = SalaryI18nUtil.getI18nLabel(0, "导出"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除")); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + name); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + //获取excel return ExcelUtil.genWorkbook(rowList, "专项附加免税扣除"); } @@ -509,6 +523,21 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd .build(); updateList.add(build); SpecialAddDeductionBiz.batchUpdate(updateList); + + // 记录操作日志 + SpecialAddDeductionPO newValue = SpecialAddDeductionBiz.getById(build.getId()); + String name = SalaryI18nUtil.getI18nLabel(0, "编辑"); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(newValue.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + newValue.getId()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(name); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "编辑")); + loggerContext.setOldValues(byId); + loggerContext.setNewValues(newValue); + loggerContext.setUser(user); + SalaryElogConfig.specialAddDeductionLoggerTemplate.write(loggerContext); } @Override @@ -568,7 +597,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd //fixme 分权判断 insertData.add(po); //入库 - SpecialAddDeductionBiz.handleImportData(insertData); + SpecialAddDeductionBiz.handleImportData(insertData, user); } @Override @@ -580,6 +609,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz(); List deleteIds = deleteParam.getIds(); List deleteList = new ArrayList<>(); + List oldSpecialAddDeductionList = new ArrayList<>(); for (Long id : deleteIds) { SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(id); if (byId == null) { @@ -595,6 +625,22 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd deleteList.add(byId.getId()); } SpecialAddDeductionBiz.batchDeleteByIds(deleteList); + + // 记录操作日志 + if (CollectionUtils.isNotEmpty(oldSpecialAddDeductionList)) { + oldSpecialAddDeductionList.stream().forEach( e -> { + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetId(e.getId().toString()); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + e.getId()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "删除")); + loggerContext.setOldValues(e); + loggerContext.setUser(user); + SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); + }); + } } @Override @@ -622,6 +668,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd List list = specialAddDeductionBiz.listByTaxAgentIds(taxAgentIds); List deleteIds = list.stream().map(SpecialAddDeductionPO::getId).collect(Collectors.toList()); specialAddDeductionBiz.batchDeleteByIds(deleteIds); + + // 记录操作日志 + Collection finalTaxAgentIds =taxAgentIds; + List taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())) + .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); + String name = StringUtils.join(taxAgentNames, ","); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setTargetName(name); + loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + SalaryI18nUtil + .getI18nLabel(0, "一键清空:") + name); + loggerContext.setUser(user); + SalaryElogConfig.specialAddDeductionLoggerTemplate.write(loggerContext); } @Override diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index caf96a0f9..b62c49006 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -4,6 +4,7 @@ import com.api.formmode.mybatis.util.SqlProxyHandle; import com.cloudstore.dev.api.util.Util_DataCache; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.hrm.DeptInfo; @@ -30,6 +31,8 @@ import com.engine.salary.service.*; import com.engine.salary.sys.entity.po.SalarySysConfPO; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.SalaryLoggerUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; import com.engine.salary.util.page.PageInfo; @@ -38,13 +41,13 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.entity.LocalRunnable; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.math.NumberUtils; import org.apache.poi.util.IOUtils; +import org.springframework.beans.BeanUtils; import weaver.file.ImageFileManager; import weaver.general.Util; import weaver.hrm.User; @@ -316,6 +319,12 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM List taxAgentManageAllRanges = listByTaxAgentId(saveParam.getTaxAgentId()); List taxAgentManageRanges = taxAgentManageAllRanges.stream().filter(f -> f.getIncludeType().equals(saveParam.getIncludeType())).collect(Collectors.toList()); + List oldManageList = new ArrayList<>(); + taxAgentManageRanges.stream().forEach(p -> { + TaxAgentManageRangePO target = new TaxAgentManageRangePO(); + BeanUtils.copyProperties(p, target); + oldManageList.add(target); + }); // 处理一下本次的保存参数(如果原来添加过对应的人员(/部门/岗位),那么本次不需要新增,只需要更新) TaxAgentBO.Result result = TaxAgentBO.handleTaxAgentRange(taxAgentManageRanges, saveParam, taxAgent.getId(), (long) user.getUID(), false); @@ -331,10 +340,37 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM /* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */ if (CollectionUtils.isNotEmpty(result.getNeedInsertTaxAgentManageRanges())) { - result.getNeedInsertTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().insertIgnoreNull(range)); + result.getNeedInsertTaxAgentManageRanges().forEach(range -> { + getTaxAgentManageRangeMapper().insertIgnoreNull(range); + // 记录操作日志 + String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId(); + SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.taxAgentLoggerTemplate, + range.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "新增人员范围"), + SalaryI18nUtil.getI18nLabel(0, "新增人员范围") + name, + range, + user); + }); + } if (CollectionUtils.isNotEmpty(result.getNeedUpdateTaxAgentManageRanges())) { - result.getNeedUpdateTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().updateIgnoreNull(range)); + Map oldMap = SalaryEntityUtil.convert2Map(oldManageList, TaxAgentManageRangePO::getId); + result.getNeedUpdateTaxAgentManageRanges().forEach(range -> { + getTaxAgentManageRangeMapper().updateIgnoreNull(range); + // 记录操作日志 + TaxAgentManageRangePO oldPO = oldMap.getOrDefault(range.getId(), TaxAgentManageRangePO.builder().build()); + String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId(); + SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.taxAgentLoggerTemplate, + range.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "更新人员范围"), + SalaryI18nUtil.getI18nLabel(0, "更新人员范围") + name, + oldPO, + range, + user); + }); + } /* 同步本地人员范围的关联人员=========================== */ @@ -527,19 +563,21 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM @Override public void deleteByIds(Collection ids) { // 查询管理范围 - List taxAgentManageRanges = listByIds(ids); - if (CollectionUtils.isEmpty(taxAgentManageRanges)) { + List taxAgentManageRangeList = listByIds(ids); + + if (CollectionUtils.isEmpty(taxAgentManageRangeList)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98604, "数据不存在或已被删除")); } - List taxAgentIds = taxAgentManageRanges.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList()); + List taxAgentIds = taxAgentManageRangeList.stream().map(TaxAgentManageRangePO::getTaxAgentId).distinct().collect(Collectors.toList()); if (taxAgentIds.size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110159, "一次只能删一个个税个税扣缴义务人的范围")); } - taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds); + List taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds); List allManageRanges = taxAgentManageRanges.stream().filter(f -> !ids.contains(f.getId())).collect(Collectors.toList()); List allRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.TAXAGENT.getValue())).collect(Collectors.toList()); // List allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList()); Long taxAgentId = taxAgentIds.get(0); + TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxAgentId); List salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ORG); List allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees); @@ -554,9 +592,21 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM // 删除管理范围 getTaxAgentManageRangeMapper().deleteByIds(ids); + // 记录操作日志 + taxAgentManageRangeList.stream().forEach(range -> { + String name = taxAgentPO.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTaxAgentId(); + SalaryLoggerUtil.recordDeleteSingleLog(SalaryElogConfig.taxAgentLoggerTemplate, + range.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "删除人员范围"), + SalaryI18nUtil.getI18nLabel(0, "删除人员范围") + name, + range, + user); + }); + + /** 同步本地人员范围的关联人员=========================== */ syncLocalEmp(taxAgentId, allSalaryEmployees, false); - // 记录日志 todo } @Override @@ -858,6 +908,13 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM // 查询已有的管理范围 List taxAgentManageAllRanges = listByTaxAgentId(taxAgentId); List taxAgentManageRanges = taxAgentManageAllRanges.stream().filter(f -> f.getIncludeType().equals(taxAgentRangeSaveParam.getIncludeType())).collect(Collectors.toList()); + List oldManageList = new ArrayList<>(); + taxAgentManageRanges.stream().forEach(p -> { + TaxAgentManageRangePO target = new TaxAgentManageRangePO(); + BeanUtils.copyProperties(p, target); + oldManageList.add(target); + }); + // 处理一下本次的保存参数(如果原来添加过对应的人员(/部门/岗位),那么本次不需要新增,只需要更新) TaxAgentBO.Result result = TaxAgentBO.handleTaxAgentRange(taxAgentManageRanges, taxAgentRangeSaveParam, taxAgent.getId(), (long) user.getUID(), true); @@ -873,10 +930,36 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM /* 检查当前个税扣缴义务人的所有人员范围与所有分管理员的管理范围===========================end */ if (CollectionUtils.isNotEmpty(result.getNeedInsertTaxAgentManageRanges())) { - result.getNeedInsertTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().insertIgnoreNull(range)); + result.getNeedInsertTaxAgentManageRanges().forEach(range -> { + getTaxAgentManageRangeMapper().insertIgnoreNull(range); + // 记录操作日志 + String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTargetId(); + SalaryLoggerUtil.recordAddSingleLog(SalaryElogConfig.taxAgentLoggerTemplate, + range.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "新增人员范围"), + SalaryI18nUtil.getI18nLabel(0, "新增人员范围") + name, + range, + user); + }); } if (CollectionUtils.isNotEmpty(result.getNeedUpdateTaxAgentManageRanges())) { - result.getNeedUpdateTaxAgentManageRanges().forEach(range -> getTaxAgentManageRangeMapper().updateIgnoreNull(range)); + Map oldMap = SalaryEntityUtil.convert2Map(oldManageList, TaxAgentManageRangePO::getId); + result.getNeedUpdateTaxAgentManageRanges().forEach(range -> { + getTaxAgentManageRangeMapper().updateIgnoreNull(range); + // 记录操作日志 + TaxAgentManageRangePO oldPO = oldMap.getOrDefault(range.getId(), TaxAgentManageRangePO.builder().build()); + String name = taxAgent.getName() + "_" + TargetTypeEnum.parseByValue(range.getTargetType()).getDefaultLabel() + "_" + range.getTargetId(); + SalaryLoggerUtil.recordUpdateSingleLog(SalaryElogConfig.taxAgentLoggerTemplate, + range.getId(), + name, + SalaryI18nUtil.getI18nLabel(0, "更新人员范围"), + SalaryI18nUtil.getI18nLabel(0, "更新人员范围") + name, + oldPO, + range, + user); + }); + } /* 同步本地人员范围的关联人员=========================== */ diff --git a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java index 63636d810..1ec8469ab 100644 --- a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java @@ -4,7 +4,9 @@ import com.engine.common.service.HrmCommonService; import com.engine.common.service.impl.HrmCommonServiceImpl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryAuthConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.AddUpSituation; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -24,6 +26,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentAdminChangeCheckParam; import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.param.TaxAgentSaveParam; import com.engine.salary.entity.taxagent.po.*; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum; @@ -347,13 +350,15 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { getTaxAgentAdminService(user).batchInsert(taxAgent.getId(), saveParam.getAdminUserIds()); } // 记录日志 -// SalaryLoggerUtil.recordAddSingleLog(taxAgentLoggerTemplate, -// taxAgent.getId(), -// taxAgent.getName(), -// SalaryI18nUtil.getI18nLabel( 93766, "新增个税扣缴义务人"), -// SalaryI18nUtil.getI18nLabel( 93766, "新增个税扣缴义务人"), -// taxAgent); - + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(taxAgent.getId().toString()); + loggerContext.setTargetName(taxAgent.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增个税扣缴义务人")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增个税扣缴义务人")); + loggerContext.setNewValues(taxAgent); + SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext); return StringUtils.EMPTY + taxAgent.getId(); } @@ -402,13 +407,16 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { getTaxAgentAdminService(user).batchInsert(saveParam.getId(), saveParam.getAdminUserIds()); } // 记录日志 -// SalaryLoggerUtil.recordUpdateSingleLog(taxAgentLoggerTemplate, -// taxAgent.getId(), -// taxAgentNew.getName(), -// SalaryI18nUtil.getI18nLabel(93767, "编辑个税扣缴义务人"), -// SalaryI18nUtil.getI18nLabel(93767, "编辑个税扣缴义务人"), -// taxAgent, -// taxAgentNew); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(taxAgentNew.getId().toString()); + loggerContext.setTargetName(taxAgentNew.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑个税扣缴义务人")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑个税扣缴义务人")); + loggerContext.setOldValues(taxAgent); + loggerContext.setNewValues(taxAgentNew); + SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext); return StringUtils.EMPTY; } @@ -460,13 +468,18 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { getTaxAgentMapper().deleteByIds(ids); // 记录日志 -// taxAgents.forEach(e -> SalaryLoggerUtil.recordDeleteSingleLog(taxAgentLoggerTemplate, -// e.getId(), -// e.getName(), -// SalaryI18nUtil.getI18nLabel(100546, "删除个税扣缴义务人"), -// SalaryI18nUtil.getI18nLabel(100546, "删除个税扣缴义务人") + ":" + e.getName(), -// e)); + taxAgents.forEach(e ->{ + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(e.getId().toString()); + loggerContext.setTargetName(e.getName()); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除个税扣缴义务人")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "删除个税扣缴义务人")); + loggerContext.setOldValues(e); + SalaryElogConfig.taxAgentLoggerTemplate.write(loggerContext); + }); return StringUtils.EMPTY; } diff --git a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java index c9eb8796a..7528418f8 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java @@ -2,17 +2,23 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationAnnualListDTO; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO; import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper; +import com.engine.salary.service.TaxAgentService; import com.engine.salary.service.TaxDeclarationDetailService; import com.engine.salary.service.TaxDeclarationExcelService; import com.engine.salary.service.TaxDeclarationService; import com.engine.salary.util.JsonUtil; +import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelUtil; @@ -47,6 +53,10 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar return ServiceUtil.getService(TaxDeclarationServiceImpl.class, user); } + private TaxAgentService getTaxAgentService(User user) { + return ServiceUtil.getService(TaxAgentServiceImpl.class, user); + } + @Override @@ -128,6 +138,20 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar } } } + + // 查询个税扣缴义务人名称 + String bar = "_"; + TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxDeclarationPO.getTaxAgentId()); + String targetName = SalaryDateUtil.getFormatYearMonth(taxDeclarationPO.getSalaryMonth()) + bar + taxAgentPO.getName() + bar + IncomeCategoryEnum.parseByValue(taxDeclarationPO.getIncomeCategory()).getDefaultLabel(); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(taxDeclarationId.toString()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "导出个税申报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "导出个税申报表")); + SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext); return ExcelUtil.genWorkbookV2(rows, sheetName); } diff --git a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java index 3835fe2f7..e44a9e345 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java @@ -3,6 +3,8 @@ package com.engine.salary.service.impl; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; @@ -12,7 +14,9 @@ import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationBO; import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam; import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam; import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; +import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.AddUpSituationMapper; import com.engine.salary.mapper.salaryacct.SalaryAcctRecordMapper; @@ -259,6 +263,20 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration log.info("salary TaxDeclaration step4 AcctRecordStatus save {}", salaryAcctRecordIds.size()); } getSalaryAcctRecordService(user).updateStatusByIds(salaryAcctRecordIds, SalaryAcctRecordStatusEnum.DECLARED); + + // 记录日志 + result.getNeedInsertTaxDeclarations().stream().forEach(declare -> { + String taxAgentName = taxAgentNameMap.getOrDefault(declare.getTaxAgentId(), ""); + String targetName = SalaryDateUtil.getFormatYearMonth(declare.getSalaryMonth()) + " " + taxAgentName + " " + IncomeCategoryEnum.parseByValue(declare.getIncomeCategory()).getDefaultLabel(); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(declare.getId().toString()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "生成个税申报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "生成个税申报表")); + SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext); + }); } @Override @@ -334,5 +352,19 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration if(CollectionUtils.isNotEmpty(salaryAcctRecordIds)){ getSalaryAcctRecordService(user).updateStatusByIds(salaryAcctRecordIds,SalaryAcctRecordStatusEnum.ARCHIVED); } + + // 查询个税扣缴义务人名称 + String bar = "_"; + TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(po.getTaxAgentId()); + String targetName = SalaryDateUtil.getFormatYearMonth(po.getSalaryMonth()) + bar + taxAgentPO.getName() + bar + IncomeCategoryEnum.parseByValue(po.getIncomeCategory()).getDefaultLabel(); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(taxDeclarationId.toString()); + loggerContext.setTargetName(targetName); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "撤回个税申报表")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "撤回个税申报表")); + SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext); } } diff --git a/src/com/engine/salary/util/SalaryLoggerUtil.java b/src/com/engine/salary/util/SalaryLoggerUtil.java index e6d49943f..6d35bd851 100644 --- a/src/com/engine/salary/util/SalaryLoggerUtil.java +++ b/src/com/engine/salary/util/SalaryLoggerUtil.java @@ -4,6 +4,7 @@ package com.engine.salary.util; import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.elog.util.LoggerTemplate; import com.engine.salary.enums.OperateTypeEnum; +import weaver.hrm.User; /** * 操作日志工具类 @@ -23,9 +24,10 @@ public class SalaryLoggerUtil { * @param operateTypeName * @param operatedesc * @param newValues + * @param user */ - public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues) { - recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues); + public static void recordAddSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object newValues, User user) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.ADD.getValue(), operateTypeName, operatedesc, null, newValues, user); } /** @@ -37,9 +39,10 @@ public class SalaryLoggerUtil { * @param operatedesc * @param oldValues * @param newValues + * @param user */ - public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { - recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues); + public static void recordUpdateSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, Object newValues, User user) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.UPDATE.getValue(), operateTypeName, operatedesc, oldValues, newValues, user); } /** @@ -50,9 +53,23 @@ public class SalaryLoggerUtil { * @param operateTypeName * @param operatedesc * @param oldValues + * @param user */ - public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues) { - recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null); + public static void recordDeleteSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, Object oldValues, User user) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.DELETE.getValue(), operateTypeName, operatedesc, oldValues, null, user); + } + + /** + * 记录单个对象导出操作日志 + * @param loggerTemplate + * @param targetId + * @param targetName + * @param operateTypeName + * @param operatedesc + * @param user + */ + public static void recordExportSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateTypeName, String operatedesc, User user) { + recoreSingleLog(loggerTemplate, targetId, targetName, OperateTypeEnum.EXCEL_EXPORT.getValue(), operateTypeName, operatedesc, null, null, user); } /** @@ -66,8 +83,9 @@ public class SalaryLoggerUtil { * @param oldValues * @param newValues */ - private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues) { + private static void recoreSingleLog(LoggerTemplate loggerTemplate, Long targetId, String targetName, String operateType, String operateTypeName, String operatedesc, Object oldValues, Object newValues, User user) { LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(targetId)); loggerContext.setTargetName(targetName); loggerContext.setOperateType(operateType); diff --git a/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java b/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java index 42faf9c9b..8b1ff0f6e 100644 --- a/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java @@ -2,6 +2,8 @@ package com.engine.salary.wrapper; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveItemFormDTO; import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO; @@ -14,6 +16,7 @@ import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO; import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum; @@ -318,6 +321,16 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason())); }); + // 记录查看日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + // TODO 我的调薪记录setTargetId + // loggerContext.setTargetId(); + loggerContext.setTargetName("我的调薪记录"); + loggerContext.setOperateType(OperateTypeEnum.READ.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "查看调薪记录")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看调薪记录")); + SalaryElogConfig.myAdjustRecordLoggerTemplate.write(loggerContext); return list; } diff --git a/src/com/engine/salary/wrapper/SalaryFieldWrapper.java b/src/com/engine/salary/wrapper/SalaryFieldWrapper.java index 38f53c4fb..5edef7f36 100644 --- a/src/com/engine/salary/wrapper/SalaryFieldWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryFieldWrapper.java @@ -2,6 +2,8 @@ package com.engine.salary.wrapper; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryformula.ExpressFormula; import com.engine.salary.entity.salaryitem.bo.SalaryItemBO; import com.engine.salary.entity.salaryitem.dto.SalaryFieldListDTO; @@ -11,10 +13,7 @@ import com.engine.salary.entity.salaryitem.param.SalaryItemSaveParam; import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO; -import com.engine.salary.enums.SalaryOnOffEnum; -import com.engine.salary.enums.SalaryRoundingModeEnum; -import com.engine.salary.enums.SalarySystemTypeEnum; -import com.engine.salary.enums.SalaryValueTypeEnum; +import com.engine.salary.enums.*; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.SalaryFormulaService; @@ -173,7 +172,17 @@ public class SalaryFieldWrapper extends Service { ValidUtil.doValidator(saveParam); validParam(saveParam); - getSalaryItemService(user).save(saveParam); + SalaryItemPO salaryItemPO = getSalaryItemService(user).save(saveParam); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建字段") + ": " + salaryItemPO.getName()); + loggerContext.setNewValues(salaryItemPO); + SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext); } private void validParam(SalaryItemSaveParam saveParam) { @@ -205,7 +214,20 @@ public class SalaryFieldWrapper extends Service { ValidUtil.doValidator(saveParam, RuntimeTypeEnum.UPDATE); validParam(saveParam); - getSalaryItemService(user).update(saveParam); + SalaryItemPO salaryItemPO = getSalaryItemService(user).update(saveParam); + + // 记录日志 + SalaryItemPO newSalaryItemPO = getSalaryItemService(user).getById(salaryItemPO.getId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); + loggerContext.setTargetName(newSalaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑字段") + ": " + newSalaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + loggerContext.setNewValues(newSalaryItemPO); + SalaryElogConfig.salaryArchiveFieldLoggerTemplate.write(loggerContext); } /** diff --git a/src/com/engine/salary/wrapper/SalaryItemWrapper.java b/src/com/engine/salary/wrapper/SalaryItemWrapper.java index 1cf40c5da..12e333331 100644 --- a/src/com/engine/salary/wrapper/SalaryItemWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryItemWrapper.java @@ -3,6 +3,8 @@ package com.engine.salary.wrapper; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.component.WeaFormOption; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.entity.salaryformula.ExpressFormula; import com.engine.salary.entity.salaryitem.bo.SalaryItemBO; import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO; @@ -221,7 +223,17 @@ public class SalaryItemWrapper extends Service { ValidUtil.doValidator(saveParam); validParam(saveParam); - getSalaryItemService(user).save(saveParam); + SalaryItemPO salaryItemPO = getSalaryItemService(user).save(saveParam); + // 记录日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(salaryItemPO.getId())); + loggerContext.setTargetName(salaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新建薪资项目") + ": " + salaryItemPO.getName()); + loggerContext.setNewValues(salaryItemPO); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); } private void validParam(SalaryItemSaveParam saveParam) { @@ -250,7 +262,20 @@ public class SalaryItemWrapper extends Service { public void update(SalaryItemSaveParam saveParam) { ValidUtil.doValidator(saveParam, RuntimeTypeEnum.UPDATE); validParam(saveParam); - getSalaryItemService(user).update(saveParam); + SalaryItemPO salaryItemPO = getSalaryItemService(user).update(saveParam); + + // 记录日志 + SalaryItemPO newSalaryItemPO = getSalaryItemService(user).getById(salaryItemPO.getId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(newSalaryItemPO.getId())); + loggerContext.setTargetName(newSalaryItemPO.getName()); + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑字段")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑字段") + ": " + newSalaryItemPO.getName()); + loggerContext.setOldValues(salaryItemPO); + loggerContext.setNewValues(newSalaryItemPO); + SalaryElogConfig.salaryItemLoggerTemplate.write(loggerContext); } /** From 75dd4235afe6d2558b9f821d6ecebdac61c02e27 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 22 Feb 2024 09:33:35 +0800 Subject: [PATCH 108/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E8=A1=A5=E7=BC=B4?= =?UTF-8?q?=E3=80=81=E8=A1=A5=E5=B7=AE=E3=80=81=E9=80=80=E5=B7=AE=E9=A1=B5?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E6=93=8D=E4=BD=9C=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/SIAccountService.java | 4 +- .../service/impl/SIAccountServiceImpl.java | 152 ++++++++++++------ .../service/impl/SIArchivesServiceImpl.java | 12 ++ .../service/impl/SIBalanceServiceImpl.java | 43 ++++- .../impl/SICompensationServiceImpl.java | 8 +- .../service/impl/SIExportServiceImpl.java | 22 ++- .../service/impl/SIRecessionServiceImpl.java | 36 ++++- .../service/impl/SISchemeServiceImpl.java | 6 +- .../salary/web/SIAccountController.java | 4 +- 9 files changed, 220 insertions(+), 67 deletions(-) diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java index 6a496845b..2dcb63401 100644 --- a/src/com/engine/salary/service/SIAccountService.java +++ b/src/com/engine/salary/service/SIAccountService.java @@ -123,9 +123,9 @@ public interface SIAccountService { /** * 删除补缴人员 - * @param supplementAccountBaseParams + * @param param */ - void deleteSummplementaryAccount(List supplementAccountBaseParams); + void deleteSupplementaryAccount(SaveCommonAccountParam param); /** * 台账归档 diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index a112960ab..9fb0a7314 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -670,11 +670,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } @Override - public void deleteSummplementaryAccount(List supplementAccountBaseParams) { + public void deleteSupplementaryAccount(SaveCommonAccountParam param) { // Long employeeId = (long) user.getUID(); // String currentUserName = user.getLastname(); // getSiAccountBiz(user).deleteSupplementaryAccount(supplementAccountBaseParams, employeeId, currentUserName); - siDeleteSupplementaryAccount(supplementAccountBaseParams); + siDeleteSupplementaryAccount(param); } @Override @@ -1854,6 +1854,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (updateInsuranceAccountDetailList.size() > 0) { refreshBillBatch(updateInsuranceAccountDetailList.get(0).getPaymentOrganization(), updateInsuranceAccountDetailList.get(0).getBillMonth()); //记录操作日志 + PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(updateInsuranceAccountDetailList.get(0).getPaymentStatus(), PaymentStatusEnum.values(), PaymentStatusEnum.class); encryptUtil.decryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class); InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(updateInsuranceAccountDetailList.get(0).getBillMonth(), updateInsuranceAccountDetailList.get(0).getPaymentOrganization()); TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); @@ -1862,8 +1863,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入") + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入") + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导入" + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())) + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); updateInsuranceAccountDetailList.forEach(loggerContext::setNewValues); SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); @@ -3315,6 +3318,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class); + InsuranceAccountDetailPO oldTargetPO = new InsuranceAccountDetailPO(); + BeanUtils.copyProperties(insuranceAccountDetailPO, oldTargetPO); + accountSocialByData(insuranceAccountDetailPO, param); accountFundByData(insuranceAccountDetailPO, param); accountOtherByData(insuranceAccountDetailPO, param); @@ -3326,6 +3332,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //刷新_bill_batch表中的统计信息 refreshBillBatch(insuranceAccountDetailPO.getPaymentOrganization(), insuranceAccountDetailPO.getBillMonth()); //记录操作日志 + PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(insuranceAccountDetailPO.getPaymentStatus(), PaymentStatusEnum.values(), PaymentStatusEnum.class); encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class); InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(insuranceAccountDetailPO.getBillMonth(), insuranceAccountDetailPO.getPaymentOrganization()); TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); @@ -3334,10 +3341,13 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername()); - loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑") + loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑") + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-编辑" + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())) + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername()); + loggerContext.setOldValues(oldTargetPO); loggerContext.setNewValues(insuranceAccountDetailPO); SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } @@ -3747,6 +3757,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po); updateByEmployeeIdAndBillMonth(po); } + //记录操作日志 + encryptUtil.decryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class); + InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-补差导入更新")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-补差导入更新") + + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + updateInsuranceAccountDetailList.forEach(loggerContext::setNewValues); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } if (createInsuranceAccountDetailList.size() > 0) { paymentOrganization = createInsuranceAccountDetailList.get(0).getPaymentOrganization(); @@ -3759,6 +3783,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //新增 List> createPartition = Lists.partition((List) createInsuranceAccountDetailList, 20); createPartition.forEach(getInsuranceAccountDetailMapper()::batchSaveAccountDetails); + //记录操作日志 + encryptUtil.decryptList(createInsuranceAccountDetailList, InsuranceAccountDetailPO.class); + InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-补差导入新增")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-补差导入新增") + + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + createInsuranceAccountDetailList.forEach(loggerContext::setNewValues); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } //刷新bill_batch表中统计信息 @@ -5414,19 +5452,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { insuranceAccountBatchPO.setOtherPay(otherSum.toPlainString()); encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO); - //记录操作日志 - encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); - TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountBatchPO.getPaymentOrganization()); - LoggerContext loggerContext = new LoggerContext(); - loggerContext.setUser(user); - loggerContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); - loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth()); - loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新福利台账")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新福利台账") - + ":" + taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth()); - loggerContext.setNewValues(insuranceAccountBatchPO); - SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); +// //记录操作日志 +// encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); +// TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(insuranceAccountBatchPO.getPaymentOrganization()); +// LoggerContext loggerContext = new LoggerContext(); +// loggerContext.setUser(user); +// loggerContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); +// loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth()); +// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); +// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "更新福利台账")); +// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "更新福利台账") +// + ":" + taxAgentInfo.getName() + "-" + insuranceAccountBatchPO.getBillMonth()); +// loggerContext.setNewValues(insuranceAccountBatchPO); +// SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } public void siFile(String billMonth, Long paymentOrganization) { @@ -6035,48 +6073,66 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // insuranceSchemeContext.setNewValues(item); // siAccountLoggerTemplate.write(insuranceSchemeContext); // }); + //记录操作日志 + encryptUtil.decryptList(pos, InsuranceAccountDetailPO.class); + InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(pos.get(0).getBillMonth(), pos.get(0).getPaymentOrganization()); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + pos.forEach(targetDetailPO -> { + DataCollectionEmployee empInfo = getEmployMapper().getEmployeeById(targetDetailPO.getEmployeeId()); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setTargetId("" + targetPO.getId()); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补缴")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补缴") + + ": " + taxAgentInfo.getName() + "-" + targetPO.getBillMonth() + "-" + empInfo.getUsername()); + loggerContext.setNewValues(targetDetailPO); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); + }); } public void siDeleteCommonAccount(SaveCommonAccountParam param) { ValidUtil.doValidator(param); - SalaryAssert.notEmpty(param.getIncludes(), SalaryI18nUtil.getI18nLabel(0, "参数错误")); //根据id批量删除 if (param.getIds().size() > 0) { getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds()); } else { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "请勾选需要删除的数据项!")); } - //记录日志 -// LoggerContext insuranceSchemeContext = new LoggerContext(); -// insuranceSchemeContext.setTargetId(String.join(",", param.getIncludes().stream().map(item -> String.valueOf(item)).collect(Collectors.toList()))); -// insuranceSchemeContext.setTargetName(param.getBillMonth()); -// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); -// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100462, "新增台账")); -// insuranceSchemeContext.setNewValues(param); -// siAccountLoggerTemplate.write(insuranceSchemeContext); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除正常缴纳核算记录")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除正常缴纳核算记录")); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); + updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build()); } - public void siDeleteSupplementaryAccount(List param) { - SalaryAssert.notEmpty(param, SalaryI18nUtil.getI18nLabel(0, "参数错误")); - boolean valid = param.stream().anyMatch(item -> item.getEmployeeId() == null - || StringUtils.isBlank(item.getSupplementaryMonth()) - || StringUtils.isBlank(item.getBillMonth())); - if (valid) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误")); + public void siDeleteSupplementaryAccount(SaveCommonAccountParam param) { + ValidUtil.doValidator(param); + //根据id批量删除 + if (param.getIds().size() > 0) { + getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds()); + } else { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "请勾选需要删除的数据项!")); } - getInsuranceAccountDetailMapper().batchDelSupplementDetailsByIds(param); -// param.stream().forEach(item -> { -// LoggerContext insuranceSchemeContext = new LoggerContext(); -// insuranceSchemeContext.setTargetName(item.getBillMonth()); -// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录")); -// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100490, "删除补缴核算记录")); -// insuranceSchemeContext.setNewValues(item); -// siAccountLoggerTemplate.write(insuranceSchemeContext); -// }); - updateBatchAccount(AccountParam.builder().billMonth(param.get(0).getBillMonth()).paymentOrganization(param.get(0).getPaymentOrganization()).build()); + getInsuranceAccountDetailMapper().batchDelAccountDetailsByIds(param.getIds()); + //记录操作日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补缴核算记录")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补缴核算记录")); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); + + updateBatchAccount(AccountParam.builder().billMonth(param.getBillMonth()).paymentOrganization(param.getPaymentOrganization()).build()); } public void accountInspect(Collection ids, String billMonth, Long paymentOrganization) { diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index a8aaa54c5..ec14fa7f9 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -2870,6 +2870,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .otherEndTime(org.apache.commons.lang.StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null) .employeeId(param.getEmployeeId()) .deleteType(DeleteTypeEnum.NOT_DELETED.getValue()) + .createTime(oldOtherInfo.getCreateTime()) .updateTime(new Date()) .nonPayment(param.getNonPayment()) .creator(employeeId) @@ -2969,6 +2970,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细保存")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-其他福利明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + if (oldOtherInfoList.size() == 1) { + loggerContext.setOldValues(oldOtherInfoList.get(0)); + } loggerContext.setNewValues(targetDetailPO); SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); //生成福利档案基数调整记录数据 @@ -3032,6 +3036,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) .underTake(param.getUnderTake()) .paymentOrganization(param.getPaymentOrganization()) + .createTime(oldFundInfo.getCreateTime()) .updateTime(new Date()) .welfareType(paramReq.getWelfareType().getValue()) .employeeId(param.getEmployeeId()) @@ -3131,6 +3136,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细保存")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-公积金明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + if (oldFundInfoList.size() == 1) { + loggerContext.setOldValues(oldFundInfoList.get(0)); + } loggerContext.setNewValues(targetDetailPO); SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); //生成福利档案基数调整记录数据 @@ -3197,6 +3205,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService .nonPayment(param.getNonPayment()) .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) .employeeId(param.getEmployeeId()) + .createTime(oldSocialInfo.getCreateTime()) .updateTime(new Date()) .underTake(param.getUnderTake()) .socialAccount(param.getSchemeAccount()) @@ -3297,6 +3306,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细保存")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利档案-社保明细保存") + ": " + taxAgentInfo.getName() + "-" + empInfo.getUsername()); + if (oldSocialInfoList.size() == 1) { + loggerContext.setOldValues(oldSocialInfoList.get(0)); + } loggerContext.setNewValues(targetDetailPO); SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); //生成福利档案基数调整记录数据 diff --git a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java index 28387d55c..6e746c358 100644 --- a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java @@ -4,15 +4,20 @@ import com.alibaba.fastjson.JSON; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.param.BalanceAccountBaseParam; import com.engine.salary.entity.siaccount.param.EditAccountDetailParam; import com.engine.salary.entity.siaccount.param.InspectAccountParam; +import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.siarchives.po.*; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.siaccount.ResourceFromEnum; @@ -21,6 +26,7 @@ import com.engine.salary.enums.sicategory.IsPaymentEnum; import com.engine.salary.enums.sicategory.PaymentScopeEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; import com.engine.salary.mapper.siarchives.FundSchemeMapper; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; @@ -28,6 +34,7 @@ import com.engine.salary.mapper.siarchives.OtherSchemeMapper; import com.engine.salary.mapper.siarchives.SocialSchemeMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper; +import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SIAccountService; import com.engine.salary.service.SIBalanceService; import com.engine.salary.util.SalaryEntityUtil; @@ -87,6 +94,14 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { private EncryptUtil encryptUtil = new EncryptUtil(); + private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() { + return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class); + } + + private TaxAgentMapper getTaxAgentMapper() { + return MapperProxyFactory.getProxy(TaxAgentMapper.class); + } + @Override public void del(InspectAccountParam param, Long employeeId) { @@ -98,7 +113,15 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { //根据id删除 List> partition = Lists.partition((List) param.getIds(), 100); partition.forEach(getInsuranceAccountDetailMapper()::batchDelAccountDetailsByIds); - + //记录操作日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setTargetName(param.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补差核算记录")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除补差核算记录")); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); //刷新bill_batch表中统计信息 getSIAccountService(user).refreshBillBatch(param.getPaymentOrganization(), param.getBillMonth()); } @@ -260,14 +283,14 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { Long creator = (long) user.getUID(); Long paymentOrganization = param.getPaymentOrganization(); - InsuranceAccountDetailPO banlanceAccountPO = getInsuranceAccountDetailMapper().getOneByBpep(InsuranceAccountDetailPO.builder() + InsuranceAccountDetailPO balanceAccountPO = getInsuranceAccountDetailMapper().getOneByBpep(InsuranceAccountDetailPO.builder() .billMonth(billMonth) .paymentStatus(PaymentStatusEnum.BALANCE.getValue()) .employeeId(employeeId) .paymentOrganization(paymentOrganization) .build()); - if (banlanceAccountPO != null) { + if (balanceAccountPO != null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据已存在,不可重复新增!")); } @@ -324,6 +347,20 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { //刷新bill_batch表中统计信息 getSIAccountService(user).refreshBillBatch(paymentOrganization, billMonth); + //记录操作日志 + encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class); + InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补差")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增补差") + + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + loggerContext.setNewValues(insuranceAccountDetailPO); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } else { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!")); } diff --git a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java index b7521eb82..b83448c67 100644 --- a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java @@ -476,8 +476,8 @@ public class SICompensationServiceImpl extends Service implements SICompensation loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(taxAgentInfo.getName() + "-" + insuranceAccountDetailPO.getBillMonth() + "-" + empInfo.getUsername()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-新增调差")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-新增调差") + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增调差")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增调差") + ":" + taxAgentInfo.getName() + "-" + insuranceAccountDetailPO.getBillMonth() + "-" + empInfo.getUsername()); loggerContext.setNewValues(insuranceCompensationPO); SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); @@ -530,8 +530,8 @@ public class SICompensationServiceImpl extends Service implements SICompensation loggerContext.setTargetId(String.valueOf(param.get(0).getPaymentOrganization())); loggerContext.setTargetName(taxAgentInfo.getName()); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-保存社保调差默认配置")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-保存社保调差默认配置") + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-保存社保调差默认配置")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-保存社保调差默认配置") + ":" + taxAgentInfo.getName()); configList.forEach(loggerContext::setNewValues); SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index f3432aa33..3ec48edbb 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -5,6 +5,8 @@ import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam; @@ -13,6 +15,7 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.siexport.param.InsuranceExportParam; import com.engine.salary.entity.siexport.po.AccountExportPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.siaccount.ResourceFromEnum; @@ -149,8 +152,13 @@ public class SIExportServiceImpl extends Service implements SIExportService { rows.add(row); } excelSheetData.addAll(rows); - - + //记录操作日志 + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账-导出总览")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账-导出总览")); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); return ExcelUtil.genWorkbookV2(excelSheetData, sheetName); } @@ -248,6 +256,16 @@ public class SIExportServiceImpl extends Service implements SIExportService { } excelSheetData.addAll(rows); + //记录操作日志 + PaymentStatusEnum targetEnum = SalaryEnumUtil.enumMatchByValue(paymentStatus, PaymentStatusEnum.values(), PaymentStatusEnum.class); + LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); + loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导出") + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-导出") + + SalaryI18nUtil.getI18nLabel(targetEnum.getLabelId(), targetEnum.getDefaultLabel())); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName, total); } diff --git a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java index e9a446dac..494838d25 100644 --- a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.config.SalaryElogConfig; +import com.engine.salary.elog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.hrm.dto.HrmInfoDTO; import com.engine.salary.entity.hrm.param.HrmQueryParam; @@ -12,6 +14,8 @@ import com.engine.salary.entity.siaccount.param.RecessionParam; import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; +import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.siaccount.ProjectTypeEnum; @@ -20,6 +24,7 @@ import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; +import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SIAccountService; import com.engine.salary.service.SIRecessionService; import com.engine.salary.service.TaxAgentService; @@ -65,6 +70,11 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() { return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class); } + + private TaxAgentMapper getTaxAgentMapper() { + return MapperProxyFactory.getProxy(TaxAgentMapper.class); + } + @Override public void save(RecessionParam param, Long employeeId) { @@ -112,13 +122,25 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic //删除已有退差记录 finalRecessionDetails.forEach(getInsuranceAccountDetailMapper()::deleteRecessionData); - //入库新数据 List> partition = Lists.partition((List) finalRecessionDetails, 20); partition.forEach(getInsuranceAccountDetailMapper()::batchSaveAccountDetails); - //刷新bill_batch表中统计信息 getSIAccountService(user).refreshBillBatch(Long.valueOf(param.getPaymentOrganization()), param.getBillMonth()); + //记录操作日志 + encryptUtil.decryptList(finalRecessionDetails, InsuranceAccountDetailPO.class); + InsuranceAccountBatchPO targetPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), Long.valueOf(param.getPaymentOrganization())); + TaxAgentPO taxAgentInfo = getTaxAgentMapper().getById(targetPO.getPaymentOrganization()); + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(String.valueOf(targetPO.getId())); + loggerContext.setTargetName(taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增退差")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-新增退差") + + ":" + taxAgentInfo.getName() + "-" + targetPO.getBillMonth()); + finalRecessionDetails.forEach(loggerContext::setNewValues); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); } } @@ -137,7 +159,15 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic //根据id删除 List> partition = Lists.partition((List) ids, 100); partition.forEach(getInsuranceAccountDetailMapper()::batchDelAccountDetailsByIds); - + //记录操作日志 + LoggerContext loggerContext = new LoggerContext(); + loggerContext.setUser(user); + loggerContext.setTargetId(ids.stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setTargetName(ids.stream().map(String::valueOf).collect(Collectors.joining(","))); + loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue()); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除退差核算记录")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利台账明细表-删除退差核算记录")); + SalaryElogConfig.siAccountLoggerTemplate.write(loggerContext); //刷新bill_batch表中统计信息 getSIAccountService(user).refreshBillBatch(refreshTargetPO.getPaymentOrganization(), refreshTargetPO.getBillMonth()); } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 491850815..5f921e0ba 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -632,7 +632,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { rows.add(row); } //记录操作日志 - LoggerContext loggerContext = new LoggerContext<>(); + LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "福利档案导出")); @@ -2511,7 +2511,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { getInsuranceSchemeMapper().update(insuranceSchemePO1); //记录主表操作日志 loggerContext.setNewValues(insuranceSchemePO1); - SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); + SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); //更新福利方案明细表 先删后插 getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId())); //更新明细表 @@ -2527,7 +2527,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceSchemeDetailContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "修改福利方案明细表")); insuranceSchemeDetailContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "福利方案明细")); insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailContext::setNewValues); - SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(insuranceSchemeDetailContext); + SalaryElogConfig.siSchemeLoggerTemplate.write(insuranceSchemeDetailContext); } diff --git a/src/com/engine/salary/web/SIAccountController.java b/src/com/engine/salary/web/SIAccountController.java index ab9a41c9c..4e49abfa9 100644 --- a/src/com/engine/salary/web/SIAccountController.java +++ b/src/com/engine/salary/web/SIAccountController.java @@ -315,9 +315,9 @@ public class SIAccountController { @Path("/supplementary/delete") @Produces(MediaType.APPLICATION_JSON) public String deleteSummplementaryAccount(@Context HttpServletRequest request, @Context HttpServletResponse response, - @RequestBody List param) { + @RequestBody SaveCommonAccountParam param) { User user = HrmUserVarify.getUser(request, response); - return new ResponseResult, String>(user).run(getService(user)::deleteSummplementaryAccount, param); + return new ResponseResult(user).run(getService(user)::deleteSupplementaryAccount, param); } From f591074fc15c7b66e2f9b21608665dc0fe3c1fb1 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 22 Feb 2024 09:43:47 +0800 Subject: [PATCH 109/169] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salarysob/po/SalarySobItemPO.java | 2 ++ .../entity/salarysob/po/SalarySobPO.java | 34 +++++++++++++++++++ .../impl/SalarySobItemServiceImpl.java | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java index e3167bc23..47d8938ef 100644 --- a/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.salarysob.po; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.SalaryRoundingModeEnum; import com.engine.salary.enums.SalaryValueTypeEnum; import lombok.AllArgsConstructor; @@ -23,6 +24,7 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_salary_sob_item +@ElogTransform( name="薪资账套薪资项目" ) public class SalarySobItemPO { /** diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobPO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobPO.java index 921fad01c..68712f06c 100644 --- a/src/com/engine/salary/entity/salarysob/po/SalarySobPO.java +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.salarysob.po; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -17,77 +18,110 @@ import java.util.Date; @Accessors(chain = true) @NoArgsConstructor @AllArgsConstructor +@ElogTransform( name="薪资账套" ) //hrsa_salary_sob public class SalarySobPO { + /** * 主键id */ + @ElogTransform( name="主键" ) private Long id; + /** * 名称 */ + @ElogTransform( name="名称" ) private String name; /** * 个税扣缴义务人的主键id */ + @ElogTransform( name="个税扣缴义务人id" ) private Long taxAgentId; /** * 应税项目。1:正常工资薪金所得 */ + @ElogTransform( name="薪资类型" ) private Integer incomeCategory; + /** * 薪资周期。1:上上月、2:上月、3:本月、4:下月 */ + @ElogTransform( name="薪资周期" ) private Integer salaryCycleType; + /** * 薪资周期的起始日期 */ + @ElogTransform( name="薪资周期起始日期" ) private Integer salaryCycleFromDay; + /** * 税款所属期。1:上上月、2:上月、3:本月、4:下月 */ + @ElogTransform( name="税款所属期" ) private Integer taxCycleType; + /** * 考勤周期。1:上上月、2:上月、3:本月、4:下月 */ + @ElogTransform( name="考勤周期" ) private Integer attendCycleType; + /** * 考勤周期的起始日期 */ + @ElogTransform( name="考勤周期起始日期" ) private Integer attendCycleFromDay; + /** * 社保福利所属期。1:上上月、2:上月、3:本月、4:下月 */ + @ElogTransform( name="社保福利所属期" ) private Integer socialSecurityCycleType; + /** * 是否禁用。0:正常使用、1:禁用 */ + @ElogTransform( name="是否禁用" ) private Integer disable; + /** * 描述 */ + @ElogTransform( name="描述" ) private String description; + /** * 创建人 */ + @ElogTransform( name="创建人" ) private Long creator; + /** * 创建时间 */ + @ElogTransform( name="创建时间" ) private Date createTime; + /** * 更新时间 */ + @ElogTransform( name="更新时间" ) private Date updateTime; + /** * 是否已删除。0:未删除、1:已删除 */ + @ElogTransform( name="是否已删除" ) private Integer deleteType; + /** * 租户ID */ + @ElogTransform( name="租户" ) private String tenantKey; Collection ids; diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 8a90a0049..93de141bc 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -269,7 +269,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe loggerContext.setUser(user); loggerContext.setTargetId("" + salarySob.getId()); loggerContext.setTargetName(salarySob.getName()); - loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); + loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套薪资项目")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "编辑薪资账套薪资项目")); SalaryElogConfig.salarySobLoggerTemplate.write(loggerContext); From 1654e041b94797594b30c0733f6d043c28e694a4 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 22 Feb 2024 15:23:59 +0800 Subject: [PATCH 110/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SIArchivesServiceImpl.java | 4 ++-- .../engine/salary/service/impl/SISchemeServiceImpl.java | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index ec14fa7f9..d0e099fdc 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -200,7 +200,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService + ": " + "人员id" + "-" + employeeId + "," + "个税扣缴义务人id" + "-" +paymentOrganization + "," + (welfareTypeEnum == null ? SalaryI18nUtil.getI18nLabel(0, "员工基本信息") : SalaryI18nUtil.getI18nLabel(welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel()))); - SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); return apidatas; } @@ -227,7 +227,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "查看缴纳基数明细") + ": " + "人员id" + "-" + employeeId + "," + "个税扣缴义务人id" + "-" +paymentOrganization + "," + SalaryI18nUtil.getI18nLabel(welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel())); - SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); + SalaryElogConfig.siArchivesLoggerTemplate.write(loggerContext); return apidatas; } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 5f921e0ba..1f1b16230 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -2456,7 +2456,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (insuranceSchemeDetailPOS.size() > 0) { encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - LoggerContext> loggerContext = new LoggerContext<>(); + LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(targetPO.getSchemeName()); @@ -2520,7 +2520,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert); //记录明细表操作日志 encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - LoggerContext> insuranceSchemeDetailContext = new LoggerContext<>(); + LoggerContext insuranceSchemeDetailContext = new LoggerContext<>(); insuranceSchemeDetailContext.setTargetId(String.valueOf(insuranceSchemePO.getId())); insuranceSchemeDetailContext.setTargetName(insuranceSchemePO.getSchemeName()); insuranceSchemeDetailContext.setOperateType(OperateTypeEnum.UPDATE.getValue()); @@ -2572,8 +2572,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext); //记录明细表操作日志 List targetDetails = targetDetailMap.get(targetPO.getId()); + encryptUtil.decryptList(targetDetails, InsuranceSchemeDetailPO.class); if (targetDetails != null && targetDetails.size() > 0) { - LoggerContext> detailLoggerContext = new LoggerContext<>(); + LoggerContext detailLoggerContext = new LoggerContext<>(); detailLoggerContext.setUser(user); detailLoggerContext.setTargetId(String.valueOf(targetPO.getId())); detailLoggerContext.setTargetName(targetPO.getSchemeName()); @@ -2673,7 +2674,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { if (detailPOS.size() > 0) { encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); - LoggerContext> loggerContext = new LoggerContext<>(); + LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); loggerContext.setTargetId(String.valueOf(targetPO.getId())); loggerContext.setTargetName(targetPO.getSchemeName()); From a39806bb923db1029cbb1b1b8fb700dc183dfca8 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 23 Feb 2024 11:04:14 +0800 Subject: [PATCH 111/169] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=98=BE=E7=A4=BA=E9=A1=B5=E7=AD=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/web/MySalaryShowSetController.java | 13 ++++++ .../salaryBill/dto/MySalaryShowSetDTO.java | 40 +++++++++++++++++ .../service/MySalaryShowSetService.java | 19 ++++++++ .../impl/MySalaryShowSetServiceImpl.java | 44 ++++++++++++++++++ .../sys/constant/SalarySysConstant.java | 15 +++++++ .../salary/web/MySalaryShowSetController.java | 45 +++++++++++++++++++ .../wrapper/MySalaryShowSetWrapper.java | 32 +++++++++++++ .../salary/wrapper/SalarySendWrapper.java | 5 ++- 8 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 src/com/api/salary/web/MySalaryShowSetController.java create mode 100644 src/com/engine/salary/entity/salaryBill/dto/MySalaryShowSetDTO.java create mode 100644 src/com/engine/salary/service/MySalaryShowSetService.java create mode 100644 src/com/engine/salary/service/impl/MySalaryShowSetServiceImpl.java create mode 100644 src/com/engine/salary/web/MySalaryShowSetController.java create mode 100644 src/com/engine/salary/wrapper/MySalaryShowSetWrapper.java diff --git a/src/com/api/salary/web/MySalaryShowSetController.java b/src/com/api/salary/web/MySalaryShowSetController.java new file mode 100644 index 000000000..0be912245 --- /dev/null +++ b/src/com/api/salary/web/MySalaryShowSetController.java @@ -0,0 +1,13 @@ +package com.api.salary.web; + +import javax.ws.rs.Path; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2021-12-08 14:44 + */ +@Path("/bs/hrmsalary/mySalaryShowSet") +public class MySalaryShowSetController extends com.engine.salary.web.MySalaryShowSetController { + +} diff --git a/src/com/engine/salary/entity/salaryBill/dto/MySalaryShowSetDTO.java b/src/com/engine/salary/entity/salaryBill/dto/MySalaryShowSetDTO.java new file mode 100644 index 000000000..7ca948821 --- /dev/null +++ b/src/com/engine/salary/entity/salaryBill/dto/MySalaryShowSetDTO.java @@ -0,0 +1,40 @@ +package com.engine.salary.entity.salaryBill.dto; + +import io.swagger.annotations.ApiModel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2023/8/7 13:05 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel("工资单确认和反馈") +public class MySalaryShowSetDTO { + + /** + * 是否显示工资单列表 + */ + private Boolean salaryShowStatus; + + /** + * 是否显示社保福利列表 + */ + // private Boolean welfareShowStatus; + + /** + * 是否显示调薪记录列表 + */ + private Boolean adjustShowStatus; + + /** + * 是否显示个税扣缴义务人列 + */ + private Boolean taxAgentShowStatus; +} diff --git a/src/com/engine/salary/service/MySalaryShowSetService.java b/src/com/engine/salary/service/MySalaryShowSetService.java new file mode 100644 index 000000000..3bfea6d7b --- /dev/null +++ b/src/com/engine/salary/service/MySalaryShowSetService.java @@ -0,0 +1,19 @@ +package com.engine.salary.service; + + +import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2023/8/7 11:15 + */ +public interface MySalaryShowSetService { + + /** + * 获取显示设置 + * + * @return + */ + MySalaryShowSetDTO get(); +} diff --git a/src/com/engine/salary/service/impl/MySalaryShowSetServiceImpl.java b/src/com/engine/salary/service/impl/MySalaryShowSetServiceImpl.java new file mode 100644 index 000000000..57ec01bda --- /dev/null +++ b/src/com/engine/salary/service/impl/MySalaryShowSetServiceImpl.java @@ -0,0 +1,44 @@ +package com.engine.salary.service.impl; + + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO; +import com.engine.salary.service.MySalaryShowSetService; +import com.engine.salary.sys.constant.SalarySysConstant; +import com.engine.salary.sys.entity.po.SalarySysConfPO; +import com.engine.salary.sys.service.SalarySysConfService; +import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.math.NumberUtils; +import weaver.hrm.User; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2023/8/7 11:16 + */ +@Slf4j +public class MySalaryShowSetServiceImpl extends Service implements MySalaryShowSetService { + + private SalarySysConfService getSalarySysConfService(User user) { + return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); + } + + /** + * 获取显示设置 + * + * @return + */ + @Override + public MySalaryShowSetDTO get() { + SalarySysConfPO salaryShowStatus = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_SHOW_STATUS); + SalarySysConfPO adjustShowStatus = getSalarySysConfService(user).getOneByCode(SalarySysConstant.ADJUST_SHOW_STATUS); + + return MySalaryShowSetDTO.builder() + .salaryShowStatus(salaryShowStatus == null ? true : NumberUtils.INTEGER_ONE.equals(salaryShowStatus.getConfValue())) + .adjustShowStatus(adjustShowStatus == null ? true : NumberUtils.INTEGER_ONE.equals(adjustShowStatus.getConfValue())) + .build(); + } + +} diff --git a/src/com/engine/salary/sys/constant/SalarySysConstant.java b/src/com/engine/salary/sys/constant/SalarySysConstant.java index afe54d3c0..34a6b29ec 100644 --- a/src/com/engine/salary/sys/constant/SalarySysConstant.java +++ b/src/com/engine/salary/sys/constant/SalarySysConstant.java @@ -115,4 +115,19 @@ public class SalarySysConstant { * 应用设置是否福利档案导入时,不符合上下限的基数调整为上限 /下限 */ public static final String WEL_BASE_AUTO_ADJUST = "welBaseAutoAdjust"; + + /** + * 我的薪资福利工资单显示状态 + */ + public static final String SALARY_SHOW_STATUS = "salaryShowStatus"; + + /** + * 我的薪资福利调薪记录显示状态 + */ + public static final String ADJUST_SHOW_STATUS = "adjustShowStatus"; + + /** + * 我的薪资福利工资单个税扣缴义务人显示状态 + */ + public static final String TAX_AGENT_SHOW_STATUS = "taxAgentShowStatus"; } diff --git a/src/com/engine/salary/web/MySalaryShowSetController.java b/src/com/engine/salary/web/MySalaryShowSetController.java new file mode 100644 index 000000000..538d951ae --- /dev/null +++ b/src/com/engine/salary/web/MySalaryShowSetController.java @@ -0,0 +1,45 @@ +package com.engine.salary.web; + +import com.engine.common.util.ServiceUtil; +import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO; +import com.engine.salary.util.ResponseResult; +import com.engine.salary.wrapper.MySalaryShowSetWrapper; +import lombok.extern.slf4j.Slf4j; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2021-12-08 14:44 + */ +@Slf4j +public class MySalaryShowSetController { + + private MySalaryShowSetWrapper getMySalaryShowSetWrapper(User user) { + return ServiceUtil.getService(MySalaryShowSetWrapper.class, user); + } + + /** + * 我的薪资福利页签显隐控制 + * + * @return + */ + @GET + @Path("/get") + @Produces(MediaType.APPLICATION_JSON) + public String mySalaryShowSet(@Context HttpServletRequest request, @Context HttpServletResponse response) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getMySalaryShowSetWrapper(user)::mySalaryShowSet); + } + + /******** 工资单 end ***********************************************************************************************/ +} diff --git a/src/com/engine/salary/wrapper/MySalaryShowSetWrapper.java b/src/com/engine/salary/wrapper/MySalaryShowSetWrapper.java new file mode 100644 index 000000000..4efbd70cb --- /dev/null +++ b/src/com/engine/salary/wrapper/MySalaryShowSetWrapper.java @@ -0,0 +1,32 @@ +package com.engine.salary.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.salary.entity.salaryBill.dto.MySalaryShowSetDTO; +import com.engine.salary.service.MySalaryShowSetService; +import com.engine.salary.service.impl.MySalaryShowSetServiceImpl; +import org.springframework.stereotype.Component; +import weaver.hrm.User; + +; + +/** + * @Description: 我的薪资福利显示设置 + * @Author: wangxiangzhong + * @Date: 2023/8/7 11:24 + */ +@Component +public class MySalaryShowSetWrapper extends Service { + private MySalaryShowSetService getMySalaryShowSetService(User user) { + return ServiceUtil.getService(MySalaryShowSetServiceImpl.class, user); + } + + /** + * 获取我的薪资福利显示设置 + * + * @return + */ + public MySalaryShowSetDTO mySalaryShowSet() { + return getMySalaryShowSetService(user).get(); + } +} diff --git a/src/com/engine/salary/wrapper/SalarySendWrapper.java b/src/com/engine/salary/wrapper/SalarySendWrapper.java index 75c83f012..4f57185f8 100644 --- a/src/com/engine/salary/wrapper/SalarySendWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySendWrapper.java @@ -620,11 +620,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy } private List buildMySalaryBillListColumns() { + SalarySysConfPO taxAgentShowStatusPO = getSalarySysConfService(user).getOneByCode(SalarySysConstant.TAX_AGENT_SHOW_STATUS); List list = new ArrayList<>(); WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id"); idColumn.setDisplay(WeaBoolAttr.TRUE); list.add(new WeaTableColumn("20%", "薪资所属月", "salaryYearMonth")); - list.add(new WeaTableColumn("40%", "个税扣缴义务人", "taxAgent")); + if (taxAgentShowStatusPO == null || taxAgentShowStatusPO.getConfValue().equals("1")) { + list.add(new WeaTableColumn("40%", "个税扣缴义务人", "taxAgent")); + } list.add(new WeaTableColumn("40%", "发放时间", "sendTime")); return list; } From dce7f684a5cc396912d006b315955bd9587d3901 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 23 Feb 2024 11:34:48 +0800 Subject: [PATCH 112/169] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=88=86=E6=9D=83=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SIAccountServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 857196426..f4a03e1c9 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -241,8 +241,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (CollectionUtils.isEmpty(taxAgents)) { //防止普通用户查询 queryParam.setTaxAgents(Collections.singletonList(-1L)); - } else if (paymentOrganizationIds != null && paymentOrganizationIds.size() > 0){ - taxAgents.retainAll(paymentOrganizationIds); + } else { + if (paymentOrganizationIds != null && paymentOrganizationIds.size() > 0) { + taxAgents.retainAll(paymentOrganizationIds); + } queryParam.setTaxAgents(taxAgents); } } From 4775d8683aa60ed35c120b61428679094377ebf9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 23 Feb 2024 11:42:36 +0800 Subject: [PATCH 113/169] =?UTF-8?q?fix=E8=B0=83=E8=96=AA=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?value=E5=80=BC=E7=9B=B8=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryarchive/SalaryArchiveItemAdjustReasonEnum.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java index fb3f761cc..626635040 100644 --- a/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java +++ b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveItemAdjustReasonEnum.java @@ -19,9 +19,9 @@ public enum SalaryArchiveItemAdjustReasonEnum implements BaseEnum { ONBOARD("ONBOARD", "入职", 85901), PROBATION_REVIEW("PROBATION_REVIEW", "转正", 85984), SALARY_ADJUSTMENT("SALARY_ADJUSTMENT", "调薪", 85985), - PROMOTION("SALARY_ADJUSTMENT", "晋升", 85985), - DEMOTION("SALARY_ADJUSTMENT", "降职", 85985), - JOB_TRANSFER("SALARY_ADJUSTMENT", "调岗", 85985), + PROMOTION("PROMOTION", "晋升", 85985), + DEMOTION("DEMOTION", "降职", 85985), + JOB_TRANSFER("JOB_TRANSFER", "调岗", 85985), POSITION_OR_SALARY_ADJUSTMENT("POSITION_OR_SALARY_ADJUSTMENT", "调岗调薪", 85986), DIMISSION("DIMISSION", "离职", 85902), OTHER("OTHER", "其他", 84500), From 093cb34f779aeecdaefbd754f1414c573984595e Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 23 Feb 2024 15:11:56 +0800 Subject: [PATCH 114/169] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97fix?= =?UTF-8?q?=20some=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/biz/AttendQuoteDataValueBiz.java | 2 +- .../salary/biz/SpecialAddDeductionBiz.java | 3 +++ .../po/SpecialAddDeductionPO.java | 23 +++++++++++++++++-- .../salaryacct/po/SalaryAcctRecordPO.java | 15 ++++++++++++ .../datacollection/OtherDeductionMapper.xml | 7 ++++++ .../SpecialAddDeductionMapper.xml | 4 ++-- .../SalaryStatisticsReportWrapper.java | 14 +++++++++++ .../impl/AddUpSituationServiceImpl.java | 3 +++ .../service/impl/AttendQuoteServiceImpl.java | 13 +++++------ .../impl/OtherDeductionServiceImpl.java | 4 ++++ .../impl/SalaryArchiveServiceImpl.java | 5 ++-- .../service/impl/SalarySobServiceImpl.java | 21 +++++++++-------- .../impl/TaxAgentManageRangeServiceImpl.java | 4 ++-- .../impl/TaxDeclarationServiceImpl.java | 1 + 14 files changed, 93 insertions(+), 26 deletions(-) diff --git a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java index 5082f23d0..f80b1aa36 100644 --- a/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java +++ b/src/com/engine/salary/biz/AttendQuoteDataValueBiz.java @@ -67,7 +67,7 @@ public class AttendQuoteDataValueBiz { } } - public void deleteByAttendQuoteIds(ArrayList quoteIds) { + public void deleteByAttendQuoteIds(List quoteIds) { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class); diff --git a/src/com/engine/salary/biz/SpecialAddDeductionBiz.java b/src/com/engine/salary/biz/SpecialAddDeductionBiz.java index ad02398de..bf6f87f0a 100644 --- a/src/com/engine/salary/biz/SpecialAddDeductionBiz.java +++ b/src/com/engine/salary/biz/SpecialAddDeductionBiz.java @@ -179,6 +179,9 @@ public class SpecialAddDeductionBiz extends BaseBean { if (CollectionUtils.isNotEmpty(updateList)) { LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); + if(updateList.size() == 1) { + loggerContext.setTargetId(updateList.get(0).getId().toString()); + } loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "专项附加扣除 ")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入")); diff --git a/src/com/engine/salary/entity/datacollection/po/SpecialAddDeductionPO.java b/src/com/engine/salary/entity/datacollection/po/SpecialAddDeductionPO.java index 75c896062..afa5ea4e9 100644 --- a/src/com/engine/salary/entity/datacollection/po/SpecialAddDeductionPO.java +++ b/src/com/engine/salary/entity/datacollection/po/SpecialAddDeductionPO.java @@ -1,14 +1,15 @@ package com.engine.salary.entity.datacollection.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; +import java.util.Collection; import java.util.Date; -import java.util.List; /** * 数据采集-专项附加扣除表 @@ -18,85 +19,103 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Accessors(chain = true) +@ElogTransform( name = "专项附加扣除" ) public class SpecialAddDeductionPO { + @ElogTransform( name="主键" ) private Long id; /** * 人员信息表的主键id */ + @ElogTransform( name="人员id" ) private Long employeeId; /** * 个税扣缴义务人的主键id */ + @ElogTransform( name="个税扣缴义务人id" ) private Long taxAgentId; /** * 子女教育 */ + @ElogTransform( name="子女教育" ) @Encrypt private String childrenEducation; /** * 继续教育 */ + @ElogTransform( name="继续教育" ) @Encrypt private String continuingEducation; /** * 住房贷款利息 */ + @ElogTransform( name="住房贷款利息" ) @Encrypt private String housingLoanInterest; /** * 住房租金 */ + @ElogTransform( name="住房租金" ) @Encrypt private String housingRent; /** * 赡养老人 */ + @ElogTransform( name="赡养老人" ) @Encrypt private String supportingElder; /** * 大病医疗 */ + @ElogTransform( name="大病医疗" ) @Encrypt private String seriousIllnessTreatment; /** * 婴幼儿照护 */ + @ElogTransform( name="婴幼儿照护" ) @Encrypt private String infantCare; /** * 创建时间 */ + @ElogTransform( name="创建时间" ) private Date createTime; /** * 更新时间 */ + @ElogTransform( name="更新时间" ) private Date updateTime; /** * 创建人 */ + @ElogTransform( name="创建人" ) private Long creator; /** * 是否已删除。0:未删除、1:已删除 */ + @ElogTransform( name="是否已删除" ) private Integer deleteType; /** * 租户ID */ + @ElogTransform( name="租户" ) private String tenantKey; - private List employeeIds; + private Collection employeeIds; + + private Collection ids; } \ No newline at end of file diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctRecordPO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctRecordPO.java index 9587048ee..3af046bdb 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctRecordPO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctRecordPO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.salaryacct.po; import com.engine.salary.common.LocalDateRange; +import com.engine.salary.elog.annotation.ElogTransform; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -25,43 +26,51 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor @Builder +@ElogTransform( name = "薪资核算记录" ) //hrsa_salary_acct_record public class SalaryAcctRecordPO { /** * 主键id */ + @ElogTransform( name = "主键id" ) private Long id; /** * 薪资所属月 */ + @ElogTransform( name = "薪资所属月" ) private Date salaryMonth; /** * 税款所属期 */ + @ElogTransform( name = "税款所属期" ) private Date taxCycle; /** * 薪资账套id */ + @ElogTransform( name = "薪资账套id" ) private Long salarySobId; /** * 核算状态 * @see SalaryAcctRecordStatusEnum */ + @ElogTransform( name = "核算状态" ) private Integer status; /** * 本次核算是账套(salarySobId)在本月(salaryMonth)的第几次核算 */ + @ElogTransform( name = "核算次数" ) private Integer acctTimes; /** * 是否是回算 0:不是回算、1:是回算 */ + @ElogTransform( name = "是否是回算" ) private Integer backCalcStatus; /** @@ -81,31 +90,37 @@ public class SalaryAcctRecordPO { /** * 备注 */ + @ElogTransform( name = "备注" ) private String description; /** * 租户key */ + @ElogTransform( name = "租户key" ) private String tenantKey; /** * 创建人id */ + @ElogTransform( name = "创建人id" ) private Long creator; /** * 是否删除 */ + @ElogTransform( name = "是否删除" ) private Integer deleteType; /** * 创建时间 */ + @ElogTransform( name = "创建时间" ) private Date createTime; /** * 更新时间 */ + @ElogTransform( name = "更新时间" ) private Date updateTime; /** diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index 2d377e0ea..0afae02a2 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -464,6 +464,13 @@ + + + + when id=#{item.id} then #{item.updateTime} + + + where id in diff --git a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml index 2d32ec009..ce701f1d9 100644 --- a/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/SpecialAddDeductionMapper.xml @@ -694,7 +694,7 @@ + select version from hrsa_elog_version where maintable = #{mainTable} + + + create table ${mainTable} + ( + id bigint comment 'ID', + create_time datetime default current_timestamp , + update_time datetime default current_timestamp , + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid char(36), + log_date datetime default current_timestamp , + log_operator varchar(50), + operatorName varchar(50), + targetId varchar(50), + targetName text, + modulename varchar(100), + functionname varchar(100), + interfaceName varchar(100), + requesturl varchar(200), + requesturi varchar(200), + operateType varchar(50), + operatetypename varchar(100), + operatedesc varchar(1000), + params longtext, + belongmainid varchar(36), + clientIp varchar(50), + groupid varchar(50), + device varchar(200), + groupNameLabel varchar(500), + redoService varchar(200), + redoContext longtext, + cancelService varchar(200), + cancelContext longtext, + totalruntime bigint, + mainruntime bigint, + log_result varchar(100), + fromterminal varchar(100), + resultdesc text, + old_content varchar(1000), + link_type varchar(20), + link_id bigint, + old_link_id bigint, + PRIMARY KEY (id) + ) + + + + create table ${mainTable} + ( + id number(*,0) not null primary key, + create_time date default sysdate, + update_time date default sysdate, + creator number(*,0), + delete_type number(*,0), + tenant_key varchar2(10), + uuid varchar2(36), + log_date date default sysdate, + log_operator varchar2(50), + operatorName varchar2(50), + targetId varchar2(50), + targetName varchar2(4000), + modulename varchar2(100), + functionname varchar2(100), + interfaceName varchar2(100), + requesturl varchar2(200), + requesturi varchar2(200), + operateType varchar2(50), + operatetypename varchar2(100), + operatedesc varchar2(1000), + params clob, + belongmainid varchar2(36), + clientIp varchar2(200), + groupid varchar2(50), + device varchar2(200), + groupNameLabel varchar2(500), + redoService varchar2(200), + redoContext varchar2(4000), + cancelService varchar2(200), + cancelContext varchar2(4000), + totalruntime number(*,0), + mainruntime number(*,0), + log_result varchar2(4000), + fromterminal varchar2(100), + resultdesc varchar2(4000), + old_content varchar2(1000), + link_type varchar2(20), + link_id number(*,0), + old_link_id number(*,0) + ) + + + create table ${mainTable} + ( + id bigint not null primary key, + create_time datetime default getdate(), + update_time datetime default getdate(), + creator bigint default '-1', + delete_type bigint default 0, + tenant_key nvarchar(10), + uuid nvarchar(36), + log_date datetime default getdate(), + device nvarchar(500), + log_operator bigint default '-1', + operatorname nvarchar(100), + targetid bigint default '-1', + targetname nvarchar(3000), + modulename nvarchar(100), + functionname nvarchar(100), + interfacename nvarchar(100), + requesturl nvarchar(200), + requesturi nvarchar(200), + operatetype nvarchar(50), + operatetypename nvarchar(100), + operatedesc nvarchar(3000), + params nvarchar(max), + belongmainid nvarchar(36), + clientip nvarchar(200), + groupid nvarchar(50), + groupnamelabel nvarchar(1000), + redoservice nvarchar(200), + redocontext nvarchar(3000), + cancelservice nvarchar(200), + cancelcontext nvarchar(3000), + totalruntime bigint default 0, + mainruntime bigint default 0, + log_result nvarchar(100), + fromterminal nvarchar(100), + resultdesc nvarchar(3000), + old_content nvarchar(3000), + link_type nvarchar(20), + link_id bigint default 0, + old_link_id bigint default 0 + ) + + + create table ${mainTable} + ( + id int8 not null primary key, + create_time timestamp default current_timestamp, + update_time timestamp default current_timestamp, + creator int8, + delete_type int, + tenant_key varchar(10), + uuid varchar(36), + log_date timestamp default current_timestamp, + log_operator varchar(50), + operatorName varchar(50), + targetId varchar(50), + targetName text, + modulename varchar(100), + functionname varchar(100), + interfaceName varchar(100), + requesturl varchar(200), + requesturi varchar(200), + operateType varchar(50), + operatetypename varchar(100), + operatedesc varchar(1000), + params text, + belongmainid varchar(36), + clientIp varchar(200), + groupid varchar(50), + device varchar(200), + groupNameLabel varchar(500), + redoService varchar(200), + redoContext text, + cancelService varchar(200), + cancelContext text, + totalruntime int4, + mainruntime int4, + log_result varchar(100), + fromterminal varchar(100), + resultdesc text, + old_content varchar(1000), + link_type varchar(20), + link_id int4, + old_link_id int4 + ) + + + create table ${detailTable} + ( + id bigint not null primary key, + create_time datetime default current_timestamp , + update_time datetime default current_timestamp , + creator bigint, + delete_type int, + tenant_key varchar(10), + uuid varchar(36), + mainid varchar(36), + dataid varchar(50), + belongdataid varchar(50), + tableName varchar(200), + tablenamelabelid varchar(50), + tablenamedesc varchar(50), + fieldName varchar(200), + fieldnamelabelid varchar(200), + newValue longtext, + oldValue longtext, + newrealvalue longtext, + oldrealvalue longtext, + fieldDesc varchar(200), + showorder int default 0, + isdetail int default 0 + ) + + + create table ${detailTable} + ( + id int8 not null primary key, + create_time timestamp default current_timestamp , + update_time timestamp default current_timestamp , + creator int8, + delete_type int8, + tenant_key varchar(10), + uuid varchar(36), + mainid varchar(36), + dataid varchar(50), + belongdataid varchar(50), + tableName varchar(200), + tablenamelabelid varchar(50), + tablenamedesc varchar(50), + fieldName varchar(200), + fieldnamelabelid varchar(200), + newValue text, + oldValue text, + newrealvalue text, + oldrealvalue text, + fieldDesc varchar(200), + showorder int8 default 0, + isdetail int8 default 0 + ) + + + create table ${detailTable} + ( + id number(*,0) not null primary key, + create_time date default sysdate, + update_time date default sysdate, + creator number(*,0), + delete_type number(*,0), + tenant_key varchar2(10), + uuid varchar2(36), + mainid varchar2(36), + dataid varchar2(50), + belongdataid varchar2(50), + tableName varchar2(200), + tablenamelabelid varchar2(50), + tablenamedesc varchar2(50), + fieldName varchar2(200), + fieldnamelabelid varchar2(200), + newValue CLOB, + oldValue CLOB, + newrealvalue CLOB, + oldrealvalue CLOB, + fieldDesc varchar2(200), + showorder number(*,0) default 0, + isdetail number(*,0) default 0 + ) + + + create table ${detailTable} + ( + id bigint not null primary key, + create_time datetime default getdate(), + update_time datetime default getdate(), + creator bigint, + delete_type bigint, + tenant_key nvarchar(10), + uuid nvarchar(36), + mainid nvarchar(36), + dataid nvarchar(50), + belongdataid nvarchar(50), + tableName nvarchar(200), + tablenamelabelid nvarchar(50), + tablenamedesc nvarchar(50), + fieldName nvarchar(200), + fieldnamelabelid nvarchar(200), + newValue nvarchar(max), + oldValue nvarchar(max), + newrealvalue nvarchar(max), + oldrealvalue nvarchar(max), + fieldDesc varchar(200), + showorder bigint default 0, + isdetail bigint default 0 + ) + + + + + + + + + + + ${createElogSql} + + + + + + + + + + + + + + + + create index idx${id} on ${tableName} (${columnName}) + + + + create index idx${id} on ${tableName} (${columnName}) + + + + create index idx${id} on ${tableName} (${columnName}) + + + + + + + + + + diff --git a/resource/WEB-INF/config/mapper/hrmelog/LocalElogAopDaoMapper.xml b/resource/WEB-INF/config/mapper/hrmelog/LocalElogAopDaoMapper.xml new file mode 100644 index 000000000..8fcc1b9c1 --- /dev/null +++ b/resource/WEB-INF/config/mapper/hrmelog/LocalElogAopDaoMapper.xml @@ -0,0 +1,170 @@ + + + + + + insert into ${tableName} (id, uuid, log_date, tenant_key, modulename, functionName, operatetypename, + log_operator, operatorname, targetid, targetname, interfacename, operatetype, + operatedesc, + params, clientIp, groupnamelabel, redoservice, redocontext, cancelservice, + cancelcontext, device, groupid, + belongMainId, requestUrl, requestUri, totalRunTime, mainRunTime, log_result, + fromTerminal, resultDesc, old_content, + link_type, link_id, old_link_id, create_time, update_time, delete_type, creator + ${cusColumns}) + values (#{logContent.id}, #{logContent.uuid}, #{logContent.date}, + #{logContent.tenant_key}, #{logContent.moduleName}, #{logContent.functionName}, + #{logContent.operateTypeName}, #{logContent.logOperator}, #{logContent.operatorName}, + #{logContent.logTargetid} + , #{logContent.targetName}, #{logContent.interfaceName}, #{logContent.operateType}, + #{logContent.operatedesc}, + #{logContent.paramsStr}, #{logContent.clientIp}, #{logContent.groupNameLabel}, + #{logContent.redoService}, + #{logContent.redoContextStr}, #{logContent.cancelService}, #{logContent.cancelContextStr}, + #{logContent.device}, #{logContent.groupId}, + #{logContent.belongMainId}, #{logContent.requestUrl}, #{logContent.requestUri}, + #{logContent.totalRunTime}, #{logContent.mainRunTime} + , #{logContent.result}, #{logContent.fromTerminal}, #{logContent.resultDesc}, + #{logContent.old_content}, #{logContent.link_type} + , #{logContent.link_id}, #{logContent.old_link_id}, #{logContent.create_time}, + #{logContent.update_time}, #{logContent.delete_type}, #{logContent.logOperator} + ${cusValus}) + + + + insert into ${detailTableName} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key, creator, + newRealValue, oldRealValue, tableNameDesc, + tableNameLabelId, fieldNameLabelId, create_time, update_time + ${cusColumns}) + values (#{detailContext.id}, #{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, + #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, #{detailContext.tenant_key}, + #{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId}, #{detailContext.create_time}, #{detailContext.update_time} + ${cusValus}) + + + ${sql} + + + + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + values + + ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type}) + + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + VALUES + ( + #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} + ) + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time + ${cusColumns}) + values + + ( #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time} + ${detailContext.cusValus}) + + + + + update ${tableName} + set delete_type = 3 + where id = #{id} + + + update ${tableName} + set delete_type = 3 + where mainid = #{mainid} + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time,delete_type) + + SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time}, #{detailContext.delete_type} + FROM DUAL + + + + + insert into ${tablename} (id, mainid, uuid, tablename, fieldname, newvalue, oldvalue, + fielddesc, showorder, dataid, belongDataid, isDetail, tenant_key,creator, newRealValue, + oldRealValue,tableNameDesc, + tableNameLabelId,fieldNameLabelId, create_time, update_time + ${cusColumns}) + + SELECT #{detailContext.id},#{mainid}, #{detailContext.uuid}, #{detailContext.tableName}, + #{detailContext.fieldName}, #{detailContext.newValue}, + #{detailContext.oldValue}, #{detailContext.fieldDesc}, #{detailContext.showorder}, #{detailContext.dataid}, + #{detailContext.belongDataid}, #{detailContext.isDetail}, + #{detailContext.tenant_key},#{detailContext.creator}, #{detailContext.newRealValue} + , #{detailContext.oldRealValue}, #{detailContext.tableNameDesc}, #{detailContext.tableNameLabelId}, + #{detailContext.fieldNameLabelId} + , #{detailContext.create_time}, #{detailContext.update_time} + ${detailContext.cusValus} + FROM DUAL + + + + diff --git a/resource/WEB-INF/config/mapper/hrmelog/LocalElogDaoMapper.xml b/resource/WEB-INF/config/mapper/hrmelog/LocalElogDaoMapper.xml new file mode 100644 index 000000000..2c1f0f427 --- /dev/null +++ b/resource/WEB-INF/config/mapper/hrmelog/LocalElogDaoMapper.xml @@ -0,0 +1,412 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resource/WEB-INF/config/mapper/hrmelog/QueryCurretValusMapper.xml b/resource/WEB-INF/config/mapper/hrmelog/QueryCurretValusMapper.xml new file mode 100644 index 000000000..b88e3cfee --- /dev/null +++ b/resource/WEB-INF/config/mapper/hrmelog/QueryCurretValusMapper.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/resource/WEB-INF/lib/hrmelog.jar b/resource/WEB-INF/lib/hrmelog.jar index 633076bbe823c6ae78a32d6a86baf91b7fc2aa97..b2657be84b5fd6599033c08517e9dde8da030173 100644 GIT binary patch literal 137248 zcmb@u1CV6f)-_tTZL`a^yKEa-wvDbXciFaW+qT(db-B9izs|Y$zPR82?m7317cV1r z#LmpMB4h6{=3HZrHFqjVgMz^T0YL!)vA9@k0R7tw3aZ~{qTAPU2**ZJgSzDVp z(i>R=oSY&R_~iQ;k$i09A=YM+`ap0&cSWEWtcl1}LaBwJ6x@n6N)-)B*Dap3WhCHU zfxe;b;+4ta*BqF2x4Rt`zq~)ag4p~0q+eT+W0b1tpJ`Rnda??>za9-F#z{9DWgJOJ za&t+Pej)oEN0L7wBg%!W2HpiH_N@r7Uy+>+9kV)Y+L~Ni`Dy}fu+G`Kp}B~*u+#XM zKW$C!pb}>B#Y**v!H^#7p1|^4m7H>ndTh(wrsHbN9J2##5?7zo7QY+wn^@&uE0xs= z_kOGP6I2X|@Pz#%Lo}S35T%O{sD>mavp&NxuomlN4VKOGj~bB(4!j@o0zI3*W`%`U zEc|_}k&1jltn=3Qz2J*h^4i5)`7{0cuP_y)A)#Dzo~bZ_fq+^+kH1C-_Mi9L#MaEh z*5q$sME#!w{~gK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*uw&YfV(bK{r5#^0@ybPvGX{~JuyK=?1Wu;sl?=zRqR8t?y<9;gA=fey`weyS(% zzi%|Ks(*c_0J_+moP~7t?JRA6;eY8tGdfTKnsORIZ_7jPMedW|liYRO-}CVP5wRbcdwn4 zt~mhM&p)Qj{n2y(3crVA^E&2&Ha<;{)I9Rts>#}KdAR#L_e4N{Yxw!j`U5S zm-ctl>AOh&c|XlRYkohwGtfbBuMGA70sLJq=O6cC{1g0scE^W1M~p9j051QNbkYB$ zxSx&ip?K^T{($1Ujd3q&r#5;xr^uFm5C5|ShyO&spRwm5I_u`|(f<<7!(>T! z=)amwK)>U?(zNwU^uKZdJzVteXQy~*Fkbu~=$?&o=V7>?6X}kSK97>Vtu!9zUM;vcUFx1qu?&v!TpnC4{c?u zd!2v51N=OHpXDwH;{HjWhdXSpZ~w*ee{I@-pGmt?i8# z?|%H=n4i=9q%HR&Fdq)cF~~nA`4M%gZ>DQ&d%q!fv7GnANgg_a$>IMO96xEr{Sb|Z zcs#IKDok{V#d`Zq2W>4R8a0uMlE@J&1>Z0NT!X?w9|w7zP1g L9q$E{WncgRc5)#K From e22e178d0841b6603ba8085693dfa1d7d6fbf522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 12 Mar 2024 14:51:28 +0800 Subject: [PATCH 152/169] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=9D=9E=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{WEB-INF/prop => wiki/扩展功能}/hrmSalaryBillToken.properties | 0 .../{WEB-INF/prop => wiki/扩展功能}/hrmSalaryCustom.properties | 0 .../{WEB-INF/prop => wiki/扩展功能}/hrmSalaryPayroll.properties | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename resource/{WEB-INF/prop => wiki/扩展功能}/hrmSalaryBillToken.properties (100%) rename resource/{WEB-INF/prop => wiki/扩展功能}/hrmSalaryCustom.properties (100%) rename resource/{WEB-INF/prop => wiki/扩展功能}/hrmSalaryPayroll.properties (100%) diff --git a/resource/WEB-INF/prop/hrmSalaryBillToken.properties b/resource/wiki/扩展功能/hrmSalaryBillToken.properties similarity index 100% rename from resource/WEB-INF/prop/hrmSalaryBillToken.properties rename to resource/wiki/扩展功能/hrmSalaryBillToken.properties diff --git a/resource/WEB-INF/prop/hrmSalaryCustom.properties b/resource/wiki/扩展功能/hrmSalaryCustom.properties similarity index 100% rename from resource/WEB-INF/prop/hrmSalaryCustom.properties rename to resource/wiki/扩展功能/hrmSalaryCustom.properties diff --git a/resource/WEB-INF/prop/hrmSalaryPayroll.properties b/resource/wiki/扩展功能/hrmSalaryPayroll.properties similarity index 100% rename from resource/WEB-INF/prop/hrmSalaryPayroll.properties rename to resource/wiki/扩展功能/hrmSalaryPayroll.properties From 43c57cb10b624fbcba7e14ea877b8055ed4d08a9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 12 Mar 2024 16:17:24 +0800 Subject: [PATCH 153/169] =?UTF-8?q?=E9=98=85=E5=90=8E=E5=8D=B3=E7=84=9A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/salarybill/SalarySendInfoMapper.xml | 4 ++++ .../service/impl/SalarySendServiceImpl.java | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml b/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml index 477c0addb..a7738491f 100644 --- a/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml @@ -617,6 +617,7 @@ hrsa_salary_send_info + first_reading_time = null, send_status = #{po.sendStatus}, @@ -795,6 +796,9 @@ bill_confirm_status=#{billConfirmStatus}, + + first_reading_time=#{firstReadingTime}, + WHERE id = #{id} AND delete_type = 0 diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index f544e8ff2..5a66005d6 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -507,16 +507,16 @@ public class SalarySendServiceImpl extends Service implements SalarySendService salarySendInfo.setFirstReadingTime(firstReadingTime); getSalarySendInfoMapper().updateIgnoreNull(salarySendInfo); } else { + // 不是首次查看 firstReadingTime = salarySendInfo.getFirstReadingTime(); - } - - // 获取首次查看后多少分钟不能查看工资单(0代表一旦查看后无法再次查看,null代表不限制) - Integer burningAfterReadingMin = getSalaryBillBaseSetService(user).getBurningAfterReadingMin(); - if (burningAfterReadingMin != null) { - LocalDateTime limitTime = SalaryDateUtil.dateToLocalDateTime(firstReadingTime).plusMinutes(burningAfterReadingMin); - LocalDateTime now = SalaryDateUtil.dateToLocalDateTime(new Date()); - if (limitTime.isAfter(now)) { - throw new SalaryRunTimeException("首次查看工资单" + burningAfterReadingMin + "分钟后,无法查看工资单"); + // 获取首次查看后多少分钟不能查看工资单(0代表一旦查看后无法再次查看,null代表不限制) + Integer burningAfterReadingMin = getSalaryBillBaseSetService(user).getBurningAfterReadingMin(); + if (burningAfterReadingMin != null) { + LocalDateTime limitTime = SalaryDateUtil.dateToLocalDateTime(firstReadingTime).plusMinutes(burningAfterReadingMin); + LocalDateTime now = SalaryDateUtil.dateToLocalDateTime(new Date()); + if (limitTime.isBefore(now)) { + throw new SalaryRunTimeException("首次查看工资单" + burningAfterReadingMin + "分钟后,无法查看工资单。首次查看时间为:" + SalaryDateUtil.getFormatLocalDateTime(firstReadingTime)); + } } } From bef1835c39ae812c7416f37cb30e32df5c61629d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 12 Mar 2024 16:46:55 +0800 Subject: [PATCH 154/169] =?UTF-8?q?jar=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/lib/hrmelog.jar | Bin 137248 -> 137248 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/resource/WEB-INF/lib/hrmelog.jar b/resource/WEB-INF/lib/hrmelog.jar index b2657be84b5fd6599033c08517e9dde8da030173..b1ce56c1141707d25dab68afa9161f218a35d92c 100644 GIT binary patch delta 20371 zcmY(nV{~Or)Ggex(XnmYwmY_MTc=|iC+yg^ZFZcT*mlxEC!O4<`+dj#zPm?_T~)Kz zT$pSB*_B@pn_mx$s4Ncw3IF8_?3XWXVM&M-;QzhZ{=Kysz+1x_!X3f>gHoQrsQ*sH z;LLv~WpKX#&VaL*V3cXf;0Qp}KVY!H-ghwQrb+NNu>X!y<|_a130Bht`r$-R`nykIrurL?un8Vh``DO zzD+qe4B&sO`$kTga)bBvFZ>?X+LpMw8LKqN?TUyQ3jZ&O|8iPjYNZvrVI@c(P+Zs7>^7ZA$-A0P$B5v7UT?qB5p&kDw|2KsNU zt?mMU<2|~g{qyp_B$yNu4@}@EEI4%2H}Cns?uy6){~9z=1m*pcN(6@z$btY4opKxg zH_@i|aJYYYB^XgRF-7(NwJExdNBSG$FNB-p`mafUJAzsS^ZzQ#Q_j$Imn;9TKB4@o zf35qk@FvtEs=t1kc*-IFk%cO_{|og$njnM20-=$?v75Ro(EoihbCs(9h^_Abm5mIJ z0uKTCe_Qvj3&`L|Kzx+{x?Nd=LGU-P{s|>O>ImAcea9xSi+SQm3>+r1ATv>{Tr`17 zBbbz=0G7s?LYha$mDH=CLc2bO%(I@mzFI%nxP1p-(|nd0GI+1 z`j$tW4%)h22;Y^Mzw`lBpTF7@3SO6uK|E@IOMp4MLlq<{9V37AUYfu+NR)hOdV%(} zcQ>KVrfC6<5FhB#yzvPB$RE?hW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ew}yH lpa&e+l;Puf8NUCs47Uz<*}MP% From 26a3199b1ef3106c97d1111db4ad96f8360b3d80 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 13 Mar 2024 17:58:24 +0800 Subject: [PATCH 155/169] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=BA=BF=E4=B8=8B?= =?UTF-8?q?=E5=AF=B9=E6=AF=94=E5=8A=A0=E8=A7=A3=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siaccount/ExcelInsuranceDetailMapper.java | 4 + .../siaccount/ExcelInsuranceDetailMapper.xml | 189 ++++++++++++++++++ .../impl/SalarySysConfServiceImpl.java | 43 +++- 3 files changed, 232 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.java b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.java index 105c0f636..1129a814f 100644 --- a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.java +++ b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.java @@ -36,4 +36,8 @@ public interface ExcelInsuranceDetailMapper { * 批量保存 */ void batchSave(@Param("accounts") Collection accounts); + + List listAll(); + + void updateBatchSelective(@Param("list")List excelInsuranceDetailPOS); } diff --git a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml index 15ac635ce..6372d29dd 100644 --- a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml @@ -69,10 +69,13 @@ , t.other_pay_org , t.social_scheme_id , t.social_payment_base_string + , t.social_payment_com_base_string , t.fund_scheme_id , t.fund_payment_base_string + , t.fund_payment_com_base_string , t.other_scheme_id , t.other_payment_base_string + , t.other_payment_com_base_string , t.social_per_json , t.social_per_sum , t.fund_per_json @@ -114,6 +117,185 @@ + + update hrsa_excel_bill_detail + + + + + + when id = #{item.id} then #{item.socialPaymentComBaseString} + + + + + + + when id = #{item.id} then #{item.fundPaymentComBaseString} + + + + + + + when id = #{item.id} then #{item.otherPaymentComBaseString} + + + + + + + when id = #{item.id} then #{item.socialPaymentBaseString} + + + + + + + when id = #{item.id} then #{item.fundPaymentBaseString} + + + + + + + when id = #{item.id} then #{item.otherPaymentBaseString} + + + + + + + when id = #{item.id} then #{item.socialPerJson} + + + + + + + when id = #{item.id} then #{item.socialPerSum} + + + + + + + when id = #{item.id} then #{item.fundPerJson} + + + + + + + when id = #{item.id} then #{item.fundPerSum} + + + + + + + when id = #{item.id} then #{item.otherPerJson} + + + + + + + when id = #{item.id} then #{item.otherPerSum} + + + + + + + when id = #{item.id} then #{item.perSum} + + + + + + + when id = #{item.id} then #{item.socialComJson} + + + + + + + when id = #{item.id} then #{item.socialComSum} + + + + + + + when id = #{item.id} then #{item.fundComJson} + + + + + + + when id = #{item.id} then #{item.fundComSum} + + + + + + + when id = #{item.id} then #{item.otherComJson} + + + + + + + when id = #{item.id} then #{item.otherComSum} + + + + + + + when id = #{item.id} then #{item.comSum} + + + + + + + when id = #{item.id} then #{item.socialSum} + + + + + + + when id = #{item.id} then #{item.fundSum} + + + + + + + when id = #{item.id} then #{item.otherSum} + + + + + + + when id = #{item.id} then #{item.total} + + + + + where id in + + #{item.id} + + + + diff --git a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java index cf3c4b893..8dc814429 100644 --- a/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java +++ b/src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java @@ -13,6 +13,7 @@ import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO; import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO; +import com.engine.salary.entity.siaccount.po.ExcelInsuranceDetailPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO; @@ -28,6 +29,7 @@ import com.engine.salary.mapper.datacollection.OtherDeductionMapper; import com.engine.salary.mapper.datacollection.SpecialAddDeductionMapper; import com.engine.salary.mapper.salaryacct.ExcelAcctResultMapper; import com.engine.salary.mapper.salaryacct.SalaryAcctResultMapper; +import com.engine.salary.mapper.siaccount.ExcelInsuranceDetailMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; import com.engine.salary.mapper.siarchives.FundSchemeMapper; @@ -45,12 +47,12 @@ import com.engine.salary.sys.entity.vo.OrderRuleVO; import com.engine.salary.sys.enums.*; import com.engine.salary.sys.service.SalarySysConfService; import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; import com.weaver.util.threadPool.ThreadPoolUtil; import com.weaver.util.threadPool.constant.ModulePoolEnum; import com.weaver.util.threadPool.entity.LocalRunnable; -import com.engine.salary.util.db.IdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -143,6 +145,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe return MapperProxyFactory.getProxy(SpecialAddDeductionMapper.class); } + private ExcelInsuranceDetailMapper getExcelInsuranceDetailMapper() { + return MapperProxyFactory.getProxy(ExcelInsuranceDetailMapper.class); + } + private SalarySysConfService getSalarySysConfService(User user) { return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); } @@ -1107,14 +1113,43 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe } return 1; }); - int flag = submit.get() + submit1.get() + submit2.get() + submit3.get() + submit4.get() + submit5.get() + submit6.get() + submit7.get() + submit8.get() + submit9.get() + submit10.get() + submit11.get() + submit12.get() + submit13.get(); - if (flag == 14) { + + Future submit14 = fixedThreadPool.submit(() -> { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + List excelInsuranceDetailPOS = getExcelInsuranceDetailMapper().listAll(); + if (CollectionUtils.isNotEmpty(excelInsuranceDetailPOS)) { + excelInsuranceDetailPOS.forEach(po -> { + if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) { + encryptUtil.decrypt(po, ExcelInsuranceDetailPO.class); + } else { + encryptUtil.encrypt(po, ExcelInsuranceDetailPO.class); + } + }); + List> partition = Lists.partition(excelInsuranceDetailPOS, 50); + ExcelInsuranceDetailMapper mapper = sqlSession.getMapper(ExcelInsuranceDetailMapper.class); + partition.forEach(mapper::updateBatchSelective); + sqlSession.commit(); + log.info("finish hrsa_excel_bill_detail"); + } + } catch (Exception e) { + sqlSession.rollback(); + log.error("fail hrsa_excel_bill_detail", e); + return 0; + } finally { + sqlSession.close(); + } + return 1; + }); + + int flag = submit.get() + submit1.get() + submit2.get() + submit3.get() + submit4.get() + submit5.get() + submit6.get() + submit7.get() + submit8.get() + submit9.get() + submit10.get() + submit11.get() + submit12.get() + submit13.get() + submit14.get(); + if (flag == 15) { Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "success", 30); } else { Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30); } Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS); - return flag == 14; + return flag == 15; } catch (Exception e) { Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30); Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS); From f23b23cd923790e3591c1d47959d6d5b691ca22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 14 Mar 2024 10:25:39 +0800 Subject: [PATCH 156/169] =?UTF-8?q?=E4=BC=98=E5=8C=96IF=E8=A7=A3=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/constant/des.json | 2 +- src/com/engine/salary/formlua/constant/FormluaConstant.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/constant/des.json b/src/com/engine/salary/constant/des.json index fe3b8ce5f..f82a626bd 100644 --- a/src/com/engine/salary/constant/des.json +++ b/src/com/engine/salary/constant/des.json @@ -993,7 +993,7 @@ "name": "IF", "chineseName": "如果条件为真,则...否则...", "description": "如果条件为真,则执行表达式1,为假则执行表达式2。条件中不可嵌套使用IF函数。", - "example": "IF({员工表.年龄} > 60, '退休', '在职')
IF({员工表.年龄} > 60, IF({员工表.性别} = {员工表.性别.女}, '退休', '在职'), '在职')", + "example": "IF({员工表.年龄} > 60, '退休', '在职') ", "result": "'退休'
'在职'", "paramDescs": [ "*条件*(必选)", diff --git a/src/com/engine/salary/formlua/constant/FormluaConstant.java b/src/com/engine/salary/formlua/constant/FormluaConstant.java index df616310e..4cce5e978 100644 --- a/src/com/engine/salary/formlua/constant/FormluaConstant.java +++ b/src/com/engine/salary/formlua/constant/FormluaConstant.java @@ -998,7 +998,7 @@ public class FormluaConstant { " \"name\": \"IF\",\n" + " \"chineseName\": \"如果条件为真,则...否则...\",\n" + " \"description\": \"如果条件为真,则执行表达式1,为假则执行表达式2。条件中不可嵌套使用IF函数。\",\n" + - " \"example\": \"IF({员工表.年龄} > 60, '退休', '在职')
IF({员工表.年龄} > 60, IF({员工表.性别} = {员工表.性别.女}, '退休', '在职'), '在职')\",\n" + + " \"example\": \"IF({员工表.年龄} > 60, '退休', '在职') \",\n" + " \"result\": \"'退休'
'在职'\",\n" + " \"paramDescs\": [\n" + " \"*条件*(必选)\",\n" + From 8543d70a6654fe507fab0aa0f8870f1b524ab20f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 14 Mar 2024 11:07:01 +0800 Subject: [PATCH 157/169] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E5=8A=A0=E8=A7=A3?= =?UTF-8?q?=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siaccount/ExcelInsuranceDetailMapper.xml | 50 ++++++++++++++++++- .../InsuranceAccountDetailMapper.xml | 23 +++++++++ .../mapper/siarchives/FundSchemeMapper.xml | 7 +++ .../mapper/siarchives/OtherSchemeMapper.xml | 7 +++ .../mapper/siarchives/SocialSchemeMapper.xml | 7 +++ .../impl/SalarySysConfServiceImpl.java | 44 ++++++++++++++-- 6 files changed, 134 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml index 6372d29dd..53c1265b1 100644 --- a/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/ExcelInsuranceDetailMapper.xml @@ -313,7 +313,55 @@ + + UPDATE hrsa_salary_archive diff --git a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java index 80e9c5e2e..898d55471 100644 --- a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java +++ b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java @@ -127,4 +127,11 @@ public interface InsuranceBaseInfoMapper { * @return */ List listEndDateIsNull(@Param("employeeIds") List employeeIds); + + /** + * 获取没有设置社保、公积金最后缴纳月的档案 + * @param employeeIds + * @return + */ + List listStartDateIsNull(@Param("employeeIds") List employeeIds); } diff --git a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml index 467dbf9f2..33ceb8af1 100644 --- a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml @@ -301,6 +301,38 @@ + + + UPDATE hrsa_insurance_base_info diff --git a/src/com/engine/salary/service/SIArchivesService.java b/src/com/engine/salary/service/SIArchivesService.java index 4f98cc742..877355676 100644 --- a/src/com/engine/salary/service/SIArchivesService.java +++ b/src/com/engine/salary/service/SIArchivesService.java @@ -7,11 +7,11 @@ import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam; import com.engine.salary.entity.siarchives.param.SIArchiveBaseHistoryListParam; import com.engine.salary.entity.siarchives.po.*; import com.engine.salary.util.page.PageInfo; +import com.google.common.collect.Lists; +import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import java.util.Collection; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @Author weaver_cl @@ -152,4 +152,12 @@ public interface SIArchivesService { void batchInsertAdjustHistory(List adjustHistoryList); List listEndDateIsNull(List employeeIds); + + List listStartDateIsNull(List employeeIds); + + List listInsuranceArchivesSocialSchemeByIds(List ids); + + List listInsuranceArchivesFundSchemeByIds(List ids); + + List listInsuranceArchivesOtherSchemeByIds(List ids); } diff --git a/src/com/engine/salary/service/SalaryArchiveService.java b/src/com/engine/salary/service/SalaryArchiveService.java index 60a059bae..5ab2dac29 100644 --- a/src/com/engine/salary/service/SalaryArchiveService.java +++ b/src/com/engine/salary/service/SalaryArchiveService.java @@ -250,4 +250,10 @@ public interface SalaryArchiveService { */ String syncPayStartDate(); + /** + * 根据列表状态获取起始发薪日期为空的薪资档案 + * @param runStatus + * @return + */ + List listPayStartDateIsNull(String runStatus); } diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 9dd1e070f..811127514 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -3954,5 +3954,48 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds); } + + /** + * 获取没有设置社保、公积金最后缴纳月的档案 + * @param employeeIds + * @return + */ + @Override + public List listStartDateIsNull(List employeeIds) { + return getInsuranceBaseInfoMapper().listStartDateIsNull(employeeIds); + } /*****以上代码为SIArchivesBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ + + @Override + public List listInsuranceArchivesSocialSchemeByIds(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return Collections.emptyList(); + } + List> partition = Lists.partition(ids, 1000); + ArrayList resultList = new ArrayList<>(); + partition.forEach(list -> resultList.addAll(getSocialSchemeMapper().getSocialById(list))); + return resultList; + } + + @Override + public List listInsuranceArchivesFundSchemeByIds(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return Collections.emptyList(); + } + List> partition = Lists.partition(ids, 1000); + ArrayList resultList = new ArrayList<>(); + partition.forEach(list -> resultList.addAll(getFundSchemeMapper().getFundById(list))); + return resultList; + } + + @Override + public List listInsuranceArchivesOtherSchemeByIds(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return Collections.emptyList(); + } + List> partition = Lists.partition(ids, 1000); + ArrayList resultList = new ArrayList<>(); + partition.forEach(list -> resultList.addAll(getOtherSchemeMapper().getOtherById(list))); + return resultList; + } } diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index b5958e8bf..e492cbd16 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -1419,4 +1419,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe salaryArchiveMapper.batchUpdate(archives); return "执行完毕"; } + + @Override + public List listPayStartDateIsNull(String runStatus) { + if (StringUtils.isBlank(runStatus)) { + return Collections.emptyList(); + } + return getSalaryArchiveMapper().listPayStartDateIsNull(runStatus); + } } diff --git a/src/com/engine/salary/timer/AutoSyncEmpArchiveStartDateJob.java b/src/com/engine/salary/timer/AutoSyncEmpArchiveStartDateJob.java new file mode 100644 index 000000000..1b4c32c84 --- /dev/null +++ b/src/com/engine/salary/timer/AutoSyncEmpArchiveStartDateJob.java @@ -0,0 +1,159 @@ +package com.engine.salary.timer; + +import com.engine.common.util.ServiceUtil; +import com.engine.salary.biz.SalaryArchiveBiz; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; +import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO; +import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; +import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO; +import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO; +import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO; +import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum; +import com.engine.salary.enums.siaccount.EmployeeStatusEnum; +import com.engine.salary.mapper.siarchives.FundSchemeMapper; +import com.engine.salary.mapper.siarchives.OtherSchemeMapper; +import com.engine.salary.mapper.siarchives.SocialSchemeMapper; +import com.engine.salary.service.SIArchivesService; +import com.engine.salary.service.SalaryArchiveService; +import com.engine.salary.service.SalaryEmployeeService; +import com.engine.salary.service.impl.SIArchivesServiceImpl; +import com.engine.salary.service.impl.SalaryArchiveServiceImpl; +import com.engine.salary.service.impl.SalaryEmployeeServiceImpl; +import com.engine.salary.util.SalaryDateUtil; +import com.engine.salary.util.SalaryEntityUtil; +import com.engine.salary.util.db.MapperProxyFactory; +import org.apache.commons.lang3.StringUtils; +import weaver.hrm.User; +import weaver.interfaces.schedule.BaseCronJob; + +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author Harryxzy + * @ClassName AutoSyncInsuranceArchiveJob + * @date 2023/08/14 9:30 + * @description 自动同步人员社保福利档案、薪资档案为公司开始日期字段(companystartdate) + */ +public class AutoSyncEmpArchiveStartDateJob extends BaseCronJob { + + private SalaryArchiveService getSalaryArchiveService(User user) { + return ServiceUtil.getService(SalaryArchiveServiceImpl.class,user); + } + + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class,user); + } + + + private SIArchivesService getSIArchivesService(User user) { + return ServiceUtil.getService(SIArchivesServiceImpl.class,user); + } + + private String syncInsuranceArchive; + + private String syncSalaryArchive; + + private SalaryArchiveBiz getSalaryArchiveMapper = new SalaryArchiveBiz(); + + private SocialSchemeMapper getSocialSchemeMapper() { + return MapperProxyFactory.getProxy(SocialSchemeMapper.class); + } + + private FundSchemeMapper getFundSchemeMapper() { + return MapperProxyFactory.getProxy(FundSchemeMapper.class); + } + + private OtherSchemeMapper getOtherSchemeMapper() { + return MapperProxyFactory.getProxy(OtherSchemeMapper.class); + } + + + + @Override + public void execute() { + User user = new User(); + user.setUid(1); + user.setLoginid("sysadmin"); + + if (StringUtils.isBlank(syncInsuranceArchive) || !StringUtils.equals(syncInsuranceArchive,"false")) { + // 同步社保福利档案 + // 获取社保、公积金、其他福利中起始缴纳月任意一个为空的社保档案主表po + List needSyncInsuranceBaseInfoList = getSIArchivesService(user).listStartDateIsNull(Collections.emptyList()); + // 过滤出档案状态为待增员的 + needSyncInsuranceBaseInfoList = needSyncInsuranceBaseInfoList.stream().filter(po -> po.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue())).collect(Collectors.toList()); + // 获取同步人员的公司开始日期 + List employeeList = getSalaryEmployeeService(user).listByIds(SalaryEntityUtil.properties(needSyncInsuranceBaseInfoList, InsuranceArchivesBaseInfoPO::getEmployeeId, Collectors.toList())); + Map empInfoMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId, emp -> { + if (StringUtils.isBlank(emp.getCompanystartdate()) || !SalaryDateUtil.checkDay(emp.getCompanystartdate())) { + return ""; + } else { + return StringUtils.substring(emp.getCompanystartdate(), 0, 7); + } + }); + // 设置社保起始缴纳月信息 + List needSyncSocialArchiveIds = SalaryEntityUtil.properties(needSyncInsuranceBaseInfoList, InsuranceArchivesBaseInfoPO::getSocialArchivesId, Collectors.toList()); + List insuranceArchivesSocialSchemePOS = getSIArchivesService(user).listInsuranceArchivesSocialSchemeByIds(needSyncSocialArchiveIds); + insuranceArchivesSocialSchemePOS.stream().forEach(po -> { + if (StringUtils.isBlank(po.getSocialStartTime()) && StringUtils.isNotBlank(empInfoMap.get(po.getEmployeeId()))) { + po.setSocialStartTime(empInfoMap.get(po.getEmployeeId())); + getSocialSchemeMapper().updateById(po); + } + }); + + // 设置公积金起始缴纳月信息 + List needSyncFundArchiveIds = SalaryEntityUtil.properties(needSyncInsuranceBaseInfoList, InsuranceArchivesBaseInfoPO::getFundArchivesId, Collectors.toList()); + List insuranceArchivesFundSchemePOS = getSIArchivesService(user).listInsuranceArchivesFundSchemeByIds(needSyncFundArchiveIds); + insuranceArchivesFundSchemePOS.stream().forEach(po -> { + if (StringUtils.isBlank(po.getFundStartTime()) && StringUtils.isNotBlank(empInfoMap.get(po.getEmployeeId()))) { + po.setFundStartTime(empInfoMap.get(po.getEmployeeId())); + getFundSchemeMapper().updateById(po); + } + }); + + // 设置其他福利起始缴纳月信息 + List needSyncOtherArchiveIds = SalaryEntityUtil.properties(needSyncInsuranceBaseInfoList, InsuranceArchivesBaseInfoPO::getOtherArchivesId, Collectors.toList()); + List insuranceArchivesOtherSchemePOS = getSIArchivesService(user).listInsuranceArchivesOtherSchemeByIds(needSyncOtherArchiveIds); + insuranceArchivesOtherSchemePOS.stream().forEach(po -> { + if (StringUtils.isBlank(po.getOtherStartTime()) && StringUtils.isNotBlank(empInfoMap.get(po.getEmployeeId()))) { + po.setOtherStartTime(empInfoMap.get(po.getEmployeeId())); + getOtherSchemeMapper().updateById(po); + } + }); + } + + if (StringUtils.isBlank(syncSalaryArchive) || !StringUtils.equals(syncSalaryArchive,"false")) { + // 同步薪资档案 + // 获取薪资档案起始发薪日为空且是待定薪资的档案 + List salaryArchiveList = getSalaryArchiveService(user).listPayStartDateIsNull(SalaryArchiveListTypeEnum.PENDING.getValue()); + List empIds = SalaryEntityUtil.properties(salaryArchiveList, SalaryArchivePO::getEmployeeId, Collectors.toList()); + List employeeList = getSalaryEmployeeService(user).listByIds(empIds); + Map empMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId, emp -> { + if (StringUtils.isBlank(emp.getCompanystartdate()) || !SalaryDateUtil.checkDay(emp.getCompanystartdate())) { + return null; + } else { + return SalaryDateUtil.stringToDate(StringUtils.substring(emp.getCompanystartdate(), 0, 10)); + } + }); + List needUpdateArchiveList = salaryArchiveList.stream().filter(archive -> { + if (archive.getPayStartDate() == null) { + Date startDate = empMap.get(archive.getEmployeeId()); + if (startDate != null) { + archive.setPayStartDate(startDate); + return true; + } else { + return false; + } + } else { + return false; + } + }).collect(Collectors.toList()); + getSalaryArchiveMapper.batchUpdate(needUpdateArchiveList); + } + + } + +} From 417c9f703d500bd958f0314a074f4f239a0ec2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 14 Mar 2024 15:28:14 +0800 Subject: [PATCH 160/169] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=97=B6=E5=B8=A6=E5=87=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/AddUpSituationBiz.java | 18 +- .../salary/biz/SpecialAddDeductionBiz.java | 3 +- .../dto/AddUpDeductionRecordDTO.java | 7 +- .../datacollection/dto/AddUpSituationDTO.java | 2 + .../dto/OtherDeductionListDTO.java | 2 + .../dto/SpecialAddDeductionListDTO.java | 2 + .../param/AddUpDeductionQueryParam.java | 3 + .../param/AddUpSituationQueryParam.java | 3 + .../param/OtherDeductionQueryParam.java | 4 + .../param/SpecialAddDeductionQueryParam.java | 3 + .../salary/service/AddUpDeductionService.java | 3 +- .../impl/AddUpDeductionServiceImpl.java | 121 ++++------- .../impl/AddUpSituationServiceImpl.java | 193 ++++++------------ .../impl/OtherDeductionServiceImpl.java | 133 ++++++------ .../impl/SpecialAddDeductionServiceImpl.java | 14 +- .../salary/web/AddUpDeductionController.java | 4 + .../salary/web/AddUpSituationController.java | 4 + .../salary/web/OtherDeductionController.java | 5 + .../web/SpecialAddDeductionController.java | 11 +- .../salary/wrapper/AddUpDeductionWrapper.java | 3 +- .../salary/wrapper/OtherDeductionWrapper.java | 2 +- 21 files changed, 213 insertions(+), 327 deletions(-) diff --git a/src/com/engine/salary/biz/AddUpSituationBiz.java b/src/com/engine/salary/biz/AddUpSituationBiz.java index b3d47b935..68515ff23 100644 --- a/src/com/engine/salary/biz/AddUpSituationBiz.java +++ b/src/com/engine/salary/biz/AddUpSituationBiz.java @@ -6,6 +6,7 @@ import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO; import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO; import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam; import com.engine.salary.mapper.datacollection.AddUpSituationMapper; +import com.engine.salary.util.SalaryI18nUtil; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.ibatis.session.SqlSession; @@ -30,7 +31,8 @@ public class AddUpSituationBiz extends BaseBean { try { AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class); List list = mapper.list(param); - return encryptUtil.decryptList(list, AddUpSituationDTO.class); + encryptUtil.decryptList(list, AddUpSituationDTO.class); + return SalaryI18nUtil.i18nList(list); } finally { sqlSession.close(); } @@ -46,15 +48,15 @@ public class AddUpSituationBiz extends BaseBean { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class); - if(CollectionUtils.isNotEmpty(param.getEmployeeIds())){ + if (CollectionUtils.isNotEmpty(param.getEmployeeIds())) { List addUpSituations = new ArrayList<>(); List> partition = Lists.partition((List) param.getEmployeeIds(), 500); - partition.forEach(l->{ + partition.forEach(l -> { param.setEmployeeIds(l); addUpSituations.addAll(mapper.listSome(param)); }); - return encryptUtil.decryptList(addUpSituations, AddUpSituation.class); - }else { + return encryptUtil.decryptList(addUpSituations, AddUpSituation.class); + } else { List addUpSituations = mapper.listSome(param); return encryptUtil.decryptList(addUpSituations, AddUpSituation.class); } @@ -143,9 +145,6 @@ public class AddUpSituationBiz extends BaseBean { } - - - public void handleImportData(List pos) { if (CollectionUtils.isEmpty(pos)) { return; @@ -188,10 +187,9 @@ public class AddUpSituationBiz extends BaseBean { } - /** - * @description 批量删除数据 * @return void + * @description 批量删除数据 * @author Harryxzy * @date 2022/10/27 22:39 */ diff --git a/src/com/engine/salary/biz/SpecialAddDeductionBiz.java b/src/com/engine/salary/biz/SpecialAddDeductionBiz.java index a2203e89f..be57b5c29 100644 --- a/src/com/engine/salary/biz/SpecialAddDeductionBiz.java +++ b/src/com/engine/salary/biz/SpecialAddDeductionBiz.java @@ -51,7 +51,8 @@ public class SpecialAddDeductionBiz extends BaseBean { public List listByParam(SpecialAddDeductionQueryParam param) { List specialAddDeductionListDTOS = mapper().listByParam(param); - return encryptUtil.decryptList(specialAddDeductionListDTOS, SpecialAddDeductionListDTO.class); + encryptUtil.decryptList(specialAddDeductionListDTOS, SpecialAddDeductionListDTO.class); + return SalaryI18nUtil.i18nList(specialAddDeductionListDTOS); } public List listByTaxAgentIds(List taxAgentIds) { diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java index b3cbbc0d7..4de554f12 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java @@ -1,10 +1,7 @@ package com.engine.salary.entity.datacollection.dto; import com.cloudstore.eccom.pc.table.WeaTableType; -import com.engine.salary.annotation.Encrypt; -import com.engine.salary.annotation.SalaryTable; -import com.engine.salary.annotation.SalaryTableColumn; -import com.engine.salary.annotation.TableTitle; +import com.engine.salary.annotation.*; import com.engine.salary.util.excel.ExcelProperty; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; @@ -31,6 +28,7 @@ public class AddUpDeductionRecordDTO { private Long employeeId; @ExcelProperty(index = 0) + @I18n private String username; //申报月份 @@ -56,6 +54,7 @@ public class AddUpDeductionRecordDTO { @SalaryTableColumn(text = "部门", width = "10%", column = "departmentName") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") @ExcelProperty(index = 3) + @I18n private String departmentName; //手机号 diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java index fd217469e..bd4a80aaa 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpSituationDTO.java @@ -39,6 +39,7 @@ public class AddUpSituationDTO { @SalaryTableColumn(text = "姓名", width = "10%", column = "username") @TableTitle(title = "姓名", dataIndex = "username", key = "username") @ExcelProperty(index = 0) + @I18n private String username; // // @SalaryTableColumn(text = "申报月份", width = "10%", column = "username") @@ -59,6 +60,7 @@ public class AddUpSituationDTO { @SalaryTableColumn(text = "部门", width = "10%", column = "departmentName") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") @ExcelProperty(index = 2) + @I18n private String departmentName; //手机号 diff --git a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java index 5ea78ea2f..94f3580d0 100644 --- a/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/OtherDeductionListDTO.java @@ -37,6 +37,7 @@ public class OtherDeductionListDTO { @SalaryTableColumn(text = "姓名", width = "10%", column = "username") @TableTitle(title = "姓名", dataIndex = "username", key = "username") @ExcelProperty(index = 0) + @I18n private String username; //个税扣缴义务人 @@ -54,6 +55,7 @@ public class OtherDeductionListDTO { @SalaryTableColumn(text = "部门", width = "10%", column = "departmentName") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") @ExcelProperty(index = 2) + @I18n private String departmentName; //手机号 diff --git a/src/com/engine/salary/entity/datacollection/dto/SpecialAddDeductionListDTO.java b/src/com/engine/salary/entity/datacollection/dto/SpecialAddDeductionListDTO.java index 8597f505b..5e480bb21 100644 --- a/src/com/engine/salary/entity/datacollection/dto/SpecialAddDeductionListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/SpecialAddDeductionListDTO.java @@ -37,6 +37,7 @@ public class SpecialAddDeductionListDTO { @SalaryTableColumn(text = "姓名", width = "10%", column = "username") @TableTitle(title = "姓名", dataIndex = "username", key = "username") @ExcelProperty(index = 0) + @I18n private String username; //个税扣缴义务人 @@ -54,6 +55,7 @@ public class SpecialAddDeductionListDTO { @SalaryTableColumn(text = "部门", width = "10%", column = "departmentName") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") @ExcelProperty(index = 2) + @I18n private String departmentName; //手机号 diff --git a/src/com/engine/salary/entity/datacollection/param/AddUpDeductionQueryParam.java b/src/com/engine/salary/entity/datacollection/param/AddUpDeductionQueryParam.java index bd23b85fa..15cf175d7 100644 --- a/src/com/engine/salary/entity/datacollection/param/AddUpDeductionQueryParam.java +++ b/src/com/engine/salary/entity/datacollection/param/AddUpDeductionQueryParam.java @@ -67,4 +67,7 @@ public class AddUpDeductionQueryParam extends BaseQueryParam { //累计专项附加扣除id(获取明细) private Long accumulatedSpecialAdditionalDeductionId; + + //下载模板时是否带出现有数据 + private boolean hasData; } diff --git a/src/com/engine/salary/entity/datacollection/param/AddUpSituationQueryParam.java b/src/com/engine/salary/entity/datacollection/param/AddUpSituationQueryParam.java index c8fbd1ef6..70998028f 100644 --- a/src/com/engine/salary/entity/datacollection/param/AddUpSituationQueryParam.java +++ b/src/com/engine/salary/entity/datacollection/param/AddUpSituationQueryParam.java @@ -62,4 +62,7 @@ public class AddUpSituationQueryParam extends BaseQueryParam { //累计情况id(获取明细) private Long accumulatedSituationId; + + //下载模板时是否带出现有数据 + private boolean hasData; } diff --git a/src/com/engine/salary/entity/datacollection/param/OtherDeductionQueryParam.java b/src/com/engine/salary/entity/datacollection/param/OtherDeductionQueryParam.java index d406380ed..d3683d46b 100644 --- a/src/com/engine/salary/entity/datacollection/param/OtherDeductionQueryParam.java +++ b/src/com/engine/salary/entity/datacollection/param/OtherDeductionQueryParam.java @@ -58,4 +58,8 @@ public class OtherDeductionQueryParam extends BaseQueryParam { //其他免税扣除id(获取明细) private Long otherTaxExemptDeductionId; + + + //下载模板是否带数据 + private boolean hasData; } diff --git a/src/com/engine/salary/entity/datacollection/param/SpecialAddDeductionQueryParam.java b/src/com/engine/salary/entity/datacollection/param/SpecialAddDeductionQueryParam.java index a9e887bb7..26c478a8c 100644 --- a/src/com/engine/salary/entity/datacollection/param/SpecialAddDeductionQueryParam.java +++ b/src/com/engine/salary/entity/datacollection/param/SpecialAddDeductionQueryParam.java @@ -54,4 +54,7 @@ public class SpecialAddDeductionQueryParam extends BaseQueryParam { //其他免税扣除id(获取明细) private Long specialAddDeductionId; + + //下载模板是否带数据 + private boolean hasData; } diff --git a/src/com/engine/salary/service/AddUpDeductionService.java b/src/com/engine/salary/service/AddUpDeductionService.java index 51498f653..29d3d58a9 100644 --- a/src/com/engine/salary/service/AddUpDeductionService.java +++ b/src/com/engine/salary/service/AddUpDeductionService.java @@ -78,10 +78,9 @@ public interface AddUpDeductionService { /** * 导出 * - * @param isChief * @param queryParam */ - XSSFWorkbook export(boolean isChief, AddUpDeductionQueryParam queryParam); + XSSFWorkbook export( AddUpDeductionQueryParam queryParam); /** * 导出详情 diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 1026aaee5..5817e89de 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -234,7 +234,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction String workcode = dto.getJobNum(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); if (StringUtils.isBlank(userName) && "0".equals(confValue)) { //姓名 不能为空 @@ -422,7 +422,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction String formatYearMonth = SalaryDateUtil.getFormatYearMonth(po.getDeclareMonth()); LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "累计专项附加扣除 ") + formatYearMonth); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除 ") + formatYearMonth); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入累计专项附加扣除 ") + formatYearMonth); @@ -445,7 +445,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction throw new SalaryRunTimeException("该数据不存在!"); } Long taxAgentId = byId.getTaxAgentId(); - boolean canEdit = taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId() , taxAgentId)); + boolean canEdit = taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), taxAgentId)); if (!canEdit) { //没有编辑权限 throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!"); @@ -490,7 +490,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction //税款所属期 String declareMonthStr = addUpDeductionRecordParam.getDeclareMonth(); - if (declareMonthStr .equals("")) { + if (declareMonthStr.equals("")) { throw new SalaryRunTimeException("税款所属期不能为空!"); } // 获取所有个税扣缴义务人 @@ -518,7 +518,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction .updateTime(now) .creator((long) user.getUID()) .declareMonth(declareMonth).build(); - boolean employeeSameId = employees.stream().anyMatch(e -> Objects.equals(e.getEmployeeId() , addUpDeductionRecordParam.getEmployeeId())); + boolean employeeSameId = employees.stream().anyMatch(e -> Objects.equals(e.getEmployeeId(), addUpDeductionRecordParam.getEmployeeId())); if (!employeeSameId) { throw new SalaryRunTimeException("员工信息不存在"); } @@ -617,7 +617,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction throw new SalaryRunTimeException("数据不存在或已被删除!"); } // 判断是否在个税扣缴义务人范围内 - Optional first = taxAgentList.stream().filter(m -> Objects.equals(m.getTaxAgentId() , byId.getTaxAgentId())).findFirst(); + Optional first = taxAgentList.stream().filter(m -> Objects.equals(m.getTaxAgentId(), byId.getTaxAgentId())).findFirst(); if (!first.isPresent()) { throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内"); } @@ -635,7 +635,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction //记录日志 if (CollectionUtils.isNotEmpty(oldAddUpDeductions)) { - oldAddUpDeductions.stream().forEach( e -> { + oldAddUpDeductions.stream().forEach(e -> { LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setTargetId(e.getId().toString()); loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + e.getId()); @@ -669,7 +669,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction if (deleteParam.getTaxAgentId() != null && (!deleteParam.getTaxAgentId().equals(""))) { // 设置了个税扣缴义务人 Long taxAgentId = SalaryEntityUtil.string2Long(deleteParam.getTaxAgentId()); - boolean canDelete = taxAgentIds.stream().anyMatch(t -> Objects.equals(t , taxAgentId)); + boolean canDelete = taxAgentIds.stream().anyMatch(t -> Objects.equals(t, taxAgentId)); if (!canDelete) { throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内!"); } @@ -732,12 +732,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction @Override public String autoAddAll(Date yearMonth, Boolean isAdmin) { String cacheKey = "addUpDeduction_autoAddAll_processing"; - Object objVal = Util_DataCache.getObjVal( cacheKey); - if(objVal != null){ + Object objVal = Util_DataCache.getObjVal(cacheKey); + if (objVal != null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(135788, "一键累计过于频繁,请稍后再试")); } try { - Util_DataCache.setObjVal(cacheKey,true ); + Util_DataCache.setObjVal(cacheKey, true); //如果是定时任务直接查询所有,isAdmin传true boolean isChief = Boolean.TRUE.equals(isAdmin) || getTaxAgentService(user).isChief((long) user.getUID()); @@ -844,10 +844,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction String yearMonthStr = SalaryDateUtil.getFormatYearMonth(yearMonth); LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+yearMonthStr)); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "一键累计 " + yearMonthStr)); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键累计专项附加扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "一键累计 "+ yearMonthStr +" 专项附加扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "一键累计 " + yearMonthStr + " 专项附加扣除")); loggerContext.setNewValueList(updateList); SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } @@ -1138,24 +1138,16 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction SalaryI18nUtil.getI18nLabel(105142, "累计婴幼儿照护") }; - List dataIndexList = Lists.newArrayList("username", "taxAgentName", "departmentName", "mobile", "workcode", "idNo", "hiredate", "billMonth", "supplementaryMonth"); List headerList = Arrays.asList(header); //查询当前申报月份和个税扣缴义务人的累计专项附加扣除表数据 - List> resultMapList = getAddUpDeductionDate(queryParam); - // excel导出的数据 - List> rows = Lists.newArrayListWithExpectedSize(resultMapList.size()); - + List> rows = new ArrayList<>(); rows.add(headerList); - for (Map map : resultMapList) { - List row = Lists.newArrayListWithExpectedSize(headerList.size()); - for (String dataIndex : dataIndexList) { - row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY)); - } - rows.add(row); + if (queryParam.isHasData()) { + List> datas = getLists(queryParam); + rows.addAll(datas); } - // 4.注释 List excelComments = Lists.newArrayList(); excelComments.add(new ExcelComment(0, 0, 3, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); @@ -1173,46 +1165,18 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction return book; } - /** - * 查询当前申报月份和个税扣缴义务人的累计专项附加扣除表数据 - */ - private List> getAddUpDeductionDate(AddUpDeductionQueryParam queryParam) { - - List> resultList = new ArrayList<>(); - - //申报月份 - List declareMonth = queryParam.getDeclareMonth(); - if (CollectionUtils.isNotEmpty(declareMonth)) { - queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList())); - queryParam.setDeclareMonthDate(declareMonth.stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList())); - } - List list = new AddUpDeductionBiz().list(queryParam); - - for (AddUpDeductionDTO dto : list) { - Map resultMap = new HashMap<>(); - resultMap.put("username", Util.null2String(dto.getUsername())); - resultMap.put("departmentName", Util.null2String(dto.getDepartmentName())); - resultMap.put("mobile", Util.null2String(dto.getMobile())); - resultMap.put("workcode", Util.null2String(dto.getJobNum())); - resultMap.put("taxAgentName", Util.null2String(dto.getTaxAgentName())); - if (dto.getIdNo() != null) { - resultMap.put("idNo", Util.null2String(dto.getIdNo())); - } - if (dto.getHiredate() != null) { - resultMap.put("hiredate", Util.null2String(dto.getHiredate())); - } - - resultList.add(resultMap); - } - return resultList; - } - @Override - public XSSFWorkbook export(boolean isChief, AddUpDeductionQueryParam queryParam) { + public XSSFWorkbook export(AddUpDeductionQueryParam queryParam) { + //excel标题 + List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计婴幼儿照护"); - //获取操作按钮资源 - List> rowList = getExcelRowList(isChief, queryParam); + List> dataRowList = getLists(queryParam); + + List> rowList = new ArrayList<>(); + rowList.add(title); + + rowList.addAll(dataRowList); // 记录日志 String name = SalaryI18nUtil.getI18nLabel(0, "导出"); @@ -1225,22 +1189,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); //获取excel - return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除"); + return ExcelUtil.genWorkbookV2(rowList, "累计专项附加扣除"); } + private List> getLists(AddUpDeductionQueryParam param) { - /** - * 获取excel数据行 - * - * @return 导出数据行集合 - */ - private List> getExcelRowList(boolean isChief, AddUpDeductionQueryParam param) { - Long employeeId = (long) user.getUID(); - - //excel标题 - List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计婴幼儿照护"); - - + long uid = user.getUID(); //排序配置 OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); param.setOrderRule(orderRule); @@ -1248,9 +1202,9 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction List list = new AddUpDeductionBiz().list(param); // 开启分权并且不是薪酬模块总管理员 - if (getTaxAgentService(user).isOpenDevolution() && !isChief) { - List taxAgentEmployees = getTaxAgentService(user).listTaxAgentAndEmployee(employeeId); - List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); + if (getTaxAgentService(user).isNeedAuth(uid)) { + List taxAgentEmployees = getTaxAgentService(user).listTaxAgentAndEmployee(uid); + List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(uid).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); list = list.stream().filter(f -> // 作为管理员 taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) @@ -1259,11 +1213,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction ).collect(Collectors.toList()); } - - final List> dataRowList = Optional.ofNullable(list) + List> dataRowList = Optional.ofNullable(list) .map(List::stream) .map(operatorStream -> operatorStream.map(dto -> { - List cellList = new ArrayList<>(); + List cellList = new ArrayList<>(); cellList.add(Util.null2String(dto.getUsername())); cellList.add(Util.null2String(dto.getTaxAgentName())); cellList.add(Util.null2String(dto.getDepartmentName())); @@ -1281,11 +1234,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction return cellList; }).collect(Collectors.toList())) .orElse(Collections.emptyList()); - - List> rowList = new ArrayList<>(); - rowList.add(title); - rowList.addAll(dataRowList); - return rowList; + return dataRowList; } diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index b147e6b7d..5f503572d 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -260,7 +260,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation @Override public XSSFWorkbook export(AddUpSituationQueryParam queryParam) { // 获取操作按钮资源 - List> rowList = getExcelRowList(queryParam); + List> rowList = getExcelRowList(queryParam, true); // 记录日志 String name = SalaryI18nUtil.getI18nLabel(0, "导出"); @@ -273,7 +273,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation SalaryElogConfig.addUpSituationLoggerTemplate.write(loggerContext); // 获取excel - return ExcelUtil.genWorkbook(rowList, "累计情况"); + return ExcelUtil.genWorkbookV2(rowList, "累计情况"); } @@ -282,62 +282,65 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation * * @return 导出数据行集合 */ - private List> getExcelRowList(AddUpSituationQueryParam param) { + private List> getExcelRowList(AddUpSituationQueryParam param, boolean hasData) { long employeeId = user.getUID(); // excel标题 - final List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计收入额", "累计减除费用", + final List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计收入额", "累计减除费用", "累计社保个人合计", "累计公积金个人合计", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护", "累计个人养老金"); - //排序配置 - OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); - param.setOrderRule(orderRule); - List list = biz.list(param); - // 开启分权并且不是薪酬模块总管理员 - if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) { - List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); - list = list.stream().filter(f -> - taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) - ).collect(Collectors.toList()); - } - - final List> dataRowList = Optional.ofNullable(list) - .map(List::stream) - .map(operatorStream -> operatorStream.map(dto -> { - List cellList = new ArrayList<>(); - cellList.add(Util.null2String(dto.getUsername())); - cellList.add(Util.null2String(dto.getTaxAgentName())); - cellList.add(Util.null2String(dto.getDepartmentName())); - cellList.add(Util.null2String(dto.getMobile())); - cellList.add(Util.null2String(dto.getJobNum())); - cellList.add(Util.null2String(dto.getIdNo())); - cellList.add(Util.null2String(dto.getHiredate())); - cellList.add(Util.null2String(dto.getAddUpIncome())); - cellList.add(Util.null2String(dto.getAddUpSubtraction())); - cellList.add(Util.null2String(dto.getAddUpSocialSecurityTotal())); - cellList.add(Util.null2String(dto.getAddUpAccumulationFundTotal())); - cellList.add(Util.null2String(dto.getAddUpChildEducation())); - cellList.add(Util.null2String(dto.getAddUpContinuingEducation())); - cellList.add(Util.null2String(dto.getAddUpHousingLoanInterest())); - cellList.add(Util.null2String(dto.getAddUpHousingRent())); - cellList.add(Util.null2String(dto.getAddUpSupportElderly())); - cellList.add(Util.null2String(dto.getAddUpIllnessMedical())); - cellList.add(Util.null2String(dto.getAddUpEnterpriseAndOther())); - cellList.add(Util.null2String(dto.getAddUpOtherDeduction())); - cellList.add(Util.null2String(dto.getAddUpTaxExemptIncome())); - cellList.add(Util.null2String(dto.getAddUpAllowedDonation())); - cellList.add(Util.null2String(dto.getAddUpTaxSavings())); - cellList.add(Util.null2String(dto.getAddUpAdvanceTax())); - cellList.add(Util.null2String(dto.getAddUpInfantCare())); - cellList.add(Util.null2String(dto.getAddUpPrivatePension())); - return cellList; - }).collect(Collectors.toList())) - .orElse(Collections.emptyList()); - - List> rowList = new ArrayList<>(); + List> rowList = new ArrayList<>(); rowList.add(title); - rowList.addAll(dataRowList); + + if (hasData) { + //排序配置 + OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); + param.setOrderRule(orderRule); + List list = biz.list(param); + // 开启分权并且不是薪酬模块总管理员 + if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) { + List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); + list = list.stream().filter(f -> + taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) + ).collect(Collectors.toList()); + } + + final List> dataRowList = Optional.ofNullable(list) + .map(List::stream) + .map(operatorStream -> operatorStream.map(dto -> { + List cellList = new ArrayList<>(); + cellList.add(Util.null2String(dto.getUsername())); + cellList.add(Util.null2String(dto.getTaxAgentName())); + cellList.add(Util.null2String(dto.getDepartmentName())); + cellList.add(Util.null2String(dto.getMobile())); + cellList.add(Util.null2String(dto.getJobNum())); + cellList.add(Util.null2String(dto.getIdNo())); + cellList.add(Util.null2String(dto.getHiredate())); + cellList.add(Util.null2String(dto.getAddUpIncome())); + cellList.add(Util.null2String(dto.getAddUpSubtraction())); + cellList.add(Util.null2String(dto.getAddUpSocialSecurityTotal())); + cellList.add(Util.null2String(dto.getAddUpAccumulationFundTotal())); + cellList.add(Util.null2String(dto.getAddUpChildEducation())); + cellList.add(Util.null2String(dto.getAddUpContinuingEducation())); + cellList.add(Util.null2String(dto.getAddUpHousingLoanInterest())); + cellList.add(Util.null2String(dto.getAddUpHousingRent())); + cellList.add(Util.null2String(dto.getAddUpSupportElderly())); + cellList.add(Util.null2String(dto.getAddUpIllnessMedical())); + cellList.add(Util.null2String(dto.getAddUpEnterpriseAndOther())); + cellList.add(Util.null2String(dto.getAddUpOtherDeduction())); + cellList.add(Util.null2String(dto.getAddUpTaxExemptIncome())); + cellList.add(Util.null2String(dto.getAddUpAllowedDonation())); + cellList.add(Util.null2String(dto.getAddUpTaxSavings())); + cellList.add(Util.null2String(dto.getAddUpAdvanceTax())); + cellList.add(Util.null2String(dto.getAddUpInfantCare())); + cellList.add(Util.null2String(dto.getAddUpPrivatePension())); + return cellList; + }).collect(Collectors.toList())) + .orElse(Collections.emptyList()); + + rowList.addAll(dataRowList); + } return rowList; } @@ -446,88 +449,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation @Override public XSSFWorkbook downloadTemplate(AddUpSituationQueryParam queryParam) { String sheetName = SalaryI18nUtil.getI18nLabel(101605, "往期累计情况导入模板"); - String[] header = { - SalaryI18nUtil.getI18nLabel(85429, "姓名"), - SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), - SalaryI18nUtil.getI18nLabel(86185, "部门"), - SalaryI18nUtil.getI18nLabel(86186, "手机号"), - SalaryI18nUtil.getI18nLabel(86317, "工号"), - SalaryI18nUtil.getI18nLabel(86318, "证件号码"), - SalaryI18nUtil.getI18nLabel(86319, "入职日期"), - SalaryI18nUtil.getI18nLabel(86712, "累计收入额"), - SalaryI18nUtil.getI18nLabel(86711, "累计减除费用"), - SalaryI18nUtil.getI18nLabel(86710, "累计社保个人合计"), - SalaryI18nUtil.getI18nLabel(86709, "累计公积金个人合计"), - SalaryI18nUtil.getI18nLabel(86321, "累计子女教育"), - SalaryI18nUtil.getI18nLabel(86323, "累计继续教育"), - SalaryI18nUtil.getI18nLabel(86324, "累计住房贷款利息"), - SalaryI18nUtil.getI18nLabel(86325, "累计住房租金"), - SalaryI18nUtil.getI18nLabel(86326, "累计赡养老人"), - SalaryI18nUtil.getI18nLabel(105142, "累计大病医疗"), - SalaryI18nUtil.getI18nLabel(90567, "累计企业(职业)年金及其他福利"), - SalaryI18nUtil.getI18nLabel(93902, "累计其他免税扣除"), - SalaryI18nUtil.getI18nLabel(86704, "累计免税收入"), - SalaryI18nUtil.getI18nLabel(86703, "累计准予扣除的捐赠额"), - SalaryI18nUtil.getI18nLabel(105478, "累计减免税额"), - SalaryI18nUtil.getI18nLabel(86702, "累计已预扣预缴税额"), - SalaryI18nUtil.getI18nLabel(86702, "累计婴幼儿照护"), - SalaryI18nUtil.getI18nLabel(86702, "累计个人养老金") - }; - // 2.表头 - List headerList = Arrays.asList(header); - List> rows = new ArrayList<>(); - rows.add(headerList); - -// // 获取累计情况 -// List taxYearMonth = queryParam.getTaxYearMonth(); -// if (CollectionUtils.isNotEmpty(taxYearMonth)) { -// queryParam.setTaxYearMonth(taxYearMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList())); -// queryParam.setTaxYearMonthDate(taxYearMonth.stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList())); -// } - - // 开启分权并且不是薪酬模块总管理员 - List list = getAddUpSituationMapper().list(queryParam); - long employeeId = user.getUID(); - if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) { - List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); - list = list.stream().filter(f -> - taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) - ).collect(Collectors.toList()); - } -// // 人员信息赋值 -// list.forEach(m -> { -// // todo 身份证号 -// m.setIdNo(""); -// }); -// - for (AddUpSituationDTO dto : list) { - List row = new ArrayList<>(); - row.add(Util.null2String(dto.getUsername())); - row.add(Util.null2String(dto.getTaxAgentName())); - row.add(Util.null2String(dto.getDepartmentName())); - row.add(Util.null2String(dto.getMobile())); - row.add(Util.null2String(dto.getJobNum())); - row.add(Util.null2String(dto.getIdNo())); - row.add(Util.null2String(dto.getHiredate())); -// row.add(Util.null2String(dto.getAddUpIncome())); -// row.add(Util.null2String(dto.getAddUpSubtraction())); -// row.add(Util.null2String(dto.getAddUpSocialSecurityTotal())); -// row.add(Util.null2String(dto.getAddUpAccumulationFundTotal())); -// row.add(Util.null2String(dto.getAddUpChildEducation())); -// row.add(Util.null2String(dto.getAddUpContinuingEducation())); -// row.add(Util.null2String(dto.getAddUpHousingLoanInterest())); -// row.add(Util.null2String(dto.getAddUpHousingRent())); -// row.add(Util.null2String(dto.getAddUpSupportElderly())); -// row.add(Util.null2String(dto.getAddUpIllnessMedical())); -// row.add(Util.null2String(dto.getAddUpEnterpriseAndOther())); -// row.add(Util.null2String(dto.getAddUpOtherDeduction())); -// row.add(Util.null2String(dto.getAddUpTaxExemptIncome())); -// row.add(Util.null2String(dto.getAddUpAllowedDonation())); -// row.add(Util.null2String(dto.getAddUpTaxSavings())); -// row.add(Util.null2String(dto.getAddUpAdvanceTax())); -// row.add(Util.null2String(dto.getAddUpInfantCare())); - rows.add(row); - } + // 获取操作按钮资源 + List> rowList = getExcelRowList(queryParam, queryParam.isHasData()); // 4.注释 List excelComments = Lists.newArrayList(); excelComments.add(new ExcelComment(0, 0, 3, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); @@ -551,7 +474,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation excelComments.add(new ExcelComment(23, 0, 28, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); excelComments.add(new ExcelComment(24, 0, 29, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); - return ExcelUtil.genWorkbookV2(rows, sheetName, excelComments); + return ExcelUtil.genWorkbookV2(rowList, sheetName, excelComments); } @Override @@ -681,7 +604,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation String workcode = dto.getJobNum(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); //当人员信息导入筛选的全局配置为"0"时,姓名才是必填项 if (StringUtils.isBlank(userName) && "0".equals(confValue)) { diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 837427adb..0a88f9b0d 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -250,7 +250,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() @@ -434,13 +434,13 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction if (CollectionUtils.isNotEmpty(updateList)) { LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setUser(user); - if (updateList.size() ==1) { + if (updateList.size() == 1) { loggerContext.setTargetId(updateList.get(0).getId().toString()); } - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel( 0, "其他免税扣除")); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "其他免税扣除")); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); - loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel( 0, "新增")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel( 0, "新增其他免税扣除")); + loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "新增")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "新增其他免税扣除")); loggerContext.setNewValueList(updateList); SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); } @@ -472,7 +472,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction public XSSFWorkbook export(OtherDeductionQueryParam param) { //获取操作按钮资源 - List> rowList = getExcelRowList(param); + List> rowList = getExcelRowList(param,true); // 记录日志 String name = SalaryI18nUtil.getI18nLabel(0, "导出"); @@ -485,7 +485,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); //获取excel - return ExcelUtil.genWorkbook(rowList, "其他免税扣除"); + return ExcelUtil.genWorkbookV2(rowList, "其他免税扣除"); } @@ -494,56 +494,53 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction * * @return 导出数据行集合 */ - private List> getExcelRowList(OtherDeductionQueryParam param) { + private List> getExcelRowList(OtherDeductionQueryParam param, boolean hasData) { long employeeId = user.getUID(); //excel标题 - List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); - //排序配置 - OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); - param.setOrderRule(orderRule); - - //申报月份 - List declareMonth = param.getDeclareMonth(); - if (CollectionUtils.isNotEmpty(declareMonth)) { - param.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList())); - param.setDeclareMonthDate(declareMonth.stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList())); - } - - List list = getOtherDeductionMapper().list(param); - encryptUtil.decryptList(list, OtherDeductionListDTO.class); - // 开启分权并且不是薪酬模块总管理员 - if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) { - List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); - list = list.stream().filter(f -> - // 作为管理员 - taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) - ).collect(Collectors.toList()); - } - - - final List> dataRowList = Optional.ofNullable(list) - .map(List::stream) - .map(operatorStream -> operatorStream.map(dto -> { - List cellList = new ArrayList<>(); - cellList.add(Util.null2String(dto.getUsername())); - cellList.add(Util.null2String(dto.getTaxAgentName())); - cellList.add(Util.null2String(dto.getDepartmentName())); - cellList.add(Util.null2String(dto.getMobile())); - cellList.add(Util.null2String(dto.getJobNum())); - cellList.add(Util.null2String(dto.getIdNo())); - cellList.add(Util.null2String(dto.getHiredate())); - cellList.add(Util.null2String(dto.getBusinessHealthyInsurance())); - cellList.add(Util.null2String(dto.getTaxDelayEndowmentInsurance())); - cellList.add(Util.null2String(dto.getOtherDeduction())); - cellList.add(Util.null2String(dto.getDeductionAllowedDonation())); - cellList.add(Util.null2String(dto.getPrivatePension())); - return cellList; - }).collect(Collectors.toList())) - .orElse(Collections.emptyList()); - - List> rowList = new ArrayList<>(); + List title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额", "个人养老金"); + List> rowList = new ArrayList<>(); rowList.add(title); - rowList.addAll(dataRowList); + + if (hasData) { + //排序配置 + OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); + param.setOrderRule(orderRule); + + List list = getOtherDeductionMapper().list(param); + encryptUtil.decryptList(list, OtherDeductionListDTO.class); + SalaryI18nUtil.i18nList(list); + // 开启分权并且不是薪酬模块总管理员 + if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) { + List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); + list = list.stream().filter(f -> + // 作为管理员 + taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) + ).collect(Collectors.toList()); + } + + final List> dataRowList = Optional.ofNullable(list) + .map(List::stream) + .map(operatorStream -> operatorStream.map(dto -> { + List cellList = new ArrayList<>(); + cellList.add(Util.null2String(dto.getUsername())); + cellList.add(Util.null2String(dto.getTaxAgentName())); + cellList.add(Util.null2String(dto.getDepartmentName())); + cellList.add(Util.null2String(dto.getMobile())); + cellList.add(Util.null2String(dto.getJobNum())); + cellList.add(Util.null2String(dto.getIdNo())); + cellList.add(Util.null2String(dto.getHiredate())); + cellList.add(Util.null2String(dto.getBusinessHealthyInsurance())); + cellList.add(Util.null2String(dto.getTaxDelayEndowmentInsurance())); + cellList.add(Util.null2String(dto.getOtherDeduction())); + cellList.add(Util.null2String(dto.getDeductionAllowedDonation())); + cellList.add(Util.null2String(dto.getPrivatePension())); + return cellList; + }).collect(Collectors.toList())) + .orElse(Collections.emptyList()); + + rowList.addAll(dataRowList); + } + return rowList; } @@ -988,13 +985,13 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction }); if (CollectionUtils.isNotEmpty(updatetInfo)) { - String yearMonthStr = SalaryDateUtil.getFormatYearMonth(lastMonth.toLocalDate()) ; + String yearMonthStr = SalaryDateUtil.getFormatYearMonth(lastMonth.toLocalDate()); LoggerContext loggerContext = new LoggerContext(); loggerContext.setUser(user); - loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+yearMonthStr)); + loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "沿用上月 " + yearMonthStr)); loggerContext.setOperateType(OperateTypeEnum.ADD.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "沿用上月其他免税扣除")); - loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "沿用上月 "+ yearMonthStr +" 其他免税扣除")); + loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "沿用上月 " + yearMonthStr + " 其他免税扣除")); loggerContext.setNewValueList(updatetInfo); SalaryElogConfig.otherDeductionLoggerTemplate.write(loggerContext); } @@ -1006,23 +1003,8 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction public XSSFWorkbook downloadTemplate(OtherDeductionQueryParam param) { // 1.工作簿名称 String sheetName = SalaryI18nUtil.getI18nLabel(101604, "其他免税扣除导入模板"); - String[] header = { - SalaryI18nUtil.getI18nLabel(85429, "姓名"), - SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), - SalaryI18nUtil.getI18nLabel(86185, "部门"), - SalaryI18nUtil.getI18nLabel(86186, "手机号"), - SalaryI18nUtil.getI18nLabel(86317, "工号"), - SalaryI18nUtil.getI18nLabel(86318, "证件号码"), - SalaryI18nUtil.getI18nLabel(86319, "入职日期"), - SalaryI18nUtil.getI18nLabel(91238, "商业健康保险"), - SalaryI18nUtil.getI18nLabel(91239, "税延养老保险"), - SalaryI18nUtil.getI18nLabel(84500, "其他"), - SalaryI18nUtil.getI18nLabel(91240, "准予扣除的捐赠额") - }; - // 2.表头 - List> rows = new ArrayList<>(); - List headerList = Arrays.asList(header); - rows.add(headerList); + //获取操作按钮资源 + List> rowList = getExcelRowList(param,param.isHasData()); // 4.注释 List excelComments = Lists.newArrayList(); @@ -1032,8 +1014,9 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction excelComments.add(new ExcelComment(8, 0, 11, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); excelComments.add(new ExcelComment(9, 0, 12, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); excelComments.add(new ExcelComment(10, 0, 13, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); + excelComments.add(new ExcelComment(11, 0, 14, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字"))); - XSSFWorkbook book = ExcelUtil.genWorkbookV2(rows, sheetName, excelComments); + XSSFWorkbook book = ExcelUtil.genWorkbookV2(rowList, sheetName, excelComments); return book; } diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index 2aefb914c..739c19d24 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -243,7 +243,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List emps = getSalaryEmployeeService(user) - .matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + .matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() @@ -396,7 +396,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd List> rowList = new ArrayList<>(); rowList.add(title); - if (!isTemplate) { + if (!isTemplate || param.isHasData()) { // 非下载导入模版,查询数据填充 List> dataRowList = queryInfoForExcel(param, rowList); rowList.addAll(dataRowList); @@ -626,10 +626,10 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd oldSpecialAddDeductionList.add(byId); } SpecialAddDeductionBiz.batchDeleteByIds(deleteList); - + // 记录操作日志 if (CollectionUtils.isNotEmpty(oldSpecialAddDeductionList)) { - oldSpecialAddDeductionList.stream().forEach( e -> { + oldSpecialAddDeductionList.stream().forEach(e -> { LoggerContext loggerContext = new LoggerContext<>(); loggerContext.setTargetId(e.getId().toString()); loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "专项附加扣除") + "-" + e.getId()); @@ -671,7 +671,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd specialAddDeductionBiz.batchDeleteByIds(deleteIds); // 记录操作日志 - Collection finalTaxAgentIds =taxAgentIds; + Collection finalTaxAgentIds = taxAgentIds; List taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())) .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); String name = StringUtils.join(taxAgentNames, ","); @@ -692,9 +692,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd @Override public SpecialAddDeductionRecordDTO getRecordById(Long id) { - return getSpecialAddDeductionBiz() - .listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build()) - .stream().findFirst().orElse(null); + return getSpecialAddDeductionBiz().listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build()).stream().findFirst().orElse(null); } private List> queryInfoForExcel(SpecialAddDeductionQueryParam param, List> rowList) { diff --git a/src/com/engine/salary/web/AddUpDeductionController.java b/src/com/engine/salary/web/AddUpDeductionController.java index b153fd475..f5c4e0d6b 100644 --- a/src/com/engine/salary/web/AddUpDeductionController.java +++ b/src/com/engine/salary/web/AddUpDeductionController.java @@ -251,6 +251,10 @@ public class AddUpDeductionController { if (StringUtils.isNotBlank(accumulatedSpecialAdditionalDeductionId)) { param.setAccumulatedSpecialAdditionalDeductionId(Long.valueOf(accumulatedSpecialAdditionalDeductionId)); } + String hasData = request.getParameter("hasData"); + if (StringUtils.isNotBlank(hasData)) { + param.setHasData("true".equals(hasData)); + } return param; } diff --git a/src/com/engine/salary/web/AddUpSituationController.java b/src/com/engine/salary/web/AddUpSituationController.java index 0c31aa578..c10443a88 100644 --- a/src/com/engine/salary/web/AddUpSituationController.java +++ b/src/com/engine/salary/web/AddUpSituationController.java @@ -261,6 +261,10 @@ public class AddUpSituationController { if (StringUtils.isNotBlank(accumulatedSituationId)) { param.setAccumulatedSituationId(Long.valueOf(accumulatedSituationId)); } + String hasData = request.getParameter("hasData"); + if (StringUtils.isNotBlank(hasData)) { + param.setHasData("true".equals(hasData)); + } return param; } diff --git a/src/com/engine/salary/web/OtherDeductionController.java b/src/com/engine/salary/web/OtherDeductionController.java index d930daa5a..251507f68 100644 --- a/src/com/engine/salary/web/OtherDeductionController.java +++ b/src/com/engine/salary/web/OtherDeductionController.java @@ -254,6 +254,11 @@ public class OtherDeductionController { if (StringUtils.isNotBlank(otherTaxExemptDeductionId)) { param.setOtherTaxExemptDeductionId(Long.valueOf(otherTaxExemptDeductionId)); } + + String hasData = request.getParameter("hasData"); + if (StringUtils.isNotBlank(hasData)) { + param.setHasData("true".equals(hasData)); + } return param; } diff --git a/src/com/engine/salary/web/SpecialAddDeductionController.java b/src/com/engine/salary/web/SpecialAddDeductionController.java index 7b6f0eb45..891f48d91 100644 --- a/src/com/engine/salary/web/SpecialAddDeductionController.java +++ b/src/com/engine/salary/web/SpecialAddDeductionController.java @@ -3,8 +3,10 @@ package com.engine.salary.web; import com.engine.common.util.ServiceUtil; import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionListDTO; import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO; -import com.engine.salary.entity.datacollection.param.*; -import com.engine.salary.exception.SalaryRunTimeException; +import com.engine.salary.entity.datacollection.param.SpecialAddDeductionImportParam; +import com.engine.salary.entity.datacollection.param.SpecialAddDeductionParam; +import com.engine.salary.entity.datacollection.param.SpecialAddDeductionQueryParam; +import com.engine.salary.entity.datacollection.param.SpecialAddDeductionRecordDeleteParam; import com.engine.salary.util.ResponseResult; import com.engine.salary.util.page.PageInfo; import com.engine.salary.wrapper.SpecialAddDeductionWrapper; @@ -16,7 +18,6 @@ import org.jetbrains.annotations.Nullable; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; -import javax.security.sasl.SaslException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.GET; @@ -258,6 +259,10 @@ public class SpecialAddDeductionController { if (StringUtils.isNotBlank(otherTaxExemptDeductionId)) { param.setSpecialAddDeductionId(Long.valueOf(otherTaxExemptDeductionId)); } + String hasData = request.getParameter("hasData"); + if (StringUtils.isNotBlank(hasData)) { + param.setHasData("true".equals(hasData)); + } return param; } diff --git a/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java b/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java index aa89c3c58..9d0229528 100644 --- a/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java +++ b/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java @@ -103,8 +103,7 @@ public class AddUpDeductionWrapper extends Service { * @return */ public XSSFWorkbook export(AddUpDeductionQueryParam queryParam) { - boolean isChief = getTaxAgentService(user).isChief((long) user.getUID()); - return getAddUpDeductionService(user).export(isChief, queryParam); + return getAddUpDeductionService(user).export( queryParam); } /** diff --git a/src/com/engine/salary/wrapper/OtherDeductionWrapper.java b/src/com/engine/salary/wrapper/OtherDeductionWrapper.java index 514fa7833..3002e8cfd 100644 --- a/src/com/engine/salary/wrapper/OtherDeductionWrapper.java +++ b/src/com/engine/salary/wrapper/OtherDeductionWrapper.java @@ -196,7 +196,7 @@ public class OtherDeductionWrapper extends Service { * @return */ public XSSFWorkbook downloadTemplate(OtherDeductionQueryParam queryParam) { - return getOtherDeductionService(user).export(queryParam); + return getOtherDeductionService(user).downloadTemplate(queryParam); } /** From 29e81e03c27daeead19907d4af035ab1708a3418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 14 Mar 2024 16:08:16 +0800 Subject: [PATCH 161/169] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=9C=AA=E5=90=AF=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E8=80=83=E5=8B=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/param/AttendQuoteFieldQueryParam.java | 2 ++ .../salary/mapper/datacollection/AttendQuoteFieldMapper.xml | 3 +++ .../engine/salary/service/impl/RemoteExcelServiceImpl.java | 2 +- .../salary/service/impl/SpecialAddDeductionServiceImpl.java | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/param/AttendQuoteFieldQueryParam.java b/src/com/engine/salary/entity/datacollection/param/AttendQuoteFieldQueryParam.java index 3f1f0a832..40eb45720 100644 --- a/src/com/engine/salary/entity/datacollection/param/AttendQuoteFieldQueryParam.java +++ b/src/com/engine/salary/entity/datacollection/param/AttendQuoteFieldQueryParam.java @@ -38,6 +38,8 @@ public class AttendQuoteFieldQueryParam extends BaseQueryParam { //来源。1:自定义、2:考勤模块 private Integer sourceType; + private Integer enableStatus; + /** * 查询where语句 * diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteFieldMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteFieldMapper.xml index 0f3791981..4c1ae10ee 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteFieldMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteFieldMapper.xml @@ -357,6 +357,9 @@ WHERE t1.delete_type = 0 + + AND enable_status = #{param.enableStatus} + ORDER BY t1.source_type,t1.id DESC diff --git a/src/com/engine/salary/service/impl/RemoteExcelServiceImpl.java b/src/com/engine/salary/service/impl/RemoteExcelServiceImpl.java index b38a6d302..57a098cca 100644 --- a/src/com/engine/salary/service/impl/RemoteExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/RemoteExcelServiceImpl.java @@ -445,7 +445,7 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic } private List attendData2FormulaVar(SalaryFormulaReferenceEnum referenceEnum) { - List fields = getAttendQuoteFieldMapper().list(AttendQuoteFieldQueryParam.builder().build()); + List fields = getAttendQuoteFieldMapper().list(AttendQuoteFieldQueryParam.builder().enableStatus(1).build()); if (CollectionUtils.isEmpty(fields)) { return null; } diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index 739c19d24..a645ab054 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; @@ -692,7 +693,8 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd @Override public SpecialAddDeductionRecordDTO getRecordById(Long id) { - return getSpecialAddDeductionBiz().listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build()).stream().findFirst().orElse(null); + List specialAddDeductionRecordDTOList = getSpecialAddDeductionBiz().listDTOByParam(SpecialAddDeductionQueryParam.builder().specialAddDeductionId(id).build()); + return CollUtil.isNotEmpty(specialAddDeductionRecordDTOList) ? specialAddDeductionRecordDTOList.get(0) : null; } private List> queryInfoForExcel(SpecialAddDeductionQueryParam param, List> rowList) { From 0a7334ddef2ecf09203a6bfa3ffe31a46ba4f8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 14 Mar 2024 18:16:20 +0800 Subject: [PATCH 162/169] =?UTF-8?q?=E8=80=83=E5=8B=A4=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=EF=BC=8C=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/AddUpDeductionBiz.java | 4 +++- src/com/engine/salary/biz/AttendQuoteDataBiz.java | 4 +++- .../datacollection/dto/AddUpDeductionDTO.java | 2 ++ .../datacollection/dto/AttendQuoteDataBaseDTO.java | 3 +++ .../service/impl/AddUpDeductionServiceImpl.java | 14 ++++++++++---- .../service/impl/AddUpSituationServiceImpl.java | 10 +++++++--- .../service/impl/OtherDeductionServiceImpl.java | 14 +++++++++----- .../impl/SpecialAddDeductionServiceImpl.java | 12 +++++++----- 8 files changed, 44 insertions(+), 19 deletions(-) diff --git a/src/com/engine/salary/biz/AddUpDeductionBiz.java b/src/com/engine/salary/biz/AddUpDeductionBiz.java index ef512160b..14ba5933c 100644 --- a/src/com/engine/salary/biz/AddUpDeductionBiz.java +++ b/src/com/engine/salary/biz/AddUpDeductionBiz.java @@ -6,6 +6,7 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO; import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO; import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam; import com.engine.salary.mapper.datacollection.AddUpDeductionMapper; +import com.engine.salary.util.SalaryI18nUtil; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.ibatis.session.SqlSession; @@ -31,7 +32,8 @@ public class AddUpDeductionBiz extends BaseBean { try { AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class); List list = mapper.list(param); - list = encryptUtil.decryptList(list, AddUpDeductionDTO.class); + encryptUtil.decryptList(list, AddUpDeductionDTO.class); + SalaryI18nUtil.i18nList(list); return list; } finally { sqlSession.close(); diff --git a/src/com/engine/salary/biz/AttendQuoteDataBiz.java b/src/com/engine/salary/biz/AttendQuoteDataBiz.java index 8af27e8ba..f3b456fdf 100644 --- a/src/com/engine/salary/biz/AttendQuoteDataBiz.java +++ b/src/com/engine/salary/biz/AttendQuoteDataBiz.java @@ -4,6 +4,7 @@ import com.engine.salary.entity.datacollection.dto.AttendQuoteDataBaseDTO; import com.engine.salary.entity.datacollection.param.AttendQuoteDataQueryParam; import com.engine.salary.entity.datacollection.po.AttendQuoteDataPO; import com.engine.salary.mapper.datacollection.AttendQuoteDataMapper; +import com.engine.salary.util.SalaryI18nUtil; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.ibatis.session.SqlSession; @@ -17,7 +18,8 @@ public class AttendQuoteDataBiz { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { AttendQuoteDataMapper mapper = sqlSession.getMapper(AttendQuoteDataMapper.class); - return mapper.list(param); + List list = mapper.list(param); + return SalaryI18nUtil.i18nList(list); } finally { sqlSession.close(); } diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java index c44181818..b16ebacf6 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java @@ -43,6 +43,7 @@ public class AddUpDeductionDTO { @ExcelProperty(index = 0) @SalaryTableColumn(text = "姓名", width = "10%", column = "username") @TableTitle(title = "姓名", dataIndex = "username", key = "username") + @I18n private String username; /** @@ -64,6 +65,7 @@ public class AddUpDeductionDTO { @ExcelProperty(index = 2) @SalaryTableColumn(text = "部门", width = "10%", column = "departmentName") @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName") + @I18n private String departmentName; /** diff --git a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java index e261a0f59..a3b7ea962 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.datacollection.dto; +import com.engine.salary.annotation.I18n; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -34,11 +35,13 @@ public class AttendQuoteDataBaseDTO { /** * 姓名 */ + @I18n private String username; /** * 部门 */ + @I18n private String departmentName; /** diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 5817e89de..f2bf7b9d8 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -46,6 +46,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; import com.engine.salary.util.excel.ExcelParseHelper; +import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -54,6 +55,7 @@ import com.google.common.collect.Maps; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.file.ImageFileManager; @@ -67,6 +69,7 @@ import java.util.*; import java.util.stream.Collectors; import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; +import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; /** * 累计专项 @@ -700,12 +703,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction .map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList()); String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ","); LoggerContext loggerContext = new LoggerContext<>(); + loggerContext.setUser(user); loggerContext.setTargetName(name); loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue()); loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空")); loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil .getI18nLabel(0, "一键清空:") + name); - loggerContext.setUser(user); SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext); } @@ -939,14 +942,17 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction Validate.notBlank(imageId, "imageId为空"); InputStream fileInputStream = null; + try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List addUpDeductions = ExcelParseHelper.parse2Map(fileInputStream, AddUpDeductionDTO.class, 0, 1, 14, "addUpDeductionTemplate.xlsx"); - apidatas.put("preview", addUpDeductions); + Sheet sheet = ExcelSupport.parseFile(fileInputStream, 0, EXCEL_TYPE_XLSX); + apidatas.put("headers", ExcelSupport.getSheetHeader(sheet, 0)); + apidatas.put("list", ExcelParseHelper.parse2List(sheet, 1, 0)); + return apidatas; + } finally { IOUtils.closeQuietly(fileInputStream); } - return apidatas; } diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index 5f503572d..9c7994261 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -41,6 +41,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; import com.engine.salary.util.excel.ExcelParseHelper; +import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -48,6 +49,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.file.ImageFileManager; @@ -63,6 +65,7 @@ import java.util.*; import java.util.stream.Collectors; import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; +import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; public class AddUpSituationServiceImpl extends Service implements AddUpSituationService { private EncryptUtil encryptUtil = new EncryptUtil(); @@ -507,12 +510,13 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.valueOf(imageId)); - List excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 25, "template.xlsx"); - apidatas.put("preview", excelDates); + Sheet sheet = ExcelSupport.parseFile(fileInputStream, 0, EXCEL_TYPE_XLSX); + apidatas.put("headers", ExcelSupport.getSheetHeader(sheet, 0)); + apidatas.put("list", ExcelParseHelper.parse2List(sheet, 1, 0)); + return apidatas; } finally { IOUtils.closeQuietly(fileInputStream); } - return apidatas; } diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 0a88f9b0d..6ac7b89cf 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -37,6 +37,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelComment; import com.engine.salary.util.excel.ExcelParseHelper; +import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -45,6 +46,7 @@ import com.google.common.collect.Maps; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.file.ImageFileManager; @@ -59,6 +61,7 @@ import java.util.*; import java.util.stream.Collectors; import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; +import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; public class OtherDeductionServiceImpl extends Service implements OtherDeductionService { private EncryptUtil encryptUtil = new EncryptUtil(); @@ -165,12 +168,13 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List OtherDeductions = ExcelParseHelper.parse2Map(fileInputStream, OtherDeductionListDTO.class, 0, 1, 12, "OtherDeductionTemplate.xlsx"); - apidatas.put("preview", OtherDeductions); + Sheet sheet = ExcelSupport.parseFile(fileInputStream, 0, EXCEL_TYPE_XLSX); + apidatas.put("headers", ExcelSupport.getSheetHeader(sheet, 0)); + apidatas.put("list", ExcelParseHelper.parse2List(sheet, 1, 0)); + return apidatas; } finally { IOUtils.closeQuietly(fileInputStream); } - return apidatas; } @@ -472,7 +476,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction public XSSFWorkbook export(OtherDeductionQueryParam param) { //获取操作按钮资源 - List> rowList = getExcelRowList(param,true); + List> rowList = getExcelRowList(param, true); // 记录日志 String name = SalaryI18nUtil.getI18nLabel(0, "导出"); @@ -1004,7 +1008,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction // 1.工作簿名称 String sheetName = SalaryI18nUtil.getI18nLabel(101604, "其他免税扣除导入模板"); //获取操作按钮资源 - List> rowList = getExcelRowList(param,param.isHasData()); + List> rowList = getExcelRowList(param, param.isHasData()); // 4.注释 List excelComments = Lists.newArrayList(); diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index a645ab054..cd8cc1c83 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -37,6 +37,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.excel.ExcelParseHelper; +import com.engine.salary.util.excel.ExcelSupport; import com.engine.salary.util.excel.ExcelUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.SalaryPageUtil; @@ -44,6 +45,7 @@ import com.google.common.collect.Maps; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import weaver.file.ImageFileManager; @@ -57,6 +59,7 @@ import java.util.*; import java.util.stream.Collectors; import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY; +import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX; public class SpecialAddDeductionServiceImpl extends Service implements SpecialAddDeductionService { private EncryptUtil encryptUtil = new EncryptUtil(); @@ -162,14 +165,13 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List SpecialAddDeductions = - ExcelParseHelper.parse2Map(fileInputStream, SpecialAddDeductionListDTO.class, 0, 1, 14, - "SpecialAddDeductionTemplate.xlsx"); - apidatas.put("preview", SpecialAddDeductions); + Sheet sheet = ExcelSupport.parseFile(fileInputStream, 0, EXCEL_TYPE_XLSX); + apidatas.put("headers", ExcelSupport.getSheetHeader(sheet, 0)); + apidatas.put("list", ExcelParseHelper.parse2List(sheet, 1, 0)); + return apidatas; } finally { IOUtils.closeQuietly(fileInputStream); } - return apidatas; } From c3800881bc0c8bf648fb635d0f9811def75fdf9d Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 15 Mar 2024 09:31:04 +0800 Subject: [PATCH 163/169] sql --- resource/sqlupgrade/DM/sql202403150103.sql | 3 +++ resource/sqlupgrade/GS/sql202403150103.sql | 3 +++ resource/sqlupgrade/JC/sql202403150103.sql | 3 +++ resource/sqlupgrade/Mysql/sql202403150103.sql | 1 + resource/sqlupgrade/Oracle/sql202403150103.sql | 2 ++ resource/sqlupgrade/PG/sql202403150103.sql | 1 + resource/sqlupgrade/SQLServer/sql202403150103.sql | 2 ++ resource/sqlupgrade/ST/sql202403150103.sql | 3 +++ 8 files changed, 18 insertions(+) create mode 100644 resource/sqlupgrade/DM/sql202403150103.sql create mode 100644 resource/sqlupgrade/GS/sql202403150103.sql create mode 100644 resource/sqlupgrade/JC/sql202403150103.sql create mode 100644 resource/sqlupgrade/Mysql/sql202403150103.sql create mode 100644 resource/sqlupgrade/Oracle/sql202403150103.sql create mode 100644 resource/sqlupgrade/PG/sql202403150103.sql create mode 100644 resource/sqlupgrade/SQLServer/sql202403150103.sql create mode 100644 resource/sqlupgrade/ST/sql202403150103.sql diff --git a/resource/sqlupgrade/DM/sql202403150103.sql b/resource/sqlupgrade/DM/sql202403150103.sql new file mode 100644 index 000000000..ddd68bf00 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202403150103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_send_info add first_reading_time date; +/ + diff --git a/resource/sqlupgrade/GS/sql202403150103.sql b/resource/sqlupgrade/GS/sql202403150103.sql new file mode 100644 index 000000000..ddd68bf00 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202403150103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_send_info add first_reading_time date; +/ + diff --git a/resource/sqlupgrade/JC/sql202403150103.sql b/resource/sqlupgrade/JC/sql202403150103.sql new file mode 100644 index 000000000..ddd68bf00 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202403150103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_send_info add first_reading_time date; +/ + diff --git a/resource/sqlupgrade/Mysql/sql202403150103.sql b/resource/sqlupgrade/Mysql/sql202403150103.sql new file mode 100644 index 000000000..5d98d2dad --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202403150103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_send_info add first_reading_time datetime; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202403150103.sql b/resource/sqlupgrade/Oracle/sql202403150103.sql new file mode 100644 index 000000000..f2ba113a1 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202403150103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_send_info add first_reading_time date +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202403150103.sql b/resource/sqlupgrade/PG/sql202403150103.sql new file mode 100644 index 000000000..4f331b378 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202403150103.sql @@ -0,0 +1 @@ +alter table hrsa_salary_send_info add first_reading_time timestamp; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202403150103.sql b/resource/sqlupgrade/SQLServer/sql202403150103.sql new file mode 100644 index 000000000..f4fe70321 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202403150103.sql @@ -0,0 +1,2 @@ +alter table hrsa_salary_send_info add first_reading_time datetime +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202403150103.sql b/resource/sqlupgrade/ST/sql202403150103.sql new file mode 100644 index 000000000..ddd68bf00 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202403150103.sql @@ -0,0 +1,3 @@ +alter table hrsa_salary_send_info add first_reading_time date; +/ + From 08b2c240abea060c6dc1cec350e3eb84577088d7 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 15 Mar 2024 10:14:59 +0800 Subject: [PATCH 164/169] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/service/impl/SalarySendServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 5a66005d6..a2e0a6415 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -514,7 +514,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService if (burningAfterReadingMin != null) { LocalDateTime limitTime = SalaryDateUtil.dateToLocalDateTime(firstReadingTime).plusMinutes(burningAfterReadingMin); LocalDateTime now = SalaryDateUtil.dateToLocalDateTime(new Date()); - if (limitTime.isBefore(now)) { + if (burningAfterReadingMin == 0) { + throw new SalaryRunTimeException("无法查看工资单,该工资单仅供查看一次。首次查看时间为:" + SalaryDateUtil.getFormatLocalDateTime(firstReadingTime)); + } else if (limitTime.isBefore(now)) { throw new SalaryRunTimeException("首次查看工资单" + burningAfterReadingMin + "分钟后,无法查看工资单。首次查看时间为:" + SalaryDateUtil.getFormatLocalDateTime(firstReadingTime)); } } From 80510c8cfcf299a33e9745a5379e6bbefda2544e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 15 Mar 2024 10:20:38 +0800 Subject: [PATCH 165/169] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/prop/hrmSalary.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index de3e0dac9..713f3d934 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=2.11.1.2402.01 +version=2.11.2.2403.01 openFormulaForcedEditing=false \ No newline at end of file From 68b4d29c404acbd96fce858b9459caacba6945b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 18 Mar 2024 09:54:59 +0800 Subject: [PATCH 166/169] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/prop/hrmSalary.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index 713f3d934..4ca5b1e88 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=2.11.2.2403.01 +version=2.12.1.2403.02 openFormulaForcedEditing=false \ No newline at end of file From 0c444acd388679ba23ecf101a7c28e0ecb8903e4 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 21 Mar 2024 14:19:03 +0800 Subject: [PATCH 167/169] =?UTF-8?q?=E5=A4=9A=E9=83=A8=E9=97=A8=E5=A4=9A?= =?UTF-8?q?=E5=88=86=E9=83=A8=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalarySendDetailListQueryParam.java | 7 +- .../param/SalarySendInfoQueryParam.java | 7 ++ .../param/InsuranceAccountDetailParam.java | 4 ++ .../salarybill/SalarySendInfoMapper.xml | 26 ++++++- .../InsuranceAccountDetailMapper.xml | 72 +++++++++++++++++++ .../salary/web/SalaryBillController.java | 14 +++- 6 files changed, 127 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailListQueryParam.java b/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailListQueryParam.java index e330f2818..ae526ad40 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailListQueryParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailListQueryParam.java @@ -45,7 +45,12 @@ public class SalarySendDetailListQueryParam extends BaseQueryParam { private Long taxAgent; // 部门id") - private Long department; + private List departmentIds; + private String departmentIdStr; + + // 分部id + private List subCompanyIds; + private String subCompanyIdStr; // 岗位id") private Long position; diff --git a/src/com/engine/salary/entity/salaryBill/param/SalarySendInfoQueryParam.java b/src/com/engine/salary/entity/salaryBill/param/SalarySendInfoQueryParam.java index 70e56384d..981524986 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalarySendInfoQueryParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalarySendInfoQueryParam.java @@ -47,6 +47,9 @@ public class SalarySendInfoQueryParam extends BaseQueryParam { // 部门id") private List departmentIds; + // 分部id + private List subCompanyIds; + // 岗位id") private List positionIds; @@ -77,6 +80,10 @@ public class SalarySendInfoQueryParam extends BaseQueryParam { // @JsonIgnore private List sendStatuss; + private String departmentIdStr; + + private String subCompanyIdStr; + public static String checkParam(SalarySendInfoQueryParam saveParam) { if (saveParam.getSalarySendId() == null) { throw new SalaryRunTimeException("工资单发放Id必传"); diff --git a/src/com/engine/salary/entity/siaccount/param/InsuranceAccountDetailParam.java b/src/com/engine/salary/entity/siaccount/param/InsuranceAccountDetailParam.java index 2492513cd..b8e56f090 100644 --- a/src/com/engine/salary/entity/siaccount/param/InsuranceAccountDetailParam.java +++ b/src/com/engine/salary/entity/siaccount/param/InsuranceAccountDetailParam.java @@ -42,4 +42,8 @@ public class InsuranceAccountDetailParam extends BaseQueryParam { private Long creator; private String workcode; + + private List departmentIds; + + private List subCompanyIds; } diff --git a/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml b/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml index a7738491f..4870fdfde 100644 --- a/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml +++ b/src/com/engine/salary/mapper/salarybill/SalarySendInfoMapper.xml @@ -381,6 +381,13 @@ and t1.send_status in (0, 2) + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + @@ -411,6 +418,12 @@ and t1.send_status in (0, 2) + + + AND e.subcompanyid1 IN + + #{subCompanyId} + @@ -441,7 +454,12 @@ and t1.send_status in (0, 2) - + + AND e.subcompanyid1 IN + + #{subCompanyId} + + @@ -513,6 +531,12 @@ )) + + AND e.subcompanyid1 IN + + #{subCompanyId} + + diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 82d0e6db3..55b55947e 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -203,6 +203,18 @@ #{taxAgent} + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + @@ -232,6 +244,18 @@ #{taxAgent} + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + @@ -261,6 +285,18 @@ #{taxAgent} + + AND e.departmentid IN + + #{departmentId} + + + + AND e.subcompanyid1 IN + + #{subCompanyId} + + @@ -291,6 +327,18 @@ #{taxAgent} + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + @@ -320,6 +368,18 @@ #{taxAgent} + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + @@ -349,6 +409,18 @@ #{taxAgent} + + AND e.department_id IN + + #{departmentId} + + + + AND e.subcompany_id IN + + #{subCompanyId} + + diff --git a/src/com/engine/salary/web/SalaryBillController.java b/src/com/engine/salary/web/SalaryBillController.java index 5468435dc..3b29aaea4 100644 --- a/src/com/engine/salary/web/SalaryBillController.java +++ b/src/com/engine/salary/web/SalaryBillController.java @@ -347,6 +347,12 @@ public class SalaryBillController { @Produces(MediaType.APPLICATION_JSON) public String infoList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendInfoQueryParam queryParam) { User user = HrmUserVarify.getUser(request, response); + if (StringUtils.isNotBlank(queryParam.getDepartmentIdStr())) { + queryParam.setDepartmentIds(Arrays.stream(StringUtils.split(queryParam.getDepartmentIdStr(), ",")).map(Long::valueOf).collect(Collectors.toList())); + } + if (StringUtils.isNotBlank(queryParam.getSubCompanyIdStr())) { + queryParam.setSubCompanyIds(Arrays.stream(StringUtils.split(queryParam.getSubCompanyIdStr(), ",")).map(Long::valueOf).collect(Collectors.toList())); + } return new ResponseResult>(user).run(getSalarySendWrapper(user)::infoList, queryParam); } @@ -487,7 +493,7 @@ public class SalaryBillController { // 处理入参复用方法 SalarySendDetailQueryParam detailQueryParam = SalarySendDetailQueryParam.builder() .userId(queryParam.getUserId()) - .departmentIds(SalaryEntityUtil.isNullOrEmpty(queryParam.getDepartment()) ? null : Collections.singletonList(queryParam.getDepartment())) + .departmentIds(CollectionUtils.isEmpty(queryParam.getDepartmentIds()) ? null : queryParam.getDepartmentIds()) .salarySendId(queryParam.getSalarySendId()) .mergeCountTax(queryParam.getMergeCountTax()) .positionIds(SalaryEntityUtil.isNullOrEmpty(queryParam.getPosition()) ? null : Collections.singletonList(queryParam.getPosition())) @@ -497,6 +503,12 @@ public class SalaryBillController { detailQueryParam.setCurrent(queryParam.getCurrent()); detailQueryParam.setPageSize(queryParam.getPageSize()); + if (StringUtils.isNotBlank(queryParam.getSubCompanyIdStr())) { + detailQueryParam.setSubCompanyIds(Arrays.asList(StringUtils.split(queryParam.getSubCompanyIdStr(), ",")).stream().map(Long::new).collect(Collectors.toList())); + } + if (StringUtils.isNotBlank(queryParam.getDepartmentIdStr())) { + detailQueryParam.setDepartmentIds(Arrays.asList(StringUtils.split(queryParam.getDepartmentIdStr(), ",")).stream().map(Long::new).collect(Collectors.toList())); + } return new ResponseResult>(user).run(getSalarySendWrapper(user)::detailList, detailQueryParam); } From 18c496c00980ea38a0315edfba3f14550d30727f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 21 Mar 2024 14:19:36 +0800 Subject: [PATCH 168/169] =?UTF-8?q?=E5=A4=9A=E9=83=A8=E9=97=A8=E5=A4=9A?= =?UTF-8?q?=E5=88=86=E9=83=A8=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalarySendDetailQueryParam.java | 3 ++ .../salary/wrapper/SalarySendWrapper.java | 31 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailQueryParam.java b/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailQueryParam.java index 5d375a48d..94fb68c32 100644 --- a/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailQueryParam.java +++ b/src/com/engine/salary/entity/salaryBill/param/SalarySendDetailQueryParam.java @@ -47,6 +47,9 @@ public class SalarySendDetailQueryParam extends BaseQueryParam { // 部门id") private List departmentIds; + // 分部id + private List subCompanyIds; + // 岗位id") private List positionIds; diff --git a/src/com/engine/salary/wrapper/SalarySendWrapper.java b/src/com/engine/salary/wrapper/SalarySendWrapper.java index a59e5ec01..39784a675 100644 --- a/src/com/engine/salary/wrapper/SalarySendWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySendWrapper.java @@ -256,8 +256,20 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy taxAgent.setLabel("个税扣缴义务人"); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(taxAgent); + // 分部 + SearchConditionItem subCompany = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "subCompanyIdStr", "194"); + subCompany.setColSpan(2); + subCompany.setFieldcol(16); + subCompany.setLabelcol(8); + subCompany.setViewAttr(2); + subCompany.setIsQuickSearch(false); + subCompany.setLabel("分部"); + subCompany.setInputType(""); + subCompany.getBrowserConditionParam().setIsSingle(false); + conditionItems.add(subCompany); + // 部门 - SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "departmentIds", "4"); + SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "departmentIdStr", "4"); departmentName.setColSpan(2); departmentName.setFieldcol(16); departmentName.setLabelcol(8); @@ -265,6 +277,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy departmentName.setIsQuickSearch(false); departmentName.setLabel("部门"); departmentName.setInputType(""); + departmentName.getBrowserConditionParam().setIsSingle(false); conditionItems.add(departmentName); // 岗位 @@ -417,8 +430,21 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy taxAgent.setLabel("个税扣缴义务人"); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(taxAgent); + // 分部 + SearchConditionItem subCompany = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "subCompanyIdStr", "194"); + subCompany.setColSpan(2); + subCompany.setFieldcol(16); + subCompany.setLabelcol(8); + subCompany.setViewAttr(2); + subCompany.setInputType(""); + subCompany.setIsQuickSearch(false); + subCompany.setLabel("分部"); + subCompany.getBrowserConditionParam().setIsSingle(false); + conditionItems.add(subCompany); + + // 部门 - SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "department", "4"); + SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "departmentIdStr", "4"); departmentName.setColSpan(2); departmentName.setFieldcol(16); departmentName.setLabelcol(8); @@ -426,6 +452,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy departmentName.setInputType(""); departmentName.setIsQuickSearch(false); departmentName.setLabel("部门"); + departmentName.getBrowserConditionParam().setIsSingle(false); conditionItems.add(departmentName); // 岗位 From 25c2e2f1c165078a97512b933762ca9733410b85 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 22 Mar 2024 15:23:03 +0800 Subject: [PATCH 169/169] =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=BB=B4=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/EmployBiz.java | 19 ++++ .../engine/salary/entity/hrm/DeptInfo.java | 2 + .../mapper/datacollection/EmployMapper.java | 33 ++++++ .../mapper/datacollection/EmployMapper.xml | 107 ++++++++++++++++++ .../salary/service/SalaryEmployeeService.java | 16 +++ .../impl/SalaryEmployeeServiceImpl.java | 56 ++++++++- .../impl/TaxAgentManageRangeServiceImpl.java | 47 +++++++- 7 files changed, 273 insertions(+), 7 deletions(-) diff --git a/src/com/engine/salary/biz/EmployBiz.java b/src/com/engine/salary/biz/EmployBiz.java index 3599d68e0..ccfe89ef0 100644 --- a/src/com/engine/salary/biz/EmployBiz.java +++ b/src/com/engine/salary/biz/EmployBiz.java @@ -13,6 +13,7 @@ import weaver.conn.mybatis.MyBatisFactory; import weaver.general.BaseBean; import java.util.ArrayList; +import java.util.Collections; import java.util.List; public class EmployBiz extends BaseBean { @@ -115,6 +116,24 @@ public class EmployBiz extends BaseBean { } } + public List listByVirtualParams(List virtualQueryParams) { + if (CollectionUtils.isEmpty(virtualQueryParams)) { + return Collections.emptyList(); + } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + EmployMapper mapper = sqlSession.getMapper(EmployMapper.class); + List emps = new ArrayList<>(); + List> partition = Lists.partition(virtualQueryParams, 100); + partition.forEach(list->{ + emps.addAll(mapper.listByVirtualParams(list)); + }); + return emps; + } finally { + sqlSession.close(); + } + } + public DataCollectionEmployee getEmployeeById(Long employeeId) { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { diff --git a/src/com/engine/salary/entity/hrm/DeptInfo.java b/src/com/engine/salary/entity/hrm/DeptInfo.java index 12f2f61f9..c9b6876ef 100644 --- a/src/com/engine/salary/entity/hrm/DeptInfo.java +++ b/src/com/engine/salary/entity/hrm/DeptInfo.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.hrm; +import com.engine.salary.annotation.I18n; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -24,6 +25,7 @@ public class DeptInfo { /** * 名称 */ + @I18n private String name; /** diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.java b/src/com/engine/salary/mapper/datacollection/EmployMapper.java index 4f3aa8ed4..ef8646494 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.java +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.java @@ -51,6 +51,9 @@ public interface EmployMapper { */ List listByParams(@Param("params") Collection queryParams); + List listByVirtualParams(@Param("params") Collection queryParams); + + /** * 多表,详细信息 * @param employeeId @@ -78,6 +81,15 @@ public interface EmployMapper { */ List getDeptInfoList(@Param("departmentIds") List departmentIds); + + /** + * 虚拟部门(其他组织维度) + * @param virtualDepartmentIds + * @return + */ + List getVirtualDeptInfoList(@Param("virtualDepartmentIds") List virtualDepartmentIds); + + /** * 所以分部 * @param subDepartmentIds @@ -85,6 +97,13 @@ public interface EmployMapper { */ List getSubCompanyInfoList(@Param("subDepartmentIds") List subDepartmentIds); + /** + * 虚拟分部 + * @param virtualSubCompanyIds + * @return + */ + List getVirtualSubCompanyInfoList(@Param("virtualSubCompanyIds") List virtualSubCompanyIds); + List listHrmInfoByIdAndName(@Param("param") HrmQueryParam param); List listExtHrmInfoByIdAndName(@Param("param") HrmQueryParam param); @@ -110,4 +129,18 @@ public interface EmployMapper { * @return */ List listByDismissDate(String dismissDate); + + /** + * 根据虚拟部门获取人员信息 + * @param virtualDepartmentIds + * @return + */ + List listVirtualEmpByVirtualDepIds(@Param("virtualDepartmentIds") List virtualDepartmentIds); + + /** + * 根据虚拟分部获取人员信息 + * @param virtualSubCompanyIds + * @return + */ + List listVirtualEmpByVirtualSubCompanyIds(@Param("virtualSubCompanyIds") List virtualSubCompanyIds); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 29ce5fcbe..2c1f00d16 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -151,6 +151,54 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java index 16afbb396..11a1b002b 100644 --- a/src/com/engine/salary/service/SalaryEmployeeService.java +++ b/src/com/engine/salary/service/SalaryEmployeeService.java @@ -93,8 +93,12 @@ public interface SalaryEmployeeService { List getDeptInfoList(List departmentIds); + List getVirtualDeptInfoList(List virtualDepartmentIds); + List getSubCompanyInfoList(List subDepartmentIds); + List getVirtualSubCompanyInfoList(List virtualSubDepartmentIds); + List listPositionInfo(List positionIds); List listEmployee(); @@ -134,4 +138,16 @@ public interface SalaryEmployeeService { * @return */ EmployeeInfoExpandDTO getExpandFieldSettings(String module); + + /** + * 根据虚拟部门获取人员信息 + * @param virtualDepartmentIds + */ + List getVirtualEmpByVirtualDepIds(List virtualDepartmentIds); + + /** + * 根据虚拟分部获取人员信息 + * @param virtualSubCompanyIds + */ + List getVirtualEmpByVirtualSubCompanyIds(List virtualSubCompanyIds); } diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index 3293bf105..c031ff5d5 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -19,6 +19,8 @@ import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam; import com.engine.salary.entity.salarysob.po.SalarySobRangePO; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; +import com.engine.salary.enums.salarysob.TargetTypeEnum; +import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.hrm.ExpandFieldSettingsMapper; import com.engine.salary.mapper.sys.SalarySysConfMapper; import com.engine.salary.service.ExtEmpService; @@ -61,6 +63,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee return SqlProxyHandle.getProxy(SalarySysConfMapper.class); } + private EmployMapper getEmployMapper() { + return SqlProxyHandle.getProxy(EmployMapper.class); + } + private ExpandFieldSettingsMapper getExpandFieldSettingsMapper() { return SqlProxyHandle.getProxy(ExpandFieldSettingsMapper.class); @@ -259,14 +265,32 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee @Override public List getDeptInfoList(List departmentIds) { - return employBiz.getDeptInfoList(departmentIds); + return SalaryI18nUtil.i18nList(employBiz.getDeptInfoList(departmentIds)); } + @Override + public List getVirtualDeptInfoList(List virtualDepartmentIds) { + if (CollectionUtils.isEmpty(virtualDepartmentIds)) { + return Collections.emptyList(); + } + return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualDeptInfoList(virtualDepartmentIds)); + } + + @Override public List getSubCompanyInfoList(List subDepartmentIds) { return SalaryI18nUtil.i18nList(employBiz.getSubCompanyInfoList(subDepartmentIds)); } + @Override + public List getVirtualSubCompanyInfoList(List virtualSubDepartmentIds) { + if (CollectionUtils.isEmpty(virtualSubDepartmentIds)) { + return Collections.emptyList(); + } + return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualSubCompanyInfoList(virtualSubDepartmentIds)); + } + + @Override public List listPositionInfo(List positionIds) { return SalaryI18nUtil.i18nList(employBiz.listPositionInfo(positionIds)); @@ -283,10 +307,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee @Override public List listByParams(List includeQueryParams) { + if (CollectionUtils.isEmpty(includeQueryParams)) { + return Collections.emptyList(); + } + List result = employBiz.listByParams(includeQueryParams); if (openExtEmp) { result.addAll(getExtEmpService(user).listByParams(includeQueryParams)); } + // 查询虚拟部门、分部人员信息 + List virtualParams = includeQueryParams.stream().filter(param -> + (param.getTargetType().equals(TargetTypeEnum.SUBCOMPANY.name()) || param.getTargetType().equals(TargetTypeEnum.DEPT.name())) && ((List) param.getTargetIds()).get(0).compareTo(0L) < 0 + ).collect(Collectors.toList()); + + result.addAll(employBiz.listByVirtualParams(virtualParams)); + + // 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重 + result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new)); + return SalaryI18nUtil.i18nList(result); } @@ -428,4 +466,20 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee return null; } + + @Override + public List getVirtualEmpByVirtualDepIds(List virtualDepartmentIds) { + if (CollectionUtils.isEmpty(virtualDepartmentIds)) { + return Collections.emptyList(); + } + return getEmployMapper().listVirtualEmpByVirtualDepIds(virtualDepartmentIds); + } + + @Override + public List getVirtualEmpByVirtualSubCompanyIds(List virtualSubCompanyIds) { + if (CollectionUtils.isEmpty(virtualSubCompanyIds)) { + return Collections.emptyList(); + } + return getEmployMapper().listVirtualEmpByVirtualSubCompanyIds(virtualSubCompanyIds); + } } diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index a3c7fbbaf..e789ea5c2 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -176,8 +176,21 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM if (CollectionUtils.isEmpty(taxAgentManageRanges) || CollectionUtils.isEmpty(salaryEmployees)) { return Collections.emptyList(); } + // 获取虚拟部门下人员信息 + List virtualDepartmentIds = taxAgentManageRanges.stream().filter(manageRange -> manageRange.getTargetType().equals(TargetTypeEnum.DEPT.getValue()) && manageRange.getTargetId().compareTo(0L) < 0) + .map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList()); + List virtualEmpListByDep = getSalaryEmployeeService(user).getVirtualEmpByVirtualDepIds(virtualDepartmentIds); + Map> virtualDepMap = SalaryEntityUtil.group2Map(virtualEmpListByDep, DataCollectionEmployee::getDepartmentId, DataCollectionEmployee::getEmployeeId); + + // 获取虚拟分部下人员信息 + List virtualSubCompanyIds = taxAgentManageRanges.stream().filter(manageRange -> manageRange.getTargetType().equals(TargetTypeEnum.SUBCOMPANY.getValue()) && manageRange.getTargetId().compareTo(0L) < 0) + .map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList()); + List virtualEmpListBySubCom = getSalaryEmployeeService(user).getVirtualEmpByVirtualSubCompanyIds(virtualSubCompanyIds); + Map> virtualSubCompanyMap = SalaryEntityUtil.group2Map(virtualEmpListBySubCom, DataCollectionEmployee::getSubcompanyid, DataCollectionEmployee::getEmployeeId); + List salaryEmployeeList = Lists.newArrayList(); for (TaxAgentManageRangePO manageRange : taxAgentManageRanges) { + boolean isVirtual = manageRange.getTargetId().compareTo(0L) < 0 ? true : false; salaryEmployeeList.addAll(salaryEmployees.stream().filter(salaryEmployee -> { if (StringUtils.isEmpty(manageRange.getEmployeeStatus()) || !manageRange.getEmployeeStatus().contains("\"" + salaryEmployee.getStatus() + "\"")) { return false; @@ -188,11 +201,26 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getEmployeeId())) { return true; } - if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.DEPT.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getDepartmentId())) { - return true; - } - if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getSubcompanyid())) { - return true; + if (isVirtual) { + if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.DEPT.getValue())) { + Set empIds = virtualDepMap.get(manageRange.getTargetId()); + if (CollectionUtils.isNotEmpty(empIds) && empIds.contains(salaryEmployee.getEmployeeId())) { + return true; + } + } + if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())) { + Set empIds = virtualSubCompanyMap.get(manageRange.getTargetId()); + if (CollectionUtils.isNotEmpty(empIds) && empIds.contains(salaryEmployee.getEmployeeId())) { + return true; + } + } + } else { + if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.DEPT.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getDepartmentId())) { + return true; + } + if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getSubcompanyid())) { + return true; + } } if (Objects.equals(manageRange.getTargetType(), TargetTypeEnum.POSITION.getValue()) && Objects.equals(manageRange.getTargetId(), salaryEmployee.getJobtitleId())) { return true; @@ -250,10 +278,17 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM // 查询部门信息 List departmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.DEPT.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList()); List departmentComInfos = getSalaryEmployeeService().getDeptInfoList(departmentIds); + // 虚拟部门 + List virtualDepIds = departmentIds.stream().filter(id -> id.compareTo(0L) < 0).collect(Collectors.toList()); + departmentComInfos.addAll(getSalaryEmployeeService().getVirtualDeptInfoList(virtualDepIds)); + // 查询分部信息 List subDepartmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList()); - List subDepartmentComInfos = getSalaryEmployeeService().getSubCompanyInfoList(subDepartmentIds); + // 虚拟分部 + List virtualSubCompanyIds = subDepartmentIds.stream().filter(id -> id.compareTo(0L) < 0).collect(Collectors.toList()); + subDepartmentComInfos.addAll(getSalaryEmployeeService().getVirtualSubCompanyInfoList(virtualSubCompanyIds)); + // 查询岗位信息 List positionIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList()); List positionComInfos = getSalaryEmployeeService().listPositionInfo(positionIds);