排查统计和隐患治理菜单bug修复

pull/4/head
zhangyanli 2024-02-21 16:13:31 +08:00
parent eb44fe6dfe
commit 5514125492
15 changed files with 1017 additions and 41 deletions

View File

@ -1967,4 +1967,79 @@ public class ListManagerController extends BaseController {
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/recordListAll")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "列表")
public Object recordListAll(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("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"));
npd.put("LIST_TYPE",pd.getString("LIST_TYPE"));
page.setPd(npd);
List<PageData> varList = listmanagerService.recordListAll(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;
}
} }

View File

@ -1941,4 +1941,139 @@ public class HiddenController extends BaseController {
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/hiddenListAll")
// @RequiresPermissions("hidden:list")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患整改",instructionsType = "列表")
public Object hiddenListAll(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()); // 企业id
String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
if (Tools.notEmpty(KEYWORDS))
pd.put("KEYWORDS", KEYWORDS.trim());
String CREATORNAME = pd.getString("CREATORNAME"); // 关键词检索条件
if (Tools.notEmpty(CREATORNAME))
pd.put("CREATORNAME", CREATORNAME.trim());
String ISQUALIFIED = pd.getString("ISQUALIFIED"); // 关键词检索条件
if (Tools.notEmpty(ISQUALIFIED))
pd.put("ISQUALIFIED", ISQUALIFIED.trim());
String HIDDENLEVELE = pd.getString("HIDDENLEVELE"); // 关键词检索条件
if (Tools.notEmpty(HIDDENLEVELE))
pd.put("HIDDENLEVELE", HIDDENLEVELE.trim());
String STARTTIME = pd.getString("STARTTIME"); // 关键词检索条件
if (Tools.notEmpty(STARTTIME))
pd.put("STARTTIME", STARTTIME.trim());
String STATE = pd.getString("STATE"); // 关键词检索条件
if (Tools.notEmpty(STATE))
pd.put("STATE", STATE.trim());
String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件
if (Tools.notEmpty(ENDTIME))
pd.put("ENDTIME", ENDTIME + " 23:59:59");
String DISPOSESTATE = pd.getString("DISPOSESTATE"); // 关键词检索条件
String BISTATE = pd.getString("BISTATE"); // BI页跳转条件
if (Tools.notEmpty(BISTATE))
pd.put("BISTATE", BISTATE.trim());
String IS_DAY = pd.getString("IS_DAY"); // BI页跳转条件
if (Tools.notEmpty(IS_DAY))
pd.put("IS_DAY", IS_DAY.trim());
String IS_WEEK = pd.getString("IS_WEEK"); // BI页跳转条件
if (Tools.notEmpty(IS_WEEK))
pd.put("IS_WEEK", IS_WEEK.trim());
String IS_XUN = pd.getString("IS_XUN"); // BI页跳转条件
if (Tools.notEmpty(IS_XUN))
pd.put("IS_XUN", IS_XUN.trim());
String IS_MONTH = pd.getString("IS_MONTH"); // BI页跳转条件
if (Tools.notEmpty(IS_MONTH))
pd.put("IS_MONTH", IS_MONTH.trim());
String IS_QUARTER = pd.getString("IS_QUARTER"); // BI页跳转条件
if (Tools.notEmpty(IS_QUARTER))
pd.put("IS_QUARTER", IS_QUARTER.trim());
String IS_YEAR = pd.getString("IS_YEAR"); // BI页跳转条件
if (Tools.notEmpty(IS_YEAR))
pd.put("IS_YEAR", IS_YEAR.trim());
if (Tools.notEmpty(DISPOSESTATE)) {
pd.put("DISPOSESTATE", DISPOSESTATE.trim());
if("-1".equals(DISPOSESTATE.trim())) {
pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
pd.put("USER_ID",Jurisdiction.getUSER_ID());
PageData cpd = new PageData();
cpd = usersService.findById(pd);
pd.put("ISLEADER", cpd.getString("ISLEADER"));
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);
}
}
}
pd.put("SELFUSERID", Jurisdiction.getUSER_ID());
pd.put("USERDEPT", Jurisdiction.getDEPARTMENT_ID());
}
pd.put("ISMAIN", Jurisdiction.getIS_MAIN());
if (Jurisdiction.getIS_MAIN().equals("0")) {
String IS_SELF = pd.getString("IS_SELF"); // 关键词检索条件
if (IS_SELF != null && IS_SELF.equals("1"))
pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID());
}
;
// 旬
if (pd.get("IS_XUN") != null && Tools.notEmpty(pd.get("IS_XUN").toString())) {
// 1-10
if (DateUtil.timeCalendar(new Date(),
DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"),
DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) {
pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00");
pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59");
}
// 10-20
if (DateUtil.timeCalendar(new Date(),
DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"),
DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) {
pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00");
pd.put("ENDTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59");
}
// 20-月底
if (DateUtil.timeCalendar(new Date(),
DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"),
DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) {
pd.put("STARTTIME", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00");
pd.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
}
}
// 季度
if (pd.get("IS_QUARTER") != null && Tools.notEmpty(pd.get("IS_QUARTER").toString())) {
pd.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
pd.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
}
page.setPd(pd);
List<PageData> varList = hiddenService.hiddenlist(page); // 列出Hidden列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
} }

View File

@ -1882,4 +1882,89 @@ public class CustomController extends BaseController {
return map; 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());
List<PageData> varList = customItemService.listAll(pd);
PageData data = customService.findById(pd); //根据ID读取
data.put("YEAR", pd.getString("YEAR"));
List<PageData> recordList = customCheckRecordService.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 = customItemService.listAll(pd);
PageData data = customService.findById(pd); //根据ID读取
data.put("YEAR", pd.getString("YEAR"));
List<PageData> recordList = customCheckRecordService.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 = customItemService.listAll(pd);
PageData data = customService.findById(pd); //根据ID读取
data.put("YEAR", pd.getString("YEAR"));
List<PageData> recordList = customCheckRecordService.statisticsListCheckTenday(data);//获取检查周期内的检查记录
map.put("pd", data);
map.put("varList", varList);
map.put("recordList", recordList);
map.put("result", errInfo);
return map;
}
} }

