Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
ed9a9012ad
|
|
@ -4,6 +4,7 @@ import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
|||
import com.engine.salary.entity.salarysob.po.*;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -140,7 +141,7 @@ public class SalarySobDuplicateBO {
|
|||
List<SalarySobItemGroupPO> newSalarySobItemGroups = Lists.newArrayListWithExpectedSize(salarySobItemGroups.size());
|
||||
for (SalarySobItemGroupPO salarySobItemGroup : salarySobItemGroups) {
|
||||
SalarySobItemGroupPO newSalarySobItemGroup = SalarySobItemGroupPO.builder()
|
||||
// .id(IdGenerator.generate())
|
||||
.id(IdGenerator.generate())
|
||||
.name(salarySobItemGroup.getName())
|
||||
.salarySobId(result.getSalarySob().getId())
|
||||
.sortedIndex(salarySobItemGroup.getSortedIndex())
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ import java.util.Objects;
|
|||
public enum SalaryEmployeeStatusEnum implements BaseEnum<Integer> {
|
||||
|
||||
ALL(0, "全部", 85155),
|
||||
//在职,对应人力资源表中状态,试用0,正式1,临时2,试用延期3
|
||||
NORMAL(1, "在职", 100120),
|
||||
//离职,对应人力资源表中状态,解雇4,离职5,退休6
|
||||
UNAVAILABLE(2, "离职", 85902),
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
// 人员信息赋值
|
||||
list.forEach(m -> {
|
||||
// todo 身份证号
|
||||
m.setIdNo(null);
|
||||
m.setIdNo("");
|
||||
});
|
||||
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
// 人员信息赋值
|
||||
list.stream().map(m->{
|
||||
// todo 身份证号
|
||||
m.setIdNo(null);
|
||||
m.setIdNo("");
|
||||
return m;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
|
|
|||
|
|
@ -391,10 +391,15 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
SalarySobCycleDTO salarySobCycleDTO = getSalarySobService(user).getSalarySobCycle(salaryAcctRecordPO.getSalarySobId(), SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()));
|
||||
// 根据薪资账套的"核算人员范围"过滤入职日期大于薪资周期止的人员
|
||||
salaryEmployees = salaryEmployees.stream()
|
||||
.filter(salaryEmployee -> Objects.isNull(salaryEmployee.getCompanystartdate())
|
||||
.filter(salaryEmployee -> StringUtils.isBlank(salaryEmployee.getCompanystartdate())
|
||||
|| SalaryDateUtil.stringToDate(salaryEmployee.getCompanystartdate()).compareTo(salarySobCycleDTO.getSalaryCycle().getEndDate()) <= 0)
|
||||
.collect(Collectors.toList());
|
||||
// 根据薪资账套的"核算人员范围"过滤离职日期小于薪资周期起的人员
|
||||
salaryEmployees = salaryEmployees.stream()
|
||||
.filter(salaryEmployee -> StringUtils.isBlank(salaryEmployee.getDismissdate())
|
||||
|| SalaryDateUtil.stringToDate(salaryEmployee.getDismissdate()).compareTo(salarySobCycleDTO.getSalaryCycle().getEndDate()) >= 0)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// TODO: 2/9/22 过滤离职人员
|
||||
// 查询薪资档案,获取人员的个税扣缴义务人
|
||||
Set<Long> employeeIds = SalaryEntityUtil.properties(salaryEmployees, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
getSalaryAcctCalculateService(user).calculate(salaryAcctCalculateBO, simpleEmployee);
|
||||
}
|
||||
};
|
||||
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "salaryAcctCalculateV2", localRunnable);
|
||||
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.HRM, "salaryAcctCalculateV2", localRunnable);
|
||||
}
|
||||
// 13、等待所有子线程执行完毕
|
||||
childMonitor.await();
|
||||
|
|
|
|||
|
|
@ -855,6 +855,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
Long taxAgentId, Date effectiveTime, SalaryArchivePO finalSalaryArchive, String taxAgentAdjustReason, SalaryArchiveImportHandleParam importHandleParam) {
|
||||
if (taxAgentId == null) {
|
||||
// salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(100545, "个税扣缴义务人不存在"), errorCount + 1, errorCount + 1, j, j);
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", "个税扣缴义务人不存在");
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
} else if (effectiveTime != null && finalSalaryArchive != null) {
|
||||
boolean isBeforeError = false;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
private SalaryAcctResultService getSalaryAcctResultService(User user) {
|
||||
return (SalaryAcctResultService) ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
||||
return (SalaryAcctRecordService) ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
private SalarySobItemService getSalarySobItemService(User user) {
|
||||
return (SalarySobItemService) ServiceUtil.getService(SalarySobItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryAcctEmployeeWrapper getSalaryAcctEmployeeWrapper(User user) {
|
||||
return (SalaryAcctEmployeeWrapper) ServiceUtil.getService(SalaryAcctEmployeeWrapper.class, user);
|
||||
}
|
||||
|
|
@ -56,9 +56,9 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
private SalaryAcctProgressService getSalaryAcctProgressService(User user) {
|
||||
return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
// private SalaryCheckResultService salaryCheckResultService;
|
||||
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return (TaxAgentService) ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
* @param queryParam 列表查询条件
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> listPage(SalaryAcctResultQueryParam queryParam) {
|
||||
public Map<String, Object> listPage(SalaryAcctResultQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
// 查询薪资核算记录
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(queryParam.getSalaryAcctRecordId());
|
||||
|
|
@ -87,15 +87,14 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
// 构建薪资核算结果列表的表头
|
||||
List<WeaTableColumnGroup> columns = getSalaryAcctExcelService(user).listWeaTableColumn(salaryAcctRecordPO);
|
||||
|
||||
Map<String,Object> datas = new HashMap<>();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("pageInfo", page);
|
||||
datas.put("columns",columns);
|
||||
datas.put("columns", columns);
|
||||
|
||||
return datas;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取薪资核算列表的高级搜索
|
||||
*
|
||||
|
|
@ -146,7 +145,7 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
/**
|
||||
* 保存薪资核算结果
|
||||
*
|
||||
* @param saveParam 保存参数
|
||||
* @param saveParam 保存参数
|
||||
*/
|
||||
public void save(SalaryAcctResultSaveParam saveParam) {
|
||||
getSalaryAcctResultService(user).save(saveParam);
|
||||
|
|
@ -158,10 +157,10 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
* @param calculateParam 薪资核算的参数
|
||||
*/
|
||||
public void calculate(SalaryAcctCalculateParam calculateParam) {
|
||||
log.info("开始核算V1{}",calculateParam);
|
||||
log.info("开始核算V1{}", calculateParam);
|
||||
//当前登陆人员
|
||||
DataCollectionEmployee simpleEmployee = new DataCollectionEmployee();
|
||||
simpleEmployee.setEmployeeId((long)user.getUID());
|
||||
simpleEmployee.setEmployeeId((long) user.getUID());
|
||||
// 检查薪资核算人员的个税扣缴义务人
|
||||
getSalaryAcctEmployeeWrapper(user).checkTaxAgent(calculateParam.getSalaryAcctRecordId());
|
||||
// 检查是否正在核算中
|
||||
|
|
@ -183,10 +182,16 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
// LocalRunnable localRunnable = new LocalRunnable() {
|
||||
// @Override
|
||||
// public void execute() {
|
||||
getSalaryAcctResultService(user).calculate(calculateParam, simpleEmployee);
|
||||
// getSalaryAcctResultService(user).calculate(calculateParam, simpleEmployee);
|
||||
// }
|
||||
// };
|
||||
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "salaryAcctCalculateV1", localRunnable);
|
||||
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.HRM, "salaryAcctCalculateV1", localRunnable);
|
||||
new Thread() {
|
||||
public void run() {
|
||||
getSalaryAcctResultService(user).calculate(calculateParam, simpleEmployee);
|
||||
}
|
||||
}.start();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue