Compare commits
14 Commits
93e034b162
...
877b518e5d
Author | SHA1 | Date |
---|---|---|
|
877b518e5d | |
|
38986c3364 | |
|
9e089fcb62 | |
|
0698b28d27 | |
|
183eef7073 | |
|
c2c3897979 | |
|
1a26abd93a | |
|
80f4b403f3 | |
|
3711239f55 | |
|
6111c30c7a | |
|
0ec51c4702 | |
|
bd1690cea5 | |
|
8a1947dbd3 | |
|
b5f7a5fede |
|
@ -1,11 +1,11 @@
|
||||||
package com.zcloud.controller.accident;
|
package com.zcloud.controller.accident;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.entity.accident.AccidentRecords;
|
||||||
import com.zcloud.service.accident.AccidentRecordsService;
|
import com.zcloud.service.accident.AccidentRecordsService;
|
||||||
import com.zcloud.util.ObjectExcelView;
|
import com.zcloud.util.ObjectExcelView;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
@ -38,7 +38,11 @@ public class AccidentRecordsController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/page")
|
@RequestMapping(value = "/page")
|
||||||
public Map<String, Object> queryPage(Page page, HttpServletRequest request) {
|
public Map<String, Object> queryPage(Page page, HttpServletRequest request) {
|
||||||
page.setPd(new PageData(request));
|
PageData data = new PageData(request);
|
||||||
|
if (ObjectUtil.isEmpty(data.get("type"))) {
|
||||||
|
throw new RuntimeException("type不能为空");
|
||||||
|
}
|
||||||
|
page.setPd(data);
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("result", "success");
|
result.put("result", "success");
|
||||||
result.put("varList", accidentRecordsService.queryPage(page));
|
result.put("varList", accidentRecordsService.queryPage(page));
|
||||||
|
@ -70,11 +74,7 @@ public class AccidentRecordsController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/save")
|
@RequestMapping("/save")
|
||||||
public Map<String, Object> save(HttpServletRequest request) {
|
public Map<String, Object> save(HttpServletRequest request) {
|
||||||
PageData pageData = new PageData(request);
|
accidentRecordsService.save(new AccidentRecords(new PageData(request)));
|
||||||
if (CollUtil.isEmpty(pageData)){
|
|
||||||
throw new RuntimeException("参数不能为空");
|
|
||||||
}
|
|
||||||
accidentRecordsService.save(pageData);
|
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("result", "success");
|
result.put("result", "success");
|
||||||
return result;
|
return result;
|
||||||
|
@ -89,14 +89,11 @@ public class AccidentRecordsController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/update")
|
@RequestMapping("/update")
|
||||||
public Map<String, Object> update(HttpServletRequest request) {
|
public Map<String, Object> update(HttpServletRequest request) {
|
||||||
PageData pageData = new PageData(request);
|
AccidentRecords accidentRecords = new AccidentRecords(new PageData(request));
|
||||||
if (CollUtil.isEmpty(pageData)){
|
if (StrUtil.isEmpty(accidentRecords.getId())) {
|
||||||
throw new RuntimeException("参数不能为空");
|
|
||||||
}
|
|
||||||
if (pageData.get("id") == null) {
|
|
||||||
throw new RuntimeException("id不能为空");
|
throw new RuntimeException("id不能为空");
|
||||||
}
|
}
|
||||||
accidentRecordsService.update(pageData);
|
accidentRecordsService.update(accidentRecords);
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("result", "success");
|
result.put("result", "success");
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
package com.zcloud.controller.app;
|
package com.zcloud.controller.app;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import cn.hutool.crypto.digest.DigestUtil;
|
||||||
import java.util.ArrayList;
|
import com.alibaba.fastjson.JSON;
|
||||||
import java.util.Calendar;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import java.util.Date;
|
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||||
import java.util.HashMap;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import java.util.List;
|
import com.zcloud.entity.Page;
|
||||||
import java.util.Map;
|
import com.zcloud.entity.PageData;
|
||||||
import java.util.Random;
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import com.zcloud.controller.bus.HiddenController;
|
|
||||||
import com.zcloud.service.bus.*;
|
import com.zcloud.service.bus.*;
|
||||||
import com.zcloud.service.hiddenApi.HiddenApiService;
|
import com.zcloud.service.hiddenApi.HiddenApiService;
|
||||||
import com.zcloud.service.hiddenApi.HiddenCheckApiService;
|
import com.zcloud.service.hiddenApi.HiddenCheckApiService;
|
||||||
import com.zcloud.service.hiddenApi.HiddenExamineApiService;
|
import com.zcloud.service.hiddenApi.HiddenExamineApiService;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
||||||
|
import com.zcloud.service.system.DepartmentService;
|
||||||
import com.zcloud.service.system.FHlogService;
|
import com.zcloud.service.system.FHlogService;
|
||||||
|
import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import com.zcloud.util.event.DeviceHiddenEvent;
|
import com.zcloud.util.event.DeviceHiddenEvent;
|
||||||
import com.zcloud.util.message.MessageService;
|
import com.zcloud.util.message.MessageService;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
@ -29,27 +29,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.fop.fo.flow.PageNumberCitation;
|
|
||||||
import org.apache.fop.render.afp.modca.PageDescriptor;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
|
||||||
import com.zcloud.entity.Page;
|
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
|
|
||||||
import com.zcloud.entity.PageData;
|
|
||||||
import com.zcloud.service.system.DepartmentService;
|
|
||||||
import com.zcloud.service.system.UsersService;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.tools.Tool;
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:隐患 作者:luoxiaobao 时间:2021-01-04 官网:www.zcloudchina.com
|
* 说明:隐患 作者:luoxiaobao 时间:2021-01-04 官网:www.zcloudchina.com
|
||||||
|
@ -567,6 +552,7 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
File tempFile = new File(file.getOriginalFilename());
|
File tempFile = new File(file.getOriginalFilename());
|
||||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
||||||
|
String md5 = DigestUtil.md5Hex(tempFile);
|
||||||
if (!FileUpload.isImage(tempFile)) {
|
if (!FileUpload.isImage(tempFile)) {
|
||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
map.put("result", "failed");
|
map.put("result", "failed");
|
||||||
|
@ -584,8 +570,10 @@ public class AppHiddenController extends BaseController {
|
||||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + ffile);
|
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + ffile);
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("IMGFILES_ID", this.get32UUID());
|
pd.put("IMGFILES_ID", this.get32UUID());
|
||||||
|
pd.put("MD5", md5);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + ffile + "/" + fileName);
|
||||||
pd.put("TYPE", TYPE);
|
pd.put("TYPE", TYPE);
|
||||||
|
|
||||||
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
imgFilesService.save(pd);
|
imgFilesService.save(pd);
|
||||||
|
|
||||||
|
@ -932,7 +920,6 @@ public class AppHiddenController extends BaseController {
|
||||||
hs.put("ISDELETE", "0");
|
hs.put("ISDELETE", "0");
|
||||||
hiddenSchemeService.edit(hs);
|
hiddenSchemeService.edit(hs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.zcloud.controller.app;
|
package com.zcloud.controller.app;
|
||||||
|
|
||||||
import java.io.File;
|
import cn.hutool.crypto.digest.DigestUtil;
|
||||||
import java.util.ArrayList;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import java.util.Date;
|
import com.zcloud.entity.Page;
|
||||||
import java.util.HashMap;
|
import com.zcloud.entity.PageData;
|
||||||
import java.util.List;
|
import com.zcloud.service.bus.ImgFilesService;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -16,13 +16,12 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
import java.io.File;
|
||||||
import com.zcloud.entity.Page;
|
import java.util.ArrayList;
|
||||||
import com.zcloud.entity.PageData;
|
import java.util.HashMap;
|
||||||
import com.zcloud.service.bus.ImgFilesService;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:图片管理
|
* 说明:图片管理
|
||||||
|
@ -65,6 +64,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
MultipartFile file = files[i];
|
MultipartFile file = files[i];
|
||||||
// 保存文件
|
// 保存文件
|
||||||
File tempFile = new File(file.getOriginalFilename());
|
File tempFile = new File(file.getOriginalFilename());
|
||||||
|
String md5 = DigestUtil.md5Hex(tempFile);
|
||||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
||||||
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型
|
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型
|
||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
|
@ -98,6 +98,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
pd.put("IMGFILES_ID", this.get32UUID());
|
pd.put("IMGFILES_ID", this.get32UUID());
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
pd.put("TYPE", TYPE);
|
pd.put("TYPE", TYPE);
|
||||||
|
pd.put("MD5", md5);
|
||||||
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
imgfilesService.save(pd);
|
imgfilesService.save(pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,23 @@
|
||||||
package com.zcloud.controller.app;
|
package com.zcloud.controller.app;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.NoticeCorpService;
|
import com.zcloud.service.bus.NoticeCorpService;
|
||||||
import com.zcloud.service.bus.NoticeCorpUserService;
|
import com.zcloud.service.bus.NoticeCorpUserService;
|
||||||
import com.zcloud.service.bus.NoticeLogService;
|
|
||||||
import com.zcloud.service.bus.ServiceNoticeService;
|
import com.zcloud.service.bus.ServiceNoticeService;
|
||||||
import com.zcloud.service.system.UsersService;
|
import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
|
||||||
import com.zcloud.util.ObjectExcelView;
|
|
||||||
import com.zcloud.util.Tools;
|
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.apache.shiro.authz.annotation.RequiresPermissions;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:通知公告
|
* 说明:通知公告
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.zcloud.controller.app.inspection;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.entity.hotWorkApplication.Node;
|
|
||||||
import com.zcloud.entity.hotWorkApplication.NodeApp;
|
import com.zcloud.entity.hotWorkApplication.NodeApp;
|
||||||
import com.zcloud.entity.hotWorkApplication.Overseer;
|
import com.zcloud.entity.hotWorkApplication.Overseer;
|
||||||
import com.zcloud.service.bus.HiddenService;
|
import com.zcloud.service.bus.HiddenService;
|
||||||
|
@ -14,7 +13,6 @@ import com.zcloud.service.inspection.SafetyEnvironmentalInspectorService;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
||||||
import com.zcloud.service.system.DepartmentService;
|
import com.zcloud.service.system.DepartmentService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -26,9 +24,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:安全环保检查
|
* 说明:安全环保检查
|
||||||
|
@ -58,19 +54,21 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
private NoticeCorpUtil noticeCorpUtil;
|
private NoticeCorpUtil noticeCorpUtil;
|
||||||
|
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/list")
|
@RequestMapping(value = "/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object list(Page page) throws Exception{
|
public Object list(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyenvironmentalService.list(page); //列出SafetyEnvironmental列表
|
List<PageData> varList = safetyenvironmentalService.list(page); //列出SafetyEnvironmental列表
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -79,14 +77,16 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**新增
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value = "/add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -100,8 +100,8 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
pd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
||||||
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
|
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){
|
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -111,8 +111,8 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
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);
|
||||||
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION"));
|
pd.put("CONFIRM_MESSAGE", pd.getString("INSPECTION_USER_OPINION"));
|
||||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||||
}
|
}
|
||||||
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
|
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
|
||||||
pd.put("hiddenList", hiddenList);
|
pd.put("hiddenList", hiddenList);
|
||||||
|
@ -121,14 +121,16 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goShow")
|
@RequestMapping(value = "/goShow")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goShow() throws Exception{
|
public Object goShow() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -139,14 +141,16 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value = "/goEdit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -157,14 +161,16 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value = "/edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
public Object edit(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -173,8 +179,8 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
|
pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){
|
if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -184,8 +190,8 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
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);
|
||||||
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION"));
|
pd.put("CONFIRM_MESSAGE", pd.getString("INSPECTION_USER_OPINION"));
|
||||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
pd.put("CONFIRM_MESSAGE_TIME", DateUtil.date2Str(new Date()));
|
||||||
}
|
}
|
||||||
List<PageData> hiddenList = safetyenvironmentalService.edit(pd);
|
List<PageData> hiddenList = safetyenvironmentalService.edit(pd);
|
||||||
pd.put("hiddenList", hiddenList);
|
pd.put("hiddenList", hiddenList);
|
||||||
|
@ -194,21 +200,23 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/explain")
|
@RequestMapping(value = "/explain")
|
||||||
//@RequiresPermissions("safetyenvironmental:edit")
|
//@RequiresPermissions("safetyenvironmental:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object explain(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{
|
public Object explain(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if (files != null && files.length > 0) {
|
if (files != null && files.length > 0) {
|
||||||
MultipartFile file = files[0];
|
MultipartFile file = files[0];
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -217,28 +225,30 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
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);
|
||||||
|
|
||||||
pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
safetyenvironmentalService.explain(pd);
|
safetyenvironmentalService.explain(pd);
|
||||||
pd.put("inspector",pd.getString("OPERATOR"));
|
pd.put("inspector", pd.getString("OPERATOR"));
|
||||||
noticeCorpUtil.FailPleadind(pd);
|
noticeCorpUtil.FailPleadind(pd);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value = "/delete")
|
||||||
@RequiresPermissions("safetyenvironmental:del")
|
@RequiresPermissions("safetyenvironmental:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception {
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -248,44 +258,48 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/deleteAll")
|
@RequestMapping(value = "/deleteAll")
|
||||||
@RequiresPermissions("safetyenvironmental:del")
|
@RequiresPermissions("safetyenvironmental:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if (Tools.notEmpty(DATA_IDS)) {
|
||||||
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
||||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||||
safetyenvironmentalService.deleteAll(pd);
|
safetyenvironmentalService.deleteAll(pd);
|
||||||
errInfo = "success";
|
errInfo = "success";
|
||||||
}else{
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/excel")
|
@RequestMapping(value = "/excel")
|
||||||
@RequiresPermissions("toExcel")
|
@RequiresPermissions("toExcel")
|
||||||
public ModelAndView exportExcel() throws Exception{
|
public ModelAndView exportExcel() throws Exception {
|
||||||
ModelAndView mv = new ModelAndView();
|
ModelAndView mv = new ModelAndView();
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
List<String> titles = new ArrayList<String>();
|
List<String> titles = new ArrayList<String>();
|
||||||
titles.add("检查发起人"); //1
|
titles.add("检查发起人"); //1
|
||||||
titles.add("被检查单位"); //2
|
titles.add("被检查单位"); //2
|
||||||
|
@ -308,7 +322,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
List<PageData> varOList = safetyenvironmentalService.listAll(pd);
|
List<PageData> varOList = safetyenvironmentalService.listAll(pd);
|
||||||
List<PageData> varList = new ArrayList<PageData>();
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
for(int i=0;i<varOList.size();i++){
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
PageData vpd = new PageData();
|
PageData vpd = new PageData();
|
||||||
vpd.put("var1", varOList.get(i).getString("INSPECTION_ORIGINATOR_ID")); //1
|
vpd.put("var1", varOList.get(i).getString("INSPECTION_ORIGINATOR_ID")); //1
|
||||||
vpd.put("var2", varOList.get(i).getString("INSPECTED_DEPARTMENT_ID")); //2
|
vpd.put("var2", varOList.get(i).getString("INSPECTED_DEPARTMENT_ID")); //2
|
||||||
|
@ -331,18 +345,20 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
}
|
}
|
||||||
dataMap.put("varList", varList);
|
dataMap.put("varList", varList);
|
||||||
ObjectExcelView erv = new ObjectExcelView();
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv, dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**安全环保检查待办作业数统计
|
/**
|
||||||
|
* 安全环保检查待办作业数统计
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/countCheck")
|
@RequestMapping(value = "/countCheck")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object countCheck() throws Exception{
|
public Object countCheck() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -353,32 +369,34 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("confirmCount", confirmCount);
|
map.put("confirmCount", confirmCount);
|
||||||
map.put("checkedCount",checkedCount);
|
map.put("checkedCount", checkedCount);
|
||||||
map.put("repulseCount",repulseCount);
|
map.put("repulseCount", repulseCount);
|
||||||
map.put("repulseAndCheckCount",repulseAndCheckCount);
|
map.put("repulseAndCheckCount", repulseAndCheckCount);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/getExplain")
|
@RequestMapping(value = "/getExplain")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getExplain() throws Exception{
|
public Object getExplain() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
List<PageData> list = explainService.findExplainById(pd);
|
List<PageData> list = explainService.findExplainById(pd);
|
||||||
map.put("list",list);
|
map.put("list", list);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**一公司app首页安全环保检查统计
|
/**
|
||||||
|
* 一公司app首页安全环保检查统计
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/countHome")
|
@RequestMapping(value = "/countHome")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object countHome() throws Exception{
|
public Object countHome() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -388,19 +406,21 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/pleadList")
|
@RequestMapping(value = "/pleadList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object pleadList(Page page) throws Exception{
|
public Object pleadList(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyenvironmentalService.pleadList(page); //列出SafetyEnvironmental列表
|
List<PageData> varList = safetyenvironmentalService.pleadList(page); //列出SafetyEnvironmental列表
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -410,20 +430,23 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
* 规则: 如果当前人是,被检查人,检查人,参与人则可以查询到此条数据
|
* 规则: 如果当前人是,被检查人,检查人,参与人则可以查询到此条数据
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/checkList")
|
@RequestMapping(value = "/checkList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object checkList(Page page) throws Exception{
|
public Object checkList(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
pd.put("waffle",pd.getString("ARCHIVE_USER_ID"));
|
pd.put("waffle", pd.getString("ARCHIVE_USER_ID"));
|
||||||
|
pd.put("loginUserId", Jurisdiction.getUSER_ID());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyenvironmentalService.checkList(page); //列出SafetyEnvironmental列表
|
List<PageData> varList = safetyenvironmentalService.checkList(page); //列出SafetyEnvironmental列表
|
||||||
/* 针对验收部分特殊处理 */
|
/* 针对验收部分特殊处理 */
|
||||||
|
@ -435,23 +458,23 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
|| "7".equals(vector.getString("INSPECTION_STATUS")))
|
|| "7".equals(vector.getString("INSPECTION_STATUS")))
|
||||||
) {
|
) {
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("FOREIGN_ID",vector.getString("INSPECTION_ID"));
|
condition.put("FOREIGN_ID", vector.getString("INSPECTION_ID"));
|
||||||
List<PageData> waffle = hiddenService.findByKey(condition); //d
|
List<PageData> waffle = hiddenService.findByKey(condition); //d
|
||||||
if (waffle == null || waffle.isEmpty()){
|
if (waffle == null || waffle.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Long number = waffle.stream()
|
Long number = waffle.stream()
|
||||||
.filter(n ->
|
.filter(n ->
|
||||||
user_id.equals(n.getString("CREATOR"))
|
user_id.equals(n.getString("CREATOR"))
|
||||||
&& (StringUtils.isNotBlank(n.getString("STATE"))&&(
|
&& (StringUtils.isNotBlank(n.getString("STATE")) && (
|
||||||
"4".equals(n.getString("STATE"))|| "8".equals(n.getString("STATE"))))
|
"4".equals(n.getString("STATE")) || "8".equals(n.getString("STATE"))))
|
||||||
|
|
||||||
|
|
||||||
&&(StringUtils.isBlank(n.getString("FINAL_CHECK"))|| "2".equals(n.getString("FINAL_CHECK")))
|
&& (StringUtils.isBlank(n.getString("FINAL_CHECK")) || "2".equals(n.getString("FINAL_CHECK")))
|
||||||
)
|
)
|
||||||
.count();
|
.count();
|
||||||
if (number >0){
|
if (number > 0) {
|
||||||
vector.put("checkout",1);
|
vector.put("checkout", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -461,13 +484,13 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/showFlowChart")
|
@RequestMapping(value = "/showFlowChart")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object showFlowChart() throws Exception{
|
public Object showFlowChart() throws Exception {
|
||||||
HashMap<String, Object> response = new HashMap<>();
|
HashMap<String, Object> response = new HashMap<>();
|
||||||
response.put("result","success");
|
response.put("result", "success");
|
||||||
PageData condition = this.getPageData();
|
PageData condition = this.getPageData();
|
||||||
condition.put("INSPECTION_ID",condition.getString("ID"));
|
condition.put("INSPECTION_ID", condition.getString("ID"));
|
||||||
PageData safety = safetyenvironmentalService.findById(condition);
|
PageData safety = safetyenvironmentalService.findById(condition);
|
||||||
if (safety == null || safety.size() <= 0) {
|
if (safety == null || safety.size() <= 0) {
|
||||||
response.put("result", "error");
|
response.put("result", "error");
|
||||||
|
@ -517,7 +540,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
|
||||||
// .forEach(n -> n.safety_assessor_util(assess));
|
// .forEach(n -> n.safety_assessor_util(assess));
|
||||||
// }
|
// }
|
||||||
response.put("varList", nodes);
|
response.put("varList", nodes);
|
||||||
response.put("active" ,overseer.getSafetyAppVector());
|
response.put("active", overseer.getSafetyAppVector());
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package com.zcloud.controller.bus;
|
package com.zcloud.controller.bus;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import java.util.Date;
|
import com.zcloud.entity.Page;
|
||||||
import java.util.HashMap;
|
import com.zcloud.entity.PageData;
|
||||||
import java.util.List;
|
import com.zcloud.service.bus.VideoService;
|
||||||
import java.util.Map;
|
import com.zcloud.util.*;
|
||||||
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
@ -16,18 +15,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
import java.util.*;
|
||||||
import com.zcloud.entity.Page;
|
|
||||||
import com.zcloud.entity.PageData;
|
|
||||||
import com.zcloud.service.bus.VideoService;
|
|
||||||
import com.zcloud.util.Const;
|
|
||||||
import com.zcloud.util.DateUtil;
|
|
||||||
import com.zcloud.util.FileUpload;
|
|
||||||
import com.zcloud.util.Jurisdiction;
|
|
||||||
import com.zcloud.util.ObjectExcelView;
|
|
||||||
import com.zcloud.util.PathUtil;
|
|
||||||
import com.zcloud.util.Smb;
|
|
||||||
import com.zcloud.util.Tools;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:视频管理
|
* 说明:视频管理
|
||||||
|
@ -155,7 +143,7 @@ public class VideoController extends BaseController {
|
||||||
@RequiresPermissions("video:edit")
|
@RequiresPermissions("video:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
|
|
@ -3,11 +3,8 @@ package com.zcloud.controller.inspection;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.entity.hotWorkApplication.Color;
|
|
||||||
import com.zcloud.entity.hotWorkApplication.Node;
|
import com.zcloud.entity.hotWorkApplication.Node;
|
||||||
import com.zcloud.entity.hotWorkApplication.Overseer;
|
import com.zcloud.entity.hotWorkApplication.Overseer;
|
||||||
import com.zcloud.entity.system.Department;
|
|
||||||
import com.zcloud.entity.system.User;
|
|
||||||
import com.zcloud.service.bus.HiddenCheckService;
|
import com.zcloud.service.bus.HiddenCheckService;
|
||||||
import com.zcloud.service.bus.HiddenService;
|
import com.zcloud.service.bus.HiddenService;
|
||||||
import com.zcloud.service.bus.NoticeCorpService;
|
import com.zcloud.service.bus.NoticeCorpService;
|
||||||
|
@ -21,8 +18,6 @@ import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.session.Session;
|
|
||||||
import org.apache.xmlgraphics.xmp.schemas.pdf.PDFAAdapter;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -34,7 +29,6 @@ import org.springframework.web.servlet.ModelAndView;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:安全环保检查
|
* 说明:安全环保检查
|
||||||
|
@ -211,11 +205,11 @@ public class SafetyEnvironmentalController extends BaseController {
|
||||||
@RequiresPermissions("safetyenvironmental:list")
|
@RequiresPermissions("safetyenvironmental:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object list(Page page) throws Exception {
|
public Object list(Page page) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
pd.put("KEYWORDS", Tools.notEmpty(KEYWORDS) ? KEYWORDS.trim() : "");
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
// PageData userInfo = new PageData();
|
// PageData userInfo = new PageData();
|
||||||
// userInfo.put("USER_ID",pd.getString("INSPECTION_ORIGINATOR_ID"));
|
// userInfo.put("USER_ID",pd.getString("INSPECTION_ORIGINATOR_ID"));
|
||||||
|
@ -740,33 +734,38 @@ public class SafetyEnvironmentalController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
pd.put("waffle", Jurisdiction.getUSER_ID());
|
pd.put("waffle", Jurisdiction.getUSER_ID());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
|
pd.put("loginUserId", Jurisdiction.getUSER_ID());
|
||||||
List<PageData> varList = safetyenvironmentalService.checkList(page); //列出SafetyEnvironmental列表
|
List<PageData> varList = safetyenvironmentalService.checkList(page); //列出SafetyEnvironmental列表
|
||||||
/* 针对验收部分特殊处理 */
|
/* 针对验收部分特殊处理 */
|
||||||
for (PageData vector : varList) {
|
// for (PageData vector : varList) {
|
||||||
if (StringUtils.isNotBlank(vector.getString("INSPECTION_STATUS")) &&
|
// if (StringUtils.isNotBlank(vector.getString("INSPECTION_STATUS")) &&
|
||||||
("6".equals(vector.getString("INSPECTION_STATUS"))
|
// ("6".equals(vector.getString("INSPECTION_STATUS"))
|
||||||
|| "5".equals(vector.getString("INSPECTION_STATUS"))
|
// || "5".equals(vector.getString("INSPECTION_STATUS"))
|
||||||
// || "7".equals(vector.getString("INSPECTION_STATUS"))
|
//// || "7".equals(vector.getString("INSPECTION_STATUS"))
|
||||||
)
|
// )
|
||||||
) {
|
// ) {
|
||||||
PageData condition = new PageData();
|
// PageData condition = new PageData();
|
||||||
condition.put("FOREIGN_ID", vector.getString("INSPECTION_ID"));
|
// condition.put("FOREIGN_ID", vector.getString("INSPECTION_ID"));
|
||||||
List<PageData> waffle = hiddenService.findByKey(condition);
|
// List<PageData> waffle = hiddenService.findByKey(condition);
|
||||||
if (waffle == null || waffle.isEmpty()) {
|
// if (waffle == null || waffle.isEmpty()) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
Long number = waffle.stream()
|
// Long number = waffle.stream()
|
||||||
.filter(n ->
|
// .filter(n -> Jurisdiction.getUSER_ID().equals(n.getString("CREATOR")) &&
|
||||||
Jurisdiction.getUSER_ID().equals(n.getString("CREATOR")) &&
|
// (StringUtils.isNotBlank(n.getString("STATE")) &&
|
||||||
(StringUtils.isNotBlank(n.getString("STATE")) && ("4".equals(n.getString("STATE")) || "8".equals(n.getString("STATE")))) &&
|
// ("4".equals(n.getString("STATE")) ||
|
||||||
(StringUtils.isBlank(n.getString("FINAL_CHECK")) || "2".equals(n.getString("FINAL_CHECK")))
|
// "8".equals(n.getString("STATE")))) &&
|
||||||
)
|
// (StringUtils.isBlank(n.getString("FINAL_CHECK")) ||
|
||||||
.count();
|
// "2".equals(n.getString("FINAL_CHECK")))
|
||||||
if (number > 0) {
|
// )
|
||||||
vector.put("checkout", 1);
|
// .count();
|
||||||
}
|
// if (number > 0) {
|
||||||
}
|
// vector.put("checkout", 1);
|
||||||
}
|
// } else {
|
||||||
|
// vector.put("checkout", 0);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.zcloud.service.bus.NoticeCorpUtil;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalExplainService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalExplainService;
|
||||||
import com.zcloud.service.system.DepartmentService;
|
import com.zcloud.service.system.DepartmentService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -43,27 +42,30 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private NoticeCorpUtil noticeCorpUtil;
|
private NoticeCorpUtil noticeCorpUtil;
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/list")
|
@RequestMapping(value = "/list")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:list")
|
@RequiresPermissions("safetyenvironmentalexplain:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object list(Page page) throws Exception{
|
public Object list(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
// pd.put("INSPECTED_SITEUSER_ID", Jurisdiction.getUSER_ID()); //被检查单位现场负责人
|
// pd.put("INSPECTED_SITEUSER_ID", Jurisdiction.getUSER_ID()); //被检查单位现场负责人
|
||||||
pd = Jurisdiction.getUserDataJurisdiction(pd);
|
pd = Jurisdiction.getUserDataJurisdiction(pd);
|
||||||
|
pd.put("loginUserId", Jurisdiction.getUSER_ID());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyenvironmentalexplainService.list(page); //列出SafetyEnvironmentalExplain列表
|
List<PageData> varList = safetyenvironmentalexplainService.list(page); //列出SafetyEnvironmentalExplain列表
|
||||||
for (PageData vector: varList) {
|
for (PageData vector : varList) {
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("DEPARTMENT_ID",vector.getString("INSPECTED_DEPARTMENT_ID"));
|
condition.put("DEPARTMENT_ID", vector.getString("INSPECTED_DEPARTMENT_ID"));
|
||||||
List<PageData> parent_list = departmentService.getGenealogy(condition);
|
List<PageData> parent_list = departmentService.getGenealogy(condition);
|
||||||
String corp_infos = "";
|
String corp_infos = "";
|
||||||
/*for(PageData pageData:parent_list){
|
/*for(PageData pageData:parent_list){
|
||||||
|
@ -80,10 +82,10 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
if(!Tools.isEmpty(parent_list)){
|
if (!Tools.isEmpty(parent_list)) {
|
||||||
corp_infos = parent_list.stream().filter(n->StringUtils.isNotBlank(n.getString("NAME"))).map(n -> n.getString("NAME")).collect(Collectors.joining("-"));
|
corp_infos = parent_list.stream().filter(n -> StringUtils.isNotBlank(n.getString("NAME"))).map(n -> n.getString("NAME")).collect(Collectors.joining("-"));
|
||||||
}
|
}
|
||||||
vector.put("INSPECTED_DEPARTMENT_NAMES",corp_infos);
|
vector.put("INSPECTED_DEPARTMENT_NAMES", corp_infos);
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
|
@ -91,15 +93,17 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**新增
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value = "/add")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:add")
|
@RequiresPermissions("safetyenvironmentalexplain:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -111,11 +115,11 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
pd.put("ACTION_USER", Jurisdiction.getName()); //操作人
|
pd.put("ACTION_USER", Jurisdiction.getName()); //操作人
|
||||||
pd.put("VALID","1");
|
pd.put("VALID", "1");
|
||||||
pd.put("ISPASS","0");
|
pd.put("ISPASS", "0");
|
||||||
if (StringUtils.isNotBlank(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"))) {
|
if (StringUtils.isNotBlank(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"))) {
|
||||||
MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"));
|
MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"));
|
||||||
String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -123,13 +127,13 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(img, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
Smb.sshSftp(img, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||||
|
|
||||||
pd.put("INSPECTED_SITEUSER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("INSPECTED_SITEUSER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -138,7 +142,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
//服务器
|
//服务器
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename());
|
pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename());
|
||||||
pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
@ -151,15 +155,17 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value = "/delete")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:del")
|
@RequiresPermissions("safetyenvironmentalexplain:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception {
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -170,15 +176,17 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value = "/edit")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:edit")
|
@RequiresPermissions("safetyenvironmentalexplain:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object edit() throws Exception{
|
public Object edit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -190,15 +198,17 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value = "/goEdit")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:edit")
|
@RequiresPermissions("safetyenvironmentalexplain:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -208,44 +218,48 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/deleteAll")
|
@RequestMapping(value = "/deleteAll")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:del")
|
@RequiresPermissions("safetyenvironmentalexplain:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if (Tools.notEmpty(DATA_IDS)) {
|
||||||
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
||||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||||
safetyenvironmentalexplainService.deleteAll(pd);
|
safetyenvironmentalexplainService.deleteAll(pd);
|
||||||
errInfo = "success";
|
errInfo = "success";
|
||||||
}else{
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/excel")
|
@RequestMapping(value = "/excel")
|
||||||
@RequiresPermissions("toExcel")
|
@RequiresPermissions("toExcel")
|
||||||
public ModelAndView exportExcel() throws Exception{
|
public ModelAndView exportExcel() throws Exception {
|
||||||
ModelAndView mv = new ModelAndView();
|
ModelAndView mv = new ModelAndView();
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
List<String> titles = new ArrayList<String>();
|
List<String> titles = new ArrayList<String>();
|
||||||
titles.add("安全环保检查ID"); //1
|
titles.add("安全环保检查ID"); //1
|
||||||
titles.add("申辩内容"); //2
|
titles.add("申辩内容"); //2
|
||||||
|
@ -259,7 +273,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
List<PageData> varOList = safetyenvironmentalexplainService.listAll(pd);
|
List<PageData> varOList = safetyenvironmentalexplainService.listAll(pd);
|
||||||
List<PageData> varList = new ArrayList<PageData>();
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
for(int i=0;i<varOList.size();i++){
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
PageData vpd = new PageData();
|
PageData vpd = new PageData();
|
||||||
vpd.put("var1", varOList.get(i).getString("INSPECTION_ID")); //1
|
vpd.put("var1", varOList.get(i).getString("INSPECTION_ID")); //1
|
||||||
vpd.put("var2", varOList.get(i).getString("INSPECTED_EXPLAIN")); //2
|
vpd.put("var2", varOList.get(i).getString("INSPECTED_EXPLAIN")); //2
|
||||||
|
@ -273,26 +287,28 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
}
|
}
|
||||||
dataMap.put("varList", varList);
|
dataMap.put("varList", varList);
|
||||||
ObjectExcelView erv = new ObjectExcelView();
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv, dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**查询安环检查是否有隐患
|
/**
|
||||||
|
* 查询安环检查是否有隐患
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/hiddencount")
|
@RequestMapping(value = "/hiddencount")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object hiddencount() throws Exception{
|
public Object hiddencount() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
List<PageData> hiddenlist = hiddenService.findByInspectionId(pd); //根据ID读取
|
List<PageData> hiddenlist = hiddenService.findByInspectionId(pd); //根据ID读取
|
||||||
if(hiddenlist.size()>0){
|
if (hiddenlist.size() > 0) {
|
||||||
map.put("hiddencount",'1');
|
map.put("hiddencount", '1');
|
||||||
} else {
|
} else {
|
||||||
map.put("hiddencount",'0');
|
map.put("hiddencount", '0');
|
||||||
}
|
}
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -37,41 +37,43 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
private DepartmentService departmentService;
|
private DepartmentService departmentService;
|
||||||
|
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/list")
|
@RequestMapping(value = "/list")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:list")
|
@RequiresPermissions("safetyenvironmentalinspector:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object list(Page page) throws Exception{
|
public Object list(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
pd.put("INSPECTION_USER_ID", Jurisdiction.getUSER_ID()); //检查人ID
|
pd.put("INSPECTION_USER_ID", Jurisdiction.getUSER_ID()); //检查人ID
|
||||||
Session session = Jurisdiction.getSession();
|
Session session = Jurisdiction.getSession();
|
||||||
User loginUser = (User)session.getAttribute(Const.SESSION_USER);
|
User loginUser = (User) session.getAttribute(Const.SESSION_USER);
|
||||||
if(null != loginUser){
|
if (null != loginUser) {
|
||||||
pd.put("supDeparIds",loginUser.getSuperviseDepartId());
|
pd.put("supDeparIds", loginUser.getSuperviseDepartId());
|
||||||
pd.put("roleLevel",loginUser.getRoleLevel());
|
pd.put("roleLevel", loginUser.getRoleLevel());
|
||||||
pd.put("loginUserId",loginUser.getUSER_ID());
|
pd.put("loginUserId", loginUser.getUSER_ID());
|
||||||
}
|
}
|
||||||
|
pd.put("loginUserId", Jurisdiction.getUSER_ID());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyenvironmentalinspectorService.list(page); //列出SafetyEnvironmentalInspector列表
|
List<PageData> varList = safetyenvironmentalinspectorService.list(page); //列出SafetyEnvironmentalInspector列表
|
||||||
for (PageData vector: varList) {
|
for (PageData vector : varList) {
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("DEPARTMENT_ID",vector.getString("INSPECTED_DEPARTMENT_ID"));
|
condition.put("DEPARTMENT_ID", vector.getString("INSPECTED_DEPARTMENT_ID"));
|
||||||
List<PageData> parent_list = departmentService.getGenealogy(condition);
|
List<PageData> parent_list = departmentService.getGenealogy(condition);
|
||||||
if (parent_list == null || parent_list.size() < 1) {
|
if (parent_list == null || parent_list.size() < 1) {
|
||||||
String corp_infos = "";
|
String corp_infos = "";
|
||||||
vector.put("INSPECTED_DEPARTMENT_NAMES", corp_infos);
|
vector.put("INSPECTED_DEPARTMENT_NAMES", corp_infos);
|
||||||
} else {
|
} else {
|
||||||
String corp_infos = parent_list.stream().map(n -> n.getString("NAME")).collect(Collectors.joining("-"));
|
String corp_infos = parent_list.stream().map(n -> n.getString("NAME")).collect(Collectors.joining("-"));
|
||||||
vector.put("INSPECTED_DEPARTMENT_NAMES",corp_infos);
|
vector.put("INSPECTED_DEPARTMENT_NAMES", corp_infos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -80,19 +82,21 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**检查人核实
|
/**
|
||||||
|
* 检查人核实
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/verify")
|
@RequestMapping(value = "/verify")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:add")
|
@RequiresPermissions("safetyenvironmentalinspector:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object verify() throws Exception{
|
public Object verify() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
PageData uBean= safetyenvironmentalinspectorService.findById(pd);
|
PageData uBean = safetyenvironmentalinspectorService.findById(pd);
|
||||||
uBean.put("INSPECTION_USER_OPINION", pd.getString("INSPECTION_USER_OPINION"));
|
uBean.put("INSPECTION_USER_OPINION", pd.getString("INSPECTION_USER_OPINION"));
|
||||||
uBean.put("INSPECTION_USER_SIGN_TIME", DateUtil.date2Str(new Date()));
|
uBean.put("INSPECTION_USER_SIGN_TIME", DateUtil.date2Str(new Date()));
|
||||||
uBean.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
uBean.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
|
@ -102,7 +106,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(pd.getString("INSPECTION_USER_SIGN_IMG"))) {
|
if (StringUtils.isNotBlank(pd.getString("INSPECTION_USER_SIGN_IMG"))) {
|
||||||
MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTION_USER_SIGN_IMG"));
|
MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTION_USER_SIGN_IMG"));
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -110,7 +114,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
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);
|
||||||
|
|
||||||
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
|
@ -122,24 +126,17 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**新增
|
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value = "/add")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:add")
|
@RequiresPermissions("safetyenvironmentalinspector:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object add() throws Exception{
|
public Object add() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -156,15 +153,17 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value = "/delete")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:del")
|
@RequiresPermissions("safetyenvironmentalinspector:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception {
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -175,15 +174,17 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value = "/edit")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:edit")
|
@RequiresPermissions("safetyenvironmentalinspector:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object edit() throws Exception{
|
public Object edit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -195,15 +196,17 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value = "/goEdit")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:edit")
|
@RequiresPermissions("safetyenvironmentalinspector:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -213,44 +216,48 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/deleteAll")
|
@RequestMapping(value = "/deleteAll")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:del")
|
@RequiresPermissions("safetyenvironmentalinspector:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if (Tools.notEmpty(DATA_IDS)) {
|
||||||
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
String[] ArrayDATA_IDS = DATA_IDS.split(",");
|
||||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||||
safetyenvironmentalinspectorService.deleteAll(pd);
|
safetyenvironmentalinspectorService.deleteAll(pd);
|
||||||
errInfo = "success";
|
errInfo = "success";
|
||||||
}else{
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/excel")
|
@RequestMapping(value = "/excel")
|
||||||
@RequiresPermissions("toExcel")
|
@RequiresPermissions("toExcel")
|
||||||
public ModelAndView exportExcel() throws Exception{
|
public ModelAndView exportExcel() throws Exception {
|
||||||
ModelAndView mv = new ModelAndView();
|
ModelAndView mv = new ModelAndView();
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
List<String> titles = new ArrayList<String>();
|
List<String> titles = new ArrayList<String>();
|
||||||
titles.add("安全环保检查ID"); //1
|
titles.add("安全环保检查ID"); //1
|
||||||
titles.add("检查人"); //2
|
titles.add("检查人"); //2
|
||||||
|
@ -267,7 +274,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
List<PageData> varOList = safetyenvironmentalinspectorService.listAll(pd);
|
List<PageData> varOList = safetyenvironmentalinspectorService.listAll(pd);
|
||||||
List<PageData> varList = new ArrayList<PageData>();
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
for(int i=0;i<varOList.size();i++){
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
PageData vpd = new PageData();
|
PageData vpd = new PageData();
|
||||||
vpd.put("var1", varOList.get(i).getString("INSPECTION_ID")); //1
|
vpd.put("var1", varOList.get(i).getString("INSPECTION_ID")); //1
|
||||||
vpd.put("var2", varOList.get(i).getString("INSPECTION_USER_ID")); //2
|
vpd.put("var2", varOList.get(i).getString("INSPECTION_USER_ID")); //2
|
||||||
|
@ -284,7 +291,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
}
|
}
|
||||||
dataMap.put("varList", varList);
|
dataMap.put("varList", varList);
|
||||||
ObjectExcelView erv = new ObjectExcelView();
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv, dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.zcloud.controller.messages;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.crypto.asymmetric.KeyType;
|
||||||
|
import cn.hutool.crypto.asymmetric.RSA;
|
||||||
|
import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
|
||||||
|
import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import com.zcloud.service.messages.MessagesService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.validation.ConstraintViolation;
|
||||||
|
import javax.validation.ConstraintViolationException;
|
||||||
|
import javax.validation.Validator;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/messages")
|
||||||
|
public class MessagesController {
|
||||||
|
|
||||||
|
private static final String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAI/0e9Q2v5Hi9j2BRHz2U/0skmjTX" +
|
||||||
|
"iqNsl/hEylAZdfA4vTdFT9VSf9Pl91MqTAVi1rTojLEQV/QLdGuqY/6bHyb0PL0A/4Lx0ddVRs3hNPmX32JD8HgPiRIxdXyzKkZHskvUg6gPYYPgzv" +
|
||||||
|
"OPWjxeVZz8QA4bDYUKr+X7WrEyu+bAgMBAAECgYAITF9Z0uDrmUoSyC5foIvwtsHAq2df8me7cWXIEkj5c7DBmjMDQevjloqz4s6H+CrFDOXqbkTK4" +
|
||||||
|
"xAytUWO1RbgaGhEJpVGHxxzml+npbI4KGbs11IVcaH70FJcL44gYyX+G+2aj372aykldUH56IwPO7Z8cV0WTTZaIel3D5NDKQJBAKN90RJ1dpiMROg" +
|
||||||
|
"qGChoshstpkEgRRdFBA26hmIeMaQZyrgzLGvcjEETo5zbzcwvSi5jMLK8FhlAquof3db8sBMCQQDhaMIaKfSmghrl3eBf7PxoXvmBNqWy7ZpmOWcA0" +
|
||||||
|
"GfvNdHc1NAsSw272CFl7cSwdI6DW9vu1ULZy5Iw6rJuyINZAkACzxiWfpopCM/uRTrhBtt4iBJBMDK/sZneOoQwj2A+94p6G7b5q3Jlc9btzQD+Lxn" +
|
||||||
|
"RLjcZ+w1OJcRJ/X4sQW8tAkEAvrSZ2/b5NNLInQguKBphppAL+iVY5VwfEDOqkMbB2GGpb3NhuMe7E90UzJ7wlPXYCQzzs0oc6BVSVy6Jzi646QJAP" +
|
||||||
|
"4uFZIPgEAGi4iw4uvio1URXVVwqTgIaqiQ/cJ8rpV2txiSdbEsGrR9V8QYPyxS//rVSK8JJAHVJGWRiuxZ24A==";
|
||||||
|
|
||||||
|
private final MessagesService service;
|
||||||
|
private final Validator validator;
|
||||||
|
|
||||||
|
@PostMapping(value = "/push")
|
||||||
|
public Map<String, Object> push(@RequestBody Map<String, Object> body) throws Exception {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
if (body == null || !body.containsKey("key") || !body.containsKey("value")) {
|
||||||
|
throw new RuntimeException("参数为空");
|
||||||
|
}
|
||||||
|
PushRecords pushRecords = JSON.parseObject(decrypt(body), PushRecords.class);
|
||||||
|
Set<ConstraintViolation<PushRecords>> validate = validator.validate(pushRecords);
|
||||||
|
if (!validate.isEmpty()) {
|
||||||
|
throw new ConstraintViolationException(validate);
|
||||||
|
}
|
||||||
|
// 校验 发送时间 距离当前时间不能超过6 秒
|
||||||
|
// if (DateUtil.betweenMs(DateUtil.parseDateTime(pushRecords.getSendTime()), new Date()) > 6000) {
|
||||||
|
// throw new RuntimeException("发送时间距离当前时间不能超过10 秒");
|
||||||
|
// }
|
||||||
|
service.push(pushRecords);
|
||||||
|
result.put("code", 0);
|
||||||
|
result.put("msg", "成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String decrypt(Map<String, Object> body) {
|
||||||
|
try {
|
||||||
|
RSA rsa = new RSA(MessagesController.privateKey, null);
|
||||||
|
byte[] aesKey = rsa.decrypt(Convert.toStr(body.get("key")), KeyType.PrivateKey);
|
||||||
|
SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, aesKey);
|
||||||
|
return aes.decryptStr(Convert.toStr(body.get("value")), StandardCharsets.UTF_8);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("对接消息接口解密失败", e);
|
||||||
|
throw new RuntimeException("解密失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.zcloud.controller.messages;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.messaging.handler.annotation.support.MethodArgumentNotValidException;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.FieldError;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
|
import javax.validation.ConstraintViolationException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestControllerAdvice(assignableTypes = MessagesController.class)
|
||||||
|
public class MessagesControllerExceptionHandler {
|
||||||
|
|
||||||
|
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||||
|
public Map<String, Object> handleMethodArgumentNotValidException(MethodArgumentNotValidException ex) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
BindingResult bindingResult = ex.getBindingResult();
|
||||||
|
StringBuilder sb = new StringBuilder("校验失败:");
|
||||||
|
for (FieldError fieldError : bindingResult.getFieldErrors()) {
|
||||||
|
sb.append(fieldError.getField()).append(":").append(fieldError.getDefaultMessage()).append(", ");
|
||||||
|
}
|
||||||
|
result.put("msg", sb.toString());
|
||||||
|
result.put("code", 500);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(ConstraintViolationException.class)
|
||||||
|
public Map<String, Object> handleConstraintViolationException(ConstraintViolationException ex) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("msg", ex.getMessage());
|
||||||
|
result.put("code", 500);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(RuntimeException.class)
|
||||||
|
public Map<String, Object> handleRuntimeException(RuntimeException ex) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("msg", ex.getMessage());
|
||||||
|
result.put("code", 500);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(Exception.class)
|
||||||
|
public Map<String, Object> handleRuntimeException(Exception ex) {
|
||||||
|
log.error("系统异常,请稍后重试", ex);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("msg", ex.getMessage());
|
||||||
|
result.put("code", 500);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -120,7 +120,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID",CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
|
|
||||||
//清单类型占比统计
|
//清单类型占比统计
|
||||||
List<PageData> chartData = listmanagerService.statisticsGroupType(pd);
|
List<PageData> chartData = listmanagerService.statisticsGroupType(pd);
|
||||||
|
@ -151,7 +151,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
for (int i = 0; i < legendData.size(); i++) {
|
for (int i = 0; i < legendData.size(); i++) {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID);
|
pd.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
pd.put("STATENAME",legendData.get(i));
|
pd.put("STATENAME", legendData.get(i));
|
||||||
List data = new ArrayList();
|
List data = new ArrayList();
|
||||||
List<PageData> hdRecChart = hiddenService.statisticsGroupMonthByState(pd); //根据状态按时间分组统计隐患数据
|
List<PageData> hdRecChart = hiddenService.statisticsGroupMonthByState(pd); //根据状态按时间分组统计隐患数据
|
||||||
for (int j = 0; j < halfYearMonth.size(); j++) {
|
for (int j = 0; j < halfYearMonth.size(); j++) {
|
||||||
|
@ -193,7 +193,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
Map<String, Object> chartData = new HashMap<String, Object>();
|
Map<String, Object> chartData = new HashMap<String, Object>();
|
||||||
List<PageData> deptList = riskpointService.listDeptByPoint(pd);
|
List<PageData> deptList = riskpointService.listDeptByPoint(pd);
|
||||||
List<String> yAxisData = new ArrayList<String>();
|
List<String> yAxisData = new ArrayList<String>();
|
||||||
for(PageData d :deptList){
|
for (PageData d : deptList) {
|
||||||
PageData pdf = new PageData();
|
PageData pdf = new PageData();
|
||||||
yAxisData.add(d.getString("DEPT_NAME"));
|
yAxisData.add(d.getString("DEPT_NAME"));
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
List<Dictionaries> varList = dictionariesService.listSubDictByParentId("5a81e63ec0e94d919b3138bc01dbef6b");
|
List<Dictionaries> varList = dictionariesService.listSubDictByParentId("5a81e63ec0e94d919b3138bc01dbef6b");
|
||||||
List<String> legendData = new ArrayList<String>();
|
List<String> legendData = new ArrayList<String>();
|
||||||
List seriesData = new ArrayList();
|
List seriesData = new ArrayList();
|
||||||
for(Dictionaries d :varList){
|
for (Dictionaries d : varList) {
|
||||||
PageData pdf = new PageData();
|
PageData pdf = new PageData();
|
||||||
legendData.add(d.getNAME());
|
legendData.add(d.getNAME());
|
||||||
seriesData.add(new ArrayList());
|
seriesData.add(new ArrayList());
|
||||||
|
@ -211,7 +211,7 @@ public class StatisticsDataController extends BaseController {
|
||||||
//隐患整改趋势(近半年)
|
//隐患整改趋势(近半年)
|
||||||
for (int i = 0; i < deptList.size(); i++) {
|
for (int i = 0; i < deptList.size(); i++) {
|
||||||
PageData dept = new PageData();
|
PageData dept = new PageData();
|
||||||
dept.put("DEPARTMENT_ID",deptList.get(i).getString("DEPARTMENT_ID"));
|
dept.put("DEPARTMENT_ID", deptList.get(i).getString("DEPARTMENT_ID"));
|
||||||
List<PageData> dataChart = riskpointService.statisticsGroupLevelByDept(dept); //按照级别分类统计各部门风险管控数据
|
List<PageData> dataChart = riskpointService.statisticsGroupLevelByDept(dept); //按照级别分类统计各部门风险管控数据
|
||||||
for (int j = 0; j < varList.size(); j++) {
|
for (int j = 0; j < varList.size(); j++) {
|
||||||
List secondList = (List) seriesData.get(j);
|
List secondList = (List) seriesData.get(j);
|
||||||
|
@ -345,17 +345,19 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**数据可视化平台首页获取
|
/**
|
||||||
|
* 数据可视化平台首页获取
|
||||||
* 1.获取企业的置顶视频
|
* 1.获取企业的置顶视频
|
||||||
* 2.获取管理的置顶视频
|
* 2.获取管理的置顶视频
|
||||||
* 3.没有视频或者没有置顶视频
|
* 3.没有视频或者没有置顶视频
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/getObjectForBiLogin")
|
@RequestMapping(value = "/getObjectForBiLogin")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getObjectForBiLogin() throws Exception{
|
public Object getObjectForBiLogin() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("TYPE", "1");
|
pd.put("TYPE", "1");
|
||||||
|
@ -373,14 +375,16 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取重大危险源数据
|
/**
|
||||||
|
* 获取重大危险源数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/findValidateData")
|
@RequestMapping(value = "/findValidateData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object findValidateData() throws Exception{
|
public Object findValidateData() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
List<PageData> varList = majordangersourcedisposalService.listAll(pd); //根据ID读取
|
List<PageData> varList = majordangersourcedisposalService.listAll(pd); //根据ID读取
|
||||||
|
@ -654,14 +658,16 @@ public class StatisticsDataController extends BaseController {
|
||||||
return lastDayOfMonth;
|
return lastDayOfMonth;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**首页 获取折线图
|
/**
|
||||||
|
* 首页 获取折线图
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/listmanagerIndexCount")
|
@RequestMapping(value = "/listmanagerIndexCount")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listmanagerIndexCount() throws Exception{
|
public Object listmanagerIndexCount() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
||||||
|
@ -672,30 +678,30 @@ public class StatisticsDataController extends BaseController {
|
||||||
// {months: "2022-06", count: 0, screenType: "riskChecklistType0001"}
|
// {months: "2022-06", count: 0, screenType: "riskChecklistType0001"}
|
||||||
// 6 * 3 近6個月 ,3 三种类型
|
// 6 * 3 近6個月 ,3 三种类型
|
||||||
|
|
||||||
Map<String,String> monSCrMap = new HashMap<>();
|
Map<String, String> monSCrMap = new HashMap<>();
|
||||||
for (PageData pageData : valList){
|
for (PageData pageData : valList) {
|
||||||
String key = pageData.getString("months")+"*"+pageData.getString("screenType");
|
String key = pageData.getString("months") + "*" + pageData.getString("screenType");
|
||||||
monSCrMap.put(key,pageData.getString("count"));
|
monSCrMap.put(key, pageData.getString("count"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<String> halfYearMonth = DateUtil.getHalfYearMonth(true);
|
List<String> halfYearMonth = DateUtil.getHalfYearMonth(true);
|
||||||
String [] typeAll = new String[]{"riskChecklistType0001","riskChecklistType0002","zhqd03"};
|
String[] typeAll = new String[]{"riskChecklistType0001", "riskChecklistType0002", "zhqd03"};
|
||||||
|
|
||||||
|
|
||||||
List<Map<String,Object>> list = new ArrayList<>(); // 整理完成的数据 size 6 * 3
|
List<Map<String, Object>> list = new ArrayList<>(); // 整理完成的数据 size 6 * 3
|
||||||
for(String month : halfYearMonth){
|
for (String month : halfYearMonth) {
|
||||||
for (String type : typeAll){
|
for (String type : typeAll) {
|
||||||
String count = "0";
|
String count = "0";
|
||||||
|
|
||||||
String key = month +"*" + type;
|
String key = month + "*" + type;
|
||||||
if (monSCrMap.containsKey(key)){
|
if (monSCrMap.containsKey(key)) {
|
||||||
count = monSCrMap.get(key);
|
count = monSCrMap.get(key);
|
||||||
}
|
}
|
||||||
Map<String,Object> monAndType = new HashMap<>();
|
Map<String, Object> monAndType = new HashMap<>();
|
||||||
monAndType.put("months",month);
|
monAndType.put("months", month);
|
||||||
monAndType.put("screenType",type);
|
monAndType.put("screenType", type);
|
||||||
monAndType.put("count",count);
|
monAndType.put("count", count);
|
||||||
list.add(monAndType);
|
list.add(monAndType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -867,14 +873,16 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**平台公告
|
/**
|
||||||
|
* 平台公告
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/listByIndex")
|
@RequestMapping(value = "/listByIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listByIndex(Page page) throws Exception{
|
public Object listByIndex(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
//获取发布给这个企业的信息
|
//获取发布给这个企业的信息
|
||||||
|
@ -888,18 +896,20 @@ public class StatisticsDataController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**企业公告
|
/**
|
||||||
|
* 企业公告
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/enterpriseListByIndex")
|
@RequestMapping(value = "/enterpriseListByIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object enterpriseListByIndex(Page page) throws Exception{
|
public Object enterpriseListByIndex(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
pd.put("USER_ID", USER_ID);
|
pd.put("USER_ID", USER_ID);
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = noticecorpService.listByIndex(page); //列出NOTICECORP列表
|
List<PageData> varList = noticecorpService.listByIndex(page); //列出NOTICECORP列表
|
||||||
|
@ -910,35 +920,37 @@ public class StatisticsDataController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**清單列表
|
/**
|
||||||
|
* 清單列表
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/checkListIndex")
|
@RequestMapping(value = "/checkListIndex")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object checkListIndex() throws Exception{
|
public Object checkListIndex() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
pd.put("CORPINFO_ID", CORPINFO_ID); //企业
|
||||||
pd.put("USER_ID",USER_ID);
|
pd.put("USER_ID", USER_ID);
|
||||||
pd.put("DEPARTMENT_ID", DEPT_ID);
|
pd.put("DEPARTMENT_ID", DEPT_ID);
|
||||||
|
|
||||||
pd.put("USER_ID","");
|
pd.put("USER_ID", "");
|
||||||
List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
|
List<PageData> varList = listmanagerService.listAll(pd); //列出ListManager列表
|
||||||
int wjcNum = 0;
|
int wjcNum = 0;
|
||||||
int yjcNum = 0;
|
int yjcNum = 0;
|
||||||
for (PageData list : varList) {
|
for (PageData list : varList) {
|
||||||
if(list.getString("TYPE").equals("listType0005")) {
|
if (list.getString("TYPE").equals("listType0005")) {
|
||||||
if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
if (Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
||||||
yjcNum++;
|
yjcNum++;
|
||||||
} else {
|
} else {
|
||||||
wjcNum++;
|
wjcNum++;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
if (Integer.parseInt(list.get("checkCount").toString()) > 0) {
|
||||||
yjcNum++;
|
yjcNum++;
|
||||||
} else {
|
} else {
|
||||||
wjcNum++;
|
wjcNum++;
|
||||||
|
|
|
@ -1,50 +1,26 @@
|
||||||
package com.zcloud.controller.system;
|
package com.zcloud.controller.system;
|
||||||
|
|
||||||
import java.util.*;
|
import com.zcloud.controller.base.BaseController;
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.zcloud.entity.system.User;
|
||||||
|
import com.zcloud.service.bus.CorpInfoService;
|
||||||
|
import com.zcloud.service.bus.OffDutyService;
|
||||||
import com.zcloud.service.system.*;
|
import com.zcloud.service.system.*;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.http.HttpEntity;
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.entity.ContentType;
|
|
||||||
import org.apache.http.entity.StringEntity;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
|
||||||
import org.apache.http.impl.client.HttpClients;
|
|
||||||
import org.apache.http.message.BasicNameValuePair;
|
|
||||||
import org.apache.http.protocol.HTTP;
|
|
||||||
import org.apache.http.util.EntityUtils;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.*;
|
||||||
import org.apache.shiro.authc.DisabledAccountException;
|
|
||||||
import org.apache.shiro.authc.ExcessiveAttemptsException;
|
|
||||||
import org.apache.shiro.authc.IncorrectCredentialsException;
|
|
||||||
import org.apache.shiro.authc.LockedAccountException;
|
|
||||||
import org.apache.shiro.authc.UnknownAccountException;
|
|
||||||
import org.apache.shiro.authc.UsernamePasswordToken;
|
|
||||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
import org.apache.shiro.session.Session;
|
import org.apache.shiro.session.Session;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import java.util.*;
|
||||||
import com.zcloud.controller.base.BaseController;
|
|
||||||
import com.zcloud.entity.PageData;
|
|
||||||
import com.zcloud.entity.system.Role;
|
|
||||||
import com.zcloud.entity.system.User;
|
|
||||||
import com.zcloud.service.bus.CorpInfoService;
|
|
||||||
import com.zcloud.service.bus.OffDutyService;
|
|
||||||
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:登录处理类
|
* 说明:登录处理类
|
||||||
|
@ -177,6 +153,7 @@ public class LoginController extends BaseController {
|
||||||
} catch (AuthenticationException ae) {
|
} catch (AuthenticationException ae) {
|
||||||
errInfo = "usererror";
|
errInfo = "usererror";
|
||||||
}
|
}
|
||||||
|
Integer port = SpringUtil.getApplicationContext().getEnvironment().getProperty("server.port", Integer.class);
|
||||||
if (subject.isAuthenticated()) { //验证是否登录成功
|
if (subject.isAuthenticated()) { //验证是否登录成功
|
||||||
removeSession(USERNAME);
|
removeSession(USERNAME);
|
||||||
|
|
||||||
|
@ -201,7 +178,8 @@ public class LoginController extends BaseController {
|
||||||
if (backEndPath.get("result").toString().equals("success")) {
|
if (backEndPath.get("result").toString().equals("success")) {
|
||||||
backEndPath.put("baseImgPath",map.get("baseImgPath").toString());
|
backEndPath.put("baseImgPath",map.get("baseImgPath").toString());
|
||||||
backEndPath.put("USER_IDENTITY",map.get("USER_IDENTITY").toString());
|
backEndPath.put("USER_IDENTITY",map.get("USER_IDENTITY").toString());
|
||||||
backEndPath.put("BACKENDADDR", map.get("BACKENDADDR").toString());
|
|
||||||
|
backEndPath.put("BACKENDADDR", "http://" + ip + ":" + port + "/");
|
||||||
System.out.println("登录返回参数:" + backEndPath);
|
System.out.println("登录返回参数:" + backEndPath);
|
||||||
return backEndPath;
|
return backEndPath;
|
||||||
} else {
|
} else {
|
||||||
|
@ -212,6 +190,7 @@ public class LoginController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
map.put("BACKENDADDR", "http://" + ip + ":" + port + "/");
|
||||||
if ("99".equals(pd.getString("STATUS"))) {
|
if ("99".equals(pd.getString("STATUS"))) {
|
||||||
errInfo = "userlock";
|
errInfo = "userlock";
|
||||||
map.put("result", "fail");
|
map.put("result", "fail");
|
||||||
|
|
|
@ -1,30 +1,25 @@
|
||||||
package com.zcloud.controller.xgf;
|
package com.zcloud.controller.xgf;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.service.bus.CorpInfoService;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.system.DepartmentService;
|
import com.zcloud.service.system.DepartmentService;
|
||||||
|
import com.zcloud.util.DateUtil;
|
||||||
|
import com.zcloud.util.HttpClientService;
|
||||||
|
import com.zcloud.util.Jurisdiction;
|
||||||
import com.zcloud.util.ObjectExcelView;
|
import com.zcloud.util.ObjectExcelView;
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
|
||||||
import com.zcloud.entity.PageData;
|
|
||||||
import com.zcloud.util.DateUtil;
|
|
||||||
import com.zcloud.util.HttpClientService;
|
|
||||||
import com.zcloud.util.Jurisdiction;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/xgf/corp")
|
@RequestMapping("/xgf/corp")
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package com.zcloud.entity.accident;
|
package com.zcloud.entity.accident;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -35,6 +39,11 @@ public class AccidentRecords implements Serializable {
|
||||||
@Size(max = 100, message = "事故名称最大长度要小于 100")
|
@Size(max = 100, message = "事故名称最大长度要小于 100")
|
||||||
private String incidentName;
|
private String incidentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1事件/2事故
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事故类型
|
* 事故类型
|
||||||
*/
|
*/
|
||||||
|
@ -106,6 +115,11 @@ public class AccidentRecords implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String photos;
|
private String photos;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String attachmentAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原因分析及责任认定
|
* 原因分析及责任认定
|
||||||
*/
|
*/
|
||||||
|
@ -162,6 +176,37 @@ public class AccidentRecords implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public AccidentRecords(PageData data) {
|
||||||
|
setIncidentNumber(data.getString("incidentNumber"));
|
||||||
|
setId(data.getString("id"));
|
||||||
|
setIncidentName(data.getString("incidentName"));
|
||||||
|
setIncidentType(data.getString("incidentType"));
|
||||||
|
setIncidentLevel(data.getString("incidentLevel"));
|
||||||
|
setLocation(data.getString("location"));
|
||||||
|
setFatalities(toInt(data.get("fatalities")));
|
||||||
|
DateTime time = DateUtil.parse(data.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
setIncidentDate(time);
|
||||||
|
DateTime time1 = DateUtil.parse(data.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
setReportDate(time1);
|
||||||
|
setDirectLoss(toInt(data.get("directLoss")));
|
||||||
|
setInjured(toInt(data.get("injured")));
|
||||||
|
setSeriouslyInjured(toInt(data.get("seriouslyInjured")));
|
||||||
|
setCause(data.getString("cause"));
|
||||||
|
setSummary(data.getString("summary"));
|
||||||
|
setAnalysis(data.getString("analysis"));
|
||||||
|
setAttachmentAddress(data.getString("attachmentAddress"));
|
||||||
|
setType(data.getString("type"));
|
||||||
|
setSuggestions(data.getString("suggestions"));
|
||||||
|
setMeasures(data.getString("measures"));
|
||||||
|
setCreator(data.getString("creator"));
|
||||||
|
setPhotos(data.getString("photos"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer toInt(Object object) {
|
||||||
|
Integer i = Convert.toInt(object);
|
||||||
|
return i == null ? 0 : i;
|
||||||
|
}
|
||||||
|
|
||||||
// public AccidentRecords(AccidentRecordsExcel reader, DictionariesService service) throws Exception {
|
// public AccidentRecords(AccidentRecordsExcel reader, DictionariesService service) throws Exception {
|
||||||
// this.id = IdUtil.getSnowflake(1, 1).nextId();
|
// this.id = IdUtil.getSnowflake(1, 1).nextId();
|
||||||
// this.corpinfoId = reader.getCompanyName();
|
// this.corpinfoId = reader.getCompanyName();
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.zcloud.entity.messages;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PushRecords implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@NotBlank(message = "要发送人的手机号不能为空")
|
||||||
|
@Length(min = 1, max = 12, message = "手机号长度为1-11位")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@Length(max = 255, message = "消息标题长度不能大于255")
|
||||||
|
private String messageTitle;
|
||||||
|
|
||||||
|
@NotBlank(message = "消息内容不能为空")
|
||||||
|
@Length(max = 255, message = "消息内容长度不能大于255")
|
||||||
|
private String messageContent;
|
||||||
|
|
||||||
|
@NotNull(message = "消息类型不能为空")
|
||||||
|
@Range(min = 1, max = 3, message = "消息类型只能是1或2或3")
|
||||||
|
private Integer messageType;
|
||||||
|
|
||||||
|
@NotBlank(message = "发送时间不能为空")
|
||||||
|
private String sendTime;
|
||||||
|
|
||||||
|
private Integer state;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.zcloud.mapper.datasource.messages;
|
||||||
|
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface MessagesMapper {
|
||||||
|
void install(PushRecords pushRecords);
|
||||||
|
|
||||||
|
String findUserIdByPhone(@Param("phone") String phone);
|
||||||
|
|
||||||
|
void updateById(PushRecords pushRecords);
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package com.zcloud.service.accident;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.entity.accident.AccidentRecords;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -28,16 +29,16 @@ public interface AccidentRecordsService {
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
* @param pageData 要保存的实体
|
* @param accidentRecords 要保存的实体
|
||||||
*/
|
*/
|
||||||
void save(PageData pageData);
|
void save(AccidentRecords accidentRecords);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*
|
*
|
||||||
* @param bean 要修改的实体
|
* @param accidentRecords 要修改的实体
|
||||||
*/
|
*/
|
||||||
void update(PageData pageData);
|
void update(AccidentRecords accidentRecords);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package com.zcloud.service.accident.impl;
|
package com.zcloud.service.accident.impl;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
@ -59,69 +57,23 @@ public class AccidentRecordsServiceImpl implements AccidentRecordsService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(PageData pageData) {
|
public void save(AccidentRecords accidentRecords) {
|
||||||
AccidentRecords accidentRecords = new AccidentRecords();
|
|
||||||
accidentRecords.setId(IdUtil.fastSimpleUUID());
|
accidentRecords.setId(IdUtil.fastSimpleUUID());
|
||||||
accidentRecords.setCreatedBy(Jurisdiction.getUsername());
|
accidentRecords.setCreatedBy(Jurisdiction.getUsername());
|
||||||
|
|
||||||
accidentRecords.setIsDeleted(0);
|
accidentRecords.setIsDeleted(0);
|
||||||
String corpinfoId = StrUtil.isEmpty(accidentRecords.getCorpinfoId()) ? Jurisdiction.getCORPINFO_ID() : accidentRecords.getCorpinfoId();
|
String corpinfoId = StrUtil.isEmpty(accidentRecords.getCorpinfoId()) ? Jurisdiction.getCORPINFO_ID() : accidentRecords.getCorpinfoId();
|
||||||
accidentRecords.setCorpinfoId(corpinfoId);
|
accidentRecords.setCorpinfoId(corpinfoId);
|
||||||
accidentRecords.setIncidentNumber(pageData.getString("incidentNumber"));
|
accidentRecords.setCreatedTime(new Date());
|
||||||
accidentRecords.setIncidentName(pageData.getString("incidentName"));
|
|
||||||
accidentRecords.setIncidentType(pageData.getString("incidentType"));
|
|
||||||
accidentRecords.setIncidentLevel(pageData.getString("incidentLevel"));
|
|
||||||
accidentRecords.setLocation(pageData.getString("location"));
|
|
||||||
accidentRecords.setFatalities(Convert.toInt(pageData.get("fatalities")));
|
|
||||||
|
|
||||||
DateTime time = DateUtil.parse(pageData.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
|
||||||
accidentRecords.setIncidentDate(time);
|
|
||||||
DateTime time1 = DateUtil.parse(pageData.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
|
||||||
accidentRecords.setReportDate(time1);
|
|
||||||
|
|
||||||
accidentRecords.setDirectLoss(Convert.toInt(pageData.get("directLoss")));
|
|
||||||
accidentRecords.setInjured(Convert.toInt(pageData.get("injured")));
|
|
||||||
accidentRecords.setSeriouslyInjured(Convert.toInt(pageData.get("seriouslyInjured")));
|
|
||||||
accidentRecords.setCause(pageData.getString("cause"));
|
|
||||||
accidentRecords.setSummary(pageData.getString("summary"));
|
|
||||||
accidentRecords.setAnalysis(pageData.getString("analysis"));
|
|
||||||
accidentRecords.setSuggestions(pageData.getString("suggestions"));
|
|
||||||
accidentRecords.setMeasures(pageData.getString("measures"));
|
|
||||||
accidentRecords.setCreator(pageData.getString("creator"));
|
|
||||||
accidentRecords.setPhotos(pageData.getString("photos"));
|
|
||||||
Assert.isTrue(accidentRecordsMapper.save(accidentRecords) == 1, "新增事故记录失败");
|
Assert.isTrue(accidentRecordsMapper.save(accidentRecords) == 1, "新增事故记录失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void update(PageData pageData) {
|
public void update(AccidentRecords accidentRecords) {
|
||||||
AccidentRecords accidentRecords = new AccidentRecords();
|
|
||||||
accidentRecords.setIncidentNumber(pageData.getString("incidentNumber"));
|
|
||||||
accidentRecords.setId(pageData.getString("id"));
|
|
||||||
accidentRecords.setIncidentName(pageData.getString("incidentName"));
|
|
||||||
accidentRecords.setIncidentType(pageData.getString("incidentType"));
|
|
||||||
accidentRecords.setIncidentLevel(pageData.getString("incidentLevel"));
|
|
||||||
accidentRecords.setLocation(pageData.getString("location"));
|
|
||||||
accidentRecords.setFatalities(Convert.toInt(pageData.get("fatalities")));
|
|
||||||
|
|
||||||
DateTime time = DateUtil.parse(pageData.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
|
||||||
accidentRecords.setIncidentDate(time);
|
|
||||||
DateTime time1 = DateUtil.parse(pageData.getString("incidentDate"), "yyyy-MM-dd HH:mm:ss");
|
|
||||||
accidentRecords.setReportDate(time1);
|
|
||||||
|
|
||||||
accidentRecords.setDirectLoss(Convert.toInt(pageData.get("directLoss")));
|
|
||||||
accidentRecords.setInjured(Convert.toInt(pageData.get("injured")));
|
|
||||||
accidentRecords.setSeriouslyInjured(Convert.toInt(pageData.get("seriouslyInjured")));
|
|
||||||
accidentRecords.setCause(pageData.getString("cause"));
|
|
||||||
accidentRecords.setSummary(pageData.getString("summary"));
|
|
||||||
accidentRecords.setAnalysis(pageData.getString("analysis"));
|
|
||||||
accidentRecords.setSuggestions(pageData.getString("suggestions"));
|
|
||||||
accidentRecords.setMeasures(pageData.getString("measures"));
|
|
||||||
accidentRecords.setCreator(pageData.getString("creator"));
|
|
||||||
accidentRecords.setPhotos(pageData.getString("creator"));
|
|
||||||
accidentRecords.setUpdatedBy(Jurisdiction.getUsername());
|
accidentRecords.setUpdatedBy(Jurisdiction.getUsername());
|
||||||
accidentRecords.setUpdatedTime(new Date());
|
accidentRecords.setUpdatedTime(new Date());
|
||||||
accidentRecords.setPhotos(pageData.getString("photos") == null ? null : pageData.getString("photos"));
|
// 不支持修改类型
|
||||||
|
accidentRecords.setType(null);
|
||||||
String corpinfoId = StrUtil.isEmpty(accidentRecords.getCorpinfoId()) ? Jurisdiction.getCORPINFO_ID() : accidentRecords.getCorpinfoId();
|
String corpinfoId = StrUtil.isEmpty(accidentRecords.getCorpinfoId()) ? Jurisdiction.getCORPINFO_ID() : accidentRecords.getCorpinfoId();
|
||||||
accidentRecords.setCorpinfoId(corpinfoId);
|
accidentRecords.setCorpinfoId(corpinfoId);
|
||||||
Assert.isTrue(accidentRecordsMapper.updateById(accidentRecords) == 1, "更新事故记录失败");
|
Assert.isTrue(accidentRecordsMapper.updateById(accidentRecords) == 1, "更新事故记录失败");
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package com.zcloud.service.bus.impl;
|
package com.zcloud.service.bus.impl;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.service.bus.CorpInfoService;
|
import com.zcloud.service.bus.CorpInfoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:企业管理
|
* 说明:企业管理
|
||||||
|
@ -83,7 +84,7 @@ public class CorpInfoServiceImpl implements CorpInfoService{
|
||||||
*/
|
*/
|
||||||
public PageData findById(PageData pd)throws Exception{
|
public PageData findById(PageData pd)throws Exception{
|
||||||
PageData byId = corpinfoMapper.findById(pd);
|
PageData byId = corpinfoMapper.findById(pd);
|
||||||
if (byId.get("FOURTYPE") != null) {
|
if (byId != null && byId.get("FOURTYPE") != null) {
|
||||||
String fourtype = byId.get("FOURTYPE").toString();
|
String fourtype = byId.get("FOURTYPE").toString();
|
||||||
byId.put("FOURTYPE", fourtype);
|
byId.put("FOURTYPE", fourtype);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,100 +11,128 @@ import java.util.List;
|
||||||
* 时间:2022-06-08
|
* 时间:2022-06-08
|
||||||
* 官网:www.zcloudchina.com
|
* 官网:www.zcloudchina.com
|
||||||
*/
|
*/
|
||||||
public interface SafetyEnvironmentalService{
|
public interface SafetyEnvironmentalService {
|
||||||
List<PageData> getHiddenCountByDepat (PageData pd) throws Exception;
|
List<PageData> getHiddenCountByDepat(PageData pd) throws Exception;
|
||||||
List<PageData> getHiddenCountByUser (PageData pd) throws Exception;
|
|
||||||
/**新增
|
|
||||||
* @param pd
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public List<PageData> save(PageData pd)throws Exception;
|
|
||||||
|
|
||||||
/**删除
|
List<PageData> getHiddenCountByUser(PageData pd) throws Exception;
|
||||||
* @param pd
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public void delete(PageData pd)throws Exception;
|
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<PageData> edit(PageData pd)throws Exception;
|
public List<PageData> save(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void edieditsttust(PageData pd)throws Exception; //执行考评方法时,将检查状态改成已归档,因为bug6535提出,要是隐患考评完毕,状态应该是8已归档
|
public void delete(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
* @param page
|
* 修改
|
||||||
|
*
|
||||||
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<PageData> list(Page page)throws Exception;
|
public List<PageData> edit(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**列表(全部)
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<PageData> listAll(PageData pd)throws Exception;
|
public void edieditsttust(PageData pd) throws Exception; //执行考评方法时,将检查状态改成已归档,因为bug6535提出,要是隐患考评完毕,状态应该是8已归档
|
||||||
|
|
||||||
/**列表(全部)
|
/**
|
||||||
* @param pd
|
* 列表
|
||||||
* @throws Exception
|
*
|
||||||
|
* @param page 分页数据和条件
|
||||||
|
* @throws Exception 可能存在的异常
|
||||||
*/
|
*/
|
||||||
public List<PageData> findByyin(PageData pd)throws Exception;
|
List<PageData> list(Page page) throws Exception;
|
||||||
/**通过id获取数据
|
|
||||||
* @param pd
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public PageData findById(PageData pd)throws Exception;
|
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 列表(全部)
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void deleteAll(PageData pd)throws Exception;
|
public List<PageData> listAll(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**列表(根据所选ID获取数据)
|
/**
|
||||||
|
* 列表(全部)
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
List<PageData> findByIds(PageData pd)throws Exception;
|
public List<PageData> findByyin(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id获取数据
|
||||||
|
*
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData findById(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void deleteAll(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表(根据所选ID获取数据)
|
||||||
|
*
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
List<PageData> findByIds(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新检查进度状态
|
* 更新检查进度状态
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
*/
|
*/
|
||||||
void editStatus(PageData pd)throws Exception;
|
void editStatus(PageData pd) throws Exception;
|
||||||
|
|
||||||
PageData findShowById(PageData pd)throws Exception;
|
PageData findShowById(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取检查所有相关信息
|
* 获取检查所有相关信息
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
PageData findFormById(PageData pd)throws Exception;
|
PageData findFormById(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 申辩不成立时归档
|
* 申辩不成立时归档
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
void explain(PageData pd)throws Exception;
|
void explain(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分公司安全环保检查考核分数统计
|
* 分公司安全环保检查考核分数统计
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData statisticsBranch(PageData pd)throws Exception;
|
PageData statisticsBranch(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表(股份公司安全环保检查考核分数统计)
|
* 列表(股份公司安全环保检查考核分数统计)
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -113,31 +141,34 @@ public interface SafetyEnvironmentalService{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 被检查人签字/申辩数
|
* 被检查人签字/申辩数
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData checkedCount (PageData pd)throws Exception;
|
PageData checkedCount(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打回数
|
* 打回数
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData repulseCount (PageData pd)throws Exception;
|
PageData repulseCount(PageData pd) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指派+验收数
|
* 指派+验收数
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData repulseAndCheckCountCount (PageData pd)throws Exception;
|
PageData repulseAndCheckCountCount(PageData pd) throws Exception;
|
||||||
|
|
||||||
List<PageData> pleadList(Page page) throws Exception;
|
List<PageData> pleadList(Page page) throws Exception;
|
||||||
|
|
||||||
List<PageData> checkList(Page page) ;
|
List<PageData> checkList(Page page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* description: 公司层级工具类
|
* description: 公司层级工具类
|
||||||
|
@ -147,8 +178,10 @@ public interface SafetyEnvironmentalService{
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData departmentUtil(PageData data) throws Exception;
|
PageData departmentUtil(PageData data) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有的安全环保信息
|
* 获取所有的安全环保信息
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -156,13 +189,15 @@ public interface SafetyEnvironmentalService{
|
||||||
List<PageData> statisticsBranchGroupDept(PageData pd) throws Exception;
|
List<PageData> statisticsBranchGroupDept(PageData pd) throws Exception;
|
||||||
|
|
||||||
String getHiddenTotal(Page page);
|
String getHiddenTotal(Page page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指派+验收数 验收数据错误,原来可以查询已经验收数据
|
* 指派+验收数 验收数据错误,原来可以查询已经验收数据
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData repulseAndCheckCountCountV2 (PageData pd)throws Exception;
|
PageData repulseAndCheckCountCountV2(PageData pd) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,9 +466,11 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
return hiddenList;
|
return hiddenList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
* @param page
|
* 列表
|
||||||
* @throws Exception
|
*
|
||||||
|
* @param page 分页数据和条件
|
||||||
|
* @throws Exception 可能存在的异常
|
||||||
*/
|
*/
|
||||||
public List<PageData> list(Page page)throws Exception{
|
public List<PageData> list(Page page)throws Exception{
|
||||||
return safetyenvironmentalMapper.datalistPage(page);
|
return safetyenvironmentalMapper.datalistPage(page);
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.zcloud.service.messages;
|
||||||
|
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
|
||||||
|
public interface MessagesService {
|
||||||
|
|
||||||
|
void push(PushRecords pushRecords) throws Exception;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.zcloud.service.messages;
|
||||||
|
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息接口
|
||||||
|
*/
|
||||||
|
public interface PushMessages {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息
|
||||||
|
*
|
||||||
|
* @param pushRecords 消息实体
|
||||||
|
* @param userId 用户id
|
||||||
|
*/
|
||||||
|
void push(PushRecords pushRecords, String userId) throws Exception;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.zcloud.service.messages.impl;
|
||||||
|
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import com.zcloud.service.messages.PushMessages;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送站内信
|
||||||
|
*/
|
||||||
|
@Component("messages3")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AllMessagesImpl implements PushMessages {
|
||||||
|
|
||||||
|
private final InsideMessagesImpl insideMessages;
|
||||||
|
private final SmsMessagesImpl smsMessages;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void push(PushRecords pushRecords, String userId) throws Exception {
|
||||||
|
insideMessages.push(pushRecords, userId);
|
||||||
|
smsMessages.push(pushRecords, userId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.zcloud.service.messages.impl;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import com.zcloud.service.bus.NoticeCorpService;
|
||||||
|
import com.zcloud.service.messages.PushMessages;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送站内信
|
||||||
|
*/
|
||||||
|
@Component("messages2")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class InsideMessagesImpl implements PushMessages {
|
||||||
|
|
||||||
|
private final NoticeCorpService noticeCorpService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void push(PushRecords pushRecords, String userId) throws Exception {
|
||||||
|
PageData mes = new PageData();
|
||||||
|
mes.put("BIANMA", "PUSH_RECORDS");
|
||||||
|
mes.put("SENDER_ID", "九公司应急管理");
|
||||||
|
mes.put("SENDER_NAME", "九公司应急管理");
|
||||||
|
mes.put("SYNOPSIS", pushRecords.getMessageTitle());
|
||||||
|
mes.put("CORPINFO_ID", "48a8ca9815814c979814ddcf041c5cd5");
|
||||||
|
mes.put("RECEIVER_ID", userId);
|
||||||
|
PageData content = new PageData();
|
||||||
|
content.put("msg", pushRecords.getMessageContent());
|
||||||
|
mes.put("CONTENT", content);// 站内信内容
|
||||||
|
noticeCorpService.sendNotice(mes);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.zcloud.service.messages.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import com.zcloud.mapper.datasource.messages.MessagesMapper;
|
||||||
|
import com.zcloud.service.messages.MessagesService;
|
||||||
|
import com.zcloud.service.messages.PushMessages;
|
||||||
|
import com.zcloud.util.DateUtil;
|
||||||
|
import com.zcloud.util.UuidUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class MessagesServiceImpl implements MessagesService {
|
||||||
|
|
||||||
|
private final MessagesMapper mapper;
|
||||||
|
private final Map<String, PushMessages> messages;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void push(PushRecords pushRecords) throws Exception {
|
||||||
|
// 先记录数据
|
||||||
|
pushRecords.setId(UuidUtil.get32UUID());
|
||||||
|
pushRecords.setSendTime(DateUtil.getTime());
|
||||||
|
pushRecords.setState(1);
|
||||||
|
mapper.install(pushRecords);
|
||||||
|
// 根据手机号查找用户id
|
||||||
|
String userId = mapper.findUserIdByPhone(pushRecords.getPhone());
|
||||||
|
if (StrUtil.isEmpty(userId)) {
|
||||||
|
throw new RuntimeException("该用户不存在");
|
||||||
|
}
|
||||||
|
// 调用对应消息推送实现
|
||||||
|
Integer type = pushRecords.getMessageType();
|
||||||
|
PushMessages pushMessages = messages.get("messages" + type);
|
||||||
|
pushMessages.push(pushRecords, userId);
|
||||||
|
// 修改状态
|
||||||
|
pushRecords.setState(2);
|
||||||
|
mapper.updateById(pushRecords);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.zcloud.service.messages.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zcloud.entity.messages.PushRecords;
|
||||||
|
import com.zcloud.service.messages.PushMessages;
|
||||||
|
import com.zcloud.util.SendSmsUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送短信
|
||||||
|
*/
|
||||||
|
@Component("messages1")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SmsMessagesImpl implements PushMessages {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void push(PushRecords pushRecords, String userId) throws ParseException {
|
||||||
|
JSONObject object = new JSONObject();
|
||||||
|
object.put("messageContent", pushRecords.getMessageContent());
|
||||||
|
// todo 应该是短信模版tpId 没有 别的OK了
|
||||||
|
if (!SendSmsUtil.sendSms(null, object, pushRecords.getSendTime(), pushRecords.getPhone())) {
|
||||||
|
throw new RuntimeException("系统故障:短信发送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,6 @@ import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
||||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper;
|
import com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper;
|
||||||
import com.zcloud.service.map.util.ReturnMap;
|
|
||||||
import com.zcloud.service.mkmj.MkmjAreaService;
|
import com.zcloud.service.mkmj.MkmjAreaService;
|
||||||
import com.zcloud.util.UuidUtil;
|
import com.zcloud.util.UuidUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -60,7 +59,7 @@ public class MkmjAreaServiceImpl implements MkmjAreaService {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public Object delete(PageData pd)throws Exception{
|
public Object delete(PageData pd)throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
//校验区域下是否还存在区域 存在则不让删除
|
//校验区域下是否还存在区域 存在则不让删除
|
||||||
List<PageData> childList = mkmjAreaMapper.findByChild(pd);
|
List<PageData> childList = mkmjAreaMapper.findByChild(pd);
|
||||||
|
|
|
@ -117,9 +117,33 @@ public class AliSmsToolUtil {
|
||||||
//发短信
|
//发短信
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
map.put("infoDetail", "阿斯顿发");
|
map.put("infoDetail", "阿斯顿发");
|
||||||
map.put("phone", "18630363710");
|
map.put("phone", "18630387571");
|
||||||
map.put("infoType", "阿三地方");
|
map.put("infoType", "阿三地方");
|
||||||
|
map.put("templateCode", "SMS_227260789");
|
||||||
List<PageData> paramsList = new ArrayList<PageData>();
|
List<PageData> paramsList = new ArrayList<PageData>();
|
||||||
|
PageData params1 = new PageData();
|
||||||
|
// 第1个参数
|
||||||
|
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||||
|
params1.put("value", 2);// 存入上面参数名称所传递的值
|
||||||
|
paramsList.add(params1);
|
||||||
|
|
||||||
|
PageData params2 = new PageData();
|
||||||
|
// 第2个参数
|
||||||
|
params2.put("name", "params1");// 存入短信模板中的参数名称
|
||||||
|
params2.put("value", "盲板作业");// 存入上面参数名称所传递的值
|
||||||
|
paramsList.add(params2);
|
||||||
|
|
||||||
|
PageData params3 = new PageData();
|
||||||
|
// 第3个参数
|
||||||
|
params3.put("name", "params2");// 存入短信模板中的参数名称
|
||||||
|
params3.put("value", "生产部门意见");// 存入上面参数名称所传递的值
|
||||||
|
paramsList.add(params3);
|
||||||
|
|
||||||
|
PageData params4 = new PageData();
|
||||||
|
// 第4个参数
|
||||||
|
params4.put("name", "params3");// 存入短信模板中的参数名称
|
||||||
|
params4.put("value", "审核");// 存入上面参数名称所传递的值
|
||||||
|
paramsList.add(params4);
|
||||||
SendSmsResponse response = sendSms(map,paramsList);
|
SendSmsResponse response = sendSms(map,paramsList);
|
||||||
System.out.println("短信接口返回的数据----------------");
|
System.out.println("短信接口返回的数据----------------");
|
||||||
System.out.println("Code=" + response.getCode());
|
System.out.println("Code=" + response.getCode());
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
package com.zcloud.util;
|
package com.zcloud.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
@ -14,6 +18,7 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* 重点工程发送短信工具类
|
* 重点工程发送短信工具类
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class SendSmsUtil {
|
public class SendSmsUtil {
|
||||||
|
|
||||||
private static String USERNAME = "qhdzyhy";
|
private static String USERNAME = "qhdzyhy";
|
||||||
|
@ -27,6 +32,7 @@ public class SendSmsUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送短信
|
* 发送短信
|
||||||
|
*
|
||||||
* @param records
|
* @param records
|
||||||
* @param time 发送时间 为空或小于当前时间则立即发送
|
* @param time 发送时间 为空或小于当前时间则立即发送
|
||||||
* records格式实例 records是 JSONArray 里边的内容通过调用下方方法getRecords获取 JSONObject 定义一个JSONArray后 put进去即可
|
* records格式实例 records是 JSONArray 里边的内容通过调用下方方法getRecords获取 JSONObject 定义一个JSONArray后 put进去即可
|
||||||
|
@ -47,23 +53,23 @@ public class SendSmsUtil {
|
||||||
* }
|
* }
|
||||||
* ]
|
* ]
|
||||||
*/
|
*/
|
||||||
public static void sendSms(String tpId,JSONArray records ,String time) throws ParseException {
|
public static void sendSms(String tpId, JSONArray records, String time) throws ParseException {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
Long tKey = System.currentTimeMillis()/1000;
|
Long tKey = System.currentTimeMillis() / 1000;
|
||||||
String passWord = MD5.md5(PASSWORD+tKey);
|
String passWord = MD5.md5(PASSWORD + tKey);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
//扔参数
|
//扔参数
|
||||||
json.put("username",USERNAME);
|
json.put("username", USERNAME);
|
||||||
json.put("password",passWord);
|
json.put("password", passWord);
|
||||||
json.put("tKey",tKey);
|
json.put("tKey", tKey);
|
||||||
json.put("signature",SIGNATURE);
|
json.put("signature", SIGNATURE);
|
||||||
json.put("tpId",tpId);
|
json.put("tpId", tpId);
|
||||||
if(StringUtils.isNotBlank(time)){
|
if (StringUtils.isNotBlank(time)) {
|
||||||
if(sdf.parse(time).after(new Date())){
|
if (sdf.parse(time).after(new Date())) {
|
||||||
json.put("time",time);
|
json.put("time", time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
json.put("records",records);
|
json.put("records", records);
|
||||||
System.out.println(json.toJSONString());
|
System.out.println(json.toJSONString());
|
||||||
String result = HttpRequest.post(URL)
|
String result = HttpRequest.post(URL)
|
||||||
.timeout(60000)
|
.timeout(60000)
|
||||||
|
@ -71,13 +77,39 @@ public class SendSmsUtil {
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {"msg":"template error","tpId":"null","code":4014,"msgId":"172950016144709288961"}
|
||||||
|
// {"msg":"success","tpId":"121487","code":200,"msgId":"172950025828957168641","invalidList":[]}
|
||||||
|
public static boolean sendSms(String tpId, JSONObject records, String time, String phone) throws ParseException {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("username", USERNAME);
|
||||||
|
json.put("tKey", System.currentTimeMillis() / 1000);
|
||||||
|
json.put("password", MD5.md5(PASSWORD + json.getLong("tKey")));
|
||||||
|
json.put("signature", SIGNATURE);
|
||||||
|
json.put("tpId", tpId);
|
||||||
|
if (StringUtils.isNotBlank(time) && DateUtil.parseDateTime(time).after(new Date())) {
|
||||||
|
json.put("time", time);
|
||||||
|
}
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
array.add(getRecords(phone, records));
|
||||||
|
json.put("records", array);
|
||||||
|
HttpRequest request = HttpRequest.post(URL)
|
||||||
|
.timeout(60000)
|
||||||
|
.body(json.toJSONString(), MediaType.APPLICATION_JSON_UTF8_VALUE);
|
||||||
|
try (HttpResponse response = request.execute()) {
|
||||||
|
return JSON.parseObject(response.body()).getInteger("code") == 200;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("发送短信异常", e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封装要发送的电话以及要替换的内容
|
* 封装要发送的电话以及要替换的内容
|
||||||
|
*
|
||||||
* @param mobile 手机号
|
* @param mobile 手机号
|
||||||
* @param tpContent 替换内容
|
* @param tpContent 替换内容
|
||||||
* @return
|
* @return 格式实例 var1表示要替换的内容 与要替换的内容保持一致即可 变量1表示替换的内容
|
||||||
* 格式实例 var1表示要替换的内容 与要替换的内容保持一致即可 变量1表示替换的内容
|
|
||||||
* {
|
* {
|
||||||
* "mobile":"138****0000",
|
* "mobile":"138****0000",
|
||||||
* "tpContent":{
|
* "tpContent":{
|
||||||
|
@ -86,30 +118,23 @@ public class SendSmsUtil {
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
public static JSONObject getRecords(String mobile, JSONObject tpContent ){
|
public static JSONObject getRecords(String mobile, JSONObject tpContent) {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("mobile",mobile);
|
json.put("mobile", mobile);
|
||||||
if(ObjectUtils.hashCode(tpContent)!=0){
|
if (ObjectUtils.hashCode(tpContent) != 0) {
|
||||||
json.put("tpContent",tpContent);
|
json.put("tpContent", tpContent);
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
|
|
||||||
}//d22f8a5d4a35b3761dc9525186e652a0
|
}//d22f8a5d4a35b3761dc9525186e652a0
|
||||||
|
|
||||||
//测试接口
|
//测试接口
|
||||||
public static void main(String[] args) throws ParseException {
|
// public static void main(String[] args) throws ParseException {
|
||||||
JSONArray jsonArray = new JSONArray();
|
// //定义替换参数
|
||||||
|
// JSONObject tpContent = new JSONObject();
|
||||||
//接受返回结果
|
// tpContent.put("HIDDENDESCR", "卓云企业测试");
|
||||||
JSONObject records = new JSONObject();
|
// JSONObject object = sendSms("121487", tpContent, DateUtil.formatDateTime(new Date()), "18630387571");
|
||||||
//定义替换参数
|
// System.out.println(object.toJSONString());
|
||||||
//JSONObject tpContent = new JSONObject();
|
// }
|
||||||
//tpContent.put("userName","卓云企业");
|
|
||||||
//tpContent.put("time","2023-09-21 15:56:20");
|
|
||||||
//records = getRecords("18617456701",tpContent);
|
|
||||||
jsonArray.add(records);
|
|
||||||
|
|
||||||
sendSms("null",jsonArray,null);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ smb.basePath=/mnt/wwag/file/
|
||||||
#Mq\u914D\u7F6E
|
#Mq\u914D\u7F6E
|
||||||
rocketmq.consumer.group2=edu-admin-edit
|
rocketmq.consumer.group2=edu-admin-edit
|
||||||
rocketmq.consumer.group1=edu-admin-add
|
rocketmq.consumer.group1=edu-admin-add
|
||||||
rocketmq.name-server=172.24.151.22:9876
|
rocketmq.name-server=127.0.0.1:9876
|
||||||
rocketmq.producer.group=libmiddle
|
rocketmq.producer.group=libmiddle
|
||||||
rocketmq.producer.send-message-timeout=3000
|
rocketmq.producer.send-message-timeout=3000
|
||||||
rocketmq.producer.compress-message-body-threshold=4096
|
rocketmq.producer.compress-message-body-threshold=4096
|
||||||
|
@ -106,6 +106,7 @@ perLoc.url=http://192.168.210.32:8084
|
||||||
perLoc.userName=qaaqadmin
|
perLoc.userName=qaaqadmin
|
||||||
perLoc.pwd=Cfd2023@
|
perLoc.pwd=Cfd2023@
|
||||||
baseimgpath =http://192.168.192.201:8991/file/
|
baseimgpath =http://192.168.192.201:8991/file/
|
||||||
|
tongbu.url=http://127.0.0.1:9006/qa-prevention-gwj-tongbu/
|
||||||
|
|
||||||
mq.csy.data.topic=csy_docking
|
mq.csy.data.topic=csy_docking
|
||||||
mq.csy.data.group=scheduled_tasks_csy_docking
|
mq.csy.data.group=scheduled_tasks_csy_docking
|
||||||
|
@ -144,7 +145,6 @@ gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com
|
||||||
gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
||||||
|
|
||||||
# \u4E2D\u53F0
|
# \u4E2D\u53F0
|
||||||
tongbu.url=http://127.0.0.1:8094
|
|
||||||
# \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5
|
# \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5
|
||||||
mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking
|
mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking
|
||||||
mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group
|
mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
<mapper namespace="com.zcloud.mapper.datasource.accident.AccidentRecordsMapper">
|
<mapper namespace="com.zcloud.mapper.datasource.accident.AccidentRecordsMapper">
|
||||||
|
|
||||||
<select id="listPage" parameterType="com.zcloud.entity.Page" resultType="pd">
|
<select id="listPage" parameterType="com.zcloud.entity.Page" resultType="pd">
|
||||||
select ACCIDENT_ID as id, CORP_NAME as companyName, LOCATION as 'location', INCIDENT_DATE as 'incidentDate', INCIDENT_NAME as 'incidentName'
|
select ACCIDENT_ID as id, CORP_NAME as companyName, LOCATION as 'location', INCIDENT_DATE as 'incidentDate', INCIDENT_NAME as 'incidentName',
|
||||||
|
ATTACHMENT_ADDRESS as attachmentAddress
|
||||||
from bus_accident as ar
|
from bus_accident as ar
|
||||||
left join bus_corp_info as bci on ar.CORPINFO_ID = bci.CORPINFO_ID
|
left join bus_corp_info as bci on ar.CORPINFO_ID = bci.CORPINFO_ID
|
||||||
<where>
|
<where>
|
||||||
|
@ -25,6 +26,9 @@
|
||||||
<if test="pd.incidentType != null and pd.incidentType != ''">
|
<if test="pd.incidentType != null and pd.incidentType != ''">
|
||||||
and INCIDENT_TYPE = #{pd.incidentType}
|
and INCIDENT_TYPE = #{pd.incidentType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pd.type != null and pd.type != ''">
|
||||||
|
and TYPE = #{pd.type}
|
||||||
|
</if>
|
||||||
<if test="1 == 1">
|
<if test="1 == 1">
|
||||||
and IS_DELETED = 0
|
and IS_DELETED = 0
|
||||||
</if>
|
</if>
|
||||||
|
@ -52,6 +56,8 @@
|
||||||
ANALYSIS as analysis,
|
ANALYSIS as analysis,
|
||||||
SUGGESTIONS as suggestions,
|
SUGGESTIONS as suggestions,
|
||||||
MEASURES as measures,
|
MEASURES as measures,
|
||||||
|
TYPE as type,
|
||||||
|
ATTACHMENT_ADDRESS as attachmentAddress,
|
||||||
ar.CREATOR as creator,
|
ar.CREATOR as creator,
|
||||||
REPORT_DATE as reportDate
|
REPORT_DATE as reportDate
|
||||||
from bus_accident as ar
|
from bus_accident as ar
|
||||||
|
@ -139,7 +145,13 @@
|
||||||
UPDATED_TIME,
|
UPDATED_TIME,
|
||||||
</if>
|
</if>
|
||||||
<if test="isDeleted != null">
|
<if test="isDeleted != null">
|
||||||
IS_DELETED
|
IS_DELETED,
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
TYPE,
|
||||||
|
</if>
|
||||||
|
<if test="attachmentAddress != null">
|
||||||
|
ATTACHMENT_ADDRESS,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
values
|
values
|
||||||
|
@ -220,7 +232,13 @@
|
||||||
#{updatedTime},
|
#{updatedTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="isDeleted != null">
|
<if test="isDeleted != null">
|
||||||
#{isDeleted}
|
#{isDeleted},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
#{type},
|
||||||
|
</if>
|
||||||
|
<if test="attachmentAddress != null">
|
||||||
|
#{attachmentAddress},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -228,31 +246,33 @@
|
||||||
<update id="updateById" parameterType="com.zcloud.entity.accident.AccidentRecords">
|
<update id="updateById" parameterType="com.zcloud.entity.accident.AccidentRecords">
|
||||||
UPDATE bus_accident
|
UPDATE bus_accident
|
||||||
<set>
|
<set>
|
||||||
<if test="incidentNumber != null">incident_number = #{incidentNumber},</if>
|
<if test="incidentNumber != null">INCIDENT_NUMBER = #{incidentNumber},</if>
|
||||||
<if test="incidentName != null">incident_name = #{incidentName},</if>
|
<if test="incidentName != null">INCIDENT_NAME = #{incidentName},</if>
|
||||||
<if test="incidentType != null">incident_type = #{incidentType},</if>
|
<if test="incidentType != null">INCIDENT_TYPE = #{incidentType},</if>
|
||||||
<if test="corpinfoId != null">corpinfo_id = #{corpinfoId},</if>
|
<if test="corpinfoId != null">CORPINFO_ID = #{corpinfoId},</if>
|
||||||
<if test="incidentLevel != null">incident_level = #{incidentLevel},</if>
|
<if test="incidentLevel != null">INCIDENT_LEVEL = #{incidentLevel},</if>
|
||||||
<if test="incidentNature != null">incident_nature = #{incidentNature},</if>
|
<if test="incidentNature != null">INCIDENT_NATURE = #{incidentNature},</if>
|
||||||
<if test="location != null">location = #{location},</if>
|
<if test="location != null">LOCATION = #{location},</if>
|
||||||
<if test="incidentDate != null">incident_date = #{incidentDate},</if>
|
<if test="incidentDate != null">INCIDENT_DATE = #{incidentDate},</if>
|
||||||
<if test="directLoss != null">direct_loss = #{directLoss},</if>
|
<if test="directLoss != null">DIRECT_LOSS = #{directLoss},</if>
|
||||||
<if test="injured != null">injured = #{injured},</if>
|
<if test="injured != null">INJURED = #{injured},</if>
|
||||||
<if test="fatalities != null">fatalities = #{fatalities},</if>
|
<if test="fatalities != null">FATALITIES = #{fatalities},</if>
|
||||||
<if test="seriouslyInjured != null">seriously_injured = #{seriouslyInjured},</if>
|
<if test="seriouslyInjured != null">SERIOUSLY_INJURED = #{seriouslyInjured},</if>
|
||||||
<if test="cause != null">cause = #{cause},</if>
|
<if test="cause != null">CAUSE = #{cause},</if>
|
||||||
<if test="summary != null">summary = #{summary},</if>
|
<if test="summary != null">SUMMARY = #{summary},</if>
|
||||||
<if test="photos != null">photos = #{photos},</if>
|
<if test="photos != null">PHOTOS = #{photos},</if>
|
||||||
<if test="analysis != null">analysis = #{analysis},</if>
|
<if test="analysis != null">ANALYSIS = #{analysis},</if>
|
||||||
<if test="suggestions != null">suggestions = #{suggestions},</if>
|
<if test="suggestions != null">SUGGESTIONS = #{suggestions},</if>
|
||||||
<if test="measures != null">measures = #{measures},</if>
|
<if test="measures != null">MEASURES = #{measures},</if>
|
||||||
<if test="creator != null">creator = #{creator},</if>
|
<if test="creator != null">CREATOR = #{creator},</if>
|
||||||
<if test="reportDate != null">report_date = #{reportDate},</if>
|
<if test="reportDate != null">REPORT_DATE = #{reportDate},</if>
|
||||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
|
||||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
|
||||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>
|
||||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
<if test="updatedTime != null">UPDATED_TIME = #{updatedTime},</if>
|
||||||
<if test="isDeleted != null">is_deleted = #{isDeleted}</if>
|
<if test="isDeleted != null">IS_DELETED = #{isDeleted},</if>
|
||||||
|
<if test="attachmentAddress != null">ATTACHMENT_ADDRESS = #{attachmentAddress},</if>
|
||||||
|
<if test="type != null">TYPE = #{type}</if>
|
||||||
</set>
|
</set>
|
||||||
WHERE accident_id = #{id} and is_deleted = 0
|
WHERE accident_id = #{id} and is_deleted = 0
|
||||||
</update>
|
</update>
|
||||||
|
@ -316,6 +336,9 @@
|
||||||
<if test="1 == 1">
|
<if test="1 == 1">
|
||||||
and is_deleted = 0
|
and is_deleted = 0
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pd.type != null and pd.type != ''">
|
||||||
|
and TYPE = #{pd.type}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by incident_date desc, companyName
|
order by incident_date desc, companyName
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -1237,7 +1237,8 @@
|
||||||
)
|
)
|
||||||
</if> -->
|
</if> -->
|
||||||
<if test="SELFUSERID != null and SELFUSERID != ''">
|
<if test="SELFUSERID != null and SELFUSERID != ''">
|
||||||
and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=f.HIDDEN_ID )>0
|
and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID}
|
||||||
|
and bh.HIDDEN_ID=f.HIDDEN_ID )>0
|
||||||
</if>
|
</if>
|
||||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||||
and f.CORPINFO_ID =#{CORPINFO_ID}
|
and f.CORPINFO_ID =#{CORPINFO_ID}
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
TYPE,
|
TYPE,
|
||||||
FOREIGN_KEY,
|
FOREIGN_KEY,
|
||||||
FILE_NAME,
|
FILE_NAME,
|
||||||
IMGFILES_ID
|
IMGFILES_ID,
|
||||||
|
MD5
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
|
@ -36,7 +37,8 @@
|
||||||
#{TYPE},
|
#{TYPE},
|
||||||
#{FOREIGN_KEY},
|
#{FOREIGN_KEY},
|
||||||
#{FILE_NAME},
|
#{FILE_NAME},
|
||||||
#{IMGFILES_ID}
|
#{IMGFILES_ID},
|
||||||
|
#{MD5}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
|
|
|
@ -120,13 +120,14 @@
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select iou.NAME INSPECTION_ORIGINATOR_NAME,
|
||||||
iou.NAME INSPECTION_ORIGINATOR_NAME,
|
|
||||||
iod.NAME INSPECTION_DEPARTMENT_NAME,
|
iod.NAME INSPECTION_DEPARTMENT_NAME,
|
||||||
isd.NAME INSPECTED_DEPARTMENT_NAME,
|
isd.NAME INSPECTED_DEPARTMENT_NAME,
|
||||||
isu.NAME INSPECTED_SITEUSER_NAME,
|
isu.NAME INSPECTED_SITEUSER_NAME,
|
||||||
IFNULL(GROUP_CONCAT(REPLACE(siu.NAME,'/',',')),'') AS INSPECTION_USER_NAME,
|
IFNULL(GROUP_CONCAT(REPLACE(siu.NAME, '/', ',')), '') AS INSPECTION_USER_NAME,
|
||||||
CASE WHEN IFNULL(se.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE se.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
CASE
|
||||||
|
WHEN IFNULL(se.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME
|
||||||
|
ELSE se.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
||||||
se.INSPECTION_TIME_START,
|
se.INSPECTION_TIME_START,
|
||||||
se.INSPECTION_TIME_END,
|
se.INSPECTION_TIME_END,
|
||||||
se.INSPECTION_STATUS,
|
se.INSPECTION_STATUS,
|
||||||
|
@ -144,54 +145,70 @@
|
||||||
LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
||||||
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID
|
||||||
LEFT JOIN SYS_USER isu ON isu.USER_ID = se.INSPECTED_SITEUSER_ID
|
LEFT JOIN SYS_USER isu ON isu.USER_ID = se.INSPECTED_SITEUSER_ID
|
||||||
LEFT JOIN bus_inspection_safetyenvironmental_inspector si ON si.INSPECTION_ID = se.INSPECTION_ID and si.ISDELETE = '0'
|
LEFT JOIN bus_inspection_safetyenvironmental_inspector si
|
||||||
|
ON si.INSPECTION_ID = se.INSPECTION_ID and si.ISDELETE = '0'
|
||||||
LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID
|
LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID
|
||||||
LEFT JOIN sys_dictionaries d ON d.BIANMA = se.INSPECTION_TYPE
|
LEFT JOIN sys_dictionaries d ON d.BIANMA = se.INSPECTION_TYPE
|
||||||
where se.ISDELETE = '0' and se.INSPECTION_STATUS = '2'
|
where se.ISDELETE = '0' and se.INSPECTION_STATUS = '2'
|
||||||
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
|
<if test="pd.roleLevel != null and pd.roleLevel != ''">
|
||||||
|
<!-- 权限显示 -->
|
||||||
<choose>
|
<choose>
|
||||||
<when test='pd.roleLevel == "0"'>
|
<when test='pd.roleLevel == "0"'>
|
||||||
</when>
|
</when>
|
||||||
<when test='pd.roleLevel =="1"'>
|
<when test='pd.roleLevel == "1"'>
|
||||||
and siu.DEPARTMENT_ID in (${pd.supDeparIds}) or se.INSPECTED_DEPARTMENT_ID in (${pd.supDeparIds})
|
and siu.DEPARTMENT_ID in (${pd.supDeparIds})
|
||||||
|
or se.INSPECTED_DEPARTMENT_ID in (${pd.supDeparIds})
|
||||||
</when>
|
</when>
|
||||||
<when test='pd.roleLevel =="2"'>
|
<when test='pd.roleLevel == "2"'>
|
||||||
and siu.USER_ID in (#{pd.loginUserId}) or se.INSPECTED_SITEUSER_ID in (#{pd.loginUserId})
|
and siu.USER_ID in (#{pd.loginUserId})
|
||||||
|
or se.INSPECTED_SITEUSER_ID in (#{pd.loginUserId})
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test='pd.INSPECTED_SITEUSER_ID != null and pd.INSPECTED_SITEUSER_ID != ""'><!-- 被检查单位现场负责人 -->
|
<if test='pd.INSPECTED_SITEUSER_ID != null and pd.INSPECTED_SITEUSER_ID != ""'>
|
||||||
|
<!-- 被检查单位现场负责人 -->
|
||||||
and se.INSPECTED_SITEUSER_ID = #{pd.INSPECTED_SITEUSER_ID}
|
and se.INSPECTED_SITEUSER_ID = #{pd.INSPECTED_SITEUSER_ID}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''"><!-- 检查题目 -->
|
<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''">
|
||||||
|
<!-- 检查题目 -->
|
||||||
and se.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR}
|
and se.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''"><!-- 被检查单位 -->
|
<if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''">
|
||||||
and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}),'%')
|
<!-- 被检查单位 -->
|
||||||
|
and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''"><!-- 检查部门 -->
|
<if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''">
|
||||||
and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}),'%')
|
<!-- 检查部门 -->
|
||||||
|
and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''"><!-- 检查发起人 -->
|
<if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''">
|
||||||
and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}),'%')
|
<!-- 检查发起人 -->
|
||||||
|
and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''"><!-- 检查类型 -->
|
<if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''">
|
||||||
|
<!-- 检查类型 -->
|
||||||
and se.INSPECTION_TYPE = #{pd.INSPECTION_TYPE}
|
and se.INSPECTION_TYPE = #{pd.INSPECTION_TYPE}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''"><!-- 检查时间 -->
|
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''">
|
||||||
|
<!-- 检查时间 -->
|
||||||
and se.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00')
|
and se.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''"><!-- 检查时间 -->
|
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''">
|
||||||
|
<!-- 检查时间 -->
|
||||||
and se.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59')
|
and se.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''"><!-- 检查状态 -->
|
<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''">
|
||||||
|
<!-- 检查状态 -->
|
||||||
and se.INSPECTION_STATUS = #{pd.INSPECTION_STATUS}
|
and se.INSPECTION_STATUS = #{pd.INSPECTION_STATUS}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||||
|
<!-- 关键词检索 -->
|
||||||
and se.CORPINFO_ID = #{pd.CORPINFO_ID}
|
and se.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY se.INSPECTION_ID
|
GROUP BY se.INSPECTION_ID
|
||||||
ORDER BY se.CREATTIME DESC
|
ORDER BY FIELD(se.INSPECTION_STATUS, '2', '1', '0', '3', '4', '5', '6', '7', '8', '-1', '-2'),
|
||||||
|
FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId},se.INSPECTED_SITEUSER_ID,'1'), se.INSPECTED_SITEUSER_ID, '1'),
|
||||||
|
se.INSPECTION_TIME_START DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表(全部) -->
|
<!-- 列表(全部) -->
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
LEFT JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL se ON se.INSPECTION_ID = f.INSPECTION_ID
|
INNER JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL se ON se.INSPECTION_ID = f.INSPECTION_ID
|
||||||
LEFT JOIN VI_USER_ALL iou ON iou.USER_ID = se.INSPECTION_ORIGINATOR_ID
|
LEFT JOIN VI_USER_ALL iou ON iou.USER_ID = se.INSPECTION_ORIGINATOR_ID
|
||||||
LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
||||||
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID
|
||||||
|
@ -194,7 +194,11 @@
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
GROUP BY f.INSPECTION_ID
|
GROUP BY f.INSPECTION_ID
|
||||||
ORDER BY FIELD (se.INSPECTION_STATUS , '0','1','2','3','4','5','6','7','8','-1','-2') asc, se.INSPECTION_TIME_START DESC , se.INSPECTION_TIME_END DESC
|
ORDER BY
|
||||||
|
FIELD(if(f.INSPECTION_USER_SIGN_TIME is not null,'2','1'), '1','2'),
|
||||||
|
FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId},#{pd.loginUserId},'1'), #{pd.loginUserId}, '1'),
|
||||||
|
FIELD (se.INSPECTION_STATUS , '0','1','2','3','4','5','6','7','8','-1','-2') ,
|
||||||
|
se.INSPECTION_TIME_START DESC , se.INSPECTION_TIME_END DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表(全部) -->
|
<!-- 列表(全部) -->
|
||||||
|
|
|
@ -240,9 +240,9 @@
|
||||||
IFNULL(GROUP_CONCAT(REPLACE(siu.USER_ID,'/',',')),'') AS INSPECTION_USER_ID,
|
IFNULL(GROUP_CONCAT(REPLACE(siu.USER_ID,'/',',')),'') AS INSPECTION_USER_ID,
|
||||||
IFNULL(GROUP_CONCAT( DISTINCT siu.NAME),'') AS INSPECTION_USER_NAME,
|
IFNULL(GROUP_CONCAT( DISTINCT siu.NAME),'') AS INSPECTION_USER_NAME,
|
||||||
CASE WHEN IFNULL(f.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE f.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
CASE WHEN IFNULL(f.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE f.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
||||||
<include refid="Field"></include>
|
<include refid="Field"/>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"/> f
|
||||||
LEFT JOIN bus_hidden h on h.FOREIGN_ID = f.INSPECTION_ID and h.isdelete ='0'
|
LEFT JOIN bus_hidden h on h.FOREIGN_ID = f.INSPECTION_ID and h.isdelete ='0'
|
||||||
LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID
|
LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID
|
||||||
LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID
|
||||||
|
@ -639,64 +639,88 @@
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="checklistPage" parameterType="page" resultType="pd">
|
<select id="checklistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select iou.NAME INSPECTION_ORIGINATOR_NAME,
|
||||||
iou.NAME INSPECTION_ORIGINATOR_NAME,
|
|
||||||
ild.NAME INSPECTION_LEADDEPARTMENT_NAME,
|
ild.NAME INSPECTION_LEADDEPARTMENT_NAME,
|
||||||
iod.NAME INSPECTION_DEPARTMENT_NAME,
|
iod.NAME INSPECTION_DEPARTMENT_NAME,
|
||||||
isd.NAME INSPECTED_DEPARTMENT_NAME,
|
isd.NAME INSPECTED_DEPARTMENT_NAME,
|
||||||
isu.NAME INSPECTED_SITEUSER_NAME,
|
isu.NAME INSPECTED_SITEUSER_NAME,
|
||||||
IFNULL(GROUP_CONCAT(REPLACE(siu.USER_ID,'/',',')),'') AS INSPECTION_USER_ID,
|
if(h.`count` > 0, 1, null) as checkout,
|
||||||
IFNULL(GROUP_CONCAT(REPLACE(siu.NAME,'/',',')),'') AS INSPECTION_USER_NAME,
|
IFNULL(GROUP_CONCAT(REPLACE(siu.USER_ID, '/', ',')), '') AS INSPECTION_USER_ID,
|
||||||
CASE WHEN IFNULL(f.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE f.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
IFNULL(GROUP_CONCAT(REPLACE(siu.NAME, '/', ',')), '') AS INSPECTION_USER_NAME,
|
||||||
<include refid="Field"></include>
|
CASE
|
||||||
|
WHEN IFNULL(f.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME
|
||||||
|
ELSE f.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME,
|
||||||
|
<include refid="Field">
|
||||||
|
</include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName">
|
||||||
|
</include>
|
||||||
|
f
|
||||||
LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID
|
LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID
|
||||||
LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID
|
||||||
LEFT JOIN vi_department_all iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
LEFT JOIN vi_department_all iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID
|
||||||
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.INSPECTED_DEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.INSPECTED_DEPARTMENT_ID
|
||||||
LEFT JOIN SYS_USER isu ON isu.USER_ID = f.INSPECTED_SITEUSER_ID
|
LEFT JOIN SYS_USER isu ON isu.USER_ID = f.INSPECTED_SITEUSER_ID
|
||||||
LEFT JOIN bus_inspection_safetyenvironmental_inspector si ON si.INSPECTION_ID = f.INSPECTION_ID and si.ISDELETE = '0'
|
LEFT JOIN bus_inspection_safetyenvironmental_inspector si
|
||||||
|
ON si.INSPECTION_ID = f.INSPECTION_ID and si.ISDELETE = '0'
|
||||||
LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID
|
LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID
|
||||||
LEFT JOIN sys_dictionaries d ON d.BIANMA = f.INSPECTION_TYPE
|
LEFT JOIN sys_dictionaries d ON d.BIANMA = f.INSPECTION_TYPE
|
||||||
|
LEFT JOIN (select h.FOREIGN_ID, count(h.HIDDEN_ID) as `count`
|
||||||
|
from BUS_HIDDEN h
|
||||||
|
where h.ISDELETE = 0
|
||||||
|
and h.CREATOR = #{pd.loginUserId}
|
||||||
|
and h.STATE in ('4', '8')
|
||||||
|
and (h.FINAL_CHECK is null or h.FINAL_CHECK = '2')
|
||||||
|
group by h.FOREIGN_ID) h on h.FOREIGN_ID = f.INSPECTION_ID AND f.INSPECTION_STATUS in ('5', '6')
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
<if test="pd.INSPECTION_ORIGINATOR_ID != null and pd.INSPECTION_ORIGINATOR_ID != ''"><!-- 检查发起人 -->
|
<if test="pd.INSPECTION_ORIGINATOR_ID != null and pd.INSPECTION_ORIGINATOR_ID != ''">
|
||||||
|
<!-- 检查发起人 -->
|
||||||
and f.INSPECTION_ORIGINATOR_ID = #{pd.INSPECTION_ORIGINATOR_ID}
|
and f.INSPECTION_ORIGINATOR_ID = #{pd.INSPECTION_ORIGINATOR_ID}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.ARCHIVE_USER_ID != null and pd.ARCHIVE_USER_ID != ''">
|
<if test="pd.ARCHIVE_USER_ID != null and pd.ARCHIVE_USER_ID != ''">
|
||||||
and (
|
and (
|
||||||
f.INSPECTION_ORIGINATOR_ID = #{pd.ARCHIVE_USER_ID}
|
f.INSPECTION_ORIGINATOR_ID = #{pd.ARCHIVE_USER_ID}
|
||||||
OR f.INSPECTED_SITEUSER_ID = #{pd.ARCHIVE_USER_ID}
|
OR f.INSPECTED_SITEUSER_ID = #{pd.ARCHIVE_USER_ID}
|
||||||
OR EXISTS(select 1 from bus_inspection_safetyenvironmental_inspector sii where sii.INSPECTION_USER_ID = #{pd.ARCHIVE_USER_ID}
|
OR EXISTS(select 1
|
||||||
|
from bus_inspection_safetyenvironmental_inspector sii
|
||||||
|
where sii.INSPECTION_USER_ID = #{pd.ARCHIVE_USER_ID}
|
||||||
and sii.INSPECTION_ID = f.INSPECTION_ID)
|
and sii.INSPECTION_ID = f.INSPECTION_ID)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''"><!-- 被检查单位 -->
|
<if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''">
|
||||||
and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}),'%')
|
<!-- 被检查单位 -->
|
||||||
|
and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''"><!-- 检查部门 -->
|
<if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''">
|
||||||
and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}),'%')
|
<!-- 检查部门 -->
|
||||||
|
and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''"><!-- 检查发起人 -->
|
<if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''">
|
||||||
and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}),'%')
|
<!-- 检查发起人 -->
|
||||||
|
and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''"><!-- 检查类型 -->
|
<if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''">
|
||||||
|
<!-- 检查类型 -->
|
||||||
and f.INSPECTION_TYPE = #{pd.INSPECTION_TYPE}
|
and f.INSPECTION_TYPE = #{pd.INSPECTION_TYPE}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''"><!-- 检查题目 -->
|
<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''">
|
||||||
|
<!-- 检查题目 -->
|
||||||
and f.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR}
|
and f.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''"><!-- 检查时间 -->
|
<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''">
|
||||||
|
<!-- 检查时间 -->
|
||||||
and f.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00')
|
and f.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''"><!-- 检查时间 -->
|
<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''">
|
||||||
|
<!-- 检查时间 -->
|
||||||
and f.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59')
|
and f.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59')
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''"><!-- 检查状态 -->
|
<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''">
|
||||||
|
<!-- 检查状态 -->
|
||||||
<choose>
|
<choose>
|
||||||
<when test="pd.INSPECTION_STATUS == '3-7'">
|
<when test="pd.INSPECTION_STATUS == '3-7'">
|
||||||
and f.INSPECTION_STATUS in ('3','4','5','6','7','8')
|
and f.INSPECTION_STATUS in ('3', '4', '5', '6', '7', '8')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
and f.INSPECTION_STATUS = #{pd.INSPECTION_STATUS}
|
and f.INSPECTION_STATUS = #{pd.INSPECTION_STATUS}
|
||||||
|
@ -704,14 +728,21 @@
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 被检查单位 -->
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
|
||||||
|
<!-- 被检查单位 -->
|
||||||
and (
|
and (
|
||||||
isd.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
isd.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}), '%')
|
||||||
OR iod.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
OR iod.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}), '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
GROUP BY f.INSPECTION_ID
|
GROUP BY f.INSPECTION_ID
|
||||||
ORDER BY f.CREATTIME DESC
|
ORDER BY CASE
|
||||||
|
WHEN f.INSPECTION_STATUS IN ('3', '4') AND f.INSPECTED_SITEUSER_ID = #{pd.loginUserId} THEN 1
|
||||||
|
WHEN f.INSPECTION_STATUS IN ('5', '6', '7') AND checkout = 1 THEN 2
|
||||||
|
ELSE 3
|
||||||
|
END,
|
||||||
|
field(f.INSPECTION_STATUS, '3', '6', '4', '7', '5', '0', '1', '2', '8', '-1', '-2'),
|
||||||
|
f.INSPECTION_TIME_END DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="statisticsBranchGroupDept" parameterType="pd" resultType="pd">
|
<select id="statisticsBranchGroupDept" parameterType="pd" resultType="pd">
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?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.messages.MessagesMapper">
|
||||||
|
|
||||||
|
<select id="install">
|
||||||
|
insert into push_records
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
ID,
|
||||||
|
</if>
|
||||||
|
<if test="phone != null and phone != ''">
|
||||||
|
PHONE,
|
||||||
|
</if>
|
||||||
|
<if test="messageTitle != null and messageTitle != ''">
|
||||||
|
MESSAGE_TITLE,
|
||||||
|
</if>
|
||||||
|
<if test="messageContent != null and messageContent != ''">
|
||||||
|
MESSAGE_CONTENT,
|
||||||
|
</if>
|
||||||
|
<if test="messageType != null">
|
||||||
|
MESSAGE_TYPE,
|
||||||
|
</if>
|
||||||
|
<if test="sendTime != null and sendTime != ''">
|
||||||
|
SEND_TIME,
|
||||||
|
</if>
|
||||||
|
<if test="state != null">
|
||||||
|
STATE,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id},
|
||||||
|
</if>
|
||||||
|
<if test="phone != null and phone != ''">
|
||||||
|
#{phone},
|
||||||
|
</if>
|
||||||
|
<if test="messageTitle != null and messageTitle != ''">
|
||||||
|
#{messageTitle},
|
||||||
|
</if>
|
||||||
|
<if test="messageContent != null and messageContent != ''">
|
||||||
|
#{messageContent},
|
||||||
|
</if>
|
||||||
|
<if test="messageType != null">
|
||||||
|
#{messageType},
|
||||||
|
</if>
|
||||||
|
<if test="sendTime != null and sendTime != ''">
|
||||||
|
#{sendTime},
|
||||||
|
</if>
|
||||||
|
<if test="state != null">
|
||||||
|
#{state},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findUserIdByPhone" resultType="java.lang.String">
|
||||||
|
select USER_ID from sys_user where USERNAME = #{phone} and ISDELETE = 0 limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateById">
|
||||||
|
update push_records
|
||||||
|
<set>
|
||||||
|
<if test="phone != null and phone != ''">
|
||||||
|
PHONE = #{phone},
|
||||||
|
</if>
|
||||||
|
<if test="messageTitle != null and messageTitle != ''">
|
||||||
|
MESSAGE_TITLE = #{messageTitle},
|
||||||
|
</if>
|
||||||
|
<if test="messageContent != null and messageContent != ''">
|
||||||
|
MESSAGE_CONTENT = #{messageContent},
|
||||||
|
</if>
|
||||||
|
<if test="messageType != null">
|
||||||
|
MESSAGE_TYPE = #{messageType},
|
||||||
|
</if>
|
||||||
|
<if test="sendTime != null and sendTime != ''">
|
||||||
|
SEND_TIME = #{sendTime},
|
||||||
|
</if>
|
||||||
|
<if test="state != null">
|
||||||
|
STATE = #{state},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where ID = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue