Commit 5eb631b8 authored by wujiang's avatar wujiang

添加工商接口

parent 452bf7c5
package com.yeejoin.amos.api.openapi.controller;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.face.orm.entity.TaAccessConfig;
import com.yeejoin.amos.api.openapi.face.orm.entity.TaLicenseBaseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.TaLicenseDetailInfo;
import com.yeejoin.amos.api.openapi.face.service.TaAccessConfigServiceImpl;
import com.yeejoin.amos.api.openapi.face.service.TaLicenseBaseInfoServiceImpl;
import com.yeejoin.amos.api.openapi.face.service.TaLicenseDetailInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.List;
@RestController
@RequestMapping(value = "/business")
@Api(tags = "许可数据对接")
public class BusinessController {
@Autowired
private TaAccessConfigServiceImpl taAccessConfigService;
@Autowired
private TaLicenseDetailInfoServiceImpl taLicenseDetailInfoService;
@Autowired
private TaLicenseBaseInfoServiceImpl taLicenseBaseInfoService;
// /**
// * 新增许可信息-接入配置表
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @RequestMapping(value = "/saveAccessConfig", method = RequestMethod.POST)
// @ApiOperation(httpMethod = "POST", value = "新增许可信息-接入配置表", notes = "新增许可信息-接入配置表")
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> saveTaAccessConfig (@RequestBody List<TaAccessConfig> produceInfo) throws Exception
// {
// return ResponseHelper.buildResponse(taAccessConfigService.saveAccessConfig(produceInfo));
// }
//
// /**
// * 新增许可信息-许可基本信息表
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @RequestMapping(value = "/saveLinceseBaseInfo", method = RequestMethod.GET)
// @ApiOperation(httpMethod = "GET", value = "新增许可信息-许可基本信息表", notes = "新增许可信息-许可基本信息表")
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> saveTaLicenseBaseInfo() throws Exception {
// taLicenseBaseInfoService.syncLicenseData();
// return ResponseHelper.buildResponse("");
// }
//
// /**
// * 新增许可信息-许可详细信息表
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @RequestMapping(value = "/saveLinceseDetailInfo", method = RequestMethod.GET)
// @ApiOperation(httpMethod = "GET", value = "新增许可信息-许可详细信息表", notes = "新增许可信息-许可详细信息表")
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> saveTaLicenseDetailInfo()
// throws Exception {
// taLicenseDetailInfoService.syncLicenseData();
// return ResponseHelper.buildResponse("");
// }
//
// /**
// * 新增许可信息-许可详细信息表
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @RequestMapping(value = "/refreshConfig", method = RequestMethod.GET)
// @ApiOperation(httpMethod = "GET", value = "更新配置", notes = "更新配置")
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> refreshConfig()
// throws Exception {
// taAccessConfigService.refreshConfig();
// return ResponseHelper.buildResponse("");
// }
}
package com.yeejoin.amos.api.openapi.face.service;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.csoft.sdk.client.CsoftDefaultSdkClient;
import com.csoft.sdk.domain.App;
import com.csoft.sdk.domain.CsoftDataTzsbJbxxListParam;
import com.yeejoin.amos.api.openapi.face.model.TaAccessConfigModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TaAccessConfigMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TaAccessConfig;
import com.yeejoin.amos.api.openapi.face.orm.entity.TaLicenseBaseInfo;
/**
* 附件表 服务实现类
*
* @author duanwei
* @date 2022-08-17
*/
@Service
public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAccessConfig, TaAccessConfigMapper> {
// public Map<String, Object> getData(String code) throws Exception {
// Map<String, String> map = TaAccessConfigServiceImpl.licenseConfig;
// String appId = map.get("appId");
// String appKey = map.get("appKey");
// String appSecret = map.get("appSecret");
// String server = map.get("server");
// App app = App.of(appId, appKey, appSecret, server);
// CsoftDefaultSdkClient client = CsoftDefaultSdkClient.of(app);
// // 3.设置参数,发送请求,并处理结果
// CsoftDataApiXixianParam csoftDataApiXixianParam = new CsoftDataApiXixianParam();
// csoftDataApiXixianParam.setUniscid(code);
// CsoftDataApiXixianRequest request = new CsoftDataApiXixianRequest(csoftDataApiXixianParam);
// CsoftDataApiXixianResponse response = client.execute(request);
// Map<String, Object> result = new HashMap<>();
// // 4.返回校验
// if (response.isSuccess()) {
// System.out.println("成功:" + response.getData());
// System.out.println(response.getResult());
// JSONObject jsonObject = JSONObject.parseObject(response.getData());
// JSONObject data = jsonObject.getJSONObject("data");
// JSONArray jsonArray = data.getJSONArray("objList");
// //所属行业
// result.put("industry", value);
// //注册地址 省/市/区
// result.put("area", value);
// //注册地址 街道地址
// result.put("street", value);
// //注册地址 小区地址
// result.put("community", value);
// //注册地址 详细地址
// result.put("address", value);
// //登记机关
// result.put("registration_authority", value);
// //核准时间
// result.put("approval_time", value);
// //经营状态
// result.put("operating_status", value);
// } else {
// System.out.println("失败:" + response.getErrorMsg());
// System.out.println("失败:" + response.getErrorCode());
// throw new Exception(response.getErrorMsg());
// }
// return result;
// }
}
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