Selaa lähdekoodia

大屏-功能调整

wangming 6 kuukautta sitten
vanhempi
commit
d3f418e7f9

+ 10 - 4
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxItpProjectNodesDao.java

@@ -3,6 +3,7 @@ package com.rongwei.bscommon.sys.dao;
 import com.alibaba.fastjson.JSONObject;
 import com.rongwei.bsentity.domain.ZhcxItpProjectNodesDo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.vo.project.ShipOffStoreNodeTotal;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -111,7 +112,8 @@ public interface ZhcxItpProjectNodesDao extends BaseMapper<ZhcxItpProjectNodesDo
      *
      * @return
      */
-    @Select("SELECT " +
+    @Select("<script>" +
+            "SELECT " +
             " n.PROJECTID , " +
             " count(n.ID) AS total " +
             "FROM " +
@@ -126,7 +128,11 @@ public interface ZhcxItpProjectNodesDao extends BaseMapper<ZhcxItpProjectNodesDo
             " WHERE " +
             "  d.PROJECTID = n.PROJECTID " +
             "  AND n.MACHINENAME LIKE CONCAT('%', d.MACHINENO, '%') " +
-            "   AND d.DELETED = '0') " +
-            "   GROUP BY n.PROJECTID ")
-    List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal();
+            "   AND d.DELETED = '0'" +
+            "  <if test='projectId != null'> and d.PROJECTID = #{projectId} </if>" +
+            "  <if test='machineno != null'> and d.MACHINENO = #{machineno} </if>" +
+            "  ) " +
+            "   GROUP BY n.PROJECTID " +
+            "</script>")
+    List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal(ComlpateIndicatorsRequest req);
 }

+ 9 - 3
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxLowaltitudeDebtfreeCheckDao.java

@@ -2,6 +2,7 @@ package com.rongwei.bscommon.sys.dao;
 
 import com.rongwei.bsentity.domain.ZhcxLowaltitudeDebtfreeCheckDo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.vo.lowaltiude.LowaltitedeDebtfreddCheckVo;
 import org.apache.ibatis.annotations.Select;
 
@@ -17,7 +18,8 @@ import java.util.List;
  */
 public interface ZhcxLowaltitudeDebtfreeCheckDao extends BaseMapper<ZhcxLowaltitudeDebtfreeCheckDo> {
 
-    @Select("SELECT " +
+    @Select("<script>" +
+            "SELECT " +
             " c.*, " +
             " m.PROJECTID, " +
             " m.PROJECTCODE, " +
@@ -40,6 +42,10 @@ public interface ZhcxLowaltitudeDebtfreeCheckDao extends BaseMapper<ZhcxLowaltit
             " WHERE " +
             "  d.PROJECTID = m.PROJECTID " +
             "  AND d.MACHINENO = m.MACHINENO " +
-            "  AND d.DELETED = '0')")
-    List<LowaltitedeDebtfreddCheckVo> getStatisticalIndicators();
+            "  AND d.DELETED = '0'" +
+            "  <if test='projectId != null'> and d.PROJECTID = #{projectId} </if>" +
+            "  <if test='machineno != null'> and d.MACHINENO = #{machineno} </if>" +
+            "  )" +
+            "</script>")
+    List<LowaltitedeDebtfreddCheckVo> getStatisticalIndicators(ComlpateIndicatorsRequest req);
 }

+ 1 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxProjectDeviceIndicatorDao.java

@@ -23,7 +23,7 @@ public interface ZhcxProjectDeviceIndicatorDao extends BaseMapper<ZhcxProjectDev
             "delete from ZHCX_PROJECT_DEVICE_INDICATOR " +
             "<where>" +
             "<if test='prjId != null'>and PROJECTID = #{prjId}</if>" +
-            "<if test='machineId != null'>and MACHINEID = #{machineId}</if>" +
+            "<if test='machineNo != null'>and MACHINENO = #{machineNo}</if>" +
             "<if test='type != null'>and TYPE = #{type}</if>" +
             "</where>" +
             "</script>")

+ 2 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxItpProjectNodesService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.rongwei.bsentity.domain.ZhcxItpProjectNodesDo;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.dto.OutsideInspectionProjectPointDto;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.vo.CopyNodeVo;
 import com.rongwei.bsentity.vo.project.ShipOffStoreNodeTotal;
 
@@ -58,6 +59,6 @@ public interface ZhcxItpProjectNodesService extends IService<ZhcxItpProjectNodes
      *
      * @return
      */
-    List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal();
+    List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal(ComlpateIndicatorsRequest req);
 
 }

+ 2 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxLowaltitudeDebtfreeCheckService.java

@@ -2,6 +2,7 @@ package com.rongwei.bscommon.sys.service;
 
 import com.rongwei.bsentity.domain.ZhcxLowaltitudeDebtfreeCheckDo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.lowaltitude.AddHoistingPlanDateRequest;
 import com.rongwei.bsentity.dto.lowaltitude.DeleteCheckRequest;
 import com.rongwei.bsentity.dto.lowaltitude.SaveCheckRequest;
@@ -52,5 +53,5 @@ public interface ZhcxLowaltitudeDebtfreeCheckService extends IService<ZhcxLowalt
      * 添加统计指标
      *
      */
-    void addUpComplateIndicators();
+    void addUpComplateIndicators(ComlpateIndicatorsRequest req);
 }

+ 2 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxOutsideInspectionItpService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
 import com.rongwei.bsentity.dto.OutsideInspactionSyncReqquest;
 import com.rongwei.bsentity.dto.ReInspectionRequest;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionInsertRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionUpdateRequest;
 import com.rongwei.bsentity.vo.OperOutsideInspectionVo;
@@ -94,6 +95,6 @@ public interface ZhcxOutsideInspectionItpService extends IService<ZhcxOutsideIns
      * 添加统计完成指标指标
      *
      */
-    void addUpComplateIndicators();
+    void addUpComplateIndicators(ComlpateIndicatorsRequest req);
 }
 

+ 3 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxItpProjectNodesServiceImpl.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bsentity.dto.ItpProjectNodeExtVo;
 import com.rongwei.bsentity.dto.ItpProjectNodeL2Vo;
 import com.rongwei.bsentity.dto.OutsideInspectionProjectPointDto;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.vo.CopyNodeVo;
 import com.rongwei.bsentity.vo.project.ShipOffStoreNodeTotal;
 import com.rongwei.commonservice.service.dao.CommonSqlDao;
@@ -670,7 +671,7 @@ public class ZhcxItpProjectNodesServiceImpl extends ServiceImpl<ZhcxItpProjectNo
      * @return
      */
     @Override
-    public List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal() {
-        return dao.getShipOffStoreNodeTotal();
+    public List<ShipOffStoreNodeTotal> getShipOffStoreNodeTotal(ComlpateIndicatorsRequest req) {
+        return dao.getShipOffStoreNodeTotal(req);
     }
 }

+ 5 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxLowaltitudeDebtfreeCheckServiceImpl.java

@@ -13,6 +13,7 @@ import com.rongwei.bscommon.sys.utils.ConstantUtil;
 import com.rongwei.bsentity.domain.*;
 import com.rongwei.bscommon.sys.dao.ZhcxLowaltitudeDebtfreeCheckDao;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.lowaltitude.AddHoistingPlanDateRequest;
 import com.rongwei.bsentity.dto.lowaltitude.DeleteCheckRequest;
 import com.rongwei.bsentity.dto.lowaltitude.SaveCheckDetailDto;
@@ -300,15 +301,17 @@ public class ZhcxLowaltitudeDebtfreeCheckServiceImpl extends ServiceImpl<ZhcxLow
      *
      */
     @Override
