Merge branch 'release/2.12.1.2403.02' into release/个税版本

This commit is contained in:
钱涛 2024-04-12 17:47:40 +08:00
commit 6cfeb70f9c
14 changed files with 53 additions and 14 deletions

View File

@ -8,6 +8,7 @@ import com.engine.salary.entity.salaryBill.param.SalarySendDetailQueryParam;
import com.engine.salary.entity.salaryBill.param.SalarySendInfoQueryParam;
import com.engine.salary.entity.salaryBill.po.SalarySendInfoPO;
import com.engine.salary.mapper.salarybill.SalarySendInfoMapper;
import com.engine.salary.util.SalaryI18nUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
@ -27,7 +28,8 @@ public class SalarySendInfoBiz {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySendInfoMapper mapper = sqlSession.getMapper(SalarySendInfoMapper.class);
return mapper.list(param);
List<SalarySendInfoListDTO> list = mapper.list(param);
return SalaryI18nUtil.i18nList(list);
} finally {
sqlSession.close();
}
@ -92,7 +94,9 @@ public class SalarySendInfoBiz {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySendInfoMapper mapper = sqlSession.getMapper(SalarySendInfoMapper.class);
return mapper.detailList(param, otherSalaryAccRecordIds);
List<SalarySendDetailListDTO> detailList = mapper.detailList(param, otherSalaryAccRecordIds);
SalaryI18nUtil.i18nList(detailList);
return detailList;
} finally {
sqlSession.close();
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryBill.dto;
import com.engine.salary.annotation.I18n;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -38,12 +39,14 @@ public class SalarySendDetailListDTO {
private String email;
// 姓名")
@I18n
private String username;
// 个税扣缴义务人")
private String taxAgent;
// 部门")
@I18n
private String department;
// 手机号")

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryBill.dto;
import com.engine.salary.annotation.I18n;
import com.engine.salary.annotation.TableTitle;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@ -26,6 +27,7 @@ public class SalarySendInfoListDTO {
private Long employeeId;
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
@I18n
private String username;
@ -35,6 +37,7 @@ public class SalarySendInfoListDTO {
@TableTitle(title = "部门", dataIndex = "department", key = "department")
@I18n
private String department;

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.siarchives.po;
import com.engine.salary.annotation.I18n;
import com.engine.salary.enums.UserStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -26,6 +27,7 @@ public class InsuranceArchivesEmployeePO {
*/
private Long paymentOrganization;
@I18n
private String userName;
private BigDecimal departmentId;
@ -34,12 +36,16 @@ public class InsuranceArchivesEmployeePO {
private String telephone;
@I18n
private String departmentName;
/**
* 分部
*/
@I18n
private String subcompanyName;
private BigDecimal position;
private Integer userStatus;

View File

@ -1,7 +1,7 @@
package com.engine.salary.entity.siexport.po;
import com.engine.salary.annotation.I18n;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import com.engine.salary.enums.UserStatusEnum;
/**
* @Author weaver_cl
@ -11,10 +11,12 @@ import com.engine.salary.enums.UserStatusEnum;
**/
public class AccountExportPO extends InsuranceAccountDetailPO {
@I18n
private String userName;
private String telephone;
@I18n
private String departmentName;
private Integer userStatus;

View File

@ -684,15 +684,11 @@
<if test="departmentName != null">
department_name=#{departmentName},
</if>
<if test="departmentId != null">
department_id=#{departmentId},
</if>
<if test="subcompanyName != null">
subcompany_name=#{subcompanyName},
</if>
<if test="subcompanyId != null">
subcompany_id=#{subcompanyId},
</if>
<if test="jobtitleName != null">
jobtitle_name=#{jobtitleName},
</if>

View File

@ -23,6 +23,7 @@ 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.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.excel.ExcelUtilPlus;
import com.engine.salary.util.page.Column;
@ -161,6 +162,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
//非系统人员核算明细
List<AccountExportPO> extAccountExportPOS = getInsuranceExportMapper().exportExtAccount(queryParam.getPaymentStatus(), insuranceExportParam);
accountExportPOS.addAll(extAccountExportPOS);
SalaryI18nUtil.i18nList(accountExportPOS);
//如果入参包含姓名信息
if (queryParam.getUserName() != null) {
accountExportPOS = accountExportPOS.stream().filter(v -> v.getUserName().contains(queryParam.getUserName())).collect(Collectors.toList());

View File

@ -1633,6 +1633,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
List<AccountExportPO> extAccountExportPOS = getInsuranceExportMapper().exportExtAccount(PaymentStatusEnum.COMMON.getValue(), exportParam);
accountExportPOS.addAll(extAccountExportPOS);
encryptUtil.decryptList(accountExportPOS, AccountExportPO.class);
SalaryI18nUtil.i18nList(accountExportPOS);
// 数据组装
List<Map<String, Object>> records = getSIExportService(user).buildCommonRecords(accountExportPOS);

View File

@ -3568,6 +3568,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
page, InsuranceArchivesEmployeePO.class);
}
SalaryI18nUtil.i18nList(pageInfo.getList());
List<Map<String, Object>> records = null;
log.info("buildTableData方法处理福利档案列表数据开始");
sw.start("buildTableData方法处理福利档案列表数据");

View File

@ -208,6 +208,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
// }
encryptUtil.decryptList(accountExportPOS, AccountExportPO.class);
SalaryI18nUtil.i18nList(accountExportPOS);
List<WeaTableColumn> columns = new ArrayList<>();
List<Map<String, Object>> records = new ArrayList<>();
// if (Objects.equals(PaymentStatusEnum.COMMON.getValue(), paymentStatus)) {

View File

@ -590,6 +590,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
if (insuranceArchivesEmployeePOS == null) {
insuranceArchivesEmployeePOS = new ArrayList<>();
}
SalaryI18nUtil.i18nList(insuranceArchivesEmployeePOS);
List<Map<String, Object>> records = buildTableData(insuranceArchivesEmployeePOS);
List<WeaTableColumn> columns = buildWeaTableColumns(insuranceArchivesEmployeePOS, (long) user.getUID());

View File

@ -255,8 +255,12 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
LocalRunnable localRunnable = new LocalRunnable() {
@Override
public void execute() {
// 获取人员完整信息
Map<String, DataCollectionEmployee> allEmployeeMap = getEmployeeWholeInfo(enableSendList);
//生成工资单pdf
enableSendList.forEach(e -> {
// 构建人员信息
SalaryBillBO.buildEmployeeInfo(salaryBillSendParam, allEmployeeMap.get(e.get("employeeId").toString()));
SalaryBillBO.genPdf(e, salaryBillSendParam);
});
@ -574,7 +578,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
SalaryBillBO.sendMsg(salaryBillSendParam, Long.valueOf(e.get("id").toString()), Long.valueOf(e.get("employeeId").toString()));
}
if (sendChannels.contains(MessageChannelEnum.EMAIL) || sendChannels.contains(MessageChannelEnum.SMS) || GEN_PDF) {
if (sendChannels.contains(MessageChannelEnum.EMAIL) || sendChannels.contains(MessageChannelEnum.SMS)) {
// 构建人员信息
SalaryBillBO.buildEmployeeInfo(salaryBillSendParam, allEmployeeMap.get(e.get("employeeId").toString()));

View File

@ -209,25 +209,40 @@ public class SalaryEntityUtil {
}
/**
* 进位规则
* @param newScale 小数位
* @param rententionRule 进位规则
* @param value
* @return
*/
public static BigDecimal carryRule(Integer newScale, Integer rententionRule, BigDecimal value) {
//四舍五入
RoundingMode roundingMode = RoundingMode.HALF_UP;
//原始数据
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.RAW_DATA.getValue())) {
roundingMode = RoundingMode.DOWN;
}
//四舍五入
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.ROUNDING.getValue())) {
roundingMode = RoundingMode.HALF_UP;
}
//向上舍入
if (Objects.equals(rententionRule, 3)) {
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.ROUND_UP.getValue())) {
roundingMode = RoundingMode.UP;
}
//向下舍入
if (Objects.equals(rententionRule, 4)) {
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.ROUND_DOWN.getValue())) {
roundingMode = RoundingMode.DOWN;
}
//见分取角只取保留小数后一位向上舍入
if (Objects.equals(rententionRule, 5)) {
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.CEILING.getValue())) {
value = value.setScale(newScale + 1, RoundingMode.FLOOR);
roundingMode = RoundingMode.UP;
}
//向上取偶
if (Objects.equals(rententionRule, SalaryRoundingModeEnum.UP_EVEN.getValue())) {
value = value.setScale(0, RoundingMode.UP);
value = value.setScale(newScale, RoundingMode.UP);
int number = value.intValue();
if (number % 2 != 0) {
value = value.add(BigDecimal.valueOf(1));

View File

@ -232,7 +232,7 @@ public class ValidUtil {
.replace("", "in")
.replace("", "IN")
.replace("", "like")
.replace("", "like")
.replace("", "LIKE")
.replace("", "exists")
.replace("", "EXISTS")
.replace("", "between")