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
6af18bca
Commit
6af18bca
authored
Dec 07, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.监管码前缀方法
parent
7478fe19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+51
-1
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/CommonServiceImpl.java
View file @
6af18bca
...
...
@@ -1799,6 +1799,56 @@ public class CommonServiceImpl implements ICommonService {
return
list
;
}
/**
* 生成使用登记编号
*
* @param equipId 设备id
* @param supervisoryCompanyCode 接收机构单位代码
* @return 使用登记编号
*/
public
String
generateRegistrationCode
(
String
equipId
,
String
supervisoryCode
,
String
supervisoryCompanyCode
,
boolean
isUnit
)
{
// 根据设备id查询设备类别、品种
LambdaQueryWrapper
<
RegistrationInfo
>
equipWrapper
=
new
LambdaQueryWrapper
<>();
equipWrapper
.
eq
(
RegistrationInfo:
:
getRecord
,
equipId
);
RegistrationInfo
equipRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
equipWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
equipRegistrationInfo
))
{
String
equCategory
=
equipRegistrationInfo
.
getEquCategory
();
// 设备类别 "3100"
String
equDefine
=
equipRegistrationInfo
.
getEquDefine
();
// 设备品种 "3110"
if
(!
ObjectUtils
.
isEmpty
(
equCategory
))
{
// 设备种类简称,如果是气瓶返回瓶
String
equCategoryAbbrName
=
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
?
CylinderTypeEnum
.
CYLINDER
.
getName
()
:
EquipTypeEnum
.
getMessage
(
equCategory
.
substring
(
0
,
1
));
// 设备代码中间两位
String
equipType2MidDigits
=
equCategory
.
substring
(
1
,
3
);
//台套还是取品种的中间两位
if
(!
isUnit
)
{
if
(!
ValidationUtil
.
isEmpty
(
equDefine
))
{
equipType2MidDigits
=
equDefine
.
substring
(
1
,
3
);
}
}
// 登记机关代号
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
// 西咸新区监管码对应的设备使用登记证还按咸阳(D)生成
if
(
"X"
.
equals
(
city
))
{
city
=
"D"
;
}
if
(!
ValidationUtil
.
isEmpty
(
supervisoryCompanyCode
))
{
DataDictionary
specialRegionCode
=
dataDictionaryService
.
getByCode
(
supervisoryCompanyCode
,
SPECIAL_REGION_CODE
);
if
(!
ValidationUtil
.
isEmpty
(
specialRegionCode
))
{
city
=
specialRegionCode
.
getName
();
}
}
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
equCategoryAbbrName
+
equipType2MidDigits
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
}
return
null
;
}
/**
* 生成使用登记编号
*
...
...
@@ -1806,7 +1856,7 @@ public class CommonServiceImpl implements ICommonService {
* @param supervisoryCompanyCode 接收机构单位代码
* @return 使用登记编号
*/
public
String
generateRegistrationCode
(
String
equipId
,
JgRegistrationHistory
historyData
,
String
supervisoryCompanyCode
,
boolean
isUnit
)
{
public
String
generateRegistrationCode
(
String
equipId
,
JgRegistrationHistory
historyData
,
String
supervisoryCompanyCode
,
boolean
isUnit
)
{
// 根据设备id查询设备类别、品种
LambdaQueryWrapper
<
RegistrationInfo
>
equipWrapper
=
new
LambdaQueryWrapper
<>();
equipWrapper
.
eq
(
RegistrationInfo:
:
getRecord
,
equipId
);
...
...
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