隐患排查接口

pull/4/head
zhangyanli 2024-01-30 16:00:22 +08:00
parent 8cf8ac2c1d
commit 5ecf9c56c9
23 changed files with 2495 additions and 0 deletions

View File

@ -0,0 +1,55 @@
package com.zcloud.controller.hiddenDangerCheckStandardCustom;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCommonService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/hiddenstandardCommon")
public class hiddenDangerCheckStandardCommonController extends BaseController {
@Autowired
private HiddenDangerCheckStandardCommonService hiddenstandardCommonService;
@Autowired
private CorpInfoService corpinfoService;
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
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()); //企业
pd = corpinfoService.findById(pd); //根据ID读取
page.setPd(pd);
List<PageData> varList = hiddenstandardCommonService.list(page); //列出RiskCheckItem列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,996 @@
package com.zcloud.controller.hiddenDangerCheckStandardCustom;
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.check.*;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomItemService;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomService;
import com.zcloud.service.offduty.OffDutyService;
import com.zcloud.service.risk.IdentificationPartsService;
import com.zcloud.service.risk.RiskPointService;
import com.zcloud.service.statistics.ListStatisticsService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/hiddenstandardCustom")
public class hiddenDangerCheckStandardCustomController extends BaseController {
@Autowired
private HiddenDangerCheckStandardCustomService hiddenstandardCustomService;
@Autowired
private HiddenDangerCheckStandardCustomItemService hiddenstandardCustomItemService;
@Autowired
private ListCheckItemService listcheckitemService;
@Autowired
private DepartmentService departmentService;
@Autowired
private CheckRecordService checkrecordService;
@Autowired
private RecordItemService recordItemService;
@Autowired
private RiskPointService riskpointService;
@Autowired
private ListStatisticsService listStatisticsService;
@Autowired
private IdentificationPartsService identificationPartsService;
@Autowired
private ListDisableTimeService listdisabletimeService;
@Autowired
private CheckRouteService checkRouteService;
@Autowired
private UsersService usersService;
@Autowired
private OffDutyService offdutyService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
@Transactional
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "新增")
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CUSTOM_ID", this.get32UUID());
Warden.initDate(pd);
hiddenstandardCustomService.save(pd);
PageData itempd = new PageData();
itempd.putAll(pd);
itempd.put("CUSTOM_ITEM_ID", this.get32UUID());
hiddenstandardCustomItemService.save(itempd);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "列表")
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData npd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))npd.put("KEYWORDS", KEYWORDS.trim());
List<PageData> varList = hiddenstandardCustomService.listAll(pd);
map.put("varList", varList);
map.put("result", errInfo);
return map;
}
// /**列表
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/checkList")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单排查",instructionsType = "列表")
// public Object checkList(Page page) throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// PageData isRest = this.getPageData();
// isRest.put("ISREST", "1");
// isRest.put("USER_ID", Jurisdiction.getUSER_ID());
// isRest.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// List<PageData> restList = offdutyService.listAll(isRest);
// if(restList != null && restList.size() > 0) {
// // 休假中
// map.put("ISREST", "1");
// } else {
// // 正常工作
// map.put("ISREST", "0");
// }
// PageData npd = new PageData();
// npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
//// pd.put("POST_ID", Jurisdiction.getPOST_ID()); //岗位
// pd.put("USER_ID", Jurisdiction.getUSER_ID());
// String indexType = pd.getString("indexType"); //关键词检索条件
// if(Tools.notEmpty(indexType))pd.put("indexType", indexType.trim());
// if("1".equals(indexType)) {
// npd.put("STATUS", "0");
// String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
// npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
// } else if("2".equals(indexType)) {
//
// npd.put("STATUS", "1");
// String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
// npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
// } else {
// String DEPARTMENT_ID = Jurisdiction.getDEPARTMENT_ID();
// String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
// if(Jurisdiction.getIS_MAIN().equals("0")) {
// if(ids!=null && Tools.notEmpty(ids) && ids.lastIndexOf(",")>-1 ) {
// ids = ids.substring(0,ids.lastIndexOf(","));
// npd.put("DEPARTMENT_IDS", ids.split(","));
// }else {
// npd.put("DEPARTMENT_ID", DEPARTMENT_ID);
// }
// }
// }
//
// npd.put("orderUserId", Jurisdiction.getUSER_ID());
// String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
// if(Tools.notEmpty(KEYWORDS))npd.put("KEYWORDS", KEYWORDS.trim());
// String USERNAME = pd.getString("USERNAME"); //关键词检索条件
// if(Tools.notEmpty(USERNAME))npd.put("USERNAME", USERNAME.trim());
// npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
// npd.put("ISMAIN", Jurisdiction.getIS_MAIN());
// npd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
// npd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
// PageData cpd = new PageData();
// cpd = usersService.findById(pd);
// npd.put("ISLEADER", cpd.getString("ISLEADER"));
// if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){
// String DEPARTMENT_ID = npd.getString("DEPARTMENT_ID");
// String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
// ids=npd.getString("DEPARTMENT_ID")+","+ids; //把自己部门插入进去
// if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) {
// ids = ids.substring(0,ids.lastIndexOf(","));
// npd.put("DEPARTMENT_IDS", ids.split(","));
// }else {
// npd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
// }
// }else{
// if(npd.getString("ISMAIN").equals("0")){
// npd.put("USER_ID",Jurisdiction.getUSER_ID());
// }
// }
// String DEPTIDS = pd.getString("DEPTIDS");
// if(Tools.notEmpty(DEPTIDS)) {
// String DEPT_IDS[] = DEPTIDS.split(",");
// npd.put("DEPT_IDS", DEPT_IDS);
// }
// npd.put("PERIOD",pd.getString("PERIOD"));
// npd.put("STATUS",pd.getString("STATUS"));
// npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
// page.setPd(npd);
// List<PageData> varList = listmanagerService.checklistPage(page); //列出ListManager列表
// for (PageData list : varList) {
// String userId= list.getString("USER_ID");
// if(userId.equals(Jurisdiction.getUSER_ID())) {
// list.put("stateMy", "0");
// }else {
// list.put("stateMy", "1");
// }
//
// }
// map.put("varList", varList);
// map.put("page", page);
// map.put("result", errInfo);
// return map;
// }
// /**列表
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/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();
// PageData npd = new PageData();
// pd = this.getPageData();
// npd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
//// pd.put("POST_ID", Jurisdiction.getPOST_ID()); //岗位
// pd.put("USER_ID", Jurisdiction.getUSER_ID());
// npd.put("ISMAIN", Jurisdiction.getIS_MAIN());
// npd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
// npd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
// PageData cpd = new PageData();
// cpd = usersService.findById(pd);
// npd.put("ISLEADER", cpd.getString("ISLEADER"));
// if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){
// String DEPARTMENT_ID = npd.getString("DEPARTMENT_ID");
// String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
// ids=npd.getString("DEPARTMENT_ID")+","+ids; //把自己部门插入进去
// if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) {
// ids = ids.substring(0,ids.lastIndexOf(","));
// npd.put("DEPARTMENT_IDS", ids.split(","));
// }else {
// npd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
// }
// }else {
// if(npd.getString("ISMAIN").equals("0")){
// npd.put("USER_ID",Jurisdiction.getUSER_ID());
// }
// }
// String DEPTIDS = pd.getString("DEPTIDS");
// if(Tools.notEmpty(DEPTIDS)) {
// String DEPT_IDS[] = DEPTIDS.split(",");
// npd.put("DEPT_IDS", DEPT_IDS);
// }
// String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
// if(Tools.notEmpty(KEYWORDS))npd.put("KEYWORDS", KEYWORDS.trim());
// String STARTTIME = pd.getString("STARTTIME"); //关键词检索条件
// if(Tools.notEmpty(STARTTIME))npd.put("STARTTIME", STARTTIME.trim() + " 00:00:00");
// String ENDTIME = pd.getString("ENDTIME"); //关键词检索条件
// if(Tools.notEmpty(ENDTIME))npd.put("ENDTIME", ENDTIME.trim() + " 23:59:59");
// npd.put("ISDELETE",pd.getString("ISDELETE"));
// npd.put("USERNAME",pd.getString("USERNAME"));
// npd.put("STATUS",pd.getString("STATUS"));
// npd.put("PERIOD",pd.getString("PERIOD"));
// npd.put("OVERTIME",pd.getString("OVERTIME"));
// npd.put("WORKSTATUS",pd.getString("WORKSTATUS"));
// npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
// npd.put("TYPE",pd.getString("TYPE"));
// npd.put("HASHIDDEN",pd.getString("HASHIDDEN"));
// npd.put("RISKCHECKLISTTYPE",pd.getString("RISKCHECKLISTTYPE"));
// page.setPd(npd);
// List<PageData> varList = listmanagerService.recordList(page); //列出ListManager列表
// for (PageData list : varList) {
// String userId= list.getString("USER_ID");
// if(userId.equals(Jurisdiction.getUSER_ID())) {
// list.put("stateMy", "0");
// }else {
// list.put("stateMy", "1");
// }
// }
// map.put("varList", varList);
// map.put("page", page);
// map.put("result", errInfo);
// return map;
// }
//
// /**去修改页面获取数据
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/goEdit")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "去修改页面获取数据")
// public Object goEdit() 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());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// pd = listmanagerService.findById(pd); //根据ID读取
//
// for (PageData item : varList) {
// item.put("RECORDITEM_ID", this.get32UUID()); //主键
// }
// List<PageData> ideList = identificationPartsService.listAllByList(pd);
//
// map.put("varList", varList);
// map.put("ideList", ideList);
// map.put("pd", pd);
// map.put("result", errInfo);
// return map;
// }
//
// /**批量删除
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/deleteAll")
// @RequiresPermissions("listmanager:del")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "批量删除")
// public Object deleteAll() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// String DATA_IDS = pd.getString("DATA_IDS");
// if(Tools.notEmpty(DATA_IDS)){
// String ArrayDATA_IDS[] = DATA_IDS.split(",");
// for(int i = 0; i < ArrayDATA_IDS.length; i++) {
// PageData pd1 = new PageData();
// pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// pd1.put("LISTMANAGER_ID", ArrayDATA_IDS[i]);
// listmanagerService.remove(pd1);
// pd1 = listmanagerService.findById(pd1);
// if(pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
// if("listType0005".equals(pd1.get("TYPE").toString())) {
// pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
// pd1.put("STARTTIME", pd1.get("START_DATE").toString()+" 00:00:00");
// pd1.put("ENDTIME", pd1.get("END_DATE").toString()+" 23:59:59");
// pd1.put("PERIOD", null);
// PageData statistics = listStatisticsService.findByCondition(pd1);
// if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
// statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-2);
// listStatisticsService.edit(statistics);
// }
// pd1.put("ISSTATISTICS", '0');
// // 本期已检查的不计入统计
// checkrecordService.editStatistics(pd1);
// } else {
// if(pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
// String period = pd1.get("PERIOD").toString();
// switch (period) {
// case "checkPeriod0001"://每日
// pd1.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
// pd1.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
// break;
//
// case "checkPeriod0002"://每周
// pd1.put("STARTTIME", DateUtil.getWeekStart());
// pd1.put("ENDTIME", DateUtil.getWeekEnd());
// break;
//
// case "checkPeriod0003"://每旬
// String year = DateUtil.getYear().toString();
// String month = DateUtil.getMonth().toString();
// Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
// String startTime = year + "-" + month + "-";
// String endTime = year + "-" + month + "-";
// if(day <= 10) {
// startTime = startTime+"01 00:00:00";
// endTime = endTime+"10 23:59:59";
// } else if(day > 10 && day <= 20) {
// startTime = startTime+"11 00:00:00";
// endTime = endTime+"20 23:59:59";
// } else {
// startTime = startTime+"21 00:00:00";
// endTime = DateUtil.getMonthEndDay()+" 23:59:59";
// }
// pd1.put("STARTTIME", startTime);
// pd1.put("ENDTIME", endTime);
// break;
//
// case "checkPeriod0004"://每月
// pd1.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
// pd1.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
// break;
//
// case "checkPeriod0005"://每季
// pd1.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
// pd1.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
// break;
//
// case "checkPeriod0006"://每年
// pd1.put("STARTTIME", DateUtil.getCurrYearFirst()+" 00:00:00");
// pd1.put("ENDTIME", DateUtil.getCurrYearLast()+" 23:59:59");
// break;
//
// case "checkPeriod0007"://半年
// String byear = DateUtil.getYear().toString();
// Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
// if(bmonth <= 6) {
// pd1.put("STARTTIME", byear+"-01-01 00:00:00");
// pd1.put("ENDTIME", byear+"-06-30 23:59:59");
// } else if(bmonth > 6) {
// pd1.put("STARTTIME", byear+"-07-01 00:00:00");
// pd1.put("ENDTIME", byear+"-12-31 23:59:59");
// }
// break;
//
// default:
// break;
// }
// }
// PageData statistics = listStatisticsService.findByCondition(pd1);
// if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
// statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-1);
// listStatisticsService.edit(statistics);
// }
//
// pd1.put("ISSTATISTICS", '0');
// // 本期已检查的不计入统计
// checkrecordService.editStatistics(pd1);
// }
// }
// }
// errInfo = "success";
// }else{
// errInfo = "error";
// }
// map.put("result", errInfo); //返回结果
// return map;
// }
//
// /**批量删除
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/deleteAlltemp")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "批量删除")
// public Object deleteAlltemp() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// String DATA_IDS = pd.getString("DATA_IDS");
// if(Tools.notEmpty(DATA_IDS)){
// String ArrayDATA_IDS[] = DATA_IDS.split(",");
// for(int i = 0; i < ArrayDATA_IDS.length; i++) {
// PageData pd1 = new PageData();
// pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// pd1.put("LISTMANAGER_ID", ArrayDATA_IDS[i]);
// listmanagerService.deleted(pd1);
// pd1 = listmanagerService.findById(pd1);
// if(pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
// pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
// pd1.put("STARTTIME", pd1.get("START_DATE").toString()+" 00:00:00");
// pd1.put("ENDTIME", pd1.get("END_DATE").toString()+" 23:59:59");
// pd1.put("PERIOD", null);
// PageData statistics = listStatisticsService.findByCondition(pd1);
// if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
// statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())-1);
// listStatisticsService.edit(statistics);
// }
// pd1.put("ISSTATISTICS", '0');
// // 本期已检查的不计入统计
// checkrecordService.editStatistics(pd1);
// }
// }
// errInfo = "success";
// }else{
// errInfo = "error";
// }
// map.put("result", errInfo); //返回结果
// return map;
// }
//
// /**导出到excel
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/excel")
// public ModelAndView exportExcel() throws Exception{
// ModelAndView mv = new ModelAndView();
// PageData pd = new PageData();
// pd = this.getPageData();
// Map<String,Object> dataMap = new HashMap<String,Object>();
// List<String> titles = new ArrayList<String>();
// titles.add("清单名称"); //1
// titles.add("排查周期"); //2
// titles.add("清单类型"); //3
// titles.add("企业id"); //4
// titles.add("添加人"); //5
// titles.add("添加时间"); //6
// titles.add("修改人"); //7
// titles.add("修改时间"); //8
// titles.add("是否删除 1-是 0-否"); //9
// dataMap.put("titles", titles);
// List<PageData> varOList = listmanagerService.listAll(pd);
// List<PageData> varList = new ArrayList<PageData>();
// for(int i=0;i<varOList.size();i++){
// PageData vpd = new PageData();
// vpd.put("var1", varOList.get(i).getString("NAME")); //1
// vpd.put("var2", varOList.get(i).getString("PERIOD")); //2
// vpd.put("var3", varOList.get(i).getString("TYPE")); //3
// vpd.put("var4", varOList.get(i).getString("CORPINFO_ID")); //4
// vpd.put("var5", varOList.get(i).getString("CREATOR")); //5
// vpd.put("var6", varOList.get(i).getString("CREATTIME")); //6
// vpd.put("var7", varOList.get(i).getString("OPERATOR")); //7
// vpd.put("var8", varOList.get(i).getString("OPERATTIME")); //8
// vpd.put("var9", varOList.get(i).getString("ISDELETE")); //9
// varList.add(vpd);
// }
// dataMap.put("varList", varList);
// ObjectExcelView erv = new ObjectExcelView();
// mv = new ModelAndView(erv,dataMap);
// return mv;
// }
//
// /**列表
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/checkListIndex")
// @ResponseBody
// @LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "列表")
// public Object checkListIndex() 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("POST_ID", Jurisdiction.getPOST_ID()); //岗位
// pd.put("USER_ID", Jurisdiction.getUSER_ID());
// pd.put("orderUserId", Jurisdiction.getUSER_ID());
// pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
//// String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
//// if(Jurisdiction.getIS_MAIN().equals("0")) {
//// 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_ID", DEPARTMENT_ID);
//// }
//// }
// List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
// int wjcNum = 0;
// int yjcNum = 0;
// for (PageData list : varList) {
// if(list.getString("TYPE").equals("listType0005")) {
// if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
// yjcNum++;
// } else {
// wjcNum++;
// }
// continue;
// }
// if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
// yjcNum++;
// } else {
// wjcNum++;
// }
// }
// map.put("yjcNum", yjcNum);
// map.put("wjcNum", wjcNum);
// map.put("varList", varList);
// map.put("result", errInfo);
// return map;
// }
//
//
// /**列表
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/listAllByCorpMsm")
// @ResponseBody
// public Object listAllByCorpMsm() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// List<PageData> varList = listmanagerService.listAllByCorpMsm(pd); //列出ListManager列表
// if(varList != null && varList.size() > 0) {
// // 用户合集
// Map<String, PageData> varMap = new HashMap<String, PageData>();
// for(int i = 0;i<varList.size();i++) {
// // 查询未检查清单并按userid分组
// if(Integer.parseInt(varList.get(i).get("checkCount").toString()) == 0) {
// if(!varMap.containsKey(varList.get(i).get("USER_ID").toString())) {// 用户不存在时,向合集中加入该用户\
// PageData user = new PageData();
// user.put("USER_ID", varList.get(i).get("USER_ID"));
// user.put("USER_NAME", varList.get(i).get("USER_NAME"));
// user.put("PHONE", varList.get(i).get("PHONE"));
// user.put("NUM", 1);
// user.put("CORPINFO_ID", varList.get(i).get("CORPINFO_ID"));
// user.put("SMS_COUNT", varList.get(i).get("SMS_COUNT"));
// varMap.put(varList.get(i).get("USER_ID").toString(), user);
// } else {
// PageData uData = varMap.get(varList.get(i).get("USER_ID").toString());
// uData.put("NUM", Integer.valueOf(uData.get("NUM").toString())+1);
// varMap.put(varList.get(i).get("USER_ID").toString(), uData);
// }
// }
// }
// // 短信集合
// List<PageData> msmList = new ArrayList<PageData>(varMap.values());
// map.put("msmList", msmList);
//
// }
//
// map.put("result", errInfo);
// return map;
// }
// /**根据分类统计清单
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/countListByType")
// @ResponseBody
// public Object countListByType() 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()); //企业
// List<PageData> varList = listmanagerService.countListByType(pd); //列出ListManager列表
// List<PageData> datas = new ArrayList<PageData>();
//
// /*DecimalFormat df = new DecimalFormat("#.00");
// Double sum = 0d;
// for(PageData list:varList) {
// sum += Double.parseDouble(list.get("NUM").toString());
// }
// for(PageData list: varList) {
// PageData data = new PageData();
// Double num = Double.parseDouble(list.get("NUM").toString());
// data.put("value", Double.parseDouble(df.format(num/sum)));
// data.put("name", list.getString("NAME"));
// datas.add(data);
// }*/
// for(PageData list: varList) {
// PageData data = new PageData();
// data.put("value", Integer.parseInt(list.get("NUM").toString()));
// data.put("name", list.getString("NAME"));
// datas.add(data);
// }
// map.put("datas", datas);
// map.put("result", errInfo);
// return map;
// }
//
// /**首页 获取折线图
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/goIndexCount")
// @ResponseBody
// @LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "首页 获取折线图")
// public Object goIndexCount() 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()); //企业
// List<String> dates = DateUtil.getHalfYearMonth(true);
// pd.put("TIME", dates.get(0));
// List<PageData> varList = listmanagerService.goIndexCount(pd);
// List<String> xcqd = new ArrayList<String>();
// List<String> jcqd = new ArrayList<String>();
// List<String> zhqd = new ArrayList<String>();
// for(int i = 0; i < dates.size(); i++) {
// xcqd.add("0");
// jcqd.add("0");
// zhqd.add("0");
// }
// Map<String, PageData> listMap = new HashMap<>();
// if(varList != null && varList.size() > 0) {
// for(PageData list : varList) {
// int index = dates.indexOf(list.getString("TIME"));
// switch (list.getString("SCREENTYPE")) {
// case "riskChecklistType0001":
// xcqd.set(index, list.get("COUNT").toString());
// break;
// case "riskChecklistType0002":
//
// jcqd.set(index, list.get("COUNT").toString());
// break;
// case "zhqd03":
//
// zhqd.set(index, list.get("COUNT").toString());
// break;
//
// default:
// break;
// }
// }
// }
//
// map.put("xcqd", xcqd);
// map.put("jcqd", jcqd);
// map.put("zhqd", zhqd);
// map.put("dates", dates);
// map.put("result", errInfo);
// return map;
// }
//
// /**根据分类统计清单
// * @param page
// * @throws Exception
// */
// @RequestMapping(value="/checkPlan")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "排查计划",instructionsType = "根据分类统计清单")
// public Object checkPlan() 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());
// List<PageData> planList = listmanagerService.listAllPlan(null);
// Map<String,PageData> planMap = new HashMap<String,PageData>();
// for (PageData pageData : planList) {
// pageData.put("dept_str", "");
// planMap.put(pageData.getString("type_bianma") + "," + pageData.getString("level_bianma") + "," + pageData.getString("period_bianma"),pageData);
// }
// //企业所有应查数
// List<PageData> staList = listStatisticsService.listAllForPlan(pd);
// for (PageData pageData : staList) {
// String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD");
// PageData row = planMap.get(rowName);
// if(row!=null){
// row.put("check_count",Integer.parseInt(row.get("check_count").toString()) + Integer.parseInt(pageData.get("NOTEXAMINEDNUM").toString()));
// }
// }
// //企业所有清单数
// List<PageData> liList = listmanagerService.listAllForPlan(pd);
// for (PageData pageData : liList) {
// String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD");
// PageData row = planMap.get(rowName);
// if(row!=null){
// row.put("list_count",Integer.parseInt(row.get("list_count").toString()) + 1 );
// row.put("dept_str",row.get("dept_str").toString() + pageData.getString("DEPARTMENT_ID") + ",");
// }
// }
//
// for (PageData pageData : planList) {
// if(pageData.get("dept_str")!=null && pageData.get("dept_str").toString()!="")
// pageData.put("dept_count", new HashSet(Arrays.asList(pageData.get("dept_str").toString().substring(0,pageData.get("dept_str").toString().length()-1).split(","))).size());
// }
//
// map.put("planList",planList);
// map.put("result", errInfo);
// return map;
// }
//
//
//// /**根据分类统计清单
//// * @param page
//// * @throws Exception
//// */
//// @RequestMapping(value="/checkPlan")
//// @ResponseBody
//// public Object checkPlan() throws Exception{
//// Map<String,Object> map = new HashMap<String,Object>();
//// String errInfo = "success";
//// PageData pd = new PageData();
//// pd = this.getPageData();
//// if(pd.get("USER_ID") == null || "".equals(pd.get("USER_ID").toString())) {
//// pd.put("USER_ID", Jurisdiction.getUSER_ID());
//// }
//// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
//// List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
//// Map<String,Object> typeMap = new HashMap<String,Object>();
////
//// for(PageData list: varList) {
//// if(list.get("TYPE").equals("listType0001")) {
//// if(!typeMap.containsKey("日常清单")){
//// typeMap.put("日常清单",new HashMap<String,Object>());
//// }
////
//// Map<String,Object> levelMap = (Map<String,Object>)typeMap.get("日常清单");
//// if(list.get("DEPARTMENT_LEVEL").equals("departmentLevel0001")) {
//// if (!levelMap.containsKey("厂级")) {
//// levelMap.put("厂级", new HashMap<String, Object>());
//// }
////
//// Map<String,Object> periodMap = (Map<String,Object>)levelMap.get("厂级");
//// if(list.get("PERIOD").equals("checkPeriod0001")) {
//// if (!periodMap.containsKey("每日")) {
//// periodMap.put("每日", new HashMap<String, Object>());
//// }
//// }
//// } else if(list.get("DEPARTMENT_LEVEL").equals("departmentLevel0002")) {
//// if (!levelMap.containsKey("车间级")) {
//// levelMap.put("车间级", new HashMap<String, Object>());
//// }
////
//// Map<String,Object> periodMap = (Map<String,Object>)levelMap.get("车间级");
//// if(list.get("PERIOD").equals("checkPeriod0001")) {
//// if (!periodMap.containsKey("每日")) {
//// periodMap.put("每日", new HashMap<String, Object>());
//// }
//// }
//// } else if(list.get("DEPARTMENT_LEVEL").equals("departmentLevel0003")) {
//// if (!levelMap.containsKey("班组级")) {
//// levelMap.put("班组级", new HashMap<String, Object>());
//// }
////
//// Map<String,Object> periodMap = (Map<String,Object>)levelMap.get("班组级");
//// if(list.get("PERIOD").equals("checkPeriod0001")) {
//// if (!periodMap.containsKey("每日")) {
//// periodMap.put("每日", new HashMap<String, Object>());
//// }
//// }
//// }
//// }
//// }
//// map.put("result", errInfo);
//// return map;
//// }
//
// /**获取巡检路线
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/getRoute")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "获取巡检路线")
// public Object getRisk() throws Exception {
// Map<String, Object> map = new HashMap<String, Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// List<PageData> varList = listmanagerService.listAllRisk(pd);
// map.put("varList", varList);
// map.put("result", errInfo);
// return map;
// }
//
// /**设置巡检路线
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/setRout")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "设置巡检路线")
// public Object setRout() throws Exception {
// Map<String, Object> map = new HashMap<String, Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// //巡检路线
// checkRouteService.delete(pd);
// List<JSONObject> routes = (List<JSONObject>) JSON.parse(pd.get("ROUTE").toString());
// for (int j = 0; j < routes.size() ; j++) {
// JSONObject json = routes.get(j);
// if(json.get("IDENTIFICATIONPARTS_ID")!=null && json.get("IDENTIFICATIONPARTS_ID")!="") {
// PageData route = new PageData();
// route.put("CHECKROUTE_ID", this.get32UUID()); //主键
// route.put("LISTMANAGER_ID",pd.get("LISTMANAGER_ID"));
// route.put("IDENTIFICATIONPARTS_ID", json.get("IDENTIFICATIONPARTS_ID"));
// route.put("ORDERBY",j);
// checkRouteService.save(route);
// }
// }
// map.put("result", errInfo);
// return map;
// }
//
// /**
// * BI页清单排查类型统计
// *
// * @param
// * @throws Exception
// */
// @RequestMapping(value = "/countNumBi")
// @ResponseBody
// public Object countNumBi() 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("YEAR",new Date().getYear()+1900);
// List<PageData> typeList = listmanagerService.getCountNumBi(pd);
// map.put("typeList", typeList);
// map.put("result", errInfo);
// return map;
// }
//
// @RequestMapping(value = "/saveBaoBaoType")
// @ResponseBody
// public Object saveBaoBaoType() throws Exception {
// Map<String, Object> map = new HashMap<String, Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// listmanagerService.saveBaoBaoType(pd);
// map.put("result", errInfo);
// return map;
// }
//
// /**清单检查记录(日检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckDay")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(日检)统计")
// public Object statisticsListCheckDay() 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());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.listAllYearForDay(data);//获取查询月在检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
//
// /**清单检查记录(周检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckWeek")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(周检)统计")
// public Object statisticsListCheckWeek() 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());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.listAllYearForWeek(data);//获取检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
//
// /**清单检查记录(旬检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckTenday")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(旬检)统计")
// public Object statisticsListCheckTenday() 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());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.statisticsListCheckTenday(data);//获取检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
}

View File

@ -0,0 +1,50 @@
package com.zcloud.controller.hiddenDangerCheckStandardCustom;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardDictionaryService;
import com.zcloud.util.Jurisdiction;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* luoxiaobao
* www.qdkjchina.com
*/
@Controller
@RequestMapping("/hiddenstandardDictionary")
public class hiddenDangerCheckStandardDictionaryController extends BaseController {
@Autowired
private HiddenDangerCheckStandardDictionaryService hiddenstandardDictionaryService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/list")
@RequiresPermissions("hiddendictionary:list")
@ResponseBody
public Object list() 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());
List<PageData> varList = hiddenstandardDictionaryService.list(pd);
map.put("varList", varList);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,22 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCommonMapper {
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
}

View File

@ -0,0 +1,19 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCustomItemMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
}

View File

@ -0,0 +1,230 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCustomMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void remove(PageData pd);
/**
* @param pd
* @throws Exception
*/
void deleted(PageData pd);
/**
* @param pd
* @throws Exception
*/
void enable(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> stopdatalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**()
* @param pd
* @throws Exception
*/
List<PageData> appListAll(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listListByDep(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listListByUser(PageData pd);
List<PageData> getListByCorplistPage(Page page);
/**()
* @throws Exception
*/
List<PageData> listRecordAll(Page page);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listAllRisk(PageData pd);
List<PageData> recordlistPage(Page page);
/**
* @param pd
* @throws Exception
*/
List<PageData> listExaminedNum(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listExaminedNumJjr(PageData pd);
List<PageData> listTempNum(PageData pd);
/**
* @param pd
* @throws Exception
*/
void startup(PageData pd);
/**
* @param pd
* @throws Exception
*/
void deleteTemplist(PageData pd);
List<PageData> selectTemp(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> countListByUser(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listAllByCorpMsm(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> getAllList(PageData pd);
/**线
* @param pd
* @throws Exception
*/
List<PageData> goIndexCount(PageData pd);
/**
*
* @param pd
* @return
*/
public int getListCount(PageData pd);
/**
*
* @param pd
* @return
*/
public int getWorkedListCount(PageData pd);
/**
*
* @param pd
* @return
*/
public List<PageData> countListByType(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> checklistPage(Page page);
/**
* @param pd
* @throws Exception
*/
List<PageData> overTimeRecord(PageData pd);
/**使
* @param pd
* @throws Exception
*/
List<PageData> overTimeRecordDay(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> overTimeRecordJjr(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> getListToday(PageData pd);
List<PageData> listAllForDiagnosis(PageData pd);
List<PageData> listAllPlan(PageData pd);
List<PageData> listAllForPlan(PageData pd);
List<PageData> getCountNumBi(PageData pd);
List<PageData> listForDocking(PageData pd);
void updateDocking(PageData pageData);
List<PageData> thisMonthListmanager(PageData pd);
List<PageData> findByCondition(PageData util);
List<PageData> analysis(PageData util);
}

View File

@ -0,0 +1,21 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardDictionaryMapper {
/**()
* @param pd
* @throws Exception
*/
List<PageData> list(PageData pd);
}

View File

@ -0,0 +1,85 @@
package com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* -
* luoxiaobao
* 2020-12-31
* www.zcloudchina.com
*/
public interface ListCheckStandardItemMapper {
/**
* @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);
//
// List<PageData> listByriskpointid(PageData pd);
//
//
// /**通过id获取数据
// * @param pd
// * @throws Exception
// */
// PageData findById(PageData pd);
//
// /**获取隐患数据
// * @param pd
// * @throws Exception
// */
// PageData findHidden(PageData pd);
//
// /**批量删除
// * @param ArrayDATA_IDS
// * @throws Exception
// */
// void deleteAll(String[] ArrayDATA_IDS);
//
// /**批量删除
// * @param ArrayDATA_IDS
// * @throws Exception
// */
// void deleteList(PageData pd);
//
// /**全部风险点
// * @param pd
// * @throws Exception
// */
// List<PageData> listAllRisk(PageData pd);
//
// List<PageData> listForDocking(PageData pd);
// void updateDocking(PageData pageData);
//
// List<PageData> findByRiskPointIds(String[] ids);
//
// List<PageData> findByRiskPointId(PageData riskPoint);
}

View File

@ -0,0 +1,23 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCommonService {
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
}

View File

@ -0,0 +1,21 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCustomItemService {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd)throws Exception;
}

View File

@ -0,0 +1,28 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardCustomService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
}

View File

@ -0,0 +1,21 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
public interface HiddenDangerCheckStandardDictionaryService {
/**()
* @param pd
* @throws Exception
*/
List<PageData> list(PageData pd)throws Exception;
}

View File

@ -0,0 +1,25 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom;
import com.zcloud.entity.PageData;
import java.util.List;
public interface ListcheckstandarditemService {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd)throws Exception;
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCommonMapper;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HiddenDangerCheckStandardCommonServiceImpl implements HiddenDangerCheckStandardCommonService {
@Autowired
private HiddenDangerCheckStandardCommonMapper hiddenstandardCommonMapper;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hiddenstandardCommonMapper.datalistPage(page);
}
}

View File

@ -0,0 +1,34 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomItemMapper;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* -
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HiddenDangerCheckStandardCustomItemServiceImpl implements HiddenDangerCheckStandardCustomItemService {
@Autowired
private HiddenDangerCheckStandardCustomItemMapper hiddenstandardCustomItemMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hiddenstandardCustomItemMapper.save(pd);
}
}

View File

@ -0,0 +1,43 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomMapper;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HiddenDangerCheckStandardCustomServiceImpl implements HiddenDangerCheckStandardCustomService {
@Autowired
private HiddenDangerCheckStandardCustomMapper hiddencheckstandardCustomMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hiddencheckstandardCustomMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hiddencheckstandardCustomMapper.listAll(pd);
}
}

View File

@ -0,0 +1,34 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardDictionaryMapper;
import com.zcloud.service.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HiddenDangerCheckStandardDictionaryServiceImpl implements HiddenDangerCheckStandardDictionaryService {
@Autowired
private HiddenDangerCheckStandardDictionaryMapper hiddenstandardDictionaryMapper;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> list(PageData pd)throws Exception{
return hiddenstandardDictionaryMapper.list(pd);
}
}

View File

@ -0,0 +1,43 @@
package com.zcloud.service.hiddenDangerCheckStandardCustom.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandardCustom.ListCheckStandardItemMapper;
import com.zcloud.service.hiddenDangerCheckStandardCustom.ListcheckstandarditemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-30
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class ListcheckstandarditemServiceImpl implements ListcheckstandarditemService {
@Autowired
private ListCheckStandardItemMapper listCheckStandardItemMapper;
@Override
public void save(PageData pd)throws Exception {
listCheckStandardItemMapper.save(pd);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return listCheckStandardItemMapper.listAll(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
listCheckStandardItemMapper.delete(pd);
}
}

View File

@ -0,0 +1,114 @@
<?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.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCommonMapper">
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_common
</sql>
<!-- 字段 -->
<sql id="Field">
f.COMMON_ID,
f.INDUSTRY_TYPE,
f.INDUSTRY_TYPE_TREE,
f.INDUSTRY_TYPE_NAMES,
f.CHECK_STANDARD_NAME,
f.COMMON_STATUS,
f.ISDELETE,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATE_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.DELETEOR_ID,
f.DELETEOR_NAME,
f.DELETE_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
COMMON_ID,
INDUSTRY_TYPE,
INDUSTRY_TYPE_TREE,
INDUSTRY_TYPE_NAMES,
CHECK_STANDARD_NAME,
COMMON_STATUS,
ISDELETE,
CREATOR_ID,
CREATOR_NAME,
CREATE_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
DELETEOR_ID,
DELETEOR_NAME,
DELETE_TIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{COMMON_ID},
#{INDUSTRY_TYPE},
#{INDUSTRY_TYPE_TREE},
#{INDUSTRY_TYPE_NAMES},
#{CHECK_STANDARD_NAME},
#{COMMON_STATUS},
#{ISDELETE},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATE_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{DELETEOR_ID},
#{DELETEOR_NAME},
#{DELETE_TIME}
</sql>
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.COMMON_ID,
f.INDUSTRY_TYPE,
f.INDUSTRY_TYPE_TREE,
f.INDUSTRY_TYPE_NAMES,
f.CHECK_STANDARD_NAME,
bhci.COMMON_ITEM_ID,
bhci.CHECK_CATEGORY,
bhci.CHECK_ITEM,
bhci.CHECK_CONTENT,
bhci.CHECK_STANDARD,
bhci.REFERENCE_BASIS,
bhci.CHECK_QUALIFIED,
bhci.CHECK_UNQUALIFIED,
bhci.OPERATION_TYPE,
bhci.COMMON_ITEM_SORT,
bhd1.DICTIONARY_NAME as CHECK_CATEGORY_NAME,
bhd2.DICTIONARY_NAME as CHECK_ITEM_NAME
from
<include refid="tableName"></include> f
left join bus_hiddendangercheckstandard_common_item bhci on bhci.COMMON_ID = f.COMMON_ID
left join bus_hiddendangercheckstandard_dictionary bhd1 on bhd1.DICTIONARY_ID = bhci.CHECK_CATEGORY and bhd1.ISDELETE = 0
left join bus_hiddendangercheckstandard_dictionary bhd2 on bhd2.DICTIONARY_ID = bhci.CHECK_ITEM and bhd2.ISDELETE = 0
where
f.ISDELETE = 0
and bhci.ISDELETE = 0
and f.COMMON_STATUS = 1
and f.INDUSTRY_TYPE_NAMES = #{pd.CORP_TYPE_NAME}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.CHECK_CATEGORY != null and pd.CHECK_CATEGORY != ''"><!-- 检查类别 -->
and bhci.CHECK_CATEGORY = #{pd.CHECK_CATEGORY}
</if>
<if test="pd.CHECK_ITEM != null and pd.CHECK_ITEM != ''"><!-- 检查项目 -->
and bhci.CHECK_ITEM = #{pd.CHECK_ITEM}
</if>
order by bhci.CHECK_CATEGORY,bhci.CHECK_ITEM,bhci.COMMON_ITEM_SORT
</select>
</mapper>

View File

@ -0,0 +1,110 @@
<?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.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomItemMapper">
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_custom_item
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.CUSTOM_ITEM_ID,
f.CUSTOM_ID,
f.CHECK_CATEGORY,
f.CHECK_ITEM,
f.CHECK_CONTENT,
f.CHECK_STANDARD,
f.REFERENCE_BASIS,
f.CHECK_QUALIFIED,
f.CHECK_UNQUALIFIED,
f.OPERATION_TYPE,
f.COMMON_ITEM_SORT,
f.COMMON_ID,
f.COMMON_ITEM_ID,
f.ISDELETE,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATE_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.DELETEOR_ID,
f.DELETEOR_NAME,
f.DELETE_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
CUSTOM_ITEM_ID,
CUSTOM_ID,
CHECK_CATEGORY,
CHECK_ITEM,
CHECK_CONTENT,
CHECK_STANDARD,
REFERENCE_BASIS,
CHECK_QUALIFIED,
CHECK_UNQUALIFIED,
OPERATION_TYPE,
COMMON_ITEM_SORT,
COMMON_ID,
COMMON_ITEM_ID,
ISDELETE,
CREATOR_ID,
CREATOR_NAME,
CREATE_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
DELETEOR_ID,
DELETEOR_NAME,
DELETE_TIME,
COMMON_ITEM_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{CUSTOM_ITEM_ID},
#{CUSTOM_ID},
#{CHECK_CATEGORY},
#{CHECK_ITEM},
#{CHECK_CONTENT},
#{CHECK_STANDARD},
#{REFERENCE_BASIS},
#{CHECK_QUALIFIED},
#{CHECK_UNQUALIFIED},
#{OPERATION_TYPE},
#{COMMON_ITEM_SORT},
#{COMMON_ID},
#{COMMON_ITEM_ID},
#{ISDELETE},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATE_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{DELETEOR_ID},
#{DELETEOR_NAME},
#{DELETE_TIME},
#{COMMON_ITEM_ID}
</sql>
<!-- 新增 -->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
</mapper>

View File

@ -0,0 +1,132 @@
<?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.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardCustomMapper">
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_custom
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.CUSTOM_ID,
f.CORPINFO_ID,
f.INDUSTRY_TYPE,
f.INDUSTRY_TYPE_TREE,
f.INDUSTRY_TYPE_NAMES,
f.CHECK_STANDARD_NAME,
f.COMMON_STATUS,
f.ISDELETE,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATE_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.DELETEOR_ID,
f.DELETEOR_NAME,
f.DELETE_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
CUSTOM_ID,
CORPINFO_ID,
INDUSTRY_TYPE,
INDUSTRY_TYPE_TREE,
INDUSTRY_TYPE_NAMES,
CHECK_STANDARD_NAME,
COMMON_STATUS,
ISDELETE,
CREATOR_ID,
CREATOR_NAME,
CREATE_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
DELETEOR_ID,
DELETEOR_NAME,
DELETE_TIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{CUSTOM_ID},
#{CORPINFO_ID},
#{INDUSTRY_TYPE},
#{INDUSTRY_TYPE_TREE},
#{INDUSTRY_TYPE_NAMES},
#{CHECK_STANDARD_NAME},
#{COMMON_STATUS},
#{ISDELETE},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATE_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{DELETEOR_ID},
#{DELETEOR_NAME},
#{DELETE_TIME}
</sql>
<!-- 新增 -->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
f.CUSTOM_ID,
f.CORPINFO_ID,
f.INDUSTRY_TYPE,
f.INDUSTRY_TYPE_TREE,
f.INDUSTRY_TYPE_NAMES,
f.CHECK_STANDARD_NAME,
bhci.CUSTOM_ITEM_ID,
bhci.CUSTOM_ID,
bhci.CHECK_CATEGORY,
bhci.CHECK_ITEM,
bhci.CHECK_CONTENT,
bhci.CHECK_STANDARD,
bhci.REFERENCE_BASIS,
bhci.CHECK_QUALIFIED,
bhci.CHECK_UNQUALIFIED,
bhci.OPERATION_TYPE,
bhci.COMMON_ITEM_SORT,
bhci.COMMON_ID,
bhci.COMMON_ITEM_ID,
bhd1.DICTIONARY_NAME as CHECK_CATEGORY_NAME,
bhd2.DICTIONARY_NAME as CHECK_ITEM_NAME
from
<include refid="tableName"></include> f
left join bus_hiddendangercheckstandard_custom_item bhci on bhci.CUSTOM_ID = f.CUSTOM_ID
left join bus_hiddendangercheckstandard_dictionary bhd1 on bhd1.DICTIONARY_ID = bhci.CHECK_CATEGORY and bhd1.ISDELETE = 0
left join bus_hiddendangercheckstandard_dictionary bhd2 on bhd2.DICTIONARY_ID = bhci.CHECK_ITEM and bhd2.ISDELETE = 0
where
f.ISDELETE = 0
and bhci.ISDELETE = 0
and f.COMMON_STATUS = 1
and f.CORPINFO_ID = #{CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
)
</if>
order by bhci.CHECK_CATEGORY,bhci.CHECK_ITEM,bhci.COMMON_ITEM_SORT
</select>
</mapper>

View File

@ -0,0 +1,93 @@
<?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.hiddenDangerCheckStandardCustom.HiddenDangerCheckStandardDictionaryMapper">
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_dictionary
</sql>
<!-- 字段 -->
<sql id="Field">
f.DICTIONARY_ID,
f.DICTIONARY_NAME,
f.PARENT_ID,
f.PARENT_IDS,
f.DICTIONARY_NAMES,
f.DICTIONARY_LEVEL,
f.DICTIONARY_SORT,
f.DICTIONARY_SOURCE,
f.CORPINFO_ID,
f.ISDELETE,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATE_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.DELETEOR_ID,
f.DELETEOR_NAME,
f.DELETE_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
DICTIONARY_ID,
DICTIONARY_NAME,
PARENT_ID,
PARENT_IDS,
DICTIONARY_NAMES,
DICTIONARY_LEVEL,
DICTIONARY_SORT,
DICTIONARY_SOURCE,
CORPINFO_ID,
ISDELETE,
CREATOR_ID,
CREATOR_NAME,
CREATE_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
DELETEOR_ID,
DELETEOR_NAME,
DELETE_TIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{DICTIONARY_ID},
#{DICTIONARY_NAME},
#{PARENT_ID},
#{PARENT_IDS},
#{DICTIONARY_NAMES},
#{DICTIONARY_LEVEL},
#{DICTIONARY_SORT},
#{DICTIONARY_SOURCE},
#{CORPINFO_ID},
#{ISDELETE},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATE_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{DELETEOR_ID},
#{DELETEOR_NAME},
#{DELETE_TIME}
</sql>
<!-- 列表(全部) -->
<select id="list" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ISDELETE = 0
and f.DICTIONARY_SOURCE = 1
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
or ( f.DICTIONARY_SOURCE = 2
and f.CORPINFO_ID = #{CORPINFO_ID} )
</if>
</select>
</mapper>

View File

@ -0,0 +1,261 @@
<?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.hiddenstandardCustom.ListCheckStandardItemMapper">
<!--表名 -->
<sql id="tableName">
LISTCHECKSTANDARDITEM_ID
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.LISTCHECKSTANDARDITEM_ID,
f.LISTMANAGER_ID,
f.CUSTOM_ID,
f.CUSTOM_ITEM_ID,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.BAO_BAO_NUM
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
LISTCHECKSTANDARDITEM_ID,
LISTMANAGER_ID,
CUSTOM_ID,
CUSTOM_ITEM_ID,
CORPINFO_ID,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ISDELETE,
BAO_BAO_NUM
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{LISTCHECKSTANDARDITEM_ID},
#{LISTMANAGER_ID},
#{RISKPOINT_ID},
#{RISKCHECKITEM_ID},
#{CORPINFO_ID},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ISDELETE},
#{BAO_BAO_NUM}
</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">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
LISTCHECKSTANDARDITEM_ID = #{LISTCHECKSTANDARDITEM_ID}
</delete>
<!-- &lt;!&ndash; 修改 &ndash;&gt;-->
<!-- <update id="edit" parameterType="pd">-->
<!-- update-->
<!-- <include refid="tableName"></include>-->
<!-- set-->
<!-- LISTMANAGER_ID = #{LISTMANAGER_ID},-->
<!-- RISKPOINT_ID = #{RISKPOINT_ID},-->
<!-- RISKCHECKITEM_ID = #{RISKCHECKITEM_ID},-->
<!-- CORPINFO_ID = #{CORPINFO_ID},-->
<!-- BAO_BAO_NUM = #{BAO_BAO_NUM},-->
<!-- LISTCHECKITEM_ID = LISTCHECKITEM_ID-->
<!-- where-->
<!-- LISTCHECKITEM_ID = #{LISTCHECKITEM_ID}-->
<!-- </update>-->
<!-- &lt;!&ndash; 通过ID获取数据 &ndash;&gt;-->
<!-- <select id="findById" parameterType="pd" resultType="pd">-->
<!-- select-->
<!-- <include refid="Field"></include>,-->
<!-- un.RISKUNITNAME,-->
<!-- po.POSITIONNAME,-->
<!-- id.PARTSNAME,-->
<!-- d5.BIANMA BIANMA5,-->
<!-- d5.NAME DNAME5,-->
<!-- r.RISK_DESCR,-->
<!-- chi.CHECK_CONTENT-->
<!-- from-->
<!-- <include refid="tableName"></include> f-->
<!-- left join BUS_RISK_CHECK_ITEM chi on chi.RISKCHECKITEM_ID=f.RISKCHECKITEM_ID-->
<!-- left join bus_riskpoint r on r.RISKPOINT_ID = f.RISKPOINT_ID-->
<!-- left join bus_riskunit un on un.RISKUNIT_ID = r.RISK_UNIT_ID-->
<!-- left join bus_riskpointposition po on po.RISKPOINTPOSITION_ID = r.RISK_POSITION_ID-->
<!-- left join bus_identificationparts id on id.IDENTIFICATIONPARTS_ID = r.IDENTIFICATION_ID-->
<!-- left join SYS_DICTIONARIES d5 on r.LEVELID = d5.BIANMA-->
<!-- where-->
<!-- f.LISTCHECKITEM_ID = #{LISTCHECKITEM_ID}-->
<!-- </select>-->
<!-- &lt;!&ndash; 列表 &ndash;&gt;-->
<!-- <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 != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;-->
<!-- and-->
<!-- (-->
<!-- &lt;!&ndash; 根据需求自己加检索条件-->
<!-- 字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- or-->
<!-- 字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- &ndash;&gt;-->
<!-- )-->
<!-- </if>-->
<!-- </select>-->
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,
bl.TASK_TYPE,
blsd.NAME as TASK_TYPE_NAME,
blsd.BZ as TASK_TYPE_NUM,
btl.DESCRIBE as BAO_BAO_NUM_NAME
from
<include refid="tableName"></include> f
left join bus_listmanager bl on bl.LISTMANAGER_ID = f.LISTMANAGER_ID
left join sys_dictionaries blsd on blsd.DICTIONARIES_ID = bl.TASK_TYPE
left join bus_term_library btl on btl.TASK_NUM = f.BAO_BAO_NUM and btl.WORK_TYPE = blsd.BZ
where f.ISDELETE = '0'
<if test="LISTMANAGER_ID != null and LISTMANAGER_ID != ''"><!-- 关键词检索 -->
and f.LISTMANAGER_ID = #{LISTMANAGER_ID}
</if>
</select>
<!-- &lt;!&ndash; 查询未对接数据 &ndash;&gt;-->
<!-- <select id="findHidden" parameterType="pd" resultType="pd" >-->
<!-- SELECT-->
<!-- h.HIDDEN_ID-->
<!-- FROM BUS_HIDDEN h-->
<!-- WHERE-->
<!-- h.RISKITEM_ID = #{LISTCHECKITEM_ID}-->
<!-- AND h.LISTMANAGER_ID = #{LISTMANAGER_ID}-->
<!-- AND h.ISDELETE = '0' and h.SOURCE = '2'-->
<!-- AND h.STATE NOT IN ('4','0') limit 1-->
<!-- </select>-->
<!-- <select id="listByriskpointid" parameterType="pd" resultType="pd">-->
<!-- select-->
<!-- <include refid="Field"></include>-->
<!-- from-->
<!-- <include refid="tableName"></include> f-->
<!-- left join bus_listmanager bl on bl.LISTMANAGER_ID = f.LISTMANAGER_ID-->
<!-- where f.ISDELETE = '0' and bl.ISDELETE != '-1'-->
<!-- <if test="RISKPOINT_ID != null and RISKPOINT_ID != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;-->
<!-- and f.RISKPOINT_ID = #{RISKPOINT_ID}-->
<!-- </if>-->
<!-- <if test="RISKPOINT_IDS != null">&lt;!&ndash; 关键词检索 &ndash;&gt;-->
<!-- and f.RISKPOINT_ID in-->
<!-- <foreach item="item" index="index"-->
<!-- collection="RISKPOINT_IDS" open="(" separator="," close=")">-->
<!-- '${item}'-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </select>-->
<!-- &lt;!&ndash; 批量删除 &ndash;&gt;-->
<!-- <delete id="deleteList" parameterType="pd">-->
<!-- update-->
<!-- <include refid="tableName"></include>-->
<!-- set-->
<!-- ISDELETE = '1',-->
<!-- OPERATOR = #{OPERATOR},-->
<!-- OPERATTIME = #{OPERATTIME}-->
<!-- where-->
<!-- LISTMANAGER_ID = #{LISTMANAGER_ID}-->
<!-- </delete>-->
<!-- &lt;!&ndash; 批量删除 &ndash;&gt;-->
<!-- <delete id="deleteAll" parameterType="String">-->
<!-- update-->
<!-- <include refid="tableName"></include>-->
<!-- set-->
<!-- ISDELETE = '1'-->
<!-- where-->
<!-- LISTCHECKITEM_ID in-->
<!-- <foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </delete>-->
<!-- &lt;!&ndash; 查询未对接数据 &ndash;&gt;-->
<!-- <select id="listForDocking" parameterType="pd" resultType="pd" >-->
<!-- SELECT-->
<!-- lc.*,-->
<!-- ci.CHECK_CONTENT-->
<!-- FROM-->
<!-- BUS_LIST_CHECKITEM lc-->
<!-- left join BUS_LISTMANAGER l on l.LISTMANAGER_ID = lc.LISTMANAGER_ID-->
<!-- left join BUS_RISK_CHECK_ITEM ci on l.RISKCHECKITEM_ID = ci.RISKCHECKITEM_ID-->
<!-- WHERE-->
<!-- lc.CORPINFO_ID = #{CORPINFO_ID}-->
<!-- and lc.IS_DOCKING is null-->
<!-- and lc.ISDELETE = 0-->
<!-- and l.ISDELETE = 0-->
<!-- </select>-->
<!-- <select id="findByRiskPointIds" resultType="com.zcloud.entity.PageData">-->
<!-- select distinct a.LISTMANAGER_ID-->
<!-- from bus_list_checkitem a-->
<!-- where a.RISKPOINT_ID in-->
<!-- <foreach item="item" index="index" collection="ids" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </select>-->
<!-- <select id="findByRiskPointId" resultType="com.zcloud.entity.PageData">-->
<!-- select distinct a.LISTMANAGER_ID-->
<!-- from bus_list_checkitem a-->
<!-- where a.ISDELETE = '0'-->
<!-- <if test="RISKPOINT_ID != null and RISKPOINT_ID != ''">-->
<!-- and a.RISKPOINT_ID = #{RISKPOINT_ID}-->
<!-- </if>-->
<!-- <if test="riskPoints != null and riskPoints.size > 0">-->
<!-- and a.RISKPOINT_ID in-->
<!-- <foreach item="item" index="index" collection="riskPoints" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </select>-->
<!-- <update id="updateDocking" parameterType="pd" >-->
<!-- update-->
<!-- BUS_LIST_CHECKITEM-->
<!-- set-->
<!-- IS_DOCKING = 1-->
<!-- where-->
<!-- LISTCHECKITEM_ID = #{LISTCHECKITEM_ID}-->
<!-- </update>-->
</mapper>