压缩下载

This commit is contained in:
cwchen 2025-04-08 16:00:44 +08:00
parent ccf0278bd6
commit 3e09ea7d39
14 changed files with 154 additions and 45 deletions

View File

@ -22,7 +22,7 @@ public class ProClassifyStatisticDetailVo {
/**
* 违章时间/检查时间/时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date vioDate;
/**

View File

@ -26,7 +26,7 @@ public class ProClassifyStatisticsVo extends SynthesisNumVo{
private String proName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后更新时间", width = 20.0, orderNum = "8",format = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后更新时间", width = 20.0, orderNum = "8",format = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date lastUpdateTime;
}

View File

@ -69,6 +69,20 @@
1
</trim>
</insert>
<!--添加下载任务-->
<insert id="addTaskDownload">
insert into tb_download_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null and taskId != ''">task_id,</if>
<if test="nowTime != null and nowTime != ''">failure_time,</if>
<if test="filePath != null and filePath != ''">file_path,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null and taskId != ''">#{taskId},</if>
<if test="nowTime != null and nowTime != ''">#{nowTime},</if>
<if test="filePath != null and filePath != ''">#{filePath},</if>
</trim>
</insert>
<delete id="deleteComprehensiveQuery">
update tb_comprehensive_query set is_active ='0'
where id = #{id}
@ -248,7 +262,7 @@
</where>
GROUP BY tcq.pro_id
</select>
<!--项目分类统计-查看图片-->
<!--项目分类统计-查看图片详情-->
<select id="getProImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
SELECT sfr.id,
sfr.original_file_path AS originalFilePath,
@ -318,6 +332,80 @@
tcq.rect_status AS rectStatus
FROM tb_comprehensive_query tcq
<where>
<if test="searchType == 1">
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(CASE tcq.upload_type WHEN '1' THEN '安全违章' WHEN '2' THEN '质量检查' WHEN '3' THEN '安全措施落实'
WHEN '4' THEN '协调照片' WHEN '5' THEN '重要事项及宣传类' ELSE '' END,#{keyWord}) > 0 OR
INSTR(tcq.title,#{keyWord}) > 0
)
</if>
</if>
<if test="searchType == 2">
<if test="uploadType!=null and uploadType!=0">
AND tcq.upload_type = #{uploadType}
</if>
</if>
<if test="searchType == 3">
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(CASE tcq.upload_type WHEN '1' THEN '安全违章' WHEN '2' THEN '质量检查' WHEN '3' THEN '安全措施落实'
WHEN '4' THEN '协调照片' WHEN '5' THEN '重要事项及宣传类' ELSE '' END,#{keyWord}) > 0 OR
INSTR(tcq.title,#{keyWord}) > 0
)
</if>
<if test="proId!=null">
AND tcq.pro_id = #{proId}
</if>
<if test="majorId!=null">
AND tcq.major_id = #{majorId}
</if>
<if test="gxId!=null">
AND tcq.gx_id = #{gxId}
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
AND DATE_FORMAT(tcq.vio_date, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
</if>
<if test="(vioPlace!=null and vioPlace!='') or (vioDesc!=null and vioDesc!='') or (rectDesc!=null and rectDesc!='')">
<if test="vioPlace!=null and vioPlace!=''">
AND INSTR(tcq.vio_place,#{vioPlace}) > 0
</if>
<if test="vioDesc!=null and vioDesc!=''">
AND INSTR(tcq.vio_desc,#{vioDesc}) > 0
</if>
<if test="rectDesc!=null and rectDesc!=''">
AND INSTR(tcq.rect_desc,#{rectDesc}) > 0
</if>
AND tcq.upload_type = '1'
</if>
<if test="(checkPlace2!=null and checkPlace2!='') or (checkDesc2!=null and checkDesc2!='') or (rectDesc2!=null and rectDesc2!='')">
<if test="checkPlace2!=null and checkPlace2!=''">
AND INSTR(tcq.vio_place,#{checkPlace2}) > 0
</if>
<if test="checkDesc2!=null and checkDesc2!=''">
AND INSTR(tcq.vio_desc,#{checkDesc2}) > 0
</if>
<if test="rectDesc2!=null and rectDesc2!=''">
AND INSTR(tcq.rect_desc,#{rectDesc2}) > 0
</if>
AND tcq.upload_type = '2'
</if>
<if test="(checkDesc3!=null and checkDesc3!='') or (rectDesc3!=null and rectDesc3!='')">
<if test="checkDesc3!=null and checkDesc3!=''">
AND INSTR(tcq.vio_desc,#{checkDesc3}) > 0
</if>
<if test="rectDesc3!=null and rectDesc3!=''">
AND INSTR(tcq.rect_desc,#{rectDesc3}) > 0
</if>
AND tcq.upload_type = '3'
</if>
<if test="buildPlace!=null and buildPlace!=''">
AND INSTR(tcq.vio_place,#{buildPlace}) > 0 AND tcq.upload_type = '4'
</if>
<if test="title!=null and title!=''">
AND INSTR(tcq.title,#{title}) > 0 AND tcq.upload_type = '5'
</if>
</if>
<if test="roleLevel = 0 and proIds != null and proIds.size() > 0">
AND tcq.pro_id IN
<foreach collection="proIds" item="proId" open="(" separator="," close=")">
@ -361,10 +449,19 @@
<select id="findByAlbumId" resultType="com.bonus.imgTool.backstage.entity.Photo">
SELECT sfr.id AS photoId,
IF(#{type} = '1',sfr.original_file_path,sfr.watermark_file_path) AS filePath,
sfr.upload_type AS uploadType,
CASE sfr.upload_type WHEN '1' THEN '安全违章' WHEN '2' THEN '质量检查' WHEN '3' THEN '安全措施落实'
WHEN '4' THEN '协调照片' WHEN '5' THEN '重要事项及宣传类' ELSE '' END AS uploadTypeName
WHEN '4' THEN '协调照片' WHEN '5' THEN '重要事项及宣传类' ELSE '' END AS uploadTypeName,
A.dict_name AS sourceTypeName,
tcq.title
FROM tb_comprehensive_query tcq
LEFT JOIN sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND sfr.is_active = '1'
LEFT JOIN (
SELECT sd.dict_value,sd.dict_name
FROM sys_distinct sd
LEFT JOIN sys_distinct sd2 ON sd.p_id = sd2.id
WHERE sd2.dict_code = 'file_source_type' AND sd.del_flag = 0
) A ON A.dict_value = sfr.source_type
WHERE tcq.pro_id = #{proId} AND tcq.is_active = '1'
ORDER BY sfr.create_time DESC
</select>

View File

@ -80,7 +80,7 @@ body {
#batch-type-box {
width: 100%;
height: 60px;
height: 40px;
justify-content: end;
}
@ -99,7 +99,7 @@ body {
#img-box {
width: 100%;
height: calc(100% - 200px);
height: calc(100% - 180px);
}
.layui-flow-more {
@ -232,13 +232,13 @@ body {
}
.info-data2 > p:nth-child(1) {
width: 5%;
width: 8%;
color: #333;
font-weight: bold;
}
.info-data2 > p:nth-child(2) {
width: 95%;
width: 92%;
color: #333;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@ -5,6 +5,7 @@ function setParams(obj) {
let type = highSearchData.type;
if(type){
$('#pro-item').remove();
$('.photoType').remove();
}
layui.use(["form", 'laydate', 'layer'], function () {
form = layui.form;

View File

@ -67,7 +67,7 @@ function initTable(dataList, limit, page) {
return (page - 1) * limit + d.LAY_NUM;
}
},
{field: "proName", title: "项目名称", width: "21%", unresize: true, align: "center"},
{field: "proName", title: "项目名称", width: "19%", unresize: true, align: "center"},
{
field: "totalNum", title: "总照片数量", width: "8%", unresize: true, align: "center",
templet: function (d) {
@ -108,12 +108,12 @@ function initTable(dataList, limit, page) {
field: "lastUpdateTime", title: "最后更新时间", width: "14%", align: "center", templet: 'center',
},
{
title: "操作", unresize: true, width: "8%", align: "center",
title: "操作", unresize: true, width: "10%", align: "center",
templet: function (d) {
let html = '';
let view = "<a class='layui-icon layui-icon-file' style='cursor:pointer;' title='详情' onclick='viewData("+JSON.stringify(d)+")'></a>"
let originalDownload = "<a class='layui-icon layui-icon-download-circle' style='cursor:pointer;' title='原图下载' onclick='downloadFile("+JSON.stringify(d)+",1)'></a>"
let waterDownload = "<a class='layui-icon layui-icon-download-circle' style='cursor:pointer;' title='水印下载' onclick='downloadFile("+JSON.stringify(d)+",2)'></a>";
let view = "<a style='cursor:pointer;margin: 0 2px;' title='详情' onclick='viewData("+JSON.stringify(d)+")'><img src='../../img/synthesisQuery/detail-icon.png'></a>"
let originalDownload = "<a style='cursor:pointer;margin: 0 2px;' title='原图下载' onclick='downloadFile("+JSON.stringify(d)+",1)'><img src='../../img/synthesisQuery/download-icon.png'></a>"
let waterDownload = "<a style='cursor:pointer;margin: 0 2px;' title='水印下载' onclick='downloadFile("+JSON.stringify(d)+",2)'><img src='../../img/synthesisQuery/water-download-icon.png'></a>";
html = view + originalDownload + waterDownload;
return html;
}

View File

@ -181,6 +181,7 @@ function changeType(that, type) {
queryParams.pageSize = pageSize2;
}
resetData();
highSearchData = {};
searchData(queryParams);
}
@ -219,7 +220,7 @@ function initListData(list) {
setRectData(item);
} else if (item.uploadType === '2') { // 质量检测
html += "<div class='info-data2 layout'>" +
"<p>检查地点</p>" +
"<p>检查地点</p>" +
"<p>" + item.vioPlace + "</p>" +
"</div>" +
"<div class='info-data2 layout'>" +
@ -232,7 +233,7 @@ function initListData(list) {
setRectData(item);
} else if (item.uploadType === '3') { // 安全措施落实
html += "<div class='info-data2 layout'>" +
"<p>检查地点</p>" +
"<p>检查地点</p>" +
"<p>" + item.vioPlace + "</p>" +
"</div>" +
"<div class='info-data2 layout'>" +
@ -244,7 +245,7 @@ function initListData(list) {
"</div>";
} else if (item.uploadType === '4') { // 协调照片
html += "<div class='info-data2 layout'>" +
"<p>建设前描述</p>" +
"<p>建设前描述</p>" +
"<p>" + item.buildBeforeDesc + "</p>" +
"</div>" +
"<div class='info-img'>" +
@ -267,7 +268,7 @@ function initListData(list) {
} else if (item.uploadType === '5') { // 重要事项及宣传类
html += "<div class='info-data2 layout'>" +
"<p>标题</p>" +
"<p>标题</p>" +
"<p>" + item.title + "</p>" +
"</div>" +
"<div class='info-data2 layout'>" +
@ -385,19 +386,17 @@ function titleSearch() {
/*图片类型查询*/
function queryByType(that, type) {
resetData();
if (queryType === 2) {
highSearchData = {};
$(that).addClass('type-num-check');
let queryParams = {
pageNum: pageNum,
pageSize: pageSize,
queryType: queryType,
searchType: 2,
uploadType: type,
id: objParams.proId
}
searchData(queryParams);
highSearchData = {};
$(that).addClass('type-num-check');
let queryParams = {
pageNum: pageNum,
pageSize: pageSize,
queryType: queryType,
searchType: 2,
uploadType: type,
id: objParams.proId
}
searchData(queryParams);
}
/**高级筛选数据*/

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>首页</title>
</head>
<body>
</body>
</html>
<script type="text/javascript" src="../../js/libs/jquery-3.7.0.min.js"></script>
<script type="text/javascript" src="../../js/layui-v2.6.8/layui.js"></script>
<script type="text/javascript" src="../../js/publicJs.js"></script>

View File

@ -64,7 +64,7 @@
安全违章照片
</div>
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-inline photoType">
<label class="layui-form-label">类型</label>
<div class="layui-input-inline">
<input type="checkbox" name="photoType" value="1" title="违章照片">
@ -96,7 +96,7 @@
质量检查照片
</div>
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-inline photoType">
<label class="layui-form-label">类型</label>
<div class="layui-input-inline">
<input type="checkbox" name="photoType" title="缺陷照片" value="3">
@ -146,7 +146,7 @@
协调照片
</div>
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-inline photoType">
<label class="layui-form-label">类型</label>
<div class="layui-input-inline">
<input type="checkbox" name="photoType" title="建设前" value="6">

View File

@ -17,26 +17,26 @@
<body>
<div id="main-box">
<!--搜索-->
<div id="search-box">
<form class="layui-form">
<div class="layui-form-item layout">
<div id="search-box" class="layout" style="justify-content: space-between;">
<form class="layui-form" style="margin-left: 25%;" onsubmit="return false;">
<div class="layui-form-item layout" style="margin-bottom: 0;">
<div class="layui-input-group">
<input style="width: 600px;" type="text" id="keyWord" name="keyWord" placeholder="搜索标题"
autocomplete="off" class="layui-input" lay-affix="clear" maxlength="30">
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;background-color: #fff;">
<i class="layui-icon layui-icon-search" onclick="titleSearch()"></i>
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;background-color: #fff;" onclick="titleSearch()">
<i class="layui-icon layui-icon-search"></i>
</div>
</div>
<div class="layui-inline layout" style="margin-bottom: 0;cursor: pointer;" onclick="highSearch()">
<img src="../../img/synthesisQuery/high_search.png" alt="高级筛选">
<p>高级筛选</p>
</div>
<div class="layui-inline layout" style="width: 100px;justify-content: space-evenly;">
<img style="cursor: pointer;" title="按照图片类型统计" onclick="changeType(this,2)" src="../../img/synthesisQuery/photo_check.png">
<img style="cursor: pointer;" title="按照列表统计" onclick="changeType(this,3)" src="../../img/synthesisQuery/list.png">
</div>
</div>
</form>
<div class="layout" style="width: 100px;justify-content: space-evenly;">
<img style="cursor: pointer;" title="按照图片统计" onclick="changeType(this,2)" src="../../img/synthesisQuery/photo_check.png">
<img style="cursor: pointer;" title="按照列表统计" onclick="changeType(this,3)" src="../../img/synthesisQuery/list.png">
</div>
</div>
<!--各类型图片数量-->
<div id="type-num-box" class="layout">
@ -97,8 +97,8 @@
</div>
<!--批量原图下载、批量水印下载-->
<div id="batch-type-box" class="layout">
<button type="button" class="layui-btn layui-bg-blue">批量原图下载</button>
<button type="button" class="layui-btn layui-bg-blue">批量水印下载</button>
<!-- <button type="button" class="layui-btn layui-bg-blue">批量原图下载</button>-->
<!-- <button type="button" class="layui-btn layui-bg-blue">批量水印下载</button>-->
</div>
<div id="img-box">
<div class="flow-demo layout" id="ID-flow-demo">

View File

@ -23,8 +23,8 @@
<div class="layui-input-group">
<input style="width: 600px;" type="text" id="keyWord" name="keyWord" placeholder="搜索标题"
autocomplete="off" class="layui-input" lay-affix="clear" maxlength="30">
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;background-color: #fff;">
<i class="layui-icon layui-icon-search" onclick="titleSearch()"></i>
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;background-color: #fff;" onclick="titleSearch()">
<i class="layui-icon layui-icon-search"></i>
</div>
</div>
<div class="layui-inline layout" style="margin-bottom: 0;cursor: pointer;" onclick="highSearch()">