| | |
| | | import com.dy.pipIrrGlobal.command.enums.LastOperateENUM; |
| | | import com.dy.pipIrrGlobal.command.result.CommandResultCode; |
| | | import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrCommonIntakesMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrCommonIntakes; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard; |
| | |
| | | |
| | | @Autowired |
| | | private SeVirtualCardMapper seVirtualCardMapper; |
| | | |
| | | @Autowired |
| | | private PrCommonIntakesMapper prCommonIntakesMapper; |
| | | |
| | | public static ComSupport comSupport; |
| | | |
| | |
| | | rmCommandHistoryMapper.insert(rmCommandHistory); |
| | | comId = rmCommandHistory.getComId(); |
| | | |
| | | // 添加常用取水口或更新使用信息 |
| | | addCommonIntake(operator, intakeId); |
| | | |
| | | /** |
| | | * 处理回调 |
| | | * feature准备就绪后发送命令 |
| | |
| | | return response_CallBack; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 添加常用取水口或更新使用信息 |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | public Integer addCommonIntake(Long operatorId, Long intakeId) { |
| | | PrCommonIntakes commonIntake = prCommonIntakesMapper.selectByOperatorAndIntake(operatorId, intakeId); |
| | | if(commonIntake == null) { |
| | | commonIntake = new PrCommonIntakes(); |
| | | commonIntake.setOperatorId(operatorId); |
| | | commonIntake.setIntakeId(intakeId); |
| | | commonIntake.setLastUsedTime(new Date()); |
| | | commonIntake.setUsageCount(1); |
| | | return prCommonIntakesMapper.insert(commonIntake); |
| | | } |
| | | |
| | | commonIntake.setLastUsedTime(new Date()); |
| | | commonIntake.setUsageCount(commonIntake.getUsageCount() + 1); |
| | | return prCommonIntakesMapper.updateByPrimaryKeySelective(commonIntake); |
| | | } |
| | | } |