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
ab2bdcfa
Commit
ab2bdcfa
authored
Dec 18, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
18866054
084e4e59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
14 deletions
+48
-14
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+3
-3
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+45
-11
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 @
ab2bdcfa
...
@@ -67,9 +67,9 @@ import java.text.ParseException;
...
@@ -67,9 +67,9 @@ import java.text.ParseException;
@Service
@Service
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
p
ublic
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
p
rivate
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
p
ublic
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
p
rivate
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
p
ublic
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
p
rivate
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
//西安行政区划code
//西安行政区划code
...
...
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/JyjcInspectionResultServiceImpl.java
View file @
ab2bdcfa
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
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.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -30,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -30,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
@@ -48,6 +50,9 @@ import java.util.stream.Collectors;
...
@@ -48,6 +50,9 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
JyjcInspectionResultServiceImpl
extends
BaseService
<
JyjcInspectionResultModel
,
JyjcInspectionResult
,
JyjcInspectionResultMapper
>
implements
IJyjcInspectionResultService
{
public
class
JyjcInspectionResultServiceImpl
extends
BaseService
<
JyjcInspectionResultModel
,
JyjcInspectionResult
,
JyjcInspectionResultMapper
>
implements
IJyjcInspectionResultService
{
private
static
final
String
JYJC_SUBMIT_FILE_PREFIX
=
"JYJC_"
;
private
static
final
String
JYJC_SUBMIT_KEY
=
"inspectResult"
;
@Autowired
@Autowired
private
IJyjcInspectionResultAttachmentService
iJyjcInspectionResultAttachmentService
;
private
IJyjcInspectionResultAttachmentService
iJyjcInspectionResultAttachmentService
;
...
@@ -106,32 +111,61 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -106,32 +111,61 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
Map
<
String
,
Map
<
String
,
Object
>>
tableModel
)
{
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
Map
<
String
,
Map
<
String
,
Object
>>
tableModel
)
{
Map
<
String
,
Object
>
map
=
tableModel
.
get
(
"inspectResult"
);
Map
<
String
,
Object
>
map
=
tableModel
.
get
(
JYJC_SUBMIT_KEY
);
JyjcInspectionResultModel
model
=
BeanUtil
.
mapToBean
(
map
,
JyjcInspectionResultModel
.
class
,
true
);
JyjcInspectionResultModel
model
=
BeanUtil
.
mapToBean
(
map
,
JyjcInspectionResultModel
.
class
,
true
);
// 更新结果主表
updateWithModel
(
model
);
updateWithModel
(
model
);
// 更新附件表
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
new
ArrayList
<>();
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
new
ArrayList
<>();
LambdaQueryWrapper
<
JyjcInspectionResultAttachment
>
fileWrapper
=
new
LambdaQueryWrapper
<>();
Map
<
String
,
Object
>
fileMap
=
new
HashMap
<>();
map
.
forEach
((
k
,
v
)
->
{
map
.
forEach
((
k
,
v
)
->
{
if
(
k
.
contains
(
"JYJC_"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
k
)))
{
if
(
k
.
contains
(
JYJC_SUBMIT_FILE_PREFIX
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
k
)))
{
JyjcInspectionResultAttachment
attachment
=
new
JyjcInspectionResultAttachment
();
fileWrapper
.
eq
(
JyjcInspectionResultAttachment:
:
getAttachmentType
,
k
);
attachment
.
setResultSeq
(
model
.
getSequenceNbr
());
fileWrapper
.
eq
(
JyjcInspectionResultAttachment:
:
getResultSeq
,
model
.
getSequenceNbr
());
attachment
.
setAttachmentUrl
(
JSON
.
toJSONString
(
map
.
get
(
k
)));
fileMap
.
put
(
k
,
map
.
get
(
k
));
attachment
.
setAttachmentType
(
k
);
}
attachmentList
.
add
(
attachment
);
});
List
<
JyjcInspectionResultAttachment
>
fileList
=
attachmentService
.
list
(
fileWrapper
);
fileMap
.
forEach
((
k
,
v
)
->
{
JyjcInspectionResultAttachment
attachment
=
new
JyjcInspectionResultAttachment
();
attachment
.
setResultSeq
(
model
.
getSequenceNbr
());
attachment
.
setAttachmentUrl
(
JSON
.
toJSONString
(
map
.
get
(
k
)));
attachment
.
setAttachmentType
(
k
);
// 新增时需要判断之前有就更新
if
(!
CollectionUtils
.
isEmpty
(
fileList
))
{
List
<
JyjcInspectionResultAttachment
>
collect
=
fileList
.
stream
().
filter
(
obj
->
k
.
equals
(
obj
.
getAttachmentType
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
JyjcInspectionResultAttachment
jyjcInspectionResultAttachment
=
collect
.
get
(
0
);
attachment
.
setSequenceNbr
(
jyjcInspectionResultAttachment
.
getSequenceNbr
());
}
}
}
attachmentList
.
add
(
attachment
);
});
});
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
attachmentService
.
saveBatch
(
attachmentList
);
attachmentService
.
save
OrUpdate
Batch
(
attachmentList
);
}
}
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultParamModelMap
()))
{
// 更新参数表
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultParamModelMap
())){
LambdaQueryWrapper
<
JyjcInspectionResultParam
>
paramWrapper
=
new
LambdaQueryWrapper
<>();
paramWrapper
.
eq
(
JyjcInspectionResultParam:
:
getResultSeq
,
model
.
getSequenceNbr
());
List
<
JyjcInspectionResultParam
>
params
=
resultParamService
.
list
(
paramWrapper
);
JyjcInspectionResultParam
resultParam
=
new
JyjcInspectionResultParam
();
JyjcInspectionResultParam
resultParam
=
new
JyjcInspectionResultParam
();
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
model
.
getResultParamModelMap
()));
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
model
.
getResultParamModelMap
()));
resultParamService
.
save
(
resultParam
);
if
(!
CollectionUtils
.
isEmpty
(
params
))
{
JyjcInspectionResultParam
jyjcInspectionResultParam
=
params
.
get
(
0
);
resultParam
.
setSequenceNbr
(
jyjcInspectionResultParam
.
getSequenceNbr
());
}
resultParamService
.
saveOrUpdate
(
resultParam
);
}
}
//插入操作历史记录
//插入操作历史记录
InspectionDetectionInfo
info
=
new
InspectionDetectionInfo
();
InspectionDetectionInfo
info
=
new
InspectionDetectionInfo
();
QueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
...
@@ -209,7 +243,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -209,7 +243,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
}
}
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"inspectResult"
,
map
);
resultMap
.
put
(
JYJC_SUBMIT_KEY
,
map
);
return
resultMap
;
return
resultMap
;
}
}
...
...
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