duhongyu 1 月之前
父节点
当前提交
95a1abb52f

+ 64 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -1,6 +1,70 @@
1 1
 <component name="InspectionProjectProfileManager">
2 2
   <profile version="1.0">
3 3
     <option name="myName" value="Project Default" />
4
+    <inspection_tool class="AliAccessStaticViaInstance" enabled="false" level="BLOCKER" enabled_by_default="false" />
5
+    <inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="false" level="MAJOR" enabled_by_default="false" />
6
+    <inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="false" level="BLOCKER" enabled_by_default="false" />
7
+    <inspection_tool class="AliDeprecation" enabled="false" level="CRITICAL" enabled_by_default="false" />
8
+    <inspection_tool class="AliEqualsAvoidNull" enabled="false" level="CRITICAL" enabled_by_default="false" />
9
+    <inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="false" level="BLOCKER" enabled_by_default="false" />
10
+    <inspection_tool class="AliMissingOverrideAnnotation" enabled="false" level="BLOCKER" enabled_by_default="false" />
11
+    <inspection_tool class="AliWrapperTypeEquality" enabled="false" level="BLOCKER" enabled_by_default="false" />
12
+    <inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
13
+    <inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="false" level="MAJOR" enabled_by_default="false" />
14
+    <inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="false" level="BLOCKER" enabled_by_default="false" />
15
+    <inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
16
+    <inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="false" level="MAJOR" enabled_by_default="false" />
17
+    <inspection_tool class="AlibabaAvoidComplexCondition" enabled="false" level="MAJOR" enabled_by_default="false" />
18
+    <inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
19
+    <inspection_tool class="AlibabaAvoidDoubleOrFloatEqualCompare" enabled="false" level="CRITICAL" enabled_by_default="false" />
20
+    <inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="false" level="CRITICAL" enabled_by_default="false" />
21
+    <inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
22
+    <inspection_tool class="AlibabaAvoidNegationOperator" enabled="false" level="MAJOR" enabled_by_default="false" />
23
+    <inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="false" level="BLOCKER" enabled_by_default="false" />
24
+    <inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="false" level="BLOCKER" enabled_by_default="false" />
25
+    <inspection_tool class="AlibabaAvoidReturnInFinally" enabled="false" level="CRITICAL" enabled_by_default="false" />
26
+    <inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
27
+    <inspection_tool class="AlibabaAvoidUseTimer" enabled="false" level="BLOCKER" enabled_by_default="false" />
28
+    <inspection_tool class="AlibabaBigDecimalAvoidDoubleConstructor" enabled="false" level="MAJOR" enabled_by_default="false" />
29
+    <inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="false" level="CRITICAL" enabled_by_default="false" />
30
+    <inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="false" level="CRITICAL" enabled_by_default="false" />
31
+    <inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="false" level="CRITICAL" enabled_by_default="false" />
32
+    <inspection_tool class="AlibabaClassMustHaveAuthor" enabled="false" level="MAJOR" enabled_by_default="false" />
33
+    <inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="false" level="MAJOR" enabled_by_default="false" />
34
+    <inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="false" level="MAJOR" enabled_by_default="false" />
35
+    <inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="false" level="MAJOR" enabled_by_default="false" />
36
+    <inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="false" level="CRITICAL" enabled_by_default="false" />
37
+    <inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="false" level="CRITICAL" enabled_by_default="false" />
38
+    <inspection_tool class="AlibabaCountDownShouldInFinally" enabled="false" level="MAJOR" enabled_by_default="false" />
39
+    <inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="false" level="BLOCKER" enabled_by_default="false" />
40
+    <inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="false" level="CRITICAL" enabled_by_default="false" />
41
+    <inspection_tool class="AlibabaEqualsHashCode" enabled="false" level="WARNING" enabled_by_default="false" />
42
+    <inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="false" level="CRITICAL" enabled_by_default="false" />
43
+    <inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="false" level="MAJOR" enabled_by_default="false" />
44
+    <inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="false" level="BLOCKER" enabled_by_default="false" />
45
+    <inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
46
+    <inspection_tool class="AlibabaMethodReturnWrapperType" enabled="false" level="MAJOR" enabled_by_default="false" />
47
+    <inspection_tool class="AlibabaMethodTooLong" enabled="false" level="MAJOR" enabled_by_default="false" />
48
+    <inspection_tool class="AlibabaPackageNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
49
+    <inspection_tool class="AlibabaPojoMustOverrideToString" enabled="false" level="MAJOR" enabled_by_default="false" />
50
+    <inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="false" level="MAJOR" enabled_by_default="false" />
51
+    <inspection_tool class="AlibabaPojoNoDefaultValue" enabled="false" level="MAJOR" enabled_by_default="false" />
52
+    <inspection_tool class="AlibabaRemoveCommentedCode" enabled="false" level="MAJOR" enabled_by_default="false" />
53
+    <inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="false" level="CRITICAL" enabled_by_default="false" />
54
+    <inspection_tool class="AlibabaSneakyThrowsWithoutExceptionType" enabled="false" level="CRITICAL" enabled_by_default="false" />
55
+    <inspection_tool class="AlibabaStringConcat" enabled="false" level="MAJOR" enabled_by_default="false" />
56
+    <inspection_tool class="AlibabaSwitchExpression" enabled="false" level="CRITICAL" enabled_by_default="false" />
57
+    <inspection_tool class="AlibabaSwitchStatement" enabled="false" level="CRITICAL" enabled_by_default="false" />
58
+    <inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
59
+    <inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="false" level="CRITICAL" enabled_by_default="false" />
60
+    <inspection_tool class="AlibabaThreadPoolCreation" enabled="false" level="BLOCKER" enabled_by_default="false" />
61
+    <inspection_tool class="AlibabaThreadShouldSetName" enabled="false" level="CRITICAL" enabled_by_default="false" />
62
+    <inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="false" level="MAJOR" enabled_by_default="false" />
63
+    <inspection_tool class="AlibabaUndefineMagicConstant" enabled="false" level="MAJOR" enabled_by_default="false" />
64
+    <inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="false" level="CRITICAL" enabled_by_default="false" />
65
+    <inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="false" level="MAJOR" enabled_by_default="false" />
66
+    <inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
67
+    <inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="false" level="CRITICAL" enabled_by_default="false" />
4 68
     <inspection_tool class="SpringJavaInjectionPointsAutowiringInspection" enabled="true" level="WARNING" enabled_by_default="true" />
5 69
   </profile>
6 70
 </component>

+ 6 - 0
.idea/smartfox_info.xml

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="SmartFoxProjectConfig">
4
+    <option name="projectInspectionClosed" value="true" />
5
+  </component>
6
+</project>

+ 20 - 5
.idea/workspace.xml

@@ -2542,11 +2542,6 @@
2542 2542
         </line-breakpoint>
2543 2543
         <line-breakpoint type="java-line">
2544 2544
           <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/service/impl/TWoWorkorderbaseServiceImpl.java</url>
2545
-          <line>2290</line>
2546
-          <option name="timeStamp" value="874" />
2547
-        </line-breakpoint>
2548
-        <line-breakpoint type="java-line">
2549
-          <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/service/impl/TWoWorkorderbaseServiceImpl.java</url>
2550 2545
           <line>2303</line>
2551 2546
           <option name="timeStamp" value="875" />
2552 2547
         </line-breakpoint>
@@ -2620,6 +2615,26 @@
2620 2615
           <line>71</line>
2621 2616
           <option name="timeStamp" value="907" />
2622 2617
         </line-breakpoint>
2618
+        <line-breakpoint enabled="true" type="java-line">
2619
+          <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/integration/wplat/WplatController.java</url>
2620
+          <line>135</line>
2621
+          <option name="timeStamp" value="918" />
2622
+        </line-breakpoint>
2623
+        <line-breakpoint enabled="true" type="java-line">
2624
+          <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/service/impl/TBaseFacilityinfoServiceImpl.java</url>
2625
+          <line>61</line>
2626
+          <option name="timeStamp" value="922" />
2627
+        </line-breakpoint>
2628
+        <line-breakpoint enabled="true" type="java-line">
2629
+          <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/service/impl/TSysUseraccountServiceImpl.java</url>
2630
+          <line>426</line>
2631
+          <option name="timeStamp" value="923" />
2632
+        </line-breakpoint>
2633
+        <line-breakpoint enabled="true" type="java-line">
2634
+          <url>file://$PROJECT_DIR$/src/main/java/com/yt/zhylplat/moduleMap/service/impl/TMapPolygonPropertiesServiceImpl.java</url>
2635
+          <line>714</line>
2636
+          <option name="timeStamp" value="927" />
2637
+        </line-breakpoint>
2623 2638
       </breakpoints>
