Fancy
2024-06-25 229fad428f699ca291e17bb0c54c2e747ee92220
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
@@ -3,9 +3,11 @@
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoPlt.PltProductionLine;
import com.dy.pmsGlobal.pojoPlt.PltStation;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -45,6 +47,16 @@
        return BaseResponseUtils.buildSuccess(stationInfo);
    }
    /**
     * 查询工站是否已经被占用
     * @param
     * @return
     */
    @GetMapping(path="checkStationUsed")
    public BaseResponse<StaAssemblyWorkLast> checkStationUsed(String stationId){
        StaAssemblyWorkLast stationInfo  = sv.checkStationUsed(stationId);
        return BaseResponseUtils.buildSuccess(stationInfo);
    }
    /**
     * 查询全部执行中的组装任务清单
     * @param
     * @return
@@ -68,6 +80,32 @@
        List<PrAssemblyPlan> list = sv.selectList(params);
        return BaseResponseUtils.buildSuccess(list);
    }*/
    /**
     * 保存登录信息
     * @param
     * @return
     */
    @PostMapping(path="save")
    public BaseResponse<StaAssemblyWorkLast> save(@RequestBody @Valid QueryVo last){
        StaAssemblyWorkLast result = sv.save(last);
        return BaseResponseUtils.buildSuccess(result);
    }
    /**
     * 保存登出信息
     * @param
     * @return
     */
    @PostMapping(path="logout")
    public BaseResponse<Boolean> logout(String id){
        int count = sv.logout(id);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    @GetMapping(path = "test")
    public BaseResponse test() {
        log.info("test");