Merge remote-tracking branch 'origin/2023年12月27日V01.00.50' into czks1.0

# Conflicts:
#	src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java
#	src/main/java/com/zcloud/service/system/UsersService.java
#	src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java
#	src/main/resources/application-local.properties
#	src/main/resources/application-master.properties
#	src/main/resources/mybatis/datasource/system/UsersMapper.xml
czks1.0
dearlin 2023-12-28 12:00:38 +08:00
commit 9912c725af
52 changed files with 1603 additions and 361 deletions

View File

@ -827,11 +827,16 @@ public class AppHotWorkApplicationController extends BaseController {
return map;
}
} else {
hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们
//先判断延时监火是否为选择部门
hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们(选择部门)
if (hotUserList.size() < 1) {
map.put("result", "error");
map.put("msg", "获取审批人意见失败!请联系管理员");
return map;
//如果查询部门查不到就根据人查询
hotUserList = hotWorkApplicationUserService.listAll(hotUserPd); // 找到这一笔的审批人(选择人)
if (hotUserList.size() != 1) {
map.put("result", "error");
map.put("msg", "获取审批人意见失败!请联系管理员");
return map;
}
}
}

View File

@ -69,38 +69,38 @@ public class AppHotWorkApplicationDelayedController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
Image srcImg = ImageIO.read(file.getInputStream());
//获取图片的宽
int srcImgWidth = srcImg.getWidth(null);
//获取图片的高
int srcImgHeight = srcImg.getHeight(null);
BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB);
// 加水印
//创建画笔
Graphics2D g = bufImg.createGraphics();
//srcImg 为上面获取到的原始图片的图片对象
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
//根据图片的背景设置水印颜色
g.setColor(new Color(255,255,255,128));
//设置字体 画笔字体样式为微软雅黑加粗文字大小为60pt
g.setFont(new Font("微软雅黑", Font.BOLD, 20));
//设置水印的坐标
int x=(srcImgWidth - WaterMarkUtil.getWatermarkLength(DateUtil.date2Str(new Date()), g)) / 2;
int y=srcImgHeight / 2;
//画出水印 第一个参数是水印内容第二个参数是x轴坐标第三个参数是y轴坐标
g.drawString(DateUtil.date2Str(new Date()), x, y);
g.dispose();
//将加完水印的图片暂存到内存中
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(bufImg, suffixName, bos);
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
// Image srcImg = ImageIO.read(file.getInputStream());
// //获取图片的宽
// int srcImgWidth = srcImg.getWidth(null);
// //获取图片的高
// int srcImgHeight = srcImg.getHeight(null);
//
// BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB);
// // 加水印
// //创建画笔
// Graphics2D g = bufImg.createGraphics();
// //srcImg 为上面获取到的原始图片的图片对象
// g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
// //根据图片的背景设置水印颜色
// g.setColor(new Color(255,255,255,128));
// //设置字体 画笔字体样式为微软雅黑加粗文字大小为60pt
// g.setFont(new Font("微软雅黑", Font.BOLD, 20));
// //设置水印的坐标
// int x=(srcImgWidth - WaterMarkUtil.getWatermarkLength(DateUtil.date2Str(new Date()), g)) / 2;
// int y=srcImgHeight / 2;
// //画出水印 第一个参数是水印内容第二个参数是x轴坐标第三个参数是y轴坐标
// g.drawString(DateUtil.date2Str(new Date()), x, y);
// g.dispose();
// //将加完水印的图片暂存到内存中
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
// ImageIO.write(bufImg, suffixName, bos);
// ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
//
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile);
//通过流的方式上传文件
Smb.sshSftpForInput(bis, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile);
Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile);
// 通过流的方式上传文件
// Smb.sshSftpForInput(bis, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile);
pd.put("FILEPATH",Const.FILEPATHYHTP + corpInfoId + "/" + ffile + "/" + fileName);
}
hotworkapplicationdelayedService.save(pd);

View File

@ -237,6 +237,7 @@ public class CorpInfoController extends BaseController {
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("corpinfo_edit_self:list")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();

View File

@ -1310,7 +1310,8 @@ public class HotWorkApplicationController extends BaseController {
}else if("2".equals(type)){ // 项目发包单位负责人
hot.put("PROJECT_UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("PROJECT_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}else if("4".equals(type)){ // 现场管辖单位负责人
// }else if("4".equals(type)){ // 现场管辖单位负责人
}else if("3".equals(type)){ // 现场管辖单位负责人
hot.put("UNIT_LEADER_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
hot.put("UNIT_LEADER_DEPARTMENT_NAME",userPageData.getString("deptName"));
hot.put("UNIT_LEADER_NAME",userPageData.getString("userName"));

View File

@ -9,6 +9,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -31,7 +32,7 @@ import com.zcloud.util.Tools;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.RiskWarningService;
/**
/**
*
* luoxiaobao
* 2021-04-27
@ -40,10 +41,13 @@ import com.zcloud.service.bus.RiskWarningService;
@Controller
@RequestMapping("/riskwarning")
public class RiskWarningController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private RiskWarningService riskwarningService;
/**
* @param
* @throws Exception
@ -62,7 +66,7 @@ public class RiskWarningController extends BaseController {
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (null != file && !file.isEmpty()) {
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)) {
@ -85,7 +89,7 @@ public class RiskWarningController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param out
* @throws Exception
@ -102,7 +106,7 @@ public class RiskWarningController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -119,7 +123,7 @@ public class RiskWarningController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -134,7 +138,7 @@ public class RiskWarningController extends BaseController {
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
List<PageData> varList = riskwarningService.list(page); //列出RiskWarning列表
map.put("varList", varList);
@ -142,7 +146,7 @@ public class RiskWarningController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -159,8 +163,8 @@ public class RiskWarningController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}
/**
* @param
* @throws Exception
@ -171,7 +175,7 @@ public class RiskWarningController extends BaseController {
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
@ -184,7 +188,7 @@ public class RiskWarningController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -197,7 +201,7 @@ public class RiskWarningController extends BaseController {
pd = riskwarningService.findById(pd);
String FILEPATH = pd.get("FILEPATH").toString();
System.out.println(FILEPATH.length());
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?28:61, FILEPATH.length()));
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?28:61, FILEPATH.length()));
}
/**excel
* @param
@ -239,5 +243,5 @@ public class RiskWarningController extends BaseController {
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -8,6 +8,7 @@ import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -28,7 +29,7 @@ import com.zcloud.util.PathUtil;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
/**
/**
*
* luoxiaobao
* 2021-01-15
@ -37,10 +38,13 @@ import com.zcloud.util.Tools;
@Controller
@RequestMapping("/video")
public class VideoController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private VideoService videoService;
/**
* @param
* @throws Exception
@ -74,15 +78,15 @@ public class VideoController extends BaseController {
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
//Smb.1sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
//pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
Smb.sshSftp(file, fileName,Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
pd.put("FILEPATH", Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
Smb.sshSftp(file, fileName,fileUrl + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
pd.put("FILEPATH", fileUrl + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
}
videoService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param out
* @throws Exception
@ -99,7 +103,7 @@ public class VideoController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -116,7 +120,7 @@ public class VideoController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -142,7 +146,7 @@ public class VideoController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -159,8 +163,8 @@ public class VideoController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}
/**
* @param
* @throws Exception
@ -187,7 +191,7 @@ public class VideoController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}
/**
* @param
* @throws Exception
@ -198,7 +202,7 @@ public class VideoController extends BaseController {
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
@ -211,7 +215,7 @@ public class VideoController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**excel
* @param
* @throws Exception
@ -275,7 +279,7 @@ public class VideoController extends BaseController {
pd.put("CORPINFO_TYPE", "2");
pd.put("TYPE", "1");
List<PageData> ptVarList = videoService.listAll(pd); //平台视频
map.put("ptVarList", ptVarList);
map.put("cpvarList", cpvarList);
map.put("result", errInfo);

View File

@ -7,6 +7,7 @@ import com.zcloud.service.emergency.EmergencyDrillAttachmentService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -27,6 +28,9 @@ import java.util.*;
@RequestMapping("/emergencydrillattachment")
public class EmergencyDrillAttachmentController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private EmergencyDrillAttachmentService emergencydrillattachmentService;
@ -256,7 +260,7 @@ public class EmergencyDrillAttachmentController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");

View File

@ -7,6 +7,7 @@ import com.zcloud.service.emergency.EmergencyDrillReportService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -27,6 +28,9 @@ import java.util.*;
@RequestMapping("/emergencydrillreport")
public class EmergencyDrillReportController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private EmergencyDrillReportService emergencydrillreportService;
@ -258,7 +262,7 @@ public class EmergencyDrillReportController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");

View File

@ -7,6 +7,7 @@ import com.zcloud.service.emergency.EmergencyPlanService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -27,6 +28,9 @@ import java.util.*;
@RequestMapping("/emergencyplan")
public class EmergencyPlanController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private EmergencyPlanService emergencyplanService;
@ -283,7 +287,7 @@ public class EmergencyPlanController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");

View File

@ -11,6 +11,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -34,18 +35,21 @@ import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
/**
*
* zCloud
* zCloud
*
*/
@Controller
@RequestMapping("/mfolder")
public class MfolderController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private MfolderService mfolderService;
/**
* @param
* @throws Exception
@ -64,13 +68,13 @@ public class MfolderController extends BaseController {
pd.put("UNAME", Jurisdiction.getName()); //上传者
pd.put("MASTER", Jurisdiction.getUsername()); //所属人
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
pd.put("FILESIZE", "");
pd.put("SHARE", "no");
pd.put("FILESIZE", "");
pd.put("SHARE", "no");
mfolderService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -120,11 +124,11 @@ public class MfolderController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
*
*
*
* @param
* @throws Exception
*/
@ -186,7 +190,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo); // 返回结果
return map;
}
/**
* @param
* @throws Exception
@ -212,7 +216,7 @@ public class MfolderController extends BaseController {
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
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("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
String realName = file.getOriginalFilename();
String[] fileFullNames = realName.split("\\.");//上传文件全名
@ -235,7 +239,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param out
* @throws Exception
@ -263,7 +267,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -280,7 +284,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -300,7 +304,7 @@ public class MfolderController extends BaseController {
MFOLDER_ID = null == pd.get("MFOLDER_ID")?"":pd.get("MFOLDER_ID").toString();
pd.put("MFOLDER_ID", MFOLDER_ID); //当作上级ID
}
// if(Tools.notEmpty(SHARE) && "yes".equals(SHARE)) {
// pd.put("SHARE", "yes");
// }else {
@ -351,7 +355,7 @@ public class MfolderController extends BaseController {
fileType = "video"; //视频文件类型
}
varList.get(i).put("extension_name", extension_name); //文件拓展名
varList.get(i).put("fileType", fileType); //用于文件图标
varList.get(i).put("fileType", fileType); //用于文件图标
}
map.put("varList", varList);
map.put("page", page);
@ -385,9 +389,9 @@ public class MfolderController extends BaseController {
map.put("result", errInfo);
return map;
}
/**txt,java,php,
* @return
* @return
*/
@RequestMapping(value="/viewTxt")
@ResponseBody
@ -403,7 +407,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -414,7 +418,7 @@ public class MfolderController extends BaseController {
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
@ -428,7 +432,7 @@ public class MfolderController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param response
* @throws Exception
@ -441,17 +445,17 @@ public class MfolderController extends BaseController {
pd = mfolderService.findById(pd);
String FILEPATH = pd.getString("FILEPATH");
// String fileName = pd.getString("NAME");
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?27:60, FILEPATH.length()));
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?27:60, FILEPATH.length()));
} catch (Exception e) {
e.printStackTrace();
throw new NofileException("=========要下载的文件已经没有了=========");
}
}
/**
*
*
* @throws Exception
* @throws Exception
*/
public void initialize () throws Exception {
PageData pData = new PageData();
@ -469,12 +473,12 @@ public class MfolderController extends BaseController {
pd.put("UNAME", "init"); //上传者
pd.put("MASTER", Jurisdiction.getUsername()); //所属人
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
pd.put("FILESIZE", "");
pd.put("SHARE", "no");
pd.put("FILESIZE", "");
pd.put("SHARE", "no");
mfolderService.save(pd);
}
}
}
/*
@ -483,7 +487,7 @@ public class MfolderController extends BaseController {
class NofileException extends Exception {
private static final long serialVersionUID = 1L;
public NofileException() {
super();
}
@ -499,5 +503,5 @@ class NofileException extends Exception {
public NofileException(Throwable cause) {
super(cause);
}
}

View File

@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -31,18 +32,21 @@ import com.zcloud.util.Tools;
import net.sf.json.JSONArray;
/**
/**
*
* zCloud
* zCloud
*
*/
@Controller
@RequestMapping("/mfolderStipulate")
public class MfolderStipulateController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private MfolderStipulateService mfolderService;
/**
* @param
* @throws Exception
@ -61,12 +65,12 @@ public class MfolderStipulateController extends BaseController {
pd.put("UNAME", Jurisdiction.getName()); //上传者
pd.put("MASTER", Jurisdiction.getUsername()); //所属人
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
pd.put("FILESIZE", "");
pd.put("FILESIZE", "");
mfolderService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -103,7 +107,7 @@ public class MfolderStipulateController extends BaseController {
//pd.put("REMARKS", REMARKS); //备注
//pd.put("SHARE", SHARE); //是否共享
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
pd.put("MFOLDER_ID", this.get32UUID()); //主键
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
mfolderService.save(pd); //存入数据库表
@ -113,7 +117,7 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -149,15 +153,15 @@ public class MfolderStipulateController extends BaseController {
//pd.put("REMARKS", REMARKS); //备注
//pd.put("SHARE", SHARE); //是否共享
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
}
mfolderService.edit(pd); //存入数据库表
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -174,8 +178,8 @@ public class MfolderStipulateController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}
/**
* @param
* @throws Exception
@ -201,7 +205,7 @@ public class MfolderStipulateController extends BaseController {
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
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("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
String realName = file.getOriginalFilename();
String[] fileFullNames = realName.split("\\.");//上传文件全名
@ -248,7 +252,7 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -265,7 +269,7 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -285,7 +289,7 @@ public class MfolderStipulateController extends BaseController {
MFOLDER_ID = null == pd.get("MFOLDER_ID")?"":pd.get("MFOLDER_ID").toString();
pd.put("MFOLDER_ID", MFOLDER_ID); //当作上级ID
}
// if(Tools.notEmpty(SHARE) && "yes".equals(SHARE)) {
// pd.put("SHARE", "yes");
// }else {
@ -337,7 +341,7 @@ public class MfolderStipulateController extends BaseController {
fileType = "video"; //视频文件类型
}
varList.get(i).put("extension_name", extension_name); //文件拓展名
varList.get(i).put("fileType", fileType); //用于文件图标
varList.get(i).put("fileType", fileType); //用于文件图标
}
map.put("varList", varList);
map.put("page", page);
@ -370,9 +374,9 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo);
return map;
}
/**txt,java,php,
* @return
* @return
*/
@RequestMapping(value="/viewTxt")
@ResponseBody
@ -388,7 +392,7 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -399,7 +403,7 @@ public class MfolderStipulateController extends BaseController {
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
@ -413,7 +417,7 @@ public class MfolderStipulateController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param response
* @throws Exception
@ -426,12 +430,12 @@ public class MfolderStipulateController extends BaseController {
pd = mfolderService.findById(pd);
String FILEPATH = pd.getString("FILEPATH");
// String fileName = pd.getString("NAME");
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?27:60, FILEPATH.length()));
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILEPATH.substring(FILEPATH.length()<85?27:60, FILEPATH.length()));
} catch (Exception e) {
throw new NofileStiException("=========要下载的文件已经没有了=========");
}
}
}
/*
@ -440,7 +444,7 @@ public class MfolderStipulateController extends BaseController {
class NofileStiException extends Exception {
private static final long serialVersionUID = 1L;
public NofileStiException() {
super();
}
@ -456,5 +460,5 @@ class NofileStiException extends Exception {
public NofileStiException(Throwable cause) {
super(cause);
}
}

View File

@ -11,6 +11,7 @@ import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -48,7 +49,12 @@ public class HomeHighRiskWorkController extends BaseController {
/*风险管控 数据统计*/
//获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE]
PageData data = highworkService.statisticsHighRiskWorkByState(pd);
PageData data = new PageData();
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { //一公司
data = highworkService.statisticsHighRiskWorkByStateFirst(pd);
} else {
data = highworkService.statisticsHighRiskWorkByState(pd);
}
map.put("pd", data);
map.put("result", errInfo);
@ -70,7 +76,12 @@ public class HomeHighRiskWorkController extends BaseController {
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
page.setPd(pd);
List<PageData> varList = highworkService.listHighRiskWork(page);
List<PageData> varList = new ArrayList<>();
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { // 一公司
varList = highworkService.listHighRiskWorkFirst(page);
} else {
varList = highworkService.listHighRiskWork(page);
}
map.put("varList", varList);
map.put("result", errInfo);
return map;
@ -93,7 +104,12 @@ public class HomeHighRiskWorkController extends BaseController {
Map<String, Object> chartData = new HashMap<String, Object>();
List<String> legendData = Arrays.asList(new String[]{"动火作业", "临时用电作业", "盲板作业", "高处作业", "有限空间作业", "吊装作业"});
List<PageData> workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数
List<PageData> workChart = new ArrayList<>();
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { //一公司
workChart = highworkService.statisticsAllHighRiskWorkFirst(pd); //统计高危作业里各作业数
} else {
workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数
}
List seriesData = new ArrayList();
for (int i = 0; i < legendData.size(); i++) {
PageData pie = new PageData();

View File

@ -24,6 +24,7 @@ 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.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -45,6 +46,9 @@ import java.util.stream.Collectors;
@RequestMapping("/safetyenvironmental")
public class SafetyEnvironmentalController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private SafetyEnvironmentalService safetyenvironmentalService;
@Autowired
@ -653,7 +657,7 @@ public class SafetyEnvironmentalController extends BaseController {
String FILEPATH = pd.getString("INSPECTED_EXPLAIN_FILEPATH");
String FILENAME = pd.getString("INSPECTED_EXPLAIN_FILENAME");
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");
@ -674,7 +678,7 @@ public class SafetyEnvironmentalController extends BaseController {
String FILEPATH = pd.getString("INSPECTED_EXPLAIN_FILEPATH");
String FILENAME = pd.getString("INSPECTED_EXPLAIN_FILENAME");
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -8,6 +8,7 @@ import com.zcloud.util.Tools;
import com.zcloud.util.hk.HKUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -54,6 +55,9 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"hls");
if(!ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");
return map;
}
@ -67,6 +71,9 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"rtsp");
if(!ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");
return map;
}
@ -80,6 +87,9 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.cameraSearch(pd);
if(!ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");
return map;
}

View File

@ -6,6 +6,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.service.keyProjects.OutSourcedService;
import com.zcloud.service.keyProjects.PersonnelManagementService;
import com.zcloud.service.keyProjects.UnitsService;
import com.zcloud.service.keyProjects.VideoManagerService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
@ -38,6 +39,9 @@ public class AppKeyProjectsController extends BaseController {
@Autowired
private PersonnelManagementService personnelmanagementService;
@Autowired
private VideoManagerService videomanagerService;
/**
* @throws Exception
*/
@ -156,4 +160,127 @@ public class AppKeyProjectsController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @throws Exception
*/
@RequestMapping(value="/listHiddenOutsourced")
@ResponseBody
public Object listHiddenOutsourced(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
String UserId = pd.getString("UserId");
if(!StringUtils.equals("1",UserId)){
String CORPINFO_ID = pd.getString("CORPINFO_ID");
// -- 河港机械 河港港工 河港检测
if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676")
&&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&&
!StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5")
&&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){
pd.put("DeptId",outsourcedService.getDeptId(UserId));
pd.put("UserId",UserId);
}
}
page.setPd(pd);
List<PageData> varList = outsourcedService.listHiddenOutsourced(page); //列出OutSourced列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/videomanagerList")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
page.setPd(pd);
List<PageData> varList = videomanagerService.listApp(page); //列出VideoManager列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/getOutsourced")
@ResponseBody
public Object getOutsourced() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = outsourcedService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/updateState")
@ResponseBody
public Object updateState() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
outsourcedService.updateState(pd); //获取同时绑定的重点工程信息如果大于1表示还有其他重点工程
map.put("result", errInfo);
return map;
}
/**
* @throws Exception
*/
@RequestMapping(value="/outSouceslistPage")
@ResponseBody
public Object outSouceslistPage(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
String UserId = pd.getString("UserId");
if(!StringUtils.equals("1",UserId)){
String CORPINFO_ID = pd.getString("CORPINFO_ID");
// -- 河港机械 河港港工 河港检测
if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676")
&&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&&
!StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5")
&&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){
pd.put("DeptId",outsourcedService.getDeptId(UserId));
pd.put("UserId",UserId);
}
}
page.setPd(pd);
List<PageData> varList = outsourcedService.outSouceslistPage(page); //列出OutSourced列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -10,6 +10,7 @@ import com.zcloud.service.majordangersource.MajorDangerSourceLogService;
import com.zcloud.service.majordangersource.MonitoringDeviceDisableService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -35,6 +36,9 @@ import javax.servlet.http.HttpServletResponse;
@RequestMapping("/majordangersource")
public class MajorDangerSourceController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private MajorDangerSourceService majordangersourceService;
@ -352,7 +356,7 @@ public class MajorDangerSourceController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");

View File

@ -7,6 +7,7 @@ import com.zcloud.service.majordangersource.MajorDangerSourceLogService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -15,7 +16,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**
/**
*
* luoxiaobao
* 2022-03-22
@ -24,10 +25,13 @@ import java.util.*;
@Controller
@RequestMapping("/majordangersourcelog")
public class MajorDangerSourceLogController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private MajorDangerSourceLogService majorDangerSourceLogService;
/**
* @param
* @throws Exception
@ -51,7 +55,7 @@ public class MajorDangerSourceLogController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param out
* @throws Exception
@ -70,7 +74,7 @@ public class MajorDangerSourceLogController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -89,7 +93,7 @@ public class MajorDangerSourceLogController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
@ -112,7 +116,7 @@ public class MajorDangerSourceLogController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
@ -163,7 +167,7 @@ public class MajorDangerSourceLogController extends BaseController {
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
@ -184,7 +188,7 @@ public class MajorDangerSourceLogController extends BaseController {
map.put("result", errInfo); //返回结果
return map;
}
/**excel
* @param
* @throws Exception
@ -267,11 +271,11 @@ public class MajorDangerSourceLogController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");
}
}
}

View File

@ -66,6 +66,23 @@ public class OpenApiController extends BaseController {
return map;
}
/**
* ztree
* @return
*/
@RequestMapping(value="/corpDepartment/listTree")
@ResponseBody
public Object listTreeRe()throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
JSONArray arr = JSONArray.fromObject(departmentService.listAllCorpDepartment("0"));
String json = arr.toString();
json = json.replaceAll("DEPARTMENT_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("NAME", "name").replaceAll("subDepartment", "nodes").replaceAll("hasDepartment", "checked").replaceAll("treeurl", "url");
map.put("zTreeNodes", json);
map.put("result", errInfo);
return map;
}
/**
* @throws Exception
*/

View File

@ -1,9 +1,11 @@
package com.zcloud.controller.system;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zcloud.service.bus.CorpInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -28,53 +30,62 @@ import com.zcloud.util.Tools;
@Controller
@RequestMapping(value="/buttonrights")
public class ButtonrightsController extends BaseController {
@Autowired
private ButtonrightsService buttonrightsService;
@Autowired
private RoleService roleService;
@Autowired
private CorpInfoService corpInfoService;
@Autowired
private FhButtonService fhButtonService;
@Autowired
private FHlogService FHLOG;
/**
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("buttonrights:list")
@ResponseBody
public Object list() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
if(Tools.isEmpty(pd.getString("ROLE_ID"))){
pd.put("ROLE_ID", "1"); //默认列出第一组角色(初始设计系统用户组不能删除)
}
PageData pd = this.getPageData();
// if(Tools.isEmpty(pd.getString("ROLE_ID"))){
// pd.put("ROLE_ID", "1"); //默认列出第一组角色(初始设计系统用户组不能删除)
// }
// PageData fpd = new PageData();
// fpd.put("ROLE_ID", "0");
String corpId = Jurisdiction.getCORPINFO_ID();
pd.put("CORPINFO_ID", corpId);
PageData corp = corpInfoService.findById(pd);
PageData fpd = new PageData();
fpd.put("ROLE_ID", "0");
List<Role> roleList = roleService.listAllRolesByPId(fpd); //列出组(页面横向排列的一级组)
fpd.put("CORPINFO_ID",corp.getString("ROLE_NAME"));
fpd.put("ROLE_ID",corp.getString("ROLE_NAME"));
pd.put("ROLE_ID",corp.getString("ROLE_NAME"));
Role roleList = roleService.getRoleById(corp.getString("ROLE_NAME")); //列出组(页面横向排列的一级组)
List<Role> roleList_z = roleService.listAllRolesByPId(pd); //列出此组下架角色
List<PageData> buttonlist = fhButtonService.listAll(pd); //列出所有按钮
List<PageData> roleFhbuttonlist = buttonrightsService.listAll(pd); //列出所有角色按钮关联数据
pd = roleService.findById(pd); //取得点击的角色组(横排的)
map.put("pd", pd);
map.put("roleList", roleList);
map.put("roleList", Collections.singletonList(roleList));
map.put("roleList_z", roleList_z);
map.put("buttonlist", buttonlist);
map.put("roleFhbuttonlist", roleFhbuttonlist);
map.put("result", errInfo);
return map;
}
/**
* @return
* @throws Exception
*/
@RequestMapping(value="/upRb")
@ResponseBody
@RequiresPermissions("buttonrights:edit")
public Object updateRolebuttonrightd()throws Exception{
Map<String,String> map = new HashMap<String,String>();
PageData pd = new PageData();
@ -90,5 +101,5 @@ public class ButtonrightsController extends BaseController {
map.put("result", errInfo);
return map;
}
}

View File

@ -70,19 +70,22 @@ public class LoginController extends BaseController {
@Autowired
private PhotoService photoService;
@Value("${czks-useridentity}")
private String czksIdentity;
@Value("${czks-baseimgpath}")
private String czksBaseimgpath;
@Value("${czks-backendaddr}")
private String czksBackendaddr;
// @Value("${czks-useridentity}")
// private String czksIdentity;
// @Value("${czks-baseimgpath}")
// private String czksBaseimgpath;
// @Value("${czks-backendaddr}")
// private String czksBackendaddr;
//
// @Value("${gwj-useridentity}")
// private String gwjIdentity;
// @Value("${gwj-baseimgpath}")
// private String gwjBaseimgpath;
// @Value("${gwj-backendaddr}")
// private String gwjBackendaddr;
@Autowired
private CorpPathService corpPathService;
@Value("${gwj-useridentity}")
private String gwjIdentity;
@Value("${gwj-baseimgpath}")
private String gwjBaseimgpath;
@Value("${gwj-backendaddr}")
private String gwjBackendaddr;
/**
*
*
@ -184,24 +187,24 @@ public class LoginController extends BaseController {
return map;
}
// 判断是不是沧州矿石的用户
if (czksIdentity.equals(pd.getString("USER_IDENTITY"))) {
// 沧州矿石的用户
// 用户标识
map.put("USER_IDENTITY", czksIdentity);
// 图片路径
map.put("baseImgPath", czksBaseimgpath);
// 后台地址
map.put("BACKENDADDR", czksBackendaddr);
}
if ("".equals(pd.getString("USER_IDENTITY"))) {
// 港股的用户
// 用户标识
map.put("USER_IDENTITY", gwjIdentity);
// 图片路径
map.put("baseImgPath", gwjBaseimgpath);
// 后台地址
map.put("BACKENDADDR", gwjBackendaddr);
}
// if (czksIdentity.equals(pd.getString("USER_IDENTITY"))) {
// // 沧州矿石的用户
// // 用户标识
// map.put("USER_IDENTITY", czksIdentity);
// // 图片路径
// map.put("baseImgPath", czksBaseimgpath);
// // 后台地址
// map.put("BACKENDADDR", czksBackendaddr);
// }
// if ("".equals(pd.getString("USER_IDENTITY"))) {
// // 港股的用户
// // 用户标识
// map.put("USER_IDENTITY", gwjIdentity);
// // 图片路径
// map.put("baseImgPath", gwjBaseimgpath);
// // 后台地址
// map.put("BACKENDADDR", gwjBackendaddr);
// }
PageData cpd = corpinfoService.findById(pd);
//System.out.println(cpd.getString("ISUSE"));
if (cpd != null) {
@ -284,6 +287,19 @@ public class LoginController extends BaseController {
session.setAttribute(Const.ISSUPERVISE, dpd.getString("ISSUPERVISE")); //把当前用户放入session
FHLOG.save(USERNAME, "成功登录系统", ip); //记录日志
//查询该用户或企业的图片和后端地址
if (!Tools.isEmpty(pd.getString("CORPINFO_ID")) && !pd.getString("CORPINFO_ID").equals("1")) {
PageData pathData = corpPathService.getCorpPathByCorpId(pd);
map.put("baseImgPath",pathData.getString("PIC_PATH"));
map.put("USER_IDENTITY",pathData.getString("USER_IDENTITY"));
map.put("BACKENDADDR", pathData.getString("BACK_END_PATH"));
} else {
PageData pathData = corpPathService.getCorpPathByPersonInfo(pd);
map.put("baseImgPath",pathData.getString("PIC_PATH"));
map.put("USER_IDENTITY",pathData.getString("USER_IDENTITY"));
map.put("BACKENDADDR", pathData.getString("BACK_END_PATH"));
}
}
} else {
token.clear();

View File

@ -1718,7 +1718,6 @@ public class UsersController extends BaseController {
*
* @param parentId id
* @param departMap
* @param valName
* @return
*/
public String getParentName(String parentId, Map<String, Object> departMap) {
@ -2401,5 +2400,22 @@ public class UsersController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value = "/getRegUserInfo")
@ResponseBody
public Object getRegUserInfo() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("LOCK_STATUS", "0");
pd.put("ERROR_COUNT", 0);
map.put("list",usersService.getRegUserInfo(pd));
map.put("result", errInfo);
return map;
}
}

View File

@ -11,6 +11,7 @@ import com.zcloud.service.tzsb.SpecialEquipmentService;
import com.zcloud.util.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -31,6 +32,9 @@ import java.util.*;
@RequestMapping("/specialequipment")
public class SpecialEquipmentController extends BaseController {
@Value("${http.file.url}")
private String fileUrl;
@Autowired
private SpecialEquipmentService specialequipmentService;
@Autowired
@ -488,7 +492,7 @@ public class SpecialEquipmentController extends BaseController {
// FileDownload.fileDownload(response, PathUtil.getProjectpath() + FILEPATH, FILENAME);
//// FileDownload.mfFileDownload(response, this.getRequest().getScheme() + "://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort() + FILEPATH, FILENAME); //不好用
//服务器
FileDownload.mfFileDownload(response, Const.HTTPFILEURL + FILEPATH, FILENAME);
FileDownload.mfFileDownload(response, fileUrl + FILEPATH, FILENAME);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("=========文件下载异常:可能要下载的文件已经没有了=========");

View File

@ -3,15 +3,18 @@ package com.zcloud.controller.xgf;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.util.Const;
import com.zcloud.util.HttpClientService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.service.xgf.TrainUsersService;
import com.zcloud.service.xgf.TrainingBatchService;
import com.zcloud.util.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -25,47 +28,68 @@ public class FlowTrainController extends BaseController {
@Value("${preventionxgf.api.url}")
private String xgfUrl;
@RequestMapping(value="/batchList")
@Resource
private TrainingBatchService trainingbatchService;
@Resource
private TrainUsersService trainUsersService;
@RequestMapping(value = "/batchList")
@ResponseBody
public Object batchList(Page page) throws Exception{
public Object batchList(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = trainingbatchService.list(page); //列出TrainingBatch列表
map.put("varList", varList);
map.put("page", page);
map.put("result", "success");
return map;
}
@RequestMapping(value = "/batchUserList")
@ResponseBody
public Object batchUserList(Page page) throws Exception {
PageData request = this.getPageData();
PageData condition = new PageData();
condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID"));
page.setPd(condition);
List<PageData> varList = trainingbatchService.batchUserlistPage(page);
PageData response = new PageData();
response.put("varList", varList);
response.put("page", page);
response.put("total", page.getTotalResult());
response.put("result", "success");
return response;
}
@RequestMapping(value = "/batchAudit")
@ResponseBody
public Object batchAudit(Page page) throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
pd.put("MAndTUserId",Jurisdiction.getUSER_ID());
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/list" +getPageUrl(page), pd);
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit", pd);
return result;
}
@RequestMapping(value="/batchUserList")
@ResponseBody
public Object batchUserList(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/batchUserList" +getPageUrl(page), pd);
return result;
}
@RequestMapping(value="/batchAudit")
@ResponseBody
public Object batchAudit(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit" , pd);
return result;
}
private String getPageUrl(Page page){
return "?showCount=" +page.getShowCount() + "&currentPage=" + page.getUrlCurrentPage();
private String getPageUrl(Page page) {
return "?showCount=" + page.getShowCount() + "&currentPage=" + page.getUrlCurrentPage();
}
/**
* --
*
* @return
* @throws Exception
*/
@RequestMapping(value="/getUserDetailById")
@RequestMapping(value = "/getUserDetailById")
@ResponseBody
public Object getCorpUserList() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object getCorpUserList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -73,24 +97,71 @@ public class FlowTrainController extends BaseController {
return result;
}
@RequestMapping(value="/approveUser")
@RequestMapping(value = "/approveUser")
@ResponseBody
public Object approveUser() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("loginUserId",Jurisdiction.getUSER_ID());
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainusers/approveUser", pd);
return result;
public Object approveUser() throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd = this.getPageData();
trainUsersService.approveUser(pd);
map.put("result", "success");
return map;
}
@RequestMapping(value="/getDetailsById")
@RequestMapping(value = "/getDetailsById")
@ResponseBody
public Object getDetailsById() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
if(!Jurisdiction.getUsername().equals("admin")){
pd.put("AUDIT_USER_ID", Jurisdiction.getUSER_ID());
public Object getDetailsById() throws Exception {
PageData request = this.getPageData();
PageData condition = new PageData();
condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID"));
PageData entity = trainingbatchService.findById(condition);
switch (entity.getString("STEP_STATUS")) {
case "0":
if (entity.getString("TERRITORIALITY_USER_ID").equals(Jurisdiction.getUSER_ID())) {
entity.put("step", "TERRITORIALITY_STATE");
}
break;
case "1":
if (entity.getString("MANAGER_USER_ID").equals(Jurisdiction.getUSER_ID())) {
entity.put("step", "MANAGER_STATE");
}
break;
case "2":
if (entity.getString("SUPERVISION_USER_ID").equals(Jurisdiction.getUSER_ID())) {
entity.put("step", "SUPERVISION_STATE");
}
break;
default:
break;
}
Map result = HttpClientService.doPost(xgfUrl+ "/openApi/trainingbatch/getDetailsById", pd);
return result;
PageData response = new PageData();
response.put("pd", entity);
response.put("result", "success");
return response;
}
@RequestMapping(value = "/endApproval")
@ResponseBody
public Object endApproval() throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd = this.getPageData();
trainUsersService.endApproval(pd);
map.put("result", "success");
return map;
}
@RequestMapping(value = "/oldBatchList")
@ResponseBody
public Object oldBatchList(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = trainingbatchService.oldBatchList(page); //列出TrainingBatch列表
map.put("varList", varList);
map.put("page", page);
map.put("result", "success");
return map;
}
}

View File

@ -15,6 +15,16 @@ public class Role {
private String EDIT_QX; //修改权限(存放的除权后的菜单ID)有修改权限的菜单ID
private String CHA_QX; //查看权限(存放的除权后的菜单ID)有查看权限的菜单ID
private String RNUMBER; //编号(在处理类中新增的时候自动生成)
private String DEPT_TYPE;
public String getDEPT_TYPE() {
return DEPT_TYPE;
}
public void setDEPT_TYPE(String DEPT_TYPE) {
this.DEPT_TYPE = DEPT_TYPE;
}
private String Level; //用户等级
public String getROLE_ID() {

View File

@ -100,5 +100,17 @@ public interface HighWorkMapper{
List<PageData> listAllHighRiskWorkLocation(PageData pd);
void editacceptancapplication(PageData pd);
List<PageData> listHighRiskWorkFirst(Page page);
PageData statisticsHighRiskWorkByStateFirst(PageData pd);
/**
*
* @param pd
* @return
* @throws Exception
*/
List<PageData> statisticsAllHighRiskWorkFirst(PageData pd);
}

View File

@ -177,5 +177,9 @@ public interface DepartmentMapper{
PageData getInfo(PageData pd) throws Exception;
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
List<Department> listSubCorpDepartmentByParentId(String parentId);
PageData findByCorpDepartmentId(PageData condition);
}

View File

@ -75,5 +75,20 @@ public interface OutSourcedMapper{
PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> hiddenOutsourcedlistPage(Page page);
/**
*
* @param page
* @return
*/
List<PageData> outSouceslistPage(Page page);
}

View File

@ -75,5 +75,7 @@ public interface VideoManagerMapper {
void editByResourcesId(PageData pd);
void updateAiByOUTSOURCED_ID(PageData pd);
List<PageData> dataApplistPage(Page page);
}

View File

@ -103,5 +103,29 @@ public interface HighWorkService{
* @throws Exception
*/
List<PageData> listAllHighRiskWorkLocation(PageData pd)throws Exception;
/**
*
* @param page
* @return
* @throws Exception
*/
List<PageData> listHighRiskWorkFirst(Page page)throws Exception;
/**
* [COUNTAPPLY][COUNTAPPROVE][COUNTARCHIVE]
* @param pd
* @return
* @throws Exception
*/
PageData statisticsHighRiskWorkByStateFirst(PageData pd)throws Exception;
/**
*
* @param pd
* @return
* @throws Exception
*/
List<PageData> statisticsAllHighRiskWorkFirst(PageData pd)throws Exception;
}

View File

@ -176,5 +176,26 @@ public class HighWorkServiceImpl implements HighWorkService {
public List<PageData> listAllHighRiskWorkLocation(PageData pd) throws Exception {
return highworkMapper.listAllHighRiskWorkLocation(pd);
}
@Override
public List<PageData> listHighRiskWorkFirst(Page page) throws Exception {
return highworkMapper.listHighRiskWorkFirst(page);
}
@Override
public PageData statisticsHighRiskWorkByStateFirst(PageData pd) throws Exception {
return highworkMapper.statisticsHighRiskWorkByStateFirst(pd);
}
/**
*
* @param pd
* @return
* @throws Exception
*/
@Override
public List<PageData> statisticsAllHighRiskWorkFirst(PageData pd) throws Exception {
return highworkMapper.statisticsAllHighRiskWorkFirst(pd);
}
}

View File

@ -76,5 +76,21 @@ public interface OutSourcedService{
PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
/**
* @param page
* @throws Exception
*/
public List<PageData> listHiddenOutsourced(Page page)throws Exception;
/**
* APP
* @param page
* @return
* @throws Exception
*/
public List<PageData> outSouceslistPage(Page page)throws Exception;
}

View File

@ -73,5 +73,7 @@ public interface VideoManagerService {
void updateAiByOUTSOURCED_ID(PageData pd);
List<PageData> listApp(Page page);
}

View File

@ -106,5 +106,15 @@ public class OutSourcedServiceImpl implements OutSourcedService {
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
outsourcedMapper.updateState(pd);
}
@Override
public List<PageData> listHiddenOutsourced(Page page) throws Exception {
return outsourcedMapper.hiddenOutsourcedlistPage(page);
}
@Override
public List<PageData> outSouceslistPage(Page page) throws Exception {
return outsourcedMapper.outSouceslistPage(page);
}
}

View File

@ -121,5 +121,10 @@ public class VideoManagerServiceImpl implements VideoManagerService {
public void updateAiByOUTSOURCED_ID(PageData pd) {
videomanagerMapper.updateAiByOUTSOURCED_ID(pd);
}
@Override
public List<PageData> listApp(Page page) {
return videomanagerMapper.dataApplistPage(page);
}
}

View File

@ -227,5 +227,9 @@ public interface DepartmentService{
PageData getDepartmentInfo(PageData pd) throws Exception;
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
List<Department> listAllCorpDepartment(String number) throws Exception;
PageData getCorpDepartment(PageData condition) throws Exception;
}

View File

@ -364,4 +364,6 @@ public interface UsersService {
Object getPersonPositioningStatistics(PageData pd) throws Exception;
Object getCurrentLocationCount(PageData pd);
List<PageData> getRegUserInfo(PageData pd);
}

View File

@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import com.zcloud.entity.system.Menu;
import com.zcloud.mapper.datasource.system.SupervisionDepartmentMapper;
import com.zcloud.mapper.dsno2.system.Department2Mapper;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.UuidUtil;
@ -33,6 +34,9 @@ public class DepartmentServiceImpl implements DepartmentService{
@Resource
private DepartmentMapper departmentMapper;
@Resource
private Department2Mapper department2Mapper;
/**
* @param pd
* @throws Exception
@ -419,5 +423,36 @@ public class DepartmentServiceImpl implements DepartmentService{
public List<PageData> listTreeManageAndCorpHasOrder(PageData pd) {
return departmentMapper.listTreeManageAndCorpHasOrder(pd);
}
@Override
public List<Department> listAllCorpDepartment(String parentId) throws Exception{
List<Department> departmentList = this.listSubCorpDepartmentByParentId(parentId);
for(Department depar : departmentList){
depar.setTreeurl("department_list.html?DEPARTMENT_ID="+depar.getDEPARTMENT_ID());
depar.setSubDepartment(this.listAllCorpDepartment(depar.getDEPARTMENT_ID()));
depar.setTarget("treeFrame");
depar.setIcon("../../../assets/images/user.gif");
}
return departmentList;
}
@Override
public PageData getCorpDepartment(PageData condition) throws Exception {
return departmentMapper.findByCorpDepartmentId(condition);
}
/**
* ID
* @param parentId
* @return
* @throws Exception
*/
public List<Department> listSubCorpDepartmentByParentId(String parentId) throws Exception {
return departmentMapper.listSubCorpDepartmentByParentId(parentId);
}
}

View File

@ -623,4 +623,9 @@ public class UsersServiceImpl implements UsersService {
return map;
}
@Override
public List<PageData> getRegUserInfo(PageData pd) {
return usersMapper.getUsersInfo(pd);
}
}

View File

@ -8,6 +8,8 @@ package com.zcloud.util;
public class Const {
public static final String SESSION_USER = "SESSION_USER"; //session用的用户
public static final String SESSION_DEPT = "SESSION_DEPT"; //session用的用户
public static final String SESSION_USERROL = "SESSION_USERROL"; //用户对象(包含角色信息)
public static final String SESSION_ROLE_RIGHTS = "SESSION_ROLE_RIGHTS"; //角色菜单权限
public static final String SHIROSET = "SHIROSET"; //菜单权限标识

View File

@ -18,6 +18,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.shiro.session.Session;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.view.document.AbstractXlsView;
import com.zcloud.entity.PageData;
@ -31,6 +32,9 @@ import net.coobird.thumbnailator.Thumbnails;
*/
public class HiddenExcelImgToSessionView extends AbstractXlsView{
@Value("${http.file.url}")
private String fileUrl;
@Override
protected void buildExcelDocument(Map<String, Object> model,
Workbook workbook, HttpServletRequest request,
@ -38,7 +42,7 @@ public class HiddenExcelImgToSessionView extends AbstractXlsView{
// TODO Auto-generated method stub
String proPath = PathUtil.getProjectpath();
Session session = Jurisdiction.getSession();
String beji = Const.HTTPFILEURL;
String beji = fileUrl;
//beji =beji.replaceAll("\\\\", "/");
// String beji = "https://qgqy.qhdsafety.com/file/";
Date date = new Date();

View File

@ -26,6 +26,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.view.document.AbstractXlsView;
import com.zcloud.entity.PageData;
@ -37,13 +38,16 @@ import com.zcloud.entity.PageData;
*/
public class HiddenExcelImgView extends AbstractXlsView{
@Value("${http.file.url}")
private String fileUrl;
@Override
protected void buildExcelDocument(Map<String, Object> model,
Workbook workbook, HttpServletRequest request,
HttpServletResponse response) throws Exception {
// TODO Auto-generated method stub
String proPath = PathUtil.getProjectpath();
String beji = Const.HTTPFILEURL;
String beji = fileUrl;
//beji =beji.replaceAll("\\\\", "/");
Date date = new Date();

View File

@ -365,46 +365,9 @@ public class HttpClientService {
}
public static Map doPost(String url, PageData pd) {
/*
MultiValueMap<String, String> requestBody = new LinkedMultiValueMap();
pd.forEach((key, value) -> {
requestBody.add(key.toString(), value.toString());
});
System.out.println(requestBody);
Map<String,Object> responseBody = new HashMap<String,Object>();
TcpClient tcpClient = TcpClient.create()
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 1000) // Connection Timeout
.doOnConnected(connection ->
connection.addHandlerLast(new ReadTimeoutHandler(10)) // Read Timeout
.addHandlerLast(new WriteTimeoutHandler(10))); // Write Timeout
WebClient client = WebClient.builder().clientConnector(new ReactorClientHttpConnector(HttpClient.from(tcpClient))).build();
client.post()
.uri(url)
.header("Source","zcloud")
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.body(BodyInserters.fromFormData(requestBody))
.exchange()
.flatMap(response -> {
System.out.println("Status code: " + response.statusCode().value());
return response.bodyToMono(JSONObject.class);
})
.doOnSuccess(body -> {
System.out.println("success");
responseBody.putAll(body);
})
.doOnError(throwable -> {
responseBody.put("msg",throwable.getMessage());
System.out.println("Error occurred: " + throwable.getMessage());
})
.block();
return responseBody;
*/
JSONObject jsonObject = null;
HttpResponse response = null;
List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
// pd.forEach((key, value) -> { // 这个遍历不好使
// System.out.println("键:" + key.toString() + ",值:" + value.toString());
// });
Map<Object, Object> map = (Map)pd;
System.out.print("参数:{");
for(Map.Entry<Object, Object> entry : map.entrySet()){

View File

@ -60,9 +60,8 @@ spring.main.banner-mode=off
#preventionxgf.api.url=http://192.168.0.79:8088
#
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/
qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/
preventionxgf.api.url=https://qgxgf.qhdsafety.com/qa-prevention-xgf/
qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
#?????
smb.host=39.103.224.166
smb.port=22
@ -75,7 +74,7 @@ rocketmq.consumer.group2=edu-admin-edit
rocketmq.consumer.group1=edu-admin-add
#rocketmq.name-server=10.0.140.141:9876
#rocketmq.name-server=192.168.0.70:9876
rocketmq.name-server=192.168.0.31:9876
rocketmq.name-server=172.24.151.16:9876
rocketmq.producer.group=libmiddle
rocketmq.producer.send-message-timeout=3000
rocketmq.producer.compress-message-body-threshold=4096
@ -91,8 +90,8 @@ mq.group.info=scheduled_tasks
mq.group.eightWork=scheduled_tasks_eightWork
corp.default.pic-path=https://qgqy.qhdsafety.com/file/
corp.default.back-end-path=https://skqhdg.porthebei.com:9004/file/
corp.default.pic-path=https://qgqy.qhdsafety.com/
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
#用户标识
@ -104,3 +103,5 @@ czks-backendaddr=http://192.168.0.79:8091/
gwj-useridentity=GWJ
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
# ??????
http.file.url=https://qgqy.qhdsafety.com/file/

View File

@ -1,11 +1,13 @@
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no1.url=jdbc:mysql://192.168.0.247:3306/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.username=root
datasource.no1.password=root
datasource.no1.password=Mysql@zcloud88888
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no2.url=jdbc:mysql://192.168.0.247:3306/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.username=root
datasource.no2.password=root
datasource.no2.password=Mysql@zcloud88888
#druid???
@ -58,24 +60,14 @@ spring.main.banner-mode=off
#preventionxgf.api.url=http://192.168.0.79:8088
#
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
preventionxgf.api.url=http://192.168.0.79:8088/
qa-regulatory-gwj.api.url=http://192.168.0.79:8092/
preventionxgf.api.url=https://qgxgf.qhdsafety.com/qa-prevention-xgf/
qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
#?????
smb.host=39.103.224.166
smb.host=192.168.192.201
smb.port=22
smb.user=root
smb.password=Zcloud@zcloud88888
smb.basePath=/mnt/qgfile/file/
# 沧州矿石用户标识
czks-useridentity=CZKS
czks-baseimgpath=https://qgqy.qhdsafety.com/file/
czks-backendaddr=http://192.168.0.79:8091/
# 港务局用户标识
gwj-useridentity=GWJ
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
smb.password=SJSKAQHBGLXT@20220311
smb.basePath=/mnt/qask/file/
#Mq\u914D\u7F6E
rocketmq.consumer.group2=edu-admin-edit
@ -97,16 +89,18 @@ mq.topic.eightWork=eightWork
mq.group.info=scheduled_tasks
mq.group.eightWork=scheduled_tasks_eightWork
corp.default.pic-path=https://qgqy.qhdsafety.com/file/
corp.default.back-end-path=http://192.168.151.57:8092/
#对接人员定位
perLoc.url=http://192.168.210.32:8084
perLoc.userName=qaaqadmin
perLoc.pwd=Cfd2023@
#数据同步
mq.topic.docking=docking
mq.group.docking=scheduled_tasks_docking
base.info.USER_IDENTITY=GWJ
base.info.baseImgPath=https://qgqy.qhdsafety.com/file/
base.info.BACKENDADDR=http://192.168.0.31:8992/qa-regulatory-gwj/
corp.default.pic-path=https://qgqy.qhdsafety.com/
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
http.file.url=https://qgqy.qhdsafety.com/file/
#<23>û<EFBFBD><C3BB><EFBFBD>ʶ
# <20><><EFBFBD>ݿ<EFBFBD>ʯ
czks-useridentity=CZKS
czks-baseimgpath=https://wwag.qhdsafety.com/file/
czks-backendaddr=http://192.168.0.79:8091/
# <20><><EFBFBD><EFBFBD><EFBFBD>
gwj-useridentity=GWJ
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/

View File

@ -84,22 +84,8 @@ mq.topic.eightWork=eightWork
mq.group.info=scheduled_tasks
mq.group.eightWork=scheduled_tasks_eightWork
# 沧州矿石用户标识
czks-useridentity=CZKS
czks-baseimgpath=https://qgqy.qhdsafety.com/file/
czks-backendaddr=http://192.168.0.31:7811/qa-regulatory-czks/
# 港务局用户标识
gwj-useridentity=GWJ
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
#对接人员定位
perLoc.url=http://192.168.210.32:8084
perLoc.userName=qaaqadmin
perLoc.pwd=Cfd2023@
#数据同步
mq.topic.docking=docking
mq.group.docking=scheduled_tasks_docking
base.info.USER_IDENTITY=GWJ
base.info.baseImgPath=https://qgqy.qhdsafety.com/file/
base.info.BACKENDADDR=http://192.168.0.31:8992/qa-regulatory-gwj/
corp.default.pic-path=https://qgqy.qhdsafety.com/file/
corp.default.back-end-path=https://skqhdg.porthebei.com:9004/file/
# ??????
http.file.url=http://192.168.192.201:8991/file/

View File

@ -877,4 +877,519 @@
) f
</select>
<select id="listHighRiskWorkFirst" resultType="com.zcloud.entity.PageData">
SELECT * FROM
(SELECT
f.HOTWORK_ID ID,
f.CHECK_NO WORK_NUMBER,
'动火作业' WORK_TYPE,
CASE
f.APPLY_STATUS
WHEN 0 THEN '动火作业待提交'
WHEN 1 THEN '作业负责人待审核'
WHEN 2 THEN '所在单位待审核'
WHEN 4 THEN '安全管理部门待审核'
WHEN 5 THEN '动火审批人待审核'
WHEN 6 THEN '班长待验票'
WHEN 7 THEN '待验收'
END STATUS_NAME,
CASE WHEN f.APPLY_STATUS = 0 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u1.NAME, '/', ',' )),
IFNULL( qu1.`NAME`, '' ))
WHEN f.APPLY_STATUS = 1 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u1.NAME, '/', ',' )),
IFNULL( qu1.`NAME`, '' ))
WHEN f.APPLY_STATUS = 2 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u2.NAME, '/', ',' )),
IFNULL( qu2.`NAME`, '' ))
WHEN f.APPLY_STATUS = 4 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u3.NAME, '/', ',' )),
IFNULL( qu3.`NAME`, '' ))
WHEN f.APPLY_STATUS = 5 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u4.NAME, '/', ',' )),
IFNULL( qu4.`NAME`, '' ))
WHEN f.APPLY_STATUS = 6 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u5.NAME, '/', ',' )),
IFNULL( qu5.`NAME`, '' ))
WHEN f.APPLY_STATUS = 7 THEN
IFNULL(
GROUP_CONCAT(
REPLACE ( u6.NAME, '/', ',' )),
IFNULL( qu6.`NAME`, '' ))
ELSE
IFNULL(
GROUP_CONCAT(
REPLACE ( u6.NAME, '/', ',' )),
IFNULL( qu6.`NAME`, '' ))
END USER_NAME,
DATE_FORMAT( ifnull( f.OPERATTIME, f.CREATTIME ), '%Y-%m-%d %H:%i:%s' ) OPERATTIME
FROM
bus_hotwork_cfd f
LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN sys_user u2 ON u2.USER_ID = f.LEADER_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID
LEFT JOIN sys_user u3 ON u3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN sys_user u4 ON u4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN sys_user u5 ON u5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN sys_user u6 ON u6.USER_ID = f.ACCEPT_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID
WHERE
f.ISDELETE = '0'
AND f.APPLY_STATUS >= 0
AND f.APPLY_STATUS != 8
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
GROUP BY f.HOTWORK_ID
UNION ALL
SELECT f.ID, f.WORK_NUMBER, f.WORK_TYPE, f.STATUS_NAME, u.NAME USER_NAME, f.OPERATTIME
FROM
(SELECT
f.electricity_ID ID,
f.CHECK_NO WORK_NUMBER,
'临时用电作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审批'
when '3' then '已归档'
when '4' then '已验收'
when '-1' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '0' then f.APPLY_USER_ID
when '1' then f.ASSURE_USER_ID
when '2' then f.APPROVE_USER_ID
when '3' then f.ACCEPT_USER_ID
when '-1' then f.APPLY_USER_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_electricity f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
SELECT f.ID, f.WORK_NUMBER, f.WORK_TYPE, f.STATUS_NAME, u.NAME USER_NAME, f.OPERATTIME
FROM
(SELECT
f.blindboard_ID ID,
f.CHECK_NO WORK_NUMBER,
'盲板作业' WORK_TYPE,
case f.APPLY_STATUS
when '1' then '待确认'
when '2' then '待审批'
when '3' then '已归档'
when '4' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then bb.OPERATION_UNIT_PERSONCHARGE
when '2' then bb.CORPINFO_APPROVER
when '3' then f.APPLY_USER_ID
when '4' then f.APPLY_USER_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_blindboard f
LEFT JOIN bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format(now(),'%Y-%m-%d %H:%i') >= bb.BOARD_INSTALL_TIME AND bb.BOARD_DISASSEMBLE_TIME >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
SELECT f.ID, f.WORK_NUMBER, f.WORK_TYPE, f.STATUS_NAME, u.NAME USER_NAME, f.OPERATTIME
FROM
(SELECT
f.HIGHWORK_ID ID,
f.CHECK_NO WORK_NUMBER,
'高处作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审核'
when '3' then '待审批'
when '4' then '已归档'
when '5' then '已验收'
when '-2' then '确认打回'
when '-3' then '审核打回'
when '-4' then '审批打回'
when '55' then '待验收'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.CONSTRUCTION_USER_ID
when '2' then f.AUDIT_USER_ID
when '3' then f.APPROVE_USER_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '-4' then f.CREATOR
when '55' then f.ACCEPT_USER_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_highwork f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('4','5','55','-5')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
SELECT f.ID, f.WORK_NUMBER, f.WORK_TYPE, f.STATUS_NAME, u.NAME USER_NAME, f.OPERATTIME
FROM
(SELECT
f.confinedspace_ID ID,
f.WORK_PERMIT_NUMBER WORK_NUMBER,
'有限空间作业' WORK_TYPE,
case f.APPLY_STATUS
when '1' then '待采样'
when '2' then '作业单位责任人确认'
when '3' then '作业现场责任人审核'
when '4' then '管理单位责任人审批'
when '5' then '作业单位责任人验收'
when '6' then '管理单位责任人验收'
when '-2' then '作业单位责任人确认打回'
when '-3' then '作业现场责任人审核打回'
when '-4' then '管理单位责任人审批打回'
when '-5' then '作业单位责任人验收打回'
when '-6' then '管理单位责任人验收打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.SAMPLING_ANALYST_ID
when '2' then f.WORK_UNIT_MANAGER_ID
when '3' then f.JOB_SITE_MANAGER_ID
when '4' then f.MANAGEMENT_UNIT_ID
when '5' then f.WORK_UNIT_MANAGER_ID
when '6' then f.MANAGEMENT_UNIT_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '-4' then f.CREATOR
when '-5' then f.CREATOR
when '-6' then f.CREATOR
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '7'
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
SELECT f.ID, f.WORK_NUMBER, f.WORK_TYPE, f.STATUS_NAME, u.NAME USER_NAME, f.OPERATTIME
FROM
(SELECT
f.hoisting_ID ID,
f.NUMBERING WORK_NUMBER,
'吊装作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审核'
when '3' then '待审批'
when '4' then '已归档'
when '5' then '已验收'
when '-2' then '确认打回'
when '-3' then '审核打回'
when '-4' then '审批打回'
when '55' then '待验收'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.CONSTRUCTION_JOB_MANAGER_ID
when '2' then f.WORK_UNIT_MANAGER_ID
when '3' then f.BRANCH_APPROVER_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '-4' then f.CREATOR
when '55' then f.ACCEPTOR_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_hoisting f
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('4','5','55','-5')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.JOB_START_TIME AND f.JOB_END_TIME >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
) f
ORDER BY f.OPERATTIME DESC
</select>
<select id="statisticsHighRiskWorkByStateFirst" resultType="com.zcloud.entity.PageData">
SELECT
SUM(f.COUNTAPPLY) COUNTAPPLY,SUM(f.COUNTAPPROVE) COUNTAPPROVE,SUM(f.COUNTARCHIVE) COUNTARCHIVE
FROM (
SELECT
COUNT( CASE WHEN f.APPLY_STATUS > 0 THEN f.HOTWORK_ID END ) COUNTAPPLY,
COUNT( CASE WHEN f.APPLY_STATUS > 0 AND f.APPLY_STATUS != 8 THEN f.HOTWORK_ID END ) COUNTAPPROVE,
COUNT( CASE WHEN f.APPLY_STATUS = 8 THEN f.HOTWORK_ID END ) COUNTARCHIVE
FROM bus_hotwork_cfd f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_electricity f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '3', '4' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('3','4') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.ELECTRICITY_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS IN ('3','4') then f.ELECTRICITY_ID end) COUNTARCHIVE
FROM bus_electricity f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_blindboard f
LEFT JOIN
bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS != '3'
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= bb.BOARD_INSTALL_TIME
AND bb.BOARD_DISASSEMBLE_TIME >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS = '3'
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS != '3' AND date_format(now(),'%Y-%m-%d %H:%i') >= bb.BOARD_INSTALL_TIME AND bb.BOARD_DISASSEMBLE_TIME >= date_format(now(),'%Y-%m-%d %H:%i') then f.BLINDBOARD_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '3' then f.BLINDBOARD_ID end) COUNTARCHIVE
FROM bus_blindboard f
LEFT JOIN bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_highwork f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('4','55','5','-5')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '4', '55', '5', '-5' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('4','55','5','-5') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.HIGHWORK_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS in ('4','55','5','-5') then f.HIGHWORK_ID end) COUNTARCHIVE
FROM bus_highwork f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
SELECT
(
SELECT
count(1)
FROM
bus_confinedspace f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' and f.APPLY_STATUS != '7'
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS = '7'
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' and f.APPLY_STATUS != '7' AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.CONFINEDSPACE_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '7' then f.CONFINEDSPACE_ID end) COUNTARCHIVE
FROM bus_confinedspace f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_hoisting f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' and f.APPLY_STATUS not in ('4','55','5','-5')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.JOB_START_TIME
AND f.JOB_END_TIME >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '4', '55', '5', '-5' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' and f.APPLY_STATUS not in ('4','55','5','-5') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.JOB_START_TIME AND f.JOB_END_TIME >= date_format(now(),'%Y-%m-%d %H:%i') then f.HOISTING_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS IN ('4','55','5','-5') then f.HOISTING_ID end) COUNTARCHIVE
FROM bus_hoisting f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
) f
</select>
<select id="statisticsAllHighRiskWorkFirst" resultType="com.zcloud.entity.PageData">
SELECT count(*) COUNT FROM bus_hotwork_cfd f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
UNION ALL
SELECT count(*) COUNT FROM bus_electricity f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
UNION ALL
SELECT count(*) COUNT FROM bus_blindboard f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
UNION ALL
SELECT count(*) COUNT FROM bus_highwork f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
UNION ALL
SELECT count(*) COUNT FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
UNION ALL
SELECT count(*) COUNT FROM bus_hoisting f WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
</mapper>

View File

@ -134,21 +134,23 @@
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
,dept.NAME as deptName
,if(dept.NAME is null,dept1.NAME,dept.NAME) as deptName
,u.NAME as userName
,su.USERNAME as userName2
, u.USERNAME as userPhone
,dept.DEPARTMENT_ID DEPARTMENT_ID
,if(dept.DEPARTMENT_ID is null,dept1.DEPARTMENT_ID,dept.DEPARTMENT_ID) as DEPARTMENT_ID
,su.USER_TYPE USER_TYPE
,reuser.NAME as REGULATORY_USER_NAME
,redept.NAME as REGULATORY_DEPT_NAME
,if(redept.NAME is null,redept1.NAME,redept.NAME) as REGULATORY_DEPT_NAME
from
<include refid="tableName"></include> f
left join SYS_USER u on u.USER_ID = f.USER_ID
left join bus_specialuser su on su.SPECIALUSER_ID = f.USER_ID
left join oa_department dept on dept.DEPARTMENT_ID = u.DEPARTMENT_ID
left join oa_department dept1 on dept1.DEPARTMENT_ID = f.USER_ID
left join `qa-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept1 on redept1.DEPARTMENT_ID = f.USER_ID
where f.ISDELETE = '0'
<if test="hotIds != null and hotIds.size>0"> <!-- 关键词检索 -->
and(f.FOREIGN_KEY in
@ -216,7 +218,7 @@
f.OPERATTIME,
s.NAME,
f.TYPE,
u.NAME as USER_NAME,
if(u.NAME is null,od.NAME,u.NAME) as USER_NAME,
su.USERNAME as SPECIAL_USER_NAME,
reuser.NAME as REGULATORY_USER_NAME
FROM
@ -225,6 +227,8 @@
left join SYS_USER u on u.USER_ID = f.USER_ID
left join bus_specialuser su on su.SPECIALUSER_ID = f.USER_ID
left join `qa-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join oa_department od on od.DEPARTMENT_ID = f.USER_ID
left join `qa-gwj-regulatory`.SYS_DEPARTMENT rd on rd.DEPARTMENT_ID = f.USER_ID
WHERE
f.FOREIGN_KEY = #{FOREIGN_KEY}
AND f.ISDELETE = '0'

View File

@ -1533,6 +1533,7 @@
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
and f.ISPUNISH is null
and (
bo.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{loginUserId} ), '%' )
@ -1554,7 +1555,21 @@
AND f.STATE = '2'
AND f.CREATOR = #{loginUserId}
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
) t)CF_COUNT
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
) t)CF_COUNT,
(SELECT
COUNT( DISTINCT t.OUTSOURCED_ID )
FROM
(
SELECT
b.OUTSOURCED_ID
FROM
`qa-gwj-regulatory`.BUS_OUTSOURCED b
WHERE
b.ISDELETE = '0'
AND ( b.STATE = '-1' OR b.STATE = '-2' )
AND b.CREATOR = #{loginUserId}
) t) GC_COUNT
from `qa-gwj-regulatory`.bus_aiwarning f
where f.ISDELETE = '0'
and f.STATUS = 0

View File

@ -579,4 +579,17 @@
DEP_ORDER ASC,
name
</select>
<select id="listSubCorpDepartmentByParentId" parameterType="String" resultMap="departmentResultMap">
select * from `qa-gwj-regulatory`.SYS_DEPARTMENT
where 1=1
<if test="_parameter != null and _parameter != ''"><!-- 关键词检索 -->
and PARENT_ID = #{parentId}
</if>
order by DEP_ORDER asc, NAME
</select>
<select id="findByCorpDepartmentId" resultType="com.zcloud.entity.PageData">
select * from `qa-gwj-regulatory`.SYS_DEPARTMENT
where DEPARTMENT_ID = #{DEPARTMENT_ID}
order by DEP_ORDER asc, NAME
</select>
</mapper>

View File

@ -91,7 +91,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JCR,
CORPINFO_ID,
CARDNO,
USER_IDENTITY,
ISDELETE
</sql>
<!-- 字段 -->
@ -132,7 +131,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.JCR,
f.CORPINFO_ID,
f.CARDNO,
f.USER_IDENTITY,
f.ISDELETE
</sql>
<!-- 字段值 -->
@ -1403,4 +1401,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
u.CARDNO = #{CARDNO}
</select>
<select id="getUsersInfo" resultType="com.zcloud.entity.PageData">
select * from `qa-gwj-regulatory`.SYS_USER where ISDELETE = '0'
<if test="USER_ID != null and USER_ID != ''">
and USER_ID = #{USER_ID}
</if>
<if test="USER_IDS != null and USER_IDS != ''">
and USER_ID in
<foreach item="item" index="index" collection="USER_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != null">
and DEPARTMENT_ID = #{DEPARTMENT_ID}
</if>
<if test="ISASSESS != null and ISASSESS != null">
and ISASSESS = #{ISASSESS}
</if>
</select>
</mapper>

View File

@ -295,16 +295,13 @@
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.OUTSOURCED_ID = f.OUTSOURCED_ID) as CHECK_COUNT,
cc.co as CHECK_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
<if test="pd.UserId != null and pd.UserId !=''">
,ifnull(dbsl.co,0) as co
</if>
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
@ -315,25 +312,7 @@
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
-- 这个判断是隐患管理排序以及隐患管理的角标
<if test="pd.UserId != null and pd.UserId !=''">
left join (SELECT t.OUTSOURCED_ID,COUNT( distinct t.HIDDEN_ID) co FROM (
SELECT
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
AND f.STATE = '2'
AND f.CREATOR = #{pd.UserId}
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
) t GROUP BY t.OUTSOURCED_ID ) dbsl on dbsl.OUTSOURCED_ID = f.OUTSOURCED_ID
</if>
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and
@ -396,9 +375,7 @@
)
</if>
ORDER BY
<if test="pd.UserId != null and pd.UserId !=''">
dbsl.co DESC,
</if>
cc.co DESC,
f.OPERATTIME DESC
</select>
@ -697,4 +674,231 @@
where
OUTSOURCED_ID = #{OUTSOURCED_ID}
</update>
<!-- 列表 -->
<select id="hiddenOutsourcedlistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
(select GROUP_CONCAT(t.NAME) from (
SELECT
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
FROM
`qa-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
) t where FIND_IN_SET(t.DEPARTMENT_ID, f.JURISDICTION_UNIT)) as JURISDICTION_UNIT_NAME,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.OUTSOURCED_ID = f.OUTSOURCED_ID) as CHECK_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
,ifnull(dbsl.co,0) as co
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
left join (SELECT t.OUTSOURCED_ID,COUNT( distinct t.HIDDEN_ID) co FROM (
SELECT
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
AND f.STATE = '2'
AND f.CREATOR = #{pd.UserId}
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
) t GROUP BY t.OUTSOURCED_ID ) dbsl on dbsl.OUTSOURCED_ID = f.OUTSOURCED_ID
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and
(
f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
or
f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
)
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件-->
f.OUTSOURCED_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
b.UNITS_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
f.UNITS_PIC LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.OUTSOURCED_NAME != null and pd.OUTSOURCED_NAME !=''">
and f.OUTSOURCED_NAME = #{pd.OUTSOURCED_NAME}
</if>
<if test="pd.UNITS_ID != null and pd.UNITS_ID !=''">
and f.UNITS_ID = #{pd.UNITS_ID}
</if>
<if test="pd.INVOLVING_CORP != null and pd.INVOLVING_CORP !=''">
and f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.INVOLVING_CORP}),'%')
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID !=''">
and f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DEPARTMENT_ID}),'%')
</if>
<if test="pd.COMPETENT_DEPT_ID != null and pd.COMPETENT_DEPT_ID !=''">
and f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.COMPETENT_DEPT_ID}),'%')
</if>
<if test="pd.GROUP_UNIT != null and pd.GROUP_UNIT !=''">
and f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.GROUP_UNIT}),'%')
</if>
<if test="pd.CORP_NAME != null and pd.CORP_NAME !=''">
and vac.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%')
</if>
<if test="pd.STATE != null and pd.STATE !=''">
and f.STATE = #{pd.STATE}
</if>
<if test="pd.CONTRACT_STIME != null and pd.CONTRACT_STIME !=''">
and (f.CONTRACT_STIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
or f.CONTRACT_ETIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
or (f.CONTRACT_STIME &lt; #{pd.CONTRACT_STIME} and f.CONTRACT_ETIME &gt; #{pd.CONTRACT_ETIME}))
</if>
<if test="pd.DeptId != null and pd.DeptId !=''">
and ( f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.INVOLVING_CORPS_DEPART_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%')
or f.CREATOR = #{pd.UserId}
)
</if>
ORDER BY
dbsl.co DESC,
f.OPERATTIME DESC
</select>
<!-- 列表 -->
<select id="outSouceslistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
(select GROUP_CONCAT(t.NAME) from (
SELECT
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
FROM
`qa-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
) t where FIND_IN_SET(t.DEPARTMENT_ID, f.JURISDICTION_UNIT)) as JURISDICTION_UNIT_NAME,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and
(
f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
or
f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
)
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件-->
f.OUTSOURCED_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
b.UNITS_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
f.UNITS_PIC LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.OUTSOURCED_NAME != null and pd.OUTSOURCED_NAME !=''">
and f.OUTSOURCED_NAME = #{pd.OUTSOURCED_NAME}
</if>
<if test="pd.UNITS_ID != null and pd.UNITS_ID !=''">
and f.UNITS_ID = #{pd.UNITS_ID}
</if>
<if test="pd.INVOLVING_CORP != null and pd.INVOLVING_CORP !=''">
and f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.INVOLVING_CORP}),'%')
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID !=''">
and f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DEPARTMENT_ID}),'%')
</if>
<if test="pd.COMPETENT_DEPT_ID != null and pd.COMPETENT_DEPT_ID !=''">
and f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.COMPETENT_DEPT_ID}),'%')
</if>
<if test="pd.GROUP_UNIT != null and pd.GROUP_UNIT !=''">
and f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.GROUP_UNIT}),'%')
</if>
<if test="pd.CORP_NAME != null and pd.CORP_NAME !=''">
and vac.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%')
</if>
<if test="pd.STATE != null and pd.STATE !=''">
and f.STATE = #{pd.STATE}
</if>
<if test="pd.CONTRACT_STIME != null and pd.CONTRACT_STIME !=''">
and (f.CONTRACT_STIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
or f.CONTRACT_ETIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
or (f.CONTRACT_STIME &lt; #{pd.CONTRACT_STIME} and f.CONTRACT_ETIME &gt; #{pd.CONTRACT_ETIME}))
</if>
<if test="pd.DeptId != null and pd.DeptId !=''">
and ( f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.INVOLVING_CORPS_DEPART_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%')
or f.CREATOR = #{pd.UserId}
)
</if>
ORDER BY
f.STATE,
f.OPERATTIME DESC
</select>
</mapper>

View File

@ -291,4 +291,23 @@
where
OUTSOURCED_ID = #{OUTSOURCED_ID}
</update>
<!-- 列表 -->
<select id="dataApplistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.OUTSOURCED_ID != null and pd.OUTSOURCED_ID != ''"><!-- 关键词检索 -->
and f.OUTSOURCED_ID=#{pd.OUTSOURCED_ID}
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.VIDEONAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
</select>
</mapper>