风险辨识结果和关联其他特殊作业及安全作业票编号显示

pull/4/head
chenxinying 2024-01-25 14:05:39 +08:00
parent cc33e51b0c
commit 8ef4b2977e
5 changed files with 166 additions and 0 deletions

View File

@ -2,15 +2,21 @@ package com.zcloud.controller.eightwork;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.Response;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.eightwork.EightWorkService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.util.*;
import org.apache.commons.lang.StringUtils;
import org.apache.fop.util.DataURLUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@ -21,6 +27,63 @@ public class AppEightWorkController extends BaseController {
private Smb smb;
@Autowired
private EightWorkService eightWorkService;
@Autowired
private DictionariesService dictionariesService;
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "八项作业",instructionsOperate = "八项作业",instructionsType = "列表")
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
List<PageData> varList = eightWorkService.list(page); //列出confinedspace列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* description:
* accidentType-
* hiddenLevel-
*
* @return tree or list
* @throws Exception all
*/
@RequestMapping(value = "/getInfo")
@ResponseBody
public Response getInfo() throws Exception {
Response response = Response.getResponse();
try {
PageData request = this.getPageData();
if (StringUtils.isBlank(request.getString("vectors"))) throw new RuntimeException("未找到要获取的数据字典类型");
List<String> vectors = Warden.getList(request.getString("vectors"),String.class);
for (String vector: vectors) {
switch (vector) {
case "accidentType":
//事故类型
response.put("accidentType", dictionariesService.getTreeById("cee1190ea96a4ca9b7bca81e11f0d0f8"));
continue;
default:
}
}
return response.OK();
} catch (Exception e) {
e.printStackTrace();
return response.errorMessage(e.getMessage());
}
}
@RequestMapping("/saveFile")
@ResponseBody

View File

@ -0,0 +1,25 @@
package com.zcloud.mapper.datasource.eightwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-13
* www.zcloudchina.com
*/
public interface EightWorkMapper {
/**
* @param page
* @throws Exception
*/
List<PageData> datalist(Page page);
}

View File

@ -1,5 +1,6 @@
package com.zcloud.service.eightwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
@ -11,4 +12,10 @@ import java.util.List;
public interface EightWorkService {
public List<PageData> getTaskSetps(PageData pd);
PageData checkWork(PageData pd);
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
}

View File

@ -1,5 +1,6 @@
package com.zcloud.service.eightwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.eightwork.EightWorkFlowLogMapper;
import com.zcloud.mapper.datasource.eightwork.EightWorkTaskFlowMapper;
@ -7,6 +8,7 @@ import com.zcloud.service.eightwork.EightWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.zcloud.mapper.datasource.eightwork.EightWorkMapper;
import java.util.List;
@ -21,6 +23,10 @@ public class EightWorkServiceImpl implements EightWorkService {
private EightWorkTaskFlowMapper eightWorkTaskFlowMapper;
@Autowired
private EightWorkFlowLogMapper eightWorkFlowLogMapper;
@Autowired
private EightWorkMapper eightworkMapper;
@Override
public List<PageData> getTaskSetps(PageData pd) {
return eightWorkTaskFlowMapper.getTaskSetps(pd);
@ -31,4 +37,12 @@ public class EightWorkServiceImpl implements EightWorkService {
return null;
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return eightworkMapper.datalist(page);
}
}

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.eightwork.EightWorkMapper">
<!-- 列表 -->
<select id="datalist" parameterType="page" resultType="pd">
<!-- select
CONCAT_WS(" ","受限空间作业",f.CHECK_NO) as CHECK_NO,f.CONFINEDSPACE_ID as ID
from
bus_confinedspace f
where f.ISDELETE = '0' and f.STEP_ID &gt; 0 and f.STEP_ID &lt; 15 and f.CORPINFO_ID = #{pd.CORPINFO_ID}
union
select
CONCAT_WS(" ","盲板抽堵作业",b.CHECK_NO) as CHECK_NO,b.BLINDBOARD_ID as ID
from
bus_blindboard b
where b.CORPINFO_ID = #{pd.CORPINFO_ID} and b.STEP_ID &gt; 0 and b.STEP_ID &lt; 15 and b.ISDELETE = '0'
union
select
CONCAT_WS(" ","临时用电作业",e.CHECK_NO) as CHECK_NO,e.ELECTRICITY_ID as ID
from
bus_electricity e
where e.CORPINFO_ID = #{pd.CORPINFO_ID} and e.STEP_ID &gt; 0 and e.STEP_ID &lt; 15 and e.ISDELETE = '0'
union
select
CONCAT_WS(" ","吊装作业",g.CHECK_NO) as CHECK_NO,g.HOISTING_ID as ID
from
bus_hoisting g
where g.CORPINFO_ID = #{pd.CORPINFO_ID} and g.STEP_ID &gt; 0 and g.STEP_ID &lt; 15 and g.ISDELETE = '0'
union
select
CONCAT_WS(" ","动土作业",a.CHECK_NO) as CHECK_NO ,a.BREAKGROUND_ID as ID
from
bus_breakground a
where a.CORPINFO_ID = #{pd.CORPINFO_ID} and a.STEP_ID &gt; 0 and a.STEP_ID &lt; 15 and a.ISDELETE = '0'
union
select
CONCAT_WS(" ","断路作业",d.CHECK_NO) as CHECK_NO,d.CUTROAD_ID as ID
from
bus_cutroad d
where d.CORPINFO_ID = #{pd.CORPINFO_ID} and d.STEP_ID &gt; 0 and d.STEP_ID &lt; 15 and d.ISDELETE = '0'
union
select
CONCAT_WS(" ","高处作业",w.CHECK_NO) as CHECK_NO,w.HIGHWORK_ID as ID
from
bus_highwork w
where w.CORPINFO_ID = #{pd.CORPINFO_ID} and w.STEP_ID &gt; 0 and w.STEP_ID &lt; 15 and w.ISDELETE = '0'
union -->
select
CONCAT_WS(" ","动火作业",h.CHECK_NO) as CHECK_NO,h.HOTWORK_ID as ID
from
bus_hotwork h
where h.CORPINFO_ID = #{pd.CORPINFO_ID} and h.STEP_ID &gt; 0 and h.STEP_ID &lt; 15 and h.ISDELETE = '0'
</select>
</mapper>