自动化立体仓库 - WMS系统
#
Administrator
昨天 50eb871e7dfcf064639cc15e53573baf28e60f26
src/main/java/com/zy/api/controller/HmesApiController.java
@@ -1,14 +1,19 @@
package com.zy.api.controller;
import com.alibaba.fastjson.JSONObject;
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.api.controller.params.ReceviceTaskParams;
import com.zy.api.service.HmesApiService;
import com.zy.asrs.entity.param.OpenOrderPakoutParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -16,6 +21,7 @@
@Api(value = "HMES对接")
@RestController
@Slf4j
@RequestMapping("/api")
public class HmesApiController {
@@ -28,15 +34,22 @@
     * @date 2026/1/10 10:40
     * @return com.core.common.R
     */
    @ManagerAuth
//    @ManagerAuth
    @ApiOperation("下发生产任务")
    @PostMapping("/work/tasks")
    public R menauWork(ReceviceTaskParams params) {
    public R menauWork(@RequestBody OpenOrderPakoutParam params) {
        log.info("下发生产任务={}", JSONObject.toJSONString(params));
        if (Objects.isNull(params)) {
            return R.error("参数不能为空!!");
        }
        if (Objects.isNull(params.getDeviceNo())) {
            return R.error("机台号不能为空!!");
        if (Cools.isEmpty(params.getOrderNo())) {
            return R.error("单据编号[orderNo]不能为空");
        }
        if (Cools.isEmpty(params.getBillType())) {
            return R.error("单据类型[BillType]不能为空");
        }
        if (Cools.isEmpty(params.getMatList())) {
            return R.error("单据明细[orderDetails]不能为空");
        }
        return hmesApiService.pubWorkTask(params);
@@ -49,14 +62,14 @@
     * @param params
     * @return com.core.common.R
     */
    @ManagerAuth
    @ApiOperation("下发生产任务")
//    @ManagerAuth
    @ApiOperation("穿线完成")
    @PostMapping("/work/release/lock")
    public R releaseLock(ReceviceTaskParams params) {
    public R releaseLock(@RequestBody ReceviceTaskParams params) {
        if (Objects.isNull(params)) {
            return R.error("参数不能为空!!");
        }
        if (Objects.isNull(params.getDeviceNo())) {
        if (Objects.isNull(params.getDevNo())) {
            return R.error("机台号不能为空!!");
        }