New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.param.ErrorDeviceParam; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("error/device") |
| | | public class BasErrorDeviceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @RequestMapping(value = "/task/depthAndShallowness") |
| | | @ManagerAuth |
| | | public R taskDepthAndShallowness() { |
| | | ArrayList<ErrorDeviceParam> errorDeviceParamList = new ArrayList<>(); |
| | | List<LocMast> locMastList1 = locMastService.asrLocMastNotInDetl1(); |
| | | |
| | | for (LocMast locMast : locMastList1){ |
| | | ErrorDeviceParam errorDeviceParam = new ErrorDeviceParam(); |
| | | errorDeviceParam.setErrorM("库位为F但没有明细"); |
| | | errorDeviceParam.setCategory("库位"); |
| | | errorDeviceParam.setEquipmentNo(locMast.getLocNo()); |
| | | errorDeviceParamList.add(errorDeviceParam); |
| | | } |
| | | |
| | | List<LocMast> locMastList2 = locMastService.asrLocMastNotInDetl2(); |
| | | |
| | | for (LocMast locMast : locMastList2){ |
| | | ErrorDeviceParam errorDeviceParam = new ErrorDeviceParam(); |
| | | errorDeviceParam.setErrorM("库位为SRQP但没有工作档案"); |
| | | errorDeviceParam.setCategory("库位"); |
| | | errorDeviceParam.setEquipmentNo(locMast.getLocNo()); |
| | | errorDeviceParamList.add(errorDeviceParam); |
| | | } |
| | | return R.ok(errorDeviceParamList); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | /** |
| | | * Created by vincent on 2020/6/28 |
| | | */ |
| | | @Data |
| | | public class ErrorDeviceParam { |
| | | |
| | | private String category = "-";// 字符串 类别 |
| | | private String equipmentNo = "-";// 是 字符串 设备号 |
| | | private String categoryOther = "-";// 字符串 相关设备类别 |
| | | private String equipmentNoOther = "-";// 字符串 相关设备号 |
| | | private String errorM = "-";// 字符串 异常描述 |
| | | |
| | | } |
| | |
| | | public interface LocMastMapper extends BaseMapper<LocMast> { |
| | | |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); |
| | | List<LocMast> asrLocMastNotInDetl1(); |
| | | List<LocMast> asrLocMastNotInDetl2(); |
| | | |
| | | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | List<String> queryGroupEmptyStock(Integer crnNo); |
| | |
| | | * 检索可用库位 |
| | | */ |
| | | LocMast queryFreeLocMast(Integer row, Short locType1); |
| | | List<LocMast> asrLocMastNotInDetl1(); |
| | | List<LocMast> asrLocMastNotInDetl2(); |
| | | |
| | | /** |
| | | * 获取同组货架的空库位 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> asrLocMastNotInDetl1() { |
| | | return this.baseMapper.asrLocMastNotInDetl1(); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> asrLocMastNotInDetl2() { |
| | | return this.baseMapper.asrLocMastNotInDetl2(); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> queryGroupEmptyStock(String sourceLocNo) { |
| | | if (Cools.isEmpty(sourceLocNo)) { |
| | | return null; |
| | |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | |
| | | <!-- 库位为F但没有明细--> |
| | | <select id="asrLocMastNotInDetl1" resultMap="BaseResultMap"> |
| | | SELECT a.* |
| | | FROM asr_loc_mast AS a |
| | | LEFT JOIN asr_loc_detl AS b ON a.loc_no = b.loc_no |
| | | WHERE a.loc_sts = 'F' |
| | | AND b.loc_no IS NULL |
| | | </select> |
| | | |
| | | <!-- 库位为SRQP但没有工作档案--> |
| | | <select id="asrLocMastNotInDetl2" resultMap="BaseResultMap"> |
| | | SELECT a.* |
| | | FROM asr_loc_mast AS a |
| | | WHERE a.loc_sts IN ('S','R','Q','P') |
| | | AND NOT EXISTS ( |
| | | SELECT 1 |
| | | FROM asr_wrk_mast AS d |
| | | WHERE a.loc_no = d.loc_no OR a.loc_no = d.source_loc_no |
| | | ) |
| | | </select> |
| | | |
| | | <select id="queryShallowLocFMast" resultMap="BaseResultMap"> |
| | | select * from asr_loc_mast |
| | | where 1=1 |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>硫化罐设备</title> |
| | | <link rel="stylesheet" href="../../static/css/element.css"> |
| | | <link rel="stylesheet" href="../../static/css/element-ui.css"> |
| | | <link rel="icon" href="../../static/images/favicon.ico" type="image/x-icon"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../../static/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/element.js"></script> |
| | | </head> |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | | <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 @row-click="handleRowClick" |
| | | max-height="350" 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: { |
| | | showLayer: false, |
| | | valueUpdate: false, |
| | | selectedOption: null, |
| | | updateJarNo: null, |
| | | optionsUpdate: [ |
| | | { id: '1', value: '1', text: '1托' }, |
| | | { id: '2', value: '2', text: '2托' }, |
| | | { id: '3', value: '3', text: '3托' }, |
| | | { id: '4', value: '4', text: '4托' }, |
| | | { id: '5', value: '5', text: '5托' }, |
| | | { id: '6', value: '6', text: '6托' }, |
| | | { id: '7', value: '7', text: '7托' }, |
| | | { id: '999', value: '999', text: '取消' }, |
| | | ], |
| | | tableData: [], |
| | | currentRow: null, |
| | | currentTitle: "未选择设备", |
| | | currentIndex: null, |
| | | formParam: { |
| | | rgvNo: null, |
| | | sourceStaNo: null, |
| | | sourceRow: 1, |
| | | sourceBay: 0, |
| | | sourceLev: 1, |
| | | staNo: null, |
| | | row: 1, |
| | | bay: 0, |
| | | lev: 1, |
| | | barcode:null, |
| | | barcodeType:null, |
| | | emptyContainer:null |
| | | }, |
| | | formParamD: { |
| | | rgvNo: null, |
| | | sourceStaNo: null, |
| | | sourceRow: 1, |
| | | sourceBay: 0, |
| | | sourceLev: 1, |
| | | staNo: null, |
| | | row: 1, |
| | | bay: 0, |
| | | lev: 1, |
| | | barcode:null, |
| | | barcodeType:null, |
| | | emptyContainer:null |
| | | }, |
| | | enableIn: false, |
| | | enableOut: false, |
| | | options:[ |
| | | { |
| | | value:'1', |
| | | label:'是' |
| | | }, |
| | | { |
| | | value:'0', |
| | | label:'否' |
| | | } |
| | | ], |
| | | demo: 'X', |
| | | rgvMode: 0, |
| | | itemMast: [] |
| | | }, |
| | | created() { |
| | | this.init() |
| | | }, |
| | | watch: { |
| | | valueUpdate(newVal) { |
| | | if (newVal) { |
| | | this.showLayer = true; |
| | | // 可以在这里添加延时关闭层或其他逻辑 |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | historicalTasks(){ |
| | | let that = this |
| | | that.selectedOption = 0; |
| | | that.valueUpdate = false; |
| | | if (that.currentIndex != null){ |
| | | $.ajax({ |
| | | url: baseUrl + "/basJarMastLog/historicalTasks/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data:{ |
| | | id: that.tableData[that.currentIndex].jarNo |
| | | }, |
| | | success: function (res) { |
| | | that.itemMast = res.data |
| | | // console.log(that.itemMast) |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | staTova(sta,end){ |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/rgvDemoTask", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data:{ |
| | | rgvNo : this.formParam.rgvNo, |
| | | sta : sta, |
| | | end : end |
| | | }, |
| | | method: 'Get', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | init() { |
| | | this.getTableData() |
| | | |
| | | setInterval(() => { |
| | | this.getTableData() |
| | | // this.demoStatus() |
| | | }, 1000) |
| | | }, |
| | | confirmEvent() { |
| | | var that = this |
| | | that.valueUpdate = true; |
| | | }, |
| | | cancelEvent() { |
| | | var that = this |
| | | that.valueUpdate = false; |
| | | }, |
| | | handleSubmit() { |
| | | if ( this.selectedOption > 998 ){ |
| | | this.selectedOption = 0; |
| | | this.valueUpdate = false; |
| | | } else if ( this.selectedOption > 0 ){ |
| | | var that = this |
| | | if (that.updateJarNo == null){ |
| | | console.log("this.updateJarNo;null;null;null;null;null") |
| | | } else { |
| | | $.ajax({ |
| | | url: baseUrl + "/basJar/update/uodate/jar/count/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | jarCount: that.selectedOption, |
| | | jarNo: that.updateJarNo |
| | | }, |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | this.selectedOption = 0; |
| | | this.valueUpdate = false; |
| | | } |
| | | }, |
| | | handleRowClick(row, col, event) { |
| | | var that = this |
| | | const index = that.tableData.indexOf(row) |
| | | that.currentRow = row; |
| | | that.currentIndex = index |
| | | this.updateJarNo = row.jarNo |
| | | that.currentTitle = row.jarNo + "号硫化罐" |
| | | that.formParam.rgvNo = row.rgvNo |
| | | that.enableIn = row.inEnable == "Y" ? true : false |
| | | that.enableOut = row.outEnable == "Y" ? true : false |
| | | this.selectedOption = 0; |
| | | this.valueUpdate = false; |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/basJarMast/JatId/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | id: row.jarNo |
| | | }, |
| | | success: function (res) { |
| | | that.itemMast = res.data |
| | | // console.log(that.itemMast) |
| | | } |
| | | }); |
| | | }, |
| | | getTableData() { |
| | | let that = this; |
| | | $.ajax({ |
| | | url: baseUrl + "/error/device/task/depthAndShallowness", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'post', |
| | | success: function (res) { |
| | | that.tableData = res.data |
| | | } |
| | | }); |
| | | }, |
| | | demoStatus() { |
| | | let that = this; |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/demo/status", |
| | | data:{ |
| | | rgvNo : this.formParam.rgvNo |
| | | }, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'get', |
| | | success: function (res) { |
| | | // console.log(res) |
| | | that.demo = res.data.demo |
| | | that.rgvMode = res.data.rgvMode |
| | | } |
| | | }); |
| | | }, |
| | | initiate(){ |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/operator/put", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | initiateD(method){ |
| | | let urlS = "/rgv/operator/single/step/three/put"; |
| | | if (method===1){ |
| | | urlS = "/rgv/operator/single/step/one/put"; |
| | | }else if (method === 2){ |
| | | urlS = "/rgv/operator/single/step/two/put"; |
| | | }else if (method === 3){ |
| | | urlS = "/rgv/operator/single/step/three/put"; |
| | | } |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + urlS, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | demos(method){ |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/demo/status/" + method, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data:{ |
| | | rgvNo : this.formParam.rgvNo |
| | | }, |
| | | method: 'Get', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | rgvStatus(method){ |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/demo/status/rgvStatus", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data:{ |
| | | rgvNo : this.formParam.rgvNo, |
| | | status : Number(method) |
| | | }, |
| | | method: 'Get', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | requestOperate(method) { |
| | | let that = this |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/rgv/operator/" + method, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | }, |
| | | updateEnableInOut(type) { |
| | | let that = this |
| | | let param = {} |
| | | if (type == "in") { |
| | | param = { |
| | | inEnable: this.enableIn ? "Y" : "N", |
| | | rgvNo: this.formParam.rgvNo |
| | | } |
| | | } else { |
| | | param = { |
| | | outEnable: this.enableOut ? "Y" : "N", |
| | | rgvNo: this.formParam.rgvNo |
| | | } |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/basCrnp/update/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: param, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |