| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.Node; |
| | | import com.zy.asrs.entity.param.InitPakoutParam; |
| | | import com.zy.asrs.entity.param.PakinParam; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.NodeService; |
| | |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | import static jdk.nashorn.api.scripting.ScriptUtils.convert; |
| | | |
| | | @RestController |
| | | public class NodeController extends BaseController { |
| | |
| | | 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)); |
| | | Page<Node> nodePage = nodeService.selectPage(new Page<>(curr, limit), wrapper); |
| | | if (nodePage.getRecords().isEmpty()) { |
| | | nodePage = nodeService.selectPage(new Page<>(curr, limit), new EntityWrapper<Node>().eq("id",param.get("parent_id"))); |
| | | } |
| | | return R.ok(nodePage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/node/list/tree/auth") |
| | |
| | | return nodeService.stockPakin(number, getUserId(), getHostId()); |
| | | } |
| | | |
| | | @RequestMapping("/work/stock/pakout") |
| | | @ManagerAuth(memo = "出库") |
| | | public R initPakout(@RequestBody List<InitPakoutParam> params) { |
| | | return nodeService.initPakout(params, getUserId(), getHostId()); |
| | | } |
| | | |
| | | @PostMapping(value = "/work/empty/stock") |
| | | public R getGroupEmptyStock(@RequestParam(required = false) String sourceLocNo) { |
| | | List<Node> allEmptys = nodeService.selectList(new EntityWrapper<Node>() |
| | | .eq("type","3")); |
| | | return R.ok().add(allEmptys); |
| | | } |
| | | @RequestMapping("/work/move/start") |
| | | @ManagerAuth(memo = "库位移转") |
| | | public R locMoveStart(@RequestParam String sourceLocNo, |
| | | @RequestParam String targetLocNo) { |
| | | nodeService.locMove(sourceLocNo, targetLocNo, getUserId()); |
| | | return R.ok("移库启动成功"); |
| | | } |
| | | @RequestMapping(value = "/node/select/{id}/auth") |
| | | @ManagerAuth |
| | | public R getById(@PathVariable("id") String id) { |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |
| | | .eq("uuid",id)); |
| | | return R.ok(node); |
| | | } |
| | | |
| | | } |