八项作业优化 正向流程bug修复

pull/3/head
zhaoyu 2023-12-17 15:53:55 +08:00
parent 343b66b914
commit 0d9228dda4
11 changed files with 1114 additions and 26 deletions

View File

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

View File

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

View File

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

View File

@ -0,0 +1,36 @@
package com.zcloud.service.gf.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.gf.EightWorkMapper;
import com.zcloud.service.gf.EightWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-13
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class EightWorkServiceImpl implements EightWorkService {
@Autowired
private EightWorkMapper eightworkMapper;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return eightworkMapper.datalist(page);
}
}

View File

@ -148,4 +148,7 @@ public interface DictionariesService {
* @throws Exception * @throws Exception
*/ */
public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception; public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception;
public List<PageData> getTreeById(String id) throws Exception;
} }

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -243,4 +244,16 @@ public class DictionariesServiceImpl implements DictionariesService {
return dictionariesMapper.getIdsByParentIds(parentIds); return dictionariesMapper.getIdsByParentIds(parentIds);
} }
@Override
public List<PageData> getTreeById(String id) throws Exception {
List<Dictionaries> _list = this.listSubDictByParentId(id); //用传过来的ID获取此ID下的子列表数据
return _list.stream().map(n -> {
PageData entity = new PageData();
entity.put("DICTIONARIES_ID", n.getDICTIONARIES_ID());
entity.put("BIANMA", n.getBIANMA());
entity.put("NAME", n.getNAME());
return entity;
}).collect(Collectors.toList());
}
} }

View File

