Merge remote-tracking branch 'origin/jnejc-jgwcs' into jnejc-jgwcs
| | |
| | | } |
| | | |
| | | public LocTypeDto(StaProtocol staProtocol) { |
| | | if (staProtocol.isHigh() == staProtocol.isLow() || staProtocol.isChang() == staProtocol.isDuan()) { |
| | | News.error("plc高低/长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan()); |
| | | // todo 高低库位暂时不检测 |
| | | // if (staProtocol.isHigh() == staProtocol.isLow() || staProtocol.isChang() == staProtocol.isDuan()) { |
| | | // News.error("plc高低/长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan()); |
| | | // return; |
| | | // } |
| | | if (staProtocol.isChang() == staProtocol.isDuan()) { |
| | | News.error("plc长短检测异常,high:{},low:{},chang:{},duan:{}",staProtocol.isHigh(),staProtocol.isLow(),staProtocol.isChang(),staProtocol.isDuan()); |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | private Double total; |
| | | |
| | | private String standby1 = ""; |
| | | |
| | | public MatDto() { |
| | | } |
| | | public MatDto(String matnr, String maknx, String batch, String specs, String manu, String memo, Double count, Double total) { |
| | |
| | | this.count = count; |
| | | this.total = total; |
| | | } |
| | | public MatDto(String orderNo,String matnr,String maknx, String batch,String specs,String manuDate,String model,Double anfme) { |
| | | public MatDto(String orderNo,String matnr,String maknx, String batch,String specs,String manuDate,String model,Double anfme,String standby1) { |
| | | this.orderNo = orderNo; |
| | | this.matnr = matnr; |
| | | this.maknx = maknx; |
| | |
| | | this.manuDate = manuDate; |
| | | this.model = model; |
| | | this.anfme = anfme; |
| | | this.standby1 = standby1; |
| | | } |
| | | |
| | | public MatDto(String matNo, String maknx, Double count) { |
| | |
| | | * 获取其他信息 |
| | | */ |
| | | @GetMapping("/other") |
| | | public R monitorOther(@RequestParam("crnId") Integer crnId, @RequestParam("ledId") Integer sta) { |
| | | public R monitorOther(@RequestParam("crnId") Integer crnId, @RequestParam("ledId") String ledIdString) { |
| | | Integer ledId = 0; |
| | | String[] ledIds = ledIdString.split(","); |
| | | for (String id : ledIds) { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | for (Integer staNo : led.getStaArr()) { |
| | | if (staNo.equals(sta)) { |
| | | if (staNo.equals(Integer.parseInt(id))) { |
| | | ledId = led.getId(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | * 获取其他信息 |
| | | */ |
| | | @GetMapping("/led") |
| | | public R monitorLed(@RequestParam("ledId") Integer ledId) { |
| | | public R monitorLed(@RequestParam("ledId") String ledIdString) { |
| | | String[] ledIds = ledIdString.split(","); |
| | | String ledContent = ""; |
| | | List<LedCommand> commandList = null; |
| | | for(String ledId: ledIds) { |
| | | |
| | | for (LedSlave slave : slaveProperties.getLed()) { |
| | | if (slave.getStaArr().contains(ledId)) { |
| | | if (slave.getStaArr().contains(Integer.parseInt(ledId))) { |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, slave.getId()); |
| | | if (null != ledThread) { |
| | | ledContent = ledThread.getStringBuffer().toString(); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return R.ok().add(commandList); |
| | | } |
| | | |
| | |
| | | * 异常通知 |
| | | */ |
| | | @GetMapping("/led/error") |
| | | public R monitorLedError(@RequestParam("ledId") Integer ledId) { |
| | | public R monitorLedError(@RequestParam("ledId") String ledIdString) { |
| | | String errorMsg = ""; |
| | | String[] ledIds = ledIdString.split(","); |
| | | for(String ledId: ledIds) { |
| | | for (LedSlave slave : slaveProperties.getLed()) { |
| | | if (slave.getStaArr().contains(ledId)) { |
| | | if (slave.getStaArr().contains(Integer.parseInt(ledId))) { |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, slave.getId()); |
| | | if (null != ledThread) { |
| | | errorMsg = ledThread.getErrorMsg().toString(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(errorMsg); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 拣料、并板、盘点再入库 |
| | | // mainService.stnToCrnStnPick(3); |
| | | mainService.stnToCrnStnPick(3); |
| | | |
| | | // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 |
| | | mainService.generateStoreWrkFile(); // 组托 |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | private String standby1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | private String standby2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | private String standby3 = ""; |
| | | |
| | | /** |
| | | * 备用1 |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | |
| | | && staProtocol.isPakMk() && staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) { // 9990-9992空托,9993-9995 满托,9999回退 |
| | | if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) { |
| | | News.info("{}条码扫描错误:{}",barcodeThread.getSlave().getId(),barcode); |
| | | continue; |
| | | staProtocol.setWorkNo(wrkNo); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, "条码扫描错误")); |
| | | return; |
| | | } |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk() && staProtocol.getWorkNo() == 9999) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk() |
| | | && staProtocol.getWorkNo() >= 9993 && staProtocol.getWorkNo() <= 9995) { |
| | | News.warnNoLog(""+mark+" - 0"+" - 开始执行"); |
| | | WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); |
| | | if (wrkMast == null) { |
| | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", pickSta.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("stn_no", wrkMast.getSourceStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | News.error(""+mark+" - 2"+" - 入库路径不存在!type_no={},stn_no={},crn_no={}", wrkMast.getIoType(), pickSta.getStaNo(), wrkMast.getCrnNo()); |
| | | staProtocol.setWorkNo(wrkNo); |
| | | staProtocol.setStaNo((short) (pickSta.getStaNo().shortValue()-(short)1)); |
| | | staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发4:"+wrkNo+","+(pickSta.getStaNo().shortValue()-(short)1)); |
| | | log.error("输送线下发4:"+wrkNo+","+pickSta.getBackSta()); |
| | | //LED |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); |
| | | // led 异常显示 |
| | |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57 |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | wrkMast.setSourceStaNo(staProtocol.getSiteId()); // 源站 |
| | | wrkMast.setStaNo(staNo); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | |
| | | if (wrkMast.getIoType() != 110 && wrkMast.getIoType() != 10) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getOrderNo(),wrkDetl.getMatnr(),wrkDetl.getMaktx(), |
| | | wrkDetl.getBatch(), wrkDetl.getSpecs(),wrkDetl.getManuDate(),wrkDetl.getModel(),wrkDetl.getAnfme()))); |
| | | wrkDetl.getBatch(), wrkDetl.getSpecs(),wrkDetl.getManuDate(),wrkDetl.getModel(),wrkDetl.getAnfme(),wrkDetl.getStandby1()))); |
| | | } else { |
| | | ledCommand.getMatDtos().add(new MatDto("","","","","","","",1.0)); |
| | | ledCommand.getMatDtos().add(new MatDto("","","","","","","",1.0,"")); |
| | | } |
| | | commands.add(ledCommand); |
| | | } |
| | |
| | | wrkMast.setCrnNo(crn.getId()); |
| | | wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 源库位 |
| | | wrkMast.setLocNo(loc.getLocNo()); // 目标库位 |
| | | wrkMast.setFullPlt(shallowLoc.getFullPlt()); // 满板 |
| | | wrkMast.setFullPlt(shallowLoc.getLocSts().equals("F") ? "Y" : "N"); // 满板 |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板 |
| | |
| | | row: 1 |
| | | bay: 1 |
| | | lev: 1 |
| | | # 堆垛机入库站点3 |
| | | crnInStn[2]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staNo: 205 |
| | | row: 1 |
| | | bay: 9 |
| | | lev: 1 |
| | | # 堆垛机出库站点1 |
| | | crnOutStn[0]: |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 204 |
| | | led: ${wcs-slave.led[1].id} |
| | | # # 拣料入库口1 |
| | | # pickSta[0]: |
| | | # staNo: 104 |
| | | # barcode: ${wcs-slave.barcode[0].id} |
| | | # backSta: 103 |
| | | # led: ${wcs-slave.led[1].id} |
| | | # # 拣料入库口2 |
| | | # pickSta[1]: |
| | | # staNo: 106 |
| | | # barcode: ${wcs-slave.barcode[1].id} |
| | | # backSta: 105 |
| | | # led: ${wcs-slave.led[2].id} |
| | | # 拣料入库口1 |
| | | pickSta[0]: |
| | | staNo: 201 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 202 |
| | | led: ${wcs-slave.led[0].id} |
| | | # 拣料入库口2 |
| | | pickSta[1]: |
| | | staNo: 205 |
| | | barcode: ${wcs-slave.barcode[2].id} |
| | | led: ${wcs-slave.led[2].id} |
| | | # 拣料入库口3 |
| | | pickSta[2]: |
| | | staNo: 203 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | led: ${wcs-slave.led[1].id} |
| | | backSta: 204 |
| | | # 出库口1 |
| | | outSta[0]: |
| | | staNo: 204 |
| | |
| | | # 出库口3 |
| | | outSta[2]: |
| | | staNo: 202 |
| | | led: ${wcs-slave.led[1].id} |
| | | led: ${wcs-slave.led[0].id} |
| | | |
| | | # 条码扫描仪1 |
| | | barcode[0]: |
| | |
| | | # LED1 |
| | | led[0]: |
| | | id: 1 |
| | | ip: 192.168.5.104 |
| | | ip: 172.26.11.83 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 202 |
| | | staArr: 201,202 |
| | | crnId: 1 |
| | | # LED2 |
| | | led[1]: |
| | | id: 2 |
| | | ip: 192.168.5.105 |
| | | ip: 172.26.11.84 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 204 |
| | | staArr: 203,204 |
| | | crnId: 1 |
| | | # LED3 |
| | | led[2]: |
| | | id: 3 |
| | | ip: 192.168.5.106 |
| | | ip: 172.26.11.85 |
| | | port: 5005 |
| | | devpPlcId: ${wcs-slave.devp[0].id} |
| | | staArr: 205 |
| | |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="standby1" property="standby1" /> |
| | | <result column="standby2" property="standby2" /> |
| | | <result column="standby3" property="standby3" /> |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | </resultMap> |
| | | |
| | | <select id="findByWorkNo" resultMap="BaseResultMap"> |