Merge branch 'release/3.0.2.2504.01' into custom/钱智

This commit is contained in:
钱涛 2025-10-29 09:43:24 +08:00
commit e1106de20c
27 changed files with 73 additions and 26 deletions

View File

@ -1,5 +1,5 @@
log=false
defaultCloseNonStandard149=true
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
version=3.0.2.2504.04
version=3.0.2.2510.01
openFormulaForcedEditing=false

View File

@ -6,5 +6,5 @@ and employee_id not in
where tax_agent_id =id and delete_type = 0)
update hrsa_tax_agent_emp set delete_type = 3
update hrsa_tax_agent_emp set delete_type = 3 where delete_type = 0
where tax_agent_id=id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =id and delete_type = 0)

View File

@ -18,7 +18,8 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
二、删除停薪员工档案
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
update hrsa_salary_archive set delete_type=3 where delete_type=0 and run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
update hrsa_salary_archive_item set delete_type=3 where delete_type=0
二、删除停薪员工社保档案
update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
@ -28,10 +29,10 @@ update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
--删除社保福利档案
update hrsa_insurance_base_info set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_social_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_fund_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_other_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_insurance_base_info set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
update hrsa_social_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
update hrsa_fund_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
update hrsa_other_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
-- 删除薪资档案
update hrsa_salary_archive set delete_type=3 where employee_id = ? and tax_agent_id=?
@ -45,4 +46,11 @@ update hrsa_other_archives set delete_type=3;
update hrsa_tax_agent_emp set delete_type=3;
-- 删除核算记录和工资单信息
update hrsa_salary_acct_record set delete_type=3 where delete_type=0;
update hrsa_salary_acct_emp set delete_type=3 where delete_type=0;
update hrsa_salary_acct_result set delete_type=3 where delete_type=0;
update hrsa_salary_send set delete_type=3 where delete_type=0;
update hrsa_salary_send_info set delete_type=3 where delete_type=0;

View File

