添加隐患处理类型等接口
parent
183eef7073
commit
0698b28d27
|
@ -92,16 +92,16 @@ public class StatisticsDataController extends BaseController {
|
||||||
Map<String, Object> corp = new HashMap<>();
|
Map<String, Object> corp = new HashMap<>();
|
||||||
//部门
|
//部门
|
||||||
List<PageData> userCount = usersService.statisticsByCorp(pd);
|
List<PageData> userCount = usersService.statisticsByCorp(pd);
|
||||||
corp.put("USERCOUNT", userCount.get(0).get("COUNT")); //人员总数
|
corp.put("USERCOUNT", userCount.get(0).get("COUNT")); //人员总数
|
||||||
corp.put("USERCHECKCOUNT", userCount.get(1).get("COUNT")); //人员总数
|
corp.put("USERCHECKCOUNT", userCount.get(1).get("COUNT")); //人员总数
|
||||||
//部门
|
//部门
|
||||||
List<PageData> deptCount = departmentService.statisticsByCorp(pd);
|
List<PageData> deptCount = departmentService.statisticsByCorp(pd);
|
||||||
corp.put("DEPTCOUNT", deptCount.get(0).get("COUNT")); //人员总数
|
corp.put("DEPTCOUNT", deptCount.get(0).get("COUNT")); //人员总数
|
||||||
corp.put("DEPTCHECKCOUNT", deptCount.get(1).get("COUNT")); //人员总数
|
corp.put("DEPTCHECKCOUNT", deptCount.get(1).get("COUNT")); //人员总数
|
||||||
//清单
|
//清单
|
||||||
List<PageData> listCount = listmanagerService.statisticsByCorp(pd); //列出ListManager列表
|
List<PageData> listCount = listmanagerService.statisticsByCorp(pd); //列出ListManager列表
|
||||||
corp.put("LISTCOUNT", listCount.get(0).get("COUNT")); //人员总数
|
corp.put("LISTCOUNT", listCount.get(0).get("COUNT")); //人员总数
|
||||||
corp.put("LISTCHECKCOUNT", listCount.get(1).get("COUNT")); //人员总数
|
corp.put("LISTCHECKCOUNT", listCount.get(1).get("COUNT")); //人员总数
|
||||||
map.put("corp", corp);
|
map.put("corp", corp);
|
||||||
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -120,7 +120,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID",CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
|
|
||||||
//清单类型占比统计
|
//清单类型占比统计
|
||||||
List<PageData> chartData = listmanagerService.statisticsGroupType(pd);
|
List<PageData> chartData = listmanagerService.statisticsGroupType(pd);
|
||||||
|
@ -151,9 +151,9 @@ public class StatisticsDataController extends BaseController {
|
||||||
for (int i = 0; i < legendData.size(); i++) {
|
for (int i = 0; i < legendData.size(); i++) {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
pd.put("STATENAME",legendData.get(i));
|
pd.put("STATENAME", legendData.get(i));
|
||||||
List data = new ArrayList();
|
List data = new ArrayList();
|
||||||
List<PageData> hdRecChart = hiddenService.statisticsGroupMonthByState(pd); //根据状态按时间分组统计隐患数据
|
List<PageData> hdRecChart = hiddenService.statisticsGroupMonthByState(pd); //根据状态按时间分组统计隐患数据
|
||||||
for (int j = 0; j < halfYearMonth.size(); j++) {
|
for (int j = 0; j < halfYearMonth.size(); j++) {
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
for (int k = 0; k < hdRecChart.size(); k++) {
|
for (int k = 0; k < hdRecChart.size(); k++) {
|
||||||
|
@ -191,18 +191,18 @@ public class StatisticsDataController extends BaseController {
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
Map<String, Object> chartData = new HashMap<String, Object>();
|
Map<String, Object> chartData = new HashMap<String, Object>();
|
||||||
List<PageData> deptList = riskpointService.listDeptByPoint(pd);
|
List<PageData> deptList = riskpointService.listDeptByPoint(pd);
|
||||||
List<String> yAxisData = new ArrayList<String>();
|
List<String> yAxisData = new ArrayList<String>();
|
||||||
for(PageData d :deptList){
|
for (PageData d : deptList) {
|
||||||
PageData pdf = new PageData();
|
PageData pdf = new PageData();
|
||||||
yAxisData.add(d.getString("DEPT_NAME"));
|
yAxisData.add(d.getString("DEPT_NAME"));
|
||||||
}
|
}
|
||||||
chartData.put("yAxisData", yAxisData);
|
chartData.put("yAxisData", yAxisData);
|
||||||
|
|
||||||
List<Dictionaries> varList = dictionariesService.listSubDictByParentId("5a81e63ec0e94d919b3138bc01dbef6b");
|
List<Dictionaries> varList = dictionariesService.listSubDictByParentId("5a81e63ec0e94d919b3138bc01dbef6b");
|
||||||
List<String> legendData = new ArrayList<String>();
|
List<String> legendData = new ArrayList<String>();
|
||||||
List seriesData = new ArrayList();
|
List seriesData = new ArrayList();
|
||||||
for(Dictionaries d :varList){
|
for (Dictionaries d : varList) {
|
||||||
PageData pdf = new PageData();
|
PageData pdf = new PageData();
|
||||||
legendData.add(d.getNAME());
|
legendData.add(d.getNAME());
|
||||||
seriesData.add(new ArrayList());
|
seriesData.add(new ArrayList());
|
||||||
|
@ -211,8 +211,8 @@ public class StatisticsDataController extends BaseController {
|
||||||
//隐患整改趋势(近半年)
|
//隐患整改趋势(近半年)
|
||||||
for (int i = 0; i < deptList.size(); i++) {
|
for (int i = 0; i < deptList.size(); i++) {
|
||||||
PageData dept = new PageData();
|
PageData dept = new PageData();
|
||||||
dept.put("DEPARTMENT_ID",deptList.get(i).getString("DEPARTMENT_ID"));
|
dept.put("DEPARTMENT_ID", deptList.get(i).getString("DEPARTMENT_ID"));
|
||||||
List<PageData> dataChart = riskpointService.statisticsGroupLevelByDept(dept); //按照级别分类统计各部门风险管控数据
|
List<PageData> dataChart = riskpointService.statisticsGroupLevelByDept(dept); //按照级别分类统计各部门风险管控数据
|
||||||
for (int j = 0; j < varList.size(); j++) {
|
for (int j = 0; j < varList.size(); j++) {
|
||||||
List secondList = (List) seriesData.get(j);
|
List secondList = (List) seriesData.get(j);
|
||||||
secondList.add(i, dataChart.get(j).getString("COUNT"));
|
secondList.add(i, dataChart.get(j).getString("COUNT"));
|
||||||
|
@ -294,7 +294,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
List seriesData2 = new ArrayList();
|
List seriesData2 = new ArrayList();
|
||||||
List seriesData3 = new ArrayList();
|
List seriesData3 = new ArrayList();
|
||||||
|
|
||||||
List<PageData> disposalChart = majordangersourceDisposalService.statisticsGroupMajordangersource(pd); //根据重大危险源分组统计报警处置情况
|
List<PageData> disposalChart = majordangersourceDisposalService.statisticsGroupMajordangersource(pd); //根据重大危险源分组统计报警处置情况
|
||||||
List seriesData = new ArrayList();
|
List seriesData = new ArrayList();
|
||||||
for (PageData data : disposalChart) {
|
for (PageData data : disposalChart) {
|
||||||
xAxisData.add(data.getString("MAJORDANGERSOURCE_NAME"));
|
xAxisData.add(data.getString("MAJORDANGERSOURCE_NAME"));
|
||||||
|
@ -330,7 +330,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
Map<String, Object> chartData = new HashMap<String, Object>();
|
Map<String, Object> chartData = new HashMap<String, Object>();
|
||||||
List<String> legendData = Arrays.asList(new String[]{"动火作业", "临时用电作业", "盲板作业", "高处作业", "有限空间作业", "吊装作业"});
|
List<String> legendData = Arrays.asList(new String[]{"动火作业", "临时用电作业", "盲板作业", "高处作业", "有限空间作业", "吊装作业"});
|
||||||
|
|
||||||
List<PageData> workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数
|
List<PageData> workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数
|
||||||
List seriesData = new ArrayList();
|
List seriesData = new ArrayList();
|
||||||
for (int i = 0; i < legendData.size(); i++) {
|
for (int i = 0; i < legendData.size(); i++) {
|
||||||
PageData pie = new PageData();
|
PageData pie = new PageData();
|
||||||
|
@ -345,27 +345,29 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**数据可视化平台首页获取
|
/**
|
||||||
|
* 数据可视化平台首页获取
|
||||||
* 1.获取企业的置顶视频
|
* 1.获取企业的置顶视频
|
||||||
* 2.获取管理的置顶视频
|
* 2.获取管理的置顶视频
|
||||||
* 3.没有视频或者没有置顶视频
|
* 3.没有视频或者没有置顶视频
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/getObjectForBiLogin")
|
@RequestMapping(value = "/getObjectForBiLogin")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getObjectForBiLogin() throws Exception{
|
public Object getObjectForBiLogin() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("TYPE", "1");
|
pd.put("TYPE", "1");
|
||||||
pd.put("CORPINFO_TYPE", "1");
|
pd.put("CORPINFO_TYPE", "1");
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
List<PageData> cpvarList = videoService.listAll(pd); //企业视频
|
List<PageData> cpvarList = videoService.listAll(pd); //企业视频
|
||||||
pd = new PageData();
|
pd = new PageData();
|
||||||
pd.put("CORPINFO_TYPE", "2");
|
pd.put("CORPINFO_TYPE", "2");
|
||||||
pd.put("TYPE", "1");
|
pd.put("TYPE", "1");
|
||||||
List<PageData> ptVarList = videoService.listAll(pd); //平台视频
|
List<PageData> ptVarList = videoService.listAll(pd); //平台视频
|
||||||
|
|
||||||
map.put("ptVarList", ptVarList);
|
map.put("ptVarList", ptVarList);
|
||||||
map.put("cpvarList", cpvarList);
|
map.put("cpvarList", cpvarList);
|
||||||
|
@ -373,17 +375,19 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取重大危险源数据
|
/**
|
||||||
|
* 获取重大危险源数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/findValidateData")
|
@RequestMapping(value = "/findValidateData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object findValidateData() throws Exception{
|
public Object findValidateData() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
List<PageData> varList = majordangersourcedisposalService.listAll(pd); //根据ID读取
|
List<PageData> varList = majordangersourcedisposalService.listAll(pd); //根据ID读取
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -654,17 +658,19 @@ public class StatisticsDataController extends BaseController {
|
||||||
return lastDayOfMonth;
|
return lastDayOfMonth;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**首页 获取折线图
|
/**
|
||||||
|
* 首页 获取折线图
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/listmanagerIndexCount")
|
@RequestMapping(value = "/listmanagerIndexCount")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listmanagerIndexCount() throws Exception{
|
public Object listmanagerIndexCount() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
||||||
List<PageData> valList = listmanagerService.goIndexCount(pd);
|
List<PageData> valList = listmanagerService.goIndexCount(pd);
|
||||||
List valList1 = new ArrayList();
|
List valList1 = new ArrayList();
|
||||||
|
|
||||||
|
@ -672,30 +678,30 @@ public class StatisticsDataController extends BaseController {
|
||||||
// {months: "2022-06", count: 0, screenType: "riskChecklistType0001"}
|
// {months: "2022-06", count: 0, screenType: "riskChecklistType0001"}
|
||||||
// 6 * 3 近6個月 ,3 三种类型
|
// 6 * 3 近6個月 ,3 三种类型
|
||||||
|
|
||||||
Map<String,String> monSCrMap = new HashMap<>();
|
Map<String, String> monSCrMap = new HashMap<>();
|
||||||
for (PageData pageData : valList){
|
for (PageData pageData : valList) {
|
||||||
String key = pageData.getString("months")+"*"+pageData.getString("screenType");
|
String key = pageData.getString("months") + "*" + pageData.getString("screenType");
|
||||||
monSCrMap.put(key,pageData.getString("count"));
|
monSCrMap.put(key, pageData.getString("count"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<String> halfYearMonth = DateUtil.getHalfYearMonth(true);
|
List<String> halfYearMonth = DateUtil.getHalfYearMonth(true);
|
||||||
String [] typeAll = new String[]{"riskChecklistType0001","riskChecklistType0002","zhqd03"};
|
String[] typeAll = new String[]{"riskChecklistType0001", "riskChecklistType0002", "zhqd03"};
|
||||||
|
|
||||||
|
|
||||||
List<Map<String,Object>> list = new ArrayList<>(); // 整理完成的数据 size 6 * 3
|
List<Map<String, Object>> list = new ArrayList<>(); // 整理完成的数据 size 6 * 3
|
||||||
for(String month : halfYearMonth){
|
for (String month : halfYearMonth) {
|
||||||
for (String type : typeAll){
|
for (String type : typeAll) {
|
||||||
String count = "0";
|
String count = "0";
|
||||||
|
|
||||||
String key = month +"*" + type;
|
String key = month + "*" + type;
|
||||||
if (monSCrMap.containsKey(key)){
|
if (monSCrMap.containsKey(key)) {
|
||||||
count = monSCrMap.get(key);
|
count = monSCrMap.get(key);
|
||||||
}
|
}
|
||||||
Map<String,Object> monAndType = new HashMap<>();
|
Map<String, Object> monAndType = new HashMap<>();
|
||||||
monAndType.put("months",month);
|
monAndType.put("months", month);
|
||||||
monAndType.put("screenType",type);
|
monAndType.put("screenType", type);
|
||||||
monAndType.put("count",count);
|
monAndType.put("count", count);
|
||||||
list.add(monAndType);
|
list.add(monAndType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -867,20 +873,22 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**平台公告
|
/**
|
||||||
|
* 平台公告
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/listByIndex")
|
@RequestMapping(value = "/listByIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listByIndex(Page page) throws Exception{
|
public Object listByIndex(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
//获取发布给这个企业的信息
|
//获取发布给这个企业的信息
|
||||||
pd.put("CORP_INFO_ID", CORPINFO_ID);
|
pd.put("CORP_INFO_ID", CORPINFO_ID);
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = noticeService.getNotAndCorpByCorpId(page);
|
List<PageData> varList = noticeService.getNotAndCorpByCorpId(page);
|
||||||
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
|
@ -888,21 +896,23 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**企业公告
|
/**
|
||||||
|
* 企业公告
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/enterpriseListByIndex")
|
@RequestMapping(value = "/enterpriseListByIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object enterpriseListByIndex(Page page) throws Exception{
|
public Object enterpriseListByIndex(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
pd.put("USER_ID", USER_ID);
|
pd.put("USER_ID", USER_ID);
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = noticecorpService.listByIndex(page); //列出NOTICECORP列表
|
List<PageData> varList = noticecorpService.listByIndex(page); //列出NOTICECORP列表
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -910,35 +920,37 @@ public class StatisticsDataController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**清單列表
|
/**
|
||||||
|
* 清單列表
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/checkListIndex")
|
@RequestMapping(value = "/checkListIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object checkListIndex() throws Exception{
|
public Object checkListIndex() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
||||||
pd.put("USER_ID",USER_ID);
|
pd.put("USER_ID", USER_ID);
|
||||||
pd.put("DEPARTMENT_ID", DEPT_ID);
|
pd.put("DEPARTMENT_ID", DEPT_ID);
|
||||||
|
|
||||||
pd.put("USER_ID","");
|
pd.put("USER_ID", "");
|
||||||
List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
|
List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
|
||||||
int wjcNum = 0;
|
int wjcNum = 0;
|
||||||
int yjcNum = 0;
|
int yjcNum = 0;
|
||||||
for (PageData list : varList) {
|
for (PageData list : varList) {
|
||||||
if(list.getString("TYPE").equals("listType0005")) {
|
if (list.getString("TYPE").equals("listType0005")) {
|
||||||
if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
if (Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
||||||
yjcNum++;
|
yjcNum++;
|
||||||
} else {
|
} else {
|
||||||
wjcNum++;
|
wjcNum++;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
if (Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
||||||
yjcNum++;
|
yjcNum++;
|
||||||
} else {
|
} else {
|
||||||
wjcNum++;
|
wjcNum++;
|
||||||
|
|
Loading…
Reference in New Issue