| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private LocOwnerService locOwnerService; |
| | | |
| | | @RequestMapping(value = "/order/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | if (order != null) { |
| | | return R.error("单据编号已存在"); |
| | | } |
| | | LocOwner locOwner = null; |
| | | if (!Cools.isEmpty(param.getOwnerId())) { |
| | | locOwner = locOwnerService.selectById(param.getOwnerId()); |
| | | } else { |
| | | locOwner = locOwnerService.selectById(1); |
| | | } |
| | | Date now = new Date(); |
| | | order = new OrderPakout( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | |
| | | DateUtils.convert(now), // 单据日期 |
| | | param.getDocType(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | param.getStandby1(), // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | locOwner.getOwnerUuid(), // 客户编号 |
| | | locOwner.getOwner(), // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | orderDetl.setStandby1(param.getStandby1().toString());//po |
| | | orderDetl.setBoxType1(locOwner.getId().toString());//货主ID |
| | | orderDetl.setBoxType2(locOwner.getOwnerUuid().toString());//货主UUID |
| | | orderDetl.setBoxType3(locOwner.getOwner());//货主 |
| | | orderDetl.setPakinPakoutStatus(2); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | | } |