Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d0f74a4d5f
|
|
@ -25,7 +25,7 @@ public class ProClassifyStatisticsVo extends SynthesisNumVo{
|
|||
@Excel(name = "工程名称", width = 30.0, orderNum = "1")
|
||||
private String proName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@Excel(name = "最后更新时间", width = 20.0, orderNum = "8",format = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date lastUpdateTime;
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ public class DownloadService {
|
|||
try {
|
||||
// 查询图片未生成水印照片的数据
|
||||
List<SynthesisQueryVo> list = Optional.ofNullable(synthesisQueryDao.generateWatermark(proId)).orElseGet(ArrayList::new);
|
||||
System.err.println("查询图片未生成水印照片的数据:" + list.size());
|
||||
List<Future> futureList = new ArrayList<>();
|
||||
List<SynthesisQueryVo> newList = new ArrayList<>();
|
||||
for (SynthesisQueryVo vo : list) {
|
||||
|
|
|
|||
|
|
@ -134,6 +134,9 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
|
|||
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getUsername(): null;
|
||||
data.setUpdateUserId(CreateUserId);
|
||||
data.setUpdateUserName(CreateUserName);
|
||||
if (data.getTime().isEmpty()){
|
||||
data.setTime(null);
|
||||
}
|
||||
importantMatterMapper.updateImportantMatter(data);
|
||||
//附件先删除,后新增
|
||||
sysFileResourceService.deleteFileResource(data.getId());
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
|
|||
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getUsername(): null;
|
||||
data.setUpdateUserId(CreateUserId);
|
||||
data.setUpdateUserName(CreateUserName);
|
||||
if (data.getCheckDate().isEmpty()){
|
||||
data.setCheckDate(null);
|
||||
}
|
||||
//修改
|
||||
safetyMeasuresMapper.updateSafetyMeasures(data);
|
||||
//附件先删除,后新增
|
||||
|
|
@ -153,6 +156,12 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
|
|||
//修改综合查询
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(data,comprehensiveQueryVo);
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (data.getCheckDate() != null && !data.getCheckDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectDate(dateFormat.parse(data.getCheckDate()));
|
||||
}
|
||||
comprehensiveQueryVo.setVioPlace(data.getCheckPlace());
|
||||
comprehensiveQueryVo.setVioDesc(data.getCheckDesc());
|
||||
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,10 @@ public class HighQualityWatermark {
|
|||
opacity = Math.max(MIN_OPACITY, Math.min(opacity, MAX_OPACITY));
|
||||
// 读取原始图片并获取其类型
|
||||
BufferedImage originalImage = ImageIO.read(new File(sourceImagePath));
|
||||
int imageType = originalImage.getTransparency() == Transparency.OPAQUE
|
||||
/*int imageType = originalImage.getTransparency() == Transparency.OPAQUE
|
||||
? BufferedImage.TYPE_INT_RGB
|
||||
: BufferedImage.TYPE_INT_ARGB;
|
||||
: BufferedImage.TYPE_INT_ARGB;*/
|
||||
int imageType = BufferedImage.TYPE_INT_RGB;
|
||||
// 创建与原始图片相同大小的新图像
|
||||
BufferedImage sourceImage = new BufferedImage(
|
||||
originalImage.getWidth(),
|
||||
|
|
@ -347,8 +348,8 @@ public class HighQualityWatermark {
|
|||
watermarkLines.add(proName.replaceAll("(.{18})", "$1@@"));
|
||||
watermarkLines.add("安全违章");
|
||||
watermarkLines.add("违章照片");
|
||||
String localPath = "C:\\Users\\10488\\Desktop\\3.jpg";
|
||||
String outPath = "C:\\Users\\10488\\Desktop\\output.jpg";
|
||||
String localPath = "C:\\Users\\10488\\Desktop\\新建文件夹 (2)\\2.png";
|
||||
String outPath = "C:\\Users\\10488\\Desktop\\output.png";
|
||||
// 添加高质量水印
|
||||
addHighQualityWatermark(localPath, outPath,
|
||||
watermarkLines, "bottom-left",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.imgTool.backstage.dao.SynthesisQueryDao">
|
||||
<insert id="addComprehensiveQuery">
|
||||
insert into tb_comprehensive_query
|
||||
|
|
@ -14,12 +14,12 @@
|
|||
<if test="gxName != null and gxName != ''">gx_name,</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">check_user_name,</if>
|
||||
<if test="vioDate != null">vio_date,</if>
|
||||
<if test="vioPlace != null and vioPlace != ''" >vio_place,</if>
|
||||
<if test="vioDesc != null and vioDesc != ''" >vio_desc,</if>
|
||||
<if test="vioPlace != null and vioPlace != ''">vio_place,</if>
|
||||
<if test="vioDesc != null and vioDesc != ''">vio_desc,</if>
|
||||
<if test="rectDate != null">rect_date,</if>
|
||||
<if test="rectUserName != null and rectUserName != ''">rect_user_name,</if>
|
||||
<if test="rectTime != null">rect_time,</if>
|
||||
<if test="rectDesc != null and rectDesc != ''" >rect_desc,</if>
|
||||
<if test="rectDesc != null and rectDesc != ''">rect_desc,</if>
|
||||
<if test="rectStatus != null">rect_status,</if>
|
||||
<if test="buildBeforeDesc != null">build_before_desc,</if>
|
||||
<if test="buildUnderDesc != null">build_under_desc,</if>
|
||||
|
|
@ -83,20 +83,23 @@
|
|||
</insert>
|
||||
|
||||
<delete id="deleteComprehensiveQuery">
|
||||
update tb_comprehensive_query set is_active ='0'
|
||||
where id = #{id} and upload_type = #{uploadType}
|
||||
update tb_comprehensive_query
|
||||
set is_active ='0'
|
||||
where id = #{id}
|
||||
and upload_type = #{uploadType}
|
||||
</delete>
|
||||
|
||||
<!--综合查询-照片综合查询-照片数量-->
|
||||
<select id="getImgNum" resultType="com.bonus.imgTool.backstage.entity.SynthesisNumVo">
|
||||
SELECT COUNT(1) AS totalNum,
|
||||
COUNT(IF(tcq.upload_type = '1', 1, NULL)) AS safetyVioNum,
|
||||
COUNT(IF(tcq.upload_type = '2', 1, NULL)) AS qualityInsNum,
|
||||
COUNT(IF(tcq.upload_type = '3', 1, NULL)) AS safetyMeasNum,
|
||||
COUNT(IF(tcq.upload_type = '4', 1, NULL)) AS coordinatedPhotoNum,
|
||||
COUNT(IF(tcq.upload_type = '5', 1, NULL)) AS importIssuesAndPublicityNum
|
||||
COUNT(IF(tcq.upload_type = '1', 1, NULL)) AS safetyVioNum,
|
||||
COUNT(IF(tcq.upload_type = '2', 1, NULL)) AS qualityInsNum,
|
||||
COUNT(IF(tcq.upload_type = '3', 1, NULL)) AS safetyMeasNum,
|
||||
COUNT(IF(tcq.upload_type = '4', 1, NULL)) AS coordinatedPhotoNum,
|
||||
COUNT(IF(tcq.upload_type = '5', 1, NULL)) AS importIssuesAndPublicityNum
|
||||
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 sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND
|
||||
sfr.is_active = '1'
|
||||
WHERE tcq.is_active = '1'
|
||||
<if test="roleLevel = '0' and proIds != null and proIds.size() > 0">
|
||||
AND tcq.pro_id IN
|
||||
|
|
@ -111,27 +114,28 @@
|
|||
|
||||
<!--照片综合查询-->
|
||||
<select id="getImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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 sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND
|
||||
sfr.is_active = '1'
|
||||
LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{userId}
|
||||
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
|
||||
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>
|
||||
<if test="queryType == 1">
|
||||
|
|
@ -230,7 +234,9 @@
|
|||
</select>
|
||||
<!--获取水印照片地址-->
|
||||
<select id="getSyData" resultType="java.lang.String">
|
||||
SELECT watermark_file_path FROM sys_file_resource WHERE id = #{id}
|
||||
SELECT watermark_file_path
|
||||
FROM sys_file_resource
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
<!--项目分类统计-->
|
||||
<select id="getProClassifyStatisticsList"
|
||||
|
|
@ -246,7 +252,8 @@
|
|||
MAX(sfr.create_time) AS lastUpdateTime
|
||||
FROM tb_comprehensive_query tcq
|
||||
LEFT JOIN tb_project tp ON tcq.pro_id = tp.id
|
||||
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 sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND
|
||||
sfr.is_active = '1'
|
||||
<where>
|
||||
<if test="roleLevel = '0' and proIds != null and proIds.size() > 0">
|
||||
AND tcq.pro_id IN
|
||||
|
|
@ -263,7 +270,7 @@
|
|||
</select>
|
||||
<!--项目分类统计-查看图片详情-->
|
||||
<select id="getProImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
|
|
@ -277,12 +284,13 @@
|
|||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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 sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND
|
||||
sfr.is_active = '1'
|
||||
LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{userId}
|
||||
LEFT JOIN (
|
||||
SELECT sd.dict_value,sd.dict_name
|
||||
FROM sys_distinct sd
|
||||
LEFT JOIN sys_distinct sd2 ON sd.p_id = sd2.id
|
||||
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>
|
||||
|
|
@ -421,76 +429,7 @@
|
|||
</select>
|
||||
<!--获取图片-->
|
||||
<select id="getImgs" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
sfr.source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus
|
||||
FROM sys_file_resource sfr
|
||||
LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{params.userId}
|
||||
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>
|
||||
AND sfr.source_id = #{params.id} AND sfr.upload_type = #{params.uploadType} AND sfr.source_type = #{type} AND sfr.is_active = '1'
|
||||
</where>
|
||||
</select>
|
||||
<!--查询原图/水印照片-->
|
||||
<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,
|
||||
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>
|
||||
<!--查询图片未生成水印照片的数据-->
|
||||
<select id="generateWatermark" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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' AND sfr.watermark_file_path IS NULL
|
||||
</select>
|
||||
|
||||
<select id="getPhotoImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
|
|
@ -498,29 +437,121 @@
|
|||
CASE sfr.upload_type WHEN '1' THEN '安全违章' WHEN '2' THEN '质量检查' WHEN '3' THEN '安全措施落实'
|
||||
WHEN '4' THEN '协调照片' WHEN '5' THEN '重要事项及宣传类' ELSE '' END AS uploadTypeName,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
sfr.source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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 tb_photo_collect tpc ON sfr.id = tpc.file_resource_id
|
||||
IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus
|
||||
FROM sys_file_resource sfr
|
||||
LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{params.userId}
|
||||
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 sfr.source_id = #{id} AND sfr.source_type = #{sourceType} and sfr.is_active = '1' AND tcq.is_active = '1'
|
||||
<where>
|
||||
AND sfr.source_id = #{params.id} AND sfr.upload_type = #{params.uploadType} AND sfr.source_type = #{type}
|
||||
AND sfr.is_active = '1'
|
||||
</where>
|
||||
</select>
|
||||
<!--查询原图/水印照片-->
|
||||
<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,
|
||||
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>
|
||||
<!--查询图片未生成水印照片的数据-->
|
||||
<select id="generateWatermark" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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'
|
||||
AND sfr.watermark_file_path IS NULL
|
||||
</select>
|
||||
|
||||
<select id="getPhotoImgList" resultType="com.bonus.imgTool.backstage.entity.SynthesisQueryVo">
|
||||
SELECT sfr.id,
|
||||
sfr.original_file_path AS originalFilePath,
|
||||
sfr.compress_file_path AS compressFilePath,
|
||||
sfr.watermark_file_path AS watermarkFilePath,
|
||||
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,
|
||||
sfr.create_time AS uploadTime,
|
||||
source_type AS sourceType,
|
||||
A.dict_name AS sourceTypeName,
|
||||
IF(tpc.file_resource_id IS NULL, '0', '1') AS collectStatus,
|
||||
tcq.title,
|
||||
tcq.pro_name AS proName
|
||||
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 tb_photo_collect tpc ON sfr.id = tpc.file_resource_id
|
||||
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 sfr.source_id = #{id}
|
||||
AND sfr.source_type = #{sourceType}
|
||||
and sfr.is_active = '1'
|
||||
AND tcq.is_active = '1'
|
||||
ORDER BY sfr.create_time DESC
|
||||
</select>
|
||||
<!--收藏/取消收藏图片-->
|
||||
<update id="collectData">
|
||||
<if test="collectType == 1">
|
||||
INSERT INTO tb_photo_collect (file_resource_id, collect_user_id,collect_user_name, create_user,create_user_name)
|
||||
INSERT INTO tb_photo_collect (file_resource_id, collect_user_id,collect_user_name,
|
||||
create_user,create_user_name)
|
||||
VALUES (
|
||||
#{id},#{userId},#{userName},#{userId},#{userName}
|
||||
#{id},#{userId},#{userName},#{userId},#{userName}
|
||||
)
|
||||
</if>
|
||||
<if test="collectType == 2">
|
||||
|
|
@ -529,17 +560,19 @@
|
|||
</update>
|
||||
<!--生成水印照片-->
|
||||
<update id="updateSyData">
|
||||
UPDATE sys_file_resource SET watermark_file_path = #{watermarkFilePath} WHERE id = #{id}
|
||||
UPDATE sys_file_resource
|
||||
SET watermark_file_path = #{watermarkFilePath}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateComprehensiveQuery">
|
||||
update tb_comprehensive_query
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proId != null">pro_id = #{proId},</if>
|
||||
<if test="proName != null">pro_name = #{proName},</if>
|
||||
<if test="majorId != null">major_id = #{majorId},</if>
|
||||
<if test="majorName != null">major_name = #{majorName},</if>
|
||||
<if test="gxId != null">gx_id = #{gxId},</if>
|
||||
<if test="gxName != null">gx_name = #{gxName},</if>
|
||||
major_id = #{majorId},
|
||||
major_name = #{majorName},
|
||||
gx_id = #{gxId},
|
||||
gx_name = #{gxName},
|
||||
<if test="checkUserName != null">check_user_name = #{checkUserName},</if>
|
||||
<if test="vioDate != null">vio_date = #{vioDate},</if>
|
||||
<if test="vioPlace != null">vio_place = #{vioPlace},</if>
|
||||
|
|
@ -571,6 +604,9 @@
|
|||
</update>
|
||||
<!--更新下载任务-->
|
||||
<update id="updateTaskDownload">
|
||||
UPDATE tb_download_task SET file_path = #{params.filePath},failure_time = #{nowTime} WHERE id = #{params.id}
|
||||
UPDATE tb_download_task
|
||||
SET file_path = #{params.filePath},
|
||||
failure_time = #{nowTime}
|
||||
WHERE id = #{params.id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -47,22 +47,10 @@
|
|||
</insert>
|
||||
|
||||
<update id="updateCoordinatePhoto">
|
||||
update tb_coordinate_photo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">pro_id = #{proId},</if>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
<if test="majorId != null and majorId != ''">major_id = #{majorId},</if>
|
||||
<if test="majorName != null and majorName != ''">major_name = #{majorName},</if>
|
||||
<if test="gxId != null and gxId != ''">gx_id = #{gxId},</if>
|
||||
<if test="gxName != null and gxName != ''">gx_name = #{gxName},</if>
|
||||
<if test="buildPlace != null and buildPlace != ''">build_place = #{buildPlace},</if>
|
||||
<if test="buildBeforeDesc != null ">build_before_desc = #{buildBeforeDesc},</if>
|
||||
<if test="buildUnderDesc != null ">build_under_desc = #{buildUnderDesc},</if>
|
||||
<if test="buildAfterDesc != null ">build_after_desc = #{buildAfterDesc},</if>
|
||||
<if test="updateUserId != null and updateUserId != ''">update_user_id = #{updateUserId},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name = #{updateUserName},</if>
|
||||
update_time = NOW()
|
||||
</trim>
|
||||
update tb_coordinate_photo set pro_id = #{proId},pro_name = #{proName},gx_id = #{gxId},gx_name = #{gxName},
|
||||
build_place = #{buildPlace},build_before_desc = #{buildBeforeDesc},build_under_desc = #{buildUnderDesc},
|
||||
build_after_desc = #{buildAfterDesc},update_user_id = #{updateUserId},update_user_name = #{updateUserName},
|
||||
major_name = #{majorName},major_id = #{majorId},update_time = NOW()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,21 +46,10 @@
|
|||
</insert>
|
||||
|
||||
<update id="updateImportantMatter">
|
||||
update tb_main_matter_publicize_photo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">pro_id = #{proId},</if>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
<if test="majorId != null and majorId != ''">major_id = #{majorId},</if>
|
||||
<if test="majorName != null and majorName != ''">major_name = #{majorName},</if>
|
||||
<if test="gxId != null and gxId != ''">gx_id = #{gxId},</if>
|
||||
<if test="gxName != null and gxName != ''">gx_name = #{gxName},</if>
|
||||
<if test="time != null and time != ''">time = #{time},</if>
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="updateUserId != null and updateUserId != ''">update_user_id = #{updateUserId},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name = #{updateUserName},</if>
|
||||
update_time = NOW()
|
||||
</trim>
|
||||
update tb_main_matter_publicize_photo set pro_id = #{proId},pro_name = #{proName},major_id = #{majorId},
|
||||
major_name = #{majorName},gx_id = #{gxId},gx_name = #{gxName},time = #{time},
|
||||
title = #{title},content = #{content},
|
||||
update_user_id = #{updateUserId},update_user_name = #{updateUserName},update_time = NOW()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,22 +47,9 @@
|
|||
|
||||
</insert>
|
||||
<update id="updateSafetyMeasures">
|
||||
update tb_safety_measure
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">pro_id = #{proId},</if>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
<if test="majorId != null and majorId != ''">major_id = #{majorId},</if>
|
||||
<if test="majorName != null and majorName != ''">major_name = #{majorName},</if>
|
||||
<if test="gxId != null and gxId != ''">gx_id = #{gxId},</if>
|
||||
<if test="gxName != null and gxName != ''">gx_name = #{gxName},</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">check_user_name = #{checkUserName},</if>
|
||||
<if test="checkDate != null and checkDate != ''">check_date = #{checkDate},</if>
|
||||
<if test="checkPlace != null and checkPlace != ''">check_place = #{checkPlace},</if>
|
||||
<if test="checkDesc != null and checkDesc != ''">check_desc = #{checkDesc},</if>
|
||||
<if test="updateUserId != null and updateUserId != ''">update_user_id = #{updateUserId},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name = #{updateUserName},</if>
|
||||
update_time = NOW()
|
||||
</trim>
|
||||
update tb_safety_measure set pro_id = #{proId},pro_name = #{proName},major_id = #{majorId},major_name = #{majorName},
|
||||
gx_id = #{gxId},gx_name = #{gxName},check_user_name = #{checkUserName},check_date = #{checkDate},check_place = #{checkPlace},
|
||||
check_desc = #{checkDesc},update_user_id = #{updateUserId},update_user_name = #{updateUserName},update_time = NOW()
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteSafetyMeasures">
|
||||
|
|
|
|||
|
|
@ -69,18 +69,10 @@
|
|||
<if test="proName != null">
|
||||
pro_name = #{proName},
|
||||
</if>
|
||||
<if test="majorId != null">
|
||||
major_id = #{majorId},
|
||||
</if>
|
||||
<if test="majorName != null">
|
||||
major_name = #{majorName},
|
||||
</if>
|
||||
<if test="gxId != null">
|
||||
gx_id = #{gxId},
|
||||
</if>
|
||||
<if test="gxName != null">
|
||||
gx_name = #{gxName},
|
||||
</if>
|
||||
<if test="checkUserName != null">
|
||||
check_user_name = #{checkUserName},
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -101,18 +101,10 @@
|
|||
<if test="proName != null">
|
||||
pro_name = #{proName},
|
||||
</if>
|
||||
<if test="majorId != null">
|
||||
major_id = #{majorId},
|
||||
</if>
|
||||
<if test="majorName != null">
|
||||
major_name = #{majorName},
|
||||
</if>
|
||||
<if test="gxId != null">
|
||||
gx_id = #{gxId},
|
||||
</if>
|
||||
<if test="gxName != null">
|
||||
gx_name = #{gxName},
|
||||
</if>
|
||||
<if test="checkUserName != null">
|
||||
check_user_name = #{checkUserName},
|
||||
</if>
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 266 B |
Binary file not shown.
|
After Width: | Height: | Size: 323 B |
|
|
@ -223,9 +223,13 @@ function setParams(params) {
|
|||
form.on('select(majorId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
|
||||
if (selectedId === '' || selectedId == '') {
|
||||
majorId = '';
|
||||
majorName = '';
|
||||
}else {
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
}
|
||||
let gxs = getGxsSelect(data.value);
|
||||
setSelectValueName(gxs, 'gxId', '请选择工序');
|
||||
});
|
||||
|
|
@ -233,8 +237,13 @@ function setParams(params) {
|
|||
form.on('select(gxId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
if (selectedId === '' || selectedId == '') {
|
||||
gxId = '';
|
||||
gxName = '';
|
||||
}else{
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
}
|
||||
});
|
||||
|
||||
form.render();//重新渲染页面checkbox控件
|
||||
|
|
|
|||
|
|
@ -113,9 +113,13 @@ function setParams(params) {
|
|||
form.on('select(majorId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
majorId = '';
|
||||
majorName = '';
|
||||
}else{
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
}
|
||||
let gxs = getGxsSelect(data.value);
|
||||
setSelectValueName(gxs, 'gxId', '请选择工序');
|
||||
});
|
||||
|
|
@ -123,8 +127,13 @@ function setParams(params) {
|
|||
form.on('select(gxId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
if(selectedId === ''){
|
||||
gxId = '';
|
||||
gxName = '';
|
||||
}else{
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
}
|
||||
});
|
||||
|
||||
form.render();//重新渲染页面checkbox控件
|
||||
|
|
|
|||
|
|
@ -169,9 +169,13 @@ function setParams(params) {
|
|||
form.on('select(majorId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
majorId = '';
|
||||
majorName = '';
|
||||
}else{
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
}
|
||||
let gxs = getGxsSelect(data.value);
|
||||
setSelectValueName(gxs, 'gxId', '请选择工序');
|
||||
});
|
||||
|
|
@ -179,8 +183,13 @@ function setParams(params) {
|
|||
form.on('select(gxId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
gxId = '';
|
||||
gxName = '';
|
||||
}else{
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
}
|
||||
});
|
||||
|
||||
form.render();//重新渲染页面checkbox控件
|
||||
|
|
|
|||
|
|
@ -113,9 +113,13 @@ function setParams(params) {
|
|||
form.on('select(majorId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
majorId = '';
|
||||
majorName = '';
|
||||
}else{
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
}
|
||||
let gxs = getGxsSelect(data.value);
|
||||
setSelectValueName(gxs, 'gxId', '请选择工序');
|
||||
});
|
||||
|
|
@ -123,8 +127,13 @@ function setParams(params) {
|
|||
form.on('select(gxId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
gxId = '';
|
||||
gxName = '';
|
||||
}else{
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
}
|
||||
});
|
||||
|
||||
form.render();//重新渲染页面checkbox控件
|
||||
|
|
|
|||
|
|
@ -178,8 +178,13 @@ function setParams(params) {
|
|||
form.on('select(majorId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
majorId = '';
|
||||
majorName = '';
|
||||
}else{
|
||||
majorId = selectedId;
|
||||
majorName = selectedName;
|
||||
}
|
||||
|
||||
let gxs = getGxsSelect(data.value);
|
||||
setSelectValueName(gxs, 'gxId', '请选择工序');
|
||||
|
|
@ -188,8 +193,13 @@ function setParams(params) {
|
|||
form.on('select(gxId)', function (data) {
|
||||
const selectedId = data.value; // 获取选中项的 value 值
|
||||
const selectedName = $(data.elem).find("option:selected").text(); // 获取选中项的文本
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
if(selectedId === '' || selectedId == '' ){
|
||||
gxId = '';
|
||||
gxName = '';
|
||||
}else{
|
||||
gxId = selectedId;
|
||||
gxName = selectedName;
|
||||
}
|
||||
});
|
||||
|
||||
form.render();//重新渲染页面checkbox控件
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
|
||||
try {
|
||||
// 1. 生成唯一任务ID
|
||||
currentTaskId = 'task_' + Date.now();
|
||||
currentTaskId = Date.now();
|
||||
// 2. 显示等待提示
|
||||
const swalInstance = Swal.fire({
|
||||
title: '正在生成压缩包',
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ function setParams(obj) {
|
|||
setSelectValueName(majors,'majorId','请选择专业');
|
||||
setSelectValueName(gxs,'gxId','请选择工序');
|
||||
form.val('formInfo', highSearchData);
|
||||
$('input[name="photoType"]').each(function(){
|
||||
$(this).prop('checked', false);
|
||||
})
|
||||
$.each(highSearchData.photoType,function(index,item){
|
||||
$('input[name="photoType"][value='+item+']').prop('checked', true);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ function viewImg(item) {
|
|||
layer.photos({
|
||||
shade: 0.5,
|
||||
footer: false,
|
||||
// toolbar: ['prev', 'next', 'download', 'customBtn'], // 添加自定义按钮标识
|
||||
photos: {
|
||||
"title": "图片预览",
|
||||
"start": 0,
|
||||
|
|
@ -13,6 +14,26 @@ function viewImg(item) {
|
|||
}
|
||||
]
|
||||
},
|
||||
success: function(layero){
|
||||
// 获取工具栏元素
|
||||
var toolbar = $(layero).find('.layui-layer-photos-toolbar');
|
||||
// 添加自定义按钮
|
||||
var customBtn = $('<div class="layui-layer-photos-btn layui-layer-photos-customBtn" title="原图下载">'+
|
||||
'<img style="margin-top: 15px;cursor: pointer;" src="../../img/synthesisQuery/download_icon2.png"></div>');
|
||||
toolbar.append(customBtn);
|
||||
// 绑定点击事件
|
||||
customBtn.on('click', function(){
|
||||
imgDownLoad(item,1);
|
||||
});
|
||||
|
||||
var customBtn2 = $('<div class="layui-layer-photos-btn layui-layer-photos-customBtn" title="水印下载">'+
|
||||
'<img style="margin-top: 15px;cursor: pointer;" src="../../img/synthesisQuery/water_icon.png"></div>');
|
||||
toolbar.append(customBtn2);
|
||||
// 绑定点击事件
|
||||
customBtn2.on('click', function(){
|
||||
generateWatermark(item)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue