Merge remote-tracking branch 'origin/lmy20231211' into 相关方关联分公司功能

pull/4/head
zhaoyu 2023-12-14 18:48:24 +08:00
commit c972e6c9c7
2 changed files with 77 additions and 69 deletions

View File

@ -88,22 +88,24 @@ public class AppHomeController extends BaseController {
if(!Tools.isEmpty(pd.get("USER_ID"))){ if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID")); varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID")); PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (varList.size() > 0) { if (Integer.parseInt(delayedCount.getString("count")) != 0) {
boolean isDelayedExist = false; if (varList.size() > 0) {
for (PageData data : varList) { boolean isDelayedExist = false;
if (StringUtils.equals(data.getString("STATE"),"10")) isDelayedExist = true; for (PageData data : varList) {
} if (StringUtils.equals(data.getString("STATE"), "10")) isDelayedExist = true;
if (isDelayedExist) { }
for (PageData pageData : varList){ if (isDelayedExist) {
if (StringUtils.equals(pageData.getString("STATE"),"10")) { for (PageData pageData : varList) {
pageData.put("count",delayedCount.getString("count")); if (StringUtils.equals(pageData.getString("STATE"), "10")) {
pageData.put("count", delayedCount.getString("count"));
}
} }
} else {
varList.add(delayedCount);
} }
} else { } else {
varList.add(delayedCount); varList.add(delayedCount);
} }
} else {
varList.add(delayedCount);
} }
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID")); myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
} }
@ -146,22 +148,24 @@ public class AppHomeController extends BaseController {
if(!Tools.isEmpty(pd.get("USER_ID"))){ if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID")); varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID")); PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (varList.size() > 0) { if (Integer.parseInt(delayedCount.getString("count")) != 0) {
boolean isDelayedExist = false; if (varList.size() > 0) {
for (PageData data : varList) { boolean isDelayedExist = false;
if (StringUtils.equals(data.getString("STATE"),"10")) isDelayedExist = true; for (PageData data : varList) {
} if (StringUtils.equals(data.getString("STATE"), "10")) isDelayedExist = true;
if (isDelayedExist) { }
for (PageData pageData : varList){ if (isDelayedExist) {
if (StringUtils.equals(pageData.getString("STATE"),"10")) { for (PageData pageData : varList) {
pageData.put("count",delayedCount.getString("count")); if (StringUtils.equals(pageData.getString("STATE"), "10")) {
pageData.put("count", delayedCount.getString("count"));
}
} }
} else {
varList.add(delayedCount);
} }
} else { } else {
varList.add(delayedCount); varList.add(delayedCount);
} }
} else {
varList.add(delayedCount);
} }
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID")); myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
} }

View File

