| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.param.*; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | |
| | | if (param == null) { |
| | | return R.error("参数不能为空"); |
| | | } |
| | | boolean result = commonService.createInTask(param); |
| | | if (result) { |
| | | WrkMast wrkMast = commonService.createInTask(param); |
| | | if (wrkMast != null) { |
| | | return R.ok(); |
| | | } |
| | | return R.error("生成入库任务失败"); |
| | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("locNo", locMast.getLocNo()); |
| | | map.put("locSts", locMast.getLocSts()); |
| | | |
| | | map.put("barcode", locMast.getBarcode()); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | @PostMapping("/getAllLocInformation") |
| | | @OpenApiLog(memo = "获取全部库位信息") |
| | | public R getAllLocInformation() { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()); |
| | | if (locMasts.isEmpty()) { |
| | | return R.error("库位信息不存在"); |
| | | public R getAllLocInformation(@RequestBody GetAllLocInformationParam param) { |
| | | List<HashMap<String, Object>> list = new ArrayList<>(); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | |
| | | if (!Cools.isEmpty(param.getRow())) { |
| | | wrapper.eq("row1", param.getRow()); |
| | | } |
| | | |
| | | ArrayList<HashMap<String, Object>> list = new ArrayList<>(); |
| | | if (!Cools.isEmpty(param.getLev())) { |
| | | wrapper.eq("lev1", param.getLev()); |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.selectList(wrapper); |
| | | if (locMasts.isEmpty()) { |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | for (LocMast locMast : locMasts) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("locNo", locMast.getLocNo()); |
| | | map.put("locSts", locMast.getLocSts()); |
| | | map.put("barcode", locMast.getBarcode()); |
| | | map.put("row", locMast.getRow1()); |
| | | map.put("bay", locMast.getBay1()); |
| | | map.put("lev", locMast.getLev1()); |
| | | list.add(map); |
| | | } |
| | | |
| | |
| | | @GetMapping("/getFakeSystemRunStatus") |
| | | public R getFakeSystemRunStatus() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | if(mainProcessPlugin.equals("FakeProcess")) { |
| | | if(mainProcessPlugin.contains("Fake")) { |
| | | map.put("running", false); |
| | | map.put("isFake", true); |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake")); |