| | |
| | | })
|
| | | }
|
| | |
|
| | |
|
| | | export function SelectGlassByGlassID(glassid) {
|
| | | return request({
|
| | | url: '/home/SelectGlassByGlassID?glassid='+glassid,
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | | }
|
| | |
| | | "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"
|
| | |
|
| | | } |
| | |
| | | "Please enter the password":"请输入密码",
|
| | | "Password error":"密码错误",
|
| | | "DataBase Connection failed":"数据库连接失败",
|
| | | "Distribute parameters":"下发参数"
|
| | | "Distribute parameters":"下发参数",
|
| | | "The glass size is not within the range":"玻璃尺寸不在范围内"
|
| | |
|
| | | } |
| | |
| | | <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>
|
| | |
| | | </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>
|
| | |
| | | </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'
|
| | |
| | | dialogFormVisible2: false,
|
| | | dialogFormVisible3: false,
|
| | | form: {
|
| | | orderno: "NG2210210",
|
| | | length: 800,
|
| | | width: 1000,
|
| | | coating: "red",
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | },
|
| | | form1: {
|
| | | order: "NG2210210",
|
| | |
| | | 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];
|
| | |
| | | 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];
|
| | |
| | | });
|
| | | Loadcarlist().then(res => {
|
| | | this.carlist = res.data.carlist;
|
| | | console.log(this.carlist);
|
| | | });
|
| | | SelectPassword().then(res => {
|
| | | this.password = res.data.password;
|
| | |
| | | //手动上片
|
| | | sbumitglassid() {
|
| | | if (this.form.order != "") {
|
| | | 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 {
|
| | | if (this.zhuangtai == true) {
|
| | | Addglassid(this.glassid).then(res => {
|
| | | if (res.data.message2 == 200) {
|
| | |
| | | } else {
|
| | | this.$message.success(this.$t('There are currently tasks'));
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | },
|
| | | showform() {
|
| | | if (this.glassid != "") {
|
| | | this.form =
|
| | | {
|
| | | orderno: "NG2210210",
|
| | | length: 800,
|
| | | width: 1000,
|
| | | coating: "red",
|
| | | };
|
| | | 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() {
|
| | |
| | | },
|
| | | cancal() {
|
| | | this.dialogFormVisible = false;
|
| | | this.form = {};
|
| | | this.form = {
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | };
|
| | | },
|
| | | cancal1() {
|
| | | this.dialogFormVisible1 = false;
|
| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | @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 { |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | private Integer id; |
| | | private Short orderId; |
| | | private double glassWidth; |
| | | private double glassHeight; |
| | | private Short glassId; |
| | | |
| | | |
| | |
| | | return glassWidth; |
| | | } |
| | | |
| | | public void setHeight(double glassHeight) { |
| | | this.glassHeight = glassHeight; |
| | | } |
| | | |
| | | public double getHeight() { |
| | | return glassHeight; |
| | | } |
| | | |
| | | public void setWidth(double glassWidth) { |
| | | this.glassWidth = glassWidth; |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | @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(); |
| | | |
| | |
| | | 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") |
| | |
| | | @Select("select * from storage_cage where glass_id=#{glassid}") |
| | | StorageCage SelectGlassInfo(Integer glassid); |
| | | |
| | | @Select("select * from glass where glassid=#{glassid}") |
| | | Glass SelectGlassByGlassID(String glassid); |
| | | |
| | | } |