@ -746,42 +746,44 @@ public class AppHotWorkApplicationController extends BaseController {
} }
} }
PageData hotUser = new PageData(); PageData hotUser = new PageData();
hotUser.put("hotIds", hotIds); if (hotIds.size() > 0) {
List<PageData> hotUserAllList = hotWorkApplicationUserService.listAll(hotUser); hotUser.put("hotIds", hotIds);
for (PageData userPageData : hotUserAllList){ List<PageData> hotUserAllList = hotWorkApplicationUserService.listAll(hotUser);
String hotAndType = userPageData.getString("FOREIGN_KEY"); for (PageData userPageData : hotUserAllList){
if(hotIdKeyMap.containsKey(hotAndType)){ String hotAndType = userPageData.getString("FOREIGN_KEY");
PageData hot = varList.get(hotIdKeyMap.get(hotAndType)); if(hotIdKeyMap.containsKey(hotAndType)){
String type = userPageData.get("STATE").toString(); PageData hot = varList.get(hotIdKeyMap.get(hotAndType));
if("0".equals(type)){ // 申请办理人 String type = userPageData.get("STATE").toString();
hot.put("APPLY_DEPARTMENT_NAME",userPageData.getString("deptName")); if("0".equals(type)){ // 申请办理人
hot.put("APPLY_USER_NAME",userPageData.getString("userName")); hot.put("APPLY_DEPARTMENT_NAME",userPageData.getString("deptName"));
hot.put("APPLY_USER_ID",userPageData.getString("USER_ID")); hot.put("APPLY_USER_NAME",userPageData.getString("userName"));
}else if("1".equals(type)){ //动火单位负责人 hot.put("APPLY_USER_ID",userPageData.getString("USER_ID"));
hot.put("HOT_WORK_UNIT_LEADER_NAME",userPageData.getString("userName")); }else if("1".equals(type)){ //动火单位负责人
hot.put("HOT_WORK_UNIT_LEADER_ID",userPageData.getString("USER_ID")); hot.put("HOT_WORK_UNIT_LEADER_NAME",userPageData.getString("userName"));
}else if("2".equals(type)){ // 项目发包单位负责人 hot.put("HOT_WORK_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
hot.put("PROJECT_UNIT_LEADER_NAME",userPageData.getString("userName")); }else if("2".equals(type)){ // 项目发包单位负责人
hot.put("PROJECT_UNIT_LEADER_ID",userPageData.getString("USER_ID")); hot.put("PROJECT_UNIT_LEADER_NAME",userPageData.getString("userName"));
}else if("3".equals(type)){ // 现场管辖单位负责人 hot.put("PROJECT_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
hot.put("UNIT_LEADER_NAME",userPageData.getString("userName")); }else if("3".equals(type)){ // 现场管辖单位负责人
hot.put("UNIT_LEADER_ID",userPageData.getString("USER_ID")); hot.put("UNIT_LEADER_NAME",userPageData.getString("userName"));
}else if("5".equals(type)){ // 动火前 负责人 hot.put("UNIT_LEADER_ID",userPageData.getString("USER_ID"));
hot.put("HOT_WORK_BEFORE_UNIT_LEADER",userPageData.getString("userName")); }else if("5".equals(type)){ // 动火前 负责人
}else if("6".equals(type)){ // 现场负责人 hot.put("HOT_WORK_BEFORE_UNIT_LEADER",userPageData.getString("userName"));
hot.put("SITE_LEADER_NAME",userPageData.getString("userName")); }else if("6".equals(type)){ // 现场负责人
hot.put("SITE_LEADER_PHONE",userPageData.getString("userPhone")); hot.put("SITE_LEADER_NAME",userPageData.getString("userName"));
}else if("7".equals(type)){ // 动火后 负责人 hot.put("SITE_LEADER_PHONE",userPageData.getString("userPhone"));
hot.put("HOT_WORK_AFTER_UNIT_LEADER",userPageData.getString("userName")); }else if("7".equals(type)){ // 动火后 负责人
} else if("11".equals(type)){ // 特级动火 申请人 hot.put("HOT_WORK_AFTER_UNIT_LEADER",userPageData.getString("userName"));
hot.put("DEPARTMENT_PERSONNEL_NAME",userPageData.getString("userName")); } else if("11".equals(type)){ // 特级动火 申请人
hot.put("DEPARTMENT_PERSONNEL_ID",userPageData.getString("USER_ID")); hot.put("DEPARTMENT_PERSONNEL_NAME",userPageData.getString("userName"));
}else if("20".equals(type)){ // 特级动火 申请人 hot.put("DEPARTMENT_PERSONNEL_ID",userPageData.getString("USER_ID"));
hot.put("SUPERVISOR_OF_HOT_WORK_UNIT",userPageData.getString("USER_ID")); }else if("20".equals(type)){ // 特级动火 申请人
}else if("21".equals(type)){ // 动火后 负责人 hot.put("SUPERVISOR_OF_HOT_WORK_UNIT",userPageData.getString("USER_ID"));
String userName = userPageData.getString("userName2") +","; }else if("21".equals(type)){ // 动火后 负责人
String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString(); String userName = userPageData.getString("userName2") +",";
hot.put("HOT_WORK_OPERATOR_NAME",oldName + userName); String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString();
hot.put("HOT_WORK_OPERATOR_NAME",oldName + userName);
}
} }
} }
} }
@ -1361,22 +1363,24 @@ public class AppHotWorkApplicationController extends BaseController {
if(!Tools.isEmpty(pd.get("USER_ID"))){ if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID")); varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID")); PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (varList.size() > 0) { if (Integer.parseInt(delayedCount.getString("count")) != 0) {
boolean isDelayedExist = false; if (varList.size() > 0) {
for (PageData data : varList) { boolean isDelayedExist = false;
if (StringUtils.equals(data.getString("STATE"),"10")) isDelayedExist = true; for (PageData data : varList) {
} if (StringUtils.equals(data.getString("STATE"),"10")) isDelayedExist = true;
if (isDelayedExist) { }
for (PageData pageData : varList){ if (isDelayedExist) {
if (StringUtils.equals(pageData.getString("STATE"),"10")) { for (PageData pageData : varList){
pageData.put("count",delayedCount.getString("count")); if (StringUtils.equals(pageData.getString("STATE"),"10")) {
pageData.put("count",delayedCount.getString("count"));
}
} }
} else {
varList.add(delayedCount);
} }
} else { } else {
varList.add(delayedCount); varList.add(delayedCount);
} }
} else {
varList.add(delayedCount);
} }
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID")); myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
} }