| | |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else if (entry.getKey().equals("loc_no")){ |
| | | wrapper.like(entry.getKey(), val); |
| | | } else if (entry.getKey().equals("mk")){ |
| | | // 处理是否盘点查询 |
| | | if ("Y".equals(val)){ |
| | | wrapper.eq("mk", "Y"); |
| | | } else { |
| | | // 未盘点:mk != 'Y' 或者 mk is null |
| | | wrapper.ne("mk", "Y"); |
| | | } |
| | | } else { |
| | | if (entry.getKey().equals("loc_type1")){ |
| | | sign=true; |
| | |
| | | return R.error("初始化失败===>"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/clearMk/auth") |
| | | @ManagerAuth(memo = "清除盘点状态") |
| | | public R clearMk(@RequestBody Map<String, Object> param) { |
| | | List<String> locNos = (List<String>) param.get("locNos"); |
| | | if (Cools.isEmpty(locNos)) { |
| | | return R.error("库位号列表不能为空"); |
| | | } |
| | | try { |
| | | // 批量更新 mk 字段为 'N' |
| | | for (String locNo : locNos) { |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | locMast.setMk("N"); |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(new Date()); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } |
| | | return R.ok("清除盘点状态成功,共处理 " + locNos.size() + " 个库位"); |
| | | } catch (Exception e) { |
| | | return R.error("清除盘点状态失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |