| | |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | throw new CoolException(locDetl.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void manualCallEmptyTray(int stnNo, Long userId) { |
| | | |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PAKOUT.type); |
| | | // 获取库位 |
| | | // LocMast locMast = locMastService.selectById(locNo); |
| | | // if (Cools.isEmpty(locMast)) { |
| | | // throw new CoolException(locNo + "库位不存在"); |
| | | // } |
| | | // if (!locMast.getLocSts().equals("D")) { |
| | | // throw new CoolException("所选库位存在状态不为D的库位,库位号:" + locMast.getLocNo() + " 、当前状态:" + locMast.getLocSts() + "-" + locMast.getLocSts$()); |
| | | // } |
| | | // // 获取源站 |
| | | // Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | // .eq("type_no", 110) |
| | | // .eq("stn_no", param.getOutSite()) |
| | | // .eq("crn_no", locMast.getCrnNo()); |
| | | // StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | // if (staDesc == null) { |
| | | // throw new CoolException("路径不存在"); |
| | | // } |
| | | // Integer sourceStaNo = staDesc.getCrnStn(); |
| | | // if (Cools.isEmpty(sourceStaNo)) { |
| | | // throw new CoolException("检索源站失败"); |
| | | // } |
| | | // Date now = new Date(); |
| | | // 保存工作档 |
| | | // WrkMast wrkMast = new WrkMast(); |
| | | // wrkMast.setWrkNo(workNo); |
| | | // wrkMast.setIoTime(now); |
| | | // wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | // wrkMast.setIoType(110); // 入出库状态: 110.空板出库 |
| | | // wrkMast.setIoPri(10D); |
| | | // wrkMast.setSourceStaNo(sourceStaNo); // 源站 |
| | | // wrkMast.setStaNo(param.getOutSite()); // 目标站 |
| | | // wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | // wrkMast.setSourceLocNo(locNo); // 源库位 |
| | | // wrkMast.setFullPlt("N"); // 满板:Y |
| | | // wrkMast.setPicking("N"); // 拣料 |
| | | // wrkMast.setExitMk("N"); // 退出 |
| | | // wrkMast.setEmptyMk("Y"); // 空板 |
| | | // wrkMast.setLinkMis("N"); |
| | | // wrkMast.setAppeUser(userId); |
| | | // wrkMast.setAppeTime(now); |
| | | // wrkMast.setModiUser(userId); |
| | | // wrkMast.setModiTime(now); |
| | | // boolean res = wrkMastService.insert(wrkMast); |
| | | // if (!res) { |
| | | // throw new CoolException("保存工作档失败"); |
| | | // } |
| | | // // 更新库位状态 D.空板 -> R.出库预约 |
| | | // if (locMast.getLocSts().equals("D")) { |
| | | // locMast.setLocSts("R"); |
| | | // locMast.setModiUser(userId); |
| | | // locMast.setModiTime(now); |
| | | // if (!locMastService.updateById(locMast)) { |
| | | // throw new CoolException("更新库位状态失败"); |
| | | // } |
| | | // } |
| | | } |
| | | } |