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
2d094de9
Commit
2d094de9
authored
Dec 21, 2023
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc):检验结果问题修复
parent
28d2fcf4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+25
-5
No files found.
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 @
2d094de9
...
...
@@ -26,10 +26,12 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultServic
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.CategoryOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
...
...
@@ -54,6 +56,7 @@ import java.util.stream.Collectors;
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_FILE_JYBG
=
"JYBG"
;
private
static
final
String
JYJC_SUBMIT_KEY
=
"inspectResult"
;
private
static
final
String
JYJC_RESULT_STATUS
=
"2"
;
...
...
@@ -88,6 +91,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
private
Sequence
sequence
;
@Autowired
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
/**
* 检验检测单位分页查询
*/
...
...
@@ -137,6 +143,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
LambdaQueryWrapper
<
JyjcInspectionResultAttachment
>
fileWrapper
=
new
LambdaQueryWrapper
<>();
fileWrapper
.
eq
(
JyjcInspectionResultAttachment:
:
getResultSeq
,
model
.
getSequenceNbr
());
List
<
JyjcInspectionResultAttachment
>
fileList
=
attachmentService
.
list
(
fileWrapper
);
JyjcInspectionResultAttachment
jybgFile
=
new
JyjcInspectionResultAttachment
();
map
.
forEach
((
k
,
v
)
->
{
if
(
k
.
contains
(
JYJC_SUBMIT_FILE_PREFIX
))
{
...
...
@@ -153,6 +160,10 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
attachmentList
.
add
(
attachment
);
if
(
k
.
contains
(
JYJC_SUBMIT_FILE_JYBG
))
{
jybgFile
.
setAttachmentUrl
(
JSON
.
toJSONString
(
map
.
get
(
k
)));
attachment
.
setAttachmentType
(
k
);
}
}
});
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
...
...
@@ -187,27 +198,36 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
model
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
extracted
(
model
,
info
);
extracted
(
model
,
info
,
jybgFile
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
}
else
{
info
=
list
.
get
(
0
);
extracted
(
model
,
info
);
extracted
(
model
,
info
,
jybgFile
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
}
return
model
;
}
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
)
{
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
,
JyjcInspectionResultAttachment
jybgFile
)
{
// 回填检验机构名称
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
model
.
getInspectionUnitCode
());
List
<
TzBaseEnterpriseInfo
>
tzBaseEnterpriseInfos
=
tzBaseEnterpriseInfoMapper
.
selectList
(
wrapper
);
if
(!
CollectionUtils
.
isEmpty
(
tzBaseEnterpriseInfos
))
{
info
.
setInspectOrgName
(
tzBaseEnterpriseInfos
.
get
(
0
).
getUseUnit
());
}
info
.
setInspectType
(
model
.
getInspectionType
());
info
.
setInspectOrgName
(
model
.
getInspectionUnitCode
());
info
.
setRecord
(
model
.
getEquipUnicode
());
info
.
setInspectDate
(
model
.
getInspectionDate
());
info
.
setInspectStaff
(
model
.
getInspector
());
info
.
setInspectReport
(
jybgFile
.
getAttachmentUrl
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
info
.
setProblemRemark
(
model
.
getNonConformance
());
info
.
setNextInspectDate
(
model
.
getNextInspectionDate
());
info
.
setSequenceCode
(
model
.
getEquipUnicode
());
info
.
setInspectOrgCode
(
model
.
get
UseUnitCred
itCode
());
info
.
setInspectOrgCode
(
model
.
get
InspectionUn
itCode
());
info
.
setInspectReportNo
(
model
.
getResultNo
());
info
.
setRecDate
(
new
Date
());
}
...
...
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