yangbin
2025-04-16 ddc0f14384619b9618f26a3f363f679833a68b3d
自动化产线集成模块添加数据查询
已修改1个文件
9 ■■■■■ 文件已修改
lxzn-module-msi/src/main/java/org/jeecg/modules/msi/webapi/controller/MsiWebapiJsonController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-msi/src/main/java/org/jeecg/modules/msi/webapi/controller/MsiWebapiJsonController.java
@@ -7,6 +7,7 @@
import liquibase.pro.packaged.S;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.msi.utils.JsonMapper;
@@ -29,10 +30,10 @@
    @AutoLog(value = "自动化线数据接收")
    @ApiOperation(value = "自动化线数据接收 ", notes = "自动化线数据接收")
    @PostMapping(value = "/receiveAutomation")
    public void receiveSaveMsiWebApiJson(String data) {
    public Result<?> receiveSaveMsiWebApiJson(String data) {
        MsiWebapiJsonEntity entity = new MsiWebapiJsonEntity();
        if (StringUtils.isBlank(data)) {
            return;
            return Result.error("数据为空","");
        }
        entity.setModuleType("MDC");
        entity.setWebapiInfo(data);
@@ -47,10 +48,12 @@
            }
        } catch (IOException e) {
            log.error("JSON parsing error: {}", e.getMessage());
            throw new RuntimeException("Invalid data format", e);
            return Result.error("数据异常", e.getMessage());
        }
        service.save(entity);
        return Result.OK("接收成功");
    }
}