瀏覽代碼

统计及执行日期

lipenghui 2 周之前
父節點
當前提交
637569d068

+ 7 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotStaticController.java

@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.module.pms.controller.admin.failure.vo.IotFailureReportPageReqVO;
 import cn.iocoder.yudao.module.pms.controller.admin.inspect.order.vo.IotInspectOrderPageReqVO;
 import cn.iocoder.yudao.module.pms.controller.admin.iotdevicerunlog.vo.IotDeviceRunLogPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.iotdevicerunlog.vo.IotDeviceRunLogRespVO;
 import cn.iocoder.yudao.module.pms.controller.admin.iotmainworkorder.vo.IotMainWorkOrderPageReqVO;
 import cn.iocoder.yudao.module.pms.controller.admin.iotopeationfill.vo.IotOpeationFillPageReqVO;
 import cn.iocoder.yudao.module.pms.controller.admin.maintain.vo.IotMaintainPageReqVO;
@@ -769,7 +770,10 @@ public class IotStaticController {
         iotDeviceRunLogPageReqVO.setCreateTime(createTime);
         iotDeviceRunLogPageReqVO.setDeptIds(new ArrayList<>(ids));
         iotDeviceRunLogPageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
-        List<Map<String, Object>> fills = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO).stream().filter(e -> "累计注气量".equals(e.getPointName())).map(e -> {
+        iotDeviceRunLogPageReqVO.setPointName("累计注气量");
+        List<IotDeviceRunLogRespVO> iotDeviceRunLogRespVOS = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO);
+        List<Map<String, Object>> fills = iotDeviceRunLogRespVOS
+                .stream().map(e -> {
             Map<String, Object> abc = new HashMap<>();
             abc.put("id", e.getId());
             abc.put("createTime", e.getCreateTime());
@@ -804,7 +808,8 @@ public class IotStaticController {
         iotDeviceRunLogPageReqVO.setCreateTime(createTime);
         iotDeviceRunLogPageReqVO.setDeptIds(new ArrayList<>(ids));
         iotDeviceRunLogPageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
-        List<Map<String, Object>> fills = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO).stream().filter(e -> "当日注气量".equals(e.getPointName())).map(e -> {
+        iotDeviceRunLogPageReqVO.setPointName("当日注气量");
+        List<Map<String, Object>> fills = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO).stream().map(e -> {
             Map<String, Object> abc = new HashMap<>();
             abc.put("id", e.getId());
             abc.put("createTime", e.getCreateTime());

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotDeviceRunLogMapper.xml

@@ -34,6 +34,7 @@
         SELECT a.id, a.create_time,a.total_run_time,a.fill_content
         FROM rq_iot_device_run_log a
         WHERE a.create_time BETWEEN #{createTime[0],typeHandler=org.apache.ibatis.type.LocalDateTimeTypeHandler} AND #{createTime[1],typeHandler=org.apache.ibatis.type.LocalDateTimeTypeHandler}
+          and a.point_name = #{pointName}
         <if test="deptIds != null and deptIds.size &gt; 0">
             AND a.dept_id IN
             <foreach collection="deptIds" index="index" item="key" open="(" separator="," close=")">