@ -42,6 +42,10 @@ public class Warden {
return JSON.parseObject(raw.toJSONString(), PageData.class); return JSON.parseObject(raw.toJSONString(), PageData.class);
} }
public static <T> List<T> getList(String raw, Class<T> clazz) {
return JSON.parseArray(raw, clazz);
}
public static void initData(PageData entity) { public static void initData(PageData entity) {
entity.put("CREATE_TIME", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); entity.put("CREATE_TIME", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
entity.put("CRATED_DATE", new Date()); entity.put("CRATED_DATE", new Date());

View File

@ -339,8 +339,8 @@
f.CHECK_NO, f.CHECK_NO,
f.PROJECT_MANAGER, f.PROJECT_MANAGER,
f.WORK_CONTENT, f.WORK_CONTENT,
f.WORK_START_DATE, replace(f.WORK_START_DATE,'-','/') as WORK_START_DATE,
f.WORK_END_DATE, replace(f.WORK_END_DATE,'-','/') as WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID, f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID, f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH, f.CONSTRUCTION_USER_SIGNER_PATH,
@ -372,7 +372,7 @@
f.HAZARD_IDENTIFICATION, f.HAZARD_IDENTIFICATION,
f.CONFESS_USER, f.CONFESS_USER,
f.ACCEPT_CONFESS_USER, f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK, IFNULL(f.SPECIAL_WORK,'无') as SPECIAL_WORK,
f.GUARDIAN_USER, f.GUARDIAN_USER,
f.JOB_CONTENT, f.JOB_CONTENT,
f.APPLY_USER_SIGNER_PATH, f.APPLY_USER_SIGNER_PATH,
@ -457,8 +457,80 @@
<!-- 列表 --> <!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.PRODUCTION_DEPARTMENT_ID,
f.PRODUCTION_USER_ID,
f.PRODUCTION_USER_SIGNER_PATH,
f.PRODUCTION_USER_SIGNER_TIME,
f.SAFETY_DEPARTMENT_ID,
f.SAFETY_USER_ID,
f.SAFETY_USER_SIGNER_PATH,
f.SAFETY_USER_SIGNER_TIME,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.WORK_NO,
f.CONSTRUCTION_CONTENT,
f.PRODUCTION_CONTENT,
f.SAFETY_CONTENT,
f.LEADER_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.JOB_CONTENT,
f.APPLY_USER_SIGNER_PATH,
f.APPLY_USER_SIGNER_TIME,
f.CONTENT_IMG_PATH,
f.WORK_REASON,
f.OTHER_DEPT,
f.CUTROAD_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CUTROAD_ACCEPTUSER a where a.ISDELETE = '0'
AND a.CUTROAD_ID = f.CUTROAD_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
au.NAME as APPLY_USER_NAME, au.NAME as APPLY_USER_NAME,
@ -607,8 +679,80 @@
</select> </select>
<select id="aqdatalistPage" parameterType="page" resultType="pd"> <select id="aqdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.PRODUCTION_DEPARTMENT_ID,
f.PRODUCTION_USER_ID,
f.PRODUCTION_USER_SIGNER_PATH,
f.PRODUCTION_USER_SIGNER_TIME,
f.SAFETY_DEPARTMENT_ID,
f.SAFETY_USER_ID,
f.SAFETY_USER_SIGNER_PATH,
f.SAFETY_USER_SIGNER_TIME,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.WORK_NO,
f.CONSTRUCTION_CONTENT,
f.PRODUCTION_CONTENT,
f.SAFETY_CONTENT,
f.LEADER_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.JOB_CONTENT,
f.APPLY_USER_SIGNER_PATH,
f.APPLY_USER_SIGNER_TIME,
f.CONTENT_IMG_PATH,
f.WORK_REASON,
f.OTHER_DEPT,
f.CUTROAD_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CUTROAD_ACCEPTUSER a where a.ISDELETE = '0'
AND a.CUTROAD_ID = f.CUTROAD_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
au.NAME as APPLY_USER_NAME, au.NAME as APPLY_USER_NAME,
@ -755,8 +899,80 @@
</select> </select>
<select id="jhdatalistPage" parameterType="page" resultType="pd"> <select id="jhdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.PRODUCTION_DEPARTMENT_ID,
f.PRODUCTION_USER_ID,
f.PRODUCTION_USER_SIGNER_PATH,
f.PRODUCTION_USER_SIGNER_TIME,
f.SAFETY_DEPARTMENT_ID,
f.SAFETY_USER_ID,
f.SAFETY_USER_SIGNER_PATH,
f.SAFETY_USER_SIGNER_TIME,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.WORK_NO,
f.CONSTRUCTION_CONTENT,
f.PRODUCTION_CONTENT,
f.SAFETY_CONTENT,
f.LEADER_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.JOB_CONTENT,
f.APPLY_USER_SIGNER_PATH,
f.APPLY_USER_SIGNER_TIME,
f.CONTENT_IMG_PATH,
f.WORK_REASON,
f.OTHER_DEPT,
f.CUTROAD_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CUTROAD_ACCEPTUSER a where a.ISDELETE = '0'
AND a.CUTROAD_ID = f.CUTROAD_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
au.NAME as APPLY_USER_NAME, au.NAME as APPLY_USER_NAME,
@ -903,8 +1119,80 @@
</select> </select>
<select id="jsdatalistPage" parameterType="page" resultType="pd"> <select id="jsdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.PRODUCTION_DEPARTMENT_ID,
f.PRODUCTION_USER_ID,
f.PRODUCTION_USER_SIGNER_PATH,
f.PRODUCTION_USER_SIGNER_TIME,
f.SAFETY_DEPARTMENT_ID,
f.SAFETY_USER_ID,
f.SAFETY_USER_SIGNER_PATH,
f.SAFETY_USER_SIGNER_TIME,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.WORK_NO,
f.CONSTRUCTION_CONTENT,
f.PRODUCTION_CONTENT,
f.SAFETY_CONTENT,
f.LEADER_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.JOB_CONTENT,
f.APPLY_USER_SIGNER_PATH,
f.APPLY_USER_SIGNER_TIME,
f.CONTENT_IMG_PATH,
f.WORK_REASON,
f.OTHER_DEPT,
f.CUTROAD_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CUTROAD_ACCEPTUSER a where a.ISDELETE = '0'
AND a.CUTROAD_ID = f.CUTROAD_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
au.NAME as APPLY_USER_NAME, au.NAME as APPLY_USER_NAME,
@ -960,7 +1248,9 @@
left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID
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.ACCEPT_CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0 and f.APPLY_STATUS &lt; 6
and not exists(select 1 from GF_CUTROAD_ACCEPTUSER m where m.CUTROAD_ID = f.CUTROAD_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
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"> <if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.CORPINFO_ID = #{pd.CORPINFO_ID}
@ -1100,7 +1390,8 @@
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CUTROAD_ID END) COUNTACCEPT, COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CUTROAD_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.CUTROAD_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 f.GUARDIAN_USER_SIGNER_TIME is null THEN f.CUTROAD_ID END) COUNTGUARDIAN,
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.CUTROAD_ID END) COUNTCONFESS, 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.CUTROAD_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 f.ACCEPT_CONFESS_USER_SIGNER_TIME is null THEN f.CUTROAD_ID END) COUNTACCEPTCONFESS 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_CUTROAD_ACCEPTUSER m where m.CUTROAD_ID = f.CUTROAD_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID)
THEN f.CUTROAD_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>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.gf.EightWorkMapper">
<!-- 列表 -->
<select id="datalist" parameterType="page" resultType="pd">
select
CONCAT_WS(" ","受限空间作业",f.WORK_PERMIT_NUMBER) as CHECK_NO,f.CONFINEDSPACE_ID as ID
from
bus_confinedspace f
where f.ISDELETE = '0' and f.APPLY_STATUS &gt; 0 and f.APPLY_STATUS &lt; 6 and f.CORPINFO_ID = #{pd.CORPINFO_ID}
union
select
CONCAT_WS(" ","盲板抽堵作业",b.CHECK_NO) as CHECK_NO,b.BLINDBOARD_ID as ID
from
gf_blindboard b
where b.CORPINFO_ID = #{pd.CORPINFO_ID} and b.APPLY_STATUS &gt; 0 and b.APPLY_STATUS &lt; 6 and b.ISDELETE = '0'
union
select
CONCAT_WS(" ","临时用电作业",e.CHECK_NO) as CHECK_NO,e.ELECTRICITY_ID as ID
from
gf_electricity e
where e.CORPINFO_ID = #{pd.CORPINFO_ID} and e.APPLY_STATUS &gt; 0 and e.APPLY_STATUS &lt; 5 and e.ISDELETE = '0'
union
select
CONCAT_WS(" ","吊装作业",g.CHECK_NO) as CHECK_NO,g.HOISTING_ID as ID
from
gf_hoisting g
where g.CORPINFO_ID = #{pd.CORPINFO_ID} and g.APPLY_STATUS &gt; 0 and g.APPLY_STATUS &lt; 6 and g.ISDELETE = '0'
union
select
CONCAT_WS(" ","动土作业",a.CHECK_NO) as CHECK_NO ,a.BREAKGROUND_ID as ID
from
gf_breakground a
where a.CORPINFO_ID = #{pd.CORPINFO_ID} and a.APPLY_STATUS &gt; 0 and a.APPLY_STATUS &lt; 6 and a.ISDELETE = '0'
union
select
CONCAT_WS(" ","断路作业",d.CHECK_NO) as CHECK_NO,d.CUTROAD_ID as ID
from
gf_cutroad d
where d.CORPINFO_ID = #{pd.CORPINFO_ID} and d.APPLY_STATUS &gt; 0 and d.APPLY_STATUS &lt; 6 and d.ISDELETE = '0'
union
select
CONCAT_WS(" ","高处作业",w.CHECK_NO) as CHECK_NO,w.HIGHWORK_ID as ID
from
gf_highwork w
where w.CORPINFO_ID = #{pd.CORPINFO_ID} and w.APPLY_STATUS &gt; 0 and w.APPLY_STATUS &lt; 6 and w.ISDELETE = '0'
union
select
CONCAT_WS(" ","动火作业",h.JOB_NUMBER) as CHECK_NO,h.HOTWORKAPPLICATION_ID as ID
from
bus_hotworkapplication h
where h.CORPINFO_ID = #{pd.CORPINFO_ID} and h.STATE &gt; 0 and h.STATE &lt; 8 and h.ISDELETE = '0'
</select>
</mapper>

