|  |  | 
 |  |  |  | 
 |  |  | 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 | 
 |  |  | 
 |  |  |     protected PrWaterPriceMapper prWaterPriceDao ; | 
 |  |  |     @Autowired | 
 |  |  |     protected PrIntakeVcMapper prIntakeVcDao ; | 
 |  |  |     @Autowired | 
 |  |  |     protected RmCommandOpenMapper rmCommandOpenDao ; | 
 |  |  |  | 
 |  |  |     public VoVirtualCard selectClientVtCardById(Long id){ | 
 |  |  |         return seVirtualCardDao.getVcById(id) ; | 
 |  |  | 
 |  |  |         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) ; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |