| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OpenOrderCompleteParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakoutParam; |
| | |
| | | private MatService matService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private PackService packService; |
| | | @Autowired |
| | | private TagService tagService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | return locDetlService.queryStockTotal(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void packageUp(String barcode) { |
| | | Pack pack = packService.selectByBarcode(barcode); |
| | | if (null != pack) { |
| | | throw new CoolException(barcode + "重复提交"); |
| | | } |
| | | Date now = new Date(); |
| | | // todo:luxiaotao 解析条码规则,获取物料代码 |
| | | pack = new Pack( |
| | | barcode, // 条码[非空] |
| | | null, // 商品编号 |
| | | null, // 批号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | null // 备注 |
| | | ); |
| | | if (!packService.insert(pack)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | Mat mat = new Mat(); |
| | | mat.setTagId(tagService.getTop().getId()); |
| | | mat.setMatnr(barcode); |
| | | mat.setMaktx(barcode); |
| | | mat.setStatus(1); |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | | mat.setMemo("打包上线"); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | |
| | | } |