View File

@ -327,8 +327,8 @@
f.CHECK_NO, f.CHECK_NO,
f.PROJECT_MANAGER, f.PROJECT_MANAGER,
f.WORK_CONTENT, f.WORK_CONTENT,
f.WORK_START_DATE, replace(f.WORK_START_DATE,'-','/') as WORK_START_DATE,
f.WORK_END_DATE, replace(f.WORK_END_DATE,'-','/') as WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID, f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID, f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH, f.CONSTRUCTION_USER_SIGNER_PATH,
@ -362,7 +362,7 @@
f.LEADER_USER_SIGNER_TIME, f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER, f.CONFESS_USER,
f.ACCEPT_CONFESS_USER, f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK, IFNULL(f.SPECIAL_WORK,'无') as SPECIAL_WORK,
f.GUARDIAN_USER, f.GUARDIAN_USER,
f.WORK_HIGH, f.WORK_HIGH,
f.WORK_LEVEL, f.WORK_LEVEL,
@ -443,7 +443,75 @@
<!-- 列表 --> <!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.BELONGING_CORP,
f.WORK_CORP,
f.WORK_PLACE,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.WORK_HIGH,
f.WORK_LEVEL,
f.HIGHWORK_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HIGHWORK_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HIGHWORK_ID = f.HIGHWORK_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -594,7 +662,74 @@
</select> </select>
<select id="aqdatalistPage" parameterType="page" resultType="pd"> <select id="aqdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.BELONGING_CORP,
f.WORK_CORP,
f.WORK_PLACE,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.WORK_HIGH,
f.WORK_LEVEL,
f.HIGHWORK_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HIGHWORK_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HIGHWORK_ID = f.HIGHWORK_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -743,7 +878,74 @@
</select> </select>
<select id="jhdatalistPage" parameterType="page" resultType="pd"> <select id="jhdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.BELONGING_CORP,
f.WORK_CORP,
f.WORK_PLACE,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.WORK_HIGH,
f.WORK_LEVEL,
f.HIGHWORK_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HIGHWORK_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HIGHWORK_ID = f.HIGHWORK_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -891,7 +1093,74 @@
</select> </select>
<select id="jsdatalistPage" parameterType="page" resultType="pd"> <select id="jsdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.ACCEPT_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.HAZARD_IDENTIFICATION,
f.BELONGING_CORP,
f.WORK_CORP,
f.WORK_PLACE,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.SPECIAL_WORK,
f.GUARDIAN_USER,
f.WORK_HIGH,
f.WORK_LEVEL,
f.HIGHWORK_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.WORK_LONGITUDE,
f.WORK_LATITUDE,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HIGHWORK_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HIGHWORK_ID = f.HIGHWORK_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -946,7 +1215,10 @@
left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID
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.ACCEPT_CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0 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 f.APPLY_STATUS &gt; 0
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"> <if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.CORPINFO_ID = #{pd.CORPINFO_ID}
@ -1090,7 +1362,7 @@
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 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.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.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 f.ACCEPT_CONFESS_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS 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>

View File

@ -77,6 +77,7 @@
f.ACCEPT_CONFESS_USER_ID, f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH, f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME, f.ACCEPT_CONFESS_USER_SIGNER_TIME,
f.SPECIAL_WORK,
f.WORK_LONGITUDE, f.WORK_LONGITUDE,
f.WORK_LATITUDE f.WORK_LATITUDE
</sql> </sql>
@ -146,6 +147,7 @@
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,
SPECIAL_WORK,
WORK_LONGITUDE, WORK_LONGITUDE,
WORK_LATITUDE WORK_LATITUDE
</sql> </sql>
@ -215,6 +217,7 @@
#{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},
#{SPECIAL_WORK},
#{WORK_LONGITUDE}, #{WORK_LONGITUDE},
#{WORK_LATITUDE} #{WORK_LATITUDE}
</sql> </sql>
@ -308,6 +311,7 @@
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH}, ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME}, ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
HOISTING_ID = HOISTING_ID, HOISTING_ID = HOISTING_ID,
SPECIAL_WORK = #{SPECIAL_WORK},
WORK_LONGITUDE = #{WORK_LONGITUDE}, WORK_LONGITUDE = #{WORK_LONGITUDE},
WORK_LATITUDE = #{WORK_LATITUDE} WORK_LATITUDE = #{WORK_LATITUDE}
where where
@ -328,8 +332,8 @@
f.CHECK_NO, f.CHECK_NO,
f.PROJECT_MANAGER, f.PROJECT_MANAGER,
f.WORK_CONTENT, f.WORK_CONTENT,
f.WORK_START_DATE, replace(f.WORK_START_DATE,'-','/') as WORK_START_DATE,
f.WORK_END_DATE, replace(f.WORK_END_DATE,'-','/') as WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID, f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID, f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH, f.CONSTRUCTION_USER_SIGNER_PATH,
@ -382,6 +386,7 @@
f.ACCEPT_CONFESS_USER_SIGNER_TIME, f.ACCEPT_CONFESS_USER_SIGNER_TIME,
f.WORK_LATITUDE, f.WORK_LATITUDE,
f.WORK_LONGITUDE, f.WORK_LONGITUDE,
f.SPECIAL_WORK,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -443,7 +448,74 @@
<!-- 列表 --> <!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.WORK_USER,
f.WORK_PLACE,
f.TOOL_NAME,
f.PART_WEIGHT,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.WORK_LEVEL,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_CONTENT,
f.HAZARD_IDENTIFICATION,
f.GUARDIAN_USER,
f.SISUO_USER,
f.HOISTING_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.SPECIAL_WORK,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HOISTING_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HOISTING_ID = f.HOISTING_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -594,7 +666,73 @@
</select> </select>
<select id="aqdatalistPage" parameterType="page" resultType="pd"> <select id="aqdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.WORK_USER,
f.WORK_PLACE,
f.TOOL_NAME,
f.PART_WEIGHT,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.WORK_LEVEL,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_CONTENT,
f.HAZARD_IDENTIFICATION,
f.GUARDIAN_USER,
f.SISUO_USER,
f.HOISTING_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.SPECIAL_WORK,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HOISTING_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HOISTING_ID = f.HOISTING_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -743,7 +881,73 @@
</select> </select>
<select id="jhdatalistPage" parameterType="page" resultType="pd"> <select id="jhdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.WORK_USER,
f.WORK_PLACE,
f.TOOL_NAME,
f.PART_WEIGHT,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.WORK_LEVEL,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_CONTENT,
f.HAZARD_IDENTIFICATION,
f.GUARDIAN_USER,
f.SISUO_USER,
f.HOISTING_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.SPECIAL_WORK,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HOISTING_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HOISTING_ID = f.HOISTING_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -892,7 +1096,73 @@
</select> </select>
<select id="jsdatalistPage" parameterType="page" resultType="pd"> <select id="jsdatalistPage" parameterType="page" resultType="pd">
select select
<include refid="Field"></include>, f.CORPINFO_ID,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.PROJECT_MANAGER,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
f.CONSTRUCTION_DEPARTMENT_ID,
f.CONSTRUCTION_USER_ID,
f.CONSTRUCTION_USER_SIGNER_PATH,
f.CONSTRUCTION_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
f.CONSTRUCTION_CONTENT,
f.AUDIT_CONTENT,
f.APPROVE_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.WORK_USER,
f.WORK_PLACE,
f.TOOL_NAME,
f.PART_WEIGHT,
f.LEADER_DEPARTMENT_ID,
f.LEADER_USER_ID,
f.LEADER_CONTENT,
f.LEADER_USER_SIGNER_PATH,
f.LEADER_USER_SIGNER_TIME,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.WORK_LEVEL,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_CONTENT,
f.HAZARD_IDENTIFICATION,
f.GUARDIAN_USER,
f.SISUO_USER,
f.HOISTING_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.SPECIAL_WORK,
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_HOISTING_ACCEPTUSER a where a.ISDELETE = '0'
AND a.HOISTING_ID = f.HOISTING_ID
ORDER BY
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
ad.NAME as APPLY_DEPARTMENT_NAME, ad.NAME as APPLY_DEPARTMENT_NAME,
getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL,
@ -947,7 +1217,9 @@
left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID
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.ACCEPT_CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0 and f.APPLY_STATUS &lt; 6
and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_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
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"> <if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.CORPINFO_ID = #{pd.CORPINFO_ID}
@ -1091,7 +1363,7 @@
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTACCEPT, COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_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.HOISTING_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 f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTGUARDIAN,
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.HOISTING_ID END) COUNTCONFESS, 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.HOISTING_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 f.ACCEPT_CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTACCEPTCONFESS 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_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_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>