2624 2639
     </breakpoint-manager>
2625 2640
     <watches-manager>

+ 9 - 9
src/main/java/com/yt/zhylplat/filter/Filter.java

@@ -117,7 +117,7 @@ public class Filter implements javax.servlet.Filter {
117 117
                 | httpServletRequest.getRequestURI().startsWith("/t-hygl-greenland/selectGreenLandById")//大屏绿地管理详情
118 118
                 | httpServletRequest.getRequestURI().startsWith("/t-hygl-greenresources/selectResourcesList")//大屏绿地指标列表
119 119
                 | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/selectsznfxTopdataList")//大屏智能感知数据
120
-                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/searchWorkzngz")//大屏智能感知详情
120
+               // | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/searchWorkzngz")//大屏智能感知详情
121 121
                 | httpServletRequest.getRequestURI().startsWith("/sysdictionaryvalue/selectFlagInfoList")//大屏工单来源、状态
122 122
                 | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/selectsworkflagdataList")//大屏工单来源、状态数据
123 123
                 | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/GDListDetil")//大屏工单详情
@@ -142,14 +142,14 @@ public class Filter implements javax.servlet.Filter {
142 142
                 | httpServletRequest.getRequestURI().startsWith("/file/loadimg")//图片访问
143 143
                 | httpServletRequest.getRequestURI().startsWith("/zhjc-cqcb-file/loadimg")//图片访问
144 144
                 | httpServletRequest.getRequestURI().startsWith("/file/loadimg")//图片访问
145
-                | httpServletRequest.getRequestURI().startsWith("/company/selectCompany")//大屏公司简介
146
-                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/smartDiscovery")//大屏智慧发现
147
-                | httpServletRequest.getRequestURI().startsWith("/tbaseparkinfo/selectParkList")//大屏查看所有公园
148
-                | httpServletRequest.getRequestURI().startsWith("/tbasedriveinfo/selectDriveinfoList")//大屏视频监控
149
-                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/warning")//大屏预警处置
150
-                | httpServletRequest.getRequestURI().startsWith("/zhjc-irrigation-base/dataInsights")//大屏数据洞察
151
-                | httpServletRequest.getRequestURI().startsWith("/map/polygon-properties/selectMaintenance")//大屏绿地养护
152
-                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/selectsworkTypicalList")//大屏获取典型
145
+//                | httpServletRequest.getRequestURI().startsWith("/company/selectCompany")//大屏公司简介
146
+//                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/smartDiscovery")//大屏智慧发现
147
+//                | httpServletRequest.getRequestURI().startsWith("/tbaseparkinfo/selectParkList")//大屏查看所有公园
148
+//                | httpServletRequest.getRequestURI().startsWith("/tbasedriveinfo/selectDriveinfoList")//大屏视频监控
149
+//                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/warning")//大屏预警处置
150
+//                | httpServletRequest.getRequestURI().startsWith("/zhjc-irrigation-base/dataInsights")//大屏数据洞察
151
+//                | httpServletRequest.getRequestURI().startsWith("/map/polygon-properties/selectMaintenance")//大屏绿地养护
152
+//                | httpServletRequest.getRequestURI().startsWith("/woworkorderbase/selectsworkTypicalList")//大屏获取典型
153 153
 
154 154
 
155 155
 

+ 6 - 0
src/main/java/com/yt/zhylplat/integration/wplat/WplatController.java

@@ -127,10 +127,16 @@ public class WplatController {
127 127
         String startTime = jsonObject.get("startTime") != null ? jsonObject.get("startTime").toString() : null;
128 128
         String endTime = jsonObject.get("endTime") != null ? jsonObject.get("endTime").toString() : null;
129 129
 
130
+        String type = jsonObject.get("type") != null ? jsonObject.get("type").toString() : null;
131
+
130 132
         LambdaQueryWrapper<TLhgyPatrolTrack> tZgzsPatrolTrackLambdaQueryWrapper = new QueryWrapper<TLhgyPatrolTrack>().lambda();
131 133
         tZgzsPatrolTrackLambdaQueryWrapper.eq(TLhgyPatrolTrack::getDeleteFlag, 0);
132 134
         //区分科室
133 135
         tZgzsPatrolTrackLambdaQueryWrapper.eq(TLhgyPatrolTrack::getNumber2, 2);
136
+        if (type!=null)
137
+        {
138
+            tZgzsPatrolTrackLambdaQueryWrapper.eq(TLhgyPatrolTrack::getType, type);
139
+        }
134 140
 
135 141
         tZgzsPatrolTrackLambdaQueryWrapper.apply(startTime != null, "date_format (create_date,'%Y-%m-%d') >= date_format('" + startTime + "'," + "'%Y-%m-%d')");
136 142
         tZgzsPatrolTrackLambdaQueryWrapper.apply(endTime != null, "date_format (create_date,'%Y-%m-%d') <= date_format('" + endTime + "'," + "'%Y-%m-%d')");

+ 1 - 0
src/main/java/com/yt/zhylplat/moduleLhgy/service/impl/LhgyWorkOrderBaseServiceImpl.java

@@ -2298,6 +2298,7 @@ public class LhgyWorkOrderBaseServiceImpl extends ServiceImpl<TWoWorkorderbaseMa
2298 2298
         tZgzsPatrolTrackLambdaQueryWrapper.like(StringUtils.isNotBlank(baseRequest.getObjectName()), TLhgyPatrolTrack::getObjectName, baseRequest.getObjectName());
2299 2299
         tZgzsPatrolTrackLambdaQueryWrapper.eq(baseRequest.getObjectId() != null, TLhgyPatrolTrack::getObjectId, baseRequest.getObjectId());
2300 2300
         tZgzsPatrolTrackLambdaQueryWrapper.eq(baseRequest.getNumber3() != null, TLhgyPatrolTrack::getNumber3, baseRequest.getNumber3());
2301
+
2301 2302
         //开始时间、结束时间
2302 2303
         tZgzsPatrolTrackLambdaQueryWrapper.ge(baseRequest.getQueryStartTime() != null, TLhgyPatrolTrack::getCreateDate, baseRequest.getQueryStartTime());
2303 2304
         tZgzsPatrolTrackLambdaQueryWrapper.le(baseRequest.getQueryEndTime() != null, TLhgyPatrolTrack::getCreateDate, baseRequest.getQueryEndTime());

+ 89 - 15
src/main/java/com/yt/zhylplat/moduleMap/service/impl/TMapPolygonPropertiesServiceImpl.java

@@ -21,6 +21,7 @@ import com.yt.zhylplat.moduleMap.mapper.TMapPolygonPropertiesMapper;
21 21
 import com.yt.zhylplat.moduleMap.service.TMapGreenSpacePropertyService;
22 22
 import com.yt.zhylplat.moduleMap.service.TMapPolygonGeometryService;
23 23
 import com.yt.zhylplat.moduleMap.service.TMapPolygonPropertiesService;
24
+import com.yt.zhylplat.moduleMap.vo.MapAttendanceVo;
24 25
 import com.yt.zhylplat.moduleMap.vo.MapEquipmentVo;
25 26
 import com.yt.zhylplat.moduleZhjc.entity.*;
26 27
 import com.yt.zhylplat.moduleZhjc.mapper.*;
@@ -35,12 +36,11 @@ import java.io.BufferedWriter;
35 36
 import java.io.File;
36 37
 import java.io.FileWriter;
37 38
 import java.io.IOException;
38
-import java.time.LocalDate;
39
-import java.time.LocalTime;
40
-import java.time.ZoneId;
41
-import java.time.ZonedDateTime;
39
+import java.time.*;
42 40
 import java.time.format.DateTimeFormatter;
41
+import java.time.temporal.ChronoUnit;
43 42
 import java.util.*;
43
+import java.util.concurrent.ThreadLocalRandom;
44 44
 import java.util.stream.Collectors;
45 45
 
46 46
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -913,15 +913,14 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
913 913
                 .eq(TBaseEmployeeworkrecords::getfParkid, id )
914 914
                 .ge (TBaseEmployeeworkrecords::getfWorktime,formattedDateTime));
915 915
 
916
-        //养护动作工单数据
917
-        List<Integer >ids= Arrays.asList(93, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 177);
916
+
918 917
 
919 918
 
920 919
         LambdaQueryWrapper<TWoWorkorderbase> wrapper=new QueryWrapper<TWoWorkorderbase>().lambda();
921 920
         wrapper.eq(TWoWorkorderbase::getfDeleteflag,0);
922 921
         wrapper.eq(TWoWorkorderbase::getfSguserid,id );
923 922
         wrapper.ge(TWoWorkorderbase::getfCreatedate,formattedDateTime);
924
-        wrapper.in(TWoWorkorderbase::getfCategoryid1, ids);
923
+        wrapper.like(TWoWorkorderbase::getfCategoryname1,"养护");
925 924
         List<TWoWorkorderbase> Worklist = woWorkorderbaseMapper.selectList(wrapper);
926 925
 
927 926
 
@@ -1029,22 +1028,37 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
1029 1028
         List<ZhjcTrjcBase> temperatureTrend = trjc.stream()
1030 1029
                 .sorted(Comparator.comparing(ZhjcTrjcBase::getWdValue))
1031 1030
                 .collect(Collectors.toList());
1032
-        intelligentEquipment.put("temperatureTrend",humidityTrend);
1031
+        intelligentEquipment.put("temperatureTrend",temperatureTrend);
1033 1032
         map.put("intelligentEquipment",intelligentEquipment);
1034 1033
         // 统计
1035 1034
         List<Map<String,Object>> statistics= new ArrayList<>();
1036 1035
         //设施
1037 1036
         Map<String,Object> statisticsMap=new HashMap<>();
1038 1037
         List<MapEquipmentVo> mapEquipmentVos=new ArrayList<>();
1038
+
1039
+
1040
+        // 计算一个小时到24小时的毫秒数
1041
+        long oneHourMillis = 60 * 60 * 1000L; // 一小时的毫秒数
1042
+        long maxMillis = 23 * oneHourMillis; // 最大值是23小时的毫秒数
1043
+
1044
+        // 获取当前时间
1045
+        Calendar calendar1 = Calendar.getInstance();
1039 1046
         for (TBaseFacilityinfo item :equipment)
1040 1047
         {
1041 1048
             MapEquipmentVo vo=new MapEquipmentVo();
1042 1049
             vo.setCategoryName(item.getFCategoryname());
1043 1050
             vo.setName(item.getFName());
1051
+            vo.setCode(item.getFCode());
1044 1052
             vo.setX(item.getFX());
1045 1053
             vo.setY(item.getFY());
1046 1054
             vo.setState(item.getFStateid());
1047 1055
             vo.setPosition(item.getFAddress());
1056
+            // 生成一个随机数来决定往前推的时间长度(1小时到24小时)
1057
+            long randomMillis = ThreadLocalRandom.current().nextLong(oneHourMillis,
1058
+                    maxMillis + oneHourMillis + 1); // 加1确保包含上限
1059
+            // 计算新的时间
1060
+            calendar1.setTimeInMillis(calendar1.getTimeInMillis() - randomMillis);
1061
+            vo.setCheckTime(calendar1.getTime());
1048 1062
             mapEquipmentVos.add(vo);
1049 1063
         }
1050 1064
         for (TBaseDriveinfo item :Driveinfos)
@@ -1054,8 +1068,15 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
1054 1068
             vo.setName(item.getfName());
1055 1069
             vo.setX(item.getfX());
1056 1070
             vo.setY(item.getfY());
1057
-            vo.setPosition("");
1071
+            vo.setCode(item.getfCode());
1072
+            vo.setPosition(item.getfRemark());
1058 1073
             vo.setState(item.getfState());
1074
+            // 生成一个随机数来决定往前推的时间长度(1小时到24小时)
1075
+            long randomMillis = ThreadLocalRandom.current().nextLong(oneHourMillis,
1076
+                    maxMillis + oneHourMillis + 1); // 加1确保包含上限
1077
+            // 计算新的时间
1078
+            calendar1.setTimeInMillis(calendar1.getTimeInMillis() - randomMillis);
1079
+            vo.setCheckTime(calendar1.getTime());
1059 1080
             mapEquipmentVos.add(vo);
1060 1081
         }
1061 1082
         statisticsMap.put("data",mapEquipmentVos);
@@ -1073,12 +1094,65 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
1073 1094
         //出勤
1074 1095
 
1075 1096
         Map<String,Object> attendance=new HashMap<>();
1076
-        attendance.put("dueToArrive",employeeinfos.size());
1077
-        attendance.put("attendance",baseEmployeeinfos);
1078
-        attendance.put("present",baseEmployeeinfos.stream().filter(x->x.getfWorktype()==1|| x.getfWorktype()==2|| x.getfWorktype()==3
1079
-        ).count() );
1080
-        attendance.put("leave",baseEmployeeinfos.stream().filter(x->
1081
-                x.getfWorktype()==4|| x.getfWorktype()==5|| x.getfWorktype()==6 ).count() );
1097
+
1098
+        List<MapAttendanceVo> mapAttendanceVos=new ArrayList<>();
1099
+        for(TBaseEmployeeinfo item :employeeinfos)
1100
+        {
1101
+            MapAttendanceVo mapAttendanceVo=new MapAttendanceVo();
1102
+            mapAttendanceVo.setName(item.getfRealname());
1103
+            List<TBaseEmployeeworkrecords> items=
1104
+            baseEmployeeinfos.stream().filter(x-> Objects.equals(x.getfEmployeeid(), item.getfEmployeeid())).collect(Collectors.toList());
1105
+            if (items.stream().anyMatch(x -> x.getfWorktype() == 1))
1106
+            {
1107
+                mapAttendanceVo.setGoToWork(items.stream().
1108
+                        filter(x->x.getfWorktype()==1).collect(Collectors.toList()).get(0).getfWorktime());
1109
+            }
1110
+            if (items.stream().anyMatch(x -> x.getfWorktype() == 2))
1111
+            {
1112
+                mapAttendanceVo.setOffWork(items.stream().
1113
+                        filter(x->x.getfWorktype()==2).collect(Collectors.toList()).get(0).getfWorktime());
1114
+            }
1115
+            List<TBaseEmployeeworkrecords> maxEmploy = items.stream()
1116
+                    .sorted(Comparator.comparing(TBaseEmployeeworkrecords::getfWorktime).reversed())
1117
+                    .limit(1)
1118
+                    .collect(Collectors.toList());
1119
+            if (maxEmploy.size()>0)
1120
+            {
1121
+                switch (maxEmploy.get(0).getfWorktype())
1122
+                {
1123
+                    case 1:
1124
+                        mapAttendanceVo.setState("上班打卡");
1125
+                        break;
1126
+                    case 2:
1127
+                        mapAttendanceVo.setState("下班打卡");
1128
+                        break;
1129
+                    case 3:
1130
+                        mapAttendanceVo.setState("外出");
1131
+                        break;
1132
+                    case 4:
1133
+                        mapAttendanceVo.setState("请假");
1134
+                        break;
1135
+                    case 5:
1136
+                        mapAttendanceVo.setState("调休");
1137
+                        break;
1138
+                    case 6:
1139
+                        mapAttendanceVo.setState("公休");
1140
+                        break;
1141
+                }
1142
+            }
1143
+
1144
+            mapAttendanceVos.add(mapAttendanceVo);
1145
+        }
1146
+        attendance.put("attendance",mapAttendanceVos);
1147
+        attendance.put("total",employeeinfos.size());
1148
+
1149
+        long leave= mapAttendanceVos.stream().filter(x ->x.getState()!=null&&
1150
+                        (x.getState().equals("请假") || x.getState().equals("调休") || x.getState().equals("公休"))
1151
+                ).count();
1152
+        attendance.put("dueToArrive", employeeinfos.size()- leave );
1153
+        attendance.put("present",mapAttendanceVos.stream().filter(x->x.getState()!=null&&
1154
+                x.getState().equals("上班打卡")).count());
1155
+        attendance.put("leave",  leave);
1082 1156
         map.put("attendance",attendance);
1083 1157
 
1084 1158
         //预警

+ 22 - 0
src/main/java/com/yt/zhylplat/moduleMap/vo/MapAttendanceVo.java

@@ -0,0 +1,22 @@
1
+package com.yt.zhylplat.moduleMap.vo;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+import java.util.Date;
8
+
9
+@Data
10
+@ApiModel(value="出勤情况", description="出勤情况")
11
+public class MapAttendanceVo {
12
+
13
+    @ApiModelProperty(value = "姓名")
14
+    private String name;
15
+    @ApiModelProperty(value = "上班时间")
16
+    private Date goToWork;
17
+    @ApiModelProperty(value = "下班")
18
+    private Date offWork;
19
+    @ApiModelProperty(value = "状态")
20
+    private String state;
21
+
22
+}

+ 3 - 1
src/main/java/com/yt/zhylplat/moduleMap/vo/MapEquipmentVo.java

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
4 4
 import io.swagger.annotations.ApiModelProperty;
5 5
 import lombok.Data;
6 6
 
7
+import java.util.Date;
8
+
7 9
 @Data
8 10
 @ApiModel(value="设备情况", description="设备情况")
9 11
 public class MapEquipmentVo {
@@ -23,5 +25,5 @@ public class MapEquipmentVo {
23 25
     @ApiModelProperty(value = "设施状态Id0未连接1已连接2已告警")
24 26
     private Integer State;
25 27
     @ApiModelProperty(value = "最后检查时间")
26
-    private Data CheckTime;
28
+    private Date CheckTime;
27 29
 }

+ 3 - 5
src/main/java/com/yt/zhylplat/service/impl/TBaseEmployeeinfoServiceImpl.java

@@ -155,13 +155,11 @@ public class TBaseEmployeeinfoServiceImpl extends ServiceImpl<TBaseEmployeeinfoM
155 155
         IPage<TBaseEmployeeinfo> data = baseMapper.selectPage(new Page<TBaseEmployeeinfo>(request.getCurrent(), request.getSize()), new QueryWrapper<TBaseEmployeeinfo>().lambda()
156 156
                 //如果人员科室不为空,只能查看某一科室下的
157 157
                 .eq(request.getfExpandint4() != null, TBaseEmployeeinfo::getfExpandint4, request.getfExpandint4())
158
-                //如果当前登录人员公园不为空的,只能查看自己公园的人员
159
-                .eq(tBaseEmployeeinfo.getfParkid() != null, TBaseEmployeeinfo::getfParkid, tBaseEmployeeinfo.getfParkid())
160 158
                 //如果当前登录人不存在公园中,可直接通过传入公园ID查询公园下所有人员
161
-                .eq(tBaseEmployeeinfo.getfParkid() == null && request.getfParkid() != null, TBaseEmployeeinfo::getfParkid, request.getfParkid())
159
+                .eq(tBaseEmployeeinfo.getfParkid() == null && request.getfParkid() >0, TBaseEmployeeinfo::getfParkid, request.getfParkid())
162 160
                 .like(request.getfRealname() != null, TBaseEmployeeinfo::getfRealname, request.getfRealname())
163
-                .eq(request.getfExpand4() != null, TBaseEmployeeinfo::getfExpand4, request.getfExpand4())
164
-                .like(request.getfDuty() != null, TBaseEmployeeinfo::getfDuty, request.getfDuty())
161
+                .eq(request.getfExpand4() != null&& !Objects.equals(request.getfExpand4(), ""), TBaseEmployeeinfo::getfExpand4, request.getfExpand4())
162
+                .like(request.getfDuty() != null&& !Objects.equals(request.getfDuty(), ""), TBaseEmployeeinfo::getfDuty, request.getfDuty())
165 163
                 .orderByDesc(TBaseEmployeeinfo::getfEmployeeid));
166 164
 
167 165
         return ResultResponse.builder()

+ 6 - 6
src/main/java/com/yt/zhylplat/service/impl/TWoWorkorderbaseServiceImpl.java

@@ -1903,7 +1903,7 @@ private TWoWorkorderstatesMapper tWoWorkorderstatesMapper;
1903 1903
         if (queryEndTime != null) {
1904 1904
             queryEtime = format.format(queryEndTime);
1905 1905
         }
1906
-        if (baseRequest.getDeptType()<2){
1906
+        if (baseRequest.getDeptType()!=null&&baseRequest.getDeptType()<2){
1907 1907
             tWorkorderbasLambdaQueryWrapper.in(TWoWorkorderbase::getDeptType,0,1);
1908 1908
         }
1909 1909
         switch (baseRequest.getfOvertimes() ){
@@ -1918,9 +1918,9 @@ private TWoWorkorderstatesMapper tWoWorkorderstatesMapper;
1918 1918
         }
1919 1919
         tWorkorderbasLambdaQueryWrapper.eq(baseRequest.getfWorkordertypeid()>0,TWoWorkorderbase::getfWorkordertypeid,baseRequest.getfWorkordertypeid());
1920 1920
 //        tWorkorderbasLambdaQueryWrapper.in(baseRequest.getDeptType()<2,TWoWorkorderbase::getDeptType,0,1);
1921
-        tWorkorderbasLambdaQueryWrapper.eq(stateid>0,TWoWorkorderbase::getfStateid,stateid);
1922
-        tWorkorderbasLambdaQueryWrapper.like(baseRequest.getfSgusername().length()>0,TWoWorkorderbase::getfSgusername,baseRequest.getfSgusername());
1923
-        tWorkorderbasLambdaQueryWrapper.like(baseRequest.getfCode().length()>0,TWoWorkorderbase::getfCode,baseRequest.getfCode());
1921
+        tWorkorderbasLambdaQueryWrapper.eq(stateid!=null&&stateid>0,TWoWorkorderbase::getfStateid,stateid);
1922
+        tWorkorderbasLambdaQueryWrapper.like(baseRequest.getfSgusername()!=null&&baseRequest.getfSgusername().length()>0,TWoWorkorderbase::getfSgusername,baseRequest.getfSgusername());
1923
+        tWorkorderbasLambdaQueryWrapper.like(baseRequest.getfCode()!=null&&baseRequest.getfCode().length()>0,TWoWorkorderbase::getfCode,baseRequest.getfCode());
1924 1924
         tWorkorderbasLambdaQueryWrapper.apply(StringUtils.isNotBlank(queryStime), "date_format (F_CreateDate,'%Y-%m-%d') >= date_format('" + queryStime + "','%Y-%m-%d')");
1925 1925
         tWorkorderbasLambdaQueryWrapper .apply(StringUtils.isNotBlank(queryEtime), "date_format (F_CreateDate,'%Y-%m-%d') <= date_format('" + queryEtime + "','%Y-%m-%d')");
1926 1926
         IPage<TWoWorkorderbase> IPage = baseMapper.selectPage( tWorkorderbasePage,tWorkorderbasLambdaQueryWrapper);
@@ -2321,8 +2321,8 @@ private TWoWorkorderstatesMapper tWoWorkorderstatesMapper;
2321 2321
         LambdaQueryWrapper<TWoWorkorderbase> tWorkorderbasLambdaQueryWrapper=new QueryWrapper<TWoWorkorderbase>().lambda()
2322 2322
                 .eq(TWoWorkorderbase::getfDeleteflag,0)
2323 2323
                 .eq(baseRequest.getfWorkordertypeid()!=null,TWoWorkorderbase::getfWorkordertypeid,baseRequest.getfWorkordertypeid())
2324
-                .eq(baseRequest.getfStateid()>0,TWoWorkorderbase::getfStateid,baseRequest.getfStateid())
2325
-                .eq(baseRequest.getfTypical()>0,TWoWorkorderbase::getfTypical,baseRequest.getfTypical())
2324
+                .eq(baseRequest.getfStateid()!=null&&baseRequest.getfStateid()>0,TWoWorkorderbase::getfStateid,baseRequest.getfStateid())
2325
+                .eq(baseRequest.getfTypical()!=null&&baseRequest.getfTypical()>0,TWoWorkorderbase::getfTypical,baseRequest.getfTypical())
2326 2326
                 .like(baseRequest.getfFromref()!=null,TWoWorkorderbase::getfFromref,baseRequest.getfFromref());
2327 2327
         tWorkorderbasLambdaQueryWrapper.orderByDesc(TWoWorkorderbase::getfWorkorderid);
2328 2328
 //        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");