Merge remote-tracking branch 'origin/1212-八项作业迁移' into 1212-八项作业迁移
commit
cce02a4d42
|
@ -2,6 +2,10 @@ package com.zcloud.controller.gf;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.clinet.MqClient;
|
||||
import com.zcloud.dto.Response;
|
||||
import com.zcloud.dto.TenCorpConst;
|
||||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -11,13 +15,14 @@ import org.apache.commons.lang.StringUtils;
|
|||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +44,16 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
@Resource
|
||||
private GFConfinedSpaceGasService GFconfinedspaceGasService;
|
||||
@Autowired
|
||||
private GFConfinedSpaceAcceptUserService confinedspaceacceptuserService;
|
||||
@Autowired
|
||||
private GFConfinedSpaceGasWHService confinedspacegaswhService;
|
||||
@Autowired
|
||||
private SendMessageUtil sendMessageUtil;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@Resource
|
||||
private MqClient mqClient;
|
||||
/**获取编码
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -76,6 +90,18 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
DecimalFormat dft=new DecimalFormat("00");
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
|
||||
String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH));
|
||||
pd2.put("CREATDATE",year + "-" + month + "-" + day);
|
||||
pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID"));
|
||||
pd2 = GFconfinedspaceService.getCode(pd2); //根据ID读取
|
||||
String code = "YX"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1));
|
||||
pd = this.getPageData();
|
||||
pd.put("CHECK_NO", code);
|
||||
pd.put("CONFINEDSPACE_ID", this.get32UUID()); //主键
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
|
@ -119,14 +145,46 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
params4.put("name", "params3");// 存入短信模板中的参数名称
|
||||
params4.put("value", "确认");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params4);
|
||||
// sendMessageUtil.sendMessages(mes, paramsList);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
// 发短信
|
||||
|
||||
PageData mes1 = new PageData();
|
||||
mes1.put("RECEIVER_ID", pd.get("ANALYZE_USER_ID"));// 收信人userid
|
||||
mes1.put("templateCode", "YX_QT");// 短信模板编码
|
||||
mes1.put("SMSCode", "SMS_223540753");// 短信模板编码
|
||||
mes1.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList1 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params5 = new PageData();
|
||||
params5.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params5.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList1.add(params5);
|
||||
// 第2个参数
|
||||
PageData params6 = new PageData();
|
||||
params6.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params6.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList1.add(params6);
|
||||
sendMessageUtil.sendMessages(mes1, paramsList1);
|
||||
}
|
||||
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||
tenCorpDto.setTopic("eightWork");
|
||||
tenCorpDto.setMark(pd.getString("CONFINEDSPACE_ID"));
|
||||
tenCorpDto.setMessage(TenCorpConst.confinedSpace);
|
||||
tenCorpDto.setTime_stamp(pd.getString("WORK_START_DATE") + ":00:000");
|
||||
tenCorpDto.setData(pd);
|
||||
tenCorpDto.setMark_name("CONFINEDSPACE_ID");
|
||||
Response response = mqClient.sendDelayQueue(tenCorpDto);
|
||||
if (!"succeed".equals(response.getResult()) || !"0".equals(response.getCode())){
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
System.out.println("amazing:!!!!!"+JSONObject.toJSONString(response));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
|
@ -141,6 +199,138 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**作废
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value="/cancel")
|
||||
@ResponseBody
|
||||
public void cancel(@RequestBody PageData pd) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
System.out.println(JSONObject.toJSONString(pd));
|
||||
PageData cpd = new PageData();
|
||||
cpd = GFconfinedspaceService.findById(pd);
|
||||
if(cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") != null && cpd.getString("GUARDIAN_USER_SIGNER_TIME") != null){
|
||||
// String WORK_START_DATE = pd.getString("WORK_START_DATE");
|
||||
// String ANALYZE_TIME = cpd.getString("ANALYZE_TIME");
|
||||
// String GUARDIAN_USER_SIGNER_TIME = cpd.getString("GUARDIAN_USER_SIGNER_TIME");
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
// System.out.println(WORK_START_DATE);
|
||||
// System.out.println(ANALYZE_TIME);
|
||||
// System.out.println("-------------123----------");
|
||||
// try {
|
||||
// Date date1 = format.parse(WORK_START_DATE);
|
||||
// Date date2 = format.parse(ANALYZE_TIME);
|
||||
// Date date3 = format.parse(GUARDIAN_USER_SIGNER_TIME);
|
||||
// long workTime = date1.getTime();
|
||||
// long analyzeTime = date2.getTime();
|
||||
// long signtime = date3.getTime();
|
||||
// System.out.println(workTime - analyzeTime);
|
||||
// System.out.println(analyzeTime - workTime);
|
||||
// if (workTime - analyzeTime >= 0 && workTime - signtime >= 0) {
|
||||
return;
|
||||
// } else {
|
||||
// pd.put("APPLY_STATUS",-99);
|
||||
// confinedspaceService.cancel(pd);
|
||||
// // 发短信
|
||||
// PageData mes = new PageData();
|
||||
// mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid
|
||||
// mes.put("templateCode", "YX_ZF");// 短信模板编码
|
||||
// mes.put("SMSCode", "SMS_462060039");// 短信模板编码
|
||||
// mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
|
||||
// // 参数集合
|
||||
// List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// // 第1个参数
|
||||
// PageData params1 = new PageData();
|
||||
// params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
// params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
// paramsList.add(params1);
|
||||
// // 第2个参数
|
||||
// PageData params2 = new PageData();
|
||||
// params2.put("name", "params1");// 存入短信模板中的参数名称
|
||||
// params2.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
// paramsList.add(params2);
|
||||
// sendMessageUtil.sendMessages(mes, paramsList);
|
||||
// }
|
||||
// } catch (ParseException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}else if (cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") == null){
|
||||
pd.put("APPLY_STATUS",-98);
|
||||
GFconfinedspaceService.cancel(pd);
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspaceService.checkno(pd);
|
||||
PageData pd3 = new PageData();
|
||||
pd3.put("CHECK_NO",pd2.getString("CHECK_NO"));
|
||||
pd3.put("CORPINFO_ID",pd.getString("CORPINFO_ID"));
|
||||
GFconfinedspaceService.editSpecialwork(pd3);
|
||||
GFconfinedspaceService.editSpecialwork1(pd3);
|
||||
GFconfinedspaceService.editSpecialwork2(pd3);
|
||||
GFconfinedspaceService.editSpecialwork3(pd3);
|
||||
GFconfinedspaceService.editSpecialwork4(pd3);
|
||||
GFconfinedspaceService.editSpecialwork5(pd3);
|
||||
GFconfinedspaceService.editSpecialwork6(pd3);
|
||||
GFconfinedspaceService.editSpecialwork7(pd3);
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid
|
||||
mes.put("templateCode", "YX_ZF1");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_462060039");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params2.put("value", "受限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
}else if (cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") != null && cpd.getString("GUARDIAN_USER_SIGNER_TIME") == null){
|
||||
pd.put("APPLY_STATUS",-99);
|
||||
GFconfinedspaceService.cancel(pd);
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspaceService.checkno(pd);
|
||||
PageData pd3 = new PageData();
|
||||
pd3.put("CHECK_NO",pd2.getString("CHECK_NO"));
|
||||
pd3.put("CORPINFO_ID",pd.getString("CORPINFO_ID"));
|
||||
GFconfinedspaceService.editSpecialwork(pd3);
|
||||
GFconfinedspaceService.editSpecialwork1(pd3);
|
||||
GFconfinedspaceService.editSpecialwork2(pd3);
|
||||
GFconfinedspaceService.editSpecialwork3(pd3);
|
||||
GFconfinedspaceService.editSpecialwork4(pd3);
|
||||
GFconfinedspaceService.editSpecialwork5(pd3);
|
||||
GFconfinedspaceService.editSpecialwork6(pd3);
|
||||
GFconfinedspaceService.editSpecialwork7(pd3);
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid
|
||||
mes.put("templateCode", "YX_ZF2");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_462060039");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params2.put("value", "受限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -194,6 +384,18 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
paramsList.add(params4);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
}
|
||||
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||
tenCorpDto.setTopic("eightWork");
|
||||
tenCorpDto.setMark(pd.getString("CONFINEDSPACE_ID"));
|
||||
tenCorpDto.setMessage(TenCorpConst.confinedSpace);
|
||||
tenCorpDto.setTime_stamp(pd.getString("WORK_START_DATE") + ":00:000");
|
||||
tenCorpDto.setData(pd);
|
||||
tenCorpDto.setMark_name("CONFINEDSPACE_ID");
|
||||
Response response = mqClient.sendDelayQueue(tenCorpDto);
|
||||
if (!"succeed".equals(response.getResult()) || !"0".equals(response.getCode())){
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
System.out.println("amazing:!!!!!"+JSONObject.toJSONString(response));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -221,7 +423,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -296,7 +498,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -307,6 +509,39 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
// /**修改
|
||||
// * @param
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @RequestMapping(value="/editAcceptconfess")
|
||||
// @ResponseBody
|
||||
// @Transactional
|
||||
// @LogAnno(menuType= "手机",menuServer= "受限空间",instructionsOperate = "受限空间",instructionsType = "接受交底人签字")
|
||||
// public Object editAcceptconfess(
|
||||
// @RequestParam(value="FFILE",required=false) MultipartFile[] files
|
||||
// ) throws Exception {
|
||||
// Map<String, Object> map = new HashMap<String, Object>();
|
||||
// String errInfo = "success";
|
||||
// PageData pd = new PageData();
|
||||
// pd = this.getPageData();
|
||||
// PageData pd2 = new PageData();
|
||||
// pd2 = confinedspaceService.findById(pd);
|
||||
// pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
// pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
// if (files != null && files.length > 0) {
|
||||
// MultipartFile file = files[0];
|
||||
//
|
||||
// String ffile = DateUtil.getDays();
|
||||
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
// pd2.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
// pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
// confinedspaceacceptuserService.edit(pd2);
|
||||
// }
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -314,9 +549,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
@RequestMapping(value="/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object editAcceptconfess(
|
||||
@RequestParam(value="FFILE",required=false) MultipartFile[] files
|
||||
) throws Exception {
|
||||
public Object editAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
|
@ -325,22 +558,183 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
pd2 = GFconfinedspaceService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if (files != null && files.length > 0) {
|
||||
MultipartFile file = files[0];
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
|
||||
|
||||
pd2.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
// pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT"));
|
||||
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFconfinedspaceService.edit(pd2);
|
||||
for (int i = 0; i < SIGNTIME.length; i++) {
|
||||
signertime = SIGNTIME[i];
|
||||
fileList.add(request.getFile("file"+i));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("CONFINEDSPACE_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
}
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String CONFINEDSPACE_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
pd.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName);
|
||||
pd.put("ISDELETE", '0');
|
||||
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||
pd.put("CONFINEDSPACE_ID", CONFINEDSPACE_ID);
|
||||
pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID);
|
||||
pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID);
|
||||
pd.put("ACCEPT_USER_ID","");
|
||||
pd.put("ACCEPT_DEPARTMENT_ID", "");
|
||||
confinedspaceacceptuserService.save(pd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value="/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object editAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspaceService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
PageData log = new PageData();
|
||||
log.put("CONFINEDSPACELOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("CONFINEDSPACE_ID", pd.get("CONFINEDSPACE_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
if ("2".equals(status) || "3".equals(status) || "4".equals(status) || "5".equals(status)) {
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"));
|
||||
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status) || "-6".equals(status)) {
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
case "6"://验收人
|
||||
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
|
||||
|
||||
for (int i = 0; i < SIGNTIME.length; i++) {
|
||||
signertime = SIGNTIME[i];
|
||||
fileList.add(request.getFile("file"+i));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("CONFINEDSPACE_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
}
|
||||
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFconfinedspaceService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
// 发短信
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes.put("templateCode", "YX_Y06");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "type");// 存入短信模板中的参数名称
|
||||
params2.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
break;
|
||||
case "-6"://验收人打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFconfinedspaceService.edit(pd2);
|
||||
|
||||
// 发短信
|
||||
PageData mes4 = new PageData();
|
||||
mes4.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes4.put("templateCode", "YX_N06");// 短信模板编码
|
||||
mes4.put("SMSCode", "SMS_223580715");// 短信模板编码
|
||||
mes4.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList4 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params13 = new PageData();
|
||||
params13.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params13.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params13);
|
||||
// 第2个参数
|
||||
PageData params14 = new PageData();
|
||||
params14.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params14.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params14);
|
||||
// 第3个参数
|
||||
PageData params15 = new PageData();
|
||||
params15.put("name", "params3");// 存入短信模板中的参数名称
|
||||
params15.put("value", "验收人");// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params15);
|
||||
sendMessageUtil.sendMessages(mes4, paramsList4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFconfinedspaceLogService.save(log);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String CONFINEDSPACE_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
PageData cpd = new PageData();
|
||||
cpd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
cpd.put("ACCEPT_USER_SIGNER_TIME", signertime);
|
||||
cpd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人
|
||||
cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName);
|
||||
cpd.put("ISDELETE", '0');
|
||||
cpd.put("CORPINFO_ID", CORPINFO_ID);
|
||||
cpd.put("CONFINEDSPACE_ID", CONFINEDSPACE_ID);
|
||||
cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID);
|
||||
cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", "");
|
||||
cpd.put("ACCEPT_CONFESS_USER_ID", "");
|
||||
cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID);
|
||||
confinedspaceacceptuserService.save(cpd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -382,7 +776,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("CONFIRM_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("CONFIRM_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -445,6 +839,18 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
params4.put("value", "审批");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params4);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||
tenCorpDto.setTopic("eightWork");
|
||||
tenCorpDto.setMark(pd.getString("CONFINEDSPACE_ID"));
|
||||
tenCorpDto.setMessage(TenCorpConst.confinedSpace);
|
||||
tenCorpDto.setTime_stamp(pd.getString("WORK_START_DATE") + ":00:000");
|
||||
tenCorpDto.setData(pd);
|
||||
tenCorpDto.setMark_name("CONFINEDSPACE_ID");
|
||||
Response response = mqClient.sendDelayQueue(tenCorpDto);
|
||||
if (!"succeed".equals(response.getResult()) || !"0".equals(response.getCode())){
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
System.out.println("amazing:!!!!!"+JSONObject.toJSONString(response));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -454,7 +860,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -504,7 +910,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
//
|
||||
// String ffile = DateUtil.getDays();
|
||||
// String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
// smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
//
|
||||
// pd2.put("AUDIT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
// pd2.put("AUDIT_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -548,7 +954,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
//
|
||||
// String ffile = DateUtil.getDays();
|
||||
// String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
// smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
//
|
||||
// pd2.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
// pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -564,7 +970,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
//
|
||||
// String ffile = DateUtil.getDays();
|
||||
// String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
// Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
// smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
//
|
||||
// pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
// pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -581,7 +987,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("APPROVE_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("APPROVE_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -621,25 +1027,25 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
paramsList.add(params4);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
|
||||
// 发短信
|
||||
PageData mes1 = new PageData();
|
||||
mes1.put("RECEIVER_ID", pd2.get("ANALYZE_USER_ID"));// 收信人userid
|
||||
mes1.put("templateCode", "YX_QT");// 短信模板编码
|
||||
mes1.put("SMSCode", "SMS_223540753");// 短信模板编码
|
||||
mes1.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList1 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params5 = new PageData();
|
||||
params5.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params5.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList1.add(params5);
|
||||
// 第2个参数
|
||||
PageData params6 = new PageData();
|
||||
params6.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params6.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList1.add(params6);
|
||||
sendMessageUtil.sendMessages(mes1, paramsList1);
|
||||
// // 发短信
|
||||
// PageData mes1 = new PageData();
|
||||
// mes1.put("RECEIVER_ID", pd2.get("ANALYZE_USER_ID"));// 收信人userid
|
||||
// mes1.put("templateCode", "YX_QT");// 短信模板编码
|
||||
// mes1.put("SMSCode", "SMS_223540753");// 短信模板编码
|
||||
// mes1.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// // 参数集合
|
||||
// List<PageData> paramsList1 = new ArrayList<PageData>();
|
||||
// // 第1个参数
|
||||
// PageData params5 = new PageData();
|
||||
// params5.put("name", "params1");// 存入短信模板中的参数名称
|
||||
// params5.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
// paramsList1.add(params5);
|
||||
// // 第2个参数
|
||||
// PageData params6 = new PageData();
|
||||
// params6.put("name", "params2");// 存入短信模板中的参数名称
|
||||
// params6.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
// paramsList1.add(params6);
|
||||
// sendMessageUtil.sendMessages(mes1, paramsList1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -649,7 +1055,7 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||
|
||||
pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
|
||||
|
@ -861,6 +1267,25 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/gasEdit")
|
||||
@ResponseBody
|
||||
public Object gasEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = GFconfinedspaceGasService.gasEdit(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
@ -936,6 +1361,9 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
pd = GFconfinedspaceService.findById(pd); //根据ID读取
|
||||
map.put("measuresList", GFconfinedspaceService.listAllMeasures(pd));
|
||||
map.put("gasList", GFconfinedspaceGasService.listAll(pd));
|
||||
map.put("imgList",confinedspaceacceptuserService.findByIds(pd));
|
||||
map.put("imgList1",confinedspaceacceptuserService.findById(pd));
|
||||
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
@ -987,7 +1415,9 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("CONFINEDSPACEGAS_ID", this.get32UUID()); //主键
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
GFconfinedspaceGasService.save(pd);
|
||||
confinedspacegaswhService.edittime(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,17 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceGasWHService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
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 org.springframework.web.servlet.ModelAndView;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -39,14 +43,21 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspacegaswhService.findById(pd);
|
||||
if(pd2 != null && pd2.size()>0){
|
||||
GFconfinedspacegaswhService.edit(pd);
|
||||
}else{
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CONFINEDSPACEGASWH_ID", this.get32UUID()); //主键
|
||||
GFconfinedspacegaswhService.save(pd);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
|
@ -72,6 +83,7 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
GFconfinedspacegaswhService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.zcloud.controller.gf;
|
|||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceAcceptUserService;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceGasService;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceGasWHService;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceService;
|
||||
|
@ -38,6 +39,10 @@ public class GFConfinedSpaceController extends BaseController {
|
|||
private GFConfinedSpaceGasService GFconfinedspaceGasService;
|
||||
@Resource
|
||||
private GFConfinedSpaceGasWHService GFconfinedspacegaswhService;
|
||||
@Autowired
|
||||
private GFConfinedSpaceService confinedspaceService;
|
||||
@Autowired
|
||||
private GFConfinedSpaceAcceptUserService confinedspaceacceptuserService;
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -57,7 +62,7 @@ public class GFConfinedSpaceController extends BaseController {
|
|||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
|
@ -135,6 +140,8 @@ public class GFConfinedSpaceController extends BaseController {
|
|||
pd = GFconfinedspaceService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("measuresList", GFconfinedspaceService.listAllMeasures(pd));
|
||||
map.put("imgList",confinedspaceacceptuserService.findByIds(pd));
|
||||
map.put("imgList1",confinedspaceacceptuserService.findById(pd));
|
||||
map.put("gasList", GFconfinedspaceGasService.listAll(pd));
|
||||
map.put("gas", GFconfinedspacegaswhService.findById(pd));
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.zcloud.mapper.datasource.gf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:图片管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface GFConfinedSpaceAcceptUserMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteList(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> findById(PageData pd);
|
||||
List<PageData> findByIds(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
List<PageData> listAllByIds(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -49,6 +49,8 @@ public interface GFConfinedSpaceGasMapper{
|
|||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
PageData gasEdit(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
|
|
|
@ -30,7 +30,7 @@ public interface GFConfinedSpaceGasWHMapper{
|
|||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
void edittime(PageData pd);
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
|
|
@ -25,6 +25,21 @@ public interface GFConfinedSpaceMapper{
|
|||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
void cancel(PageData pd);
|
||||
|
||||
PageData checkno(PageData pd);
|
||||
|
||||
|
||||
void editSpecialwork(PageData pd);
|
||||
void editSpecialwork1(PageData pd);
|
||||
void editSpecialwork2(PageData pd);
|
||||
void editSpecialwork3(PageData pd);
|
||||
void editSpecialwork4(PageData pd);
|
||||
void editSpecialwork5(PageData pd);
|
||||
void editSpecialwork6(PageData pd);
|
||||
void editSpecialwork7(PageData pd);
|
||||
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.zcloud.service.gf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:图片管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface GFConfinedSpaceAcceptUserService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteList(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> findById(PageData pd)throws Exception;
|
||||
public List<PageData> findByIds(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public List<PageData> listAllByIds(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -48,6 +48,7 @@ public interface GFConfinedSpaceGasService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
public PageData gasEdit(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
|
|
|
@ -30,7 +30,7 @@ public interface GFConfinedSpaceGasWHService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
public void edittime(PageData pd)throws Exception;
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
|
|
@ -25,6 +25,19 @@ public interface GFConfinedSpaceService{
|
|||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
public void cancel(PageData pd)throws Exception;
|
||||
|
||||
public PageData checkno(PageData pd)throws Exception;
|
||||
|
||||
public void editSpecialwork(PageData pd)throws Exception;
|
||||
public void editSpecialwork1(PageData pd)throws Exception;
|
||||
public void editSpecialwork2(PageData pd)throws Exception;
|
||||
public void editSpecialwork3(PageData pd)throws Exception;
|
||||
public void editSpecialwork4(PageData pd)throws Exception;
|
||||
public void editSpecialwork5(PageData pd)throws Exception;
|
||||
public void editSpecialwork6(PageData pd)throws Exception;
|
||||
public void editSpecialwork7(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
package com.zcloud.service.gf.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.gf.GFConfinedSpaceAcceptUserMapper;
|
||||
import com.zcloud.service.gf.GFConfinedSpaceAcceptUserService;
|
||||
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-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class GFConfinedSpaceAcceptUserServiceImpl implements GFConfinedSpaceAcceptUserService {
|
||||
|
||||
@Autowired
|
||||
private GFConfinedSpaceAcceptUserMapper confinedspaceacceptuserMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
confinedspaceacceptuserMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
confinedspaceacceptuserMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteList(PageData pd)throws Exception{
|
||||
confinedspaceacceptuserMapper.deleteList(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
confinedspaceacceptuserMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return confinedspaceacceptuserMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return confinedspaceacceptuserMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> findById(PageData pd)throws Exception{
|
||||
return confinedspaceacceptuserMapper.findById(pd);
|
||||
}
|
||||
public List<PageData> findByIds(PageData pd)throws Exception{
|
||||
return confinedspaceacceptuserMapper.findByIds(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
confinedspaceacceptuserMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllByIds(PageData pd)throws Exception{
|
||||
return confinedspaceacceptuserMapper.listAllByIds(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -70,7 +70,9 @@ public class GFConfinedSpaceGasServiceImpl implements GFConfinedSpaceGasService
|
|||
public PageData findById(PageData pd)throws Exception{
|
||||
return GFconfinedspacegasMapper.findById(pd);
|
||||
}
|
||||
|
||||
public PageData gasEdit(PageData pd)throws Exception{
|
||||
return GFconfinedspacegasMapper.gasEdit(pd);
|
||||
}
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
|
|
|
@ -46,7 +46,9 @@ public class GFConfinedSpaceGasWHServiceImpl implements GFConfinedSpaceGasWHServ
|
|||
public void edit(PageData pd)throws Exception{
|
||||
GFconfinedspacegaswhMapper.edit(pd);
|
||||
}
|
||||
|
||||
public void edittime(PageData pd)throws Exception{
|
||||
GFconfinedspacegaswhMapper.edittime(pd);
|
||||
}
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
|
|
@ -39,6 +39,41 @@ public class GFConfinedSpaceServiceImpl implements GFConfinedSpaceService {
|
|||
GFconfinedspaceMapper.delete(pd);
|
||||
}
|
||||
|
||||
public void cancel(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.cancel(pd);
|
||||
}
|
||||
|
||||
public PageData checkno(PageData pd)throws Exception{
|
||||
return GFconfinedspaceMapper.checkno(pd);
|
||||
}
|
||||
|
||||
public void editSpecialwork(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork(pd);
|
||||
}
|
||||
public void editSpecialwork1(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork1(pd);
|
||||
}
|
||||
public void editSpecialwork2(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork2(pd);
|
||||
}
|
||||
public void editSpecialwork3(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork3(pd);
|
||||
}
|
||||
public void editSpecialwork4(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork4(pd);
|
||||
}
|
||||
public void editSpecialwork5(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork5(pd);
|
||||
}
|
||||
public void editSpecialwork6(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork6(pd);
|
||||
}
|
||||
public void editSpecialwork7(PageData pd)throws Exception{
|
||||
GFconfinedspaceMapper.editSpecialwork7(pd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
|
|
@ -0,0 +1,221 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.gf.GFConfinedSpaceAcceptUserMapper">
|
||||
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
GF_CONFINEDSPACE_ACCEPTUSER
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<sql id="Field">
|
||||
f.ACCEPT_CONFESS_ID,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
f.ACCEPT_CONFESS_USER_ID,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
f.ISSELF,
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ACCEPT_USER_SIGNER_PATH,
|
||||
f.ACCEPT_USER_SIGNER_TIME,
|
||||
f.ACCEPT_DEPARTMENT_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
ACCEPT_CONFESS_ID,
|
||||
CONFINEDSPACE_ID,
|
||||
CORPINFO_ID,
|
||||
ISDELETE,
|
||||
OPERATTIME,
|
||||
OPERATOR,
|
||||
ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
ACCEPT_CONFESS_USER_ID,
|
||||
ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
ISSELF,
|
||||
ACCEPT_USER_ID,
|
||||
ACCEPT_USER_SIGNER_PATH,
|
||||
ACCEPT_USER_SIGNER_TIME,
|
||||
ACCEPT_DEPARTMENT_ID
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{ACCEPT_CONFESS_ID},
|
||||
#{CONFINEDSPACE_ID},
|
||||
#{CORPINFO_ID},
|
||||
#{ISDELETE},
|
||||
#{OPERATTIME},
|
||||
#{OPERATOR},
|
||||
#{ACCEPT_CONFESS_DEPARTMENT_ID},
|
||||
#{ACCEPT_CONFESS_USER_ID},
|
||||
#{ACCEPT_CONFESS_USER_SIGNER_PATH},
|
||||
#{ACCEPT_CONFESS_USER_SIGNER_TIME},
|
||||
#{ISSELF},
|
||||
#{ACCEPT_USER_ID},
|
||||
#{ACCEPT_USER_SIGNER_PATH},
|
||||
#{ACCEPT_USER_SIGNER_TIME},
|
||||
#{ACCEPT_DEPARTMENT_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID},
|
||||
CONFINEDSPACE_ID = #{CONFINEDSPACE_ID},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID},
|
||||
ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID},
|
||||
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
|
||||
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
|
||||
ISSELF = #{ISSELF},
|
||||
ACCEPT_USER_ID = #{ACCEPT_USER_ID},
|
||||
ACCEPT_USER_SIGNER_PATH = #{ACCEPT_USER_SIGNER_PATH},
|
||||
ACCEPT_USER_SIGNER_TIME = #{ACCEPT_USER_SIGNER_TIME},
|
||||
ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}
|
||||
where
|
||||
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.ACCEPT_CONFESS_ID,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ACCEPT_USER_SIGNER_PATH,
|
||||
f.ACCEPT_USER_SIGNER_TIME,
|
||||
f.ACCEPT_DEPARTMENT_ID
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_USER_ID = #{ACCEPT_USER_ID}
|
||||
order by f.ACCEPT_USER_SIGNER_TIME ASC
|
||||
</select>
|
||||
<select id="findByIds" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.ACCEPT_CONFESS_ID,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
f.ACCEPT_CONFESS_USER_ID,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_TIME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}
|
||||
order by f.ACCEPT_CONFESS_USER_SIGNER_TIME ASC
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
<if test="ISSELF != null and ISSELF != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
f.ISSELF=#{ISSELF}
|
||||
</if>
|
||||
<if test="CONFINEDSPACE_ID != null and CONFINEDSPACE_ID != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
f.CONFINEDSPACE_ID=#{CONFINEDSPACE_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
ACCEPT_CONFESS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listAllByIds" parameterType="String" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
|
||||
and f.ACCEPT_CONFESS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -115,8 +115,7 @@
|
|||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CONFINEDSPACEGAS_ID = #{CONFINEDSPACEGAS_ID}
|
||||
where f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
|
@ -149,6 +148,15 @@
|
|||
ORDER BY f.ANALYZE_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="gasEdit" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CONFINEDSPACEGAS_ID = #{CONFINEDSPACEGAS_ID}
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
f.GAS_STANDARD3,
|
||||
f.GAS_NAME4,
|
||||
f.GAS_STANDARD4,
|
||||
f.CONFINEDSPACEGASWH_ID
|
||||
f.CONFINEDSPACEGASWH_ID,
|
||||
f.OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -37,7 +38,8 @@
|
|||
GAS_STANDARD3,
|
||||
GAS_NAME4,
|
||||
GAS_STANDARD4,
|
||||
CONFINEDSPACEGASWH_ID
|
||||
CONFINEDSPACEGASWH_ID,
|
||||
OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -51,7 +53,8 @@
|
|||
#{GAS_STANDARD3},
|
||||
#{GAS_NAME4},
|
||||
#{GAS_STANDARD4},
|
||||
#{CONFINEDSPACEGASWH_ID}
|
||||
#{CONFINEDSPACEGASWH_ID},
|
||||
#{OPERATTIME}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -89,11 +92,22 @@
|
|||
GAS_STANDARD3 = #{GAS_STANDARD3},
|
||||
GAS_NAME4 = #{GAS_NAME4},
|
||||
GAS_STANDARD4 = #{GAS_STANDARD4},
|
||||
CONFINEDSPACEGASWH_ID = CONFINEDSPACEGASWH_ID
|
||||
CONFINEDSPACEGASWH_ID = CONFINEDSPACEGASWH_ID,
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
CONFINEDSPACEGASWH_ID = #{CONFINEDSPACEGASWH_ID}
|
||||
</update>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edittime" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
|
|
|
@ -226,6 +226,135 @@
|
|||
CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
|
||||
</delete>
|
||||
|
||||
<update id="cancel" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
APPLY_STATUS = #{APPLY_STATUS}
|
||||
where
|
||||
CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
|
||||
</update>
|
||||
|
||||
<select id="checkno" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
CONCAT_WS( " ", "受限空间作业", f.CHECK_NO ) AS CHECK_NO,
|
||||
f.CONFINEDSPACE_ID AS ID
|
||||
FROM
|
||||
GF_CONFINEDSPACE f
|
||||
WHERE
|
||||
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
|
||||
AND f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
<!-- <update id="editSpecialwork" parameterType = "pd">-->
|
||||
<!-- update-->
|
||||
<!-- bus_confinedspace f, bus_blindboard b, bus_electricity e,bus_hoisting g,bus_breakground a,bus_cutroad d,bus_highwork w,bus_hotwork h-->
|
||||
<!-- set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- b.SPECIAL_WORK = REPLACE(b.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- g.SPECIAL_WORK = REPLACE(g.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- e.SPECIAL_WORK = REPLACE(e.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- a.SPECIAL_WORK = REPLACE(a.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- w.SPECIAL_WORK = REPLACE(w.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- d.SPECIAL_WORK = REPLACE(d.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')),-->
|
||||
<!-- h.SPECIAL_WORK = REPLACE(h.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))-->
|
||||
<!-- WHERE f.CORPINFO_ID = w.CORPINFO_ID and a.CORPINFO_ID = f.CORPINFO_ID and b.CORPINFO_ID = f.CORPINFO_ID-->
|
||||
<!-- and d.CORPINFO_ID = f.CORPINFO_ID and e.CORPINFO_ID = f.CORPINFO_ID and g.CORPINFO_ID = f.CORPINFO_ID and h.CORPINFO_ID = f.CORPINFO_ID-->
|
||||
<!-- and f.ISDELETE = '0' and b.ISDELETE = '0' and w.ISDELETE = '0' and d.ISDELETE = '0' and a.ISDELETE = '0' and g.ISDELETE = '0' and w.ISDELETE = '0' and h.ISDELETE = '0'-->
|
||||
<!-- AND f.APPLY_STATUS > 0 AND b.APPLY_STATUS > 0 AND e.APPLY_STATUS > 0 AND d.APPLY_STATUS > 0 AND a.APPLY_STATUS > 0 AND g.APPLY_STATUS > 0 AND w.APPLY_STATUS > 0 AND h.APPLY_STATUS > 0-->
|
||||
<!-- AND f.CORPINFO_ID = #{CORPINFO_ID}-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, a.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, b.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, d.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, e.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, w.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, g.SPECIAL_WORK ) )-->
|
||||
<!-- and ( FIND_IN_SET( #{CHECK_NO}, h.SPECIAL_WORK ) )-->
|
||||
|
||||
<!-- </update>-->
|
||||
|
||||
|
||||
<update id="editSpecialwork" parameterType = "pd">
|
||||
update
|
||||
GF_CONFINEDSPACE f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork1" parameterType = "pd">
|
||||
update
|
||||
GF_blindboard f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork2" parameterType = "pd">
|
||||
update
|
||||
GF_electricity f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork3" parameterType = "pd">
|
||||
update
|
||||
GF_hoisting f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork4" parameterType = "pd">
|
||||
update
|
||||
GF_breakground f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork5" parameterType = "pd">
|
||||
update
|
||||
GF_cutroad f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork6" parameterType = "pd">
|
||||
update
|
||||
GF_highwork f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
<update id="editSpecialwork7" parameterType = "pd">
|
||||
update
|
||||
GF_hotwork f
|
||||
set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)'))
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS > 0
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) )
|
||||
</update>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
|
@ -306,8 +435,8 @@
|
|||
f.OPERATOR,
|
||||
f.CHECK_NO,
|
||||
f.WORK_CONTENT,
|
||||
f.WORK_START_DATE,
|
||||
f.WORK_END_DATE,
|
||||
replace(f.WORK_START_DATE,'-','/') as WORK_START_DATE,
|
||||
replace(f.WORK_END_DATE,'-','/') as WORK_END_DATE,
|
||||
f.CONFIRM_DEPARTMENT_ID,
|
||||
f.CONFIRM_USER_ID,
|
||||
f.CONFIRM_USER_SIGNER_PATH,
|
||||
|
@ -335,7 +464,7 @@
|
|||
f.BELONG_CORP,
|
||||
f.LIMITSPACE_ID,
|
||||
f.WORK_USER,
|
||||
f.SPECIAL_WORK,
|
||||
IFNULL(f.SPECIAL_WORK,'无') as SPECIAL_WORK,
|
||||
f.RISK_IDENTIFICATION,
|
||||
f.MEDIUM_NAME,
|
||||
f.EDUCATE_USER,
|
||||
|
@ -358,6 +487,10 @@
|
|||
f.ACCEPT_CONFESS_USER_ID,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
|
||||
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
(SELECT replace(a.ANALYZE_TIME,'-','/') from GF_CONFINEDSPACEGAS a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ANALYZE_TIME DESC LIMIT 1) as ANALYZE_TIME,
|
||||
sp.NAME as LIMITSPACE_NAME,
|
||||
|
||||
ad.NAME as APPLY_DEPARTMENT_NAME,
|
||||
|
@ -388,6 +521,7 @@
|
|||
aacu.NAME as ACCEPT_CONFESS_USER_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join GF_confinedspacegaswh b on b.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
left join GF_LIMITSPACE sp on sp.LIMITSPACE_ID=f.LIMITSPACE_ID
|
||||
|
||||
left join OA_DEPARTMENT aac on aac.DEPARTMENT_ID = f.ACCEPT_CONFESS_DEPARTMENT_ID
|
||||
|
@ -423,7 +557,74 @@
|
|||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.CREATTIME,
|
||||
f.CREATOR,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.CHECK_NO,
|
||||
f.WORK_CONTENT,
|
||||
f.WORK_START_DATE,
|
||||
f.WORK_END_DATE,
|
||||
f.CONFIRM_DEPARTMENT_ID,
|
||||
f.CONFIRM_USER_ID,
|
||||
f.CONFIRM_USER_SIGNER_PATH,
|
||||
f.CONFIRM_USER_SIGNER_TIME,
|
||||
f.AUDIT_DEPARTMENT_ID,
|
||||
f.AUDIT_USER_ID,
|
||||
f.AUDIT_USER_SIGNER_PATH,
|
||||
f.AUDIT_USER_SIGNER_TIME,
|
||||
f.APPROVE_DEPARTMENT_ID,
|
||||
f.APPROVE_USER_ID,
|
||||
f.APPROVE_USER_SIGNER_PATH,
|
||||
f.APPROVE_USER_SIGNER_TIME,
|
||||
f.APPLY_STATUS,
|
||||
f.CONFIRM_CONTENT,
|
||||
f.AUDIT_CONTENT,
|
||||
f.APPROVE_CONTENT,
|
||||
f.OTHER_PROTECTIVE_MEASURES,
|
||||
f.ACCEPT_DEPARTMENT_ID,
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ACCEPT_USER_SIGNER_PATH,
|
||||
f.ACCEPT_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONTENT,
|
||||
f.APPLY_DEPARTMENT_ID,
|
||||
f.APPLY_USER_ID,
|
||||
f.BELONG_CORP,
|
||||
f.LIMITSPACE_ID,
|
||||
f.WORK_USER,
|
||||
f.SPECIAL_WORK,
|
||||
f.RISK_IDENTIFICATION,
|
||||
f.MEDIUM_NAME,
|
||||
f.EDUCATE_USER,
|
||||
f.ANALYZE_DEPARTMENT_ID,
|
||||
f.ANALYZE_USER_ID,
|
||||
f.GUARDIAN_DEPARTMENT_ID,
|
||||
f.GUARDIAN_USER_ID,
|
||||
f.GUARDIAN_USER_SIGNER_PATH,
|
||||
f.GUARDIAN_USER_SIGNER_TIME,
|
||||
f.GUARDIAN_CONTENT,
|
||||
f.CONFESS_USER,
|
||||
f.ACCEPT_CONFESS_USER,
|
||||
f.GUARDIAN_USER,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CONFESS_DEPARTMENT_ID,
|
||||
f.CONFESS_USER_ID,
|
||||
f.CONFESS_USER_SIGNER_PATH,
|
||||
f.CONFESS_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
f.ACCEPT_CONFESS_USER_ID,
|
||||
IFNULL((SELECT a.ANALYZE_TIME from GF_confinedspacegas a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ANALYZE_TIME DESC LIMIT 1),'无') as ANALYZE_TIME,
|
||||
|
||||
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CONFINEDSPACE_ACCEPTUSER a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
|
||||
sp.NAME as LIMITSPACE_NAME,
|
||||
|
||||
ad.NAME as APPLY_DEPARTMENT_NAME,
|
||||
|
@ -455,6 +656,7 @@
|
|||
aacu.NAME as ACCEPT_CONFESS_USER_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join GF_confinedspacegaswh b on b.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
left join GF_LIMITSPACE sp on sp.LIMITSPACE_ID=f.LIMITSPACE_ID
|
||||
left join OA_DEPARTMENT aac on aac.DEPARTMENT_ID = f.ACCEPT_CONFESS_DEPARTMENT_ID
|
||||
left join SYS_USER aacu on aacu.USER_ID = f.ACCEPT_CONFESS_USER_ID
|
||||
|
@ -486,7 +688,9 @@
|
|||
<if test="pd.APPLY_STATUS != null and pd.APPLY_STATUS != ''">
|
||||
and f.APPLY_STATUS = #{pd.APPLY_STATUS}
|
||||
</if>
|
||||
|
||||
<if test="pd.IS_GAS != null and pd.IS_GAS != ''">
|
||||
and f.APPLY_STATUS in ('1','4','5')
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
|
@ -583,7 +787,73 @@
|
|||
|
||||
<select id="jhdatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.CREATTIME,
|
||||
f.CREATOR,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.CHECK_NO,
|
||||
f.WORK_CONTENT,
|
||||
f.WORK_START_DATE,
|
||||
f.WORK_END_DATE,
|
||||
f.CONFIRM_DEPARTMENT_ID,
|
||||
f.CONFIRM_USER_ID,
|
||||
f.CONFIRM_USER_SIGNER_PATH,
|
||||
f.CONFIRM_USER_SIGNER_TIME,
|
||||
f.AUDIT_DEPARTMENT_ID,
|
||||
f.AUDIT_USER_ID,
|
||||
f.AUDIT_USER_SIGNER_PATH,
|
||||
f.AUDIT_USER_SIGNER_TIME,
|
||||
f.APPROVE_DEPARTMENT_ID,
|
||||
f.APPROVE_USER_ID,
|
||||
f.APPROVE_USER_SIGNER_PATH,
|
||||
f.APPROVE_USER_SIGNER_TIME,
|
||||
f.APPLY_STATUS,
|
||||
f.CONFIRM_CONTENT,
|
||||
f.AUDIT_CONTENT,
|
||||
f.APPROVE_CONTENT,
|
||||
f.OTHER_PROTECTIVE_MEASURES,
|
||||
f.ACCEPT_DEPARTMENT_ID,
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ACCEPT_USER_SIGNER_PATH,
|
||||
f.ACCEPT_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONTENT,
|
||||
f.APPLY_DEPARTMENT_ID,
|
||||
f.APPLY_USER_ID,
|
||||
f.BELONG_CORP,
|
||||
f.LIMITSPACE_ID,
|
||||
f.WORK_USER,
|
||||
f.SPECIAL_WORK,
|
||||
f.RISK_IDENTIFICATION,
|
||||
f.MEDIUM_NAME,
|
||||
f.EDUCATE_USER,
|
||||
f.ANALYZE_DEPARTMENT_ID,
|
||||
f.ANALYZE_USER_ID,
|
||||
f.GUARDIAN_DEPARTMENT_ID,
|
||||
f.GUARDIAN_USER_ID,
|
||||
f.GUARDIAN_USER_SIGNER_PATH,
|
||||
f.GUARDIAN_USER_SIGNER_TIME,
|
||||
f.GUARDIAN_CONTENT,
|
||||
f.CONFESS_USER,
|
||||
f.ACCEPT_CONFESS_USER,
|
||||
f.GUARDIAN_USER,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CONFESS_DEPARTMENT_ID,
|
||||
f.CONFESS_USER_ID,
|
||||
f.CONFESS_USER_SIGNER_PATH,
|
||||
f.CONFESS_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
f.ACCEPT_CONFESS_USER_ID,
|
||||
IFNULL((SELECT replace(a.ANALYZE_TIME,'-','/') from GF_confinedspacegas a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ANALYZE_TIME DESC LIMIT 1),'无') as ANALYZE_TIME,
|
||||
|
||||
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CONFINEDSPACE_ACCEPTUSER a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
sp.NAME as LIMITSPACE_NAME,
|
||||
|
||||
ad.NAME as APPLY_DEPARTMENT_NAME,
|
||||
|
@ -642,7 +912,7 @@
|
|||
|
||||
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
|
||||
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
|
||||
where f.ISDELETE = '0' and f.APPLY_STATUS < 6 and f.GUARDIAN_USER_SIGNER_TIME is null and f.APPLY_STATUS > 0
|
||||
where f.APPLY_STATUS = '5' and f.GUARDIAN_USER_SIGNER_TIME is null and f.APPLY_STATUS > 0
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
|
@ -739,7 +1009,73 @@
|
|||
|
||||
<select id="aqdatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.CREATTIME,
|
||||
f.CREATOR,
|
||||
f.OPERATTIME,
|
||||
f.OPERATOR,
|
||||
f.CHECK_NO,
|
||||
f.WORK_CONTENT,
|
||||
f.WORK_START_DATE,
|
||||
f.WORK_END_DATE,
|
||||
f.CONFIRM_DEPARTMENT_ID,
|
||||
f.CONFIRM_USER_ID,
|
||||
f.CONFIRM_USER_SIGNER_PATH,
|
||||
f.CONFIRM_USER_SIGNER_TIME,
|
||||
f.AUDIT_DEPARTMENT_ID,
|
||||
f.AUDIT_USER_ID,
|
||||
f.AUDIT_USER_SIGNER_PATH,
|
||||
f.AUDIT_USER_SIGNER_TIME,
|
||||
f.APPROVE_DEPARTMENT_ID,
|
||||
f.APPROVE_USER_ID,
|
||||
f.APPROVE_USER_SIGNER_PATH,
|
||||
f.APPROVE_USER_SIGNER_TIME,
|
||||
f.APPLY_STATUS,
|
||||
f.CONFIRM_CONTENT,
|
||||
f.AUDIT_CONTENT,
|
||||
f.APPROVE_CONTENT,
|
||||
f.OTHER_PROTECTIVE_MEASURES,
|
||||
f.ACCEPT_DEPARTMENT_ID,
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ACCEPT_USER_SIGNER_PATH,
|
||||
f.ACCEPT_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONTENT,
|
||||
f.APPLY_DEPARTMENT_ID,
|
||||
f.APPLY_USER_ID,
|
||||
f.BELONG_CORP,
|
||||
f.LIMITSPACE_ID,
|
||||
f.WORK_USER,
|
||||
f.SPECIAL_WORK,
|
||||
f.RISK_IDENTIFICATION,
|
||||
f.MEDIUM_NAME,
|
||||
f.EDUCATE_USER,
|
||||
f.ANALYZE_DEPARTMENT_ID,
|
||||
f.ANALYZE_USER_ID,
|
||||
f.GUARDIAN_DEPARTMENT_ID,
|
||||
f.GUARDIAN_USER_ID,
|
||||
f.GUARDIAN_USER_SIGNER_PATH,
|
||||
f.GUARDIAN_USER_SIGNER_TIME,
|
||||
f.GUARDIAN_CONTENT,
|
||||
f.CONFESS_USER,
|
||||
f.ACCEPT_CONFESS_USER,
|
||||
f.GUARDIAN_USER,
|
||||
f.CONFINEDSPACE_ID,
|
||||
f.CONFESS_DEPARTMENT_ID,
|
||||
f.CONFESS_USER_ID,
|
||||
f.CONFESS_USER_SIGNER_PATH,
|
||||
f.CONFESS_USER_SIGNER_TIME,
|
||||
f.ACCEPT_CONFESS_DEPARTMENT_ID,
|
||||
f.ACCEPT_CONFESS_USER_ID,
|
||||
IFNULL((SELECT a.ANALYZE_TIME from gf_confinedspacegas a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ANALYZE_TIME DESC LIMIT 1),'无') as ANALYZE_TIME,
|
||||
|
||||
(SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from GF_CONFINEDSPACE_ACCEPTUSER a where a.ISDELETE = '0'
|
||||
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
|
||||
ORDER BY
|
||||
a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME,
|
||||
sp.NAME as LIMITSPACE_NAME,
|
||||
|
||||
ad.NAME as APPLY_DEPARTMENT_NAME,
|
||||
|
@ -954,7 +1290,10 @@
|
|||
|
||||
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
|
||||
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
|
||||
where f.ISDELETE = '0' and f.APPLY_STATUS < 6 and f.ACCEPT_CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS > 0
|
||||
where f.ISDELETE = '0' and f.APPLY_STATUS < 6
|
||||
and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID)
|
||||
|
||||
and f.APPLY_STATUS > 0
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
|
@ -1096,13 +1435,13 @@
|
|||
SELECT
|
||||
COUNT(CASE WHEN (f.APPLY_STATUS+0) < 1 AND f.CREATOR = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTBACK,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONFIRM_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTCONFIRM,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS < '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTGUARDIAN,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTGUARDIAN,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAUDIT,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAPPROVE,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTACCEPT,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS < '6' AND f.APPLY_STATUS > 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS < '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTCONFESS,
|
||||
COUNT(CASE WHEN f.APPLY_STATUS < '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and f.ACCEPT_CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS
|
||||
COUNT(CASE WHEN f.APPLY_STATUS < '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS
|
||||
FROM <include refid="tableName"></include> f
|
||||
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue