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
05dc3146
Commit
05dc3146
authored
Mar 13, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
4fb3b434
c66648a2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
49 deletions
+68
-49
ReviewEnterpriseArchiveMapper.java
.../java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
+1
-0
PdfTemplateManagementService.java
.../java/com/ruoyi/service/PdfTemplateManagementService.java
+0
-2
AutomobileEnterpriseServiceImpl.java
...m/ruoyi/service/impl/AutomobileEnterpriseServiceImpl.java
+18
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+39
-38
StrategyReviewSceneChangeDelete.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
+2
-2
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+1
-4
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+6
-2
ReviewEnterpriseArchiveMapper.xml
...c/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewEnterpriseArchiveMapper.java
View file @
05dc3146
...
...
@@ -21,6 +21,7 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri
List
<
ReviewEnterpriseArchive
>
findByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
// 剔除细则被删除而结果保留的数据
List
<
ReviewEnterpriseArchiveViewItemVO
>
findViewItemVOByTaskId
(
@Param
(
"taskId"
)
Long
taskId
);
Long
findFileName
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"fileName"
)
String
fileName
);
...
...
quality-review/src/main/java/com/ruoyi/service/PdfTemplateManagementService.java
View file @
05dc3146
package
com
.
ruoyi
.
service
;
import
javax.servlet.http.HttpServletResponse
;
/**
* PDF模板管理Service接口
* @author gxk
...
...
quality-review/src/main/java/com/ruoyi/service/impl/AutomobileEnterpriseServiceImpl.java
View file @
05dc3146
...
...
@@ -2,7 +2,9 @@ package com.ruoyi.service.impl;
import
java.util.List
;
import
cn.hutool.core.util.ObjUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.web.request.AutomobileEnterpriseListRequest
;
...
...
@@ -59,6 +61,14 @@ public class AutomobileEnterpriseServiceImpl extends ServiceImpl<AutomobileEnter
@Override
public
int
insertAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
)
{
// 判断企业名称是否重复
if
(
lambdaQuery
()
.
eq
(
AutomobileEnterprise:
:
getEnterpriseName
,
automobileEnterprise
.
getEnterpriseName
())
.
ne
(
ObjUtil
.
isNotEmpty
(
automobileEnterprise
.
getId
()),
AutomobileEnterprise:
:
getId
,
automobileEnterprise
.
getId
())
.
exists
()
)
{
throw
new
ServiceException
(
"企业名称已存在"
);
}
automobileEnterprise
.
setCreateTime
(
DateUtils
.
getNowDate
());
automobileEnterprise
.
setCreateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
return
automobileEnterpriseMapper
.
insert
(
automobileEnterprise
);
...
...
@@ -73,6 +83,14 @@ public class AutomobileEnterpriseServiceImpl extends ServiceImpl<AutomobileEnter
@Override
public
int
updateAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
)
{
// 判断企业名称是否重复
if
(
lambdaQuery
()
.
eq
(
AutomobileEnterprise:
:
getEnterpriseName
,
automobileEnterprise
.
getEnterpriseName
())
.
ne
(
ObjUtil
.
isNotEmpty
(
automobileEnterprise
.
getId
()),
AutomobileEnterprise:
:
getId
,
automobileEnterprise
.
getId
())
.
exists
()
)
{
throw
new
ServiceException
(
"企业名称已存在"
);
}
automobileEnterprise
.
setUpdateTime
(
DateUtils
.
getNowDate
());
automobileEnterprise
.
setUpdateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
return
automobileEnterpriseMapper
.
updateAutomobileEnterprise
(
automobileEnterprise
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
05dc3146
...
...
@@ -17,11 +17,9 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.lang.reflect.Field
;
import
java.util.*
;
import
java.util.List
;
...
...
@@ -62,8 +60,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
ByteArrayOutputStream
bos
=
null
;
try
{
// 模板绝对路径--服务器
// String fileName = "/template/receipt_template_02_27.pdf";
String
fileName
=
"E:/文件/PDF模板/receipt_template_02_27.pdf"
;
String
fileName
=
"/template/receipt_template_02_27.pdf"
;
// 读取现有模板内容
reader
=
new
PdfReader
(
fileName
);
// 创建输出流
...
...
@@ -102,40 +99,6 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return
uploadMinio
(
bos
,
"检验报告_"
+
taskId
);
}
private
InspectionReportPdfVO
requireData
()
{
InspectionReportPdfVO
inspectionReportPdfVO
=
InspectionReportPdfVO
.
builder
()
.
reportNumber
(
"报告编号"
)
.
productName
(
"产品名称"
)
.
productModel
(
"产品型号"
)
.
entrustedUnit
(
"委托单位"
)
.
inspectionCenterName
(
"检验中心名称"
)
.
inspectionCenterAddress
(
"检验中心地址"
)
.
inspectionCenterTelephone
(
"检验中心电话"
)
.
inspectionCenterPostcode
(
"检验中心邮编"
)
.
clientAddress
(
"委托单位地址"
)
.
entrustedUnitTelephone
(
"委托单位电话"
)
.
clientPostalCode
(
"委托单位邮编"
)
.
sampleName
(
"样品名称"
)
.
typeSpecification
(
"型号规格"
)
.
productionEnterprise
(
"生产企业"
)
.
sampleSender
(
"送养着"
)
.
sampleDeliveryDate
(
"送样日期"
)
.
sampleQuantity
(
"样品数量"
)
.
productionDate
(
"生产日期"
)
.
inspectionItem
(
"检验项目"
)
.
testConclusion
(
"检验结论"
)
.
issueDate
(
"签发日期"
)
.
remark
(
"备注"
)
.
taskNumber
(
"任务编号"
)
.
sampleSum
(
"样品数量"
)
.
vehicleType
(
"车辆类型"
)
.
vehicleModel
(
"车辆型号"
)
.
vehicleIdentificationNumber
(
"车辆识别码"
)
.
sampleNumberSummary
(
"样品编号汇总"
)
.
build
();
return
inspectionReportPdfVO
;
}
/**
* 企业留档文件PDF下载
* @param taskId
...
...
@@ -232,6 +195,44 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return
StringUtils
.
format
(
"{}/{}.pdf"
,
DateUtils
.
datePath
(),
name
);
}
/**
* 模拟数据
* @return
*/
private
InspectionReportPdfVO
requireData
()
{
InspectionReportPdfVO
inspectionReportPdfVO
=
InspectionReportPdfVO
.
builder
()
.
reportNumber
(
"报告编号"
)
.
productName
(
"产品名称"
)
.
productModel
(
"产品型号"
)
.
entrustedUnit
(
"委托单位"
)
.
inspectionCenterName
(
"检验中心名称"
)
.
inspectionCenterAddress
(
"检验中心地址"
)
.
inspectionCenterTelephone
(
"检验中心电话"
)
.
inspectionCenterPostcode
(
"检验中心邮编"
)
.
clientAddress
(
"委托单位地址"
)
.
entrustedUnitTelephone
(
"委托单位电话"
)
.
clientPostalCode
(
"委托单位邮编"
)
.
sampleName
(
"样品名称"
)
.
typeSpecification
(
"型号规格"
)
.
productionEnterprise
(
"生产企业"
)
.
sampleSender
(
"送养着"
)
.
sampleDeliveryDate
(
"送样日期"
)
.
sampleQuantity
(
"样品数量"
)
.
productionDate
(
"生产日期"
)
.
inspectionItem
(
"检验项目"
)
.
testConclusion
(
"检验结论"
)
.
issueDate
(
"签发日期"
)
.
remark
(
"备注"
)
.
taskNumber
(
"任务编号"
)
.
sampleSum
(
"样品数量"
)
.
vehicleType
(
"车辆类型"
)
.
vehicleModel
(
"车辆型号"
)
.
vehicleIdentificationNumber
(
"车辆识别码"
)
.
sampleNumberSummary
(
"样品编号汇总"
)
.
build
();
return
inspectionReportPdfVO
;
}
/**
* 渲染数据
* @param fields
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
View file @
05dc3146
...
...
@@ -66,7 +66,7 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
reviewDetailsService
.
removeBatchByIds
(
reviewDetailsList
);
}
// 删除细则对应的结果
// 删除细则对应的结果
(问卷是进行中的结果)
List
<
ReviewDetailsResult
>
resultList
=
reviewDetailsResultMapper
.
findByDetailsList
(
reviewDetailsList
);
if
(
resultList
!=
null
&&
resultList
.
size
()
!=
0
)
{
reviewDetailsResultMapper
.
deleteBatchIds
(
resultList
);
...
...
@@ -85,7 +85,7 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
// 删除细则
reviewDetailsService
.
removeById
(
reviewSceneChangeTask
.
getDetailsId
());
// 删除细则对应的结果
// 删除细则对应的结果
(问卷是进行中的结果)
List
<
ReviewDetailsResult
>
resultList
=
reviewDetailsResultMapper
.
findByDetailsId
(
reviewSceneChangeTask
.
getDetailsId
());
if
(
resultList
!=
null
&&
resultList
.
size
()
!=
0
)
{
reviewDetailsResultMapper
.
deleteBatchIds
(
resultList
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
05dc3146
...
...
@@ -606,7 +606,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 体系审查
setSystemDataStatistics
(
standardTree
,
results
,
response
,
systemReviewTask
);
return
response
;
}
if
(
task
.
getCarReviewTaskId
()
!=
null
)
{
...
...
@@ -624,11 +623,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 车型审查
setCarDataStatistics
(
carStandardTree
,
carResults
,
response
,
carReviewTask
);
return
response
;
}
return
null
;
return
response
;
}
...
...
quality-review/src/main/resources/mapper/ReviewDetailsResultMapper.xml
View file @
05dc3146
...
...
@@ -39,8 +39,12 @@
WHERE passed = 0 AND task_id = #{taskId}
</select>
<select
id=
"findByDetailsList"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
FROM t_review_details_result WHERE review_details_id IN
SELECT tr.id, tr.passed, tr.comment, tr.images_url, tr.review_details_id, tr.task_id, tr.user_id, tr.user_name, tr.last_modify_time, tr.catalogue, tr.review_enterprise_archive_id
FROM t_review_details_result tr
LEFT JOIN t_system_review_task ts ON ts.id = tr.task_id
LEFT JOIN t_car_review_task tc ON tc.id = tr.task_id
WHERE (ts.task_status = 'PENDING' OR tc.task_status = 'PENDING')
AND tr.review_details_id IN
<foreach
collection=
"reviewDetailsList"
item=
"details"
open=
"("
separator=
","
close=
")"
>
#{details.id}
</foreach>
...
...
quality-review/src/main/resources/mapper/ReviewEnterpriseArchiveMapper.xml
View file @
05dc3146
...
...
@@ -34,7 +34,7 @@
LEFT JOIN t_review_keypoint keypoint ON details.review_keypoint_id = keypoint.id
LEFT JOIN t_review_standard standard ON keypoint.review_standard_id = standard.id
LEFT JOIN t_review_enterprise_archive archive ON result.review_enterprise_archive_id = archive.id
WHERE result.task_id = #{taskId};
WHERE result.task_id = #{taskId}
AND details.id IS NOT NULL
;
</select>
<select
id=
"findFileName"
resultType=
"java.lang.Long"
>
select COUNT(*) sum from t_review_enterprise_archive
...
...
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