feat:八项作业撤回上一步

0927cmt
dearLin 2024-09-27 14:24:12 +08:00
parent 98e6b46d2d
commit 05a14e2efc
7 changed files with 1719 additions and 1242 deletions

View File

@ -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";
}
}

View File

@ -73,5 +73,32 @@ public interface GFHighWorkMapper{
PageData countCheck(PageData pd); PageData countCheck(PageData pd);
PageData getCode(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);
} }

View File

@ -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;
}

View File

@ -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<String, String> tablePrimaryKey = new HashMap<String, String>() {{
// 高处
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);
}
}

View File

@ -14,7 +14,10 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
f.CORPINFO_ID, f
.
CORPINFO_ID
,
f.APPLY_DEPARTMENT_ID, f.APPLY_DEPARTMENT_ID,
f.APPLY_USER, f.APPLY_USER,
f.ISDELETE, f.ISDELETE,
@ -83,7 +86,8 @@
<!-- 字段用于新增 --> <!-- 字段用于新增 -->
<sql id="Field2"> <sql id="Field2">
CORPINFO_ID, CORPINFO_ID
,
APPLY_DEPARTMENT_ID, APPLY_DEPARTMENT_ID,
APPLY_USER, APPLY_USER,
ISDELETE, ISDELETE,
@ -152,7 +156,8 @@
<!-- 字段值 --> <!-- 字段值 -->
<sql id="FieldValue"> <sql id="FieldValue">
#{CORPINFO_ID}, #{CORPINFO_ID}
,
#{APPLY_DEPARTMENT_ID}, #{APPLY_DEPARTMENT_ID},
#{APPLY_USER}, #{APPLY_USER},
#{ISDELETE}, #{ISDELETE},
@ -312,6 +317,28 @@
where where
HIGHWORK_ID = #{HIGHWORK_ID} HIGHWORK_ID = #{HIGHWORK_ID}
</update> </update>
<update id="clearMasterTable">
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}
</update>
<update id="clearMeasures">
delete
FROM ${TYPE}tomeasures
where ${TABLE_ID_NAME} = #{ID}
</update>
<!-- 通过ID获取数据 --> <!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd"> <select id="findById" parameterType="pd" resultType="pd">
@ -409,7 +436,8 @@
bc.NAME as GUARDIAN_DEPARTMENT_NAME, bc.NAME as GUARDIAN_DEPARTMENT_NAME,
bcu.NAME as GUARDIAN_USER_NAME bcu.NAME as GUARDIAN_USER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID
@ -539,7 +567,8 @@
bc.NAME as GUARDIAN_DEPARTMENT_NAME, bc.NAME as GUARDIAN_DEPARTMENT_NAME,
bcu.NAME as GUARDIAN_USER_NAME bcu.NAME as GUARDIAN_USER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID
@ -757,7 +786,8 @@
bc.NAME as GUARDIAN_DEPARTMENT_NAME, bc.NAME as GUARDIAN_DEPARTMENT_NAME,
bcu.NAME as GUARDIAN_USER_NAME bcu.NAME as GUARDIAN_USER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID
@ -973,7 +1003,8 @@
bc.NAME as GUARDIAN_DEPARTMENT_NAME, bc.NAME as GUARDIAN_DEPARTMENT_NAME,
bcu.NAME as GUARDIAN_USER_NAME bcu.NAME as GUARDIAN_USER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID
@ -1188,7 +1219,8 @@
bc.NAME as GUARDIAN_DEPARTMENT_NAME, bc.NAME as GUARDIAN_DEPARTMENT_NAME,
bcu.NAME as GUARDIAN_USER_NAME bcu.NAME as GUARDIAN_USER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join OA_DEPARTMENT bc on bc.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID left join SYS_USER bcu on bcu.USER_ID = f.GUARDIAN_USER_ID
@ -1216,7 +1248,8 @@
left join SYS_USER acu on acu.USER_ID = f.ACCEPT_USER_ID left join SYS_USER acu on acu.USER_ID = f.ACCEPT_USER_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
and f.APPLY_STATUS &lt; 6 and f.APPLY_STATUS &lt; 6
and not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) and not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID =
f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID)
and f.APPLY_STATUS &gt; 0 and f.APPLY_STATUS &gt; 0
@ -1335,7 +1368,8 @@
select select
<include refid="Field"></include> <include refid="Field"></include>
from from
<include refid="tableName"></include> f <include refid="tableName"></include>
f
</select> </select>
<!-- 批量删除 --> <!-- 批量删除 -->
@ -1350,19 +1384,31 @@
#{item} #{item}
</foreach> </foreach>
</delete> </delete>
<delete id="clearGasMonitoring">
delete from ${TYPE}gas where ${TABLE_ID_NAME} = #{ID}
</delete>
<delete id="clearGasWhMonitoring">
delete from ${TYPE}gaswh where ${TABLE_ID_NAME} = #{ID}
</delete>
<!-- 待办作业数 --> <!-- 待办作业数 -->
<select id="countCheck" parameterType="pd" resultType="pd"> <select id="countCheck" parameterType="pd" resultType="pd">
SELECT SELECT
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTBACK, COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTBACK,
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTCONSTRUCTION, COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END)
COUNTCONSTRUCTION,
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTLEADER, COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTLEADER,
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAUDIT, COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAPPROVE, COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTACCEPT, COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTGUARDIAN, COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTCONFESS, f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and
f.CONFESS_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and
not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID =
f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END)
COUNTACCEPTCONFESS
FROM <include refid="tableName"></include> f FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID} WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select> </select>
@ -1375,4 +1421,108 @@
WHERE f.CORPINFO_ID = #{CORPINFO_ID} WHERE f.CORPINFO_ID = #{CORPINFO_ID}
and f.CREATTIME LIKE CONCAT(#{CREATDATE},'%') and f.CREATTIME LIKE CONCAT(#{CREATDATE},'%')
</select> </select>
<select id="getInfoById" resultType="com.zcloud.entity.PageData">
select *
from ${TYPE}
where ${TABLE_ID_NAME} = #{ID}
</select>
<update id="clearAcceptUser">
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>
<update id="back5to2">
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>
<update id="back5to3">
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>
<update id="back5to4">
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>
<update id="back3to2">
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>
<update id="back4to3">
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>
<update id="back4to2">
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>
<update id="blindboardBack4to1">
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>
<update id="blindboardBack5to4">
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>
</mapper> </mapper>

View File

@ -432,6 +432,7 @@
LEFT JOIN `qa-cmt-prevention`.sys_dictionaries dic ON d.FIRE_DEVICE_TYPE_ID = dic.BIANMA LEFT JOIN `qa-cmt-prevention`.sys_dictionaries dic ON d.FIRE_DEVICE_TYPE_ID = dic.BIANMA
WHERE WHERE
d.ISDELETE = 0 and p.isdelete = 0 d.ISDELETE = 0 and p.isdelete = 0
<!--用与app 查询 消防设备类型-->
<if test="pd.FIRE_DEVICE_TYPE_ID != null and pd.FIRE_DEVICE_TYPE_ID != ''"> <if test="pd.FIRE_DEVICE_TYPE_ID != null and pd.FIRE_DEVICE_TYPE_ID != ''">
and d.FIRE_DEVICE_TYPE_ID = #{pd.FIRE_DEVICE_TYPE_ID} and d.FIRE_DEVICE_TYPE_ID = #{pd.FIRE_DEVICE_TYPE_ID}
</if> </if>

View File

@ -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);
}
}