@ -80,6 +80,8 @@ public class CheckEditSIArchiveAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, CheckEditSIArchiveAction.SalaryField::getSalaryName, CheckEditSIArchiveAction.SalaryField::getValue));
log.info("CheckEditSIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
//福利执行状态
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(CheckEditSIArchiveAction.SalaryField::getValue).orElse("1");

View File

@ -78,6 +78,7 @@ public class CheckEditSalaryAction implements Action {
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
log.info("CheckEditSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
.importDatas(importData)
.build();

View File

@ -98,7 +98,7 @@ public class CheckInitSalaryAction implements Action {
list.add(new SalaryField(processField, salaryName, value));
}
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
log.info("CheckInitSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
return doSalaryArchiveInit(requestInfo, importDataMap);
} catch (Exception e) {
log.error("定薪检查异常", e);

View File

@ -89,6 +89,7 @@ public class CheckStayAddToPaySIArchiveAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayAddToPaySIArchiveAction.SalaryField::getSalaryName, CheckStayAddToPaySIArchiveAction.SalaryField::getValue);
log.info("CheckStayAddToPaySIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
if(CollectionUtils.isEmpty(taxAgentPOS)){

View File

@ -88,6 +88,7 @@ public class CheckStayDelToStopSIArchiveAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayDelToStopSIArchiveAction.SalaryField::getSalaryName, CheckStayDelToStopSIArchiveAction.SalaryField::getValue);
log.info("CheckStayDelToStopSIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
if(CollectionUtils.isEmpty(taxAgentPOS)){

View File

@ -92,6 +92,7 @@ public class CheckStopSalaryAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStopSalaryAction.SalaryField::getSalaryName, CheckStopSalaryAction.SalaryField::getValue);
log.info("CheckStopSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
if(CollectionUtils.isEmpty(taxAgentPOS)){

View File

@ -88,6 +88,7 @@ public class CopyToPaySIArchiveAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, CopyToPaySIArchiveAction.SalaryField::getSalaryName, CopyToPaySIArchiveAction.SalaryField::getValue));
log.info("CopyToPaySIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
//操作人
String uid = list.stream().filter(f -> f.salaryName.equals("操作人")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("1");
//增员

View File

@ -79,6 +79,7 @@ public class EditSIArchiveAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, EditSIArchiveAction.SalaryField::getSalaryName, EditSIArchiveAction.SalaryField::getValue));
log.info("EditSIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
//福利执行状态
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(EditSIArchiveAction.SalaryField::getValue).orElse("1");

View File

@ -77,7 +77,7 @@ public class EditSalaryAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
log.info("EditSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
.importDatas(importData)
.build();

View File

@ -97,6 +97,7 @@ public class EditToPaySIArchiveAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, EditToPaySIArchiveAction.SalaryField::getSalaryName, EditToPaySIArchiveAction.SalaryField::getValue));
log.info("EditToPaySIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
//福利执行状态
String runStatus = EmployeeStatusEnum.STAY_ADD.getValue();

View File

@ -97,6 +97,7 @@ public class EditToStopSIArchiveAction implements Action {
}
List<Map<String, Object>> importData = new ArrayList<>();
importData.add(SalaryEntityUtil.convert2Map(list, EditToStopSIArchiveAction.SalaryField::getSalaryName, EditToStopSIArchiveAction.SalaryField::getValue));
log.info("EditToStopSIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
//福利执行状态
String runStatus = EmployeeStatusEnum.PAYING.getValue();

View File

@ -100,7 +100,7 @@ public class InitSalaryAction implements Action {
}
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
log.info("InitSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
return doSalaryArchiveInit(requestInfo, importDataMap);
} catch (Exception e) {
log.error("定薪异常", e);

View File

@ -108,6 +108,7 @@ public class RehireAction implements Action {
list.add(new SalaryField(processField, salaryName, value));
}
Map<String, Object> salaryFieldMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
log.info("RehireActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), salaryFieldMap);
String taxAgentName = salaryFieldMap.getOrDefault("个税扣缴义务人", "").toString();
String empIdStr = salaryFieldMap.getOrDefault("员工id", "").toString();
if (StringUtils.isBlank(taxAgentName) || StringUtils.isBlank(empIdStr)) {

View File

@ -93,6 +93,7 @@ public class StayAddToPaySIArchiveAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayAddToPaySIArchiveAction.SalaryField::getSalaryName, StayAddToPaySIArchiveAction.SalaryField::getValue);
log.info("StayAddToPaySIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
if(CollectionUtils.isEmpty(taxAgentPOS)){

View File

@ -94,6 +94,7 @@ public class StayDelToStopSIArchiveAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayDelToStopSIArchiveAction.SalaryField::getSalaryName, StayDelToStopSIArchiveAction.SalaryField::getValue);
log.info("StayDelToStopSIArchiveActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
if(CollectionUtils.isEmpty(taxAgentPOS)){

View File

@ -99,6 +99,7 @@ public class StopSalaryAction implements Action {
}
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StopSalaryAction.SalaryField::getSalaryName, StopSalaryAction.SalaryField::getValue);
log.info("StopSalaryActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
//操作人
String uid = importDataMap.getOrDefault("操作人","1").toString();
User user = new User(Integer.parseInt(uid));

View File

@ -117,6 +117,7 @@ public class UpdateSISchemeDetailAction implements Action {
rs.beforFirst();
// 流程数据
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, UpdateSISchemeDetailAction.SalaryField::getSalaryName, UpdateSISchemeDetailAction.SalaryField::getValue);
log.info("UpdateSISchemeDetailActiontableName {}workflowid{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
//设置更新对象元素
String schemeId = importDataMap.getOrDefault("福利方案id", "").toString();
String schemeName = importDataMap.getOrDefault("福利方案名称", "").toString();

View File

@ -21,6 +21,7 @@ import com.engine.salary.mapper.auth.AuthRoleMapper;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
import java.util.HashSet;
@ -156,7 +157,7 @@ public class AuthDataServiceImpl extends Service implements AuthDataService {
public List<AuthRoleDataDTO> listRoleData( AuthDataQueryParam param) {
List<AuthRoleDataDTO> authRoleDataDTOS = getAuthRoleDataMapper().listRoleData(param.getRoleId());
if (StrUtil.isNotEmpty(param.getUsername())){
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> StringUtils.isNotBlank(authRoleDataDTO.getUsername()) && authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
}
return authRoleDataDTOS;
}

View File

@ -24,6 +24,7 @@ import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
@ -196,7 +197,7 @@ public class AuthMemberServiceImpl extends Service implements AuthMemberService
public List<AuthRoleEmpDTO> listRoleEmp(AuthMemberQueryParam param) {
List<AuthRoleEmpDTO> empDTOS = getAuthRoleEmpMapper().getByRoleId(param.getRoleId());
if(StrUtil.isNotEmpty(param.getUsername())){
empDTOS = empDTOS.stream().filter(item -> item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
empDTOS = empDTOS.stream().filter(item -> StringUtils.isNotBlank(item.getUsername()) && item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
}
return empDTOS;

View File

@ -339,14 +339,25 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
if (CollectionUtils.isNotEmpty(otherConditions)) {
List<Long> items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList());
List<SalaryAcctResultPO> list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items);
for (int i = 0; i < otherConditions.size(); i++) {
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
Long itemId = otherCondition.getItemId();
FilterEnum filter = otherCondition.getFilter();
List<String> params = otherCondition.getParams();
list = list.stream().filter(a -> Objects.equals(a.getSalaryItemId(), itemId)).filter(a -> filter.filter(params).test(a.getResultValue())).collect(Collectors.toList());
Map<Long, List<SalaryAcctResultPO>> acctEmpResultsMap = SalaryEntityUtil.group2Map(list, SalaryAcctResultPO::getSalaryAcctEmpId);
Set<Long> removeAcctEmpIds = new HashSet<>();
for (Long acctEmpId : acctEmpResultsMap.keySet()) {
List<SalaryAcctResultPO> acctEmpResults = acctEmpResultsMap.get(acctEmpId);
//如果有一个条件不成立就删除
for (int i = 0; i < otherConditions.size(); i++) {
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
Long itemId = otherCondition.getItemId();
FilterEnum filter = otherCondition.getFilter();
List<String> params = otherCondition.getParams();
for (SalaryAcctResultPO po : acctEmpResults) {
if(Objects.equals(po.getSalaryItemId(), itemId) && !filter.filter(params).test(po.getResultValue())){
removeAcctEmpIds.add(po.getSalaryAcctEmpId());
}
}
}
}
List<Long> salaryAcctEmpId = SalaryEntityUtil.properties(list, SalaryAcctResultPO::getSalaryAcctEmpId, Collectors.toList());
acctEmpResultsMap.keySet().removeAll(removeAcctEmpIds);
List<Long> salaryAcctEmpId = Lists.newArrayList(acctEmpResultsMap.keySet());
if (CollectionUtils.isEmpty(salaryAcctEmpId)) {
//条件不满足直接返回空列表
@ -1299,7 +1310,14 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
@Override
public void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam) {
List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
Set<Long> acctEmpIds = updateParam.getAcctEmpIds();
List<SalaryAcctEmployeePO> salaryAcctEmployees;
if (CollUtil.isNotEmpty(acctEmpIds)) {
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listByIds(acctEmpIds);
} else {
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
}
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
return;
}

View File

@ -662,8 +662,6 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
public XSSFWorkbook exportAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam) {
// 1.工作簿名称
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资项目调整记录");
// 获取所有可被引用的薪资项目
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
String[] header = {
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),

View File

@ -514,7 +514,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
// 1.工作簿名称
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案");
// 获取所有可被引用的薪资项目
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
List<SalaryItemPO> salaryItems = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
Object[] header = {
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "", "", 0),
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "", "", 0),

View File

@ -136,6 +136,15 @@ public class SalaryEntityUtil {
.collect(Collectors.toMap(keyMapper, valueMapper, (a, b) -> a));
}
public static <T, K, V> Map<K, V> convert2LinkedMap(Collection<T> objs, Function<T, K> keyMapper, Function<T, V> valueMapper) {
if (CollectionUtils.isEmpty(objs)) {
return Maps.newHashMap();
}
return objs.stream()
.filter(e -> valueMapper.apply(e) != null && keyMapper.apply(e) != null)
.collect(Collectors.toMap(keyMapper, valueMapper, (a, b) -> a, LinkedHashMap::new));
}
public static <R, T> Map<R, List<T>> group2Map(Collection<T> objs, Function<T, R> function) {
if (CollectionUtils.isEmpty(objs)) {
return Maps.newHashMap();

View File

@ -534,9 +534,6 @@ public class SalaryArchiveWrapper extends Service {
return map;
}
public Map<String, Object> selectSalaryArchiveColumns(String importType) {
return getSalaryArchiveService(user).selectSalaryArchiveColumns(SalaryArchiveImportTypeEnum.parseByValue(importType));
}
public Map<String, Object> checkSalaryArchiveInit(SalaryArchiveImportActionParam importData) {