| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ExternalStorageConfigurationManager" enabled="true" /> |
| | | <component name="FindBugsConfigurable"> |
| | | <option name="make" value="true" /> |
| | | <option name="effort" value="default" /> |
| | |
| | | LocMast queryLocByBarCodeNew(@Param("devpNo") int devpNo, @Param("flag") int flag); |
| | | |
| | | LocMast selectByBarcode(@Param("barcode") String barcode); |
| | | |
| | | /** |
| | | * 四号堆垛机找库位 |
| | | */ |
| | | List<LocMast> selectOneByCrnNo(@Param("crnNo") int crnNo); |
| | | } |
| | |
| | | crnNo = 2; |
| | | } else if(devpNo == 104) { |
| | | crnNo = 1; |
| | | }else if(devpNo == 311) { |
| | | crnNo = 4; |
| | | } |
| | | |
| | | // 目标库位 |
| | |
| | | return startupDto; |
| | | } |
| | | |
| | | public StartupDto getLocNoBy311(String type) { |
| | | |
| | | int row; |
| | | int devpNo = 311; |
| | | int crnNo = 4; |
| | | // if (type.equals("1")) { |
| | | // row = 7; |
| | | // } else if (type.equals("2")) { |
| | | // row = 6; |
| | | // } else { |
| | | // throw new CoolException("304物料类别识别错误:" + type); |
| | | // } |
| | | |
| | | // 目标库位 |
| | | List<LocMast> locMasts = locMastMapper.selectOneByCrnNo(4); |
| | | LocMast locMast = locMasts.get(0); |
| | | if (locMast == null) { |
| | | throw new CoolException("311入库没有空库位"); |
| | | } |
| | | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", 1) |
| | | .eq("stn_no", devpNo) |
| | | .eq("crn_no", crnNo); |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.error("入库路径不存在, staDescId={}, sourceStaNo={}, crnNo={}", 1, devpNo, crnNo); |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | |
| | | // 检测目标站 |
| | | BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn()); |
| | | if (!staNo.getAutoing().equals("Y")) { |
| | | throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | } |
| | | |
| | | basCrnpService.checkSiteStatus(crnNo, true); |
| | | |
| | | // 返回dto |
| | | StartupDto startupDto = new StartupDto(); |
| | | startupDto.setWorkNo(getWorkNo(0)); |
| | | startupDto.setCrnNo(crnNo); |
| | | startupDto.setSourceStaNo(devpNo); |
| | | startupDto.setStaNo(devpNo); |
| | | startupDto.setLocNo(locMast.getLocNo()); |
| | | return startupDto; |
| | | } |
| | | |
| | | /** |
| | | * 一期寻找库位 |
| | | * 1-6层 条码1或者2开头 |
| | |
| | | throw new CoolException("物料类别获取失败"); |
| | | } |
| | | |
| | | StartupDto dto; |
| | | StartupDto dto=new StartupDto(); |
| | | if (devpNo == 304) { |
| | | dto = commonService.getLocNoBy304(str5.get(0)); |
| | | }if(devpNo == 311){ |
| | | dto = commonService.getLocNoBy311(str5.get(0)); |
| | | } else { |
| | | // dto = commonService.getLocNo(1, 1, devpNo, false, matNos, locTypeDto,0); |
| | | dto = commonService.getLocNoNew(1, devpNo,barcode); |
| | |
| | | } |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | StartupDto finalDto = dto; |
| | | pltBarcodes.forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(), elem.getSeqNo(), elem.getMatNo(), elem.getSupplier(), elem.getQty(),elem.getSource(),elem.getVendor(),elem.getMemo())); |
| | | |
| | |
| | | Wrapper<PltBarcode> wrapper = new EntityWrapper<PltBarcode>().eq("barcode", elem.getBarcode()) |
| | | .eq("bill_no", elem.getBillNo()).eq("seq_no", elem.getSeqNo()).eq("mat_no", elem.getMatNo()); |
| | | PltBarcode pltBarcode = pltBarcodeService.selectOne(wrapper); |
| | | pltBarcode.setLocNo(dto.getLocNo()); |
| | | pltBarcode.setLocNo(finalDto.getLocNo()); |
| | | pltBarcode.setIoStatus(1);//入库中 |
| | | pltBarcodeService.update(pltBarcode,wrapper); |
| | | }); |
| | |
| | | <if test="crnNo == 3"> |
| | | and row1 in(6,7) |
| | | </if> |
| | | <if test="crnNo == 4"> |
| | | and row1 in(8,9) |
| | | </if> |
| | | ORDER BY lev1 ASC, bay1 ASC |
| | | </select> |
| | | <select id="queryLocByBarCode" resultType="com.zy.asrs.entity.LocMast"> |
| | |
| | | <select id="selectByBarcode" resultMap="BaseResultMap"> |
| | | SELECT * FROM asr_loc_mast where 1=1 and barcode = #{barcode} |
| | | </select> |
| | | <select id="selectOneByCrnNo" resultMap="BaseResultMap"> |
| | | SELECT * FROM asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo} order by lev1,bay1 |
| | | </select> |
| | | </mapper> |