|
|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.hlgpayment.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@@ -13,6 +14,7 @@ import org.jeecg.common.utils.OauthApi;
|
|
|
import org.jeecg.common.utils.OauthTokenUtils;
|
|
|
import org.jeecg.modules.hlgpayment.entity.HlgPayment;
|
|
|
import org.jeecg.modules.hlgpayment.entity.HlgPaymentDetail;
|
|
|
+import org.jeecg.modules.hlgpayment.entity.HlgPaymentDetailExportOut;
|
|
|
import org.jeecg.modules.hlgpayment.entity.HlgPaymentDetailStatistics;
|
|
|
import org.jeecg.modules.hlgpayment.mapper.HlgPaymentDetailMapper;
|
|
|
import org.jeecg.modules.hlgpayment.service.IHlgPaymentDetailService;
|
|
|
@@ -24,10 +26,7 @@ import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.Comparator;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -178,4 +177,43 @@ public class HlgPaymentDetailServiceImpl extends ServiceImpl<HlgPaymentDetailMap
|
|
|
}
|
|
|
return page;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<HlgPaymentDetailExportOut> findListNoPage(HlgPaymentDetail hlgPaymentDetail) {
|
|
|
+ List<HlgPaymentDetailExportOut> list = new ArrayList<>();
|
|
|
+ //付款申请详情列表信息
|
|
|
+ String accessToken = OauthTokenUtils.getDayAccessToken();
|
|
|
+ String requestUrl = OauthApi.paymentDetailList;
|
|
|
+ Map<String, Object> parameters = new HashMap<>();
|
|
|
+ parameters.put("pageNo", 1);
|
|
|
+ parameters.put("pageSize", -1);
|
|
|
+ parameters.put("paymentId", hlgPaymentDetail.getPaymentId());
|
|
|
+ parameters.put("status", hlgPaymentDetail.getStatus());
|
|
|
+ //数据加密
|
|
|
+ String biz_content = CryptTool.encode(JSONObject.toJSONString(parameters));
|
|
|
+ JSONObject jsonObject = OauthTokenUtils.doRequest(requestUrl, HttpsContants.POST, biz_content, accessToken);
|
|
|
+ log.info("付款申请详情列表===={}", jsonObject);
|
|
|
+ if (jsonObject != null) {
|
|
|
+ if (jsonObject.getBoolean(HttpsContants.SUCCESS_FLAG)) {
|
|
|
+ log.info("付款申请详情列表成功===={}", jsonObject);
|
|
|
+ JSONArray jsonArray = jsonObject.getJSONArray("result");
|
|
|
+ for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
+ JSONObject jsonObjectDetail = jsonArray.getJSONObject(i);
|
|
|
+ HlgPaymentDetailExportOut hwPaymentDetailDto = new HlgPaymentDetailExportOut();
|
|
|
+ hwPaymentDetailDto.setUserName(jsonObjectDetail.getString("userName"));
|
|
|
+ hwPaymentDetailDto.setIdcardNumber(jsonObjectDetail.getString("idcardNumber"));
|
|
|
+ hwPaymentDetailDto.setPhone(jsonObjectDetail.getString("phone"));
|
|
|
+ hwPaymentDetailDto.setCardNumber(jsonObjectDetail.getString("cardNumber"));
|
|
|
+ hwPaymentDetailDto.setPayment(jsonObjectDetail.getDouble("netPayment"));
|
|
|
+ list.add(hwPaymentDetailDto);
|
|
|
+ }
|
|
|
+ log.info("付款申请详情列表数组==={}", list);
|
|
|
+ } else {
|
|
|
+ throw new JeecgBootException("查询数据异常");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ throw new JeecgBootException("查询数据异常");
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|