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
792c9b7d
Commit
792c9b7d
authored
Dec 15, 2023
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检验检测提交查看编辑修改
parent
f8f3c3d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
12 deletions
+39
-12
JyjcInspectionResultAttachment.java
...odule/jyjc/api/entity/JyjcInspectionResultAttachment.java
+9
-0
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+0
-3
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+2
-1
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+28
-8
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcInspectionResultAttachment.java
View file @
792c9b7d
...
@@ -7,6 +7,9 @@ import lombok.Data;
...
@@ -7,6 +7,9 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
*
*
*
*
...
@@ -45,4 +48,10 @@ public class JyjcInspectionResultAttachment extends BaseEntity {
...
@@ -45,4 +48,10 @@ public class JyjcInspectionResultAttachment extends BaseEntity {
@TableField
(
"remark"
)
@TableField
(
"remark"
)
private
String
remark
;
private
String
remark
;
/**
* 附件地址
*/
@TableField
(
exist
=
false
)
private
List
<
Object
>
attachmentUrlList
;
}
}
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 @
792c9b7d
...
@@ -128,9 +128,6 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -128,9 +128,6 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
private
Map
<
String
,
Object
>
resultParamModelMap
;
private
Map
<
String
,
Object
>
resultParamModelMap
;
@ApiModelProperty
(
value
=
"检验结果附件"
)
private
List
<
Map
<
String
,
Object
>>
resultAttachmentModelList
;
@ApiModelProperty
(
value
=
"附件类型(特种设备检验报告:1,监检证书:2)"
)
@ApiModelProperty
(
value
=
"附件类型(特种设备检验报告:1,监检证书:2)"
)
private
String
attachmentType
;
private
String
attachmentType
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
792c9b7d
...
@@ -144,10 +144,11 @@ public class JyjcInspectionResultController extends BaseController {
...
@@ -144,10 +144,11 @@ public class JyjcInspectionResultController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateResult"
)
@PutMapping
(
value
=
"/updateResult"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验结果-上传结果和编辑结果"
,
notes
=
"检验结果-上传结果和编辑结果"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验结果-上传结果和编辑结果"
,
notes
=
"检验结果-上传结果和编辑结果"
)
public
ResponseModel
<
JyjcInspectionResultModel
>
updateJyjcInspectionResult
(
@RequestBody
JyjcInspectionResultModel
model
)
{
public
ResponseModel
<
JyjcInspectionResultModel
>
updateJyjcInspectionResult
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
model
)
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
updateJyjcInspectionResult
(
model
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
updateJyjcInspectionResult
(
model
));
}
}
/**
/**
* 获取设备种类列表
* 获取设备种类列表
*
*
...
...
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 @
792c9b7d
...
@@ -2,10 +2,12 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
...
@@ -2,10 +2,12 @@ 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.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.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.jyjc.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
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.JyjcInspectionResultAttachment
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
...
@@ -18,6 +20,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultServic
...
@@ -18,6 +20,7 @@ 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.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
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.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
;
...
@@ -25,6 +28,7 @@ import org.springframework.stereotype.Service;
...
@@ -25,6 +28,7 @@ import org.springframework.stereotype.Service;
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
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -89,15 +93,26 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -89,15 +93,26 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
}
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
JyjcInspectionResultModel
model
)
{
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
Map
<
String
,
Map
<
String
,
Object
>>
tableModel
)
{
Map
<
String
,
Object
>
map
=
tableModel
.
get
(
"inspectResult"
);
JyjcInspectionResultModel
model
=
BeanUtil
.
mapToBean
(
map
,
JyjcInspectionResultModel
.
class
,
true
);
updateWithModel
(
model
);
updateWithModel
(
model
);
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultAttachmentModelList
())){
JyjcInspectionResultAttachment
attachment
=
new
JyjcInspectionResultAttachment
();
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
new
ArrayList
<>();
attachment
.
setResultSeq
(
model
.
getSequenceNbr
());
map
.
forEach
((
k
,
v
)
->
{
attachment
.
setAttachmentUrl
(
JSON
.
toJSONString
(
model
.
getResultAttachmentModelList
()));
if
(
k
.
contains
(
"JYJC_"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
k
)))
{
attachment
.
setAttachmentType
(
model
.
getAttachmentType
());
JyjcInspectionResultAttachment
attachment
=
new
JyjcInspectionResultAttachment
();
attachmentService
.
save
(
attachment
);
attachment
.
setResultSeq
(
model
.
getSequenceNbr
());
attachment
.
setAttachmentUrl
(
JSON
.
toJSONString
(
map
.
get
(
k
)));
attachment
.
setAttachmentType
(
k
);
attachmentList
.
add
(
attachment
);
}
});
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
attachmentService
.
saveBatch
(
attachmentList
);
}
}
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultParamModelMap
())){
if
(!
CollectionUtils
.
isEmpty
(
model
.
getResultParamModelMap
())){
JyjcInspectionResultParam
resultParam
=
new
JyjcInspectionResultParam
();
JyjcInspectionResultParam
resultParam
=
new
JyjcInspectionResultParam
();
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
...
@@ -126,7 +141,12 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -126,7 +141,12 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
// 获取附件
// 获取附件
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
iJyjcInspectionResultAttachmentService
.
getObjByResultSeq
(
sequenceNbr
);
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
iJyjcInspectionResultAttachmentService
.
getObjByResultSeq
(
sequenceNbr
);
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
Map
<
String
,
Object
>
attachmentMap
=
attachmentList
.
stream
().
collect
(
Collectors
.
toMap
(
JyjcInspectionResultAttachment:
:
getAttachmentType
,
JyjcInspectionResultAttachment:
:
getAttachmentUrl
));
Map
<
String
,
Object
>
attachmentMap
=
attachmentList
.
stream
().
map
(
obj
->
{
if
(
StringUtil
.
isNotEmpty
(
obj
.
getAttachmentUrl
()))
{
obj
.
setAttachmentUrlList
(
JSONArray
.
parseArray
(
obj
.
getAttachmentUrl
()));
}
return
obj
;
}).
collect
(
Collectors
.
toMap
(
JyjcInspectionResultAttachment:
:
getAttachmentType
,
JyjcInspectionResultAttachment:
:
getAttachmentUrlList
));
map
.
putAll
(
attachmentMap
);
map
.
putAll
(
attachmentMap
);
}
}
...
...
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