From 102f95a43634a03428ec46efd94e250075467945 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 13 Jan 2023 11:06:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/web/controller/business/OrderOilController.java | 3 +++ .../main/java/com/hai/order/model/ExportGasOrderModel.java | 4 ++++ .../java/com/hai/service/impl/HighGasOrderServiceImpl.java | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/hai-order/src/main/java/com/web/controller/business/OrderOilController.java b/hai-order/src/main/java/com/web/controller/business/OrderOilController.java index af031391..99da7b9e 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderOilController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderOilController.java @@ -17,6 +17,7 @@ import com.hai.order.model.ExportGasOrderModel; import com.hai.order.service.OrderService; import com.hai.order.service.OrderServiceExt; import com.hai.order.type.OrderOilStatus; +import com.hai.order.type.OrderPayType; import com.hai.service.HighGasOrderService; import com.web.config.SysConst; import io.swagger.annotations.Api; @@ -315,6 +316,7 @@ public class OrderOilController { model.setGasPricePlatform(gasOrder.getGasPricePlatform()); model.setGasPriceGun(gasOrder.getGasPriceGun()); model.setGasPriceOfficial(gasOrder.getGasPriceOfficial()); + model.setPayTypeName(gasOrder.getPayType()!=null?OrderPayType.getDataByType(gasOrder.getPayType()).getName():"未支付"); model.setTotalDeductionPrice(gasOrder.getTotalDeductionPrice()); model.setDeductionCouponPrice(gasOrder.getDeductionCouponPrice()); model.setDeductionProductPrice(gasOrder.getDeductionProductPrice()); @@ -353,6 +355,7 @@ public class OrderOilController { includeColumnFiledNames.add("gasPricePlatform"); includeColumnFiledNames.add("gasPriceGun"); includeColumnFiledNames.add("gasPriceOfficial"); + includeColumnFiledNames.add("payTypeName"); includeColumnFiledNames.add("totalDeductionPrice"); includeColumnFiledNames.add("deductionCouponPrice"); includeColumnFiledNames.add("deductionProductPrice"); diff --git a/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java b/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java index a8f746f1..eb448df0 100644 --- a/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java +++ b/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java @@ -68,6 +68,10 @@ public class ExportGasOrderModel { @ExcelProperty({ "加油信息", "国标价"}) private BigDecimal gasPriceOfficial; + @ColumnWidth(15) + @ExcelProperty({ "支付信息", "支付方式"}) + private String payTypeName; + @ColumnWidth(15) @ExcelProperty({ "支付信息", "总优惠"}) private BigDecimal totalDeductionPrice; diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOrderServiceImpl.java index 5b9b08c9..8c36c769 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOrderServiceImpl.java @@ -102,6 +102,10 @@ public class HighGasOrderServiceImpl implements HighGasOrderService { criteria.andChildOrderNoLike("%"+MapUtils.getString(param, "childOrderNo")+"%"); } + if (StringUtils.isNotBlank(MapUtils.getString(param, "memCardNo"))) { + criteria.andMemCardNoLike("%"+MapUtils.getString(param, "memCardNo")+"%"); + } + if (StringUtils.isNotBlank(MapUtils.getString(param, "memPhone"))) { criteria.andMemPhoneLike("%"+MapUtils.getString(param, "memPhone")+"%"); } From 2ff0fc63de9263d36d92ae20457b9342de28cbdc Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 13 Jan 2023 11:29:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4diam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hai-order/src/main/resources/dev/logback.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hai-order/src/main/resources/dev/logback.xml b/hai-order/src/main/resources/dev/logback.xml index fc978f86..f1f46e40 100644 --- a/hai-order/src/main/resources/dev/logback.xml +++ b/hai-order/src/main/resources/dev/logback.xml @@ -61,7 +61,7 @@ class="ch.qos.logback.core.rolling.RollingFileAppender"> log/HltCardLog.log - log/HltCardLog.log.%d.%i + log/hlt/hltcard.log.%d.%i 64 MB @@ -78,7 +78,7 @@ class="ch.qos.logback.core.rolling.RollingFileAppender"> log/PayNotify.log - log/PayNotify/PayNotify.log.%d.%i + log/paynotify/paynotify.log.%d.%i 64 MB From 0fb74a2e3f26617195e69a0c7fcfa9eb1ec06cbf Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 16 Jan 2023 16:20:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/OrderOilController.java | 124 ++++++++++-------- .../config/HuiLianTongUnionCardConfig.java | 2 +- .../enum_type/MerchantStoreSourceType.java | 32 ++++- .../hai/order/model/ExportGasOrderModel.java | 8 ++ .../java/com/hai/order/type/OrderPayType.java | 1 + 5 files changed, 108 insertions(+), 59 deletions(-) diff --git a/hai-order/src/main/java/com/web/controller/business/OrderOilController.java b/hai-order/src/main/java/com/web/controller/business/OrderOilController.java index 99da7b9e..fd7a8cbf 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderOilController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderOilController.java @@ -9,6 +9,7 @@ import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighGasOrder; +import com.hai.enum_type.MerchantStoreSourceType; import com.hai.enum_type.UserObjectTypeEnum; import com.hai.enum_type.UserRoleTypeEnum; import com.hai.model.ResponseData; @@ -91,6 +92,25 @@ public class OrderOilController { throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); } Map param = new HashMap<>(); + param.put("gasOrgId", gasOrgId); + param.put("gasAgentId", gasAgentId); + param.put("gasSalesmanId", gasAgentId); + param.put("memCardType", memCardType); + param.put("memCardNo", memCardNo); + param.put("memPhone", memPhone); + param.put("gasOilNo", gasOilNo); + param.put("gasCarLicensePlate", gasCarLicensePlate); + param.put("orderNo", orderNo); + param.put("childOrderNo", childOrderNo); + param.put("payType", payType); + param.put("status", status); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); + param.put("refundTimeS", refundTimeS); + param.put("refundTimeE", refundTimeE); + if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { param.put("companyId", companyId); param.put("merId", merId); @@ -101,6 +121,9 @@ public class OrderOilController { param.put("gasStaffName", gasStaffName); } else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { + if (userInfoModel.getSecUser().getAdminFlag().equals(0)) { + param.put("gasOrgId", userInfoModel.getBsOrganization().getId()); + } param.put("companyId", userInfoModel.getBsCompany().getId()); param.put("merId", merId); param.put("storeId", storeId); @@ -140,24 +163,6 @@ public class OrderOilController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知用户身份"); } - param.put("gasOrgId", gasOrgId); - param.put("gasAgentId", gasAgentId); - param.put("gasSalesmanId", gasAgentId); - param.put("memCardType", memCardType); - param.put("memCardNo", memCardNo); - param.put("memPhone", memPhone); - param.put("gasOilNo", gasOilNo); - param.put("gasCarLicensePlate", gasCarLicensePlate); - param.put("orderNo", orderNo); - param.put("childOrderNo", childOrderNo); - param.put("payType", payType); - param.put("status", status); - param.put("createTimeS", createTimeS); - param.put("createTimeE", createTimeE); - param.put("payTimeS", payTimeS); - param.put("payTimeE", payTimeE); - param.put("refundTimeS", refundTimeS); - param.put("refundTimeE", refundTimeE); PageHelper.startPage(pageNum, pageSize); return ResponseMsgUtil.success(new PageInfo<>(gasOrderService.getGasOrderList(param))); @@ -204,25 +209,29 @@ public class OrderOilController { @ResponseBody @ApiOperation(value = "导出加油订单") public ResponseData exportOilOrder(@RequestParam(name = "companyId", required = false) Long companyId, - @RequestParam(name = "merId", required = false) Long merId, - @RequestParam(name = "storeId", required = false) Long storeId, - @RequestParam(name = "storeName", required = false) String storeName, - @RequestParam(name = "orderNo", required = false) String orderNo, - @RequestParam(name = "childOrderNo", required = false) String childOrderNo, - @RequestParam(name = "memPhone", required = false) String memPhone, - @RequestParam(name = "gasOilType", required = false) Integer gasOilType, - @RequestParam(name = "status", required = false) Integer status, - @RequestParam(name = "gasOrgId", required = false) Long gasOrgId, - @RequestParam(name = "gasAgentId", required = false) Long gasAgentId, - @RequestParam(name = "gasSalesmanId", required = false) Long gasSalesmanId, - @RequestParam(name = "gasStaffName", required = false) String gasStaffName, - @RequestParam(name = "gasOilNo", required = false) String gasOilNo, - @RequestParam(name = "createTimeS", required = false) Long createTimeS, - @RequestParam(name = "createTimeE", required = false) Long createTimeE, - @RequestParam(name = "payTimeS", required = false) Long payTimeS, - @RequestParam(name = "payTimeE", required = false) Long payTimeE, - @RequestParam(name = "refundTimeS", required = false) Long refundTimeS, - @RequestParam(name = "refundTimeE", required = false) Long refundTimeE + @RequestParam(name = "merId", required = false) Long merId, + @RequestParam(name = "storeId", required = false) Long storeId, + @RequestParam(name = "storeName", required = false) String storeName, + @RequestParam(name = "orderNo", required = false) String orderNo, + @RequestParam(name = "childOrderNo", required = false) String childOrderNo, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "memCardType", required = false) Integer memCardType, + @RequestParam(name = "memCardNo", required = false) String memCardNo, + @RequestParam(name = "gasOilType", required = false) Integer gasOilType, + @RequestParam(name = "payType", required = false) Integer payType, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "gasOrgId", required = false) Long gasOrgId, + @RequestParam(name = "gasAgentId", required = false) Long gasAgentId, + @RequestParam(name = "gasSalesmanId", required = false) Long gasSalesmanId, + @RequestParam(name = "gasStaffName", required = false) String gasStaffName, + @RequestParam(name = "gasOilNo", required = false) String gasOilNo, + @RequestParam(name = "gasCarLicensePlate", required = false) String gasCarLicensePlate, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "payTimeS", required = false) Long payTimeS, + @RequestParam(name = "payTimeE", required = false) Long payTimeE, + @RequestParam(name = "refundTimeS", required = false) Long refundTimeS, + @RequestParam(name = "refundTimeE", required = false) Long refundTimeE ) { try { UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); @@ -231,6 +240,25 @@ public class OrderOilController { throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); } Map param = new HashMap<>(); + param.put("gasOrgId", gasOrgId); + param.put("gasAgentId", gasAgentId); + param.put("gasSalesmanId", gasAgentId); + param.put("memCardType", memCardType); + param.put("memCardNo", memCardNo); + param.put("memPhone", memPhone); + param.put("gasOilNo", gasOilNo); + param.put("gasCarLicensePlate", gasCarLicensePlate); + param.put("orderNo", orderNo); + param.put("childOrderNo", childOrderNo); + param.put("payType", payType); + param.put("status", status); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); + param.put("refundTimeS", refundTimeS); + param.put("refundTimeE", refundTimeE); + if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { param.put("companyId", companyId); param.put("merId", merId); @@ -241,6 +269,9 @@ public class OrderOilController { param.put("gasStaffName", gasStaffName); } else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { + if (userInfoModel.getSecUser().getAdminFlag().equals(0)) { + param.put("gasOrgId", userInfoModel.getBsOrganization().getId()); + } param.put("companyId", userInfoModel.getBsCompany().getId()); param.put("merId", merId); param.put("storeId", storeId); @@ -280,21 +311,6 @@ public class OrderOilController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知用户身份"); } - param.put("gasOrgId", gasOrgId); - param.put("gasAgentId", gasAgentId); - param.put("gasSalesmanId", gasAgentId); - param.put("memPhone", memPhone); - param.put("gasOilNo", gasOilNo); - param.put("orderNo", orderNo); - param.put("childOrderNo", childOrderNo); - param.put("status", status); - param.put("createTimeS", createTimeS); - param.put("createTimeE", createTimeE); - param.put("payTimeS", payTimeS); - param.put("payTimeE", payTimeE); - param.put("refundTimeS", refundTimeS); - param.put("refundTimeE", refundTimeE); - // 查询数据 List orderList = gasOrderService.getGasOrderList(param); @@ -306,6 +322,7 @@ public class OrderOilController { model.setOrderNo(gasOrder.getOrderNo()); model.setStoreName(gasOrder.getStoreName()); model.setGasStaffName(gasOrder.getGasStaffName()); + model.setGasCarLicensePlate(gasOrder.getGasCarLicensePlate()); model.setMemPhone(gasOrder.getMemPhone()); model.setGasRefuelPrice(gasOrder.getGasRefuelPrice()); model.setGasOilLiters(gasOrder.getGasOilLiters()); @@ -333,6 +350,7 @@ public class OrderOilController { model.setGasSalesmanName(gasOrder.getGasSalesmanName()); model.setGasAgentName(gasOrder.getGasAgentName()); model.setGasOrgName(gasOrder.getGasOrgName()); + model.setChannelTypeName(MerchantStoreSourceType.getNameByType(gasOrder.getChannelType())); dataList.add(model); } @@ -346,6 +364,7 @@ public class OrderOilController { Set includeColumnFiledNames = new HashSet(); includeColumnFiledNames.add("orderNo"); includeColumnFiledNames.add("memPhone"); + includeColumnFiledNames.add("gasCarLicensePlate"); includeColumnFiledNames.add("gasRefuelPrice"); includeColumnFiledNames.add("gasOilLiters"); includeColumnFiledNames.add("gasDiscount"); @@ -367,6 +386,7 @@ public class OrderOilController { includeColumnFiledNames.add("payTime"); includeColumnFiledNames.add("refundTime"); includeColumnFiledNames.add("cancelTime"); + includeColumnFiledNames.add("channelTypeName"); if (!userInfoModel.getSecRole().getRoleType().equals(UserRoleTypeEnum.type3.getType()) && !userInfoModel.getSecRole().getRoleType().equals(UserRoleTypeEnum.type10.getType())) { diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java index 9802a331..3e62ec28 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -326,7 +326,7 @@ public class HuiLianTongUnionCardConfig { public static void main(String[] args) { // {"respMessage":"ok","data":"Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu","sign":"47186141FD8B3FB6CCB590F58321D9C6","respCode":"0000","responseId":"1669202185936"} - String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); + String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); String decodeData = DesUtil.decode("F8E91A3C", data, Charset.forName("UTF-8")); System.out.println(JSONObject.parseObject(decodeData)); diff --git a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java index dc7b8bfa..d0531b51 100644 --- a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java +++ b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java @@ -1,24 +1,36 @@ package com.hai.enum_type; +import java.util.Objects; + /** * 门店来源 * @author hurui */ public enum MerchantStoreSourceType { - type1(1, "平台自建"), - type2(2, "团油门店"), - type3(3, "加好油"), - type4(4, "金猪加油"), - type5(5, "paylo"), + type1(1, "平台自建", "自建站"), + type2(2, "团油门店", "团油"), + type3(3, "加好油", "重庆壳牌"), + type4(4, "金猪加油", "金猪加油"), + type5(5, "paylo", "四川壳牌"), ; private Integer number; private String name; - MerchantStoreSourceType(int number, String name) { + private String desc; + + MerchantStoreSourceType(int number, String name, String desc) { this.number = number; this.name = name; + this.desc = desc; + } + + public static String getNameByType(Integer type) { + for (MerchantStoreSourceType ele : values()) { + if(Objects.equals(type,ele.getNumber())) return ele.getName(); + } + return null; } public Integer getNumber() { @@ -36,4 +48,12 @@ public enum MerchantStoreSourceType { public void setName(String name) { this.name = name; } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } } diff --git a/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java b/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java index eb448df0..9cb977d4 100644 --- a/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java +++ b/hai-service/src/main/java/com/hai/order/model/ExportGasOrderModel.java @@ -32,6 +32,10 @@ public class ExportGasOrderModel { @ExcelProperty("加油员") private String gasStaffName; + @ColumnWidth(15) + @ExcelProperty("车牌") + private String gasCarLicensePlate; + @ColumnWidth(15) @ExcelProperty({ "加油信息", "加油金额"}) private BigDecimal gasRefuelPrice; @@ -116,6 +120,10 @@ public class ExportGasOrderModel { @ExcelProperty("取消时间") private Date cancelTime; + @ColumnWidth(22) + @ExcelProperty("油站渠道") + private String channelTypeName; + @ColumnWidth(20) @ExcelProperty("分公司") private String companyName; diff --git a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java index 830a7607..ca892b60 100644 --- a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java +++ b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java @@ -55,4 +55,5 @@ public enum OrderPayType { public void setName(String name) { this.name = name; } + }