|
|
@@ -0,0 +1,56 @@
|
|
|
+package com.huyi.service.credit.controller;
|
|
|
+
|
|
|
+import com.huyi.service.base.entity.SysCompany;
|
|
|
+import com.huyi.service.base.service.ISysCompanyService;
|
|
|
+import com.tianhu.common.core.domain.R;
|
|
|
+import com.tianhu.common.core.utils.CommonUtil;
|
|
|
+import com.tianhu.common.core.web.controller.BaseController;
|
|
|
+import com.tianhu.common.security.service.TokenService;
|
|
|
+import com.tianhu.system.api.domain.SysUser;
|
|
|
+import com.tianhu.system.api.model.LoginUser;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 融信项目编号
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/ownCfcaProject")
|
|
|
+public class OwnCfcaProjectController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private TokenService tokenService;
|
|
|
+ //自动生成的企业服务类
|
|
|
+ @Autowired
|
|
|
+ private ISysCompanyService sysCompanyService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询当前企业是否存在cfca授权编号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getCfcaProjectNo")
|
|
|
+ public R getInfo() {
|
|
|
+ //查询当前操作员
|
|
|
+ LoginUser userInfo = tokenService.getLoginUser();
|
|
|
+ SysUser use = userInfo.getSysUser();
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ //获取当前用户的公司
|
|
|
+ String companyId = use.getCompanyId();
|
|
|
+ //授权编号
|
|
|
+ String scyCfcaAuthNumber = "";
|
|
|
+ if(CommonUtil.isNotEmpty(companyId)){
|
|
|
+ SysCompany company = sysCompanyService.getById(companyId);
|
|
|
+ if(company != null){
|
|
|
+ scyCfcaAuthNumber = company.getScyCfcaAuthNumber();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put("scyCfcaAuthNumber",scyCfcaAuthNumber);
|
|
|
+ return R.ok(map);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|