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
ab8601c4
Commit
ab8601c4
authored
Jul 24, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):告知类设备查询公共查询条件添加
parent
f7273557
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
69 deletions
+103
-69
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+103
-69
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
ab8601c4
...
...
@@ -137,7 +137,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
IS_COPY
=
"isCopy"
;
// 设备种类
public
static
final
String
EQU_LIST
=
"EQU_LIST"
;
//模版上传集合
//
模版上传集合
public
static
final
String
EQU_LISTS
=
"equLists"
;
// 设备类别
public
static
final
String
EQU_CATEGORY
=
"EQU_CATEGORY"
;
...
...
@@ -157,11 +157,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 设备来源名称 jg:新设备 jg_his:历史数据
public
static
final
String
DATA_SOURCE_NAME
=
"DATA_SOURCE_NAME"
;
private
static
final
String
ATTACHMENT_UPLOAD
=
"attachmentUpload"
;
public
static
final
String
USE_PLACE_CODE
=
"USE_PLACE_CODE"
;
private
final
List
<
String
>
resultError
=
new
ArrayList
<>();
List
<
String
>
useInnerCodeList
=
new
ArrayList
<>();
//单位内部编号集合
List
<
String
>
equCodeList
=
new
ArrayList
<>();
//设备代码集合
List
<
String
>
factoryNumList
=
new
ArrayList
<>();
//出厂编码集合
List
<
String
>
useInnerCodeList
=
new
ArrayList
<>();
//
单位内部编号集合
List
<
String
>
equCodeList
=
new
ArrayList
<>();
//
设备代码集合
List
<
String
>
factoryNumList
=
new
ArrayList
<>();
//
出厂编码集合
/**
* 业务类型 0:单个新增 1:批量导入
...
...
@@ -549,13 +550,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 历史设备录入 直接取所有的设备种类(equList)下的所有设备类别
if
(
"his"
.
equals
(
dataSource
))
{
// 历史数据导入设备类别限制 bug-21172
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"PL_DR"
.
equals
(
type
)){
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"PL_DR"
.
equals
(
type
))
{
return
this
.
baseMapper
.
queryAllEquCategoriesUnderTheEquList
(
equList
).
stream
()
.
filter
(
x
->
"2300"
.
equals
(
x
.
getDictDataKey
()))
.
collect
(
Collectors
.
toList
());
}
// 历史数据新增设备类别限制 bug-21139
if
(!
ObjectUtils
.
isEmpty
(
equList
)
&&
"8000"
.
equals
(
equList
)){
if
(!
ObjectUtils
.
isEmpty
(
equList
)
&&
"8000"
.
equals
(
equList
))
{
return
this
.
baseMapper
.
queryAllEquCategoriesUnderTheEquList
(
equList
).
stream
()
.
filter
(
x
->
"8300"
.
equals
(
x
.
getDictDataKey
()))
.
collect
(
Collectors
.
toList
());
...
...
@@ -656,8 +657,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
return
objMap
;
}
@Autowired
private
SafetyProblemTracingMapper
safetyProblemTracingMapper
;
@Autowired
private
SafetyProblemTracingMapper
safetyProblemTracingMapper
;
/**
* 查询设备基本信息
*
...
...
@@ -1348,14 +1351,14 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
BoolQueryBuilder
dBuilder
=
QueryBuilders
.
boolQuery
();
if
(
map
.
containsKey
(
"DATA_SOURCE"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"DATA_SOURCE"
)))
{
if
(
"jg_his"
.
equals
(
map
.
get
(
"DATA_SOURCE"
)))
{
//只查历史,前缀jg_his
if
(
"jg_his"
.
equals
(
map
.
get
(
"DATA_SOURCE"
)))
{
//
只查历史,前缀jg_his
dBuilder
.
must
(
QueryBuilders
.
prefixQuery
(
"DATA_SOURCE"
,
"jg_his"
));
}
else
if
(!
"jg_his"
.
equals
(
map
.
getString
(
"DATA_SOURCE"
)))
{
//只查新增,前缀为jg且前缀不为jg_his
}
else
if
(!
"jg_his"
.
equals
(
map
.
getString
(
"DATA_SOURCE"
)))
{
//
只查新增,前缀为jg且前缀不为jg_his
dBuilder
.
must
(
QueryBuilders
.
prefixQuery
(
"DATA_SOURCE"
,
"jg"
));
dBuilder
.
mustNot
(
QueryBuilders
.
prefixQuery
(
"DATA_SOURCE"
,
"jg_his"
));
}
}
else
{
//查所有,前缀jg
//
查所有,前缀jg
dBuilder
.
must
(
QueryBuilders
.
prefixQuery
(
"DATA_SOURCE"
,
"jg"
));
}
boolMust
.
must
(
dBuilder
);
...
...
@@ -1363,17 +1366,19 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
String
queryType
=
map
.
getString
(
"QUERY_TYPE"
);
if
(!
ObjectUtils
.
isEmpty
(
queryType
))
{
// 查询 安装告知【可告知设备列表】【USE_UNIT_CREDIT_CODE=== null || ""】
if
(
ValidationUtil
.
equals
(
queryType
,
"AZ"
))
{
//安装
if
(
ValidationUtil
.
equals
(
queryType
,
"AZ"
))
{
//
安装
BoolQueryBuilder
nullOrEmptyQuery
=
QueryBuilders
.
boolQuery
()
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"USE_UNIT_CREDIT_CODE"
,
"*"
));
boolMust
.
must
(
nullOrEmptyQuery
);
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"installNotice"
);
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"WB"
))
{
//维保
// 安装告知设备选择 - 业务限制
// 根据设备类别(EQU_CATEGORY)、安装单位过滤设备(USC_UNIT_CREDIT_CODE) 下面过滤条件已有
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"WB"
))
{
// 维保
// 查询 维保备案【可绑定设备列表】【(EQU_STATE=== null || "")】
BoolQueryBuilder
wbBuilder
=
QueryBuilders
.
boolQuery
();
wbBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
boolMust
.
must
(
wbBuilder
);
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"SY"
))
{
//使用
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"SY"
))
{
//
使用
// 查询 使用登记【可选设备列表】【(EQU_STATUS=== null || "" ) && (USE_ORG_CODE(使用登记证编号) ==="" || null)】
BoolQueryBuilder
syBuilder
=
QueryBuilders
.
boolQuery
();
syBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
...
...
@@ -1392,6 +1397,32 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
syBuilder
.
must
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
syBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
));
boolMust
.
must
(
syBuilder
);
if
(
ValidationUtil
.
equals
(
queryType
,
"GZ_GZ"
))
{
// 改造告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、选择的区县(USE_PLACE_CODE)过滤数据
if
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"useUnitCreditCode"
))
||
ValidationUtil
.
isEmpty
(
map
.
get
(
"county"
)))
{
throw
new
BadRequest
(
"请先选择使用单位,施工区县等信息"
);
}
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
map
.
get
(
"useUnitCreditCode"
));
map
.
put
(
USE_PLACE_CODE
,
String
.
valueOf
(
map
.
get
(
"county"
)).
split
(
"_"
)[
0
]);
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"GZ_WX"
))
{
// 维修告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、选择的区县(USE_PLACE_CODE)过滤数据
if
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"useUnitCreditCode"
))
||
ValidationUtil
.
isEmpty
(
map
.
get
(
"county"
)))
{
throw
new
BadRequest
(
"请先选择使用单位,施工区县等信息"
);
}
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
map
.
get
(
"useUnitCreditCode"
));
map
.
put
(
USE_PLACE_CODE
,
String
.
valueOf
(
map
.
get
(
"county"
)).
split
(
"_"
)[
0
]);
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"GZ_YZ"
))
{
// 移装告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据
if
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"useUnitCreditCode"
)))
{
throw
new
BadRequest
(
"请先选择使用单位等信息"
);
}
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"transferType"
))
&&
ValidationUtil
.
equals
(
map
.
get
(
"transferType"
),
"区内移装"
)
&&
ValidationUtil
.
isEmpty
(
map
.
get
(
"county"
)))
{
throw
new
BadRequest
(
"请先选择施工区域等信息"
);
}
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
map
.
get
(
"useUnitCreditCode"
));
map
.
put
(
USE_PLACE_CODE
,
ValidationUtil
.
equals
(
map
.
get
(
"transferType"
),
"区内移装"
)
?
String
.
valueOf
(
map
.
get
(
"county"
)).
split
(
"_"
)[
0
]
:
null
);
}
}
// this.setRepeatUsedCheckFilterByType(boolMust,companyCode,queryType);
}
...
...
@@ -1437,11 +1468,10 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
BoolQueryBuilder
ubuilder
=
QueryBuilders
.
boolQuery
();
String
useCode
=
QueryParser
.
escape
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
));
useCode
=
useCode
.
contains
(
"_"
)
?
useCode
.
split
(
"_"
)[
0
]
:
useCode
;
ubuilder
.
should
(
QueryBuilders
.
matchQuery
(
"USE_UNIT_CREDIT_CODE"
,
useCode
));
ubuilder
.
must
(
QueryBuilders
.
matchQuery
(
"USE_UNIT_CREDIT_CODE"
,
useCode
));
String
uscCode
=
QueryParser
.
escape
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)).
toLowerCase
();
ubuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"USC_UNIT_CREDIT_CODE"
,
"*"
+
uscCode
+
"*"
));
ubuilder
.
minimumShouldMatch
(
1
);
ubuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USC_UNIT_CREDIT_CODE"
,
"*"
+
QueryParser
.
escape
(
uscCode
)
+
"*"
));
boolMust
.
must
(
ubuilder
);
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
||
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"useUnitCreditCode"
)))
{
...
...
@@ -1455,7 +1485,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)))
{
BoolQueryBuilder
uuccBuilder
=
QueryBuilders
.
boolQuery
();
String
uscCode
=
QueryParser
.
escape
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)).
toLowerCase
();
uuccBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USC_UNIT_CREDIT_CODE"
,
"*"
+
uscCode
+
"*"
));
uuccBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USC_UNIT_CREDIT_CODE"
,
"*"
+
QueryParser
.
escape
(
uscCode
)
+
"*"
));
boolMust
.
must
(
uuccBuilder
);
}
}
...
...
@@ -1515,28 +1545,35 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
EQU_CODE
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
EQU_CODE
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
EQU_CODE
,
"*"
+
test
.
toLowerCase
(
)
+
"*"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
EQU_CODE
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
()
)
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
// 单位内部编号模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_INNER_CODE"
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"USE_INNER_CODE"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_INNER_CODE"
,
"*"
+
test
.
toLowerCase
(
)
+
"*"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_INNER_CODE"
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
()
)
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
// 出厂编号/产品编码模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
FACTORY_NUM
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
FACTORY_NUM
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
FACTORY_NUM
,
"*"
+
test
.
toLowerCase
(
)
+
"*"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
FACTORY_NUM
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
()
)
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
// 制造单位(生产单位)名称模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"PRODUCE_UNIT_NAME"
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"PRODUCE_UNIT_NAME"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"PRODUCE_UNIT_NAME"
,
"*"
+
test
.
toLowerCase
()
+
"*"
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"PRODUCE_UNIT_NAME"
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
())
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
// 模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
USE_PLACE_CODE
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
USE_PLACE_CODE
));
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
USE_PLACE_CODE
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
())
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
builder
.
query
(
boolMust
);
...
...
@@ -1637,39 +1674,39 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
}
private
void
setRepeatUsedCheckFilterByType
(
BoolQueryBuilder
boolMust
,
String
companyCode
,
String
queryType
)
{
if
(
"AZ"
.
equals
(
queryType
)){
//
安装告知
if
(
"AZ"
.
equals
(
queryType
))
{
//
安装告知
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"installNotice"
);
}
else
if
(
"GZ_GZ"
.
equals
(
queryType
)){
//
改造告知
}
else
if
(
"GZ_GZ"
.
equals
(
queryType
))
{
//
改造告知
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"renovationNoticeNew"
);
}
else
if
(
"GZ_WX"
.
equals
(
queryType
)){
//
维修告知
}
else
if
(
"GZ_WX"
.
equals
(
queryType
))
{
//
维修告知
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"maintainInfo"
);
}
else
if
(
"GZ_YZ"
.
equals
(
queryType
)){
//
移装告知
}
else
if
(
"GZ_YZ"
.
equals
(
queryType
))
{
//
移装告知
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"transferNotice"
);
}
else
if
(
"SY"
.
equals
(
queryType
)){
//
使用登记
}
else
if
(
"SY"
.
equals
(
queryType
))
{
//
使用登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"useRegister"
);
}
else
if
(
"DJ_GZ"
.
equals
(
queryType
)){
//
改造变更登记
}
else
if
(
"DJ_GZ"
.
equals
(
queryType
))
{
//
改造变更登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"changeRegistration"
);
}
else
if
(
"DJ_YZ"
.
equals
(
queryType
)){
//
移装变更登记
}
else
if
(
"DJ_YZ"
.
equals
(
queryType
))
{
//
移装变更登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"changeRegistrationTransfer"
);
}
else
if
(
"DJ_DW"
.
equals
(
queryType
)){
//
单位变更登记
}
else
if
(
"DJ_DW"
.
equals
(
queryType
))
{
//
单位变更登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"unitChange"
);
}
else
if
(
"DJ_GM"
.
equals
(
queryType
)){
//
更名变更登记
}
else
if
(
"DJ_GM"
.
equals
(
queryType
))
{
//
更名变更登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"changeName"
);
}
else
if
(
"BF_YZ"
.
equals
(
queryType
)){
//
注销
}
else
if
(
"BF_YZ"
.
equals
(
queryType
))
{
//
注销
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
""
);
}
else
if
(
"BF_ZX"
.
equals
(
queryType
)){
//
报废
}
else
if
(
"BF_ZX"
.
equals
(
queryType
))
{
//
报废
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
""
);
}
else
if
(
"SB_QY"
.
equals
(
queryType
)){
//
启用
}
else
if
(
"SB_QY"
.
equals
(
queryType
))
{
//
启用
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
""
);
}
else
if
(
"SB_TY"
.
equals
(
queryType
)){
//
停用
}
else
if
(
"SB_TY"
.
equals
(
queryType
))
{
//
停用
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
""
);
}
else
if
(
"WB_BA"
.
equals
(
queryType
)){
//
维保备案
}
else
if
(
"WB_BA"
.
equals
(
queryType
))
{
//
维保备案
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"maintenanceFiling"
);
}
else
if
(
"SB_YJ"
.
equals
(
queryType
)){
//
设备移交
}
else
if
(
"SB_YJ"
.
equals
(
queryType
))
{
//
设备移交
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"equipmentHandover"
);
}
else
if
(
"QP_BG"
.
equals
(
queryType
)){
//
车用气瓶变更
}
else
if
(
"QP_BG"
.
equals
(
queryType
))
{
//
车用气瓶变更
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"vehicleGasCylinderChange"
);
}
else
if
(
"QP_DJ"
.
equals
(
queryType
)){
//
车用气瓶登记
}
else
if
(
"QP_DJ"
.
equals
(
queryType
))
{
//
车用气瓶登记
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"vehicleInformation"
);
}
}
...
...
@@ -2046,10 +2083,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
object
.
put
(
"orgCode"
,
company
.
getOrgCode
());
object
.
put
(
"companyName"
,
company
.
getCompanyName
());
object
.
put
(
"companyCode"
,
company
.
getCompanyCode
());
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyCode
(
company
.
getCompanyCode
()).
getResult
();
if
(!
ValidationUtil
.
isEmpty
(
result
))
{
object
.
put
(
"companyType"
,
result
.
getCompanyType
());
}
object
.
put
(
"companyType"
,
company
.
getCompanyType
());
}
return
object
;
}
...
...
@@ -2098,14 +2132,14 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
String
sourceRecord
=
equipmentClassForm
.
get
(
RECORD
).
toString
();
// dataSource = "new".equals(equipSource) ? ("jg_" + sourceRecord) : ("jg_his_" + sourceRecord);
// bug-21203
if
(
equipmentInfoForm
.
containsKey
(
"DATA_SOURCE"
)){
if
(
equipmentInfoForm
.
containsKey
(
"DATA_SOURCE"
))
{
String
dataSourceCopy
=
equipmentInfoForm
.
get
(
"DATA_SOURCE"
).
toString
();
if
(
dataSourceCopy
.
startsWith
(
"jg_his"
)){
if
(
dataSourceCopy
.
startsWith
(
"jg_his"
))
{
dataSource
=
"jg_his_"
+
sourceRecord
;
}
else
{
}
else
{
dataSource
=
"jg_"
+
sourceRecord
;
}
}
else
{
}
else
{
throw
new
BadRequest
(
"数据异常,请联系管理员"
);
}
}
...
...
@@ -2236,7 +2270,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
}
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
))
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonMapper
.
getUnitListByType
(
INSPECTION_AND_TESTING_INSTITUTIONS
);
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
...
...
@@ -2456,9 +2490,9 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
jsonObject
.
put
(
"useUnitCreditCode"
,
useUnitCreditCode
);
Page
<
JSONObject
>
page
=
new
Page
<>(
jsonObject
.
getLong
(
"number"
),
jsonObject
.
getLong
(
"size"
));
Set
<
String
>
records
=
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
getEquipInFlow
(
useUnitCreditCode
);
if
(
"8300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
//管道
if
(
"8300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
//
管道
return
jgUseRegistrationMapper
.
queryForUnitPipelineEquipmentPage
(
page
,
jsonObject
,
records
);
}
else
if
(
"2300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
//气瓶
}
else
if
(
"2300"
.
equals
(
jsonObject
.
get
(
"EQU_CATEGORY_CODE"
)))
{
//
气瓶
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
Page
<
JSONObject
>
result
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipmentPage
(
page
,
jsonObject
,
records
);
...
...
@@ -2617,14 +2651,14 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
String
insUseMaintainExplain
=
getUrlByKey
(
fileDataList
,
"INS_USE_MAINTAIN_EXPLAIN"
);
String
otherAccessoriesFact
=
getUrlByKey
(
fileDataList
,
"OTHER_ACCESSORIES_FACT"
);
String
factSupervisionInspectionReport
=
getUrlByKey
(
fileDataList
,
"FACT_SUPERVISION_INSPECTION_REPORT"
);
//使用信息
//
使用信息
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
BeanUtils
.
copyProperties
(
data
,
useInfo
);
useInfo
.
setRecord
(
record
);
useInfo
.
setRecDate
(
new
Date
());
useInfo
.
setDataSource
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
())
?
"jg_his"
:
"jg"
);
//区分历史设备和新增设备
useInfo
.
setDataSource
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
())
?
"jg_his"
:
"jg"
);
//
区分历史设备和新增设备
useInfo
.
setEquState
(
null
);
useInfo
.
setIsIntoManagement
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()));
//历史气瓶导入为已纳管设备
useInfo
.
setIsIntoManagement
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()));
//
历史气瓶导入为已纳管设备
// 使用单位信息
if
(
"个人主体"
.
equals
(
company
.
getCompanyType
()))
{
useInfo
.
setUseUnitCreditCode
(
company
.
getCompanyCode
().
split
(
"_"
)[
1
]);
...
...
@@ -2635,7 +2669,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
}
useInfoList
.
add
(
useInfo
);
//设计信息
//
设计信息
IdxBizJgDesignInfo
designInfo
=
new
IdxBizJgDesignInfo
();
BeanUtils
.
copyProperties
(
data
,
designInfo
);
designInfo
.
setRecord
(
record
);
...
...
@@ -2648,7 +2682,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
designInfo
.
setOtherAccessoriesDes
(
otherAccessoriesDes
);
designInfoList
.
add
(
designInfo
);
//制造信息
//
制造信息
IdxBizJgFactoryInfo
factoryInfo
=
new
IdxBizJgFactoryInfo
();
BeanUtils
.
copyProperties
(
data
,
factoryInfo
);
factoryInfo
.
setRecord
(
record
);
...
...
@@ -2662,7 +2696,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
factoryInfo
.
setImported
(
Optional
.
ofNullable
(
data
.
getImported
()).
orElse
(
"0"
));
factoryInfoList
.
add
(
factoryInfo
);
//注册登记
//
注册登记
IdxBizJgRegisterInfo
registerInfo
=
new
IdxBizJgRegisterInfo
();
BeanUtils
.
copyProperties
(
data
,
registerInfo
);
registerInfo
.
setRecord
(
record
);
...
...
@@ -2679,14 +2713,14 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
}
registerInfoList
.
add
(
registerInfo
);
//检验检测
//
检验检测
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
new
IdxBizJgInspectionDetectionInfo
();
BeanUtils
.
copyProperties
(
data
,
inspectionDetectionInfo
);
inspectionDetectionInfo
.
setInspectOrgCode
(
data
.
getInspectOrgCode
());
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setInspectType
(
"ZZJDJY"
);
inspectionDetectionInfo
.
setInspectConclusion
(
"6040"
);
//默认合格
inspectionDetectionInfo
.
setInspectConclusion
(
"6040"
);
//
默认合格
inspectionDetectionInfo
.
setInspectDate
(
DateUtil
.
parse
(
data
.
getInspectDate
(),
"yyyy-MM-dd"
));
// 根据条件确定增加的年数
inspectionDetectionInfo
.
setNextInspectDate
(
Date
.
from
(
...
...
@@ -2707,7 +2741,7 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
}
otherInfoList
.
add
(
otherInfo
);
//技术参数
//
技术参数
IdxBizJgTechParamsVessel
paramsVessel
=
new
IdxBizJgTechParamsVessel
();
BeanUtils
.
copyProperties
(
data
,
paramsVessel
);
paramsVessel
.
setRecord
(
record
);
...
...
@@ -2745,9 +2779,9 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
if
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()))
{
// 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq
changeRecordEq
=
new
JgCertificateChangeRecordEq
();
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
changeRecordId
));
//登记证记录主键
changeRecordEq
.
setEquId
(
registerInfo
.
getRecord
());
//设备主键
changeRecordEq
.
setProductCode
(
factoryInfo
.
getFactoryNum
());
//产品编号
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
changeRecordId
));
//
登记证记录主键
changeRecordEq
.
setEquId
(
registerInfo
.
getRecord
());
//
设备主键
changeRecordEq
.
setProductCode
(
factoryInfo
.
getFactoryNum
());
//
产品编号
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
}
});
...
...
@@ -2823,13 +2857,13 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
changeRecord
.
setAuditPassDate
(
new
Date
());
changeRecord
.
setRegType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
());
changeRecord
.
setRegDate
(
registrationManage
.
getCreateDate
());
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
registrationManage
));
//变更内容
changeRecord
.
setUseRegistrationCode
(
registrationManage
.
getUseRegistrationCode
());
//使用登记编号
changeRecord
.
setReceiveCompanyCode
(
registrationManage
.
getReceiveCompanyCode
());
//接收机构公司代码
changeRecord
.
setCertificateNo
(
registrationManage
.
getCertificateNo
());
//登记证书唯一码
changeRecord
.
setUseUnitCreditCode
(
registrationManage
.
getUseUnitCreditCode
());
//使用单位统一信用代码
changeRecord
.
setUseUnitName
(
registrationManage
.
getUseUnitName
());
//使用单位名称
changeRecord
.
setEquCategory
(
registrationManage
.
getEquCategory
());
//设备类别编码
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
registrationManage
));
//
变更内容
changeRecord
.
setUseRegistrationCode
(
registrationManage
.
getUseRegistrationCode
());
//
使用登记编号
changeRecord
.
setReceiveCompanyCode
(
registrationManage
.
getReceiveCompanyCode
());
//
接收机构公司代码
changeRecord
.
setCertificateNo
(
registrationManage
.
getCertificateNo
());
//
登记证书唯一码
changeRecord
.
setUseUnitCreditCode
(
registrationManage
.
getUseUnitCreditCode
());
//
使用单位统一信用代码
changeRecord
.
setUseUnitName
(
registrationManage
.
getUseUnitName
());
//
使用单位名称
changeRecord
.
setEquCategory
(
registrationManage
.
getEquCategory
());
//
设备类别编码
changeRecord
.
setRoutePath
(
""
);
changeRecord
.
setCreateDate
(
new
Date
());
changeRecord
.
setSequenceNbr
(
changeRecordId
);
...
...
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