修复福利核算
This commit is contained in:
parent
8e69159900
commit
3ced92cfc5
|
|
@ -39,7 +39,6 @@ import com.engine.salary.service.TaxAgentService;
|
|||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
|
|
@ -89,6 +88,7 @@ public class SIAccountBiz extends Service {
|
|||
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
|
||||
return SqlProxyHandle.getProxy(InsuranceAccountDetailMapper.class);
|
||||
}
|
||||
|
||||
private SIAccountUtilMapper getSIAccountUtilMapper() {
|
||||
return MapperProxyFactory.getProxy(SIAccountUtilMapper.class);
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ public class SIAccountBiz extends Service {
|
|||
Long paymentOrganization = param.getPaymentOrganization();
|
||||
// List<Long> employeeIds = getInsuranceAccountDetailMapper().selectAccountIds(SalaryDateUtil.getMonthBegin(param.getBillMonth()), paymentOrganization);
|
||||
List<Long> employeeIds = getInsuranceAccountDetailMapper().selectEmpByPaymentOrg(paymentOrganization);
|
||||
employeeIds = employeeIds.stream().filter(employeeIdsInTaxAgent::contains).collect(Collectors.toList());
|
||||
employeeIds = employeeIds.stream().filter(employeeIdsInTaxAgent::contains).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(employeeIds)) {
|
||||
List<InsuranceAccountBatchPO> list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), paymentOrganization));
|
||||
SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
|
||||
|
|
@ -211,20 +211,23 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
//过滤不在扣缴义务人下的数据
|
||||
Collection<Long> employeeIdsInTaxAgent = getTaxAgentService().listEmployeeIdsInTaxAgent(param.getPaymentOrganization());
|
||||
empIds= empIds.stream().filter(employeeIdsInTaxAgent::contains).collect(Collectors.toList());
|
||||
empIds = empIds.stream().filter(employeeIdsInTaxAgent::contains).collect(Collectors.toList());
|
||||
|
||||
List<InsuranceArchivesSocialSchemePO> socials = siArchivesBiz.getSocialByEmployeeIds(empIds);
|
||||
List<Long> emp1 = socials.stream().filter(s -> StringUtils.isBlank(s.getSocialEndTime()) || (SalaryDateUtil.stringToDate(s.getSocialEndTime()) != null && SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").compareTo(SalaryDateUtil.stringToDate(s.getSocialEndTime())) <= 0))
|
||||
List<Long> emp1 = socials.stream()
|
||||
// .filter(s -> StringUtils.isBlank(s.getSocialEndTime()) || (SalaryDateUtil.stringToDate(s.getSocialEndTime()) != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getSocialEndTime() + "-01"))))
|
||||
.map(InsuranceArchivesSocialSchemePO::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<InsuranceArchivesFundSchemePO> funds = siArchivesBiz.getFundByEmployeeIds(empIds);
|
||||
List<Long> emp2 = funds.stream().filter(s -> StringUtils.isBlank(s.getFundEndTime()) || (SalaryDateUtil.stringToDate(s.getFundEndTime()) != null && SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").compareTo(SalaryDateUtil.stringToDate(s.getFundEndTime())) <= 0))
|
||||
List<Long> emp2 = funds.stream()
|
||||
// .filter(s -> StringUtils.isBlank(s.getFundEndTime()) || (SalaryDateUtil.stringToDate(s.getFundEndTime()) != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getFundEndTime() + "-01"))))
|
||||
.map(InsuranceArchivesFundSchemePO::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<InsuranceArchivesOtherSchemePO> others = siArchivesBiz.getOtherByEmployeeIds(empIds);
|
||||
List<Long> emp3 = others.stream().filter(s -> StringUtils.isBlank(s.getOtherEndTime()) || (SalaryDateUtil.stringToDate(s.getOtherEndTime()) != null && SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").compareTo(SalaryDateUtil.stringToDate(s.getOtherEndTime())) <= 0))
|
||||
List<Long> emp3 = others.stream()
|
||||
// .filter(s -> StringUtils.isBlank(s.getOtherEndTime()) || (SalaryDateUtil.stringToDate(s.getOtherEndTime()) != null && !SalaryDateUtil.stringToDate(param.getBillMonth() + "-01").after(SalaryDateUtil.stringToDate(s.getOtherEndTime() + "-01"))))
|
||||
.map(InsuranceArchivesOtherSchemePO::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
validIds.addAll(emp1);
|
||||
|
|
@ -428,11 +431,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算其他的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (otherPerson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (otherPerson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> otherPer = new ArrayList<>();
|
||||
Map<String, String> otherPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -462,11 +468,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算其他的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (otherCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (otherCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -511,11 +520,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算公积金的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (fundperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (fundperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> fundPer = new ArrayList<>();
|
||||
Map<String, String> fundPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -545,11 +557,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算公积金的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (fundCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (fundCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -595,11 +610,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (schemeperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (schemeperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -628,11 +646,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -974,11 +995,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算其他的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (otherPerson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (otherPerson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> otherPer = new ArrayList<>();
|
||||
Map<String, String> otherPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -1009,11 +1033,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算其他的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (otherCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (otherCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -1058,11 +1085,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算公积金的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (fundperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (fundperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> fundPer = new ArrayList<>();
|
||||
Map<String, String> fundPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -1092,11 +1122,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算公积金的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (fundCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (fundCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -1141,11 +1174,13 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (schemeperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
archivesPerson.forEach((id, value) -> {
|
||||
if (schemeperson.containsKey(Long.valueOf(id))) {
|
||||
needArchivesPerson.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -1175,11 +1210,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -1224,11 +1262,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesPerson = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 个人
|
||||
List<Long> needArchivesPerson = new ArrayList<>();
|
||||
categoryIds.forEach(item -> {
|
||||
if (archivesPerson.containsKey(String.valueOf(item)) && schemeperson.containsKey(item)) {
|
||||
needArchivesPerson.add(item);
|
||||
}
|
||||
});
|
||||
if(archivesPerson!=null){
|
||||
categoryIds.forEach(item -> {
|
||||
if (archivesPerson.containsKey(String.valueOf(item)) && schemeperson.containsKey(item)) {
|
||||
needArchivesPerson.add(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> socialPer = new ArrayList<>();
|
||||
Map<String, String> socialPerJsonMap = new HashMap<>();
|
||||
needArchivesPerson.stream().forEach(e -> {
|
||||
|
|
@ -1258,11 +1299,14 @@ public class SIAccountBiz extends Service {
|
|||
HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
//需要核算社保的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
if(archivesCom!=null){
|
||||
archivesCom.forEach((id, value) -> {
|
||||
if (schemeCom.containsKey(Long.valueOf(id))) {
|
||||
needArchivesCom.add(Long.valueOf(id));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
|
|
@ -1631,20 +1675,22 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
/**
|
||||
* 查询台账id是否已经薪资核算核算过
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public int checkIfBusinessaccounting(InsuranceAccountBatchPO param){
|
||||
public int checkIfBusinessaccounting(InsuranceAccountBatchPO param) {
|
||||
|
||||
return getSIAccountUtilMapper().checkIfBusinessaccounting(param.getId()).get(0).getNum();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新薪资台账
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public void updateById(InsuranceAccountBatchPO param){
|
||||
public void updateById(InsuranceAccountBatchPO param) {
|
||||
getInsuranceAccountBatchMapper().updateById(param);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,4 +81,9 @@ public class SalaryArchiveListDTO {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date payEndDate;
|
||||
|
||||
/**
|
||||
* 是否人在扣缴义务人下
|
||||
*/
|
||||
private String isInTaxAgent;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,21 +114,30 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if(fundJson!=null){
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if(otherJson!=null){
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -164,21 +173,30 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if(fundJson!=null){
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if(otherJson!=null){
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -214,21 +232,30 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if(fundJson!=null){
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if(otherJson!=null){
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -307,23 +334,32 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
InsuranceArchivesSocialSchemePO social = item.getSocial();
|
||||
if (social != null && StringUtils.isNotBlank(social.getSocialPaymentBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(social.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
InsuranceArchivesFundSchemePO fund = item.getFund();
|
||||
if (fund != null && StringUtils.isNotBlank(fund.getFundPaymentBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(fund.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if(fundJson!=null){
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
InsuranceArchivesOtherSchemePO other = item.getOther();
|
||||
if (other != null && StringUtils.isNotBlank(other.getOtherPaymentBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(other.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if(otherJson!=null){
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -73,9 +73,11 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("socialSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getSocialSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
record.put("fundPayOrg", item.getFundPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getFundPayOrg(),TaxAgent.builder().build())).getName());
|
||||
record.put("fundAccount", item.getFundAccount());
|
||||
|
|
@ -83,42 +85,60 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
||||
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
record.put("otherPayOrg", item.getOtherPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getOtherPayOrg(),TaxAgent.builder().build())).getName());
|
||||
record.put("otherSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getOtherSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getSocialPerJson())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("socialPerSum", SalaryEntityUtil.thousandthConvert(item.getSocialPerSum()));
|
||||
if (StringUtils.isNotEmpty(item.getFundPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(fundPerJson!=null){
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundPerSum", SalaryEntityUtil.thousandthConvert(item.getFundPerSum()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(fundPerJson!=null){
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherPer", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherPerSum", SalaryEntityUtil.thousandthConvert(item.getOtherPerSum()));
|
||||
record.put("perSum", SalaryEntityUtil.thousandthConvert(item.getPerSum()));
|
||||
if (StringUtils.isNotEmpty(item.getSocialComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, Object>().getClass());
|
||||
if(fundPerJson!=null){
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "socialCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "socialCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
|
|
@ -126,16 +146,22 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("socialComSum", SalaryEntityUtil.thousandthConvert(item.getSocialComSum()));
|
||||
if (StringUtils.isNotEmpty(item.getFundComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(fundPerJson!=null){
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundComSum", SalaryEntityUtil.thousandthConvert(item.getFundComSum()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
if(fundPerJson!=null){
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherCom", SalaryEntityUtil.thousandthConvert((String) v));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherComSum", SalaryEntityUtil.thousandthConvert(item.getOtherComSum()));
|
||||
record.put("comSum", SalaryEntityUtil.thousandthConvert(item.getComSum()));
|
||||
|
|
|
|||
|
|
@ -663,6 +663,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
if (StringUtils.isNotEmpty(item.getOtherComJson())) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, Object>().getClass());
|
||||
if (fundComJson!=null){
|
||||
|
||||
}
|
||||
fundComJson.forEach((k, v) -> {
|
||||
record.put(k + "otherCom", v);
|
||||
});
|
||||
|
|
@ -790,93 +793,111 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
comSum = comSum.add(comSumItem);
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialPerMap.get(insuranceId) == null) {
|
||||
socialPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (socialJson!=null){
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialPerMap.get(insuranceId) == null) {
|
||||
socialPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialComMap.get(insuranceId) == null) {
|
||||
socialComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (socialJson!=null){
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (socialComMap.get(insuranceId) == null) {
|
||||
socialComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundPerMap.get(insuranceId) == null) {
|
||||
fundPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = fundPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
fundPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (fundJson!=null){
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundPerMap.get(insuranceId) == null) {
|
||||
fundPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = fundPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
fundPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundComMap.get(insuranceId) == null) {
|
||||
fundComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = fundComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
fundComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (fundJson!=null){
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (fundComMap.get(insuranceId) == null) {
|
||||
fundComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = fundComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
fundComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherPerMap.get(insuranceId) == null) {
|
||||
otherPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = otherPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
otherPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (otherJson!=null){
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherPerMap.get(insuranceId) == null) {
|
||||
otherPerMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = otherPerMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
otherPerMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherComMap.get(insuranceId) == null) {
|
||||
otherComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = otherComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
otherComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
if (otherJson!=null){
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (otherComMap.get(insuranceId) == null) {
|
||||
otherComMap.put(insuranceId, num);
|
||||
} else {
|
||||
String oldNum = otherComMap.get(insuranceId);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
otherComMap.put(insuranceId, insuanceNum.toPlainString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerMap));
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ import static com.engine.salary.enums.UserStatusEnum.getDefaultLabelByValue;
|
|||
* @Date 2022/4/18
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class SIExportServiceImpl extends Service implements SIExportService {
|
||||
public class SIExportServiceImpl extends Service implements SIExportService {
|
||||
|
||||
private SIAccountBiz siAccountBiz = new SIAccountBiz();
|
||||
|
||||
private SISchemeService getSISchemeService(User user) {
|
||||
return ServiceUtil.getService(SISchemeServiceImpl.class,user);
|
||||
return ServiceUtil.getService(SISchemeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
|
||||
//获取扣缴义务人信息
|
||||
List<TaxAgent> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel( 100341, "该租户无扣缴义务人"));
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(100341, "该租户无扣缴义务人"));
|
||||
Map<Long, TaxAgent> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgent::getId, Function.identity()));
|
||||
List<InsuranceAccountViewListDTO> insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap);
|
||||
|
||||
|
|
@ -72,14 +72,14 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "社保福利档案");
|
||||
// 2.表头
|
||||
String[] header = {
|
||||
SalaryI18nUtil.getI18nLabel( 93270, "缴纳组织"),
|
||||
SalaryI18nUtil.getI18nLabel( 93272, "社保人数"),
|
||||
SalaryI18nUtil.getI18nLabel( 93273, "公积金人数"),
|
||||
SalaryI18nUtil.getI18nLabel( 93274, "其他福利人数"),
|
||||
SalaryI18nUtil.getI18nLabel( 93275, "社保缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel( 93276, "公积金缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel( 93277, "其他福利缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel( 93278, "合计")};
|
||||
SalaryI18nUtil.getI18nLabel(93270, "缴纳组织"),
|
||||
SalaryI18nUtil.getI18nLabel(93272, "社保人数"),
|
||||
SalaryI18nUtil.getI18nLabel(93273, "公积金人数"),
|
||||
SalaryI18nUtil.getI18nLabel(93274, "其他福利人数"),
|
||||
SalaryI18nUtil.getI18nLabel(93275, "社保缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel(93276, "公积金缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel(93277, "其他福利缴费合计"),
|
||||
SalaryI18nUtil.getI18nLabel(93278, "合计")};
|
||||
excelSheetData.add(Arrays.asList(header));
|
||||
|
||||
//工作簿数据
|
||||
|
|
@ -104,7 +104,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
|
||||
@Override
|
||||
public XSSFWorkbook exportAccount(Integer paymentStatus, InsuranceExportParam param) {
|
||||
List<AccountExportPO> accountExportPOS = MapperProxyFactory.getProxy(InsuranceExportMapper.class).exportAccount(paymentStatus, param.getBillMonth(),param.getPaymentOrganization());
|
||||
List<AccountExportPO> accountExportPOS = MapperProxyFactory.getProxy(InsuranceExportMapper.class).exportAccount(paymentStatus, param.getBillMonth(), param.getPaymentOrganization());
|
||||
AccountExportPOEncrypt.decryptAccountExportPOList(accountExportPOS);
|
||||
List<WeaTableColumn> columns = new ArrayList<>();
|
||||
List<Map<String, Object>> records = new ArrayList<>();
|
||||
|
|
@ -112,7 +112,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
columns = buildCommonColumns(accountExportPOS, false);
|
||||
}
|
||||
if (PaymentStatusEnum.REPAIR.getValue() == paymentStatus) {
|
||||
columns = buildCommonColumns(accountExportPOS, true);
|
||||
columns = buildCommonColumns(accountExportPOS, true);
|
||||
}
|
||||
records = buildCommonRecords(accountExportPOS);
|
||||
List<List<Object>> excelSheetData = new ArrayList<>();
|
||||
|
|
@ -137,7 +137,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
List<TaxAgent> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel( 100341, "该租户无扣缴义务人"));
|
||||
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(100341, "该租户无扣缴义务人"));
|
||||
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
|
||||
Map<Long, TaxAgent> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgent::getId, Function.identity()));
|
||||
list.forEach(item -> {
|
||||
|
|
@ -150,15 +150,18 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("mobile", item.getTelephone());
|
||||
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel( from.getLabelId(), from.getDefaultLabel()));
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
|
||||
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
|
||||
record.put("socialAccount", item.getSocialAccount());
|
||||
record.put("socialSchemeName", schemeIdNameMap.get(item.getSocialSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", v);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
|
||||
record.put("fundAccount", item.getFundAccount());
|
||||
|
|
@ -166,59 +169,83 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
||||
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", v);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherPayOrg", paymentMap.get(item.getOtherPayOrg()) == null ? "" : paymentMap.get(item.getOtherPayOrg()).getName());
|
||||
record.put("otherSchemeName", schemeIdNameMap.get(item.getOtherSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", v);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getSocialPerJson())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, Object>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialPer", v);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialPer", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("socialPerSum", item.getSocialPerSum());
|
||||
if (StringUtils.isNotEmpty(item.getFundPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundPer", v);
|
||||
});
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundPer", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundPerSum", item.getFundPerSum());
|
||||
if (StringUtils.isNotEmpty(item.getOtherPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherPer", v);
|
||||
});
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherPer", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherPerSum", item.getOtherPerSum());
|
||||
record.put("perSum", item.getPerSum());
|
||||
if (StringUtils.isNotEmpty(item.getSocialComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "socialCom", v);
|
||||
});
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "socialCom", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("socialComSum", item.getSocialComSum());
|
||||
if (StringUtils.isNotEmpty(item.getFundComJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundCom", v);
|
||||
});
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "fundCom", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("fundComSum", item.getFundComSum());
|
||||
if (StringUtils.isNotEmpty(item.getOtherPerJson())) {
|
||||
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, Object>().getClass());
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherCom", v);
|
||||
});
|
||||
if (fundPerJson != null) {
|
||||
fundPerJson.forEach((k, v) -> {
|
||||
record.put(k + "otherCom", v);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherComSum", item.getOtherComSum());
|
||||
record.put("comSum", item.getComSum());
|
||||
|
|
@ -240,21 +267,30 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -263,19 +299,19 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(
|
||||
categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"),
|
||||
categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100289, "单位"),
|
||||
social + "socialCom");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"),
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100289, "单位"),
|
||||
social + "fundCom");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"),
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100289, "单位"),
|
||||
social + "otherCom");
|
||||
}
|
||||
});
|
||||
|
|
@ -294,21 +330,30 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -316,19 +361,19 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
Map<String, String> otherColumns = new HashMap<>();
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"),
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(87159, "个人"),
|
||||
social + "socialPer");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"),
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(87159, "个人"),
|
||||
social + "fundPer");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"),
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(87159, "个人"),
|
||||
social + "otherPer");
|
||||
}
|
||||
});
|
||||
|
|
@ -345,64 +390,64 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
Map<Integer, Map<String, String>> columns = buildPaymentTitle(pos, categoryIdNameMap);
|
||||
Map<Integer, Map<String, String>> personColumns = buildPersonalTitle(pos, categoryIdNameMap);
|
||||
Map<Integer, Map<String, String>> comColumns = buildComTitle(pos, categoryIdNameMap);
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86185, "部门"), "department"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "userName"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86185, "部门"), "department"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100377, "数据来源"), "sourceFrom"));
|
||||
if (flag) {
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100379, "补缴月份"), "supplementaryMonth"));
|
||||
}
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"), "socialPayOrg"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91324, "社保账号"), "socialAccount"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"), "socialSchemeName"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91325, "社保缴纳组织"), "socialPayOrg"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialSchemeName"));
|
||||
//组装社保基数
|
||||
columns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91488, "公积金缴纳组织"), "fundPayOrg"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91486, "公积金账号"), "fundAccount"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91485, "公积金方案名称"), "fundSchemeName"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91488, "公积金缴纳组织"), "fundPayOrg"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91486, "公积金账号"), "fundAccount"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称"), "fundSchemeName"));
|
||||
//组装公积金基数
|
||||
columns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91487, "补充公积金账号"), "supplementFundAccount"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91497, "其他福利缴纳组织"), "otherPayOrg"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91496, "其他福利方案名称"), "otherSchemeName"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号"), "supplementFundAccount"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91497, "其他福利缴纳组织"), "otherPayOrg"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称"), "otherSchemeName"));
|
||||
columns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
personColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100388, "社保个人合计"), "socialPerSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100388, "社保个人合计"), "socialPerSum"));
|
||||
personColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100390, "公积金个人合计"), "fundPerSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计"), "fundPerSum"));
|
||||
personColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100392, "其他福利个人合计"), "otherPerSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100393, "个人合计"), "perSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100392, "其他福利个人合计"), "otherPerSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100393, "个人合计"), "perSum"));
|
||||
comColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100394, "社保单位合计"), "socialComSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100394, "社保单位合计"), "socialComSum"));
|
||||
comColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100395, "公积金单位合计"), "fundComSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计"), "fundComSum"));
|
||||
comColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> {
|
||||
list.add(new WeaTableColumn("150px",k, v));
|
||||
list.add(new WeaTableColumn("150px", k, v));
|
||||
});
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100396, "其他福利单位合计"), "fundComSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100397, "单位合计"), "comSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100398, "社保合计"), "socialSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100399, "公积金合计"), "fundSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100400, "其他福利合计"), "otherSum"));
|
||||
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 93278, "合计"), "total"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计"), "fundComSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100397, "单位合计"), "comSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100398, "社保合计"), "socialSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100399, "公积金合计"), "fundSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100400, "其他福利合计"), "otherSum"));
|
||||
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(93278, "合计"), "total"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -436,21 +481,30 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
|
|
@ -458,17 +512,17 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
Map<String, String> otherColumns = new HashMap<>();
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "socialBase");
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "fundBase");
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase");
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns);
|
||||
|
|
|
|||
|
|
@ -120,11 +120,22 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
|
||||
//获取管理的人员范围
|
||||
List<TaxAgentEmployeeDTO> taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployee(currentEmployeeId);
|
||||
Set<Long> employeeId = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getEmployeeId);
|
||||
Set<Long> employeeIds = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getEmployeeId);
|
||||
|
||||
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId);
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId);
|
||||
|
||||
//获取所有薪资档案
|
||||
List<SalaryArchiveListDTO> list = getSalaryArchiveMapper().list(queryParam);
|
||||
List<SalaryArchiveListDTO> finalAllArchive = list.stream().filter(dto -> employeeId.contains(dto.getEmployeeId())).collect(Collectors.toList());
|
||||
List<SalaryArchiveListDTO> finalAllArchive = list.stream().filter(dto -> taxAgentIds.contains(dto.getTaxAgentId())).collect(Collectors.toList());
|
||||
finalAllArchive = finalAllArchive.stream().map(dto -> {
|
||||
if(employeeIds.contains(dto.getEmployeeId())){
|
||||
dto.setIsInTaxAgent("Y");
|
||||
}else {
|
||||
dto.setIsInTaxAgent("N");
|
||||
}
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
PageInfo<SalaryArchiveListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), SalaryArchiveListDTO.class);
|
||||
pageInfo.setTotal(finalAllArchive.size());
|
||||
|
|
@ -271,7 +282,15 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案");
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
|
||||
String[] header = {SalaryI18nUtil.getI18nLabel(85429, "姓名"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), SalaryI18nUtil.getI18nLabel(86185, "部门"), SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(91075, "状态")};
|
||||
String[] header = {
|
||||
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
||||
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
|
||||
SalaryI18nUtil.getI18nLabel(86185, "部门"),
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(91075, "状态"),
|
||||
SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"),
|
||||
SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")
|
||||
};
|
||||
// 2.表头
|
||||
List<Object> headerList = new ArrayList<>(Arrays.asList(header));
|
||||
for (SalaryItemPO salaryItem : salaryItems) {
|
||||
|
|
@ -302,11 +321,13 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
rows.add(headerList);
|
||||
listMaps.forEach(e -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(e.get("username").toString());
|
||||
row.add(e.get("taxAgentName").toString());
|
||||
row.add(e.get("departmentName").toString());
|
||||
row.add(e.get("mobile") == null ? "" : e.get("mobile").toString());
|
||||
row.add(e.get("employeeStatus").toString());
|
||||
row.add(Util.null2String(e.get("username")));
|
||||
row.add(Util.null2String(e.get("taxAgentName")));
|
||||
row.add(Util.null2String(e.get("departmentName")));
|
||||
row.add(Util.null2String(e.get("mobile")));
|
||||
row.add(Util.null2String(e.get("employeeStatus")));
|
||||
row.add(Util.null2String(e.get("payStartDate")));
|
||||
row.add(Util.null2String(e.get("payEndDate")));
|
||||
// 薪资项目数据
|
||||
for (SalaryItemPO salaryItem : salaryItems) {
|
||||
row.add(e.containsKey(salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX) ? (e.get(salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX) == null ? "" : e.get(salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX).toString()) : "");
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ public class SalaryArchiveWrapper extends Service {
|
|||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("pageInfo", pageInfos);
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
datas.put("salaryArchives", salaryArchives);
|
||||
return datas;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue