Kaynağa Gözat

Merge remote-tracking branch 'origin/V0.0.5' into V0.0.5

jingyuanchao 1 yıl önce
ebeveyn
işleme
1df6d4d9d4

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/mapper/ResumptionReportMapper.java

@@ -29,9 +29,9 @@ public interface ResumptionReportMapper {
 
     IntrusionTestReportVO selectIntrusionTestReport(@Param("orgId")Long orgId,@Param("date") String date, @Param("orgPath") String orgPath);
 
-    IntrusionTestReportVO selectServiceBankReport(@Param("date") String date, @Param("orgPath") String orgPath);
+    IntrusionTestReportVO selectServiceBankReport(@Param("orgId")Long orgId,@Param("date") String date, @Param("orgPath") String orgPath);
 
-    IntrusionTestReportVO selectStandbyPower(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("orgPath") String orgPath);
+    IntrusionTestReportVO selectStandbyPower(@Param("orgId")Long orgId,@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("orgPath") String orgPath);
 
     /**
      * 隐患
@@ -40,5 +40,5 @@ public interface ResumptionReportMapper {
      * @param orgPath
      * @return
      */
-    Map selectStandbyPowerAbnormalNumber(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("orgPath") String orgPath);
+    Map selectStandbyPowerAbnormalNumber(@Param("orgId")Long orgId,@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("orgPath") String orgPath);
 }

+ 16 - 7
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/service/impl/ResumptionReportServiceImpl.java

@@ -268,11 +268,15 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             } else {
                 sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
             }
-            IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectServiceBankReport(resumptionDTO.getSearchTime(), o.getPath());
+            IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectServiceBankReport(null,resumptionDTO.getSearchTime(), o.getPath());
+            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(o.getPath());
+            if (o.getType()==4){
+                integer=1;
+                intrusionTestReportVO1 = resumptionReportMapper.selectServiceBankReport(o.getId(),resumptionDTO.getSearchTime(), null);
+            }
             BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
             intrusionTestReportVO.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
             intrusionTestReportVO.setOrgName(o.getShortName());
-            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(o.getPath());
             intrusionTestReportVO.setNetworkNumber(integer);
             intrusionTestReportVOList.add(intrusionTestReportVO);
         });
@@ -322,10 +326,16 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             } else {
                 sysOrg1 = orgService.selectOrgById(orgService.selectOrgById(o.getParentId(), SecurityConstants.INNER).getParentId(), SecurityConstants.INNER);
             }
-            IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
-            BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
+            IntrusionTestReportVO intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null,resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
             //隐患
-            Map map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
+            Map map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(null,resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
+            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(o.getPath());
+            if (o.getType()==4){
+                integer=1;
+                 map = resumptionReportMapper.selectStandbyPowerAbnormalNumber(o.getId(),resumptionDTO.getStartTime(), resumptionDTO.getEndTime(),null);
+                intrusionTestReportVO1 = resumptionReportMapper.selectStandbyPower(null,resumptionDTO.getStartTime(), resumptionDTO.getEndTime(), o.getPath());
+            }
+            BeanUtils.copyProperties(intrusionTestReportVO1, intrusionTestReportVO);
             Object abnormalNumber = map.get("abnormalNumber");
             intrusionTestReportVO.setAbnormalNumber(Integer.valueOf(abnormalNumber.toString()));
 
@@ -334,10 +344,9 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
 
             Object realityRectificationRate = map.get("realityRectificationRate");
             intrusionTestReportVO.setRealityRectificationRate(realityRectificationRate.toString());
+            intrusionTestReportVO.setNetworkNumber(integer);
             intrusionTestReportVO.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
             intrusionTestReportVO.setOrgName(o.getShortName());
-            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(o.getPath());
-            intrusionTestReportVO.setNetworkNumber(integer);
             intrusionTestReportVOList.add(intrusionTestReportVO);
         });
         return intrusionTestReportVOList;

+ 9 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml

@@ -149,6 +149,9 @@
             and #{endTime} <= a.plan_end_time
             ))
         </if>
+          <if test="orgId !=null">
+              and a.org_id=#{orgId}
+          </if>
         <if test="orgPath !=null">
             and a.org_path  like concat(#{orgPath},'%')
         </if>
@@ -188,6 +191,9 @@
         <if test="date !=null">
             AND a.ymd_date like concat(#{date},'%')
         </if>
+          <if test="orgId !=null">
+              and a.org_id=#{orgId}
+          </if>
         <if test="orgPath !=null">
             and a.org_path  like concat(#{orgPath},'%')
         </if>
@@ -229,6 +235,9 @@
             and #{endTime} &lt;= a.plan_end_time
             ))
         </if>
+          <if test="orgId !=null">
+              and a.org_id=#{orgId}
+          </if>
         <if test="orgPath !=null">
             and a.org_path  like concat(#{orgPath},'%')
         </if>