diff --git a/bweb/src/main/java/com/bweb/config/AuthConfig.java b/bweb/src/main/java/com/bweb/config/AuthConfig.java index cf14921..2b5bfce 100644 --- a/bweb/src/main/java/com/bweb/config/AuthConfig.java +++ b/bweb/src/main/java/com/bweb/config/AuthConfig.java @@ -88,6 +88,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/client/*") .excludePathPatterns("/sms/*") .excludePathPatterns("/common/*") + .excludePathPatterns("/gasChannelConfig/*") .excludePathPatterns("/secUser/login") .excludePathPatterns("/secUser/loginOut") .excludePathPatterns("/agentMer/*") diff --git a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java index 92ca28d..8ddf968 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java @@ -10,6 +10,7 @@ import com.hfkj.entity.BsGasChannelConfig; import com.hfkj.model.ResponseData; import com.hfkj.service.order.BsGasChannelConfigService; import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.order.OrderPayChannelEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.models.auth.In; @@ -43,9 +44,12 @@ public class BsGasChannelConfigController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } // 查询配置 - BsGasChannelConfig config = gasChannelConfigService.getDetail(MerchantSourceTypeEnum.type2); + BsGasChannelConfig config = gasChannelConfigService.getDetail(MerchantSourceTypeEnum.getDataByType(body.getGasChannelType())); if (config == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + config = new BsGasChannelConfig(); + config.setGasChannelType(body.getGasChannelType()); + config.setChannelType(OrderPayChannelEnum.type1.getCode()); + config.setStatus(1); } if(body.getLedgerAccountFlag().equals(true)) { if (StringUtils.isBlank(body.getLedgerAccountData())) { diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java index 2a5c897..e3672b7 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java @@ -63,6 +63,8 @@ public class BsGasOrderController { @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "payType", required = false) String payType, @RequestParam(name = "paySerialNo", required = false) String paySerialNo, + @RequestParam(name = "channelType", required = false) Integer channelType, + @RequestParam(name = "channelOrderNo", required = false) String channelOrderNo, @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @@ -81,6 +83,8 @@ public class BsGasOrderController { param.put("orderNo", orderNo); param.put("payType", payType); param.put("paySerialNo", paySerialNo); + param.put("channelType", channelType); + param.put("channelOrderNo", channelOrderNo); param.put("userPhone", userPhone); param.put("status", status); param.put("createTimeS", createTimeS); @@ -131,6 +135,8 @@ public class BsGasOrderController { @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "payType", required = false) String payType, @RequestParam(name = "paySerialNo", required = false) String paySerialNo, + @RequestParam(name = "channelType", required = false) Integer channelType, + @RequestParam(name = "channelOrderNo", required = false) String channelOrderNo, @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @@ -151,7 +157,8 @@ public class BsGasOrderController { param.put("orderNo", orderNo); param.put("payType", payType); param.put("paySerialNo", paySerialNo); - param.put("paySerialNo", paySerialNo); + param.put("channelType", channelType); + param.put("channelOrderNo", channelOrderNo); param.put("userPhone", userPhone); param.put("status", status); param.put("createTimeS", createTimeS); @@ -204,6 +211,8 @@ public class BsGasOrderController { @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "payType", required = false) String payType, @RequestParam(name = "paySerialNo", required = false) String paySerialNo, + @RequestParam(name = "channelType", required = false) Integer channelType, + @RequestParam(name = "channelOrderNo", required = false) String channelOrderNo, @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @@ -222,6 +231,8 @@ public class BsGasOrderController { param.put("orderNo", orderNo); param.put("payType", payType); param.put("paySerialNo", paySerialNo); + param.put("channelType", channelType); + param.put("channelOrderNo", channelOrderNo); param.put("userPhone", userPhone); param.put("status", status); param.put("createTimeS", createTimeS); @@ -265,7 +276,8 @@ public class BsGasOrderController { model = new ExportGasOrderModel(); model.setAgentName(StringUtils.isBlank(gasOrder.getAgentName())?"无":gasOrder.getAgentName()); model.setAgentStaffName(StringUtils.isBlank(gasOrder.getAgentStaffName())?"无":gasOrder.getAgentStaffName()); - model.setChannelTypeName(MerchantSourceTypeEnum.getNameByType(gasOrder.getChannelType())); + model.setChannelType(MerchantSourceTypeEnum.getNameByType(gasOrder.getChannelType())); + model.setChannelOrderNo(gasOrder.getChannelOrderNo()); model.setOrderNo(gasOrder.getOrderNo()); model.setUserPhone(StringUtils.isBlank(gasOrder.getUserPhone())?"无":gasOrder.getUserPhone()); model.setMerName(gasOrder.getMerName()); @@ -290,6 +302,8 @@ public class BsGasOrderController { model.setPayTime(gasOrder.getPayTime()); model.setRefundTime(gasOrder.getRefundTime()); model.setCancelTime(gasOrder.getCancelTime()); + model.setAbnormal(gasOrder.getAbnormal()?"异常":"正常"); + model.setAbnormalContent(gasOrder.getAbnormalContent()); dataList.add(model); } @@ -322,13 +336,16 @@ public class BsGasOrderController { includeColumnFiledNames.add("payTime"); includeColumnFiledNames.add("refundTime"); includeColumnFiledNames.add("cancelTime"); + includeColumnFiledNames.add("abnormal"); + includeColumnFiledNames.add("abnormalContent"); if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { includeColumnFiledNames.add("agentName"); includeColumnFiledNames.add("agentStaffName"); includeColumnFiledNames.add("merName"); includeColumnFiledNames.add("gasStaffName"); - includeColumnFiledNames.add("channelTypeName"); + includeColumnFiledNames.add("channelType"); + includeColumnFiledNames.add("channelOrderNo"); includeColumnFiledNames.add("userPhone"); } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode()) ) { @@ -341,11 +358,13 @@ public class BsGasOrderController { } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type4.getCode()) ) { includeColumnFiledNames.add("agentStaffName"); includeColumnFiledNames.add("merName"); - includeColumnFiledNames.add("channelTypeName"); + includeColumnFiledNames.add("channelType"); + includeColumnFiledNames.add("channelOrderNo"); } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode()) ) { includeColumnFiledNames.add("merName"); - includeColumnFiledNames.add("channelTypeName"); + includeColumnFiledNames.add("channelType"); + includeColumnFiledNames.add("channelOrderNo"); } EasyExcel.write(fileUrl+pathName) diff --git a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java index 33e5885..65c8b72 100644 --- a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java +++ b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java @@ -112,6 +112,7 @@ public class NewLinkGasService { merchant.setLatitude(gasData.getString("gasAddressLatitude")); merchant.setContactsName(merchant.getMerName()); merchant.setContactsTel(merchant.getMerNo()); + merchant.setCustomerServiceTel("400-0236806"); merchant.setMerLabel(StringUtils.join(gasData.getJSONArray("gasFeatureList"),",")); if (merchant.getId() == null) { merchantService.createMerchant(merchant); @@ -263,4 +264,9 @@ public class NewLinkGasService { } return ret; } + + public static void main(String[] args) { + String str = "123456.11xxx--1s"; + System.out.println(); + } } diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java index f81a4af..c73002d 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java @@ -24,6 +24,7 @@ public interface BsGasOrderMapperExt { " and mer_name like concat('%',#{param.merName},'%') " + " and order_no like concat('%',#{param.orderNo},'%') " + " and order_child_no like concat('%',#{param.orderChildNo},'%') " + + " and channel_type = #{param.channelType} " + " and channel_order_no like concat('%',#{param.channelOrderNo},'%') " + " and pay_type = #{param.payType} " + " and pay_serial_no like concat('%',#{param.paySerialNo},'%') " + diff --git a/service/src/main/java/com/hfkj/model/order/ExportGasOrderModel.java b/service/src/main/java/com/hfkj/model/order/ExportGasOrderModel.java index 99d5d30..d0a042f 100644 --- a/service/src/main/java/com/hfkj/model/order/ExportGasOrderModel.java +++ b/service/src/main/java/com/hfkj/model/order/ExportGasOrderModel.java @@ -28,6 +28,14 @@ public class ExportGasOrderModel { @ExcelProperty("交易单号") private String orderNo; + @ColumnWidth(25) + @ExcelProperty("渠道") + private String channelType; + + @ColumnWidth(25) + @ExcelProperty("渠道单号") + private String channelOrderNo; + @ColumnWidth(15) @ExcelProperty("客户电话") private String userPhone; @@ -121,6 +129,11 @@ public class ExportGasOrderModel { private Date cancelTime; @ColumnWidth(22) - @ExcelProperty("渠道") - private String channelTypeName; + @ExcelProperty("异常状态") + private String abnormal; + + @ColumnWidth(22) + @ExcelProperty("异常原因") + private String abnormalContent; + } diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java index a8fbe5b..c0c1350 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java @@ -100,7 +100,10 @@ public class BsGasOilGunNoServiceImpl implements BsGasOilGunNoService { @Override public List getOilGunNoList(String merNo, String oilNo) { - return getOilGunNoList(merNo).stream().filter(o->o.getOilNo().equals(oilNo)).collect(Collectors.toList()); + return getOilGunNoList(merNo).stream() + .filter(o->o.getOilNo().equals(oilNo)) + .sorted(Comparator.comparing(o-> Integer.parseInt(o.getGunNo().replaceAll("\\D", "")))) + .collect(Collectors.toList()); } @Override diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java index 4da4b33..632a320 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java @@ -129,6 +129,10 @@ public class BsGasOrderServiceImpl implements BsGasOrderService { criteria.andOrderNoLike("%"+MapUtils.getString(param, "orderNo")+"%"); } + if (MapUtils.getInteger(param, "channelType") != null) { + criteria.andChannelTypeEqualTo(MapUtils.getInteger(param, "channelType")); + } + if (StringUtils.isNotBlank(MapUtils.getString(param, "orderChildNo"))) { criteria.andOrderChildNoLike("%"+MapUtils.getString(param, "orderChildNo")+"%"); } diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java index f775275..88cc29b 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java @@ -44,7 +44,7 @@ public class BsGasChannelConfigServiceImpl implements BsGasChannelConfigService return (BsGasChannelConfig) obj; } BsGasChannelConfigExample example = new BsGasChannelConfigExample(); - example.createCriteria().andGasChannelTypeEqualTo(gasSourceType.getNumber()); + example.createCriteria().andGasChannelTypeEqualTo(gasSourceType.getNumber()).andStatusNotEqualTo(0); List list = gasChannelConfigMapper.selectByExample(example); if (!list.isEmpty()) { BsGasChannelConfig gasChannelConfig = list.get(0);