Fancy
2024-07-16 9abf3d239625426e2664f6dfc3a4bd40247a8d0d
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -1,5 +1,6 @@
package com.dy.pmsStation.assemblyStep;
import com.alibaba.excel.util.StringUtils;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.pmsGlobal.pojoPlt.PltProductFile;
@@ -7,12 +8,15 @@
import com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems;
import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems;
import com.dy.pmsGlobal.pojoPr.PrProductionNode;
import com.dy.pmsGlobal.pojoSta.StaDeviceLife;
import com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 *记录组装各步骤
@@ -109,4 +113,29 @@
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    @GetMapping(path = "queryByDeviceNo")
    public BaseResponse<Map<String,String>> queryByDeviceNo(String deviceNo) {
        log.info("AssemblyStepCtrl.queryByDeviceNo():"+deviceNo);
        Map<String,String> result = sv.queryByDeviceNo(deviceNo);
        if(StringUtils.isBlank(result.get("proName"))){
            return BaseResponseUtils.buildFail("该编码("+deviceNo +")不是主要物料(系统中管控的其他设备)");
        }else{
            return BaseResponseUtils.buildSuccess(result);
        }
    }
    @GetMapping(path = "queryLifeByDeviceNo")
    public BaseResponse<?> queryLifeByDeviceNo(String deviceNo) {
        log.info("AssemblyStepCtrl.queryLifeByDeviceNo():"+deviceNo);
        List<StaDeviceLife> result = sv.queryLifeByDeviceNo(deviceNo);
        return BaseResponseUtils.buildSuccess(result);
    }
    @GetMapping(path = "queryLogByDeviceNo")
    public BaseResponse<?> queryLogByDeviceNo(String deviceNo) {
        log.info("AssemblyStepCtrl.queryLogByDeviceNo():"+deviceNo);
        List<StaDeviceProductionLog> result = sv.queryLogByDeviceNo(deviceNo);
        return BaseResponseUtils.buildSuccess(result);
    }
}