| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.*; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCardOperate; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeManagerCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod; |
| | | import com.dy.pipIrrGlobal.pojoSe.*; |
| | | import com.dy.pipIrrGlobal.voSe.*; |
| | | import com.dy.pipIrrSell.cardOperate.dto.DtoRecharge; |
| | | import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM; |
| | |
| | | |
| | | @Autowired |
| | | private SePaymentMethodMapper sePaymentMethodMapper; |
| | | |
| | | @Autowired |
| | | private SeRechargeHistoryMapper seRechargeHistoryMapper; |
| | | |
| | | @Value("${project.projectNo}") |
| | | private Integer projectNo; |
| | |
| | | |
| | | /** |
| | | * 添加充值记录 |
| | | * 修改农户信息、添加充值记录 |
| | | * 修改农户信息、添加水卡操作记录、添加充值记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加充值记录 |
| | | * 添加水卡操作记录 |
| | | */ |
| | | SeCardOperate seCardOperate = new SeCardOperate(); |
| | | seCardOperate.setCardId(cardId); |
| | |
| | | seCardOperateMapper.insert(seCardOperate); |
| | | Long rec = Optional.ofNullable(seCardOperate.getId()).orElse(0L); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildErrorMsg(SellResultCode.REPLACE_FAIL_WRITE_RECHARGE_ERROR.getMessage()); |
| | | return BaseResponseUtils.buildErrorMsg(SellResultCode.RECHARGE_FAIL_WRITE_RECHARGE_ERROR.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 添加充值历史记录 |
| | | */ |
| | | SeRechargeHistory seRechargeHistory = new SeRechargeHistory(); |
| | | seRechargeHistory.setCardid(cardId); |
| | | seRechargeHistory.setClientid(clientId); |
| | | seRechargeHistory.setMoney(money); |
| | | seRechargeHistory.setAmount(amount); |
| | | seRechargeHistory.setGift(gift); |
| | | seRechargeHistory.setAfterrecharge(afterRecharge); |
| | | seRechargeHistory.setPaymentid(paymentId); |
| | | seRechargeHistory.setPrice(price); |
| | | seRechargeHistory.setRemarks(remarks); |
| | | seRechargeHistory.setOperator(operator); |
| | | seRechargeHistory.setOperatedt(rechargeTime); |
| | | seRechargeHistoryMapper.insert(seRechargeHistory); |
| | | Long rec_seRechargeHistory = Optional.ofNullable(seRechargeHistory.getId()).orElse(0L); |
| | | if(rec_seRechargeHistory == 0) { |
| | | return BaseResponseUtils.buildErrorMsg(SellResultCode.RECHARGE_FAIL_WRITE_RECHARGE_HISTORY_ERROR.getMessage()); |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |