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
c296d447
Commit
c296d447
authored
Jan 24, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
b4b44c31
535c7909
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
753 additions
and
445 deletions
+753
-445
EquipmentCategoryServiceImpl.java
...evator/biz/service/impl/EquipmentCategoryServiceImpl.java
+116
-123
EquipmentCategoryServiceImpl.java
...linder/biz/service/impl/EquipmentCategoryServiceImpl.java
+117
-124
JgChangeRegistrationTransferDto.java
...ot/module/jg/api/dto/JgChangeRegistrationTransferDto.java
+13
-0
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+4
-0
JgChangeRegistrationTransfer.java
...ot/module/jg/api/entity/JgChangeRegistrationTransfer.java
+7
-0
JgReformNotice.java
...eejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
+6
-0
JgScrapCancel.java
...yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
+1
-1
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+3
-0
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+3
-0
JgScrapCancelEqMapper.java
...amos/boot/module/jg/api/mapper/JgScrapCancelEqMapper.java
+1
-1
IJgChangeRegistrationTransferService.java
.../jg/api/service/IJgChangeRegistrationTransferService.java
+2
-2
IJgMaintainNoticeService.java
.../boot/module/jg/api/service/IJgMaintainNoticeService.java
+2
-0
JgChangeRegistrationReformMapper.xml
...ain/resources/mapper/JgChangeRegistrationReformMapper.xml
+2
-2
JgChangeRegistrationTransferMapper.xml
...n/resources/mapper/JgChangeRegistrationTransferMapper.xml
+1
-1
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+6
-4
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+8
-1
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+1
-0
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+5
-1
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+9
-4
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+13
-0
JgMaintainNoticeController.java
.../module/jg/biz/controller/JgMaintainNoticeController.java
+1
-1
IIdxBizJgUseInfoService.java
...s/boot/module/jg/biz/service/IIdxBizJgUseInfoService.java
+4
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+58
-14
IdxBizJgUseInfoServiceImpl.java
...odule/jg/biz/service/impl/IdxBizJgUseInfoServiceImpl.java
+10
-1
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+1
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+104
-60
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+2
-0
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+12
-11
JgInstallationNoticeEqServiceImpl.java
...g/biz/service/impl/JgInstallationNoticeEqServiceImpl.java
+2
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+9
-16
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+13
-1
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+1
-0
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+8
-7
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+21
-17
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+2
-0
JgUseRegistrationEqServiceImpl.java
...e/jg/biz/service/impl/JgUseRegistrationEqServiceImpl.java
+2
-2
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+86
-15
JyjcInspectionResult.java
...mos/boot/module/jyjc/api/entity/JyjcInspectionResult.java
+13
-0
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+4
-2
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+55
-24
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+19
-1
GenerateCodeServiceImpl.java
.../module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
+1
-1
equipCategory.json
...module-ymt-biz/src/main/resources/json/equipCategory.json
+5
-5
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
c296d447
...
@@ -25,17 +25,9 @@ import com.yeejoin.amos.boot.module.elevator.flc.api.feign.PrivilegeFeginService
...
@@ -25,17 +25,9 @@ import com.yeejoin.amos.boot.module.elevator.flc.api.feign.PrivilegeFeginService
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpHost
;
import
org.apache.http.auth.AuthScope
;
import
org.apache.http.auth.UsernamePasswordCredentials
;
import
org.apache.http.client.CredentialsProvider
;
import
org.apache.http.impl.client.BasicCredentialsProvider
;
import
org.apache.http.impl.nio.client.HttpAsyncClientBuilder
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestClientBuilder
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.index.query.QueryBuilders
;
...
@@ -123,32 +115,32 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -123,32 +115,32 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
//管辖机构redis缓存key
//
管辖机构redis缓存key
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
//行政区划redis缓存key
//
行政区划redis缓存key
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
REGION
=
"REGION"
;
private
static
final
String
REGION
=
"REGION"
;
//西安行政区划code
//
西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
private
static
final
String
XIAN
=
"610100"
;
//判断行政区划查询市还是区
//
判断行政区划查询市还是区
private
static
final
String
END_CODE
=
"0000"
;
private
static
final
String
END_CODE
=
"0000"
;
//一码通监督管理表单id
//
一码通监督管理表单id
private
static
final
String
SUPERVISION_FROM_ID
=
"1627903532906602497"
;
private
static
final
String
SUPERVISION_FROM_ID
=
"1627903532906602497"
;
//一码通使用信息表单id
//
一码通使用信息表单id
private
static
final
String
USE_INFO_FROM_ID
=
"1627903393253056514"
;
private
static
final
String
USE_INFO_FROM_ID
=
"1627903393253056514"
;
//一码通码自动生成
//
一码通码自动生成
final
static
String
CREATE
=
"1"
;
final
static
String
CREATE
=
"1"
;
//一码通码手动输入
//
一码通码手动输入
final
static
String
NOT_CREATE
=
"0"
;
final
static
String
NOT_CREATE
=
"0"
;
//一码通复制功能url参数key
//
一码通复制功能url参数key
private
static
final
String
COPY_KEY
=
"stashType"
;
private
static
final
String
COPY_KEY
=
"stashType"
;
//判断行政区划查询街道
//
判断行政区划查询街道
private
static
final
String
STREET_END_CODE
=
"00"
;
private
static
final
String
STREET_END_CODE
=
"00"
;
private
static
final
String
STREET
=
"STREET"
;
private
static
final
String
STREET
=
"STREET"
;
private
static
final
String
STREET_LEVEL
=
"4"
;
private
static
final
String
STREET_LEVEL
=
"4"
;
...
@@ -242,14 +234,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -242,14 +234,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
city
,
county
,
equipCategory
;
String
city
,
county
,
equipCategory
;
EquInfoDto
equInfoDto
=
new
EquInfoDto
();
EquInfoDto
equInfoDto
=
new
EquInfoDto
();
if
(
ObjectUtils
.
isEmpty
(
record
))
{
if
(
ObjectUtils
.
isEmpty
(
record
))
{
//获取对应行政区划
//
获取对应行政区划
county
=
EquipmentCategoryEnum
.
XZQH
.
getCode
();
county
=
EquipmentCategoryEnum
.
XZQH
.
getCode
();
city
=
map
.
get
(
"regionCode"
).
toString
();
city
=
map
.
get
(
"regionCode"
).
toString
();
//获取对应设备分类
//
获取对应设备分类
equipCategory
=
map
.
get
(
"equCategory"
).
toString
();
equipCategory
=
map
.
get
(
"equCategory"
).
toString
();
}
else
{
}
else
{
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
//判断这条数据认领状态是否为已认领,否则直接返回
//
判断这条数据认领状态是否为已认领,否则直接返回
if
(!
ObjectUtils
.
isEmpty
(
equInfoDto
)
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
equInfoDto
.
getStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
equInfoDto
)
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
equInfoDto
.
getStatus
()))
{
city
=
equInfoDto
.
getCity
();
city
=
equInfoDto
.
getCity
();
county
=
equInfoDto
.
getCounty
();
county
=
equInfoDto
.
getCounty
();
...
@@ -258,10 +250,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -258,10 +250,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
new
HashMap
<>();
return
new
HashMap
<>();
}
}
}
}
//生成码
//
生成码
Map
<
String
,
String
>
codeMap
;
Map
<
String
,
String
>
codeMap
;
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
null
,
null
);
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
null
,
null
);
}
}
if
(
ObjectUtils
.
isEmpty
(
codeMap
))
{
if
(
ObjectUtils
.
isEmpty
(
codeMap
))
{
return
new
HashMap
<>();
return
new
HashMap
<>();
...
@@ -274,19 +266,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -274,19 +266,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
String
supervisorCode
,
elevatorCode
;
String
supervisorCode
,
elevatorCode
;
//设备状态为报废,对应电梯码作废
//
设备状态为报废,对应电梯码作废
equState
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
equState
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
supervisorCode
=
codeMap
.
get
(
"superviseCode"
);
supervisorCode
=
codeMap
.
get
(
"superviseCode"
);
elevatorCode
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"code96333"
);
elevatorCode
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"code96333"
);
List
<
CategoryOtherInfo
>
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectList
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"SUPERVISORY_CODE"
,
supervisorCode
));
List
<
CategoryOtherInfo
>
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectList
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"SUPERVISORY_CODE"
,
supervisorCode
));
if
(
categoryOtherInfo
.
size
()
>
0
)
{
if
(
categoryOtherInfo
.
size
()
>
0
)
{
// categoryOtherInfoMapper.updateCode(supervisorCode, equState);
// categoryOtherInfoMapper.updateCode(supervisorCode, equState);
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
}
else
{
}
else
{
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
}
}
//修改源数据的电梯码
//
修改源数据的电梯码
categoryOtherInfoMapper
.
updateSupervisorCode
(
supervisorCode
,
elevatorCode
,
record
);
categoryOtherInfoMapper
.
updateSupervisorCode
(
supervisorCode
,
elevatorCode
,
record
);
}
else
{
}
else
{
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
...
@@ -297,13 +289,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -297,13 +289,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
@Override
public
List
<
LinkedHashMap
>
getTree
()
{
public
List
<
LinkedHashMap
>
getTree
()
{
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
//判断redis是否存在管辖机构树
//
判断redis是否存在管辖机构树
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
}
}
@Override
@Override
public
List
<
LinkedHashMap
>
creatTree
()
{
public
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
@@ -322,7 +314,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -322,7 +314,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//将管辖机构树中children为[]的修改为null
//
将管辖机构树中children为[]的修改为null
if
(
e
.
get
(
"children"
)
!=
null
)
{
if
(
e
.
get
(
"children"
)
!=
null
)
{
if
(((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
)).
size
()
==
0
)
{
if
(((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
)).
size
()
==
0
)
{
e
.
put
(
"children"
,
null
);
e
.
put
(
"children"
,
null
);
...
@@ -345,7 +337,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -345,7 +337,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//删除使用单位
//
删除使用单位
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
it
.
remove
();
it
.
remove
();
}
}
...
@@ -368,7 +360,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -368,7 +360,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
ObjectUtils
.
isEmpty
(
list
)
?
getProvinceList
(
level
)
:
list
;
return
ObjectUtils
.
isEmpty
(
list
)
?
getProvinceList
(
level
)
:
list
;
}
else
if
(!
ObjectUtils
.
isEmpty
(
parentId
))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
parentId
))
{
String
regionCode
=
parentId
.
split
(
"_"
)[
0
];
String
regionCode
=
parentId
.
split
(
"_"
)[
0
];
//regionCode不是以00结尾查询街道,以0000结果查询市、否则查询区
//
regionCode不是以00结尾查询街道,以0000结果查询市、否则查询区
if
(!
regionCode
.
endsWith
(
STREET_END_CODE
))
{
if
(!
regionCode
.
endsWith
(
STREET_END_CODE
))
{
list
=
ObjectUtils
.
isEmpty
(
redisUtils
.
get
(
STREET
))
?
getProvinceList
(
STREET_LEVEL
)
:
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
STREET
);
list
=
ObjectUtils
.
isEmpty
(
redisUtils
.
get
(
STREET
))
?
getProvinceList
(
STREET_LEVEL
)
:
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
STREET
);
}
else
if
(
regionCode
.
endsWith
(
END_CODE
))
{
}
else
if
(
regionCode
.
endsWith
(
END_CODE
))
{
...
@@ -383,19 +375,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -383,19 +375,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
public
Map
<
String
,
Object
>
getRegionList
()
{
public
Map
<
String
,
Object
>
getRegionList
()
{
//查询省下所有的行政区划市,封装并存入redis
//
查询省下所有的行政区划市,封装并存入redis
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
<
LinkedHashMap
>
cityList
;
List
<
LinkedHashMap
>
cityList
;
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
//获取陕西省regionCode
//
获取陕西省regionCode
String
regionCode
=
((
List
<
LinkedHashMap
>)
privilegeFeginService
.
getProvince
(
"1"
).
getResult
()).
get
(
0
).
get
(
"regionCode"
).
toString
();
String
regionCode
=
((
List
<
LinkedHashMap
>)
privilegeFeginService
.
getProvince
(
"1"
).
getResult
()).
get
(
0
).
get
(
"regionCode"
).
toString
();
cityList
=
deleteTreeData
(
result
,
regionCode
);
cityList
=
deleteTreeData
(
result
,
regionCode
);
Map
<
String
,
Object
>
cityMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
cityMap
=
new
HashMap
<>();
cityMap
.
put
(
regionCode
,
cityList
);
cityMap
.
put
(
regionCode
,
cityList
);
map1
.
put
(
regionCode
,
cityList
);
map1
.
put
(
regionCode
,
cityList
);
redisUtils
.
set
(
CITY
,
cityMap
);
redisUtils
.
set
(
CITY
,
cityMap
);
//查询市下所有的行政区划区,封装并存入redis
//
查询市下所有的行政区划区,封装并存入redis
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -464,7 +456,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -464,7 +456,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//修改数据
//
修改数据
if
(
type
.
equals
(
e
.
get
(
"parentRegionCode"
).
toString
()))
{
if
(
type
.
equals
(
e
.
get
(
"parentRegionCode"
).
toString
()))
{
e
.
put
(
"children"
,
null
);
e
.
put
(
"children"
,
null
);
e
.
put
(
"sequenceNbr"
,
e
.
get
(
"regionCode"
));
e
.
put
(
"sequenceNbr"
,
e
.
get
(
"regionCode"
));
...
@@ -481,33 +473,33 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -481,33 +473,33 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/**
/**
* 具体生成监管码和电梯96333识别码逻辑
* 具体生成监管码和电梯96333识别码逻辑
*/
*/
private
synchronized
Map
<
String
,
String
>
creatCode
(
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
private
synchronized
Map
<
String
,
String
>
creatCode
(
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
CategoryOtherInfo
categoryOtherInfo
=
new
CategoryOtherInfo
();
CategoryOtherInfo
categoryOtherInfo
=
new
CategoryOtherInfo
();
String
prefix
;
String
prefix
;
//判断是否需要生成96333电梯码
//
判断是否需要生成96333电梯码
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
//判断数据是否携带96333电梯码,携带则使用,不携带则生成
//
判断数据是否携带96333电梯码,携带则使用,不携带则生成
if
(
"null"
.
equals
(
code96333
))
{
if
(
"null"
.
equals
(
code96333
))
{
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
//查询未使用的电梯码
//
查询未使用的电梯码
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
//如果存在未使用的电梯码则启用未使用的否则创建
//
如果存在未使用的电梯码则启用未使用的否则创建
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
if
(!
ObjectUtils
.
isEmpty
(
categoryOtherInfo
))
{
if
(!
ObjectUtils
.
isEmpty
(
categoryOtherInfo
))
{
supervisoryCodeInfoMapper
.
delete
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"code96333"
,
categoryOtherInfo
.
getCode
()));
supervisoryCodeInfoMapper
.
delete
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"code96333"
,
categoryOtherInfo
.
getCode
()));
}
}
elevatorCode
.
append
(
elevator
);
elevatorCode
.
append
(
elevator
);
resultMap
.
put
(
"creatStatus"
,
CREATE
);
resultMap
.
put
(
"creatStatus"
,
CREATE
);
}
else
{
}
else
{
elevatorCode
.
append
(
code96333
);
elevatorCode
.
append
(
code96333
);
resultMap
.
put
(
"creatStatus"
,
NOT_CREATE
);
resultMap
.
put
(
"creatStatus"
,
NOT_CREATE
);
}
}
}
}
//判断原数据是否存在监管码,存在则用原监管码即可,不存在则生成
//
判断原数据是否存在监管码,存在则用原监管码即可,不存在则生成
if
(
"null"
.
equals
(
supervisionCode
))
{
if
(
"null"
.
equals
(
supervisionCode
))
{
String
supervisor
=
createSupervisorCode
(
city
,
county
,
equipCategory
);
String
supervisor
=
createSupervisorCode
(
city
,
county
,
equipCategory
);
supervisorCode
.
append
(
supervisor
);
supervisorCode
.
append
(
supervisor
);
}
else
{
}
else
{
...
@@ -520,18 +512,18 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -520,18 +512,18 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
();
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
();
SupervisoryCodeInfo
selectOne
=
supervisoryCodeInfoMapper
.
selectOne
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisionCode
));
SupervisoryCodeInfo
selectOne
=
supervisoryCodeInfoMapper
.
selectOne
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisionCode
));
//将生成的码添加到码表中,码的使用状态为初始状态
//
将生成的码添加到码表中,码的使用状态为初始状态
String
equState
=
EquipmentCategoryEnum
.
CSZT
.
getCode
();
String
equState
=
EquipmentCategoryEnum
.
CSZT
.
getCode
();
supervisoryCodeInfo
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfo
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfo
.
setCreateStatus
(
resultMap
.
get
(
"creatStatus"
));
supervisoryCodeInfo
.
setCreateStatus
(
resultMap
.
get
(
"creatStatus"
));
supervisoryCodeInfo
.
setSupervisoryCode
(
String
.
valueOf
(
supervisorCode
));
supervisoryCodeInfo
.
setSupervisoryCode
(
String
.
valueOf
(
supervisorCode
));
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
if
(
ObjectUtils
.
isEmpty
(
selectOne
))
{
if
(
ObjectUtils
.
isEmpty
(
selectOne
))
{
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
}
else
{
}
else
{
selectOne
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
selectOne
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfoMapper
.
update
(
selectOne
,
supervisoryCodeInfoMapper
.
update
(
selectOne
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
selectOne
.
getSupervisoryCode
()));
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
selectOne
.
getSupervisoryCode
()));
}
}
resultMap
.
put
(
"superviseCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"superviseCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"code96333"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
resultMap
.
put
(
"code96333"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
...
@@ -552,15 +544,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -552,15 +544,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/
*/
private
String
createSupervisorCode
(
String
city
,
String
county
,
String
equipCategory
)
{
private
String
createSupervisorCode
(
String
city
,
String
county
,
String
equipCategory
)
{
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
//生成监管码前缀
//
生成监管码前缀
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
//获取行政区划区县、市是否存在历史监管码
//
获取行政区划区县、市是否存在历史监管码
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
//生成对应监管码
//
生成对应监管码
if
(!
ObjectUtils
.
isEmpty
(
supervisor
)
&&
supervisor
.
getSupervisoryCode
()
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisor
)
&&
supervisor
.
getSupervisoryCode
()
!=
null
)
{
//获取补零位长度
//
获取补零位长度
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
6
);
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
6
);
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
numLength
=
String
.
valueOf
(
num
).
length
();
...
@@ -586,7 +578,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -586,7 +578,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/
*/
private
String
createElevatorCode
(
String
city
,
String
county
)
{
private
String
createElevatorCode
(
String
city
,
String
county
)
{
StringBuilder
elevatorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
//生成生成96333电梯码前缀
//
生成生成96333电梯码前缀
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
String
elevator
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
String
elevator
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
elevatorCode
.
append
(
elevator
);
elevatorCode
.
append
(
elevator
);
...
@@ -595,10 +587,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -595,10 +587,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
ValidationUtil
.
isEmpty
(
initSupervisoryCode
))
{
if
(
ValidationUtil
.
isEmpty
(
initSupervisoryCode
))
{
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
elevator
));
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
elevator
));
}
else
{
}
else
{
//获取行政区划区县、市是否存在历史96333电梯码
//
获取行政区划区县、市是否存在历史96333电梯码
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
if
(!
ObjectUtils
.
isEmpty
(
elevatorOtherInfo
)
&&
elevatorOtherInfo
.
getCode
()
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
elevatorOtherInfo
)
&&
elevatorOtherInfo
.
getCode
()
!=
null
)
{
//获取补零位长度
//
获取补零位长度
String
elevatorCode1
=
elevatorOtherInfo
.
getCode
().
substring
(
2
);
String
elevatorCode1
=
elevatorOtherInfo
.
getCode
().
substring
(
2
);
long
num
=
Long
.
parseLong
(
elevatorCode1
)
+
1
;
long
num
=
Long
.
parseLong
(
elevatorCode1
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
numLength
=
String
.
valueOf
(
num
).
length
();
...
@@ -735,12 +727,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -735,12 +727,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
Page
<
Map
<
String
,
Object
>>
m
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
m
=
new
Page
<>();
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
m
=
this
.
getPage
(
map
);
m
=
this
.
getPage
(
map
);
map
.
remove
(
"USE_UNIT_CREDIT_CODE"
);
map
.
remove
(
"USE_UNIT_CREDIT_CODE"
);
}
else
{
}
else
{
//监管单位
//
监管单位
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
m
=
this
.
getPage
(
map
);
m
=
this
.
getPage
(
map
);
map
.
remove
(
"ORG_BRANCH_CODE"
);
map
.
remove
(
"ORG_BRANCH_CODE"
);
...
@@ -758,7 +750,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -758,7 +750,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
objectPage
.
setSize
(
Long
.
valueOf
(
map
.
get
(
"size"
).
toString
()));
objectPage
.
setSize
(
Long
.
valueOf
(
map
.
get
(
"size"
).
toString
()));
objectPage
.
setCurrent
(
Long
.
valueOf
(
map
.
get
(
"number"
).
toString
()));
objectPage
.
setCurrent
(
Long
.
valueOf
(
map
.
get
(
"number"
).
toString
()));
model
.
setResult
(
objectPage
);
model
.
setResult
(
objectPage
);
//设备状态码对应枚举值
//
设备状态码对应枚举值
List
<
Map
<
String
,
Object
>>
records
=
model
.
getResult
().
getRecords
();
List
<
Map
<
String
,
Object
>>
records
=
model
.
getResult
().
getRecords
();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
record
:
records
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
...
@@ -799,7 +791,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -799,7 +791,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
list
;
return
list
;
}
}
public
List
<
EquipExportVo
>
getEquipExportData
(
EquipExportDto
dto
){
public
List
<
EquipExportVo
>
getEquipExportData
(
EquipExportDto
dto
)
{
ArrayList
<
EquipExportVo
>
list
=
new
ArrayList
<>();
ArrayList
<
EquipExportVo
>
list
=
new
ArrayList
<>();
List
<
JSONObject
>
objectList
=
getCompanyType
();
List
<
JSONObject
>
objectList
=
getCompanyType
();
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
()))
{
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
()))
{
...
@@ -811,14 +803,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -811,14 +803,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
companyCode
=
object
.
getString
(
"companyCode"
);
String
companyCode
=
object
.
getString
(
"companyCode"
);
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
dto
.
setUSE_UNIT_CREDIT_CODE
(
companyCode
);
dto
.
setUSE_UNIT_CREDIT_CODE
(
companyCode
);
}
else
{
}
else
{
//监管单位
//
监管单位
dto
.
setORG_BRANCH_CODE
(
orgCode
);
dto
.
setORG_BRANCH_CODE
(
orgCode
);
}
}
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryMapper
.
getEquipExportData
(
dto
);
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryMapper
.
getEquipExportData
(
dto
);
if
(!
ObjectUtils
.
isEmpty
(
equipExportData
)
)
{
if
(!
ObjectUtils
.
isEmpty
(
equipExportData
))
{
list
.
addAll
(
equipExportData
);
list
.
addAll
(
equipExportData
);
}
}
}
}
...
@@ -858,23 +850,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -858,23 +850,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
@Override
@Override
@Async
@Async
public
void
createEquipmentCategoryData
()
{
public
void
createEquipmentCategoryData
()
{
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"初始化一码通总览数据开始"
);
log
.
info
(
"初始化一码通总览数据开始"
);
}
}
equipmentCategoryDataService
.
remove
(
new
QueryWrapper
<>());
equipmentCategoryDataService
.
remove
(
new
QueryWrapper
<>());
getCategoryData
(
null
,
null
);
getCategoryData
(
null
,
null
);
}
}
private
List
<
EquipmentCategoryData
>
getCategoryData
(
List
<
String
>
unitCodes
,
List
<
String
>
orgBranchCodes
)
{
private
List
<
EquipmentCategoryData
>
getCategoryData
(
List
<
String
>
unitCodes
,
List
<
String
>
orgBranchCodes
)
{
StopWatch
stopWatch
=
new
StopWatch
();
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
stopWatch
.
start
();
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
// 查询所有单位
// 查询所有单位
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCodes
,
orgBranchCodes
);
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCodes
,
orgBranchCodes
);
// 统计查询不同单位、不同装备定义、不同状态下的设备数量
// 统计查询不同单位、不同装备定义、不同状态下的设备数量
List
<
UseUnitCreditCodeCategoryDto
>
equipCountList
=
equipmentCategoryMapper
.
useUnitCreditCodeCategoryCount
();
List
<
UseUnitCreditCodeCategoryDto
>
equipCountList
=
equipmentCategoryMapper
.
useUnitCreditCodeCategoryCount
();
// 查询8大类设备定义
// 查询8大类设备定义
...
@@ -882,31 +873,31 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -882,31 +873,31 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
// 组织EquipmentCategoryData表数据
// 组织EquipmentCategoryData表数据
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"supervise_org_code"
))
||
ObjectUtils
.
isEmpty
(
map
.
get
(
USE_CODE
)))
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"supervise_org_code"
))
||
ObjectUtils
.
isEmpty
(
map
.
get
(
USE_CODE
)))
{
continue
;
continue
;
}
}
equipmentCategoryData
.
setOrgBranchCode
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setOrgBranchCode
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
USE_CODE
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
USE_CODE
).
toString
());
// 指定单位的设备统计信息
// 指定单位的设备统计信息
List
<
UseUnitCreditCodeCategoryDto
>
unitEquipCountList
=
equipCountList
.
stream
().
filter
(
r
->
r
.
getUseUnitCreditCode
().
equals
(
map
.
get
(
USE_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
List
<
UseUnitCreditCodeCategoryDto
>
unitEquipCountList
=
equipCountList
.
stream
().
filter
(
r
->
r
.
getUseUnitCreditCode
().
equals
(
map
.
get
(
USE_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
unitEquipCountList
=
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getOrgBranchCode
().
equals
(
map
.
get
(
ORG_BRANCH_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
unitEquipCountList
=
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getOrgBranchCode
().
equals
(
map
.
get
(
ORG_BRANCH_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
for
(
EquipmentCategory
category
:
equipmentCategories
)
{
for
(
EquipmentCategory
category
:
equipmentCategories
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"waitClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
DRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"waitClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
DRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"alreadyClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"alreadyClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"refuseClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YJL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"refuseClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YJL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
this
.
set8CategoryCountData
(
equipmentCategoryData
,
category
,
data
);
this
.
set8CategoryCountData
(
equipmentCategoryData
,
category
,
data
);
}
}
equipmentCategoryData
.
setRecDate
(
new
Date
());
equipmentCategoryData
.
setRecDate
(
new
Date
());
list
.
add
(
equipmentCategoryData
);
list
.
add
(
equipmentCategoryData
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
unitCodes
))
{
if
(!
ObjectUtils
.
isEmpty
(
unitCodes
))
{
equipmentCategoryDataMapper
.
delete
(
new
QueryWrapper
<
EquipmentCategoryData
>().
in
(
"unit_code"
,
unitCodes
));
equipmentCategoryDataMapper
.
delete
(
new
QueryWrapper
<
EquipmentCategoryData
>().
in
(
"unit_code"
,
unitCodes
));
}
}
equipmentCategoryDataService
.
saveOrUpdateBatch
(
list
);
equipmentCategoryDataService
.
saveOrUpdateBatch
(
list
);
stopWatch
.
stop
();
stopWatch
.
stop
();
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"总览数据刷新结束,耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
log
.
info
(
"总览数据刷新结束,耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
}
}
return
list
;
return
list
;
}
}
...
@@ -945,19 +936,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -945,19 +936,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
List
<
EquipmentCategory
>
getEquipmentCategories
()
{
private
List
<
EquipmentCategory
>
getEquipmentCategories
()
{
LambdaQueryWrapper
<
EquipmentCategory
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
EquipmentCategory
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
likeLeft
(
EquipmentCategory:
:
getCode
,
"000"
);
lambdaQueryWrapper
.
likeLeft
(
EquipmentCategory:
:
getCode
,
"000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"7000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"7000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"F000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"F000"
);
return
equipmentCategoryMapper
.
selectList
(
lambdaQueryWrapper
);
return
equipmentCategoryMapper
.
selectList
(
lambdaQueryWrapper
);
}
}
private
List
<
EquipmentCategoryData
>
updateEquipmentCategoryData
(
String
unitCode
,
String
orgBranchCode
)
{
private
List
<
EquipmentCategoryData
>
updateEquipmentCategoryData
(
String
unitCode
,
String
orgBranchCode
)
{
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
unitCodeList
.
add
(
unitCode
);
unitCodeList
.
add
(
unitCode
);
List
<
String
>
orgBranchCodeList
=
new
ArrayList
<>();
List
<
String
>
orgBranchCodeList
=
new
ArrayList
<>();
orgBranchCodeList
.
add
(
orgBranchCode
);
orgBranchCodeList
.
add
(
orgBranchCode
);
List
<
EquipmentCategoryData
>
equipmentCategoryData
=
getCategoryData
(
unitCodeList
,
null
);
List
<
EquipmentCategoryData
>
equipmentCategoryData
=
getCategoryData
(
unitCodeList
,
null
);
return
equipmentCategoryData
;
return
equipmentCategoryData
;
}
}
...
@@ -968,7 +959,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -968,7 +959,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
if
(
recordList
.
toString
().
contains
(
"["
))
{
if
(
recordList
.
toString
().
contains
(
"["
))
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
records
.
add
(
record
);
records
.
add
(
record
);
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
...
@@ -981,7 +972,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -981,7 +972,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
list
.
add
(
esEquipmentCategoryDto
);
list
.
add
(
esEquipmentCategoryDto
);
}
}
//删除监管码表数据
//
删除监管码表数据
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
List
<
Map
<
String
,
Object
>>
unitCodeAndOrgBranchCodeList
=
superviseInfoMapper
.
selectUnitCodeList
(
records
);
List
<
Map
<
String
,
Object
>>
unitCodeAndOrgBranchCodeList
=
superviseInfoMapper
.
selectUnitCodeList
(
records
);
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
...
@@ -991,17 +982,17 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -991,17 +982,17 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
orgBranchCodeList
.
add
(
String
.
valueOf
(
objectMap
.
get
(
"orgBranchCode"
)));
orgBranchCodeList
.
add
(
String
.
valueOf
(
objectMap
.
get
(
"orgBranchCode"
)));
}
}
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
}
}
//删除涉及的19张表的数据
//
删除涉及的19张表的数据
superviseInfoMapper
.
deleteDataAll
(
records
);
superviseInfoMapper
.
deleteDataAll
(
records
);
// 根据统一信用代码更新总览表
// 根据统一信用代码更新总览表
if
(!
ObjectUtils
.
isEmpty
(
unitCodeList
))
{
if
(!
ObjectUtils
.
isEmpty
(
unitCodeList
))
{
getCategoryData
(
unitCodeList
,
orgBranchCodeList
);
getCategoryData
(
unitCodeList
,
orgBranchCodeList
);
}
}
//删除es中的数据
//
删除es中的数据
esEquipmentCategory
.
deleteAll
(
list
);
esEquipmentCategory
.
deleteAll
(
list
);
return
records
;
return
records
;
}
}
...
@@ -1025,7 +1016,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1025,7 +1016,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
claimStatus
=
String
.
valueOf
(
superviseMap
.
get
(
"claimStatus"
));
String
claimStatus
=
String
.
valueOf
(
superviseMap
.
get
(
"claimStatus"
));
String
code96333
=
String
.
valueOf
(
superviseMap
.
get
(
"code96333"
));
String
code96333
=
String
.
valueOf
(
superviseMap
.
get
(
"code96333"
));
String
operateType
=
String
.
valueOf
(
superviseMap
.
get
(
"operateType"
));
String
operateType
=
String
.
valueOf
(
superviseMap
.
get
(
"operateType"
));
//生成码
//
生成码
Map
<
String
,
String
>
codeMap
;
Map
<
String
,
String
>
codeMap
;
if
(
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
claimStatus
))
{
if
(
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
claimStatus
))
{
log
.
info
(
"准备生成监管码或96333电梯识别码"
);
log
.
info
(
"准备生成监管码或96333电梯识别码"
);
...
@@ -1033,15 +1024,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1033,15 +1024,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
county
=
String
.
valueOf
(
superviseMap
.
get
(
"county"
));
String
county
=
String
.
valueOf
(
superviseMap
.
get
(
"county"
));
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
));
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
));
String
supervisionCode
=
String
.
valueOf
(
superviseMap
.
get
(
"supervisionCode"
));
String
supervisionCode
=
String
.
valueOf
(
superviseMap
.
get
(
"supervisionCode"
));
//生成码
//
生成码
codeMap
=
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
codeMap
=
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
//删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据
//
删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据
map
.
remove
(
"data"
);
map
.
remove
(
"data"
);
supervisionMap
.
put
(
"CODE96333"
,
codeMap
.
get
(
"code96333"
));
supervisionMap
.
put
(
"CODE96333"
,
codeMap
.
get
(
"code96333"
));
supervisionMap
.
put
(
"SUPERVISORY_CODE"
,
codeMap
.
get
(
"superviseCode"
));
supervisionMap
.
put
(
"SUPERVISORY_CODE"
,
codeMap
.
get
(
"superviseCode"
));
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
//根据操作状态判断是调用新增还是修改接口
//
根据操作状态判断是调用新增还是修改接口
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
if
(!
ObjectUtils
.
isEmpty
(
responseModel
)
&&
"200"
.
equals
(
String
.
valueOf
(
responseModel
.
getStatus
())))
{
if
(!
ObjectUtils
.
isEmpty
(
responseModel
)
&&
"200"
.
equals
(
String
.
valueOf
(
responseModel
.
getStatus
())))
{
...
@@ -1053,7 +1044,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1053,7 +1044,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
map
.
remove
(
"data"
);
map
.
remove
(
"data"
);
supervisionMap
.
put
(
"CODE96333"
,
"null"
.
equals
(
code96333
)
?
null
:
code96333
);
supervisionMap
.
put
(
"CODE96333"
,
"null"
.
equals
(
code96333
)
?
null
:
code96333
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
//根据操作状态判断是调用新增还是修改接口
//
根据操作状态判断是调用新增还是修改接口
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
}
else
{
}
else
{
...
@@ -1061,11 +1052,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1061,11 +1052,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
responseModel
=
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
responseModel
=
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
}
}
stopWatch
.
stop
();
stopWatch
.
stop
();
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"通用提交耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
log
.
info
(
"通用提交耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
BF
.
getCode
());
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
BF
.
getCode
());
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
response
.
setDevMessage
(
e
.
getMessage
());
response
.
setDevMessage
(
e
.
getMessage
());
...
@@ -1074,14 +1065,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1074,14 +1065,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
return
response
;
return
response
;
}
finally
{
}
finally
{
updateEquipmentCategoryData
(
unitCode
,
orgBranchCode
);
updateEquipmentCategoryData
(
unitCode
,
orgBranchCode
);
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
}
}
return
responseModel
;
return
responseModel
;
}
}
//分页查询所有数据
//
分页查询所有数据
public
Page
<
Map
<
String
,
Object
>>
getAll
(
Map
<
String
,
Object
>
map
)
{
public
Page
<
Map
<
String
,
Object
>>
getAll
(
Map
<
String
,
Object
>
map
)
{
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
...
@@ -1099,7 +1090,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1099,7 +1090,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
page
;
return
page
;
}
}
//查询总条数
//
查询总条数
public
Long
counts
(
Map
<
String
,
Object
>
map
)
{
public
Long
counts
(
Map
<
String
,
Object
>
map
)
{
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
...
@@ -1107,6 +1098,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1107,6 +1098,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
return
count
;
return
count
;
}
}
/**
/**
* es数据同步
* es数据同步
*
*
...
@@ -1182,15 +1174,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1182,15 +1174,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
* es保存设备数据
* es保存设备数据
*/
*/
public
ESEquipmentCategoryDto
saveESEquipmentCategory
(
Map
<
String
,
Object
>
map
)
{
public
ESEquipmentCategoryDto
saveESEquipmentCategory
(
Map
<
String
,
Object
>
map
)
{
//处理时间问题
//
处理时间问题
String
recDate1
=
map
.
get
(
"REC_DATE"
).
toString
().
substring
(
0
,
19
);
String
recDate1
=
map
.
get
(
"REC_DATE"
).
toString
().
substring
(
0
,
19
);
long
time
=
Timestamp
.
valueOf
(
recDate1
).
getTime
();
long
time
=
Timestamp
.
valueOf
(
recDate1
).
getTime
();
map
.
put
(
"REC_DATE"
,
time
);
map
.
put
(
"REC_DATE"
,
time
);
ESEquipmentCategoryDto
dto
=
JSONObject
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
dto
=
JSONObject
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
save
=
esEquipmentCategory
.
save
(
dto
);
ESEquipmentCategoryDto
save
=
esEquipmentCategory
.
save
(
dto
);
if
(!
ObjectUtils
.
isEmpty
(
save
))
{
if
(!
ObjectUtils
.
isEmpty
(
save
))
{
//同步到es后修改
//
同步到es后修改
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
useInfo
.
setIsNotEs
(
1
);
useInfo
.
setIsNotEs
(
1
);
useInfoMapper
.
update
(
useInfo
,
new
QueryWrapper
<
UseInfo
>().
eq
(
"RECORD"
,
useInfoMapper
.
update
(
useInfo
,
new
QueryWrapper
<
UseInfo
>().
eq
(
"RECORD"
,
...
@@ -1198,6 +1190,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1198,6 +1190,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
return
save
;
return
save
;
}
}
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
// //根据当前登录人查询
// //根据当前登录人查询
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
...
@@ -1209,10 +1202,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1209,10 +1202,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
companyCode
=
object
.
getString
(
"companyCode"
);
String
companyCode
=
object
.
getString
(
"companyCode"
);
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
}
else
{
}
else
{
//监管单位
//
监管单位
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
}
}
}
}
...
@@ -1222,16 +1215,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1222,16 +1215,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
trackTotalHits
(
true
);
builder
.
trackTotalHits
(
true
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
//通用匹配规则,条件构建
//
通用匹配规则,条件构建
//SEQUENCE_NBR
//
SEQUENCE_NBR
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"SEQUENCE_NBR"
,
"*"
+
map
.
getString
(
"SEQUENCE_NBR"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"SEQUENCE_NBR"
,
"*"
+
map
.
getString
(
"SEQUENCE_NBR"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_NAME"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_NAME"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
map
.
getString
(
"ORG_BRANCH_NAME"
)+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
map
.
getString
(
"ORG_BRANCH_NAME"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_CODE"
)))
{
...
@@ -1241,12 +1234,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1241,12 +1234,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_NAME"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_NAME"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_NAME"
,
"*"
+
map
.
getString
(
"USE_UNIT_NAME"
)+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_NAME"
,
"*"
+
map
.
getString
(
"USE_UNIT_NAME"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_CREDIT_CODE"
,
"*"
+
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_CREDIT_CODE"
,
"*"
+
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
...
@@ -1256,23 +1249,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1256,23 +1249,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST"
,
"*"
+
map
.
getString
(
"EQU_LIST"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST"
,
"*"
+
map
.
getString
(
"EQU_LIST"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_CATEGORY"
,
"*"
+
map
.
getString
(
"EQU_CATEGORY"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_CATEGORY"
,
"*"
+
map
.
getString
(
"EQU_CATEGORY"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_ORG_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_ORG_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
+
map
.
getString
(
"USE_ORG_CODE"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
+
map
.
getString
(
"USE_ORG_CODE"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"CODE96333"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"CODE96333"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"CODE96333"
,
"*"
+
map
.
getString
(
"CODE96333"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"CODE96333"
,
"*"
+
map
.
getString
(
"CODE96333"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CODE"
)))
{
...
@@ -1283,7 +1276,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1283,7 +1276,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"SUPERVISORY_CODE"
,
"*"
+
map
.
getString
(
"SUPERVISORY_CODE"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"SUPERVISORY_CODE"
,
"*"
+
map
.
getString
(
"SUPERVISORY_CODE"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE"
)))
{
...
@@ -1296,14 +1289,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1296,14 +1289,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
))
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
map
.
getLong
(
"EQU_STATE"
)));
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
map
.
getLong
(
"EQU_STATE"
)));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
"*"
+
map
.
getString
(
"STATUS"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
"*"
+
map
.
getString
(
"STATUS"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
builder
.
query
(
boolMust
);
builder
.
query
(
boolMust
);
...
@@ -1335,7 +1328,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1335,7 +1328,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
result
;
return
result
;
}
}
//es统计总记录数
//
es统计总记录数
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
Long
totle
=
0L
;
Long
totle
=
0L
;
SearchRequest
searchRequest
=
new
SearchRequest
(
indexs
);
SearchRequest
searchRequest
=
new
SearchRequest
(
indexs
);
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
c296d447
...
@@ -10,8 +10,6 @@ import com.google.common.collect.Lists;
...
@@ -10,8 +10,6 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.cylinder.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.cylinder.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.cylinder.api.enums.EquimentEnum
;
...
@@ -20,22 +18,16 @@ import com.yeejoin.amos.boot.module.cylinder.api.enums.EquipmentClassifityEnum;
...
@@ -20,22 +18,16 @@ import com.yeejoin.amos.boot.module.cylinder.api.enums.EquipmentClassifityEnum;
import
com.yeejoin.amos.boot.module.cylinder.api.mapper.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.mapper.*
;
import
com.yeejoin.amos.boot.module.cylinder.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.cylinder.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.cylinder.api.vo.EquipExportVo
;
import
com.yeejoin.amos.boot.module.cylinder.api.vo.EquipExportVo
;
import
com.yeejoin.amos.boot.module.cylinder.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.cylinder.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.feign.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.feign.PrivilegeFeginService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpHost
;
import
org.apache.http.auth.AuthScope
;
import
org.apache.http.auth.UsernamePasswordCredentials
;
import
org.apache.http.client.CredentialsProvider
;
import
org.apache.http.impl.client.BasicCredentialsProvider
;
import
org.apache.http.impl.nio.client.HttpAsyncClientBuilder
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestClientBuilder
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.index.query.QueryBuilders
;
...
@@ -123,29 +115,29 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -123,29 +115,29 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
//管辖机构redis缓存key
//
管辖机构redis缓存key
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
//行政区划redis缓存key
//
行政区划redis缓存key
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
REGION
=
"REGION"
;
private
static
final
String
REGION
=
"REGION"
;
//西安行政区划code
//
西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
private
static
final
String
XIAN
=
"610100"
;
//判断行政区划查询市还是区
//
判断行政区划查询市还是区
private
static
final
String
END_CODE
=
"0000"
;
private
static
final
String
END_CODE
=
"0000"
;
//一码通监督管理表单id
//
一码通监督管理表单id
private
static
final
String
SUPERVISION_FROM_ID
=
"1627903532906602497"
;
private
static
final
String
SUPERVISION_FROM_ID
=
"1627903532906602497"
;
//一码通使用信息表单id
//
一码通使用信息表单id
private
static
final
String
USE_INFO_FROM_ID
=
"1627903393253056514"
;
private
static
final
String
USE_INFO_FROM_ID
=
"1627903393253056514"
;
//一码通码自动生成
//
一码通码自动生成
final
static
String
CREATE
=
"1"
;
final
static
String
CREATE
=
"1"
;
//一码通码手动输入
//
一码通码手动输入
final
static
String
NOT_CREATE
=
"0"
;
final
static
String
NOT_CREATE
=
"0"
;
//一码通复制功能url参数key
//
一码通复制功能url参数key
private
static
final
String
COPY_KEY
=
"stashType"
;
private
static
final
String
COPY_KEY
=
"stashType"
;
@Autowired
@Autowired
...
@@ -236,14 +228,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -236,14 +228,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
city
,
county
,
equipCategory
;
String
city
,
county
,
equipCategory
;
EquInfoDto
equInfoDto
=
new
EquInfoDto
();
EquInfoDto
equInfoDto
=
new
EquInfoDto
();
if
(
ObjectUtils
.
isEmpty
(
record
))
{
if
(
ObjectUtils
.
isEmpty
(
record
))
{
//获取对应行政区划
//
获取对应行政区划
county
=
EquipmentCategoryEnum
.
XZQH
.
getCode
();
county
=
EquipmentCategoryEnum
.
XZQH
.
getCode
();
city
=
map
.
get
(
"regionCode"
).
toString
();
city
=
map
.
get
(
"regionCode"
).
toString
();
//获取对应设备分类
//
获取对应设备分类
equipCategory
=
map
.
get
(
"equCategory"
).
toString
();
equipCategory
=
map
.
get
(
"equCategory"
).
toString
();
}
else
{
}
else
{
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
//判断这条数据认领状态是否为已认领,否则直接返回
//
判断这条数据认领状态是否为已认领,否则直接返回
if
(!
ObjectUtils
.
isEmpty
(
equInfoDto
)
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
equInfoDto
.
getStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
equInfoDto
)
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
equInfoDto
.
getStatus
()))
{
city
=
equInfoDto
.
getCity
();
city
=
equInfoDto
.
getCity
();
county
=
equInfoDto
.
getCounty
();
county
=
equInfoDto
.
getCounty
();
...
@@ -252,10 +244,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -252,10 +244,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
new
HashMap
<>();
return
new
HashMap
<>();
}
}
}
}
//生成码
//
生成码
Map
<
String
,
String
>
codeMap
;
Map
<
String
,
String
>
codeMap
;
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
null
,
null
);
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
null
,
null
);
}
}
if
(
ObjectUtils
.
isEmpty
(
codeMap
))
{
if
(
ObjectUtils
.
isEmpty
(
codeMap
))
{
return
new
HashMap
<>();
return
new
HashMap
<>();
...
@@ -268,19 +260,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -268,19 +260,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
String
supervisorCode
,
elevatorCode
;
String
supervisorCode
,
elevatorCode
;
//设备状态为报废,对应电梯码作废
//
设备状态为报废,对应电梯码作废
equState
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
equState
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
supervisorCode
=
codeMap
.
get
(
"superviseCode"
);
supervisorCode
=
codeMap
.
get
(
"superviseCode"
);
elevatorCode
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"code96333"
);
elevatorCode
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"code96333"
);
List
<
CategoryOtherInfo
>
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectList
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"SUPERVISORY_CODE"
,
supervisorCode
));
List
<
CategoryOtherInfo
>
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectList
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"SUPERVISORY_CODE"
,
supervisorCode
));
if
(
categoryOtherInfo
.
size
()
>
0
)
{
if
(
categoryOtherInfo
.
size
()
>
0
)
{
// categoryOtherInfoMapper.updateCode(supervisorCode, equState);
// categoryOtherInfoMapper.updateCode(supervisorCode, equState);
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
}
else
{
}
else
{
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
}
}
//修改源数据的电梯码
//
修改源数据的电梯码
categoryOtherInfoMapper
.
updateSupervisorCode
(
supervisorCode
,
elevatorCode
,
record
);
categoryOtherInfoMapper
.
updateSupervisorCode
(
supervisorCode
,
elevatorCode
,
record
);
}
else
{
}
else
{
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
...
@@ -291,13 +283,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -291,13 +283,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
@Override
public
List
<
LinkedHashMap
>
getTree
()
{
public
List
<
LinkedHashMap
>
getTree
()
{
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
//判断redis是否存在管辖机构树
//
判断redis是否存在管辖机构树
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
}
}
@Override
@Override
public
List
<
LinkedHashMap
>
creatTree
()
{
public
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
@@ -316,7 +308,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -316,7 +308,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//将管辖机构树中children为[]的修改为null
//
将管辖机构树中children为[]的修改为null
if
(
e
.
get
(
"children"
)
!=
null
)
{
if
(
e
.
get
(
"children"
)
!=
null
)
{
if
(((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
)).
size
()
==
0
)
{
if
(((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
)).
size
()
==
0
)
{
e
.
put
(
"children"
,
null
);
e
.
put
(
"children"
,
null
);
...
@@ -339,7 +331,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -339,7 +331,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//删除使用单位
//
删除使用单位
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
it
.
remove
();
it
.
remove
();
}
}
...
@@ -362,7 +354,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -362,7 +354,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
ObjectUtils
.
isEmpty
(
list
)
?
getProvinceList
(
level
)
:
list
;
return
ObjectUtils
.
isEmpty
(
list
)
?
getProvinceList
(
level
)
:
list
;
}
else
if
(!
ObjectUtils
.
isEmpty
(
parentId
))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
parentId
))
{
String
regionCode
=
parentId
.
split
(
"_"
)[
0
];
String
regionCode
=
parentId
.
split
(
"_"
)[
0
];
//regionCode以0000结果查询市、否则查询区
//
regionCode以0000结果查询市、否则查询区
Map
<
String
,
Object
>
map
=
regionCode
.
endsWith
(
END_CODE
)
?
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
CITY
)
:
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
REGION
);
Map
<
String
,
Object
>
map
=
regionCode
.
endsWith
(
END_CODE
)
?
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
CITY
)
:
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
REGION
);
if
(
ObjectUtils
.
isEmpty
(
map
))
{
if
(
ObjectUtils
.
isEmpty
(
map
))
{
map
=
getRegionList
();
map
=
getRegionList
();
...
@@ -375,19 +367,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -375,19 +367,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
public
Map
<
String
,
Object
>
getRegionList
()
{
public
Map
<
String
,
Object
>
getRegionList
()
{
//查询省下所有的行政区划市,封装并存入redis
//
查询省下所有的行政区划市,封装并存入redis
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
<
LinkedHashMap
>
cityList
;
List
<
LinkedHashMap
>
cityList
;
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
//获取陕西省regionCode
//
获取陕西省regionCode
String
regionCode
=
((
List
<
LinkedHashMap
>)
privilegeFeginService
.
getProvince
(
"1"
).
getResult
()).
get
(
0
).
get
(
"regionCode"
).
toString
();
String
regionCode
=
((
List
<
LinkedHashMap
>)
privilegeFeginService
.
getProvince
(
"1"
).
getResult
()).
get
(
0
).
get
(
"regionCode"
).
toString
();
cityList
=
deleteTreeData
(
result
,
regionCode
);
cityList
=
deleteTreeData
(
result
,
regionCode
);
Map
<
String
,
Object
>
cityMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
cityMap
=
new
HashMap
<>();
cityMap
.
put
(
regionCode
,
cityList
);
cityMap
.
put
(
regionCode
,
cityList
);
map1
.
put
(
regionCode
,
cityList
);
map1
.
put
(
regionCode
,
cityList
);
redisUtils
.
set
(
CITY
,
cityMap
);
redisUtils
.
set
(
CITY
,
cityMap
);
//查询市下所有的行政区划区,封装并存入redis
//
查询市下所有的行政区划区,封装并存入redis
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -456,7 +448,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -456,7 +448,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//修改数据
//
修改数据
if
(
type
.
equals
(
e
.
get
(
"parentRegionCode"
).
toString
()))
{
if
(
type
.
equals
(
e
.
get
(
"parentRegionCode"
).
toString
()))
{
e
.
put
(
"children"
,
null
);
e
.
put
(
"children"
,
null
);
e
.
put
(
"sequenceNbr"
,
e
.
get
(
"regionCode"
));
e
.
put
(
"sequenceNbr"
,
e
.
get
(
"regionCode"
));
...
@@ -473,33 +465,33 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -473,33 +465,33 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/**
/**
* 具体生成监管码和电梯96333识别码逻辑
* 具体生成监管码和电梯96333识别码逻辑
*/
*/
private
synchronized
Map
<
String
,
String
>
creatCode
(
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
private
synchronized
Map
<
String
,
String
>
creatCode
(
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
CategoryOtherInfo
categoryOtherInfo
=
new
CategoryOtherInfo
();
CategoryOtherInfo
categoryOtherInfo
=
new
CategoryOtherInfo
();
String
prefix
;
String
prefix
;
//判断是否需要生成96333电梯码
//
判断是否需要生成96333电梯码
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
//判断数据是否携带96333电梯码,携带则使用,不携带则生成
//
判断数据是否携带96333电梯码,携带则使用,不携带则生成
if
(
"null"
.
equals
(
code96333
))
{
if
(
"null"
.
equals
(
code96333
))
{
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
//查询未使用的电梯码
//
查询未使用的电梯码
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
//如果存在未使用的电梯码则启用未使用的否则创建
//
如果存在未使用的电梯码则启用未使用的否则创建
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
if
(!
ObjectUtils
.
isEmpty
(
categoryOtherInfo
))
{
if
(!
ObjectUtils
.
isEmpty
(
categoryOtherInfo
))
{
supervisoryCodeInfoMapper
.
delete
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"code96333"
,
categoryOtherInfo
.
getCode
()));
supervisoryCodeInfoMapper
.
delete
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"code96333"
,
categoryOtherInfo
.
getCode
()));
}
}
elevatorCode
.
append
(
elevator
);
elevatorCode
.
append
(
elevator
);
resultMap
.
put
(
"creatStatus"
,
CREATE
);
resultMap
.
put
(
"creatStatus"
,
CREATE
);
}
else
{
}
else
{
elevatorCode
.
append
(
code96333
);
elevatorCode
.
append
(
code96333
);
resultMap
.
put
(
"creatStatus"
,
NOT_CREATE
);
resultMap
.
put
(
"creatStatus"
,
NOT_CREATE
);
}
}
}
}
//判断原数据是否存在监管码,存在则用原监管码即可,不存在则生成
//
判断原数据是否存在监管码,存在则用原监管码即可,不存在则生成
if
(
"null"
.
equals
(
supervisionCode
))
{
if
(
"null"
.
equals
(
supervisionCode
))
{
String
supervisor
=
createSupervisorCode
(
city
,
county
,
equipCategory
);
String
supervisor
=
createSupervisorCode
(
city
,
county
,
equipCategory
);
supervisorCode
.
append
(
supervisor
);
supervisorCode
.
append
(
supervisor
);
}
else
{
}
else
{
...
@@ -512,18 +504,18 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -512,18 +504,18 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
();
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
();
SupervisoryCodeInfo
selectOne
=
supervisoryCodeInfoMapper
.
selectOne
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisionCode
));
SupervisoryCodeInfo
selectOne
=
supervisoryCodeInfoMapper
.
selectOne
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisionCode
));
//将生成的码添加到码表中,码的使用状态为初始状态
//
将生成的码添加到码表中,码的使用状态为初始状态
String
equState
=
EquipmentCategoryEnum
.
CSZT
.
getCode
();
String
equState
=
EquipmentCategoryEnum
.
CSZT
.
getCode
();
supervisoryCodeInfo
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfo
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfo
.
setCreateStatus
(
resultMap
.
get
(
"creatStatus"
));
supervisoryCodeInfo
.
setCreateStatus
(
resultMap
.
get
(
"creatStatus"
));
supervisoryCodeInfo
.
setSupervisoryCode
(
String
.
valueOf
(
supervisorCode
));
supervisoryCodeInfo
.
setSupervisoryCode
(
String
.
valueOf
(
supervisorCode
));
supervisoryCodeInfo
.
setStatus
(
equState
);
supervisoryCodeInfo
.
setStatus
(
equState
);
if
(
ObjectUtils
.
isEmpty
(
selectOne
))
{
if
(
ObjectUtils
.
isEmpty
(
selectOne
))
{
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
insert
(
supervisoryCodeInfo
);
}
else
{
}
else
{
selectOne
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
selectOne
.
setCode96333
(
String
.
valueOf
(
elevatorCode
));
supervisoryCodeInfoMapper
.
update
(
selectOne
,
supervisoryCodeInfoMapper
.
update
(
selectOne
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
selectOne
.
getSupervisoryCode
()));
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
selectOne
.
getSupervisoryCode
()));
}
}
resultMap
.
put
(
"superviseCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"superviseCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"code96333"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
resultMap
.
put
(
"code96333"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
...
@@ -544,15 +536,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -544,15 +536,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/
*/
private
String
createSupervisorCode
(
String
city
,
String
county
,
String
equipCategory
)
{
private
String
createSupervisorCode
(
String
city
,
String
county
,
String
equipCategory
)
{
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
//生成监管码前缀
//
生成监管码前缀
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
//获取行政区划区县、市是否存在历史监管码
//
获取行政区划区县、市是否存在历史监管码
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
//生成对应监管码
//
生成对应监管码
if
(!
ObjectUtils
.
isEmpty
(
supervisor
)
&&
supervisor
.
getSupervisoryCode
()
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisor
)
&&
supervisor
.
getSupervisoryCode
()
!=
null
)
{
//获取补零位长度
//
获取补零位长度
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
6
);
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
6
);
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
numLength
=
String
.
valueOf
(
num
).
length
();
...
@@ -578,7 +570,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -578,7 +570,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/
*/
private
String
createElevatorCode
(
String
city
,
String
county
)
{
private
String
createElevatorCode
(
String
city
,
String
county
)
{
StringBuilder
elevatorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
//生成生成96333电梯码前缀
//
生成生成96333电梯码前缀
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
String
elevator
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
String
elevator
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
elevatorCode
.
append
(
elevator
);
elevatorCode
.
append
(
elevator
);
...
@@ -587,10 +579,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -587,10 +579,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
ValidationUtil
.
isEmpty
(
initSupervisoryCode
))
{
if
(
ValidationUtil
.
isEmpty
(
initSupervisoryCode
))
{
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
elevator
));
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
elevator
));
}
else
{
}
else
{
//获取行政区划区县、市是否存在历史96333电梯码
//
获取行政区划区县、市是否存在历史96333电梯码
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
if
(!
ObjectUtils
.
isEmpty
(
elevatorOtherInfo
)
&&
elevatorOtherInfo
.
getCode
()
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
elevatorOtherInfo
)
&&
elevatorOtherInfo
.
getCode
()
!=
null
)
{
//获取补零位长度
//
获取补零位长度
String
elevatorCode1
=
elevatorOtherInfo
.
getCode
().
substring
(
2
);
String
elevatorCode1
=
elevatorOtherInfo
.
getCode
().
substring
(
2
);
long
num
=
Long
.
parseLong
(
elevatorCode1
)
+
1
;
long
num
=
Long
.
parseLong
(
elevatorCode1
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
numLength
=
String
.
valueOf
(
num
).
length
();
...
@@ -727,12 +719,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -727,12 +719,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
Page
<
Map
<
String
,
Object
>>
m
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
m
=
new
Page
<>();
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
m
=
this
.
getPage
(
map
);
m
=
this
.
getPage
(
map
);
map
.
remove
(
"USE_UNIT_CREDIT_CODE"
);
map
.
remove
(
"USE_UNIT_CREDIT_CODE"
);
}
else
{
}
else
{
//监管单位
//
监管单位
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
m
=
this
.
getPage
(
map
);
m
=
this
.
getPage
(
map
);
map
.
remove
(
"ORG_BRANCH_CODE"
);
map
.
remove
(
"ORG_BRANCH_CODE"
);
...
@@ -750,7 +742,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -750,7 +742,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
objectPage
.
setSize
(
Long
.
valueOf
(
map
.
get
(
"size"
).
toString
()));
objectPage
.
setSize
(
Long
.
valueOf
(
map
.
get
(
"size"
).
toString
()));
objectPage
.
setCurrent
(
Long
.
valueOf
(
map
.
get
(
"number"
).
toString
()));
objectPage
.
setCurrent
(
Long
.
valueOf
(
map
.
get
(
"number"
).
toString
()));
model
.
setResult
(
objectPage
);
model
.
setResult
(
objectPage
);
//设备状态码对应枚举值
//
设备状态码对应枚举值
List
<
Map
<
String
,
Object
>>
records
=
model
.
getResult
().
getRecords
();
List
<
Map
<
String
,
Object
>>
records
=
model
.
getResult
().
getRecords
();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
record
:
records
)
{
for
(
Map
<
String
,
Object
>
record
:
records
)
{
...
@@ -791,7 +783,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -791,7 +783,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
list
;
return
list
;
}
}
public
List
<
EquipExportVo
>
getEquipExportData
(
EquipExportDto
dto
){
public
List
<
EquipExportVo
>
getEquipExportData
(
EquipExportDto
dto
)
{
ArrayList
<
EquipExportVo
>
list
=
new
ArrayList
<>();
ArrayList
<
EquipExportVo
>
list
=
new
ArrayList
<>();
List
<
JSONObject
>
objectList
=
getCompanyType
();
List
<
JSONObject
>
objectList
=
getCompanyType
();
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
()))
{
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
()))
{
...
@@ -803,14 +795,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -803,14 +795,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
companyCode
=
object
.
getString
(
"companyCode"
);
String
companyCode
=
object
.
getString
(
"companyCode"
);
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
dto
.
setUSE_UNIT_CREDIT_CODE
(
companyCode
);
dto
.
setUSE_UNIT_CREDIT_CODE
(
companyCode
);
}
else
{
}
else
{
//监管单位
//
监管单位
dto
.
setORG_BRANCH_CODE
(
orgCode
);
dto
.
setORG_BRANCH_CODE
(
orgCode
);
}
}
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryMapper
.
getEquipExportData
(
dto
);
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryMapper
.
getEquipExportData
(
dto
);
if
(!
ObjectUtils
.
isEmpty
(
equipExportData
)
)
{
if
(!
ObjectUtils
.
isEmpty
(
equipExportData
))
{
list
.
addAll
(
equipExportData
);
list
.
addAll
(
equipExportData
);
}
}
}
}
...
@@ -850,23 +842,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -850,23 +842,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
@Override
@Override
@Async
@Async
public
void
createEquipmentCategoryData
()
{
public
void
createEquipmentCategoryData
()
{
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"初始化一码通总览数据开始"
);
log
.
info
(
"初始化一码通总览数据开始"
);
}
}
equipmentCategoryDataService
.
remove
(
new
QueryWrapper
<>());
equipmentCategoryDataService
.
remove
(
new
QueryWrapper
<>());
getCategoryData
(
null
,
null
);
getCategoryData
(
null
,
null
);
}
}
private
List
<
EquipmentCategoryData
>
getCategoryData
(
List
<
String
>
unitCodes
,
List
<
String
>
orgBranchCodes
)
{
private
List
<
EquipmentCategoryData
>
getCategoryData
(
List
<
String
>
unitCodes
,
List
<
String
>
orgBranchCodes
)
{
StopWatch
stopWatch
=
new
StopWatch
();
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
stopWatch
.
start
();
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
List
<
EquipmentCategoryData
>
list
=
new
ArrayList
<>();
// 查询所有单位
// 查询所有单位
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCodes
,
orgBranchCodes
);
List
<
Map
<
String
,
Object
>>
allUnitList
=
equipmentCategoryMapper
.
getAllUnit
(
unitCodes
,
orgBranchCodes
);
// 统计查询不同单位、不同装备定义、不同状态下的设备数量
// 统计查询不同单位、不同装备定义、不同状态下的设备数量
List
<
UseUnitCreditCodeCategoryDto
>
equipCountList
=
equipmentCategoryMapper
.
useUnitCreditCodeCategoryCount
();
List
<
UseUnitCreditCodeCategoryDto
>
equipCountList
=
equipmentCategoryMapper
.
useUnitCreditCodeCategoryCount
();
// 查询8大类设备定义
// 查询8大类设备定义
...
@@ -874,31 +865,31 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -874,31 +865,31 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
// 组织EquipmentCategoryData表数据
// 组织EquipmentCategoryData表数据
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
for
(
Map
<
String
,
Object
>
map
:
allUnitList
)
{
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
EquipmentCategoryData
equipmentCategoryData
=
new
EquipmentCategoryData
();
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"supervise_org_code"
))
||
ObjectUtils
.
isEmpty
(
map
.
get
(
USE_CODE
)))
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"supervise_org_code"
))
||
ObjectUtils
.
isEmpty
(
map
.
get
(
USE_CODE
)))
{
continue
;
continue
;
}
}
equipmentCategoryData
.
setOrgBranchCode
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setOrgBranchCode
(
map
.
get
(
"supervise_org_code"
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
USE_CODE
).
toString
());
equipmentCategoryData
.
setUnitCode
(
map
.
get
(
USE_CODE
).
toString
());
// 指定单位的设备统计信息
// 指定单位的设备统计信息
List
<
UseUnitCreditCodeCategoryDto
>
unitEquipCountList
=
equipCountList
.
stream
().
filter
(
r
->
r
.
getUseUnitCreditCode
().
equals
(
map
.
get
(
USE_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
List
<
UseUnitCreditCodeCategoryDto
>
unitEquipCountList
=
equipCountList
.
stream
().
filter
(
r
->
r
.
getUseUnitCreditCode
().
equals
(
map
.
get
(
USE_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
unitEquipCountList
=
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getOrgBranchCode
().
equals
(
map
.
get
(
ORG_BRANCH_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
unitEquipCountList
=
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getOrgBranchCode
().
equals
(
map
.
get
(
ORG_BRANCH_CODE
).
toString
())).
collect
(
Collectors
.
toList
());
for
(
EquipmentCategory
category
:
equipmentCategories
)
{
for
(
EquipmentCategory
category
:
equipmentCategories
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"waitClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
DRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"waitClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
DRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"alreadyClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"alreadyClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"refuseClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YJL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
data
.
put
(
"refuseClaim"
,
unitEquipCountList
.
stream
().
filter
(
r
->
r
.
getEquList
().
equals
(
category
.
getCode
())
&&
EquipmentCategoryEnum
.
YJL
.
getName
().
equals
(
r
.
getClaimStatus
())).
collect
(
Collectors
.
summarizingLong
(
UseUnitCreditCodeCategoryDto:
:
getTotal
)).
getSum
());
this
.
set8CategoryCountData
(
equipmentCategoryData
,
category
,
data
);
this
.
set8CategoryCountData
(
equipmentCategoryData
,
category
,
data
);
}
}
equipmentCategoryData
.
setRecDate
(
new
Date
());
equipmentCategoryData
.
setRecDate
(
new
Date
());
list
.
add
(
equipmentCategoryData
);
list
.
add
(
equipmentCategoryData
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
unitCodes
))
{
if
(!
ObjectUtils
.
isEmpty
(
unitCodes
))
{
equipmentCategoryDataMapper
.
delete
(
new
QueryWrapper
<
EquipmentCategoryData
>().
in
(
"unit_code"
,
unitCodes
));
equipmentCategoryDataMapper
.
delete
(
new
QueryWrapper
<
EquipmentCategoryData
>().
in
(
"unit_code"
,
unitCodes
));
}
}
equipmentCategoryDataService
.
saveOrUpdateBatch
(
list
);
equipmentCategoryDataService
.
saveOrUpdateBatch
(
list
);
stopWatch
.
stop
();
stopWatch
.
stop
();
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"总览数据刷新结束,耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
log
.
info
(
"总览数据刷新结束,耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
}
}
return
list
;
return
list
;
}
}
...
@@ -937,19 +928,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -937,19 +928,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
List
<
EquipmentCategory
>
getEquipmentCategories
()
{
private
List
<
EquipmentCategory
>
getEquipmentCategories
()
{
LambdaQueryWrapper
<
EquipmentCategory
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
EquipmentCategory
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
likeLeft
(
EquipmentCategory:
:
getCode
,
"000"
);
lambdaQueryWrapper
.
likeLeft
(
EquipmentCategory:
:
getCode
,
"000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"7000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"7000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"F000"
);
lambdaQueryWrapper
.
ne
(
EquipmentCategory:
:
getCode
,
"F000"
);
return
equipmentCategoryMapper
.
selectList
(
lambdaQueryWrapper
);
return
equipmentCategoryMapper
.
selectList
(
lambdaQueryWrapper
);
}
}
private
List
<
EquipmentCategoryData
>
updateEquipmentCategoryData
(
String
unitCode
,
String
orgBranchCode
)
{
private
List
<
EquipmentCategoryData
>
updateEquipmentCategoryData
(
String
unitCode
,
String
orgBranchCode
)
{
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
unitCodeList
.
add
(
unitCode
);
unitCodeList
.
add
(
unitCode
);
List
<
String
>
orgBranchCodeList
=
new
ArrayList
<>();
List
<
String
>
orgBranchCodeList
=
new
ArrayList
<>();
orgBranchCodeList
.
add
(
orgBranchCode
);
orgBranchCodeList
.
add
(
orgBranchCode
);
List
<
EquipmentCategoryData
>
equipmentCategoryData
=
getCategoryData
(
unitCodeList
,
null
);
List
<
EquipmentCategoryData
>
equipmentCategoryData
=
getCategoryData
(
unitCodeList
,
null
);
return
equipmentCategoryData
;
return
equipmentCategoryData
;
}
}
...
@@ -960,7 +951,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -960,7 +951,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
if
(
recordList
.
toString
().
contains
(
"["
))
{
if
(
recordList
.
toString
().
contains
(
"["
))
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
records
.
add
(
record
);
records
.
add
(
record
);
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
...
@@ -973,7 +964,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -973,7 +964,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
list
.
add
(
esEquipmentCategoryDto
);
list
.
add
(
esEquipmentCategoryDto
);
}
}
//删除监管码表数据
//
删除监管码表数据
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
List
<
Map
<
String
,
Object
>>
unitCodeAndOrgBranchCodeList
=
superviseInfoMapper
.
selectUnitCodeList
(
records
);
List
<
Map
<
String
,
Object
>>
unitCodeAndOrgBranchCodeList
=
superviseInfoMapper
.
selectUnitCodeList
(
records
);
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
...
@@ -983,17 +974,17 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -983,17 +974,17 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
orgBranchCodeList
.
add
(
String
.
valueOf
(
objectMap
.
get
(
"orgBranchCode"
)));
orgBranchCodeList
.
add
(
String
.
valueOf
(
objectMap
.
get
(
"orgBranchCode"
)));
}
}
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
}
}
//删除涉及的19张表的数据
//
删除涉及的19张表的数据
superviseInfoMapper
.
deleteDataAll
(
records
);
superviseInfoMapper
.
deleteDataAll
(
records
);
// 根据统一信用代码更新总览表
// 根据统一信用代码更新总览表
if
(!
ObjectUtils
.
isEmpty
(
unitCodeList
))
{
if
(!
ObjectUtils
.
isEmpty
(
unitCodeList
))
{
getCategoryData
(
unitCodeList
,
orgBranchCodeList
);
getCategoryData
(
unitCodeList
,
orgBranchCodeList
);
}
}
//删除es中的数据
//
删除es中的数据
esEquipmentCategory
.
deleteAll
(
list
);
esEquipmentCategory
.
deleteAll
(
list
);
return
records
;
return
records
;
}
}
...
@@ -1017,7 +1008,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1017,7 +1008,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
claimStatus
=
String
.
valueOf
(
superviseMap
.
get
(
"claimStatus"
));
String
claimStatus
=
String
.
valueOf
(
superviseMap
.
get
(
"claimStatus"
));
String
code96333
=
String
.
valueOf
(
superviseMap
.
get
(
"code96333"
));
String
code96333
=
String
.
valueOf
(
superviseMap
.
get
(
"code96333"
));
String
operateType
=
String
.
valueOf
(
superviseMap
.
get
(
"operateType"
));
String
operateType
=
String
.
valueOf
(
superviseMap
.
get
(
"operateType"
));
//生成码
//
生成码
Map
<
String
,
String
>
codeMap
;
Map
<
String
,
String
>
codeMap
;
if
(
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
claimStatus
))
{
if
(
EquipmentCategoryEnum
.
YRL
.
getName
().
equals
(
claimStatus
))
{
log
.
info
(
"准备生成监管码或96333电梯识别码"
);
log
.
info
(
"准备生成监管码或96333电梯识别码"
);
...
@@ -1025,15 +1016,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1025,15 +1016,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
county
=
String
.
valueOf
(
superviseMap
.
get
(
"county"
));
String
county
=
String
.
valueOf
(
superviseMap
.
get
(
"county"
));
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
));
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
));
String
supervisionCode
=
String
.
valueOf
(
superviseMap
.
get
(
"supervisionCode"
));
String
supervisionCode
=
String
.
valueOf
(
superviseMap
.
get
(
"supervisionCode"
));
//生成码
//
生成码
codeMap
=
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
codeMap
=
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
//删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据
//
删除map中的冗余数据,添加对应监管码和96333码调用idx多表单页提交接口吧保存数据
map
.
remove
(
"data"
);
map
.
remove
(
"data"
);
supervisionMap
.
put
(
"CODE96333"
,
codeMap
.
get
(
"code96333"
));
supervisionMap
.
put
(
"CODE96333"
,
codeMap
.
get
(
"code96333"
));
supervisionMap
.
put
(
"SUPERVISORY_CODE"
,
codeMap
.
get
(
"superviseCode"
));
supervisionMap
.
put
(
"SUPERVISORY_CODE"
,
codeMap
.
get
(
"superviseCode"
));
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
//根据操作状态判断是调用新增还是修改接口
//
根据操作状态判断是调用新增还是修改接口
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
if
(!
ObjectUtils
.
isEmpty
(
responseModel
)
&&
"200"
.
equals
(
String
.
valueOf
(
responseModel
.
getStatus
())))
{
if
(!
ObjectUtils
.
isEmpty
(
responseModel
)
&&
"200"
.
equals
(
String
.
valueOf
(
responseModel
.
getStatus
())))
{
...
@@ -1045,7 +1036,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1045,7 +1036,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
map
.
remove
(
"data"
);
map
.
remove
(
"data"
);
supervisionMap
.
put
(
"CODE96333"
,
"null"
.
equals
(
code96333
)
?
null
:
code96333
);
supervisionMap
.
put
(
"CODE96333"
,
"null"
.
equals
(
code96333
)
?
null
:
code96333
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
map
.
put
(
SUPERVISION_FROM_ID
,
supervisionMap
);
//根据操作状态判断是调用新增还是修改接口
//
根据操作状态判断是调用新增还是修改接口
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
null
,
null
,
null
,
map
)
:
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
}
else
{
}
else
{
...
@@ -1053,11 +1044,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1053,11 +1044,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
responseModel
=
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
responseModel
=
idxFeignService
.
batchUpdate
(
null
,
null
,
map
);
}
}
stopWatch
.
stop
();
stopWatch
.
stop
();
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"通用提交耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
log
.
info
(
"通用提交耗时:{} 秒"
,
stopWatch
.
getTotalTimeSeconds
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
BF
.
getCode
());
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
BF
.
getCode
());
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
response
.
setDevMessage
(
e
.
getMessage
());
response
.
setDevMessage
(
e
.
getMessage
());
...
@@ -1066,14 +1057,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1066,14 +1057,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
return
response
;
return
response
;
}
finally
{
}
finally
{
updateEquipmentCategoryData
(
unitCode
,
orgBranchCode
);
updateEquipmentCategoryData
(
unitCode
,
orgBranchCode
);
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
supervisoryCodeInfo
.
getSupervisoryCode
()));
}
}
return
responseModel
;
return
responseModel
;
}
}
//分页查询所有数据
//
分页查询所有数据
public
Page
<
Map
<
String
,
Object
>>
getAll
(
Map
<
String
,
Object
>
map
)
{
public
Page
<
Map
<
String
,
Object
>>
getAll
(
Map
<
String
,
Object
>
map
)
{
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
...
@@ -1091,7 +1082,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1091,7 +1082,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
page
;
return
page
;
}
}
//查询总条数
//
查询总条数
public
Long
counts
(
Map
<
String
,
Object
>
map
)
{
public
Long
counts
(
Map
<
String
,
Object
>
map
)
{
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
String
tableName
=
map
.
get
(
TABLENAME
).
toString
();
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
Assert
.
hasText
(
tableName
,
"表名不能为空"
);
...
@@ -1099,6 +1090,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1099,6 +1090,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
return
count
;
return
count
;
}
}
/**
/**
* es数据同步
* es数据同步
*
*
...
@@ -1174,15 +1166,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1174,15 +1166,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
* es保存设备数据
* es保存设备数据
*/
*/
public
ESEquipmentCategoryDto
saveESEquipmentCategory
(
Map
<
String
,
Object
>
map
)
{
public
ESEquipmentCategoryDto
saveESEquipmentCategory
(
Map
<
String
,
Object
>
map
)
{
//处理时间问题
//
处理时间问题
String
recDate1
=
map
.
get
(
"REC_DATE"
).
toString
().
substring
(
0
,
19
);
String
recDate1
=
map
.
get
(
"REC_DATE"
).
toString
().
substring
(
0
,
19
);
long
time
=
Timestamp
.
valueOf
(
recDate1
).
getTime
();
long
time
=
Timestamp
.
valueOf
(
recDate1
).
getTime
();
map
.
put
(
"REC_DATE"
,
time
);
map
.
put
(
"REC_DATE"
,
time
);
ESEquipmentCategoryDto
dto
=
JSONObject
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
dto
=
JSONObject
.
parseObject
(
toJSONString
(
map
),
ESEquipmentCategoryDto
.
class
);
ESEquipmentCategoryDto
save
=
esEquipmentCategory
.
save
(
dto
);
ESEquipmentCategoryDto
save
=
esEquipmentCategory
.
save
(
dto
);
if
(!
ObjectUtils
.
isEmpty
(
save
))
{
if
(!
ObjectUtils
.
isEmpty
(
save
))
{
//同步到es后修改
//
同步到es后修改
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
useInfo
.
setIsNotEs
(
1
);
useInfo
.
setIsNotEs
(
1
);
useInfoMapper
.
update
(
useInfo
,
new
QueryWrapper
<
UseInfo
>().
eq
(
"RECORD"
,
useInfoMapper
.
update
(
useInfo
,
new
QueryWrapper
<
UseInfo
>().
eq
(
"RECORD"
,
...
@@ -1190,6 +1182,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1190,6 +1182,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
return
save
;
return
save
;
}
}
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
public
Page
<
JSONObject
>
queryByKeys
(
JSONObject
map
)
{
// //根据当前登录人查询
// //根据当前登录人查询
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
EQUSTATE
)))
{
...
@@ -1201,10 +1194,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1201,10 +1194,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
companyCode
=
object
.
getString
(
"companyCode"
);
String
companyCode
=
object
.
getString
(
"companyCode"
);
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
if
(
LEVEL
.
equals
(
level
))
{
//企业
//
企业
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
}
else
{
}
else
{
//监管单位
//
监管单位
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
map
.
put
(
"ORG_BRANCH_CODE"
,
code
);
}
}
}
}
...
@@ -1214,16 +1207,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1214,16 +1207,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
trackTotalHits
(
true
);
builder
.
trackTotalHits
(
true
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
//通用匹配规则,条件构建
//
通用匹配规则,条件构建
//SEQUENCE_NBR
//
SEQUENCE_NBR
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SEQUENCE_NBR"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"SEQUENCE_NBR"
,
"*"
+
map
.
getString
(
"SEQUENCE_NBR"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"SEQUENCE_NBR"
,
"*"
+
map
.
getString
(
"SEQUENCE_NBR"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_NAME"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_NAME"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
map
.
getString
(
"ORG_BRANCH_NAME"
)+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
map
.
getString
(
"ORG_BRANCH_NAME"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"ORG_BRANCH_CODE"
)))
{
...
@@ -1233,12 +1226,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1233,12 +1226,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_NAME"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_NAME"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_NAME"
,
"*"
+
map
.
getString
(
"USE_UNIT_NAME"
)+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_NAME"
,
"*"
+
map
.
getString
(
"USE_UNIT_NAME"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_CREDIT_CODE"
,
"*"
+
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"USE_UNIT_CREDIT_CODE"
,
"*"
+
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST_CODE"
)))
{
...
@@ -1248,23 +1241,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1248,23 +1241,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_LIST"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST"
,
"*"
+
map
.
getString
(
"EQU_LIST"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_LIST"
,
"*"
+
map
.
getString
(
"EQU_LIST"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CATEGORY"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_CATEGORY"
,
"*"
+
map
.
getString
(
"EQU_CATEGORY"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"EQU_CATEGORY"
,
"*"
+
map
.
getString
(
"EQU_CATEGORY"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_ORG_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_ORG_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
+
map
.
getString
(
"USE_ORG_CODE"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
+
map
.
getString
(
"USE_ORG_CODE"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"CODE96333"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"CODE96333"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"CODE96333"
,
"*"
+
map
.
getString
(
"CODE96333"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"CODE96333"
,
"*"
+
map
.
getString
(
"CODE96333"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_CODE"
)))
{
...
@@ -1275,7 +1268,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1275,7 +1268,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"SUPERVISORY_CODE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"SUPERVISORY_CODE"
,
"*"
+
map
.
getString
(
"SUPERVISORY_CODE"
).
toLowerCase
()+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"SUPERVISORY_CODE"
,
"*"
+
map
.
getString
(
"SUPERVISORY_CODE"
).
toLowerCase
()
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE"
)))
{
...
@@ -1288,14 +1281,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1288,14 +1281,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
query
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"ADDRESS"
,
"*"
+
map
.
getString
(
"ADDRESS"
)
+
"*"
));
boolMust
.
must
(
query
);
boolMust
.
must
(
query
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
))
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
map
.
getLong
(
"EQU_STATE"
)));
meBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
map
.
getLong
(
"EQU_STATE"
)));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"STATUS"
)))
{
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
"*"
+
map
.
getString
(
"STATUS"
)+
"*"
));
meBuilder
.
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
"*"
+
map
.
getString
(
"STATUS"
)
+
"*"
));
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
builder
.
query
(
boolMust
);
builder
.
query
(
boolMust
);
...
@@ -1327,7 +1320,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1327,7 +1320,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
result
;
return
result
;
}
}
//es统计总记录数
//
es统计总记录数
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
public
Long
getCount
(
String
indexs
,
RestHighLevelClient
esClient
)
{
Long
totle
=
0L
;
Long
totle
=
0L
;
SearchRequest
searchRequest
=
new
SearchRequest
(
indexs
);
SearchRequest
searchRequest
=
new
SearchRequest
(
indexs
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgChangeRegistrationTransferDto.java
View file @
c296d447
...
@@ -124,4 +124,17 @@ public class JgChangeRegistrationTransferDto extends BaseDto {
...
@@ -124,4 +124,17 @@ public class JgChangeRegistrationTransferDto extends BaseDto {
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@ApiModelProperty
(
value
=
"设备移装完整详细地址"
)
private
String
fullAddress
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
productName
;
@ApiModelProperty
(
value
=
"设备移装完整详细地址"
)
private
String
allAddress
;
@ApiModelProperty
(
value
=
" 单位内部编号"
)
private
String
innerCode
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
View file @
c296d447
...
@@ -228,4 +228,8 @@ public class JgTransferNoticeDto extends BaseDto {
...
@@ -228,4 +228,8 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@TableField
(
exist
=
false
)
private
String
equAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgChangeRegistrationTransfer.java
View file @
c296d447
...
@@ -239,4 +239,11 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
...
@@ -239,4 +239,11 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
/**
* 设备移装完整详细地址
*/
@TableField
(
value
=
"full_address"
)
private
String
fullAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
View file @
c296d447
...
@@ -336,4 +336,10 @@ public class JgReformNotice extends BaseEntity {
...
@@ -336,4 +336,10 @@ public class JgReformNotice extends BaseEntity {
*/
*/
@TableField
(
value
=
"next_execute_user_ids"
)
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
/**
* 地址
*/
@TableField
(
exist
=
false
)
private
String
fullAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
View file @
c296d447
...
@@ -96,7 +96,7 @@ public class JgScrapCancel extends BaseEntity {
...
@@ -96,7 +96,7 @@ public class JgScrapCancel extends BaseEntity {
private
String
receiveOrgName
;
private
String
receiveOrgName
;
/**
/**
* 接收机构公司代码
* 接收机构公司代码
--暂时未用到
*/
*/
@TableField
(
"receive_company_code"
)
@TableField
(
"receive_company_code"
)
private
String
receiveCompanyCode
;
private
String
receiveCompanyCode
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgTransferNotice.java
View file @
c296d447
...
@@ -319,5 +319,8 @@ public class JgTransferNotice extends BaseEntity {
...
@@ -319,5 +319,8 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
"\"next_execute_user_ids\""
)
@TableField
(
"\"next_execute_user_ids\""
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@TableField
(
exist
=
false
)
private
String
equAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistration.java
View file @
c296d447
...
@@ -186,4 +186,7 @@ public class JgUseRegistration extends BaseEntity {
...
@@ -186,4 +186,7 @@ public class JgUseRegistration extends BaseEntity {
@TableField
(
value
=
"is_xixian"
)
@TableField
(
value
=
"is_xixian"
)
private
String
isXixian
;
private
String
isXixian
;
@TableField
(
value
=
"use_address"
)
private
String
useAddress
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgScrapCancelEqMapper.java
View file @
c296d447
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq
;
/**
/**
* 报废注销设备关系表 Mapper 接口
* 报废注销设备关系表 Mapper 接口
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationTransferService.java
View file @
c296d447
...
@@ -21,9 +21,9 @@ import java.util.Map;
...
@@ -21,9 +21,9 @@ import java.util.Map;
*/
*/
public
interface
IJgChangeRegistrationTransferService
extends
IService
<
JgChangeRegistrationTransfer
>
{
public
interface
IJgChangeRegistrationTransferService
extends
IService
<
JgChangeRegistrationTransfer
>
{
List
<
JgChangeRegistrationTransfer
>
updateTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
);
List
<
JgChangeRegistrationTransfer
Dto
>
updateTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
);
List
<
JgChangeRegistrationTransfer
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
);
List
<
JgChangeRegistrationTransfer
Dto
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
);
boolean
deleteBatchBySequenceNbrs
(
Long
[]
sequenceNbrs
);
boolean
deleteBatchBySequenceNbrs
(
Long
[]
sequenceNbrs
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgMaintainNoticeService.java
View file @
c296d447
...
@@ -65,4 +65,6 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
...
@@ -65,4 +65,6 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
* @return pdf文件路径
* @return pdf文件路径
*/
*/
String
generateMaintainNoticeReport
(
Long
sequenceNbr
);
String
generateMaintainNoticeReport
(
Long
sequenceNbr
);
boolean
deleteBySequenceNbr
(
Long
[]
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationReformMapper.xml
View file @
c296d447
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME
,use.STREET_NAME,use.ADDRESS
) as place,
ifnull(ur.instance_id, '') as instanceId,
ifnull(ur.instance_id, '') as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME
,use.STREET_NAME,use.ADDRESS
) as place,
ifnull(ur.instance_id, '') as instanceId,
ifnull(ur.instance_id, '') as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationTransferMapper.xml
View file @
c296d447
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
crt.use_registration_code as useRegistrationCode,
crt.use_registration_code as useRegistrationCode,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.create_user_id as createUserId,
crt.create_user_id as createUserId,
crt.full_address as allAddress,
use.USE_UNIT_NAME as useUnitName,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as allAddress,
crteq.equ_id as equipId
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
c296d447
...
@@ -22,14 +22,16 @@
...
@@ -22,14 +22,16 @@
isn.promoter,
isn.promoter,
isn.next_execute_ids AS nextExecuteIds,
isn.next_execute_ids AS nextExecuteIds,
isn.instance_status AS instanceStatus,
isn.instance_status AS instanceStatus,
isn.equ_address AS equAddress,
<!-- isn.equ_address AS equAddress,-->
isn.handle_date AS handleDate,
isn.handle_date AS handleDate,
isn.equ_list AS equList,
isn.equ_list AS equList,
isn.notice_report_url AS noticeReportUrl,
isn.notice_report_url AS noticeReportUrl,
isn.create_user_id as createUserId,
isn.create_user_id as createUserId,
isn.next_execute_user_ids as nextExecuteUserIds
isn.next_execute_user_ids as nextExecuteUserIds,
FROM
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress
tzs_jg_installation_notice isn
FROM tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD
<where>
<where>
isn.is_delete = false
isn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
c296d447
...
@@ -8,7 +8,14 @@
...
@@ -8,7 +8,14 @@
</update>
</update>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
select isn.* FROM tzs_jg_maintain_notice isn
select
isn.*,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as fullAddress,
ibjoi.SUPERVISORY_CODE as supervisoryCode
FROM tzs_jg_maintain_notice isn
left join tzs_jg_maintain_notice_eq isneq on isn.sequence_nbr = isneq.equip_transfer_id
LEFT JOIN idx_biz_jg_use_info ibjui on isneq.equ_id = ibjui.RECORD
LEFT JOIN idx_biz_jg_other_info ibjoi on isneq.equ_id = ibjoi.RECORD
<where>
<where>
isn.is_delete = 0
isn.is_delete = 0
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
c296d447
...
@@ -192,6 +192,7 @@
...
@@ -192,6 +192,7 @@
jui.USE_INNER_CODE,
jui.USE_INNER_CODE,
jfi.FACTORY_NUM,
jfi.FACTORY_NUM,
jui.ADDRESS as ADDRESS,
jui.ADDRESS as ADDRESS,
jui.RECORD record,
jri.EQU_DEFINE,
jri.EQU_DEFINE,
jri.PRODUCT_NAME,
jri.PRODUCT_NAME,
jri.EQU_CODE,
jri.EQU_CODE,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
c296d447
...
@@ -26,12 +26,16 @@
...
@@ -26,12 +26,16 @@
ec."name" AS equipCateName,
ec."name" AS equipCateName,
tjtn.handle_date AS handleDate,
tjtn.handle_date AS handleDate,
tjtn.create_user_id as createUserId,
tjtn.create_user_id as createUserId,
tjtn.next_execute_user_ids as nextExecuteUserIds
tjtn.next_execute_user_ids as nextExecuteUserIds,
oi.SUPERVISORY_CODE as supervisoryCode,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress
FROM
FROM
tzs_jg_transfer_notice tjtn
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN tz_equipment_category ec ON ec.code = ri.equ_category
LEFT JOIN tz_equipment_category ec ON ec.code = ri.equ_category
LEFT JOIN idx_biz_jg_use_info ibjui on re.equ_id = ibjui.RECORD
left join idx_biz_jg_other_info oi on oi.RECORD = re.equ_id
<where>
<where>
tjtn.is_delete = false
tjtn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param != null "
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
c296d447
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
-- concat(use.PROVINCE_NAME,use.CITY_NAME,use.COUNTY_NAME) as place,
ur.use_address as place,
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
@@ -125,7 +126,9 @@
...
@@ -125,7 +126,9 @@
PROVINCE as province,
PROVINCE as province,
CITY as city,
CITY as city,
COUNTY as county,
COUNTY as county,
USE_INNER_CODE as useInnerCode
USE_INNER_CODE as useInnerCode,
LONGITUDE_LATITUDE as longitudeLatitude,
FACTORY_USE_SITE_STREET as factoryUseSiteStreet
FROM "idx_biz_jg_use_info" where RECORD = #{id}
FROM "idx_biz_jg_use_info" where RECORD = #{id}
</select>
</select>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
<select
id=
"getEquipListPage"
resultType=
"java.util.Map"
>
...
@@ -178,7 +181,8 @@
...
@@ -178,7 +181,8 @@
jri.PRODUCT_NAME as productName,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME, use.CITY_NAME, use.COUNTY_NAME) as place,
-- concat(use.PROVINCE_NAME, use.CITY_NAME, use.COUNTY_NAME) as place,
ur.use_address as place,
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
...
@@ -188,7 +192,8 @@
...
@@ -188,7 +192,8 @@
ur.use_registration_code as useRegistrationCode,
ur.use_registration_code as useRegistrationCode,
date_format(ur.audit_pass_date, '%Y-%m-%d') as auditPassDate,
date_format(ur.audit_pass_date, '%Y-%m-%d') as auditPassDate,
ur.receive_org_name as receiveOrgName,
ur.receive_org_name as receiveOrgName,
ur.next_execute_user_ids as nextExecuteUserIds
ur.next_execute_user_ids as nextExecuteUserIds,
ur.is_xixian as isXixian
from tzs_jg_use_registration ur
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
c296d447
...
@@ -193,4 +193,17 @@ public class CommonController extends BaseController {
...
@@ -193,4 +193,17 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
/**
* 获取当前登录人企业类型
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人企业类型"
,
notes
=
"获取当前登录人企业类型"
)
public
ResponseModel
<
Object
>
getCompanyType
()
{
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
getCompanyType
());
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainNoticeController.java
View file @
c296d447
...
@@ -81,7 +81,7 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -81,7 +81,7 @@ public class JgMaintainNoticeController extends BaseController {
@DeleteMapping
(
value
=
"/delete"
)
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除维修告知"
,
notes
=
"根据sequenceNbr删除维修告知"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除维修告知"
,
notes
=
"根据sequenceNbr删除维修告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
deleteBySequenceNbr
(
sequenceNbr
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgUseInfoService.java
View file @
c296d447
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
java.util.List
;
/**
/**
* 使用信息表接口类
* 使用信息表接口类
*
*
...
@@ -14,4 +16,6 @@ public interface IIdxBizJgUseInfoService {
...
@@ -14,4 +16,6 @@ public interface IIdxBizJgUseInfoService {
boolean
saveOrUpdateData
(
IdxBizJgUseInfo
useInfo
);
boolean
saveOrUpdateData
(
IdxBizJgUseInfo
useInfo
);
IdxBizJgUseInfo
getOneData
(
String
record
);
IdxBizJgUseInfo
getOneData
(
String
record
);
List
<
IdxBizJgUseInfo
>
getUseInfoListByEquIds
(
List
<
String
>
equIds
);
}
}
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 @
c296d447
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
...
@@ -12,9 +11,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...
@@ -12,9 +11,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
...
@@ -142,8 +140,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -142,8 +140,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
JgInstallationNoticeEqServiceImpl
jgInstallationNoticeEqServiceImpl
;
private
JgInstallationNoticeEqServiceImpl
jgInstallationNoticeEqServiceImpl
;
@Autowired
@Autowired
private
JgUseRegistrationEqServiceImpl
jgUseRegistrationEqServiceImpl
;
private
JgUseRegistrationEqServiceImpl
jgUseRegistrationEqServiceImpl
;
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
/**
/**
* 设备注册信息
* 设备注册信息
...
@@ -1072,18 +1070,50 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1072,18 +1070,50 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
String
status
=
ConstructionEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
dto2
.
put
(
CONSTRUCTIONTYPE
,
status
);
}
}
dto2
.
put
(
"record"
,
dto2
.
get
(
"SEQUENCE_NBR"
));
list
.
add
(
dto2
);
}
// 获取所有设备的Id
List
<
String
>
equIds
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
list
)){
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
"SEQUENCE_NBR"
).
toString
()).
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
equIds
)){
//查询设备是否正在使用
//查询设备是否正在使用
//设备的使用标识是,安装告知和使用登记中有使用记录。
//设备的使用标识是,安装告知和使用登记中有使用记录。
String
equId
=
(
String
)
dto2
.
get
(
"SEQUENCE_NBR"
);
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquIds
(
equIds
);
dto2
.
put
(
"record"
,
equId
);
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquIds
(
equIds
);
List
<
JgInstallationNoticeEq
>
installationNoticeEqList
=
jgInstallationNoticeEqServiceImpl
.
getListByEquId
(
equId
);
Map
<
String
,
Boolean
>
equIsUseMap
=
new
HashMap
<>();
List
<
JgUseRegistrationEq
>
useRegistrationEqList
=
jgUseRegistrationEqServiceImpl
.
getListByEquId
(
equId
);
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
){
if
(!
ValidationUtil
.
isEmpty
(
installationNoticeEqList
)
||
!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
equIsUseMap
.
putAll
(
installationNoticeEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgInstallationNoticeEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
dto2
.
put
(
"IS_USE"
,
true
);
}
}
else
{
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationEqList
)){
dto2
.
put
(
"IS_USE"
,
false
);
equIsUseMap
.
putAll
(
useRegistrationEqList
.
stream
().
collect
(
Collectors
.
toMap
(
JgUseRegistrationEq:
:
getEquId
,
obj
->
true
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
idxBizJgUseInfoService
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
)){
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
useInfo
->
{
String
fulladdress
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
fulladdress
+=
useInfo
.
getProvinceName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
fulladdress
+=
useInfo
.
getCityName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
fulladdress
+=
useInfo
.
getCountyName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
fulladdress
+=
useInfo
.
getStreetName
();
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
fulladdress
+=
useInfo
.
getAddress
();
return
fulladdress
;
}
)
);
}
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
){
Boolean
isUse
=
equIsUseMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
"SEQUENCE_NBR"
));
item
.
put
(
"IS_USE"
,
!
ValidationUtil
.
isEmpty
(
isUse
)
?
isUse
?
isUse
:
false
:
false
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
}
}
list
.
add
(
dto2
);
}
}
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
result
.
setRecords
(
list
);
result
.
setRecords
(
list
);
...
@@ -1129,11 +1159,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1129,11 +1159,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String
operateType
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
"SEQUENCE_NBR"
))
?
OPERATESAVE
:
OPERATEEDIT
;
String
operateType
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
"SEQUENCE_NBR"
))
?
OPERATESAVE
:
OPERATEEDIT
;
record
=
OPERATESAVE
.
equals
(
operateType
)
?
UUID
.
randomUUID
().
toString
()
:
equipmentInfoForm
.
get
(
"RECORD"
).
toString
();
record
=
OPERATESAVE
.
equals
(
operateType
)
?
UUID
.
randomUUID
().
toString
()
:
equipmentInfoForm
.
get
(
"RECORD"
).
toString
();
// 单位类型
Map
<
String
,
Object
>
companyType
=
jgInstallationNoticeService
.
getCompanyType
();
String
companyTypeStr
=
companyType
.
get
(
"companyType"
).
toString
();
//使用信息
//使用信息
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgUseInfo
.
class
);
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgUseInfo
.
class
);
useInfo
.
setRecord
(
record
);
useInfo
.
setRecord
(
record
);
useInfo
.
setRecDate
(
date
);
useInfo
.
setRecDate
(
date
);
useInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"USEINFO_SEQ"
)));
useInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"USEINFO_SEQ"
)));
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
()))
{
useInfo
.
setUseUnitCreditCode
(
companyType
.
get
(
"creditCode"
).
toString
());
useInfo
.
setUseUnitName
(
companyType
.
get
(
"companyTypeName"
).
toString
());
}
idxBizJgUseInfoService
.
saveOrUpdateData
(
useInfo
);
idxBizJgUseInfoService
.
saveOrUpdateData
(
useInfo
);
//设计制造
//设计制造
...
@@ -1158,8 +1198,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1158,8 +1198,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgConstructionInfo
.
class
);
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgConstructionInfo
.
class
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecord
(
record
);
constructionInfo
.
setRecDate
(
date
);
constructionInfo
.
setRecDate
(
date
);
if
(
companyTypeStr
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitCreditCode
(
companyCode
);
constructionInfo
.
setUscUnitName
(
companyName
);
constructionInfo
.
setUscUnitName
(
companyName
);
}
constructionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"CONSTRUCTIONINFO_SEQ"
)));
constructionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"CONSTRUCTIONINFO_SEQ"
)));
iIdxBizJgConstructionInfoService
.
saveOrUpdateData
(
constructionInfo
);
iIdxBizJgConstructionInfoService
.
saveOrUpdateData
(
constructionInfo
);
...
...
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/IdxBizJgUseInfoServiceImpl.java
View file @
c296d447
...
@@ -3,12 +3,13 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -3,12 +3,13 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgUseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgUseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
/**
* 使用信息表服务实现类
* 使用信息表服务实现类
*
*
...
@@ -26,4 +27,11 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
...
@@ -26,4 +27,11 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
public
IdxBizJgUseInfo
getOneData
(
String
record
)
{
public
IdxBizJgUseInfo
getOneData
(
String
record
)
{
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
"RECORD"
,
record
));
return
this
.
getOne
(
new
QueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
"RECORD"
,
record
));
}
}
@Override
public
List
<
IdxBizJgUseInfo
>
getUseInfoListByEquIds
(
List
<
String
>
equIds
)
{
QueryWrapper
<
IdxBizJgUseInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
in
(
IdxBizJgUseInfo:
:
getRecord
,
equIds
);
return
list
(
queryWrapper
);
}
}
}
\ No newline at end of file
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/JgChangeRegistrationReformServiceImpl.java
View file @
c296d447
...
@@ -792,7 +792,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -792,7 +792,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
*/
*/
public
String
getSummaryInfo
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
public
String
getSummaryInfo
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
return
String
.
format
(
result
,
Optional
.
ofNullable
(
jgChangeRegistrationReform
.
getEquipListName
()).
orElse
(
"无"
),
jgChangeRegistrationReform
.
getSupervisoryCode
(
),
jgChangeRegistrationReform
.
getApplyNo
());
return
String
.
format
(
result
,
Optional
.
ofNullable
(
jgChangeRegistrationReform
.
getEquipListName
()).
orElse
(
"无"
),
Optional
.
ofNullable
(
jgChangeRegistrationReform
.
getSupervisoryCode
()).
orElse
(
"无"
),
jgChangeRegistrationReform
.
getApplyNo
());
}
}
/**
/**
...
...
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/JgChangeRegistrationTransferServiceImpl.java
View file @
c296d447
...
@@ -143,7 +143,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -143,7 +143,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param map
* @param map
* @return
* @return
*/
*/
public
List
<
JgChangeRegistrationTransfer
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
public
List
<
JgChangeRegistrationTransfer
Dto
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
if
(
ValidationUtil
.
isEmpty
(
tableData
))
{
if
(
ValidationUtil
.
isEmpty
(
tableData
))
{
...
@@ -228,6 +228,43 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -228,6 +228,43 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
oldTransfer
.
setAuditStatus
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getPass
());
oldTransfer
.
setAuditStatus
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getPass
());
oldTransfer
.
setStatus
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getPass
());
oldTransfer
.
setStatus
(
WorkFlowStatusEnum
.
TRANSFER_SUBMIT
.
getPass
());
String
fullAddress
=
""
;
String
province
=
(
String
)
tableData
.
get
(
"province"
);
String
city
=
(
String
)
tableData
.
get
(
"city"
);
String
county
=
(
String
)
tableData
.
get
(
"county"
);
String
street
=
(
String
)
tableData
.
get
(
"street"
);
String
address
=
(
String
)
tableData
.
get
(
"address"
);
// 分割省市区街道字段
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
fullAddress
+=
provinceList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
fullAddress
+=
cityList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
fullAddress
+=
countyList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
street
))
{
String
[]
streetList
=
street
.
split
(
"_"
);
if
(
streetList
.
length
>
1
)
{
fullAddress
+=
streetList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
fullAddress
+=
address
;
}
//设备移装详细地址
oldTransfer
.
setFullAddress
(
fullAddress
);
//es种查询设备信息
//es种查询设备信息
SearchRequest
request
=
new
SearchRequest
();
SearchRequest
request
=
new
SearchRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
request
.
indices
(
"idx_biz_view_jg_all"
);
...
@@ -329,7 +366,16 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -329,7 +366,16 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
modelDtos
.
add
(
dto
);
modelDtos
.
add
(
dto
);
commonService
.
buildTaskModel
(
modelDtos
);
commonService
.
buildTaskModel
(
modelDtos
);
}
}
return
Collections
.
singletonList
(
oldTransfer
);
JgChangeRegistrationTransferDto
resultDto
=
new
JgChangeRegistrationTransferDto
();
Bean
.
copyExistPropertis
(
oldTransfer
,
resultDto
);
//组装返回信息,添加设备信息的展示
resultDto
.
setEquCategory
((
String
)
tableData
.
get
(
"equCategoryDesc"
));
resultDto
.
setProductName
((
String
)
tableData
.
get
(
"productName"
));
resultDto
.
setAllAddress
(
oldTransfer
.
getFullAddress
());
resultDto
.
setEquCode
((
String
)
tableData
.
get
(
"equCode"
));
resultDto
.
setInnerCode
((
String
)
tableData
.
get
(
"useInnerCode"
));
return
Collections
.
singletonList
(
resultDto
);
}
}
/**
/**
...
@@ -338,7 +384,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -338,7 +384,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param map
* @param map
* @return
* @return
*/
*/
public
List
<
JgChangeRegistrationTransfer
>
updateTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
public
List
<
JgChangeRegistrationTransfer
Dto
>
updateTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
return
this
.
createTransfer
(
submitType
,
map
,
reginParams
);
return
this
.
createTransfer
(
submitType
,
map
,
reginParams
);
}
}
...
@@ -581,53 +627,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -581,53 +627,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*/
*/
public
Page
<
Map
<
String
,
Object
>>
queryListForPage
(
Page
<
Map
<
String
,
Object
>>
page
,
JgChangeRegistrationTransferDto
params
,
String
type
)
{
public
Page
<
Map
<
String
,
Object
>>
queryListForPage
(
Page
<
Map
<
String
,
Object
>>
page
,
JgChangeRegistrationTransferDto
params
,
String
type
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
params
,
params
.
getRoleIds
(),
type
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
params
,
params
.
getRoleIds
(),
type
);
listPage
.
getRecords
().
stream
().
forEach
(
item
->
{
// 流程未走完时,移装地址需从 历史表中获取
if
(
item
.
containsKey
(
"status"
)
&&
!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
item
.
get
(
"status"
).
toString
()))
{
String
fullAddress
=
""
;
if
(
item
.
containsKey
(
"equipId"
)
&&
item
.
containsKey
(
"applyNo"
))
{
JgRegistrationHistory
history
=
jgRegistrationHistoryService
.
getDteailByRecord
(
item
.
get
(
"equipId"
).
toString
(),
item
.
get
(
"applyNo"
).
toString
());
if
(!
ValidationUtil
.
isEmpty
(
history
))
{
JSONObject
newPosition
=
JSON
.
parseObject
(
history
.
getChangeData
());
String
province
=
newPosition
.
getString
(
"province"
);
String
city
=
newPosition
.
getString
(
"city"
);
String
county
=
newPosition
.
getString
(
"county"
);
String
street
=
newPosition
.
getString
(
"street"
);
String
address
=
newPosition
.
getString
(
"address"
);
// 分割省市区街道字段
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
fullAddress
+=
provinceList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
fullAddress
+=
cityList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
fullAddress
+=
countyList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
street
))
{
String
[]
streetList
=
street
.
split
(
"_"
);
if
(
streetList
.
length
>
1
)
{
fullAddress
+=
streetList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
fullAddress
+=
address
;
}
}
}
item
.
put
(
"allAddress"
,
fullAddress
);
}
});
return
listPage
;
return
listPage
;
}
}
...
@@ -755,10 +754,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -755,10 +754,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
}
//补充移装变更表
//补充移装变更表
this
.
updateTransferByBaseInfo
(
updateData
);
this
.
updateTransferByBaseInfo
(
updateData
);
//查询移装记录
JgChangeRegistrationTransfer
transfer
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
//查询修改后的新数据
JgRegistrationHistory
newData
=
jgRegistrationHistoryService
.
getDteailByRecord
(
transferEq
.
getEquId
(),
transfer
.
getApplyNo
());
//替换历史数据表和设备使用表
//替换历史数据表和设备使用表
this
.
replacementHistoryData
(
transferEq
.
getEquId
(),
sequenceNbr
,
useRegistrationCode
);
this
.
replacementHistoryData
(
transferEq
.
getEquId
(),
transfer
.
getApplyNo
(),
newData
,
useRegistrationCode
);
//更新使用注册登记证编号及ES中的信息
//更新使用注册登记证编号及ES中的信息
this
.
updataRegisterInfoAndEsData
(
transferEq
.
getEquId
(),
useRegistrationCode
);
this
.
updataRegisterInfoAndEsData
(
transferEq
.
getEquId
(),
newData
,
useRegistrationCode
);
//修改各类告知列表,置为废弃
//修改各类告知列表,置为废弃
this
.
updataInvalidStatusByHistory
(
transferEq
.
getEquId
(),
transferEq
.
getEquipTransferId
());
this
.
updataInvalidStatusByHistory
(
transferEq
.
getEquId
(),
transferEq
.
getEquipTransferId
());
}
}
...
@@ -768,14 +771,13 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -768,14 +771,13 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* 修改历史数据表和设备使用表
* 修改历史数据表和设备使用表
*
*
* @param record 设备Id
* @param record 设备Id
* @param sequenceNbr 当前单据Id
* @param applyNo 申请记录编号
* @param newData 设备移装的新数据
* @param useRegistrationCode 使用登记编号
* @param useRegistrationCode 使用登记编号
*/
*/
public
void
replacementHistoryData
(
String
record
,
String
sequenceNbr
,
String
useRegistrationCode
)
{
public
void
replacementHistoryData
(
String
record
,
String
applyNo
,
JgRegistrationHistory
newData
,
String
useRegistrationCode
)
{
JgChangeRegistrationTransfer
transfer
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
if
(!
ValidationUtil
.
isEmpty
(
transfer
))
{
if
(!
ValidationUtil
.
isEmpty
(
record
)
&&
!
ValidationUtil
.
isEmpty
(
applyNo
))
{
//查询修改后的新数据
JgRegistrationHistory
newData
=
jgRegistrationHistoryService
.
getDteailByRecord
(
record
,
transfer
.
getApplyNo
());
//查询设备旧数据
//查询设备旧数据
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOneData
(
record
);
IdxBizJgUseInfo
useInfo
=
useInfoService
.
getOneData
(
record
);
...
@@ -860,12 +862,54 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -860,12 +862,54 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param equId 设备id
* @param equId 设备id
* @param useRegistrationCode 使用注册登记证编号
* @param useRegistrationCode 使用注册登记证编号
*/
*/
public
void
updataRegisterInfoAndEsData
(
String
equId
,
String
useRegistrationCode
)
{
public
void
updataRegisterInfoAndEsData
(
String
equId
,
JgRegistrationHistory
newData
,
String
useRegistrationCode
)
{
//更新使用注册登记证编号
//更新使用注册登记证编号
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equId
,
useRegistrationCode
);
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
equId
,
useRegistrationCode
);
//获取移装新位置,更新ES
String
newUsePlace
=
""
;
String
newAddress
=
""
;
String
newLongitudeLatitude
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
newData
))
{
JSONObject
newPosition
=
JSON
.
parseObject
(
newData
.
getChangeData
());
String
province
=
newPosition
.
getString
(
"province"
);
String
city
=
newPosition
.
getString
(
"city"
);
String
county
=
newPosition
.
getString
(
"county"
);
String
address
=
newPosition
.
getString
(
"address"
);
String
longitudeLatitude
=
newPosition
.
getString
(
"longitudeLatitude"
);
// 分割省市区街道字段
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
newUsePlace
+=
provinceList
[
1
]+
"/"
;
}
}
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
newUsePlace
+=
cityList
[
1
]+
"/"
;
}
}
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
newUsePlace
+=
countyList
[
1
];
}
}
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
newAddress
=
address
;
}
if
(!
ObjectUtils
.
isEmpty
(
longitudeLatitude
))
{
newLongitudeLatitude
=
longitudeLatitude
;
}
}
//es中的编号信息
//es中的编号信息
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"USE_PLACE"
,
newUsePlace
);
map1
.
put
(
"ADDRESS"
,
newAddress
);
map1
.
put
(
"LONGITUDE_LATITUDE"
,
newLongitudeLatitude
);
map1
.
put
(
"USE_ORG_CODE"
,
useRegistrationCode
);
map1
.
put
(
"USE_ORG_CODE"
,
useRegistrationCode
);
resultMap
.
put
(
equId
,
map1
);
resultMap
.
put
(
equId
,
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
...
@@ -1105,7 +1149,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -1105,7 +1149,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*/
*/
public
String
getSummaryInfo
(
JgChangeRegistrationTransfer
transfer
)
{
public
String
getSummaryInfo
(
JgChangeRegistrationTransfer
transfer
)
{
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
String
result
=
"来自%s【%s】的业务办理,【申请单号:%s】"
;
return
String
.
format
(
result
,
Optional
.
ofNullable
(
transfer
.
getEquipListName
()).
orElse
(
"无"
),
transfer
.
getSupervisoryCode
(),
transfer
.
getApplyNo
(
));
return
String
.
format
(
result
,
Optional
.
ofNullable
(
transfer
.
getEquipListName
()).
orElse
(
"无"
),
Optional
.
ofNullable
(
transfer
.
getSupervisoryCode
()).
orElse
(
"无"
),
Optional
.
ofNullable
(
transfer
.
getApplyNo
()).
orElse
(
"无"
));
}
}
public
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationTransfer
contract
)
{
public
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationTransfer
contract
)
{
...
...
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/JgEnableDisableServiceImpl.java
View file @
c296d447
...
@@ -589,6 +589,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -589,6 +589,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
LambdaQueryWrapper
<
JgEnableDisableEq
>
lambda
=
new
QueryWrapper
<
JgEnableDisableEq
>().
lambda
();
LambdaQueryWrapper
<
JgEnableDisableEq
>
lambda
=
new
QueryWrapper
<
JgEnableDisableEq
>().
lambda
();
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
);
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
);
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
}
}
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
...
...
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/JgEquipTransferServiceImpl.java
View file @
c296d447
...
@@ -96,14 +96,15 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -96,14 +96,15 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
JgEquipTransferEq
jgEquipTransferEq
=
buildJgEquipTransferEq
(
obj
,
applyNo
);
JgEquipTransferEq
jgEquipTransferEq
=
buildJgEquipTransferEq
(
obj
,
applyNo
);
JgEquipTransfer
transfer
=
buildJgEquipTransfer
(
model
,
applyNo
,
reginParams
,
submitType
,
workflowResultList
,
i
);
JgEquipTransfer
transfer
=
buildJgEquipTransfer
(
model
,
applyNo
,
reginParams
,
submitType
,
workflowResultList
,
i
);
transfer
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
transfer
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
transfer
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
transfer
.
setEquList
(
Objects
.
toString
(
obj
.
get
(
"EQU_LIST"
),
""
));
transfer
.
setEquDefine
(
String
.
valueOf
(
obj
.
get
(
"EQU_DEFINE"
)));
transfer
.
setEquDefine
(
Objects
.
toString
(
obj
.
get
(
"EQU_DEFINE"
),
""
));
transfer
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
transfer
.
setEquCategory
(
Objects
.
toString
(
obj
.
get
(
"EQU_CATEGORY"
),
""
));
transfer
.
setProductName
(
String
.
valueOf
(
obj
.
get
(
"PRODUCT_NAME"
)));
transfer
.
setProductName
(
Objects
.
toString
(
obj
.
get
(
"PRODUCT_NAME"
),
""
));
transfer
.
setUseRegistCode
(
String
.
valueOf
(
obj
.
get
(
"USE_ORG_CODE"
)));
transfer
.
setUseRegistCode
(
Objects
.
toString
(
obj
.
get
(
"USE_ORG_CODE"
),
""
));
transfer
.
setUseInnerCode
(
String
.
valueOf
(
obj
.
get
(
"USE_INNER_CODE"
)));
transfer
.
setUseRegistCode
(
Objects
.
toString
(
obj
.
get
(
"USE_ORG_CODE"
),
""
));
transfer
.
setEquAddress
(
String
.
valueOf
(
obj
.
get
(
"ADDRESS"
)));
transfer
.
setUseInnerCode
(
Objects
.
toString
(
obj
.
get
(
"USE_INNER_CODE"
),
""
));
transfer
.
setEquCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_CODE"
)));
transfer
.
setEquAddress
(
Objects
.
toString
(
obj
.
get
(
"ADDRESS"
),
""
));
transfer
.
setEquCode
(
Objects
.
toString
(
obj
.
get
(
"EQU_CODE"
),
""
));
transferList
.
add
(
transfer
);
transferList
.
add
(
transfer
);
equipTransferEqList
.
add
(
jgEquipTransferEq
);
equipTransferEqList
.
add
(
jgEquipTransferEq
);
});
});
...
@@ -137,7 +138,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -137,7 +138,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
private
TaskModelDto
buildTempTaskModelDto
(
JgEquipTransfer
item
)
{
private
TaskModelDto
buildTempTaskModelDto
(
JgEquipTransfer
item
)
{
return
TaskModelDto
.
builder
()
return
TaskModelDto
.
builder
()
.
model
(
item
)
.
model
(
item
)
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(
),
item
.
getApplyNo
()))
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
Objects
.
toString
(
item
.
getSupervisoryCode
(),
""
),
item
.
getApplyNo
()))
.
taskCode
(
item
.
getApplyNo
())
.
taskCode
(
item
.
getApplyNo
())
.
taskType
(
BusinessTypeEnum
.
JG_EQUIPMENT_HANDOVER
.
getCode
())
.
taskType
(
BusinessTypeEnum
.
JG_EQUIPMENT_HANDOVER
.
getCode
())
.
relationId
(
item
.
getSequenceNbr
()+
""
)
.
relationId
(
item
.
getSequenceNbr
()+
""
)
...
@@ -183,8 +184,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -183,8 +184,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
.
taskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
taskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
flowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
())
.
flowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
())
.
flowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
flowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(
),
item
.
getApplyNo
()))
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
Objects
.
toString
(
item
.
getSupervisoryCode
(),
""
),
item
.
getApplyNo
()))
.
taskDesc
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(
),
item
.
getApplyNo
()))
.
taskDesc
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
Objects
.
toString
(
item
.
getSupervisoryCode
(),
""
),
item
.
getApplyNo
()))
.
startUserId
(
item
.
getCreateUserId
())
.
startUserId
(
item
.
getCreateUserId
())
.
startUser
(
item
.
getCreateUserName
())
.
startUser
(
item
.
getCreateUserName
())
.
startUserCompanyName
(
item
.
getCreateUserCompanyName
())
.
startUserCompanyName
(
item
.
getCreateUserCompanyName
())
...
...
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/JgInstallationNoticeEqServiceImpl.java
View file @
c296d447
...
@@ -32,9 +32,9 @@ public class JgInstallationNoticeEqServiceImpl extends BaseService<JgInstallatio
...
@@ -32,9 +32,9 @@ public class JgInstallationNoticeEqServiceImpl extends BaseService<JgInstallatio
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
public
List
<
JgInstallationNoticeEq
>
getListByEquId
(
String
equId
)
{
public
List
<
JgInstallationNoticeEq
>
getListByEquId
s
(
List
<
String
>
equIds
)
{
QueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
JgInstallationNoticeEq:
:
getEquId
,
equId
);
queryWrapper
.
lambda
().
in
(
JgInstallationNoticeEq:
:
getEquId
,
equIds
);
queryWrapper
.
lambda
().
eq
(
JgInstallationNoticeEq:
:
getIsDelete
,
false
);
queryWrapper
.
lambda
().
eq
(
JgInstallationNoticeEq:
:
getIsDelete
,
false
);
return
list
(
queryWrapper
);
return
list
(
queryWrapper
);
}
}
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
c296d447
...
@@ -19,8 +19,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto;
...
@@ -19,8 +19,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
...
@@ -38,17 +36,15 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.*;
...
@@ -38,17 +36,15 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
fr.opensagres.xdocreport.core.io.IOUtils
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -59,8 +55,6 @@ import org.springframework.stereotype.Service;
...
@@ -59,8 +55,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.PlatformTransactionManager
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
org.springframework.transaction.TransactionDefinition
;
import
org.springframework.transaction.TransactionDefinition
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -71,8 +65,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -71,8 +65,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -625,6 +617,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -625,6 +617,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setEquAddress
(
obj
.
getOrDefault
(
"ADDRESS"
,
""
).
toString
());
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
...
@@ -739,9 +732,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -739,9 +732,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
model
.
setInstallLeaderName
(
leaderList
[
1
]);
model
.
setInstallLeaderName
(
leaderList
[
1
]);
}
}
}
}
StringBuffer
buffer
=
new
StringBuffer
();
//
StringBuffer buffer = new StringBuffer();
buffer
.
append
(
model
.
getProvinceName
()).
append
(
model
.
getCityName
()).
append
(
model
.
getCountyName
()).
append
(
model
.
getStreetName
()).
append
(
model
.
getAddress
());
//
buffer.append(model.getProvinceName()).append(model.getCityName()).append(model.getCountyName()).append(model.getStreetName()).append(model.getAddress());
model
.
setEquAddress
(
buffer
.
toString
());
//
model.setEquAddress(buffer.toString());
}
}
...
@@ -979,7 +972,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -979,7 +972,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
result
;
return
result
;
}
}
CompanyModel
currentCompany
=
companyModels
.
get
(
0
);
CompanyModel
currentCompany
=
companyModels
.
get
(
0
);
result
.
put
(
"creditCode"
,
currentCompany
.
getCompanyCode
());
result
.
put
(
"creditCode"
,
currentCompany
.
getCompanyCode
()
.
contains
(
"_"
)
?
currentCompany
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
currentCompany
.
getCompanyCode
()
);
String
companyLevel
=
CompanyTypeEnum
.
decideCompanyLevel
(
currentCompany
.
getCompanyType
());
String
companyLevel
=
CompanyTypeEnum
.
decideCompanyLevel
(
currentCompany
.
getCompanyType
());
String
companyType
=
CompanyTypeEnum
.
decideCompanyCode
(
currentCompany
.
getCompanyType
());
String
companyType
=
CompanyTypeEnum
.
decideCompanyCode
(
currentCompany
.
getCompanyType
());
String
companyTypeName
=
CompanyTypeEnum
.
decideCompanyType
(
currentCompany
.
getCompanyType
());
String
companyTypeName
=
CompanyTypeEnum
.
decideCompanyType
(
currentCompany
.
getCompanyType
());
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
c296d447
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisableEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
...
@@ -293,7 +295,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -293,7 +295,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
Objects
.
nonNull
(
notice
.
getMaintainType
()))
{
if
(
Objects
.
nonNull
(
notice
.
getMaintainType
()))
{
noticeDto
.
setMaintainTypeDesc
(
dictionaries
.
stream
().
filter
(
d
->
notice
.
getMaintainType
().
equals
(
d
.
getCode
())).
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
joining
()));
noticeDto
.
setMaintainTypeDesc
(
dictionaries
.
stream
().
filter
(
d
->
notice
.
getMaintainType
().
equals
(
d
.
getCode
())).
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
joining
()));
}
}
noticeDto
.
setFullAddress
(
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getCountyName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
return
noticeDto
;
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
noticeDtoPage
.
setRecords
(
records
);
...
@@ -400,6 +401,17 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -400,6 +401,17 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
@Override
@Override
public
boolean
deleteBySequenceNbr
(
Long
[]
sequenceNbr
)
{
this
.
baseMapper
.
deleteById
(
sequenceNbr
);
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
lambda
=
new
QueryWrapper
<
JgMaintainNoticeEq
>().
lambda
();
lambda
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
sequenceNbr
);
jgMaintainNoticeEqMapper
.
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
return
true
;
}
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgMaintainNotice
>
saveNotice
(
String
submitType
,
Map
<
String
,
Object
>
jgMaintainNoticeDtoMap
,
ReginParams
reginParams
)
{
public
List
<
JgMaintainNotice
>
saveNotice
(
String
submitType
,
Map
<
String
,
Object
>
jgMaintainNoticeDtoMap
,
ReginParams
reginParams
)
{
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
c296d447
...
@@ -586,6 +586,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -586,6 +586,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
supervisoryCode
=
map
.
get
(
"SUPERVISORY_CODE"
).
toString
();
supervisoryCode
=
map
.
get
(
"SUPERVISORY_CODE"
).
toString
();
}
}
}
}
supervisoryCode
=
StringUtils
.
isEmpty
(
supervisoryCode
)
?
"无"
:
supervisoryCode
;
String
format
=
String
.
format
(
"来自%s【%s】等的业务办理,【申请单号:%s】等"
,
equList
,
supervisoryCode
,
dto
.
getApplyNo
());
String
format
=
String
.
format
(
"来自%s【%s】等的业务办理,【申请单号:%s】等"
,
equList
,
supervisoryCode
,
dto
.
getApplyNo
());
return
format
;
return
format
;
}
}
...
...
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/JgReformNoticeServiceImpl.java
View file @
c296d447
...
@@ -420,10 +420,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -420,10 +420,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
dto
.
setEquCategory
(
Objects
.
toString
(
obj
.
get
(
"EQU_CATEGORY"
),
""
));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_DEFINE"
)));
dto
.
setEquListCode
(
Objects
.
toString
(
obj
.
get
(
"EQU_DEFINE"
),
""
));
dto
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
dto
.
setSupervisoryCode
(
Objects
.
toString
(
obj
.
get
(
"SUPERVISORY_CODE"
),
""
));
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
dto
.
setEquList
(
Objects
.
toString
(
obj
.
get
(
"EQU_LIST"
),
""
));
dto
.
setFullAddress
(
Objects
.
toString
(
obj
.
get
(
"ADDRESS"
),
""
));
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
WorkflowResultDto
workflowResult
=
workflowResultList
.
get
(
i
);
WorkflowResultDto
workflowResult
=
workflowResultList
.
get
(
i
);
...
@@ -487,7 +488,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -487,7 +488,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
TaskModelDto
buildTempTaskModelDto
(
JgReformNotice
item
)
{
private
TaskModelDto
buildTempTaskModelDto
(
JgReformNotice
item
)
{
return
TaskModelDto
.
builder
()
return
TaskModelDto
.
builder
()
.
model
(
item
)
.
model
(
item
)
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(
),
item
.
getApplyNo
()))
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
Objects
.
toString
(
item
.
getSupervisoryCode
(),
""
),
item
.
getApplyNo
()))
.
taskCode
(
item
.
getApplyNo
())
.
taskCode
(
item
.
getApplyNo
())
.
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
())
.
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
())
.
relationId
(
item
.
getSequenceNbr
()+
""
)
.
relationId
(
item
.
getSequenceNbr
()+
""
)
...
@@ -812,8 +813,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -812,8 +813,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
.
taskStatusLabel
(
statusEnum
.
getName
())
.
taskStatusLabel
(
statusEnum
.
getName
())
.
flowStatus
(
statusEnum
.
getCode
())
.
flowStatus
(
statusEnum
.
getCode
())
.
flowStatusLabel
(
statusEnum
.
getName
())
.
flowStatusLabel
(
statusEnum
.
getName
())
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
transfer
.
getSupervisoryCode
(
),
transfer
.
getApplyNo
()))
.
taskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
Objects
.
toString
(
transfer
.
getSupervisoryCode
(),
""
),
transfer
.
getApplyNo
()))
.
taskDesc
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
transfer
.
getSupervisoryCode
(
),
transfer
.
getApplyNo
()))
.
taskDesc
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
Objects
.
toString
(
transfer
.
getSupervisoryCode
(),
""
),
transfer
.
getApplyNo
()))
.
startUserCompanyName
(
transfer
.
getCreateUserCompanyName
())
.
startUserCompanyName
(
transfer
.
getCreateUserCompanyName
())
.
startUserId
(
taskV2Model
.
getStartUserId
())
.
startUserId
(
taskV2Model
.
getStartUserId
())
.
startUser
(
taskV2Model
.
getStartUser
())
.
startUser
(
taskV2Model
.
getStartUser
())
...
...
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/JgScrapCancelServiceImpl.java
View file @
c296d447
...
@@ -193,7 +193,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -193,7 +193,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setProcessDefinitionKey
(
"scrapCancelNew"
);
dto
.
setProcessDefinitionKey
(
"scrapCancelNew"
);
dto
.
setBusinessKey
(
applyNoList
.
get
(
0
));
dto
.
setBusinessKey
(
applyNoList
.
get
(
0
));
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
//下一节点执行人单位(下节点接收机构code)
//
下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceiveOrgCode
());
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceiveOrgCode
());
list
.
add
(
dto
);
list
.
add
(
dto
);
...
@@ -314,9 +314,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -314,9 +314,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getSequenceNbr
,
id
);
lambda
.
eq
(
JgScrapCancel:
:
getSequenceNbr
,
id
);
JgScrapCancel
jgScrapCancel
=
this
.
baseMapper
.
selectOne
(
lambda
);
JgScrapCancel
jgScrapCancel
=
this
.
baseMapper
.
selectOne
(
lambda
);
//删除代办消息
//
删除代办消息
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancel
.
getSequenceNbr
()));
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancel
.
getSequenceNbr
()));
//更新jgScrapCancel数据
//
更新jgScrapCancel数据
jgScrapCancel
.
setIsDelete
(
true
);
jgScrapCancel
.
setIsDelete
(
true
);
this
.
updateById
(
jgScrapCancel
);
this
.
updateById
(
jgScrapCancel
);
}
}
...
@@ -324,6 +324,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -324,6 +324,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
public
JgScrapCancelDto
updateInfo
(
String
submitType
,
JgScrapCancelDto
jgScrapCancelDto
,
String
op
)
{
public
JgScrapCancelDto
updateInfo
(
String
submitType
,
JgScrapCancelDto
jgScrapCancelDto
,
String
op
)
{
if
(
Objects
.
isNull
(
jgScrapCancelDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
jgScrapCancelDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
...
@@ -335,7 +336,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -335,7 +336,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 更新并提交
// 更新并提交
// 发起流程
// 发起流程
if
(!
StringUtils
.
hasText
(
jgScrapCancelDto
.
getInstanceId
()))
{
if
(!
StringUtils
.
hasText
(
jgScrapCancelDto
.
getInstanceId
()))
{
//未进流程直接发起并执行
//
未进流程直接发起并执行
List
<
ProcessTaskDTO
>
processTasks
;
List
<
ProcessTaskDTO
>
processTasks
;
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
...
@@ -367,7 +368,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -367,7 +368,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
}
else
{
}
else
{
// 已经在流程中,执行一步
// 已经在流程中,执行一步
ProcessTaskDTO
processTaskDTO
=
submit
(
jgScrapCancelDto
.
getNextTaskId
()
);
ProcessTaskDTO
processTaskDTO
=
submit
(
jgScrapCancelDto
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
String
taskName
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
...
@@ -408,7 +409,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -408,7 +409,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgScrapCancelDto
.
setSupervisoryCode
(
supervisoryCode
);
jgScrapCancelDto
.
setSupervisoryCode
(
supervisoryCode
);
}
}
//更新操作
//
更新操作
JgScrapCancel
bean
=
new
JgScrapCancel
();
JgScrapCancel
bean
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
bean
);
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
bean
);
bean
.
setCancelCertificate
(
JSON
.
toJSONString
(
jgScrapCancelDto
.
getCancelCertificateList
()));
bean
.
setCancelCertificate
(
JSON
.
toJSONString
(
jgScrapCancelDto
.
getCancelCertificateList
()));
...
@@ -428,9 +429,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -428,9 +429,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
taskV2Model
.
setTaskDesc
(
""
);
taskV2Model
.
setTaskDesc
(
""
);
taskV2Model
.
setTaskContent
(
this
.
buildTaskContent
(
jgScrapCancelDto
.
getEquList
(),
jgScrapCancelDto
.
getSupervisoryCode
(),
jgScrapCancelDto
.
getCancelType
(),
jgScrapCancelDto
.
getApplyNo
()));
taskV2Model
.
setTaskContent
(
this
.
buildTaskContent
(
jgScrapCancelDto
.
getEquList
(),
jgScrapCancelDto
.
getSupervisoryCode
(),
jgScrapCancelDto
.
getCancelType
(),
jgScrapCancelDto
.
getApplyNo
()));
taskV2Model
.
setTaskName
(
taskName
);
taskV2Model
.
setTaskName
(
taskName
);
taskV2Model
.
setTaskDesc
(
""
);
taskV2Model
.
setTaskCode
(
jgScrapCancelDto
.
getApplyNo
());
taskV2Model
.
setTaskCode
(
jgScrapCancelDto
.
getApplyNo
());
taskV2Model
.
setExecuteUserIds
(
nextUserIds
);
taskV2Model
.
setRelationId
(
jgScrapCancelDto
.
getInstanceId
());
taskV2Model
.
setRelationId
(
jgScrapCancelDto
.
getInstanceId
());
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
taskV2Model
.
setTaskStatus
(
flowStatusEnum
.
getCode
());
taskV2Model
.
setTaskStatus
(
flowStatusEnum
.
getCode
());
...
@@ -449,6 +448,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -449,6 +448,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
modelDto
.
setNextExecuteUser
(
jgScrapCancelDto
.
getNextExecuteIds
());
modelDto
.
setNextExecuteUser
(
jgScrapCancelDto
.
getNextExecuteIds
());
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
taskMessageDto
);
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
taskMessageDto
);
taskMessageDto
.
setNextExecuteUserIds
(
null
);
modelDto
.
setModel
(
taskMessageDto
);
modelDto
.
setModel
(
taskMessageDto
);
modelDto
.
setPageType
(
this
.
getPageTypeForReject
(
operate
,
jgScrapCancelDto
.
getAuditStatus
()));
modelDto
.
setPageType
(
this
.
getPageTypeForReject
(
operate
,
jgScrapCancelDto
.
getAuditStatus
()));
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
...
@@ -490,15 +490,17 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -490,15 +490,17 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
}
}
public
ProcessTaskDTO
submit
(
String
taskId
)
{
public
ProcessTaskDTO
submit
(
JgScrapCancelDto
jgScrapCancelDto
)
{
//组装信息
JgScrapCancel
model
=
this
.
getById
(
jgScrapCancelDto
.
getSequenceNbr
());
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
jgScrapCancelDto
.
getNextTaskId
()
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceiveOrgCode
());
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
return
cmWorkflowService
.
complete
(
taskId
,
dto
);
return
cmWorkflowService
.
complete
(
jgScrapCancelDto
.
getNextTaskId
()
,
dto
);
}
}
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
...
@@ -585,7 +587,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -585,7 +587,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public
void
flowExecute
(
String
equList
,
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
String
equList
,
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
id
);
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
jgScrapCancel
.
getNextTaskId
();
String
taskId
=
jgScrapCancel
.
getNextTaskId
();
//组装信息
//
组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
taskId
);
...
@@ -596,9 +598,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -596,9 +598,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
}
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
//下一节点执行人单位(下节点接收机构code)
//
下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgScrapCancel
));
dto
.
setNextExecuteUserCompanyCode
(
this
.
getNextUserOrgCode
(
operate
,
jgScrapCancel
));
//执行流程
//
执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
dto
);
// 更新下一步执行人、创建待办
// 更新下一步执行人、创建待办
updateExecuteIds
(
equList
,
instanceId
,
id
,
operate
,
processTaskDTO
);
updateExecuteIds
(
equList
,
instanceId
,
id
,
operate
,
processTaskDTO
);
...
@@ -701,8 +703,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -701,8 +703,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
code
=
jgScrapCancel
.
getReceiveOrgCode
();
code
=
jgScrapCancel
.
getReceiveOrgCode
();
}
else
{
}
else
{
//驳回
// 驳回
if
(
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getPass
().
equals
(
jgScrapCancel
.
getAuditStatus
())
||
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getReject
().
equals
(
jgScrapCancel
.
getAuditStatus
())
||
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getRollBack
().
equals
(
jgScrapCancel
.
getAuditStatus
()))
{
if
(
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getPass
().
equals
(
jgScrapCancel
.
getAuditStatus
())
||
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getReject
().
equals
(
jgScrapCancel
.
getAuditStatus
())
||
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getRollBack
().
equals
(
jgScrapCancel
.
getAuditStatus
()))
{
code
=
jgScrapCancel
.
getUseUnitCode
();
code
=
jgScrapCancel
.
getUseUnitCode
();
}
}
}
}
...
...
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/JgTransferNoticeServiceImpl.java
View file @
c296d447
...
@@ -485,6 +485,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -485,6 +485,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
else
{
}
else
{
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
}
}
dto
.
setEquipCateName
(
obj
.
getOrDefault
(
"EQU_CATEGORY"
,
""
).
toString
());
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
dto
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
dto
.
setSupervisoryCode
(
String
.
valueOf
(
obj
.
get
(
"SUPERVISORY_CODE"
)));
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
@@ -499,6 +500,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -499,6 +500,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setEquAddress
(
obj
.
getOrDefault
(
"ADDRESS"
,
""
).
toString
());
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
...
...
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/JgUseRegistrationEqServiceImpl.java
View file @
c296d447
...
@@ -33,9 +33,9 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
...
@@ -33,9 +33,9 @@ public class JgUseRegistrationEqServiceImpl extends BaseService<JgUseRegistratio
}
}
public
List
<
JgUseRegistrationEq
>
getListByEquId
(
String
equId
)
{
public
List
<
JgUseRegistrationEq
>
getListByEquId
s
(
List
<
String
>
equIds
)
{
QueryWrapper
<
JgUseRegistrationEq
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
JgUseRegistrationEq
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
JgUseRegistrationEq:
:
getEquId
,
equId
);
queryWrapper
.
lambda
().
in
(
JgUseRegistrationEq:
:
getEquId
,
equIds
);
queryWrapper
.
lambda
().
eq
(
JgUseRegistrationEq:
:
getIsDelete
,
false
);
queryWrapper
.
lambda
().
eq
(
JgUseRegistrationEq:
:
getIsDelete
,
false
);
return
list
(
queryWrapper
);
return
list
(
queryWrapper
);
}
}
...
...
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/JgUseRegistrationServiceImpl.java
View file @
c296d447
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
...
@@ -28,10 +29,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
...
@@ -28,10 +29,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
@@ -50,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -50,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.*
;
...
@@ -63,7 +62,7 @@ import java.util.*;
...
@@ -63,7 +62,7 @@ import java.util.*;
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
@Autowired
@Autowired
private
UseInfoMapper
useInfoMapper
;
private
IdxBizJg
UseInfoMapper
useInfoMapper
;
@Autowired
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
@Autowired
...
@@ -109,13 +108,20 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -109,13 +108,20 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
map
.
remove
(
"status"
);
map
.
remove
(
"status"
);
UseInfo
useInfo
=
new
UseInfo
();
// 安全管理员
if
(
map
.
containsKey
(
"safetyManagerName"
)){
map
.
put
(
"safetyManager"
,
map
.
get
(
"safetyManagerName"
));
}
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
...
@@ -123,6 +129,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -123,6 +129,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
});
});
}
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
...
@@ -130,10 +137,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -130,10 +137,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
});
});
}
}
// 街道
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"factoryUseSiteStreet"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"factoryUseSiteStreet"
))))
{
useInfo
.
setStreetName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvinceName
(
"陕西省"
);
useInfo
.
setProvinceName
(
"陕西省"
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新使用信息
// 更新使用信息
useInfoMapper
.
update
(
useInfo
,
lambda
);
useInfoMapper
.
update
(
useInfo
,
lambda
);
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
...
@@ -146,7 +161,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -146,7 +161,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新设备使用登记证
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新es
// 更新es
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
,
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
());
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
,
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
useInfo
.
getStreetName
()
);
}
}
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
...
@@ -186,12 +201,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -186,12 +201,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setUseUnitCreditCode
(
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)));
jgUseRegistration
.
setUseUnitCreditCode
(
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)));
String
equType
=
this
.
baseMapper
.
getEquType
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
String
equType
=
this
.
baseMapper
.
getEquType
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
if
(
map
.
containsKey
(
"receiveOrgCode"
))
{
if
(
map
.
containsKey
(
"receiveOrgCode"
))
{
//
维保
单位信息
//
接收
单位信息
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
jgUseRegistration
.
setReceiveCompanyCode
(
splitMaintenanceUnitCode
[
0
]);
jgUseRegistration
.
setReceiveCompanyCode
(
splitMaintenanceUnitCode
[
0
]);
jgUseRegistration
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
jgUseRegistration
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
}
}
// 安全管理员
if
(
map
.
containsKey
(
"safetyManager"
))
{
String
[]
data
=
String
.
valueOf
(
map
.
getString
(
"safetyManager"
)).
split
(
"_"
);
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
}
// 使用单位提交
// 使用单位提交
jgUseRegistration
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgUseRegistration
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -205,8 +225,41 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -205,8 +225,41 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"isXixian"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"isXixian"
)))
{
jgUseRegistration
.
setIsXixian
(
String
.
valueOf
(
map
.
get
(
"isXixian"
)));
jgUseRegistration
.
setIsXixian
(
String
.
valueOf
(
map
.
get
(
"isXixian"
)));
}
}
// 使用地点
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
// 街道
List
<
LinkedHashMap
>
street
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"STREET"
);
jgUseRegistration
.
setUseAddress
(
"陕西省"
);
// 城市
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 区县
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
// 街道
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"factoryUseSiteStreet"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"factoryUseSiteStreet"
))))
{
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
map
.
get
(
"address"
));
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
...
@@ -437,7 +490,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -437,7 +490,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 驳回到使用单位
// 驳回到使用单位
dto
.
setNextExecuteUserCompanyCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
dto
.
setNextExecuteUserCompanyCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
}
else
{
}
else
{
dto
.
setNextExecuteUserCompanyCode
(
jgUseRegistration
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
jgUseRegistration
.
getReceive
Company
Code
());
}
}
ProcessTaskDTO
complete
=
cmWorkflowService
.
complete
(
jgUseRegistration
.
getNextTaskId
(),
dto
);
ProcessTaskDTO
complete
=
cmWorkflowService
.
complete
(
jgUseRegistration
.
getNextTaskId
(),
dto
);
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
...
@@ -539,6 +592,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -539,6 +592,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
detail
.
put
(
"longitudeLatitude"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"longitudeLatitude"
))));
return
detail
;
return
detail
;
}
}
...
@@ -683,15 +737,32 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -683,15 +737,32 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambdaOth
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambdaOth
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambdaOth
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
lambdaOth
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
lambdaOth
);
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 使用信息
// 使用信息
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJg
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
record
);
lambda
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
record
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
IdxBizJg
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
// 注册信息
// 注册信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
);
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
);
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
if
(
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquCode
()))
{
//生成设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
stringBuffer
.
append
(
registerInfo
.
getEquCategory
()).
append
(
useInfo
.
getCity
()).
append
(
ym
);
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
stringBuffer
.
toString
());
String
deviceRegistrationCode
=
responseModel
.
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
deviceRegistrationCode
))
{
registerInfo
.
setEquCode
(
deviceRegistrationCode
);
idxBizJgRegisterInfoMapper
.
updateById
(
registerInfo
);
}
}
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 生成监管码、96333码
// 生成监管码、96333码
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
useInfo
.
getCity
());
map
.
put
(
"cityCode"
,
useInfo
.
getCity
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcInspectionResult.java
View file @
c296d447
...
@@ -182,4 +182,17 @@ public class JyjcInspectionResult extends BaseEntity {
...
@@ -182,4 +182,17 @@ public class JyjcInspectionResult extends BaseEntity {
*/
*/
@TableField
(
"trace_id"
)
@TableField
(
"trace_id"
)
private
String
traceId
;
private
String
traceId
;
/**
* 检验检测单位名称(冗余)
*/
@TableField
(
value
=
"inspection_unit_name"
)
private
String
inspectionUnitName
;
/**
* 报检单位名称(冗余)
*/
@TableField
(
value
=
"application_unit_name"
)
private
String
applicationUnitName
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
c296d447
...
@@ -95,7 +95,9 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -95,7 +95,9 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"检验检测类型名称(冗余)"
)
@ApiModelProperty
(
value
=
"检验检测类型名称(冗余)"
)
private
String
inspectionTypeName
;
private
String
inspectionTypeName
;
@ApiModelProperty
(
value
=
"报检日期"
)
@ApiModelProperty
(
value
=
"报检日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
applicationDate
;
private
Date
applicationDate
;
@ApiModelProperty
(
"检验结果方式"
)
@ApiModelProperty
(
"检验结果方式"
)
...
@@ -143,10 +145,10 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -143,10 +145,10 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"设备使用地址"
)
@ApiModelProperty
(
value
=
"设备使用地址"
)
private
String
equUseAddress
;
private
String
equUseAddress
;
@ApiModelProperty
(
value
=
"检验检测单"
)
@ApiModelProperty
(
value
=
"检验检测单
位名称(冗余)
"
)
private
String
inspectionUnitName
;
private
String
inspectionUnitName
;
@ApiModelProperty
(
value
=
"报检单位"
)
@ApiModelProperty
(
value
=
"报检单位
名称(冗余)
"
)
private
String
applicationUnitName
;
private
String
applicationUnitName
;
@ApiModelProperty
(
value
=
"监管码"
)
@ApiModelProperty
(
value
=
"监管码"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
c296d447
...
@@ -61,23 +61,54 @@
...
@@ -61,23 +61,54 @@
<select
id=
"selectForPage"
<select
id=
"selectForPage"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel"
>
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel"
>
select res.sequence_nbr, res.inspection_unit_code, res.application_no, res.application_unit_code,
SELECT
res.equip_unicode, res.result_status, res.license_number, res.result_no, res.inspector, res.inner_person_code,
res.sequence_nbr,
res.inspection_conclusion, res.inspection_date, res.next_inspection_date, res.inspection_start_date,
res.inspection_unit_code,
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.remark,
res.application_no,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.application_unit_code,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name, equ_code, use_inner_code, ibjri.equ_list,
res.equip_unicode,
tec1.name equ_list_name, ibjri.equ_category , ibjoi.SUPERVISORY_CODE supervisoryCode
res.result_status,
, use_org_code, res.equ_define, ibjui.ADDRESS equUseAddress, bei.use_unit inspectionUnitName, bei1.use_unit applicationUnitName, cdb.name inspectionTypeName
res.license_number,
from tz_jyjc_inspection_result res
res.result_no,
left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.record
res.inspector,
left join idx_biz_jg_use_info ibjui on ibjui.record = res.equip_unicode
res.inner_person_code,
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
res.inspection_conclusion,
left join tz_equipment_category tec on ibjri.equ_category = tec.code
res.inspection_date,
left join tz_equipment_category tec1 on ibjri.equ_list = tec1.code
res.next_inspection_date,
left join tz_base_enterprise_info bei on res.inspection_unit_code = bei.use_code
res.inspection_start_date,
left join tz_base_enterprise_info bei1 on res.application_unit_code = bei1.use_code
res.inspection_end_date,
left join cb_data_dictionary cdb on res.inspection_type = cdb.code
res.inspection_result_summary,
res.non_conformance,
res.remark,
res.rec_user_id,
res.rec_date,
res.biz_type,
res.equ_category,
res.inspection_type,
res.inspection_type_name,
res.application_date,
res.inspection_unit_name,
res.application_unit_name,
res.inspection_type_name,
ibjui.use_unit_name,
ibjui.use_unit_credit_code,
ibjui.province_name,
ibjui.city_name,
ibjui.county_name,
ibjui.street_name,
ibjri.equ_code,
ibjui.use_inner_code,
ibjri.equ_list,
(SELECT NAME FROM tz_equipment_category WHERE code = res.equ_list) AS equ_list_name,
ibjoi.SUPERVISORY_CODE supervisoryCode,
ibjri.use_org_code,
res.equ_define,
ibjui.ADDRESS equUseAddress
FROM
tz_jyjc_inspection_result res
LEFT JOIN idx_biz_jg_other_info ibjoi ON res.equip_unicode = ibjoi.record
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = res.equip_unicode
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.record = ibjri.record
<where>
<where>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
...
@@ -86,19 +117,19 @@
...
@@ -86,19 +117,19 @@
and res.application_unit_code = #{jyjcInspectionResultModel.applicationUnitCode}
and res.application_unit_code = #{jyjcInspectionResultModel.applicationUnitCode}
</if>
</if>
<if
test=
"jyjcInspectionResultModel.useOrgCode != '' and jyjcInspectionResultModel.useOrgCode != null"
>
<if
test=
"jyjcInspectionResultModel.useOrgCode != '' and jyjcInspectionResultModel.useOrgCode != null"
>
and use_org_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%')
and
ibjri.
use_org_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.useInnerCode != '' and jyjcInspectionResultModel.useInnerCode != null"
>
<if
test=
"jyjcInspectionResultModel.useInnerCode != '' and jyjcInspectionResultModel.useInnerCode != null"
>
and use_inner_code like concat('%',#{jyjcInspectionResultModel.useInnerCode},'%')
and
ibjui.
use_inner_code like concat('%',#{jyjcInspectionResultModel.useInnerCode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.equCode != '' and jyjcInspectionResultModel.equCode != null"
>
<if
test=
"jyjcInspectionResultModel.equCode != '' and jyjcInspectionResultModel.equCode != null"
>
and equ_code like concat('%',#{jyjcInspectionResultModel.equCode},'%')
and
ibjri.
equ_code like concat('%',#{jyjcInspectionResultModel.equCode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.equipUnicode != '' and jyjcInspectionResultModel.equipUnicode != null"
>
<if
test=
"jyjcInspectionResultModel.equipUnicode != '' and jyjcInspectionResultModel.equipUnicode != null"
>
and res.equip_unicode like concat('%',#{jyjcInspectionResultModel.equipUnicode},'%')
and res.equip_unicode like concat('%',#{jyjcInspectionResultModel.equipUnicode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.equ
Category != '' and jyjcInspectionResultModel.equCategory
!= null"
>
<if
test=
"jyjcInspectionResultModel.equ
List != '' and jyjcInspectionResultModel.equList
!= null"
>
and ibjri.equ_
category = #{jyjcInspectionResultModel.equCategory
}
and ibjri.equ_
list = #{jyjcInspectionResultModel.equList
}
</if>
</if>
<if
test=
"jyjcInspectionResultModel.inspectionType != '' and jyjcInspectionResultModel.inspectionType != null"
>
<if
test=
"jyjcInspectionResultModel.inspectionType != '' and jyjcInspectionResultModel.inspectionType != null"
>
and res.inspection_type = #{jyjcInspectionResultModel.inspectionType}
and res.inspection_type = #{jyjcInspectionResultModel.inspectionType}
...
@@ -107,7 +138,7 @@
...
@@ -107,7 +138,7 @@
AND TO_DAYS(res.application_date) = TO_DAYS(#{jyjcInspectionResultModel.applicationDate})
AND TO_DAYS(res.application_date) = TO_DAYS(#{jyjcInspectionResultModel.applicationDate})
</if>
</if>
<if
test=
"jyjcInspectionResultModel.useUnitCreditCode != '' and jyjcInspectionResultModel.useUnitCreditCode != null"
>
<if
test=
"jyjcInspectionResultModel.useUnitCreditCode != '' and jyjcInspectionResultModel.useUnitCreditCode != null"
>
and use_unit_credit_code like concat('%',#{jyjcInspectionResultModel.useUnitCreditCode},'%')
and
ibjui.
use_unit_credit_code like concat('%',#{jyjcInspectionResultModel.useUnitCreditCode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null"
>
<if
test=
"jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null"
>
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
...
@@ -130,6 +161,6 @@
...
@@ -130,6 +161,6 @@
</otherwise>
</otherwise>
</choose>
</choose>
</where>
</where>
ORDER BY application_date DESC
ORDER BY
res.
application_date DESC
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
c296d447
...
@@ -12,7 +12,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -12,7 +12,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.sun.org.apache.regexp.internal.RE
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
...
@@ -113,6 +117,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -113,6 +117,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Autowired
@Autowired
TaskModelServiceImpl
taskModelService
;
TaskModelServiceImpl
taskModelService
;
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
)
{
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
...
@@ -353,6 +360,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -353,6 +360,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
@Override
public
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
public
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
// List<JyjcInspectionApplication> jyjcInspectionApplications = this.getBaseMapper().selectBatchIds(sequenceNbr);
// List<JyjcInspectionApplication> jyjcInspectionApplications = this.getBaseMapper().selectBatchIds(sequenceNbr);
...
@@ -398,6 +406,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -398,6 +406,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
@Override
public
Page
<
JyjcInspectionApplicationModel
>
queryForPageList
(
Page
<
JyjcInspectionApplication
>
page
,
JyjcInspectionApplicationModel
model
)
{
public
Page
<
JyjcInspectionApplicationModel
>
queryForPageList
(
Page
<
JyjcInspectionApplication
>
page
,
JyjcInspectionApplicationModel
model
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
...
@@ -581,17 +590,21 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -581,17 +590,21 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
for
(
int
i
=
0
;
i
<
applicationEquipModels
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
applicationEquipModels
.
size
();
i
++)
{
JyjcInspectionResult
resultModel
=
new
JyjcInspectionResult
();
JyjcInspectionResult
resultModel
=
new
JyjcInspectionResult
();
resultModel
.
setInspectionUnitCode
(
inspectionApplicationModel
.
getInspectionUnitCode
());
resultModel
.
setInspectionUnitCode
(
inspectionApplicationModel
.
getInspectionUnitCode
());
resultModel
.
setInspectionUnitName
(
inspectionApplicationModel
.
getInspectionUnitName
());
resultModel
.
setApplicationNo
(
inspectionApplicationModel
.
getApplicationNo
());
resultModel
.
setApplicationNo
(
inspectionApplicationModel
.
getApplicationNo
());
resultModel
.
setApplicationUnitCode
(
inspectionApplicationModel
.
getApplicationUnitCode
());
resultModel
.
setApplicationUnitCode
(
inspectionApplicationModel
.
getApplicationUnitCode
());
resultModel
.
setApplicationUnitName
(
inspectionApplicationModel
.
getApplicationUnitName
());
resultModel
.
setResultStatus
(
ResultStatusEnum
.
NO_RESULT
.
getCode
());
resultModel
.
setResultStatus
(
ResultStatusEnum
.
NO_RESULT
.
getCode
());
resultModel
.
setApplicationDate
(
inspectionApplicationModel
.
getApplicationDate
());
resultModel
.
setApplicationDate
(
inspectionApplicationModel
.
getApplicationDate
());
resultModel
.
setResultType
(
inspectionApplicationModel
.
getResultType
());
resultModel
.
setResultType
(
inspectionApplicationModel
.
getResultType
());
//resultModel.setResultType("input");
//resultModel.setResultType("input");
resultModel
.
setInspectionType
(
inspectionApplicationModel
.
getInspectionType
());
resultModel
.
setInspectionType
(
inspectionApplicationModel
.
getInspectionType
());
resultModel
.
setInspectionTypeName
(
this
.
getDictNameByCode
(
inspectionApplicationModel
.
getInspectionType
()));
// 解析设备
// 解析设备
resultModel
.
setBizType
(
inspectionApplicationModel
.
getBizType
());
resultModel
.
setBizType
(
inspectionApplicationModel
.
getBizType
());
resultModel
.
setResultNo
(
codes
.
get
(
i
));
resultModel
.
setResultNo
(
codes
.
get
(
i
));
resultModel
.
setEquipUnicode
(
applicationEquipModels
.
get
(
i
).
getEquipUnicode
());
//设备唯一标识
//设备唯一标识
resultModel
.
setEquipUnicode
(
applicationEquipModels
.
get
(
i
).
getEquipUnicode
());
resultModel
.
setEquDefine
(
applicationEquipModels
.
get
(
i
).
getEquDefine
());
resultModel
.
setEquDefine
(
applicationEquipModels
.
get
(
i
).
getEquDefine
());
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
...
@@ -603,6 +616,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -603,6 +616,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
JyjcInspectionApplicationHandlerFactory
.
apply
(
type
).
notifyInspectionUnit
(
thiryPartParams
);
JyjcInspectionApplicationHandlerFactory
.
apply
(
type
).
notifyInspectionUnit
(
thiryPartParams
);
}
}
private
String
getDictNameByCode
(
String
code
)
{
DataDictionary
dataDictionary
=
dataDictionaryService
.
getByCode
(
code
,
"JYJC"
);
return
dataDictionary
!=
null
?
dataDictionary
.
getName
()
:
""
;
}
/**
/**
* 退回
* 退回
*
*
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
View file @
c296d447
...
@@ -143,7 +143,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
...
@@ -143,7 +143,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
categoryOtherInfoMapper
.
selectSupervisorCodeMaxValue
().
forEach
(
vo
->
categoryOtherInfoMapper
.
selectSupervisorCodeMaxValue
().
forEach
(
vo
->
stringRedisTemplate
.
opsForValue
().
set
(
vo
.
getName
(),
String
.
valueOf
(
vo
.
getValue
())));
stringRedisTemplate
.
opsForValue
().
set
(
vo
.
getName
(),
String
.
valueOf
(
vo
.
getValue
())));
return
Long
.
parseLong
(
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
sequenceKey
)
));
return
Long
.
parseLong
(
redisTemplate
.
opsForValue
().
get
(
sequenceKey
)
==
null
?
"0"
:
redisTemplate
.
opsForValue
().
get
(
sequenceKey
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/json/equipCategory.json
View file @
c296d447
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
"type"
:
"lifting"
"type"
:
"lifting"
},
},
{
{
"name"
:
"场
内
机动车辆"
,
"name"
:
"场
(厂)内专用
机动车辆"
,
"code"
:
"5000"
,
"code"
:
"5000"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
"imageUrl"
:
"upload/tzs/common/image/监管起重机械.png"
"imageUrl"
:
"upload/tzs/common/image/监管起重机械.png"
},
},
{
{
"name"
:
"场
内
机动车辆"
,
"name"
:
"场
(厂)内专用
机动车辆"
,
"code"
:
"5000"
,
"code"
:
"5000"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
"imageUrl"
:
"upload/tzs/common/image/监管起重机械.png"
"imageUrl"
:
"upload/tzs/common/image/监管起重机械.png"
},
},
{
{
"name"
:
"场
内
机动车辆"
,
"name"
:
"场
(厂)内专用
机动车辆"
,
"code"
:
"5000"
,
"code"
:
"5000"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
"type"
:
"lifting"
"type"
:
"lifting"
},
},
{
{
"name"
:
"场
内
机动车辆"
,
"name"
:
"场
(厂)内专用
机动车辆"
,
"code"
:
"5000"
,
"code"
:
"5000"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
...
@@ -300,7 +300,7 @@
...
@@ -300,7 +300,7 @@
"type"
:
"lifting"
"type"
:
"lifting"
},
},
{
{
"name"
:
"场
内
机动车辆"
,
"name"
:
"场
(厂)内专用
机动车辆"
,
"code"
:
"5000"
,
"code"
:
"5000"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"image"
:
"upload/tzs/common/image/总览厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管厂车.png"
,
...
...
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