|
|
|
@ -158,8 +158,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
* 隐患图片 ,隐患视频 自己通过上传附件上传,暂时不处理
|
|
|
|
|
*/
|
|
|
|
|
/** 缺少必填参数:RISK_UNIT IDENTIFICATION RISK_POSITION 暂存 */
|
|
|
|
|
String serl = "SOURCE,HIDDENDESCR,DISCOVERYTIME,RECTIFICATIONTYPE,HIDDENLEVEL," +
|
|
|
|
|
"HIDDENTYPE,ISRELEVANT";
|
|
|
|
|
String serl = "SOURCE,HIDDENDESCR,DISCOVERYTIME,RECTIFICATIONTYPE,HIDDENLEVEL," + "HIDDENTYPE,ISRELEVANT";
|
|
|
|
|
|
|
|
|
|
if ("2".equals(pd.getString("SOURCE")) || "6".equals(pd.getString("SOURCE"))) {//如果是清单检查,需要填入其他必填项
|
|
|
|
|
// serl +=",RISK_UNIT,IDENTIFICATION,RISK_DESCR,RISK_POSITION,LEVEL,CHECK_CONTENT";
|
|
|
|
@ -192,15 +191,15 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
/** 处理 隐患 部位的方法 .如果用户填入的隐患部位是输入的 */
|
|
|
|
|
if ("value".equals(pd.getString("hiddenPartType"))) {
|
|
|
|
|
PageData hiddenRegion = hiddenRegionService.saveHidden(pd.getString("HIDDENPART"));
|
|
|
|
|
pd.put("saveHidden",JSON.toJSONString(hiddenRegion));
|
|
|
|
|
pd.put("saveHidden", JSON.toJSONString(hiddenRegion));
|
|
|
|
|
pd.put("HIDDENPART", hiddenRegion.getString("HIDDENREGION_ID"));
|
|
|
|
|
}
|
|
|
|
|
/** 隐患的主要负责人 一条隐患 多个隐患发现人 ,把多个信息填入这个张表中 */
|
|
|
|
|
PageData saveRectificationo = hiddenUserApiService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", Jurisdiction.getUSER_ID());
|
|
|
|
|
pd.put("saveRectificationo",JSON.toJSONString(saveRectificationo));
|
|
|
|
|
pd.put("saveRectificationo", JSON.toJSONString(saveRectificationo));
|
|
|
|
|
/** 初始化隐患确认信息 记录隐患发现人的隐患等级等信息 */
|
|
|
|
|
PageData saveConfirm = hiddenExamineApiService.saveConfirm(pd, "0");
|
|
|
|
|
pd.put("saveConfirm",JSON.toJSONString(saveConfirm));
|
|
|
|
|
pd.put("saveConfirm", JSON.toJSONString(saveConfirm));
|
|
|
|
|
/* 隐患的立即整改 填入整改信息,其他的信息是一样的 */
|
|
|
|
|
if ("1".equals(pd.getString("RECTIFICATIONTYPE"))) {
|
|
|
|
|
pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间
|
|
|
|
@ -222,7 +221,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
pd.put("CONFIRM_USER", longinfoUserDept.getString("HEADMAN"));//通过名字查询用户获取出ID
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
pd.put("saveApi",JSON.toJSONString(pd));
|
|
|
|
|
pd.put("saveApi", JSON.toJSONString(pd));
|
|
|
|
|
hiddenApiService.saveApi(pd);
|
|
|
|
|
/* 发送隐患的通知公告 */
|
|
|
|
|
Map<String, Object> notRepr = new HashMap<>();
|
|
|
|
@ -233,8 +232,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
notRepr.put("params2", "隐患确认");//
|
|
|
|
|
}
|
|
|
|
|
notRepr.put("params3", "确认");//
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", Jurisdiction.getCORPINFO_ID(), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"),
|
|
|
|
|
pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", "");
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", Jurisdiction.getCORPINFO_ID(), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"), pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", "");
|
|
|
|
|
/**
|
|
|
|
|
* 可以为空的
|
|
|
|
|
* POSITIONDESC 隐患位置描述
|
|
|
|
@ -250,7 +248,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
map.put("result", errInfo);
|
|
|
|
|
map.put("pd", pd);
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -372,8 +370,6 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
map.put("hImgs", imgMapListAll.get("3"));// 隐患图片
|
|
|
|
|
map.put("rImgs", imgMapListAll.get("4"));// 整改图片
|
|
|
|
|
map.put("fcImgs", imgMapListAll.get("50"));// 安全环保检查验收图片
|
|
|
|
@ -438,8 +434,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
code = hiddenApiService.goEmis(pd);
|
|
|
|
|
return ResultCodeConstant.resMap(code); //隐患走到这就完成了
|
|
|
|
|
}
|
|
|
|
|
if ("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL")) ||
|
|
|
|
|
"1".equals(hidden.get("RECTIFICATIONTYPE").toString())) {
|
|
|
|
|
if ("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL")) || "1".equals(hidden.get("RECTIFICATIONTYPE").toString())) {
|
|
|
|
|
// 如果是忽略隐患 或者是立即整改
|
|
|
|
|
pd.put("STATE", "4");
|
|
|
|
|
// 隐患状态修改成整改完成
|
|
|
|
@ -459,25 +454,21 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
} else {
|
|
|
|
|
pd.put("STATE", "1");
|
|
|
|
|
}
|
|
|
|
|
// 4 2 无整改人
|
|
|
|
|
hidden.put("HIDDENLEVEL",HIDDENLEVEL);
|
|
|
|
|
hidden.put("RECTIFICATIONOR",RECTIFICATIONOR);
|
|
|
|
|
hidden.put("RECTIFICATIONDEADLINE",RECTIFICATIONDEADLINE);
|
|
|
|
|
hidden.put("RECTIFICATIONDEPT",RECTIFICATIONDEPT);
|
|
|
|
|
// 4 2 无整改人
|
|
|
|
|
hidden.put("HIDDENLEVEL", HIDDENLEVEL);
|
|
|
|
|
hidden.put("RECTIFICATIONOR", RECTIFICATIONOR);
|
|
|
|
|
hidden.put("RECTIFICATIONDEADLINE", RECTIFICATIONDEADLINE);
|
|
|
|
|
hidden.put("RECTIFICATIONDEPT", RECTIFICATIONDEPT);
|
|
|
|
|
PageData pageData = hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程
|
|
|
|
|
pd.put("pageData", JSON.toJSONString(pageData));
|
|
|
|
|
PageData confirm = hiddenApiService.confirmHidden(pd); //确认
|
|
|
|
|
pd.put("confirm", JSON.toJSONString(confirm));
|
|
|
|
|
if (Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")) {
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改",
|
|
|
|
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
|
|
|
|
hidden.getString("HIDDENDESCR"), "隐患整改", "整改", "", "");
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "隐患整改", "整改", "", "");
|
|
|
|
|
} else if ("1".equals(hidden.getString("RECTIFICATIONTYPE"))) {
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_003", "友情提示:有一条隐患已验收",
|
|
|
|
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
|
|
|
|
hidden.getString("HIDDENDESCR"), "通过", "整改", "", "");
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_003", "友情提示:有一条隐患已验收", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "通过", "整改", "", "");
|
|
|
|
|
}
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -519,14 +510,12 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
before.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
|
|
|
|
before.put("REPULSE_CAUSE", pd.getString("REJECTOPINION"));
|
|
|
|
|
before = hiddenExamineApiService.save(before);
|
|
|
|
|
pd.put("before",JSON.toJSONString(before));
|
|
|
|
|
pd.put("before", JSON.toJSONString(before));
|
|
|
|
|
List<PageData> hiddenUserList = hiddenUserApiService.getListByHiddenId(pd.getString("HIDDEN_ID"));
|
|
|
|
|
for (PageData pageData : hiddenUserList) {
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患被打回",
|
|
|
|
|
Jurisdiction.getCORPINFO_ID(), pageData.getString("USER_ID"), pd.getString("HIDDEN_ID"),
|
|
|
|
|
pd.getString("HIDDENDESCR"), "上报", "查看", "", "");
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患被打回", Jurisdiction.getCORPINFO_ID(), pageData.getString("USER_ID"), pd.getString("HIDDEN_ID"), pd.getString("HIDDENDESCR"), "上报", "查看", "", "");
|
|
|
|
|
}
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -573,8 +562,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
PageData hidden = hiddenApiService.findById(pd); //获取隐患信息
|
|
|
|
|
/** 整改,修改隐患信息 **/
|
|
|
|
|
int hiddenupdateSate = hiddenApiService.rectify(pd.getString("HIDDEN_ID"), pd.getString("RECTIFYDESCR"),
|
|
|
|
|
pd.getString("RECTIFICATIONTIME"), pd.getString("HAVESCHEME"), pd.getString("INVESTMENT_FUNDS"));
|
|
|
|
|
int hiddenupdateSate = hiddenApiService.rectify(pd.getString("HIDDEN_ID"), pd.getString("RECTIFYDESCR"), pd.getString("RECTIFICATIONTIME"), pd.getString("HAVESCHEME"), pd.getString("INVESTMENT_FUNDS"));
|
|
|
|
|
map.put("hiddenupdateSate", hiddenupdateSate);
|
|
|
|
|
if ("1".equals(pd.getString("HAVESCHEME"))) { //如果有整改方案 添加上整改方案
|
|
|
|
|
pd.put("HIDDENSCHEME_ID", this.get32UUID());
|
|
|
|
@ -589,7 +577,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
/** 隐患验收信息 **/
|
|
|
|
|
PageData hiddenCheck = hiddenCheckApiService.saveHiddenCheck(pd.getString("CHECKOR"), pd.getString("CHECKDEPT"), pd.getString("OTHER"), pd.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"));
|
|
|
|
|
pd.put("hiddenCheck",JSON.toJSONString(hiddenCheck));
|
|
|
|
|
pd.put("hiddenCheck", JSON.toJSONString(hiddenCheck));
|
|
|
|
|
/** 隐患延时申请的要通过 **/
|
|
|
|
|
PageData exam = hiddenExamineApiService.saveRectify(pd.getString("HIDDEN_ID")); //添加隐患整改记录
|
|
|
|
|
pd.put("exam", JSON.toJSONString(exam));
|
|
|
|
@ -600,7 +588,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
map.put("hiddenCheckState", hiddenCheck.get("retint"));
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -614,8 +602,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
@RequiresPermissions("hidden:list")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@DockAnnotation(isAdd = true)
|
|
|
|
|
public Object
|
|
|
|
|
unableRectify() throws Exception {
|
|
|
|
|
public Object unableRectify() throws Exception {
|
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
|
Integer code = 000000;
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
@ -647,10 +634,8 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
examine.put("OPERATOR", Jurisdiction.getUSER_ID());
|
|
|
|
|
examine.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
|
|
|
|
examine = hiddenExamineApiService.save(examine);
|
|
|
|
|
pd.put("examine",JSON.toJSONString(examine));
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核",
|
|
|
|
|
hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"),
|
|
|
|
|
hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", "");
|
|
|
|
|
pd.put("examine", JSON.toJSONString(examine));
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核", hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", "");
|
|
|
|
|
map.put("msg", "隐患特殊处理申请成功。请通知隐患确认人进行特殊处理确认操作!");
|
|
|
|
|
|
|
|
|
|
/** 暂时没有整理 **/
|
|
|
|
@ -671,7 +656,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
inspection.put("HIDDEN_vector", pd.getString("HIDDEN_ID"));
|
|
|
|
|
noticeUtil.SE_ThreeStepUtil(inspection);
|
|
|
|
|
}
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -723,12 +708,10 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
examine.put("DISPOSAL_FILE", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
|
|
|
|
}
|
|
|
|
|
examine = hiddenExamineApiService.save(examine);
|
|
|
|
|
pd.put("examine",JSON.toJSONString(examine));
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核",
|
|
|
|
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
|
|
|
|
hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", "");
|
|
|
|
|
pd.put("examine", JSON.toJSONString(examine));
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", "");
|
|
|
|
|
map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!");
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -777,7 +760,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
if (Jurisdiction.getUSER_ID().equals(pageData.getString("USER_ID"))) {
|
|
|
|
|
check = pageData;
|
|
|
|
|
PageData exampd = hiddenCheckApiService.checkHidden(pd.getString("HIDDEN_ID"), pageData.getString("HIDDENCHECK_ID"), pd.getString("CHECKDESCR"), pd.getString("CHECK_TIME"), Jurisdiction.getDEPARTMENT_ID(), Jurisdiction.getUSER_ID());
|
|
|
|
|
hiddenCheckMap.put("exampd"+count, JSON.toJSONString(exampd));
|
|
|
|
|
hiddenCheckMap.put("exampd" + count, JSON.toJSONString(exampd));
|
|
|
|
|
count++;
|
|
|
|
|
checkCount++; //本次的++
|
|
|
|
|
}
|
|
|
|
@ -829,14 +812,12 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
|
|
|
|
/** 记录打回 **/
|
|
|
|
|
PageData exam = hiddenExamineApiService.saveRepulseCheck(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"));
|
|
|
|
|
pd.put("exam",JSON.toJSONString(exam));
|
|
|
|
|
pd.put("exam", JSON.toJSONString(exam));
|
|
|
|
|
/** 给隐患整改人发送站内信**/
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回",
|
|
|
|
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
|
|
|
|
hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", "");
|
|
|
|
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回", hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", "");
|
|
|
|
|
}
|
|
|
|
|
map.put("check", check);
|
|
|
|
|
map.put("dockData",JSON.toJSONString(pd));
|
|
|
|
|
map.put("dockData", JSON.toJSONString(pd));
|
|
|
|
|
return ResultCodeConstant.resMap(code, map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -856,26 +837,26 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
// 增加隐患整改部门查询 开始
|
|
|
|
|
if(StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))){
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
if (StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))) {
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(pd.getString("RECTIFICATIONDEPT"), url);
|
|
|
|
|
List<String> departmentIds = new ArrayList<>();
|
|
|
|
|
departmentIds.add(pd.getString("RECTIFICATIONDEPT"));
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
departmentIds.add(department.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
pd.put("departmentIds",departmentIds);
|
|
|
|
|
pd.put("departmentIds", departmentIds);
|
|
|
|
|
}
|
|
|
|
|
// 增加发现整改部门查询 开始
|
|
|
|
|
if(StringUtils.isNotBlank(pd.getString("creatorUserDept"))){
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
if (StringUtils.isNotBlank(pd.getString("creatorUserDept"))) {
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(pd.getString("creatorUserDept"), url);
|
|
|
|
|
List<String> departmentIds = new ArrayList<>();
|
|
|
|
|
departmentIds.add(pd.getString("creatorUserDept"));
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
departmentIds.add(department.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
pd.put("creatorUserDepts",departmentIds);
|
|
|
|
|
pd.put("creatorUserDepts", departmentIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 增加隐患发现部门查询 结束
|
|
|
|
@ -959,141 +940,145 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**导出某一个选中项到excel
|
|
|
|
|
/**
|
|
|
|
|
* 导出某一个选中项到excel
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/excelSummary")
|
|
|
|
|
@RequestMapping(value = "/excelSummary")
|
|
|
|
|
// @RequiresPermissions("toExcel")
|
|
|
|
|
public ModelAndView excelSummary() throws Exception{
|
|
|
|
|
public ModelAndView excelSummary() throws Exception {
|
|
|
|
|
ModelAndView mv = new ModelAndView();
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
|
|
List<String> titles = new ArrayList<String>();
|
|
|
|
|
titles.add("月份"); //1
|
|
|
|
|
titles.add("数量(公司)"); //2
|
|
|
|
|
titles.add("已完成(公司)"); //3
|
|
|
|
|
titles.add("完成率(公司)"); //4
|
|
|
|
|
titles.add("数量(装船部)"); //5
|
|
|
|
|
titles.add("已完成(装船部)"); //6
|
|
|
|
|
titles.add("完成率(装船部)"); //7
|
|
|
|
|
titles.add("数量(卸车部)"); //8
|
|
|
|
|
titles.add("已完成(卸车部)"); //9
|
|
|
|
|
titles.add("完成率(卸车部)"); //10
|
|
|
|
|
titles.add("数量(生产保障部)"); //11
|
|
|
|
|
titles.add("已完成(生产保障部)"); //12
|
|
|
|
|
titles.add("完成率(生产保障部)"); //13
|
|
|
|
|
titles.add("数量(其他部)"); //14
|
|
|
|
|
titles.add("已完成(其他部)"); //15
|
|
|
|
|
titles.add("完成率(其他部)"); //16
|
|
|
|
|
titles.add("月份"); //1
|
|
|
|
|
titles.add("数量(公司)"); //2
|
|
|
|
|
titles.add("已完成(公司)"); //3
|
|
|
|
|
titles.add("完成率(公司)"); //4
|
|
|
|
|
titles.add("数量(装船部)"); //5
|
|
|
|
|
titles.add("已完成(装船部)"); //6
|
|
|
|
|
titles.add("完成率(装船部)"); //7
|
|
|
|
|
titles.add("数量(卸车部)"); //8
|
|
|
|
|
titles.add("已完成(卸车部)"); //9
|
|
|
|
|
titles.add("完成率(卸车部)"); //10
|
|
|
|
|
titles.add("数量(生产保障部)"); //11
|
|
|
|
|
titles.add("已完成(生产保障部)"); //12
|
|
|
|
|
titles.add("完成率(生产保障部)"); //13
|
|
|
|
|
titles.add("数量(其他部)"); //14
|
|
|
|
|
titles.add("已完成(其他部)"); //15
|
|
|
|
|
titles.add("完成率(其他部)"); //16
|
|
|
|
|
dataMap.put("titles", titles);
|
|
|
|
|
List<PageData> dataList = hiddenApiService.goSummaryTable(pd);
|
|
|
|
|
List<PageData> varOList = hiddenApiService.dealData(dataList);
|
|
|
|
|
ArrayList<PageData> varList = new ArrayList<>();
|
|
|
|
|
for(int i=0;i<varOList.size();i++){
|
|
|
|
|
for (int i = 0; i < varOList.size(); i++) {
|
|
|
|
|
PageData vpd = new PageData();
|
|
|
|
|
vpd.put("var1", varOList.get(i).getString("MONTH")); //1
|
|
|
|
|
vpd.put("var2", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_ALL")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_ALL")); //2
|
|
|
|
|
vpd.put("var3", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_ALL")) ? "0" : varOList.get(i).getString("REVISED_COUNT_ALL")); //3
|
|
|
|
|
vpd.put("var4", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_ALL")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_ALL")); //4
|
|
|
|
|
vpd.put("var5", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_ONE")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_ONE")); //5
|
|
|
|
|
vpd.put("var6", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_ONE")) ? "0" : varOList.get(i).getString("REVISED_COUNT_ONE")); //6
|
|
|
|
|
vpd.put("var7", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_ONE")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_ONE")); //7
|
|
|
|
|
vpd.put("var8", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_TWO")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_TWO")); //8
|
|
|
|
|
vpd.put("var9", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_TWO")) ? "0" : varOList.get(i).getString("REVISED_COUNT_TWO")); //9
|
|
|
|
|
vpd.put("var10", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_TWO")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_TWO")); //10
|
|
|
|
|
vpd.put("var11", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_THREE")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_THREE")); //11
|
|
|
|
|
vpd.put("var12", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_THREE")) ? "0" : varOList.get(i).getString("REVISED_COUNT_THREE")); //12
|
|
|
|
|
vpd.put("var13", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_THREE")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_THREE")); //13
|
|
|
|
|
vpd.put("var14", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_OTHER")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_OTHER")); //14
|
|
|
|
|
vpd.put("var15", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_OTHER")) ? "0" : varOList.get(i).getString("REVISED_COUNT_OTHER")); //15
|
|
|
|
|
vpd.put("var16", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_OTHER")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_OTHER")); //16
|
|
|
|
|
vpd.put("var1", varOList.get(i).getString("MONTH")); //1
|
|
|
|
|
vpd.put("var2", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_ALL")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_ALL")); //2
|
|
|
|
|
vpd.put("var3", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_ALL")) ? "0" : varOList.get(i).getString("REVISED_COUNT_ALL")); //3
|
|
|
|
|
vpd.put("var4", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_ALL")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_ALL")); //4
|
|
|
|
|
vpd.put("var5", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_ONE")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_ONE")); //5
|
|
|
|
|
vpd.put("var6", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_ONE")) ? "0" : varOList.get(i).getString("REVISED_COUNT_ONE")); //6
|
|
|
|
|
vpd.put("var7", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_ONE")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_ONE")); //7
|
|
|
|
|
vpd.put("var8", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_TWO")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_TWO")); //8
|
|
|
|
|
vpd.put("var9", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_TWO")) ? "0" : varOList.get(i).getString("REVISED_COUNT_TWO")); //9
|
|
|
|
|
vpd.put("var10", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_TWO")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_TWO")); //10
|
|
|
|
|
vpd.put("var11", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_THREE")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_THREE")); //11
|
|
|
|
|
vpd.put("var12", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_THREE")) ? "0" : varOList.get(i).getString("REVISED_COUNT_THREE")); //12
|
|
|
|
|
vpd.put("var13", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_THREE")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_THREE")); //13
|
|
|
|
|
vpd.put("var14", Tools.isEmpty(varOList.get(i).getString("TOTAL_COUNT_OTHER")) ? "0" : varOList.get(i).getString("TOTAL_COUNT_OTHER")); //14
|
|
|
|
|
vpd.put("var15", Tools.isEmpty(varOList.get(i).getString("REVISED_COUNT_OTHER")) ? "0" : varOList.get(i).getString("REVISED_COUNT_OTHER")); //15
|
|
|
|
|
vpd.put("var16", Tools.isEmpty(varOList.get(i).getString("COMPLERATE_OTHER")) ? "0.00%" : varOList.get(i).getString("COMPLERATE_OTHER")); //16
|
|
|
|
|
varList.add(vpd);
|
|
|
|
|
}
|
|
|
|
|
dataMap.put("varList", varList);
|
|
|
|
|
dataMap.put("filename","安全隐患汇总表");
|
|
|
|
|
dataMap.put("filename", "安全隐患汇总表");
|
|
|
|
|
ObjectExcelView erv = new ObjectExcelView();
|
|
|
|
|
mv = new ModelAndView(erv,dataMap);
|
|
|
|
|
mv = new ModelAndView(erv, dataMap);
|
|
|
|
|
return mv;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**导出某一个选中项到excel
|
|
|
|
|
/**
|
|
|
|
|
* 导出某一个选中项到excel
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value="/excelDetailedList")
|
|
|
|
|
@RequestMapping(value = "/excelDetailedList")
|
|
|
|
|
// @RequiresPermissions("toExcel")
|
|
|
|
|
public ModelAndView excelDetailedList() throws Exception{
|
|
|
|
|
public ModelAndView excelDetailedList() throws Exception {
|
|
|
|
|
ModelAndView mv = new ModelAndView();
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
|
|
List<String> titles = new ArrayList<String>();
|
|
|
|
|
titles.add("序号"); //1
|
|
|
|
|
titles.add("隐患类型"); //2
|
|
|
|
|
titles.add("等级"); //3
|
|
|
|
|
titles.add("隐患位置"); //4
|
|
|
|
|
titles.add("隐患简要情况"); //5
|
|
|
|
|
titles.add("整改治理措施"); //6
|
|
|
|
|
titles.add("发现隐患日期"); //7
|
|
|
|
|
titles.add("整改完成时限"); //8
|
|
|
|
|
titles.add("整改责任部门"); //9
|
|
|
|
|
titles.add("整改责任人"); //10
|
|
|
|
|
titles.add("整改督办人"); //11
|
|
|
|
|
titles.add("投入资金(元)"); //12
|
|
|
|
|
titles.add("复查时间"); //13
|
|
|
|
|
titles.add("复查人"); //14
|
|
|
|
|
titles.add("检查人员"); //15
|
|
|
|
|
titles.add("序号"); //1
|
|
|
|
|
titles.add("隐患类型"); //2
|
|
|
|
|
titles.add("等级"); //3
|
|
|
|
|
titles.add("隐患位置"); //4
|
|
|
|
|
titles.add("隐患简要情况"); //5
|
|
|
|
|
titles.add("整改治理措施"); //6
|
|
|
|
|
titles.add("发现隐患日期"); //7
|
|
|
|
|
titles.add("整改完成时限"); //8
|
|
|
|
|
titles.add("整改责任部门"); //9
|
|
|
|
|
titles.add("整改责任人"); //10
|
|
|
|
|
titles.add("整改督办人"); //11
|
|
|
|
|
titles.add("投入资金(元)"); //12
|
|
|
|
|
titles.add("复查时间"); //13
|
|
|
|
|
titles.add("复查人"); //14
|
|
|
|
|
titles.add("检查人员"); //15
|
|
|
|
|
dataMap.put("titles", titles);
|
|
|
|
|
// 增加隐患整改部门查询 开始
|
|
|
|
|
if(StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))){
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
if (StringUtils.isNotBlank(pd.getString("RECTIFICATIONDEPT"))) {
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(pd.getString("RECTIFICATIONDEPT"), url);
|
|
|
|
|
List<String> departmentIds = new ArrayList<>();
|
|
|
|
|
departmentIds.add(pd.getString("RECTIFICATIONDEPT"));
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
departmentIds.add(department.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
pd.put("departmentIds",departmentIds);
|
|
|
|
|
pd.put("departmentIds", departmentIds);
|
|
|
|
|
}
|
|
|
|
|
// 增加发现整改部门查询 开始
|
|
|
|
|
if(StringUtils.isNotBlank(pd.getString("creatorUserDept"))){
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
if (StringUtils.isNotBlank(pd.getString("creatorUserDept"))) {
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(pd.getString("creatorUserDept"), url);
|
|
|
|
|
List<String> departmentIds = new ArrayList<>();
|
|
|
|
|
departmentIds.add(pd.getString("creatorUserDept"));
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
departmentIds.add(department.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
pd.put("creatorUserDepts",departmentIds);
|
|
|
|
|
pd.put("creatorUserDepts", departmentIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<PageData> varOList = hiddenApiService.listForExcel(pd);
|
|
|
|
|
List<PageData> varList = new ArrayList<PageData>();
|
|
|
|
|
for(int i=0;i<varOList.size();i++){
|
|
|
|
|
for (int i = 0; i < varOList.size(); i++) {
|
|
|
|
|
PageData vpd = new PageData();
|
|
|
|
|
vpd.put("var1", i + 1); //1
|
|
|
|
|
vpd.put("var2", Tools.isEmpty(varOList.get(i).getString("type1Name")) ? "" : varOList.get(i).getString("type1Name")); //2
|
|
|
|
|
vpd.put("var3", Tools.isEmpty(varOList.get(i).getString("levelName")) ? "" : varOList.get(i).getString("levelName")); //3
|
|
|
|
|
vpd.put("var4", Tools.isEmpty(varOList.get(i).getString("POSITIONDESC")) ? "" : varOList.get(i).getString("POSITIONDESC")); //4
|
|
|
|
|
vpd.put("var5", Tools.isEmpty(varOList.get(i).getString("HIDDENDESCR")) ? "" : varOList.get(i).getString("HIDDENDESCR")); //5
|
|
|
|
|
vpd.put("var6", Tools.isEmpty(varOList.get(i).getString("RECTIFYDESCR")) ? "" : varOList.get(i).getString("RECTIFYDESCR")); //6
|
|
|
|
|
vpd.put("var7", Tools.isEmpty(varOList.get(i).getString("DISCOVERYTIME")) ? "" : varOList.get(i).getString("DISCOVERYTIME")); //7
|
|
|
|
|
vpd.put("var8", Tools.isEmpty(varOList.get(i).getString("RECTIFICATIONDEADLINE")) ? "" : varOList.get(i).getString("RECTIFICATIONDEADLINE")); //8
|
|
|
|
|
vpd.put("var9", Tools.isEmpty(varOList.get(i).getString("zgUserDeptName")) ? "" : varOList.get(i).getString("zgUserDeptName")); //9
|
|
|
|
|
vpd.put("var10", Tools.isEmpty(varOList.get(i).getString("zgUserName")) ? "" : varOList.get(i).getString("zgUserName")); //10
|
|
|
|
|
vpd.put("var11", Tools.isEmpty(varOList.get(i).getString("conUsername")) ? "" : varOList.get(i).getString("conUsername")); //11
|
|
|
|
|
vpd.put("var12", Tools.isEmpty(varOList.get(i).getString("INVESTMENT_FUNDS")) ? "" : varOList.get(i).getString("INVESTMENT_FUNDS")); //12
|
|
|
|
|
vpd.put("var13", Tools.isEmpty(varOList.get(i).getString("CHECK_TIME")) ? "" : varOList.get(i).getString("CHECK_TIME")+" 已完成"); //13
|
|
|
|
|
vpd.put("var14", Tools.isEmpty(varOList.get(i).getString("revieworName")) ? "" : varOList.get(i).getString("revieworName")); //14
|
|
|
|
|
vpd.put("var15", Tools.isEmpty(varOList.get(i).getString("INSPECTION_USER")) ? varOList.get(i).getString("CREATER_NAME") : varOList.get(i).getString("INSPECTION_USER")); //15
|
|
|
|
|
vpd.put("var1", i + 1); //1
|
|
|
|
|
vpd.put("var2", Tools.isEmpty(varOList.get(i).getString("type1Name")) ? "" : varOList.get(i).getString("type1Name")); //2
|
|
|
|
|
vpd.put("var3", Tools.isEmpty(varOList.get(i).getString("levelName")) ? "" : varOList.get(i).getString("levelName")); //3
|
|
|
|
|
vpd.put("var4", Tools.isEmpty(varOList.get(i).getString("POSITIONDESC")) ? "" : varOList.get(i).getString("POSITIONDESC")); //4
|
|
|
|
|
vpd.put("var5", Tools.isEmpty(varOList.get(i).getString("HIDDENDESCR")) ? "" : varOList.get(i).getString("HIDDENDESCR")); //5
|
|
|
|
|
vpd.put("var6", Tools.isEmpty(varOList.get(i).getString("RECTIFYDESCR")) ? "" : varOList.get(i).getString("RECTIFYDESCR")); //6
|
|
|
|
|
vpd.put("var7", Tools.isEmpty(varOList.get(i).getString("DISCOVERYTIME")) ? "" : varOList.get(i).getString("DISCOVERYTIME")); //7
|
|
|
|
|
vpd.put("var8", Tools.isEmpty(varOList.get(i).getString("RECTIFICATIONDEADLINE")) ? "" : varOList.get(i).getString("RECTIFICATIONDEADLINE")); //8
|
|
|
|
|
vpd.put("var9", Tools.isEmpty(varOList.get(i).getString("zgUserDeptName")) ? "" : varOList.get(i).getString("zgUserDeptName")); //9
|
|
|
|
|
vpd.put("var10", Tools.isEmpty(varOList.get(i).getString("zgUserName")) ? "" : varOList.get(i).getString("zgUserName")); //10
|
|
|
|
|
vpd.put("var11", Tools.isEmpty(varOList.get(i).getString("conUsername")) ? "" : varOList.get(i).getString("conUsername")); //11
|
|
|
|
|
vpd.put("var12", Tools.isEmpty(varOList.get(i).getString("INVESTMENT_FUNDS")) ? "" : varOList.get(i).getString("INVESTMENT_FUNDS")); //12
|
|
|
|
|
vpd.put("var13", Tools.isEmpty(varOList.get(i).getString("CHECK_TIME")) ? "" : varOList.get(i).getString("CHECK_TIME") + " 已完成"); //13
|
|
|
|
|
vpd.put("var14", Tools.isEmpty(varOList.get(i).getString("revieworName")) ? "" : varOList.get(i).getString("revieworName")); //14
|
|
|
|
|
vpd.put("var15", Tools.isEmpty(varOList.get(i).getString("INSPECTION_USER")) ? varOList.get(i).getString("CREATER_NAME") : varOList.get(i).getString("INSPECTION_USER")); //15
|
|
|
|
|
varList.add(vpd);
|
|
|
|
|
}
|
|
|
|
|
dataMap.put("varList", varList);
|
|
|
|
|
dataMap.put("filename","隐患治理清单");
|
|
|
|
|
dataMap.put("filename", "隐患治理清单");
|
|
|
|
|
ObjectExcelView erv = new ObjectExcelView();
|
|
|
|
|
mv = new ModelAndView(erv,dataMap);
|
|
|
|
|
mv = new ModelAndView(erv, dataMap);
|
|
|
|
|
return mv;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1182,23 +1167,17 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
List<String> imgKeyId = new ArrayList<>();// 需要查询图片的id标识信息
|
|
|
|
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id
|
|
|
|
|
String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(KEYWORDS))
|
|
|
|
|
pd.put("KEYWORDS", KEYWORDS.trim());
|
|
|
|
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
|
|
|
|
String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(ISQUALIFIED))
|
|
|
|
|
pd.put("ISQUALIFIED", ISQUALIFIED.trim());
|
|
|
|
|
if (Tools.notEmpty(ISQUALIFIED)) pd.put("ISQUALIFIED", ISQUALIFIED.trim());
|
|
|
|
|
String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(HIDDENLEVELE))
|
|
|
|
|
pd.put("HIDDENLEVELE", HIDDENLEVELE.trim());
|
|
|
|
|
if (Tools.notEmpty(HIDDENLEVELE)) pd.put("HIDDENLEVELE", HIDDENLEVELE.trim());
|
|
|
|
|
String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(STARTTIME))
|
|
|
|
|
pd.put("STARTTIME", STARTTIME.trim());
|
|
|
|
|
if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME.trim());
|
|
|
|
|
String STATE = pd.getString("STATE"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(STATE))
|
|
|
|
|
pd.put("STATE", STATE.trim());
|
|
|
|
|
if (Tools.notEmpty(STATE)) pd.put("STATE", STATE.trim());
|
|
|
|
|
String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(ENDTIME))
|
|
|
|
|
pd.put("ENDTIME", ENDTIME + " 23:59:59");
|
|
|
|
|
if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME + " 23:59:59");
|
|
|
|
|
String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件
|
|
|
|
|
if (Tools.notEmpty(DISPOSESTATE)) {
|
|
|
|
|
pd.put("DISPOSESTATE", DISPOSESTATE.trim());
|
|
|
|
@ -1206,8 +1185,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件
|
|
|
|
|
if (IS_SELF != null && IS_SELF.equals("1"))
|
|
|
|
|
pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID());
|
|
|
|
|
if (IS_SELF != null && IS_SELF.equals("1")) pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID());
|
|
|
|
|
// 查看隐患信息
|
|
|
|
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
|
|
|
|
if (!Jurisdiction.getIS_MAIN().equals("1")) { //主账号
|
|
|
|
@ -1255,8 +1233,7 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
List<PageData> imgList = imgFilesService.listAllByIds(imgpd2);
|
|
|
|
|
|
|
|
|
|
Map<String, Integer> imgCount = new HashMap<>();
|
|
|
|
|
Integer imgTypeMaxCount1 = 1, imgTypeMaxCount2 = 1, imgTypeMaxCount3 = 1, imgTypeMaxCount4 = 1,
|
|
|
|
|
imgTypeMaxCount5 = 1, imgTypeMaxCount6 = 1, imgTypeMaxCount7 = 1, imgTypeMaxCount8 = 1;
|
|
|
|
|
Integer imgTypeMaxCount1 = 1, imgTypeMaxCount2 = 1, imgTypeMaxCount3 = 1, imgTypeMaxCount4 = 1, imgTypeMaxCount5 = 1, imgTypeMaxCount6 = 1, imgTypeMaxCount7 = 1, imgTypeMaxCount8 = 1;
|
|
|
|
|
|
|
|
|
|
Map<String, List<String>> imgMap = new HashMap<>();
|
|
|
|
|
for (int i = 0; i < imgList.size(); i++) {
|
|
|
|
@ -1485,39 +1462,59 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询隐患统计表
|
|
|
|
|
*
|
|
|
|
|
* @param response
|
|
|
|
|
* @return
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/getCountSelect")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object getCountSelect(HttpServletResponse response) throws Exception {
|
|
|
|
|
public Object getCountSelect(HttpServletResponse response) throws Exception {
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
//这里进入开始获取数据阶段 首先拿到所有部门数据
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(Jurisdiction.getCORPINFO_ID(), url);
|
|
|
|
|
//装船部 zcb id集合 89f3d30c4031432da53b75bed442ced8
|
|
|
|
|
List<String> zcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//保障部 bzb id集合 fcae9cc13a354be699d85d6aea3b3450
|
|
|
|
|
List<String> bzbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> bzbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//卸车部 xcb id集合 aad337cf728b4cc2b63e210caf4e185f
|
|
|
|
|
List<String> xcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> xcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
//0716 新加 机设部298b9a63ea704485913c5185545b4c66
|
|
|
|
|
List<String> mechanicalDepartmentIds = new ArrayList<>();
|
|
|
|
|
// 业务部599d9bfcf6c44cb0bc553b1b766aebc5
|
|
|
|
|
List<String> businessDepartmentIds = new ArrayList<>();
|
|
|
|
|
// 综合办公室31e47797873d4dd3abdbeb0d99a1f138
|
|
|
|
|
List<String> generalOfficeDepartmentIds = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//安监部 ajb id集合 4c4b7bc93e3347978f5a3e1f0c4a0b56
|
|
|
|
|
List<String> ajbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> ajbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//开始处理数据 扔进对应结合中
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
if(StringUtils.equals("89f3d30c4031432da53b75bed442ced8",department.getDEPARTMENT_ID())){
|
|
|
|
|
zcbdepartmentIds = getIdsList(department,zcbdepartmentIds);
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
if (StringUtils.equals("89f3d30c4031432da53b75bed442ced8", department.getDEPARTMENT_ID())) {
|
|
|
|
|
zcbdepartmentIds = getIdsList(department, zcbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450",department.getDEPARTMENT_ID())){
|
|
|
|
|
bzbdepartmentIds = getIdsList(department,bzbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450", department.getDEPARTMENT_ID())) {
|
|
|
|
|
bzbdepartmentIds = getIdsList(department, bzbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f",department.getDEPARTMENT_ID())){
|
|
|
|
|
xcbdepartmentIds = getIdsList(department,xcbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f", department.getDEPARTMENT_ID())) {
|
|
|
|
|
xcbdepartmentIds = getIdsList(department, xcbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56",department.getDEPARTMENT_ID())){
|
|
|
|
|
ajbdepartmentIds = getIdsList(department,ajbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56", department.getDEPARTMENT_ID())) {
|
|
|
|
|
ajbdepartmentIds = getIdsList(department, ajbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
//0716 新加 机设部 业务部 综合办公室
|
|
|
|
|
if (StringUtils.equals("599d9bfcf6c44cb0bc553b1b766aebc5", department.getDEPARTMENT_ID())) {
|
|
|
|
|
businessDepartmentIds = getIdsList(department, ajbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.equals("31e47797873d4dd3abdbeb0d99a1f138", department.getDEPARTMENT_ID())) {
|
|
|
|
|
generalOfficeDepartmentIds = getIdsList(department, ajbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.equals("298b9a63ea704485913c5185545b4c66", department.getDEPARTMENT_ID())) {
|
|
|
|
|
generalOfficeDepartmentIds = getIdsList(department, ajbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//处理日期 类型 年 季度 月
|
|
|
|
@ -1527,34 +1524,34 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
String startTime = "";
|
|
|
|
|
String endTime = "";
|
|
|
|
|
//年
|
|
|
|
|
if(StringUtils.equals("1",type)){
|
|
|
|
|
startTime = year+"-01-01 00:00:00";
|
|
|
|
|
endTime = year+"-12-31 23:59:59";
|
|
|
|
|
if (StringUtils.equals("1", type)) {
|
|
|
|
|
startTime = year + "-01-01 00:00:00";
|
|
|
|
|
endTime = year + "-12-31 23:59:59";
|
|
|
|
|
}
|
|
|
|
|
//季度
|
|
|
|
|
if(StringUtils.equals("2",type)){
|
|
|
|
|
switch (num){
|
|
|
|
|
case "1" :
|
|
|
|
|
startTime = year+"-01-01 00:00:00";
|
|
|
|
|
endTime = year+"-03-31 23:59:59";
|
|
|
|
|
if (StringUtils.equals("2", type)) {
|
|
|
|
|
switch (num) {
|
|
|
|
|
case "1":
|
|
|
|
|
startTime = year + "-01-01 00:00:00";
|
|
|
|
|
endTime = year + "-03-31 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "2" :
|
|
|
|
|
startTime = year+"-04-01 00:00:00";
|
|
|
|
|
endTime = year+"-06-30 23:59:59";
|
|
|
|
|
case "2":
|
|
|
|
|
startTime = year + "-04-01 00:00:00";
|
|
|
|
|
endTime = year + "-06-30 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "3" :
|
|
|
|
|
startTime = year+"-07-01 00:00:00";
|
|
|
|
|
endTime = year+"-09-30 23:59:59";
|
|
|
|
|
case "3":
|
|
|
|
|
startTime = year + "-07-01 00:00:00";
|
|
|
|
|
endTime = year + "-09-30 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "4" :
|
|
|
|
|
startTime = year+"-10-01 00:00:00";
|
|
|
|
|
endTime = year+"-12-31 23:59:59";
|
|
|
|
|
case "4":
|
|
|
|
|
startTime = year + "-10-01 00:00:00";
|
|
|
|
|
endTime = year + "-12-31 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//月
|
|
|
|
|
if(StringUtils.equals("3",type)){
|
|
|
|
|
startTime = year+"-01 00:00:00";
|
|
|
|
|
if (StringUtils.equals("3", type)) {
|
|
|
|
|
startTime = year + "-01 00:00:00";
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// 解析字符串为LocalDateTime
|
|
|
|
|
LocalDateTime dateTime = LocalDateTime.parse(startTime, formatter);
|
|
|
|
@ -1566,76 +1563,81 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
// 格式化ZonedDateTime对象为仅包含日期的字符串
|
|
|
|
|
String formattedDate = dateFormatter.format(zonedDateTime);
|
|
|
|
|
endTime = formattedDate+" 23:59:59";
|
|
|
|
|
endTime = formattedDate + " 23:59:59";
|
|
|
|
|
}
|
|
|
|
|
//前置搜索条件处理完毕
|
|
|
|
|
pd.put("zcbdepartmentIds",zcbdepartmentIds);
|
|
|
|
|
pd.put("bzbdepartmentIds",bzbdepartmentIds);
|
|
|
|
|
pd.put("xcbdepartmentIds",xcbdepartmentIds);
|
|
|
|
|
pd.put("ajbdepartmentIds",ajbdepartmentIds);
|
|
|
|
|
pd.put("startTime",startTime);
|
|
|
|
|
pd.put("endTime",endTime);
|
|
|
|
|
pd.put("zcbdepartmentIds", zcbdepartmentIds);
|
|
|
|
|
pd.put("bzbdepartmentIds", bzbdepartmentIds);
|
|
|
|
|
pd.put("xcbdepartmentIds", xcbdepartmentIds);
|
|
|
|
|
pd.put("ajbdepartmentIds", ajbdepartmentIds);
|
|
|
|
|
|
|
|
|
|
pd.put("mechanicalDepartmentIds", mechanicalDepartmentIds);
|
|
|
|
|
pd.put("businessDepartmentIds", businessDepartmentIds);
|
|
|
|
|
pd.put("generalOfficeDepartmentIds", generalOfficeDepartmentIds);
|
|
|
|
|
pd.put("startTime", startTime);
|
|
|
|
|
pd.put("endTime", endTime);
|
|
|
|
|
//这里获取数据 获取指定日期范围内和指定部门集合创建的隐患总数
|
|
|
|
|
Map<String,Object> map = hiddenService.getExcelMap(pd);
|
|
|
|
|
Map<String, Object> map = hiddenService.getExcelMap(pd);
|
|
|
|
|
//年
|
|
|
|
|
if(StringUtils.equals("1",type)){
|
|
|
|
|
map.put("type","统计年度:");
|
|
|
|
|
map.put("num",year+"年");
|
|
|
|
|
if (StringUtils.equals("1", type)) {
|
|
|
|
|
map.put("type", "统计年度:");
|
|
|
|
|
map.put("num", year + "年");
|
|
|
|
|
}
|
|
|
|
|
//季度
|
|
|
|
|
if(StringUtils.equals("2",type)){
|
|
|
|
|
map.put("type","统计季度:");
|
|
|
|
|
map.put("num",year+"年第"+num+"季度");
|
|
|
|
|
if (StringUtils.equals("2", type)) {
|
|
|
|
|
map.put("type", "统计季度:");
|
|
|
|
|
map.put("num", year + "年第" + num + "季度");
|
|
|
|
|
}
|
|
|
|
|
//月
|
|
|
|
|
if(StringUtils.equals("3",type)){
|
|
|
|
|
if (StringUtils.equals("3", type)) {
|
|
|
|
|
String[] month = year.split("-");
|
|
|
|
|
map.put("type","统计月度:");
|
|
|
|
|
map.put("num",month[0]+"年第"+month[1]+"月");
|
|
|
|
|
map.put("type", "统计月度:");
|
|
|
|
|
map.put("num", month[0] + "年第" + month[1] + "月");
|
|
|
|
|
}
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
|
|
String date =sdf.format(new Date());
|
|
|
|
|
map.put("date","填表日期:"+date);
|
|
|
|
|
map.put("weidu",map.get("type").toString()+map.get("num").toString());
|
|
|
|
|
String date = sdf.format(new Date());
|
|
|
|
|
map.put("date", "填表日期:" + date);
|
|
|
|
|
map.put("weidu", map.get("type").toString() + map.get("num").toString());
|
|
|
|
|
Map<String, Object> Returnmap = new HashMap<String, Object>();
|
|
|
|
|
Returnmap.put("result", "success");
|
|
|
|
|
Returnmap.put("pd",map);
|
|
|
|
|
Returnmap.put("pd", map);
|
|
|
|
|
return Returnmap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出隐患统计表
|
|
|
|
|
*
|
|
|
|
|
* @param response
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/getCountExcel")
|
|
|
|
|
public void exportExcels(HttpServletResponse response) throws Exception {
|
|
|
|
|
public void exportExcels(HttpServletResponse response) throws Exception {
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
//这里进入开始获取数据阶段 首先拿到所有部门数据
|
|
|
|
|
String url ="department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
String url = "department_list.html?DEPARTMENT_ID=";
|
|
|
|
|
List<Department> departments = departmentService.listAllDepartment(Jurisdiction.getCORPINFO_ID(), url);
|
|
|
|
|
//装船部 zcb id集合 89f3d30c4031432da53b75bed442ced8
|
|
|
|
|
List<String> zcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//保障部 bzb id集合 fcae9cc13a354be699d85d6aea3b3450
|
|
|
|
|
List<String> bzbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> bzbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//卸车部 xcb id集合 aad337cf728b4cc2b63e210caf4e185f
|
|
|
|
|
List<String> xcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> xcbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//安监部 ajb id集合 4c4b7bc93e3347978f5a3e1f0c4a0b56
|
|
|
|
|
List<String> ajbdepartmentIds = new ArrayList<>();
|
|
|
|
|
List<String> ajbdepartmentIds = new ArrayList<>();
|
|
|
|
|
//开始处理数据 扔进对应结合中
|
|
|
|
|
for(Department department:departments){
|
|
|
|
|
if(StringUtils.equals("89f3d30c4031432da53b75bed442ced8",department.getDEPARTMENT_ID())){
|
|
|
|
|
zcbdepartmentIds = getIdsList(department,zcbdepartmentIds);
|
|
|
|
|
for (Department department : departments) {
|
|
|
|
|
if (StringUtils.equals("89f3d30c4031432da53b75bed442ced8", department.getDEPARTMENT_ID())) {
|
|
|
|
|
zcbdepartmentIds = getIdsList(department, zcbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450",department.getDEPARTMENT_ID())){
|
|
|
|
|
bzbdepartmentIds = getIdsList(department,bzbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("fcae9cc13a354be699d85d6aea3b3450", department.getDEPARTMENT_ID())) {
|
|
|
|
|
bzbdepartmentIds = getIdsList(department, bzbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f",department.getDEPARTMENT_ID())){
|
|
|
|
|
xcbdepartmentIds = getIdsList(department,xcbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("aad337cf728b4cc2b63e210caf4e185f", department.getDEPARTMENT_ID())) {
|
|
|
|
|
xcbdepartmentIds = getIdsList(department, xcbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56",department.getDEPARTMENT_ID())){
|
|
|
|
|
ajbdepartmentIds = getIdsList(department,ajbdepartmentIds);
|
|
|
|
|
if (StringUtils.equals("4c4b7bc93e3347978f5a3e1f0c4a0b56", department.getDEPARTMENT_ID())) {
|
|
|
|
|
ajbdepartmentIds = getIdsList(department, ajbdepartmentIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//处理日期 类型 年 季度 月
|
|
|
|
@ -1645,34 +1647,34 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
String startTime = "";
|
|
|
|
|
String endTime = "";
|
|
|
|
|
//年
|
|
|
|
|
if(StringUtils.equals("1",type)){
|
|
|
|
|
startTime = year+"-01-01 00:00:00";
|
|
|
|
|
endTime = year+"-12-31 23:59:59";
|
|
|
|
|
if (StringUtils.equals("1", type)) {
|
|
|
|
|
startTime = year + "-01-01 00:00:00";
|
|
|
|
|
endTime = year + "-12-31 23:59:59";
|
|
|
|
|
}
|
|
|
|
|
//季度
|
|
|
|
|
if(StringUtils.equals("2",type)){
|
|
|
|
|
switch (num){
|
|
|
|
|
case "1" :
|
|
|
|
|
startTime = year+"-01-01 00:00:00";
|
|
|
|
|
endTime = year+"-03-31 23:59:59";
|
|
|
|
|
if (StringUtils.equals("2", type)) {
|
|
|
|
|
switch (num) {
|
|
|
|
|
case "1":
|
|
|
|
|
startTime = year + "-01-01 00:00:00";
|
|
|
|
|
endTime = year + "-03-31 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "2" :
|
|
|
|
|
startTime = year+"-04-01 00:00:00";
|
|
|
|
|
endTime = year+"-06-30 23:59:59";
|
|
|
|
|
case "2":
|
|
|
|
|
startTime = year + "-04-01 00:00:00";
|
|
|
|
|
endTime = year + "-06-30 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "3" :
|
|
|
|
|
startTime = year+"-07-01 00:00:00";
|
|
|
|
|
endTime = year+"-09-30 23:59:59";
|
|
|
|
|
case "3":
|
|
|
|
|
startTime = year + "-07-01 00:00:00";
|
|
|
|
|
endTime = year + "-09-30 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
case "4" :
|
|
|
|
|
startTime = year+"-10-01 00:00:00";
|
|
|
|
|
endTime = year+"-12-31 23:59:59";
|
|
|
|
|
case "4":
|
|
|
|
|
startTime = year + "-10-01 00:00:00";
|
|
|
|
|
endTime = year + "-12-31 23:59:59";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//月
|
|
|
|
|
if(StringUtils.equals("3",type)){
|
|
|
|
|
startTime = year+"-01 00:00:00";
|
|
|
|
|
if (StringUtils.equals("3", type)) {
|
|
|
|
|
startTime = year + "-01 00:00:00";
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// 解析字符串为LocalDateTime
|
|
|
|
|
LocalDateTime dateTime = LocalDateTime.parse(startTime, formatter);
|
|
|
|
@ -1684,43 +1686,42 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
// 格式化ZonedDateTime对象为仅包含日期的字符串
|
|
|
|
|
String formattedDate = dateFormatter.format(zonedDateTime);
|
|
|
|
|
endTime = formattedDate+" 23:59:59";
|
|
|
|
|
endTime = formattedDate + " 23:59:59";
|
|
|
|
|
}
|
|
|
|
|
//前置搜索条件处理完毕
|
|
|
|
|
pd.put("zcbdepartmentIds",zcbdepartmentIds);
|
|
|
|
|
pd.put("bzbdepartmentIds",bzbdepartmentIds);
|
|
|
|
|
pd.put("xcbdepartmentIds",xcbdepartmentIds);
|
|
|
|
|
pd.put("ajbdepartmentIds",ajbdepartmentIds);
|
|
|
|
|
pd.put("startTime",startTime);
|
|
|
|
|
pd.put("endTime",endTime);
|
|
|
|
|
pd.put("zcbdepartmentIds", zcbdepartmentIds);
|
|
|
|
|
pd.put("bzbdepartmentIds", bzbdepartmentIds);
|
|
|
|
|
pd.put("xcbdepartmentIds", xcbdepartmentIds);
|
|
|
|
|
pd.put("ajbdepartmentIds", ajbdepartmentIds);
|
|
|
|
|
pd.put("startTime", startTime);
|
|
|
|
|
pd.put("endTime", endTime);
|
|
|
|
|
//这里获取数据 获取指定日期范围内和指定部门集合创建的隐患总数
|
|
|
|
|
Map<String,Object> map = hiddenService.getExcelMap(pd);
|
|
|
|
|
Map<String, Object> map = hiddenService.getExcelMap(pd);
|
|
|
|
|
//年
|
|
|
|
|
if(StringUtils.equals("1",type)){
|
|
|
|
|
map.put("type","统计年度:");
|
|
|
|
|
map.put("num",year+"年");
|
|
|
|
|
if (StringUtils.equals("1", type)) {
|
|
|
|
|
map.put("type", "统计年度:");
|
|
|
|
|
map.put("num", year + "年");
|
|
|
|
|
}
|
|
|
|
|
//季度
|
|
|
|
|
if(StringUtils.equals("2",type)){
|
|
|
|
|
map.put("type","统计季度:");
|
|
|
|
|
map.put("num",year+"年第"+num+"季度");
|
|
|
|
|
if (StringUtils.equals("2", type)) {
|
|
|
|
|
map.put("type", "统计季度:");
|
|
|
|
|
map.put("num", year + "年第" + num + "季度");
|
|
|
|
|
}
|
|
|
|
|
//月
|
|
|
|
|
if(StringUtils.equals("3",type)){
|
|
|
|
|
if (StringUtils.equals("3", type)) {
|
|
|
|
|
String[] month = year.split("-");
|
|
|
|
|
map.put("type","统计月度:");
|
|
|
|
|
map.put("num",month[0]+"年第"+month[1]+"月");
|
|
|
|
|
map.put("type", "统计月度:");
|
|
|
|
|
map.put("num", month[0] + "年第" + month[1] + "月");
|
|
|
|
|
}
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
|
|
String date =sdf.format(new Date());
|
|
|
|
|
map.put("date","填表日期:"+date);
|
|
|
|
|
String date = sdf.format(new Date());
|
|
|
|
|
map.put("date", "填表日期:" + date);
|
|
|
|
|
//开始执行模板填充数据
|
|
|
|
|
String excelFilePath = hiddenCountExcel; // 替换为你的Excel文件路径
|
|
|
|
|
//正则
|
|
|
|
|
String regex = "\\{\\{.*?\\}\\}";
|
|
|
|
|
Pattern pattern = Pattern.compile(regex);
|
|
|
|
|
try (FileInputStream inputStream = new FileInputStream(new File(excelFilePath));
|
|
|
|
|
Workbook workbook = new XSSFWorkbook(inputStream)) {
|
|
|
|
|
try (FileInputStream inputStream = new FileInputStream(new File(excelFilePath)); Workbook workbook = new XSSFWorkbook(inputStream)) {
|
|
|
|
|
Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表
|
|
|
|
|
for (Row row : sheet) {
|
|
|
|
|
for (Cell cell : row) {
|
|
|
|
@ -1743,12 +1744,12 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<String> getIdsList(Department department,List<String> ids){
|
|
|
|
|
public List<String> getIdsList(Department department, List<String> ids) {
|
|
|
|
|
ids.add(department.getDEPARTMENT_ID());
|
|
|
|
|
for(Department dept :department.getSubDepartment() ){
|
|
|
|
|
if(dept.getSubDepartment().size()>0){
|
|
|
|
|
getIdsList(dept,ids);
|
|
|
|
|
}else {
|
|
|
|
|
for (Department dept : department.getSubDepartment()) {
|
|
|
|
|
if (dept.getSubDepartment().size() > 0) {
|
|
|
|
|
getIdsList(dept, ids);
|
|
|
|
|
} else {
|
|
|
|
|
ids.add(dept.getDEPARTMENT_ID());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1770,21 +1771,21 @@ public class HiddenApiController extends BaseController {
|
|
|
|
|
String errInfo = "success";
|
|
|
|
|
PageData pd = new PageData();
|
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
if (pd.get("YEAR").equals("")){
|
|
|
|
|
if (pd.get("YEAR").equals("")) {
|
|
|
|
|
String year = DateUtil.getYear();
|
|
|
|
|
pd.put("YEAR",year);
|
|
|
|
|
pd.put("YEAR", year);
|
|
|
|
|
}
|
|
|
|
|
List<PageData> dataList = hiddenApiService.goSummaryTable(pd);
|
|
|
|
|
List<PageData> dataTypeList = hiddenApiService.goSummaryTypeTable(pd);
|
|
|
|
|
List<PageData> varList = hiddenApiService.dealData(dataList);
|
|
|
|
|
List<PageData> varTypeList = hiddenApiService.dealData(dataTypeList);
|
|
|
|
|
for(PageData pdDate:varList){
|
|
|
|
|
for(PageData pdTypeDate:varTypeList){
|
|
|
|
|
if(pdDate.getString("MONTH").equals(pdTypeDate.getString("MONTH"))){
|
|
|
|
|
pdDate.put("wdbaqztCount",pdTypeDate.getString("wdbaqztCount"));
|
|
|
|
|
pdDate.put("gldqxCount",pdTypeDate.getString("gldqxCount"));
|
|
|
|
|
pdDate.put("hjdbaqysCount",pdTypeDate.getString("hjdbaqysCount"));
|
|
|
|
|
pdDate.put("rdbaqysCount",pdTypeDate.getString("rdbaqysCount"));
|
|
|
|
|
for (PageData pdDate : varList) {
|
|
|
|
|
for (PageData pdTypeDate : varTypeList) {
|
|
|
|
|
if (pdDate.getString("MONTH").equals(pdTypeDate.getString("MONTH"))) {
|
|
|
|
|
pdDate.put("wdbaqztCount", pdTypeDate.getString("wdbaqztCount"));
|
|
|
|
|
pdDate.put("gldqxCount", pdTypeDate.getString("gldqxCount"));
|
|
|
|
|
pdDate.put("hjdbaqysCount", pdTypeDate.getString("hjdbaqysCount"));
|
|
|
|
|
pdDate.put("rdbaqysCount", pdTypeDate.getString("rdbaqysCount"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|