From 9701924a0a0c30e54f379ec226acb09f71d6686f Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 29 五月 2025 18:33:14 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 6 +++
src/main/webapp/views/deviceOperate/errorTaskOperate.html | 38 +++++++++++++++++-
src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java | 6 +++
src/main/resources/mapper/LocMastMapper.xml | 42 +++++++++++++++++++++
src/main/java/com/zy/asrs/mapper/LocMastMapper.java | 2 +
src/main/java/com/zy/asrs/service/LocMastService.java | 2 +
6 files changed, 93 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java b/src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java
index 8f30756..066f420 100644
--- a/src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java
+++ b/src/main/java/com/zy/asrs/controller/BasErrorDeviceController.java
@@ -47,4 +47,10 @@
return R.ok(errorDeviceParamList);
}
+ @RequestMapping(value = "/locSts/adjacentLocMast")
+ @ManagerAuth
+ public R adjacentLocMast() {
+ return R.ok(locMastService.adjacentLocMast());
+ }
+
}
diff --git a/src/main/java/com/zy/asrs/mapper/LocMastMapper.java b/src/main/java/com/zy/asrs/mapper/LocMastMapper.java
index 9350973..dda60cd 100644
--- a/src/main/java/com/zy/asrs/mapper/LocMastMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zy.asrs.entity.LocMast;
+import com.zy.asrs.entity.param.ErrorDeviceParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -16,6 +17,7 @@
LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1);
List<LocMast> asrLocMastNotInDetl1();
List<LocMast> asrLocMastNotInDetl2();
+ List<ErrorDeviceParam> adjacentLocMast();
@Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}")
List<String> queryGroupEmptyStock(Integer crnNo);
diff --git a/src/main/java/com/zy/asrs/service/LocMastService.java b/src/main/java/com/zy/asrs/service/LocMastService.java
index d5fc919..26d994e 100644
--- a/src/main/java/com/zy/asrs/service/LocMastService.java
+++ b/src/main/java/com/zy/asrs/service/LocMastService.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.service.IService;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocMast;
+import com.zy.asrs.entity.param.ErrorDeviceParam;
import java.util.List;
@@ -14,6 +15,7 @@
LocMast queryFreeLocMast(Integer row, Short locType1);
List<LocMast> asrLocMastNotInDetl1();
List<LocMast> asrLocMastNotInDetl2();
+ List<ErrorDeviceParam> adjacentLocMast();
/**
* 鑾峰彇鍚岀粍璐ф灦鐨勭┖搴撲綅
diff --git a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
index bebbb96..3ac882a 100644
--- a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -4,6 +4,7 @@
import com.core.common.Cools;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocMast;
+import com.zy.asrs.entity.param.ErrorDeviceParam;
import com.zy.asrs.mapper.LocMastMapper;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.RowLastnoService;
@@ -35,6 +36,11 @@
}
@Override
+ public List<ErrorDeviceParam> adjacentLocMast() {
+ return this.baseMapper.adjacentLocMast();
+ }
+
+ @Override
public List<String> queryGroupEmptyStock(String sourceLocNo) {
if (Cools.isEmpty(sourceLocNo)) {
return null;
diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 622df9b..4c40003 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -37,6 +37,16 @@
</resultMap>
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMapError" type="com.zy.asrs.entity.param.ErrorDeviceParam">
+ <result column="category" property="category" />
+ <result column="equipmentNo" property="equipmentNo" />
+ <result column="categoryOther" property="categoryOther" />
+ <result column="equipmentNoOther" property="equipmentNoOther" />
+ <result column="errorM" property="errorM" />
+
+ </resultMap>
+
<select id="queryFreeLocMast" resultMap="BaseResultMap">
select top 1 *
from asr_loc_mast
@@ -69,6 +79,38 @@
)
</select>
+ <!-- 娣辨祬搴撲綅涓嶄竴鑷�-->
+ <select id="adjacentLocMast" resultMap="BaseResultMapError">
+ SELECT
+ a.loc_no AS category,
+ a.loc_sts AS equipmentNo,
+ neighbor.loc_no AS categoryOther,
+ neighbor.loc_sts AS equipmentNoOther,
+ "娣辨祬搴撲綅涓嶄竴鑷�" AS errorM
+ FROM
+ asr_loc_mast AS a
+ JOIN
+ asr_loc_mast AS neighbor ON
+ a.bay1 = neighbor.bay1 AND
+ a.lev1 = neighbor.lev1 AND
+ (
+ (a.row1 = 1 AND neighbor.row1 = 2) OR
+ (a.row1 = 2 AND neighbor.row1 = 1) OR
+ (a.row1 = 3 AND neighbor.row1 = 4) OR
+ (a.row1 = 4 AND neighbor.row1 = 3) OR
+ (a.row1 = 5 AND neighbor.row1 = 6) OR
+ (a.row1 = 6 AND neighbor.row1 = 5) OR
+ (a.row1 = 7 AND neighbor.row1 = 8) OR
+ (a.row1 = 8 AND neighbor.row1 = 7)
+ )
+ WHERE
+ a.row1 IN (2,3,6,7)
+ AND NOT (
+ a.loc_sts = neighbor.loc_sts OR
+ (a.loc_sts IN ('F', 'D') AND neighbor.loc_sts IN ('F', 'D'))
+ )
+ </select>
+
<select id="queryShallowLocFMast" resultMap="BaseResultMap">
select * from asr_loc_mast
where 1=1
diff --git a/src/main/webapp/views/deviceOperate/errorTaskOperate.html b/src/main/webapp/views/deviceOperate/errorTaskOperate.html
index 26f536d..1d01382 100644
--- a/src/main/webapp/views/deviceOperate/errorTaskOperate.html
+++ b/src/main/webapp/views/deviceOperate/errorTaskOperate.html
@@ -19,8 +19,7 @@
<body>
<div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
<div style="width: 100%;">
- <el-table border ref="singleTable" :data="tableData" highlight-current-row
- max-height="350" style="width: 100%">
+ <el-table border ref="singleTable" :data="tableData" style="width: 100%">
<el-table-column property="category" label="绫诲埆">
</el-table-column>
<el-table-column property="equipmentNo" label="璁惧鍙�">
@@ -33,13 +32,28 @@
</el-table-column>
</el-table>
</div>
+ <div style="width: 100%;">
+ <el-table border ref="singleTable" :data="adjacentLocMast" style="width: 100%">
+ <el-table-column property="category" label="褰撳墠搴撲綅">
+ </el-table-column>
+ <el-table-column property="equipmentNo" label="褰撳墠搴撲綅鐘舵��">
+ </el-table-column>
+ <el-table-column property="categoryOther" label="鐩搁偦搴撲綅">
+ </el-table-column>
+ <el-table-column property="equipmentNoOther" label="鐩搁偦搴撲綅鐘舵��">
+ </el-table-column>
+ <el-table-column property="errorM" label="寮傚父鎻忚堪">
+ </el-table-column>
+ </el-table>
+ </div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
- tableData: []
+ tableData: [],
+ adjacentLocMast: []
},
created() {
this.init()
@@ -49,9 +63,11 @@
methods: {
init() {
this.getTableData()
+ this.getAdjacentLocMast()
setInterval(() => {
this.getTableData()
+ this.getAdjacentLocMast()
// this.demoStatus()
}, 1000)
},
@@ -74,6 +90,22 @@
that.tableData = res.data
}
});
+ },
+ getAdjacentLocMast() {
+ let that = this;
+ $.ajax({
+ url: baseUrl + "/error/device/locSts/adjacentLocMast",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {},
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
+ method: 'post',
+ success: function (res) {
+ that.adjacentLocMast = res.data
+ }
+ });
}
}
})
--
Gitblit v1.9.1