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
2afa32bd
Commit
2afa32bd
authored
Dec 25, 2023
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):安装告知补充es字段
parent
83739154
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+29
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
2afa32bd
...
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
...
...
@@ -58,6 +60,8 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
...
...
@@ -117,6 +121,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
private
DataDictionaryMapper
dataDictionaryMapper
;
@Autowired
private
RedisUtils
redisUtils
;
public
static
byte
[]
file2byte
(
File
file
)
{
...
...
@@ -153,6 +160,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"receiveOrgCreditCode"
,
notice
.
getReceiveOrgCreditCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"installLeaderId"
,
notice
.
getInstallLeaderId
()
+
"_"
+
notice
.
getInstallLeaderName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitId
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitName
()))
{
installationInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectUnitId
()
+
"_"
+
notice
.
getInspectUnitName
());
}
...
...
@@ -427,18 +435,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
return
;
throw
new
BadRequest
(
"设备列表为空"
)
;
}
// 获取告知单号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
AZGZ
.
getCode
(),
deviceList
.
size
());
if
(!
ObjectUtils
.
isEmpty
(
listResponseModel
)
&&
listResponseModel
.
getStatus
()
!=
HttpStatus
.
OK
.
value
())
{
log
.
error
(
"告知单获取失败: {}"
,
listResponseModel
.
getMessage
());
return
;
throw
new
BadRequest
(
"告知单生成失败!"
)
;
}
List
<
String
>
applyNoList
=
listResponseModel
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
log
.
error
(
"告知单返回为空"
);
throw
new
BadRequest
(
"告知单生成失败!"
);
}
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
...
...
@@ -638,6 +647,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
model
.
setInspectUnitName
(
inspectUnitIdList
[
1
]);
}
}
String
installLeaderId
=
model
.
getInstallLeaderId
();
if
(!
ObjectUtils
.
isEmpty
(
installLeaderId
))
{
String
[]
leaderList
=
installLeaderId
.
split
(
"_"
);
if
(
leaderList
.
length
>
1
)
{
model
.
setInstallLeaderId
(
leaderList
[
0
]);
model
.
setInstallLeaderName
(
leaderList
[
1
]);
}
}
}
private
String
convertImageUrl
(
List
<
Map
<
String
,
String
>>
urlList
)
{
...
...
@@ -764,13 +782,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
()
);
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map1
.
put
(
"USE_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getUseUnitCreditCode
());
map1
.
put
(
"USE_UNIT_NAME"
,
jgInstallationNotice
.
getUseUnitName
());
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
reginParams
.
getCompany
().
getCompanyCode
());
map1
.
put
(
"USC_UNIT_NAME"
,
reginParams
.
getCompany
().
getCompanyName
());
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
jgInstallationNotice
.
setPromoter
(
""
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
// 更新
维保备案
信息表
// 更新
施工
信息表
IdxBizJgConstructionInfo
idxBizJgConstructionInfo
=
constructionInfoService
.
queryNewestDetailByRecord
(
jgRelationEquip
.
getEquId
());
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgConstructionInfo
))
{
idxBizJgConstructionInfo
.
setUscUnitCreditCode
(
jgInstallationNotice
.
getInstallUnitCreditCode
());
...
...
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