Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
1dfdfbd4
Commit
1dfdfbd4
authored
May 14, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
dev - master 12 See merge request
!331
parents
1a28f043
c8d44fa5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
12 deletions
+77
-12
DictDataVO.java
...-review/src/main/java/com/ruoyi/domain/vo/DictDataVO.java
+4
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+7
-0
ReviewEnterpriseArchiveServiceImpl.java
...uoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
+63
-10
StandardInspectionItemRelationMapper.xml
...resources/mapper/StandardInspectionItemRelationMapper.xml
+2
-1
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/DictDataVO.java
View file @
1dfdfbd4
...
@@ -6,4 +6,8 @@ import lombok.Data;
...
@@ -6,4 +6,8 @@ import lombok.Data;
public
class
DictDataVO
{
public
class
DictDataVO
{
private
Long
dictCode
;
private
Long
dictCode
;
private
String
dictValue
;
private
String
dictLabel
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
1dfdfbd4
...
@@ -246,6 +246,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -246,6 +246,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document
.
writeCell
(
item
.
getKeyPoint
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
item
.
getKeyPoint
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
});
});
}
}
if
(
view
.
getItems
().
size
()
==
0
)
{
document
.
writeCell
(
view
.
getFileName
(),
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
" "
,
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
" "
,
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
" "
,
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
document
.
writeCell
(
" "
,
Element
.
ALIGN_LEFT
,
1
,
1
,
table
);
}
}
}
document
.
addContent
(
table
);
document
.
addContent
(
table
);
// 最后结尾签字
// 最后结尾签字
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewEnterpriseArchiveServiceImpl.java
View file @
1dfdfbd4
...
@@ -21,10 +21,7 @@ import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
...
@@ -21,10 +21,7 @@ import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* @author wangfei
* @author wangfei
...
@@ -57,18 +54,74 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
...
@@ -57,18 +54,74 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
List
<
ReviewEnterpriseArchiveViewVO
>
resultList
=
new
ArrayList
<>();
List
<
ReviewEnterpriseArchiveViewVO
>
resultList
=
new
ArrayList
<>();
resultList
.
addAll
(
// 原始数据originalList
List
<
ReviewEnterpriseArchiveViewVO
>
originalList
=
new
ArrayList
<>();
if
(
task
.
getSystemReviewTaskId
()
!=
null
)
{
originalList
.
addAll
(
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getSystemReviewTaskId
()))
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getSystemReviewTaskId
()))
);
);
}
resultList
.
addAll
(
if
(
task
.
getCarReviewTaskId
()
!=
null
)
{
originalList
.
addAll
(
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getCarReviewTaskId
()))
buildReviewEnterpriseArchiveViewVO
(
archives
,
reviewEnterpriseArchiveMapper
.
findViewItemVOByTaskId
(
task
.
getCarReviewTaskId
()))
);
);
}
// 创建一个映射,将文件名作为键,将具有相同文件名的对象列表作为值
Map
<
String
,
List
<
ReviewEnterpriseArchiveViewVO
>>
map
=
new
HashMap
<>();
// 遍历原始列表,将对象合并到相应的文件名键所对应的值列表中
for
(
ReviewEnterpriseArchiveViewVO
item
:
originalList
)
{
String
fileName
=
item
.
getFileName
();
if
(!
map
.
containsKey
(
fileName
))
{
map
.
put
(
fileName
,
new
ArrayList
<>());
}
map
.
get
(
fileName
).
add
(
item
);
}
// 遍历映射中的值列表,将对象合并到结果列表中
for
(
List
<
ReviewEnterpriseArchiveViewVO
>
itemList
:
map
.
values
())
{
// 如果有多个对象,合并它们
if
(
itemList
.
size
()
>
1
)
{
ReviewEnterpriseArchiveViewVO
mergedItem
=
mergeItems
(
itemList
);
resultList
.
add
(
mergedItem
);
}
else
{
resultList
.
addAll
(
itemList
);
}
}
return
resultList
;
return
resultList
;
}
}
/**
* 合并具有相同文件名的对象
* @param itemList
* @return
*/
private
static
ReviewEnterpriseArchiveViewVO
mergeItems
(
List
<
ReviewEnterpriseArchiveViewVO
>
itemList
)
{
// 创建一个新的 ReviewEnterpriseArchiveViewVO 对象来保存合并后的结果
ReviewEnterpriseArchiveViewVO
mergedItem
=
new
ReviewEnterpriseArchiveViewVO
();
// 由于这里 items 列表需要合并,因此需要创建一个新的列表来保存合并后的结果
List
<
ReviewEnterpriseArchiveViewItemVO
>
mergedItemList
=
new
ArrayList
<>();
// 遍历 itemList 列表,将所有的 items 合并到 mergedItemList 中
for
(
ReviewEnterpriseArchiveViewVO
item
:
itemList
)
{
mergedItemList
.
addAll
(
item
.
getItems
());
}
// 将合并后的 items 设置到 mergedItem 中
mergedItem
.
setItems
(
mergedItemList
);
// 对于其他属性,这里简单地选择第一个对象中的值作为合并后的结果
mergedItem
.
setId
(
itemList
.
get
(
0
).
getId
());
mergedItem
.
setFileName
(
itemList
.
get
(
0
).
getFileName
());
return
mergedItem
;
}
@Override
@Override
public
Long
addEnterpriseArchive
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
)
{
public
Long
addEnterpriseArchive
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
)
{
...
...
quality-review/src/main/resources/mapper/StandardInspectionItemRelationMapper.xml
View file @
1dfdfbd4
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
<result
property=
"dictCode"
column=
"dict_code"
jdbcType=
"BIGINT"
/>
<result
property=
"dictCode"
column=
"dict_code"
jdbcType=
"BIGINT"
/>
</resultMap>
</resultMap>
<select
id=
"getListByStandardId"
resultType=
"com.ruoyi.domain.vo.DictDataVO"
>
<select
id=
"getListByStandardId"
resultType=
"com.ruoyi.domain.vo.DictDataVO"
>
SELECT dict_code FROM t_standard_inspection_item_relation
SELECT sir.dict_code, dict_value as dictValue, dict_label as dictLabel FROM t_standard_inspection_item_relation sir
LEFT JOIN sys_dict_data sdt on sdt.dict_code = sir.dict_code
WHERE standard_id = #{standardId}
WHERE standard_id = #{standardId}
</select>
</select>
<select
id=
"getListByStandard"
resultType=
"com.ruoyi.domain.StandardInspectionItemRelation"
>
<select
id=
"getListByStandard"
resultType=
"com.ruoyi.domain.StandardInspectionItemRelation"
>
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
1dfdfbd4
...
@@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"loginDate != null"
>
login_date = #{loginDate},
</if>
<if
test=
"loginDate != null"
>
login_date = #{loginDate},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
update_by = #{updateBy},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"signaturePicture != null"
>
signature_picture = #{signaturePicture},
</if>
<if
test=
"signaturePicture != null
and signaturePicture != ''
"
>
signature_picture = #{signaturePicture},
</if>
update_time = sysdate()
update_time = sysdate()
</set>
</set>
where user_id = #{userId}
where user_id = #{userId}
...
...
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