万德隆 动态薪资标准
This commit is contained in:
parent
8399c61020
commit
3a1417b6a1
|
|
@ -1360,16 +1360,23 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
.distinct()
|
||||
.map(Long::valueOf)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, String> positionMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).listPositionInfo(gwIdList), PositionInfo::getId, PositionInfo::getName);
|
||||
Map<Integer, String> positionMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).listPositionInfo(gwIdList), positionInfo -> positionInfo.getId().intValue(), PositionInfo::getName);
|
||||
|
||||
// 查询所有岗位职级信息
|
||||
rs.execute("select id,zj from uf_gwzjb");
|
||||
Map<String, String> gwzjMap = new HashMap<>();
|
||||
while (rs.next()) {
|
||||
int id = rs.getInt("id");
|
||||
String zj = rs.getString("zj");
|
||||
gwzjMap.put(String.valueOf(id), zj);
|
||||
}
|
||||
List<Map<String, Object>> valueList = new ArrayList<>();
|
||||
for (WdlGzjgDTO dto : wdlGzjgDTOList) {
|
||||
Map<String, Object> singleValueMap = new HashMap<>();
|
||||
singleValueMap.put("lb" ,lbValueMap.getOrDefault(dto.getLb(), ""));
|
||||
singleValueMap.put("bgdd" ,locationValueMap.getOrDefault(dto.getBgdd(), ""));
|
||||
singleValueMap.put("gwmc" ,positionMap.getOrDefault(dto.getGwmc(), ""));
|
||||
// TODO 岗位职级标准要转换一下
|
||||
singleValueMap.put("gwzj" ,dto.getGwzj());
|
||||
singleValueMap.put("gwzj" ,gwzjMap.getOrDefault(dto.getGwzj(), ""));
|
||||
singleValueMap.put("gzsp" ,dto.getGzsp());
|
||||
List<WdlGzjgDtPO> detailList = dto.getDetailList();
|
||||
Map<String, Integer> detailJeMap = SalaryEntityUtil.convert2Map(detailList, WdlGzjgDtPO::getXzxm, WdlGzjgDtPO::getJe);
|
||||
|
|
@ -1546,6 +1553,14 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
String value = rs.getString("locationname");
|
||||
locationValueMap.put(value, id);
|
||||
}
|
||||
// 查询岗位职级信息
|
||||
rs.execute("select id,zj from uf_gwzjb");
|
||||
Map <String, Integer> gwzjValueMap = new HashMap<>();
|
||||
while (rs.next()) {
|
||||
Integer id = rs.getInt("id");
|
||||
String value = rs.getString("zj");
|
||||
gwzjValueMap.put(value, id);
|
||||
}
|
||||
// 查询岗位名称信息
|
||||
Map<String, Long> positionMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).listAllPositionInfo(), PositionInfo::getName, PositionInfo::getId);
|
||||
|
||||
|
|
@ -1637,9 +1652,16 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
}
|
||||
}
|
||||
} else if (StringUtils.equals("岗位职级", dataKey) ) {
|
||||
// todo
|
||||
if (StringUtils.isNotBlank(dataValue)) {
|
||||
|
||||
Integer gwzjValue = gwzjValueMap.get(dataValue);
|
||||
if (gwzjValue == null) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + "岗位职级信息不存在");
|
||||
excelComments.add(errorMessageMap);
|
||||
} else {
|
||||
mainData.setGwzj(String.valueOf(gwzjValue));
|
||||
}
|
||||
}
|
||||
} else if (salaryItemNameMap.containsKey(dataKey) && salaryItemNameMap.get(dataKey) != null) {
|
||||
WdlGzjgDtPO detail = WdlGzjgDtPO.builder()
|
||||
|
|
@ -1682,12 +1704,21 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
* 标准工资结构表 数据复制到历史标准工资结构表
|
||||
*/
|
||||
private void copyWdlReport2HistoryData() {
|
||||
String dateStr = SalaryDateUtil.getFormatLocalDate(new Date()).replace("-", "").replace(" ", "");
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute("select distinct(lsbb) from uf_bzgzjgbls");
|
||||
int lsh = 1;
|
||||
while (rs.next()) {
|
||||
String lsbb = rs.getString("lsbb");
|
||||
if (StringUtils.isNotBlank(lsbb) && lsbb.contains(dateStr)) {
|
||||
lsh++;
|
||||
}
|
||||
}
|
||||
rs.execute("select id,lb,bgdd,gwmc,gwzj,gzsp,mxbmr,gwzj1 from uf_bzgzjgb");
|
||||
List<WdlGzjgDTO> mainList = new ArrayList<>();
|
||||
|
||||
String dateStr = SalaryDateUtil.getFormatLocalDateTime(new Date()).replace("-", "").replace(":", "").replace(" ", "");
|
||||
String lsbb = StringUtils.substring(dateStr, 0, 12);
|
||||
|
||||
String lsbb = dateStr + String.format("%04d", lsh);;
|
||||
while (rs.next()) {
|
||||
WdlGzjgDTO wdlGzjgDTO = new WdlGzjgDTO();
|
||||
wdlGzjgDTO.setId(rs.getInt("id"));
|
||||
|
|
@ -1725,7 +1756,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
List<List<WdlGzjgDTO>> partition = Lists.partition(mainList, 500);
|
||||
partition.forEach(part -> {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("insert into uf_bzgzjgbls_temp(formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,id,lb,bgdd,gwmc,gwzj,gzsp,mxbmr,gwzj1,lsbb) values ");
|
||||
sb.append("insert into uf_bzgzjgbls(formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,id,lb,bgdd,gwmc,gwzj,gzsp,lsbb) values ");
|
||||
for (WdlGzjgDTO data : part) {
|
||||
sb.append("(")
|
||||
.append(modeId).append(",1,0,").append(currDate).append(",").append(currTime).append(",")
|
||||
|
|
@ -1735,8 +1766,8 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
.append(data.getGwmc()).append(",'")
|
||||
.append(data.getGwzj()).append("',")
|
||||
.append(data.getGzsp()).append(",'")
|
||||
.append(data.getMxbmr()).append("','")
|
||||
.append(data.getGwzj1()).append("','")
|
||||
// .append(data.getMxbmr()).append("','")
|
||||
// .append(data.getGwzj1()).append("','")
|
||||
.append(data.getLsbb()).append("'),");
|
||||
}
|
||||
boolean execute = rs.execute(sb.substring(0, sb.length() - 1).toString());
|
||||
|
|
@ -1752,7 +1783,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
List<List<WdlGzjgDtPO>> partition = Lists.partition(detailList, 500);
|
||||
partition.forEach(part -> {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("insert into uf_bzgzjgbls_temp_dt1(id,mainid,xzxm,je) values ");
|
||||
sb.append("insert into uf_bzgzjgbls_dt1(id,mainid,xzxm,je) values ");
|
||||
for (WdlGzjgDtPO data : part) {
|
||||
sb.append("(")
|
||||
.append(data.getId()).append(",")
|
||||
|
|
|
|||
Loading…
Reference in New Issue