zhubaomin
昨天 d730e2a289b38356e28a04b35a0cb2e7b4c6c282
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cdA2/CdSv.java
@@ -2,15 +2,19 @@
import com.dy.pipIrrGlobal.daoPr.PrIntakeVcMapper;
import com.dy.pipIrrGlobal.daoPr.PrWaterPriceMapper;
import com.dy.pipIrrGlobal.daoRm.RmCommandOpenMapper;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
import com.dy.pipIrrGlobal.pojoRm.RmCommandOpen;
import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
import com.dy.pipIrrRemote.monitor.common.ComSv;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
 * @Author: liurunyu
@@ -26,6 +30,8 @@
    protected PrWaterPriceMapper prWaterPriceDao ;
    @Autowired
    protected PrIntakeVcMapper prIntakeVcDao ;
    @Autowired
    protected RmCommandOpenMapper rmCommandOpenDao ;
    public VoVirtualCard selectClientVtCardById(Long id){
        return seVirtualCardDao.getVcById(id) ;
@@ -52,4 +58,23 @@
        po.setOpenTime(new Date());
        seVirtualCardDao.updateByPrimaryKeySelective(po);
    }
    public RmCommandOpen getCommandOpen(Long intakeId){
        List<RmCommandOpen> list = rmCommandOpenDao.selectByIntakeId(intakeId) ;
        if(list != null && list.size() > 0){
            return list.get(0) ;
        }
        return null ;
    }
    @Transactional(rollbackFor = Exception.class)
    public void saveCommandOpen(RmCommandOpen po){
        rmCommandOpenDao.insert(po) ;
    }
    @Transactional(rollbackFor = Exception.class)
    public void updateCommandOpen(RmCommandOpen po){
        rmCommandOpenDao.updateByPrimaryKeySelective(po) ;
    }
}