From fd4118c2358759759a0ce37d50d2bebfe951a6fe Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 12 三月 2025 16:00:03 +0800
Subject: [PATCH] 1、新增每日统计接口及向前端推送当当天生产情况 2、优化理片笼判断笼内是否有相同玻璃小片 3、新增list转page工具类
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 31 +++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DateRequest.java | 19 ++
hangzhoumesParent/common/servicebase/src/main/resources/mapper/LargenScreenMapper.xml | 141 ++++++++++++++++++++
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java | 5
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/PageUtil.java | 27 +++
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 8
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DailyProductionVO.java | 52 +++++++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/mapper/LargenScreenMapper.java | 16 ++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/impl/LargenScreenServiceImpl.java | 51 +++++++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/controller/LargenScreenController.java | 38 +++++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/LargenScreenService.java | 17 ++
11 files changed, 394 insertions(+), 11 deletions(-)
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/controller/LargenScreenController.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/controller/LargenScreenController.java
new file mode 100644
index 0000000..c4d4b17
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/controller/LargenScreenController.java
@@ -0,0 +1,38 @@
+package com.mes.largenscreen.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mes.largenscreen.entity.DailyProductionVO;
+import com.mes.largenscreen.entity.DateRequest;
+import com.mes.largenscreen.service.LargenScreenService;
+import com.mes.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:24
+ * @Description:
+ */
+@Api(tags = "澶у睆缁熻淇℃伅")
+@RestController
+@RequestMapping("largenScreen")
+public class LargenScreenController {
+
+ @Resource
+ LargenScreenService largenScreenService;
+
+ @ApiOperation("鎸夌収鏉′欢缁熻姣忔棩鐢熶骇鎯呭喌")
+ @PostMapping("/queryDailyProduction")
+ public Result<Page<DailyProductionVO>> queryDailyProduction(@RequestBody @Validated DateRequest query) {
+ return Result.build(200, "鏌ヨ鎴愬姛", largenScreenService.queryDailyProduction(query));
+ }
+
+
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DailyProductionVO.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DailyProductionVO.java
new file mode 100644
index 0000000..236c5df
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DailyProductionVO.java
@@ -0,0 +1,52 @@
+package com.mes.largenscreen.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:30
+ * @Description:
+ */
+@Data
+public class DailyProductionVO {
+
+ @ApiModelProperty(value = "鏃ユ湡")
+ private String date;
+
+ @ApiModelProperty(value = "鍒囧壊涓�绾跨幓鐠冩暟閲�")
+ private int countOutOne;
+
+ @ApiModelProperty(value = "鍒囧壊涓�绾跨幓鐠冮潰绉�")
+ private double totalAreaOutOne;
+
+ @ApiModelProperty(value = "鍒囧壊浜岀嚎鐜荤拑鏁伴噺")
+ private int countOutTwo;
+
+ @ApiModelProperty(value = "鍒囧壊浜岀嚎鐜荤拑闈㈢Н")
+ private double totalAreaOutTwo;
+
+ @ApiModelProperty(value = "閽㈠寲鍓嶅ぇ鐞嗙墖绗肩幓鐠冩暟閲�")
+ private int countIn;
+
+ @ApiModelProperty(value = "閽㈠寲鍓嶅ぇ鐞嗙墖绗肩幓鐠冮潰绉�")
+ private double totalAreaIn;
+
+ @ApiModelProperty(value = "閽㈠寲鐜荤拑鏁伴噺")
+ private int countOut;
+
+ @ApiModelProperty(value = "閽㈠寲鐜荤拑闈㈢Н")
+ private double totalAreaOut;
+
+ @ApiModelProperty(value = "涓┖涓�绾跨幓鐠冩暟閲�")
+ private int hollowCountOutOne;
+
+ @ApiModelProperty(value = "涓┖涓�绾跨幓鐠冮潰绉�")
+ private double hollowTotalAreaOutOne;
+
+ @ApiModelProperty(value = "涓┖浜岀嚎鐜荤拑鏁伴噺")
+ private int hollowCountOutTwo;
+
+ @ApiModelProperty(value = "涓┖浜岀嚎鐜荤拑闈㈢Н")
+ private double hollowTotalAreaOutTwo;
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DateRequest.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DateRequest.java
new file mode 100644
index 0000000..5101885
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/entity/DateRequest.java
@@ -0,0 +1,19 @@
+package com.mes.largenscreen.entity;
+
+import com.mes.base.entity.PageRequest;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:42
+ * @Description:
+ */
+@Data
+public class DateRequest extends PageRequest {
+
+ @ApiModelProperty(value = "寮�濮嬫棩鏈� 鈥榶yyy-MM-dd鈥�")
+ private String BeginDate;
+ @ApiModelProperty(value = "缁撴潫鏃ユ湡 鈥榶yyy-MM-dd鈥�")
+ private String endDate;
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/mapper/LargenScreenMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/mapper/LargenScreenMapper.java
new file mode 100644
index 0000000..529b5fd
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/mapper/LargenScreenMapper.java
@@ -0,0 +1,16 @@
+package com.mes.largenscreen.mapper;
+
+import com.mes.largenscreen.entity.DailyProductionVO;
+
+import java.util.List;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:46
+ * @Description:
+ */
+
+public interface LargenScreenMapper {
+
+ List<DailyProductionVO> queryDailyProduction(String beginDate, String endDate);
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/LargenScreenService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/LargenScreenService.java
new file mode 100644
index 0000000..4e17c4f
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/LargenScreenService.java
@@ -0,0 +1,17 @@
+package com.mes.largenscreen.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mes.largenscreen.entity.DailyProductionVO;
+import com.mes.largenscreen.entity.DateRequest;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:27
+ * @Description:
+ */
+public interface LargenScreenService {
+
+ Page<DailyProductionVO> queryDailyProduction(DateRequest query);
+
+ DailyProductionVO querySameDayProduction(DateRequest query);
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/impl/LargenScreenServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/impl/LargenScreenServiceImpl.java
new file mode 100644
index 0000000..5df6c32
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/largenscreen/service/impl/LargenScreenServiceImpl.java
@@ -0,0 +1,51 @@
+package com.mes.largenscreen.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mes.largenscreen.entity.DailyProductionVO;
+import com.mes.largenscreen.entity.DateRequest;
+import com.mes.largenscreen.mapper.LargenScreenMapper;
+import com.mes.largenscreen.service.LargenScreenService;
+import com.mes.tools.PageUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 14:28
+ * @Description:
+ */
+@Service
+public class LargenScreenServiceImpl implements LargenScreenService {
+
+ @Resource
+ private LargenScreenMapper largenScreenMapper;
+
+ @Override
+ public Page<DailyProductionVO> queryDailyProduction(DateRequest query) {
+ if (StringUtils.isEmpty(query.getBeginDate())) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ query.setBeginDate(sdf.format(new Date()));
+ query.setEndDate(sdf.format(new Date()));
+ }
+ List<DailyProductionVO> list = largenScreenMapper.queryDailyProduction(query.getBeginDate(), query.getEndDate());
+ return (Page<DailyProductionVO>) PageUtil.listToPage(list, query.getPageNo(), query.getPageSize());
+ }
+
+ @Override
+ public DailyProductionVO querySameDayProduction(DateRequest query) {
+ if (StringUtils.isEmpty(query.getBeginDate())) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ query.setBeginDate(sdf.format(new Date()));
+ query.setEndDate(sdf.format(new Date()));
+ }
+ List<DailyProductionVO> list = largenScreenMapper.queryDailyProduction(query.getBeginDate(), query.getEndDate());
+ return list.get(0);
+ }
+
+
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/PageUtil.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/PageUtil.java
new file mode 100644
index 0000000..4968db4
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/PageUtil.java
@@ -0,0 +1,27 @@
+package com.mes.tools;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/3/12 15:29
+ * @Description:
+ */
+public class PageUtil {
+
+ public static IPage listToPage(List list, int pageNum, int pageSize) {
+ List pageList = new ArrayList<>();
+ int curIdx = pageNum > 1 ? (pageNum - 1) * pageSize : 0;
+ for (int i = 0; i < pageSize && curIdx + i < list.size(); i++) {
+ pageList.add(list.get(curIdx + i));
+ }
+ Page page = new Page(pageNum, pageSize);
+ page.setRecords(pageList);
+ page.setTotal(list.size());
+ return page;
+ }
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/LargenScreenMapper.xml b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/LargenScreenMapper.xml
new file mode 100644
index 0000000..4a1d640
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/LargenScreenMapper.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.mes.largenscreen.mapper.LargenScreenMapper">
+
+ <resultMap id="baseMap" type="com.mes.largenscreen.entity.DailyProductionVO">
+ <result column="date" property="date"/>
+ <result column="count_out_one" property="countOutOne"/>
+ <result column="total_area_out_one" property="totalAreaOutOne"/>
+ <result column="count_out_two" property="countOutTwo"/>
+ <result column="total_area_out_two" property="totalAreaOutTwo"/>
+ <result column="count_in" property="countIn"/>
+ <result column="total_area_in" property="totalAreaIn"/>
+ <result column="count_out" property="countOut"/>
+ <result column="total_area_out" property="totalAreaOut"/>
+ <result column="hollow_count_out_one" property="hollowCountOutOne"/>
+ <result column="hollow_total_area_out_one" property="hollowTotalAreaOutOne"/>
+ <result column="hollow_count_out_two" property="hollowCountOutTwo"/>
+ <result column="hollow_total_area_out_two" property="hollowTotalAreaOutTwo"/>
+ </resultMap>
+
+ <select id="queryDailyProduction" resultMap="baseMap">
+ WITH RECURSIVE
+ date_series AS (
+ SELECT #{beginDate} AS date
+ UNION ALL
+ SELECT DATE_ADD(date, INTERVAL 1 DAY)
+ FROM date_series
+ WHERE date <= DATE_SUB(#{endDate}, INTERVAL 1 DAY)
+ ),
+ one_edg_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id_out) as
+ count_out_one,
+ round(sum(t1.width * t1.height) / 1000000, 2) as total_area_out_one
+ from edg_storage_device_task_history t
+ inner join glass_info t1 on t.glass_id_in = t1.glass_id
+ where t.task_type in
+ (2, 3)
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d') BETWEEN #{beginDate} and #{endDate}
+ and device_id = 1
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ ),
+ two_edg_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id_out) as
+ count_out_two,
+ round(sum(t1.width * t1.height) / 1000000, 2) as total_area_out_two
+ from edg_storage_device_task_history t
+ inner join glass_info t1 on t.glass_id_in = t1.glass_id
+ where t.task_type in
+ (2, 3)
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d') BETWEEN #{beginDate} and #{endDate}
+ and device_id = 2
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ ),
+ big_storage_in_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id) as
+ count_in,
+ round(sum(t1.width * t1.height) / 1000000, 2) as total_area_in
+ from big_storage_cage_history_task t
+ INNER JOIN glass_info t1 on t.glass_id = t1.glass_id
+ where t.task_type = 1
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ BETWEEN #{beginDate} and #{endDate}
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ ),
+ big_storage_out_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id) as
+ count_out,
+ round(sum(t1.width * t1.height) / 1000000, 2) as total_area_out
+ from big_storage_cage_history_task t
+ INNER JOIN glass_info t1 on t.glass_id = t1.glass_id
+ where t.task_type = 2
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ BETWEEN #{beginDate} and #{endDate}
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ ),
+ hollow_out_one_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id) as
+ hollow_count_out_one,
+ round(sum(t1.width * t1.height) / 1000000, 2) as hollow_total_area_out_one
+ from hollow_big_storage_cage_history_task t
+ INNER JOIN glass_info t1 on t.glass_id = t1.glass_id
+ where t.task_type =
+ 5
+ and t.target_slot = 930
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d') BETWEEN #{beginDate} and #{endDate}
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ ),
+ hollow_out_two_temp as (
+ select STR_TO_DATE(t.create_time, '%Y-%m-%d') as product_date,
+ count(t.glass_id) as
+ hollow_count_out_two,
+ round(sum(t1.width * t1.height) / 1000000, 2) as hollow_total_area_out_two
+ from hollow_big_storage_cage_history_task t
+ INNER JOIN glass_info t1 on t.glass_id = t1.glass_id
+ where t.task_type =
+ 5
+ and t.target_slot = 931
+ and STR_TO_DATE(t.create_time, '%Y-%m-%d') BETWEEN #{beginDate} and #{endDate}
+ group by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ order by STR_TO_DATE(t.create_time, '%Y-%m-%d')
+ )
+ select t.date,
+ ifnull(t1.count_out_one, 0) count_out_one,
+ ifnull(t1.total_area_out_one, 0) total_area_out_one,
+ ifnull(t2.count_out_two, 0) count_out_two,
+ ifnull(t2.total_area_out_two, 0) total_area_out_two,
+ ifnull(t3.count_in, 0) count_in,
+ ifnull(t3.total_area_in, 0) total_area_in,
+ ifnull(t4.count_out, 0) count_out,
+ ifnull(t4.total_area_out, 0) total_area_out,
+ ifnull(t5.hollow_count_out_one, 0) hollow_count_out_one,
+ ifnull(t5.hollow_total_area_out_one, 0)
+ hollow_total_area_out_one,
+ ifnull(t6.hollow_count_out_two, 0) hollow_count_out_two,
+ ifnull(t6.hollow_total_area_out_two, 0)
+ hollow_total_area_out_two
+ from date_series t
+ left join one_edg_temp t1 on t.date = t1.product_date
+ left join two_edg_temp t2 on t.date =
+ t2.product_date
+ left join big_storage_in_temp t3 on t.date = t3.product_date
+ left join big_storage_out_temp t4 on t.date =
+ t4.product_date
+ left join hollow_out_one_temp t5 on t.date = t5.product_date
+ left join hollow_out_two_temp t6 on t.date =
+ t6.product_date
+ order by t.date
+ </select>
+
+
+</mapper>
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index 1362ff8..ca32684 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -5,13 +5,13 @@
import com.mes.common.config.Const;
import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
-import com.mes.edgstoragecage.entity.vo.CutDrawingVO;
import com.mes.edgstoragecage.entity.vo.EdgStorageCageVO;
import com.mes.edgstoragecage.service.EdgStorageCageDetailsService;
import com.mes.edgstoragecage.service.EdgStorageCageService;
import com.mes.engineering.entity.Engineering;
import com.mes.engineering.service.EngineeringService;
-import com.mes.opctask.entity.EdgStorageDeviceTask;
+import com.mes.largenscreen.entity.DailyProductionVO;
+import com.mes.largenscreen.service.LargenScreenService;
import com.mes.opctask.entity.EdgStorageDeviceTaskHistory;
import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService;
import com.mes.opctask.service.EdgStorageDeviceTaskService;
@@ -23,8 +23,6 @@
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CompletionStage;
/**
* @Author : zhoush
@@ -47,6 +45,8 @@
EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService;
@Resource
EngineeringService engineeringService;
+ @Resource
+ LargenScreenService largenScreenService;
private static final String EDG_STORAGE_DEVICE_ONE_TASK = "edg_storage_device_one_task";
@@ -146,6 +146,29 @@
}
}
+ @Scheduled(fixedDelay = 30000)
+ public void querySameDayProductionTask() {
+ JSONObject jsonObject = new JSONObject();
+ DailyProductionVO productionVO = largenScreenService.querySameDayProduction(null);
+ jsonObject.append("productionVO", productionVO);
+
+ ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreenProduction");
+ if (sendwServer != null) {
+ for (WebSocketServer webserver : sendwServer) {
+ if (webserver != null) {
+ webserver.sendMessage(jsonObject.toString());
+ List<String> messages = webserver.getMessages();
+ if (!messages.isEmpty()) {
+ // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
+ webserver.clearMessages();
+ }
+ } else {
+ log.info("largenScreenProduction is closed");
+ }
+ }
+ }
+ }
+
@Scheduled(fixedDelay = 1000)
public void largenScreen() {
JSONObject jsonObject = new JSONObject();
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
index 3752853..78ef546 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
@@ -12,7 +12,6 @@
import com.mes.bigstoragecagetask.entity.BigStorageTaskVO;
import com.mes.bigstoragecagetask.service.BigStorageCageTaskService;
import com.mes.common.config.Const;
-import com.mes.engineering.entity.Engineering;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.service.TemperingGlassInfoService;
@@ -73,8 +72,8 @@
BigStorageTaskVO task = new BigStorageTaskVO();
task.setGlassId(requestWord.getValue() + "");
int isExistCount = bigStorageCageDetailsService.count(new LambdaQueryWrapper<BigStorageCageDetails>().in(BigStorageCageDetails::getGlassId, task.getGlassId())
- .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO));
- if (isExistCount > 0 && "0".equals(targetSlotWord.getValue())) {
+ .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
+ if (isExistCount > 0) {
task.setIsSame(1);
} else {
task.setIsSame(0);
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index be5a2c2..0b867e9 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -142,8 +142,8 @@
BigStorageTaskVO task = new BigStorageTaskVO();
task.setGlassId(requestWord.getValue() + "");
int isExistCount = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>().in(HollowBigStorageCageDetails::getGlassId, task.getGlassId())
- .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO));
- if (isExistCount > 0 && "0".equals(targetSlotWord.getValue() + "")) {
+ .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
+ if (isExistCount > 0) {
task.setIsSame(1);
} else {
task.setIsSame(0);
@@ -203,8 +203,8 @@
jsonObject.append("bigStorageCageUsage", bigStorageCageUsage);
//鐞嗙墖绗间娇鐢ㄦ儏鍐垫眹鎬�
- HollowBigStorageDetailsQueryVO hollowBigStorageDetailsQueryVO=new HollowBigStorageDetailsQueryVO();
- List<FlowCardGlassInfoDTO> bigStorageCageUsageSummary= hollowGlassRelationInfoService.queryHollowAllFlowCardSummary(hollowBigStorageDetailsQueryVO);
+ HollowBigStorageDetailsQueryVO hollowBigStorageDetailsQueryVO = new HollowBigStorageDetailsQueryVO();
+ List<FlowCardGlassInfoDTO> bigStorageCageUsageSummary = hollowGlassRelationInfoService.queryHollowAllFlowCardSummary(hollowBigStorageDetailsQueryVO);
jsonObject.append("bigStorageCageUsageSummary", bigStorageCageUsageSummary);
}
--
Gitblit v1.8.0