路维光电入职日期调整
This commit is contained in:
parent
8fbf461cc4
commit
454a414666
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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