diff --git a/src/main/java/com/zcloud/controller/eightwork/AppConfinedSpaceGasWHController.java b/src/main/java/com/zcloud/controller/eightwork/AppConfinedSpaceGasWHController.java new file mode 100644 index 0000000..d36f24a --- /dev/null +++ b/src/main/java/com/zcloud/controller/eightwork/AppConfinedSpaceGasWHController.java @@ -0,0 +1,156 @@ +package com.zcloud.controller.eightwork; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.logs.LogAnno; +import com.zcloud.service.eightwork.ConfinedSpaceGasWHService; +import com.zcloud.util.DateUtil; +import com.zcloud.util.Tools; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 说明:有限空间气体 + * 作者:luoxiaobao + * 时间:2022-08-11 + * 官网:www.zcloudchina.com + */ +@Controller +@RequestMapping("/app/confinedspacegaswh") +public class AppConfinedSpaceGasWHController extends BaseController { + + @Autowired + private ConfinedSpaceGasWHService confinedspacegaswhService; + + /**新增 + * @param + * @throws Exception + */ + @RequestMapping(value="/add") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "新增") + public Object add() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = confinedspacegaswhService.findById(pd); + if(pd2 != null && pd2.size()>0){ + confinedspacegaswhService.edit(pd); + }else{ + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("CONFINEDSPACEGASWH_ID", this.get32UUID()); //主键 + confinedspacegaswhService.save(pd); + } + map.put("result", errInfo); + return map; + } + + /**删除 + * @param out + * @throws Exception + */ + @RequestMapping(value="/delete") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "删除") + public Object delete() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + confinedspacegaswhService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/edit") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "修改") + public Object edit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + confinedspacegaswhService.edit(pd); + map.put("result", errInfo); + return map; + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/list") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "列表") + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = confinedspacegaswhService.list(page); //列出ConfinedSpaceGasWH列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "去修改页面获取数据") + public Object goEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = confinedspacegaswhService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /**批量删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/deleteAll") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "有限空间气体",instructionsOperate = "有限空间气体",instructionsType = "批量删除") + public Object deleteAll() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(Tools.notEmpty(DATA_IDS)){ + String ArrayDATA_IDS[] = DATA_IDS.split(","); + confinedspacegaswhService.deleteAll(ArrayDATA_IDS); + errInfo = "success"; + }else{ + errInfo = "error"; + } + map.put("result", errInfo); //返回结果 + return map; + } +} diff --git a/src/main/java/com/zcloud/controller/eightwork/AppConfinedspaceController.java b/src/main/java/com/zcloud/controller/eightwork/AppConfinedspaceController.java new file mode 100644 index 0000000..0d5a68f --- /dev/null +++ b/src/main/java/com/zcloud/controller/eightwork/AppConfinedspaceController.java @@ -0,0 +1,282 @@ +package com.zcloud.controller.eightwork; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.logs.LogAnno; +import com.zcloud.service.eightwork.ConfinedSpaceGasService; +import com.zcloud.service.eightwork.ConfinedspaceService; +import com.zcloud.util.Tools; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 说明:受限作业 + * 官网:www.zcloudchina.com + */ +@Controller +@RequestMapping("/app/confinedspace") +public class AppConfinedspaceController extends BaseController { + + @Autowired + private ConfinedspaceService confinedspaceService; + @Autowired + private ConfinedSpaceGasService confinedspaceGasService; + /** + * 新增 + * @param + * @throws Exception + */ + @RequestMapping(value = "/add") + @ResponseBody + @LogAnno(menuType = "手机", menuServer = "受限作业", instructionsOperate = "受限作业", instructionsType = "新增") + public Object add() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + confinedspaceService.save(pd); + map.put("result", errInfo); + return map; + } + + /** + * 修改 + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit") + @ResponseBody + @LogAnno(menuType = "手机", menuServer = "受限作业", instructionsOperate = "受限作业", instructionsType = "新增") + public Object edit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + confinedspaceService.edit(pd); + map.put("result", errInfo); + return map; + } + /** + * 删除 + * @throws Exception + */ + @RequestMapping(value = "/delete") + @ResponseBody + @LogAnno(menuType = "手机", menuServer = "受限作业", instructionsOperate = "受限作业", instructionsType = "删除") + public Object delete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + confinedspaceService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/list") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "列表") + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = confinedspaceService.list(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + @RequestMapping("/findById") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "获取详情") + public Object findById() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = confinedspaceService.findById(pd); + map.put("result",errInfo); + map.put("pd",pd); + return map; + } + + @RequestMapping("/listSignFinished") + @ResponseBody + public Object listSignFinished() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData signs = confinedspaceService.listSignFinished(pd); + map.put("result",errInfo); + map.put("signs",signs); + return map; + } + + @RequestMapping("/nextStep") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "通过") + public Object nextStep(MultipartRequest request) throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List fileList = new ArrayList(); + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + + for (int i = 0; i < SIGNTIME.length; i++) { + fileList.add(request.getFile("file" + i)); + } + confinedspaceService.nextStep(pd, fileList.toArray(new MultipartFile[fileList.size()])); + map.put("result",errInfo); + return map; + } + + + @RequestMapping("/checkWorkCount") + @ResponseBody + public Object checkWorkCount() throws Exception{ + Map map = new HashMap<>(); + String errorInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + map.put("count",confinedspaceService.checkWorkCount(pd)); + map.put("result",errorInfo); + return map; + } + + @RequestMapping("/listAllMeasures") + @ResponseBody + public Object listAllMeasures() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List measuresList = confinedspaceService.listAllMeasures(); + map.put("result",errInfo); + map.put("measuresList",measuresList); + return map; + } + + @RequestMapping("/listAllMeasuresForSign") + @ResponseBody + public Object listAllMeasuresForSign() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List measuresForSignList = confinedspaceService.listAllMeasuresForSign(pd); + map.put("result",errInfo); + map.put("measuresForSignList",measuresForSignList); + return map; + } + + @RequestMapping("/listSignFinishMeasures") + @ResponseBody + public Object listSignFinishMeasures() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List finishMeasuresList = confinedspaceService.listSignFinishMeasures(pd); + map.put("result",errInfo); + map.put("finishMeasuresList",finishMeasuresList); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/gas/save") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "保存气体检测") + public Object gasSave(MultipartRequest request) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List fileList = new ArrayList(); + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + + for (int i = 0; i < SIGNTIME.length; i++) { + fileList.add(request.getFile("file" + i)); + } + confinedspaceService.saveGas(pd,fileList.toArray(new MultipartFile[fileList.size()])); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/gas/list") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "去修改页面获取数据") + public Object gasList() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = confinedspaceGasService.listAll(pd); //列出confinedspace列表 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/gas/delete") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "去修改页面获取数据") + public Object gasDel() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + confinedspaceGasService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /**获取受限作业流程 + * @param + * @throws Exception + */ + @RequestMapping(value="/getFlowList") + @ResponseBody + @LogAnno(menuType= "手机",menuServer= "受限作业",instructionsOperate = "受限作业",instructionsType = "获取受限作业流程") + public Object getFlowList() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List flowList = confinedspaceService.getFlowList(pd); + map.put("flowList", flowList); + map.put("result", errInfo); //返回结果 + return map; + } + +} diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasMapper.java new file mode 100644 index 0000000..4c8f3ce --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasMapper.java @@ -0,0 +1,62 @@ +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 ConfinedSpaceGasMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**列表 + * @param page + * @throws Exception + */ + List datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + PageData gasEdit(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasWHMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasWHMapper.java new file mode 100644 index 0000000..d3953c7 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedSpaceGasWHMapper.java @@ -0,0 +1,59 @@ +package com.zcloud.mapper.datasource.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:有限空间气体 + * 作者:luoxiaobao + * 时间:2022-08-11 + * 官网:www.zcloudchina.com + */ +public interface ConfinedSpaceGasWHMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + void edittime(PageData pd); + /**列表 + * @param page + * @throws Exception + */ + List datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceMapper.java new file mode 100644 index 0000000..e9523a1 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceMapper.java @@ -0,0 +1,27 @@ +package com.zcloud.mapper.datasource.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * @author fangjiakai + * @date 2024/01/17 11:31 + */ +public interface ConfinedspaceMapper { + PageData getCode(PageData pd); + PageData findById(PageData pd); + void save(PageData pd); + void delete(PageData pd); + void edit(PageData pd); + void editGasTime(PageData pd); + void editStep(PageData pd); + List datalistPage(Page page); + + List listAllMeasures(); + + List checkWorkCount(PageData pd); + + List getFlowList(PageData pd); +} diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceSignMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceSignMapper.java new file mode 100644 index 0000000..15d288b --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceSignMapper.java @@ -0,0 +1,37 @@ +package com.zcloud.mapper.datasource.eightwork; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * @author fangjiakai + * @date 2024/01/17 11:31 + */ +public interface ConfinedspaceSignMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + void saveBatch(List signers); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**根据动火ID查询签字列表 + * @throws Exception + */ + List listById(PageData pd); + + List listAll(PageData sign); + + /**根据动火ID查询未签字列表 + * @throws Exception + */ + List checkUnsigned(PageData sign); +} diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceToMeasuresMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceToMeasuresMapper.java new file mode 100644 index 0000000..c6b7733 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ConfinedspaceToMeasuresMapper.java @@ -0,0 +1,57 @@ +package com.zcloud.mapper.datasource.eightwork; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:动火措施中间表 + * 作者:luoxiaobao + * 时间:2021-09-18 + * 官网:www.zcloudchina.com + */ +public interface ConfinedspaceToMeasuresMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + void saveBatch(List signers); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + + List listAllMeasuresForSign(PageData pd); + + List listSignFinishMeasures(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasService.java b/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasService.java new file mode 100644 index 0000000..2e08a4b --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasService.java @@ -0,0 +1,60 @@ +package com.zcloud.service.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:有限气体检测 + * 作者:luoxiaobao + * 时间:2021-09-13 + * 官网:www.zcloudchina.com + */ +public interface ConfinedSpaceGasService { + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + public PageData gasEdit(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasWHService.java b/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasWHService.java new file mode 100644 index 0000000..19d8a46 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/ConfinedSpaceGasWHService.java @@ -0,0 +1,59 @@ +package com.zcloud.service.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:有限空间气体 + * 作者:luoxiaobao + * 时间:2022-08-11 + * 官网:www.zcloudchina.com + */ +public interface ConfinedSpaceGasWHService { + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + public void edittime(PageData pd)throws Exception; + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/ConfinedspaceService.java b/src/main/java/com/zcloud/service/eightwork/ConfinedspaceService.java new file mode 100644 index 0000000..7870a83 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/ConfinedspaceService.java @@ -0,0 +1,42 @@ +package com.zcloud.service.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * @author fangjiakai + * @date 2024/01/17 11:29 + */ +public interface ConfinedspaceService { + void save(PageData pd)throws Exception; + + void edit(PageData pd)throws Exception; + + void delete(PageData pd)throws Exception; + + List list(Page page) throws Exception; + + void nextStep(PageData pd, MultipartFile[] files) throws Exception; + + PageData findById(PageData pd) throws Exception; + + PageData listSignFinished(PageData pd) throws Exception; + + PageData checkWorkCount(PageData pd); + + //获取所有措施(bus_Confinedspace_measures) + List listAllMeasures() throws Exception; +// +// //获取需要签字的措施(bus_Confinedspacetomeasures) + List listAllMeasuresForSign(PageData pd) throws Exception; +// +// //获取所有签字完成的措施(bus_Confinedspacetomeasures) + List listSignFinishMeasures(PageData pd) throws Exception; + + void saveGas(PageData pd,MultipartFile[] files) throws Exception; + + List getFlowList(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasServiceImpl.java new file mode 100644 index 0000000..2f908cf --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasServiceImpl.java @@ -0,0 +1,89 @@ +package com.zcloud.service.eightwork.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.eightwork.ConfinedSpaceGasMapper; +import com.zcloud.service.eightwork.ConfinedSpaceGasService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:有限气体检测 + * 作者:luoxiaobao + * 时间:2021-09-13 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class ConfinedSpaceGasServiceImpl implements ConfinedSpaceGasService { + + @Autowired + private ConfinedSpaceGasMapper confinedspacegasMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + confinedspacegasMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + confinedspacegasMapper.delete(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + confinedspacegasMapper.edit(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return confinedspacegasMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return confinedspacegasMapper.listAll(pd); + } + + + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return confinedspacegasMapper.findById(pd); + } + + public PageData gasEdit(PageData pd)throws Exception{ + return confinedspacegasMapper.gasEdit(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + confinedspacegasMapper.deleteAll(ArrayDATA_IDS); + } + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasWHServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasWHServiceImpl.java new file mode 100644 index 0000000..4fb4994 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedSpaceGasWHServiceImpl.java @@ -0,0 +1,87 @@ +package com.zcloud.service.eightwork.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.eightwork.ConfinedSpaceGasWHMapper; +import com.zcloud.service.eightwork.ConfinedSpaceGasWHService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:有限空间气体 + * 作者:luoxiaobao + * 时间:2022-08-11 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class ConfinedSpaceGasWHServiceImpl implements ConfinedSpaceGasWHService { + + @Autowired + private ConfinedSpaceGasWHMapper confinedspacegaswhMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + confinedspacegaswhMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + confinedspacegaswhMapper.delete(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + confinedspacegaswhMapper.edit(pd); + } + + public void edittime(PageData pd)throws Exception{ + confinedspacegaswhMapper.edittime(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return confinedspacegaswhMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return confinedspacegaswhMapper.listAll(pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return confinedspacegaswhMapper.findById(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + confinedspacegaswhMapper.deleteAll(ArrayDATA_IDS); + } + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java new file mode 100644 index 0000000..581b2b9 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java @@ -0,0 +1,396 @@ +package com.zcloud.service.eightwork.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.eightwork.*; +import com.zcloud.service.eightwork.ConfinedspaceService; +import com.zcloud.util.Const; +import com.zcloud.util.DateUtil; +import com.zcloud.util.Smb; +import com.zcloud.util.UuidUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.text.DecimalFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author fangjiakai + * @date 2024/01/17 11:30 + */ +@Service +@Transactional //开启事物 +public class ConfinedspaceServiceImpl implements ConfinedspaceService { + + @Autowired + private ConfinedspaceMapper confinedspaceMapper; + @Autowired + private EightWorkTaskFlowMapper eightWorkTaskFlowMapper; + @Autowired + private EightWorkFlowLogMapper eightWorkFlowLogMapper; + @Autowired + private ConfinedspaceSignMapper confinedspaceSignMapper; + @Autowired + private ConfinedspaceToMeasuresMapper confinedspaceToMeasuresMapper; + @Autowired + private ConfinedSpaceGasMapper confinedspacegasMapper; + @Autowired + private Smb smb; + + private final String primary_key = "CONFINEDSPACE_ID"; + private final String work_type = "CONFINEDSPACE"; + @Override + @Transactional + public void save(PageData pd) throws Exception { + PageData pd2 = new PageData(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft=new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd2.put("CREATDATE",year + "-" + month + "-" + day); + pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID")); + pd2 = confinedspaceMapper.getCode(pd2); //根据ID读取 + String code = "SX" + year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString()) + 1)); + pd.put("CHECK_NO", code); + pd.put(primary_key, UuidUtil.get32UUID()); //主键 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + confinedspaceMapper.save(pd); + + if (pd.get("APPLY_STATUS").equals("1")) { + PageData flow = getStep(pd.get("TASK_ID"),"1"); + saveLog(pd,pd.getString("CREATOR"),"1"); + saveNextSigner(pd,flow); + } + } + + @Override + @Transactional + public void edit(PageData pd) throws Exception { + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + confinedspaceMapper.edit(pd); + + if (pd.get("APPLY_STATUS").equals("1")) { + pd.put("STEP_ID", 1); + confinedspaceMapper.editStep(pd); + PageData flow = getStep(pd.get("TASK_ID"),"1"); + saveLog(pd,pd.getString("CREATOR"),"1"); + saveNextSigner(pd,flow); + } + } + + @Override + public void delete(PageData pd) throws Exception { + confinedspaceMapper.delete(pd); + } + + @Override + public List list(Page page) throws Exception { + return confinedspaceMapper.datalistPage(page); + } + + + /* + * 下一步 + */ + @Override + @Transactional + public void nextStep(PageData pd, MultipartFile[] files) throws Exception { + PageData work = this.findById(pd); + work.putAll(pd); + List filePaths = new ArrayList<>(); + for (int i = 0; i < files.length; i++) { + //保存签名文件 + String ffile = DateUtil.getDays(); + String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + work.getString("CORPINFO_ID") + "/" + ffile); + filePaths.add(Const.FILEPATHFILE + work.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + } + PageData flow = getStep(work.get("TASK_ID"), work.get("STEP_ID")); + work.put("STEP_ID", flow.get("NEXT_STEP_ID")); + + + //保存签名信息 + PageData sign = new PageData(); + if(work.getString("IMG_PATH") != ""){ + sign.put("IMG_PATH", work.get("IMG_PATH")); + } + sign.put(primary_key, work.get(primary_key)); + sign.put("STEP_ID", work.get("STEP_ID")); + sign.put("SIGN_USER_ID", work.get("USER_ID")); + sign.put("SIGN_TIME", work.getString("SIGNTIME")); + sign.put("SIGN_PATH", String.join(",",filePaths)); + sign.put("DESCR", work.get("DESCR")); + + confinedspaceSignMapper.edit(sign); + + if (work.get("MEASURES") != null && !work.get("MEASURES").equals("")) { //安全措施确认步骤 + saveMeasures(work); + } + + List unsignedList = confinedspaceSignMapper.checkUnsigned(sign);//当前步骤未签名人列表 + if((unsignedList == null || unsignedList.size() == 0) && pd.getString("APPLY_STATUS").equals("1")){//如果没有未签人 则跳转下一步 + confinedspaceMapper.editStep(work); + PageData currentflow = getStep(work.get("TASK_ID"), work.get("STEP_ID")); + + //保存日志 + saveLog(work,work.getString("USER_ID"),"1"); + + if("99".equals(currentflow.getString("NEXT_STEP_ID"))){ + return; + } + if (work.get("PREPARERS") != null && !work.get("PREPARERS").equals("")) { //如果是设置安全措施确认人步骤 + savePreparers(work,currentflow); + } + saveNextSigner(work,currentflow); + }else if(pd.getString("APPLY_STATUS").equals("-1")){ + //保存日志 + saveLog(work,work.getString("USER_ID"),"-1"); + + work.put("STEP_ID",-1); + confinedspaceMapper.editStep(work); + } + } + + @Override + public PageData findById(PageData pd) throws Exception { + PageData pageData = confinedspaceMapper.findById(pd); + return pageData; + } + + @Override + public PageData listSignFinished(PageData pd) throws Exception { + Map> rmap = new HashMap<>(); + List varList = confinedspaceSignMapper.listAll(pd); + if (varList != null && !varList.isEmpty()) { + varList.stream().forEach(item -> { + PageData sign = new PageData(); + sign.put("SIGN_PATH", item.getString("SIGN_PATH").split(",")); + sign.put("SIGN_TIME", item.getString("SIGN_TIME").split(",")); + if(item.getString("IMG_PATH") != null || "".equals(item.getString("IMG_PATH"))){ + sign.put("IMG_PATH", item.getString("IMG_PATH").split(",")); + } + sign.put("DESCR", item.getString("DESCR") != null ? item.getString("DESCR") : "无"); + if(rmap.containsKey(item.getString("CODE"))){ + rmap.get(item.getString("CODE")).add(sign); + }else{ + List signs = new ArrayList<>(); + signs.add(sign); + rmap.put(item.getString("CODE"),signs); + } + }); + } + PageData rpd = new PageData(); + if (rmap != null && !rmap.isEmpty()) { + rpd.putAll(rmap); + } + return rpd; + } + + @Override + public PageData checkWorkCount(PageData pd) { + PageData rpd = new PageData(); + List varList = confinedspaceMapper.checkWorkCount(pd); + + if (varList != null && !varList.isEmpty()) { + Map newMap = varList.stream() + .collect(Collectors.toMap(map -> map.getString("CODE"), map -> map.getString("COUNT"))); + + rpd.putAll(newMap); + } + return rpd; + } + + @Override + public List listAllMeasures() throws Exception { + return confinedspaceMapper.listAllMeasures(); + + } + + @Override + public List listAllMeasuresForSign(PageData pd) throws Exception { + return confinedspaceToMeasuresMapper.listAllMeasuresForSign(pd); + + } + + @Override + public List listSignFinishMeasures(PageData pd) throws Exception { + return confinedspaceToMeasuresMapper.listSignFinishMeasures(pd); + } + + @Override + @Transactional + public void saveGas(PageData pd, MultipartFile[] files) throws Exception { + PageData work = confinedspaceMapper.findById(pd); + List filePaths = new ArrayList<>(); + for (int i = 0; i < files.length; i++) { + //保存签名文件 + String ffile = DateUtil.getDays(); + String fileName = UuidUtil.get32UUID() + files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(files[i], fileName, Const.FILEPATHFILE + work.getString("CORPINFO_ID") + "/" + ffile); + filePaths.add(Const.FILEPATHFILE + work.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + } + pd.put("CONFINEDSPACEGAS_ID", UuidUtil.get32UUID()); //主键 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + pd.put("SIGN_PATH", String.join(",",filePaths)); + confinedspacegasMapper.save(pd); + confinedspaceMapper.editGasTime(pd);//修改最后一次气体检测时间 + + PageData flow = getStep(work.get("TASK_ID"), work.get("STEP_ID")); + if (pd.get("APPLY_STATUS").equals("1")) { //如果通过 + if(flow.get("NEXT_STEP_ID") != null && flow.getString("NEXT_STEP_ID").equals("2")) {//如果为气体检测步骤,则保存日志并跳转下一步 + PageData sign = new PageData(); + sign.put(primary_key, work.get(primary_key)); + sign.put("STEP_ID", 2); + sign.put("SIGN_USER_ID", pd.get("USER_ID")); + sign.put("SIGN_TIME", DateUtil.date2Str(new Date())); + sign.put("SIGN_PATH", String.join(",", filePaths)); + sign.put("DESCR", pd.get("DESCR")); + confinedspaceSignMapper.edit(sign); + work.put("STEP_ID", flow.get("NEXT_STEP_ID")); + confinedspaceMapper.editStep(work); + + //保存日志 + saveLog(work, work.getString("USER_ID"), "1"); + + //预存下一步 + PageData currentflow = getStep(work.get("TASK_ID"), work.get("STEP_ID")); + saveNextSigner(work, currentflow); + } + }else if(pd.getString("APPLY_STATUS").equals("-1")){ + PageData sign = new PageData(); + sign.put(primary_key, work.get(primary_key)); + sign.put("STEP_ID", 2); + sign.put("SIGN_USER_ID", pd.get("USER_ID")); + sign.put("SIGN_TIME", DateUtil.date2Str(new Date())); + sign.put("SIGN_PATH", String.join(",", filePaths)); + sign.put("DESCR", pd.get("DESCR")); + confinedspaceSignMapper.edit(sign); + //保存日志 + work.put("STEP_ID", flow.get("NEXT_STEP_ID")); + saveLog(work,pd.getString("USER_ID"),"-2"); + work.put("STEP_ID",-1); + confinedspaceMapper.editStep(work); + + } + } + + @Override + public List getFlowList(PageData pd) throws Exception { + pd=findById(pd); + return confinedspaceMapper.getFlowList(pd); + } + + private void saveNextSigner(PageData pd,PageData flow) throws Exception { + + pd.put("STEP_ID",flow.get("NEXT_STEP_ID")); + + if(pd.get(flow.get("NEXT_ACTOR_FIELD")) == null || pd.get(flow.get("NEXT_ACTOR_FIELD")).equals("")){ + return; + } + //提前保存下一步签字人 + List signers = new ArrayList<>(); + PageData signer = new PageData(); + signer.put("CONFINEDSPACE_SIGN_ID", UuidUtil.get32UUID()); // 主键 + signer.put(primary_key, pd.get(primary_key)); + signer.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + signer.put("SIGN_USER_ID", pd.get(flow.get("NEXT_ACTOR_FIELD"))); + signer.put("STEP_ID", flow.get("NEXT_STEP_ID")); + signers.add(signer); + confinedspaceSignMapper.saveBatch(signers); + } + + private void saveMeasures(PageData pd) { + List list = (List) JSON.parse(pd.get("MEASURES").toString()); + for (JSONObject json : list) { + PageData measure = new PageData(); + measure.put("CONFINEDSPACETOMEASURES_ID",json.get("CONFINEDSPACETOMEASURES_ID")); + measure.put("STATUS", json.get("STATUS")); + measure.put("ANSWER1", json.get("ANSWER1")); + measure.put("ANSWER2", json.get("ANSWER2")); + measure.put("ANSWER3", json.get("ANSWER3")); + measure.put("ANSWER4", json.get("ANSWER4")); + measure.put("SIGN_PATH", json.get("SIGN_PATH")); + measure.put("SIGN_TIME", json.get("SIGN_TIME")); + measure.put("IMG_PATH", json.get("IMG_PATH")); + confinedspaceToMeasuresMapper.edit(measure); + } + } + + private void savePreparers(PageData pd,PageData flow) { + List signers = new ArrayList<>(); + List list = (List) JSON.parse(pd.get("PREPARERS").toString()); + for (JSONObject json : list) { + PageData preparer = new PageData(); + preparer.put("CONFINEDSPACETOMEASURES_ID", UuidUtil.get32UUID()); // 主键 + preparer.put("CONFINEDSPACE_ID", pd.get("CONFINEDSPACE_ID")); + preparer.put("BUS_CONFINEDSPACE_MEASURES_ID", json.get("BUS_CONFINEDSPACE_MEASURES_ID")); + preparer.put("CONFIRM_ID", json.get("USER_ID")); + signers.add(preparer); + } + if(signers.size() > 0){ + confinedspaceToMeasuresMapper.saveBatch(signers); + + //获取所有需要签名人 + List fieldList = signers.stream() + .map(map -> map.getString("CONFIRM_ID")) + .collect(Collectors.toList()); + Set fieldSet = new HashSet<>(fieldList); //去重 + + List uniqueList = new ArrayList<>(fieldSet); + List nextSigners = new ArrayList<>(); + uniqueList.forEach(item -> { // 保存下一步需要签名的人 + PageData signer = new PageData(); + signer.put("CONFINEDSPACE_SIGN_ID", UuidUtil.get32UUID()); // 主键 + signer.put(primary_key, pd.get(primary_key)); + signer.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + signer.put("SIGN_USER_ID", item); + signer.put("STEP_ID", flow.get("NEXT_STEP_ID")); + nextSigners.add(signer); + }); + + confinedspaceSignMapper.saveBatch(nextSigners); + } + } + + private PageData getStep(Object TASK_ID, Object STEP_ID) throws Exception { + PageData flow = new PageData(); + flow.put("TASK_ID", TASK_ID); + flow.put("STEP_ID", STEP_ID); + flow = eightWorkTaskFlowMapper.getStep(flow); + return flow; + } + + private void saveLog(PageData pd,String act_user,String status) throws Exception { + PageData log = new PageData(); + log.put("LOG_ID", UuidUtil.get32UUID()); + log.put("WORK_ID", pd.get(primary_key)); + log.put("TASK_ID", pd.get("TASK_ID")); + log.put("STEP_ID", pd.get("STEP_ID")); + log.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + log.put("CHECK_NO", pd.get("CHECK_NO")); + log.put("ACT_USER", act_user); + log.put("ACT_TIME", DateUtil.date2Str(new Date())); + log.put("STATUS", status); + log.put("WORK_TYPE",work_type); + eightWorkFlowLogMapper.save(log); + } + +// private void saveNext(PageData pd,PageData flow) throws Exception { +// PageData log = new PageData(); +// log.put("LOG_ID", UuidUtil.get32UUID()); +// log.put("WORK_ID", pd.get(primary_key)); +// log.put("TASK_ID", pd.get("TASK_ID")); +// log.put("STEP_ID", flow.get("NEXT_STEP_ID")); +// log.put("STATUS", "0"); +// eightWorkFlowLogMapper.save(log); +// } + +} diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasMapper.xml new file mode 100644 index 0000000..553cf16 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasMapper.xml @@ -0,0 +1,174 @@ + + + + + + + BUS_CONFINEDSPACEGAS + + + + + SYS_DICTIONARIES + + + + + f.CONFINEDSPACE_ID, + f.ANALYZE_TIME, + f.ANALYZE_PLACE, + f.ANALYZE_USER, + f.HARMFUL_MATERIALS, + f.COMBUSTIBLE_GAS, + f.OXYGEN_CONTENT, + f.ISDELETE, + f.DATA1, + f.DATA2, + f.DATA3, + f.DATA4, + f.CONFINEDSPACEGAS_ID, + f.SIGN_PATH + + + + + CONFINEDSPACE_ID, + ANALYZE_TIME, + ANALYZE_PLACE, + ANALYZE_USER, + HARMFUL_MATERIALS, + COMBUSTIBLE_GAS, + OXYGEN_CONTENT, + ISDELETE, + DATA1, + DATA2, + DATA3, + DATA4, + CONFINEDSPACEGAS_ID, + SIGN_PATH + + + + + #{CONFINEDSPACE_ID}, + #{ANALYZE_TIME}, + #{ANALYZE_PLACE}, + #{ANALYZE_USER}, + #{HARMFUL_MATERIALS}, + #{COMBUSTIBLE_GAS}, + #{OXYGEN_CONTENT}, + #{ISDELETE}, + #{DATA1}, + #{DATA2}, + #{DATA3}, + #{DATA4}, + #{CONFINEDSPACEGAS_ID}, + #{SIGN_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACEGAS_ID = #{CONFINEDSPACEGAS_ID} + + + + + update + + set + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}, + ANALYZE_TIME = #{ANALYZE_TIME}, + ANALYZE_PLACE = #{ANALYZE_PLACE}, + ANALYZE_USER = #{ANALYZE_USER}, + HARMFUL_MATERIALS = #{HARMFUL_MATERIALS}, + COMBUSTIBLE_GAS = #{COMBUSTIBLE_GAS}, + OXYGEN_CONTENT = #{OXYGEN_CONTENT}, + ISDELETE = #{ISDELETE}, + DATA1 = #{DATA1}, + DATA2 = #{DATA2}, + DATA3 = #{DATA3}, + DATA4 = #{DATA4}, + CONFINEDSPACEGAS_ID = CONFINEDSPACEGAS_ID, + SIGN_PATH = #{SIGN_PATH} + where + CONFINEDSPACEGAS_ID = #{CONFINEDSPACEGAS_ID} + + + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACEGAS_ID in + + #{item} + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasWHMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasWHMapper.xml new file mode 100644 index 0000000..e2e75d6 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedSpaceGasWHMapper.xml @@ -0,0 +1,161 @@ + + + + + + + BUS_CONFINEDSPACEGASWH + + + + + SYS_DICTIONARIES + + + + + f.CONFINEDSPACE_ID, + f.GAS_NAME1, + f.GAS_STANDARD1, + f.GAS_NAME2, + f.GAS_STANDARD2, + f.GAS_NAME3, + f.GAS_STANDARD3, + f.GAS_NAME4, + f.GAS_STANDARD4, + f.CONFINEDSPACEGASWH_ID, + f.OPERATTIME + + + + + CONFINEDSPACE_ID, + GAS_NAME1, + GAS_STANDARD1, + GAS_NAME2, + GAS_STANDARD2, + GAS_NAME3, + GAS_STANDARD3, + GAS_NAME4, + GAS_STANDARD4, + CONFINEDSPACEGASWH_ID, + OPERATTIME + + + + + #{CONFINEDSPACE_ID}, + #{GAS_NAME1}, + #{GAS_STANDARD1}, + #{GAS_NAME2}, + #{GAS_STANDARD2}, + #{GAS_NAME3}, + #{GAS_STANDARD3}, + #{GAS_NAME4}, + #{GAS_STANDARD4}, + #{CONFINEDSPACEGASWH_ID}, + #{OPERATTIME} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACEGASWH_ID = #{CONFINEDSPACEGASWH_ID} + + + + + update + + set + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}, + GAS_NAME1 = #{GAS_NAME1}, + GAS_STANDARD1 = #{GAS_STANDARD1}, + GAS_NAME2 = #{GAS_NAME2}, + GAS_STANDARD2 = #{GAS_STANDARD2}, + GAS_NAME3 = #{GAS_NAME3}, + GAS_STANDARD3 = #{GAS_STANDARD3}, + GAS_NAME4 = #{GAS_NAME4}, + GAS_STANDARD4 = #{GAS_STANDARD4}, + CONFINEDSPACEGASWH_ID = CONFINEDSPACEGASWH_ID, + OPERATTIME = #{OPERATTIME} + where + CONFINEDSPACEGASWH_ID = #{CONFINEDSPACEGASWH_ID} + + + + + update + + set + OPERATTIME = #{OPERATTIME} + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACEGASWH_ID in + + #{item} + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml new file mode 100644 index 0000000..a1898a2 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml @@ -0,0 +1,493 @@ + + + + + + BUS_CONFINEDSPACE + + + + + f.CONFINEDSPACE_ID, + f.CORPINFO_ID, + f.TASK_ID, + f.STEP_ID, + f.ISDELETE, + f.CREATTIME, + f.CREATOR, + f.OPERATTIME, + f.OPERATOR, + f.CHECK_NO, + f.WORK_CONTENT, + f.APPLY_DEPARTMENT_ID, + f.APPLY_USER_ID, + f.WORK_START_DATE, + f.WORK_END_DATE, + f.WORK_USER_ID, + f.SPECIAL_WORK, + f.RISK_IDENTIFICATION, + f.ANALYZE_DEPARTMENT_ID, + f.ANALYZE_USER_ID, + f.CONFESS_DEPARTMENT_ID, + f.CONFESS_USER_ID, + f.ACCEPT_CONFESS_DEPARTMENT_ID, + f.ACCEPT_CONFESS_USER_ID, + f.GUARDIAN_DEPARTMENT_ID, + f.GUARDIAN_USER_ID, + f.CONFIRM_DEPARTMENT_ID, + f.CONFIRM_USER_ID, + f.LEADER_DEPARTMENT_ID, + f.LEADER_USER_ID, + f.ACCEPT_DEPARTMENT_ID, + f.ACCEPT_USER_ID, + f.ANALYZE_TIME, + f.WORK_START_DEPARTMENT_ID, + f.WORK_START_USER_ID, + f.WORK_END_DEPARTMENT_ID, + f.WORK_END_USER_ID, + f.ACCEPT_TIME, + f.PLS_ID, + f.PLS_NAME, + f.MEDIUM_NAME, + f.LIMITSPACE_ID, + f.WORK_USER_DEPARTMENT_ID, + f.LONGITUDE, + f.LATITUDE + + + + + CONFINEDSPACE_ID, + CORPINFO_ID, + TASK_ID, + STEP_ID, + ISDELETE, + CREATTIME, + CREATOR, + OPERATTIME, + OPERATOR, + CHECK_NO, + WORK_CONTENT, + APPLY_DEPARTMENT_ID, + APPLY_USER_ID, + WORK_START_DATE, + WORK_END_DATE, + WORK_USER_ID, + SPECIAL_WORK, + RISK_IDENTIFICATION, + ANALYZE_DEPARTMENT_ID, + ANALYZE_USER_ID, + CONFESS_DEPARTMENT_ID, + CONFESS_USER_ID, + ACCEPT_CONFESS_DEPARTMENT_ID, + ACCEPT_CONFESS_USER_ID, + GUARDIAN_DEPARTMENT_ID, + GUARDIAN_USER_ID, + CONFIRM_DEPARTMENT_ID, + CONFIRM_USER_ID, + LEADER_DEPARTMENT_ID, + LEADER_USER_ID, + ACCEPT_DEPARTMENT_ID, + ACCEPT_USER_ID, + ANALYZE_TIME, + WORK_START_DEPARTMENT_ID, + WORK_START_USER_ID, + WORK_END_DEPARTMENT_ID, + WORK_END_USER_ID, + ACCEPT_TIME, + PLS_ID, + PLS_NAME, + MEDIUM_NAME, + LIMITSPACE_ID, + WORK_USER_DEPARTMENT_ID, + LONGITUDE, + LATITUDE + + + + + #{CONFINEDSPACE_ID}, + #{CORPINFO_ID}, + #{TASK_ID}, + #{STEP_ID}, + #{ISDELETE}, + #{CREATTIME}, + #{CREATOR}, + #{OPERATTIME}, + #{OPERATOR}, + #{CHECK_NO}, + #{WORK_CONTENT}, + #{APPLY_DEPARTMENT_ID}, + #{APPLY_USER_ID}, + #{WORK_START_DATE}, + #{WORK_END_DATE}, + #{WORK_USER_ID}, + #{SPECIAL_WORK}, + #{RISK_IDENTIFICATION}, + #{ANALYZE_DEPARTMENT_ID}, + #{ANALYZE_USER_ID}, + #{CONFESS_DEPARTMENT_ID}, + #{CONFESS_USER_ID}, + #{ACCEPT_CONFESS_DEPARTMENT_ID}, + #{ACCEPT_CONFESS_USER_ID}, + #{GUARDIAN_DEPARTMENT_ID}, + #{GUARDIAN_USER_ID}, + #{CONFIRM_DEPARTMENT_ID}, + #{CONFIRM_USER_ID}, + #{LEADER_DEPARTMENT_ID}, + #{LEADER_USER_ID}, + #{ACCEPT_DEPARTMENT_ID}, + #{ACCEPT_USER_ID}, + #{ANALYZE_TIME}, + #{WORK_START_DEPARTMENT_ID}, + #{WORK_START_USER_ID}, + #{WORK_END_DEPARTMENT_ID}, + #{WORK_END_USER_ID}, + #{ACCEPT_TIME}, + #{PLS_ID}, + #{PLS_NAME}, + #{MEDIUM_NAME}, + #{LIMITSPACE_ID}, + #{WORK_USER_DEPARTMENT_ID}, + #{LONGITUDE}, + #{LATITUDE} + + + + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + + update + + set + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}, + CORPINFO_ID = #{CORPINFO_ID}, + TASK_ID = #{TASK_ID}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + CHECK_NO = #{CHECK_NO}, + WORK_CONTENT = #{WORK_CONTENT}, + APPLY_DEPARTMENT_ID = #{APPLY_DEPARTMENT_ID}, + APPLY_USER_ID = #{APPLY_USER_ID}, + WORK_START_DATE = #{WORK_START_DATE}, + WORK_END_DATE = #{WORK_END_DATE}, + WORK_USER_ID = #{WORK_USER_ID}, + SPECIAL_WORK = #{SPECIAL_WORK}, + RISK_IDENTIFICATION = #{RISK_IDENTIFICATION}, + ANALYZE_DEPARTMENT_ID = #{ANALYZE_DEPARTMENT_ID}, + ANALYZE_USER_ID = #{ANALYZE_USER_ID}, + CONFESS_DEPARTMENT_ID = #{CONFESS_DEPARTMENT_ID}, + CONFESS_USER_ID = #{CONFESS_USER_ID}, + ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID}, + ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}, + GUARDIAN_DEPARTMENT_ID = #{GUARDIAN_DEPARTMENT_ID}, + GUARDIAN_USER_ID = #{GUARDIAN_USER_ID}, + CONFIRM_DEPARTMENT_ID = #{CONFIRM_DEPARTMENT_ID}, + CONFIRM_USER_ID = #{CONFIRM_USER_ID}, + LEADER_DEPARTMENT_ID = #{LEADER_DEPARTMENT_ID}, + LEADER_USER_ID = #{LEADER_USER_ID}, + ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}, + ACCEPT_USER_ID = #{ACCEPT_USER_ID}, + ANALYZE_TIME=#{ANALYZE_TIME}, + WORK_START_DEPARTMENT_ID=#{WORK_START_DEPARTMENT_ID}, + WORK_START_USER_ID=#{WORK_START_USER_ID}, + WORK_END_DEPARTMENT_ID=#{WORK_END_DEPARTMENT_ID}, + WORK_END_USER_ID=#{WORK_END_USER_ID}, + ACCEPT_TIME = #{ACCEPT_TIME}, + PLS_ID = #{PLS_ID}, + PLS_NAME = #{PLS_NAME}, + MEDIUM_NAME = #{MEDIUM_NAME}, + LIMITSPACE_ID = #{LIMITSPACE_ID}, + WORK_USER_DEPARTMENT_ID =#{WORK_USER_DEPARTMENT_ID}, + LONGITUDE =#{LONGITUDE}, + LATITUDE =#{LATITUDE} + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + update + + set + ANALYZE_TIME = #{ANALYZE_TIME} + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + + + + update + + set + + WORK_START_DATE = #{WORK_START_DATE}, + + + WORK_END_DATE = #{WORK_END_DATE}, + + + ACCEPT_TIME = #{ACCEPT_TIME}, + + STEP_ID = #{STEP_ID} + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceSignMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceSignMapper.xml new file mode 100644 index 0000000..2384869 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceSignMapper.xml @@ -0,0 +1,140 @@ + + + + + + + BUS_CONFINEDSPACE_SIGN + + + + + SYS_DICTIONARIES + + + + + f.Confinedspace_SIGN_ID, + f.CONFINEDSPACE_ID, + f.CORPINFO_ID, + f.SIGN_USER_ID, + f.SIGN_PATH, + f.SIGN_TIME, + f.DESCR, + f.STEP_ID, + f.IMG_PATH + + + + + CONFINEDSPACE_SIGN_ID, + CONFINEDSPACE_ID, + CORPINFO_ID, + SIGN_USER_ID, + SIGN_PATH, + SIGN_TIME, + DESCR, + STEP_ID, + IMG_PATH + + + + + #{CONFINEDSPACE_SIGN_ID}, + #{CONFINEDSPACE_ID}, + #{CORPINFO_ID}, + #{SIGN_USER_ID}, + #{SIGN_PATH}, + #{SIGN_TIME}, + #{DESCR}, + #{STEP_ID}, + #{IMG_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + insert into + + ( + CONFINEDSPACE_SIGN_ID, + CONFINEDSPACE_ID, + CORPINFO_ID, + SIGN_USER_ID, + STEP_ID + ) values + + (#{item.CONFINEDSPACE_SIGN_ID}, + #{item.CONFINEDSPACE_ID}, + #{item.CORPINFO_ID}, + #{item.SIGN_USER_ID}, + #{item.STEP_ID}) + + + + + + update + + set + DESCR = #{DESCR}, + SIGN_PATH = #{SIGN_PATH}, + SIGN_TIME= #{SIGN_TIME}, + IMG_PATH = #{IMG_PATH} + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} and SIGN_USER_ID = #{SIGN_USER_ID} and STEP_ID = #{STEP_ID} + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceToMeasuresMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceToMeasuresMapper.xml new file mode 100644 index 0000000..a9f2e05 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceToMeasuresMapper.xml @@ -0,0 +1,154 @@ + + + + + + + BUS_CONFINEDSPACETOMEASURES + + + + + SYS_DICTIONARIES + + + + + f.CONFINEDSPACE_ID, + f.BUS_CONFINEDSPACE_MEASURES_ID, + f.STATUS, + f.CONFINEDSPACETOMEASURES_ID, + f.CONFIRM_ID, + f.SIGN_PATH, + f.SIGN_TIME, + f.IMG_PATH + + + + + CONFINEDSPACE_ID, + BUS_CONFINEDSPACE_MEASURES_ID, + STATUS, + CONFINEDSPACETOMEASURES_ID, + CONFIRM_ID, + SIGN_PATH, + IMG_PATH + + + + + #{CONFINEDSPACE_ID}, + #{BUS_CONFINEDSPACE_MEASURES_ID}, + #{STATUS}, + #{CONFINEDSPACETOMEASURES_ID}, + #{CONFIRM_ID}, + #{SIGN_PATH}, + #{IMG_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + insert into + + ( + CONFINEDSPACE_ID, + BUS_CONFINEDSPACE_MEASURES_ID, + CONFINEDSPACETOMEASURES_ID, + CONFIRM_ID + ) values + + ( + #{item.CONFINEDSPACE_ID}, + #{item.BUS_CONFINEDSPACE_MEASURES_ID}, + #{item.CONFINEDSPACETOMEASURES_ID}, + #{item.CONFIRM_ID} + ) + + + + + + delete from + + where + CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} + + + + + update + + set + STATUS = #{STATUS}, + SIGN_PATH = #{SIGN_PATH}, + IMG_PATH = #{IMG_PATH}, + SIGN_TIME = #{SIGN_TIME} + where + CONFINEDSPACETOMEASURES_ID = #{CONFINEDSPACETOMEASURES_ID} + + + + + + + + + + + update + + set + ISDELETE = '1' + where + CONFINEDSPACETOMEASURES_ID in + + #{item} + + + + + + + + +