czt
2024-06-25 69270bd602eea005351e46089a00fe6604c21c08
添加统一编码上报地址配置
已修改4个文件
71 ■■■■■ 文件已修改
src/main/java/com/fzzy/api/entity/ApiConfs.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/view/ApiConfs.view.xml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/view/pr/GbUnifiedCodingPR.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-pro.yml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/entity/ApiConfs.java
@@ -158,6 +158,10 @@
    @Column(name = "exe_tag", length = 2)
    private String exeTag = Constant.YN_Y;
    @PropertyDef(label = "统一编码拉取地址")
    @Column(name = "GB_CODING_Url", length = 200)
    private String gbCodingUrl;
    @PropertyDef(label = "统一编码上传")
    @Column(name = "GB_CODING_TAG_", length = 200)
    private String gbCodingTag;
src/main/java/com/fzzy/api/view/ApiConfs.view.xml
@@ -200,6 +200,10 @@
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="gbCodingUrl">
        <Property></Property>
        <Property name="label">统一编码地址</Property>
      </PropertyDef>
      <PropertyDef name="gbCodingTag">
        <Property></Property>
        <Property name="label">统一编码上传</Property>
@@ -439,10 +443,16 @@
                  <Property name="labelWidth">120</Property>
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement layoutConstraint="colSpan:2">
                <AutoFormElement>
                  <Property name="name">password</Property>
                  <Property name="property">password</Property>
                  <Property name="editorType">PasswordEditor</Property>
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement>
                  <Property name="name">publicKey</Property>
                  <Property name="property">publicKey</Property>
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
@@ -452,9 +462,10 @@
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement layoutConstraint="colSpan:2">
                  <Property name="name">publicKey</Property>
                  <Property name="property">publicKey</Property>
                  <Property name="name">apiUrl</Property>
                  <Property name="property">apiUrl</Property>
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
@@ -465,8 +476,8 @@
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement layoutConstraint="colSpan:2">
                  <Property name="name">apiUrl</Property>
                  <Property name="property">apiUrl</Property>
                  <Property name="name">imgUrl</Property>
                  <Property name="property">imgUrl</Property>
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
@@ -477,8 +488,8 @@
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement layoutConstraint="colSpan:2">
                  <Property name="name">imgUrl</Property>
                  <Property name="property">imgUrl</Property>
                  <Property name="name">gbCodingUrl</Property>
                  <Property name="property">gbCodingUrl</Property>
                  <Property name="labelWidth">125</Property>
                  <Editor/>
                </AutoFormElement>
src/main/java/com/fzzy/api/view/pr/GbUnifiedCodingPR.java
@@ -7,7 +7,9 @@
import com.fzzy.api.dto.GbCodingData;
import com.fzzy.api.dto.ReqGbCoding;
import com.fzzy.api.dto.RespGbCoding;
import com.fzzy.api.entity.ApiConfs;
import com.fzzy.api.entity.GbUnifiedCoding;
import com.fzzy.api.service.ApiCommonService;
import com.fzzy.api.view.repository.GbUnifiedCodingRep;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -36,11 +38,13 @@
@Component
public class GbUnifiedCodingPR {
    private static final String GB_CODING_URL = "http://121.36.17.6:28088/admin-api/coding/fmxx/queryDataInfo";
    private static final String GB_CODING_URL = "http://101.36.160.117:28088/admin-api/coding/fmxx/queryDataInfo";
    @Autowired
    private GbUnifiedCodingRep codingRep;
    @Autowired
    private RestTemplate restTemplate;
    @Autowired
    private ApiCommonService apiCommonService;
    /**
     * gbUnifiedCodingPR#pageList
@@ -117,9 +121,18 @@
            return "执行失败:单位编码为空,请核查!";
        }
        String url = GB_CODING_URL;
        List<ApiConfs> apiConfs = apiCommonService.listCacheConf();
        if(null != apiConfs || apiConfs.size() > 0){
            ApiConfs apiConf = apiConfs.get(0);
            if(null != apiConf && StringUtils.isNotEmpty(apiConf.getGbCodingUrl())){
                url = apiConf.getGbCodingUrl();
            }
        }
        //设置参数
        ReqGbCoding reqGbCoding = new ReqGbCoding(dwdm);
        RespGbCoding respGbCoding = restTemplate.postForObject(GB_CODING_URL, reqGbCoding, RespGbCoding.class);
        RespGbCoding respGbCoding = restTemplate.postForObject(url, reqGbCoding, RespGbCoding.class);
        if(null == respGbCoding){
            return "拉取数据失败,请重试!";
        }
src/main/resources/application-pro.yml
@@ -1,4 +1,4 @@
##########################  上海嘉定 -C盘 pro   ##########################
##########################  广东汕头潮南   ##########################
server:
  port: 8090
  jetty:
@@ -9,16 +9,16 @@
  datasource:
    #主数据源
    primary:
      url: jdbc:mysql://192.168.200.3:3306/igds_api?useUnicode=true&characterEncoding=utf-8&useSSL=false
      url: jdbc:mysql://127.0.0.1:3306/igds_api?useUnicode=true&characterEncoding=utf-8&useSSL=false
      driver-class-name: com.mysql.jdbc.Driver
      username: root
      password: Abc123..
      password: Fzzy@#$%5432..K
    #次数据源
    secondary:
      url: jdbc:mysql://192.168.200.3:3306/igds_master?useUnicode=true&characterEncoding=utf-8&useSSL=false
      url: jdbc:mysql://127.0.0.1:3306/igds_master?useUnicode=true&characterEncoding=utf-8&useSSL=false
      driver-class-name: com.mysql.jdbc.Driver
      username: root
      password: Abc123..
      password: Fzzy@#$%5432..K
  jpa:
    #主jpa配置
    primary:
@@ -39,9 +39,9 @@
  # Redis相关配置
  redis:
    database: 1
    host: 192.168.200.3
    host: 127.0.0.1
    port: 6379
    password: Abc123..
    password: Redispwd..
    # 连接池最大连接数(使用负值表示没有限制)
    pool:
      max-active: 200
@@ -51,11 +51,6 @@
      timeout: 6000
igds:
  default:
    companyId: 5303
  file-path: C:/IGDS-API/FILE/
  img-path: C:/IGDS/FILE/
  # 省平台RSA密钥对信息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