1、通信中间件实现上行数据任务:更新物理卡和虚拟卡的剩余金额;
2、完善代码。
| | |
| | | * @param id |
| | | * @param remainMoney |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateIcCardRemainMoney(Long id , Double remainMoney){ |
| | | seClientCardDao.updateMoney(id,remainMoney); |
| | | } |
| | |
| | | * @param id |
| | | * @param remainMoney |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateVirIcCardRemainMoney(Long id , Double remainMoney){ |
| | | seVirtualCardDao.updateMoney(id,remainMoney); |
| | | } |
| | |
| | | public RmCommandHistory getCommandLog(String commandId){ |
| | | return rmCommandHistoryDao.selectByPrimaryKey(Long.parseLong(commandId)) ; |
| | | } |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateCommandLog(RmCommandHistory po){ |
| | | rmCommandHistoryDao.updateByPrimaryKey(po) ; |
| | | } |
| | |
| | | if(vo != null && vo.id != null){ |
| | | if(vo.money != null){ |
| | | if(vo.money > dataVo.remainMoney){ |
| | | //本地的剩余金额 大于 RTU上报的剩余金额 |
| | | this.updateIcCardRemainMoney(sv, vo.id, dataVo.remainMoney); |
| | | }else{ |
| | | //本地的剩余金额 小于 RTU上报的剩余金额,说明当前上报可能是补报或其他原因造成的现象 |
| | | //不做处理 |
| | | } |
| | | }else{ |
| | | //这种情况一般不会存在,除非有什么误操作造成 |
| | | this.updateIcCardRemainMoney(sv, vo.id, dataVo.remainMoney); |
| | | } |
| | | } |
| | |
| | | if(vo != null && vo.id != null){ |
| | | if(vo.money != null){ |
| | | if(vo.money > dataVo.remainMoney){ |
| | | //本地的剩余金额 大于 RTU上报的剩余金额 |
| | | this.updateVirIcCardRemainMoney(sv, vo.id, dataVo.remainMoney); |
| | | }else{ |
| | | //本地的剩余金额 小于 RTU上报的剩余金额,说明当前上报可能是补报或其他原因造成的现象 |
| | | //不做处理 |
| | | } |
| | | }else{ |
| | | //这种情况一般不会存在,除非有什么误操作造成 |
| | | this.updateVirIcCardRemainMoney(sv, vo.id, dataVo.remainMoney); |
| | | } |
| | | } |