Jelajahi Sumber

CompanyCmd数据源冲突问题解决

mashengyi 7 bulan lalu
induk
melakukan
5ad8620c7c

+ 103 - 0
src/main/java/com/jkcredit/invoice/service/upservice/impl/CompanyCmd.java

@@ -0,0 +1,103 @@
+package com.jkcredit.invoice.service.upservice.impl;
+
+import cn.com.taiji.sdk.model.comm.protocol.eoms.EomsServiceType;
+import cn.com.taiji.sdk.model.comm.protocol.tccore.Sdk;
+import cn.com.taiji.sdk.model.comm.protocol.tccore.ServiceSubTypeAware;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * All rights Reserved, Designed By www.erayt.com
+ *
+ * @author mashengyi
+ * @Title
+ * @Package com.jkcredit.invoice.service.upservice.impl
+ * @Description (这里用一句话描述这个文件的作用)
+ * @date 2024/4/7 上午11:53
+ **/
+@Sdk(
+        packageName = "eoms"
+)
+public enum CompanyCmd implements ServiceSubTypeAware {
+
+    ADD("注册企业", EomsServiceType.COMPANY) {
+    },
+    QUERY("查询企业", EomsServiceType.COMPANY) {
+    },
+    CONTRACTADD("添加合同", EomsServiceType.COMPANY) {
+    },
+    CONTRACTQUERY("查询合同", EomsServiceType.COMPANY) {
+    },
+    FINDONE("通过num查询公司", EomsServiceType.COMPANY) {
+    },
+    LISTALL("查询全量公司", EomsServiceType.COMPANY) {
+    },
+    LISTTITLEALL("查询全量抬头", EomsServiceType.COMPANY) {
+    },
+    FINDONETITLE("通过税号查抬头", EomsServiceType.COMPANY) {
+    },
+    COMPANYLIST("百望同步公司", EomsServiceType.COMPANY) {
+    },
+    COMPANYUSERLIST("百望同步用户", EomsServiceType.COMPANY) {
+    },
+    QUERYAUTH("查询渠道", EomsServiceType.COMPANY) {
+    },
+    QUERYALLAUTH("查询全量渠道", EomsServiceType.COMPANY) {
+    },
+    QUERYCOMPANYLIMIT("查询公司所在渠道是否受限名单过滤", EomsServiceType.COMPANY) {
+    },
+    COMPANYBINDGROUPALL("查询公司卡绑定组", EomsServiceType.COMPANY) {
+    },
+    AUTHCOMPANYLIST("查询渠道下属公司", EomsServiceType.COMPANY) {
+    },
+    AUTHQUERYONE("查询渠道信息", EomsServiceType.COMPANY) {
+    },
+    CONFIRMCONTRACTADD("添加公司的承诺协议", EomsServiceType.COMPANY) {
+    },
+    CONFIRMCONTRACTQUERY("查询公司的承诺协议", EomsServiceType.COMPANY) {
+    },
+    EDITEMAIL("修改企业邮箱", EomsServiceType.COMPANY) {
+    },
+    QUERYEMAIL("查询企业最新邮箱", EomsServiceType.COMPANY) {
+    },
+    COMPANYDETAILADD("添加企业经办人明细", EomsServiceType.COMPANY) {
+    },
+    COMPANYOPERATOREDIT("变更企业经办人", EomsServiceType.COMPANY) {
+    },
+    COMPANYOPERATOREDITCONFIRM("变更企业经办人短信确认", EomsServiceType.COMPANY) {
+    },
+    UPLOADOPERATOREVIDENCE("上传经办人证明附件", EomsServiceType.COMPANY) {
+    };
+
+    private static Logger logger = LoggerFactory.getLogger(cn.com.taiji.sdk.model.comm.protocol.eoms.CompanyCmd.class);
+    private String value;
+    private EomsServiceType type;
+
+    private CompanyCmd(String var3, EomsServiceType var4) {
+        this.value = var3;
+        this.type = var4;
+    }
+
+    @Override
+    public EomsServiceType getServiceType() {
+        return this.type;
+    }
+
+    @Override
+    public String getValue() {
+        return this.value;
+    }
+
+    public EomsServiceType getType() {
+        return this.type;
+    }
+
+    public static CompanyCmd fromName(String var0) {
+        try {
+            return valueOf(var0);
+        } catch (Exception var2) {
+            logger.error(var2.getMessage());
+            return null;
+        }
+    }
+}

+ 46 - 6
src/main/java/com/jkcredit/invoice/service/upservice/impl/NoCarInterfaceImpl.java

@@ -2,20 +2,51 @@ package com.jkcredit.invoice.service.upservice.impl;
 
 import cn.com.taiji.common.manager.net.http.binclient.ApiRequestException;
 import cn.com.taiji.sdk.comm.ETCCommHelper;
-import cn.com.taiji.sdk.model.comm.protocol.eoms.company.*;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.EomsServiceType;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyDetailAddRequest;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyDetailAddResponse;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditConfirmRequest;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditConfirmResponse;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditRequest;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEditResponse;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEvidenceRequest;
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.OperatorEvidenceResponse;
 import cn.com.taiji.sdk.model.comm.protocol.tts.vehicle.VehicleQueryRequest;
 import cn.com.taiji.sdk.model.comm.protocol.tts.vehicle.VehicleQueryResponse;
 import cn.com.taiji.sdk.model.comm.protocol.tts.vehicle.VehicleRegisterRequest;
 import cn.com.taiji.sdk.model.comm.protocol.tts.vehicle.VehicleRegisterResponse;
-import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.*;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorSendCodeRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorSendCodeResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorValidCodeRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.OperatorValidCodeResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillCountPageRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillCountQueryRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillCountQueryResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillEndRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillEndResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillHistoryEndRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillHistoryEndResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillHistoryStartRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillHistoryStartResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillInvoiceRedQueryRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillInvoiceRedQueryResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillNumFindInvoiceRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillNumFindInvoiceResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillOriginEndRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillOriginEndResponse;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillStartRequest;
+import cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillStartResponse;
 import com.jkcredit.invoice.service.upservice.NoCarInterface;
 import com.jkcredit.invoice.util.DateUtil;
 import com.jkcredit.invoice.util.RespR;
 import com.jkcredit.invoice.util.StringUtil;
+import etc.com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 
 /**
  * @author mumuxigua
@@ -280,9 +311,10 @@ public class NoCarInterfaceImpl implements NoCarInterface {
         }
     }
 
+
     @Override
     public RespR<CompanyDetailAddResponse> companyDetailAdd(CompanyDetailAddRequest companyDetailAddRequest) {
-        String fileName = companyDetailAddRequest.getFilename();
+        String fileName = EomsServiceType.COMPANY + "_" + CompanyCmd.COMPANYDETAILADD + "_REQ_" + this.getTimeMillStr() + ".json";
         long startTime = System.currentTimeMillis();
 
         try {
@@ -305,7 +337,7 @@ public class NoCarInterfaceImpl implements NoCarInterface {
 
     @Override
     public RespR<OperatorEditResponse> operatorEdit(OperatorEditRequest operatorEditRequest) {
-        String fileName = operatorEditRequest.getFilename();
+        String fileName = EomsServiceType.COMPANY + "_" + CompanyCmd.COMPANYOPERATOREDIT + "_REQ_" + this.getTimeMillStr() + ".json";
         long startTime = System.currentTimeMillis();
 
         try {
@@ -328,7 +360,8 @@ public class NoCarInterfaceImpl implements NoCarInterface {
 
     @Override
     public RespR<OperatorEditConfirmResponse> operatorEditConfirm(OperatorEditConfirmRequest operatorEditConfirmRequest) {
-        String fileName = operatorEditConfirmRequest.getFilename();
+        String fileName = EomsServiceType.COMPANY + "_" + CompanyCmd.COMPANYOPERATOREDITCONFIRM + "_REQ_" + this.getTimeMillStr() + ".json";
+        ;
         long startTime = System.currentTimeMillis();
 
         try {
@@ -351,7 +384,7 @@ public class NoCarInterfaceImpl implements NoCarInterface {
 
     @Override
     public RespR<OperatorEvidenceResponse> operatorEvidence(OperatorEvidenceRequest operatorEvidenceRequest) {
-        String fileName = operatorEvidenceRequest.getFilename();
+        String fileName = EomsServiceType.COMPANY + "_" + CompanyCmd.UPLOADOPERATOREVIDENCE + "_REQ_" + this.getTimeMillStr() + ".json";
         long startTime = System.currentTimeMillis();
 
         try {
@@ -417,4 +450,11 @@ public class NoCarInterfaceImpl implements NoCarInterface {
             return new RespR(false, apie.getMessage());
         }
     }
+
+
+    @JsonIgnore
+    protected String getTimeMillStr() {
+        return (new SimpleDateFormat("yyyyMMddHHmmssSSS")).format(new Date());
+    }
+
 }