Commit ac0ca5e315f2819b57ad404e38bbc7fe88fa59d6
1 parent
3d9b0293
fix(出库单详情-批量删除):只有新建状态的出库单明细才能删除
Showing
2 changed files
with
11 additions
and
2 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... | ... | @@ -285,8 +285,7 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS |
285 | 285 | @RequiresPermissions("shipmentDetail:deleteBatch") |
286 | 286 | @DeleteMapping(value = "/deleteBatchShipmentDetail") |
287 | 287 | public Result<String> deleteBatchShipmentDetail(@RequestParam(name = "ids", required = true) String ids) { |
288 | - this.shipmentDetailService.removeByIds(Arrays.asList(ids.split(","))); | |
289 | - return Result.OK("批量删除成功!"); | |
288 | + return shipmentDetailService.removeDetailListById(Arrays.asList(ids.split(","))); | |
290 | 289 | } |
291 | 290 | |
292 | 291 | /** |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
... | ... | @@ -217,4 +217,14 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, |
217 | 217 | throw new JeecgBootException("导入出库单, 保存出库单详情失败"); |
218 | 218 | } |
219 | 219 | } |
220 | + | |
221 | + @Override | |
222 | + @Transactional(rollbackFor = Exception.class) | |
223 | + public Result removeDetailListById(List<String> idList) { | |
224 | + Result result = null; | |
225 | + for (String id : idList) { | |
226 | + result = shipmentHeaderService.deleteShipmentDetail(id); | |
227 | + } | |
228 | + return result; | |
229 | + } | |
220 | 230 | } |
... | ... |