Commit 3a476ecb authored by lisong's avatar lisong

屏蔽无用代码,修改现场bug

parent 4a31f245
......@@ -175,12 +175,12 @@
<artifactId>hutool-all</artifactId>
<version>5.7.22</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-influxdb</artifactId>
<version>1.8.5-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.yeejoin</groupId>-->
<!-- <artifactId>amos-component-influxdb</artifactId>-->
<!-- <version>1.8.5-SNAPSHOT</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-security</artifactId>
......
......@@ -47,8 +47,8 @@ import com.yeejoin.amos.api.openapi.face.service.TaAccessConfigServiceImpl;
@ComponentScan({ "org.typroject", "com.yeejoin.amos" })
public class AccessapiApplication {
// @Autowired
// private TaAccessConfigServiceImpl taAccessConfigServiceImpl;
@Autowired
private TaAccessConfigServiceImpl taAccessConfigServiceImpl;
private static final Logger logger = LogManager.getLogger(AccessapiApplication.class);
......@@ -69,9 +69,9 @@ public class AccessapiApplication {
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
// @Bean
// public void initAccessConfig() {
// taAccessConfigServiceImpl.refreshConfig();
// taAccessConfigServiceImpl.startTask();
// }
@Bean
public void initAccessConfig() {
taAccessConfigServiceImpl.refreshConfig();
taAccessConfigServiceImpl.startTask();
}
}
package com.yeejoin.amos.api.householdapi.controller;
import cn.hutool.http.HttpUtil;
import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
import com.yeejoin.amos.api.householdapi.face.model.HouseholdPvApiDto;
import com.yeejoin.amos.api.householdapi.face.model.HouseholdPvProducerInfoDto;
import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvApiServiceImpl;
import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* 户用光伏-厂商API haders
*
* @author system_generator
* @date 2023-06-07
*/
@RestController
@Api(tags = "测试")
@RequestMapping(value = "/household-pv-api-test1")
public class HouseholdTestController {
@Autowired
private HouseholdPvUtils householdPvUtils;
/**
* 新增户用光伏-厂商API haders
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/gdwdemo")
@ApiOperation(httpMethod = "get", value = "固德威示例", notes = "固德威示例")
public String save(Long seq) throws IOException {
return householdPvUtils.gerResponseByAPiID(seq);
}
}
//package com.yeejoin.amos.api.householdapi.controller;
//
//import cn.hutool.http.HttpUtil;
//import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
//import com.yeejoin.amos.api.householdapi.face.model.HouseholdPvApiDto;
//import com.yeejoin.amos.api.householdapi.face.model.HouseholdPvProducerInfoDto;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvApiServiceImpl;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl;
//import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
//import fastjson.JSON;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//import org.typroject.tyboot.core.restful.doc.TycloudOperation;
//
//import java.io.IOException;
//import java.util.HashMap;
//import java.util.Map;
//
//
///**
// * 户用光伏-厂商API haders
// *
// * @author system_generator
// * @date 2023-06-07
// */
//@RestController
//@Api(tags = "测试")
//@RequestMapping(value = "/household-pv-api-test1")
//public class HouseholdTestController {
// @Autowired
// private HouseholdPvUtils householdPvUtils;
//
//
// /**
// * 新增户用光伏-厂商API haders
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @PostMapping(value = "/gdwdemo")
// @ApiOperation(httpMethod = "get", value = "固德威示例", notes = "固德威示例")
// public String save(Long seq) throws IOException {
// return householdPvUtils.gerResponseByAPiID(seq);
// }
//}
......@@ -10,6 +10,8 @@ import com.csoft.sdk.domain.CsoftDataApiXixianGetzhutiinfoParam;
import com.csoft.sdk.domain.request.CsoftDataApiXixianGetzhutiinfoRequest ;
import com.csoft.sdk.domain.response.CsoftDataApiXixianGetzhutiinfoResponse;
import com.yeejoin.amos.api.openapi.face.orm.dao.DataDictionaryMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -34,7 +36,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.TaLicenseBaseInfo;
*/
@Service
public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAccessConfig, TaAccessConfigMapper> {
private final Logger log = LoggerFactory.getLogger(TaBusinessServiceImpl.class);
@Autowired
private DataDictionaryMapper dataDictionaryMapper;
......@@ -50,8 +52,16 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc
CsoftDataApiXixianGetzhutiinfoParam csoftDataApiXixianParam = new CsoftDataApiXixianGetzhutiinfoParam();
csoftDataApiXixianParam.setUniscid(code);
CsoftDataApiXixianGetzhutiinfoRequest request = new CsoftDataApiXixianGetzhutiinfoRequest(csoftDataApiXixianParam);
CsoftDataApiXixianGetzhutiinfoResponse response = client.execute(request);
Map<String, Object> result = new HashMap<>();
CsoftDataApiXixianGetzhutiinfoResponse response = null;
try {
log.info("请求查询工商信息前");
response = client.execute(request);
log.info("请求查询工商信息完成,{}", response);
} catch (Exception e) {
log.error("返回信息,{}", e.getMessage());
return null;
}
// 4.返回校验
if (response.isSuccess()) {
System.out.println("成功:" + response.getData());
......
......@@ -371,6 +371,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// 2.组织返回数据
//2.1 工商信息查询
Map<String, Object> resultMap = accessFeignService.getData(unitCode).getResult();
if (resultMap == null){
throw new BadRequest("工商信息接口查询失败,请稍后再试!");
}
if(!ValidationUtil.isEmpty(resultMap)){
// 2.2 工商信息组装
String area = String.valueOf(resultMap.get("area"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment