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
2bdcceb3
Commit
2bdcceb3
authored
Oct 23, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tcm): 修复工商信息查询逻辑并优化异常处理
- 调整工商信息查询流程,增加空值判断避免空指针异常 - 修改日期格式化逻辑,确保核准日期正确显示 - 在异常捕获块中打印堆栈信息,便于问题排查
parent
28037674
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
94 deletions
+103
-94
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+1
-0
EnterpriseBizByTCMServiceImpl.java
...istcs/biz/service/impl/EnterpriseBizByTCMServiceImpl.java
+50
-47
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+51
-47
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+1
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgVehicleInformationServiceImpl.java
View file @
2bdcceb3
...
@@ -1110,6 +1110,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1110,6 +1110,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
}
}
ex
.
printStackTrace
();
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/EnterpriseBizByTCMServiceImpl.java
View file @
2bdcceb3
...
@@ -236,56 +236,59 @@ public class EnterpriseBizByTCMServiceImpl {
...
@@ -236,56 +236,59 @@ public class EnterpriseBizByTCMServiceImpl {
// 陕西省内企业从工商平台查询工商信息
// 陕西省内企业从工商平台查询工商信息
if
(
UnitDataSourceEnum
.
SHAANXI
.
getName
().
equals
(
tzBaseEnterpriseInfo
.
getDataSources
())
if
(
UnitDataSourceEnum
.
SHAANXI
.
getName
().
equals
(
tzBaseEnterpriseInfo
.
getDataSources
())
&&
EnterpriseEnums
.
QY_DW
.
getTypeName
().
equals
(
tzBaseEnterpriseInfo
.
getRegisterType
()))
{
&&
EnterpriseEnums
.
QY_DW
.
getTypeName
().
equals
(
tzBaseEnterpriseInfo
.
getRegisterType
()))
{
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
creditCode
).
getResult
();
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)
+
1
);
String
district
=
area
.
substring
(
city
.
length
());
if
(
district
.
equals
(
"高新区"
))
{
district
=
"雁塔区"
;
}
String
industryName
=
""
;
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByCode
(
String
.
valueOf
(
resultMap
.
get
(
"industryCode"
)),
"HYXLDM"
);
if
(!
ValidationUtil
.
isEmpty
(
dataDictionary
))
{
industryName
=
dataDictionary
.
getName
();
}
String
approveDate
=
String
.
valueOf
(
resultMap
.
get
(
"approval_time"
));
approveDate
=
approveDate
.
contains
(
"年"
)
?
approveDate
.
replace
(
"年"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"月"
)
?
approveDate
.
replace
(
"月"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"日"
)
?
approveDate
.
replace
(
"日"
,
"-"
)
:
approveDate
;
regUnitIcDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
String
approve
=
approveDate
.
substring
(
0
,
10
)
+
"核准"
;
tzBaseEnterpriseInfoDto
.
setApproval
(
approve
);
try
{
regUnitIcDto
.
setApprovedDate
(
DateUtils
.
dateParse
(
approveDate
,
"yyyy-MM-dd"
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
regUnitIcDto
.
setUnitName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitIcDto
.
setRegisteredOrgan
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
)));
for
(
DataDictionary
djjg
:
iDataDictionaryService
.
getByType
(
"DJJG"
))
{
if
(
djjg
.
getName
().
equals
(
resultMap
.
get
(
"registration_authority"
))){
regUnitIcDto
.
setRegisteredOrganCode
(
djjg
.
getSequenceNbr
().
toString
());
}
}
regUnitIcDto
.
setBusinessState
(
String
.
valueOf
(
resultMap
.
get
(
"operating_status"
)));
regUnitIcDto
.
setProvince
(
"陕西省"
);
regUnitIcDto
.
setCity
(
city
);
regUnitIcDto
.
setDistrict
(
district
);
regUnitIcDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitIcDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitIcDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitIcDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
regUnitIcDto
.
setIndustryName
(
industryName
);
regUnitIcDto
.
setRegisterAddress
(
"陕西省/"
+
city
+
"/"
+
district
);
ArrayList
<
Object
>
objects
=
new
ArrayList
<>();
objects
.
add
(
"陕西省"
);
objects
.
add
(
city
);
objects
.
add
(
district
);
regUnitIcDto
.
setRegisterAddressList
(
objects
);
regUnitIcDto
.
setIsNotAccess
(
"1"
);
// 判断是否可以让用户编辑工商及许可信息 事业单位、个人主体或省外企业都可编辑
// 判断是否可以让用户编辑工商及许可信息 事业单位、个人主体或省外企业都可编辑
tzBaseEnterpriseInfoDto
.
setCanEdit
(
"0"
);
tzBaseEnterpriseInfoDto
.
setCanEdit
(
"0"
);
tzBaseEnterpriseInfoDto
.
setLicenseCanEdit
(
"1"
);
tzBaseEnterpriseInfoDto
.
setLicenseCanEdit
(
"1"
);
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
creditCode
).
getResult
();
if
(!
ValidationUtil
.
isEmpty
(
resultMap
))
{
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)
+
1
);
String
district
=
area
.
substring
(
city
.
length
());
if
(
district
.
equals
(
"高新区"
))
{
district
=
"雁塔区"
;
}
String
industryName
=
""
;
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByCode
(
String
.
valueOf
(
resultMap
.
get
(
"industryCode"
)),
"HYXLDM"
);
if
(!
ValidationUtil
.
isEmpty
(
dataDictionary
))
{
industryName
=
dataDictionary
.
getName
();
}
String
approveDate
=
String
.
valueOf
(
resultMap
.
get
(
"approval_time"
));
approveDate
=
approveDate
.
contains
(
"年"
)
?
approveDate
.
replace
(
"年"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"月"
)
?
approveDate
.
replace
(
"月"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"日"
)
?
approveDate
.
replace
(
"日"
,
""
)
:
approveDate
;
regUnitIcDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
String
approve
=
approveDate
+
"核准"
;
tzBaseEnterpriseInfoDto
.
setApproval
(
approve
);
try
{
regUnitIcDto
.
setApprovedDate
(
DateUtils
.
dateParse
(
approveDate
,
"yyyy-MM-dd"
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
regUnitIcDto
.
setUnitName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitIcDto
.
setRegisteredOrgan
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
)));
for
(
DataDictionary
djjg
:
iDataDictionaryService
.
getByType
(
"DJJG"
))
{
if
(
djjg
.
getName
().
equals
(
resultMap
.
get
(
"registration_authority"
))){
regUnitIcDto
.
setRegisteredOrganCode
(
djjg
.
getSequenceNbr
().
toString
());
}
}
regUnitIcDto
.
setBusinessState
(
String
.
valueOf
(
resultMap
.
get
(
"operating_status"
)));
regUnitIcDto
.
setProvince
(
"陕西省"
);
regUnitIcDto
.
setCity
(
city
);
regUnitIcDto
.
setDistrict
(
district
);
regUnitIcDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitIcDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitIcDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitIcDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
regUnitIcDto
.
setIndustryName
(
industryName
);
regUnitIcDto
.
setRegisterAddress
(
"陕西省/"
+
city
+
"/"
+
district
);
ArrayList
<
Object
>
objects
=
new
ArrayList
<>();
objects
.
add
(
"陕西省"
);
objects
.
add
(
city
);
objects
.
add
(
district
);
regUnitIcDto
.
setRegisterAddressList
(
objects
);
regUnitIcDto
.
setIsNotAccess
(
"1"
);
}
}
else
{
}
else
{
regUnitIcDto
=
tzBaseEnterpriseInfoDto
.
getRegUnitIcDto
();
regUnitIcDto
=
tzBaseEnterpriseInfoDto
.
getRegUnitIcDto
();
regUnitIcDto
.
setIsNotAccess
(
"0"
);
regUnitIcDto
.
setIsNotAccess
(
"0"
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
2bdcceb3
...
@@ -402,56 +402,59 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -402,56 +402,59 @@ public class TzBaseEnterpriseInfoServiceImpl
// 陕西省内企业从工商平台查询工商信息
// 陕西省内企业从工商平台查询工商信息
if
(
UnitDataSourceEnum
.
SHAANXI
.
getName
().
equals
(
tzBaseEnterpriseInfo
.
getDataSources
())
if
(
UnitDataSourceEnum
.
SHAANXI
.
getName
().
equals
(
tzBaseEnterpriseInfo
.
getDataSources
())
&&
EnterpriseEnums
.
QY_DW
.
getTypeName
().
equals
(
tzBaseEnterpriseInfo
.
getRegisterType
()))
{
&&
EnterpriseEnums
.
QY_DW
.
getTypeName
().
equals
(
tzBaseEnterpriseInfo
.
getRegisterType
()))
{
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
creditCode
).
getResult
();
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)
+
1
);
String
district
=
area
.
substring
(
city
.
length
());
if
(
district
.
equals
(
"高新区"
))
{
district
=
"雁塔区"
;
}
String
industryName
=
""
;
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByCode
(
String
.
valueOf
(
resultMap
.
get
(
"industryCode"
)),
"HYXLDM"
);
if
(!
ValidationUtil
.
isEmpty
(
dataDictionary
))
{
industryName
=
dataDictionary
.
getName
();
}
String
approveDate
=
String
.
valueOf
(
resultMap
.
get
(
"approval_time"
));
approveDate
=
approveDate
.
contains
(
"年"
)
?
approveDate
.
replace
(
"年"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"月"
)
?
approveDate
.
replace
(
"月"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"日"
)
?
approveDate
.
replace
(
"日"
,
"-"
)
:
approveDate
;
regUnitIcDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
String
approve
=
approveDate
.
substring
(
0
,
10
)
+
"核准"
;
tzBaseEnterpriseInfoDto
.
setApproval
(
approve
);
try
{
regUnitIcDto
.
setApprovedDate
(
DateUtils
.
dateParse
(
approveDate
,
"yyyy-MM-dd"
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
regUnitIcDto
.
setUnitName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitIcDto
.
setRegisteredOrgan
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
)));
for
(
DataDictionary
djjg
:
iDataDictionaryService
.
getByType
(
"DJJG"
))
{
if
(
djjg
.
getName
().
equals
(
resultMap
.
get
(
"registration_authority"
))){
regUnitIcDto
.
setRegisteredOrganCode
(
djjg
.
getSequenceNbr
().
toString
());
}
}
regUnitIcDto
.
setBusinessState
(
String
.
valueOf
(
resultMap
.
get
(
"operating_status"
)));
regUnitIcDto
.
setProvince
(
"陕西省"
);
regUnitIcDto
.
setCity
(
city
);
regUnitIcDto
.
setDistrict
(
district
);
regUnitIcDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitIcDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitIcDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitIcDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
regUnitIcDto
.
setIndustryName
(
industryName
);
regUnitIcDto
.
setRegisterAddress
(
"陕西省/"
+
city
+
"/"
+
district
);
ArrayList
<
Object
>
objects
=
new
ArrayList
<>();
objects
.
add
(
"陕西省"
);
objects
.
add
(
city
);
objects
.
add
(
district
);
regUnitIcDto
.
setRegisterAddressList
(
objects
);
regUnitIcDto
.
setIsNotAccess
(
"1"
);
// 判断是否可以让用户编辑工商及许可信息 事业单位、个人主体或省外企业都可编辑
// 判断是否可以让用户编辑工商及许可信息 事业单位、个人主体或省外企业都可编辑
tzBaseEnterpriseInfoDto
.
setCanEdit
(
"0"
);
tzBaseEnterpriseInfoDto
.
setCanEdit
(
"0"
);
tzBaseEnterpriseInfoDto
.
setLicenseCanEdit
(
"1"
);
tzBaseEnterpriseInfoDto
.
setLicenseCanEdit
(
"1"
);
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
creditCode
).
getResult
();
if
(!
ValidationUtil
.
isEmpty
(
resultMap
))
{
String
area
=
String
.
valueOf
(
resultMap
.
get
(
"area"
));
String
city
=
area
.
substring
(
0
,
area
.
indexOf
(
"市"
)
+
1
);
String
district
=
area
.
substring
(
city
.
length
());
if
(
district
.
equals
(
"高新区"
))
{
district
=
"雁塔区"
;
}
String
industryName
=
""
;
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByCode
(
String
.
valueOf
(
resultMap
.
get
(
"industryCode"
)),
"HYXLDM"
);
if
(!
ValidationUtil
.
isEmpty
(
dataDictionary
))
{
industryName
=
dataDictionary
.
getName
();
}
String
approveDate
=
String
.
valueOf
(
resultMap
.
get
(
"approval_time"
));
approveDate
=
approveDate
.
contains
(
"年"
)
?
approveDate
.
replace
(
"年"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"月"
)
?
approveDate
.
replace
(
"月"
,
"-"
)
:
approveDate
;
approveDate
=
approveDate
.
contains
(
"日"
)
?
approveDate
.
replace
(
"日"
,
""
)
:
approveDate
;
regUnitIcDto
.
setUnitCode
(
String
.
valueOf
(
resultMap
.
get
(
"creditCode"
)));
log
.
info
(
"工商信息approveDate:{}"
,
approveDate
);
String
approve
=
approveDate
+
"核准"
;
tzBaseEnterpriseInfoDto
.
setApproval
(
approve
);
try
{
regUnitIcDto
.
setApprovedDate
(
DateUtils
.
dateParse
(
approveDate
,
"yyyy-MM-dd"
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
regUnitIcDto
.
setUnitName
(
String
.
valueOf
(
resultMap
.
get
(
"unitName"
)));
regUnitIcDto
.
setRegisteredOrgan
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
)));
for
(
DataDictionary
djjg
:
iDataDictionaryService
.
getByType
(
"DJJG"
))
{
if
(
djjg
.
getName
().
equals
(
resultMap
.
get
(
"registration_authority"
))){
regUnitIcDto
.
setRegisteredOrganCode
(
djjg
.
getSequenceNbr
().
toString
());
}
}
regUnitIcDto
.
setBusinessState
(
String
.
valueOf
(
resultMap
.
get
(
"operating_status"
)));
regUnitIcDto
.
setProvince
(
"陕西省"
);
regUnitIcDto
.
setCity
(
city
);
regUnitIcDto
.
setDistrict
(
district
);
regUnitIcDto
.
setStree
(
String
.
valueOf
(
resultMap
.
get
(
"street"
)));
regUnitIcDto
.
setCommunity
(
String
.
valueOf
(
resultMap
.
get
(
"community"
)));
regUnitIcDto
.
setAddress
(
String
.
valueOf
(
resultMap
.
get
(
"address"
)));
regUnitIcDto
.
setLegalPerson
(
String
.
valueOf
(
resultMap
.
get
(
"legalPeople"
)));
regUnitIcDto
.
setIndustryName
(
industryName
);
regUnitIcDto
.
setRegisterAddress
(
"陕西省/"
+
city
+
"/"
+
district
);
ArrayList
<
Object
>
objects
=
new
ArrayList
<>();
objects
.
add
(
"陕西省"
);
objects
.
add
(
city
);
objects
.
add
(
district
);
regUnitIcDto
.
setRegisterAddressList
(
objects
);
regUnitIcDto
.
setIsNotAccess
(
"1"
);
}
}
else
{
}
else
{
regUnitIcDto
=
tzBaseEnterpriseInfoDto
.
getRegUnitIcDto
();
regUnitIcDto
=
tzBaseEnterpriseInfoDto
.
getRegUnitIcDto
();
regUnitIcDto
.
setIsNotAccess
(
"0"
);
regUnitIcDto
.
setIsNotAccess
(
"0"
);
...
@@ -1077,6 +1080,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -1077,6 +1080,7 @@ public class TzBaseEnterpriseInfoServiceImpl
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
}
}
ex
.
printStackTrace
();
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
2bdcceb3
...
@@ -1121,6 +1121,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1121,6 +1121,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
}
}
ex
.
printStackTrace
();
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
}
}
}
}
...
...
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