自动化立体仓库 - WMS系统
zyh
3 天以前 b26b26e7170f4b86642176ac62955e57e1dc74a9
src/main/java/com/zy/asrs/controller/RcsController.java
@@ -1,12 +1,14 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONObject;
import com.core.annotations.AppAuth;
import com.zy.asrs.entity.mes.TransParent;
import com.zy.asrs.entity.rcs.RcsReporterEqpt;
import com.zy.asrs.entity.rcs.RcsReporterTask;
import com.zy.asrs.entity.rcs.RcsReturn;
import com.zy.asrs.service.RcsService;
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@@ -14,6 +16,7 @@
import javax.annotation.Resource;
@RestController
@Slf4j
public class RcsController extends BaseController {
    @Resource
@@ -23,7 +26,7 @@
    // 反馈任务执行结果
    @PostMapping("/api/robot/reporter/task")
    public RcsReturn reporterTask(@RequestBody RcsReporterTask param){
        log.info("agv任务执行反馈请求:{}",param.toString());
        return rcsService.reporterTask(param);
    }
@@ -41,4 +44,18 @@
        return rcsService.hxApplyInLine(param);
    }
    @PostMapping("/api/robot/personIn")
    @AppAuth(memo = "人员入侵回调接口")
    public JSONObject personIn(@RequestBody JSONObject param){
        JSONObject jsonObject = new JSONObject();
        if (rcsService.personIn(param) == 1){
            jsonObject.put("code", 200);
            jsonObject.put("message", "success");
        }else {
            jsonObject.put("code", 500);
            jsonObject.put("message", "fail");
        }
        return jsonObject;
    }
}