| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | public R list(@RequestHeader(required = false) String appkey, @RequestBody(required = false) LocMast param) { |
| | | auth(appkey, param, request); |
| | | LocMast locMast = locMastService.selectById(param.getLocNo()); |
| | | if (locMast == null) { |
| | | return R.error("库位不存在"); |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("status", locMast.getLocSts()); |
| | |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locMast/sts") |
| | | @Synchronized |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit) { |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | |
| | | private void auth(String appkey, Object obj, HttpServletRequest request) { |
| | | log.info("{}接口被访问;appkey:{};请求数据:{}", "open/sensorType/list/auth/v1", appkey, JSON.toJSONString(obj)); |