Administrator
2024-07-08 94aafe0f543196f9ea6c637b46a2d195125498c3
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java
@@ -10,8 +10,10 @@
import com.dy.pipIrrGlobal.daoPr.PrIntakeVcMapper;
import com.dy.pipIrrGlobal.daoPr.PrWaterPriceMapper;
import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper;
import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory;
import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
import com.dy.pipIrrGlobal.voPr.VoOnLineIntake;
import com.dy.pipIrrGlobal.voRm.VoUnclosedValve;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
@@ -40,6 +42,7 @@
    private final PrIntakeMapper prIntakeMapper;
    private final PrWaterPriceMapper prWaterPriceMapper;
    private final PrIntakeVcMapper prIntakeVcMapper;
    private final SeClientCardMapper seClientCardMapper;
    /**
     * 虚拟卡ID换虚拟卡对象
@@ -56,25 +59,6 @@
     */
    public Double getPrice() {
        return prWaterPriceMapper.getPrice();
    }
    /**
     * 添加命令日志
     * @param po 命令日志对象
     * @return 字符串类型的主键
     */
    public Long insert(RmCommandHistory po) {
        rmCommandHistoryMapper.insert(po);
        return po.getId();
    }
    /**
     * 修改命令日志信息
     * @param po 命令日志对象
     * @return 影响记录数量
     */
    public Integer update(RmCommandHistory po) {
        return rmCommandHistoryMapper.updateByPrimaryKeySelective(po);
    }
    /**
@@ -123,4 +107,42 @@
    public Long getVcIdByIntakeId(Long intakeId) {
        return prIntakeVcMapper.getVcIdByIntakeId(intakeId);
    }
    /**
     * 根据水卡编号获取水卡对象,远程充值使用
     * @param cardId
     * @return
     */
    public SeClientCard geClientCardByCardId(Long cardId) {
        return seClientCardMapper.selectByPrimaryKey(cardId);
    }
    /**
     * 添加命令日志
     * @param po 命令日志对象
     * @return 字符串类型的主键
     */
    public Long insert(RmCommandHistory po) {
        rmCommandHistoryMapper.insert(po);
        return po.getId();
    }
    /**
     * 修改命令日志信息
     * @param po 命令日志对象
     * @return 影响记录数量
     */
    public Integer update(RmCommandHistory po) {
        return rmCommandHistoryMapper.updateByPrimaryKeySelective(po);
    }
    /**
     * 取水口名称换取水口ID,扫码开阀使用
     * @param intakeName
     * @return
     */
    public Long getIntakeIdByName(String intakeName) {
        return prIntakeMapper.getIntakeIdByName(intakeName);
    }
}