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
1d60972f
Commit
1d60972f
authored
Dec 15, 2023
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检验检测结果上传结果到安全追溯表
parent
9118fe96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+38
-3
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 @
1d60972f
...
...
@@ -3,11 +3,13 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultAttachment
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
...
...
@@ -18,9 +20,10 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttach
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
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.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
...
...
@@ -28,7 +31,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -66,6 +68,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
@Autowired
InspectionDetectionInfoServiceImpl
inspectionDetectionInfoService
;
/**
* 检验检测单位分页查询
*/
...
...
@@ -119,9 +126,37 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
model
.
getResultParamModelMap
()));
resultParamService
.
save
(
resultParam
);
}
InspectionDetectionInfo
info
=
new
InspectionDetectionInfo
();
QueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
model
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoService
.
list
(
wrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
QueryWrapper
<
CategoryOtherInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
CategoryOtherInfo:
:
getSupervisoryCode
,
model
.
getEquipUnicode
());
List
<
CategoryOtherInfo
>
otherInfos
=
categoryOtherInfoMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
otherInfos
)){
info
.
setRecord
(
otherInfos
.
get
(
0
).
getRecord
());
}
}
else
{
info
=
list
.
get
(
0
);
}
extracted
(
model
,
info
);
inspectionDetectionInfoService
.
save
(
info
);
return
model
;
}
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
)
{
info
.
setInspectType
(
model
.
getInspectionType
());
info
.
setInspectOrgName
(
model
.
getInspectionUnitCode
());
// info.setInspectReport(JSON.toJSONString(model.getResultAttachmentModelList()));
info
.
setInspectDate
(
model
.
getInspectionDate
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
info
.
setProblemRemark
(
model
.
getNonConformance
());
info
.
setNextInspectDate
(
model
.
getNextInspectionDate
());
info
.
setSequenceCode
(
model
.
getEquipUnicode
());
info
.
setInspectOrgCode
(
model
.
getUseUnitCreditCode
());
info
.
setInspectReportNo
(
model
.
getResultNo
());
}
/**
* 列表查询 示例
*/
...
...
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