| | |
| | | // JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(result.getData())); |
| | | return result; |
| | | } else { |
| | | throw new CoolException("查询失败!!"); |
| | | return result; |
| | | // throw new CoolException("查询失败!!"); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new CoolException(e.getMessage()); |
| | |
| | | throw new CoolException("数据错误:物料" + wkOrderItem.getMatnrCode() + "不存在!!"); |
| | | } |
| | | BeanUtils.copyProperties(matnr, wkOrderItem); |
| | | wkOrderItem.setMatnrCode(matnr.getCode()).setMatnrId(matnr.getId()).setMaktx(matnr.getName()); |
| | | wkOrderItem.setMatnrCode(matnr.getCode()) |
| | | .setSplrBatch(!Objects.isNull(wkOrderItem.getBatch()) ? wkOrderItem.getBatch() : null) |
| | | .setMatnrId(matnr.getId()) |
| | | .setMaktx(matnr.getName()); |
| | | |
| | | WkOrder wkOrder = asnOrderService.getById(Long.parseLong(params.get("orderId").toString())); |
| | | if (Objects.isNull(wkOrder)) { |
| | |
| | | //字段拼接 |
| | | sb.append(params.get(field.getFields())); |
| | | } |
| | | sb.append(wkOrderItem.getMatnrId() + wkOrderItem.getSplrBatch()); |
| | | sb.append(wkOrderItem.getMatnrId() + "null"); |
| | | log.error("=======================>添加批号字符串" + sb.toString()); |
| | | //获取16位uuid |
| | | String uuid16 = Cools.md5Chinese(sb.toString()); |
| | |
| | | } |
| | | |
| | | if (!locItemService.saveBatch(items)) { |
| | | throw new CoolException("作业库存回写失败!!"); |
| | | // throw new CoolException("作业库存回写失败!!"); |
| | | } |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |