Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
4585745a
Commit
4585745a
authored
Sep 14, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改许可同步,修改许可对接企业接口
parent
365d1154
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
17 deletions
+34
-17
BusinessController.java
...ejoin/amos/api/openapi/controller/BusinessController.java
+1
-1
TaBusinessServiceImpl.java
.../amos/api/openapi/face/service/TaBusinessServiceImpl.java
+5
-1
TzBaseEnterpriseInfoController.java
...le/tzs/biz/controller/TzBaseEnterpriseInfoController.java
+1
-1
PrivilegeCompanyUpdateAddListener.java
...e/tzs/biz/listener/PrivilegeCompanyUpdateAddListener.java
+0
-0
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+27
-14
No files found.
amos-boot-data/amos-boot-data-accessapi/src/main/java/com/yeejoin/amos/api/openapi/controller/BusinessController.java
View file @
4585745a
...
@@ -97,7 +97,7 @@ public class BusinessController {
...
@@ -97,7 +97,7 @@ public class BusinessController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
tru
e
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
fals
e
)
@RequestMapping
(
value
=
"/getData"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getData"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取map"
,
notes
=
"获取map"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取map"
,
notes
=
"获取map"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
...
...
amos-boot-data/amos-boot-data-accessapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TaBusinessServiceImpl.java
View file @
4585745a
...
@@ -12,6 +12,7 @@ import com.csoft.sdk.domain.response.CsoftDataApiXixianGetzhutiinfoResponse;
...
@@ -12,6 +12,7 @@ import com.csoft.sdk.domain.response.CsoftDataApiXixianGetzhutiinfoResponse;
import
com.yeejoin.amos.api.openapi.face.orm.dao.DataDictionaryMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.DataDictionaryMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
...
@@ -57,7 +58,10 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc
...
@@ -57,7 +58,10 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc
System
.
out
.
println
(
response
.
getResult
());
System
.
out
.
println
(
response
.
getResult
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
.
getData
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
.
getData
());
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
//如果不存在该企业 则直接返回null
if
(
ValidationUtil
.
isEmpty
(
data
)){
return
null
;
}
//分割字符串 根据详细地址分割出 省/市/区、街道地址、小区地址
//分割字符串 根据详细地址分割出 省/市/区、街道地址、小区地址
String
address
=
data
.
getString
(
"dom"
);
String
address
=
data
.
getString
(
"dom"
);
String
area
=
address
.
substring
(
0
,
address
.
indexOf
(
"区"
)+
1
);
String
area
=
address
.
substring
(
0
,
address
.
indexOf
(
"区"
)+
1
);
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzBaseEnterpriseInfoController.java
View file @
4585745a
...
@@ -169,7 +169,7 @@ public class TzBaseEnterpriseInfoController {
...
@@ -169,7 +169,7 @@ public class TzBaseEnterpriseInfoController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getInfo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据
id查询"
,
notes
=
"根据id
查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据
企业名称查询"
,
notes
=
"根据企业名称
查询"
)
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
selectByUseUnit
(
HttpServletRequest
request
,
String
useUnit
)
{
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
selectByUseUnit
(
HttpServletRequest
request
,
String
useUnit
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
selectByUseUnit
(
useUnit
));
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
selectByUseUnit
(
useUnit
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/listener/PrivilegeCompanyUpdateAddListener.java
View file @
4585745a
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
4585745a
...
@@ -13,6 +13,7 @@ import java.util.Map;
...
@@ -13,6 +13,7 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.RedisUtil
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.AccessFeignService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.AccessFeignService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,7 +21,9 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -20,7 +21,9 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
@@ -89,6 +92,14 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -89,6 +92,14 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
* 使用单位的类型,数据来源:cb_data_dictionary code = 1232
* 使用单位的类型,数据来源:cb_data_dictionary code = 1232
*/
*/
private
static
String
USE_UNIT_TYPE_CODE
=
"1232"
;
private
static
String
USE_UNIT_TYPE_CODE
=
"1232"
;
/**
* 生产单位的类型,数据来源:cb_data_dictionary code = 1230
*/
private
static
String
PRODUCT_UNIT_TYPE_CODE
=
"1230"
;
/**
* 充装单位的类型,数据来源:cb_data_dictionary code = 1231
*/
private
static
String
FILLING_UNIT_TYPE_CODE
=
"1231"
;
/**
/**
* 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE
* 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE
...
@@ -216,7 +227,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -216,7 +227,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
}
// 2.组织返回数据
// 2.组织返回数据
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
if
(
USE_UNIT_TYPE_CODE
.
equals
(
unitType
))
{
if
(
USE_UNIT_TYPE_CODE
.
equals
(
unitType
)
||
PRODUCT_UNIT_TYPE_CODE
.
equals
(
unitType
)
||
FILLING_UNIT_TYPE_CODE
.
equals
(
unitType
)
)
{
// 本地库有的化 就不去其他系统查询
// 本地库有的化 就不去其他系统查询
RegUnitIc
regUnitIc
=
regUnitIcService
RegUnitIc
regUnitIc
=
regUnitIcService
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
unitCode
));
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
unitCode
));
...
@@ -238,20 +249,22 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -238,20 +249,22 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// URI.create("/accessapi/business/getData"));
// URI.create("/accessapi/business/getData"));
// ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(requestEntity,JSONObject.class);
// ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(requestEntity,JSONObject.class);
// JSONObject result = responseEntity.getBody();
// JSONObject result = responseEntity.getBody();
// 2.2 工商信息组装
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)+
1
);
String
district
=
area
.
substring
(
city
.
length
());
regUnitInfoDto
.
setCity
(
city
);
regUnitInfoDto
.
setDistrict
(
district
);
regUnitInfoDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitInfoDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitInfoDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitInfoDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
regUnitInfoDto
.
setName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitInfoDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
}
if
(!
ValidationUtil
.
isEmpty
(
resultMap
)){
// 2.2 工商信息组装
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)+
1
);
String
district
=
area
.
substring
(
city
.
length
());
regUnitInfoDto
.
setCity
(
city
);
regUnitInfoDto
.
setDistrict
(
district
);
regUnitInfoDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitInfoDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitInfoDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitInfoDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
regUnitInfoDto
.
setName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitInfoDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
}
}
}
else
{
}
else
{
RegUnitIc
regUnitIc
=
regUnitIcService
RegUnitIc
regUnitIc
=
regUnitIcService
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
unitCode
));
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
unitCode
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment