From b0fb2b38667bf78183eb310316ced9d8090ccf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 15 Apr 2025 17:49:38 +0800 Subject: [PATCH 01/28] =?UTF-8?q?=E9=83=A8=E5=88=86=E5=8F=91=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/SalarySendRangeObjBiz.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/biz/SalarySendRangeObjBiz.java b/src/com/engine/salary/biz/SalarySendRangeObjBiz.java index 05ccaaadb..53633dce6 100644 --- a/src/com/engine/salary/biz/SalarySendRangeObjBiz.java +++ b/src/com/engine/salary/biz/SalarySendRangeObjBiz.java @@ -7,6 +7,8 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO; import com.engine.salary.mapper.salarybill.SalarySendRangeObjMapper; import com.engine.salary.service.TaxAgentService; import com.engine.salary.service.impl.TaxAgentServiceImpl; +import com.engine.salary.util.db.MapperProxyFactory; +import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.ibatis.session.SqlSession; import weaver.conn.mybatis.MyBatisFactory; @@ -23,6 +25,10 @@ public class SalarySendRangeObjBiz { return ServiceUtil.getService(TaxAgentServiceImpl.class); } + private SalarySendRangeObjMapper getSalarySendRangeObjMapper() { + return MapperProxyFactory.getProxy(SalarySendRangeObjMapper.class); + } + public R applyMapper(Function mapper) { try (SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession()) { final SalarySendRangeObjMapper salarySendRangeObjMapper = sqlSession.getMapper(SalarySendRangeObjMapper.class); @@ -41,7 +47,13 @@ public class SalarySendRangeObjBiz { } public List getSalarySendUserInfoDTOs(List employees) { - List userDTOs = applyMapper(mapper -> mapper.getUserInfoByEmployeeIds(employees)); + List userDTOs = new ArrayList<>(); + List> partition = Lists.partition(employees, 500); + partition.forEach(l->{ + List userInfos = getSalarySendRangeObjMapper().getUserInfoByEmployeeIds(l); + userDTOs.addAll(userInfos); + }); + Map userMap = userDTOs.stream() .collect(Collectors.toMap(SalarySendUserInfoDTO::getResourceId, Function.identity())); From 99a0c3facce654427123788bdadb565879e05481 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 16 Apr 2025 13:26:36 +0800 Subject: [PATCH 02/28] =?UTF-8?q?2100bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SalaryArchiveServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 538160d20..ceab506eb 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -1425,7 +1425,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe if (CollectionUtils.isEmpty(employeeIds)) { return Collections.emptyList(); } - return getSalaryArchiveMapper().listPayEndDateIsNull(employeeIds); + List> partition = Lists.partition(employeeIds, 500); + List resultList = new ArrayList<>(); + partition.forEach(part -> { + resultList.addAll(getSalaryArchiveMapper().listPayEndDateIsNull(part)); + }); + return resultList; } @Override From 37445cdd58665f38ba718f1dd9a659db5c6b2e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 16 Apr 2025 14:06:46 +0800 Subject: [PATCH 03/28] =?UTF-8?q?fix=E9=83=A8=E5=88=86=E5=8F=91=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SalaryBillServiceImpl.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java b/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java index 4df8aa8f2..8928680cb 100644 --- a/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryBillServiceImpl.java @@ -169,16 +169,6 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService && Optional.ofNullable(salaryBillProgress.getProgress()).orElse(BigDecimal.ZERO).compareTo(BigDecimal.ONE) < 0) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(136104, "有其他人员正在发送中,请等待其他人员发送结束后再操作")); } - // 初始化进度 - ProgressDTO initProgress = ProgressDTO.builder() - .title(SalaryI18nUtil.getI18nLabel(136097, "发送中")) - .totalQuantity(NumberUtils.INTEGER_ZERO) - .calculatedQuantity(NumberUtils.INTEGER_ZERO) - .progress(BigDecimal.ZERO) - .status(true) - .message("") - .build(); - getProgressService(user).initProgress(SalaryCacheKey.SALARY_GRANT_PROGRESS + "_" + salarySend.getId(), initProgress); List ids = param.getIds(); @@ -190,6 +180,17 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService throw new SalaryRunTimeException("工资发放范围内没有匹配员工"); } } + // 初始化进度 + ProgressDTO initProgress = ProgressDTO.builder() + .title(SalaryI18nUtil.getI18nLabel(136097, "发送中")) + .totalQuantity(NumberUtils.INTEGER_ZERO) + .calculatedQuantity(NumberUtils.INTEGER_ZERO) + .progress(BigDecimal.ZERO) + .status(true) + .message("") + .build(); + getProgressService(user).initProgress(SalaryCacheKey.SALARY_GRANT_PROGRESS + "_" + salarySend.getId(), initProgress); + // 异步执行 List finalIds = ids; LocalRunnable localRunnable = new LocalRunnable() { From d01c9bf06fcffd26a350bfa97f68f0c455d437cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 17 Apr 2025 11:06:02 +0800 Subject: [PATCH 04/28] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E6=90=9C=E7=B4=A2=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryAcctRecordQueryParam.java | 6 ++++++ .../impl/SalaryAcctRecordServiceImpl.java | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java index b737f857e..8424aa765 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctRecordQueryParam.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.time.YearMonth; +import java.util.List; /** * 薪资核算列表查询参数 @@ -31,6 +32,11 @@ public class SalaryAcctRecordQueryParam extends BaseQueryParam { //账套名称") private String name; + /** + * 扣缴义务人id集合 + */ + private List taxAgentIds; + private String startMonthStr; private String endMonthStr; } diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 2a75368dc..9958f8d27 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.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; @@ -177,6 +178,21 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe Set salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId); po.setSalarySobIds(salarySobIds); } + if (CollUtil.isNotEmpty(queryParam.getTaxAgentIds())) { + List salarySobPOS = getSalarySobService(user).listByTaxAgentIds(queryParam.getTaxAgentIds()); + if (CollectionUtils.isEmpty(salarySobPOS)) { + return page; + } + Set salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId); + + Collection existIds = po.getSalarySobIds(); + if (CollectionUtils.isNotEmpty(existIds)) { + existIds = SalaryEntityUtil.intersectionForList(existIds, salarySobIds); + po.setSalarySobIds(existIds); + } else { + po.setSalarySobIds(salarySobIds); + } + } LocalDateRange localDateRange = new LocalDateRange(); if (Objects.nonNull(queryParam.getStartMonth())) { localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getStartMonth().atDay(1))); @@ -827,6 +843,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe @Override public void updateDate(Long id, Date updateTime) { - getSalaryAcctRecordMapper().updateDate(id,updateTime); + getSalaryAcctRecordMapper().updateDate(id, updateTime); } } From 0e93cbab0494284e80310b51b34fcebc36167f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 21 Apr 2025 10:37:44 +0800 Subject: [PATCH 05/28] t --- .../entity/salaryacct/param/SalaryAcctCalculateParam.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctCalculateParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctCalculateParam.java index 52c3b7f13..d07b79a6b 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctCalculateParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctCalculateParam.java @@ -20,7 +20,7 @@ import java.util.Collection; @Builder @NoArgsConstructor @AllArgsConstructor -public class SalaryAcctCalculateParam { +public class SalaryAcctCalculateParam { //核算人员的id,不是employeeId而是salaryAcctEmpId private Collection ids; From 552cee8a6f984b8c54138b71a4c63ff38aac6ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 21 Apr 2025 15:49:28 +0800 Subject: [PATCH 06/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=AE=A1=E7=A8=8E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/salaryacct/bo/SalaryAcctConsolidatedTaxBO.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctConsolidatedTaxBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctConsolidatedTaxBO.java index d5155f0ae..d5399daab 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctConsolidatedTaxBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctConsolidatedTaxBO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.salaryacct.bo; +import cn.hutool.core.util.StrUtil; import com.engine.salary.constant.TaxDeclarationDataIndexConstant; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; @@ -73,6 +74,9 @@ public class SalaryAcctConsolidatedTaxBO { .filter(e -> Objects.equals(e.getSalaryItemId(), optional.get())) .map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue())) .reduce(BigDecimal.ZERO, BigDecimal::add); + if (StrUtil.isBlank(resultValue)) { + resultValue = "0.00"; + } return new BigDecimal(resultValue).add(income).toPlainString(); } // 个税调差为0 @@ -98,6 +102,9 @@ public class SalaryAcctConsolidatedTaxBO { .map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue())) .reduce(BigDecimal.ZERO, BigDecimal::add); } + if (StrUtil.isBlank(resultValue)) { + resultValue = "0.00"; + } return new BigDecimal(resultValue).add(refundedOrSupplementedTax).subtract(taxAdjustment).toPlainString(); } return resultValue; From 6532bfdd0775e9795f40ac2afaf37b5a67b2c2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 22 Apr 2025 15:33:28 +0800 Subject: [PATCH 07/28] =?UTF-8?q?=E6=8B=93=E6=89=91=E5=9B=BE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=9D=9E=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalarySobItemServiceImpl.java | 221 ++++++++++++++++-- 1 file changed, 202 insertions(+), 19 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 781c99af5..15a14933e 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -9,20 +9,29 @@ 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.entity.datacollection.AddUpDeduction; +import com.engine.salary.entity.datacollection.AddUpSituation; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; +import com.engine.salary.entity.datacollection.dto.AttendQuoteDataDTO; +import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO; +import com.engine.salary.entity.datacollection.po.OtherDeductionPO; +import com.engine.salary.entity.datacollection.po.VariableItemPO; +import com.engine.salary.entity.salaryacct.bo.CalculateFormulaVarBO; +import com.engine.salary.entity.salaryacct.bo.SalaryAcctCalculateBO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctCalculatePriorityBO; import com.engine.salary.entity.salaryacct.bo.SalaryAcctConfig; +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.salaryarchive.config.ArchiveFieldConfig; +import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; import com.engine.salary.entity.salaryformula.ExpressFormula; -import com.engine.salary.entity.salaryformula.po.FormulaVar; import com.engine.salary.entity.salaryformula.config.FormluaConfig; import com.engine.salary.entity.salaryformula.po.FormulaPO; import com.engine.salary.entity.salaryformula.po.FormulaVar; -import com.engine.salary.entity.salaryitem.config.SalaryItemAllConfig; -import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.bo.SalarySobItemAggregateBO; import com.engine.salary.entity.salarysob.dto.SalaryItemTopologyDTO; +import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO; import com.engine.salary.entity.salarysob.dto.SalarySobItemFormDTO; import com.engine.salary.entity.salarysob.param.SalaryItemTopologyQueryParam; @@ -31,6 +40,7 @@ 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.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum; import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -46,11 +56,13 @@ import com.engine.salary.util.valid.ValidUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import weaver.general.BaseBean; import weaver.hrm.User; +import java.time.Month; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -121,6 +133,59 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe } // private LoggerTemplate salarySobLoggerTemplate; + private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) { + return ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user); + } + + private SalaryAcctRecordService getSalaryAcctRecordService(User user) { + return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user); + } + + private SalarySobService getSalarySobService(User user) { + return ServiceUtil.getService(SalarySobServiceImpl.class, user); + } + + private SIAccountService getSIAccountService(User user) { + return ServiceUtil.getService(SIAccountServiceImpl.class, user); + } + + private AttendQuoteFieldService getAttendQuoteFieldService(User user) { + return ServiceUtil.getService(AttendQuoteFieldServiceImpl.class, user); + } + + private VariableItemService getVariableItemService(User user) { + return ServiceUtil.getService(VariableItemServiceImpl.class, user); + } + + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + + private SalaryArchiveService getSalaryArchiveService(User user) { + return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user); + } + + private AddUpSituationService getAddUpSituationService(User user) { + return ServiceUtil.getService(AddUpSituationServiceImpl.class, user); + } + + private AddUpDeductionService getAddUpDeductionService(User user) { + return ServiceUtil.getService(AddUpDeductionServiceImpl.class, user); + } + + private OtherDeductionService getOtherDeductionService(User user) { + return ServiceUtil.getService(OtherDeductionServiceImpl.class, user); + } + + private AttendQuoteDataService getAttendQuoteDataService(User user) { + return ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user); + } + + private VariableArchiveService getVariableArchiveService(User user) { + return ServiceUtil.getService(VariableArchiveServiceImpl.class, user); + } + + @Override public List list() { return salarySobItemMapper.listAll(); @@ -629,7 +694,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe } salarySobItemPO.setFormula(formulaPO); } - if(SalaryEntityUtil.isNotNullOrEmpty(salarySobItemPO.getSalaryItemId())){ + if (SalaryEntityUtil.isNotNullOrEmpty(salarySobItemPO.getSalaryItemId())) { SalaryItemPO salaryItemPO = itemIdMap.get(salarySobItemPO.getSalaryItemId()); salarySobItemPO.setSalaryItem(salaryItemPO); } @@ -677,7 +742,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe salarySobItemFormDTO .setId(salarySobItemPO.getId()) .setName(salaryItemPO.getName()) - .setItemHide(salarySobItemPO.getItemHide()==null?0:Integer.parseInt(salarySobItemPO.getItemHide().toString())) + .setItemHide(salarySobItemPO.getItemHide() == null ? 0 : Integer.parseInt(salarySobItemPO.getItemHide().toString())) .setDataType(salaryItemPO.getDataType()) .setRoundingMode(salarySobItemPO.getRoundingMode() == null ? salaryItemPO.getRoundingMode() : salarySobItemPO.getRoundingMode()) .setPattern(salarySobItemPO.getPattern() == null ? salaryItemPO.getPattern() : salarySobItemPO.getPattern()) @@ -726,7 +791,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe salaryItemTopologyDTO.setSalaryItemId(salaryItemPO.getId()); salaryItemTopologyDTO.setSalaryItemName(salaryItemPO.getName()); salaryItemTopologyDTO.setFormula(expressFormula); - salaryItemTopologyDTO.setResult(topologyData.getResultItemMap().getOrDefault(salaryItemPO.getId(), "")); + salaryItemTopologyDTO.setResult(topologyData.getResultItemMap().getOrDefault(SalaryFormulaReferenceEnum.SALARY_ITEM.getValue() + "_" + salaryItemPO.getCode(), "")); topology(salaryItemTopologyDTO, topologyData); @@ -767,7 +832,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe for (int i = 0; i < parameters.size(); i++) { FormulaVar formulaVar = parameters.get(i); String source = formulaVar.getSource(); - String fieldId = formulaVar.getFieldId().replace(source + "_", ""); + String fieldId = formulaVar.getFieldId(); + String code = fieldId.replace(source + "_", ""); String name = formulaVar.getName(); String fieldName = formulaVar.getFieldName(); //是否是薪资项目 @@ -785,26 +851,26 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe } ExpressFormula expressFormula; - if (salarySobItemCodeMap.containsKey(fieldId)) { + if (salarySobItemCodeMap.containsKey(code)) { // 如果薪资账套下重新定义了薪资项目的公式,则使用薪资账套下的公式,否则使用薪资项目本身的公式 - expressFormula = expressFormulaIdMap.get(salarySobItemCodeMap.get(fieldId).getFormulaId()); - } else if (salaryItemCodeMap.containsKey(fieldId)) { - expressFormula = expressFormulaIdMap.get(salaryItemCodeMap.get(fieldId).getFormulaId()); + expressFormula = expressFormulaIdMap.get(salarySobItemCodeMap.get(code).getFormulaId()); + } else if (salaryItemCodeMap.containsKey(code)) { + expressFormula = expressFormulaIdMap.get(salaryItemCodeMap.get(code).getFormulaId()); } else { expressFormula = null; } - SalaryItemPO salaryItemChild = isSalaryItemVar ? salaryItemCodeMap.get(fieldId) : new SalaryItemPO(); + SalaryItemPO salaryItemChild = isSalaryItemVar ? salaryItemCodeMap.get(code) : new SalaryItemPO(); SalaryItemTopologyDTO salaryItemTopologyChild = new SalaryItemTopologyDTO(); salaryItemTopologyChild.setSalaryItemId(isSalaryItemVar ? salaryItemChild.getId() : null); salaryItemTopologyChild.setSalaryItemName(isSalaryItemVar ? salaryItemChild.getName() : fieldName); salaryItemTopologyChild.setFormula(expressFormula); - salaryItemTopologyChild.setResult(isSalaryItemVar ? topologyData.getResultItemMap().getOrDefault(salaryItemChild.getId(), "") : ""); + salaryItemTopologyChild.setResult(topologyData.getResultItemMap().getOrDefault(fieldId, "")); salaryItemTopologyDTOChildren.add(salaryItemTopologyChild); if (isSalaryItemVar) { - SalaryItemPO salaryItemChildChild = salaryItemCodeMap.get(fieldId); + SalaryItemPO salaryItemChildChild = salaryItemCodeMap.get(code); SalaryValueTypeEnum salaryValueTypeEnum = SalaryValueTypeEnum.parseByValue(salaryItemChildChild.getValueType()); if (salaryValueTypeEnum != SalaryValueTypeEnum.INPUT) { topologyData.setSalaryItemId(salaryItemChildChild.getId()); @@ -849,9 +915,126 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe //薪资结果 Long acctEmpId = param.getAcctEmpId(); if (acctEmpId != null) { - List results = getSalaryAcctResultService(user).listBySalaryAcctEmployeeId(acctEmpId); - Map resultItemMap = SalaryEntityUtil.convert2Map(results, SalaryAcctResultPO::getSalaryItemId, SalaryAcctResultPO::getResultValue); - topologyData.setResultItemMap(resultItemMap); + SalaryAcctEmployeePO acctEmployeePO = getSalaryAcctEmployeeService(user).getById(acctEmpId); + List acctEmployeePOS = new ArrayList<>(); + acctEmployeePOS.add(acctEmployeePO); + + Long salaryAcctRecordId = acctEmployeePO.getSalaryAcctRecordId(); + + // 1、查询薪资核算记录 + SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId); + if (Objects.isNull(salaryAcctRecordPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除")); + } + //查询对应账套 + SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId()); + if (Objects.isNull(salarySobPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资账套不存在或已被删除")); + } + + // 不是查询薪资账套下实时的薪资项目,而是查询发起薪资核算时存储的薪资项目快照 + SalaryAcctConfig salaryAcctSobConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId); + + // 1.1、如果薪资核算记录已经归档了,就不能继续核算 + if (!Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99148, "当前薪资核算记录已归档,请重新打开后再进行核算")); + } + // 2、查询薪资核算记录的薪资周期、考勤周期等 + SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordId); + // 3、查询薪资核算记录所用薪资账套的薪资项目副本 + List salarySobItemPOS = salaryAcctSobConfig.getSalarySobItems(); + if (CollectionUtils.isEmpty(salarySobItemPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99151, "当前所用的薪资账套未选择任何薪资项目,无法核算")); + } + // 回算薪资项目 + List salarySobBackItems = Collections.emptyList(); + if (Objects.equals(salaryAcctRecordPO.getBackCalcStatus(), 1)) { + salarySobBackItems = salaryAcctSobConfig.getSalarySobBackItems(); + } + // 4、查询当前租户的所有薪资项目 + List salaryItemPOS = getSalaryItemService(user).listAll(); + // 6、查询社保福利的所有字段 + Map welfareColumns = getSIAccountService(user).welfareColumns(); + // 7、查询考勤引用的所有字段 + List attendQuoteFieldListDTOS = getAttendQuoteFieldService(user).listAll(); + List variableItemPOS = getVariableItemService(user).listAll(); + + // 8、查询公式详情 + Set formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId); + formulaIds.addAll(SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId)); + formulaIds.addAll(SalaryEntityUtil.properties(salarySobBackItems, SalarySobBackItemPO::getFormulaId)); + List formulas = getSalaryFormulaService(user).listExpressFormula(formulaIds); + // 本次运算的回算薪资项目所涉及的变量 +// Set issuedFieldIds = getIssuedFieldIds(salarySobBackItems); + + // 10、根据id查询其他合并计税的薪资核算记录 + List otherSalaryAcctRecordPOS = getSalaryAcctRecordService(user).listById4OtherConsolidatedTax(salaryAcctRecordPO.getId()); + + // 12.3、生成本次运算的key + String calculateKey = UUID.randomUUID().toString(); + // 12.5、多线程运算,运算结果存放在临时表中 + SalaryAcctCalculateBO salaryAcctCalculateBO = new SalaryAcctCalculateBO() + .setSalaryAcctRecordPO(salaryAcctRecordPO) + .setSalarySobPO(salarySobPO) + .setSalarySobCycleDTO(salarySobCycleDTO) + .setOtherSalaryAcctRecordPOS(otherSalaryAcctRecordPOS) + .setSalarySobItemPOS(salarySobItemPOS) + .setSalaryItemIdWithPriorityList(new ArrayList<>()) + .setExpressFormulas(formulas) + .setSalaryItemPOS(salaryItemPOS) + .setSalarySobAdjustRulePOS(new ArrayList<>()) + .setWelfareColumns(MapUtils.emptyIfNull(welfareColumns)) + .setAttendQuoteFieldListDTOS(attendQuoteFieldListDTOS) + .setSalaryAcctEmployeePOS(acctEmployeePOS) + .setIssuedFieldIds(new HashSet<>()) + .setResults(null) + .setCalculateKey(calculateKey) + .setVariableItems(variableItemPOS) + .setTaxDeclarationFunction(null) + .setTaxIds(null); + + + List employeeIds = Collections.singletonList(acctEmployeePO.getEmployeeId()); + List simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds); + Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId(); + List salaryArchiveData = getSalaryArchiveService(user).getSalaryArchiveData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentId); + List addUpSituationPOS; + if (salarySobCycleDTO.getTaxCycle().getMonth() == Month.JANUARY) { + // 3.1、如果当前税款所属期是本年度第一个税款所属期,就不需要查询往期累计情况 + addUpSituationPOS = Collections.emptyList(); + } else { + addUpSituationPOS = getAddUpSituationService(user).getAddUpSituationList(salarySobCycleDTO.getTaxCycle().plusMonths(-1), employeeIds); + } + List addUpDeductionPOS = getAddUpDeductionService(user).getAddUpDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId); + List otherDeductionPOS = getOtherDeductionService(user).getOtherDeductionList(salarySobCycleDTO.getTaxCycle(), employeeIds, taxAgentId); + List> welfareData = new ArrayList<>(); + welfareData.addAll(getSIAccountService(user).welfareData(salarySobCycleDTO.getSocialSecurityCycle().toString(), employeeIds, taxAgentId)); + List attendQuoteDataDTOS = getAttendQuoteDataService(user).getAttendQuoteData(salarySobCycleDTO.getSalaryMonth(), salarySobCycleDTO.getSalarySobId(), employeeIds); + List salaryAcctEmployeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getId, Collectors.toList()); + List salaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds); + Map empItemValueMap = SalaryEntityUtil.convert2Map(salaryAcctResultPOS, p -> p.getSalaryAcctEmpId() + "_" + p.getSalaryItemId(), SalaryAcctResultPO::getResultValue); + List> variableArchiveList = getVariableArchiveService(user).listBySalaryMonthAndEmployeeIds(salarySobCycleDTO.getSalaryMonth(), employeeIds, taxAgentId); + Map> collect = salaryAcctResultPOS.stream().collect(Collectors.groupingBy(k -> k.getEmployeeId() + "-" + k.getTaxAgentId() + "-" + k.getSalaryItemId())); + Map salaryAcctResultPOMap = new HashMap<>(); + for (Map.Entry> et : collect.entrySet()) { + salaryAcctResultPOMap.put(et.getKey(), et.getValue().get(0).getOriginResultValue()); + } + Set otherSalaryAcctRecordIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getOtherSalaryAcctRecordPOS(), SalaryAcctRecordPO::getId); + List otherSalaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctRecordIdsAndEmployeeIds(otherSalaryAcctRecordIds, employeeIds); + Map> otherSalaryAcctResultPOMap = SalaryEntityUtil.group2Map(otherSalaryAcctResultPOS, e -> e.getEmployeeId() + "_" + e.getTaxAgentId()); + List otherSalaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIdsAndEmployeeIds(otherSalaryAcctRecordIds, employeeIds); + Map> otherSalaryAcctEmployeePOMap = SalaryEntityUtil.group2Map(otherSalaryAcctEmployeePOS, salaryAcctEmployeePO -> salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId()); +// List lastMonthResultPOS = getSalaryAcctResultService(user).listBySobSalaryMonth(SalaryDateUtil.toDate(salarySobCycleDTO.getSalaryMonth().minusMonths(1), 1), salaryAcctCalculateBO.getSalarySobPO().getId(), employeeIds); + CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, salaryArchiveData, addUpSituationPOS, addUpDeductionPOS, otherDeductionPOS, welfareData, attendQuoteDataDTOS, salaryAcctResultPOS, variableArchiveList); + Map> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO); + + Map resultMap = new HashMap<>(); + formulaVarMap.entrySet().forEach(e -> { + e.getValue().forEach(f -> { + resultMap.put(f.getFieldId(), f.getFieldValue()); + }); + }); + topologyData.setResultItemMap(resultMap); } else { topologyData.setResultItemMap(new HashMap<>()); } @@ -885,7 +1068,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe /** * 核算结果 */ - Map resultItemMap; + Map resultItemMap; } From 7a7030a91ce428b69df20cd307b5ab8bca82e0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 23 Apr 2025 17:39:30 +0800 Subject: [PATCH 08/28] =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E7=A8=8E?= =?UTF-8?q?=E6=AC=BE=E6=89=80=E5=B1=9E=E6=9C=9F=E6=A3=80=E7=B4=A2=E5=92=8C?= =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/TaxDeclarationListDTO.java | 8 ++++---- .../param/TaxDeclarationListQueryParam.java | 17 +++++++---------- .../taxdeclaration/po/TaxDeclarationPO.java | 7 +++++++ .../taxdeclaration/TaxDeclarationMapper.xml | 6 ++++++ .../service/impl/TaxDeclarationServiceImpl.java | 7 ++----- .../salary/web/TaxDeclarationController.java | 5 +---- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java index f52ce6a86..420daca25 100644 --- a/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java +++ b/src/com/engine/salary/entity/taxdeclaration/dto/TaxDeclarationListDTO.java @@ -37,6 +37,10 @@ public class TaxDeclarationListDTO { @TableTitle(title = "薪资类型", dataIndex = "incomeCategory", key = "incomeCategory") private String incomeCategory; + @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") + @TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle") + private Date taxCycle; + @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") @TableTitle(title = "薪资所属月", dataIndex = "salaryMonth", key = "salaryMonth") private Date salaryMonth; @@ -47,10 +51,6 @@ public class TaxDeclarationListDTO { @TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName") private String taxAgentName; - @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") - @TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle") - private Date taxCycle; - //@TableTitle(title = "操作人id", dataIndex = "operateEmployeeId", key = "operateEmployeeId") private Long operateEmployeeId; diff --git a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java index 521fadd56..79b4ac79a 100644 --- a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java +++ b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java @@ -1,9 +1,12 @@ package com.engine.salary.entity.taxdeclaration.param; import com.engine.salary.common.BaseQueryParam; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; -import java.time.YearMonth; +import java.util.Date; /** * 个税申报记录查询条件 @@ -19,13 +22,7 @@ import java.time.YearMonth; @AllArgsConstructor public class TaxDeclarationListQueryParam extends BaseQueryParam { - //薪资所属月范围起点 - private YearMonth fromSalaryMonth; + private Date fromSalaryMonth; - //薪资所属月范围终点 - private YearMonth endSalaryMonth; - - private String fromSalaryMonthStr; - - private String endSalaryMonthStr; + private Date endSalaryMonth; } diff --git a/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java b/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java index 8319f9e4d..9950f55cd 100644 --- a/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java +++ b/src/com/engine/salary/entity/taxdeclaration/po/TaxDeclarationPO.java @@ -86,6 +86,13 @@ public class TaxDeclarationPO { LocalDateRange salaryMonths; + //"开始日期 + private Date taxCycleFromDate; + + //结束日期 + private Date taxCycleEndDate; + + private Collection taxAgentIds; } diff --git a/src/com/engine/salary/mapper/taxdeclaration/TaxDeclarationMapper.xml b/src/com/engine/salary/mapper/taxdeclaration/TaxDeclarationMapper.xml index 1810e8970..b034b00ff 100644 --- a/src/com/engine/salary/mapper/taxdeclaration/TaxDeclarationMapper.xml +++ b/src/com/engine/salary/mapper/taxdeclaration/TaxDeclarationMapper.xml @@ -61,6 +61,12 @@ AND salary_month #{salaryMonths.endDate} + + AND tax_cycle = ]]> #{taxCycleFromDate} + + + AND tax_cycle #{taxCycleEndDate} + AND tax_agent_id IN diff --git a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java index 4388047f9..e47049045 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java @@ -114,15 +114,12 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration // 分页参数 TaxDeclarationPO po = TaxDeclarationPO.builder().build(); - LocalDateRange localDateRange = new LocalDateRange(); if (Objects.nonNull(queryParam.getFromSalaryMonth())) { - localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getFromSalaryMonth().atDay(1))); + po.setTaxCycleFromDate(queryParam.getFromSalaryMonth()); } if (Objects.nonNull(queryParam.getEndSalaryMonth())) { - localDateRange.setEndDate(SalaryDateUtil.localDateToDate(queryParam.getEndSalaryMonth().atEndOfMonth())); + po.setTaxCycleEndDate(queryParam.getEndSalaryMonth()); } - po.setSalaryMonths(localDateRange); - // 分权 Boolean openDevolution = getTaxAgentService(user).isNeedAuth(currentEmployeeId); diff --git a/src/com/engine/salary/web/TaxDeclarationController.java b/src/com/engine/salary/web/TaxDeclarationController.java index 6d2332dd4..1c65fd7a2 100644 --- a/src/com/engine/salary/web/TaxDeclarationController.java +++ b/src/com/engine/salary/web/TaxDeclarationController.java @@ -31,7 +31,6 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.StreamingOutput; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; -import java.text.ParseException; import java.time.LocalDate; @@ -58,10 +57,8 @@ public class TaxDeclarationController { @POST @Path("/list") @Produces(MediaType.APPLICATION_JSON) - public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam) throws ParseException { + public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam){ User user = HrmUserVarify.getUser(request, response); - queryParam.setFromSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getFromSalaryMonthStr() == null ? "" : queryParam.getFromSalaryMonthStr())); - queryParam.setEndSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getEndSalaryMonthStr() == null ? "" : queryParam.getEndSalaryMonthStr())); return new ResponseResult>(user).run(getTaxDeclarationWrapper(user)::listPage, queryParam); } From 0bdc48f1c20fc0be2bbe728d4d61c6e36ba0ec72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 24 Apr 2025 11:03:13 +0800 Subject: [PATCH 09/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E5=90=8E=E6=9F=A5=E7=9C=8B=E6=8B=93=E6=89=91=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SalarySobItemServiceImpl.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java index 15a14933e..3e4d548b5 100644 --- a/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobItemServiceImpl.java @@ -40,7 +40,6 @@ 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.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum; import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum; import com.engine.salary.exception.SalaryRunTimeException; @@ -935,17 +934,10 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe // 不是查询薪资账套下实时的薪资项目,而是查询发起薪资核算时存储的薪资项目快照 SalaryAcctConfig salaryAcctSobConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId); - // 1.1、如果薪资核算记录已经归档了,就不能继续核算 - if (!Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue())) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99148, "当前薪资核算记录已归档,请重新打开后再进行核算")); - } // 2、查询薪资核算记录的薪资周期、考勤周期等 SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordId); // 3、查询薪资核算记录所用薪资账套的薪资项目副本 List salarySobItemPOS = salaryAcctSobConfig.getSalarySobItems(); - if (CollectionUtils.isEmpty(salarySobItemPOS)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99151, "当前所用的薪资账套未选择任何薪资项目,无法核算")); - } // 回算薪资项目 List salarySobBackItems = Collections.emptyList(); if (Objects.equals(salaryAcctRecordPO.getBackCalcStatus(), 1)) { From 22f494fe120376f975c8b46c78d463889e08db98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 24 Apr 2025 16:02:34 +0800 Subject: [PATCH 10/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/TaxDeclarationListQueryParam.java | 9 +++++++++ .../service/impl/TaxDeclarationServiceImpl.java | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java index 79b4ac79a..a7de714a9 100644 --- a/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java +++ b/src/com/engine/salary/entity/taxdeclaration/param/TaxDeclarationListQueryParam.java @@ -1,11 +1,13 @@ package com.engine.salary.entity.taxdeclaration.param; import com.engine.salary.common.BaseQueryParam; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; + import java.util.Date; /** @@ -22,7 +24,14 @@ import java.util.Date; @AllArgsConstructor public class TaxDeclarationListQueryParam extends BaseQueryParam { + //薪资所属月范围起点 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date fromSalaryMonth; + //薪资所属月范围终点 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date endSalaryMonth; + + //个税扣缴义务人菜单") + private String taxAgentName; } diff --git a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java index e47049045..afe5a6991 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.StrUtil; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.hrmelog.entity.dto.LoggerContext; @@ -9,6 +10,7 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO; import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salarysob.po.SalarySobPO; +import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationBO; import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam; @@ -135,6 +137,15 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration // 查询个税申报表 List taxDeclarationPOS = getTaxDeclarationMapper().listSome(po); + + + if (StrUtil.isNotBlank(queryParam.getTaxAgentName())) { + List taxAgentPOs = getTaxAgentService(user).list(TaxAgentQueryParam.builder().name(queryParam.getTaxAgentName()).build()); + Set taxAgentIds = SalaryEntityUtil.properties(taxAgentPOs, TaxAgentPO::getId); + taxDeclarationPOS = taxDeclarationPOS.stream().filter(tax -> taxAgentIds.contains(tax.getTaxAgentId())).collect(Collectors.toList()); + } + + return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), taxDeclarationPOS, TaxDeclarationPO.class); From ee3fd8da8e46cea728f10f04631b0938b04564cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 24 Apr 2025 16:19:23 +0800 Subject: [PATCH 11/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/TaxDeclareRecordServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index af3d81c1c..cdec3def1 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.StrUtil; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.hrmelog.entity.dto.LoggerContext; @@ -23,6 +24,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobAddUpRulePO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.entity.salarysob.po.SalarySobTaxReportRulePO; import com.engine.salary.entity.taxagent.bo.TaxAgentTaxReturnBO; +import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO; import com.engine.salary.entity.taxapiflow.bo.TaxApiFlowBO; @@ -250,6 +252,13 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe } List taxDeclareRecordPOS = getTaxDeclareRecordMapper().listSome(build); + + if (StrUtil.isNotBlank(queryParam.getTaxAgentName())) { + List taxAgentPOs = getTaxAgentService(user).list(TaxAgentQueryParam.builder().name(queryParam.getTaxAgentName()).build()); + Set taxAgentIds = SalaryEntityUtil.properties(taxAgentPOs, TaxAgentPO::getId); + taxDeclareRecordPOS = taxDeclareRecordPOS.stream().filter(tax -> taxAgentIds.contains(tax.getTaxAgentId())).collect(Collectors.toList()); + } + return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), taxDeclareRecordPOS, TaxDeclareRecordPO.class); } From 25c8479d53c29d7eb05136b49293e3d87d9fbdfc Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 24 Apr 2025 17:48:54 +0800 Subject: [PATCH 12/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E7=BA=BF=E4=B8=8B=E5=AF=B9?= =?UTF-8?q?=E6=AF=94=E5=92=8C=E6=A0=B8=E7=AE=97=E4=BA=BA=E6=95=B0=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SIAComparisonResultServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java index 79f3ee877..39d4116b7 100644 --- a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java @@ -172,7 +172,8 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar List baseInfoPOList = getInsuranceBaseInfoMapper().listAll(); List canAccountIds = baseInfoPOList.stream() .filter(f->f.getPaymentOrganization().toString().equals(queryParam.getPaymentOrganization()) - && (f.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || f.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()))) + && !f.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue()) + ) .map(InsuranceArchivesBaseInfoPO::getEmployeeId) .collect(Collectors.toList()); accountExportPOS = accountExportPOS.stream().filter(v -> canAccountIds.contains(v.getEmployeeId())).collect(Collectors.toList()); From bc8e80b4e6c6dbe48df7668bb811eadfa5d791b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 28 Apr 2025 18:14:17 +0800 Subject: [PATCH 13/28] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=B3=EF=BC=B5?= =?UTF-8?q?=EF=BC=A2=EF=BC=B3=EF=BC=B4=EF=BC=B2=E6=8B=A6=E6=88=AA=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/valid/ValidUtil.java | 4 +++- .../engine/salary/wrapper/SalarySobRangeWrapper.java | 10 ++++++++-- src/com/engine/salary/wrapper/TaxAgentWrapper.java | 10 ++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/com/engine/salary/util/valid/ValidUtil.java b/src/com/engine/salary/util/valid/ValidUtil.java index 906718077..bcdec10d6 100644 --- a/src/com/engine/salary/util/valid/ValidUtil.java +++ b/src/com/engine/salary/util/valid/ValidUtil.java @@ -250,7 +250,9 @@ public class ValidUtil { .replace("between", "between") .replace("BETWEEN", "BETWEEN") .replace("union", "union") - .replace("UNION", "UNION"); + .replace("UNION", "UNION") + .replace("substr", "substr") + .replace("SUBSTR", "SUBSTR"); } setValue(t, field.getName(), result); } else if (valueTypeEnum == ValueTypeEnum.OBJECT) { diff --git a/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java b/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java index 1ae272efc..b308f7b82 100644 --- a/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java +++ b/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java @@ -97,7 +97,10 @@ public class SalarySobRangeWrapper extends Service { .replace("between", "between") .replace("BETWEEN", "BETWEEN") .replace("union", "union") - .replace("UNION", "UNION")); + .replace("UNION", "UNION") + .replace("substr", "substr") + .replace("SUBSTR", "SUBSTR") + ); } }); @@ -127,7 +130,10 @@ public class SalarySobRangeWrapper extends Service { .replace("between", "between") .replace("BETWEEN", "BETWEEN") .replace("union", "union") - .replace("UNION", "UNION")); + .replace("UNION", "UNION") + .replace("substr", "substr") + .replace("SUBSTR", "SUBSTR") + ); } }); diff --git a/src/com/engine/salary/wrapper/TaxAgentWrapper.java b/src/com/engine/salary/wrapper/TaxAgentWrapper.java index d3ae590e6..ef31083b0 100644 --- a/src/com/engine/salary/wrapper/TaxAgentWrapper.java +++ b/src/com/engine/salary/wrapper/TaxAgentWrapper.java @@ -365,7 +365,10 @@ public class TaxAgentWrapper extends Service { .replace("between", "between") .replace("BETWEEN", "BETWEEN") .replace("union", "union") - .replace("UNION", "UNION")); + .replace("UNION", "UNION") + .replace("substr", "substr") + .replace("SUBSTR", "SUBSTR") + ); } }); @@ -399,7 +402,10 @@ public class TaxAgentWrapper extends Service { .replace("between", "between") .replace("BETWEEN", "BETWEEN") .replace("union", "union") - .replace("UNION", "UNION")); + .replace("UNION", "UNION") + .replace("substr", "substr") + .replace("SUBSTR", "SUBSTR") + ); } }); From ca75a5f403cf79ddfa51683078c4278d83edaa99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 29 Apr 2025 16:57:33 +0800 Subject: [PATCH 14/28] =?UTF-8?q?fix=E5=AF=BC=E5=87=BA=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/excel/ExcelUtilPlus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/util/excel/ExcelUtilPlus.java b/src/com/engine/salary/util/excel/ExcelUtilPlus.java index 9da402ce7..194aa01a2 100644 --- a/src/com/engine/salary/util/excel/ExcelUtilPlus.java +++ b/src/com/engine/salary/util/excel/ExcelUtilPlus.java @@ -131,7 +131,7 @@ public class ExcelUtilPlus { for (int i = 0; i < header.size(); i++) { WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) header.get(i); XSSFCell rowZeroCell = row0.createCell(i, CellType.STRING); - rowZeroCell.setCellValue(columnGroupItem.getText().toString()); + rowZeroCell.setCellValue(columnGroupItem.getText()); rowZeroCell.setCellStyle(titleCellStyle); //设置列宽 sheet.setColumnWidth(i, Math.min(255, Math.max(12, columnGroupItem.getText().length() * 4)) * 256); From 8c4fbf79191d57391752e56537262a3894d97708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 9 May 2025 11:45:06 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java index 83892cf9a..504e7d3d7 100644 --- a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java +++ b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java @@ -711,7 +711,7 @@ public enum IncomeCategoryEnum implements BaseEnum { } List rysbsblb = feedbackResponse.getBody().getRysbsblb(); if (CollectionUtil.isNotEmpty(rysbsblb)) { - String err = rysbsblb.stream().map(GetASynIndividualIncomeTaxFeedbackResponse.Body.rysbsb::getSbyy).collect(Collectors.joining(";")); + String err = rysbsblb.stream().map(sb -> Util.null2String(sb.getXm()) + Util.null2String(sb.getSbyy())).collect(Collectors.joining(";")); throw new OnlineCalculateTaxException(err); } } From 24e7cbb32e3a1ac2905bb67b0a0e0d3415e6ced8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 9 May 2025 19:46:32 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=94=B3=E6=8A=A5?= =?UTF-8?q?=E4=BA=BA=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/TaxDeclareRecordServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java index cdec3def1..334ea2f51 100644 --- a/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclareRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; @@ -917,7 +918,8 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe declareStatus.setTaxDeclareStatus(taxDeclareStatusEnum.getValue()); // 申报类型 declareStatus.setTaxPayAmount(Util.null2String(declareTaxFeedbackResponse.getBody().get("ykjse"))); - declareStatus.setPersonNum(Integer.parseInt(Optional.ofNullable(declareTaxFeedbackResponse.getBody().get("nsrc")).orElse("0").toString())); + String nsrc = Util.null2String(declareTaxFeedbackResponse.getBody().get("nsrc")); + declareStatus.setPersonNum(Integer.parseInt(NumberUtil.isNumber(nsrc) ? nsrc : "0")); declareStatus.setDeclareRequestId(declareStatus.getRequestId()); declareStatus.setRequestId(""); //实缴(不含滞纳金) From 48712d7d37014c3e60b17df24dab7f9fc32152e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 12 May 2025 15:24:21 +0800 Subject: [PATCH 17/28] =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=8A=A5=E9=80=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/EmployeeDeclareServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java index 7e7da0c23..a74f33cf9 100644 --- a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java +++ b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java @@ -660,6 +660,7 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla ImmutableMap requestParam = ImmutableMap.of("requestId", employeeDeclareRecord.getRequestId()); Map header = SingnatureData.initHeader(Collections.emptyMap(), apiConfig.getAppKey(), apiConfig.getAppSecret()); String res = HttpUtil.getRequest(url, header, requestParam); + log.info("人员报送反馈:{}", res); DeclareEmployeeFeedbackResponse declareEmployeeFeedbackResponse = JsonUtil.parseObject(res, DeclareEmployeeFeedbackResponse.class); if (Objects.isNull(declareEmployeeFeedbackResponse) || Objects.isNull(declareEmployeeFeedbackResponse.getHead())) { log.error("服务异常:" + res); From 7de3dca2a3ad730f6b8e27b07737883c4a730b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 13 May 2025 13:14:30 +0800 Subject: [PATCH 18/28] =?UTF-8?q?=E6=92=A4=E5=9B=9E=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E8=B5=84=E5=8D=95=E4=B8=8D=E5=85=81=E8=AE=B8=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SalarySendServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 30662220c..af9f51f1e 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -485,6 +485,11 @@ public class SalarySendServiceImpl extends Service implements SalarySendService if (salarySendInfo == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在")); } + + if (!Objects.equals(salarySendInfo.getSendStatus(), 1)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在")); + } + Long employeeId = salarySendInfo.getEmployeeId(); if (currentEmployeeId.compareTo(employeeId) != 0) { @@ -1343,7 +1348,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService } - @Override public Map withdraw(SalarySendWithdrawParam param) { if (param.getSalarySendId() == null) { From 05e92add4afd587e527d86a6e5bcbc1854b220f4 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 13 May 2025 16:07:46 +0800 Subject: [PATCH 19/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/excel/ExcelUtilPlus.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/util/excel/ExcelUtilPlus.java b/src/com/engine/salary/util/excel/ExcelUtilPlus.java index 194aa01a2..3c86c6e95 100644 --- a/src/com/engine/salary/util/excel/ExcelUtilPlus.java +++ b/src/com/engine/salary/util/excel/ExcelUtilPlus.java @@ -6,6 +6,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.*; +import weaver.wechat.util.Utils; import java.awt.Color; import java.math.BigDecimal; @@ -134,7 +135,7 @@ public class ExcelUtilPlus { rowZeroCell.setCellValue(columnGroupItem.getText()); rowZeroCell.setCellStyle(titleCellStyle); //设置列宽 - sheet.setColumnWidth(i, Math.min(255, Math.max(12, columnGroupItem.getText().length() * 4)) * 256); + sheet.setColumnWidth(i, Math.min(255, Math.max(12, Utils.null2String(columnGroupItem.getText()).length() * 4)) * 256); patternList.add(columnGroupItem.getPattern()); } From 4a2821d793dc8abec72deb1c27bbdf7d4e6e67a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 15 May 2025 14:08:12 +0800 Subject: [PATCH 20/28] =?UTF-8?q?=E7=A6=BB=E8=81=8C=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=AF=BC=E5=85=A5=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EmployeeDeclareExcelServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/service/impl/EmployeeDeclareExcelServiceImpl.java b/src/com/engine/salary/service/impl/EmployeeDeclareExcelServiceImpl.java index 067b4acfd..d8a01f687 100644 --- a/src/com/engine/salary/service/impl/EmployeeDeclareExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/EmployeeDeclareExcelServiceImpl.java @@ -601,10 +601,14 @@ public class EmployeeDeclareExcelServiceImpl extends Service implements Employee Set emptyNames = new HashSet<>(); for (PropertyDescriptor pd : pds) { - Object srcValue = src.getPropertyValue(pd.getName()); + String name = pd.getName(); + if("dismissDate".equals(name)){ + continue; + } + Object srcValue = src.getPropertyValue(name); // 此处判断可根据需求修改 if (srcValue == null) { - emptyNames.add(pd.getName()); + emptyNames.add(name); } } String[] result = new String[emptyNames.size()]; From 81e87ec9ce37340db5dc6170096c593e2ae7eb1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 20 May 2025 16:44:46 +0800 Subject: [PATCH 21/28] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=97=B6=E8=BF=87=E6=BB=A4=E7=A9=BA=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/util/excel/ExcelUtil.java | 31 ++++++++----- .../salary/util/excel/ExcelUtilPlus.java | 45 ++++++++++++------- 2 files changed, 50 insertions(+), 26 deletions(-) diff --git a/src/com/engine/salary/util/excel/ExcelUtil.java b/src/com/engine/salary/util/excel/ExcelUtil.java index 5b7410994..6877e7e03 100644 --- a/src/com/engine/salary/util/excel/ExcelUtil.java +++ b/src/com/engine/salary/util/excel/ExcelUtil.java @@ -1,5 +1,6 @@ package com.engine.salary.util.excel; +import cn.hutool.core.util.StrUtil; import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryI18nUtil; @@ -139,8 +140,10 @@ public class ExcelUtil { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); @@ -235,8 +238,10 @@ public class ExcelUtil { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); @@ -311,8 +316,10 @@ public class ExcelUtil { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); @@ -377,8 +384,10 @@ public class ExcelUtil { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); @@ -458,8 +467,10 @@ public class ExcelUtil { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); diff --git a/src/com/engine/salary/util/excel/ExcelUtilPlus.java b/src/com/engine/salary/util/excel/ExcelUtilPlus.java index 3c86c6e95..96cff32ec 100644 --- a/src/com/engine/salary/util/excel/ExcelUtilPlus.java +++ b/src/com/engine/salary/util/excel/ExcelUtilPlus.java @@ -1,5 +1,6 @@ package com.engine.salary.util.excel; +import cn.hutool.core.util.StrUtil; import com.engine.salary.component.WeaTableColumnGroup; import com.engine.salary.util.SalaryDateUtil; import org.apache.commons.collections4.CollectionUtils; @@ -191,8 +192,10 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { if (lastRowRed && rowIndex == rowList.size() - 1) { cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex))); @@ -200,8 +203,7 @@ public class ExcelUtilPlus { cell.setCellStyle(numberCellStyleMap.get(patternList.get(cellIndex))); } cell.setCellType(CellType.NUMERIC); - double value = o == null ? 0 : ((BigDecimal) o).doubleValue(); - cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); + cell.setCellValue(((BigDecimal) o).doubleValue()); } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); @@ -221,6 +223,7 @@ public class ExcelUtilPlus { } return workbook; } + public static XSSFWorkbook genWorkbookV2(List> rowList, String sheetName) { XSSFWorkbook workbook = new XSSFWorkbook(); @@ -281,11 +284,13 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); - cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); + cell.setCellValue(((BigDecimal) o).doubleValue()); } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); @@ -368,8 +373,10 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); @@ -477,11 +484,13 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); - cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); + cell.setCellValue(((BigDecimal) o).doubleValue()); } else if (o instanceof Boolean) { cell.setCellType(CellType.BOOLEAN); cell.setCellValue(String.valueOf(o)); @@ -675,8 +684,10 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { if (lastRowRed && rowIndex == rowList.size() - 1) { cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex))); @@ -840,8 +851,10 @@ public class ExcelUtilPlus { } Object o = infoList.get(cellIndex); if (o instanceof String) { - cell.setCellType(CellType.STRING); - cell.setCellValue(String.valueOf(o)); + if (StrUtil.isNotBlank(String.valueOf(o))) { + cell.setCellType(CellType.STRING); + cell.setCellValue(String.valueOf(o)); + } } else if (o instanceof BigDecimal) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue()); From c6633005aa8ece2526dbefb7b94f6be5f44be3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 21 May 2025 11:37:25 +0800 Subject: [PATCH 22/28] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=B3=BB=E7=BB=9F=E7=AE=97=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SalaryAcctRecordServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 94c14b032..5590cedc2 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -500,6 +500,12 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe */ @Override public void checkBeforeSave(SalaryAcctRecordPO salaryAcctRecord, List salaryAcctTaxAgents) { + // 如果个税申报功能是关闭的,则不需要检查 + TaxDeclarationFunctionEnum taxDeclarationFunctionEnum = getSalarySysConfService(user).getTaxDeclaration(); + if (taxDeclarationFunctionEnum == TaxDeclarationFunctionEnum.CLOSURE) { + return; + } + // 查询薪资账套 SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecord.getSalarySobId()); IncomeCategoryEnum incomeCategoryEnums = IncomeCategoryEnum.parseByValue(salarySobPO.getIncomeCategory()); From 93dc70de260efccb59b598bf662748b3f2d6838e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 26 May 2025 10:36:38 +0800 Subject: [PATCH 23/28] =?UTF-8?q?fix=E9=82=AE=E4=BB=B6=E4=B8=AD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/entity/salaryBill/bo/SalaryBillBO.java | 6 +++--- 1 file changed, 3 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 4e219c477..5319fec42 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -267,7 +267,7 @@ public class SalaryBillBO { } Util_Message.store(messageBean); } catch (IOException e) { - log.error("消息发送失败",e); + log.error("消息发送失败", e); } } @@ -660,7 +660,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.get(keyName.toString())); + emailContent.append(e.getOrDefault(keyName.toString(), StringUtils.EMPTY)); emailContent.append(""); } break; @@ -740,7 +740,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.get(keyName.toString())); + emailContent.append(e.getOrDefault(keyName.toString(), StringUtils.EMPTY)); emailContent.append(""); } break; From d9982d2508026d5e21ff16f905de5360f9ea9908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 27 May 2025 10:46:11 +0800 Subject: [PATCH 24/28] =?UTF-8?q?fix=E9=82=AE=E4=BB=B6=E4=B8=AD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/salaryBill/bo/SalaryBillBO.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 5319fec42..98949cee3 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -649,7 +649,8 @@ public class SalaryBillBO { } else { for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) + String itemValue = e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString(); + boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); @@ -660,7 +661,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.getOrDefault(keyName.toString(), StringUtils.EMPTY)); + emailContent.append(itemValue.replaceAll("null", "")); emailContent.append(""); } break; @@ -729,7 +730,8 @@ public class SalaryBillBO { SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i); for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString())) + String itemValue = e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString(); + boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) && BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0); @@ -740,7 +742,7 @@ public class SalaryBillBO { emailContent.append(""); emailContent.append(""); - emailContent.append(e.getOrDefault(keyName.toString(), StringUtils.EMPTY)); + emailContent.append(itemValue.replaceAll("null", "")); emailContent.append(""); } break; From 1026ff1aae62136a5ae8c437f0b145439baeb708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 27 May 2025 15:56:33 +0800 Subject: [PATCH 25/28] =?UTF-8?q?fix=E9=82=AE=E4=BB=B6=E4=B8=AD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 98949cee3..aea5cede9 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -649,7 +649,7 @@ public class SalaryBillBO { } else { for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - String itemValue = e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString(); + String itemValue = Util.null2String(e.get(keyName.toString())); boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) @@ -730,7 +730,7 @@ public class SalaryBillBO { SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i); for (Object keyName : e.keySet()) { if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) { - String itemValue = e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString(); + String itemValue = Util.null2String(e.get(keyName.toString())); boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue)) || (isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString()) From 578842aa39ebee8a415e81fc9b38ae8cff5369b9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 29 May 2025 10:39:06 +0800 Subject: [PATCH 26/28] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=A9=BF=E9=80=8F=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../param/SalaryStatisticsDataPerspectiveQueryParam.java | 3 +++ .../service/impl/SalaryStatisticsReportServiceImpl.java | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/src/com/engine/salary/report/entity/param/SalaryStatisticsDataPerspectiveQueryParam.java b/src/com/engine/salary/report/entity/param/SalaryStatisticsDataPerspectiveQueryParam.java index d0afd0c00..0d8303b72 100644 --- a/src/com/engine/salary/report/entity/param/SalaryStatisticsDataPerspectiveQueryParam.java +++ b/src/com/engine/salary/report/entity/param/SalaryStatisticsDataPerspectiveQueryParam.java @@ -45,6 +45,9 @@ public class SalaryStatisticsDataPerspectiveQueryParam extends BaseQueryParam { //个税扣缴义务人配置 private List taxAgent; + @JsonIgnore + private List salarySob; + @JsonIgnore //收入所得项目配置 private List incomeCategory; diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java index 2b62276cd..dbf64ecb8 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsReportServiceImpl.java @@ -469,12 +469,21 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary 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.getSalarySobSetting() != null) { + param.setSalarySob(((List) JSON.parseArray(reportPO.getSalarySobSetting(), 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.getPositionSetting() != null) { + param.setPosition(((List) JSON.parseArray(reportPO.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList())); + } + if (reportPO.getStatusSetting() != null) { + param.setStatus(((List) JSON.parseArray(reportPO.getStatusSetting(), Map.class)).stream().map(m -> 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())); } From 9af61786362080965706601566f0ceffd327334b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 6 Jun 2025 10:27:16 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E5=AF=B9=E2=80=9C=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E9=9B=87=E5=91=98=E2=80=9D=E5=AD=97=E6=AE=B5=E4=B8=BA=E2=80=9C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E2=80=9D=E6=97=B6=E7=9A=84=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=81=9A=E4=BA=86=E8=B0=83=E6=95=B4=E3=80=82=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AA=E5=AD=97=E6=AE=B5=20=E2=80=9D?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E6=83=85=E5=86=B5=E8=AF=B4=E6=98=8E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/employeedeclare/bo/EmployeeDeclareRequest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java index 5527df49e..d45c35b79 100644 --- a/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java +++ b/src/com/engine/salary/entity/employeedeclare/bo/EmployeeDeclareRequest.java @@ -62,6 +62,11 @@ public class EmployeeDeclareRequest { // *任职受雇类型 EmploymentTypeEnum employmentTypeEnum = SalaryEnumUtil.enumMatchByValue(employeeDeclare.getEmploymentType(), EmploymentTypeEnum.class); employeeInfoMap.put("sfgy", employmentTypeEnum == null ? "" : employmentTypeEnum.getDefaultLabel()); + //其他情况说明“qtqksm”,有3个选择的值,可选择"扣缴申报利息股息红利所得”、“扣缴申报偶然所得”、”申报其他所得” + //一般劳务所得处理,可以统一用”申报其他所得”作为默认就好 + if (employmentTypeEnum == EmploymentTypeEnum.OTHER) { + employeeInfoMap.put("qtqksm", "申报其他所得"); + } // 入职年度就业情形 employeeInfoMap.put("rzndjyqk", employeeDeclare.getEmploymentFirstYear()); // *手机号码 From adbdb64b4ca5ca612269a2f279ee6daf8e46c8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 6 Jun 2025 11:07:33 +0800 Subject: [PATCH 28/28] =?UTF-8?q?=E8=A1=A5=E5=81=BF=E9=87=91=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E5=85=8D=E7=A8=8E=E9=99=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/taxdeclaration/bo/TaxDeclarationRequest.java | 5 ++--- .../engine/salary/formlua/func/date/DateTimeServiceImpl.java | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java index 8432faa61..495e4635b 100644 --- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java +++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclarationRequest.java @@ -75,6 +75,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.COMPENSATION_FOR_DISMISS) { // 解除劳动合同一次性补偿金 List> employeeRequestParams = listRequestParam.computeIfAbsent("jcldhtycxbcjlb", k -> Lists.newArrayList()); + employeeRequestParam.put("sfzdscmsfb","是"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE) { // 个人股权激励收入 @@ -125,6 +126,7 @@ public class TaxDeclarationRequest { } else if (incomeCategoryEnum == IncomeCategoryEnum.REMUNERATION_FOR_AUTHOR) { // 稿酬所得 List> employeeRequestParams = listRequestParam.computeIfAbsent("gcsdlb", k -> Lists.newArrayList()); + employeeRequestParam.put("sfzdscmsfb","是"); employeeRequestParams.add(employeeRequestParam); } else if (incomeCategoryEnum == IncomeCategoryEnum.ROYALTIES) { // 特许权使用费所得 @@ -167,9 +169,6 @@ public class TaxDeclarationRequest { } } - String string = employeeRequestParam.getOrDefault("syjkbx", "0").toString(); - System.out.println(); - if (new BigDecimal(employeeRequestParam.getOrDefault("syjkbx", "0").toString()).compareTo(new BigDecimal("0")) > 0) { Map healthInsuranceMap = taxFreeMap.get(TaxFreeTypeEnum.HEALTH_INSURANCE); List pos = (List) healthInsuranceMap.get(employeeDeclare.getTaxAgentId() + "-" + employeeDeclare.getEmployeeId() + "-" + SalaryDateUtil.getFormatYearMonth(employeeDeclare.getTaxCycle())); diff --git a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java index 5f2ffedd0..d081615e5 100644 --- a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java +++ b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java @@ -571,7 +571,6 @@ public class DateTimeServiceImpl implements DateTimeService { cale.set(cale.get(Calendar.YEAR), month, 1); String lastday = formatTemp.format(cale.getTime()); - System.out.println(lastday); return new DataType(DataType.STRING, lastday); }