| | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | log.info("组托:"+JSONObject.toJSONString(combParam)); |
| | | if (Cools.isEmpty(combParam.getBarcode(), combParam.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | if (Cools.isEmpty(orderDetl)) { |
| | | throw new CoolException("该单据中未找到对应物料明细"); |
| | | orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), null); |
| | | if (Cools.isEmpty(orderDetl)){ |
| | | throw new CoolException("该单据中未找到对应物料明细"); |
| | | } |
| | | } |
| | | if (Cools.isEmpty(codeDataParam.getQuality())) { |
| | | throw new CoolException("条码未返回质量状态"); |
| | |
| | | boolean orderNo1 = orderDetlService.delete(new EntityWrapper<OrderDetl>().eq("order_no", param.getOrderNo())); |
| | | |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.TRUE); |
| | | DocType docType; |
| | | if (param.getOrderType().equals("调拨单")){ |
| | | docType = docTypeService.selectOrAdd("调拨单(入)", Boolean.TRUE); |
| | | }else { |
| | | docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.TRUE); |
| | | } |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | |
| | | } |
| | | orderService.remove(order.getId()); |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.FALSE); |
| | | DocType docType; |
| | | if (param.getOrderType().equals("调拨单")){ |
| | | docType = docTypeService.selectOrAdd("调拨单(出)", Boolean.FALSE); |
| | | }else { |
| | | docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.FALSE); |
| | | } |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectItem" resultMap="BaseResultMap"> |
| | | select * from man_order_detl |
| | | select top 1 * from man_order_detl |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | and matnr = #{matnr} |