From cbad06c6dcb3b73319af61e72c7e622696294a0f Mon Sep 17 00:00:00 2001 From: chenxinying <1039655633@qq.com> Date: Thu, 22 Feb 2024 11:35:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E7=94=A8=E7=94=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eightwork/AppElertricityController.java | 282 ++++++++ .../eightwork/ElectricityGasMapper.java | 59 ++ .../eightwork/ElectricityMapper.java | 34 + .../eightwork/ElectricitySignMapper.java | 37 ++ .../ElectricityToMeasuresMapper.java | 57 ++ .../eightwork/ElectricityGasService.java | 59 ++ .../service/eightwork/ElectricityService.java | 45 ++ .../impl/ConfinedspaceServiceImpl.java | 1 + .../impl/ElectricityGasServiceImpl.java | 83 +++ .../impl/ElectricityServiceImpl.java | 428 +++++++++++++ .../eightwork/impl/HighworkServiceImpl.java | 3 +- .../eightwork/ConfinedspaceMapper.xml | 3 +- .../eightwork/EightWorkTaskMapper.xml | 5 +- .../eightwork/ElectricityGasMapper.xml | 141 ++++ .../eightwork/ElectricityMapper.xml | 602 ++++++++++++++++++ .../eightwork/ElectricitySignMapper.xml | 140 ++++ .../eightwork/ElectricityToMeasuresMapper.xml | 156 +++++ .../datasource/eightwork/HighWorkMapper.xml | 1 + .../datasource/eightwork/HotWorkMapper.xml | 3 +- 19 files changed, 2135 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/zcloud/controller/eightwork/AppElertricityController.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityGasMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricitySignMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityToMeasuresMapper.java create mode 100644 src/main/java/com/zcloud/service/eightwork/ElectricityGasService.java create mode 100644 src/main/java/com/zcloud/service/eightwork/ElectricityService.java create mode 100644 src/main/java/com/zcloud/service/eightwork/impl/ElectricityGasServiceImpl.java create mode 100644 src/main/java/com/zcloud/service/eightwork/impl/ElectricityServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/eightwork/ElectricityGasMapper.xml create mode 100644 src/main/resources/mybatis/datasource/eightwork/ElectricityMapper.xml create mode 100644 src/main/resources/mybatis/datasource/eightwork/ElectricitySignMapper.xml create mode 100644 src/main/resources/mybatis/datasource/eightwork/ElectricityToMeasuresMapper.xml diff --git a/src/main/java/com/zcloud/controller/eightwork/AppElertricityController.java b/src/main/java/com/zcloud/controller/eightwork/AppElertricityController.java new file mode 100644 index 0000000..12e454f --- /dev/null +++ b/src/main/java/com/zcloud/controller/eightwork/AppElertricityController.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.ElectricityGasService; +import com.zcloud.service.eightwork.ElectricityService; +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/electricity") +public class AppElertricityController extends BaseController { + + @Autowired + private ElectricityService electricityService; + @Autowired + private ElectricityGasService electricityGasService; + /** + * 新增 + * @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(); + electricityService.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(); + electricityService.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(); + electricityService.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 = electricityService.list(page); //列出electricity列表 + 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 = electricityService.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 = electricityService.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)); + } + electricityService.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",electricityService.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 = electricityService.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 = electricityService.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 = electricityService.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)); + } + electricityService.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 = electricityGasService.listAll(pd); //列出electricity列表 + 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(); + electricityGasService.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 = electricityService.getFlowList(pd); + map.put("flowList", flowList); + map.put("result", errInfo); //返回结果 + return map; + } + +} diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityGasMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityGasMapper.java new file mode 100644 index 0000000..0b1b784 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityGasMapper.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 + * 时间:2021-09-08 + * 官网:www.zcloudchina.com + */ +public interface ElectricityGasMapper { + + /**新增 + * @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); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityMapper.java new file mode 100644 index 0000000..dbbc48a --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityMapper.java @@ -0,0 +1,34 @@ +package com.zcloud.mapper.datasource.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:临时用电作业 + * 作者:luoxiaobao + * 时间:2021-09-08 + * 官网:www.zcloudchina.com + */ +public interface ElectricityMapper { + + 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); + void setPosition(PageData pd); + List datalistPage(Page page); + + List listAllMeasures(); + + List checkWorkCount(PageData pd); + + List getFlowList(PageData pd); + + List getMapList(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricitySignMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricitySignMapper.java new file mode 100644 index 0000000..fc6fddd --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricitySignMapper.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 ElectricitySignMapper { + + /**新增 + * @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/ElectricityToMeasuresMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityToMeasuresMapper.java new file mode 100644 index 0000000..ad64d38 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/ElectricityToMeasuresMapper.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 ElectricityToMeasuresMapper { + + /**新增 + * @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/ElectricityGasService.java b/src/main/java/com/zcloud/service/eightwork/ElectricityGasService.java new file mode 100644 index 0000000..6c7cb97 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/ElectricityGasService.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 + * 时间:2021-09-08 + * 官网:www.zcloudchina.com + */ +public interface ElectricityGasService { + + /**新增 + * @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; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/ElectricityService.java b/src/main/java/com/zcloud/service/eightwork/ElectricityService.java new file mode 100644 index 0000000..3f1e9e3 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/ElectricityService.java @@ -0,0 +1,45 @@ +package com.zcloud.service.eightwork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.util.ReturnMap; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * @author fangjiakai + * @date 2024/01/17 11:29 + */ +public interface ElectricityService { + 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_Electricity_measures) + List listAllMeasures() throws Exception; +// +// //获取需要签字的措施(bus_Electricitytomeasures) + List listAllMeasuresForSign(PageData pd) throws Exception; +// +// //获取所有签字完成的措施(bus_Electricitytomeasures) + List listSignFinishMeasures(PageData pd) throws Exception; + + void saveGas(PageData pd,MultipartFile[] files) throws Exception; + + List getFlowList(PageData pd)throws Exception; + + ReturnMap getMapList()throws Exception; +} diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java index e5f79de..0dfe872 100644 --- a/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java +++ b/src/main/java/com/zcloud/service/eightwork/impl/ConfinedspaceServiceImpl.java @@ -233,6 +233,7 @@ public class ConfinedspaceServiceImpl implements ConfinedspaceService { @Transactional public void saveGas(PageData pd, MultipartFile[] files) throws Exception { PageData work = confinedspaceMapper.findById(pd); + work.putAll(pd); List filePaths = new ArrayList<>(); for (int i = 0; i < files.length; i++) { //保存签名文件 diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ElectricityGasServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ElectricityGasServiceImpl.java new file mode 100644 index 0000000..0c50b6c --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/ElectricityGasServiceImpl.java @@ -0,0 +1,83 @@ +package com.zcloud.service.eightwork.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.eightwork.ElectricityGasMapper; +import com.zcloud.service.eightwork.ElectricityGasService; +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-08 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class ElectricityGasServiceImpl implements ElectricityGasService { + + @Autowired + private ElectricityGasMapper electricitygasMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + electricitygasMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + electricitygasMapper.delete(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + electricitygasMapper.edit(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return electricitygasMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return electricitygasMapper.listAll(pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return electricitygasMapper.findById(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + electricitygasMapper.deleteAll(ArrayDATA_IDS); + } + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/impl/ElectricityServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/ElectricityServiceImpl.java new file mode 100644 index 0000000..cf7de02 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/ElectricityServiceImpl.java @@ -0,0 +1,428 @@ +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.ElectricityService; +import com.zcloud.util.*; +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 ElectricityServiceImpl implements ElectricityService { + + @Autowired + private ElectricityMapper electricityMapper; + @Autowired + private EightWorkTaskFlowMapper eightWorkTaskFlowMapper; + @Autowired + private EightWorkFlowLogMapper eightWorkFlowLogMapper; + @Autowired + private ElectricitySignMapper electricitySignMapper; + @Autowired + private ElectricityToMeasuresMapper electricityToMeasuresMapper; + @Autowired + private ElectricityGasMapper electricitygasMapper; + @Autowired + private com.zcloud.mapper.datasource.eightWork.EightWorkVideoManagerMapper eightworkvideomanagerMapper; + @Autowired + private Smb smb; + + private final String primary_key = "ELECTRICITY_ID"; + private final String work_type = "ELECTRICITY"; + @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 = electricityMapper.getCode(pd2); //根据ID读取 + String code = "LS" + 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-否 + electricityMapper.save(pd); + + + + if (pd.get("APPLY_STATUS").equals("1")) { +// PageData flow = getStep(pd.get("TASK_ID"),"1"); + saveLog(pd,pd.getString("CREATOR"),"1"); + PageData flow = getCurrentFlow(pd); + pd.put("STEP_ID", flow.get("STEP_ID")); + electricityMapper.editStep(pd); + saveNextSigner(pd,flow); + setPosition(pd); + } + } + + @Override + @Transactional + public void edit(PageData pd) throws Exception { + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + electricityMapper.edit(pd); + + if (pd.get("APPLY_STATUS").equals("1")) { + pd.put("STEP_ID", 1); + electricityMapper.editStep(pd); + PageData flow = getStep(pd.get("TASK_ID"),"1"); + saveLog(pd,pd.getString("CREATOR"),"1"); + saveNextSigner(pd,flow); + setPosition(pd); + } + } + + @Override + public void delete(PageData pd) throws Exception { + electricityMapper.delete(pd); + } + + @Override + public List list(Page page) throws Exception { + return electricityMapper.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")); + + electricitySignMapper.edit(sign); + + if (work.get("MEASURES") != null && !work.get("MEASURES").equals("")) { //安全措施确认步骤 + saveMeasures(work); + } + + List unsignedList = electricitySignMapper.checkUnsigned(sign);//当前步骤未签名人列表 + if((unsignedList == null || unsignedList.size() == 0) && pd.getString("APPLY_STATUS").equals("1")){//如果没有未签人 则跳转下一步 + electricityMapper.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"))){ + eightworkvideomanagerMapper.editStatus(work); + + 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"); + eightworkvideomanagerMapper.editStatus(work); + + work.put("STEP_ID",-1); + electricityMapper.editStep(work); + } + } + + @Override + public PageData findById(PageData pd) throws Exception { + PageData pageData = electricityMapper.findById(pd); + return pageData; + } + + @Override + public PageData listSignFinished(PageData pd) throws Exception { + Map> rmap = new HashMap<>(); + List varList = electricitySignMapper.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 = electricityMapper.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 electricityMapper.listAllMeasures(); + + } + + @Override + public List listAllMeasuresForSign(PageData pd) throws Exception { + return electricityToMeasuresMapper.listAllMeasuresForSign(pd); + + } + + @Override + public List listSignFinishMeasures(PageData pd) throws Exception { + return electricityToMeasuresMapper.listSignFinishMeasures(pd); + } + + @Override + @Transactional + public void saveGas(PageData pd, MultipartFile[] files) throws Exception { + PageData work = electricityMapper.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); + } + pd.put("ELECTRICITYGAS_ID", UuidUtil.get32UUID()); //主键 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + pd.put("SIGN_PATH", String.join(",",filePaths)); + electricitygasMapper.save(pd); + electricityMapper.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")); + electricitySignMapper.edit(sign); + work.put("STEP_ID", flow.get("NEXT_STEP_ID")); + electricityMapper.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")); + electricitySignMapper.edit(sign); + //保存日志 + eightworkvideomanagerMapper.editStatus(work); + + work.put("STEP_ID", flow.get("NEXT_STEP_ID")); + saveLog(work,pd.getString("USER_ID"),"-2"); + work.put("STEP_ID",-1); + electricityMapper.editStep(work); + + } + } + + @Override + public List getFlowList(PageData pd) throws Exception { + pd=findById(pd); + return electricityMapper.getFlowList(pd); + } + + @Override + public ReturnMap getMapList() throws Exception { + ReturnMap returnMap = new ReturnMap(); + PageData pd = new PageData(); + pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); + returnMap.put("varList",electricityMapper.getMapList(pd)); + return returnMap; + } + + 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("ELECTRICITY_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); + electricitySignMapper.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("ELECTRICITYTOMEASURES_ID",json.get("ELECTRICITYTOMEASURES_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("SIGN_PATH", json.get("SIGN_PATH")); + measure.put("SIGN_TIME", json.get("SIGN_TIME")); + measure.put("IMG_PATH", json.get("IMG_PATH")); + electricityToMeasuresMapper.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("ELECTRICITYTOMEASURES_ID", UuidUtil.get32UUID()); // 主键 + preparer.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID")); + preparer.put("BUS_ELECTRICITY_MEASURES_ID", json.get("BUS_ELECTRICITY_MEASURES_ID")); + preparer.put("CONFIRM_ID", json.get("USER_ID")); + signers.add(preparer); + } + if(signers.size() > 0){ + electricityToMeasuresMapper.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("ELECTRICITY_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); + }); + + electricitySignMapper.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 PageData getCurrentFlow(PageData pd) throws Exception { + PageData flow = new PageData(); + flow.put("TASK_ID", pd.get("TASK_ID")); + flow.put("STEP_ID", pd.get("STEP_ID")); + flow = eightWorkTaskFlowMapper.getStep(flow); + if("1".equals(flow.getString("CAN_SKIP")) && (pd.get(flow.get("NEXT_ACTOR_FIELD")) == null || pd.get(flow.get("NEXT_ACTOR_FIELD")).equals(""))){ + pd.put("STEP_ID", flow.get("NEXT_STEP_ID")); + return getCurrentFlow(pd); + }else{ + return flow; + } + } + + private void setPosition(PageData pd) throws Exception { + JSONObject body = PLSUtil.getRyRegionInfo(pd.getString("CORPINFO_ID"),Integer.parseInt(pd.getString("PLS_ID"))); + List pointList = (List)((Map) body.get("data")).get("list"); + List positions = PLSUtil.getRandomPointInPolygon(pointList); + pd.put("WORK_POSITION", String.join(",",positions)); + electricityMapper.setPosition(pd); + } + +} diff --git a/src/main/java/com/zcloud/service/eightwork/impl/HighworkServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/HighworkServiceImpl.java index a8e9876..4f8cb4e 100644 --- a/src/main/java/com/zcloud/service/eightwork/impl/HighworkServiceImpl.java +++ b/src/main/java/com/zcloud/service/eightwork/impl/HighworkServiceImpl.java @@ -328,8 +328,9 @@ public class HighworkServiceImpl implements HighworkService { eightWorkFlowLogMapper.save(log); } + private void setPosition(PageData pd) throws Exception { - JSONObject body = PLSUtil.getRyRegionInfo(Jurisdiction.getCORPINFO_ID(),Integer.parseInt(pd.getString("PLS_ID"))); + JSONObject body = PLSUtil.getRyRegionInfo(pd.getString("CORPINFO_ID"),Integer.parseInt(pd.getString("PLS_ID"))); List pointList = (List)((Map) body.get("data")).get("list"); List positions = PLSUtil.getRandomPointInPolygon(pointList); pd.put("WORK_POSITION", String.join(",",positions)); diff --git a/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml index b7428e1..e416530 100644 --- a/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/ConfinedspaceMapper.xml @@ -280,7 +280,7 @@ left join BUS_LIMITSPACE sp on sp.LIMITSPACE_ID=f.LIMITSPACE_ID - left join oa_department as woro on f.WORK_DEPARTMENT_ID = woro.DEPARTMENT_ID + left join oa_department as woro on f.WORK_USER_DEPARTMENT_ID = woro.DEPARTMENT_ID left join sys_user as woru on f.WORK_USER_ID = woru.USER_ID left join oa_department as appo on f.APPLY_DEPARTMENT_ID = appo.DEPARTMENT_ID @@ -436,6 +436,7 @@ and f.STEP_ID > 0 and f.STEP_ID != 15 and f.ANALYZE_USER_ID = #{pd.GASCHECK} + order by f.STEP_ID,f.CREATTIME diff --git a/src/main/resources/mybatis/datasource/eightwork/ElectricityGasMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ElectricityGasMapper.xml new file mode 100644 index 0000000..d5b46cb --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ElectricityGasMapper.xml @@ -0,0 +1,141 @@ + + + + + + + BUS_ELECTRICITYGAS + + + + + SYS_DICTIONARIES + + + + + f.ELECTRICITY_ID, + f.ANALYZE_TIME, + f.ANALYZE_PLACE, + f.ANALYZE_RESULT, + f.ANALYZE_USER, + f.ISDELETE, + f.ELECTRICITYGAS_ID, + f.SIGN_PATH + + + + + ELECTRICITY_ID, + ANALYZE_TIME, + ANALYZE_PLACE, + ANALYZE_RESULT, + ANALYZE_USER, + ISDELETE, + ELECTRICITYGAS_ID, + SIGN_PATH + + + + + #{ELECTRICITY_ID}, + #{ANALYZE_TIME}, + #{ANALYZE_PLACE}, + #{ANALYZE_RESULT}, + #{ANALYZE_USER}, + #{ISDELETE}, + #{ELECTRICITYGAS_ID}, + #{SIGN_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + ELECTRICITYGAS_ID = #{ELECTRICITYGAS_ID} + + + + + update + + set + ELECTRICITY_ID = #{ELECTRICITY_ID}, + ANALYZE_TIME = #{ANALYZE_TIME}, + ANALYZE_PLACE = #{ANALYZE_PLACE}, + ANALYZE_RESULT = #{ANALYZE_RESULT}, + ANALYZE_USER = #{ANALYZE_USER}, + ELECTRICITYGAS_ID = ELECTRICITYGAS_ID, + SIGN_PATH = #{SIGN_PATH} + where + ELECTRICITYGAS_ID = #{ELECTRICITYGAS_ID} + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + ELECTRICITYGAS_ID in + + #{item} + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ElectricityMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ElectricityMapper.xml new file mode 100644 index 0000000..b08e5d3 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ElectricityMapper.xml @@ -0,0 +1,602 @@ + + + + + + + BUS_ELECTRICITY + + + + + SYS_DICTIONARIES + + + + + f.ELECTRICITY_ID, + f.CORPINFO_ID, + f.TASK_ID, + f.STEP_ID, + f.ISDELETE, + f.CREATTIME, + f.CREATOR, + f.OPERATTIME, + f.OPERATOR, + f.CHECK_NO, + f.APPLY_DEPARTMENT_ID, + f.APPLY_USER_ID, + f.WORK_START_DATE, + f.WORK_END_DATE, + f.WORK_PLACE, + f.WORK_CONTENT, + f.SPECIAL_WORK, + f.RISK_IDENTIFICATION, + f.CARD_NO, + f.ALLOW_POWER, + f.WORK_VOLTAGE, + f.RATED_POWER, + f.ELECTRICITY_USER_ID, + f.ELECTRICITY_DEPARTMENT_ID, + f.WORK_USER_ID, + f.WORK_DEPARTMENT_ID, + f.ANALYZE_TIME, + f.ISANALYZE, + 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_CARD_NO, + f.AUDIT_DEPARTMENT_ID, + f.AUDIT_USER_ID, + f.APPROVE_DEPARTMENT_ID, + f.APPROVE_USER_ID, + f.ACCEPT_DEPARTMENT_ID, + f.ACCEPT_USER_ID, + 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.WORK_POSITION, + f.VIDEO_PATH + + + + + ELECTRICITY_ID, + CORPINFO_ID, + TASK_ID, + STEP_ID, + ISDELETE, + CREATTIME, + CREATOR, + OPERATTIME, + OPERATOR, + CHECK_NO, + APPLY_DEPARTMENT_ID, + APPLY_USER_ID, + WORK_START_DATE, + WORK_END_DATE, + WORK_PLACE, + WORK_CONTENT, + SPECIAL_WORK, + RISK_IDENTIFICATION, + CARD_NO, + ALLOW_POWER, + WORK_VOLTAGE, + RATED_POWER, + ELECTRICITY_USER_ID, + ELECTRICITY_DEPARTMENT_ID, + WORK_USER_ID, + WORK_DEPARTMENT_ID, + ANALYZE_TIME, + ISANALYZE, + 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_CARD_NO, + AUDIT_DEPARTMENT_ID, + AUDIT_USER_ID, + APPROVE_DEPARTMENT_ID, + APPROVE_USER_ID, + ACCEPT_DEPARTMENT_ID, + ACCEPT_USER_ID, + WORK_START_DEPARTMENT_ID, + WORK_START_USER_ID, + WORK_END_DEPARTMENT_ID, + WORK_END_USER_ID, + ACCEPT_TIME, + PLS_ID, + PLS_NAME, + WORK_POSITION, + VIDEO_PATH + + + + + #{ELECTRICITY_ID}, + #{CORPINFO_ID}, + #{TASK_ID}, + #{STEP_ID}, + #{ISDELETE}, + #{CREATTIME}, + #{CREATOR}, + #{OPERATTIME}, + #{OPERATOR}, + #{CHECK_NO}, + #{APPLY_DEPARTMENT_ID}, + #{APPLY_USER_ID}, + #{WORK_START_DATE}, + #{WORK_END_DATE}, + #{WORK_PLACE}, + #{WORK_CONTENT}, + #{SPECIAL_WORK}, + #{RISK_IDENTIFICATION}, + #{CARD_NO}, + #{ALLOW_POWER}, + #{WORK_VOLTAGE}, + #{RATED_POWER}, + #{ELECTRICITY_USER_ID}, + #{ELECTRICITY_DEPARTMENT_ID}, + #{WORK_USER_ID}, + #{WORK_DEPARTMENT_ID}, + #{ANALYZE_TIME}, + #{ISANALYZE}, + #{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_CARD_NO}, + #{AUDIT_DEPARTMENT_ID}, + #{AUDIT_USER_ID}, + #{APPROVE_DEPARTMENT_ID}, + #{APPROVE_USER_ID}, + #{ACCEPT_DEPARTMENT_ID}, + #{ACCEPT_USER_ID}, + #{WORK_START_DEPARTMENT_ID}, + #{WORK_START_USER_ID}, + #{WORK_END_DEPARTMENT_ID}, + #{WORK_END_USER_ID}, + #{ACCEPT_TIME}, + #{PLS_ID}, + #{PLS_NAME}, + #{WORK_POSITION}, + #{VIDEO_PATH} + + + + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + + update + + set + ELECTRICITY_ID = #{ELECTRICITY_ID}, + CORPINFO_ID = #{CORPINFO_ID}, + TASK_ID = #{TASK_ID}, + STEP_ID = #{STEP_ID}, + ISDELETE = #{ISDELETE}, + CREATTIME = #{CREATTIME}, + CREATOR = #{CREATOR}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + CHECK_NO = #{CHECK_NO}, + 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_PLACE = #{WORK_PLACE}, + WORK_CONTENT = #{WORK_CONTENT}, + SPECIAL_WORK = #{SPECIAL_WORK}, + RISK_IDENTIFICATION = #{RISK_IDENTIFICATION}, + CARD_NO = #{CARD_NO}, + ALLOW_POWER = #{ALLOW_POWER}, + WORK_VOLTAGE = #{WORK_VOLTAGE}, + RATED_POWER = #{RATED_POWER}, + ELECTRICITY_USER_ID = #{ELECTRICITY_USER_ID}, + ELECTRICITY_DEPARTMENT_ID = #{ELECTRICITY_DEPARTMENT_ID}, + WORK_USER_ID = #{WORK_USER_ID}, + WORK_DEPARTMENT_ID = #{WORK_DEPARTMENT_ID}, + ANALYZE_TIME = #{ANALYZE_TIME}, + ISANALYZE = #{ISANALYZE}, + 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_CARD_NO = #{LEADER_CARD_NO}, + AUDIT_DEPARTMENT_ID = #{AUDIT_DEPARTMENT_ID}, + AUDIT_USER_ID = #{AUDIT_USER_ID}, + APPROVE_DEPARTMENT_ID = #{APPROVE_DEPARTMENT_ID}, + APPROVE_USER_ID = #{APPROVE_USER_ID}, + ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}, + ACCEPT_USER_ID = #{ACCEPT_USER_ID}, + 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}, + WORK_POSITION = #{WORK_POSITION}, + VIDEO_PATH = #{VIDEO_PATH} + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + update + + set + ANALYZE_TIME = #{ANALYZE_TIME} + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + + + + + + update + + set + + WORK_START_DATE = #{WORK_START_DATE}, + + + WORK_END_DATE = #{WORK_END_DATE}, + + + ACCEPT_TIME = #{ACCEPT_TIME}, + + STEP_ID = #{STEP_ID} + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + + update + + set + WORK_POSITION = #{WORK_POSITION} + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ElectricitySignMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ElectricitySignMapper.xml new file mode 100644 index 0000000..5960b79 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ElectricitySignMapper.xml @@ -0,0 +1,140 @@ + + + + + + + BUS_ELECTRICITY_SIGN + + + + + SYS_DICTIONARIES + + + + + f.ELECTRICITY_SIGN_ID, + f.ELECTRICITY_ID, + f.CORPINFO_ID, + f.SIGN_USER_ID, + f.SIGN_PATH, + f.SIGN_TIME, + f.DESCR, + f.STEP_ID, + f.IMG_PATH + + + + + ELECTRICITY_SIGN_ID, + ELECTRICITY_ID, + CORPINFO_ID, + SIGN_USER_ID, + SIGN_PATH, + SIGN_TIME, + DESCR, + STEP_ID, + IMG_PATH + + + + + #{ELECTRICITY_SIGN_ID}, + #{ELECTRICITY_ID}, + #{CORPINFO_ID}, + #{SIGN_USER_ID}, + #{SIGN_PATH}, + #{SIGN_TIME}, + #{DESCR}, + #{STEP_ID}, + #{IMG_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + insert into + + ( + ELECTRICITY_SIGN_ID, + ELECTRICITY_ID, + CORPINFO_ID, + SIGN_USER_ID, + STEP_ID + ) values + + (#{item.ELECTRICITY_SIGN_ID}, + #{item.ELECTRICITY_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 + ELECTRICITY_ID = #{ELECTRICITY_ID} and SIGN_USER_ID = #{SIGN_USER_ID} and STEP_ID = #{STEP_ID} + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/ElectricityToMeasuresMapper.xml b/src/main/resources/mybatis/datasource/eightwork/ElectricityToMeasuresMapper.xml new file mode 100644 index 0000000..119b266 --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/ElectricityToMeasuresMapper.xml @@ -0,0 +1,156 @@ + + + + + + + BUS_ELECTRICITYTOMEASURES + + + + + SYS_DICTIONARIES + + + + + f.ELECTRICITY_ID, + f.BUS_ELECTRICITY_MEASURES_ID, + f.STATUS, + f.ELECTRICITYTOMEASURES_ID, + f.CONFIRM_ID, + f.SIGN_PATH, + f.SIGN_TIME, + f.IMG_PATH + + + + + ELECTRICITY_ID, + BUS_ELECTRICITY_MEASURES_ID, + STATUS, + ELECTRICITYTOMEASURES_ID, + CONFIRM_ID, + SIGN_PATH, + SIGN_TIME, + IMG_PATH + + + + + #{ELECTRICITY_ID}, + #{BUS_ELECTRICITY_MEASURES_ID}, + #{STATUS}, + #{ELECTRICITYTOMEASURES_ID}, + #{CONFIRM_ID}, + #{SIGN_PATH}, + #{SIGN_TIME}, + #{IMG_PATH} + + + + + insert into + + ( + + ) values ( + + ) + + + + insert into + + ( + ELECTRICITY_ID, + BUS_ELECTRICITY_MEASURES_ID, + ELECTRICITYTOMEASURES_ID, + CONFIRM_ID + ) values + + ( + #{item.ELECTRICITY_ID}, + #{item.BUS_ELECTRICITY_MEASURES_ID}, + #{item.ELECTRICITYTOMEASURES_ID}, + #{item.CONFIRM_ID} + ) + + + + + + delete from + + where + ELECTRICITY_ID = #{ELECTRICITY_ID} + + + + + update + + set + STATUS = #{STATUS}, + SIGN_PATH = #{SIGN_PATH}, + IMG_PATH = #{IMG_PATH}, + SIGN_TIME = #{SIGN_TIME} + where + ELECTRICITYTOMEASURES_ID = #{ELECTRICITYTOMEASURES_ID} + + + + + + + + + + + update + + set + ISDELETE = '1' + where + ELECTRICITYTOMEASURES_ID in + + #{item} + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/eightwork/HighWorkMapper.xml b/src/main/resources/mybatis/datasource/eightwork/HighWorkMapper.xml index f4bc026..e796fdf 100644 --- a/src/main/resources/mybatis/datasource/eightwork/HighWorkMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/HighWorkMapper.xml @@ -418,6 +418,7 @@ and f.CREATOR = #{pd.CREATOR} + order by f.STEP_ID,f.CREATTIME diff --git a/src/main/resources/mybatis/datasource/eightwork/HotWorkMapper.xml b/src/main/resources/mybatis/datasource/eightwork/HotWorkMapper.xml index 33f3854..0911ed3 100644 --- a/src/main/resources/mybatis/datasource/eightwork/HotWorkMapper.xml +++ b/src/main/resources/mybatis/datasource/eightwork/HotWorkMapper.xml @@ -493,6 +493,7 @@ and f.STEP_ID > 0 and f.STEP_ID != 15 and f.ANALYZE_USER_ID = #{pd.GASCHECK} + order by f.STEP_ID,f.CREATTIME desc @@ -500,7 +501,7 @@ select concat("姓名:",f.NAME,',',"编号:",f.CERTIFICATE_NUM) NAME from - BUS_PERSONNELMANAGEMENT f + bus_specialoperations f left join sys_dictionaries a on a.DICTIONARIES_ID = f.JOB_TYPE left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID left join bus_units r on r.UNITS_ID = f.UNITS_ID