CanadaMes-ui/src/api/home.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CanadaMes-ui/src/lang/locales/en-US.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CanadaMes-ui/src/lang/locales/zh-CN.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CanadaMes-ui/src/views/home/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
CanadaMes-ui/src/api/home.js
@@ -100,4 +100,10 @@ }) } export function SelectGlassByGlassID(glassid) { return request({ url: '/home/SelectGlassByGlassID?glassid='+glassid, method: 'get', data :"" }) } CanadaMes-ui/src/lang/locales/en-US.json
@@ -274,11 +274,13 @@ "Are you sure to perform this operation ?":"Are you sure to perform this operation ?", "prompt":"prompt", "Yes":"Yes", "No":"No", "Please enter the password":"Please enter the password", "Password error":"Password error", "DataBase Connection failed":"DataBase Connection failed", "Distribute parameters":"Distribute parameters" "Distribute parameters":"Distribute parameters", "The glass size is not within the range":"The glass size is not within the range" } CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -283,6 +283,7 @@ "Please enter the password":"请输入密码", "Password error":"密码错误", "DataBase Connection failed":"数据库连接失败", "Distribute parameters":"下发参数" "Distribute parameters":"下发参数", "The glass size is not within the range":"玻璃尺寸不在范围内" } CanadaMes-ui/src/views/home/index.vue
@@ -302,22 +302,22 @@ <el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')"> <el-form :model="form" label-width="100px" style="padding-right: 30px"> <el-form-item :label="$t('order')"> <el-input v-model="form.orderno" autocomplete="off" /> <el-input v-model="form.orderId" autocomplete="off" /> </el-form-item> <el-form-item :label="$t('glassid')"> <el-input v-model="form.glassId" autocomplete="off" /> </el-form-item> <el-form-item :label="$t('length')"> <el-input v-model="form.length" autocomplete="off" /> <el-input v-model="form.height" autocomplete="off" /> </el-form-item> <el-form-item :label="$t('width')"> <el-input v-model="form.width" autocomplete="off" /> </el-form-item> <el-form-item :label="$t('coating')"> <el-input v-model="form.coating" autocomplete="off" /> </el-form-item> </el-form> <template #footer> <span class="dialog-footer"> <el-button @click="cancal()">{{ $t('cancal') }}</el-button> <el-button @click="sbumitglassid()" type="primary">{{ $t('confirm') }}</el-button> <el-button @click="cancal()">{{ $t('cancal') }}</el-button> </span> </template> </el-dialog> @@ -332,8 +332,8 @@ </el-form> <template #footer> <span class="dialog-footer"> <el-button @click="cancal1()">{{ $t('cancal') }}</el-button> <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button> <el-button @click="cancal1()">{{ $t('cancal') }}</el-button> </span> </template> </el-dialog> @@ -370,7 +370,7 @@ </template> <script> import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword } from "../../api/home"; import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword, SelectGlassByGlassID } from "../../api/home"; import LanguageMixin from '../../lang/LanguageMixin' @@ -386,10 +386,10 @@ dialogFormVisible2: false, dialogFormVisible3: false, form: { orderno: "NG2210210", length: 800, width: 1000, coating: "red", orderId: "", glassId: "", height: "", width: "" }, form1: { order: "NG2210210", @@ -454,8 +454,6 @@ this.car2 = 210 + 8.15 * Math.abs(obj.params[0][1] - this.carlist[1]['start']) / Math.abs(this.carlist[1]['end'] - this.carlist[1]['start']) * 100; // this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100; // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100; console.log(obj.params[0][1], this.carlist[1]['start']); console.log(obj.params[0][0], this.carlist[0]['start']); } this.tableData = obj.tableData[0]; this.cagelist1 = obj.cagelist1[0]; @@ -464,7 +462,6 @@ this.cagelist4 = obj.cagelist4[0]; this.tasklist1 = obj.tasklist1[0]; this.tasklist2 = obj.tasklist2[0]; console.log(this.cagelist4); this.alarm = obj.alarmmg[0]; this.loadglassheight = obj.loadglassheight; this.zhuangtai = obj.zhuangtai[0]; @@ -518,7 +515,6 @@ }); Loadcarlist().then(res => { this.carlist = res.data.carlist; console.log(this.carlist); }); SelectPassword().then(res => { this.password = res.data.password; @@ -557,37 +553,41 @@ //手动上片 sbumitglassid() { if (this.form.order != "") { if (this.zhuangtai == true) { Addglassid(this.glassid).then(res => { if (res.data.message2 == 200) { this.$message.success(this.$t('Operation successful')); this.cancal(); } else if (res.data.message2 == 500) { this.$message.success(this.$t('There are currently tasks')); } else if (res.data.message2 == 300) { this.$message.success(this.$t('There is no such glass')); } else if (res.data.message2 == 400) { this.$message.success(this.$t('There is no such grid')); } }); if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) { this.$message.success(this.$t('The glass size is not within the range')); } else { this.$message.success(this.$t('There are currently tasks')); if (this.zhuangtai == true) { Addglassid(this.glassid).then(res => { if (res.data.message2 == 200) { this.$message.success(this.$t('Operation successful')); this.cancal(); } else if (res.data.message2 == 500) { this.$message.success(this.$t('There are currently tasks')); } else if (res.data.message2 == 300) { this.$message.success(this.$t('There is no such glass')); } else if (res.data.message2 == 400) { this.$message.success(this.$t('There is no such grid')); } }); } else { this.$message.success(this.$t('There are currently tasks')); } } } }, showform() { if (this.glassid != "") { this.form = { orderno: "NG2210210", length: 800, width: 1000, coating: "red", }; this.dialogFormVisible = true; SelectGlassByGlassID(this.glassid).then(res => { if(res.data.form!=null){ this.form = res.data.form; this.dialogFormVisible = true; }else{ this.$message.success(this.$t('There is no such glass')); } }); } }, showform1() { @@ -604,7 +604,12 @@ }, cancal() { this.dialogFormVisible = false; this.form = {}; this.form = { orderId: "", glassId: "", height: "", width: "" }; }, cancal1() { this.dialogFormVisible1 = false; springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -5,7 +5,6 @@ import java.util.ArrayList; import java.util.List; import org.apache.ibatis.javassist.tools.framedump; import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.alarmmg; springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -13,6 +13,7 @@ import com.example.springboot.common.Result; import com.example.springboot.component.S7control; import com.example.springboot.entity.CarPosition; import com.example.springboot.entity.Glass; import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.alarmmg; @@ -80,7 +81,7 @@ @GetMapping("/Addglassid") public Result Addglassid(short glassid) { Map<String, Object> map = new HashMap<>(); short taskno = homeMapper.SelectOutTask(); short taskno = homeMapper.SelectInTask(); if (taskno > 0) { map.put("message2", "500"); } else { @@ -173,5 +174,11 @@ return Result.success(map); } @GetMapping("/SelectGlassByGlassID") public Result SelectGlassByGlassID(String glassid) { Glass Glass = homeMapper.SelectGlassByGlassID(glassid); Map<String, Object> map = new HashMap<>(); map.put("form", Glass); return Result.success(map); } } springboot-vue3/src/main/java/com/example/springboot/entity/Glass.java
@@ -4,6 +4,7 @@ private Integer id; private Short orderId; private double glassWidth; private double glassHeight; private Short glassId; @@ -30,6 +31,14 @@ return glassWidth; } public void setHeight(double glassHeight) { this.glassHeight = glassHeight; } public double getHeight() { return glassHeight; } public void setWidth(double glassWidth) { this.glassWidth = glassWidth; } springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -3,6 +3,7 @@ import org.apache.ibatis.annotations.*; import com.example.springboot.entity.CarPosition; import com.example.springboot.entity.Glass; import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.alarmmg; @@ -14,19 +15,19 @@ @Select("select cage,round(100-(21-sum(state))/21*100) as cell,21-sum(state) as state from (select cage,cell,max(state) as state from storage_cage group by cage,cell) as cages group by cage") List<StorageCage> selectAll(); // 查询1-5笼内层格子状态 // 查询10-6笼内层格子状态 @Select("SELECT cage,state,ifnull(glasswidth/2750*2,0) as glasswidth from storage_cage where cage>5 and tier=2 order by cage desc,cell desc") List<StorageCage> selectRack1(); // 查询6-10笼内层格子状态 // 查询5-1笼内层格子状态 @Select("SELECT cage,state,ifnull(glasswidth/2750*2,0) as glasswidth from storage_cage where cage<=5 and tier=2 order by cage desc,cell desc") List<StorageCage> selectRack2(); // 查询1-5笼外层格子状态 // 查询10-6笼外层格子状态 @Select("SELECT case when tier=1 then cage else 0 end as cage,case when tier=1 then state else 0 end as state,sum(case when tier=1 then glasswidth/2750*2 else 0 end) as glasswidth,sum(case when tier=2 then glasswidth/2750*2 else 0 end) as width from storage_cage where cage>5 group by cage,cell order by cage desc,cell desc") List<StorageCage> selectRack3(); // 查询6-10笼外层格子状态 // 查询5-1笼外层格子状态 @Select("SELECT case when tier=1 then cage else 0 end as cage,case when tier=1 then state else 0 end as state,sum(case when tier=1 then glasswidth/2750*2 else 0 end) as glasswidth,sum(case when tier=2 then glasswidth/2750*2 else 0 end) as width from storage_cage where cage<=5 group by cage,cell order by cage desc,cell desc") List<StorageCage> selectRack4(); @@ -47,8 +48,8 @@ void updateOrder(); // 查询是否存在正在上片的任务 @Select("select count(*) from storage_task where task_state=0 and task_type=1") short SelectOutTask(); @Select("select count(*) from storage_task where task_state=0 and task_type=0") short SelectInTask(); // 手动完成任务 @Update("update storage_task set task_state=1 where task_type=#{task_type} and task_state=0") @@ -82,4 +83,7 @@ @Select("select * from storage_cage where glass_id=#{glassid}") StorageCage SelectGlassInfo(Integer glassid); @Select("select * from glass where glassid=#{glassid}") Glass SelectGlassByGlassID(String glassid); }