admin
2025-02-10 110d303eb11f26382ebaf00aff060a97e5f779c8
billion-main/src/main/java/com/billion/main/api/RestfulAPI.java
@@ -1,13 +1,11 @@
package com.billion.main.api;
import com.billion.main.api.domain.ApiResponse;
import com.billion.main.api.domain.CollectQualityData;
import com.billion.main.api.domain.WorkOrdersInfo;
import com.billion.main.api.service.IWorkOrdersInfoService;
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;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@@ -27,12 +25,11 @@
     * 1、工厂MES调用接收工单接口,将工单信息发送给产线MES
     * 2、产线MES将接收到的工单信息存入到工单表和BOM表
     */
    @PostMapping("/receiveWorkOrdersInfo")
    @GetMapping("/receiveWorkOrdersInfo")
    public ApiResponse receiveWorkOrdersInfo(@RequestBody WorkOrdersInfo workOrdersInfo) {
        try {
            // 调用service层保存数据
            boolean saveResult = iWorkOrdersInfoService.saveWorkOrders(workOrdersInfo);
            // 构建响应数据
            ApiResponse response = new ApiResponse();
            List<ApiResponse.ResponseData> dataList = new ArrayList<>();
@@ -68,7 +65,11 @@
            return response;
        }
    }
    @PostMapping("/CollectQualityData")
    public CollectQualityData CollectQualityData(@RequestBody CollectQualityData collectQualityData){
        return collectQualityData;
    }
}