Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
| | |
| | | data :""
|
| | | })
|
| | | }
|
| | |
|
| | | export function Loadcarlist() {
|
| | | return request({
|
| | | url: '/home/Loadcarlist',
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | | }
|
| | |
|
| | |
| | |
|
| | | .gezi {
|
| | | height: 35px;
|
| | | |
| | |
|
| | | position: absolute;
|
| | | width: 3.07px;
|
| | | width: 3.08px;
|
| | | /* width: 4.22px; */
|
| | | }
|
| | |
|
| | | .gezi:nth-child(22),
|
| | | /* .gezi:nth-child(22),
|
| | | .gezi:nth-child(43),
|
| | | .gezi:nth-child(64),
|
| | | .gezi:nth-child(85) {
|
| | | margin-left: 7px;
|
| | | /* margin-left: 10px; */
|
| | | }
|
| | | margin-left: 10px;
|
| | | } */
|
| | |
|
| | |
|
| | |
|
| | | .blocks {
|
| | |
|
| | | |
| | |
|
| | | background-image: url('../../img/xmjc.png');
|
| | | margin: 0 auto;
|
| | | background-repeat: no-repeat;
|
| | |
| | | <el-footer>
|
| | | <div class="blocks" style="position: relative;">
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px',left:3.07*index+'px' }" @click="showcageinfo(item['cage'])"></div>
|
| | | <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist1" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index+(item['cage']-1)*6.8 + 'px' }"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:640px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist2" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px',left:3.07*index+'px' }" @click="showcageinfo(item['cage'])"></div>
|
| | | <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist2" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index+(item['cage']-6)*6.8 + 'px' }"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:237px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist3" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:3.07*index+'px' }"
|
| | | <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist3" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index+(item['cage']-1)*6.8 + 'px' }"
|
| | | @click="showcageinfo(item['cage'])">
|
| | | </div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:640px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist4" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:3.07*index+'px' }"
|
| | | <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist4" :key="item['date']"
|
| | | :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index+(item['cage']-6)*6.8 + 'px' }"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
|
| | |
| | | </template>
|
| | | <script>
|
| | |
|
| | | import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID } from "../../api/home";
|
| | | import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist } from "../../api/home";
|
| | |
|
| | |
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | |
| | | order: "",
|
| | | glassid: "",
|
| | | url: "../../img/bigcar01.png",
|
| | | car1: 107,
|
| | | car2: 175,
|
| | | // car1: 150,
|
| | | // car2: 242,
|
| | | car1: 145,
|
| | | car2: 210,
|
| | | // car1: 210,
|
| | | // car2: 300,
|
| | | cageinfo: [],
|
| | | cage: 0
|
| | | cage: 0,
|
| | | carlist: []
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | if (obj.params != null) {
|
| | | this.car1 = 107 + 17.62 * obj.params[0][0]/1000;
|
| | | this.car2 = 175 + 17.62 * obj.params[0][1]/1000;
|
| | | // this.car1 = 150 + 24.6 * obj.params[0][0]/1000;
|
| | | // this.car2 = 242 + 24.6 * obj.params[0][1]/1000;
|
| | | this.car1 = 145 + 8.15 * (obj.params[0][0] - this.carlist[0]['start']) / (this.carlist[0]['end'] - this.carlist[0]['start']) * 100;
|
| | | this.car2 = 210 + 8.15 * (obj.params[0][1] - this.carlist[1]['start']) / (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;
|
| | | }
|
| | | this.tableData = obj.tableData[0];
|
| | | this.cagelist1 = obj.cagelist1[0];
|
| | |
| | | if (res.data.list.length > 0) {
|
| | | this.outcell = this.tasklist2[0]['cell'];
|
| | | }
|
| | |
|
| | | });
|
| | | loadtask(this.task2).then(res => {
|
| | | this.tasklist2 = res.data.list;
|
| | |
|
| | | });
|
| | | SelectAlarmmgInfo().then(res => {
|
| | | this.alarm = res.data.alarmmg;
|
| | | });
|
| | | Loadcarlist().then(res => {
|
| | | this.carlist = res.data.carlist;
|
| | | console.log(this.carlist);
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | | getStatusClass(state) {
|
| | |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | // 读去Plc进片车与出片车位置W |
| | | List<String> addressList = new ArrayList<String>(); |
| | | addressList.add("DB106.0"); |
| | | addressList.add("DB106.12"); |
| | | addressList.add("DB106.0"); |
| | | List<Short> paramlist = S7control.getinstance().ReadWord(addressList); |
| | | |
| | | // List<Short> paramlists = new ArrayList<Short>(); |
| | | // short para1 = 1; |
| | | // short para2 = 2; |
| | | // short para1 = 11111; |
| | | // short para2 = 32000; |
| | | // paramlists.add(para1); |
| | | // paramlists.add(para2); |
| | | // System.out.println(paramlists); |
| | | |
| | | if(paramlist!=null){ |
| | | // Short[] paramlists = paramlist.toArray(new Short[0]); |
| | | jsonObject.append("params", paramlist); |
| | | } |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | |
| | | import com.example.springboot.service.HomeService; |
| | | import com.example.springboot.service.SpianService; |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | |
| | | |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) { |
| | | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用伍上片函数 |
| | | Short results = spianService.selectout2(glassid); |
| | |
| | | } else if (results == 400) { |
| | | map.put("message2", "400"); |
| | | } |
| | | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/Loadcarlist") |
| | | public Result Loadcarlist() { |
| | | List<CarPosition> carlist = homeMapper.Loadcarlist(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("carlist", carlist); |
| | | return Result.success(map); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class CarPosition { |
| | | public int carid; |
| | | public int start; |
| | | public int end; |
| | | |
| | | public void setcarId(Integer carid) { |
| | | this.carid = carid; |
| | | } |
| | | |
| | | public Integer getcarId() { |
| | | return carid; |
| | | } |
| | | |
| | | public void setStart(Integer start) { |
| | | this.start = start; |
| | | } |
| | | |
| | | public Integer getStart() { |
| | | return start; |
| | | } |
| | | |
| | | public void setEnd(Integer end) { |
| | | this.end = end; |
| | | } |
| | | |
| | | public Integer getEnd() { |
| | | return end; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | |
| | | @Mapper |
| | | public interface HomeMapper { |
| | | //查询每个笼子的使用情况 |
| | | @Select("SELECT cage,ROUND(sum(case when state=1 or state=2 or state=3 then 1 else 0 end)/42*100) as cell,42-sum(case when state=1 or state=2 or state=3 then 1 else 0 end) as state FROM `storage_cage` group by cage") |
| | | @Select("select cage,round((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笼内层格子状态 |
| | |
| | | List<StorageCage> selectRack2(); |
| | | |
| | | // 查询1-5笼外层格子状态 |
| | | @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 cell") |
| | | @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") |
| | | List<StorageCage> selectRack3(); |
| | | |
| | | // 查询6-10笼外层格子状态 |
| | | @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 cell") |
| | | @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") |
| | | List<StorageCage> selectRack4(); |
| | | |
| | | // 根据任务类型查询当前正在出片,进片的玻璃信息 |
| | |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,coating=null where glass_id=#{glassid}") |
| | | void DeleteByGlassID(short glassid); |
| | | |
| | | @Select("select * from car_position") |
| | | List<CarPosition> Loadcarlist(); |
| | | |
| | | } |