|
@@ -1,6 +1,9 @@
|
|
|
package com.jpsoft.enterprise.modules.mobile.controller;
|
|
package com.jpsoft.enterprise.modules.mobile.controller;
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
+import cn.hutool.json.JSONArray;
|
|
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.enterprise.modules.base.dto.*;
|
|
import com.jpsoft.enterprise.modules.base.dto.*;
|
|
|
import com.jpsoft.enterprise.modules.base.entity.*;
|
|
import com.jpsoft.enterprise.modules.base.entity.*;
|
|
@@ -17,10 +20,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author 墨鱼_mo
|
|
* @author 墨鱼_mo
|
|
@@ -47,6 +47,9 @@ public class OrderInfoApiController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private BillDetailInfoService billDetailInfoService;
|
|
private BillDetailInfoService billDetailInfoService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private AccountInfoService accountInfoService;
|
|
|
|
|
+
|
|
|
@PostMapping("orderList")
|
|
@PostMapping("orderList")
|
|
|
@ApiOperation(value = "订单列表")
|
|
@ApiOperation(value = "订单列表")
|
|
|
public MessageResult<Map> orderList(
|
|
public MessageResult<Map> orderList(
|
|
@@ -134,6 +137,9 @@ public class OrderInfoApiController {
|
|
|
BillInfo billInfo = billInfoService.get(billDetailInfo.getBillId());
|
|
BillInfo billInfo = billInfoService.get(billDetailInfo.getBillId());
|
|
|
OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
|
|
OrderInfo orderInfo = orderInfoService.get(billDetailInfo.getOrderId());
|
|
|
CompanyInfo companyInfo = companyInfoService.get(billDetailInfo.getCompanyId());
|
|
CompanyInfo companyInfo = companyInfoService.get(billDetailInfo.getCompanyId());
|
|
|
|
|
+ AccountInfo accountInfo = accountInfoService.get(orderInfo.getAccountId());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
OrderDetailDTO orderDetailDTO = new OrderDetailDTO();
|
|
OrderDetailDTO orderDetailDTO = new OrderDetailDTO();
|
|
|
orderDetailDTO.setId(orderInfo.getId());
|
|
orderDetailDTO.setId(orderInfo.getId());
|
|
|
orderDetailDTO.setBillDetailId(billDetailInfo.getId());
|
|
orderDetailDTO.setBillDetailId(billDetailInfo.getId());
|
|
@@ -146,6 +152,24 @@ public class OrderInfoApiController {
|
|
|
orderDetailDTO.setPayName(orderInfo.getPayName());
|
|
orderDetailDTO.setPayName(orderInfo.getPayName());
|
|
|
orderDetailDTO.setOutOrderNo(orderInfo.getOutOrderNo());
|
|
orderDetailDTO.setOutOrderNo(orderInfo.getOutOrderNo());
|
|
|
orderDetailDTO.setPayTime(orderInfo.getPayTime());
|
|
orderDetailDTO.setPayTime(orderInfo.getPayTime());
|
|
|
|
|
+ orderDetailDTO.setAccountName(accountInfo.getAccountName());
|
|
|
|
|
+ orderDetailDTO.setAccountBank(accountInfo.getAccountBank());
|
|
|
|
|
+ orderDetailDTO.setAccountNo(accountInfo.getAccountNo());
|
|
|
|
|
+ orderDetailDTO.setPayStatusStr(orderDetailDTO.getPayStatusStr());
|
|
|
|
|
+ orderDetailDTO.setPayNameStr(orderDetailDTO.getPayNameStr());
|
|
|
|
|
+ orderDetailDTO.setTicketStatus(billDetailInfo.getTicketStatus());
|
|
|
|
|
+
|
|
|
|
|
+ List<DetailDTO> detailDTOList = new ArrayList<>();
|
|
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(billDetailInfo.getBillDetail());
|
|
|
|
|
+ Set<String> set = jsonObject.keySet();
|
|
|
|
|
+ for (String key : set){
|
|
|
|
|
+ DetailDTO detailDTO = new DetailDTO();
|
|
|
|
|
+ detailDTO.setName(key);
|
|
|
|
|
+ detailDTO.setValue(jsonObject.getBigDecimal(key));
|
|
|
|
|
+ detailDTOList.add(detailDTO);
|
|
|
|
|
+ }
|
|
|
|
|
+ orderDetailDTO.setDetailList(detailDTOList);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
messageResult.setData(orderDetailDTO);
|
|
messageResult.setData(orderDetailDTO);
|
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|