| | |
| | | if (Objects.isNull(params.getOrders().getId())) { |
| | | throw new CoolException("数据错误:单据ID不能为空!!"); |
| | | } |
| | | if (this.updateById(params.getOrders())) { |
| | | if (!this.updateById(params.getOrders())) { |
| | | throw new CoolException("主单修改失败!!"); |
| | | } |
| | | if (Objects.isNull(params.getItems()) || params.getItems().isEmpty()) { |
| | |
| | | } |
| | | List<Map<String, Object>> items = params.getItems(); |
| | | List<AsnOrderItem> asnOrderItems = JSONArray.parseArray(JSONArray.toJSONString(items), AsnOrderItem.class); |
| | | if (asnOrderItemService.saveOrUpdateBatch(asnOrderItems)) { |
| | | if (!asnOrderItemService.saveOrUpdateBatch(asnOrderItems)) { |
| | | throw new CoolException("明细修改失败!!"); |
| | | } |
| | | return R.ok("修改完成!!"); |