#
Junjie
1 天以前 b1b7d4380a7ddcd379f6bd8b8e5bac116badc43a
src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -96,13 +96,26 @@
    @RequestMapping(value = "/locMast/delete/auth")
    @ManagerAuth(memo = "库位删除")
    public R delete(@RequestParam String param){
    public R delete(@RequestParam(value = "ids[]", required = false) String[] ids,
                    @RequestParam(value = "param", required = false) String param){
        List<String> deleteIds = new ArrayList<>();
        if (!Cools.isEmpty(ids)) {
            deleteIds.addAll(Arrays.asList(ids));
        } else if (!Cools.isEmpty(param)) {
        List<LocMast> list = JSONArray.parseArray(param, LocMast.class);
        if (Cools.isEmpty(list)){
            if (!Cools.isEmpty(list)) {
                for (LocMast entity : list) {
                    if (!Cools.isEmpty(entity) && !Cools.isEmpty(entity.getLocNo())) {
                        deleteIds.add(entity.getLocNo());
                    }
                }
            }
        }
        if (Cools.isEmpty(deleteIds)){
            return R.error();
        }
        for (LocMast entity : list){
            locMastService.remove(new QueryWrapper<>(entity));
        for (String id : deleteIds){
            locMastService.removeById(id);
        }
        return R.ok();
    }