薪酬系统-福利台账,社保调差保存功能优化
This commit is contained in:
parent
ee7309ffd1
commit
4d01c324e0
|
|
@ -17,7 +17,7 @@ public interface SICompensationService {
|
|||
|
||||
List<Map<String, String>> compensationComTotal(List<CompensationParam> paramList);
|
||||
|
||||
Map<String, String> compensationAccount(List<InsuranceCompensationDTO> list);
|
||||
Map<String, Object> compensationAccount(List<InsuranceCompensationDTO> list);
|
||||
|
||||
/**
|
||||
* 保存社保调差默认配置
|
||||
|
|
|
|||
|
|
@ -236,17 +236,25 @@ public class SICompensationServiceImpl extends Service implements SICompensation
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> compensationAccount(List<InsuranceCompensationDTO> list) {
|
||||
public Map<String, Object> compensationAccount(List<InsuranceCompensationDTO> list) {
|
||||
|
||||
long currentEmployeeId = user.getUID();
|
||||
List<DataCollectionEmployee> allEmployees = getEmployMapper().listAll();
|
||||
Map<Long, String> usernameMap = SalaryEntityUtil.convert2Map(allEmployees, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
|
||||
Map<String, String> result = new HashMap<>();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
List<String> errorList = new ArrayList<>();
|
||||
for (InsuranceCompensationDTO param : list) {
|
||||
if (StringUtils.isBlank(param.getAdjustmentTotal()) || "0".equals(param.getAdjustmentTotal())) {
|
||||
errorList.add(usernameMap.get(param.getEmployeeId()) + "-调差失败:调差数额不正确!");
|
||||
continue;
|
||||
}
|
||||
InsuranceAccountDetailPO insuranceAccountDetailPO = getInsuranceAccountDetailMapper().getById(param.getTarget());
|
||||
SalaryAssert.notNull(insuranceAccountDetailPO, SalaryI18nUtil.getI18nLabel(138849, "调差对象不存在"));
|
||||
if (insuranceAccountDetailPO == null) {
|
||||
errorList.add(usernameMap.get(param.getEmployeeId()) + "-调差失败:调差对象不存在!");
|
||||
continue;
|
||||
}
|
||||
|
||||
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
|
||||
if (StringUtils.isNotBlank(insuranceAccountDetailPO.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
|
|
@ -299,8 +307,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
|
|||
insuranceCompensationPO.setUpdateTime(new Date());
|
||||
getInsuranceCompensationMapper().insert(insuranceCompensationPO);
|
||||
|
||||
|
||||
result.put(param.getOriginId(), insuranceCompensationPO.getId().toString());
|
||||
// result.put(param.getOriginId(), insuranceCompensationPO.getId().toString());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -308,6 +315,12 @@ public class SICompensationServiceImpl extends Service implements SICompensation
|
|||
}
|
||||
//刷新bill_detail统计数据
|
||||
getSIAccountService(user).refreshBillBatch(list.get(0).getPaymentOrganization(), list.get(0).getBillMonth());
|
||||
if (errorList.size() == 0) {
|
||||
result.put("data", "全部调差成功!");
|
||||
} else {
|
||||
result.put("data", "存在调差失败项!");
|
||||
}
|
||||
result.put("errorMessage", errorList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ public class SIAccountController {
|
|||
public String compensationSave(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody List<InsuranceCompensationDTO> param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<List<InsuranceCompensationDTO>, Map<String, String>>(user).run(getSIAccountWrapper(user)::compensationSave, param);
|
||||
return new ResponseResult<List<InsuranceCompensationDTO>, Map<String, Object>>(user).run(getSIAccountWrapper(user)::compensationSave, param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class SIAccountWrapper extends Service {
|
|||
/**
|
||||
* 社保调差保存
|
||||
*/
|
||||
public Map<String, String> compensationSave(List<InsuranceCompensationDTO> param) {
|
||||
public Map<String, Object> compensationSave(List<InsuranceCompensationDTO> param) {
|
||||
|
||||
return getSICompensationService(user).compensationAccount(param);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue