| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.Node; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.InitPakoutParam; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | import com.zy.asrs.entity.param.NodeInitPatam; |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Node> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("type",3); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(nodeService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Node> wrapper = new EntityWrapper<>(); |
| | | wrapper.ne("type",3); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | |
| | | if (node.getType() != 3) { |
| | | return R.error("仅可选择货位"); |
| | | } |
| | | return nodeService.stockPakin(number, getUserId(), getHostId()); |
| | | return nodeService.stockPakin(number, getUserId(), getHostId(),getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/work/stock/pakout") |
| | | @ManagerAuth(memo = "出库") |
| | | public R initPakout(@RequestBody List<InitPakoutParam> params) { |
| | | return nodeService.initPakout(params, getUserId(), getHostId()); |
| | | return nodeService.initPakout(params, getUserId(), getHostId(),getUser()); |
| | | } |
| | | |
| | | @PostMapping(value = "/work/empty/stock") |
| | |
| | | @ManagerAuth(memo = "库位移转") |
| | | public R locMoveStart(@RequestParam String sourceLocNo, |
| | | @RequestParam String targetLocNo) { |
| | | nodeService.locMove(sourceLocNo, targetLocNo, getUserId()); |
| | | nodeService.locMove(sourceLocNo, targetLocNo, getUserId(),getUser()); |
| | | return R.ok("移库启动成功"); |
| | | } |
| | | @RequestMapping(value = "/node/select/{id}/auth") |
| | |
| | | |
| | | @RequestMapping(value = "/node/init/auth") |
| | | @ManagerAuth(memo = "初始化库位") |
| | | // @Transactional |
| | | @Transactional |
| | | public R init(NodeInitPatam param) { |
| | | List<Node> list = new ArrayList<>(); |
| | | EntityWrapper<Node> nodeEntityWrapper = new EntityWrapper<>(); |
| | | nodeEntityWrapper.eq("id",param.getValue()); |
| | | nodeEntityWrapper.eq("name",param.getName()); |
| | | nodeService.delete(new EntityWrapper<Node>().eq("parent_id",param.getValue())); |
| | | Node node = nodeService.selectOne(nodeEntityWrapper); |
| | | String[] string = node.getNamePath().split(","); |
| | | for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ |
| | | for (int b=param.getStartBay(); b<=param.getEndBay(); b++) { |
| | | for (int l=param.getStartLev(); l<=param.getEndLev(); l++) { |
| | | // 获取库位号 |
| | | String locNo = param.getName()+"-" +String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l); |
| | | String locNo; |
| | | |
| | | locNo = param.getName()+"-" +String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l); |
| | | |
| | | |
| | | |
| | | Date now = new Date(); |
| | | Node node1 = new Node(); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |