| | |
| | | "Hand Movement":"Hand Movement",
|
| | | "Please enter the correct glassID":"Please enter the correct glassID",
|
| | | "Switch":"Switch",
|
| | | "This frame has glass that is currently outing":"This frame has glass that is currently outing",
|
| | | "ServoManualone": {
|
| | | "A01 所在格子": "A01 Current Grid",
|
| | | "数量": "Quantity",
|
| | |
| | | "northglassMESsystem": "北玻MES系统",
|
| | | "exit": "退出",
|
| | | "changePassword": "修改密码",
|
| | | "Old password":"旧密码",
|
| | | "New password":"新密码",
|
| | | "Confirm password":"提交密码",
|
| | | "resetPassword": "重置密码",
|
| | | "home": "主页",
|
| | | "role": "角色",
|
| | |
| | | "Hand Movement":"手动",
|
| | | "Please enter the correct glassID":"请输入正确的玻璃ID",
|
| | | "Switch":"切换",
|
| | | "This frame has glass that is currently outing":"此铝框有正在出片的玻璃",
|
| | | "langparameter": {
|
| | | "conveyor Velocity(Auto FAST)": "D01-D06 皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "D01-D06 皮带输送自动慢速",
|
| | |
| | | // import Tag from '../layout/tag.vue'; |
| | | // import store from '../store'; |
| | | let socket; |
| | | let timer; |
| | | |
| | | export default { |
| | | name: "Layout", |
| | |
| | | }, |
| | | //45秒复位倒数计时 |
| | | CountDown() { |
| | | let count = 45; |
| | | let timer = setInterval( |
| | | let count = 60; |
| | | clearInterval(timer); |
| | | timer = setInterval( |
| | | () => { |
| | | if (this.EmergencyStop == true) { |
| | | this.dialogFormCountDown = false; |
| | |
| | | <el-table-column :min-width="90" prop="barcode" :label="$t('Complete')">
|
| | | <template slot-scope='scope' style="height:100px;height:100px;">
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
| | | :disabled="!(!isAllowQueue && scope.row.state != 2 && scope.row.state != 4)"
|
| | | :disabled="!(!isAllowQueue && scope.row.state != 1 && scope.row.state != 2)"
|
| | | @click="CompleteQueue(scope.row.id, scope.row.barcode, scope.row.glassId)">{{
|
| | | $t('Complete')
|
| | | }}</el-button>
|
| | |
| | | DeleteProductionQueueGlass(id).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }else{
|
| | | this.$message.error(this.$t('This frame has glass that is currently outing'));
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | |
| | | |
| | | // 出片任务//////////////////////////////// |
| | | List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态 |
| | | List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动 |
| | | |
| | | boolean Plcadd = spianService.listbool("DB106.62"); // 出片请求字 |
| | | |
| | | if(Plcadd==false){ |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为0 |
| | | } |
| | | boolean Plcout = spianService.listbool("DB106.64"); // 出片请求字 |
| | | boolean Plcout2 = spianService.listbool("DB105.18"); // 出片启动 |
| | | if (Plcout == false&&Plcout2==true) { |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0 |
| | | System.out.println("关闭出片启动" + LocalDateTime.now());// 出片任务发送字改为0 |
| | | } |
| | | boolean Plcadd = spianService.listbool("DB106.24"); // 进片请求字 |
| | | boolean Plcadd2 = spianService.listbool("DB105.16"); // 进片启动 |
| | | if (Plcadd == false&&Plcadd2==true) { |
| | | S7control.getinstance().WriteWord("DB105.16", (short) 0);//进片任务启动改为0 |
| | | System.out.println("关闭进片启动" + LocalDateTime.now());// 进片任务发送字改为0 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // StringBuilder writedstrIdOut = new StringBuilder(); |
| | | // 获取已下发的出片id |
| | | byte[] writedglassidbytesOut = S7control.getinstance().ReadByte("DB105.30", 14); |
| | | String writedstrIdOut = new String(writedglassidbytesOut); |
| | | |
| | | boolean outstate = false;// 出片车空闲判断 |
| | | boolean outstate1 = false;// 出片车任务是否启动 |
| | | if (outlist != null && outlist1 != null) { |
| | | |
| | | outstate = outlist.contains((short) 0);// 出片车空闲判断 当出片车空闲时为true |
| | | outstate1 = outlist1.contains((short) 1);// 出片车任务是否启动 当出片车任务启动时为true |
| | | |
| | | |
| | | if (Plcout == true) { |
| | | // 判断当前是否有未执行的任务 |
| | | int outnum = spianMapper.SelectOutSliceshu(); |
| | | int cageoutsum = spianMapper.Selectcageout(3); |
| | | int outnum = spianMapper.SelectOutSliceshu();//是否有正在出片的任务 |
| | | int cageoutsum = spianMapper.Selectcageout(3);//笼子内是否还有在出片的玻璃 |
| | | // 当没有任务执行并且出片车空闲时 |
| | | if (outnum == 0 && outstate == true && Plchome.isAllowQueue == true && cageoutsum == 0) { |
| | | if (outnum == 0 && Plchome.isAllowQueue == true && cageoutsum == 0) { |
| | | // 判断铝框出片队列表是否有待出片的玻璃 |
| | | String outglassid = spianMapper.SelectOutSlice(); |
| | | // 当有待出片的玻璃时 |
| | |
| | | if (glassdisabled == 0) { |
| | | spianService.selectout2(outglassid); |
| | | Plchome.isQueueWarning = false; |
| | | outstate = false; |
| | | } else { // 禁用更改状态弹出提示 |
| | | Plchome.isQueueWarning = true; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (outstate == true) {// 当出片车空闲时,且出片启动为1时,任务启动改为0 |
| | | if (outstate1 == true) { |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0 |
| | | System.out.println("关闭启动" + LocalDateTime.now()); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | ///////////// 进片任务 |
| | |
| | | List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动 |
| | | |
| | | boolean B01backs = spianService.listbool("DB106.60");// b01汇报 |
| | | |
| | | boolean B02backs = spianService.listbool("DB106.62");// b02汇报 |
| | | StringBuilder B01glassid = spianService.queGlassid("DB103.184", 14);// BO1的玻璃id |
| | | StringBuilder B02glassid = spianService.queGlassid("DB103.212", 14);// B02的玻璃id |
| | |
| | | int HB = spianMapper.SelectHB(B01glassid.toString()); |
| | | if (HB > 0) { |
| | | // 当B01小车汇报完成时更改玻璃状态 为1 |
| | | S7control.getinstance().WriteWord("DB106.60", (short) 0);// 恢复B01小车应答改为0 |
| | | boolean yingda = spianService.listbool("DB106.60");// b01汇报 |
| | | if (yingda == false) { |
| | | S7control.getinstance().WriteWord("DB105.48", (short) 1);// 恢复B01小车应答改为1 |
| | | boolean yingda = spianService.listbool("DB105.48");// b01汇报 |
| | | if (yingda == true) { |
| | | spianService.overtask(B01glassid.toString());// 完成任务 |
| | | } |
| | | System.out.println("汇报时B01|第" + aaa + "次" + B01glassid + "应答" + yingda); |
| | | aaa += 1; |
| | | } |
| | | |
| | | }else{ |
| | | S7control.getinstance().WriteWord("DB105.48", (short) 0);// 恢复B01小车应答改为1 |
| | | } |
| | | |
| | | // 当出片小车完成任务时 |
| | |
| | | if (HB > 0) { |
| | | // 当B02小车汇报完成时更改玻璃状态为0 |
| | | |
| | | S7control.getinstance().WriteWord("DB106.62", (short) 0);// 恢复B02小车应答改为0 |
| | | System.out.println("汇报时B02|" + B02glassid); |
| | | boolean yingda = spianService.listbool("DB106.62");// b02汇报 |
| | | if (yingda == false) { |
| | | S7control.getinstance().WriteWord("DB105.50", (short) 1);// 恢复B02小车应答改为1 |
| | | System.out.println("汇报时B02ID|" + B02glassid); |
| | | boolean yingda = spianService.listbool("DB105.50");// b02汇报 |
| | | if (yingda == true) { |
| | | spianService.overtask(B02glassid.toString());// 完成任务 |
| | | } |
| | | System.out.println("汇报时B02|第" + aaa + "次" + B02glassid + "应答" + yingda); |
| | | } |
| | | }else{ |
| | | S7control.getinstance().WriteWord("DB105.50", (short) 0);// 恢复B02小车应答改为0 |
| | | } |
| | | |
| | | |
| | | boolean Plcout = spianService.listbool("DB106.62"); // 进片请求字 |
| | | if(Plcout==false){ |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 0);// 进片任务发送字改为0 |
| | | } |
| | | |
| | | |
| | | // 获取DO1数据 |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | // 查询数据库 |
| | | // 推送到前端 |
| | |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("D:/code/canadames/Alarm.json"); |
| | | fileInputStream = new FileInputStream("D:/Documents/canadames/Alarm.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | |
| | | // // TODO: handle exception
|
| | | // }
|
| | |
|
| | | // if (S7control.getinstance().CheckConnected() == true) {
|
| | | if (S7control.getinstance().CheckConnected() == true) {
|
| | | // 获取当前扫码方式
|
| | |
|
| | | List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1);
|
| | |
| | | for (Boolean emergencystop : emergencystops) {
|
| | | jsonObject.append("emergencystop", emergencystop);
|
| | | }
|
| | |
|
| | | // // 终止继续按钮
|
| | | // List<String> niuanaddressList3 =
|
| | | // Arrays.asList(config.getProperty("Parameter2.stop").split(","));
|
| | | // List<Boolean> anniuread =
|
| | | // S7control.getinstance().readBits(niuanaddressList3);
|
| | | // // Boolean[] value4 = { false, false};
|
| | | // // List<Boolean> anniuread = new ArrayList<>(Arrays.asList(value4));
|
| | | // Boolean[] value5 = { true };
|
| | | // List<Boolean> resets = new ArrayList<>(Arrays.asList(value5));
|
| | | // short[] anniuparams = new short[anniuread.size()];
|
| | | // for (int i = 0; i < anniuread.size(); i++) {
|
| | | // boolean value = anniuread.get(i);
|
| | | // anniuparams[i] = value ? (short) 1 : (short) 0;
|
| | | // }
|
| | |
|
| | | // short[] resets2 = new short[resets.size()];
|
| | | // for (int i = 0; i < resets.size(); i++) {
|
| | | // boolean value = resets.get(i);
|
| | | // resets2[i] = value ? (short) 1 : (short) 0;
|
| | | // }
|
| | |
|
| | | // for (short number : resets2) {
|
| | |
|
| | | // if (number == 1) {
|
| | | // jsonObject.append("Abort", anniuparams);
|
| | |
|
| | | // }
|
| | |
|
| | | // }
|
| | | // }
|
| | | }
|
| | |
|
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
|
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
|
| | |
| | | // 根据铝框id删除出片队列玻璃 |
| | | @PostMapping("/DeleteProductionQueueGlass") |
| | | public Result DeleteProductionQueueGlass(String FrameNo) { |
| | | homeMapper.CompleteQueueByFrameNo(FrameNo); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | return outSliceServive.CompleteQueueByFrameNo(FrameNo); |
| | | } |
| | | |
| | | // 添加铝框id对应玻璃到出片队列 |
| | |
| | | Out_slice SelectQueueByglassid(String getbarcode); |
| | | |
| | | //添加出片队列 |
| | | @Insert("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`, `sequence`, `time` ,`position` ,`orderid` ,`listid` ,`boxid` ,`glasswidthmm` ,`glassheightmm` ,`framewidthmm` ,`frameheightmm` ) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, #{state}, #{flip}, #{sequence}, now(), #{position}, #{orderid}, #{listid}, #{boxid}, #{glasswidth}, #{glassheight}, #{framewidthmm}, #{frameheightmm});") |
| | | @Insert("INSERT INTO out_slice( `glassId`, `barcode`, `glasswidth`, `glassheight`, `state`, `flip`, `sequence`, `time` ,`position` ,`orderid` ,`listid` ,`boxid` ,`glasswidthmm` ,`glassheightmm` ,`framewidthmm` ,`frameheightmm` ,`framestate` ) VALUES ( #{glassid}, #{FrameNo}, #{glasslengthMm}, #{glassheightMm}, #{state}, #{flip}, #{sequence}, now(), #{position}, #{orderid}, #{listid}, #{boxid}, #{glasswidth}, #{glassheight}, #{framewidthmm}, #{frameheightmm}, 0);") |
| | | void AddOutSliceS(String glassid, String flip, String FrameNo, String glasslengthMm, String glassheightMm, int sequence, String position, Short state,String orderid, String listid, String boxid, String glasswidth, String glassheight,String framewidthmm,String frameheightmm); |
| | | |
| | | //出片队列调序 |
| | |
| | | @Select("select rp.* from role_permission rp inner join user r on rp.role_id=r.role_id and r.username=#{username} and (permission_id=32 or permission_id=33 or permission_id=34 or permission_id=35 or permission_id=36 or permission_id=37 or permission_id=38 or permission_id=39)") |
| | | List<RolePermission> SelectPermissionByUserName(String username); |
| | | |
| | | //根据玻璃完成出片任务 |
| | | @Update("update out_slice set state=3 where id=#{id}") |
| | | void CompleteQueue(String id); |
| | | // //根据玻璃完成出片任务 |
| | | // @Update("update out_slice set state=2 where id=#{id}") |
| | | // void CompleteQueue(String id); |
| | | |
| | | //根据玻璃完成出片任务 |
| | | @Update("update out_slice set state=3 where id=#{id}") |
| | | @Update("update out_slice set state=2 where glassid=#{glassid}") |
| | | void CompleteQueueByGlassId(String glassid); |
| | | |
| | | //查询铝框id对应玻璃完成数量 |
| | |
| | | @Update("update storage_cage set width=width+#{width} where cage=#{cage} and cell=#{cell};") |
| | | void UpdataCageWidth(double width, int cage, int cell); |
| | | |
| | | //获取铝框有没有正在出片的玻璃 |
| | | @Select("select count(*) from out_slice where barcode=#{frameNo} and state=1") |
| | | Short SelectOutingQueueCount(String frameNo); |
| | | |
| | | |
| | | } |
| | |
| | | @Select("select COUNT(if(a.state1=0,cell,0))as cell,ROUND(id/2)as id from (select *,max(state)as state1 from storage_cage a GROUP BY cage,cell)as a where (a.cage=#{cage1}-1 or a.cage=#{cage1}+1)and if(a.cage<6,a.cage>0 and a.cage<6,a.cage>5) and disabled=0 GROUP BY cage ORDER BY cell desc LIMIT 1") |
| | | int selectCage(int cage1); |
| | | // 获取笼子号订单号排序的空订单笼子 |
| | | @Select("select a.cage,FrameBarcode,COUNT(if(a.order_id=#{orderids},a.order_id,null))as orderid,b.shu,c.shu2,a.cell,min(a.state)as state1,max(a.state)as state2,disabled,FrameBarcode from storage_cage a left join (select COUNT(*)shu,cage from storage_cage where order_id=#{orderids} GROUP BY cage)as b on a.cage=b.cage left join(select cage ,COUNT(glass_id)as shu2 from storage_cage GROUP BY cage)c on a.cage=c.cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY (FrameBarcode=#{Fbarcode} or ''='') desc,shu desc,shu2,state2 asc,cage asc;") |
| | | @Select("select a.cage,FrameBarcode,COUNT(if(a.order_id=#{orderids},a.order_id,null))as orderid,b.shu,c.shu2,a.cell,min(a.state)as state1,max(a.state)as state2,disabled,FrameBarcode from storage_cage a left join (select COUNT(*)shu,cage from storage_cage where order_id=#{orderids} GROUP BY cage)as b on a.cage=b.cage left join(select cage ,COUNT(glass_id)as shu2 from storage_cage GROUP BY cage)c on a.cage=c.cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY shu desc,shu2,state2 asc,cage asc;") |
| | | List<StorageCage> selectAll(String orderids,String Fbarcode); |
| | | //优先判断一次是否有同铝框的空位 |
| | | @Select("select *,min(state) state1 from storage_cage where width>=(#{width}+#{width2}) GROUP BY cage,cell HAVING state1=0 and FrameBarcode=#{Fbarcode} ORDER BY width desc LIMIT 1;") |
| | |
| | | // #{date}, #{address}, #{userNo})") |
| | | // void insert (Spian spian); |
| | | // 新增任务表 |
| | | @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,count) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count); |
| | | @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`,start_time,glass_id,count,finsh_time) VALUES (#{tasktype},#{taskstate},#{shelfrack},#{loadrack},now(),#{glassid},#{count},#{qidong});") |
| | | void Inserttask(int tasktype, int taskstate, int shelfrack, int loadrack, String glassid, int count,int qidong); |
| | | |
| | | // 修改任务表 |
| | | @Update("update storage_task set task_state=#{state} where task_type=#{type} and task_state=0;") |
| | |
| | | @Select(" select disabled from storage_cage where glass_id=#{glassid} limit 1;") |
| | | int SelectCageGlassState(String glassid); |
| | | //判断汇报的id是否正确 |
| | | @Select("SELECT count(*) FROM `storage_cage` where state!=0 and state!=1 and glass_id=#{glassid}") |
| | | @Select("SELECT count(*) FROM `storage_cage` where state!=0 and glass_id=#{glassid}") |
| | | int SelectHB(String glassid); |
| | | } |
| | |
| | | |
| | | // 完成出片任务 |
| | | public Result CompleteQueue(String id, String frameid, String glassid) { |
| | | homeMapper.CompleteQueue(id); |
| | | Short num = homeMapper.SelectCountByFrameNo(frameid); |
| | | if (num == 0) { |
| | | homeMapper.CompleteQueueByFrameNo(frameid); |
| | | } |
| | | StorageCage storageCage = homeMapper.SelectGlassInfo(glassid); |
| | | if (storageCage != null && storageCage.getState().equals("3")) { |
| | | spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | } |
| | | homeMapper.CompleteQueueByGlassId(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | |
| | | return homeMapper.SelectCurrentFrame(); |
| | | } |
| | | |
| | | public Result CompleteQueueByFrameNo(String frameNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Short num= homeMapper.SelectOutingQueueCount(frameNo); |
| | | if(num==0){ |
| | | homeMapper.CompleteQueueByFrameNo(frameNo); |
| | | map.put("message", "200"); |
| | | }else{ |
| | | map.put("message", "300"); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |
| | |
| | | List<Short> datas = new ArrayList<>(); |
| | | |
| | | // String orderid="A001"; |
| | | // 获取订单相关度最高的笼子排序 |
| | | // 获取铝框相关度最高的笼子排序 |
| | | List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode, widths, 400); |
| | | // 判断铝框指定空格是否需要间隔空间 |
| | | |
| | |
| | | // 将外片玻璃的数据更新到内片 |
| | | spianMapper.UpdateDBCage(ids, cage1, cells, 1); |
| | | // 将新入的玻璃存入外片 |
| | | // spianMapper.UpdataAddCage(orderids, glassid, widths, cage1, cells, ids-1, 2); |
| | | |
| | | spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids - 1, 2); |
| | | spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务 |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 进片任务发送字改为1 |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | boolean qidong = listbool("DB105.16"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier,qidong2);// 新增任务 |
| | | System.out.println("进片任务|" + datas); |
| | | |
| | | } else { |
| | | // 数据库修改笼子表新增一条玻璃 |
| | | // spianMapper.UpdataAddCage(orderids, glassid, widths, cage1, cells, ids, 2); |
| | | |
| | | spianMapper.UpdataAddCage2(orderids, glassid, glasslist, cage1, cells, ids, 2); |
| | | spianMapper.UpdataAddCage1(widths, cage1, cells);// 减少格子宽度 |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier);// 新增任务 |
| | | |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 进片任务发送字改为1 |
| | | boolean qidong = listbool("DB105.16"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(0, 0, 1000, ids, glassid.toString(), prctier,qidong2);// 新增任务 |
| | | System.out.println("进片任务|" + datas); |
| | | |
| | | // S7control.getinstance().WriteByte("DB105.16",glassid); |
| | | } |
| | | outmesid(glassid, "DB105.20"); |
| | | return (200); |
| | |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCageState(glassid.toString(), 3);// 更改笼子表的玻璃状态 |
| | | |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state);// 新增任务 |
| | | // int state = spianMapper.selectGlassState(cage, cell);//获取格子数量 |
| | | // if (state == 2) { |
| | | // spianMapper.UpdateDBCage1(cage, cell);// 将内片数据更新到外片里 |
| | | // spianMapper.UpdateDBCage2(cage, cell);// 清除内片数据 |
| | | // } |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state, qidong2);// 新增任务 |
| | | outmesid(glassid, "DB105.34");// 派发出片ID |
| | | |
| | | return (200);// 结束 |
| | |
| | | datas.add((short) 1); |
| | | datas.add((short) 1); |
| | | spianMapper.OverOutSlice(glassid.toString(), 1, 0);// 更新出片队列任务状态为进行中 |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1);// 新增任务 |
| | | |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.UpdataGlassCageState(glassid, 3);// 更改笼子表的玻璃状态 |
| | | |
| | |
| | | outmesid(glassid, "DB105.34");// 派发出片ID |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, 1, qidong2);// 新增任务 |
| | | return (200);// 结束 |
| | | |
| | | } else { |
| | |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassids, 2);// 新增调度任务 |
| | | // 传输mes数据,坐标,数据 |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | outmesid(glassids, "DB105.34");// 派发调拨玻璃ID |
| | | |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 0; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(2, 0, cageout.getId(), ids, glassids, 2, qidong2);// 新增调度任务 |
| | | |
| | | return (200); // 结束 |
| | | |
| | | } else {// 笼子号大于5时 |
| | |
| | | datas.add((short) 2); |
| | | datas.add((short) 1); |
| | | String glassids = spianMapper.SelectGlassid(cage, cell); // 获取被调拨的玻璃id |
| | | spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态 |
| | | spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassids, 2);// 新增调度任务 |
| | | // spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 新增出片任务 |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | // 传输mes数据,坐标,数据 |
| | | System.out.println("出片任务|" + datas); |
| | | S7control.getinstance().WriteWord(adddresslist, datas);// 派发出片车任务 |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 1);// 出片任务发送字改为1 |
| | | |
| | | outmesid(glassids, "DB105.34");// 派发调拨玻璃ID |
| | | spianMapper.UpdataGlassCageState(glassids, 3);// 更改笼子表的玻璃状态 |
| | | boolean qidong = listbool("DB105.18"); |
| | | int qidong2 = 2; |
| | | if (qidong == true) { |
| | | qidong2 = 1; |
| | | } |
| | | spianMapper.Inserttask(2, 0, cageout.getId() + 1, ids, glassids, 2, qidong2);// 新增调度任务 |
| | | spianMapper.UpdateDBCage(ids, cage, cell, 2);// 将原格子数据更新到新格子里 |
| | | spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 减少新格子宽度 |
| | | spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 增加原格子宽度 |
| | | |
| | | return (200);// 结束 |
| | | |
| | | } |
| | |
| | | // } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |