|
|
@@ -95,7 +95,7 @@ public class OtcTradeOrderController {
|
|
|
private TradeOrderCountryService tradeOrderCountryService;
|
|
|
|
|
|
@Resource
|
|
|
- private VoyageService voyageService;
|
|
|
+ private VoyageService voyageService;
|
|
|
|
|
|
@Resource
|
|
|
private ShipApi shipApi;
|
|
|
@@ -107,7 +107,7 @@ public class OtcTradeOrderController {
|
|
|
@PostMapping("/window/createOrder")
|
|
|
@Operation(summary = "win-窗口创建订单(内部)")
|
|
|
@OperateLog(type = TRADE)
|
|
|
- public CommonResult<OtcTradeOrderCreateRespVO> windowCreateOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody OtcTradeOrderCreateReqVO otcTradeOrderCreateReqVO) {
|
|
|
+ public CommonResult<OtcTradeOrderCreateRespVO> windowCreateOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody OtcTradeOrderCreateReqVO otcTradeOrderCreateReqVO) {
|
|
|
return otcTradeOrderService.windowCreateOrder(agencyAuthUtils.getAgencyLoginUser(), otcTradeOrderCreateReqVO);
|
|
|
}
|
|
|
|
|
|
@@ -116,7 +116,7 @@ public class OtcTradeOrderController {
|
|
|
@Operation(summary = "win-旅行社游船订单创建")
|
|
|
@OperateLog(type = TRADE)
|
|
|
@TradeRateLimit(name = "createOtcOrder", limitNum = 2, limitTime = 5)
|
|
|
- public CommonResult<?> createOtcOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
+ public CommonResult<?> createOtcOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
return otcTradeOrderService.createOtcOrder(agencyAuthUtils.getAgencyLoginUser(), createVO);
|
|
|
}
|
|
|
|
|
|
@@ -125,7 +125,7 @@ public class OtcTradeOrderController {
|
|
|
@Operation(summary = "win-旅行社游船订单搬单创建")
|
|
|
@OperateLog(type = TRADE)
|
|
|
@TradeRateLimit(name = "createMoveOrder", limitNum = 2, limitTime = 5)
|
|
|
- public CommonResult<?> createMoveOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
+ public CommonResult<?> createMoveOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
return otcTradeOrderService.createOtcOrder(agencyAuthUtils.getAgencyLoginUser(), createVO);
|
|
|
}
|
|
|
|
|
|
@@ -133,18 +133,16 @@ public class OtcTradeOrderController {
|
|
|
@GetMapping("/travl/getOrderById")
|
|
|
@Operation(summary = "win-旅行社游船订单获取")
|
|
|
@OperateLog(type = TRADE)
|
|
|
- @TradeRateLimit(name = "getOrderById", limitNum = 2, limitTime = 5)
|
|
|
public CommonResult<?> getOrderById(@RequestParam Long orderId) {
|
|
|
return otcTradeOrderService.getOrderById(orderId);
|
|
|
}
|
|
|
|
|
|
- @RequestDecryption
|
|
|
@GetMapping("/travl/getRole")
|
|
|
@Operation(summary = "win-旅行社游船订单获取")
|
|
|
@OperateLog(type = TRADE)
|
|
|
public CommonResult<?> getRole() {
|
|
|
LoginUser agencyLoginUser = agencyAuthUtils.getAgencyLoginUser();
|
|
|
- if (agencyLoginUser!= null && agencyLoginUser.getDistributorId() != null) {
|
|
|
+ if (agencyLoginUser != null && agencyLoginUser.getDistributorId() != null) {
|
|
|
return success(1);
|
|
|
}
|
|
|
return success(2);
|
|
|
@@ -156,7 +154,7 @@ public class OtcTradeOrderController {
|
|
|
@Operation(summary = "win-旅行社游船订单修改")
|
|
|
@OperateLog(type = TRADE)
|
|
|
@TradeRateLimit(name = "motifyOtcOrder", limitNum = 2, limitTime = 5)
|
|
|
- public CommonResult<?> motifyOtcOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
+ public CommonResult<?> motifyOtcOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
return otcTradeOrderService.motifyOtcOrder(agencyAuthUtils.getAgencyLoginUser(), createVO);
|
|
|
}
|
|
|
|
|
|
@@ -165,7 +163,7 @@ public class OtcTradeOrderController {
|
|
|
@Operation(summary = "win-旅行社游船订单创建-预定单")
|
|
|
@OperateLog(type = TRADE)
|
|
|
@TradeRateLimit(name = "createOtcFisrtOrder", limitNum = 2, limitTime = 5)
|
|
|
- public CommonResult<?> createOtcFisrtOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
+ public CommonResult<?> createOtcFisrtOrder(@Validated(value = WindowCreateOrderGroup.class) @RequestBody TradeOrderOtcCreateVO createVO) {
|
|
|
createVO.setIsYd(1);
|
|
|
return otcTradeOrderService.createOtcOrder(agencyAuthUtils.getAgencyLoginUser(), createVO);
|
|
|
}
|
|
|
@@ -180,9 +178,6 @@ public class OtcTradeOrderController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@RequestDecryption
|
|
|
@PostMapping("/window/changeTicket")
|
|
|
@Operation(summary = "win-窗口门票改签,暂未启用")
|
|
|
@@ -234,15 +229,15 @@ public class OtcTradeOrderController {
|
|
|
@Operation(summary = "win-订单审核")
|
|
|
@OperateLog(type = API)
|
|
|
@PlatTenantEnv
|
|
|
- public CommonResult<?> orderAudit(@RequestParam Long orderId,@RequestParam Integer auditStatus) {
|
|
|
- return otcTradeOrderService.orderAudit(orderId,auditStatus);
|
|
|
+ public CommonResult<?> orderAudit(@RequestParam Long orderId, @RequestParam Integer auditStatus) {
|
|
|
+ return otcTradeOrderService.orderAudit(orderId, auditStatus);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/payOrderQuery")
|
|
|
@Operation(summary = "支付反查,0待支付(轮询) 1已支付 2未支付 8888已支付等待结果(轮询) ")
|
|
|
@OperateLog(type = TRADE)
|
|
|
@PlatTenantEnv
|
|
|
- public CommonResult<?> payOrderQuery(@RequestParam Long payOrderId){
|
|
|
+ public CommonResult<?> payOrderQuery(@RequestParam Long payOrderId) {
|
|
|
return tradeOrderPayService.payOrderQuery(payOrderId);
|
|
|
}
|
|
|
|
|
|
@@ -263,7 +258,7 @@ public class OtcTradeOrderController {
|
|
|
List<TradeOrderCountryDO> countryList = tradeOrderCountryService.getListByOrderIds(orderIds);
|
|
|
List<TradeOrderCountryBaseVO> countRespVOList = BeanUtils.toBean(countryList, TradeOrderCountryBaseVO.class);
|
|
|
countRespVOList.stream().forEach(item -> {
|
|
|
- if(item.getCountryId() != null) {
|
|
|
+ if (item.getCountryId() != null) {
|
|
|
item.setCountryName(AreaUtils.format2Str(item.getCountryId()));
|
|
|
}
|
|
|
});
|
|
|
@@ -285,7 +280,7 @@ public class OtcTradeOrderController {
|
|
|
MapUtils.findAndThen(countryMap, item.getId(), country -> item.setCountryList(country));
|
|
|
MapUtils.findAndThen(orderTotalVOMap, item.getId(), totalVO -> {
|
|
|
item.setSummary(totalVO);
|
|
|
- item.setPersonStat(totalVO.getAdultTotalNum()+"大"+(totalVO.getChildTotalNum()+totalVO.getBabyTotalNum())+"小");
|
|
|
+ item.setPersonStat(totalVO.getAdultTotalNum() + "大" + (totalVO.getChildTotalNum() + totalVO.getBabyTotalNum()) + "小");
|
|
|
});
|
|
|
MapUtils.findAndThen(voyageRespVOMap, item.getVoyageId(), voyage -> item.setVoyage(voyage));
|
|
|
});
|
|
|
@@ -302,7 +297,6 @@ public class OtcTradeOrderController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@PostMapping("/window/paidOrderList")
|
|
|
@Operation(summary = "win-已支付订单列表[分页]", description = "根据条件查询订单列表")
|
|
|
@OperateLog(type = API)
|
|
|
@@ -349,8 +343,9 @@ public class OtcTradeOrderController {
|
|
|
public CommonResult<?> cancelRefund(@RequestParam("refundId") Long refundId) {
|
|
|
return adminTradeOrderService.cancelRefund(refundId);
|
|
|
}
|
|
|
+
|
|
|
@PostMapping("/refund/refundOrderList")
|
|
|
- @Operation(summary = "退单列表",description = "根据条件查询退单列表")
|
|
|
+ @Operation(summary = "退单列表", description = "根据条件查询退单列表")
|
|
|
@OperateLog(type = API)
|
|
|
@PlatTenantEnv
|
|
|
public CommonResult<PageResult<RefundRespVO>> getRefundRecordPage(@Valid @RequestBody RefundPageReqVO pageReqVO) {
|
|
|
@@ -361,11 +356,12 @@ public class OtcTradeOrderController {
|
|
|
@PostMapping("/refundAudit")
|
|
|
@Operation(summary = "退款审核")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<?> refundAudit(@Valid @RequestBody TradeRefundAuditReqVO refundAuditReqVO){
|
|
|
- return adminTradeOrderService.refundAudit(agencyAuthUtils.getAgencyLoginUser(),refundAuditReqVO);
|
|
|
+ public CommonResult<?> refundAudit(@Valid @RequestBody TradeRefundAuditReqVO refundAuditReqVO) {
|
|
|
+ return adminTradeOrderService.refundAudit(agencyAuthUtils.getAgencyLoginUser(), refundAuditReqVO);
|
|
|
}
|
|
|
+
|
|
|
@GetMapping("/refund/refundDetailList")
|
|
|
- @Operation(summary = "退单批次详情",description = "根据退单id查询退单批次详情")
|
|
|
+ @Operation(summary = "退单批次详情", description = "根据退单id查询退单批次详情")
|
|
|
@OperateLog(type = API)
|
|
|
@PlatTenantEnv
|
|
|
public CommonResult<List<RefundDetailRespVO>> getRefundBatchDetails(@Valid @RequestParam("id") Long id) {
|
|
|
@@ -374,7 +370,7 @@ public class OtcTradeOrderController {
|
|
|
|
|
|
|
|
|
@GetMapping("/refund/refundRecordList")
|
|
|
- @Operation(summary = "退款记录[分页]",description = "根据条件查询退款记录")
|
|
|
+ @Operation(summary = "退款记录[分页]", description = "根据条件查询退款记录")
|
|
|
@OperateLog(type = API)
|
|
|
@PlatTenantEnv
|
|
|
public CommonResult<PageResult<RefundRecordRespVO>> getPageRefundRecord(@Valid RefundRecordPageReqVO pageReqVO) {
|
|
|
@@ -383,34 +379,36 @@ public class OtcTradeOrderController {
|
|
|
|
|
|
/**
|
|
|
* 退款记录如果长时间处于退款中,可以向支付平台反查
|
|
|
+ *
|
|
|
* @param refundRecordId
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/refundQuery")
|
|
|
@Operation(summary = "退款中-退款查询(向支付平台)")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<?> refundQuery(@Valid Long refundRecordId){
|
|
|
+ public CommonResult<?> refundQuery(@Valid Long refundRecordId) {
|
|
|
return adminTradeOrderService.refundQuery(refundRecordId);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/refundByRecord")
|
|
|
@Operation(summary = "根据退款记录再发发起退款")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<?> refundByRecord(Long refundRecordId){
|
|
|
- return adminTradeOrderService.refundByRecord(agencyAuthUtils.getAgencyLoginUser(),refundRecordId);
|
|
|
+ public CommonResult<?> refundByRecord(Long refundRecordId) {
|
|
|
+ return adminTradeOrderService.refundByRecord(agencyAuthUtils.getAgencyLoginUser(), refundRecordId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 退款单如果处于长时间处于等待退款(因mq消息失败了)、或者供应商退款失败。可手动发起退款给游客
|
|
|
+ *
|
|
|
* @param refundId
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/manualRefund")
|
|
|
@Operation(summary = "人工退款")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<?> manualRefund(Long refundId){
|
|
|
+ public CommonResult<?> manualRefund(Long refundId) {
|
|
|
|
|
|
- return adminTradeOrderService.manualRefund(agencyAuthUtils.getAgencyLoginUser(),refundId);
|
|
|
+ return adminTradeOrderService.manualRefund(agencyAuthUtils.getAgencyLoginUser(), refundId);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/window/orderDetailInfo")
|
|
|
@@ -420,56 +418,58 @@ public class OtcTradeOrderController {
|
|
|
public CommonResult<List<TradeDetailBaseDO>> getDetailInfo(@Valid @RequestParam("id") Long id) {
|
|
|
return success(otcTradeOrderService.getDetailInfo(id));
|
|
|
}
|
|
|
+
|
|
|
@PostMapping("/payOuterOrder")
|
|
|
@Operation(summary = "外部订单支付")
|
|
|
@OperateLog(type = TRADE)
|
|
|
- public CommonResult<PayOrderRespVO> payOuterOrder(@Valid @RequestBody PayOrderReqVO payOrderReqVO){
|
|
|
+ public CommonResult<PayOrderRespVO> payOuterOrder(@Valid @RequestBody PayOrderReqVO payOrderReqVO) {
|
|
|
CommonResult<PayOrderRespVO> commonResult = tradeOrderPayService.payOuterOrder(payOrderReqVO);
|
|
|
return commonResult;
|
|
|
}
|
|
|
+
|
|
|
@GetMapping("/categoryOrSpu")
|
|
|
@Operation(summary = "sell-产品分组和产品数据")
|
|
|
@OperateLog(type = API)
|
|
|
public CommonResult<List<CategoryRespDTO>> categoryOrSpu(String type, String travelDate) {
|
|
|
- return success(otcTradeOrderService.getCategoryOrSpuList(type,travelDate));
|
|
|
+ return success(otcTradeOrderService.getCategoryOrSpuList(type, travelDate));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/categoryAndSpuAll")
|
|
|
@Operation(summary = "sell-产品分组和产品数据")
|
|
|
@OperateLog(type = API)
|
|
|
public CommonResult<List<CategoryRespDTO>> categoryAndSpuAll(String type, String travelDate) {
|
|
|
- return success(otcTradeOrderService.getCategoryAndSpuAll(type,travelDate));
|
|
|
+ return success(otcTradeOrderService.getCategoryAndSpuAll(type, travelDate));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/categoryAndSpuAllOuterOTC")
|
|
|
@Operation(summary = "sell-产品分组和产品数据外部旅行社平台搬单")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<List<CategoryRespDTO>> categoryAndSpuAllOuterOTC(Long distributorId,String travelDate) {
|
|
|
- return success(otcTradeOrderService.getCategoryAndSpuAllOuterOTC(distributorId,travelDate));
|
|
|
+ public CommonResult<List<CategoryRespDTO>> categoryAndSpuAllOuterOTC(Long distributorId, String travelDate) {
|
|
|
+ return success(otcTradeOrderService.getCategoryAndSpuAllOuterOTC(distributorId, travelDate));
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping("/productSupInfo")
|
|
|
@Operation(summary = "sell-产品详情")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<ProductSpuRespDTO> productSpu(@Valid @RequestParam("id") Long id, @RequestParam("date") String date, @RequestParam(value="planId",required = false) String planId) {
|
|
|
+ public CommonResult<ProductSpuRespDTO> productSpu(@Valid @RequestParam("id") Long id, @RequestParam("date") String date, @RequestParam(value = "planId", required = false) String planId) {
|
|
|
//查看日期是否存在
|
|
|
- if(date.isEmpty()){
|
|
|
+ if (date.isEmpty()) {
|
|
|
date = DateUtil.format(new Date(), DatePattern.NORM_DATE_PATTERN);
|
|
|
}
|
|
|
- return success(otcTradeOrderService.getProductSpuDTO(id,date,planId));
|
|
|
+ return success(otcTradeOrderService.getProductSpuDTO(id, date, planId));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/plat/productSupInfo")
|
|
|
@Operation(summary = "sell-产品详情")
|
|
|
@OperateLog(type = API)
|
|
|
- public CommonResult<ProductSpuRespDTO> platProductSpu(@Valid @RequestParam("id") Long id,@RequestParam("date") String date,@RequestParam(value="planId",required = false) String planId
|
|
|
- ,@RequestParam("distributorId") Long distributorId) {
|
|
|
+ public CommonResult<ProductSpuRespDTO> platProductSpu(@Valid @RequestParam("id") Long id, @RequestParam("date") String date, @RequestParam(value = "planId", required = false) String planId
|
|
|
+ , @RequestParam("distributorId") Long distributorId) {
|
|
|
//查看日期是否存在
|
|
|
- if(date.isEmpty()){
|
|
|
+ if (date.isEmpty()) {
|
|
|
date = DateUtil.format(new Date(), DatePattern.NORM_DATE_PATTERN);
|
|
|
}
|
|
|
- return success(otcTradeOrderService.getProductSpuDTO(id,date,planId,distributorId));
|
|
|
+ return success(otcTradeOrderService.getProductSpuDTO(id, date, planId, distributorId));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/queryProductSpu")
|
|
|
@@ -544,13 +544,13 @@ public class OtcTradeOrderController {
|
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
@Operation(summary = "导出订单列表 Excel")
|
|
|
- @OperateLog(type = EXPORT,enable = false)
|
|
|
+ @OperateLog(type = EXPORT, enable = false)
|
|
|
@PlatTenantEnv
|
|
|
public void exportOrderExcel(@Valid TradeOrderPageReqVO pageReqVO,
|
|
|
- HttpServletResponse response) throws IOException {
|
|
|
+ HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(10000);
|
|
|
- List<TradeOrderRespVO> list = otcTradeOrderService.getTradeOrderPage(pageReqVO,0).getList();
|
|
|
- if(pageReqVO.getHeaders()!=null) {
|
|
|
+ List<TradeOrderRespVO> list = otcTradeOrderService.getTradeOrderPage(pageReqVO, 0).getList();
|
|
|
+ if (pageReqVO.getHeaders() != null) {
|
|
|
Map desmap = new HashMap();
|
|
|
Map dicmap = new HashMap();
|
|
|
for (Field method : TradeOrderRespVO.class.getDeclaredFields()) {
|
|
|
@@ -572,7 +572,7 @@ public class OtcTradeOrderController {
|
|
|
headvalue.add("序号");
|
|
|
} else if (StringUtil.equals("saleAmount", head)) {
|
|
|
headvalue.add("优惠金额");
|
|
|
- }else if (StringUtil.equals("specNumber", head)) {
|
|
|
+ } else if (StringUtil.equals("specNumber", head)) {
|
|
|
headvalue.add("通用");
|
|
|
headvalue.add("成人票");
|
|
|
headvalue.add("儿童票");
|
|
|
@@ -603,29 +603,29 @@ public class OtcTradeOrderController {
|
|
|
dvalue.add(tradeOrderRespVO.getCarYdNum());
|
|
|
dvalue.add(tradeOrderRespVO.getOtherNum());
|
|
|
dvalue.add(tradeOrderRespVO.getCarryingChildrenNum());
|
|
|
- }else if (StringUtil.equals("confirmType", head)) {
|
|
|
- if(tradeOrderRespVO.getConfirmType()==null){
|
|
|
+ } else if (StringUtil.equals("confirmType", head)) {
|
|
|
+ if (tradeOrderRespVO.getConfirmType() == null) {
|
|
|
dvalue.add("不需确认");
|
|
|
- }else{
|
|
|
- if(tradeOrderRespVO.getConfirmType()==0){
|
|
|
+ } else {
|
|
|
+ if (tradeOrderRespVO.getConfirmType() == 0) {
|
|
|
dvalue.add("不需确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==1){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 1) {
|
|
|
dvalue.add("未确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==2){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 2) {
|
|
|
dvalue.add("已确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==3){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 3) {
|
|
|
dvalue.add("取消");
|
|
|
}
|
|
|
}
|
|
|
- }else if (StringUtil.equals("travelDate", head)) {
|
|
|
+ } else if (StringUtil.equals("travelDate", head)) {
|
|
|
dvalue.add(tradeOrderRespVO.getTravelDate());
|
|
|
- }else {
|
|
|
- Object value ="";
|
|
|
+ } else {
|
|
|
+ Object value = "";
|
|
|
if (MapUtil.getStr(map, head) != null) {
|
|
|
if (dicmap.get(head) != null) {
|
|
|
String label = DictFrameworkUtils.getDictDataLabel(MapUtil.getStr(dicmap, head, ""), MapUtil.getStr(map, head, "-"));
|
|
|
value = label;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
value = map.get(head);
|
|
|
}
|
|
|
}
|
|
|
@@ -637,20 +637,20 @@ public class OtcTradeOrderController {
|
|
|
}
|
|
|
// 导出数据
|
|
|
ExcelUtils.export(response, "订单列表", sheetDataList);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
ExcelUtils.write(response, "订单列表.xls", "数据", TradeOrderRespVO.class, list);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping("/export-otcexcel")
|
|
|
@Operation(summary = "导出OTC订单列表 Excel")
|
|
|
- @OperateLog(type = EXPORT,enable = false)
|
|
|
+ @OperateLog(type = EXPORT, enable = false)
|
|
|
@PlatTenantEnv
|
|
|
public void exportOtcOrderExcel(@Valid TradeOrderPageReqVO pageReqVO,
|
|
|
- HttpServletResponse response) throws IOException {
|
|
|
+ HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(10000);
|
|
|
List<TradeOrderRespVO> list = otcTradeOrderService.getOtcTradeOrderPage(pageReqVO).getList();
|
|
|
- if(pageReqVO.getHeaders()!=null) {
|
|
|
+ if (pageReqVO.getHeaders() != null) {
|
|
|
Map desmap = new HashMap();
|
|
|
Map dicmap = new HashMap();
|
|
|
for (Field method : TradeOrderRespVO.class.getDeclaredFields()) {
|
|
|
@@ -681,7 +681,7 @@ public class OtcTradeOrderController {
|
|
|
headvalue.add("优待票");
|
|
|
headvalue.add("其他");
|
|
|
headvalue.add("携童票");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
String name = MapUtil.getStr(desmap, head, head);
|
|
|
headvalue.add(name);
|
|
|
}
|
|
|
@@ -694,21 +694,21 @@ public class OtcTradeOrderController {
|
|
|
for (String head : pageReqVO.getHeaders()) {
|
|
|
if (StringUtil.equals("sort", head)) {
|
|
|
dvalue.add(i);
|
|
|
- }else if (StringUtil.equals("confirmType", head)) {
|
|
|
- if(tradeOrderRespVO.getConfirmType()==null){
|
|
|
+ } else if (StringUtil.equals("confirmType", head)) {
|
|
|
+ if (tradeOrderRespVO.getConfirmType() == null) {
|
|
|
dvalue.add("不需确认");
|
|
|
- }else{
|
|
|
- if(tradeOrderRespVO.getConfirmType()==0){
|
|
|
+ } else {
|
|
|
+ if (tradeOrderRespVO.getConfirmType() == 0) {
|
|
|
dvalue.add("不需确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==1){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 1) {
|
|
|
dvalue.add("未确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==2){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 2) {
|
|
|
dvalue.add("已确认");
|
|
|
- }else if(tradeOrderRespVO.getConfirmType()==3){
|
|
|
+ } else if (tradeOrderRespVO.getConfirmType() == 3) {
|
|
|
dvalue.add("取消");
|
|
|
}
|
|
|
}
|
|
|
- }else if (StringUtil.equals("specNumber", head)) {
|
|
|
+ } else if (StringUtil.equals("specNumber", head)) {
|
|
|
dvalue.add(tradeOrderRespVO.getCommonNum());
|
|
|
dvalue.add(tradeOrderRespVO.getFullNum());
|
|
|
dvalue.add(tradeOrderRespVO.getHalfNum());
|
|
|
@@ -717,23 +717,23 @@ public class OtcTradeOrderController {
|
|
|
dvalue.add(tradeOrderRespVO.getCarYdNum());
|
|
|
dvalue.add(tradeOrderRespVO.getOtherNum());
|
|
|
dvalue.add(tradeOrderRespVO.getCarryingChildrenNum());
|
|
|
- }else if (StringUtil.equals("travelDate", head)) {
|
|
|
+ } else if (StringUtil.equals("travelDate", head)) {
|
|
|
dvalue.add(tradeOrderRespVO.getTravelDate());
|
|
|
- }else if("travelDate".equals(head)){
|
|
|
+ } else if ("travelDate".equals(head)) {
|
|
|
String rawDate = MapUtil.getStr(map, head);
|
|
|
if (rawDate != null) {
|
|
|
String formattedDate = DateUtil.format(DateUtil.parse(rawDate), DatePattern.NORM_DATE_PATTERN);
|
|
|
dvalue.add(formattedDate);
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
dvalue.add("-");
|
|
|
}
|
|
|
} else {
|
|
|
- Object value ="";
|
|
|
+ Object value = "";
|
|
|
if (MapUtil.getStr(map, head) != null) {
|
|
|
if (dicmap.get(head) != null) {
|
|
|
String label = DictFrameworkUtils.getDictDataLabel(MapUtil.getStr(dicmap, head, ""), MapUtil.getStr(map, head, "-"));
|
|
|
value = label;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
value = map.get(head);
|
|
|
}
|
|
|
}
|
|
|
@@ -745,17 +745,17 @@ public class OtcTradeOrderController {
|
|
|
}
|
|
|
// 导出数据
|
|
|
ExcelUtils.export(response, "订单列表", sheetDataList);
|
|
|
- }else{
|
|
|
- ExcelUtils.write(response,"订单列表.xls", "数据", TradeOrderRespVO.class, list);
|
|
|
+ } else {
|
|
|
+ ExcelUtils.write(response, "订单列表.xls", "数据", TradeOrderRespVO.class, list);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping("/exportTransOrderList")
|
|
|
@Operation(summary = "导出转交订单列表 Excel")
|
|
|
- @OperateLog(type = EXPORT,enable = false)
|
|
|
+ @OperateLog(type = EXPORT, enable = false)
|
|
|
@PlatTenantEnv
|
|
|
public void exportTransOrderList(@Valid TradeOrderPageReqVO pageReqVO,
|
|
|
- HttpServletResponse response) throws IOException {
|
|
|
+ HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(6000);
|
|
|
List<TradeTranOrderRespVO> list = otcTradeOrderService.getTransOrderPage(pageReqVO).getList();
|
|
|
// 导出 Excel
|