|  |  | 
 |  |  |     @Resource | 
 |  |  |     private LocMastMapper locMastMapper; | 
 |  |  |  | 
 |  |  |     @Resource | 
 |  |  |     private OrderPakoutService orderPakOutService; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     @Transactional | 
 |  |  |     public String startupFullPutStore(FullStoreParam param, Long userId) { | 
 |  |  | 
 |  |  |         List<LocDetlDto> locDetlDtos = new ArrayList<>(); | 
 |  |  |         for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { | 
 |  |  |             if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { | 
 |  |  |                 LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); | 
 |  |  |                 LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch(),paramLocDetl.getBrand() | 
 |  |  |                         ,paramLocDetl.getStandby1(),paramLocDetl.getStandby2(),paramLocDetl.getStandby3(),paramLocDetl.getBoxType1(),paramLocDetl.getBoxType2(),paramLocDetl.getBoxType3()); | 
 |  |  |                 if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |         } | 
 |  |  |         // 获取库位 | 
 |  |  |         LocMast locMast = locMastService.selectById(taskDto.getLocNo()); | 
 |  |  |         // 获取路径 | 
 |  |  |         int ioType = taskDto.isAll() ? 101 : 103; | 
 |  |  |         // 判断是否是盘点单 | 
 |  |  |         String orderNo = taskDto.getLocDtos().get(0).getOrderNo(); | 
 |  |  |         OrderPakout orderPakout = orderPakOutService.selectByNo(orderNo); | 
 |  |  |         int ioType = orderPakout.getDocType() == 8 ? 107 : (taskDto.isAll() ? 101 : 103); | 
 |  |  |         StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), staNo.getDevNo()); | 
 |  |  |         // 生成工作号 | 
 |  |  |         int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); | 
 |  |  | 
 |  |  |         List<LocDetlDto> locDetlDtos = new ArrayList<>(); | 
 |  |  |         for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { | 
 |  |  |             if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { | 
 |  |  |                 LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); | 
 |  |  |                 LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch(),paramLocDetl.getBrand() | 
 |  |  |                         ,paramLocDetl.getStandby1(),paramLocDetl.getStandby2(),paramLocDetl.getStandby3(),paramLocDetl.getBoxType1(),paramLocDetl.getBoxType2(),paramLocDetl.getBoxType3()); | 
 |  |  |                 if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |                     if (!locDetl.getAnfme().equals(adjust.getCount())) { | 
 |  |  |                         // todo 盘点记录 | 
 |  |  |                         // 修改库存 | 
 |  |  |                         if (!locDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { | 
 |  |  |                         if (!locDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getBrand(), | 
 |  |  |                                 locDetl.getStandby1(),locDetl.getStandby2(),locDetl.getStandby3(),locDetl.getBoxType1(),locDetl.getBoxType2(),locDetl.getBoxType3())) { | 
 |  |  |                             throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "批号修改数量失败"); | 
 |  |  |                         } | 
 |  |  |                         // 保存调整记录 | 
 |  |  | 
 |  |  |         // 删除库存 | 
 |  |  |         for (LocDetl locDetl : locDetls) { | 
 |  |  |             // todo 盘点记录 | 
 |  |  |             if (!locDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) { | 
 |  |  |             if (!locDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getBrand(), | 
 |  |  |                     locDetl.getStandby1(),locDetl.getStandby2(),locDetl.getStandby3(),locDetl.getBoxType1(),locDetl.getBoxType2(),locDetl.getBoxType3())) { | 
 |  |  |                 throw new CoolException("删除" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "批号库存明细失败"); | 
 |  |  |             } | 
 |  |  |             // 保存调整记录 |