forked from integrated_whb/integrated_whb
隐患排查异常修改
parent
9b880a5521
commit
25a7c7973f
|
@ -152,7 +152,8 @@ public class AppHiddenController extends BaseController {
|
||||||
if (null == che.get("STATE")) {
|
if (null == che.get("STATE")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2
|
// if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2
|
||||||
|
if (che.get("STATE").equals("3")) {
|
||||||
dys++;
|
dys++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,6 +258,68 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/riskListCheckAdd") // /add
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "风险清单检查",instructionsOperate = "隐患",instructionsType = "新增")
|
||||||
|
public Object riskListCheckAdd() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
pd.put("HIDDEN_ID", this.get32UUID()); // 主键
|
||||||
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||||
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||||
|
pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除
|
||||||
|
pd.put("ISCONFIRM", "0"); //
|
||||||
|
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||||
|
if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||||
|
pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间
|
||||||
|
pd.put("RECTIFICATIONOR", pd.get("CREATOR")); // 整改人
|
||||||
|
pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT"));
|
||||||
|
// pd.put("STATE", "4");
|
||||||
|
} else {
|
||||||
|
// pd.put("STATE", "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) {
|
||||||
|
PageData item = new PageData();
|
||||||
|
item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID"));
|
||||||
|
item = this.listcheckitemService.findById(item);
|
||||||
|
pd.put("RISK_UNIT", item.get("RISKUNITNAME"));
|
||||||
|
pd.put("IDENTIFICATION", item.get("PARTSNAME"));
|
||||||
|
pd.put("RISK_DESCR", item.get("RISK_DESCR"));
|
||||||
|
pd.put("RISK_POSITION", item.get("POSITIONNAME"));
|
||||||
|
pd.put("LEVEL", item.get("DNAME5"));
|
||||||
|
}
|
||||||
|
hiddenService.save(pd);
|
||||||
|
// 清除同检查记录合格图片
|
||||||
|
if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
|
||||||
|
imgFilesService.delete(pd);
|
||||||
|
PageData img = new PageData();
|
||||||
|
img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID"));
|
||||||
|
img.put("TYPE", "14");
|
||||||
|
// List<PageData> imgs = imgFilesService.listAll(img); //根据ID读取
|
||||||
|
// if(imgs != null && imgs.size() > 0) {
|
||||||
|
// for(PageData i: imgs) {
|
||||||
|
// File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH"));
|
||||||
|
// file.delete();
|
||||||
|
// imgFilesService.delete(i);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("pd", pd);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
|
@ -636,6 +699,26 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param out
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/riskListCheckHiddenDelete") // /delete
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "隐患",instructionsOperate = "隐患",instructionsType = "删除")
|
||||||
|
public Object riskListCheckHiddenDelete() throws Exception {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
hiddenService.delete(pd);
|
||||||
|
map.put("result", errInfo); // 返回结果
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*
|
*
|
||||||
|
@ -770,6 +853,26 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/riskListCheckEdit") // /edit
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "风险清单检查",instructionsOperate = "隐患",instructionsType = "修改")
|
||||||
|
public Object riskListCheckEdit() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
hiddenService.editInfo(pd);
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*
|
*
|
||||||
|
@ -1040,6 +1143,70 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/riskListCheckInspection") // /check
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "隐患",instructionsOperate = "隐患",instructionsType = "验收")
|
||||||
|
public Object riskListCheckInspection() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
if (pd.get("ISQUALIFIED").equals("1")) {
|
||||||
|
PageData pd2 = this.hiddenCheckService.findByHidden(pd);
|
||||||
|
pd.put("STATUS", 1);
|
||||||
|
pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID"));
|
||||||
|
pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID"));
|
||||||
|
pd.put("USER_ID", pd2.get("USER_ID"));
|
||||||
|
hiddenCheckService.edit(pd);
|
||||||
|
|
||||||
|
List<PageData> checkList = hiddenCheckService.listAll(pd);
|
||||||
|
for (PageData check : checkList) {
|
||||||
|
if (check.get("STATUS").toString().equals("0")) {
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("check", pd);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hiddenService.check(pd);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
PageData hidden = new PageData();
|
||||||
|
hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
||||||
|
hidden.put("STATE", 1);
|
||||||
|
hidden.put("BUHEGE", 1);
|
||||||
|
|
||||||
|
hiddenService.changeState(hidden);
|
||||||
|
|
||||||
|
hidden.put("FOREIGN_KEY",pd.get("HIDDEN_ID"));
|
||||||
|
hidden.put("TYPE",4);
|
||||||
|
List<PageData> zgimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",5);
|
||||||
|
List<PageData> ysimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",8);
|
||||||
|
List<PageData> fsimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",22);
|
||||||
|
List<PageData> jsimgs = imgFilesService.listAll(hidden);
|
||||||
|
List<PageData> imgs = new ArrayList<PageData>();
|
||||||
|
imgs.addAll(zgimgs);
|
||||||
|
imgs.addAll(ysimgs);
|
||||||
|
imgs.addAll(fsimgs);
|
||||||
|
imgs.addAll(jsimgs);
|
||||||
|
for (PageData img : imgs) {
|
||||||
|
smb.deleteFile(img.getString("FILEPATH"));
|
||||||
|
imgFilesService.delete(img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map.put("check", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验收
|
* 验收
|
||||||
*
|
*
|
||||||
|
@ -1190,6 +1357,69 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/goRiskListCheckEdit") // /goEdit
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "风险清单检查隐患",instructionsOperate = "隐患",instructionsType = "去修改页面获取数据")
|
||||||
|
public Object goRiskListCheckEdit() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
pd = hiddenService.findById(pd); // 根据ID读取
|
||||||
|
PageData pd2 = new PageData();
|
||||||
|
pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
||||||
|
pd2.put("TYPE", 3);
|
||||||
|
List<PageData> hImgs = imgFilesService.listAll(pd2);// 隐患图片
|
||||||
|
pd2.put("TYPE", 4);
|
||||||
|
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
|
||||||
|
/*
|
||||||
|
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片
|
||||||
|
*/ // 查询整改方案
|
||||||
|
PageData hs = hiddenSchemeService.findByHdId(pd);
|
||||||
|
List<PageData> sImgs = new ArrayList<PageData>();
|
||||||
|
|
||||||
|
if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) {
|
||||||
|
PageData pd3 = new PageData();
|
||||||
|
pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID"));
|
||||||
|
pd3.put("TYPE", 8);
|
||||||
|
sImgs = imgFilesService.listAll(pd3);// 方案图片
|
||||||
|
}
|
||||||
|
|
||||||
|
List<PageData> pImgs = new ArrayList<PageData>();
|
||||||
|
if("1".equals(pd.get("HAVEPLAN"))) {
|
||||||
|
PageData pd3 = new PageData();
|
||||||
|
pd3.put("FOREIGN_KEY", hs.getString("HIDDEN_ID"));
|
||||||
|
pd3.put("TYPE",22);
|
||||||
|
pImgs = imgFilesService.listAll(pd3);//方案图片
|
||||||
|
}
|
||||||
|
|
||||||
|
List<PageData> checkList = hiddenCheckService.listAll(pd);
|
||||||
|
if (checkList != null && checkList.size() > 0) {
|
||||||
|
PageData pd3 = new PageData();
|
||||||
|
pd3.put("TYPE", 5);
|
||||||
|
for (PageData check : checkList) {
|
||||||
|
pd3.put("FOREIGN_KEY", check.get("HIDDENCHECK_ID"));
|
||||||
|
check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("hs", hs);
|
||||||
|
map.put("hImgs", hImgs);
|
||||||
|
map.put("rImgs", rImgs);
|
||||||
|
map.put("sImgs", sImgs);
|
||||||
|
map.put("pImgs", pImgs);
|
||||||
|
map.put("checkList", checkList);
|
||||||
|
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 去修改页面获取数据
|
* 去修改页面获取数据
|
||||||
*
|
*
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CorpInfoService corpinfoService;
|
private CorpInfoService corpinfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ListManagerService listmanagerService;
|
private CustomService customService;
|
||||||
//@Autowired
|
//@Autowired
|
||||||
//private CheckRecordService checkrecordService;
|
//private CheckRecordService checkrecordService;
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
// }
|
// }
|
||||||
int wjcNum = 0;
|
int wjcNum = 0;
|
||||||
int yjcNum = 0;
|
int yjcNum = 0;
|
||||||
List<PageData> varList = listmanagerService.listAll(pd);// 列出ListManager列表
|
List<PageData> varList = customService.listAll(pd);// 列出ListManager列表
|
||||||
for (PageData list : varList) {
|
for (PageData list : varList) {
|
||||||
String cycle = list.getString("PERIODNAME");
|
String cycle = list.getString("PERIODNAME");
|
||||||
if (list.getString("TYPE").equals("listType0005")) {
|
if (list.getString("TYPE").equals("listType0005")) {
|
||||||
|
@ -266,102 +266,47 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
PageData mes = new PageData();
|
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("HIDDEN_ID", this.get32UUID()); // 主键
|
pd.put("HIDDEN_ID", this.get32UUID()); // 主键
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||||
pd.put("CREATOR", pd.get("CREATOR")); // 发现时间
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||||
pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除
|
pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除
|
||||||
pd.put("ISCONFIRM", "0"); //
|
pd.put("ISCONFIRM", "0"); //
|
||||||
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业id
|
|
||||||
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
|
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||||
if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) {
|
if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||||
pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间
|
pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间
|
||||||
pd.put("RECTIFICATIONOR", pd.get("CREATOR")); // 整改人
|
pd.put("RECTIFICATIONOR", pd.get("CREATOR")); // 整改人
|
||||||
pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT"));
|
pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT"));
|
||||||
|
// pd.put("STATE", "4");
|
||||||
|
} else {
|
||||||
|
// pd.put("STATE", "1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (pd.get("CUSTOM_ITEM_ID") != null && Tools.notEmpty(pd.get("CUSTOM_ITEM_ID").toString())) {
|
if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) {
|
||||||
// PageData item = new PageData();
|
PageData item = new PageData();
|
||||||
// item.put("CUSTOM_ITEM_ID", pd.get("CUSTOM_ITEM_ID"));
|
item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID"));
|
||||||
// item = customItemService.findById(item);
|
item = this.customItemService.findById(item);
|
||||||
// pd.put("RISK_UNIT", item.get("RISKUNITNAME"));
|
pd.put("RISK_UNIT", item.get("RISKUNITNAME"));
|
||||||
// pd.put("IDENTIFICATION", item.get("PARTSNAME"));
|
pd.put("IDENTIFICATION", item.get("PARTSNAME"));
|
||||||
// pd.put("RISK_DESCR", item.get("RISK_DESCR"));
|
pd.put("RISK_DESCR", item.get("RISK_DESCR"));
|
||||||
// pd.put("RISK_POSITION", item.get("POSITIONNAME"));
|
pd.put("RISK_POSITION", item.get("POSITIONNAME"));
|
||||||
// pd.put("LEVEL", item.get("DNAME5"));
|
pd.put("LEVEL", item.get("DNAME5"));
|
||||||
// }
|
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
|
||||||
for (JSONObject json : list){
|
|
||||||
PageData hiddenconUserAdd = new PageData();
|
|
||||||
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
|
||||||
hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
|
||||||
hiddenconUserAdd.put("USER_ID",json.get("USER_ID"));
|
|
||||||
hiddenconUserAdd.put("TYPE","1");
|
|
||||||
hiddenconUserAdd.put("IS_MAIN","0");
|
|
||||||
customHiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
|
||||||
}
|
}
|
||||||
if(pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")){//判断是否是重大隐患
|
|
||||||
PageData userpd = new PageData();
|
|
||||||
userpd.put("USER_ID",pd.getString("CREATOR"));
|
|
||||||
userpd.put("DEPARTMENT_ID",usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
|
|
||||||
if(departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")){//判断部门级别是不是班组
|
|
||||||
userpd.put("DEPARTMENT_ID",departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))){//判断部门是否有负责人
|
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
|
||||||
return map;
|
|
||||||
}else {
|
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
|
||||||
pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
|
||||||
mes.put("RECEIVER_ID",usersService.findById(userpd).getString("USER_ID")); // 如果是较大或重大隐患在这里给站内信接收人赋值
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
|
||||||
return map;
|
|
||||||
}{
|
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
|
||||||
userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
|
||||||
if (Tools.isEmpty(usersService.findById(userpd))) {
|
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
|
||||||
return map;
|
|
||||||
}else{
|
|
||||||
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
PageData before = new PageData();// 添加隐患初始信息
|
|
||||||
before.put("TYPE","0");
|
|
||||||
before.put("STATE","2");
|
|
||||||
before.put("HIDDEN_ID",pd.get("HIDDEN_ID"));
|
|
||||||
before.put("spare1",pd.getString("HIDDENLEVEL"));
|
|
||||||
before.put("spare2",pd.getString("RECTIFICATIONOR"));
|
|
||||||
before.put("spare3",pd.getString("RECTIFICATIONDEADLINE"));
|
|
||||||
before.put("spare4",pd.getString("RECTIFICATIONDEPT"));
|
|
||||||
before.put("CREATOR", pd.getString("loginUserId"));
|
|
||||||
before.put("OPERATOR",pd.getString("loginUserId"));
|
|
||||||
customHiddenExamineService.saveApp(before);
|
|
||||||
customHiddenService.save(pd);
|
customHiddenService.save(pd);
|
||||||
if(!pd.getString("STATE").equals("0")){
|
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_001","友情提示:有一条隐患需要确认",pd.getString("CORPINFO_ID"),pd.getString("CONFIRM_USER"),pd.getString("HIDDEN_ID"),
|
|
||||||
pd.getString("HIDDENDESCR"),"隐患确认","确认","","");
|
|
||||||
}
|
|
||||||
// 清除同检查记录合格图片
|
// 清除同检查记录合格图片
|
||||||
if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
|
if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
|
||||||
imgFilesService.delete(pd);
|
imgFilesService.delete(pd);
|
||||||
PageData img = new PageData();
|
PageData img = new PageData();
|
||||||
img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID"));
|
img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID"));
|
||||||
img.put("TYPE", "14");
|
img.put("TYPE", "14");
|
||||||
List<PageData> imgs = imgFilesService.listAll(img); //根据ID读取
|
// List<PageData> imgs = imgFilesService.listAll(img); //根据ID读取
|
||||||
if(imgs != null && imgs.size() > 0) {
|
// if(imgs != null && imgs.size() > 0) {
|
||||||
for(PageData i: imgs) {
|
// for(PageData i: imgs) {
|
||||||
File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH"));
|
// File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH"));
|
||||||
file.delete();
|
// file.delete();
|
||||||
imgFilesService.delete(i);
|
// imgFilesService.delete(i);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -642,21 +587,11 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
@RequestMapping(value = "/delete")
|
@RequestMapping(value = "/delete")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object delete() throws Exception {
|
public Object delete() throws Exception {
|
||||||
// 获取IP
|
|
||||||
HttpServletRequest request = this.getRequest();
|
|
||||||
String ip = "";
|
|
||||||
if (request.getHeader("x-forwarded-for") == null) {
|
|
||||||
ip = request.getRemoteAddr();
|
|
||||||
}else{
|
|
||||||
ip = request.getHeader("x-forwarded-for");
|
|
||||||
}
|
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
customHiddenService.delete(pd);
|
customHiddenService.delete(pd);
|
||||||
FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:"+pd.getString("HIDDEN_ID"),ip); //记录日志 用户ID 隐患id 时间
|
|
||||||
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"1"));
|
|
||||||
map.put("result", errInfo); // 返回结果
|
map.put("result", errInfo); // 返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -675,7 +610,7 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String USER_ID = pd.getString("USER_ID");
|
String USER_ID = pd.getString("USER_ID");
|
||||||
pd = listmanagerService.findById(pd);
|
pd = customService.findById(pd);
|
||||||
if (pd.getString("TYPE").equals("listType0005")) {
|
if (pd.getString("TYPE").equals("listType0005")) {
|
||||||
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"),
|
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(pd.getString("START_DATE") + " 00:00:00"),
|
||||||
DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) {
|
DateUtil.fomatDateTime(pd.getString("END_DATE") + " 23:59:59"))) {
|
||||||
|
@ -780,25 +715,7 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
|
||||||
customHiddenUserService.delete(pd); //删除隐患相关人员 -- 隐患发现人
|
|
||||||
if(pd.getString("STATE").equals("16")){//如果状态等于16进入此方法肯定是提交过来的,赋值给待确认
|
|
||||||
pd.put("STATE","-2");
|
|
||||||
if(Tools.notEmpty(pd.getString("POSITIONDESC"))){customHiddenService.editInformation(pd);}
|
|
||||||
customHiddenService.editstate(pd);
|
|
||||||
}
|
|
||||||
customHiddenService.editInfo(pd);
|
customHiddenService.editInfo(pd);
|
||||||
|
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
|
||||||
for (JSONObject json : list){
|
|
||||||
PageData hiddenconUserAdd = new PageData();
|
|
||||||
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
|
||||||
hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
|
||||||
hiddenconUserAdd.put("USER_ID",json.get("USER_ID"));
|
|
||||||
hiddenconUserAdd.put("TYPE","1");
|
|
||||||
hiddenconUserAdd.put("IS_MAIN","0");
|
|
||||||
customHiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
|
||||||
}
|
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -1050,77 +967,51 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if (pd.get("ISQUALIFIED").equals("1")) { //验收合格
|
if (pd.get("ISQUALIFIED").equals("1")) {
|
||||||
List<PageData> pd2 = (List<PageData>) this.customHiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息
|
PageData pd2 = customHiddenCheckService.findByHidden(pd);
|
||||||
if(pd2.size()>0){
|
|
||||||
for(PageData checklist: pd2){
|
|
||||||
pd.put("STATUS", 1);
|
pd.put("STATUS", 1);
|
||||||
pd.put("HIDDENCHECK_ID", checklist.get("HIDDENCHECK_ID"));
|
pd.put("HIDDENCHECK_ID", pd2.get("HIDDENCHECK_ID"));
|
||||||
pd.put("DEPARTMENT_ID", checklist.get("DEPARTMENT_ID"));
|
pd.put("DEPARTMENT_ID", pd2.get("DEPARTMENT_ID"));
|
||||||
pd.put("USER_ID", checklist.get("USER_ID"));
|
pd.put("USER_ID", pd2.get("USER_ID"));
|
||||||
customHiddenCheckService.edit(pd);
|
customHiddenCheckService.edit(pd);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List<PageData> checkList = customHiddenCheckService.listAll(pd);
|
|
||||||
// for (PageData check : checkList) {
|
|
||||||
// if (check.get("STATUS").toString().equals("0")) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
List<PageData> checkList = customHiddenCheckService.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);
|
||||||
map.put("code","1000");
|
|
||||||
map.put("errorMessage","此次检查还有未合格项,不能验收");
|
|
||||||
map.put("check", pd);
|
map.put("check", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Tools.isEmpty(pd.getString("CHECKTIME")) && Tools.notEmpty(pd.getString("CHECK_TIME"))){//用于手机端传验收时间,存隐患表20220920
|
|
||||||
pd.put("CHECKTIME",pd.getString("CHECK_TIME"));
|
|
||||||
}
|
|
||||||
customHiddenService.check(pd);
|
customHiddenService.check(pd);
|
||||||
if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收
|
|
||||||
pd.put("ACCEPTSTEP", 6);
|
|
||||||
List<PageData> list = customHiddenService.listOtherNotAccept(pd);
|
|
||||||
PageData inspection = new PageData();
|
|
||||||
if (list.size() == 0) {
|
|
||||||
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
|
|
||||||
inspection.put("OPERATOR", pd.getString("CHECKOR"));
|
|
||||||
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
|
||||||
inspection.put("INSPECTION_STATUS", "6"); // 已验收
|
|
||||||
safetyenvironmentalService.editStatus(inspection);
|
|
||||||
}
|
|
||||||
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
|
|
||||||
inspection.put("OPERATOR", pd.getString("CHECKOR"));
|
|
||||||
inspection.put("HIDDEN_vector",pd.getString("HIDDEN_ID"));
|
|
||||||
noticeUtil.SE_ThreeStepUtil(inspection);
|
|
||||||
}
|
|
||||||
// 隐患验收清理点检处的状态
|
|
||||||
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"0"));
|
|
||||||
} else {
|
} else {
|
||||||
PageData pd2 = new PageData(); //验收打回
|
PageData hidden = new PageData();
|
||||||
pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
|
hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
||||||
pd2.put("TYPE", "4");
|
hidden.put("STATE", 1);
|
||||||
List<PageData> zgImgs = imgFilesService.listAll(pd2);
|
hidden.put("BUHEGE", 1);
|
||||||
for (PageData pageData : zgImgs) {
|
|
||||||
|
|
||||||
imgFilesService.delete(pageData);
|
customHiddenService.changeState(hidden);
|
||||||
if(Tools.notEmpty(pageData.getString("FILEPATH"))) {
|
|
||||||
smb.deleteFile(pageData.getString("FILEPATH"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
hidden.put("FOREIGN_KEY",pd.get("HIDDEN_ID"));
|
||||||
|
hidden.put("TYPE",4);
|
||||||
|
List<PageData> zgimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",5);
|
||||||
|
List<PageData> ysimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",8);
|
||||||
|
List<PageData> fsimgs = imgFilesService.listAll(hidden);
|
||||||
|
hidden.put("TYPE",22);
|
||||||
|
List<PageData> jsimgs = imgFilesService.listAll(hidden);
|
||||||
|
List<PageData> imgs = new ArrayList<PageData>();
|
||||||
|
imgs.addAll(zgimgs);
|
||||||
|
imgs.addAll(ysimgs);
|
||||||
|
imgs.addAll(fsimgs);
|
||||||
|
imgs.addAll(jsimgs);
|
||||||
|
for (PageData img : imgs) {
|
||||||
|
smb.deleteFile(img.getString("FILEPATH"));
|
||||||
|
imgFilesService.delete(img);
|
||||||
}
|
}
|
||||||
/** 删除所有验收人数据。**/
|
|
||||||
hiddenCheckApiService.deleteByHiddenId(pd.getString("HIDDEN_ID"));
|
|
||||||
/** 验收打回 **/
|
|
||||||
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
|
||||||
/** 记录打回 **/
|
|
||||||
hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"),pd.getString("CONTENT"),pd.getString("CHECKOR"));
|
|
||||||
}
|
}
|
||||||
hiddenMailService.apphiddneCheckAdopt(pd);
|
|
||||||
map.put("check", pd);
|
map.put("check", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -1201,14 +1092,6 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = customHiddenService.findById(pd); // 根据ID读取
|
pd = customHiddenService.findById(pd); // 根据ID读取
|
||||||
if(pd.get("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){
|
|
||||||
pd.put("USER_ID",pd.getString("CONFIRM_USER"));
|
|
||||||
PageData user = usersService.findById(pd);
|
|
||||||
if(user!=null){
|
|
||||||
pd.put("confirmDeptId",user.getString("DEPARTMENT_ID"));
|
|
||||||
pd.put("conUserId",pd.getString("CONFIRM_USER"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
||||||
pd2.put("TYPE", 3);
|
pd2.put("TYPE", 3);
|
||||||
|
@ -1216,23 +1099,24 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
pd2.put("TYPE", 4);
|
pd2.put("TYPE", 4);
|
||||||
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
|
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
|
||||||
/*
|
/*
|
||||||
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c
|
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片
|
||||||
*/ // 查询整改方案
|
*/ // 查询整改方案
|
||||||
PageData hs = customHiddenSchemeService.findByHdId(pd);
|
PageData hs = customHiddenSchemeService.findByHdId(pd);
|
||||||
List<PageData> sImgs = new ArrayList<PageData>();
|
List<PageData> sImgs = new ArrayList<PageData>();
|
||||||
|
|
||||||
if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) {
|
if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) {
|
||||||
PageData pd3 = new PageData();
|
PageData pd3 = new PageData();
|
||||||
pd3.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID"));
|
||||||
pd3.put("TYPE", 8);
|
pd3.put("TYPE", 8);
|
||||||
sImgs = imgFilesService.listAll(pd3);// 方案图片
|
sImgs = imgFilesService.listAll(pd3);// 方案图片
|
||||||
|
}
|
||||||
|
|
||||||
|
List<PageData> pImgs = new ArrayList<PageData>();
|
||||||
PageData pd31 = new PageData();
|
if("1".equals(pd.get("HAVEPLAN"))) {
|
||||||
pd31.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID"));
|
PageData pd3 = new PageData();
|
||||||
pd31.put("TYPE", 8);
|
pd3.put("FOREIGN_KEY", hs.getString("HIDDEN_ID"));
|
||||||
List<PageData> sImgs2 = imgFilesService.listAll(pd31);// 方案图片
|
pd3.put("TYPE",22);
|
||||||
sImgs.addAll(sImgs2);
|
pImgs = imgFilesService.listAll(pd3);//方案图片
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PageData> checkList = customHiddenCheckService.listAll(pd);
|
List<PageData> checkList = customHiddenCheckService.listAll(pd);
|
||||||
|
@ -1244,28 +1128,14 @@ public class AppCustomHiddenController extends BaseController {
|
||||||
check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片
|
check.put("cImgs", imgFilesService.listAll(pd3));// 验收图片
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<PageData> hiddenExa = customHiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息
|
|
||||||
List<PageData> repulsecause = customHiddenExamineService.findByHiddenId(pd);//确认人打回信息
|
|
||||||
for (PageData pageData :hiddenExa){
|
|
||||||
if("0".equals(pageData.getString("TYPE"))){
|
|
||||||
pd.put("editUserName",pageData.get("editUserName"));
|
|
||||||
pd.put("editDeptName",pageData.get("editDeptName"));
|
|
||||||
pd.put("editLevelName",pageData.get("editLevelName"));
|
|
||||||
pd.put("editRectificationDeadline",pageData.get("spare3"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
map.put("hiddenExa", hiddenExa); // //特殊审批信息
|
|
||||||
List<PageData> hiddenFindPeople = customHiddenUserService.listAll(pd);// 隐患相关人员信息 --隐患发现人
|
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("hs", hs);
|
map.put("hs", hs);
|
||||||
map.put("hImgs", hImgs);
|
map.put("hImgs", hImgs);
|
||||||
map.put("rImgs", rImgs);
|
map.put("rImgs", rImgs);
|
||||||
map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"),"102"));// 隐患视频
|
|
||||||
// map.put("cImgs", cImgs);
|
|
||||||
map.put("sImgs", sImgs);
|
map.put("sImgs", sImgs);
|
||||||
map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息
|
map.put("pImgs", pImgs);
|
||||||
map.put("checkList", checkList);
|
map.put("checkList", checkList);
|
||||||
map.put("repulsecause",repulsecause);
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,4 +341,8 @@ public class LoginController extends BaseController {
|
||||||
session.removeAttribute(Const.SESSION_RNUMBERS);
|
session.removeAttribute(Const.SESSION_RNUMBERS);
|
||||||
session.removeAttribute(Const.SKIN);
|
session.removeAttribute(Const.SKIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println(new SimpleHash("SHA-1", "18700000001", "666666").toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,12 +179,12 @@ public class MainController extends BaseController {
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
Boolean b1 = RightsHelper.testRights(roleRights, menuList.get(i).getROUTE_ID());
|
Boolean b1 = RightsHelper.testRights(roleRights, menuList.get(i).getROUTE_ID());
|
||||||
menuList.get(i).setHasMenu(b1); //赋予主职角色菜单权限
|
menuList.get(i).setHasMenu(b1); //赋予主职角色菜单权限
|
||||||
if (!b1 && isRoot){
|
// if (!b1 && isRoot){
|
||||||
menuList.remove(i);
|
// menuList.remove(i);
|
||||||
i--;
|
// i--;
|
||||||
size--;
|
// size--;
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
if (!b1 && null != arrayRoleRights) {
|
if (!b1 && null != arrayRoleRights) {
|
||||||
for (int n = 0; n < arrayRoleRights.size(); n++) {
|
for (int n = 0; n < arrayRoleRights.size(); n++) {
|
||||||
if (RightsHelper.testRights(arrayRoleRights.get(n), menuList.get(i).getROUTE_ID())) {
|
if (RightsHelper.testRights(arrayRoleRights.get(n), menuList.get(i).getROUTE_ID())) {
|
||||||
|
|
|
@ -3449,7 +3449,7 @@
|
||||||
|
|
||||||
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
|
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
|
||||||
<if test="pd.APPSERACH != null and pd.APPSERACH != ''">
|
<if test="pd.APPSERACH != null and pd.APPSERACH != ''">
|
||||||
left join BUS_HIDDENCHECK bhc on bhc.HIDDEN_ID = f.HIDDEN_ID and bhc.USER_ID = #{pd.SELFUSERID}
|
left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bhc on bhc.HIDDEN_ID = f.HIDDEN_ID and bhc.USER_ID = #{pd.SELFUSERID}
|
||||||
</if>
|
</if>
|
||||||
where f.ISDELETE = '0' and f.STATE != '0'
|
where f.ISDELETE = '0' and f.STATE != '0'
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
|
@ -3536,7 +3536,7 @@
|
||||||
and
|
and
|
||||||
(
|
(
|
||||||
select count(1)
|
select count(1)
|
||||||
from BUS_HIDDENCHECK bh
|
from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh
|
||||||
where
|
where
|
||||||
bh.HIDDEN_ID=f.HIDDEN_ID
|
bh.HIDDEN_ID=f.HIDDEN_ID
|
||||||
and bh.USER_ID=#{pd.SELFUSERID}
|
and bh.USER_ID=#{pd.SELFUSERID}
|
||||||
|
@ -3564,7 +3564,7 @@
|
||||||
or f.CREATOR = #{pd.SELFUSERID}
|
or f.CREATOR = #{pd.SELFUSERID}
|
||||||
or (
|
or (
|
||||||
select count(1)
|
select count(1)
|
||||||
from BUS_HIDDENCHECK bh
|
from BUS_HIDDENDANGERCHECKSTANDARD_HIDDENCHECK bh
|
||||||
where
|
where
|
||||||
bh.HIDDEN_ID=f.HIDDEN_ID
|
bh.HIDDEN_ID=f.HIDDEN_ID
|
||||||
and bh.USER_ID=#{pd.SELFUSERID}
|
and bh.USER_ID=#{pd.SELFUSERID}
|
||||||
|
@ -3724,9 +3724,6 @@
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</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 != ''">
|
<if test="pd.RECTIFICATIONDEPT != null and pd.RECTIFICATIONDEPT != ''">
|
||||||
and f.RECTIFICATIONDEPT = #{pd.RECTIFICATIONDEPT}
|
and f.RECTIFICATIONDEPT = #{pd.RECTIFICATIONDEPT}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -880,10 +880,98 @@
|
||||||
left join sys_user u on u.USER_ID = f.USER_ID
|
left join sys_user u on u.USER_ID = f.USER_ID
|
||||||
left join bus_hiddendangercheckstandard_custom_item bhci on bhci.CUSTOM_ID = f.CUSTOM_ID and bhci.ISDELETE = '0'
|
left join bus_hiddendangercheckstandard_custom_item bhci on bhci.CUSTOM_ID = f.CUSTOM_ID and bhci.ISDELETE = '0'
|
||||||
where f.ISDELETE = 0
|
where f.ISDELETE = 0
|
||||||
|
and (f.TYPE != 'listType0005'
|
||||||
|
or (f.START_DATE <= DATE_FORMAT(NOW(),'%Y-%m-%d') and f.END_DATE
|
||||||
|
>= DATE_FORMAT(NOW(),'%Y-%m-%d') ))
|
||||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
and bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
and bhci.CHECK_CONTENT LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test='ISSUPERVISE != null and ISSUPERVISE != "" and ISSUPERVISE == "1"'>
|
||||||
|
<choose>
|
||||||
|
<when test='ISLEADER != null and ISLEADER != "" and ISLEADER == "1"'>
|
||||||
|
and
|
||||||
|
((f.DEPARTMENT_ID in (
|
||||||
|
select
|
||||||
|
SUB_DEPARTMENT_ID
|
||||||
|
from
|
||||||
|
oa_supervision_department osd
|
||||||
|
where
|
||||||
|
osd.SUP_DEPARTMENT_ID = #{SUP_DEPARTMENT_ID}
|
||||||
|
and osd.ISDELETE = '0'
|
||||||
|
and osd.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
)) or (
|
||||||
|
f.DEPARTMENT_ID in
|
||||||
|
<foreach item="item" index="index"
|
||||||
|
collection="DEPARTMENT_IDS" open="(" separator="," close=")">
|
||||||
|
'${item}'
|
||||||
|
</foreach>
|
||||||
|
))
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and
|
||||||
|
(f.DEPARTMENT_ID in (
|
||||||
|
select
|
||||||
|
SUB_DEPARTMENT_ID
|
||||||
|
from
|
||||||
|
oa_supervision_department osd
|
||||||
|
where
|
||||||
|
osd.SUP_DEPARTMENT_ID = #{SUP_DEPARTMENT_ID}
|
||||||
|
and osd.ISDELETE = '0'
|
||||||
|
and osd.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
) or f.USER_ID = #{USER_ID})
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</when>
|
||||||
|
|
||||||
|
<when test='ISLEADER != null and ISLEADER != "" and ISLEADER == "1"'>
|
||||||
|
and
|
||||||
|
f.DEPARTMENT_ID in
|
||||||
|
<foreach item="item" index="index"
|
||||||
|
collection="DEPARTMENT_IDS" open="(" separator="," close=")">
|
||||||
|
'${item}'
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
|
||||||
|
and
|
||||||
|
f.DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||||
|
and f.USER_ID = #{USER_ID}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<if test="SUB_DEPARTMENT_IDS != null and SUB_DEPARTMENT_IDS != ''">
|
||||||
|
and f.DEPARTMENT_ID = #{SUB_DEPARTMENT_IDS}
|
||||||
|
</if>
|
||||||
|
<if test="USERNAME != null and USERNAME != ''">
|
||||||
|
and u.NAME LIKE CONCAT(CONCAT('%', #{USERNAME}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="KEYWORDS != null and KEYWORDS != ''">
|
||||||
|
and f.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="STATUS != null and STATUS != ''"><!-- 关键词检索 -->
|
||||||
|
<choose>
|
||||||
|
<when test='STATUS=="1"'>
|
||||||
|
AND getCheckedNum(f.LISTMANAGER_ID) > 0
|
||||||
|
</when>
|
||||||
|
<when test='STATUS=="0"'>
|
||||||
|
AND getCheckedNum(f.LISTMANAGER_ID) = 0
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
<if test="LISTINGLEVEL != null and LISTINGLEVEL != ''"><!-- 关键词检索 -->
|
||||||
|
<choose>
|
||||||
|
<when test='LISTINGLEVEL == "1"'>
|
||||||
|
and d.LEVEL = ''
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and d.LEVEL = #{LISTINGLEVEL}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
GROUP BY f.CUSTOM_ID
|
GROUP BY f.CUSTOM_ID
|
||||||
ORDER BY f.OPERATTIME DESC
|
ORDER BY f.OPERATTIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue