diff --git a/src/main/java/com/zcloud/controller/gf/AppWorkBackController.java b/src/main/java/com/zcloud/controller/gf/AppWorkBackController.java new file mode 100644 index 00000000..edd3a2a1 --- /dev/null +++ b/src/main/java/com/zcloud/controller/gf/AppWorkBackController.java @@ -0,0 +1,48 @@ +package com.zcloud.controller.gf; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.PageData; +import com.zcloud.service.gf.AppWorkBackService; +import com.zcloud.util.ReturnMap; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; + +/** + * 八项作业退回上一步 + * + * @author lin + */ +@Controller +@RequestMapping("/app/eightWork") +public class AppWorkBackController extends BaseController { + + @Resource + private AppWorkBackService appWorkBackService; + + /** + * 除去动火外 其他作业退回上一步 + * + * @author lin + */ + @RequestMapping(value = "/backWork") + @ResponseBody + + public ReturnMap backWork() throws Exception { + PageData pageData = this.getPageData(); + return appWorkBackService.backOtherWork(pageData); + } + + /** + * 动火退回上一步 + * + * @author lin + */ + @RequestMapping(value = "/backHotWork") + @ResponseBody + public String backHotWork() throws Exception { + return "gf/gf_limit_space_back"; + } +} diff --git a/src/main/java/com/zcloud/mapper/datasource/gf/GFHighWorkMapper.java b/src/main/java/com/zcloud/mapper/datasource/gf/GFHighWorkMapper.java index 66e165c0..b7868a98 100644 --- a/src/main/java/com/zcloud/mapper/datasource/gf/GFHighWorkMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/gf/GFHighWorkMapper.java @@ -73,5 +73,32 @@ public interface GFHighWorkMapper{ PageData countCheck(PageData pd); PageData getCode(PageData pd); + + void clearMasterTable(PageData pd); + + void clearMeasures(PageData pd); + + void clearAcceptUser(PageData pd); + + PageData getInfoById(PageData pd); + + void back5to2(PageData pd); + + void back5to4(PageData pd); + + void back5to3(PageData pd); + + void back3to2(PageData pd); + + void back4to3(PageData pd); + + void back4to2(PageData pd); + + void blindboardBack4to1(PageData pd); + void blindboardBack5to4(PageData pd); + + void clearGasMonitoring(PageData pd); + + void clearGasWhMonitoring(PageData pd); } diff --git a/src/main/java/com/zcloud/service/gf/AppWorkBackService.java b/src/main/java/com/zcloud/service/gf/AppWorkBackService.java new file mode 100644 index 00000000..5e1908cc --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/AppWorkBackService.java @@ -0,0 +1,11 @@ +package com.zcloud.service.gf; + +import com.zcloud.entity.PageData; +import com.zcloud.util.ReturnMap; + +public interface AppWorkBackService { + + + ReturnMap backHotWork(PageData pd) throws Exception; + ReturnMap backOtherWork(PageData pd) throws Exception; +} diff --git a/src/main/java/com/zcloud/service/gf/impl/AppWorkBackServiceImpl.java b/src/main/java/com/zcloud/service/gf/impl/AppWorkBackServiceImpl.java new file mode 100644 index 00000000..83cd4284 --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/impl/AppWorkBackServiceImpl.java @@ -0,0 +1,194 @@ +package com.zcloud.service.gf.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.gf.GFHighWorkMapper; +import com.zcloud.service.gf.AppWorkBackService; +import com.zcloud.util.InitPageDataUtil; +import com.zcloud.util.ReturnMap; +import com.zcloud.util.Tools; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +@Service +public class AppWorkBackServiceImpl implements AppWorkBackService { + + static Map tablePrimaryKey = new HashMap() {{ + // 高处 + put("gf_highwork", "HIGHWORK_ID"); + // 动土 + put("gf_breakground", "BREAKGROUND_ID"); + // 盲板 + put("gf_blindboard", "BLINDBOARD_ID"); + // 有限空间 + put("gf_confinedspace", "CONFINEDSPACE_ID"); + // 吊装 + put("gf_hoisting", "HOISTING_ID"); + // 用电 + put("gf_electricity", "ELECTRICITY_ID"); + // 断路 + put("gf_cutroad", "CUTROAD_ID"); + }}; + + @Resource + private GFHighWorkMapper gfHighWorkMapper; + @Resource + private InitPageDataUtil initPageDataUtil; + + @Override + public ReturnMap backHotWork(PageData pd) throws Exception { + return ReturnMap.ok(); + } + + @Override + @Transactional + public ReturnMap backOtherWork(PageData pd) throws Exception { + if ("1".equals(pd.getString("APPLY_STATUS"))) return ReturnMap.error("审核中,无法撤回到上一步!"); + if ("6".equals(pd.getString("APPLY_STATUS"))) return ReturnMap.error("已归档,无法撤回到上一步!"); + pd.put("TABLE_ID_NAME", tablePrimaryKey.get(pd.getString("TYPE"))); + PageData workInfo = gfHighWorkMapper.getInfoById(pd); + // 撤回上一步 + if ("gf_highwork".equals(pd.getString("TYPE")) + || "gf_breakground".equals(pd.getString("TYPE")) + || "gf_hoisting".equals(pd.getString("TYPE")) + || "gf_electricity".equals(pd.getString("TYPE")) + || "gf_cutroad".equals(pd.getString("TYPE")) + ) { + if ("2".equals(workInfo.getString("APPLY_STATUS"))) { + if ("gf_electricity".equals(pd.getString("TYPE")) && "1".equals(workInfo.getString("ISANALYZE"))) { + // 临时用电, 撤销 气体分析 + clearGasMonitoring(pd); + } + back2to1(pd); + return ReturnMap.ok(); + } + if ("5".equals(workInfo.getString("APPLY_STATUS"))) { + // 现在有3种情况 + // 1.如有APPROVE_USER_ID和 AUDIT_USER_ID 则APPLY_STATUS变为4(审批部门) + if (Tools.notEmpty(workInfo.getString("APPROVE_USER_ID")) && Tools.notEmpty(workInfo.getString("AUDIT_USER_ID"))) { + back5to4(pd); + return ReturnMap.ok(); + } + // 2.如有APPROVE_USER_ID 但是没AUDIT_USER_ID 则APPLY_STATUS变为3(审核部门) + if (Tools.notEmpty(workInfo.getString("APPROVE_USER_ID"))) { + back5to3(pd); + return ReturnMap.ok(); + } + // 3.如没有APPROVE_USER_ID和AUDIT_USER_ID 则APPLY_STATUS变为2 + if (Tools.isEmpty(workInfo.getString("APPROVE_USER_ID")) && Tools.isEmpty(workInfo.getString("AUDIT_USER_ID"))) { + back5to2(pd); + return ReturnMap.ok(); + } + } + if ("4".equals(workInfo.getString("APPLY_STATUS"))) { + // 现在有2种情况 + // 1.AUDIT_USER_ID + if (Tools.notEmpty(workInfo.getString("AUDIT_USER_ID"))) { + back4to3(pd); + return ReturnMap.ok(); + } + back4to2(pd); + return ReturnMap.ok(); + } + if ("3".equals(workInfo.getString("APPLY_STATUS"))) { + back3to2(pd); + return ReturnMap.ok(); + } + } + // 盲板 + if ("gf_blindboard".equals(pd.getString("TYPE"))) { + // 1-》 作业负责人待审核 4-》 所在单位待审核 5-》待验收 + if ("4".equals(workInfo.getString("APPLY_STATUS"))) { + blindboardBack4to1(pd); + return ReturnMap.ok(); + } + if ("5".equals(workInfo.getString("APPLY_STATUS"))) { + blindboardBack5to4(pd); + return ReturnMap.ok(); + } + } + // 受限空间 + if ("gf_confinedspace".equals(pd.getString("TYPE"))) { + // 1-》 作业负责人待审核 4-》 所在单位待审核 5-》待验收 + if ("4".equals(workInfo.getString("APPLY_STATUS"))) { + // 清理 气体监测 数据 + blindboardBack4to1(pd); + clearGasMonitoring(pd); + clearGasWhMonitoring(pd); + return ReturnMap.ok(); + } + if ("5".equals(workInfo.getString("APPLY_STATUS"))) { + blindboardBack5to4(pd); + return ReturnMap.ok(); + } + } + + return ReturnMap.ok(); + } + + @Transactional + public void clearGasWhMonitoring(PageData pd) { + gfHighWorkMapper.clearGasWhMonitoring(pd); + } + + @Transactional + public void clearGasMonitoring(PageData pd) { + gfHighWorkMapper.clearGasMonitoring(pd); + } + + @Transactional + public void blindboardBack4to1(PageData pd) { + gfHighWorkMapper.blindboardBack4to1(pd); + } + + @Transactional + public void blindboardBack5to4(PageData pd) { + gfHighWorkMapper.blindboardBack5to4(pd); + } + + @Transactional + public void back3to2(PageData pd) { + gfHighWorkMapper.back3to2(pd); + } + + @Transactional + public void back4to2(PageData pd) { + gfHighWorkMapper.back4to2(pd); + + } + + @Transactional + public void back4to3(PageData pd) { + gfHighWorkMapper.back4to3(pd); + } + + @Transactional + public void back5to3(PageData pd) { + gfHighWorkMapper.back5to3(pd); + + } + + @Transactional + public void back5to4(PageData pd) { + gfHighWorkMapper.back5to4(pd); + } + + + @Transactional + public void back5to2(PageData pd) { + gfHighWorkMapper.back5to2(pd); + } + + + @Transactional + public void back2to1(PageData pd) { + gfHighWorkMapper.clearMasterTable(pd); + gfHighWorkMapper.clearMeasures(pd); + gfHighWorkMapper.clearAcceptUser(pd); + } +} diff --git a/src/main/resources/mybatis/datasource/gf/HighWorkMapper.xml b/src/main/resources/mybatis/datasource/gf/HighWorkMapper.xml index cd583107..bb0f4711 100644 --- a/src/main/resources/mybatis/datasource/gf/HighWorkMapper.xml +++ b/src/main/resources/mybatis/datasource/gf/HighWorkMapper.xml @@ -2,19 +2,22 @@ - - - GF_HIGHWORK - + + + GF_HIGHWORK + - - - SYS_DICTIONARIES - + + + SYS_DICTIONARIES + - - - f.CORPINFO_ID, + + + f + . + CORPINFO_ID + , f.APPLY_DEPARTMENT_ID, f.APPLY_USER, f.ISDELETE, @@ -79,11 +82,12 @@ f.ACCEPT_CONFESS_USER_SIGNER_TIME, f.WORK_LONGITUDE, f.WORK_LATITUDE - + - - - CORPINFO_ID, + + + CORPINFO_ID + , APPLY_DEPARTMENT_ID, APPLY_USER, ISDELETE, @@ -148,1231 +152,1377 @@ ACCEPT_CONFESS_USER_SIGNER_TIME, WORK_LONGITUDE, WORK_LATITUDE - - - - - #{CORPINFO_ID}, - #{APPLY_DEPARTMENT_ID}, - #{APPLY_USER}, - #{ISDELETE}, - #{CREATTIME}, - #{CREATOR}, - #{OPERATTIME}, - #{OPERATOR}, - #{CHECK_NO}, - #{PROJECT_MANAGER}, - #{WORK_CONTENT}, - #{WORK_START_DATE}, - #{WORK_END_DATE}, - #{CONSTRUCTION_DEPARTMENT_ID}, - #{CONSTRUCTION_USER_ID}, - #{CONSTRUCTION_USER_SIGNER_PATH}, - #{CONSTRUCTION_USER_SIGNER_TIME}, - #{AUDIT_DEPARTMENT_ID}, - #{AUDIT_USER_ID}, - #{AUDIT_USER_SIGNER_PATH}, - #{AUDIT_USER_SIGNER_TIME}, - #{APPROVE_DEPARTMENT_ID}, - #{APPROVE_USER_ID}, - #{APPROVE_USER_SIGNER_PATH}, - #{APPROVE_USER_SIGNER_TIME}, - #{ACCEPT_DEPARTMENT_ID}, - #{ACCEPT_USER_ID}, - #{ACCEPT_USER_SIGNER_PATH}, - #{ACCEPT_USER_SIGNER_TIME}, - #{APPLY_STATUS}, - #{CONSTRUCTION_CONTENT}, - #{AUDIT_CONTENT}, - #{APPROVE_CONTENT}, - #{ACCEPT_CONTENT}, - #{OTHER_PROTECTIVE_MEASURES}, - #{HAZARD_IDENTIFICATION}, - #{BELONGING_CORP}, - #{WORK_CORP}, - #{WORK_PLACE}, - #{LEADER_DEPARTMENT_ID}, - #{LEADER_USER_ID}, - #{LEADER_CONTENT}, - #{LEADER_USER_SIGNER_PATH}, - #{LEADER_USER_SIGNER_TIME}, - #{CONFESS_USER}, - #{ACCEPT_CONFESS_USER}, - #{SPECIAL_WORK}, - #{GUARDIAN_USER}, - #{WORK_HIGH}, - #{WORK_LEVEL}, - #{HIGHWORK_ID}, - #{GUARDIAN_DEPARTMENT_ID}, - #{GUARDIAN_USER_ID}, - #{GUARDIAN_USER_SIGNER_PATH}, - #{GUARDIAN_USER_SIGNER_TIME}, - #{CONFESS_DEPARTMENT_ID}, - #{CONFESS_USER_ID}, - #{CONFESS_USER_SIGNER_PATH}, - #{CONFESS_USER_SIGNER_TIME}, - #{ACCEPT_CONFESS_DEPARTMENT_ID}, - #{ACCEPT_CONFESS_USER_ID}, - #{ACCEPT_CONFESS_USER_SIGNER_PATH}, - #{ACCEPT_CONFESS_USER_SIGNER_TIME}, - #{WORK_LONGITUDE}, - #{WORK_LATITUDE} - - - - - insert into - - ( - - ) values ( - - ) - - - - - update - - set - ISDELETE = '1' - where - HIGHWORK_ID = #{HIGHWORK_ID} - - - - - update - - set - CORPINFO_ID = #{CORPINFO_ID}, - APPLY_DEPARTMENT_ID = #{APPLY_DEPARTMENT_ID}, - APPLY_USER = #{APPLY_USER}, - ISDELETE = #{ISDELETE}, - CREATTIME = #{CREATTIME}, - CREATOR = #{CREATOR}, - OPERATTIME = #{OPERATTIME}, - OPERATOR = #{OPERATOR}, - CHECK_NO = #{CHECK_NO}, - PROJECT_MANAGER = #{PROJECT_MANAGER}, - WORK_CONTENT = #{WORK_CONTENT}, - WORK_START_DATE = #{WORK_START_DATE}, - WORK_END_DATE = #{WORK_END_DATE}, - CONSTRUCTION_DEPARTMENT_ID = #{CONSTRUCTION_DEPARTMENT_ID}, - CONSTRUCTION_USER_ID = #{CONSTRUCTION_USER_ID}, - CONSTRUCTION_USER_SIGNER_PATH = #{CONSTRUCTION_USER_SIGNER_PATH}, - CONSTRUCTION_USER_SIGNER_TIME = #{CONSTRUCTION_USER_SIGNER_TIME}, - AUDIT_DEPARTMENT_ID = #{AUDIT_DEPARTMENT_ID}, - AUDIT_USER_ID = #{AUDIT_USER_ID}, - AUDIT_USER_SIGNER_PATH = #{AUDIT_USER_SIGNER_PATH}, - AUDIT_USER_SIGNER_TIME = #{AUDIT_USER_SIGNER_TIME}, - APPROVE_DEPARTMENT_ID = #{APPROVE_DEPARTMENT_ID}, - APPROVE_USER_ID = #{APPROVE_USER_ID}, - APPROVE_USER_SIGNER_PATH = #{APPROVE_USER_SIGNER_PATH}, - APPROVE_USER_SIGNER_TIME = #{APPROVE_USER_SIGNER_TIME}, - ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}, - ACCEPT_USER_ID = #{ACCEPT_USER_ID}, - ACCEPT_USER_SIGNER_PATH = #{ACCEPT_USER_SIGNER_PATH}, - ACCEPT_USER_SIGNER_TIME = #{ACCEPT_USER_SIGNER_TIME}, - APPLY_STATUS = #{APPLY_STATUS}, - CONSTRUCTION_CONTENT = #{CONSTRUCTION_CONTENT}, - AUDIT_CONTENT = #{AUDIT_CONTENT}, - APPROVE_CONTENT = #{APPROVE_CONTENT}, - ACCEPT_CONTENT = #{ACCEPT_CONTENT}, - OTHER_PROTECTIVE_MEASURES = #{OTHER_PROTECTIVE_MEASURES}, - HAZARD_IDENTIFICATION = #{HAZARD_IDENTIFICATION}, - BELONGING_CORP = #{BELONGING_CORP}, - WORK_CORP = #{WORK_CORP}, - WORK_PLACE = #{WORK_PLACE}, - LEADER_DEPARTMENT_ID = #{LEADER_DEPARTMENT_ID}, - LEADER_USER_ID = #{LEADER_USER_ID}, - LEADER_CONTENT = #{LEADER_CONTENT}, - LEADER_USER_SIGNER_PATH = #{LEADER_USER_SIGNER_PATH}, - LEADER_USER_SIGNER_TIME = #{LEADER_USER_SIGNER_TIME}, - CONFESS_USER = #{CONFESS_USER}, - SPECIAL_WORK = #{SPECIAL_WORK}, - GUARDIAN_USER = #{GUARDIAN_USER}, - WORK_HIGH = #{WORK_HIGH}, - WORK_LEVEL = #{WORK_LEVEL}, - HIGHWORK_ID = HIGHWORK_ID, - GUARDIAN_DEPARTMENT_ID = #{GUARDIAN_DEPARTMENT_ID}, - GUARDIAN_USER_ID = #{GUARDIAN_USER_ID}, - GUARDIAN_USER_SIGNER_PATH = #{GUARDIAN_USER_SIGNER_PATH}, - GUARDIAN_USER_SIGNER_TIME = #{GUARDIAN_USER_SIGNER_TIME}, - CONFESS_DEPARTMENT_ID = #{CONFESS_DEPARTMENT_ID}, - CONFESS_USER_ID = #{CONFESS_USER_ID}, - CONFESS_USER_SIGNER_PATH = #{CONFESS_USER_SIGNER_PATH}, - CONFESS_USER_SIGNER_TIME = #{CONFESS_USER_SIGNER_TIME}, - ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID}, - ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}, - ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH}, - ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME}, - WORK_LONGITUDE = #{WORK_LONGITUDE}, - WORK_LATITUDE = #{WORK_LATITUDE} - where - HIGHWORK_ID = #{HIGHWORK_ID} - - - - - - - - - - - - - - - - - - - - update - - set - ISDELETE = '1' - where - HIGHWORK_ID in - - #{item} - - - - - - - - + + + + + #{CORPINFO_ID} + , + #{APPLY_DEPARTMENT_ID}, + #{APPLY_USER}, + #{ISDELETE}, + #{CREATTIME}, + #{CREATOR}, + #{OPERATTIME}, + #{OPERATOR}, + #{CHECK_NO}, + #{PROJECT_MANAGER}, + #{WORK_CONTENT}, + #{WORK_START_DATE}, + #{WORK_END_DATE}, + #{CONSTRUCTION_DEPARTMENT_ID}, + #{CONSTRUCTION_USER_ID}, + #{CONSTRUCTION_USER_SIGNER_PATH}, + #{CONSTRUCTION_USER_SIGNER_TIME}, + #{AUDIT_DEPARTMENT_ID}, + #{AUDIT_USER_ID}, + #{AUDIT_USER_SIGNER_PATH}, + #{AUDIT_USER_SIGNER_TIME}, + #{APPROVE_DEPARTMENT_ID}, + #{APPROVE_USER_ID}, + #{APPROVE_USER_SIGNER_PATH}, + #{APPROVE_USER_SIGNER_TIME}, + #{ACCEPT_DEPARTMENT_ID}, + #{ACCEPT_USER_ID}, + #{ACCEPT_USER_SIGNER_PATH}, + #{ACCEPT_USER_SIGNER_TIME}, + #{APPLY_STATUS}, + #{CONSTRUCTION_CONTENT}, + #{AUDIT_CONTENT}, + #{APPROVE_CONTENT}, + #{ACCEPT_CONTENT}, + #{OTHER_PROTECTIVE_MEASURES}, + #{HAZARD_IDENTIFICATION}, + #{BELONGING_CORP}, + #{WORK_CORP}, + #{WORK_PLACE}, + #{LEADER_DEPARTMENT_ID}, + #{LEADER_USER_ID}, + #{LEADER_CONTENT}, + #{LEADER_USER_SIGNER_PATH}, + #{LEADER_USER_SIGNER_TIME}, + #{CONFESS_USER}, + #{ACCEPT_CONFESS_USER}, + #{SPECIAL_WORK}, + #{GUARDIAN_USER}, + #{WORK_HIGH}, + #{WORK_LEVEL}, + #{HIGHWORK_ID}, + #{GUARDIAN_DEPARTMENT_ID}, + #{GUARDIAN_USER_ID}, + #{GUARDIAN_USER_SIGNER_PATH}, + #{GUARDIAN_USER_SIGNER_TIME}, + #{CONFESS_DEPARTMENT_ID}, + #{CONFESS_USER_ID}, + #{CONFESS_USER_SIGNER_PATH}, + #{CONFESS_USER_SIGNER_TIME}, + #{ACCEPT_CONFESS_DEPARTMENT_ID}, + #{ACCEPT_CONFESS_USER_ID}, + #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + #{WORK_LONGITUDE}, + #{WORK_LATITUDE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + HIGHWORK_ID = #{HIGHWORK_ID} + + + + + update + + set + CORPINFO_ID = #{CORPINFO_ID}, + APPLY_DEPARTMENT_ID = #{APPLY_DEPARTMENT_ID}, + APPLY_USER = #{APPLY_USER}, + ISDELETE = #{ISDELETE}, + CREATTIME = #{CREATTIME}, + CREATOR = #{CREATOR}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + CHECK_NO = #{CHECK_NO}, + PROJECT_MANAGER = #{PROJECT_MANAGER}, + WORK_CONTENT = #{WORK_CONTENT}, + WORK_START_DATE = #{WORK_START_DATE}, + WORK_END_DATE = #{WORK_END_DATE}, + CONSTRUCTION_DEPARTMENT_ID = #{CONSTRUCTION_DEPARTMENT_ID}, + CONSTRUCTION_USER_ID = #{CONSTRUCTION_USER_ID}, + CONSTRUCTION_USER_SIGNER_PATH = #{CONSTRUCTION_USER_SIGNER_PATH}, + CONSTRUCTION_USER_SIGNER_TIME = #{CONSTRUCTION_USER_SIGNER_TIME}, + AUDIT_DEPARTMENT_ID = #{AUDIT_DEPARTMENT_ID}, + AUDIT_USER_ID = #{AUDIT_USER_ID}, + AUDIT_USER_SIGNER_PATH = #{AUDIT_USER_SIGNER_PATH}, + AUDIT_USER_SIGNER_TIME = #{AUDIT_USER_SIGNER_TIME}, + APPROVE_DEPARTMENT_ID = #{APPROVE_DEPARTMENT_ID}, + APPROVE_USER_ID = #{APPROVE_USER_ID}, + APPROVE_USER_SIGNER_PATH = #{APPROVE_USER_SIGNER_PATH}, + APPROVE_USER_SIGNER_TIME = #{APPROVE_USER_SIGNER_TIME}, + ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}, + ACCEPT_USER_ID = #{ACCEPT_USER_ID}, + ACCEPT_USER_SIGNER_PATH = #{ACCEPT_USER_SIGNER_PATH}, + ACCEPT_USER_SIGNER_TIME = #{ACCEPT_USER_SIGNER_TIME}, + APPLY_STATUS = #{APPLY_STATUS}, + CONSTRUCTION_CONTENT = #{CONSTRUCTION_CONTENT}, + AUDIT_CONTENT = #{AUDIT_CONTENT}, + APPROVE_CONTENT = #{APPROVE_CONTENT}, + ACCEPT_CONTENT = #{ACCEPT_CONTENT}, + OTHER_PROTECTIVE_MEASURES = #{OTHER_PROTECTIVE_MEASURES}, + HAZARD_IDENTIFICATION = #{HAZARD_IDENTIFICATION}, + BELONGING_CORP = #{BELONGING_CORP}, + WORK_CORP = #{WORK_CORP}, + WORK_PLACE = #{WORK_PLACE}, + LEADER_DEPARTMENT_ID = #{LEADER_DEPARTMENT_ID}, + LEADER_USER_ID = #{LEADER_USER_ID}, + LEADER_CONTENT = #{LEADER_CONTENT}, + LEADER_USER_SIGNER_PATH = #{LEADER_USER_SIGNER_PATH}, + LEADER_USER_SIGNER_TIME = #{LEADER_USER_SIGNER_TIME}, + CONFESS_USER = #{CONFESS_USER}, + SPECIAL_WORK = #{SPECIAL_WORK}, + GUARDIAN_USER = #{GUARDIAN_USER}, + WORK_HIGH = #{WORK_HIGH}, + WORK_LEVEL = #{WORK_LEVEL}, + HIGHWORK_ID = HIGHWORK_ID, + GUARDIAN_DEPARTMENT_ID = #{GUARDIAN_DEPARTMENT_ID}, + GUARDIAN_USER_ID = #{GUARDIAN_USER_ID}, + GUARDIAN_USER_SIGNER_PATH = #{GUARDIAN_USER_SIGNER_PATH}, + GUARDIAN_USER_SIGNER_TIME = #{GUARDIAN_USER_SIGNER_TIME}, + CONFESS_DEPARTMENT_ID = #{CONFESS_DEPARTMENT_ID}, + CONFESS_USER_ID = #{CONFESS_USER_ID}, + CONFESS_USER_SIGNER_PATH = #{CONFESS_USER_SIGNER_PATH}, + CONFESS_USER_SIGNER_TIME = #{CONFESS_USER_SIGNER_TIME}, + ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID}, + ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}, + ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + WORK_LONGITUDE = #{WORK_LONGITUDE}, + WORK_LATITUDE = #{WORK_LATITUDE} + where + HIGHWORK_ID = #{HIGHWORK_ID} + + + update + ${TYPE} + set GUARDIAN_USER_SIGNER_PATH = null, + GUARDIAN_USER_SIGNER_TIME = null, + CONFESS_USER_SIGNER_PATH = null, + CONFESS_USER_SIGNER_TIME = null, + ACCEPT_CONFESS_USER_SIGNER_PATH = null, + ACCEPT_CONFESS_USER_SIGNER_TIME = null, + CONSTRUCTION_USER_SIGNER_PATH = null, + CONSTRUCTION_USER_SIGNER_TIME = null, + OTHER_PROTECTIVE_MEASURES = '', + APPLY_STATUS = 1, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + delete + FROM ${TYPE}tomeasures + where ${TABLE_ID_NAME} = #{ID} + + + + + + + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + HIGHWORK_ID in + + #{item} + + + + delete from ${TYPE}gas where ${TABLE_ID_NAME} = #{ID} + + + delete from ${TYPE}gaswh where ${TABLE_ID_NAME} = #{ID} + + + + + + + + + + update + ${TYPE}_acceptuser + set ACCEPT_CONFESS_DEPARTMENT_ID = null, + ACCEPT_CONFESS_USER_ID = null, + ACCEPT_CONFESS_USER_SIGNER_PATH = null, + ACCEPT_CONFESS_USER_SIGNER_TIME = null + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 2, + LEADER_USER_SIGNER_PATH = null, + LEADER_USER_SIGNER_TIME = null, + LEADER_CONTENT = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 3, + AUDIT_USER_SIGNER_PATH = null, + AUDIT_USER_SIGNER_TIME = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + + update + ${TYPE} + set APPLY_STATUS = 4, + APPROVE_USER_SIGNER_PATH = null, + APPROVE_USER_SIGNER_TIME = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 2, + LEADER_USER_SIGNER_PATH = null, + LEADER_USER_SIGNER_TIME = null, + LEADER_CONTENT = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 3, + AUDIT_USER_SIGNER_PATH = null, + AUDIT_USER_SIGNER_TIME = null, + AUDIT_CONTENT = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 2, + AUDIT_USER_SIGNER_PATH = null, + AUDIT_USER_SIGNER_TIME = null, + AUDIT_CONTENT = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set + APPLY_STATUS = 1, + GUARDIAN_USER_SIGNER_PATH = null, + GUARDIAN_USER_SIGNER_TIME = null, + CONFESS_USER_SIGNER_PATH = null, + CONFESS_USER_SIGNER_TIME = null, + ACCEPT_CONFESS_USER_SIGNER_PATH = null, + ACCEPT_CONFESS_USER_SIGNER_TIME = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + + + update + ${TYPE} + set APPLY_STATUS = 4, + APPROVE_USER_SIGNER_PATH = null, + APPROVE_USER_SIGNER_TIME = null, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where ${TABLE_ID_NAME} = #{ID} + diff --git a/src/main/resources/mybatis/dsno2/fireresources/CzksFireResourcesMapper.xml b/src/main/resources/mybatis/dsno2/fireresources/CzksFireResourcesMapper.xml index 9ced2a3d..9cee37b2 100644 --- a/src/main/resources/mybatis/dsno2/fireresources/CzksFireResourcesMapper.xml +++ b/src/main/resources/mybatis/dsno2/fireresources/CzksFireResourcesMapper.xml @@ -432,6 +432,7 @@ LEFT JOIN `qa-cmt-prevention`.sys_dictionaries dic ON d.FIRE_DEVICE_TYPE_ID = dic.BIANMA WHERE d.ISDELETE = 0 and p.isdelete = 0 + and d.FIRE_DEVICE_TYPE_ID = #{pd.FIRE_DEVICE_TYPE_ID} diff --git a/src/main/test/TestDemo.java b/src/main/test/TestDemo.java new file mode 100644 index 00000000..b683225e --- /dev/null +++ b/src/main/test/TestDemo.java @@ -0,0 +1,46 @@ +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zcloud.FHmainApplication; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.bus.ListManagerMapper; +import com.zcloud.service.gf.AppWorkBackService; +import com.zcloud.service.system.UsersService; +import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpRequestUtil; +import com.zcloud.util.ReturnMap; +import com.zcloud.util.SpringUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = FHmainApplication.class) +public class TestDemo { + + @Resource + private AppWorkBackService appWorkBackService; + + // gf_highwork 高处作业 + // gf_breakground 动土作业 + @Test + public void test() throws Exception { + PageData pageData = new PageData(); + // 当前状态 回根据实际变成上一步 + pageData.put("APPLY_STATUS",4); + pageData.put("TYPE","gf_electricity"); + pageData.put("ID","275872ca47824d19ab659792f89bce85"); + pageData.put("OPERATTIME", DateUtil.date2Str(new Date())); + pageData.put("OPERATOR","123"); + + appWorkBackService.backOtherWork(pageData); + } + +}