View File

@ -14,8 +14,7 @@ import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.hidden.HiddenCheckService; import com.zcloud.service.hidden.HiddenCheckService;
import com.zcloud.service.hidden.HiddenSchemeService; import com.zcloud.service.hidden.HiddenSchemeService;
import com.zcloud.service.hidden.HiddenService; import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService; import com.zcloud.service.hiddenDangerCheckStandard.*;
import com.zcloud.service.hiddenDangerCheckStandard.CustomService;
import com.zcloud.service.inspection.SafetyEnvironmentalService; import com.zcloud.service.inspection.SafetyEnvironmentalService;
import com.zcloud.service.sms.SMSLogService; import com.zcloud.service.sms.SMSLogService;
import com.zcloud.service.sms.SMSManagementService; import com.zcloud.service.sms.SMSManagementService;
@ -49,7 +48,7 @@ public class CustomHiddenController extends BaseController {
@Autowired @Autowired
private CustomHiddenService customHiddenService; private CustomHiddenService customHiddenService;
@Autowired @Autowired
private HiddenUserService hiddenUserService; // 隐患相关人员信息 private CustomHiddenUserService customHiddenUserService; // 隐患相关人员信息
@Autowired @Autowired
private ImgFilesService imgFilesService; private ImgFilesService imgFilesService;
@Autowired @Autowired
@ -59,19 +58,15 @@ public class CustomHiddenController extends BaseController {
@Autowired @Autowired
private HiddenSchemeService hiddenSchemeService; private HiddenSchemeService hiddenSchemeService;
@Autowired @Autowired
private HiddenCheckService hiddenCheckService; private CustomHiddenCheckService customHiddenCheckService;
@Autowired @Autowired
private CorpInfoService corpinfoService; private CorpInfoService corpinfoService;
@Autowired @Autowired
private DictionariesService dictionariesService; private DictionariesService dictionariesService;
@Autowired @Autowired
private SMSManagementService smsmanagementService;
@Autowired
private SMSLogService smSlogService;
@Autowired
private CustomService customService; private CustomService customService;
@Autowired @Autowired
private RecordItemService recordItemService; private CustomCheckRecordItemService customCheckRecordItemService;
@Autowired @Autowired
private SendMessageUtil sendMessageUtil; private SendMessageUtil sendMessageUtil;
@Autowired @Autowired
@ -124,7 +119,7 @@ public class CustomHiddenController extends BaseController {
hc.put("USER_ID", pd.get("CREATOR")); hc.put("USER_ID", pd.get("CREATOR"));
hc.put("STATUS", "1"); hc.put("STATUS", "1");
hc.put("CHECK_TIME", pd.get("CREATTIME").toString().substring(0, 10)); hc.put("CHECK_TIME", pd.get("CREATTIME").toString().substring(0, 10));
hiddenCheckService.save(hc); customHiddenCheckService.save(hc);
} }
if(pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) { if(pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) {
@ -168,7 +163,7 @@ public class CustomHiddenController extends BaseController {
pd = Jurisdiction.getUserDataJurisdiction(pd); pd = Jurisdiction.getUserDataJurisdiction(pd);
page.setPd(pd); page.setPd(pd);
List<PageData> varList = customHiddenService.listForSafetyEnvironmental(page); // 列出Hidden列表 List<PageData> varList = customHiddenService.listForSafetyEnvironmental(page); // 列出Hidden列表
varList = hiddenUserService.getHiddebFind(varList); varList = customHiddenUserService.getHiddebFind(varList);
for (PageData vector : varList) { for (PageData vector : varList) {
safetyenvironmentalService.departmentUtil(vector); safetyenvironmentalService.departmentUtil(vector);
} }
@ -250,9 +245,9 @@ public class CustomHiddenController extends BaseController {
PageData ri = new PageData(); PageData ri = new PageData();
ri.put("ISNORMAL", "0"); ri.put("ISNORMAL", "0");
ri.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); ri.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID"));
ri.put("LISTMANAGER_ID", pd.get("LISTMANAGER_ID")); ri.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
ri.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID")); ri.put("CUSTOM_ITEM_ID", pd.get("CUSTOM_ITEM_ID"));
recordItemService.editIsnormal(ri); customCheckRecordItemService.editIsnormal(ri);
} }
map.put("result", errInfo); // 返回结果 map.put("result", errInfo); // 返回结果
return map; return map;
@ -447,14 +442,14 @@ public class CustomHiddenController extends BaseController {
} }
} }
this.hiddenCheckService.delete(pd); this.customHiddenCheckService.delete(pd);
PageData checkUser = new PageData(); PageData checkUser = new PageData();
checkUser.put("HIDDENCHECK_ID", this.get32UUID()); // 主键 checkUser.put("HIDDENCHECK_ID", this.get32UUID()); // 主键
checkUser.put("HIDDEN_ID", pd.get("HIDDEN_ID")); checkUser.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT")); checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT"));
checkUser.put("USER_ID", pd.get("CHECKOR")); checkUser.put("USER_ID", pd.get("CHECKOR"));
checkUser.put("STATUS", "0"); checkUser.put("STATUS", "0");
hiddenCheckService.save(checkUser); customHiddenCheckService.save(checkUser);
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString()); List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString());
for (JSONObject json : list) { for (JSONObject json : list) {
@ -466,7 +461,7 @@ public class CustomHiddenController extends BaseController {
other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID"));
other.put("USER_ID", json.get("USER_ID")); other.put("USER_ID", json.get("USER_ID"));
other.put("STATUS", "0"); other.put("STATUS", "0");
hiddenCheckService.save(other); customHiddenCheckService.save(other);
// 发短信 // 发短信
PageData mes = new PageData(); PageData mes = new PageData();
@ -577,14 +572,14 @@ public class CustomHiddenController extends BaseController {
pd = this.getPageData(); pd = this.getPageData();
if (pd.get("ISQUALIFIED").equals("1")) { if (pd.get("ISQUALIFIED").equals("1")) {
pd.put("CHECKOR", Jurisdiction.getUSER_ID()); pd.put("CHECKOR", Jurisdiction.getUSER_ID());
PageData pd2 = this.hiddenCheckService.findByHidden(pd); PageData pd2 = customHiddenCheckService.findByHidden(pd);
pd.put("STATUS", 1); pd.put("STATUS", 1);
pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID")); pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID"));
pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID")); pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID"));
pd.put("USER_ID", pd2.get("USER_ID")); pd.put("USER_ID", pd2.get("USER_ID"));
hiddenCheckService.edit(pd); customHiddenCheckService.edit(pd);
List<PageData> checkList = hiddenCheckService.listAll(pd); List<PageData> checkList = customHiddenCheckService.listAll(pd);
for (PageData check : checkList) { for (PageData check : checkList) {
if (check.get("STATUS").toString().equals("0")) { if (check.get("STATUS").toString().equals("0")) {
map.put("result", errInfo); map.put("result", errInfo);
@ -941,7 +936,7 @@ public class CustomHiddenController extends BaseController {
pImgs = imgFilesService.listAll(pd3);//方案图片 pImgs = imgFilesService.listAll(pd3);//方案图片
} }
List<PageData> checkList = hiddenCheckService.listAll(pd); List<PageData> checkList = customHiddenCheckService.listAll(pd);
if (checkList != null && checkList.size() > 0) { if (checkList != null && checkList.size() > 0) {
PageData pd3 = new PageData(); PageData pd3 = new PageData();
pd3.put("TYPE", 5); pd3.put("TYPE", 5);
@ -1371,7 +1366,7 @@ public class CustomHiddenController extends BaseController {
imgIds.add(pageData.getString("HIDDENSCHEME_ID")); imgIds.add(pageData.getString("HIDDENSCHEME_ID"));
} }
// 验收信息 // 验收信息
List<PageData> checkList = hiddenCheckService.listExport(pd); List<PageData> checkList = customHiddenCheckService.listExport(pd);
Map<String, List<PageData>> checkMap = new HashMap<>(); Map<String, List<PageData>> checkMap = new HashMap<>();
Integer checkMaxCount = 1; Integer checkMaxCount = 1;
for (PageData pageData : checkList) { for (PageData pageData : checkList) {

View File

@ -242,5 +242,7 @@ public interface ListManagerMapper {
* @throws Exception * @throws Exception
*/ */
List<PageData> listAllRiskStandard(PageData pd); List<PageData> listAllRiskStandard(PageData pd);
List<PageData> recordAlllistPage(Page page);
} }

View File

@ -351,5 +351,11 @@ public interface HiddenMapper{
* @throws Exception * @throws Exception
*/ */
List<PageData> getRiskStandardCountByCreatorId(PageData pd); List<PageData> getRiskStandardCountByCreatorId(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> hiddenAlllistPage(Page page);
} }

View File

@ -228,5 +228,11 @@ public interface ListManagerService {
* @throws Exception * @throws Exception
*/ */
List<PageData> listAllRiskStandard(PageData pd)throws Exception; List<PageData> listAllRiskStandard(PageData pd)throws Exception;
/**
* * @param pd
* @throws Exception
*/
public List<PageData> recordListAll(Page page)throws Exception;
} }

View File

@ -344,6 +344,14 @@ public class ListManagerServiceImpl implements ListManagerService {
public List<PageData> listAllRiskStandard(PageData pd)throws Exception{ public List<PageData> listAllRiskStandard(PageData pd)throws Exception{
return listmanagerMapper.listAllRiskStandard(pd); return listmanagerMapper.listAllRiskStandard(pd);
} }
/**
* * @param pd
* @throws Exception
*/
public List<PageData> recordListAll(Page page)throws Exception{
return listmanagerMapper.recordAlllistPage(page);
}
} }

View File

@ -414,5 +414,11 @@ public interface HiddenService{
* @throws Exception * @throws Exception
*/ */
List<PageData> getRiskStandardCountByCreatorId(PageData pd) throws Exception; List<PageData> getRiskStandardCountByCreatorId(PageData pd) throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> hiddenlist(Page page)throws Exception;
} }

View File

@ -846,5 +846,13 @@ public class HiddenServiceImpl implements HiddenService {
public List<PageData> getRiskStandardCountByCreatorId(PageData pd) throws Exception{ public List<PageData> getRiskStandardCountByCreatorId(PageData pd) throws Exception{
return hiddenMapper.getRiskStandardCountByCreatorId(pd); return hiddenMapper.getRiskStandardCountByCreatorId(pd);
} }
/**
* @param page
* @throws Exception
*/
public List<PageData> hiddenlist(Page page)throws Exception{
return hiddenMapper.hiddenAlllistPage(page);
}
} }

View File

@ -10,9 +10,8 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Dictionaries; import com.zcloud.entity.system.Dictionaries;
import com.zcloud.mapper.datasource.bus.HiddenExamineMapper; import com.zcloud.mapper.datasource.bus.HiddenExamineMapper;
import com.zcloud.mapper.datasource.hidden.HiddenCheckMapper;
import com.zcloud.mapper.datasource.hidden.HiddenMapper;
import com.zcloud.mapper.datasource.hidden.HiddenSchemeMapper; import com.zcloud.mapper.datasource.hidden.HiddenSchemeMapper;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomHiddenCheckMapper;
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomHiddenMapper; import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomHiddenMapper;
import com.zcloud.service.bus.HiddenRegionService; import com.zcloud.service.bus.HiddenRegionService;
import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService; import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService;
@ -52,7 +51,7 @@ public class CustomHiddenServiceImpl implements CustomHiddenService {
@Resource @Resource
private HiddenSchemeMapper hiddenSchemeMapper; private HiddenSchemeMapper hiddenSchemeMapper;
@Resource @Resource
private HiddenCheckMapper hiddenCheckMapper; private CustomHiddenCheckMapper customHiddenCheckMapper;
@Resource @Resource
private ImgFilesService imgFilesService; private ImgFilesService imgFilesService;
@Resource @Resource
@ -732,7 +731,7 @@ public class CustomHiddenServiceImpl implements CustomHiddenService {
Map<String, PageData> schemeMap = schemeList.stream().filter(n -> "0".equals(n.getString("ISDELETE"))).collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (m -> m))); Map<String, PageData> schemeMap = schemeList.stream().filter(n -> "0".equals(n.getString("ISDELETE"))).collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (m -> m)));
imgIds.addAll(schemeList.stream().map(n -> n.getString("HIDDENSCHEME_ID")).collect(Collectors.toSet())); imgIds.addAll(schemeList.stream().map(n -> n.getString("HIDDENSCHEME_ID")).collect(Collectors.toSet()));
// 验收信息 // 验收信息
List<PageData> checkList = hiddenCheckMapper.listExport(condition); List<PageData> checkList = customHiddenCheckMapper.listExport(condition);
imgIds.addAll(checkList.stream().map(n -> n.getString("HIDDENCHECK_ID")).collect(Collectors.toSet())); imgIds.addAll(checkList.stream().map(n -> n.getString("HIDDENCHECK_ID")).collect(Collectors.toSet()));
Map<String, List<PageData>> checkMap = checkList.stream().collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (Arrays::asList))); Map<String, List<PageData>> checkMap = checkList.stream().collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (Arrays::asList)));
int checkMaxCount = checkMap.values().stream().mapToInt(List::size).max().orElse(0); int checkMaxCount = checkMap.values().stream().mapToInt(List::size).max().orElse(0);

View File

@ -3468,4 +3468,346 @@
) z ) z
order by z.USER_ID= #{orderUserId} desc ,z.CREATTIME desc ,z.DEPARTMENT_ID asc order by z.USER_ID= #{orderUserId} desc ,z.CREATTIME desc ,z.DEPARTMENT_ID asc
</select> </select>
<!-- 部门清单列表 -->
<select id="recordAlllistPage" parameterType="page" resultType="pd">
select * from
(
select
f.*,
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 vi_list_checkrecord_all ch
where ch.LISTMANAGER_ID=f.LISTMANAGER_ID AND ch.type = '1'
and ch.FINISHED='1' and ch.ISDELETE =0
) as count ,
(
select
count(1)
from VI_LIST_CHECKRECORD_ALL ch
left join VI_HIDDEN_ALL h on h.CHECKRECORD_ID = ch.CHECKRECORD_ID
where ch.LISTMANAGER_ID=f.LISTMANAGER_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.LISTMANAGER_ID) checkCount,
(select count(1) from VI_LIST_CHECKRECORD_ALL cc where cc.LISTMANAGER_ID = f.LISTMANAGER_ID and cc.FINISHED ='1' and type ='2') overTimeCount
from
VI_LIST_ALL 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.LISTMANAGER_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.LISTMANAGER_ID) &gt; 0
</when>
<when test='pd.STATUS=="0"'>
AND getCheckedNum(f.LISTMANAGER_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 vi_list_checkrecord_all cc where cc.LISTMANAGER_ID = f.LISTMANAGER_ID and cc.FINISHED ='1' and type ='2') &gt; 0
</when>
<when test='pd.OVERTIME=="0"'>
AND (select count(1) from vi_list_checkrecord_all cc where cc.LISTMANAGER_ID = f.LISTMANAGER_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.LISTMANAGER_ID in
(
SELECT LISTMANAGER_ID
FROM VI_LIST_CHECKRECORD_ALL
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.LISTMANAGER_ID in
(
SELECT LISTMANAGER_ID
FROM VI_LIST_CHECKRECORD_ALL
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.LISTMANAGER_ID in
(
SELECT LISTMANAGER_ID
FROM VI_LIST_CHECKRECORD_ALL
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>
<if test="pd.LIST_TYPE != null and pd.LIST_TYPE != ''"><!-- 关键词检索 -->
and f.LIST_TYPE = #{pd.LIST_TYPE}
</if>
group by f.LISTMANAGER_ID
order by field(f.ISDELETE,'0','1','2','-1') ,f.OPERATTIME desc
</select>
</mapper> </mapper>

View File

@ -4084,4 +4084,313 @@
</if> </if>
</select> </select>
<!-- 列表 -->
<select id="hiddenAlllistPage" parameterType="com.zcloud.entity.PageData" resultType="com.zcloud.entity.PageData">
select
f.*,
cr.NAME CREATORNAME,
re.NAME RECTIFICATIONORNAME,
ch.NAME CHECKORNAME,
rev.NAME REVIEWORNAME,
crd.NAME HIDDENFINDDEPTNAME,
red.NAME RECTIFICATIONDEPTNAME,
chd.NAME CHECKDEPTNAME,
lv.NAME HIDDENLEVELNAME,
lci.RISKPOINT_ID,
(select group_concat(chr.NAME) from VI_HIDDENCHECK_ALL bh left join sys_user chr on chr.USER_ID=bh.USER_ID where bh.HIDDEN_ID=f.HIDDEN_ID ) CHECKNAME,
(select group_concat(bh.USER_ID) from VI_HIDDENCHECK_ALL bh where bh.HIDDEN_ID=f.HIDDEN_ID ) CHECKUSERS,
(select group_concat(bh.USER_ID) from VI_HIDDENCHECK_ALL bh where bh.HIDDEN_ID=f.HIDDEN_ID and bh.STATUS = 0 ) UNCHECKUSERS
from
VI_HIDDEN_ALL f
left join sys_user cr on cr.USER_ID = f.CREATOR
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
left join sys_user ch on ch.USER_ID = f.CHECKOR
left join sys_user rev on rev.USER_ID = f.REVIEWOR
left join oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join oa_department red on red.DEPARTMENT_ID = f.RECTIFICATIONDEPT
left join oa_department chd on chd.DEPARTMENT_ID = f.CHECKDEPT
left join BUS_LIST_CHECKITEM lci on f.RISKITEM_ID = lci.LISTCHECKITEM_ID and f.LIST_TYPE = '1'
left join
<include refid="dicTableName"></include> lv
on f.HIDDENLEVEL = lv.BIANMA
<if test="pd.APPSERACH != null and pd.APPSERACH != ''">
left join VI_HIDDENCHECK_ALL bhc on bhc.HIDDEN_ID = f.HIDDEN_ID and bhc.USER_ID = #{pd.SELFUSERID} AND f.LIST_TYPE = bhc.LIST_TYPE
</if>
where f.ISDELETE = '0' and f.STATE != '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.APPSERACH != null and pd.APPSERACH != ''">
and( f.CREATOR = #{pd.SELFUSERID} or f.RECTIFICATIONOR = #{pd.SELFUSERID} or bhc.USER_ID = #{pd.SELFUSERID})
</if>
<if test="pd.HIDDENDESCR != null and pd.HIDDENDESCR != ''"><!-- 关键词检索 -->
and f.HIDDENDESCR LIKE CONCAT(CONCAT('%', #{pd.HIDDENDESCR}),'%')
</if>
<if test="pd.ISQUALIFIED != null and pd.ISQUALIFIED != ''"><!-- 关键词检索 -->
and f.ISQUALIFIED = #{pd.ISQUALIFIED}
</if>
<if test="pd.HIDDENLEVEL != null and pd.HIDDENLEVEL != ''"><!-- 关键词检索 -->
and f.HIDDENLEVEL = #{pd.HIDDENLEVEL}
</if>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 关键词检索 -->
and f.CREATTIME &gt;= #{pd.STARTTIME}
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and f.CREATTIME &lt;= #{pd.ENDTIME}
</if>
<if test="pd.STATE != null and pd.STATE !='' and pd.STATE != 0 and pd.STATE != 99" >
and f.STATE = #{pd.STATE}
</if>
<if test="pd.STATE != null and pd.STATE !='' and pd.STATE == 99" > <!-- BI页面未整改点进来之后 状态搜索框不搜索数据 数据显示未整改和已过期状态-->
and f.STATE in ('1','-1')
</if>
<!-- <if test="pd.SELF_USER_ID != null and pd.SELF_USER_ID != ''">-->
<!-- and f.CREATOR = #{pd.SELF_USER_ID}-->
<!-- </if>-->
<if test="pd.CREATORNAME != null and pd.CREATORNAME != ''">
and cr.NAME LIKE CONCAT(CONCAT('%', #{pd.CREATORNAME}),'%')
</if>
<if test="pd.DISPOSESTATE != null and pd.DISPOSESTATE != ''"><!-- 关键词检索 -->
<if test="pd.DISPOSESTATE==1"><!-- 发现/整改 -->
<if test="pd.ISMAIN != null and pd.ISMAIN != ''">
<choose>
<when test="pd.ISMAIN == 1">
AND f.CORPINFO_ID = #{pd.CORPINFO_ID}
</when>
<otherwise>
and (f.RECTIFICATIONOR = #{pd.SELFUSERID}
or f.CREATOR = #{pd.SELFUSERID})
</otherwise>
</choose>
</if>
and f.STATE in('1','-1')
</if>
<if test="pd.DISPOSESTATE == 2"><!-- 整改 -->
<if test="pd.ISMAIN != null and pd.ISMAIN != ''">
<choose>
<when test="pd.ISMAIN == 1">
AND f.CORPINFO_ID = #{pd.CORPINFO_ID}
</when>
<otherwise>
and f.RECTIFICATIONOR = #{pd.SELFUSERID}
</otherwise>
</choose>
</if>
and f.STATE in('1','-1')
</if>
<if test="pd.DISPOSESTATE==3"><!-- 验收 -->
and f.STATE = '3'
<if test="pd.ISMAIN != null and pd.ISMAIN != ''">
<choose>
<when test="pd.ISMAIN == 1">
AND f.CORPINFO_ID = #{pd.CORPINFO_ID}
</when>
<otherwise>
and
(
select count(1)
from VI_HIDDENCHECK_ALL bh
where
bh.HIDDEN_ID=f.HIDDEN_ID
and bh.USER_ID=#{pd.SELFUSERID}
and bh.STATUS=0
)>0
</otherwise>
</choose>
</if>
</if>
<if test="pd.DISPOSESTATE==4"><!-- 已验收 -->
and f.STATE = '4'
<choose>
<when test="pd.ISMAIN == 1">
AND f.CORPINFO_ID = #{pd.CORPINFO_ID}
</when>
<otherwise>
<choose>
<when test="pd.isIndex != null and pd.isIndex != '' and pd.isIndex == 1">
and f.CREATOR = #{pd.SELF_USER_ID}
</when>
<otherwise>
and (
f.RECTIFICATIONOR = #{pd.SELFUSERID}
or f.CREATOR = #{pd.SELFUSERID}
or (
select count(1)
from VI_HIDDENCHECK_ALL bh
where
bh.HIDDEN_ID=f.HIDDEN_ID
and bh.USER_ID=#{pd.SELFUSERID}
)>0
)
</otherwise>
</choose>
</otherwise>
</choose>
</if>
<if test="pd.DISPOSESTATE==5"><!-- 已超时APP使用不判断ISMAIN -->
<choose>
<when test="pd.isIndex != null and pd.isIndex != '' and pd.isIndex == 1">
and f.RECTIFICATIONOR = #{pd.SELFUSERID}
</when>
<otherwise>
and (
f.RECTIFICATIONOR = #{pd.SELFUSERID}
or f.CREATOR = #{pd.SELFUSERID}
)
</otherwise>
</choose>
and f.STATE = '-1'
</if>
<if test="pd.DISPOSESTATE==-1"><!-- 所有 -->
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and
f.CORPINFO_ID = #{pd.CORPINFO_ID}
</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.HIDDENFINDDEPT 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.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.HIDDENFINDDEPT in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
(f.HIDDENFINDDEPT 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.RECTIFICATIONDEPT 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}
) )
</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.HIDDENFINDDEPT in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
(f.HIDDENFINDDEPT in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>) or (f.RECTIFICATIONDEPT in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>)
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and (f.HIDDENFINDDEPT=#{pd.DEPARTMENT_ID} or f.RECTIFICATIONDEPT = #{pd.DEPARTMENT_ID})
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<if test="pd.STATE != null and pd.STATE != '' and pd.STATE != 99"><!-- 关键词检索 -->
and
f.STATE = #{pd.STATE}
</if>
</if>
</if>
<!-- <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and f.HIDDENFINDDEPT = #{pd.DEPARTMENT_ID}
</if> -->
<!-- 由BI页跳转过来参数 -->
<if test="pd.IS_DAY != null and pd.IS_DAY != ''"><!-- 由BI页跳转过来参数 -->
and
TO_DAYS(f.CREATTIME) = TO_DAYS(NOW())
</if>
<if test="pd.IS_WEEK != null and pd.IS_WEEK != ''"><!-- 由BI页跳转过来参数 -->
and
YEARWEEK(DATE_FORMAT(f.CREATTIME,'%Y-%m-%d'),1) = YEARWEEK(NOW(),1)
</if>
<if test="pd.IS_XUN != null and pd.IS_XUN != ''"><!-- 由BI页跳转过来参数 -->
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 由BI页跳转过来参数 -->
and f.CREATTIME &gt;= #{pd.STARTTIME}
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and f.CREATTIME &lt;= #{pd.ENDTIME}
</if>
</if>
<if test="pd.IS_MONTH != null and pd.IS_MONTH != ''"><!-- 由BI页跳转过来参数 -->
and
DATE_FORMAT(f.CREATTIME,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m')
</if>
<if test="pd.IS_QUARTER != null and pd.IS_QUARTER != ''"><!-- 由BI页跳转过来参数 -->
and f.CREATTIME BETWEEN #{pd.STARTTIME} and #{pd.ENDTIME}
</if>
<if test="pd.IS_YEAR != null and pd.IS_YEAR != ''"><!-- 由BI页跳转过来参数 -->
and
YEAR(f.CREATTIME)=YEAR(NOW())
</if>
<if test="pd.BISTATE != null and pd.BISTATE != ''"><!-- 由BI页跳转过来参数 -->
<choose>
<when test='pd.BISTATE=="1"'>
and f.STATE != '0'
</when>
<when test='pd.BISTATE=="2"'>
and f.STATE != '4'
</when>
<when test='pd.BISTATE=="3"'>
and f.STATE = '4'
</when>
</choose>
</if>
<if test="pd.ANALYSIS != null and pd.ANALYSIS != ''"><!-- 持续改进用字段 -->
and not exists (select 1 from BUS_RISKPOINT_ANALYSIS ra where ra.HIDDEN_ID = f.HIDDEN_ID)
</if>
<if test="pd.RECTIFICATIONDEPT != null and pd.RECTIFICATIONDEPT != ''">
and f.RECTIFICATIONDEPT = #{pd.RECTIFICATIONDEPT}
</if>
order by f.CREATTIME desc
</select>
</mapper> </mapper>

View File

@ -1528,7 +1528,7 @@
<!-- 清单检查记录(日检)统计(按清单ID统计指定年内检查情况) --> <!-- 清单检查记录(日检)统计(按清单ID统计指定年内检查情况) -->
<select id="listAllYearForDay" parameterType="pd" resultType="pd" > <select id="listAllYearForDay" parameterType="pd" resultType="pd" >
SELECT SELECT
c.LISTMANAGER_ID, c.CUSTOM_ID,
c.CREATTIME, c.CREATTIME,
c.TYPE, c.TYPE,
c.PERIODSTART, c.PERIODSTART,
@ -1540,12 +1540,12 @@
) )
SEPARATOR '$') HIDDEN_DESC SEPARATOR '$') HIDDEN_DESC
FROM FROM
BUS_CHECKRECORD c BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD c
left join bus_hidden h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0' left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0'
WHERE WHERE
c.FINISHED = 1 c.FINISHED = 1
and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y')) and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y'))
and c.LISTMANAGER_ID = #{LISTMANAGER_ID} and c.CUSTOM_ID = #{CUSTOM_ID}
GROUP BY c.CHECKRECORD_ID GROUP BY c.CHECKRECORD_ID
order by PERIODSTART order by PERIODSTART
</select> </select>
@ -1553,7 +1553,7 @@
<!-- 清单检查记录(周检)统计(按清单ID统计指定年内检查情况) --> <!-- 清单检查记录(周检)统计(按清单ID统计指定年内检查情况) -->
<select id="listAllYearForWeek" parameterType="pd" resultType="pd" > <select id="listAllYearForWeek" parameterType="pd" resultType="pd" >
SELECT SELECT
c.LISTMANAGER_ID, c.CUSTOM_ID,
c.CREATTIME, c.CREATTIME,
c.TYPE, c.TYPE,
c.PERIODSTART, c.PERIODSTART,
@ -1562,12 +1562,12 @@
GROUP_CONCAT( CONCAT(h.CREATTIME,' ',h.HIDDENDESCR) SEPARATOR '$') HIDDENDESCR, GROUP_CONCAT( CONCAT(h.CREATTIME,' ',h.HIDDENDESCR) SEPARATOR '$') HIDDENDESCR,
GROUP_CONCAT(h.RECTIFYDESCR SEPARATOR '$') RECTIFYDESCR GROUP_CONCAT(h.RECTIFYDESCR SEPARATOR '$') RECTIFYDESCR
FROM FROM
BUS_CHECKRECORD c BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD c
left join bus_hidden h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0' left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0'
WHERE WHERE
c.FINISHED = 1 c.FINISHED = 1
and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y')) and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y'))
and c.LISTMANAGER_ID = #{LISTMANAGER_ID} and c.CUSTOM_ID = #{CUSTOM_ID}
GROUP BY c.CHECKRECORD_ID GROUP BY c.CHECKRECORD_ID
order by PERIODSTART order by PERIODSTART
</select> </select>
@ -1575,7 +1575,7 @@
<!-- 清单检查记录(旬检)统计(按清单ID统计指定年内检查情况) --> <!-- 清单检查记录(旬检)统计(按清单ID统计指定年内检查情况) -->
<select id="listAllYearForTenday" parameterType="pd" resultType="pd" > <select id="listAllYearForTenday" parameterType="pd" resultType="pd" >
SELECT SELECT
c.LISTMANAGER_ID, c.CUSTOM_ID,
c.CREATTIME, c.CREATTIME,
c.TYPE, c.TYPE,
c.PERIODSTART, c.PERIODSTART,
@ -1584,12 +1584,12 @@
GROUP_CONCAT(CONCAT(h.CREATTIME,' ',h.HIDDENDESCR) SEPARATOR '$') HIDDENDESCR, GROUP_CONCAT(CONCAT(h.CREATTIME,' ',h.HIDDENDESCR) SEPARATOR '$') HIDDENDESCR,
GROUP_CONCAT(h.RECTIFYDESCR SEPARATOR '$') RECTIFYDESCR GROUP_CONCAT(h.RECTIFYDESCR SEPARATOR '$') RECTIFYDESCR
FROM FROM
BUS_CHECKRECORD c BUS_HIDDENDANGERCHECKSTANDARD_CHECKRECORD c
left join bus_hidden h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0' left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.ISDELETE = '0'
WHERE WHERE
c.FINISHED = 1 c.FINISHED = 1
and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y')) and (#{YEAR} &gt;= DATE_FORMAT(c.PERIODSTART,'%Y') and #{YEAR} &lt;=DATE_FORMAT(c.PERIODEND,'%Y'))
and c.LISTMANAGER_ID = #{LISTMANAGER_ID} and c.CUSTOM_ID = #{CUSTOM_ID}
GROUP BY c.CHECKRECORD_ID GROUP BY c.CHECKRECORD_ID
order by PERIODSTART order by PERIODSTART
</select> </select>

View File

@ -163,7 +163,7 @@
and EXISTS ( and EXISTS (
select select
1 1
from bus_hidden h from BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h
where where
h.hidden_id = f.hidden_id and h.hidden_id = f.hidden_id and
h.ISDELETE = '0' and h.STATE != '0' h.ISDELETE = '0' and h.STATE != '0'
@ -222,11 +222,11 @@
</if> </if>
<if test="DISPOSESTATE==3"><!-- 验收 --> <if test="DISPOSESTATE==3"><!-- 验收 -->
and h.STATE = '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 and (select count(1) from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID and bh.STATUS=0)>0
</if> </if>
<if test="DISPOSESTATE==4"><!-- 已验收 --> <if test="DISPOSESTATE==4"><!-- 已验收 -->
and h.STATE = '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) and (h.RECTIFICATIONOR = #{SELFUSERID} or h.CREATOR = #{SELFUSERID} or (select count(1) from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=h.HIDDEN_ID)>0)
</if> </if>
<if test="DISPOSESTATE==-1"><!-- 所有 --> <if test="DISPOSESTATE==-1"><!-- 所有 -->
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> <if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->