| | |
| | | @TableField("cart_pos") |
| | | private Integer cartPos; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @ApiModelProperty(value = "1楼拆垛上传叠盘回库标记") |
| | | @TableField("report_sign") |
| | | private Integer reportSign; |
| | | |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()!=202) { |
| | | wrkMast.setWrkSts(14L); |
| | | }else if (wrkMast.getIoType()==202){ |
| | | wrkMast.setWrkSts(57L); |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |
| | |
| | | locMastService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14 && wrkMast.getIoType()!=202) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | |
| | | locMast.setModiUser(userId); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } else if (wrkMast.getIoType()==202){ |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |
| | |
| | | // 删除工作档明细 |
| | | boolean wrkDetlRes = wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no", workNo)); |
| | | } |
| | | if (wrkMast.getIoType()==202){ |
| | | return; |
| | | } |
| | | |
| | | // 修改库位状态 |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | |
| | | |
| | | /** |
| | | * Created by Monkey D. Luffy on 2023.07.25 |
| | | * 徐工汉云..............以下.............上饶江铜.............自动补空板 |
| | | * 徐工汉云..............以下.............上饶江铜.............条码上传中控 |
| | | */ |
| | | @Component |
| | | public class BarcodeUploadScheduler { |
| | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){//条码上传中控 |
| | | int[] staNos =new int[]{216,220}; |
| | | int[] staNos =new int[]{215,219}; |
| | | for (int staNo : staNos){ |
| | | ReturnT<String> result = barcodeUploadHandler.start(staNo); |
| | | if (result.getCode()==200){ |
| | |
| | | } |
| | | for (BasCrnp basCrnp:basCrnps){ |
| | | if (basCrnp.getCrnSts()!=3) continue; |
| | | if (basCrnp.getCrnNo()==5) continue; |
| | | if (!basCrnp.getInEnable().equals("N") || !basCrnp.getOutEnable().equals("Y")) continue; |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no",basCrnp.getCrnNo())); |
| | | if (Cools.isEmpty(wrkMasts) || wrkMasts.size()==0) { |
| | | LocMast locMastStart = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts","D").eq("crn_no",basCrnp.getCrnNo()).orderBy("appe_time",true));//空板所在 |
| | |
| | | for (int staNo : staNos){ |
| | | ReturnT<String> result = reportToDismantleTheStackHandler.start(staNo); |
| | | if (result.getCode()==200){ |
| | | continue; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | |
| | | public ReturnT<String> start(int staNo) { |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(staNo); |
| | | if (!Cools.isEmpty(basDevp) && !Cools.isEmpty(basDevp.getBarcode()) && basDevp.getWrkNo()==9992){ //上传前工作号跟电控约定为9992(你可以自定义) |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", basDevp.getBarcode())); |
| | | if (Cools.isEmpty(waitPakin)){ |
| | | if (Cools.isEmpty(basDevp) || Cools.isEmpty(basDevp.getBarcode()) || basDevp.getReportSign()!=1 |
| | | || basDevp.getBarcode().equals("")){ |
| | | return FAIL; |
| | | } |
| | | if (basDevp.getWrkNo()>9899 && basDevp.getWrkNo()<10000 && basDevp.getAutoing().equals("Y") |
| | | && basDevp.getLoading().equals("Y") && basDevp.getInEnable().equals("Y")){ //上传前工作号跟电控约定为9992(你可以自定义) |
| | | int zpalletCount = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", basDevp.getBarcode())); |
| | | if (zpalletCount==0){ |
| | | ReturnT<String> result = null; |
| | | result = postMesData(barcodeUploadpath,basDevp); |
| | | System.out.println(result); |
| | | if (result.getCode()==200){ |
| | | basDevp.setReportSign(2); |
| | | basDevpService.updateById(basDevp); |
| | | return SUCCESS; |
| | | }else { |
| | | log.error("条码上传中控失败"); |
| | |
| | | success = true; |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}"+erpUrl+erpPath, JSON.toJSONString(combParam), response); |
| | | throw new CoolException("上报erp系统失败"); |
| | | throw new CoolException("条码上传中控失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "上报erp系统", |
| | | "条码上传中控", |
| | | erpUrl + erpPath, |
| | | null, |
| | | erpUrl, |
| | |
| | | BasDevp basDevp = basDevpService.selectById(staNo); |
| | | Integer staOther = getStaOther(staNo); |
| | | Integer staEnd = getStaEnd(staNo); |
| | | if (staOther==0) return SUCCESS; |
| | | if (staOther==0) return FAIL; |
| | | BasDevp basDevpOther = basDevpService.selectById(staOther); |
| | | if (Cools.isEmpty(basDevpOther) || basDevpOther.getReportSign()==1){ |
| | | return SUCCESS; |
| | | return FAIL; |
| | | } |
| | | BasDevp basDevpEnd = basDevpService.selectById(staEnd); |
| | | if (!basDevpEnd.getLoading().equals("Y") || !basDevpEnd.getAutoing().equals("Y") || !basDevpEnd.getInEnable().equals("Y")){ |
| | | return FAIL; |
| | | } |
| | | if ((basDevpEnd.getWrkNo()<9900 && basDevpEnd.getWrkNo()!=0) || basDevpEnd.getWrkNo()>10000){ |
| | | return FAIL; |
| | | } |
| | | WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 202).eq("source_sta_no", staEnd)); |
| | | if (!Cools.isEmpty(wrkMast1)) return SUCCESS; |
| | | if (!Cools.isEmpty(wrkMast1)) return FAIL; |
| | | if (!Cools.isEmpty(basDevp) && basDevp.getAutoing().equals("Y") && basDevp.getWrkNo()!=0){ //上传前工作号跟电控约定为9992中控(桁架):码垛完成下发入库信息(你可以自定义) |
| | | |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", basDevp.getWrkNo())); |
| | | if (Cools.isEmpty(wrkMast) || !wrkMast.getSheetNo().equals("0")){ |
| | | return SUCCESS; |
| | | return FAIL; |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | if (Cools.isEmpty(wrkDetls) || wrkDetls.size()==0){ |
| | | return SUCCESS; |
| | | return FAIL; |
| | | } |
| | | SingleMountUnstackingCompleteParam singleMountUnstackingCompleteParam = new SingleMountUnstackingCompleteParam(wrkMast,wrkDetls); |
| | | singleMountUnstackingCompleteParam.setStaStart(staNo); |
| | |
| | | # 码垛信息上传 |
| | | reportInPath: api/PalletizingInfo/Post |
| | | loc-move: |
| | | move-all: false |
| | | move-all: true |
| | |
| | | <result column="max_wt" property="maxWt" /> |
| | | <result column="gross_wt" property="grossWt" /> |
| | | <result column="cart_pos" property="cartPos" /> |
| | | <result column="report_sign" property="reportSign" /> |
| | | |
| | | </resultMap> |
| | | |