| | |
| | | package com.dy.pipIrrTerminal.card; |
| | | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrWaterPriceMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.*; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCardOperate; |
| | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory; |
| | | import com.dy.pipIrrGlobal.voSe.*; |
| | | import com.dy.pipIrrTerminal.card.dto.*; |
| | | import com.dy.pipIrrTerminal.card.qo.QoCards; |
| | | import com.dy.pipIrrTerminal.card.qo.QoLostCards; |
| | | import com.dy.pipIrrTerminal.card.enums.CardStateENUM; |
| | | import com.dy.pipIrrTerminal.card.enums.LastOperateENUM; |
| | | import com.dy.pipIrrTerminal.card.enums.OperateTypeENUM; |
| | | import com.dy.pipIrrTerminal.card.enums.RechargeTypeENUM; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件获取水卡列表 |
| | | * @param vo 查询条件 |
| | | * @return 水卡列表 |
| | | */ |
| | | public QueryResultVo<List<VoCards>> getCards(QoCards vo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo); |
| | | Long itemTotal = seClientCardMapper.getCardsCount(params); |
| | | |
| | | QueryResultVo<List<VoCards>> rsVo = new QueryResultVo<>(); |
| | | rsVo.pageSize = vo.pageSize; |
| | | rsVo.pageCurr = vo.pageCurr; |
| | | |
| | | if (itemTotal > 0) { |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | List<VoCards> list = seClientCardMapper.getCards(params); |
| | | rsVo.obj = list; |
| | | } else { |
| | | rsVo.obj = new ArrayList<>(); |
| | | rsVo.itemTotal = 0L; |
| | | } |
| | | |
| | | return rsVo; |
| | | } |
| | | |
| | | /** |
| | | * 获取已挂失的水卡列表 |
| | | * @param vo 查询条件 |
| | | * @return 已挂失的水卡列表 |
| | | */ |
| | | public QueryResultVo<List<VoCards>> getLostCards(QoLostCards vo) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("pageCurr", vo.pageCurr); |
| | | params.put("pageSize", vo.pageSize); |
| | | params.put("state", 2); // 挂失状态 |
| | | |
| | | Long itemTotal = seClientCardMapper.getLostCardsCount(params); |
| | | |
| | | QueryResultVo<List<VoCards>> rsVo = new QueryResultVo<>(); |
| | | rsVo.pageSize = vo.pageSize; |
| | | rsVo.pageCurr = vo.pageCurr; |
| | | |
| | | if (itemTotal > 0) { |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | List<VoCards> list = seClientCardMapper.getLostCards(params); |
| | | rsVo.obj = list; |
| | | } else { |
| | | rsVo.obj = new ArrayList<>(); |
| | | rsVo.itemTotal = 0L; |
| | | } |
| | | |
| | | return rsVo; |
| | | } |
| | | } |