Merge branch 'dev' into 1212-八项作业迁移

# Conflicts:
#	pom.xml
#	src/main/resources/application-dev.properties
pull/4/head
liujun 2023-12-19 16:45:15 +08:00
commit a87827104e
101 changed files with 9157 additions and 150 deletions

View File

@ -1656,7 +1656,7 @@ public class AppHiddenController extends BaseController {
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", pd.getString("FINAL_CHECKOR"));
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "7"); // 已验收
inspection.put("INSPECTION_STATUS", "8"); // 已验收
safetyenvironmentalService.editStatus(inspection);
}
}

View File

@ -9,6 +9,7 @@ import com.zcloud.service.inspection.SafetyEnvironmentalInspectorService;
import com.zcloud.service.inspection.SafetyEnvironmentalService;
import com.zcloud.service.keyProjects.KeyprojectHiddenService;
import com.zcloud.util.*;
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;
@ -86,6 +87,26 @@ public class AppHomeController extends BaseController {
PageData myGasAnaly = new PageData();
if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (Integer.parseInt(delayedCount.getString("count")) != 0) {
if (varList.size() > 0) {
boolean isDelayedExist = false;
for (PageData data : varList) {
if (StringUtils.equals(data.getString("STATE"), "10")) isDelayedExist = true;
}
if (isDelayedExist) {
for (PageData pageData : varList) {
if (StringUtils.equals(pageData.getString("STATE"), "10")) {
pageData.put("count", delayedCount.getString("count"));
}
}
} else {
varList.add(delayedCount);
}
} else {
varList.add(delayedCount);
}
}
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
}
map.put("result", errInfo);
@ -126,6 +147,26 @@ public class AppHomeController extends BaseController {
PageData myGasAnaly = new PageData();
if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (Integer.parseInt(delayedCount.getString("count")) != 0) {
if (varList.size() > 0) {
boolean isDelayedExist = false;
for (PageData data : varList) {
if (StringUtils.equals(data.getString("STATE"), "10")) isDelayedExist = true;
}
if (isDelayedExist) {
for (PageData pageData : varList) {
if (StringUtils.equals(pageData.getString("STATE"), "10")) {
pageData.put("count", delayedCount.getString("count"));
}
}
} else {
varList.add(delayedCount);
}
} else {
varList.add(delayedCount);
}
}
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
}
@ -142,7 +183,7 @@ public class AppHomeController extends BaseController {
//统计消防总数
List<PageData> dataList = fireCheckListService.getFireCheckListCountByApp(pd);
map.put("result", errInfo);
map.put("blindboardCount", blindboardCount);
map.put("breakGroundCount", breakGroundCount);

View File

@ -17,6 +17,7 @@ import com.zcloud.service.system.FHlogService;
import com.zcloud.util.*;
import com.zcloud.util.message.MessageService;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.xpath.SourceTree;
@ -745,42 +746,44 @@ public class AppHotWorkApplicationController extends BaseController {
}
}
PageData hotUser = new PageData();
hotUser.put("hotIds", hotIds);
List<PageData> hotUserAllList = hotWorkApplicationUserService.listAll(hotUser);
for (PageData userPageData : hotUserAllList){
String hotAndType = userPageData.getString("FOREIGN_KEY");
if(hotIdKeyMap.containsKey(hotAndType)){
PageData hot = varList.get(hotIdKeyMap.get(hotAndType));
String type = userPageData.get("STATE").toString();
if("0".equals(type)){ // 申请办理人
hot.put("APPLY_DEPARTMENT_NAME",userPageData.getString("deptName"));
hot.put("APPLY_USER_NAME",userPageData.getString("userName"));
hot.put("APPLY_USER_ID",userPageData.getString("USER_ID"));
}else if("1".equals(type)){ //动火单位负责人
hot.put("HOT_WORK_UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("HOT_WORK_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}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("3".equals(type)){ // 现场管辖单位负责人
hot.put("UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}else if("5".equals(type)){ // 动火前 负责人
hot.put("HOT_WORK_BEFORE_UNIT_LEADER",userPageData.getString("userName"));
}else if("6".equals(type)){ // 现场负责人
hot.put("SITE_LEADER_NAME",userPageData.getString("userName"));
hot.put("SITE_LEADER_PHONE",userPageData.getString("userPhone"));
}else if("7".equals(type)){ // 动火后 负责人
hot.put("HOT_WORK_AFTER_UNIT_LEADER",userPageData.getString("userName"));
} else if("11".equals(type)){ // 特级动火 申请人
hot.put("DEPARTMENT_PERSONNEL_NAME",userPageData.getString("userName"));
hot.put("DEPARTMENT_PERSONNEL_ID",userPageData.getString("USER_ID"));
}else if("20".equals(type)){ // 特级动火 申请人
hot.put("SUPERVISOR_OF_HOT_WORK_UNIT",userPageData.getString("USER_ID"));
}else if("21".equals(type)){ // 动火后 负责人
String userName = userPageData.getString("userName2") +",";
String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString();
hot.put("HOT_WORK_OPERATOR_NAME",oldName + userName);
if (hotIds.size() > 0) {
hotUser.put("hotIds", hotIds);
List<PageData> hotUserAllList = hotWorkApplicationUserService.listAll(hotUser);
for (PageData userPageData : hotUserAllList){
String hotAndType = userPageData.getString("FOREIGN_KEY");
if(hotIdKeyMap.containsKey(hotAndType)){
PageData hot = varList.get(hotIdKeyMap.get(hotAndType));
String type = userPageData.get("STATE").toString();
if("0".equals(type)){ // 申请办理人
hot.put("APPLY_DEPARTMENT_NAME",userPageData.getString("deptName"));
hot.put("APPLY_USER_NAME",userPageData.getString("userName"));
hot.put("APPLY_USER_ID",userPageData.getString("USER_ID"));
}else if("1".equals(type)){ //动火单位负责人
hot.put("HOT_WORK_UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("HOT_WORK_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}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("3".equals(type)){ // 现场管辖单位负责人
hot.put("UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}else if("5".equals(type)){ // 动火前 负责人
hot.put("HOT_WORK_BEFORE_UNIT_LEADER",userPageData.getString("userName"));
}else if("6".equals(type)){ // 现场负责人
hot.put("SITE_LEADER_NAME",userPageData.getString("userName"));
hot.put("SITE_LEADER_PHONE",userPageData.getString("userPhone"));
}else if("7".equals(type)){ // 动火后 负责人
hot.put("HOT_WORK_AFTER_UNIT_LEADER",userPageData.getString("userName"));
} else if("11".equals(type)){ // 特级动火 申请人
hot.put("DEPARTMENT_PERSONNEL_NAME",userPageData.getString("userName"));
hot.put("DEPARTMENT_PERSONNEL_ID",userPageData.getString("USER_ID"));
}else if("20".equals(type)){ // 特级动火 申请人
hot.put("SUPERVISOR_OF_HOT_WORK_UNIT",userPageData.getString("USER_ID"));
}else if("21".equals(type)){ // 动火后 负责人
String userName = userPageData.getString("userName2") +",";
String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString();
hot.put("HOT_WORK_OPERATOR_NAME",oldName + userName);
}
}
}
}
@ -806,11 +809,30 @@ public class AppHotWorkApplicationController extends BaseController {
hotUserPd.put("STATE",pd.get("STATE").toString()); // 哪一步
hotUserPd.put("USER_ID",pd.getString("loginUserId"));// 登录人
List<PageData> hotUserList = hotWorkApplicationUserService.listAll(hotUserPd); // 找到这一笔的审批人
if(hotUserList.size() != 1){
map.put("result", "error");
map.put("msg", "获取审批人意见失败!请联系管理员");
return map;
if ("10".equals(pd.get("STATE").toString())) {
PageData hotWorkApplication = hotworkapplicationService.findById(pd);
if(!Tools.isEmpty(hotWorkApplication) && hotWorkApplication.getString("STATE").equals("11")){ // 判断此作业是否已归档
map.put("result", "error");
map.put("msg", "此作业已归档,请勿重复操作!");
return map;
}
}
List<PageData> hotUserList = new ArrayList<>();
if (!pd.getString("STATE").equals("10")) {
hotUserList = hotWorkApplicationUserService.listAll(hotUserPd); // 找到这一笔的审批人
if (hotUserList.size() != 1) {
map.put("result", "error");
map.put("msg", "获取审批人意见失败!请联系管理员");
return map;
}
} else {
hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们
if (hotUserList.size() < 1) {
map.put("result", "error");
map.put("msg", "获取审批人意见失败!请联系管理员");
return map;
}
}
@ -953,7 +975,8 @@ public class AppHotWorkApplicationController extends BaseController {
}else if("9".equals(pd.getString("STATE"))){ // 添加 临时监火
PageData leaderUser = new PageData();
leaderUser.put("HOTWORKAPPLICATIONUSER_ID", UuidUtil.get32UUID());
leaderUser.put("USER_ID",pd.get("TIME_LAPSE_FIREMAN_ID"));
// leaderUser.put("USER_ID",pd.get("TIME_LAPSE_FIREMAN_ID"));
leaderUser.put("USER_ID",pd.get("TIME_LAPSE_FIREMAN_DEPARTMENT_ID"));
leaderUser.put("STATE","10");
leaderUser.put("TYPE","-1");
leaderUser.put("ISDELETE","0");
@ -1339,6 +1362,26 @@ public class AppHotWorkApplicationController extends BaseController {
PageData myGasAnaly = new PageData();
if(!Tools.isEmpty(pd.get("USER_ID"))){
varList = hotworkapplicationService.getCountByMyApproval(pd.getString("USER_ID"));
PageData delayedCount = hotworkapplicationService.getCountByMyApprovalForDelayedHotWork(pd.getString("USER_ID"));
if (Integer.parseInt(delayedCount.getString("count")) != 0) {
if (varList.size() > 0) {
boolean isDelayedExist = false;
for (PageData data : varList) {
if (StringUtils.equals(data.getString("STATE"),"10")) isDelayedExist = true;
}
if (isDelayedExist) {
for (PageData pageData : varList){
if (StringUtils.equals(pageData.getString("STATE"),"10")) {
pageData.put("count",delayedCount.getString("count"));
}
}
} else {
varList.add(delayedCount);
}
} else {
varList.add(delayedCount);
}
}
myGasAnaly = hotworkapplicationService.getCountByMyGasAnaly(pd.getString("USER_ID"));
}
map.put("varList", varList);

View File

@ -1,5 +1,10 @@
package com.zcloud.controller.app.highriskwork;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@ -22,6 +27,8 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.highriskwork.HotWorkApplicationDelayedService;
import javax.imageio.ImageIO;
/**
*
* luoxiaobao
@ -62,9 +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());
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, 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);

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ import java.util.Map;
import com.zcloud.service.bus.CorpInfoRelatedService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.util.*;
import net.sf.json.JSONArray;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -583,4 +584,23 @@ public class CorpInfoController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* ztree()
*
* @return
*/
@RequestMapping(value = "/listTreeManageAndCorpHasOrder")
@ResponseBody
public Object listTreeManageAndCorpHasOrder() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd.put("DEPARTMENT_ID", "0"); //查询父节点为0的根节点数据
List<PageData> rootList = departmentService.listTreeManageAndCorpHasOrder(pd);
JSONArray arr = JSONArray.fromObject(rootList);
map.put("zTreeNodes", arr.toString());
map.put("result", errInfo);
return map;
}
}

View File

@ -2902,7 +2902,7 @@ public class HiddenController extends BaseController {
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "7"); // 已验收
inspection.put("INSPECTION_STATUS", "8"); // 已验收
safetyenvironmentalService.editStatus(inspection);
}

View File

@ -1311,6 +1311,8 @@ public class HotWorkApplicationController extends BaseController {
hot.put("PROJECT_UNIT_LEADER_NAME",userPageData.getString("userName"));
hot.put("PROJECT_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}else if("4".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"));
hot.put("UNIT_LEADER_ID",userPageData.getString("USER_ID"));
}else if("5".equals(type)){ // 动火前 负责人

View File

@ -0,0 +1,160 @@
package com.zcloud.controller.eightWork;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.Response;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.eightWork.EightWorkCfdService;
import com.zcloud.service.highriskwork.*;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.Tools;
import com.zcloud.util.Warden;
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;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* luoxiaobao
* 2021-08-31
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/app/eightwork/cfd")
public class AppEightWorkCfdController extends BaseController {
@Autowired
private EightWorkCfdService eightworkCfdService;
@Autowired
private DictionariesService dictionariesService;
@Autowired
private UsersService usersService;
@Autowired
private ConfinedSpaceService confinedSpaceService;
@Autowired
private BlindBoardService blindBoardService;
@Autowired
private BreakGroundService breakGroundService;
@Autowired
private HighWorkService highWorkService;
@Autowired
private HoistingService hoistingService;
@Autowired
private ElectricityService electricityService;
@Autowired
private HotworkService hotworkService;
@Autowired
private CutRoadService cutRoadService;
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "八项作业",instructionsOperate = "八项作业",instructionsType = "列表")
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();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
List<PageData> varList = eightworkCfdService.list(page); //列出confinedspace列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* description:
* accidentType-
* hiddenLevel-
*
* @return tree or list
* @throws Exception all
*/
@RequestMapping(value = "/getInfo")
@ResponseBody
public Response getInfo() throws Exception {
Response response = Response.getResponse();
try {
PageData request = this.getPageData();
if (StringUtils.isBlank(request.getString("vectors"))) throw new RuntimeException("未找到要获取的数据字典类型");
List<String> vectors = Warden.getList(request.getString("vectors"),String.class);
for (String vector: vectors) {
switch (vector) {
case "accidentType":
//事故类型
response.put("accidentType", dictionariesService.getTreeById("cee1190ea96a4ca9b7bca81e11f0d0f8"));
continue;
default:
}
}
return response.OK();
} catch (Exception e) {
e.printStackTrace();
return response.errorMessage(e.getMessage());
}
}
/**
*
* @return
* @throws Exception
*/
@RequestMapping(value = "/getAllUserList")
@ResponseBody
public Object getAllUserList() throws Exception{
Map<String,Object> map = new HashMap<>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
return usersService.getAllUserList();
}
/**
*
* @return
* @throws Exception
*/
@RequestMapping(value = "/countCheck")
@ResponseBody
public Object countCheck() throws Exception{
Map<String, Object> map = new HashMap<>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData count1 = confinedSpaceService.countCheck(pd);
PageData count2 = blindBoardService.countCheck(pd);
PageData count3 = breakGroundService.countCheck(pd);
PageData count4 = highWorkService.countCheck(pd);
PageData count5 = hoistingService.countCheck(pd);
PageData count6 = electricityService.countCheck(pd);
PageData count7 = hotworkService.countCheck(pd);
PageData count8 = cutRoadService.countCheck(pd);
map.put("result", errInfo);
map.put("count1", count1);
map.put("count2", count2);
map.put("count3", count3);
map.put("count4", count4);
map.put("count5", count5);
map.put("count6", count6);
map.put("count7", count7);
map.put("count8", count8);
return map;
}
}

View File

@ -0,0 +1,318 @@
package com.zcloud.controller.highriskwork;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.highriskwork.HotworkAcceptUserCfdService;
import com.zcloud.service.highriskwork.HotworkCfdService;
import com.zcloud.service.highriskwork.HotworkGasCfdService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/hotwork/cfd")
public class HotworkCfdController extends BaseController {
@Autowired
private HotworkCfdService hotworkCfdService;
@Autowired
private HotworkGasCfdService hotworkGasCfdService;
@Autowired
private HotworkAcceptUserCfdService hotworkacceptuserCfdService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("hotwork:add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("HOTWORK_ID", this.get32UUID()); //主键
hotworkCfdService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param out
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("hotwork:del")
@ResponseBody
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
hotworkCfdService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("hotwork:edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
hotworkCfdService.edit(pd);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("hotwork:list")
@ResponseBody
@LogAnno(menuType= "高危作业管理",menuServer= "动火作业管理",instructionsOperate = "动火作业数据",instructionsType = "列表")
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();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
pd.put("ISMAIN", Jurisdiction.getIS_MAIN());
pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
page.setPd(pd);
List<PageData> varList = hotworkCfdService.list(page); //列出Hotwork列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@ResponseBody
@LogAnno(menuType= "高危作业管理",menuServer= "动火作业管理",instructionsOperate = "动火作业数据",instructionsType = "去修改页面获取数据")
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = hotworkCfdService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
map.put("gasList", hotworkGasCfdService.listAll(pd));
map.put("imgList", hotworkacceptuserCfdService.findByIds(pd));
map.put("imgList1", hotworkacceptuserCfdService.findById(pd));
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/deleteAll")
@RequiresPermissions("hotwork:del")
@ResponseBody
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
String ArrayDATA_IDS[] = DATA_IDS.split(",");
hotworkCfdService.deleteAll(ArrayDATA_IDS);
errInfo = "success";
}else{
errInfo = "error";
}
map.put("result", errInfo); //返回结果
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/excel")
@RequiresPermissions("toExcel")
public ModelAndView exportExcel() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>();
titles.add("所属企业"); //1
titles.add("删除标志"); //2
titles.add("创建时间"); //3
titles.add("添加人"); //4
titles.add("修改时间"); //5
titles.add("修改人"); //6
titles.add("编号"); //7
titles.add("作业内容"); //8
titles.add("工作开始时间"); //9
titles.add("工作结束时间"); //10
titles.add("确认单位"); //11
titles.add("确认单位人"); //12
titles.add("确认单位签字"); //13
titles.add("确认单位签字时间"); //14
titles.add("审核部门"); //15
titles.add("审核人"); //16
titles.add("审核签字"); //17
titles.add("审核签字时间"); //18
titles.add("审批部门"); //19
titles.add("审批部门人"); //20
titles.add("审批部门签字"); //21
titles.add("审批部门签字时间"); //22
titles.add("状态"); //23
titles.add("确认意见"); //24
titles.add("审核意见"); //25
titles.add("审批意见"); //26
titles.add("其他防护措施"); //27
titles.add("验收部门"); //28
titles.add("验收人"); //29
titles.add("验收签字"); //30
titles.add("验收签字时间"); //31
titles.add("验收意见"); //32
titles.add("申请部门"); //33
titles.add("申请人"); //34
titles.add("动火地点"); //35
titles.add("作业级别"); //36
titles.add("作业人"); //37
titles.add("特殊作业"); //38
titles.add("风险辨识"); //39
titles.add("作业负责人"); //40
titles.add("分析部门"); //41
titles.add("分析人"); //42
titles.add("监护人部门"); //43
titles.add("监护人"); //44
titles.add("监护人签字"); //45
titles.add("监护人签字时间"); //46
titles.add("监护人意见"); //47
titles.add("动火点车间"); //48
titles.add("动火点车间负责人"); //49
titles.add("车间负责人签字"); //50
titles.add("车间负责人签字时间"); //51
titles.add("车间负责人意见"); //52
titles.add("班长部门"); //53
titles.add("班长"); //54
titles.add("班长签字"); //55
titles.add("班长签字时间"); //56
titles.add("班长意见"); //57
titles.add("交底人"); //58
titles.add("教育人"); //59
titles.add("接受教育人"); //60
titles.add("初审人"); //61
dataMap.put("titles", titles);
List<PageData> varOList = hotworkCfdService.listAll(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("CORPINFO_ID")); //1
vpd.put("var2", varOList.get(i).get("ISDELETE").toString()); //2
vpd.put("var3", varOList.get(i).getString("CREATTIME")); //3
vpd.put("var4", varOList.get(i).getString("CREATOR")); //4
vpd.put("var5", varOList.get(i).getString("OPERATTIME")); //5
vpd.put("var6", varOList.get(i).getString("OPERATOR")); //6
vpd.put("var7", varOList.get(i).getString("CHECK_NO")); //7
vpd.put("var8", varOList.get(i).getString("WORK_CONTENT")); //8
vpd.put("var9", varOList.get(i).getString("WORK_START_DATE")); //9
vpd.put("var10", varOList.get(i).getString("WORK_END_DATE")); //10
vpd.put("var11", varOList.get(i).getString("CONFIRM_DEPARTMENT_ID")); //11
vpd.put("var12", varOList.get(i).getString("CONFIRM_USER_ID")); //12
vpd.put("var13", varOList.get(i).getString("CONFIRM_USER_SIGNER_PATH")); //13
vpd.put("var14", varOList.get(i).getString("CONFIRM_USER_SIGNER_TIME")); //14
vpd.put("var15", varOList.get(i).getString("AUDIT_DEPARTMENT_ID")); //15
vpd.put("var16", varOList.get(i).getString("AUDIT_USER_ID")); //16
vpd.put("var17", varOList.get(i).getString("AUDIT_USER_SIGNER_PATH")); //17
vpd.put("var18", varOList.get(i).getString("AUDIT_USER_SIGNER_TIME")); //18
vpd.put("var19", varOList.get(i).getString("APPROVE_DEPARTMENT_ID")); //19
vpd.put("var20", varOList.get(i).getString("APPROVE_USER_ID")); //20
vpd.put("var21", varOList.get(i).getString("APPROVE_USER_SIGNER_PATH")); //21
vpd.put("var22", varOList.get(i).getString("APPROVE_USER_SIGNER_TIME")); //22
vpd.put("var23", varOList.get(i).getString("APPLY_STATUS")); //23
vpd.put("var24", varOList.get(i).getString("CONFIRM_CONTENT")); //24
vpd.put("var25", varOList.get(i).getString("AUDIT_CONTENT")); //25
vpd.put("var26", varOList.get(i).getString("APPROVE_CONTENT")); //26
vpd.put("var27", varOList.get(i).getString("OTHER_PROTECTIVE_MEASURES")); //27
vpd.put("var28", varOList.get(i).getString("ACCEPT_DEPARTMENT_ID")); //28
vpd.put("var29", varOList.get(i).getString("ACCEPT_USER_ID")); //29
vpd.put("var30", varOList.get(i).getString("ACCEPT_USER_SIGNER_PATH")); //30
vpd.put("var31", varOList.get(i).getString("ACCEPT_USER_SIGNER_TIME")); //31
vpd.put("var32", varOList.get(i).getString("ACCEPT_CONTENT")); //32
vpd.put("var33", varOList.get(i).getString("APPLY_DEPARTMENT_ID")); //33
vpd.put("var34", varOList.get(i).getString("APPLY_USER_ID")); //34
vpd.put("var35", varOList.get(i).getString("WORK_PLACE")); //35
vpd.put("var36", varOList.get(i).getString("WORK_LEVEL")); //36
vpd.put("var37", varOList.get(i).getString("WORK_USER")); //37
vpd.put("var38", varOList.get(i).getString("SPECIAL_WORK")); //38
vpd.put("var39", varOList.get(i).getString("RISK_IDENTIFICATION")); //39
vpd.put("var40", varOList.get(i).getString("WORK_MANAGER")); //40
vpd.put("var41", varOList.get(i).getString("ANALYZE_DEPARTMENT_ID")); //41
vpd.put("var42", varOList.get(i).getString("ANALYZE_USER_ID")); //42
vpd.put("var43", varOList.get(i).getString("GUARDIAN_DEPARTMENT_ID")); //43
vpd.put("var44", varOList.get(i).getString("GUARDIAN_USER_ID")); //44
vpd.put("var45", varOList.get(i).getString("GUARDIAN_USER_SIGNER_PATH")); //45
vpd.put("var46", varOList.get(i).getString("GUARDIAN_USER_SIGNER_TIME")); //46
vpd.put("var47", varOList.get(i).getString("GUARDIAN_CONTENT")); //47
vpd.put("var48", varOList.get(i).getString("LEADER_DEPARTMENT_ID")); //48
vpd.put("var49", varOList.get(i).getString("LEADER_USER_ID")); //49
vpd.put("var50", varOList.get(i).getString("LEADER_USER_SIGNER_PATH")); //50
vpd.put("var51", varOList.get(i).getString("LEADER_USER_SIGNER_TIME")); //51
vpd.put("var52", varOList.get(i).getString("LEADER_CONTENT")); //52
vpd.put("var53", varOList.get(i).getString("MONITOR_DEPARTMENT_ID")); //53
vpd.put("var54", varOList.get(i).getString("MONITOR_USER_ID")); //54
vpd.put("var55", varOList.get(i).getString("MONITOR_USER_SIGNER_PATH")); //55
vpd.put("var56", varOList.get(i).getString("MONITOR_USER_SIGNER_TIME")); //56
vpd.put("var57", varOList.get(i).getString("MONITOR_CONTENT")); //57
vpd.put("var58", varOList.get(i).getString("CONFESS_USER")); //58
vpd.put("var59", varOList.get(i).getString("EDUCATE_USER")); //59
vpd.put("var60", varOList.get(i).getString("ACCEPT_EDUCATE_USER")); //60
vpd.put("var61", varOList.get(i).getString("TRIAL_USER")); //61
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -761,4 +761,23 @@ public class OutSourcedController extends BaseController {
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);
map.put("result", errInfo); //返回结果
return map;
}
}

View File

@ -0,0 +1,92 @@
package com.zcloud.controller.mq;
import com.alibaba.fastjson.JSON;
import com.zcloud.controller.app.highriskwork.AppHotworkCfdController;
import com.zcloud.dto.TenCorpDto;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mq.MqMessageLogMapper;
import com.zcloud.service.mq.LogService;
import com.zcloud.service.mq.SendMessageService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Warden;
import com.zcloud.util.mq.MqUtil;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
/**
* topic tag DEMO
* wangxuan
* www.zcloudchina.com
*/
@Component
@RocketMQMessageListener(consumerGroup = "${mq.group.eightWork}",
topic = "${mq.topic.eightWork}",
selectorType = SelectorType.TAG)
public class EightWorkListener implements RocketMQListener<String> {
// @Resource
// private AppConfinedSpaceController appConfinedSpaceController;
// @Resource
// private AppElectricityController appElectricityController;
@Resource
private AppHotworkCfdController appHotworkCfdController;
@Resource
private SendMessageService sendMessageService;
@Resource
private LogService logService;
@Resource
private MqMessageLogMapper mqMessageLogMapper;
@Override
public void onMessage(String message) {
TenCorpDto data = JSON.parseObject(message, TenCorpDto.class);
PageData log = data.getPd();
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
log.put("CREATE_TIME", DateUtil.getTime());
log.put("PRODUCER_NAME",data.getProducer_name());
log.put("TYPE","1");
try {
System.out.println("消费者:" + data.toString());
Date limit_date = MqUtil.dateFormat(data.getTime_stamp());
if (limit_date.getTime() - new Date().getTime() > 1000) {
sendMessageService.SendDelayQueue(data);
log.put("DIGESTION_FLAG","0");
} else {
switch (data.getMessage()){
case "confined-space":
System.out.println("受限空间模块消费");
// appConfinedSpaceController.cancel(data.getData());
break;
case "electricity":
System.out.println("临时用电模块消费");
// appElectricityController.cancel(data.getData());
break;
case "hot-work":
System.out.println("动火模块消费");
appHotworkCfdController.cancel(data.getData());
break;
default:
System.out.println("异常模块不消费");
throw new RuntimeException("未找到对应的消费者");
}
log.put("DIGESTION_FLAG","1");
}
mqMessageLogMapper.save(log);
} catch (Exception e) {
e.printStackTrace();
logService.saveErrorMessage(log,e.getMessage());
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,32 @@
package com.zcloud.controller.mq;
import com.alibaba.fastjson.JSON;
import com.zcloud.dto.TenCorpDto;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
/**
* topic tag DEMO
* wangxuan
* www.zcloudchina.com
*/
@Component
@RocketMQMessageListener(consumerGroup = "${mq.group.info}",
topic = "${mq.topic.info}",
selectorType = SelectorType.TAG)
public class MqListener implements RocketMQListener<String> {
@Override
public void onMessage(String message) {
TenCorpDto data = JSON.parseObject(message, TenCorpDto.class);
try {
System.out.println("2消费者:" + data.toString());
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,51 @@
package com.zcloud.controller.mq;
import com.zcloud.controller.base.BaseController;
import com.zcloud.dto.Response;
import com.zcloud.dto.TenCorpDto;
import com.zcloud.service.mq.SendMessageService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
/**
*
* wangxuan
* www.zcloudchina.com
*/
public class SendController extends BaseController {
@Resource
private SendMessageService sendMessageService;
public Response sendMessage(@RequestParam("tenCorpDto") TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.sendMessage(tenCorpDto);
} catch (Exception e) {
e.printStackTrace();
}
return Response.OK();
}
public Response timelyQueue(@RequestBody TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.sendMessage(tenCorpDto);
} catch (Exception e) {
e.printStackTrace();
}
return Response.OK();
}
public Response SendDelayQueue(@RequestBody TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.SendDelayQueue(tenCorpDto);
return Response.OK();
} catch (Exception e) {
e.printStackTrace();
return Response.ERROR(e.getMessage());
}
}
}

View File

@ -82,6 +82,28 @@ public class OpenApiController extends BaseController {
return map;
}
@RequestMapping(value="/user/getUserInfo")
@ResponseBody
public Object getUserInfo() throws Exception{
PageData map = new PageData();
PageData pd = this.getPageData();
PageData userInfo = usersService.getUserInfo(pd); //列出Post列表
map.putAll(userInfo);
map.put("result", "success");
return map;
}
@RequestMapping(value="/department/getDepartmentInfo")
@ResponseBody
public Object getDepartmentInfo() throws Exception{
PageData map = new PageData();
PageData pd = this.getPageData();
PageData departmentInfo = departmentService.getDepartmentInfo(pd); //列出Post列表
map.putAll(departmentInfo);
map.put("result", "success");
return map;
}
/**
* @throws Exception
*/
@ -97,4 +119,20 @@ public class OpenApiController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* @throws Exception
*/
@RequestMapping(value="/corp/findById")
@ResponseBody
public Object findById() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = corpInfoService.findById(pd); //列出Post列表
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,238 @@
package com.zcloud.controller.specialoperation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.bus.SpecialUserService;
import com.zcloud.service.specialoperation.PersonnelManagementCfdService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* luoxiaobao
* 2022-06-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/app/personnelmanagement/cfd")
public class AppPersonnelManagementCfdController extends BaseController {
@Autowired
private PersonnelManagementCfdService personnelmanagementCfdService;
@Autowired
private SpecialUserService specialUserService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "新增")
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("PERSONNELMANAGEMENT_ID", this.get32UUID()); //主键
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
personnelmanagementCfdService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "删除")
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
personnelmanagementCfdService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "修改")
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
personnelmanagementCfdService.edit(pd);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "列表")
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();
String endday = DateUtil.getDay();
PageData getPD = new PageData();
getPD.put("endday",endday);
List<PageData> varList = specialUserService.nameListAll(getPD);
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "去修改页面获取数据")
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = personnelmanagementCfdService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/deleteAll")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "批量删除")
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
String ArrayDATA_IDS[] = DATA_IDS.split(",");
personnelmanagementCfdService.deleteAll(ArrayDATA_IDS);
errInfo = "success";
}else{
errInfo = "error";
}
map.put("result", errInfo); //返回结果
return map;
}
/**
* @return
*/
@RequestMapping(value="/hasCertificate")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "判断特种作业证书编号是否存在")
public Object hasCertificate() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
if(personnelmanagementCfdService.findByCertificate(pd) != null){
map.put("msg","特种作业证书编号已存在");
}
map.put("result", errInfo); //返回结果
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/excel")
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "导出到excel")
public ModelAndView exportExcel() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>();
titles.add("添加人"); //1
titles.add("添加单位"); //2
titles.add("单位名称"); //3
titles.add("人员类型"); //4
titles.add("作业类别"); //5
titles.add("操作项目"); //6
titles.add("姓名"); //7
titles.add("性别"); //8
titles.add("特种作业证书编号"); //9
titles.add("复审时间"); //10
titles.add("手机号码"); //11
titles.add("身份证号码"); //12
titles.add("发证机关"); //13
titles.add("有效期"); //14
titles.add("添加时间"); //15
titles.add("修改人"); //16
titles.add("修改时间"); //17
titles.add("是否删除"); //18
titles.add("企业ID"); //19
dataMap.put("titles", titles);
List<PageData> varOList = personnelmanagementCfdService.listAll(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("CREATOR")); //1
vpd.put("var2", varOList.get(i).getString("ADDUNITS")); //2
vpd.put("var3", varOList.get(i).getString("UNITS_NAME")); //3
vpd.put("var4", varOList.get(i).getString("TYPE")); //4
vpd.put("var5", varOList.get(i).getString("JOB_TYPE")); //5
vpd.put("var6", varOList.get(i).getString("OPERATIONITEM")); //6
vpd.put("var7", varOList.get(i).getString("NAME")); //7
vpd.put("var8", varOList.get(i).getString("SEX")); //8
vpd.put("var9", varOList.get(i).getString("CERTIFICATE_NUM")); //9
vpd.put("var10", varOList.get(i).getString("REVIEWTIME")); //10
vpd.put("var11", varOList.get(i).getString("PHONENUM")); //11
vpd.put("var12", varOList.get(i).getString("IDENTITYCARD")); //12
vpd.put("var13", varOList.get(i).getString("LICENSING")); //13
vpd.put("var14", varOList.get(i).getString("VALID")); //14
vpd.put("var15", varOList.get(i).getString("CREATETIME")); //15
vpd.put("var16", varOList.get(i).getString("OPERATOR")); //16
vpd.put("var17", varOList.get(i).getString("OPERATTIME")); //17
vpd.put("var18", varOList.get(i).getString("ISDELETE")); //18
vpd.put("var19", varOList.get(i).getString("CORPINFO_ID")); //19
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -0,0 +1,244 @@
package com.zcloud.controller.specialoperation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.specialoperation.PersonnelManagementCfdService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* luoxiaobao
* 2022-06-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/personnelmanagement/cfd")
public class PersonnelManagementCfdController extends BaseController {
@Autowired
private PersonnelManagementCfdService personnelmanagementCfdService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("personnelmanagement:add")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "新增")
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("PERSONNELMANAGEMENT_ID", this.get32UUID()); //主键
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
personnelmanagementCfdService.save(pd);
map.put("result", errInfo);
return map;
}
/**
* @param out
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("personnelmanagement:del")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "删除")
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
personnelmanagementCfdService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("personnelmanagement:edit")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "修改")
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
personnelmanagementCfdService.edit(pd);
map.put("result", errInfo);
return map;
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("personnelmanagement:list")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "列表")
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();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = personnelmanagementCfdService.list(page); //列出PersonnelManagement列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("personnelmanagement:edit")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "去修改页面获取数据")
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = personnelmanagementCfdService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/deleteAll")
@RequiresPermissions("personnelmanagement:del")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "批量删除")
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
String ArrayDATA_IDS[] = DATA_IDS.split(",");
personnelmanagementCfdService.deleteAll(ArrayDATA_IDS);
errInfo = "success";
}else{
errInfo = "error";
}
map.put("result", errInfo); //返回结果
return map;
}
/**
* @return
*/
@RequestMapping(value="/hasCertificate")
@ResponseBody
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "判断特种作业证书编号是否存在")
public Object hasCertificate() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
if(personnelmanagementCfdService.findByCertificate(pd) != null){
map.put("msg","特种作业证书编号已存在");
}
map.put("result", errInfo); //返回结果
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/excel")
@RequiresPermissions("toExcel")
@LogAnno(menuType= "综合管理",menuServer= "特种作业",instructionsOperate = "特种作业人员管理",instructionsType = "导出到excel")
public ModelAndView exportExcel() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>();
titles.add("添加人"); //1
titles.add("添加单位"); //2
titles.add("单位名称"); //3
titles.add("人员类型"); //4
titles.add("作业类别"); //5
titles.add("操作项目"); //6
titles.add("姓名"); //7
titles.add("性别"); //8
titles.add("特种作业证书编号"); //9
titles.add("复审时间"); //10
titles.add("手机号码"); //11
titles.add("身份证号码"); //12
titles.add("发证机关"); //13
titles.add("有效期"); //14
titles.add("添加时间"); //15
titles.add("修改人"); //16
titles.add("修改时间"); //17
titles.add("是否删除"); //18
titles.add("企业ID"); //19
dataMap.put("titles", titles);
List<PageData> varOList = personnelmanagementCfdService.listAll(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("CREATOR")); //1
vpd.put("var2", varOList.get(i).getString("ADDUNITS")); //2
vpd.put("var3", varOList.get(i).getString("UNITS_NAME")); //3
vpd.put("var4", varOList.get(i).getString("TYPE")); //4
vpd.put("var5", varOList.get(i).getString("JOB_TYPE")); //5
vpd.put("var6", varOList.get(i).getString("OPERATIONITEM")); //6
vpd.put("var7", varOList.get(i).getString("NAME")); //7
vpd.put("var8", varOList.get(i).getString("SEX")); //8
vpd.put("var9", varOList.get(i).getString("CERTIFICATE_NUM")); //9
vpd.put("var10", varOList.get(i).getString("REVIEWTIME")); //10
vpd.put("var11", varOList.get(i).getString("PHONENUM")); //11
vpd.put("var12", varOList.get(i).getString("IDENTITYCARD")); //12
vpd.put("var13", varOList.get(i).getString("LICENSING")); //13
vpd.put("var14", varOList.get(i).getString("VALID")); //14
vpd.put("var15", varOList.get(i).getString("CREATETIME")); //15
vpd.put("var16", varOList.get(i).getString("OPERATOR")); //16
vpd.put("var17", varOList.get(i).getString("OPERATTIME")); //17
vpd.put("var18", varOList.get(i).getString("ISDELETE")); //18
vpd.put("var19", varOList.get(i).getString("CORPINFO_ID")); //19
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv,dataMap);
return mv;
}
}

View File

@ -11,6 +11,7 @@ import com.zcloud.util.ObjectExcelView;
import net.sf.json.JSONArray;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -0,0 +1,94 @@
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.HttpClientService;
import com.zcloud.util.Jurisdiction;
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 java.util.HashMap;
import java.util.Map;
/**
* @author fangjiakai
* @date 2023/05/15 11:09
*/
@Controller
@RequestMapping("/corpFgs")
public class CorpFgsController extends BaseController {
@Value("${preventionxgf.api.url}")
private String xgfUrl;
/**
*
* @param page
* @return
* @throws Exception
*/
@RequestMapping(value="/corpFgsList")
@ResponseBody
public Object batchList(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpFgs/corpFgsList" +getPageUrl(page), pd);
return result;
}
/**
*
* @param page
* @return
* @throws Exception
*/
@RequestMapping(value="/corpUserFgsList")
@ResponseBody
public Object batchUserList(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpUserFgs/corpUserFgsList" +getPageUrl(page), pd);
return result;
}
/**
* --
* @return
* @throws Exception
*/
@RequestMapping(value="/getCorpUserDetail")
@ResponseBody
public Object getCorpUserDetail() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpUserFgs/corpUserDetailInfoById", pd);
return result;
}
private String getPageUrl(Page page){
return "?showCount=" +page.getShowCount() + "&currentPage=" + page.getUrlCurrentPage();
}
/**
* --corpInfoId
* @return
* @throws Exception
*/
@RequestMapping(value="/listTreeByFgsId")
@ResponseBody
public Object listTreeByFgsId() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi//corpFgs/listTreeByFgsId", pd);
return result;
}
}

View File

@ -31,7 +31,6 @@ public class FlowTrainController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
pd.put("MAndTUserId",Jurisdiction.getUSER_ID());
// pd.put("TRAIN_CORP_LEADER", Jurisdiction.getUSER_ID());
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/list" +getPageUrl(page), pd);
return result;
}

View File

@ -0,0 +1,240 @@
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.DateUtil;
import com.zcloud.util.HttpClientService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
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;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* luoxiaobao
* 2022-06-07
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/relevantunits")
public class RelevantUnitsController extends BaseController {
@Value("${preventionxgf.api.url}")
private String xgfUrl;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/list")
@ResponseBody
public Object list() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/list", pd);
return result;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/examine")
@ResponseBody
public Object examine() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
pd.put("OPERATOR", Jurisdiction.getUSER_ID());
String type = pd.getString("STATE"); //2 通过 3.未通过
if ("2".equals(type)) {
pd.put("STATE", "2"); // 审核状态改为通过
} else if ("3".equals(type)) {
pd.put("STATE", "3"); // 审核状态改为打回
}
// Map result2 = HttpClientService.doPost(XGF_EDITROLEBTG, pd);
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/corpInfoAudit", pd);
map.put("result", errInfo);
return map;
}
/**
* --list
*
* @return
* @throws Exception
*/
@RequestMapping(value = "/getCorpInfoDetail")
@ResponseBody
public Object getCorpInfoDetail() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/getDataForEditByCorpInfoIdForApi", pd);
return result;
}
/**
* -
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/getCorpInfoList")
@ResponseBody
public Object getCorpInfoList(Page page) throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/list", pd);
return result;
}
/**
* excel
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/excelAll")
@RequiresPermissions("toExcel")
public ModelAndView exportExcel() throws Exception {
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
Map<String, Object> dataMap = new HashMap<String, Object>();
List<String> titles = new ArrayList<String>();
titles.add("序号"); //1
titles.add("企业状态"); //2
titles.add("股份主管部门"); //3
titles.add("基层单位主管公司"); //4
titles.add("基层单位主管部门"); //5
titles.add("相关方单位名称"); //6
titles.add("统一社会信用代码"); //7
titles.add("经营地址"); //8
titles.add("法人"); //9
titles.add("联系人"); //10
titles.add("联系电话"); //11
titles.add("用工形式"); //12
titles.add("选取形式"); //13
titles.add("流动人员比例%"); //14
titles.add("添加人"); //15
titles.add("添加时间"); //16
dataMap.put("titles", titles);
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/unitCorpInfo", pd);
List<HashMap<String, Object>> varOList = (List<HashMap<String, Object>>) result.get("unitCorp");
List<PageData> varList = new ArrayList<PageData>();
for (int i = 0; i < varOList.size(); i++) {
PageData vpd = new PageData();
vpd.put("var1", i + 1);
if (varOList.get(i).get("STATE").equals("0")) {
vpd.put("var2", "未填报");
} else if (varOList.get(i).get("STATE").equals("1")) {
vpd.put("var2", "待审核");
} else if (varOList.get(i).get("STATE").equals("2")) {
vpd.put("var2", "已审核");
} else if (varOList.get(i).get("STATE").equals("3")) {
vpd.put("var2", "已打回");
} else if (varOList.get(i).get("STATE").equals("4")) {
vpd.put("var2", "已填报");
}
vpd.put("var3", varOList.get(i).get("MAIN_DEPARTMENT_NAME"));
vpd.put("var4", varOList.get(i).get("SUPERVISE_CORPINFO_NAME"));
vpd.put("var5", varOList.get(i).get("SUPERVISE_DEPARTMENT_NAME"));
vpd.put("var6", varOList.get(i).get("RELEVANT_UNIT_NAME"));
vpd.put("var7", varOList.get(i).get("SOCIAL_CODE"));
vpd.put("var8", varOList.get(i).get("BUSINESS_ADDRESS"));
vpd.put("var9", varOList.get(i).get("LEGAL_PERSON"));
vpd.put("var10", varOList.get(i).get("CONTACT_PERSON"));
vpd.put("var11", varOList.get(i).get("CONTACT_TEL"));
vpd.put("var12", varOList.get(i).get("EMPLOYMENT_FORM_NAME"));
if (varOList.get(i).get("SELECT_FORM").equals("competitive_negotiation")) {
vpd.put("var13", "竞争性谈判");
}
if (varOList.get(i).get("SELECT_FORM").equals("invite_tenders")) {
vpd.put("var13", "招标");
}
vpd.put("var14", varOList.get(i).get("FLOATING_PERCENT"));
vpd.put("var15", varOList.get(i).get("CREATOR_NAME"));
vpd.put("var16", varOList.get(i).get("CREATTIME").toString().replace("T", " ").replace(".000+0000", ""));
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv, dataMap);
return mv;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/saveCorpInfo")
@ResponseBody
public Object saveCorpInfo() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
pd.put("SUPERVISE_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/saveDataForApi", pd);
return result;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/hasName")
@ResponseBody
public Object hasName() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/hasName", pd);
return result;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/hasSocialCode")
@ResponseBody
public Object hasSocialCode() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/hasSocialCode", pd);
return result;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/resetPassword")
@ResponseBody
public Object resetPassword() throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/resetPasswordByCorpInfoId", pd);
return result;
}
}

View File

@ -236,7 +236,6 @@ public class XgfCorpController extends BaseController {
} else if ("3".equals(type)) {
pd.put("STATE", "3"); // 审核状态改为打回
}
// Map result2 = HttpClientService.doPost(XGF_EDITROLEBTG, pd);
Map result = HttpClientService.doPost(url + "/api/corpinfo/corpInfoAudit", pd);
map.put("result", errInfo);
return map;

View File

@ -54,4 +54,20 @@ public class XgfDictionariesController extends BaseController {
Map result = HttpClientService.doPost(url + "/api/dictionaries/getAreaLevels", pd);
return result;
}
/**
*
* @return
* @throws Exception
*/
@RequestMapping(value="/listSelectTree")
@ResponseBody
public Object listSelectTree() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(url + "/api/dictionaries/listSelectTree", pd);
return result;
}
}

View File

@ -0,0 +1,110 @@
package com.zcloud.controller.xgf.app;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.util.HttpClientService;
import com.zcloud.util.Tools;
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 java.util.HashMap;
import java.util.Map;
/**
* @author fangjiakai
* @date 2023/05/15 11:09
*/
@Controller
@RequestMapping("/app/corpFgs")
public class AppCorpFgsController extends BaseController {
@Value("${preventionxgf.api.url}")
private String xgfUrl;
/**
*
* @param page
* @return
* @throws Exception
*/
@RequestMapping(value="/corpFgsList")
@ResponseBody
public Object batchList(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpFgs/corpFgsList" +getPageUrl(page), pd);
return result;
}
/**
*
* @param page
* @return
* @throws Exception
*/
@RequestMapping(value="/corpUserFgsList")
@ResponseBody
public Object batchUserList(Page page) throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpUserFgs/corpUserFgsList" +getPageUrl(page), pd);
return result;
}
/**
* --
* @return
* @throws Exception
*/
@RequestMapping(value="/getCorpUserDetail")
@ResponseBody
public Object getCorpUserDetail() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi/corpUserFgs/corpUserDetailInfoById", pd);
return result;
}
private String getPageUrl(Page page){
return "?showCount=" +page.getShowCount() + "&currentPage=" + page.getUrlCurrentPage();
}
/**
* --corpInfoId
* @return
* @throws Exception
*/
@RequestMapping(value="/listTreeByFgsId")
@ResponseBody
public Object listTreeByFgsId() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi//corpFgs/listTreeByFgsId", pd);
return result;
}
/**
* id
* @return
* @throws Exception
*/
@RequestMapping(value="/findUserByDepartmentId")
@ResponseBody
public Object findUserByDepartmentId() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Map result = HttpClientService.doPost(xgfUrl + "/openApi//corpUserFgs/findUserByDepartmentId", pd);
return result;
}
}

View File

@ -0,0 +1,68 @@
package com.zcloud.dto;
import com.alibaba.fastjson.JSON;
import lombok.Data;
@Data
public class Response {
private String result;
private String exception;
private String code;
private String message;
public Response Ok() {
this.result = "succeed";
this.code = "0";
return this;
}
public static Response OK() {
Response response = new Response();
response.result = "succeed";
response.code = "0";
return response;
}
public Response Error() {
this.result = "succeed";
this.code = "9999";
this.exception = "系统异常";
return this;
}
public Response Error(String errorMessage) {
this.result = "succeed";
this.code = "9999";
this.exception = errorMessage;
return this;
}
public Response Error(String code, String errorMessage) {
this.result = "succeed";
this.code = code;
this.exception = errorMessage;
return this;
}
public static Response ERROR() {
Response response = new Response();
response.result = "succeed";
response.code = "0";
return response;
}
public static Response ERROR(String errorMessage) {
Response response = new Response();
response.result = "exception";
response.code = "9999";
response.exception = errorMessage;
return response;
}
public void setMessage(Object obj) {
this.message = JSON.toJSONString(obj);
}
}

View File

@ -0,0 +1,7 @@
package com.zcloud.dto;
public class TenCorpConst {
public static final String confinedSpace = "confined-space";
public static final String electricity = "electricity";
public static final String hotWork = "hot-work";
}

View File

@ -0,0 +1,45 @@
package com.zcloud.dto;
import com.alibaba.fastjson.JSON;
import com.zcloud.entity.PageData;
import lombok.Data;
@Data
public class TenCorpDto {
// 请秋id
private String id;
// 消息来源名称
private String producer_name = "qa-prevention-cfd";
private String topic;
//印记(方便寻找该条请求)
private String mark;
// 标记名称
private String mark_name;
// 消息发送时间(yyyy-MM-dd HH:mm:ss:SSS)
private String time_stamp;
// 消息体
// 八项作业根据这个区分接口
private String message;
// 消息体
private PageData data;
public TenCorpDto() {
this.id = Warden.get32UUID();
}
@Override
public String toString() {
return JSON.toJSONString(this);
}
public PageData getPd() {
PageData info = new PageData();
info.put("ID", this.id);
info.put("PRODUCER_NAME", this.producer_name);
info.put("MARK", this.mark);
info.put("MARK_NAME", this.mark_name);
info.put("MESSAGE", this.message);
info.put("TOPIC",this.topic);
return info;
}
}

View File

@ -0,0 +1,87 @@
package com.zcloud.dto;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.entity.PageData;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.UuidUtil;
import org.apache.commons.lang.StringUtils;
import java.util.*;
public class Warden {
public static List<PageData> getList(String raw) {
return JSON.parseArray(raw, PageData.class);
}
public static <T> List<T> getList(String raw, Class<T> clazz) {
return JSON.parseArray(raw, clazz);
}
public static List<PageData> getList(JSONArray raw) {
return JSON.parseArray(raw.toJSONString(), PageData.class);
}
public static PageData getPageData(JSONObject raw) {
return JSON.parseObject(raw.toJSONString(), PageData.class);
}
public static PageData getPageData(String raw) {
return JSON.parseObject(raw, PageData.class);
}
public static String get32UUID() {
return UuidUtil.get32UUID();
}
public static List<Map<String, String>> getVueUploadEntity(String url) {
List<Map<String, String>> list = new ArrayList<>();
Map<String, String> map = new HashMap<>();
map.put("name", get32UUID());
map.put("url", url);
list.add(map);
return list;
}
public static void initDate(PageData entity) {
entity.put("CREATOR", Jurisdiction.getUSER_ID());
entity.put("CREATE_TIME", DateUtil.getTime());
entity.put("CREATOR_NAME", Jurisdiction.getName());
entity.put("CREATTIME", DateUtil.getTime());
entity.put("OPERATOR", Jurisdiction.getUSER_ID());
entity.put("OPERATOR_NAME", Jurisdiction.getName());
entity.put("OPERAT_TIME", DateUtil.getTime());
entity.put("OPERATTIME", DateUtil.getTime());
entity.put("ISDELETE", "0");
}
public static void updateDate(PageData entity) {
entity.put("OPERATOR", Jurisdiction.getUSER_ID());
entity.put("OPERAT_TIME", DateUtil.getTime());
entity.put("OPERATTIME", DateUtil.getTime());
entity.put("ISDELETE", "0");
}
public static Date addDate(Date date, long day) {
if (date == null) {
return new Date();
}
long time = date.getTime(); // 得到指定日期的毫秒数
day = day * 24 * 60 * 60 * 1000; // 要加上的天数转换成毫秒数
time += day; // 相加得到新的毫秒数
return new Date(time); // 将毫秒数转换成日期
}
public static String checkId(Object object) {
if (object == null || StringUtils.isEmpty(object.toString())) {
return get32UUID();
} else {
return object.toString();
}
}
}

View File

@ -66,5 +66,7 @@ public interface SpecialUserMapper{
* @throws Exception
*/
void deleteTem(PageData pd);
List<PageData> nameListAll(PageData getPD);
}

View File

@ -0,0 +1,26 @@
package com.zcloud.mapper.datasource.eightWork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-13
* www.zcloudchina.com
*/
public interface EightWorkCfdMapper {
/**
* @param page
* @throws Exception
*/
List<PageData> datalist(Page page);
List<PageData> getWorkUserLabels(List<String> workUserIds);
}

View File

@ -91,5 +91,7 @@ public interface HotWorkApplicationMapper{
* @throws Exception
*/
void updateState4ids(PageData pageData);
PageData getCountByMyApprovalForDelayedHotWork(PageData pageData);
}

View File

@ -89,5 +89,7 @@ public interface HotWorkApplicationUserMapper{
List<PageData> getHotdelayed (PageData pd) throws Exception;
List<PageData> getHotGasanalysis (PageData pd) throws Exception;
List<PageData> listByDepartment(PageData hotUserPd) throws Exception;
}

View File

@ -0,0 +1,67 @@
package com.zcloud.mapper.datasource.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
public interface HotworkAcceptUserCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void deleteList(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
List<PageData> findById(PageData pd);
List<PageData> findByIds(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listAllByIds(PageData pd);
}

View File

@ -0,0 +1,89 @@
package com.zcloud.mapper.datasource.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> jhdatalistPage(Page page);
List<PageData> aqdatalistPage(Page page);
List<PageData> jsdatalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
void cancel(PageData pd);
PageData checkno(PageData pd);
void editSpecialwork(PageData pd);
void editSpecialwork1(PageData pd);
void editSpecialwork2(PageData pd);
void editSpecialwork3(PageData pd);
void editSpecialwork4(PageData pd);
void editSpecialwork5(PageData pd);
void editSpecialwork6(PageData pd);
void editSpecialwork7(PageData pd);
void edittime(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> listAllMeasures(PageData pd);
/**
*
* @param pd
* @return
* @throws Exception
*/
PageData countCheck(PageData pd);
PageData getCode(PageData pd);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkGasCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkLogCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkToMeasuresCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,67 @@
package com.zcloud.mapper.datasource.specialoperation;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-06-16
* www.zcloudchina.com
*/
public interface PersonnelManagementCfdMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
List<PageData> namelist(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
/**
*
* @param pd
* @return
*/
PageData findByCertificate(PageData pd);
}

View File

@ -173,5 +173,9 @@ public interface DepartmentMapper{
* @return
*/
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd);
PageData getInfo(PageData pd) throws Exception;
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
}

View File

@ -36,6 +36,13 @@ public interface UsersMapper {
PageData findBySelect(PageData pd);
PageData findByName(PageData pd);
/**
*
* @return
* @throws Exception
*/
List<PageData> getAllUserList()throws Exception;
/**
* @param page
* @return
@ -292,4 +299,6 @@ public interface UsersMapper {
List<PageData> selectUserListByUserIds(PageData pd);
void resetCardNo(PageData pd);
PageData getUserInfo(PageData pd);
}

View File

@ -73,5 +73,7 @@ public interface OutSourcedMapper{
//校验结束重点工程是否有为完成的内容
PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
}

View File

@ -0,0 +1,117 @@
package com.zcloud.mapper.dsno2.system;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Department;
import java.util.List;
/**
* Mapper
* luoxiaobao
* www.qdkjchina.com
*/
public interface Department2Mapper {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> datalistPage(Page page)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public PageData findByBianma(PageData pd)throws Exception;
/**
* ID
* @param parentId
* @return
* @throws Exception
*/
public List<Department> listSubDepartmentByParentId(String parentId) throws Exception;
/**
* ID
* @param parentId
* @return
* @throws Exception
*/
public List<Department> listByCorpInfoId(String parentId,String CORPINFO_ID) throws Exception;
List<PageData> deptinformation(PageData pageData) throws Exception;
/**
* ()
* @param MENU_ID
* @return
* @throws Exception
*/
public List<Department> listAllDepartment(String parentId) throws Exception;
/**
* ()ztree
* @param MENU_ID
* @return
* @throws Exception
*/
public List<PageData> listAllDepartmentToSelect(String parentId, List<PageData> zdepartmentPdList) throws Exception;
/**ID( in)
* @param DEPARTMENT_ID
* @return
* @throws Exception
*/
public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception;
public List<PageData> listAll(PageData pd);
public List<PageData> listAllMent (PageData pd);
public List<Department> listAllDepartmentByType(PageData pd) throws Exception;
void saveCorpdept(PageData pd);
List<PageData> saftpersonlist(PageData pd) throws Exception;
List<PageData> saftmanagelist(PageData pd);
List<PageData> findbyCorpIdtoDeptlistPage(Page page);
List<PageData> findByDeptIdlistPage(Page page);
public PageData findCorpDeptDetail(PageData pd);
void editNameBDId(PageData deptPageData);
//从管理端修改部门 新
void editCorpdeptNew(PageData pd);
List<PageData> listTreeCorpDept(PageData pd);
}

View File

@ -68,5 +68,6 @@ public interface SpecialUserService{
*/
public void deleteTem(PageData pd)throws Exception;
List<PageData> nameListAll(PageData getPD)throws Exception;
}

View File

@ -94,5 +94,10 @@ public class SpecialUserServiceImpl implements SpecialUserService{
public void deleteTem(PageData pd)throws Exception{
specialuserMapper.deleteTem(pd);
}
@Override
public List<PageData> nameListAll(PageData getPD) throws Exception {
return specialuserMapper.nameListAll(getPD);
}
}

View File

@ -0,0 +1,19 @@
package com.zcloud.service.corpFgs;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-08
* www.zcloudchina.com
*/
public interface CorpFgsService {
String getXgfUserName(String workUser);
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.corpFgs.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.eightWork.ElectricityYthGasMapper;
import com.zcloud.service.corpFgs.CorpFgsService;
import com.zcloud.service.eightWork.ElectricityYthGasService;
import com.zcloud.util.HttpClientService;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
*
* luoxiaobao
* 2021-09-08
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class CorpFgsServiceImpl implements CorpFgsService {
@Value("${preventionxgf.api.url}")
private String xgfUrl;
@Override
public String getXgfUserName(String workUser){
PageData pd = new PageData();
pd.put("USER_ID",workUser);
Map<String,Object> result = HttpClientService.doPost(xgfUrl + "/openApi/user/findUserById", pd);
Map<String,Object> pageData = (Map<String, Object>) result.get("pd");
if(Tools.isEmpty(pageData)){
return workUser;
}else {
return pageData.get("NAME").toString();
}
}
}

View File

@ -0,0 +1,26 @@
package com.zcloud.service.eightWork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-13
* www.zcloudchina.com
*/
public interface EightWorkCfdService {
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
List<PageData> getWorkUserLabels(List<String> workUserIds)throws Exception;
}

View File

@ -0,0 +1,41 @@
package com.zcloud.service.eightWork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.eightWork.EightWorkCfdMapper;
import com.zcloud.service.eightWork.EightWorkCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-13
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class EightWorkCfdServiceImpl implements EightWorkCfdService {
@Autowired
private EightWorkCfdMapper eightworkCfdMapper;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return eightworkCfdMapper.datalist(page);
}
@Override
public List<PageData> getWorkUserLabels(List<String> workUserIds) throws Exception {
return eightworkCfdMapper.getWorkUserLabels(workUserIds);
}
}

View File

@ -1,8 +1,10 @@
package com.zcloud.service.gf.impl;
import com.zcloud.controller.xgf.app.AppCorpFgsController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.gf.GFBlindBoardMapper;
import com.zcloud.service.corpFgs.CorpFgsService;
import com.zcloud.service.gf.GFBlindBoardService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -23,6 +25,9 @@ public class GFBlindBoardServiceImpl implements GFBlindBoardService {
@Resource
private GFBlindBoardMapper GFblindboardMapper;
@Resource
private CorpFgsService corpFgsService;
/**
* @param pd
* @throws Exception
@ -76,7 +81,11 @@ public class GFBlindBoardServiceImpl implements GFBlindBoardService {
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return GFblindboardMapper.findById(pd);
PageData pageData = GFblindboardMapper.findById(pd);
//调用接口 获取用户信息
String workUser = corpFgsService.getXgfUserName(pageData.getString("WORK_USER"));
pageData.put("WORK_USER",workUser);
return pageData;
}
/**

View File

@ -3,6 +3,7 @@ package com.zcloud.service.gf.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.gf.GFHighWorkMapper;
import com.zcloud.service.corpFgs.CorpFgsService;
import com.zcloud.service.gf.GFHighWorkService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -22,6 +23,8 @@ public class GFHighWorkServiceImpl implements GFHighWorkService {
@Resource
private GFHighWorkMapper GFhighworkMapper;
@Resource
private CorpFgsService corpFgsService;
/**
* @param pd
@ -77,7 +80,11 @@ public class GFHighWorkServiceImpl implements GFHighWorkService {
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return GFhighworkMapper.findById(pd);
PageData pageData = GFhighworkMapper.findById(pd);
//调用接口 获取用户信息
String workUser = corpFgsService.getXgfUserName(pageData.getString("PROJECT_MANAGER"));
pageData.put("PROJECT_MANAGER",workUser);
return pageData;
}
/**

View File

@ -110,6 +110,8 @@ public interface HotWorkApplicationService{
public List<PageData> archivelist(Page page) throws Exception;
public void updateState4ids(PageData pageData);
PageData getCountByMyApprovalForDelayedHotWork(String user_id) throws Exception;
}

View File

@ -112,5 +112,7 @@ public interface HotWorkApplicationUserService{
public List<PageData> getHotdelayed (PageData pd) throws Exception;
public List<PageData> getHotGasanalysis (PageData pd) throws Exception;
List<PageData> listByDepartment(PageData hotUserPd) throws Exception;
}

View File

@ -0,0 +1,67 @@
package com.zcloud.service.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
public interface HotworkAcceptUserCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void deleteList(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public List<PageData> findById(PageData pd)throws Exception;
public List<PageData> findByIds(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
public List<PageData> listAllByIds(PageData pd)throws Exception;
}

View File

@ -0,0 +1,88 @@
package com.zcloud.service.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
public List<PageData> jhlist(Page page)throws Exception;
public List<PageData> aqlist(Page page)throws Exception;
public List<PageData> jslist(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public void cancel(PageData pd)throws Exception;
public PageData checkno(PageData pd)throws Exception;
public void editSpecialwork(PageData pd)throws Exception;
public void editSpecialwork1(PageData pd)throws Exception;
public void editSpecialwork2(PageData pd)throws Exception;
public void editSpecialwork3(PageData pd)throws Exception;
public void editSpecialwork4(PageData pd)throws Exception;
public void editSpecialwork5(PageData pd)throws Exception;
public void editSpecialwork6(PageData pd)throws Exception;
public void editSpecialwork7(PageData pd)throws Exception;
public void edittime(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
public List<PageData> listAllMeasures(PageData pd)throws Exception;
/**
*
* @param pd
* @return
* @throws Exception
*/
PageData countCheck(PageData pd)throws Exception;
PageData getCode(PageData pd)throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkGasCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkLogCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.highriskwork;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
public interface HotworkToMeasuresCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -105,6 +105,14 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{
public void updateState4ids(PageData pageData){
hotworkapplicationMapper.updateState4ids(pageData);
}
@Override
public PageData getCountByMyApprovalForDelayedHotWork(String user_id) throws Exception {
PageData pd = new PageData();
pd.put("USER_ID",user_id);
return hotworkapplicationMapper.getCountByMyApprovalForDelayedHotWork(pd);
}
/**
* 1.state =0
* @throws Exception

View File

@ -370,5 +370,10 @@ public class HotWorkApplicationUserServiceImpl implements HotWorkApplicationUser
public List<PageData> getHotGasanalysis (PageData pd) throws Exception{
return hotworkapplicationuserMapper.getHotGasanalysis(pd);
}
@Override
public List<PageData> listByDepartment(PageData hotUserPd) throws Exception {
return hotworkapplicationuserMapper.listByDepartment(hotUserPd);
}
}

View File

@ -0,0 +1,102 @@
package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.highriskwork.HotworkAcceptUserCfdMapper;
import com.zcloud.service.highriskwork.HotworkAcceptUserCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2020-12-24
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HotworkAcceptUserCfdServiceImpl implements HotworkAcceptUserCfdService {
@Autowired
private HotworkAcceptUserCfdMapper hotworkAcceptUserCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hotworkAcceptUserCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
hotworkAcceptUserCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void deleteList(PageData pd)throws Exception{
hotworkAcceptUserCfdMapper.deleteList(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
hotworkAcceptUserCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hotworkAcceptUserCfdMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hotworkAcceptUserCfdMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public List<PageData> findById(PageData pd)throws Exception{
return hotworkAcceptUserCfdMapper.findById(pd);
}
public List<PageData> findByIds(PageData pd)throws Exception{
return hotworkAcceptUserCfdMapper.findByIds(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
hotworkAcceptUserCfdMapper.deleteAll(ArrayDATA_IDS);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAllByIds(PageData pd)throws Exception{
return hotworkAcceptUserCfdMapper.listAllByIds(pd);
}
}

View File

@ -0,0 +1,150 @@
package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.highriskwork.HotworkCfdMapper;
import com.zcloud.service.highriskwork.HotworkCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HotworkCfdServiceImpl implements HotworkCfdService {
@Autowired
private HotworkCfdMapper hotworkCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hotworkCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
hotworkCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
hotworkCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hotworkCfdMapper.datalistPage(page);
}
public List<PageData> jhlist(Page page)throws Exception{
return hotworkCfdMapper.jhdatalistPage(page);
}
public List<PageData> aqlist(Page page)throws Exception{
return hotworkCfdMapper.aqdatalistPage(page);
}
public List<PageData> jslist(Page page)throws Exception{
return hotworkCfdMapper.jsdatalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hotworkCfdMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return hotworkCfdMapper.findById(pd);
}
public void cancel(PageData pd)throws Exception{
hotworkCfdMapper.cancel(pd);
}
public PageData checkno(PageData pd)throws Exception{
return hotworkCfdMapper.checkno(pd);
}
public void editSpecialwork(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork(pd);
}
public void editSpecialwork1(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork1(pd);
}
public void editSpecialwork2(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork2(pd);
}
public void editSpecialwork3(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork3(pd);
}
public void editSpecialwork4(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork4(pd);
}
public void editSpecialwork5(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork5(pd);
}
public void editSpecialwork6(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork6(pd);
}
public void editSpecialwork7(PageData pd)throws Exception{
hotworkCfdMapper.editSpecialwork7(pd);
}
public void edittime(PageData pd)throws Exception{
hotworkCfdMapper.edittime(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
hotworkCfdMapper.deleteAll(ArrayDATA_IDS);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAllMeasures(PageData pd)throws Exception{
return hotworkCfdMapper.listAllMeasures(pd);
}
/**
*
* @param pd
* @return
*/
@Override
public PageData countCheck(PageData pd) throws Exception {
return hotworkCfdMapper.countCheck(pd);
}
@Override
public PageData getCode(PageData pd)throws Exception{
return hotworkCfdMapper.getCode(pd);
}
}

View File

@ -0,0 +1,83 @@
package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.highriskwork.HotworkGasCfdMapper;
import com.zcloud.service.highriskwork.HotworkGasCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HotworkGasCfdServiceImpl implements HotworkGasCfdService {
@Autowired
private HotworkGasCfdMapper hotworkGasCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hotworkGasCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
hotworkGasCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
hotworkGasCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hotworkGasCfdMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hotworkGasCfdMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return hotworkGasCfdMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
hotworkGasCfdMapper.deleteAll(ArrayDATA_IDS);
}
}

View File

@ -0,0 +1,83 @@
package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.highriskwork.HotworkLogCfdMapper;
import com.zcloud.service.highriskwork.HotworkLogCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HotworkLogCfdServiceImpl implements HotworkLogCfdService {
@Autowired
private HotworkLogCfdMapper hotworkLogCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hotworkLogCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
hotworkLogCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
hotworkLogCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hotworkLogCfdMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hotworkLogCfdMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return hotworkLogCfdMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
hotworkLogCfdMapper.deleteAll(ArrayDATA_IDS);
}
}

View File

@ -0,0 +1,83 @@
package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.highriskwork.HotworkToMeasuresCfdMapper;
import com.zcloud.service.highriskwork.HotworkToMeasuresCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2021-09-18
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class HotworkToMeasuresCfdServiceImpl implements HotworkToMeasuresCfdService {
@Autowired
private HotworkToMeasuresCfdMapper hotworkToMeasuresCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
hotworkToMeasuresCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
hotworkToMeasuresCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
hotworkToMeasuresCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return hotworkToMeasuresCfdMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return hotworkToMeasuresCfdMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return hotworkToMeasuresCfdMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
hotworkToMeasuresCfdMapper.deleteAll(ArrayDATA_IDS);
}
}

View File

@ -74,5 +74,7 @@ public interface OutSourcedService{
//校验结束重点工程是否有为完成的内容
PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
}

View File

@ -4,10 +4,12 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.keyProjects.OutSourcedMapper;
import com.zcloud.service.keyProjects.OutSourcedService;
import com.zcloud.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
@ -98,5 +100,11 @@ public class OutSourcedServiceImpl implements OutSourcedService {
public PageData jieshuOutSourced(PageData pd) {
return outsourcedMapper.jieshuOutSourced(pd);
}
@Override
public void updateState(PageData pd) {
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
outsourcedMapper.updateState(pd);
}
}

View File

@ -0,0 +1,11 @@
package com.zcloud.service.mq;
import com.zcloud.entity.PageData;
public interface LogService {
void saveLog(PageData pageData);
void saveLog(PageData pageData,String type);
void saveErrorMessage(PageData pageData,String errorMessage);
}

View File

@ -0,0 +1,11 @@
package com.zcloud.service.mq;
import com.zcloud.dto.TenCorpDto;
public interface SendMessageService {
void sendMessage(TenCorpDto tenCorpDto) throws Exception;
void SendDelayQueue(TenCorpDto tenCorpDto);
void SendDelayQueue(String message);
}

View File

@ -0,0 +1,43 @@
package com.zcloud.service.mq.impl;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mq.MqErrorMessageLogMapper;
import com.zcloud.mapper.datasource.mq.MqMessageLogMapper;
import com.zcloud.service.mq.LogService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Warden;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class LogServiceImpl implements LogService {
@Resource
private MqErrorMessageLogMapper mqErrorMessageLogMapper;
@Resource
private MqMessageLogMapper mqMessageLogMapper;
@Override
@Async
public void saveLog(PageData pageData) {
this.saveLog(pageData,"0");
}
@Override
public void saveLog(PageData pageData, String type) {
}
@Override
@Async
public void saveErrorMessage(PageData log,String errorMessage) {
log.put("ERROR_MESSAGE", errorMessage);
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
log.put("TYPE", "0");
log.put("TIME", DateUtil.getTime());
mqErrorMessageLogMapper.save(log);
}
}

View File

@ -0,0 +1,129 @@
package com.zcloud.service.mq.impl;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.dto.TenCorpDto;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mq.MqErrorMessageLogMapper;
import com.zcloud.mapper.datasource.mq.MqMessageLogMapper;
import com.zcloud.service.mq.LogService;
import com.zcloud.service.mq.SendMessageService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Warden;
import com.zcloud.util.mq.MqUtil;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.client.producer.SendStatus;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class SendMessageServiceImpl implements SendMessageService {
@Value("${mq.topic.info}")
private String info;
@Resource
private RocketMQTemplate rocketMQTemplate;
@Resource
private MqErrorMessageLogMapper mqErrorMessageLogMapper;
@Resource
private LogService logService;
@Resource
private MqMessageLogMapper mqMessageLogMapper;
public void sendMessage(TenCorpDto tenCorpDto) throws Exception {
try {
PageData log = tenCorpDto.getPd();
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
log.put("CREATE_TIME", DateUtil.getTime());
mqMessageLogMapper.save(log);
System.out.println("生产者:" + tenCorpDto.toString());
SendResult sendResult = rocketMQTemplate.syncSend(this.info, tenCorpDto.toString());
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
throw new RuntimeException("产品入栈失败");
}
} catch (Exception e) {
e.printStackTrace();
PageData log = tenCorpDto.getPd();
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
log.put("ERROR_MESSAGE", e.getMessage());
log.put("TYPE", "0");
log.put("TIME", DateUtil.getTime());
mqErrorMessageLogMapper.save(log);
}
}
@Override
public void SendDelayQueue(TenCorpDto tenCorpDto) {
PageData log = tenCorpDto.getPd();
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
try {
log.put("CREATE_TIME", DateUtil.getTime());
log.put("PRODUCER_NAME",tenCorpDto.getProducer_name());
log.put("TYPE","0");
log.put("PLAN_TIME",tenCorpDto.getTime_stamp());
mqMessageLogMapper.save(log);
System.out.println("生产者:" + tenCorpDto.toString());
// 推送消息
SendResult sendResult = rocketMQTemplate.syncSend(
MqUtil.analysistopic(tenCorpDto.getTopic()),
new GenericMessage<>(tenCorpDto.toString()),
3000,
MqUtil.analysisTime(tenCorpDto.getTime_stamp()));
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
throw new RuntimeException("产品入栈失败");
}
} catch (Exception e) {
e.printStackTrace();
log.put("ERROR_MESSAGE", e.getMessage());
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
log.put("TYPE", "0");
log.put("TIME", DateUtil.getTime());
mqErrorMessageLogMapper.save(log);
}
}
@Override
public void SendDelayQueue(String message) {
TenCorpDto tenCorpDto = JSONObject.parseObject(message,TenCorpDto.class);
try {
PageData log = tenCorpDto.getPd();
log.put("CREATE_TIME", DateUtil.getTime());
log.put("PRODUCER_NAME",tenCorpDto.getProducer_name());
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
mqMessageLogMapper.save(log);
System.out.println("生产者:" + tenCorpDto.toString());
// 推送消息
SendResult sendResult = rocketMQTemplate.syncSend(
MqUtil.analysistopic(tenCorpDto.getTopic()),
new GenericMessage<>(message),
3000,
MqUtil.analysisTime(tenCorpDto.getTime_stamp()));
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
throw new RuntimeException("产品入栈失败");
}
} catch (Exception e) {
PageData log = tenCorpDto.getPd();
logService.saveErrorMessage(log,e.getMessage());
e.printStackTrace();
}
}
public static void main(String[] args) {
try {
System.out.println(MqUtil.analysisTime("2023-06-30 14:30:00:000"));
}catch (Exception e){
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,67 @@
package com.zcloud.service.specialoperation;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-06-16
* www.zcloudchina.com
*/
public interface PersonnelManagementCfdService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
public List<PageData> namelist(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**
*
* @param pd
* @return
* @throws Exception
*/
public PageData findByCertificate(PageData pd)throws Exception;
}

View File

@ -0,0 +1,95 @@
package com.zcloud.service.specialoperation.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.specialoperation.PersonnelManagementCfdMapper;
import com.zcloud.service.specialoperation.PersonnelManagementCfdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* luoxiaobao
* 2022-06-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class PersonnelManagementCfdServiceImpl implements PersonnelManagementCfdService {
@Autowired
private PersonnelManagementCfdMapper personnelmanagementCfdMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
personnelmanagementCfdMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
personnelmanagementCfdMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
personnelmanagementCfdMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return personnelmanagementCfdMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return personnelmanagementCfdMapper.listAll(pd);
}
public List<PageData> namelist(PageData pd)throws Exception{
return personnelmanagementCfdMapper.namelist(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return personnelmanagementCfdMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
personnelmanagementCfdMapper.deleteAll(ArrayDATA_IDS);
}
/**
*
* @param pd
* @return
* @throws Exception
*/
public PageData findByCertificate(PageData pd) throws Exception {
return personnelmanagementCfdMapper.findByCertificate(pd);
}
}

View File

@ -223,5 +223,9 @@ public interface DepartmentService{
List<PageData> listTreeManageAndCorp1(PageData pd)throws Exception;
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception;
PageData getDepartmentInfo(PageData pd) throws Exception;
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
}

View File

@ -34,6 +34,8 @@ public interface DictionariesService {
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> getTreeById(String id) throws Exception;
/**id
* @param pd
* @throws Exception

View File

@ -28,6 +28,13 @@ public interface UsersService {
*/
public PageData findByUsername(PageData pd)throws Exception;
/**
*
* @return
* @throws Exception
*/
Object getAllUserList()throws Exception;
/**ID
* @param pd
* @return
@ -343,4 +350,6 @@ public interface UsersService {
List<PageData> selectUserListByUserIds(PageData selectPageData);
void resetCardNo(PageData pd);
PageData getUserInfo(PageData pd);
}

View File

@ -409,5 +409,15 @@ public class DepartmentServiceImpl implements DepartmentService{
public List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception {
return departmentMapper.listTreeManageAndCorpForPcPunishThePerson(pd);
}
@Override
public PageData getDepartmentInfo(PageData pd) throws Exception {
return departmentMapper.getInfo(pd);
}
@Override
public List<PageData> listTreeManageAndCorpHasOrder(PageData pd) {
return departmentMapper.listTreeManageAndCorpHasOrder(pd);
}
}

View File

@ -65,6 +65,18 @@ public class DictionariesServiceImpl implements DictionariesService {
return dictionariesMapper.listSubDictByParentIdAndCourseware(pd);
}
@Override
public List<PageData> getTreeById(String id) throws Exception {
List<Dictionaries> _list = this.listSubDictByParentId(id); //用传过来的ID获取此ID下的子列表数据
return _list.stream().map(n -> {
PageData entity = new PageData();
entity.put("DICTIONARIES_ID", n.getDICTIONARIES_ID());
entity.put("BIANMA", n.getBIANMA());
entity.put("NAME", n.getNAME());
return entity;
}).collect(Collectors.toList());
}
/**
* ()
* @param MENU_ID

View File

@ -79,6 +79,40 @@ public class UsersServiceImpl implements UsersService {
return usersMapper.findById(pd);
}
/**
*
* @return
* @throws Exception
*/
@Override
@Transactional
public Object getAllUserList() throws Exception {
Map<String,Object> map = new HashMap<>();
String errInfo = "success";
// List<PageData> varList = new ArrayList<>();
// List<PageData> corpInfoList = corpInfoMapper.getAllCorpInfoList();
// 所有企业列表
// Map<String, Object> corpInfoListMap = new HashMap<>();
// Map<String, Object> corpInfoListMapLived = new HashMap<>();
// for (PageData pageData : corpInfoList) {
// corpInfoListMap.put(pageData.getString("CORPINFO_ID"),pageData);
// }
// 所有部门列表
// List<PageData> departmentList = departmentMapper.getAllDepartmentList();
// Map<String, Object> departmentListMap = new HashMap<>();
// for (PageData pageData : departmentList) {
// departmentListMap.put(pageData.getString("DEPARTMENT_ID"),pageData);
// }
// 所有人员列表
List<PageData> userList = usersMapper.getAllUserList();
map.put("userList", userList);
map.put("result",errInfo);
return map;
}
/**ID
* @param pd
* @return
@ -434,4 +468,9 @@ public class UsersServiceImpl implements UsersService {
public void resetCardNo(PageData pd) {
usersMapper.resetCardNo(pd);
}
@Override
public PageData getUserInfo(PageData pd) {
return usersMapper.getUserInfo(pd);
}
}

View File

@ -55,5 +55,8 @@ public class Const {
public final static String OA_APPID = "wx69f7e25b3760001c";//公众号
public final static String OA_SECRET = "087fe91f660300df63d0ef16fd162124";//公众号
// mq
public static final String topic_eightWork="eightWork";
public static final String topic_info="info";
}

View File

@ -0,0 +1,15 @@
package com.zcloud.util;
import java.awt.*;
public class WaterMarkUtil {
/**
*
* @param waterMarkContent
* @param g
* @return
*/
public static int getWatermarkLength(String waterMarkContent, Graphics2D g) {
return g.getFontMetrics(g.getFont()).charsWidth(waterMarkContent.toCharArray(), 0, waterMarkContent.length());
}
}

View File

@ -0,0 +1,49 @@
package com.zcloud.util.mq;
import com.zcloud.dto.Response;
import com.zcloud.dto.TenCorpDto;
import com.zcloud.service.mq.SendMessageService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @author zhangyue
* @date 2023/9/23/023 13:54
*/
@Component
public class MqSendUtil {
@Resource
private SendMessageService sendMessageService;
public Response sendMessage(TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.sendMessage(tenCorpDto);
} catch (Exception e) {
e.printStackTrace();
}
return Response.OK();
}
public Response timelyQueue(TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.sendMessage(tenCorpDto);
} catch (Exception e) {
e.printStackTrace();
}
return Response.OK();
}
public Response sendDelayQueue(TenCorpDto tenCorpDto) throws Exception {
try {
sendMessageService.SendDelayQueue(tenCorpDto);
return Response.OK();
} catch (Exception e) {
e.printStackTrace();
return Response.ERROR(e.getMessage());
}
}
}

View File

@ -0,0 +1,87 @@
package com.zcloud.util.mq;
import com.zcloud.util.Const;
import java.text.SimpleDateFormat;
import java.util.Date;
public class MqUtil {
private final static SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
public static Integer analysisTime(String time) throws Exception{
Date agreed_date = timeFormat.parse(time);
long time_difference = agreed_date.getTime() - new Date().getTime();
if (time_difference < 0){
return 0;
}
if (time_difference > 2 * 60 * 60 * 1000){
return 18;
}
if (time_difference > 60 * 60 * 1000){
return 17;
}
if (time_difference > 30 * 60 * 1000){
return 16;
}
if (time_difference > 20 * 60 * 1000){
return 15;
}
if (time_difference > 10 * 60 * 1000){
return 14;
}
if (time_difference > 9 * 60 * 1000){
return 13;
}
if (time_difference > 8 * 60 * 1000){
return 12;
}
if (time_difference > 7 * 60 * 1000){
return 11;
}
if (time_difference > 6 * 60 * 1000){
return 10;
}
if (time_difference > 5 * 60 * 1000){
return 9;
}
if (time_difference > 4 * 60 * 1000){
return 8;
}
if (time_difference > 3 * 60 * 1000){
return 7;
}
if (time_difference > 2 * 60 * 1000){
return 6;
}
if (time_difference > 60 * 1000){
return 5;
}
if (time_difference > 30 * 1000){
return 4;
}
if (time_difference > 10 * 1000){
return 3;
}
// if (time_difference > 5 * 1000){
// return 2;
// }
if (time_difference > 1000){
return 2;
}
return 0;
}
public static String analysistopic(String producerName) {
switch (producerName){
case "eightWork" : return Const.topic_eightWork;
case "info" : return Const.topic_info;
default: return "";
}
}
public static Date dateFormat(String date) throws Exception{
return timeFormat.parse(date);
}
}

View File

@ -70,3 +70,26 @@ smb.port=22
smb.user=root
smb.password=Zcloud@zcloud88888
smb.basePath=/mnt/qgfile/file/
#Mq\u914D\u7F6E
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.151.57:9876
rocketmq.producer.group=libmiddle
rocketmq.producer.send-message-timeout=3000
rocketmq.producer.compress-message-body-threshold=4096
rocketmq.producer.max-message-size=4194304
rocketmq.producer.retry-times-when-send-failed=3
rocketmq.producer.retry-next-server=true
rocketmq.producer.retry-times-when-send-async-failed=3
## topic \u524D\u7F00
mq.topic.info=info
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/

View File

@ -64,4 +64,26 @@ smb.port=22
smb.user=root
smb.password=SJSKAQHBGLXT@20220311
smb.basePath=/mnt/qask/file/
#Mq\u914D\u7F6E
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.192.201:9876
rocketmq.producer.group=libmiddle
rocketmq.producer.send-message-timeout=3000
rocketmq.producer.compress-message-body-threshold=4096
rocketmq.producer.max-message-size=4194304
rocketmq.producer.retry-times-when-send-failed=3
rocketmq.producer.retry-next-server=true
rocketmq.producer.retry-times-when-send-async-failed=3
## topic \u524D\u7F00
mq.topic.info=info
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=https://skqhdg.porthebei.com:9004/file/

View File

@ -3,7 +3,7 @@ server.port=8091
#??
#spring.profiles.active=local
#??
#部署31时使用
spring.profiles.active=dev
#??
#spring.profiles.active=master

View File

@ -1,65 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.bus.ShiftWorkRulesMapper">
<!--表名 -->
<sql id="tableName">
BUS_SHIFTWORKRULES
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.NAME,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.NAME,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.PARENTID,
f.LEVEL,
f.ISCUSTOM,
f.SHIFTWORKRULES_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
NAME,
CORPINFO_ID,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ISDELETE,
NAME,
CORPINFO_ID,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
ISDELETE,
PARENTID,
LEVEL,
ISCUSTOM,
SHIFTWORKRULES_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{NAME},
#{CORPINFO_ID},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ISDELETE},
#{NAME},
#{CORPINFO_ID},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ISDELETE},
#{PARENTID},
#{LEVEL},
#{ISCUSTOM},
#{SHIFTWORKRULES_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
@ -67,7 +67,7 @@
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
@ -76,10 +76,10 @@
ISDELETE = '1',
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME}
where
where
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
</delete>
<!-- 删除-->
<delete id="deleteByPar" parameterType="pd">
update
@ -88,15 +88,15 @@
ISDELETE = '1',
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME}
where
where
PARENTID = #{PARENTID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
set
<if test="NAME != null and NAME != ''"><!-- 关键词检索 -->
NAME = #{NAME},
</if>
@ -109,56 +109,57 @@
<if test="OPERATTIME != null and OPERATTIME != ''"><!-- 关键词检索 -->
OPERATTIME = #{OPERATTIME},
</if>
SHIFTWORKRULES_ID = SHIFTWORKRULES_ID
where
where
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
select
<include refid="Field"></include>
from
from
<include refid="tableName"></include> f
where
where
f.SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</if>
<if test="pd.PARENTID != null and pd.PARENTID != ''"><!-- 关键词检索 -->
and f.PARENTID = #{pd.PARENTID}
and f.PARENTID = #{pd.PARENTID}
</if>
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.LEVEL != null and pd.LEVEL != ''"><!-- 关键词检索 -->
and f.LEVEL = #{pd.LEVEL}
and f.LEVEL = #{pd.LEVEL}
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
SELECT
<include refid="Field"></include>
FROM
FROM
<include refid="tableName"></include> f
WHERE f.ISDELETE = '0'
AND f.CORPINFO_ID = #{CORPINFO_ID}
@ -166,21 +167,21 @@
AND f.PARENTID = #{PARENTID}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
where
SHIFTWORKRULES_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 排班类型1是否使用 -->
<select id="isUseOne" parameterType="pd" resultType="int">
SELECT COUNT(1) FROM SYS_USER WHERE SHIFTDUTYONE = #{SHIFTWORKRULES_ID}

View File

@ -251,6 +251,24 @@
and f.SPECIAL_NUMBER = #{SPECIAL_NUMBER}
</if>
</select>
<select id="nameListAll" parameterType="pd" resultType="pd">
select
concat(f.USERNAME,' ',f.SPECIAL_NUMBER) NAME
from
<include refid="tableName"></include> f
left join SYS_USER u on u.USER_ID = f.USER_ID
left join oa_department dept on dept.DEPARTMENT_ID = u.DEPARTMENT_ID
where f.ISDELETE = '0'
<if test="UNIT_ID != null and UNIT_ID != ''"><!-- 人员类型 -->
and f.UNIT_ID = #{UNIT_ID}
</if>
<if test="endday != null and endday !=''">
and f.VALIDITY_TIME_END <![CDATA[ >= ]]> #{endday}
</if>
order by f.CREATTIME desc
</select>
<!-- 删除-->
<delete id="deleteTem" parameterType="pd">
delete from

View File

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.eightWork.EightWorkCfdMapper">
<!-- &lt;!&ndash;表名 &ndash;&gt;-->
<!-- <sql id="tableName">-->
<!-- BUS_CONFINEDSPACE-->
<!-- </sql>-->
<!-- &lt;!&ndash;数据字典表名 &ndash;&gt;-->
<!-- <sql id="dicTableName">-->
<!-- SYS_DICTIONARIES-->
<!-- </sql>-->
<!-- &lt;!&ndash; 字段 &ndash;&gt;-->
<!-- <sql id="Field">-->
<!-- f.CORPINFO_ID,-->
<!-- f.ISDELETE,-->
<!-- f.CREATTIME,-->
<!-- f.CREATOR,-->
<!-- f.OPERATTIME,-->
<!-- f.OPERATOR,-->
<!-- f.CHECK_NO,-->
<!-- f.WORK_CONTENT,-->
<!-- f.WORK_START_DATE,-->
<!-- f.WORK_END_DATE,-->
<!-- f.CONFIRM_DEPARTMENT_ID,-->
<!-- f.CONFIRM_USER_ID,-->
<!-- f.CONFIRM_USER_SIGNER_PATH,-->
<!-- f.CONFIRM_USER_SIGNER_TIME,-->
<!-- f.AUDIT_DEPARTMENT_ID,-->
<!-- f.AUDIT_USER_ID,-->
<!-- f.AUDIT_USER_SIGNER_PATH,-->
<!-- f.AUDIT_USER_SIGNER_TIME,-->
<!-- f.APPROVE_DEPARTMENT_ID,-->
<!-- f.APPROVE_USER_ID,-->
<!-- f.APPROVE_USER_SIGNER_PATH,-->
<!-- f.APPROVE_USER_SIGNER_TIME,-->
<!-- f.APPLY_STATUS,-->
<!-- f.CONFIRM_CONTENT,-->
<!-- f.AUDIT_CONTENT,-->
<!-- f.APPROVE_CONTENT,-->
<!-- f.OTHER_PROTECTIVE_MEASURES,-->
<!-- f.ACCEPT_DEPARTMENT_ID,-->
<!-- f.ACCEPT_USER_ID,-->
<!-- f.ACCEPT_USER_SIGNER_PATH,-->
<!-- f.ACCEPT_USER_SIGNER_TIME,-->
<!-- f.ACCEPT_CONTENT,-->
<!-- f.APPLY_DEPARTMENT_ID,-->
<!-- f.APPLY_USER_ID,-->
<!-- f.BELONG_CORP,-->
<!-- f.LIMITSPACE_ID,-->
<!-- f.WORK_USER,-->
<!-- f.SPECIAL_WORK,-->
<!-- f.RISK_IDENTIFICATION,-->
<!-- f.MEDIUM_NAME,-->
<!-- f.EDUCATE_USER,-->
<!-- f.ANALYZE_DEPARTMENT_ID,-->
<!-- f.ANALYZE_USER_ID,-->
<!-- f.GUARDIAN_DEPARTMENT_ID,-->
<!-- f.GUARDIAN_USER_ID,-->
<!-- f.GUARDIAN_USER_SIGNER_PATH,-->
<!-- f.GUARDIAN_USER_SIGNER_TIME,-->
<!-- f.GUARDIAN_CONTENT,-->
<!-- f.CONFESS_USER,-->
<!-- f.ACCEPT_CONFESS_USER,-->
<!-- f.GUARDIAN_USER,-->
<!-- f.CONFINEDSPACE_ID,-->
<!-- f.CONFESS_DEPARTMENT_ID,-->
<!-- f.CONFESS_USER_ID,-->
<!-- f.CONFESS_USER_SIGNER_PATH,-->
<!-- f.CONFESS_USER_SIGNER_TIME,-->
<!-- f.ACCEPT_CONFESS_DEPARTMENT_ID,-->
<!-- f.ACCEPT_CONFESS_USER_ID,-->
<!-- f.ACCEPT_CONFESS_USER_SIGNER_PATH,-->
<!-- f.ACCEPT_CONFESS_USER_SIGNER_TIME-->
<!-- </sql>-->
<!-- &lt;!&ndash; 字段用于新增 &ndash;&gt;-->
<!-- <sql id="Field2">-->
<!-- CORPINFO_ID,-->
<!-- ISDELETE,-->
<!-- CREATTIME,-->
<!-- CREATOR,-->
<!-- OPERATTIME,-->
<!-- OPERATOR,-->
<!-- CHECK_NO,-->
<!-- WORK_CONTENT,-->
<!-- WORK_START_DATE,-->
<!-- WORK_END_DATE,-->
<!-- CONFIRM_DEPARTMENT_ID,-->
<!-- CONFIRM_USER_ID,-->
<!-- CONFIRM_USER_SIGNER_PATH,-->
<!-- CONFIRM_USER_SIGNER_TIME,-->
<!-- AUDIT_DEPARTMENT_ID,-->
<!-- AUDIT_USER_ID,-->
<!-- AUDIT_USER_SIGNER_PATH,-->
<!-- AUDIT_USER_SIGNER_TIME,-->
<!-- APPROVE_DEPARTMENT_ID,-->
<!-- APPROVE_USER_ID,-->
<!-- APPROVE_USER_SIGNER_PATH,-->
<!-- APPROVE_USER_SIGNER_TIME,-->
<!-- APPLY_STATUS,-->
<!-- CONFIRM_CONTENT,-->
<!-- AUDIT_CONTENT,-->
<!-- APPROVE_CONTENT,-->
<!-- OTHER_PROTECTIVE_MEASURES,-->
<!-- ACCEPT_DEPARTMENT_ID,-->
<!-- ACCEPT_USER_ID,-->
<!-- ACCEPT_USER_SIGNER_PATH,-->
<!-- ACCEPT_USER_SIGNER_TIME,-->
<!-- ACCEPT_CONTENT,-->
<!-- APPLY_DEPARTMENT_ID,-->
<!-- APPLY_USER_ID,-->
<!-- BELONG_CORP,-->
<!-- LIMITSPACE_ID,-->
<!-- WORK_USER,-->
<!-- SPECIAL_WORK,-->
<!-- RISK_IDENTIFICATION,-->
<!-- MEDIUM_NAME,-->
<!-- EDUCATE_USER,-->
<!-- ANALYZE_DEPARTMENT_ID,-->
<!-- ANALYZE_USER_ID,-->
<!-- GUARDIAN_DEPARTMENT_ID,-->
<!-- GUARDIAN_USER_ID,-->
<!-- GUARDIAN_USER_SIGNER_PATH,-->
<!-- GUARDIAN_USER_SIGNER_TIME,-->
<!-- GUARDIAN_CONTENT,-->
<!-- CONFESS_USER,-->
<!-- ACCEPT_CONFESS_USER,-->
<!-- GUARDIAN_USER,-->
<!-- CONFINEDSPACE_ID,-->
<!-- CONFESS_DEPARTMENT_ID,-->
<!-- CONFESS_USER_ID,-->
<!-- CONFESS_USER_SIGNER_PATH,-->
<!-- CONFESS_USER_SIGNER_TIME,-->
<!-- ACCEPT_CONFESS_DEPARTMENT_ID,-->
<!-- ACCEPT_CONFESS_USER_ID,-->
<!-- ACCEPT_CONFESS_USER_SIGNER_PATH,-->
<!-- ACCEPT_CONFESS_USER_SIGNER_TIME-->
<!-- </sql>-->
<!-- &lt;!&ndash; 字段值 &ndash;&gt;-->
<!-- <sql id="FieldValue">-->
<!-- #{CORPINFO_ID},-->
<!-- #{ISDELETE},-->
<!-- #{CREATTIME},-->
<!-- #{CREATOR},-->
<!-- #{OPERATTIME},-->
<!-- #{OPERATOR},-->
<!-- #{CHECK_NO},-->
<!-- #{WORK_CONTENT},-->
<!-- #{WORK_START_DATE},-->
<!-- #{WORK_END_DATE},-->
<!-- #{CONFIRM_DEPARTMENT_ID},-->
<!-- #{CONFIRM_USER_ID},-->
<!-- #{CONFIRM_USER_SIGNER_PATH},-->
<!-- #{CONFIRM_USER_SIGNER_TIME},-->
<!-- #{AUDIT_DEPARTMENT_ID},-->
<!-- #{AUDIT_USER_ID},-->
<!-- #{AUDIT_USER_SIGNER_PATH},-->
<!-- #{AUDIT_USER_SIGNER_TIME},-->
<!-- #{APPROVE_DEPARTMENT_ID},-->
<!-- #{APPROVE_USER_ID},-->
<!-- #{APPROVE_USER_SIGNER_PATH},-->
<!-- #{APPROVE_USER_SIGNER_TIME},-->
<!-- #{APPLY_STATUS},-->
<!-- #{CONFIRM_CONTENT},-->
<!-- #{AUDIT_CONTENT},-->
<!-- #{APPROVE_CONTENT},-->
<!-- #{OTHER_PROTECTIVE_MEASURES},-->
<!-- #{ACCEPT_DEPARTMENT_ID},-->
<!-- #{ACCEPT_USER_ID},-->
<!-- #{ACCEPT_USER_SIGNER_PATH},-->
<!-- #{ACCEPT_USER_SIGNER_TIME},-->
<!-- #{ACCEPT_CONTENT},-->
<!-- #{APPLY_DEPARTMENT_ID},-->
<!-- #{APPLY_USER_ID},-->
<!-- #{BELONG_CORP},-->
<!-- #{LIMITSPACE_ID},-->
<!-- #{WORK_USER},-->
<!-- #{SPECIAL_WORK},-->
<!-- #{RISK_IDENTIFICATION},-->
<!-- #{MEDIUM_NAME},-->
<!-- #{EDUCATE_USER},-->
<!-- #{ANALYZE_DEPARTMENT_ID},-->
<!-- #{ANALYZE_USER_ID},-->
<!-- #{GUARDIAN_DEPARTMENT_ID},-->
<!-- #{GUARDIAN_USER_ID},-->
<!-- #{GUARDIAN_USER_SIGNER_PATH},-->
<!-- #{GUARDIAN_USER_SIGNER_TIME},-->
<!-- #{GUARDIAN_CONTENT},-->
<!-- #{CONFESS_USER},-->
<!-- #{ACCEPT_CONFESS_USER},-->
<!-- #{GUARDIAN_USER},-->
<!-- #{CONFINEDSPACE_ID},-->
<!-- #{CONFESS_DEPARTMENT_ID},-->
<!-- #{CONFESS_USER_ID},-->
<!-- #{CONFESS_USER_SIGNER_PATH},-->
<!-- #{CONFESS_USER_SIGNER_TIME},-->
<!-- #{ACCEPT_CONFESS_DEPARTMENT_ID},-->
<!-- #{ACCEPT_CONFESS_USER_ID},-->
<!-- #{ACCEPT_CONFESS_USER_SIGNER_PATH},-->
<!-- #{ACCEPT_CONFESS_USER_SIGNER_TIME}-->
<!-- </sql>-->
<!-- 列表 -->
<select id="datalist" parameterType="page" resultType="pd">
select
CONCAT_WS(" ","受限空间作业",f.CHECK_NO) as CHECK_NO,f.CONFINEDSPACE_ID as ID
from
bus_confinedspace_cfd f
where f.ISDELETE = '0' and f.APPLY_STATUS &gt; 0 and f.APPLY_STATUS &lt; 6 and f.CORPINFO_ID = #{pd.CORPINFO_ID}
union
select
CONCAT_WS(" ","盲板抽堵作业",b.CHECK_NO) as CHECK_NO,b.BLINDBOARD_ID as ID
from
bus_blindboard b
where b.CORPINFO_ID = #{pd.CORPINFO_ID} and b.APPLY_STATUS &gt; 0 and b.APPLY_STATUS &lt; 6 and b.ISDELETE = '0'
union
select
CONCAT_WS(" ","临时用电作业",e.CHECK_NO) as CHECK_NO,e.ELECTRICITY_ID as ID
from
bus_electricity e
where e.CORPINFO_ID = #{pd.CORPINFO_ID} and e.APPLY_STATUS &gt; 0 and e.APPLY_STATUS &lt; 5 and e.ISDELETE = '0'
union
select
CONCAT_WS(" ","吊装作业",g.CHECK_NO) as CHECK_NO,g.HOISTING_ID as ID
from
bus_hoisting_cfd g
where g.CORPINFO_ID = #{pd.CORPINFO_ID} and g.APPLY_STATUS &gt; 0 and g.APPLY_STATUS &lt; 6 and g.ISDELETE = '0'
union
select
CONCAT_WS(" ","动土作业",a.CHECK_NO) as CHECK_NO ,a.BREAKGROUND_ID as ID
from
bus_breakground a
where a.CORPINFO_ID = #{pd.CORPINFO_ID} and a.APPLY_STATUS &gt; 0 and a.APPLY_STATUS &lt; 6 and a.ISDELETE = '0'
union
select
CONCAT_WS(" ","断路作业",d.CHECK_NO) as CHECK_NO,d.CUTROAD_ID as ID
from
bus_cutroad d
where d.CORPINFO_ID = #{pd.CORPINFO_ID} and d.APPLY_STATUS &gt; 0 and d.APPLY_STATUS &lt; 6 and d.ISDELETE = '0'
union
select
CONCAT_WS(" ","高处作业",w.CHECK_NO) as CHECK_NO,w.HIGHWORK_ID as ID
from
bus_highwork w
where w.CORPINFO_ID = #{pd.CORPINFO_ID} and w.APPLY_STATUS &gt; 0 and w.APPLY_STATUS &lt; 6 and w.ISDELETE = '0'
union
select
CONCAT_WS(" ","动火作业",h.CHECK_NO) as CHECK_NO,h.HOTWORK_ID as ID
from
bus_hotwork_cfd h
where h.CORPINFO_ID = #{pd.CORPINFO_ID} and h.APPLY_STATUS &gt; 0 and h.APPLY_STATUS &lt; 8 and h.ISDELETE = '0'
</select>
<select id="getWorkUserLabels" parameterType="java.util.List" resultType="pd">
select
if (CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME) is not null ,CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME), '') as label
from
SYS_USER f
left join BUS_CORP_INFO c on f.CORPINFO_ID = c.CORPINFO_ID
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
where f.USER_ID in
<foreach collection="list" open="(" separator="," close=")" item="item" index="index">
#{item}
</foreach>
</select>
</mapper>

View File

@ -179,55 +179,29 @@
left join sys_user u on f.CREATOR = u.USER_ID
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
left join vi_user_all ua on ua.USER_ID = f.OPERATOR
where f.ISDELETE = '0'
left join sys_user uu on uu.USER_ID = #{pd.loginUserId} and uu.DEPARTMENT_ID = fu.USER_ID
where
<if test="pd.STATE != null and pd.STATE != ''">
<if test='pd.STATE == "10"'>
(
</if>
</if> f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
and
( f.JOB_NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or f.HOT_WORK_POSITION LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.STATE != null and pd.STATE != ''">
<choose>
<when test='pd.STATE == "0"'>
and f.CREATOR = #{pd.CREATOR} and f.state !='-4'
</when>
<when test='pd.STATE == "24"'>
and f.STATE in ('1','2','3','4','5','6'
,'7','8','9')
</when>
<when test='pd.STATE == "11"'>
and (f.STATE in ('11','-3'))
</when>
<!-- State为99时查询的是特级动火归档动火表查询已经完成特级动火流程的数据即回归普通动火流程的数据 -->
<when test='pd.STATE == "99"'>
and (
(
f.STATE &gt;= 1
and f.STATE &lt;= 11
)
or f.STATE = '-3'
)
</when>
<when test='pd.STATE == "98"'>
<!-- and (f.STATE &gt;= 1) -->
</when>
<otherwise>
and (f.STATE = #{pd.STATE})
</otherwise>
</choose>
</if>
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''">
and (f.CREATOR = #{pd.CREATOR})
</if>
<if test="pd.HOT_WORK_LEVEL_INDEX != null and pd.HOT_WORK_LEVEL_INDEX != ''">
and (HOT_WORK_LEVEL_INDEX = #{pd.HOT_WORK_LEVEL_INDEX})
</if>
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''">
and (f.CREATOR = #{pd.CREATOR})
</if>
<if test="pd.HOT_WORK_LEVEL_INDEX != null and pd.HOT_WORK_LEVEL_INDEX != ''">
and (HOT_WORK_LEVEL_INDEX = #{pd.HOT_WORK_LEVEL_INDEX})
</if>
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
<choose>
<when test='pd.roleLevel == "0"'>
</when>
@ -300,6 +274,40 @@
<if test="pd.keyApproveUserName != null and pd.keyApproveUserName != ''"><!-- 申请人 -->
and f.HOTWORKAPPLICATION_ID in (select FOREIGN_KEY from bus_hotworkapplicationuser houtUser LEFT JOIN sus_user u on u.user_id = houtUser.USER_ID where u.USERNAME = CONCAT(CONCAT('%', #{pd.keyApproveUserName}),'%') and STATE = '12')
</if>
<if test="pd.STATE != null and pd.STATE != ''">
<choose>
<when test='pd.STATE == "0"'>
and f.CREATOR = #{pd.CREATOR} and f.state !='-4'
</when>
<when test='pd.STATE == "24"'>
and f.STATE in ('1','2','3','4','5','6'
,'7','8','9')
</when>
<when test='pd.STATE == "11"'>
and (f.STATE in ('11','-3'))
</when>
<!-- State为99时查询的是特级动火归档动火表查询已经完成特级动火流程的数据即回归普通动火流程的数据 -->
<when test='pd.STATE == "99"'>
and (
(
f.STATE &gt;= 1
and f.STATE &lt;= 11
)
or f.STATE = '-3'
)
</when>
<when test='pd.STATE == "98"'>
<!-- and (f.STATE &gt;= 1) -->
</when>
<when test='pd.STATE == "10"'>
and (f.STATE != '11')
) or (uu.USER_ID is not null and f.ISDELETE = '0')
</when>
<otherwise>
and (f.STATE = #{pd.STATE})
</otherwise>
</choose>
</if>
group by f.HOTWORKAPPLICATION_ID
ORDER BY f.CREATTIME desc
<!-- ORDER BY f.OPERATTIME desc -->
@ -321,6 +329,9 @@
left join vi_user_all ua on ua.USER_ID = f.OPERATOR
LEFT JOIN bus_hotworkapplicationuser bhu ON bhu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID
LEFT JOIN vi_user_all bhuuser ON bhuuser.USER_ID = bhu.USER_ID
left join bus_hotworkapplicationuser hot on f.HOTWORKAPPLICATION_ID = hot.FOREIGN_KEY and hot.ISDELETE ='0' and hot.state='4'
left join sys_user hu on hot.USER_ID = hu.USER_ID
left join oa_department hd on hd.DEPARTMENT_ID = hu.DEPARTMENT_ID
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
@ -342,6 +353,18 @@
<if test="pd.keyJobNumber != null and pd.keyJobNumber != ''">
and (f.JOB_NUMBER LIKE CONCAT(CONCAT('%', #{pd.keyJobNumber}),'%'))
</if>
<if test="pd.JOB_CONTENT != null and pd.JOB_CONTENT != ''">
and f.JOB_CONTENT LIKE CONCAT(CONCAT('%', #{pd.JOB_CONTENT}),'%')
</if>
<if test="pd.HOT_WORK_POSITION != null and pd.HOT_WORK_POSITION != ''">
and f.HOT_WORK_POSITION LIKE CONCAT(CONCAT('%', #{pd.HOT_WORK_POSITION}),'%')
</if>
<if test="pd.HOT_WORK_LEVEL_INDEX != null and pd.HOT_WORK_LEVEL_INDEX != ''">
and f.HOT_WORK_LEVEL_INDEX = #{pd.HOT_WORK_LEVEL_INDEX}
</if>
<if test="pd.UNIT_LEADER_DEPARTMENT_ID != null and pd.UNIT_LEADER_DEPARTMENT_ID != ''">
and hd.DEPARTMENT_ID = #{pd.UNIT_LEADER_DEPARTMENT_ID}
</if>
<if test="pd.keyState != null and pd.keyState != ''">
and f.STATE = #{pd.keyState}
</if>
@ -541,4 +564,12 @@
GROUP BY HOTWORKAPPLICATION_ID
ORDER BY f.OPERATTIME desc
</select>
<select id="getCountByMyApprovalForDelayedHotWork" parameterType="pd" resultType="pd">
select f.STATE,u.USER_ID,count(distinct HOTWORKAPPLICATION_ID) as count
from bus_hotworkapplication f
left join bus_hotworkapplicationuser fu on fu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID and f.STATE = fu.state
left join sys_user u on u.DEPARTMENT_ID = fu.USER_ID
where u.USER_ID = #{USER_ID} AND fu.ISDELETE = '0' and f.STATE = 10
</select>
</mapper>

View File

@ -319,4 +319,41 @@
</if>
order by CREATTIME
</select>
<select id="listByDepartment" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
,dept.NAME as deptName
,u.NAME as userName
,su.USERNAME as userName2
, u.USERNAME as userPhone
,dept.DEPARTMENT_ID DEPARTMENT_ID
,su.USER_TYPE USER_TYPE
,reuser.NAME as REGULATORY_USER_NAME
,redept.NAME as REGULATORY_DEPT_NAME
from
<include refid="tableName"></include> f
left join SYS_USER u on u.DEPARTMENT_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 `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
where f.ISDELETE = '0'
<if test="hotIds != null and hotIds.size>0"> <!-- 关键词检索 -->
and(f.FOREIGN_KEY in
<foreach item="item" index="index" collection="hotIds" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
<if test="FOREIGN_KEY != null and FOREIGN_KEY != ''"><!-- 关键词检索 -->
and( f.FOREIGN_KEY = #{FOREIGN_KEY})
</if>
<if test="USER_ID != null and USER_ID != ''"><!-- 关键词检索 -->
and( f.USER_ID = (select DEPARTMENT_ID from SYS_USER where USER_ID = #{USER_ID}))
</if>
<if test="STATE != null and STATE != ''"><!-- 关键词检索 -->
and( f.STATE = #{STATE})
</if>
</select>
</mapper>

View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.highriskwork.HotworkAcceptUserCfdMapper">
<!--表名 -->
<sql id="tableName">
BUS_HOTWORK_ACCEPTUSER_CFD
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<sql id="Field">
f.ACCEPT_CONFESS_ID,
f.HOTWORK_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
f.ISSELF,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
ACCEPT_CONFESS_ID,
HOTWORK_ID,
CORPINFO_ID,
ISDELETE,
OPERATTIME,
OPERATOR,
ACCEPT_CONFESS_DEPARTMENT_ID,
ACCEPT_CONFESS_USER_ID,
ACCEPT_CONFESS_USER_SIGNER_PATH,
ACCEPT_CONFESS_USER_SIGNER_TIME,
ISSELF,
ACCEPT_USER_ID,
ACCEPT_USER_SIGNER_PATH,
ACCEPT_USER_SIGNER_TIME,
ACCEPT_DEPARTMENT_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{ACCEPT_CONFESS_ID},
#{HOTWORK_ID},
#{CORPINFO_ID},
#{ISDELETE},
#{OPERATTIME},
#{OPERATOR},
#{ACCEPT_CONFESS_DEPARTMENT_ID},
#{ACCEPT_CONFESS_USER_ID},
#{ACCEPT_CONFESS_USER_SIGNER_PATH},
#{ACCEPT_CONFESS_USER_SIGNER_TIME},
#{ISSELF},
#{ACCEPT_USER_ID},
#{ACCEPT_USER_SIGNER_PATH},
#{ACCEPT_USER_SIGNER_TIME},
#{ACCEPT_DEPARTMENT_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID},
HOTWORK_ID = #{HOTWORK_ID},
CORPINFO_ID = #{CORPINFO_ID},
OPERATTIME = #{OPERATTIME},
OPERATOR = #{OPERATOR},
ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID},
ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID},
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
ISSELF = #{ISSELF}
where
ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.HOTWORK_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID
from
<include refid="tableName"></include> f
where
f.HOTWORK_ID = #{HOTWORK_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_USER_ID = #{ACCEPT_USER_ID}
order by f.ACCEPT_USER_SIGNER_TIME asc
</select>
<select id="findByIds" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.HOTWORK_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME
from
<include refid="tableName"></include> f
where
f.HOTWORK_ID = #{HOTWORK_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}
order by f.ACCEPT_CONFESS_USER_SIGNER_TIME asc
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="ISSELF != null and ISSELF != ''"><!-- 关键词检索 -->
and
f.ISSELF=#{ISSELF}
</if>
<if test="HOTWORK_ID != null and HOTWORK_ID != ''"><!-- 关键词检索 -->
and
f.HOTWORK_ID=#{HOTWORK_ID}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
ACCEPT_CONFESS_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 列表 -->
<select id="listAllByIds" parameterType="String" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
and f.ACCEPT_CONFESS_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.highriskwork.HotworkGasCfdMapper">
<!--表名 -->
<sql id="tableName">
BUS_HOTWORKGAS_CFD
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.HOTWORK_ID,
f.ANALYZE_TIME,
f.ANALYZE_PLACE,
f.ANALYZE_RESULT,
f.ANALYZE_USER,
f.ISDELETE,
f.HOTWORKGAS_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
HOTWORK_ID,
ANALYZE_TIME,
ANALYZE_PLACE,
ANALYZE_RESULT,
ANALYZE_USER,
ISDELETE,
HOTWORKGAS_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{HOTWORK_ID},
#{ANALYZE_TIME},
#{ANALYZE_PLACE},
#{ANALYZE_RESULT},
#{ANALYZE_USER},
#{ISDELETE},
#{HOTWORKGAS_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HOTWORKGAS_ID = #{HOTWORKGAS_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
HOTWORK_ID = #{HOTWORK_ID},
ANALYZE_TIME = #{ANALYZE_TIME},
ANALYZE_PLACE = #{ANALYZE_PLACE},
ANALYZE_RESULT = #{ANALYZE_RESULT},
ANALYZE_USER = #{ANALYZE_USER},
ISDELETE = #{ISDELETE},
HOTWORKGAS_ID = HOTWORKGAS_ID
where
HOTWORKGAS_ID = #{HOTWORKGAS_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HOTWORK_ID = #{HOTWORK_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
<!-- and-->
<!-- (-->
<!-- &lt;!&ndash; 根据需求自己加检索条件-->
<!-- 字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- or-->
<!-- 字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- &ndash;&gt;-->
<!-- )-->
</if>
ORDER BY f.ANALYZE_TIME desc
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.HOTWORK_ID = #{HOTWORK_ID}
ORDER BY f.ANALYZE_TIME desc
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HOTWORKGAS_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.highriskwork.HotworkLogCfdMapper">
<!--表名 -->
<sql id="tableName">
BUS_HOTWORKLOG_CFD
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.HOTWORK_ID,
f.ACTION,
f.CREATTIME,
f.CREATOR,
f.HOTWORKLOG_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
HOTWORK_ID,
ACTION,
CREATTIME,
CREATOR,
HOTWORKLOG_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{HOTWORK_ID},
#{ACTION},
#{CREATTIME},
#{CREATOR},
#{HOTWORKLOG_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HOTWORKLOG_ID = #{HOTWORKLOG_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
HOTWORK_ID = #{HOTWORK_ID},
ACTION = #{ACTION},
CREATTIME = #{CREATTIME},
CREATOR = #{CREATOR},
HOTWORKLOG_ID = HOTWORKLOG_ID
where
HOTWORKLOG_ID = #{HOTWORKLOG_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HOTWORKLOG_ID = #{HOTWORKLOG_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HOTWORKLOG_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.highriskwork.HotworkToMeasuresCfdMapper">
<!--表名 -->
<sql id="tableName">
BUS_HOTWORKTOMEASURES_CFD
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.HOTWORK_ID,
f.BUS_HOTWORK_MEASURES_ID,
f.STATUS,
f.ANSWER1,
f.ANSWER2,
f.ANSWER3,
f.ANSWER4,
f.HOTWORKTOMEASURES_ID,
f.CONFIRM_ID,
f.CONFIRM_NAME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
HOTWORK_ID,
BUS_HOTWORK_MEASURES_ID,
STATUS,
ANSWER1,
ANSWER2,
ANSWER3,
ANSWER4,
HOTWORKTOMEASURES_ID,
CONFIRM_ID,
CONFIRM_NAME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{HOTWORK_ID},
#{BUS_HOTWORK_MEASURES_ID},
#{STATUS},
#{ANSWER1},
#{ANSWER2},
#{ANSWER3},
#{ANSWER4},
#{HOTWORKTOMEASURES_ID},
#{CONFIRM_ID},
#{CONFIRM_NAME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
HOTWORK_ID = #{HOTWORK_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
HOTWORK_ID = #{HOTWORK_ID},
BUS_HOTWORK_MEASURES_ID = #{BUS_HOTWORK_MEASURES_ID},
STATUS = #{STATUS},
ANSWER1 = #{ANSWER1},
ANSWER2 = #{ANSWER2},
ANSWER3 = #{ANSWER3},
ANSWER4 = #{ANSWER4},
HOTWORKTOMEASURES_ID = HOTWORKTOMEASURES_ID,
ICONFIRM_ID = #{CONFIRM_ID},
CONFRM_NAME = #{CONFIRM_NAME}
where
HOTWORKTOMEASURES_ID = #{HOTWORKTOMEASURES_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HOTWORKTOMEASURES_ID = #{HOTWORKTOMEASURES_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HOTWORKTOMEASURES_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.mq.MqErrorMessageLogMapper">
<!--表名 -->
<sql id="tableName">
MQ_MESSAGE_ERROR_LOG
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.MESSAGE_LOG_ID,
f.ERROR_MESSAGE,
f.TIME,
f.TYPE,
f.SOURCE,
f.MESSAGE_ERROR_LOG_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
MESSAGE_LOG_ID,
ERROR_MESSAGE,
TIME,
TYPE,
SOURCE,
MESSAGE_ERROR_LOG_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{MESSAGE_LOG_ID},
#{ERROR_MESSAGE},
#{TIME},
#{TYPE},
#{SOURCE},
#{MESSAGE_ERROR_LOG_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
MESSAGE_LOG_ID = #{MESSAGE_LOG_ID},
ERROR_MESSAGE = #{ERROR_MESSAGE},
TIME = #{TIME},
TYPE = #{TYPE},
SOURCE = #{SOURCE},
MESSAGE_ERROR_LOG_ID = MESSAGE_ERROR_LOG_ID
where
MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
MESSAGE_ERROR_LOG_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.mq.MqMessageLogMapper">
<!--表名 -->
<sql id="tableName">
MQ_MESSAGE_LOG
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.ID,
f.PRODUCER_NAME,
f.MARK,
f.MARK_NAME,
f.MESSAGE,
f.CREATE_TIME,
f.MESSAGE_LOG_ID,
f.TYPE,
f.DIGESTION_FLAG,
f.PLAN_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
ID,
PRODUCER_NAME,
MARK,
MARK_NAME,
MESSAGE,
CREATE_TIME,
MESSAGE_LOG_ID,
TYPE,
DIGESTION_FLAG,
PLAN_TIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{ID},
#{PRODUCER_NAME},
#{MARK},
#{MARK_NAME},
#{MESSAGE},
#{CREATE_TIME},
#{MESSAGE_LOG_ID},
#{TYPE},
#{DIGESTION_FLAG},
#{PLAN_TIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
MESSAGE_LOG_ID = #{MESSAGE_LOG_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ID = #{ID},
PRODUCER_NAME = #{PRODUCER_NAME},
MARK = #{MARK},
MARK_NAME = #{MARK_NAME},
MESSAGE = #{MESSAGE},
CREATE_TIME = #{CREATE_TIME},
TYPE = #{TYPE},
DIGESTION_FLAG = #{DIGESTION_FLAG},
PLAN_TIME = #{PLAN_TIME},
MESSAGE_LOG_ID = MESSAGE_LOG_ID
where
MESSAGE_LOG_ID = #{MESSAGE_LOG_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.MESSAGE_LOG_ID = #{MESSAGE_LOG_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
<!-- 根据需求自己加检索条件
字段1 LIKE '%'+ #{pd.KEYWORDS}+'%'
or
字段2 LIKE '%'+ #{pd.KEYWORDS}+'%'
-->
)
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
delete from
<include refid="tableName"></include>
where
MESSAGE_LOG_ID in
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,225 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.specialoperation.PersonnelManagementCfdMapper">
<!--表名 -->
<sql id="tableName">
BUS_PERSONNELMANAGEMENT_CFD
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.CREATOR,
f.UNITS_ID,
f.PTYPE,
f.JOB_TYPE,
f.OPERATIONITEM,
f.NAME,
f.SEX,
f.CERTIFICATE_NUM,
f.REVIEWTIME,
f.PHONENUM,
f.IDENTITYCARD,
f.LICENSING,
f.VALID_STIME,
f.VALID_ETIME,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.CORPINFO_ID,
f.PERSONNELMANAGEMENT_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
CREATOR,
UNITS_ID,
PTYPE,
JOB_TYPE,
OPERATIONITEM,
NAME,
SEX,
CERTIFICATE_NUM,
REVIEWTIME,
PHONENUM,
IDENTITYCARD,
LICENSING,
VALID_STIME,
VALID_ETIME,
CREATTIME,
OPERATOR,
OPERATTIME,
ISDELETE,
CORPINFO_ID,
PERSONNELMANAGEMENT_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{CREATOR},
#{UNITS_ID},
#{PTYPE},
#{JOB_TYPE},
#{OPERATIONITEM},
#{NAME},
#{SEX},
#{CERTIFICATE_NUM},
#{REVIEWTIME},
#{PHONENUM},
#{IDENTITYCARD},
#{LICENSING},
#{VALID_STIME},
#{VALID_ETIME},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{ISDELETE},
#{CORPINFO_ID},
#{PERSONNELMANAGEMENT_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
PERSONNELMANAGEMENT_ID = #{PERSONNELMANAGEMENT_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
UNITS_ID = #{UNITS_ID},
PTYPE = #{PTYPE},
JOB_TYPE = #{JOB_TYPE},
OPERATIONITEM = #{OPERATIONITEM},
NAME = #{NAME},
SEX = #{SEX},
CERTIFICATE_NUM = #{CERTIFICATE_NUM},
REVIEWTIME = #{REVIEWTIME},
PHONENUM = #{PHONENUM},
IDENTITYCARD = #{IDENTITYCARD},
LICENSING = #{LICENSING},
VALID_STIME = #{VALID_STIME},
VALID_ETIME = #{VALID_ETIME}
where
PERSONNELMANAGEMENT_ID = #{PERSONNELMANAGEMENT_ID}
</update>
<!-- 通过社会信用代码获取数据 -->
<select id="findByCertificate" parameterType="pd" resultType="pd" >
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.CERTIFICATE_NUM = #{CERTIFICATE_NUM}
<if test="PERSONNELMANAGEMENT_ID != null and PERSONNELMANAGEMENT_ID !=''">
and f.PERSONNELMANAGEMENT_ID != #{PERSONNELMANAGEMENT_ID}
</if>
</select>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.PERSONNELMANAGEMENT_ID = #{PERSONNELMANAGEMENT_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.*,
a.NAME as JOBTYPE,
r.UNITS_NAME as UNITS_NAME
from
<include refid="tableName"></include> f
left join sys_dictionaries a on a.DICTIONARIES_ID = f.JOB_TYPE
left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_units r on r.UNITS_ID = f.UNITS_ID
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.CERTIFICATE_NUM LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
or
r.UNITS_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.JOB_TYPE != null and pd.JOB_TYPE !=''">
and f.JOB_TYPE = #{pd.JOB_TYPE}
</if>
<if test="pd.PTYPE != null and pd.PTYPE !=''">
and f.PTYPE = #{pd.PTYPE}
</if>
<if test="pd.CORPINFO_ID != null and pd.ORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
ORDER BY f.OPERATTIME DESC
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
<if test="UNITS_ID != null and UNITS_ID !=''">
and f.UNITS_ID = #{UNITS_ID}
</if>
</select>
<select id="namelist" parameterType="pd" resultType="pd">
select
concat(f.NAME,' ',f.CERTIFICATE_NUM) NAME
from
<include refid="tableName"></include> f
left join sys_dictionaries a on a.DICTIONARIES_ID = f.JOB_TYPE
left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID
left join bus_units_cfd r on r.UNITS_ID = f.UNITS_ID
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and ORPINFO_ID != ''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
ORDER BY f.OPERATTIME DESC
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
PERSONNELMANAGEMENT_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -550,4 +550,33 @@
</foreach>
</if>
</select>
<select id="getInfo" resultType="com.zcloud.entity.PageData">
select * from vi_department_all where DEPARTMENT_ID = #{DEPARTMENT_ID}
</select>
<select id="listTreeManageAndCorpHasOrder" resultType="com.zcloud.entity.PageData">
SELECT
*
FROM
(
SELECT
DEP_ORDER,
DEPARTMENT_ID id,
NAME name,
PARENT_ID pId,
f.CORPINFO_ID,
c.COR_ORDER
FROM
OA_DEPARTMENT f
LEFT JOIN bus_corp_info c ON f.CORPINFO_ID = c.CORPINFO_ID
WHERE
c.ISDELETE = '0'
ORDER BY
name,
DEP_ORDER ASC
) t
ORDER BY
( COR_ORDER + 0 ) ASC,
DEP_ORDER ASC,
name
</select>
</mapper>

View File

@ -755,6 +755,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by u.DEPARTMENT_ID asc, u.SORT asc,u.LAST_LOGIN desc
</select>
<!--获取全部用户信息列表-->
<select id="getAllUserList" resultType="com.zcloud.entity.PageData">
select
f.USER_ID as value,
f.USER_ID as id,
f.USER_ID,
f.USERNAME,
f.NAME,
f.DEPARTMENT_ID,
f.CORPINFO_ID,
f.empNo,
f.cardNo,
d.NAME as DEPARTMENT_NAME,
c.CORP_NAME,
if (CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME) is not null,CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME),'') as label
from
<include refid="tableName"></include> f
left join OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
where f.ISDELETE = '0'
AND f.USERNAME != 'admin'
and f.USERNAME is not null
and TRIM(f.USERNAME) != ''
and f.`NAME` is not null
and TRIM(f.`NAME`) != ''
and TRIM(if (CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME) is not null,CONCAT(c.CORP_NAME,'-',d.NAME,'-',f.NAME),'')) != ''
order by CONVERT( f.NAME USING gbk )
</select>
<!-- 通过企业ID获取用户信息 -->
<select id="getDepartmentId" parameterType="String" resultMap="userAndRoleResultMap">
select
@ -1287,4 +1316,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</select>
<select id="getUserInfo" resultType="com.zcloud.entity.PageData">
select * from vi_user_all
<if test="USER_ID != null and USER_ID != ''">
where USER_ID = #{USER_ID}
</if>
<if test="USER_IDS != null and USER_IDS != ''">
where USER_ID in
<foreach item="item" index="index" collection="USER_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>

Some files were not shown because too many files have changed in this diff Show More