手机隐患清单检查记录

pull/4/head
wangpeng 2024-02-01 22:37:47 +08:00
parent 3c6e5fb59d
commit c6c76886d7
17 changed files with 1039 additions and 93 deletions

View File

@ -285,7 +285,7 @@ public class AppCheckRecordController extends BaseController {
@RequestMapping(value = "/delete")
// @RequiresPermissions("checkrecord:del")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "删除检查记录")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "删除检查记录")
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
@ -305,7 +305,7 @@ public class AppCheckRecordController extends BaseController {
@RequestMapping(value = "/edit")
// @RequiresPermissions("checkrecord:edit")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "修改")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "修改")
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -324,7 +324,7 @@ public class AppCheckRecordController extends BaseController {
*/
@RequestMapping(value = "/recordByIde")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "指定辨识部位检查记录")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "指定辨识部位检查记录")
public Object recordByIde() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -347,7 +347,7 @@ public class AppCheckRecordController extends BaseController {
*/
@RequestMapping(value = "/list")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "检查记录列表")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "检查记录列表")
public Object list() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -373,7 +373,7 @@ public class AppCheckRecordController extends BaseController {
*/
@RequestMapping(value = "/goEdit")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "去修改页面获取数据")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "去修改页面获取数据")
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -405,7 +405,7 @@ public class AppCheckRecordController extends BaseController {
*/
@RequestMapping(value = "/goEditWeui")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "去修改页面获取数据")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "去修改页面获取数据")
public Object goEditWeui() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -436,7 +436,7 @@ public class AppCheckRecordController extends BaseController {
@RequestMapping(value = "/deleteAll")
// @RequiresPermissions("checkrecord:del")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "批量删除")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "批量删除")
public Object deleteAll() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -461,7 +461,7 @@ public class AppCheckRecordController extends BaseController {
* @throws Exception
*/
@RequestMapping(value = "/excel")
@LogAnno(menuType= "手机",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "导出到excel")
@LogAnno(menuType= "手机",menuServer= "风险排查",instructionsOperate = "清单检查情况",instructionsType = "导出到excel")
public ModelAndView exportExcel() throws Exception {
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();

View File

@ -606,6 +606,74 @@ public class AppCustomController extends BaseController {
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/recordList") // /app/listmanager/recordList
@ResponseBody
@LogAnno(menuType = "手机", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "列表")
public Object recordList(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
// pd.put("USER_ID",Jurisdiction.getUSER_ID());
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
String STARTTIME = pd.getString("STARTTIME"); //关键词检索条件
if (Tools.notEmpty(STARTTIME)) pd.put("STARTTIME", STARTTIME.trim() + " 00:00:00");
String ENDTIME = pd.getString("ENDTIME"); //关键词检索条件
if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME.trim() + " 23:59:59");
PageData dept = new PageData();
dept.put("DEPARTMENT_ID", pd.get("DEPARTMENT_ID").toString());
dept = departmentService.findById(dept);
PageData cpd = new PageData();
cpd = usersService.findById(pd);
pd.put("ISLEADER", cpd.getString("ISLEADER"));
if (dept.getString("ISSUPERVISE").equals("1")) {
pd.put("SUP_DEPARTMENT_ID", dept.getString("DEPARTMENT_ID"));
List<PageData> subdept = departmentService.findBySubId(pd); //查询监管哪些部门
String subIds = ""; //用于存储监管部门ID
for (int i = 0; i < subdept.size(); i++) {
subIds += subdept.get(i).getString("SUB_DEPARTMENT_ID") + ",";
}
pd.put("DEPARTMENT_IDS", subIds.split(","));
} else {
pd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
}
pd.put("ISSUPERVISE", dept.getString("ISSUPERVISE"));
if (cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")) {
String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID");
String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
ids = pd.getString("DEPARTMENT_ID") + "," + ids; //把自己部门插入进去
if (ids != null && Tools.notEmpty(ids) && ids.lastIndexOf(",") > -1) {
ids = ids.substring(0, ids.lastIndexOf(","));
pd.put("DEPARTMENT_IDS", ids.split(","));
} else {
pd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
}
}
page.setPd(pd);
List<PageData> varList = customService.recordList(page); //列出ListManager列表
for (PageData list : varList) {
String userId = list.getString("USER_ID");
if (userId.equals(pd.get("USER_ID").toString())) {
list.put("stateMy", "0");
} else {
list.put("stateMy", "1");
}
}
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -1352,9 +1352,9 @@ public class AppCustomHiddenController extends BaseController {
* @param
* @throws Exception
*/
@RequestMapping(value = "/getChcenkHidden")
@RequestMapping(value = "/getCheckHidden")
@ResponseBody
public Object getChcenkHidden() throws Exception {
public Object getCheckHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();

View File

@ -0,0 +1,68 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandard;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-01-20
* www.zcloudchina.com
*/
public interface CustomHiddenCheckMapper {
/**
* @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<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
PageData findByHidden(PageData pd);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listExport(PageData pd);
List<PageData> listAllByIds(PageData pd);
}

View File

@ -17,43 +17,43 @@ public interface CustomCheckRecordItemService {
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
void deleteAll(String[] ArrayDATA_IDS)throws Exception;
List<PageData> listAllForMap(PageData pd) throws Exception;
@ -61,7 +61,7 @@ public interface CustomCheckRecordItemService {
* @param pd
* @throws Exception
*/
public void editIsnormal(PageData pd)throws Exception;
void editIsnormal(PageData pd)throws Exception;
}

View File

@ -17,31 +17,31 @@ public interface CustomCheckRecordService {
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
void edit(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public int countOverTime(PageData pd)throws Exception;
int countOverTime(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
List<PageData> list(Page page)throws Exception;
@ -50,129 +50,129 @@ public interface CustomCheckRecordService {
* @param page
* @throws Exception
*/
public List<PageData> listAllList(Page page)throws Exception;
List<PageData> listAllList(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
List<PageData> listAll(PageData pd)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAllUnfinished(PageData pd)throws Exception;
List<PageData> listAllUnfinished(PageData pd)throws Exception;
/**ID
* @param pd
* @throws Exception
*/
public List<PageData> findRiskPointByLId(PageData pd)throws Exception;
List<PageData> findRiskPointByLId(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/* 统计功能 */
public List<PageData> listCountDay(PageData pd)throws Exception;/* 统计日 */
public List<PageData> listCountWeek(PageData pd)throws Exception;/* 统计周 */
public List<PageData> listCountTenDays(PageData pd)throws Exception;/* 统计旬 */
public List<PageData> listCountMonth(PageData pd)throws Exception;/* 统计功月 */
public List<PageData> listCountQuarter(PageData pd)throws Exception;/* 统计季 */
public List<PageData> listCountHalfYear(PageData pd)throws Exception;/* 统计半年 */
public List<PageData> listCountYear(PageData pd)throws Exception;/* 统计年 */
public Integer listCountJjr(PageData pd)throws Exception;/* 统计节假日 */
List<PageData> listCountDay(PageData pd)throws Exception;/* 统计日 */
List<PageData> listCountWeek(PageData pd)throws Exception;/* 统计周 */
List<PageData> listCountTenDays(PageData pd)throws Exception;/* 统计旬 */
List<PageData> listCountMonth(PageData pd)throws Exception;/* 统计功月 */
List<PageData> listCountQuarter(PageData pd)throws Exception;/* 统计季 */
List<PageData> listCountHalfYear(PageData pd)throws Exception;/* 统计半年 */
List<PageData> listCountYear(PageData pd)throws Exception;/* 统计年 */
Integer listCountJjr(PageData pd)throws Exception;/* 统计节假日 */
/**
* @param pd
* @throws Exception
*/
public void editStatistics(PageData pd)throws Exception;
void editStatistics(PageData pd)throws Exception;
/**
*
* @param pd
* @return
*/
public List<PageData> listLogByIde(PageData pd)throws Exception;
List<PageData> listLogByIde(PageData pd)throws Exception;
/**
*
* @param pd
* @return
*/
public List<PageData> recordByIde(PageData pd)throws Exception;
List<PageData> recordByIde(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void recording(PageData pd)throws Exception;
void recording(PageData pd)throws Exception;
/**
* APP
* @param pd
* @return
*/
public List<PageData> appdatalist(PageData pd)throws Exception;
List<PageData> appdatalist(PageData pd)throws Exception;
/**
*
* @param pd
* @return
*/
public List<PageData> countByPeriodUser(PageData pd)throws Exception;
List<PageData> countByPeriodUser(PageData pd)throws Exception;
/**
*
* @param pd
* @return
*/
public int getWorkedUserCount(PageData pd) throws Exception;
int getWorkedUserCount(PageData pd) throws Exception;
/**
*
* @param pd
* @return
*/
public int getWorkedDepCount(PageData pd)throws Exception;
int getWorkedDepCount(PageData pd)throws Exception;
public List<PageData> listTypeBi(PageData pd)throws Exception;
List<PageData> listTypeBi(PageData pd)throws Exception;
/**
* (ids)
* @param pd
* @return
*/
public List<PageData> listForIdsAndMonth(PageData pd)throws Exception;
List<PageData> listForIdsAndMonth(PageData pd)throws Exception;
/**
* (ID)
* @param pd
* @return
*/
public List<PageData> listAllYearForDay(PageData pd)throws Exception;
List<PageData> listAllYearForDay(PageData pd)throws Exception;
/**
* (ID)
* @param pd
* @return
*/
public List<PageData> listAllYearForWeek(PageData pd)throws Exception;
List<PageData> listAllYearForWeek(PageData pd)throws Exception;
/**
* (ID)
* @param pd
* @return
*/
public List<PageData> statisticsListCheckTenday(PageData pd)throws Exception;
List<PageData> statisticsListCheckTenday(PageData pd)throws Exception;
}

View File

@ -17,62 +17,62 @@ public interface CustomCheckUserService {
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
PageData findById(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public PageData getCheckUser(PageData pd)throws Exception;
PageData getCheckUser(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**
* @param pd
* @throws Exception
*/
public List<PageData> countCheByUser(PageData pd)throws Exception;
List<PageData> countCheByUser(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public List<PageData> getDeptExamine(PageData pd)throws Exception;
public List<PageData> getUserExamine(PageData pd)throws Exception;
List<PageData> getDeptExamine(PageData pd)throws Exception;
List<PageData> getUserExamine(PageData pd)throws Exception;
}

View File

@ -0,0 +1,73 @@
package com.zcloud.service.hiddenDangerCheckStandard;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-01-20
* www.zcloudchina.com
*/
public interface CustomHiddenCheckService {
/**
* @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<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findByHidden(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listExport(PageData pd)throws Exception;
public List<PageData> listAllByIds(PageData pd)throws Exception;
}

View File

@ -17,7 +17,7 @@ public interface CustomService {
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
void save(PageData pd)throws Exception;
/**
* @param pd
@ -78,19 +78,25 @@ public interface CustomService {
* @param pd
* @return
*/
public int getListCount(PageData pd)throws Exception;
int getListCount(PageData pd)throws Exception;
/**
*
* @param pd
* @return
*/
public int getWorkedListCount(PageData pd)throws Exception;
int getWorkedListCount(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> getListByCorplistPage(Page page)throws Exception;
List<PageData> getListByCorplistPage(Page page)throws Exception;
/**
* * @param pd
* @throws Exception
*/
List<PageData> recordList(Page page)throws Exception;
}

View File

@ -3,6 +3,7 @@ package com.zcloud.service.hiddenDangerCheckStandard.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.check.CheckUserMapper;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomCheckUserMapper;
import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -21,14 +22,14 @@ import java.util.List;
public class CustomCheckUserServiceImpl implements CustomCheckUserService {
@Autowired
private CheckUserMapper checkuserMapper;
private CustomCheckUserMapper customCheckUserMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
checkuserMapper.save(pd);
customCheckUserMapper.save(pd);
}
/**
@ -36,7 +37,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
checkuserMapper.delete(pd);
customCheckUserMapper.delete(pd);
}
/**
@ -44,7 +45,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
checkuserMapper.edit(pd);
customCheckUserMapper.edit(pd);
}
/**
@ -52,7 +53,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return checkuserMapper.datalistPage(page);
return customCheckUserMapper.datalistPage(page);
}
/**()
@ -60,7 +61,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return checkuserMapper.listAll(pd);
return customCheckUserMapper.listAll(pd);
}
/**id
@ -68,7 +69,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return checkuserMapper.findById(pd);
return customCheckUserMapper.findById(pd);
}
/**
@ -76,7 +77,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public PageData getCheckUser(PageData pd)throws Exception{
return checkuserMapper.getCheckUser(pd);
return customCheckUserMapper.getCheckUser(pd);
}
/**
@ -84,7 +85,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
checkuserMapper.deleteAll(ArrayDATA_IDS);
customCheckUserMapper.deleteAll(ArrayDATA_IDS);
}
/**
@ -92,7 +93,7 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public List<PageData> countCheByUser(PageData pd)throws Exception{
return checkuserMapper.countCheByUser(pd);
return customCheckUserMapper.countCheByUser(pd);
}
/**
@ -100,10 +101,10 @@ public class CustomCheckUserServiceImpl implements CustomCheckUserService {
* @throws Exception
*/
public List<PageData> getDeptExamine(PageData pd)throws Exception{
return checkuserMapper.getDeptExamine(pd);
return customCheckUserMapper.getDeptExamine(pd);
}
public List<PageData> getUserExamine(PageData pd)throws Exception{
return checkuserMapper.getUserExamine(pd);
return customCheckUserMapper.getUserExamine(pd);
}
}

View File

@ -0,0 +1,108 @@
package com.zcloud.service.hiddenDangerCheckStandard.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hidden.HiddenCheckMapper;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomHiddenCheckMapper;
import com.zcloud.service.hidden.HiddenCheckService;
import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-01-20
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class CustomHiddenCheckServiceImpl implements CustomHiddenCheckService {
@Autowired
private CustomHiddenCheckMapper customHiddenCheckMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
customHiddenCheckMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
customHiddenCheckMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
customHiddenCheckMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return customHiddenCheckMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return customHiddenCheckMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return customHiddenCheckMapper.findById(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findByHidden(PageData pd)throws Exception{
return customHiddenCheckMapper.findByHidden(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
customHiddenCheckMapper.deleteAll(ArrayDATA_IDS);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listExport(PageData pd)throws Exception{
return customHiddenCheckMapper.listExport(pd);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAllByIds(PageData pd)throws Exception{
return customHiddenCheckMapper.listAllByIds(pd);
}
}

View File

@ -125,6 +125,14 @@ public class CustomServiceImpl implements CustomService {
public List<PageData> getListByCorplistPage(Page page)throws Exception{
return customMapper.getListByCorplistPage(page);
}
/**
* * @param pd
* @throws Exception
*/
public List<PageData> recordList(Page page)throws Exception{
return customMapper.recordlistPage(page);
}
}

View File

@ -4,7 +4,7 @@
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_checkrecord
BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD
</sql>
<!--数据字典表名 -->
@ -15,6 +15,7 @@
<!-- 字段 -->
<sql id="Field">
f.CUSTOM_ID,
f.CUSTOM_NAME,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
@ -37,6 +38,7 @@
<!-- 字段用于新增 -->
<sql id="Field2">
CUSTOM_ID,
CUSTOM_NAME,
CORPINFO_ID,
CREATOR,
CREATTIME,
@ -61,6 +63,7 @@
<!-- 字段值 -->
<sql id="FieldValue">
#{CUSTOM_ID},
#{CUSTOM_NAME},
#{CORPINFO_ID},
#{CREATOR},
#{CREATTIME},
@ -136,7 +139,7 @@
l.END_DATE
from
<include refid="tableName"></include> f
left join bus_hiddendangercheckstandard_custom l on f.CUSTOM_ID = l.CUSTOM_ID
left join BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM l on f.CUSTOM_ID = l.CUSTOM_ID
left join sys_dictionaries p on l.PERIOD = p.BIANMA
left join sys_dictionaries t on l.TYPE = t.BIANMA
left join sys_dictionaries s on l.SCREENTYPE = s.BIANMA
@ -150,6 +153,7 @@
<select id="appdatalist" parameterType="pd" resultType="pd">
select
f.CUSTOM_ID,
f.CUSTOM_NAME,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
@ -167,17 +171,17 @@
f.PERIODEND DATEEND,
u.NAME AS USER_NAME,
su.NAME AS PRINCIPALNAME,
(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from bus_hiddendangercheckstandard_checkuser bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
(select group_concat(IFNULL(bh.USER_NAME,chr.NAME)) from BUS_HIDDENDANGERCHECKSTANDARD_CHECKUSER bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.CHECKRECORD_ID=f.CHECKRECORD_ID) CHECK_USERS
from
<include refid="tableName"></include> f
left join SYS_USER u on u.USERNAME=f.CREATOR
LEFT JOIN bus_hiddendangercheckstandard_custom l ON l.CUSTOM_ID = f.CUSTOM_ID
LEFT JOIN BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM l ON l.CUSTOM_ID = f.CUSTOM_ID
LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID} and f.FINISHED='1'
<if test="KEYWORDS != null and KEYWORDS != ''">
and
(
f.LIST_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
l.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
)
</if>
<if test="CUSTOM_ID != null and CUSTOM_ID != ''">

View File

@ -4,7 +4,7 @@
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_checkuser
BUS_HIDDENDANGERCHECKSTANDARD_CHECKUSER
</sql>
<!--数据字典表名 -->
@ -149,15 +149,15 @@
<!-- 查看检查清单检查人 -->
<select id="getCheckUser" parameterType="pd" resultType="pd">
SELECT
GROUP_CONCAT(DISTINCT IFNULL(F.USER_NAME, U.NAME)) USERS
GROUP_CONCAT(DISTINCT IFNULL(f.USER_NAME, u.NAME)) USERS
FROM
BUS_CHECKUSER F
LEFT JOIN SYS_USER U ON U.USER_ID = F.USER_ID
WHERE U.NAME IS NOT NULL
AND U.NAME != ''
AND F.CHECKRECORD_ID = #{CHECKRECORD_ID}
<include refid="tableName"></include> f
LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
WHERE u.NAME IS NOT NULL
AND u.NAME != ''
AND f.CHECKRECORD_ID = #{CHECKRECORD_ID}
GROUP BY
F.CHECKRECORD_ID
f.CHECKRECORD_ID
</select>
<!-- 绩效得分 -->

View File

@ -0,0 +1,271 @@
<?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.hiddenDangerCheckStandard.CustomHiddenCheckMapper">
<!--表名 -->
<sql id="tableName">
BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.HIDDEN_ID,
f.DEPARTMENT_ID,
f.USER_ID,
f.STATUS,
f.CHECK_TIME,
f.CHECKDESCR,
f.HIDDENCHECK_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
HIDDEN_ID,
DEPARTMENT_ID,
USER_ID,
STATUS,
CHECK_TIME,
CHECKDESCR,
HIDDENCHECK_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{HIDDEN_ID},
#{DEPARTMENT_ID},
#{USER_ID},
#{STATUS},
#{CHECK_TIME},
#{CHECKDESCR},
#{HIDDENCHECK_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
HIDDEN_ID = #{HIDDEN_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
HIDDEN_ID = #{HIDDEN_ID},
DEPARTMENT_ID = #{DEPARTMENT_ID},
USER_ID = #{USER_ID},
STATUS = #{STATUS},
CHECK_TIME = #{CHECK_TIME},
CHECKDESCR = #{CHECKDESCR},
HIDDENCHECK_ID = HIDDENCHECK_ID
where
HIDDENCHECK_ID = #{HIDDENCHECK_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HIDDENCHECK_ID = #{HIDDENCHECK_ID}
</select>
<!-- 通过ID获取数据 -->
<select id="findByHidden" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HIDDEN_ID = #{HIDDEN_ID} and f.USER_ID = #{CHECKOR}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,
u.NAME CHECKORNAME,
d.NAME CHECKDEPTNAME
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_ID
left join oa_department d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
where 1=1
<if test="HIDDEN_ID != null and HIDDEN_ID != ''"><!-- 关键词检索 -->
and
f.HIDDEN_ID=#{HIDDEN_ID}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HIDDENCHECK_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 列表(全部) -->
<select id="listExport" parameterType="pd" resultType="com.zcloud.entity.PageData">
select
<include refid="Field"></include>,
su.NAME as CHECKORNAME,
od.NAME as CHECKDEPTNAME
from
<include refid="tableName"></include> f
left join sys_user su on f.USER_ID = su.USER_ID
left join oa_department od on f.DEPARTMENT_ID = od.DEPARTMENT_ID
where 1=1
and EXISTS (
select
1
from bus_hidden h
where
h.hidden_id = f.hidden_id and
h.ISDELETE = '0' and h.STATE != '0'
<if test="SOURCE != null and SOURCE != ''">
and h.SOURCE=#{SOURCE}
</if>
<if test="IS_CANCEL != null and IS_CANCEL != ''"><!-- 是否作废 -->
and h.CHECKRECORD_ID is null
</if>
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
and h.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="FIND_CHECKRECORD_ID != null and FIND_CHECKRECORD_ID != ''">
and h.CHECKRECORD_ID=#{CHECKRECORD_ID}
</if>
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
and
(
h.RISK_UNIT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.RISK_POSITION LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
or
h.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
)
</if>
<if test="HIDDENDESCR != null and HIDDENDESCR != ''"><!-- 关键词检索 -->
and h.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{HIDDENDESCR}),'%')
</if>
<if test="ISQUALIFIED != null and ISQUALIFIED != ''"><!-- 关键词检索 -->
and h.ISQUALIFIED = #{ISQUALIFIED}
</if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"><!-- 关键词检索 -->
and h.HIDDENFINDDEPT = #{DEPARTMENT_ID}
</if>
<if test="HIDDENLEVEL != null and HIDDENLEVEL != ''"><!-- 关键词检索 -->
and h.HIDDENLEVEL = #{HIDDENLEVEL}
</if>
<if test="STARTTIME != null and STARTTIME != ''"><!-- 关键词检索 -->
and h.CREATTIME &gt;= #{STARTTIME}
</if>
<if test="ENDTIME != null and ENDTIME != ''">
and h.CREATTIME &lt;= #{ENDTIME}
</if>
<if test="STATE != null and STATE !='' and STATE != 0" >
and h.STATE = #{STATE}
</if>
<if test="SELF_USER_ID != null and SELF_USER_ID != ''">
and h.CREATOR = #{SELF_USER_ID}
</if>
<if test="DISPOSESTATE != null and DISPOSESTATE != ''"><!-- 关键词检索 -->
<if test="DISPOSESTATE==2"><!-- 整改 -->
and h.RECTIFICATIONOR = #{SELFUSERID}
and h.STATE in('1','-1')
</if>
<if test="DISPOSESTATE==3"><!-- 验收 -->
and h.STATE = '3'
and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID and bh.STATUS=0)>0
</if>
<if test="DISPOSESTATE==4"><!-- 已验收 -->
and h.STATE = '4'
and (h.RECTIFICATIONOR = #{SELFUSERID} or h.CREATOR = #{SELFUSERID} or (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID)>0)
</if>
<if test="DISPOSESTATE==-1"><!-- 所有 -->
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and
h.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
and
h.STATE = #{STATE}
</if>
</if>
</if>
<if test="HIDDEN_IDS != null and HIDDEN_IDS != ''"><!-- 关键词检索 -->
and
(
h.HIDDEN_ID in
<foreach item="item" index="index" collection="HIDDEN_IDS" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
)
</select>
<!-- 通过隐患ID查询验收信息列表 -->
<select id="listAllByIds" parameterType="String" resultType="com.zcloud.entity.PageData">
select
<include refid="Field"></include>,su.NAME,od.NAME DEPARTMENT_NAME
from
<include refid="tableName"></include> f
left join sys_user su on su.USER_ID = f.USER_ID
left join oa_department od on od.DEPARTMENT_ID = f.DEPARTMENT_ID
where 1=1
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
and f.HIDDEN_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>

View File

@ -788,7 +788,7 @@
red.NAME RECTIFICATIONDEPTNAME,
chd.NAME CHECKDEPTNAME,
lv.NAME HIDDENLEVELNAME,
(select group_concat(chr.NAME) from BUS_HIDDENCHECK bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.HIDDEN_ID=f.HIDDEN_ID ) CHECKNAME
(select group_concat(chr.NAME) from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.HIDDEN_ID=f.HIDDEN_ID ) CHECKNAME
from
<include refid="tableName"></include> f
left join sys_user cr on cr.USER_ID = f.CREATOR

View File

@ -316,6 +316,345 @@
f.CUSTOM_ID = #{CUSTOM_ID}
</select>
<!-- 部门清单列表 -->
<select id="recordlistPage" parameterType="page" resultType="pd">
select * from
(
select
<include refid="Field"></include>
,
u.WORKSTATUS,
a.STARTTIME,
a.ENDTIME ,
p.NAME PERIODNAME,
t.NAME TYPENAME,
m.NAME SCREENTYPENAME,
d.NAME as DEPARTMENT_NAME,
getFullName(d.DEPARTMENT_ID) as DEPARTMENT_NAME_ALL,
sp.NAME
AS POST_NAME,
u.NAME as USER_NAME,
(
select count(1) from BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD ch
where ch.CUSTOM_ID=f.CUSTOM_ID AND ch.type = '1'
and ch.FINISHED='1' and ch.ISDELETE =0
) as count ,
(
select
count(1)
from BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD ch
left join bus_hiddendangercheckstandard_hidden h on h.CHECKRECORD_ID = ch.CHECKRECORD_ID
where ch.CUSTOM_ID=f.CUSTOM_ID
and ch.FINISHED='1'
and ch.ISDELETE =0
and h.ISDELETE =0
and h.HIDDEN_ID is not null
) as hiddenCount,
(
CASE
WHEN f.TYPE = 'listType0005' THEN
CONCAT( f.START_DATE, " 00:00:00" )
WHEN f.PERIOD = 'checkPeriod0001' THEN
(select sd.DAY_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0002' THEN
(select sd.WEEK_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0003' THEN
(select sd.XUN_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0004' THEN
(select sd.MONTH_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0005' THEN
(select sd.QUARTER_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0006' THEN
(select sd.YEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0007' THEN
(select sd.HALFYEAR_START from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
END
) DATESTART,
bb.NAME AS TASK_TYPE_NAME,
(
CASE
WHEN f.TYPE = 'listType0005' THEN
CONCAT( f.END_DATE, " 23:59:59" )
WHEN f.PERIOD = 'checkPeriod0001' THEN
(select sd.DAY_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0002' THEN
(select sd.WEEK_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0003' THEN
(select sd.XUN_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0004' THEN
(select sd.MONTH_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0005' THEN
(select sd.QUARTER_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0006' THEN
(select sd.YEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
WHEN f.PERIOD = 'checkPeriod0007' THEN
(select sd.HALFYEAR_END from v_sysdate sd where DATE_FORMAT( sd.`date`,'%Y-%m-%d' ) = DATE_FORMAT(now(),'%Y-%m-%d') )
END
) DATEEND,
getCheckedNum(f.CUSTOM_ID) checkCount,
(select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') overTimeCount
from
<include refid="tableName"></include> f
LEFT JOIN BUS_OFFDUTY a on f.USER_ID = a.USER_ID and a.isdelete = '0' and a.STARTTIME &lt;= date_format(now(),'%Y-%m-%d') and a.ENDTIME &gt;= date_format(now(),'%Y-%m-%d')
left join sys_dictionaries p on f.PERIOD = p.BIANMA
left join sys_dictionaries t on f.TYPE = t.BIANMA
left join sys_dictionaries m on f.SCREENTYPE = m.BIANMA
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN sys_dictionaries bb ON f.TASK_TYPE = bb.DICTIONARIES_ID
left join SYS_POST sp on sp.POST_ID = f.POST_ID
left join SYS_USER u on u.USER_ID = f.USER_ID
where f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.ISDELETE != '-99'
<if test="pd.RISKCHECKLISTTYPE != null and pd.RISKCHECKLISTTYPE != ''"><!-- 状态 -->
and f.SCREENTYPE = #{pd.RISKCHECKLISTTYPE}
</if>
<if test="pd.statusIds != null and pd.statusIds != ''">
and
(
f.CUSTOM_ID in
<foreach item="item" index="index" collection="pd.statusIds"
open="(" separator="," close=")">
'${item}'
</foreach>
)
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''"><!-- 关键词检索 -->
and f.DEPARTMENT_ID = #{pd.DEPT_ID}
</when>
<otherwise>
and
((f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
and
f.DEPARTMENT_ID = #{pd.DEPT_ID}
</when>
<otherwise>
and
(f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.USER_ID = #{pd.USER_ID})
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
and
f.DEPARTMENT_ID = #{pd.DEPT_ID}
</when>
<otherwise>
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPT_ID != null and pd.DEPT_ID != ''">
and
f.DEPARTMENT_ID = #{pd.DEPT_ID}
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and f.USER_ID = #{pd.USER_ID}
and f.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<if test="pd.USERNAME != null and pd.USERNAME != ''"><!-- 关键词检索 -->
and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
</if>
<if test="pd.ISDELETE != null and pd.ISDELETE != ''"><!-- 状态 -->
and f.ISDELETE = #{pd.ISDELETE}
</if>
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.STATUS=="1"'>
AND getCheckedNum(f.CUSTOM_ID) &gt; 0
</when>
<when test='pd.STATUS=="0"'>
AND getCheckedNum(f.CUSTOM_ID) = 0
</when>
<otherwise>
</otherwise>
</choose>
</if>
<if test="pd.OVERTIME != null and pd.OVERTIME != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.OVERTIME=="1"'>
AND (select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') &gt; 0
</when>
<when test='pd.OVERTIME=="0"'>
AND (select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') = 0
</when>
<otherwise>
</otherwise>
</choose>
</if>
<if test="pd.PERIOD != null and pd.PERIOD != ''"><!-- 关键词检索 -->
and f.PERIOD = #{pd.PERIOD}
</if>
<if test="pd.TYPE != null and pd.TYPE != ''"><!-- 关键词检索 -->
and f.TYPE = #{pd.TYPE}
</if>
<if test='pd.WORKSTATUS == "0"'>
and (
(a.STARTTIME is null or a.ENDTIME is null)
or (to_days(a.STARTTIME) &lt; to_days(NOW()) and to_days(a.ENDTIME) &gt; to_days(NOW()))
AND u.WORKSTATUS != '2'
)
</if>
<if test='pd.WORKSTATUS == "1"'>
and !(
(a.STARTTIME is null or a.ENDTIME is null)
or (to_days(a.STARTTIME) &lt; to_days(NOW()) and to_days(a.ENDTIME) &gt; to_days(NOW()))
or u.WORKSTATUS = '2'
)
</if>
<if test="pd.LISTINGLEVEL != null and pd.LISTINGLEVEL != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.LISTINGLEVEL == "1"'>
and d.LEVEL = ''
</when>
<otherwise>
and d.LEVEL = #{pd.LISTINGLEVEL}
</otherwise>
</choose>
</if>
<if test="(pd.STARTTIME != null and pd.STARTTIME != '') or (pd.ENDTIME != null and pd.ENDTIME != '')"><!-- 关键词检索 -->
<choose>
<when
test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and f.CUSTOM_ID in
(
SELECT CUSTOM_ID
FROM BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD
WHERE FINISHED = '1'
AND ISDELETE = 0
and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') &gt;= #{pd.STARTTIME}
and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') &lt;= #{pd.ENDTIME}
)
</when>
<when test="pd.STARTTIME != null and pd.STARTTIME != ''">
and f.CUSTOM_ID in
(
SELECT CUSTOM_ID
FROM BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD
WHERE FINISHED = '1'
AND ISDELETE = 0
and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') &gt;= #{pd.STARTTIME}
)
</when>
<when test="pd.ENDTIME != null and pd.ENDTIME != ''">
and f.CUSTOM_ID in
(
SELECT CUSTOM_ID
FROM BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD
WHERE FINISHED = '1'
AND ISDELETE = 0
and DATE_FORMAT(CHECK_TIME,'%Y-%m-%d %H:%i:%s') &lt;= #{pd.ENDTIME}
)
</when>
</choose>
</if>
) f
where 1= 1
<if test="pd.HASHIDDEN != null and pd.HASHIDDEN != ''"><!-- 关键词检索 -->
<choose>
<when test="pd.HASHIDDEN == 0">
and f.hiddenCount = 0
</when>
<when test="pd.HASHIDDEN == 1">
and f.hiddenCount > 0
</when>
</choose>
</if>
group by f.CUSTOM_ID
order by field(f.ISDELETE,'0','1','2','-1') ,f.OPERATTIME desc
</select>
<!-- 列表(全部) -->
<select id="getMyCheckList" parameterType="pd" resultType="pd">
select
@ -391,10 +730,10 @@
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.STATUS=="1"'>
AND getStandardCheckedNum(f.LISTMANAGER_ID) &gt; 0
AND getStandardCheckedNum(f.CUSTOM_ID) &gt; 0
</when>
<when test='pd.STATUS=="0"'>
AND getStandardCheckedNum(f.LISTMANAGER_ID) = 0
AND getStandardCheckedNum(f.CUSTOM_ID) = 0
</when>
<otherwise>
</otherwise>