汇通二开需求调整
This commit is contained in:
parent
4e24000c3c
commit
82eb197079
|
|
@ -33,6 +33,10 @@ public class HtjsApprovalParam extends BaseQueryParam {
|
|||
|
||||
Long schemeId;
|
||||
|
||||
Long fundSchemeId;
|
||||
|
||||
Long otherSchemeId;
|
||||
|
||||
List<HtXcssItemDTO> htXcssItemDTOList;
|
||||
|
||||
String userName;
|
||||
|
|
|
|||
|
|
@ -1478,9 +1478,9 @@
|
|||
|
||||
<select id="queryList4Ht" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.id,t.employee_id,t.social_per_json,t.social_com_json,
|
||||
t.fund_per_json,t.fund_com_json,t.other_per_json,
|
||||
t.other_com_json,t.social_per_sum,t.social_com_sum,
|
||||
t.id,t.employee_id,t.social_per_json,t.social_com_json,t.social_scheme_id,
|
||||
t.fund_per_json,t.fund_com_json,t.fund_scheme_id,t.other_per_json,
|
||||
t.other_com_json,t.social_per_sum,t.other_scheme_id,t.social_com_sum,
|
||||
t.fund_per_sum,t.fund_com_sum,t.other_per_sum,
|
||||
t.other_com_sum,t.per_sum,t.com_sum,t.payment_status,
|
||||
t.social_payment_base_string,t.fund_payment_base_string,t.other_payment_base_string
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
if (insuranceAccountBatchPO == null || Objects.equals(BillStatusEnum.NOT_ARCHIVED.getValue(), insuranceAccountBatchPO.getBillStatus())) {
|
||||
continue;
|
||||
}
|
||||
insuranceAccountDetailPOS.addAll(getInsuranceAccountDetailMapper().queryList4Ht(billMonth, taxAgent.getId(), socialSchemeId, fundSchemeId, otherSchemeId));
|
||||
insuranceAccountDetailPOS.addAll(getInsuranceAccountDetailMapper().queryList4Ht(billMonth, taxAgent.getId(), socialSchemeId, null, null));
|
||||
}
|
||||
|
||||
//退差数据不参与薪资核算
|
||||
|
|
@ -1245,7 +1245,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|| f.getPaymentStatus().equals(PaymentStatusEnum.REPAIR.getValue())
|
||||
|| f.getPaymentStatus().equals(PaymentStatusEnum.BALANCE.getValue()) )
|
||||
.collect(Collectors.toList());
|
||||
Map<String, Object> resultMap = buildInsuranceApproInfo4Ht(insuranceAccountDetailPOS);
|
||||
Map<String, Object> resultMap = buildInsuranceApproInfo4Ht(insuranceAccountDetailPOS, fundSchemeId, otherSchemeId);
|
||||
Map<String,Object> perValueMap = (Map<String,Object>)resultMap.getOrDefault("perValueMap", Collections.emptyMap());
|
||||
Map<String,Object> comValueMap = (Map<String,Object>)resultMap.getOrDefault("comValueMap", Collections.emptyMap());
|
||||
Map<String,List<Long>> empMap = (Map<String,List<Long>>)resultMap.getOrDefault("empMap", Collections.emptyMap());
|
||||
|
|
@ -1261,7 +1261,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
if (insuranceAccountBatchPO == null || Objects.equals(BillStatusEnum.NOT_ARCHIVED.getValue(), insuranceAccountBatchPO.getBillStatus())) {
|
||||
continue;
|
||||
}
|
||||
lastInsuranceAccountDetailPOS.addAll(getInsuranceAccountDetailMapper().queryList4Ht(lastMonth, taxAgent.getId(), socialSchemeId, fundSchemeId, otherSchemeId));
|
||||
lastInsuranceAccountDetailPOS.addAll(getInsuranceAccountDetailMapper().queryList4Ht(lastMonth, taxAgent.getId(), socialSchemeId, null, null));
|
||||
}
|
||||
|
||||
//退差数据不参与薪资核算
|
||||
|
|
@ -1270,26 +1270,35 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|| f.getPaymentStatus().equals(PaymentStatusEnum.REPAIR.getValue())
|
||||
|| f.getPaymentStatus().equals(PaymentStatusEnum.BALANCE.getValue()) )
|
||||
.collect(Collectors.toList());
|
||||
Map<String, Object> lastResultMap = buildInsuranceApproInfo4Ht(lastInsuranceAccountDetailPOS);
|
||||
Map<String, Object> lastResultMap = buildInsuranceApproInfo4Ht(lastInsuranceAccountDetailPOS, fundSchemeId, otherSchemeId);
|
||||
Map<String,List<Long>> lastEmpMap = (Map<String,List<Long>>)lastResultMap.getOrDefault("empMap", Collections.emptyMap());
|
||||
|
||||
|
||||
// 查询社保方案信息
|
||||
List<InsuranceSchemeDetailDTO> insuranceSchemeDetailDTOList = Collections.emptyList();
|
||||
List<InsuranceSchemeDetailDTO> insuranceSchemeDetailDTOList = new ArrayList<>();
|
||||
if (socialSchemeId != null) {
|
||||
insuranceSchemeDetailDTOList = getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.SOCIAL_SECURITY, socialSchemeId);
|
||||
} else if (fundSchemeId != null) {
|
||||
insuranceSchemeDetailDTOList = getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.ACCUMULATION_FUND, fundSchemeId);
|
||||
} else if (otherSchemeId != null) {
|
||||
insuranceSchemeDetailDTOList = getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.OTHER, otherSchemeId);
|
||||
insuranceSchemeDetailDTOList.addAll(getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.SOCIAL_SECURITY, socialSchemeId));
|
||||
}
|
||||
if (fundSchemeId != null) {
|
||||
insuranceSchemeDetailDTOList.addAll(getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.ACCUMULATION_FUND, fundSchemeId));
|
||||
}
|
||||
if (otherSchemeId != null) {
|
||||
insuranceSchemeDetailDTOList.addAll(getSiSchemeService().getSchemeDetailFormDTO(WelfareTypeEnum.OTHER, otherSchemeId));
|
||||
}
|
||||
|
||||
// 获取所有开启缴纳的福利项
|
||||
insuranceSchemeDetailDTOList = insuranceSchemeDetailDTOList.stream()
|
||||
LinkedHashMap<Long, InsuranceSchemeDetailDTO> insuranceSchemeDetailDTOMap = new LinkedHashMap<>();
|
||||
insuranceSchemeDetailDTOList.stream()
|
||||
.filter(dto -> dto.getIsPayment() == null || dto.getIsPayment() == true)
|
||||
.collect(Collectors.toMap(InsuranceSchemeDetailDTO::getInsuranceId, Function.identity(), (a, b) -> a))
|
||||
.values()
|
||||
.stream().collect(Collectors.toList());
|
||||
.forEach(dto -> {
|
||||
insuranceSchemeDetailDTOMap.put(dto.getInsuranceId(), dto);
|
||||
});
|
||||
// .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceSchemeDetailDTO::getInsuranceId))), ArrayList::new));
|
||||
// .collect(Collectors.toMap(InsuranceSchemeDetailDTO::getInsuranceId, Function.identity(), (a, b) -> a))
|
||||
// .values()
|
||||
// .stream().collect(Collectors.toList());
|
||||
|
||||
insuranceSchemeDetailDTOList = insuranceSchemeDetailDTOMap.values().stream().collect(Collectors.toList());
|
||||
List<HtSbqsListDTO> htSbqsListDTOS = new ArrayList<HtSbqsListDTO>();
|
||||
for (InsuranceSchemeDetailDTO dto : insuranceSchemeDetailDTOList) {
|
||||
List<Long> empList = empMap.getOrDefault(dto.getInsuranceId().toString(), Collections.emptyList());
|
||||
|
|
@ -1637,7 +1646,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
|
||||
public Map<String, Object> buildInsuranceApproInfo4Ht(List<InsuranceAccountDetailPO> list) {
|
||||
public Map<String, Object> buildInsuranceApproInfo4Ht(List<InsuranceAccountDetailPO> list, Long fundSchemeId, Long otherSchemeId) {
|
||||
// List<InsuranceAccountDetailPO> newList = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return Collections.emptyMap();
|
||||
|
|
@ -1755,6 +1764,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
if (fundSchemeId != null ) {
|
||||
if (item.getFundSchemeId() == null || !(item.getFundSchemeId().equals(fundSchemeId))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
|
|
@ -1788,6 +1802,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
if (fundSchemeId != null ) {
|
||||
if (item.getFundSchemeId() == null || !(item.getFundSchemeId().equals(fundSchemeId))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
|
|
@ -1821,6 +1840,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
if (otherSchemeId != null ) {
|
||||
if (item.getOtherSchemeId() == null || !(item.getOtherSchemeId().equals(otherSchemeId))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
|
|
@ -1854,6 +1878,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
if (otherSchemeId != null ) {
|
||||
if (item.getOtherSchemeId() == null || !(item.getOtherSchemeId().equals(otherSchemeId))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
|||
import com.engine.salary.enums.salaryaccounting.SalaryAcctResultDataSourceEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctResultMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
|
|
@ -1502,12 +1501,13 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
throw new SalaryRunTimeException("社保福利方案不存在或已被删除");
|
||||
}
|
||||
Integer welfareType = insuranceSchemePO.getWelfareType();
|
||||
if (welfareType.equals(WelfareTypeEnum.SOCIAL_SECURITY.getValue())) {
|
||||
return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), param.getSchemeId(), null, null);
|
||||
} else if (welfareType.equals(WelfareTypeEnum.ACCUMULATION_FUND.getValue())) {
|
||||
return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), null, param.getSchemeId(), null);
|
||||
} else {
|
||||
return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), null, null, param.getSchemeId());
|
||||
}
|
||||
return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), param.getSchemeId(), param.getFundSchemeId(), param.getOtherSchemeId());
|
||||
// if (welfareType.equals(WelfareTypeEnum.SOCIAL_SECURITY.getValue())) {
|
||||
// return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), param.getSchemeId(), null, null);
|
||||
// } else if (welfareType.equals(WelfareTypeEnum.ACCUMULATION_FUND.getValue())) {
|
||||
// return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), null, param.getSchemeId(), null);
|
||||
// } else {
|
||||
// return getSIAccountService(user).welfareData4Htjs(param.getSalaryMonth(), null, null, param.getSchemeId());
|
||||
// }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue