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