| | |
| | | private ErpService erpService; |
| | | @Autowired |
| | | private AsrsService asrsService; |
| | | @Autowired |
| | | private PakinService pakinService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | Mat mat = matService.selectByMatnr(dto.getMatnr()); |
| | | if (mat == null) { |
| | | throw new CoolException("物料数据错误,请联系管理员"); |
| | | } |
| | | // 保存入库记录 |
| | | Pakin pakin = new Pakin( |
| | | "I" + String.valueOf(snowflakeIdWorker.nextId()), // 任务号[非空] |
| | | null, // 工作状态 |
| | | null, // 托盘号 |
| | | dto.getCount(), // 入库数量 |
| | | node.getId(), // 关联货位[非空] |
| | | node.getUuid(), // 货位[非空] |
| | | mat.getMatnr(), // 商品编码[非空] |
| | | null, // 商品名称 |
| | | null, // 名称 |
| | | null, // 尺码 |
| | | null, // 型号 |
| | | null, // 批号 |
| | | null, // 单位 |
| | | null, // SKC |
| | | null, // 单据类型 |
| | | null, // 单据编号 |
| | | null, // 客户名称 |
| | | null, // 品项数 |
| | | null, // 数量 |
| | | null, // 重量 |
| | | 1, // 状态 |
| | | userId, // 添加人员 |
| | | now, // 添加时间 |
| | | userId, // 修改人员 |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | VersionUtils.setPakin(pakin, mat); |
| | | if (!pakinService.insert(pakin)) { |
| | | throw new CoolException("保存入库记录失败"); |
| | | } |
| | | LocDetl locDetl = locDetlService.getLocDetl(node.getId(), dto.getMatnr()); |
| | | if (locDetl == null) { |
| | |
| | | for (Pakout pakout : pakouts) { |
| | | total = pakout.getAnfme() + total; |
| | | } |
| | | |
| | | StoPrintVo vo = new StoPrintVo(); |
| | | vo.setDocNum(param.getOrderNo()); |
| | | vo.setList(pakouts); |