-    public void addUpComplateIndicators() {
+    public void addUpComplateIndicators(ComlpateIndicatorsRequest req) {
 
         //删除低空数据
         DelPhysicalParam param = DelPhysicalParam.builder()
                 .type("lowaltitude_complate")
+                .prjId(req.getProjectId())
+                .machineNo(req.getMachineno())
                 .build();
         projectDeviceIndicatorService.delPhysical(param);
 
-        final List<LowaltitedeDebtfreddCheckVo> debtfreddCheckVos = dao.getStatisticalIndicators();
+        final List<LowaltitedeDebtfreddCheckVo> debtfreddCheckVos = dao.getStatisticalIndicators(req);
 
         if(ObjectUtil.isEmpty(debtfreddCheckVos)) {
             return ;

+ 5 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -17,6 +17,7 @@ import com.rongwei.bsentity.domain.*;
 import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionItpDao;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bsentity.dto.*;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionInsertRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionUpdateRequest;
 import com.rongwei.bsentity.dto.project.indicator.DelPhysicalParam;
@@ -1473,15 +1474,17 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
      *
      */
     @Override
-    public void addUpComplateIndicators() {
+    public void addUpComplateIndicators(ComlpateIndicatorsRequest req) {
         //删除外部报验数据
         DelPhysicalParam param = DelPhysicalParam.builder()
                 .type("outside_inspection_complate")
+                .prjId(req.getProjectId())
+                .machineNo(req.getMachineno())
                 .build();
         projectDeviceIndicatorService.delPhysical(param);
 
 
-        final List<ShipOffStoreNodeTotal> nodeTotalList = itpProjectNodesService.getShipOffStoreNodeTotal(); //分母为为空
+        final List<ShipOffStoreNodeTotal> nodeTotalList = itpProjectNodesService.getShipOffStoreNodeTotal(req); //分母为为空
         if(ObjectUtil.isEmpty(nodeTotalList)) {
             return ;
         }

+ 21 - 0
business-entity/src/main/java/com/rongwei/bsentity/dto/indicators/ComlpateIndicatorsRequest.java

@@ -0,0 +1,21 @@
+package com.rongwei.bsentity.dto.indicators;
+
+import lombok.*;
+
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class ComlpateIndicatorsRequest {
+
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 机号
+     */
+    private String machineno;
+}

+ 1 - 1
business-entity/src/main/java/com/rongwei/bsentity/dto/project/indicator/DelPhysicalParam.java

@@ -11,7 +11,7 @@ public class DelPhysicalParam {
 
     private String prjId;
 
-    private String machineId;
+    private String machineNo;
 
     private String type;
 }

+ 3 - 2
business-server/src/main/java/com/rongwei/bsserver/controller/DebtfreeController.java

@@ -2,6 +2,7 @@ package com.rongwei.bsserver.controller;
 
 import com.rongwei.bscommon.sys.service.DebtfreeService;
 import com.rongwei.bscommon.sys.service.ZhcxLowaltitudeDebtfreeCheckService;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.lowaltitude.AddHoistingPlanDateRequest;
 import com.rongwei.bsentity.dto.lowaltitude.DeleteCheckRequest;
 import com.rongwei.bsentity.dto.lowaltitude.SaveCheckRequest;
@@ -92,8 +93,8 @@ public class DebtfreeController {
      */
     @PostMapping("/addUpComplateIndicators")
     @ResponseBody
-    public R addUpComplateIndicators() {
-        zhcxLowaltitudeDebtfreeCheckService.addUpComplateIndicators();
+    public R addUpComplateIndicators(@RequestBody ComlpateIndicatorsRequest req) {
+        zhcxLowaltitudeDebtfreeCheckService.addUpComplateIndicators(req);
         return R.ok();
     }
 

+ 3 - 2
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxOutsideInspectionItpController.java

@@ -5,6 +5,7 @@ import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionItpService;
 import com.rongwei.bscommon.sys.service.ZhcxReprotSameDayRealTimeInspectionStatisticsService;
 import com.rongwei.bsentity.dto.OutsideInspactionSyncReqquest;
 import com.rongwei.bsentity.dto.ReInspectionRequest;
+import com.rongwei.bsentity.dto.indicators.ComlpateIndicatorsRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionInsertRequest;
 import com.rongwei.bsentity.dto.outside.OutsideInspectionUpdateRequest;
 import com.rongwei.rwcommon.base.R;
@@ -125,8 +126,8 @@ public class ZhcxOutsideInspectionItpController {
      */
     @PostMapping("/addUpComplateIndicators")
     @ResponseBody
-    public R addUpComplateIndicators() {
-        service.addUpComplateIndicators();
+    public R addUpComplateIndicators(@RequestBody ComlpateIndicatorsRequest req) {
+        service.addUpComplateIndicators(req);
         return R.ok();
     }
 }