From 2856aa062615ab0470329f73138a7916570b515f Mon Sep 17 00:00:00 2001 From: limingyu Date: Thu, 7 Dec 2023 10:30:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=9B=BE=E7=89=87=E5=92=8C=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/LoginController.java | 14 +++++ .../datasource/system/CorpPathMapper.java | 13 ++++ .../service/system/CorpPathService.java | 25 ++++++++ .../system/impl/CorpPathServiceImpl.java | 60 +++++++++++++++++++ .../datasource/system/CorpPathMapper.xml | 53 ++++++++++++++++ 5 files changed, 165 insertions(+) create mode 100644 src/main/java/com/zcloud/mapper/datasource/system/CorpPathMapper.java create mode 100644 src/main/java/com/zcloud/service/system/CorpPathService.java create mode 100644 src/main/java/com/zcloud/service/system/impl/CorpPathServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/system/CorpPathMapper.xml diff --git a/src/main/java/com/zcloud/controller/system/LoginController.java b/src/main/java/com/zcloud/controller/system/LoginController.java index d94ab3e4..9b09aaef 100644 --- a/src/main/java/com/zcloud/controller/system/LoginController.java +++ b/src/main/java/com/zcloud/controller/system/LoginController.java @@ -71,6 +71,9 @@ public class LoginController extends BaseController { @Autowired private PhotoService photoService; + @Autowired + private CorpPathService corpPathService; + /** * 请求登录验证用户接口 * @@ -253,6 +256,17 @@ public class LoginController extends BaseController { session.setAttribute(Const.ISSUPERVISE, dpd.getString("ISSUPERVISE")); //把当前用户放入session FHLOG.save(USERNAME, "成功登录系统", ip); //记录日志 + + //查询该用户或企业的图片和后端地址 + if (!Tools.isEmpty(pd.getString("CORPINFO_ID")) && !pd.getString("CORPINFO_ID").equals("1")) { + PageData pathData = corpPathService.getCorpPathByCorpId(pd); + map.put("picPath",pathData.getString("PIC_PATH")); + map.put("backEndPath", pathData.getString("BACK_END_PATH")); + } else { + PageData pathData = corpPathService.getCorpPathByPersonInfo(pd); + map.put("picPath", pathData.getString("PIC_PATH")); + map.put("backEndPath", pathData.getString("BACK_END_PATH")); + } } } else { token.clear(); diff --git a/src/main/java/com/zcloud/mapper/datasource/system/CorpPathMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/CorpPathMapper.java new file mode 100644 index 00000000..cba8a7f9 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/system/CorpPathMapper.java @@ -0,0 +1,13 @@ +package com.zcloud.mapper.datasource.system; + +import com.zcloud.entity.PageData; + +/** + * 企业图片地址、后端地址访问表 + */ +public interface CorpPathMapper { + + PageData getCorpPathByCorpId(PageData pd); + + PageData getCorpPathByPersonInfo(PageData pd); +} diff --git a/src/main/java/com/zcloud/service/system/CorpPathService.java b/src/main/java/com/zcloud/service/system/CorpPathService.java new file mode 100644 index 00000000..11abaa48 --- /dev/null +++ b/src/main/java/com/zcloud/service/system/CorpPathService.java @@ -0,0 +1,25 @@ +package com.zcloud.service.system; + +import com.zcloud.entity.PageData; + +/** + * 企业图片地址、后端地址访问表 + */ +public interface CorpPathService { + + /** + * 根据企业id获取企业图片、后端路径访问地址 + * @param pd + * @return + * @throws Exception + */ + PageData getCorpPathByCorpId(PageData pd) throws Exception; + + /** + * 根据人员信息获取对应企业图片、后端路径访问地址 + * @param pd + * @return + * @throws Exception + */ + PageData getCorpPathByPersonInfo(PageData pd) throws Exception; +} diff --git a/src/main/java/com/zcloud/service/system/impl/CorpPathServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/CorpPathServiceImpl.java new file mode 100644 index 00000000..10c7e473 --- /dev/null +++ b/src/main/java/com/zcloud/service/system/impl/CorpPathServiceImpl.java @@ -0,0 +1,60 @@ +package com.zcloud.service.system.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.system.CorpPathMapper; +import com.zcloud.service.system.CorpPathService; +import com.zcloud.util.Tools; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +/** + * 企业图片地址、后端地址访问表 + */ +@Service +public class CorpPathServiceImpl implements CorpPathService { + @Autowired + private CorpPathMapper corpPathMapper; + + @Value("${corp.default.pic-path}") + private String defaultPicPath; + + @Value("${corp.default.back-end-path}") + private String defaultBackEndPath; + + /** + * 根据企业id获取企业图片、后端路径访问地址 + * @param pd + * @return + * @throws Exception + */ + @Override + public PageData getCorpPathByCorpId(PageData pd) throws Exception { + PageData data = corpPathMapper.getCorpPathByCorpId(pd); + if (Tools.isEmpty(data)) { + PageData result = new PageData(); + result.put("PIC_PATH",defaultPicPath); + result.put("BACK_END_PATH", defaultBackEndPath); + return result; + } + return data; + } + + /** + * 根据人员信息获取企业图片、后端路径访问地址 + * @param pd + * @return + * @throws Exception + */ + @Override + public PageData getCorpPathByPersonInfo(PageData pd) throws Exception { + PageData data = corpPathMapper.getCorpPathByPersonInfo(pd); + if ("1".equals(pd.getString("USER_ID")) || Tools.isEmpty(data)) { + PageData result = new PageData(); + result.put("PIC_PATH",defaultPicPath); + result.put("BACK_END_PATH", defaultBackEndPath); + return result; + } + return data; + } +} diff --git a/src/main/resources/mybatis/datasource/system/CorpPathMapper.xml b/src/main/resources/mybatis/datasource/system/CorpPathMapper.xml new file mode 100644 index 00000000..e19a4a9d --- /dev/null +++ b/src/main/resources/mybatis/datasource/system/CorpPathMapper.xml @@ -0,0 +1,53 @@ + + + + + + + SYS_CORP_PATH + + + + + CORP_PATH_ID, + CORPINFO_ID, + PIC_PATH, + BACK_END_PATH + + + + + f.CORP_PATH_ID, + f.CORPINFO_ID, + f.PIC_PATH, + f.BACK_END_PATH + + + + + #{CORP_PATH_ID}, + #{CORPINFO_ID}, + #{PIC_PATH}, + #{BACK_END_PATH} + + + + + + + + From cd71673e7c4d9fd66f8e1110c289d5da7115b698 Mon Sep 17 00:00:00 2001 From: limingyu Date: Thu, 7 Dec 2023 13:50:02 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=9B=BE=E7=89=87=E5=92=8C=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=802?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.properties | 3 +++ src/main/resources/application-local.properties | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 5bb49ecc..33812d34 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -61,6 +61,9 @@ spring.main.banner-mode=off # #qa-regulatory-gwj.api.url=http://192.168.0.79:8008 +corp.default.pic-path=https://qgqy.qhdsafety.com/file/ +corp.default.back-end-path=http://192.168.151.57:8092/ + preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/ qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/ #????? diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 13026235..3862ddd4 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -64,6 +64,9 @@ spring.main.banner-mode=off preventionxgf.api.url=http://192.168.0.79:8088/ qa-regulatory-gwj.api.url=http://192.168.0.79:8092/ +corp.default.pic-path=https://qgqy.qhdsafety.com/file/ +corp.default.back-end-path=http://192.168.151.57:8092/ + #????? smb.host=39.103.224.166 smb.port=22 From 6937054d440079d8164f5251210bf30bea243716 Mon Sep 17 00:00:00 2001 From: limingyu Date: Fri, 15 Dec 2023 13:59:11 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=B8=80=E5=85=AC=E5=8F=B8=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=AB=AF=E9=A9=BE=E9=A9=B6=E8=88=B1=E5=8D=B1=E9=99=A9?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=BB=9F=E8=AE=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/HomeHighRiskWorkController.java | 22 +- .../highriskwork/HighWorkMapper.java | 12 + .../service/highriskwork/HighWorkService.java | 24 + .../impl/HighWorkServiceImpl.java | 21 + .../highriskwork/HighWorkMapper.xml | 515 ++++++++++++++++++ 5 files changed, 591 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zcloud/controller/home/HomeHighRiskWorkController.java b/src/main/java/com/zcloud/controller/home/HomeHighRiskWorkController.java index c30e063c..71ddef6f 100644 --- a/src/main/java/com/zcloud/controller/home/HomeHighRiskWorkController.java +++ b/src/main/java/com/zcloud/controller/home/HomeHighRiskWorkController.java @@ -11,6 +11,7 @@ import com.zcloud.service.system.DepartmentService; import com.zcloud.service.system.DictionariesService; import com.zcloud.service.system.UsersService; import com.zcloud.util.Jurisdiction; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -48,7 +49,12 @@ public class HomeHighRiskWorkController extends BaseController { /*风险管控 数据统计*/ //获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE]) - PageData data = highworkService.statisticsHighRiskWorkByState(pd); + PageData data = new PageData(); + if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { //一公司 + data = highworkService.statisticsHighRiskWorkByStateFirst(pd); + } else { + data = highworkService.statisticsHighRiskWorkByState(pd); + } map.put("pd", data); map.put("result", errInfo); @@ -70,7 +76,12 @@ public class HomeHighRiskWorkController extends BaseController { pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业 page.setPd(pd); - List varList = highworkService.listHighRiskWork(page); + List varList = new ArrayList<>(); + if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { // 一公司 + varList = highworkService.listHighRiskWorkFirst(page); + } else { + varList = highworkService.listHighRiskWork(page); + } map.put("varList", varList); map.put("result", errInfo); return map; @@ -93,7 +104,12 @@ public class HomeHighRiskWorkController extends BaseController { Map chartData = new HashMap(); List legendData = Arrays.asList(new String[]{"动火作业", "临时用电作业", "盲板作业", "高处作业", "有限空间作业", "吊装作业"}); - List workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数 + List workChart = new ArrayList<>(); + if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6",pd.getString("CORPINFO_ID"))) { //一公司 + workChart = highworkService.statisticsAllHighRiskWorkFirst(pd); //统计高危作业里各作业数 + } else { + workChart = highworkService.statisticsAllHighRiskWork(pd); //统计高危作业里各作业数 + } List seriesData = new ArrayList(); for (int i = 0; i < legendData.size(); i++) { PageData pie = new PageData(); diff --git a/src/main/java/com/zcloud/mapper/datasource/highriskwork/HighWorkMapper.java b/src/main/java/com/zcloud/mapper/datasource/highriskwork/HighWorkMapper.java index 092cbf84..7cc81fa2 100644 --- a/src/main/java/com/zcloud/mapper/datasource/highriskwork/HighWorkMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/highriskwork/HighWorkMapper.java @@ -100,5 +100,17 @@ public interface HighWorkMapper{ List listAllHighRiskWorkLocation(PageData pd); void editacceptancapplication(PageData pd); + + List listHighRiskWorkFirst(Page page); + + PageData statisticsHighRiskWorkByStateFirst(PageData pd); + + /** + * 统计高危作业里各作业数(一公司) + * @param pd + * @return + * @throws Exception + */ + List statisticsAllHighRiskWorkFirst(PageData pd); } diff --git a/src/main/java/com/zcloud/service/highriskwork/HighWorkService.java b/src/main/java/com/zcloud/service/highriskwork/HighWorkService.java index efb6cfe7..635369d9 100644 --- a/src/main/java/com/zcloud/service/highriskwork/HighWorkService.java +++ b/src/main/java/com/zcloud/service/highriskwork/HighWorkService.java @@ -103,5 +103,29 @@ public interface HighWorkService{ * @throws Exception */ List listAllHighRiskWorkLocation(PageData pd)throws Exception; + + /** + * 作业实时情况展示(一公司) + * @param page + * @return + * @throws Exception + */ + List listHighRiskWorkFirst(Page page)throws Exception; + + /** + * 获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE])(一公司) + * @param pd + * @return + * @throws Exception + */ + PageData statisticsHighRiskWorkByStateFirst(PageData pd)throws Exception; + + /** + * 统计高危作业里各作业数(一公司) + * @param pd + * @return + * @throws Exception + */ + List statisticsAllHighRiskWorkFirst(PageData pd)throws Exception; } diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HighWorkServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HighWorkServiceImpl.java index 15fd4ce5..11068f77 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HighWorkServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HighWorkServiceImpl.java @@ -176,5 +176,26 @@ public class HighWorkServiceImpl implements HighWorkService { public List listAllHighRiskWorkLocation(PageData pd) throws Exception { return highworkMapper.listAllHighRiskWorkLocation(pd); } + + @Override + public List listHighRiskWorkFirst(Page page) throws Exception { + return highworkMapper.listHighRiskWorkFirst(page); + } + + @Override + public PageData statisticsHighRiskWorkByStateFirst(PageData pd) throws Exception { + return highworkMapper.statisticsHighRiskWorkByStateFirst(pd); + } + + /** + * 统计高危作业里各作业数(一公司) + * @param pd + * @return + * @throws Exception + */ + @Override + public List statisticsAllHighRiskWorkFirst(PageData pd) throws Exception { + return highworkMapper.statisticsAllHighRiskWorkFirst(pd); + } } diff --git a/src/main/resources/mybatis/datasource/highriskwork/HighWorkMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HighWorkMapper.xml index 8851147b..aa62c068 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HighWorkMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HighWorkMapper.xml @@ -877,4 +877,519 @@ ) f + + + + + + + From 6997c26a5f5ecec0d4741d0db00f321d07dafd02 Mon Sep 17 00:00:00 2001 From: limingyu Date: Fri, 15 Dec 2023 15:09:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=B8=80=E5=85=AC=E5=8F=B8=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=AB=AF=E9=A9=BE=E9=A9=B6=E8=88=B1=E5=8D=B1=E9=99=A9?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=BB=9F=E8=AE=A1=E6=98=BE=E7=A4=BA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ppHotWorkApplicationDelayedController.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationDelayedController.java b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationDelayedController.java index 548935fb..81a82b4e 100644 --- a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationDelayedController.java +++ b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationDelayedController.java @@ -69,38 +69,38 @@ public class AppHotWorkApplicationDelayedController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - Image srcImg = ImageIO.read(file.getInputStream()); - //获取图片的宽 - int srcImgWidth = srcImg.getWidth(null); - //获取图片的高 - int srcImgHeight = srcImg.getHeight(null); - - BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB); - // 加水印 - //创建画笔 - Graphics2D g = bufImg.createGraphics(); - //srcImg 为上面获取到的原始图片的图片对象 - g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null); - //根据图片的背景设置水印颜色 - g.setColor(new Color(255,255,255,128)); - //设置字体 画笔字体样式为微软雅黑,加粗,文字大小为60pt - g.setFont(new Font("微软雅黑", Font.BOLD, 20)); - //设置水印的坐标 - int x=(srcImgWidth - WaterMarkUtil.getWatermarkLength(DateUtil.date2Str(new Date()), g)) / 2; - int y=srcImgHeight / 2; - //画出水印 第一个参数是水印内容,第二个参数是x轴坐标,第三个参数是y轴坐标 - g.drawString(DateUtil.date2Str(new Date()), x, y); - g.dispose(); - //将加完水印的图片暂存到内存中 - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ImageIO.write(bufImg, suffixName, bos); - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - +// Image srcImg = ImageIO.read(file.getInputStream()); +// //获取图片的宽 +// int srcImgWidth = srcImg.getWidth(null); +// //获取图片的高 +// int srcImgHeight = srcImg.getHeight(null); +// +// BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB); +// // 加水印 +// //创建画笔 +// Graphics2D g = bufImg.createGraphics(); +// //srcImg 为上面获取到的原始图片的图片对象 +// g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null); +// //根据图片的背景设置水印颜色 +// g.setColor(new Color(255,255,255,128)); +// //设置字体 画笔字体样式为微软雅黑,加粗,文字大小为60pt +// g.setFont(new Font("微软雅黑", Font.BOLD, 20)); +// //设置水印的坐标 +// int x=(srcImgWidth - WaterMarkUtil.getWatermarkLength(DateUtil.date2Str(new Date()), g)) / 2; +// int y=srcImgHeight / 2; +// //画出水印 第一个参数是水印内容,第二个参数是x轴坐标,第三个参数是y轴坐标 +// g.drawString(DateUtil.date2Str(new Date()), x, y); +// g.dispose(); +// //将加完水印的图片暂存到内存中 +// ByteArrayOutputStream bos = new ByteArrayOutputStream(); +// ImageIO.write(bufImg, suffixName, bos); +// ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); +// String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); -// Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile); - //通过流的方式上传文件 - Smb.sshSftpForInput(bis, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile); + Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile); +// 通过流的方式上传文件 +// Smb.sshSftpForInput(bis, fileName, Const.FILEPATHYHTP + corpInfoId + "/" + ffile); pd.put("FILEPATH",Const.FILEPATHYHTP + corpInfoId + "/" + ffile + "/" + fileName); } hotworkapplicationdelayedService.save(pd); From 990ea8814d03c0dee349b88f406c2441693cf8b6 Mon Sep 17 00:00:00 2001 From: limingyu Date: Tue, 19 Dec 2023 18:00:49 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A8=E7=81=AB?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=95=B0=E6=8D=AE=E5=BB=B6=E6=97=B6=E7=9B=91?= =?UTF-8?q?=E7=81=AB=E5=AE=A1=E6=A0=B8=E4=BA=BA=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppHotWorkApplicationController.java | 13 +++++++++---- .../highriskwork/HotWorkApplicationUserMapper.xml | 12 ++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java index 275ae9bd..f696040b 100644 --- a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java +++ b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotWorkApplicationController.java @@ -827,11 +827,16 @@ public class AppHotWorkApplicationController extends BaseController { return map; } } else { - hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们 + //先判断延时监火是否为选择部门 + hotUserList = hotWorkApplicationUserService.listByDepartment(hotUserPd); // 找到这一笔的审批人们(选择部门) if (hotUserList.size() < 1) { - map.put("result", "error"); - map.put("msg", "获取审批人意见失败!请联系管理员"); - return map; + //如果查询部门查不到就根据人查询 + hotUserList = hotWorkApplicationUserService.listAll(hotUserPd); // 找到这一笔的审批人(选择人) + if (hotUserList.size() != 1) { + map.put("result", "error"); + map.put("msg", "获取审批人意见失败!请联系管理员"); + return map; + } } } diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml index c717f435..9ba0ada9 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationUserMapper.xml @@ -134,21 +134,23 @@