From 2a959177f1adcd36f790e14718bbd116752e5c64 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期六, 12 十月 2024 17:19:10 +0800 Subject: [PATCH] 2024-10-12 朱宝民 优化交易明细导出、取水口导出、阀控器导出 --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java | 90 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 86 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java index 1765f7b..889b36a 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java @@ -2,26 +2,30 @@ import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; -import com.dy.pipIrrGlobal.daoSe.SeVcRechargeMapper; -import com.dy.pipIrrGlobal.daoSe.SeVcRefundItemMapper; -import com.dy.pipIrrGlobal.daoSe.SeVcRefundMapper; -import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper; +import com.dy.common.webUtil.QueryResultVo; +import com.dy.pipIrrGlobal.daoSe.*; import com.dy.pipIrrGlobal.pojoSe.SeVcRecharge; import com.dy.pipIrrGlobal.pojoSe.SeVcRefund; import com.dy.pipIrrGlobal.pojoSe.SeVcRefundItem; import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard; import com.dy.pipIrrGlobal.voSe.VoOrders; +import com.dy.pipIrrGlobal.voSe.VoVcRecharge; +import com.dy.pipIrrGlobal.voSe.VoVirtualCard; import com.dy.pipIrrSell.result.SellResultCode; +import com.dy.pipIrrSell.virtualCard.dto.DtoVcRecharge; import com.dy.pipIrrSell.virtualCard.dto.DtoVirtualCard; import com.dy.pipIrrSell.virtualCard.enums.LastOperateENUM; import com.dy.pipIrrSell.virtualCard.enums.OrderStateENUM; 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; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; +import java.util.Map; /** * @author ZhuBaoMin @@ -45,6 +49,38 @@ @Autowired private SeVcRefundItemMapper seVcRefundItemMapper; + @Autowired + private SeClientMapper seClientMapper; + + @Value("${vc.alarmValue}") + private Integer alarmValue; + + /** + * 鏍规嵁鍐滄埛ID鑾峰彇5绾ц鏀垮尯鍒掍唬鐮侊紝娉ㄥ唽铏氭嫙鍗′娇鐢� + * @param clientId 鍐滄埛ID + * @return 5绾ц鏀垮尯鍒掍唬鐮� + */ + public Long getAreaCodeById(Long clientId) { + return seClientMapper.getAreaCodeById(clientId); + } + + /** + * 鑾峰彇鍐滄埛鍏ㄩ儴铏氭嫙鍗� + * @return + */ + public List<VoVirtualCard> getVCs(Long clientId) { + return seVirtualCardMapper.getVCs(alarmValue, clientId); + } + + /** + * 鏍规嵁铏氭嫙鍗D鑾峰彇铏氭嫙鍗″璞� + * @param vcId + * @return + */ + public VoVirtualCard getVcById(Long vcId) { + return seVirtualCardMapper.getVcById(vcId); + } + /** * 娉ㄥ唽铏氭嫙鍗� * @param po @@ -54,6 +90,24 @@ seVirtualCardMapper.insert(po); return po.getId(); } + + /** + * 鏍规嵁琛屾斂鍖哄垝涓叉ā绯婃煡璇㈣櫄鎷熷崱缂栧彿锛屾敞鍐岃櫄鎷熷崱浣跨敤 + * @param areaCode + * @return + */ + String getVcCardNumOfMax(String areaCode) { + return seVirtualCardMapper.getVcCardNumOfMax(areaCode); + } + + /** 搴熷純 + * 楠岃瘉鍐滄埛鏄惁鎷ユ湁鎸囧畾鍚嶇О鐨勮櫄鎷熷崱 + * @param po + * @return + */ + //public Integer getRecordCountByName(DtoRegist po) { + // return seVirtualCardMapper.getRecordCountByName(po.getClientId(), po.getVcName()); + //} /** * 淇敼铏氭嫙鍗� @@ -107,6 +161,15 @@ return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL.getMessage()); } return BaseResponseUtils.buildSuccess(true) ; + } + + /** + * 鏍规嵁璁㈠崟鍙疯幏鍙栬櫄鎷熷崱鍏呭�煎璞� + * @param orderNumber + * @return + */ + public SeVcRecharge getVCRechargeByorderNumber(String orderNumber) { + return seVcRechargeMapper.getVCRechargeByorderNumber(orderNumber); } /** @@ -271,4 +334,23 @@ public Long getRefundIdByRefundNumber(String refundNumber) { return seVcRefundItemMapper.getRefundIdByRefundNumber(refundNumber); } + + /** + * 鑾峰彇铏氭嫙鍗″厖鍊艰褰� + * @param dtoVcRecharge + * @return + */ + public QueryResultVo<List<VoVcRecharge>> getVcRechargeRecords(DtoVcRecharge dtoVcRecharge){ + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(dtoVcRecharge); + Long itemTotal = seVirtualCardMapper.getRechargeRecordCount(params); + + QueryResultVo<List<VoVcRecharge>> rsVo = new QueryResultVo<>(); + rsVo.pageSize = dtoVcRecharge.pageSize; + rsVo.pageCurr = dtoVcRecharge.pageCurr; + + rsVo.calculateAndSet(itemTotal, params); + rsVo.obj = seVirtualCardMapper.getVcRechargeRecords(params); + + return rsVo; + } } -- Gitblit v1.8.0