forked from integrated_whb/integrated_whb
安全环保检查相关bug优化
parent
e4e6942264
commit
d77838e897
|
@ -147,15 +147,15 @@ public class AppHiddenController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
// List<PageData> checkorHid = hiddenService.getCountByCheckorId(pd); // 根据人员id获取整改隐患信息 state 1 5
|
||||
List<PageData> checkorHid = hiddenService.getRiskStandardCountByCheckorId(pd); // 根据用户ID获取待验收隐患(app首页)
|
||||
List<PageData> checkorHid = hiddenService.getCountByCheckorId(pd); // 根据人员id获取整改隐患信息 state 1 5
|
||||
// List<PageData> checkorHid = hiddenService.getRiskStandardCountByCheckorId(pd); // 根据用户ID获取待验收隐患(app首页)
|
||||
for (int i = 0; i < checkorHid.size(); i++) {
|
||||
PageData che = checkorHid.get(i);
|
||||
if (null == che.get("STATE")) {
|
||||
continue;
|
||||
}
|
||||
// if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2
|
||||
if (che.get("STATE").equals("3")) {
|
||||
if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2
|
||||
// if (che.get("STATE").equals("3") && pd.getString("USER_ID").equals(che.get("CHECKOR"))) {
|
||||
dys++;
|
||||
}
|
||||
}
|
||||
|
@ -187,11 +187,9 @@ public class AppHiddenController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// List<PageData> creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息
|
||||
List<PageData> creatorHid = hiddenService.getRiskStandardCountByCreatorId(pd); // 根据用户ID获取发现隐患信息(app首页)
|
||||
List<PageData> creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息
|
||||
// List<PageData> creatorHid = hiddenService.getRiskStandardCountByCreatorId(pd); // 根据用户ID获取发现隐患信息(app首页)
|
||||
System.out.println(creatorHid);
|
||||
for (int i = 0; i < creatorHid.size(); i++) {
|
||||
PageData cre = creatorHid.get(i);
|
||||
if (null == cre.get("STATE")) {
|
||||
|
@ -203,9 +201,9 @@ public class AppHiddenController extends BaseController {
|
|||
if (cre.get("STATE").equals("4")) {
|
||||
yys++;
|
||||
}
|
||||
// if(cre.get("STATE").equals("3")) {
|
||||
// dys++;
|
||||
// }
|
||||
if(cre.get("STATE").equals("3")) {
|
||||
dys++;
|
||||
}
|
||||
if (cre.get("STATE").equals("-1")) {
|
||||
ycq++;
|
||||
}
|
||||
|
@ -1117,6 +1115,8 @@ public class AppHiddenController extends BaseController {
|
|||
corpinfo = corpinfoService.findById(pd);
|
||||
pd.put("STATE","2");
|
||||
pd.put("INVESTMENT_FUNDS",pd.getString("INVEST_FUNDS"));
|
||||
pd.put("CHECKOR",pd.getString("USER_ID"));
|
||||
pd.put("CHECKDEPT",pd.getString("DEPARTMENT_ID"));
|
||||
hiddenService.rectify(pd);
|
||||
|
||||
pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键
|
||||
|
@ -1290,7 +1290,10 @@ public class AppHiddenController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (pd.get("ISQUALIFIED").equals("1")) { //验收合格
|
||||
List<PageData> pd2 = (List<PageData>) this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息
|
||||
//List<PageData> pd2 = (List<PageData>) this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息
|
||||
PageData page = this.hiddenCheckService.findByHidden(pd);
|
||||
List<PageData> pd2 = new ArrayList<>();
|
||||
pd2.add(page);
|
||||
if(pd2.size()>0){
|
||||
for(PageData checklist: pd2){
|
||||
pd.put("STATUS", 1);
|
||||
|
@ -1374,7 +1377,7 @@ public class AppHiddenController extends BaseController {
|
|||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
Page page = new Page();
|
||||
|
@ -1406,8 +1409,11 @@ public class AppHiddenController extends BaseController {
|
|||
String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(ENDTIME))
|
||||
pd.put("ENDTIME", ENDTIME.trim());
|
||||
if (pd.get("isIndex") != null && Tools.notEmpty(pd.get("isIndex").toString())
|
||||
&& pd.get("isIndex").toString().equals("1")) {
|
||||
if ("undefined".equals(pd.getString("isIndex"))) {
|
||||
pd.put("isIndex", "");
|
||||
}
|
||||
if (pd.get("isIndex") != null && Tools.notEmpty(pd.get("isIndex").toString())
|
||||
&& "1".equals(pd.get("isIndex").toString())) {
|
||||
pd.put("SELF_USER_ID", pd.get("SELFUSERID"));
|
||||
}
|
||||
pd.put("ISMAIN", "0");
|
||||
|
@ -1503,7 +1509,10 @@ public class AppHiddenController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = hiddenService.findById(pd); // 根据ID读取
|
||||
if(pd.get("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){
|
||||
if(pd.getString("CONFIRM_USER")==null){
|
||||
pd.put("CONFIRM_USER","");
|
||||
}
|
||||
if(pd.getString("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){
|
||||
|
@ -1517,6 +1526,8 @@ public class AppHiddenController extends BaseController {
|
|||
List<PageData> hImgs = imgFilesService.listAll(pd2);// 隐患图片
|
||||
pd2.put("TYPE", 4);
|
||||
List<PageData> rImgs = imgFilesService.listAll(pd2);// 整改图片
|
||||
pd2.put("TYPE", 22);
|
||||
List<PageData> pImgs = imgFilesService.listAll(pd2);// 计划图片
|
||||
/*
|
||||
* pd2.put("TYPE",5); List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c
|
||||
*/ // 查询整改方案
|
||||
|
@ -1562,6 +1573,7 @@ public class AppHiddenController extends BaseController {
|
|||
map.put("hs", hs);
|
||||
map.put("hImgs", hImgs);
|
||||
map.put("rImgs", rImgs);
|
||||
map.put("pImgs", pImgs);
|
||||
map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"),"102"));// 隐患视频
|
||||
// map.put("cImgs", cImgs);
|
||||
map.put("sImgs", sImgs);
|
||||
|
@ -1596,7 +1608,6 @@ public class AppHiddenController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("HIDDENLEVEL", "hiddenLevel0001");// 一般隐患
|
||||
List<PageData> nhds = hiddenService.hiddenStatisticsByDay(pd);
|
||||
System.out.println(nhds.toString());
|
||||
pd.put("HIDDENLEVEL", "hiddenLevel0002");// 一般隐患
|
||||
List<PageData> zhds = hiddenService.hiddenStatisticsByDay(pd);
|
||||
|
||||
|
@ -1762,7 +1773,6 @@ public class AppHiddenController extends BaseController {
|
|||
map.put("msg", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
PageData editHidden = new PageData();
|
||||
if("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL"))){ // 如果是忽略隐患
|
||||
|
@ -1781,8 +1791,9 @@ public class AppHiddenController extends BaseController {
|
|||
editHidden.put("RECTIFICATIONDEADLINE",pd.get("RECTIFICATIONDEADLINE")); // 整改期限
|
||||
editHidden.put("HIDDENLEVEL",pd.get("HIDDENLEVEL")); // 隐患级别
|
||||
editHidden.put("HIDDEN_ID",pd.get("HIDDEN_ID")); // 隐患id
|
||||
editHidden.put("RECTIFICATIONTYPE",pd.get("RECTIFICATIONTYPE"));
|
||||
PageData hidden = hiddenService.findById(pd);
|
||||
if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){
|
||||
if("1".equals(hidden.get("RECTIFICATIONTYPE")+"")){
|
||||
editHidden.put("STATE","4");
|
||||
}
|
||||
PageData exaPd = new PageData(); // 添加隐患确认信息
|
||||
|
@ -1796,7 +1807,7 @@ public class AppHiddenController extends BaseController {
|
|||
exaPd.put("CREATOR", pd.getString("loginUserId"));
|
||||
exaPd.put("OPERATOR",pd.getString("loginUserId"));
|
||||
hiddenExamineService.saveApp(exaPd);
|
||||
if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){ //确认时判断是否是立即整改
|
||||
if("1".equals(hidden.get("RECTIFICATIONTYPE")+"")){ //确认时判断是否是立即整改
|
||||
if(pd.getString("isTrue").equals("1")){
|
||||
editHidden.put("STATE","4");
|
||||
editHidden.put("CHECKOR",hidden.getString("CREATOR"));
|
||||
|
@ -1804,7 +1815,22 @@ public class AppHiddenController extends BaseController {
|
|||
editHidden.put("STATE","1");
|
||||
editHidden.put("RECTIFICATIONTYPE","2");
|
||||
}
|
||||
|
||||
}
|
||||
pd.put("STATE", pd.getString("HIDDEN_STATUS"));
|
||||
List<PageData> list = hiddenService.listOtherNotAssign(pd);
|
||||
PageData inspection = new PageData();
|
||||
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
|
||||
inspection.put("OPERATOR", pd.getString("OPERATOR"));
|
||||
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
if ("-2".equals(pd.getString("HIDDEN_STATUS"))) {
|
||||
pd.put("ISCONFIRM", "0"); //
|
||||
pd.put("CONFIRM_TIME",DateUtil.date2Str(new Date()));
|
||||
if (list.size() == 0) {
|
||||
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
|
||||
} else {
|
||||
inspection.put("INSPECTION_STATUS", "4"); // 指派中
|
||||
}
|
||||
safetyenvironmentalService.editStatus(inspection);
|
||||
}
|
||||
hiddenService.confirmHidden(editHidden); // 隐患确认
|
||||
if(Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")){
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.zcloud.service.system.DepartmentService;
|
|||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.crypto.hash.Md5Hash;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -25,6 +26,9 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.sun.xml.internal.ws.spi.db.BindingContextFactory.LOGGER;
|
||||
|
||||
/**
|
||||
* 说明:安全环保检查
|
||||
|
@ -148,7 +152,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = safetyenvironmentalService.findFormById(pd); //根据ID读取
|
||||
pd = safetyenvironmentalService.findFormById(pd);//根据ID读取
|
||||
safetyenvironmentalService.departmentUtil(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
@ -502,10 +506,16 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
|||
if ("4".equals(safety.getString("order"))) {
|
||||
// 2、2 隐患发现人状态
|
||||
condition.put("FOREIGN_ID", condition.getString("INSPECTION_ID"));
|
||||
List<PageData> hiddens = hiddenService.findByKey(condition);
|
||||
List<PageData> hiddenList = hiddenService.findByKey(condition);
|
||||
condition.put("HIDDEN_ID", hiddenList.get(0).getString("HIDDEN_ID"));
|
||||
List<PageData> hiddens = hiddenService.findByKeyHiddencheck(condition);
|
||||
List<PageData> newHiddens = hiddens.stream()
|
||||
.filter(pd -> "1".equals(pd.getString("STATUS")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
nodes.stream()
|
||||
.filter(n -> "4".equals(n.getOrder()))
|
||||
.forEach(n -> n.safety_hiddenCreator_util(hiddens));
|
||||
.forEach(n -> n.safety_hiddenCreator_util(newHiddens));
|
||||
}
|
||||
// 2、3 考评人
|
||||
// List<PageData> assess = assessService.findByMainId(condition);
|
||||
|
|
|
@ -71,6 +71,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
PageData uBean = safetyenvironmentalinspectorService.findById(pd);
|
||||
uBean.put("INSPECTION_USER_OPINION", pd.getString("INSPECTION_USER_OPINION"));
|
||||
uBean.put("INSPECTED_SITEUSER_SIGN_IMG", pd.getString("INSPECTED_SITEUSER_SIGN_IMG"));
|
||||
uBean.put("INSPECTION_USER_SIGN_TIME", pd.getString("INSPECTION_USER_SIGN_TIME"));
|
||||
uBean.put("INSPECTION_STATUS", pd.getString("INSPECTION_STATUS")); //检查进度状态
|
||||
uBean.put("OPERATOR", pd.getString("OPERATOR")); //修改人
|
||||
|
|
|
@ -152,6 +152,7 @@ public class Node {
|
|||
buffer.append(this.getText());
|
||||
for (PageData hidden : hiddens) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("验收人:");
|
||||
buffer.append(hidden.getString("HIDDEN_CREATOR_NAME"));
|
||||
if (StringUtils.isNotBlank(hidden.getString("FINAL_CHECKTIME"))){
|
||||
buffer.append("<br/>(");
|
||||
|
@ -182,6 +183,9 @@ public class Node {
|
|||
buffer.append("<br/>");
|
||||
buffer.append("指派人:");
|
||||
buffer.append(hiddeny.getString("YINNAME"));
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(hiddeny.getString("CREATTIME"));
|
||||
buffer.append(")");
|
||||
|
||||
}
|
||||
this.text = buffer.toString();
|
||||
|
@ -190,12 +194,16 @@ public class Node {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.getText());
|
||||
for (PageData qr:qrs) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("确认人:");
|
||||
buffer.append(qr.getString("conUserName"));
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(qr.getString("CONFIRM_TIME"));
|
||||
buffer.append(")");
|
||||
|
||||
if (StringUtils.isNotBlank(qr.getString("conUserName"))) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("确认人:");
|
||||
buffer.append(qr.getString("conUserName"));
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(qr.getString("CONFIRM_TIME"));
|
||||
buffer.append(")");
|
||||
}
|
||||
|
||||
}
|
||||
this.text = buffer.toString();
|
||||
}
|
||||
|
@ -203,12 +211,15 @@ public class Node {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.getText());
|
||||
for (PageData ts:tss) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("审批人:");
|
||||
buffer.append(ts.getString("tsname"));
|
||||
if (StringUtils.isNotBlank(ts.getString("tsname"))) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("审批人:");
|
||||
buffer.append(ts.getString("tsname"));
|
||||
// buffer.append("<br/>(");
|
||||
// buffer.append(ts.getString("tstiem"));
|
||||
// buffer.append(")");
|
||||
}
|
||||
|
||||
}
|
||||
this.text = buffer.toString();
|
||||
}
|
||||
|
@ -216,12 +227,17 @@ public class Node {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.getText());
|
||||
for (PageData zg:zgs) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("整改人:");
|
||||
buffer.append(zg.getString("RECTIFICATIONORNAME"));
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(zg.getString("RECTIFICATIONTIME"));
|
||||
buffer.append(")");
|
||||
if (StringUtils.isNotBlank(zg.getString("RECTIFICATIONORNAME"))) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("整改人:");
|
||||
buffer.append(zg.getString("RECTIFICATIONORNAME"));
|
||||
if (StringUtils.isNotBlank(zg.getString("RECTIFICATIONTIME"))) {
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(zg.getString("RECTIFICATIONTIME"));
|
||||
buffer.append(")");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.text = buffer.toString();
|
||||
}
|
||||
|
@ -229,12 +245,17 @@ public class Node {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.getText());
|
||||
for (PageData ys:yss) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("验收人:");
|
||||
buffer.append(ys.getString("CHECKORNAME"));
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(ys.getString("CHECK_TIME"));
|
||||
buffer.append(")");
|
||||
if (StringUtils.isNotBlank(ys.getString("CHECKORNAME"))) {
|
||||
buffer.append("<br/>");
|
||||
buffer.append("验收人:");
|
||||
buffer.append(ys.getString("CHECKORNAME"));
|
||||
if(StringUtils.isNotBlank(ys.getString("CHECK_TIME"))){
|
||||
buffer.append("<br/>(");
|
||||
buffer.append(ys.getString("CHECK_TIME"));
|
||||
buffer.append(")");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.text = buffer.toString();
|
||||
}
|
||||
|
|
|
@ -96,13 +96,14 @@ public class NodeApp {
|
|||
public void safety_flow_text_util(PageData information){
|
||||
switch (this.order){
|
||||
case "0":
|
||||
this.title = this.title + ":" + information.getString("INSPECTION_ORIGINATOR_NAME") ;
|
||||
|
||||
this.title = this.title + ":" + "\n" + information.getString("INSPECTION_ORIGINATOR_NAME") ;
|
||||
this.desc = information.getString("CREATTIME");
|
||||
break;
|
||||
case "1":
|
||||
break;
|
||||
case "2":
|
||||
this.title = this.title + ":" + information.getString("INSPECTED_SITEUSER_NAME") ;
|
||||
this.title = this.title + ":" + "\n" + information.getString("INSPECTED_SITEUSER_NAME") ;
|
||||
this.desc = information.getString("INSPECTED_SITEUSER_SIGN_TIME");
|
||||
break;
|
||||
case "3":
|
||||
|
@ -115,19 +116,31 @@ public class NodeApp {
|
|||
public void safety_inspector_util(List<PageData> inspectors) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.title);
|
||||
buffer.append(":");
|
||||
for (PageData inspector : inspectors) {
|
||||
buffer.append("\n");
|
||||
if (StringUtils.isNotBlank(inspector.getString("INSPECTION_USER_SIGN_TIME"))){
|
||||
buffer.append(inspector.getString("INSPECTION_USER_NAME"));
|
||||
// buffer.append("(");
|
||||
// buffer.append(")");
|
||||
}else {
|
||||
buffer.append(inspector.getString("INSPECTION_USER_NAME"));
|
||||
buffer.append("(未签)");
|
||||
}
|
||||
}
|
||||
|
||||
this.title = buffer.toString();
|
||||
|
||||
buffer.setLength(0);
|
||||
for (PageData inspector : inspectors) {
|
||||
if (StringUtils.isNotBlank(inspector.getString("INSPECTION_USER_SIGN_TIME"))){
|
||||
buffer.append(inspector.getString("INSPECTION_USER_NAME"));
|
||||
buffer.append("(已签)");
|
||||
buffer.append("(");
|
||||
buffer.append(inspector.getString("OPERATTIME"));
|
||||
buffer.append(")");
|
||||
}else {
|
||||
buffer.append(inspector.getString("INSPECTION_USER_NAME"));
|
||||
buffer.append("(未签)");
|
||||
buffer.append(inspector.getString("INSPECTION_USER_SIGN_TIME"));
|
||||
}
|
||||
}
|
||||
this.title = buffer.toString();
|
||||
|
||||
if (buffer.length() > 0) {
|
||||
this.desc = buffer.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public void safety_hiddenCreator_util(List<PageData> hiddens) {
|
||||
|
@ -135,13 +148,12 @@ public class NodeApp {
|
|||
buffer.append(this.title);
|
||||
for (PageData hidden : hiddens) {
|
||||
buffer.append(":");
|
||||
buffer.append("\n");
|
||||
buffer.append(hidden.getString("HIDDEN_CREATOR_NAME"));
|
||||
if (StringUtils.isNotBlank(hidden.getString("FINAL_CHECKTIME"))){
|
||||
buffer.append("(");
|
||||
buffer.append(hidden.getString("FINAL_CHECKTIME"));
|
||||
buffer.append(")");
|
||||
buffer.append("\n");
|
||||
if (StringUtils.isNotBlank(hidden.getString("CHECK_TIME"))){
|
||||
buffer.append(hidden.getString("CHECK_TIME"));
|
||||
}
|
||||
buffer.append(";");
|
||||
}
|
||||
this.setTitle(buffer.toString());
|
||||
}
|
||||
|
@ -149,12 +161,30 @@ public class NodeApp {
|
|||
public void safety_hiddenz(List<PageData> hiddenz){
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(this.getTitle());
|
||||
for (PageData hiddeny:hiddenz) {
|
||||
buffer.append("指派人:");
|
||||
buffer.append(hiddeny.getString("YINNAME"));
|
||||
buffer.append("人");
|
||||
buffer.append(":");
|
||||
for (PageData hiddeny:hiddenz) {
|
||||
|
||||
}
|
||||
buffer.append("\n");
|
||||
buffer.append(hiddeny.getString("YINNAME"));
|
||||
buffer.append("\n");
|
||||
if (StringUtils.isNotBlank(hiddeny.getString("CREATTIME"))){
|
||||
buffer.append(hiddeny.getString("CREATTIME"));
|
||||
}
|
||||
|
||||
}
|
||||
this.title = buffer.toString();
|
||||
|
||||
buffer.setLength(0);
|
||||
for (PageData hiddeny : hiddenz) {
|
||||
if (StringUtils.isNotBlank(hiddeny.getString("INSPECTION_USER_SIGN_TIME"))){
|
||||
buffer.append(hiddeny.getString("INSPECTION_USER_SIGN_TIME"));
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer.length() > 0) {
|
||||
this.desc = buffer.toString();
|
||||
}
|
||||
}
|
||||
public void safety_assessor_util(List<PageData> assesses) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
|
|
@ -116,28 +116,28 @@ public class Overseer {
|
|||
node.setText("隐患发现人");
|
||||
list.add(node);
|
||||
|
||||
// node = new Node();
|
||||
// node.setOrder("1");
|
||||
// node.setId("2");
|
||||
// node.setText("隐患确认人");
|
||||
// list.add(node);
|
||||
|
||||
node = new Node();
|
||||
node.setOrder("1");
|
||||
node.setId("2");
|
||||
node.setText("隐患确认人");
|
||||
node.setText("整改负责人");
|
||||
list.add(node);
|
||||
|
||||
// node = new Node();
|
||||
// node.setOrder("2");
|
||||
// node.setId("3");
|
||||
// node.setText("特殊处置审核");
|
||||
// list.add(node);
|
||||
|
||||
|
||||
node = new Node();
|
||||
node.setOrder("2");
|
||||
node.setId("3");
|
||||
node.setText("整改负责人");
|
||||
list.add(node);
|
||||
|
||||
node = new Node();
|
||||
node.setOrder("3");
|
||||
node.setId("4");
|
||||
node.setText("特殊处置审核");
|
||||
list.add(node);
|
||||
|
||||
|
||||
node = new Node();
|
||||
node.setOrder("4");
|
||||
node.setId("5");
|
||||
node.setText("验收人");
|
||||
list.add(node);
|
||||
|
||||
|
@ -176,11 +176,11 @@ public class Overseer {
|
|||
node.setText("隐患发现人验收");
|
||||
list.add(node);
|
||||
|
||||
node = new Node();
|
||||
node.setOrder("6");
|
||||
node.setId("6");
|
||||
node.setText("考评");
|
||||
list.add(node);
|
||||
// node = new Node();
|
||||
// node.setOrder("6");
|
||||
// node.setId("6");
|
||||
// node.setText("考评");
|
||||
// list.add(node);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ public interface HiddenMapper{
|
|||
List<PageData> anaysis(PageData util);
|
||||
|
||||
List<PageData> findByKey(PageData condition);
|
||||
List<PageData> findByKeyHiddencheck(PageData condition);
|
||||
|
||||
List<PageData> findByQue(PageData condition);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class HiddenMailServiceImpl implements HiddenMailService {
|
|||
PageData notice = noticeTemplateService.findByBianMa(pd);
|
||||
String content = "";
|
||||
if(notice!=null){
|
||||
content = notice.getString("CONTENT");
|
||||
content = notice.getString("TEMPLATE_STR");
|
||||
PageData contentPd = (PageData) pd.get("CONTENT");
|
||||
for(Object key : contentPd.keySet()){ //替换占位符
|
||||
content = content.replace("${" + key.toString() + "}", contentPd.get(key).toString());
|
||||
|
@ -99,7 +99,7 @@ public class HiddenMailServiceImpl implements HiddenMailService {
|
|||
public void apphiddneCheckAdopt(PageData pd) throws Exception {
|
||||
PageData mes = new PageData();
|
||||
PageData hiddenPd = hiddenService.findById(pd);
|
||||
mes.put("BIANMA","HIDDEN_MAIL_002");
|
||||
mes.put("TEMPLATE_CODE","SMS_225910627");
|
||||
mes.put("SENDER_ID", pd.get("CHECKOR")); // 发送人员ID
|
||||
mes.put("SENDER_NAME", pd.get("USERNAME")); // 发送人员姓名
|
||||
mes.put("CORPINFO_ID", hiddenPd.get("CORPINFO_ID"));// 企业id
|
||||
|
|
|
@ -38,7 +38,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
@Override
|
||||
public void SE_OneStepUtil(PageData information) throws Exception{
|
||||
PageData mes = new PageData();
|
||||
mes.put("BIANMA","safetyenvironmental_001");
|
||||
mes.put("TEMPLATE_CODE","SMS_225910619");
|
||||
mes.put("SENDER_ID", information.get("CREATOR")); // 发送人员ID
|
||||
PageData userInfo = new PageData();
|
||||
userInfo.put("USER_ID",information.get("CREATOR"));
|
||||
|
@ -61,7 +61,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
condition.put("INSPECTION_ID",information.getString("INSPECTION_ID"));
|
||||
condition = safetyEnvironmentalMapper.findById(condition);
|
||||
PageData mes = new PageData();
|
||||
mes.put("BIANMA","safetyenvironmental_001");
|
||||
mes.put("TEMPLATE_CODE","SMS_225910620");
|
||||
mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID
|
||||
mes.put("USER_ID", information.get("OPERATOR")); //查询发送人名字
|
||||
PageData name = usersService.findById(mes);
|
||||
|
@ -70,7 +70,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
userInfo.put("USER_ID",information.get("CREATOR")); //接收人员ID
|
||||
userInfo = usersService.findById(userInfo);
|
||||
if (userInfo != null){
|
||||
mes.put("SYNOPSIS", "安全环保审批待处理"); // 站内信标题
|
||||
mes.put("SYNOPSIS", "安全环保确认待处理"); // 站内信标题
|
||||
mes.put("CORPINFO_ID", information.get("CORPINFO_ID"));// 企业id
|
||||
mes.put("RECEIVER_ID", information.get("CREATOR")); // 接收人员ID
|
||||
PageData content = new PageData();
|
||||
|
@ -105,14 +105,14 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
condition.put("INSPECTION_ID",information.getString("INSPECTION_ID"));
|
||||
condition = safetyEnvironmentalMapper.findById(condition);
|
||||
PageData mes = new PageData();
|
||||
mes.put("BIANMA","safetyenvironmental_001");
|
||||
mes.put("TEMPLATE_CODE","SMS_225910620");
|
||||
mes.put("SENDER_ID", information.get("inspector")); // 发送人员ID
|
||||
PageData userInfo = new PageData();
|
||||
userInfo.put("USER_ID",information.get("inspector"));
|
||||
userInfo = usersService.findById(userInfo);
|
||||
if(userInfo != null){
|
||||
mes.put("SENDER_NAME", userInfo.getString("NAME")); // 发送人员姓名
|
||||
mes.put("SYNOPSIS", "被检查人确认"); // 站内信标题
|
||||
mes.put("SYNOPSIS", "安全环保隐患待确认提醒"); // 站内信标题
|
||||
mes.put("CORPINFO_ID", information.get("CORPINFO_ID"));// 企业id
|
||||
mes.put("RECEIVER_ID", condition.get("INSPECTED_SITEUSER_ID")); // 接收人员ID
|
||||
PageData content = new PageData();
|
||||
|
@ -128,7 +128,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
condition.put("INSPECTION_ID",information.getString("INSPECTION_ID"));
|
||||
condition = safetyEnvironmentalMapper.findById(condition);
|
||||
PageData mes = new PageData();
|
||||
mes.put("BIANMA","safetyenvironmental_001");
|
||||
mes.put("TEMPLATE_CODE","SMS_215800731");
|
||||
mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID
|
||||
PageData userInfo = new PageData();
|
||||
userInfo.put("USER_ID",information.get("OPERATOR"));
|
||||
|
@ -191,7 +191,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
condition.put("INSPECTION_ID",information.getString("INSPECTION_ID"));
|
||||
condition = safetyEnvironmentalMapper.findById(condition);
|
||||
PageData mes = new PageData();
|
||||
mes.put("BIANMA","safetyenvironmental_001");
|
||||
mes.put("TEMPLATE_CODE","SMS_225910621");
|
||||
mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID
|
||||
PageData userInfo = new PageData();
|
||||
PageData hidden_condition = new PageData();
|
||||
|
@ -199,7 +199,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil {
|
|||
PageData corpuser = usersService.findById(hidden_condition); //根据隐患发现人查询是企业端用户还是监管端用户
|
||||
if (corpuser != null){
|
||||
mes.put("SENDER_NAME", userInfo.getString("NAME")); // 发送人员姓名
|
||||
mes.put("SYNOPSIS", "安全环保检查提交申辩"); // 站内信标题
|
||||
mes.put("SYNOPSIS", "安全环保检查待指派整改"); // 站内信标题
|
||||
mes.put("CORPINFO_ID", condition.getString("CORPINFO_ID"));// 企业id
|
||||
mes.put("RECEIVER_ID", corpuser.getString("USER_ID")); // 接收人员ID
|
||||
PageData content = new PageData();
|
||||
|
|
|
@ -203,6 +203,7 @@ public interface HiddenService{
|
|||
void createExcel(HttpServletResponse response, PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByKey(PageData condition) throws Exception;
|
||||
List<PageData> findByKeyHiddencheck(PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByQue(PageData condition) throws Exception;
|
||||
|
||||
|
|
|
@ -330,6 +330,10 @@ public class HiddenServiceImpl implements HiddenService {
|
|||
public List<PageData> findByKey(PageData condition) throws Exception {
|
||||
return hiddenMapper.findByKey(condition);
|
||||
}
|
||||
public List<PageData> findByKeyHiddencheck(PageData condition) throws Exception{
|
||||
return hiddenMapper.findByKeyHiddencheck(condition);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByQue(PageData condition) throws Exception {
|
||||
|
|
|
@ -131,13 +131,26 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
|||
String time = currentTime;
|
||||
for (JSONObject json : list) {
|
||||
PageData hidden = new PageData();
|
||||
String hiddentype = json.getString("HIDDENTYPE");
|
||||
List<String> lists = JSON.parseArray(hiddentype, String.class);//隐患级别
|
||||
if (lists.size() == 1){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
}
|
||||
if (lists.size() == 2){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2
|
||||
}
|
||||
if (lists.size() == 3){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2
|
||||
hidden.put("HIDDENTYPE3", lists.get(2)); //隐患类型3
|
||||
}
|
||||
hidden.put("HIDDEN_ID", UuidUtil.get32UUID()); //主键
|
||||
hidden.put("FOREIGN_ID", pd.getString("INSPECTION_ID")); //外键ID
|
||||
hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述
|
||||
hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位
|
||||
hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别
|
||||
hidden.put("HIDDENTYPE", json.getString("HIDDENTYPE")); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", json.getString("HIDDENTYPE2")); //隐患类型2
|
||||
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称
|
||||
hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度
|
||||
hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度
|
||||
hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间
|
||||
|
@ -148,9 +161,10 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
|||
hidden.put("STATE", "100"); //隐患状态 100-安全环保检查暂存的隐患(流程完转0)
|
||||
hidden.put("CREATTIME", time); //发现时间
|
||||
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
hidden.put("RECTIFICATIONTYPE", pd.getString("RECTIFICATIONTYPE"));
|
||||
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
|
||||
|
||||
hiddenService.save(hidden);
|
||||
PageData before = new PageData();// 添加隐患初始信息
|
||||
before.put("TYPE","0");
|
||||
before.put("STATE","2");
|
||||
|
@ -159,7 +173,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
|||
before.put("CREATOR", json.getString("CREATOR"));
|
||||
before.put("OPERATOR",json.getString("CREATOR"));
|
||||
hiddenExamineService.saveApp(before);
|
||||
hiddenService.save(hidden);
|
||||
|
||||
|
||||
PageData findUser = new PageData();
|
||||
findUser.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
||||
|
@ -373,8 +387,21 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
|||
hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述
|
||||
hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位
|
||||
hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别
|
||||
hidden.put("HIDDENTYPE", json.getString("HIDDENTYPE")); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", json.getString("HIDDENTYPE2")); //隐患类型2
|
||||
String hiddentype = json.getString("HIDDENTYPE");
|
||||
List<String> lists = JSON.parseArray(hiddentype, String.class);//隐患级别
|
||||
if (lists.size() == 1){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
}
|
||||
if (lists.size() == 2){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2
|
||||
}
|
||||
if (lists.size() == 3){
|
||||
hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1
|
||||
hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2
|
||||
hidden.put("HIDDENTYPE3", lists.get(2)); //隐患类型3
|
||||
}
|
||||
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称
|
||||
hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度
|
||||
hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度
|
||||
hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间
|
||||
|
@ -677,6 +704,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
|||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
||||
public PageData departmentUtil(PageData data) throws Exception {
|
||||
PageData condition = new PageData();
|
||||
condition.put("DEPARTMENT_ID",data.getString("INSPECTED_DEPARTMENT_ID"));
|
||||
|
|
|
@ -128,7 +128,7 @@ public class NoticeCorpServiceImpl implements NoticeCorpService {
|
|||
PageData notice = noticeTemplateService.findByBianMa(pd);
|
||||
String content = "";
|
||||
if(notice!=null){
|
||||
content = notice.getString("CONTENT");
|
||||
content = notice.getString("TEMPLATE_STR");
|
||||
PageData contentPd = (PageData) pd.get("CONTENT");
|
||||
for(Object key : contentPd.keySet()){ //替换占位符
|
||||
if ("number".equals(key.toString()) && Tools.notEmpty(pd.getString("WORKURL"))) {
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</select>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findByHidden" parameterType="pd" resultType="pd">
|
||||
<select id="findByHidden" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.FOREIGN_ID,
|
||||
f.SOURCE,
|
||||
f.RISK_UNIT,
|
||||
f.IDENTIFICATION,
|
||||
|
@ -61,13 +62,13 @@
|
|||
f.LISTMANAGER_ID,
|
||||
f.OPERATTIME,
|
||||
f.HIDDEN_CATEGORY
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
SOURCE,
|
||||
RISK_UNIT,
|
||||
FOREIGN_ID,
|
||||
IDENTIFICATION,
|
||||
RISK_DESCR,
|
||||
RISK_POSITION,
|
||||
|
@ -111,13 +112,15 @@
|
|||
ISCONFIRM,
|
||||
LISTMANAGER_ID,
|
||||
OPERATTIME,
|
||||
HIDDEN_CATEGORY
|
||||
HIDDEN_CATEGORY,
|
||||
POSITIONDESC
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{SOURCE},
|
||||
#{RISK_UNIT},
|
||||
#{FOREIGN_ID},
|
||||
#{IDENTIFICATION},
|
||||
#{RISK_DESCR},
|
||||
#{RISK_POSITION},
|
||||
|
@ -161,11 +164,12 @@
|
|||
#{ISCONFIRM},
|
||||
#{LISTMANAGER_ID},
|
||||
#{OPERATTIME},
|
||||
#{HIDDEN_CATEGORY}
|
||||
#{HIDDEN_CATEGORY},
|
||||
#{POSITIONDESC}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
<insert id="save" parameterType="com.zcloud.entity.PageData" useGeneratedKeys="true" keyColumn="HIDDEN_ID">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
|
@ -351,6 +355,8 @@
|
|||
<!-- REVIEWOR = #{REVIEWOR}, -->
|
||||
<!-- REVIEWDEPT = #{REVIEWDEPT}, -->
|
||||
HAVESCHEME = #{HAVESCHEME},
|
||||
CHECKOR = #{CHECKOR},
|
||||
CHECKDEPT = #{CHECKDEPT},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
HAVEPLAN = #{HAVEPLAN},
|
||||
STATE = '3'
|
||||
|
@ -427,6 +433,7 @@
|
|||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
f.POSITIONDESC,
|
||||
cr.NAME CREATORNAME,
|
||||
re.NAME RECTIFICATIONORNAME,
|
||||
ch.NAME CHECKORNAME,
|
||||
|
@ -435,29 +442,49 @@
|
|||
chd.NAME CHECKDEPTNAME,
|
||||
lv.NAME HIDDENLEVELNAME,
|
||||
bc.LIST_NAME,
|
||||
Bb.NAME as HIDDEN_CATEGORY_NAME,
|
||||
bri.RISK_UNIT_ID
|
||||
lv.NAME HIDDENLEVELNAME,
|
||||
ht.NAME HIDDENTYPENAME,
|
||||
hiddenType2.NAME HIDDENTYPENAME2,
|
||||
conUser.NAME as conUserName,
|
||||
hregion.HIDDENREGION as hregionName,
|
||||
hregionDept.NAME as hregionDeptName,
|
||||
hregion.HIDDENREGION as hregionName,
|
||||
od.DEPARTMENT_ID as confirmDept,
|
||||
fc.NAME FINAL_CHECKOR_NAME,
|
||||
isa.INSPECTION_ASSESS_ID,
|
||||
siu.NAME as acceptName,
|
||||
isa.ASSESS_SCORE,
|
||||
isa.ASSESS_PENALTY_AMOUNT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_user cr on cr.USER_ID = f.CREATOR
|
||||
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
|
||||
left join sys_user ch on ch.USER_ID = f.CHECKOR
|
||||
left join sys_user conUser on conUser.USER_ID = f.CONFIRM_USER
|
||||
left join oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
|
||||
left join oa_department red on red.DEPARTMENT_ID = f.RECTIFICATIONDEPT
|
||||
left join oa_department chd on chd.DEPARTMENT_ID = f.CHECKDEPT
|
||||
left join bus_checkrecord bc on bc.CHECKRECORD_ID = f.CHECKRECORD_ID and bc.ISDELETE = 0
|
||||
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
|
||||
left join SYS_DICTIONARIES Bb on f.HIDDEN_CATEGORY = Bb.DICTIONARIES_ID
|
||||
left join bus_recorditem br on br.RECORDITEM_ID = f.RECORDITEM_ID
|
||||
left join bus_riskpoint bri on bri.RISKPOINT_ID = br.RISKPOINT_ID
|
||||
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
|
||||
left join <include refid="dicTableName"></include> hiddenType2 on f.HIDDENTYPE2 = hiddenType2.BIANMA <!-- 隐患类型-->
|
||||
left join bus_hiddenregion hregion on hregion.HIDDENREGION_ID = f.HIDDENPART
|
||||
left join oa_department hregionDept on hregionDept.DEPARTMENT_ID = conUser.DEPARTMENT_ID
|
||||
left join sys_user su on su.USER_ID = f.CONFIRM_USER
|
||||
left join oa_department od on od.DEPARTMENT_ID = su.DEPARTMENT_ID
|
||||
LEFT JOIN sys_user fc ON fc.USER_ID = f.FINAL_CHECKOR
|
||||
LEFT JOIN sys_user siu ON siu.USER_ID = f.CHECKOR
|
||||
LEFT JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL_ASSESS isa ON isa.HIDDEN_ID = f.HIDDEN_ID and isa.ISDELETE = '0'
|
||||
where
|
||||
f.HIDDEN_ID = #{HIDDEN_ID}
|
||||
f.HIDDEN_ID = #{HIDDEN_ID}
|
||||
group by f.HIDDEN_ID
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
<select id="datalistPage" parameterType="com.zcloud.entity.PageData" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
f.POSITIONDESC,
|
||||
cr.NAME CREATORNAME,
|
||||
re.NAME RECTIFICATIONORNAME,
|
||||
ch.NAME CHECKORNAME,
|
||||
|
@ -546,10 +573,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
and f.STATE in('1','-1')
|
||||
</if>
|
||||
<if test="pd.DISPOSESTATE==2"><!-- 整改 -->
|
||||
<if test="pd.DISPOSESTATE == 2"><!-- 整改 -->
|
||||
<if test="pd.ISMAIN != null and pd.ISMAIN != ''">
|
||||
<choose>
|
||||
<when test="pd.ISMAIN == 1">
|
||||
|
@ -771,7 +797,7 @@
|
|||
order by f.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
<select id="listAll" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
cr.NAME CREATORNAME,
|
||||
|
@ -1104,10 +1130,10 @@
|
|||
<!-- 根据用户ID获取发现隐患信息 -->
|
||||
<select id="getCountByCreatorId" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,h.USER_ID
|
||||
FROM
|
||||
BUS_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001'
|
||||
BUS_HIDDEN f, bus_hiddencheck h
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001' and f.HIDDEN_ID = h.HIDDEN_ID
|
||||
<!-- <if test="DEPARTMENT_IDS != null and DEPARTMENT_IDS != ''">关键词检索
|
||||
and
|
||||
(
|
||||
|
@ -1670,6 +1696,13 @@
|
|||
where f.ISDELETE = '0'and f.FOREIGN_ID = #{FOREIGN_ID}
|
||||
</select>
|
||||
|
||||
<select id="findByKeyHiddencheck" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
select a.NAME as HIDDEN_CREATOR_NAME,
|
||||
f.* from BUS_HIDDENCHECK
|
||||
f left join sys_user a on a.USER_ID = f.USER_ID
|
||||
where f.HIDDEN_ID = #{HIDDEN_ID}
|
||||
</select>
|
||||
|
||||
<select id="findByQue" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
conUser.NAME as conUserName,f.*
|
||||
|
@ -1722,7 +1755,7 @@
|
|||
f.HIDDENLEVEL,
|
||||
lv.NAME HIDDENLEVEL_NAME,
|
||||
f.HIDDENTYPE,
|
||||
ht.NAME HIDDENTYPE_NAME,
|
||||
f.HIDDENTYPE_NAME,
|
||||
f.HIDDENTYPE2,
|
||||
ht2.NAME HIDDENTYPE2_NAME,
|
||||
f.LONGITUDE,
|
||||
|
@ -1822,7 +1855,7 @@
|
|||
<!--根据用户ID获取待确认隐患-->
|
||||
<select id="getCountSpecialByhId" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE,exa.TYPE
|
||||
f.CREATOR,f.STATE,exa.TYPE,f.CHECKOR
|
||||
FROM
|
||||
BUS_HIDDENEXAMINE exa
|
||||
left join BUS_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID
|
||||
|
@ -1845,7 +1878,7 @@
|
|||
</when>
|
||||
<when test='roleLevel == "2"'>
|
||||
<if test="SELFUSERID != null and SELFUSERID != ''">
|
||||
and (bhu.USER_ID = #{SELFUSERID} or f.CONFIRM_USER = #{SELFUSERID} or f.RECTIFICATIONOR = #{SELFUSERID} or f.CHECKOR = #{SELFUSERID} )
|
||||
and (bhu.USER_ID = #{SELFUSERID} or f.CREATOR = #{SELFUSERID} or f.RECTIFICATIONOR = #{SELFUSERID} or f.CHECKOR = #{SELFUSERID} )
|
||||
</if>
|
||||
</when>
|
||||
</choose>
|
||||
|
@ -2154,7 +2187,7 @@
|
|||
LEFT JOIN sys_user confirmUser on confirmUser.USER_ID = f.CONFIRM_USER <!-- 隐患确认人 -->
|
||||
left join bus_hidden_user bhu on bhu.HIDDEN_ID = f.HIDDEN_ID
|
||||
LEFT JOIN bus_hiddencheck hch on hch.HIDDEN_ID = f.HIDDEN_ID
|
||||
where f.ISDELETE = '0' and f.SOURCE IN ('1','2') and f.STATE != '100'
|
||||
where f.ISDELETE = '0' and f.SOURCE = 5 and f.STATE != '100'
|
||||
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
|
||||
<choose>
|
||||
<when test='pd.roleLevel == "0"'>
|
||||
|
@ -3733,11 +3766,10 @@
|
|||
</if>
|
||||
order by z.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID获取待整改隐患(app首页) -->
|
||||
<select id="getRiskStandardCountByRectifiCationorId" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001'
|
||||
|
@ -3761,7 +3793,7 @@
|
|||
union all
|
||||
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001'
|
||||
|
@ -3786,7 +3818,7 @@
|
|||
<!-- 根据用户ID获取待验收隐患(app首页) -->
|
||||
<select id="getRiskStandardCountByCheckorId" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0'
|
||||
|
@ -3800,7 +3832,7 @@
|
|||
union all
|
||||
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0'
|
||||
|
@ -3815,7 +3847,7 @@
|
|||
<!-- 根据用户ID获取待确认隐患(app首页) -->
|
||||
<select id="getRiskStandardCountByConfirmId" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE = '-2'
|
||||
|
@ -3830,7 +3862,7 @@
|
|||
union all
|
||||
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.CREATOR,f.STATE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE = '-2'
|
||||
|
@ -3846,7 +3878,7 @@
|
|||
<!--根据用户ID获取特殊处理隐患和延期隐患(app首页)-->
|
||||
<select id="getRiskStandardCountSpecialByhId" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE,exa.TYPE
|
||||
f.CREATOR,f.STATE,exa.TYPE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENEXAMINE exa
|
||||
left join BUS_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID
|
||||
|
@ -3884,7 +3916,7 @@
|
|||
union all
|
||||
|
||||
SELECT
|
||||
f.CREATOR,f.STATE,exa.TYPE
|
||||
f.CREATOR,f.STATE,exa.TYPE,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_HIDDENEXAMINE exa
|
||||
left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID
|
||||
|
@ -3923,7 +3955,7 @@
|
|||
<!-- 根据用户ID获取发现隐患信息(app首页) -->
|
||||
<select id="getRiskStandardCountByCreatorId" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.STATE,f.CHECKOR,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001'
|
||||
|
@ -3984,7 +4016,7 @@
|
|||
union all
|
||||
|
||||
SELECT
|
||||
f.CREATOR,f.STATE
|
||||
f.STATE,f.CHECKOR,f.CREATOR
|
||||
FROM
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f
|
||||
WHERE f.ISDELETE = '0' and f.STATE != '0' and f.HIDDENLEVEL = 'hiddenLevel0001'
|
||||
|
|
|
@ -637,7 +637,7 @@
|
|||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="checklistPage" parameterType="page" resultType="com.zcloud.entity.PageData">
|
||||
<select id="checklistPage" parameterType="com.zcloud.entity.PageData" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
iou.NAME INSPECTION_ORIGINATOR_NAME,
|
||||
ild.NAME INSPECTION_LEADDEPARTMENT_NAME,
|
||||
|
@ -686,11 +686,11 @@
|
|||
<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''"><!-- 检查题目 -->
|
||||
and f.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''"><!-- 检查时间 -->
|
||||
and f.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00')
|
||||
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''">
|
||||
and <![CDATA[ f.INSPECTION_TIME_START >= #{pd.INSPECTION_TIME_START,jdbcType=DATE} ]]><!--检查时间-->
|
||||
</if>
|
||||
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''"><!-- 检查时间 -->
|
||||
and f.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59')
|
||||
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''">
|
||||
and <![CDATA[ f.INSPECTION_TIME_END <= #{pd.INSPECTION_TIME_END,jdbcType=DATE} ]]><!--检查时间-->
|
||||
</if>
|
||||
<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''"><!-- 检查状态 -->
|
||||
<choose>
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findByUserId" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
SELECT
|
||||
f.USERNAME,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.BIANMA = #{BIANMA}
|
||||
f.TEMPLATE_CODE = #{TEMPLATE_CODE}
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
|
|
Loading…
Reference in New Issue