编辑保存+退休记录表修改
This commit is contained in:
parent
edd61e2e88
commit
fb0b42001e
|
|
@ -415,6 +415,10 @@ public class SyncOrganizationPersonInfo implements EsbServerlessRpcRemoteInterfa
|
|||
log.error("SyncOrganizationPersonInfo444.formdata:{}", formdata);
|
||||
cleanUpTime(employeeCustomize_new);
|
||||
employeeCustomize_new.remove("hiredate");
|
||||
employeeCustomize_new.remove("ID");
|
||||
employeeCustomize_new.remove("FORM_DATA_ID");
|
||||
employeeCustomize_new.remove("id");
|
||||
employeeCustomize_new.remove("form_data_id");
|
||||
employeeCustomize_new.entrySet().removeIf(entry -> entry.getValue() == null);
|
||||
//更新数据到基础信息表的自定义表
|
||||
log.error("SyncOrganizationPersonInfo555.employeeCustomize_new:{}", employeeCustomize_new);
|
||||
|
|
@ -470,6 +474,10 @@ public class SyncOrganizationPersonInfo implements EsbServerlessRpcRemoteInterfa
|
|||
log.error("SyncOrganizationPersonInfo777.FORM_DATA:{}", FORM_DATA);
|
||||
cleanUpTime(userInfoCustomize_new);
|
||||
userInfoCustomize_new.remove("hiredate");
|
||||
userInfoCustomize_new.remove("ID");
|
||||
userInfoCustomize_new.remove("FORM_DATA_ID");
|
||||
userInfoCustomize_new.remove("id");
|
||||
userInfoCustomize_new.remove("form_data_id");
|
||||
userInfoCustomize_new.entrySet().removeIf(entry -> entry.getValue() == null);
|
||||
log.error("SyncOrganizationPersonInfo888.userInfoCustomize_new:{}", userInfoCustomize_new);
|
||||
if(StringUtils.isNotBlank(FORM_DATA)){
|
||||
|
|
|
|||
|
|
@ -912,7 +912,7 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
|
|||
// log.error("getRosterInfoByDateRange.employeeInformationTx:{}", employeeInformationTx);
|
||||
//存在
|
||||
//先按日期关联查询出员工信息
|
||||
List<Map<String, Object>> retirementInfo = queryResignationInfo(employee_informationName, ebTableTxName,employeeType_name, stratDate, endDate,subCompany,department);
|
||||
List<Map<String, Object>> retirementInfo = queryRetirementInfo(employee_informationName, ebTableTxName,employeeType_name, stratDate, endDate,subCompany,department);
|
||||
// 使用流API进行分组和筛选
|
||||
List<Map<String, Object>> retirementInfoNew = retirementInfo.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
|
|
@ -1147,7 +1147,7 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 关联离职/退休信息记录查询
|
||||
* 关联离职记录查询
|
||||
* @param tableNameOne
|
||||
* @param tableNameTow
|
||||
* @param startDate
|
||||
|
|
@ -1155,12 +1155,43 @@ public class EmployeeRelationServiceImpl implements EmployeeRelationService {
|
|||
* @return
|
||||
*/
|
||||
private List<Map<String, Object>> queryResignationInfo(String tableNameOne,String tableNameTow,String tableNameThree,String startDate,String endDate,String subCompany,String department){
|
||||
String sql = "select a.id,a.username,a.hiredate,a.mobile,a.email,a.job_num,a.yglx,a.subcompany,a.department,a.position,a.superior,a.zhgzr " +
|
||||
String sql = "select a.id,a.username,a.hiredate,a.mobile,a.email,a.job_num,a.yglx,g.lzqgs,g.lzqbm,g.lzqgw,g.lzqzjsj,g.zhgzr " +
|
||||
" b.yglxmc,c.name subcompanyName,d.name departmentName,e.name positionName,f.username superiorName " +
|
||||
" from " + tableNameOne + " a left join "+tableNameThree+" b on a.yglx = b.id left join eteams.department c on a.subcompany = c.id" +
|
||||
" left join eteams.department d on a.department = d.id left join eteams.position e on a.position = e.id " +
|
||||
" left join eteams.employee f on a.superior = f.id " +
|
||||
" left join " + tableNameTow + " g on a.glyg=g.glyg where a.zhgzr >='" + startDate + "' and a.hiredate <='" + endDate + "' " +
|
||||
" from " + tableNameOne + " a left join "+tableNameThree+" b on a.yglx = b.id left join eteams.department c on g.lzqgs = c.id" +
|
||||
" left join eteams.department d on g.lzqbm = d.id left join eteams.position e on g.lzqgw = e.id " +
|
||||
" left join eteams.employee f on g.lzqzjsj = f.id " +
|
||||
" left join " + tableNameTow + " g on a.glyg=g.glyg where g.zhgzr >='" + startDate + "' and g.rzrq <='" + endDate + "' " +
|
||||
" and a.delete_type=0 and g.delete_type = 0";
|
||||
if (StringUtils.isNotBlank(subCompany)) {
|
||||
String s = splitStr(subCompany);
|
||||
sql += " and c.name in (" + s+ " ) ";
|
||||
}
|
||||
if (StringUtils.isNotBlank(department)) {
|
||||
String s = splitStr(department);
|
||||
sql += " and d.name in (" + s+ ") ";
|
||||
}
|
||||
log.error("queryResignationInfo.sql:{}", sql);
|
||||
Map<String, Object> rs = databaseUtils.execute("LOGIC", "weaver-ebuilder-form-service", sql);
|
||||
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(rs);
|
||||
log.error("queryResignationInfo.recordList:{}", recordList);
|
||||
return recordList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联退休信息记录查询
|
||||
* @param tableNameOne
|
||||
* @param tableNameTow
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
private List<Map<String, Object>> queryRetirementInfo(String tableNameOne,String tableNameTow,String tableNameThree,String startDate,String endDate,String subCompany,String department){
|
||||
String sql = "select a.id,a.username,a.hiredate,a.mobile,a.email,a.job_num,a.yglx,g.txqgs,g.txqbm,g.txqgw,g.txqsj,g.zhgzr " +
|
||||
" b.yglxmc,c.name subcompanyName,d.name departmentName,e.name positionName,f.username superiorName " +
|
||||
" from " + tableNameOne + " a left join "+tableNameThree+" b on a.yglx = b.id left join eteams.department c on g.txqgs = c.id" +
|
||||
" left join eteams.department d on g.txqbm = d.id left join eteams.position e on g.txqgw = e.id " +
|
||||
" left join eteams.employee f on g.txqsj = f.id " +
|
||||
" left join " + tableNameTow + " g on a.glyg=g.glyg where g.zhgzr >='" + startDate + "' and a.hiredate <='" + endDate + "' " +
|
||||
" and a.delete_type=0 and g.delete_type = 0";
|
||||
if (StringUtils.isNotBlank(subCompany)) {
|
||||
String s = splitStr(subCompany);
|
||||
|
|
|
|||
Loading…
Reference in New Issue