From d6f8ac035a76258338d23e6de96f28da1a73a669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E6=98=8E=E6=85=A7?= <1191093413@qq.com> Date: Mon, 26 Feb 2024 16:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=97=B6=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=92=8C=E5=9B=9E=E5=86=99=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/CompanyserviceController.java | 2 ++ .../jianshui/common/constant/RebackType.java | 32 +++++++++++++++++++ .../core/domain/entity/Companyservice.java | 7 ++-- .../jianshui/system/domain/ServiceManage.java | 2 ++ .../mapper/system/CompanyserviceMapper.xml | 8 ++--- .../src/views/system/manageservices/index.vue | 2 +- 6 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 jianshui-common/src/main/java/com/jianshui/common/constant/RebackType.java diff --git a/jianshui-admin/src/main/java/com/jianshui/web/controller/system/CompanyserviceController.java b/jianshui-admin/src/main/java/com/jianshui/web/controller/system/CompanyserviceController.java index d1639ff..8de2d7a 100644 --- a/jianshui-admin/src/main/java/com/jianshui/web/controller/system/CompanyserviceController.java +++ b/jianshui-admin/src/main/java/com/jianshui/web/controller/system/CompanyserviceController.java @@ -3,6 +3,7 @@ package com.jianshui.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.jianshui.common.constant.RebackType; import com.jianshui.common.core.domain.entity.Companyservice; import org.apache.commons.lang3.StringUtils; import org.springframework.security.access.prepost.PreAuthorize; @@ -57,6 +58,7 @@ public class CompanyserviceController extends BaseController public void export(HttpServletResponse response, Companyservice companyservice) { List list = companyserviceService.selectCompanyserviceList(companyservice); + list.forEach(e -> e.setRebackType(RebackType.getRebackType(e.getRebackType()))); ExcelUtil util = new ExcelUtil(Companyservice.class); util.exportExcel(response, list, "销方信息数据"); } diff --git a/jianshui-common/src/main/java/com/jianshui/common/constant/RebackType.java b/jianshui-common/src/main/java/com/jianshui/common/constant/RebackType.java new file mode 100644 index 0000000..e3f8870 --- /dev/null +++ b/jianshui-common/src/main/java/com/jianshui/common/constant/RebackType.java @@ -0,0 +1,32 @@ +package com.jianshui.common.constant; + +public enum RebackType { + REBACK_TYPE_1("1", "系统推送"), + REBACK_TYPE_2("2", "SAP推送"), + REBACK_TYPE_3("3", "数据回写"); + + private String rebackTypeCode; + private String rebackTypeMsg; + + RebackType(String rebackTypeCode, String rebackTypeMsg){ + this.rebackTypeCode = rebackTypeCode; + this.rebackTypeMsg = rebackTypeMsg; + } + + public String getRebackTypeMsg(){ + return rebackTypeMsg; + } + + public String getrebackTypeCode(){ + return rebackTypeCode; + } + + public static String getRebackType(String code){ + for(RebackType rebackType : RebackType.values()){ + if(rebackType.getrebackTypeCode().equals(code)){ + return rebackType.getRebackTypeMsg(); + } + } + return "未知回调方式"; + } +} diff --git a/jianshui-common/src/main/java/com/jianshui/common/core/domain/entity/Companyservice.java b/jianshui-common/src/main/java/com/jianshui/common/core/domain/entity/Companyservice.java index b31aa2d..5058931 100644 --- a/jianshui-common/src/main/java/com/jianshui/common/core/domain/entity/Companyservice.java +++ b/jianshui-common/src/main/java/com/jianshui/common/core/domain/entity/Companyservice.java @@ -20,6 +20,7 @@ public class Companyservice { /** * 企业编号 */ + @Excel(name = "企业编号") private Long companyid; /** @@ -99,7 +100,7 @@ public class Companyservice { * 回写方式 */ @Excel(name = "回写方式") - private Long rebackType; + private String rebackType; /** 分机号 */ // @Excel(name = "分机号") @@ -281,11 +282,11 @@ public class Companyservice { this.rebackurl = rebackurl; } - public Long getRebackType() { + public String getRebackType() { return rebackType; } - public void setRebackType(Long rebackType) { + public void setRebackType(String rebackType) { this.rebackType = rebackType; } diff --git a/jianshui-system/src/main/java/com/jianshui/system/domain/ServiceManage.java b/jianshui-system/src/main/java/com/jianshui/system/domain/ServiceManage.java index 300701f..0c9bace 100644 --- a/jianshui-system/src/main/java/com/jianshui/system/domain/ServiceManage.java +++ b/jianshui-system/src/main/java/com/jianshui/system/domain/ServiceManage.java @@ -21,9 +21,11 @@ public class ServiceManage extends BaseEntity private Long id; /** 企业ID */ + @Excel(name = "企业ID") private Long companyId; /** 服务类型 */ + @Excel(name = "服务类型") private String serviceKey; /** 服务状态 */ diff --git a/jianshui-system/src/main/resources/mapper/system/CompanyserviceMapper.xml b/jianshui-system/src/main/resources/mapper/system/CompanyserviceMapper.xml index 144609b..c2fabfe 100644 --- a/jianshui-system/src/main/resources/mapper/system/CompanyserviceMapper.xml +++ b/jianshui-system/src/main/resources/mapper/system/CompanyserviceMapper.xml @@ -66,7 +66,7 @@ and sellertax = #{sellertax} and sellername like concat('%', #{sellername}, '%') and phone = #{phone} - and reback_type = #{rebackType} + and reback_type = #{rebackType} @@ -106,7 +106,7 @@ identity, rebackurl, - reback_type, + reback_type, createtime, create_user, @@ -125,7 +125,7 @@ #{identity}, #{rebackurl}, - #{rebackType}, + #{rebackType}, #{createTime}, #{createUser}, @@ -149,7 +149,7 @@ rebackurl = #{rebackurl}, - reback_type = #{rebackType}, + reback_type = #{rebackType}, createtime = #{createTime}, diff --git a/jianshui-ui/src/views/system/manageservices/index.vue b/jianshui-ui/src/views/system/manageservices/index.vue index 94924ad..4c09dfc 100644 --- a/jianshui-ui/src/views/system/manageservices/index.vue +++ b/jianshui-ui/src/views/system/manageservices/index.vue @@ -197,7 +197,7 @@ /> - +