|
|
|
@ -18,10 +18,7 @@ import com.hfkj.entity.BsTradeOrder; |
|
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
import com.hfkj.model.UserInfoModel; |
|
|
|
|
import com.hfkj.service.*; |
|
|
|
|
import com.hfkj.sysenum.PayQrCodeStatusEnum; |
|
|
|
|
import com.hfkj.sysenum.SecUserTypeEnum; |
|
|
|
|
import com.hfkj.sysenum.TradeOrderPayModeEnum; |
|
|
|
|
import com.hfkj.sysenum.TradeOrderStatusEnum; |
|
|
|
|
import com.hfkj.sysenum.*; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
@ -62,7 +59,9 @@ public class BsTradeOrderController { |
|
|
|
|
@ApiOperation(value = "查询订单列表") |
|
|
|
|
public ResponseData getOrderList(@RequestParam(value = "salesmanId" , required = false) Long salesmanId, |
|
|
|
|
@RequestParam(value = "merId" , required = false) Long merId, |
|
|
|
|
@RequestParam(value = "merNo" , required = false) String merNo, |
|
|
|
|
@RequestParam(value = "merName" , required = false) String merName, |
|
|
|
|
@RequestParam(value = "merAbbreviate" , required = false) String merAbbreviate, |
|
|
|
|
@RequestParam(value = "companyId" , required = false) Long companyId, |
|
|
|
|
@RequestParam(value = "agentId" , required = false) Long agentId, |
|
|
|
|
@RequestParam(value = "storeId" , required = false) Long storeId, |
|
|
|
@ -84,6 +83,8 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -93,6 +94,8 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -100,14 +103,18 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("agentId", userModel.getAgent().getId()); |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
|
} else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) { |
|
|
|
|
param.put("salesmanId", userModel.getSalesman().getId()); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -137,20 +144,22 @@ public class BsTradeOrderController { |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/exportTradeOrder",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询订单列表") |
|
|
|
|
@ApiOperation(value = "导出交易订单") |
|
|
|
|
public ResponseData exportTradeOrder(@RequestParam(value = "salesmanId" , required = false) Long salesmanId, |
|
|
|
|
@RequestParam(value = "merId" , required = false) Long merId, |
|
|
|
|
@RequestParam(value = "merName" , required = false) String merName, |
|
|
|
|
@RequestParam(value = "companyId" , required = false) Long companyId, |
|
|
|
|
@RequestParam(value = "agentId" , required = false) Long agentId, |
|
|
|
|
@RequestParam(value = "storeId" , required = false) Long storeId, |
|
|
|
|
@RequestParam(value = "storeName" , required = false) String storeName, |
|
|
|
|
@RequestParam(value = "payMode" , required = false) String payMode, |
|
|
|
|
@RequestParam(value = "outTradeNo" , required = false) String outTradeNo, |
|
|
|
|
@RequestParam(value = "accTradeNo" , required = false) String accTradeNo, |
|
|
|
|
@RequestParam(value = "payTimeS" , required = false) Long payTimeS, |
|
|
|
|
@RequestParam(value = "payTimeE" , required = false) Long payTimeE, |
|
|
|
|
@RequestParam(value = "status" , required = false) Integer status) { |
|
|
|
|
@RequestParam(value = "merId" , required = false) Long merId, |
|
|
|
|
@RequestParam(value = "merNo" , required = false) String merNo, |
|
|
|
|
@RequestParam(value = "merName" , required = false) String merName, |
|
|
|
|
@RequestParam(value = "merAbbreviate" , required = false) String merAbbreviate, |
|
|
|
|
@RequestParam(value = "companyId" , required = false) Long companyId, |
|
|
|
|
@RequestParam(value = "agentId" , required = false) Long agentId, |
|
|
|
|
@RequestParam(value = "storeId" , required = false) Long storeId, |
|
|
|
|
@RequestParam(value = "storeName" , required = false) String storeName, |
|
|
|
|
@RequestParam(value = "payMode" , required = false) String payMode, |
|
|
|
|
@RequestParam(value = "outTradeNo" , required = false) String outTradeNo, |
|
|
|
|
@RequestParam(value = "accTradeNo" , required = false) String accTradeNo, |
|
|
|
|
@RequestParam(value = "payTimeS" , required = false) Long payTimeS, |
|
|
|
|
@RequestParam(value = "payTimeE" , required = false) Long payTimeE, |
|
|
|
|
@RequestParam(value = "status" , required = false) Integer status) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); |
|
|
|
@ -160,6 +169,8 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -169,6 +180,8 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -176,14 +189,18 @@ public class BsTradeOrderController { |
|
|
|
|
param.put("agentId", userModel.getAgent().getId()); |
|
|
|
|
param.put("salesmanId", salesmanId); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
|
} else if (userModel.getSecUser().getObjectType().equals(SecUserTypeEnum.type3.getNumber())) { |
|
|
|
|
param.put("salesmanId", userModel.getSalesman().getId()); |
|
|
|
|
param.put("merId", merId); |
|
|
|
|
param.put("merNo", merNo); |
|
|
|
|
param.put("merName", merName); |
|
|
|
|
param.put("merAbbreviate", merAbbreviate); |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
param.put("storeName", storeName); |
|
|
|
|
|
|
|
|
@ -209,15 +226,19 @@ public class BsTradeOrderController { |
|
|
|
|
List<BsTradeOrder> tradeOrderList = tradeOrderService.getTradeOrderList(param); |
|
|
|
|
for (BsTradeOrder tradeOrder : tradeOrderList) { |
|
|
|
|
data = new ExportTradeOrderModel(); |
|
|
|
|
data.setMerNo(tradeOrder.getMerNo()); |
|
|
|
|
data.setMerName(tradeOrder.getMerName()); |
|
|
|
|
data.setMerAbbreviate(tradeOrder.getMerAbbreviate()); |
|
|
|
|
data.setStoreName(tradeOrder.getStoreName()); |
|
|
|
|
data.setOutTradeNo(tradeOrder.getOutTradeNo()); |
|
|
|
|
data.setAccTradeNo(tradeOrder.getAccTradeNo()); |
|
|
|
|
data.setPayMode(TradeOrderPayModeEnum.getNameByCode(tradeOrder.getPayMode()).getName()); |
|
|
|
|
data.setTradeAmount(tradeOrder.getTradeAmount()); |
|
|
|
|
data.setStoreDiscountActualPrice(tradeOrder.getStoreDiscountActualPrice()); |
|
|
|
|
data.setUserDiscountActualPrice(tradeOrder.getUserDiscountActualPrice()); |
|
|
|
|
data.setTradeActualAmount(tradeOrder.getTradeActualAmount()); |
|
|
|
|
data.setStatus(TradeOrderStatusEnum.getNameByNumber(tradeOrder.getStatus()).getName()); |
|
|
|
|
data.setCreateType(TradeOrderCreateTypeEnum.getNameByCode(tradeOrder.getCreateType()).getName()); |
|
|
|
|
data.setCreateTime(tradeOrder.getCreateTime()); |
|
|
|
|
data.setPayTime(tradeOrder.getPayTime()); |
|
|
|
|
data.setPlatformMerNo(tradeOrder.getPlatformMerNo()); |
|
|
|
|