Compare commits
2 Commits
8fbf461cc4
...
e5a3351568
| Author | SHA1 | Date |
|---|---|---|
|
|
e5a3351568 | |
|
|
454a414666 |
|
|
@ -1,9 +1,6 @@
|
|||
package com.engine.salary.entity.siaccount.bo;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobEmpFieldDTO;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.entity.siexport.po.AccountExportPO;
|
||||
import com.engine.salary.entity.siexport.po.ExcelAccountExportPO;
|
||||
|
|
@ -18,7 +15,10 @@ import com.engine.salary.util.page.Column;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ public class InsuranceComparisonResultBO {
|
|||
*
|
||||
*/
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS
|
||||
, Map<Long, String> schemeIdNameMap, boolean welBaseDiffSign) {
|
||||
, Map<Long, String> schemeIdNameMap, boolean welBaseDiffSign, Set<Long> insuranceBaseSet) {
|
||||
|
||||
Map<Long, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId);
|
||||
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
|
||||
|
|
@ -222,38 +222,38 @@ public class InsuranceComparisonResultBO {
|
|||
}
|
||||
if (welBaseDiffSign) {
|
||||
//社保基数-个人,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1, insuranceBaseSet);
|
||||
//公积金基数-个人,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2, insuranceBaseSet);
|
||||
//其他福利基数-个人,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3, insuranceBaseSet);
|
||||
|
||||
//社保基数-公司,socialPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1, insuranceBaseSet);
|
||||
//公积金基数-公司,fundPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2, insuranceBaseSet);
|
||||
//其他福利基数-公司,otherPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3, insuranceBaseSet);
|
||||
} else {
|
||||
//社保基数,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1, insuranceBaseSet);
|
||||
//公积金基数,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2, insuranceBaseSet);
|
||||
//其他福利基数,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3, insuranceBaseSet);
|
||||
}
|
||||
//社保个人socialPerJson
|
||||
welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1, null);
|
||||
//公积金个人fundPerJson
|
||||
welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2, null);
|
||||
//其他个人otherPerJson
|
||||
welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3, null);
|
||||
//社保单位socialComJson
|
||||
welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1, null);
|
||||
//公积金单位fundComJson
|
||||
welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2, null);
|
||||
//其他单位otherComJson
|
||||
welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3, null);
|
||||
|
||||
//各种合计
|
||||
welfareSumCompare(map, accountExportPO, excelAccountExportPO);
|
||||
|
|
@ -263,9 +263,12 @@ public class InsuranceComparisonResultBO {
|
|||
return resultList;
|
||||
}
|
||||
|
||||
private static Map<String, Object> welfareElementCompare(Map<String, Object> map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType) {
|
||||
private static Map<String, Object> welfareElementCompare(Map<String, Object> map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType, Set<Long> insuranceBaseSet) {
|
||||
List<ICategoryPO> listAll = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll();
|
||||
List<ICategoryPO> accountWelfareList = listAll.stream().filter(e -> e.getWelfareType().equals(welfareType)).collect(Collectors.toList());
|
||||
if (insuranceBaseSet != null) {
|
||||
accountWelfareList = accountWelfareList.stream().filter(e -> insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
String baseTypeInfo = welfareType.equals(1) ? "social" : (welfareType.equals(2) ? "fund" : "other");
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
List<Column> weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet, welBaseDiffSign);
|
||||
//4-通过线上线下两份数据获得对比结果
|
||||
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign);
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign, insuranceBaseSet);
|
||||
|
||||
// 系统值和线下值一致的人员
|
||||
if (queryParam.isOnlyDiffEmployee()) {
|
||||
|
|
|
|||
|
|
@ -75,10 +75,12 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StopWatch;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
|
@ -3707,6 +3709,20 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
}
|
||||
page = getAuthService(user).auth(page, AuthFilterTypeEnum.DATA_OPT, InsuranceArchivesEmployeePO.class);
|
||||
|
||||
List<Long> empIds = page.stream().map(InsuranceArchivesEmployeePO::getEmployeeId).distinct().collect(Collectors.toList());
|
||||
// 路维光电二开,入职日期取自定义新增字段
|
||||
RecordSet rs = new RecordSet();
|
||||
List<List<Long>> partition = Lists.partition(empIds, 800);
|
||||
HashMap<Long, String> rzrqMap = new HashMap<>();
|
||||
partition.forEach(par -> {
|
||||
String sql = "SELECT id,field13 FROM cus_fielddata where scopeid=3 and SCOPE='HrmCustomFieldByInfoType' and id in ("+ StringUtils.join(par, ",") + ")";
|
||||
rs.execute(sql);
|
||||
while (rs.next()) {
|
||||
rzrqMap.put(SalaryEntityUtil.string2Long(rs.getString("id")), rs.getString("field13"));
|
||||
}
|
||||
});
|
||||
page.stream().forEach(emp -> emp.setCompanystartdate(Utils.null2String(rzrqMap.get(emp.getEmployeeId()))));
|
||||
|
||||
PageInfo<InsuranceArchivesEmployeePO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
|
||||
page, InsuranceArchivesEmployeePO.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alipay.oceanbase.jdbc.StringUtils;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.page.Column;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,9 +68,11 @@ import org.apache.poi.util.IOUtils;
|
|||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -468,6 +470,20 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// return map;
|
||||
// }).collect(Collectors.toList());
|
||||
Map<Long, TaxAgentPO> longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentLists, TaxAgentPO::getId);
|
||||
|
||||
// 路维光电二开,入职日期取自定义新增字段
|
||||
RecordSet rs = new RecordSet();
|
||||
List<Long> employeeIds = salaryArchives.stream().map(SalaryArchiveListDTO::getEmployeeId).distinct().collect(Collectors.toList());
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, 800);
|
||||
HashMap<Long, String> rzrqMap = new HashMap<>();
|
||||
partition.forEach(par -> {
|
||||
String sql = "SELECT id,field13 FROM cus_fielddata where scopeid=3 and SCOPE='HrmCustomFieldByInfoType' and id in ("+ StringUtils.join(par, ",") + ")";
|
||||
rs.execute(sql);
|
||||
while (rs.next()) {
|
||||
rzrqMap.put(SalaryEntityUtil.string2Long(rs.getString("id")), rs.getString("field13"));
|
||||
}
|
||||
});
|
||||
|
||||
// 3.组装数据
|
||||
List<Map<String, Object>> listMaps = new ArrayList<>();
|
||||
salaryArchives.forEach(e -> {
|
||||
|
|
@ -495,7 +511,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
map.put("employeeStatus", e.getEmployeeStatus());
|
||||
map.put("payStartDate", SalaryDateUtil.getFormatLocalDate(e.getPayStartDate()));
|
||||
map.put("payEndDate", SalaryDateUtil.getFormatLocalDate(e.getPayEndDate()));
|
||||
map.put("companystartdate", e.getCompanystartdate());
|
||||
map.put("companystartdate", Utils.null2String(rzrqMap.get(e.getEmployeeId())));
|
||||
map.put("dismissdate", e.getDismissdate());
|
||||
map.put("opts", e.getOpts());
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import org.apache.commons.lang3.math.NumberUtils;
|
|||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -208,6 +209,18 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
employeeList = employeeList.stream().filter(e -> e.getAccountType() == null || e.getAccountType() == 0).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 路维光电二开,入职日期取自定义新增字段
|
||||
RecordSet rs = new RecordSet();
|
||||
List<List<Long>> partition = Lists.partition(ids, 800);
|
||||
HashMap<Long, String> rzrqMap = new HashMap<>();
|
||||
partition.forEach(par -> {
|
||||
String sql = "SELECT id,field13 FROM cus_fielddata where scopeid=3 and SCOPE='HrmCustomFieldByInfoType' and id in ("+ StringUtils.join(par, ",") + ")";
|
||||
rs.execute(sql);
|
||||
while (rs.next()) {
|
||||
rzrqMap.put(SalaryEntityUtil.string2Long(rs.getString("id")), rs.getString("field13"));
|
||||
}
|
||||
});
|
||||
employeeList.stream().forEach(emp -> emp.setCompanystartdate(Utils.null2String(rzrqMap.get(emp.getEmployeeId()))));
|
||||
SalaryI18nUtil.i18nList(employeeList);
|
||||
return employeeList;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue