From d59a9f1dfe20d4739f109ed433107940a3840ca9 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Mon, 18 Dec 2023 10:25:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=87=8D=E7=82=B9=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppKeyProjectsController.java | 34 ++++ .../dsno2/keyProjects/OutSourcedMapper.java | 7 + .../keyProjects/OutSourcedService.java | 7 + .../impl/OutSourcedServiceImpl.java | 5 + .../keyProjects/KeyprojectHiddenMapper.xml | 2 + .../dsno2/keyProjects/OutSourcedMapper.xml | 152 +++++++++++++++--- 6 files changed, 181 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java index 3de397ac..ef4c4627 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java @@ -156,4 +156,38 @@ public class AppKeyProjectsController extends BaseController { map.put("result", errInfo); return map; } + + + /** 隐患列表 查询进行中的重点工程以及排序 + * @throws Exception + */ + @RequestMapping(value="/listHiddenOutsourced") + @ResponseBody + public Object listHiddenOutsourced(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + String UserId = pd.getString("UserId"); + if(!StringUtils.equals("1",UserId)){ + String CORPINFO_ID = pd.getString("CORPINFO_ID"); +// -- 河港机械 河港港工 河港检测 + if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676") + &&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&& + !StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5") + &&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){ + pd.put("DeptId",outsourcedService.getDeptId(UserId)); + pd.put("UserId",UserId); + + } + } + page.setPd(pd); + List varList = outsourcedService.listHiddenOutsourced(page); //列出OutSourced列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java index 569023c7..b90f812a 100644 --- a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java +++ b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java @@ -75,5 +75,12 @@ public interface OutSourcedMapper{ PageData jieshuOutSourced(PageData pd); void updateState(PageData pd); + + /** 重点工程隐患 列表 + * @param page + * @throws Exception + */ + List hiddenOutsourcedlistPage(Page page); + } diff --git a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java index bf05b77d..ac3cfe77 100644 --- a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java +++ b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java @@ -76,5 +76,12 @@ public interface OutSourcedService{ PageData jieshuOutSourced(PageData pd); void updateState(PageData pd); + + /** 查询隐患的重点工程列表 排序规则不一致 + * @param page + * @throws Exception + */ + public List listHiddenOutsourced(Page page)throws Exception; + } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java index af090e91..1431e8e7 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java @@ -106,5 +106,10 @@ public class OutSourcedServiceImpl implements OutSourcedService { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); outsourcedMapper.updateState(pd); } + + @Override + public List listHiddenOutsourced(Page page) throws Exception { + return outsourcedMapper.hiddenOutsourcedlistPage(page); + } } diff --git a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml index 5030e522..ee2e4acf 100644 --- a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml @@ -1533,6 +1533,7 @@ f.ISDELETE = '0' AND f.SOURCE IN ( '4', '5', '1' ) AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL + AND (bo.ISDELETE = '0' or boai.ISDELETE = '0') and f.ISPUNISH is null and ( bo.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{loginUserId} ), '%' ) @@ -1554,6 +1555,7 @@ AND f.STATE = '2' AND f.CREATOR = #{loginUserId} AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL + AND (bo.ISDELETE = '0' or boai.ISDELETE = '0') ) t)CF_COUNT from `qa-gwj-regulatory`.bus_aiwarning f where f.ISDELETE = '0' diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 7f2e8852..05eb3bb8 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -295,16 +295,13 @@ b.UNITS_NAME as UNITS_NAME, isu.NAME as AIWARNING_PEOPLE, pci.NAME Q_COMPETENT_DEPT_NAME, - (select count(1) from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.OUTSOURCED_ID = f.OUTSOURCED_ID) as CHECK_COUNT, + cc.co as CHECK_COUNT, (select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT, (select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT, (SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT, vua.NAME OUTSOURCED_CREATOR_NAME, ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME, p.`NAME` as UNITS_PIC_NAME - - ,ifnull(dbsl.co,0) as co - from f left join bus_units b using (UNITS_ID) @@ -315,25 +312,7 @@ LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC - -- 这个判断是隐患管理排序以及隐患管理的角标 - - left join (SELECT t.OUTSOURCED_ID,COUNT( distinct t.HIDDEN_ID) co FROM ( - SELECT - f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID - FROM - `qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f - LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID - LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID - LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID - LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID - WHERE - f.ISDELETE = '0' - AND f.SOURCE IN ( '4', '5', '1' ) - AND f.STATE = '2' - AND f.CREATOR = #{pd.UserId} - AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL - ) t GROUP BY t.OUTSOURCED_ID ) dbsl on dbsl.OUTSOURCED_ID = f.OUTSOURCED_ID - + LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID where f.ISDELETE = '0' and @@ -396,9 +375,7 @@ ) ORDER BY - - dbsl.co DESC, - + cc.co DESC, f.OPERATTIME DESC @@ -697,4 +674,127 @@ where OUTSOURCED_ID = #{OUTSOURCED_ID} + + + + From 63d831eba934a409b6cae9371ff2150304507cf7 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Mon, 18 Dec 2023 14:23:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../keyProjects/KeyprojectHiddenMapper.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml index ee2e4acf..022c4347 100644 --- a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml @@ -1556,7 +1556,20 @@ AND f.CREATOR = #{loginUserId} AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL AND (bo.ISDELETE = '0' or boai.ISDELETE = '0') - ) t)CF_COUNT + ) t)CF_COUNT, + (SELECT + COUNT( DISTINCT t.OUTSOURCED_ID ) +FROM + ( + SELECT + b.OUTSOURCED_ID + FROM + `qa-gwj-regulatory`.BUS_OUTSOURCED b + WHERE + b.ISDELETE = '0' + AND ( b.STATE = '-1' OR b.STATE = '-2' ) + AND b.CREATOR = #{loginUserId} + ) t) GC_COUNT from `qa-gwj-regulatory`.bus_aiwarning f where f.ISDELETE = '0' and f.STATUS = 0 From 07b7e772aa55cfcd47ba63a1fdf1b5d1778af26f Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 19 Dec 2023 11:33:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8B=86=E5=88=86=20?= =?UTF-8?q?=E5=B9=B6=E4=B8=94app=E6=92=AD=E6=94=BE=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppKeyProjectsController.java | 93 ++++++++++++++++ .../dsno2/keyProjects/OutSourcedMapper.java | 8 ++ .../dsno2/keyProjects/VideoManagerMapper.java | 2 + .../keyProjects/OutSourcedService.java | 9 ++ .../keyProjects/VideoManagerService.java | 2 + .../impl/OutSourcedServiceImpl.java | 5 + .../impl/VideoManagerServiceImpl.java | 5 + .../dsno2/keyProjects/OutSourcedMapper.xml | 104 ++++++++++++++++++ .../dsno2/keyProjects/VideoManagerMapper.xml | 19 ++++ 9 files changed, 247 insertions(+) diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java index ef4c4627..cd435f83 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyProjectsController.java @@ -6,6 +6,7 @@ import com.zcloud.entity.PageData; import com.zcloud.service.keyProjects.OutSourcedService; import com.zcloud.service.keyProjects.PersonnelManagementService; import com.zcloud.service.keyProjects.UnitsService; +import com.zcloud.service.keyProjects.VideoManagerService; import com.zcloud.service.system.DictionariesService; import com.zcloud.util.Jurisdiction; import com.zcloud.util.Tools; @@ -38,6 +39,9 @@ public class AppKeyProjectsController extends BaseController { @Autowired private PersonnelManagementService personnelmanagementService; + @Autowired + private VideoManagerService videomanagerService; + /**列表 * @throws Exception */ @@ -190,4 +194,93 @@ public class AppKeyProjectsController extends BaseController { map.put("result", errInfo); return map; } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/videomanagerList") + @ResponseBody + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + page.setPd(pd); + List varList = videomanagerService.listApp(page); //列出VideoManager列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/getOutsourced") + @ResponseBody + public Object getOutsourced() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = outsourcedService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /** 修改工程状态 + * @param + * @throws Exception + */ + @RequestMapping(value="/updateState") + @ResponseBody + public Object updateState() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + outsourcedService.updateState(pd); //获取同时绑定的重点工程信息如果大于1表示还有其他重点工程 + map.put("result", errInfo); + return map; + } + + /**列表 + * @throws Exception + */ + @RequestMapping(value="/outSouceslistPage") + @ResponseBody + public Object outSouceslistPage(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + String UserId = pd.getString("UserId"); + if(!StringUtils.equals("1",UserId)){ + String CORPINFO_ID = pd.getString("CORPINFO_ID"); +// -- 河港机械 河港港工 河港检测 + if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676") + &&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&& + !StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5") + &&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){ + pd.put("DeptId",outsourcedService.getDeptId(UserId)); + pd.put("UserId",UserId); + + } + } + page.setPd(pd); + List varList = outsourcedService.outSouceslistPage(page); //列出OutSourced列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + + } diff --git a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java index b90f812a..931dc169 100644 --- a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java +++ b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java @@ -82,5 +82,13 @@ public interface OutSourcedMapper{ */ List hiddenOutsourcedlistPage(Page page); + /** + * 重点工程管理列表 + * @param page + * @return + */ + List outSouceslistPage(Page page); + + } diff --git a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/VideoManagerMapper.java b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/VideoManagerMapper.java index bce67b13..8215607b 100644 --- a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/VideoManagerMapper.java +++ b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/VideoManagerMapper.java @@ -75,5 +75,7 @@ public interface VideoManagerMapper { void editByResourcesId(PageData pd); void updateAiByOUTSOURCED_ID(PageData pd); + + List dataApplistPage(Page page); } diff --git a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java index ac3cfe77..e575f688 100644 --- a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java +++ b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java @@ -83,5 +83,14 @@ public interface OutSourcedService{ */ public List listHiddenOutsourced(Page page)throws Exception; + /** + * 重点工程管理列表APP + * @param page + * @return + * @throws Exception + */ + public List outSouceslistPage(Page page)throws Exception; + + } diff --git a/src/main/java/com/zcloud/service/keyProjects/VideoManagerService.java b/src/main/java/com/zcloud/service/keyProjects/VideoManagerService.java index aa472aa9..4b7c0f25 100644 --- a/src/main/java/com/zcloud/service/keyProjects/VideoManagerService.java +++ b/src/main/java/com/zcloud/service/keyProjects/VideoManagerService.java @@ -73,5 +73,7 @@ public interface VideoManagerService { void updateAiByOUTSOURCED_ID(PageData pd); + + List listApp(Page page); } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java index 1431e8e7..a4e51674 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java @@ -111,5 +111,10 @@ public class OutSourcedServiceImpl implements OutSourcedService { public List listHiddenOutsourced(Page page) throws Exception { return outsourcedMapper.hiddenOutsourcedlistPage(page); } + + @Override + public List outSouceslistPage(Page page) throws Exception { + return outsourcedMapper.outSouceslistPage(page); + } } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/VideoManagerServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/VideoManagerServiceImpl.java index af6a8611..b0dfdba5 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/VideoManagerServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/VideoManagerServiceImpl.java @@ -121,5 +121,10 @@ public class VideoManagerServiceImpl implements VideoManagerService { public void updateAiByOUTSOURCED_ID(PageData pd) { videomanagerMapper.updateAiByOUTSOURCED_ID(pd); } + + @Override + public List listApp(Page page) { + return videomanagerMapper.dataApplistPage(page); + } } diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 05eb3bb8..963cb222 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -797,4 +797,108 @@ dbsl.co DESC, f.OPERATTIME DESC + + + diff --git a/src/main/resources/mybatis/dsno2/keyProjects/VideoManagerMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/VideoManagerMapper.xml index fb13f861..b6cefcf0 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/VideoManagerMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/VideoManagerMapper.xml @@ -291,4 +291,23 @@ where OUTSOURCED_ID = #{OUTSOURCED_ID} + + + +