package com.dy.pipIrrRemote.rtuUpgrage;
|
|
import com.dy.pipIrrGlobal.daoRm.UgRtuControllerMapper;
|
import com.dy.pipIrrGlobal.daoRm.UgRtuProgramMapper;
|
import com.dy.pipIrrGlobal.daoRm.UgRtuTaskMapper;
|
import com.dy.pipIrrGlobal.pojoRm.UgRtuProgram;
|
import com.dy.pipIrrGlobal.pojoRm.UgRtuTask;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* @Author: liurunyu
|
* @Date: 2024/11/12 8:33
|
* @Description
|
*/
|
@Slf4j
|
@Service
|
public class RtuUpgradeSv {
|
@Autowired
|
private UgRtuTaskMapper tdao ;
|
@Autowired
|
private UgRtuProgramMapper pdao ;
|
@Autowired
|
private UgRtuControllerMapper cdao ;
|
|
/**
|
* 通信主键查询一个升级任务
|
* @param id 主键
|
* @return
|
*/
|
public UgRtuTask selectTaskById(String taskId){
|
return tdao.selectByPrimaryKey(Long.valueOf(taskId));
|
}
|
|
/**
|
* 通信主键查询一个升级程序
|
* @param id 主键
|
* @return
|
*/
|
public UgRtuProgram selectProgramById(Long id){
|
return pdao.selectByPrimaryKey(id);
|
}
|
|
/**
|
* 查询一个升级任务所有控制器地址
|
* @return 一些一些控制器地址
|
*/
|
public List<String> selectAllRtuAddrByTask(String taskId){
|
return this.cdao.selectAllRtuAddrByTask(Long.valueOf(taskId)) ;
|
}
|
}
|