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
d4021111
Commit
d4021111
authored
Jun 12, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.单位信息维护时冗余机构类型名称
parent
1b8e6540
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+17
-4
No files found.
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 @
d4021111
...
@@ -110,6 +110,11 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -110,6 +110,11 @@ public class TzBaseEnterpriseInfoServiceImpl
private
static
final
Map
<
String
,
String
>
JYJC_CERT_MAP
=
new
HashMap
<>();
private
static
final
Map
<
String
,
String
>
JYJC_CERT_MAP
=
new
HashMap
<>();
/**
* 机构类别字典类型
*/
private
static
final
String
JYJC_TYPE_DICT_CODE
=
"JYJC_TYPE"
;
static
{
static
{
JYJC_CERT_MAP
.
put
(
"1233-1"
,
"检验机构"
);
JYJC_CERT_MAP
.
put
(
"1233-1"
,
"检验机构"
);
JYJC_CERT_MAP
.
put
(
"1233-2"
,
"检测机构"
);
JYJC_CERT_MAP
.
put
(
"1233-2"
,
"检测机构"
);
...
@@ -590,12 +595,13 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -590,12 +595,13 @@ public class TzBaseEnterpriseInfoServiceImpl
//修改许可信息
//修改许可信息
List
<
BaseUnitLicence
>
licences
=
Lists
.
newArrayList
();
List
<
BaseUnitLicence
>
licences
=
Lists
.
newArrayList
();
List
<
DataDictionary
>
dictionaries
=
regUnitInfoService
.
initAllDataDictionaryList
();
JSON
.
parseArray
(
JSON
.
toJSONString
(
map
.
get
(
"unitLicences"
))).
forEach
(
obj
->
{
JSON
.
parseArray
(
JSON
.
toJSONString
(
map
.
get
(
"unitLicences"
))).
forEach
(
obj
->
{
BaseUnitLicence
baseUnitLicence
=
JSON
.
toJavaObject
((
JSONObject
)
obj
,
BaseUnitLicence
.
class
);
BaseUnitLicence
baseUnitLicence
=
JSON
.
toJavaObject
((
JSONObject
)
obj
,
BaseUnitLicence
.
class
);
baseUnitLicence
.
setUnitCode
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"useCode"
))
?
null
:
(
String
)
map
.
get
(
"useCode"
));
baseUnitLicence
.
setUnitCode
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"useCode"
))
?
null
:
(
String
)
map
.
get
(
"useCode"
));
baseUnitLicence
.
setUnitName
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"useUnit"
))
?
null
:
(
String
)
map
.
get
(
"useUnit"
));
baseUnitLicence
.
setUnitName
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"useUnit"
))
?
null
:
(
String
)
map
.
get
(
"useUnit"
));
// 处理许可字典值对应名称
// 处理许可字典值对应名称
handleDictName
(
baseUnitLicence
);
handleDictName
(
baseUnitLicence
,
dictionaries
);
licences
.
add
(
baseUnitLicence
);
licences
.
add
(
baseUnitLicence
);
});
});
if
(!
ValidationUtil
.
isEmpty
(
licences
)){
if
(!
ValidationUtil
.
isEmpty
(
licences
)){
...
@@ -636,9 +642,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -636,9 +642,7 @@ public class TzBaseEnterpriseInfoServiceImpl
*
*
* @param baseUnitLicence 包含许可证书信息的基类单位许可证书对象。
* @param baseUnitLicence 包含许可证书信息的基类单位许可证书对象。
*/
*/
private
void
handleDictName
(
BaseUnitLicence
baseUnitLicence
)
{
private
void
handleDictName
(
BaseUnitLicence
baseUnitLicence
,
List
<
DataDictionary
>
dictionaries
)
{
// 初始化所有数据字典列表
List
<
DataDictionary
>
dictionaries
=
regUnitInfoService
.
initAllDataDictionaryList
();
// 当前登录账户信息
// 当前登录账户信息
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
...
@@ -693,6 +697,15 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -693,6 +697,15 @@ public class TzBaseEnterpriseInfoServiceImpl
.
findFirst
();
.
findFirst
();
// 设置评估方式名称
// 设置评估方式名称
appraisalTypeOptional
.
ifPresent
(
baseUnitLicence:
:
setAppraisalType
);
appraisalTypeOptional
.
ifPresent
(
baseUnitLicence:
:
setAppraisalType
);
// 检验、检测时冗余证书类型名称
this
.
setAgencyTypeName
(
baseUnitLicence
,
dictionaries
);
}
private
void
setAgencyTypeName
(
BaseUnitLicence
baseUnitLicence
,
List
<
DataDictionary
>
dictionaries
)
{
if
(
StringUtils
.
isNotEmpty
(
baseUnitLicence
.
getAgencyType
())){
Optional
<
DataDictionary
>
op
=
dictionaries
.
stream
().
filter
(
d
->
d
.
getType
().
equals
(
JYJC_TYPE_DICT_CODE
)
&&
d
.
getCode
().
equals
(
baseUnitLicence
.
getAgencyType
())).
findAny
();
op
.
ifPresent
(
dataDictionary
->
baseUnitLicence
.
setAgencyTypeName
(
dataDictionary
.
getName
()));
}
}
}
private
void
fillCertTypeName
(
BaseUnitLicence
baseUnitLicence
,
List
<
DataDictionary
>
dictionaries
,
String
companyType
)
{
private
void
fillCertTypeName
(
BaseUnitLicence
baseUnitLicence
,
List
<
DataDictionary
>
dictionaries
,
String
companyType
)
{
...
...
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