| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import zy.cloud.wms.manager.entity.LocDetl; |
| | | import zy.cloud.wms.manager.entity.Mat; |
| | | import zy.cloud.wms.manager.service.LocDetlService; |
| | | import zy.cloud.wms.manager.service.MatService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @RequestMapping(value = "/locDetl/queryDetl/auth") |
| | | @ManagerAuth |
| | | public R queryDetl(@RequestParam(required = false) String uuid) { |
| | | if (Cools.isEmpty(uuid)) { |
| | | return R.ok(); |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.findByNodeUuid(uuid); |
| | | return R.ok().add(locDetls); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/locDetl/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | if (Cools.isEmpty(nodeId)) { |
| | | nodeId = getOriginNode().getId(); |
| | | param.put("node_id", String.valueOf(nodeId)); |
| | | } |
| | | Object tagId = param.get("tag_id"); |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | | param.put("tag_id", String.valueOf(tagId)); |
| | | } |
| | | if (!Cools.isEmpty(param.get("update_time"))){ |
| | | String val = String.valueOf(param.get("update_time")); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/chart/auth", method = RequestMethod.POST) |
| | | @ManagerAuth |
| | | public R chart(@RequestParam String matnr) { |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | List<LocDetl> locDetls = locDetlService.findOfSort(matnr); |
| | | return R.ok(matnr + (mat==null?"": " - " + mat.getMaktx())).add(locDetls); |
| | | } |
| | | |
| | | } |