问题修改

This commit is contained in:
cwchen 2025-04-14 14:51:30 +08:00
parent 715a1f7f7a
commit 70f983bd14
5 changed files with 11 additions and 6 deletions

View File

@ -25,7 +25,7 @@ public class ProClassifyStatisticsVo extends SynthesisNumVo{
@Excel(name = "工程名称", width = 30.0, orderNum = "1") @Excel(name = "工程名称", width = 30.0, orderNum = "1")
private String proName; 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") @Excel(name = "最后更新时间", width = 20.0, orderNum = "8",format = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date lastUpdateTime; private Date lastUpdateTime;

View File

@ -171,6 +171,7 @@ public class DownloadService {
try { try {
// 查询图片未生成水印照片的数据 // 查询图片未生成水印照片的数据
List<SynthesisQueryVo> list = Optional.ofNullable(synthesisQueryDao.generateWatermark(proId)).orElseGet(ArrayList::new); List<SynthesisQueryVo> list = Optional.ofNullable(synthesisQueryDao.generateWatermark(proId)).orElseGet(ArrayList::new);
System.err.println("查询图片未生成水印照片的数据:" + list.size());
List<Future> futureList = new ArrayList<>(); List<Future> futureList = new ArrayList<>();
List<SynthesisQueryVo> newList = new ArrayList<>(); List<SynthesisQueryVo> newList = new ArrayList<>();
for (SynthesisQueryVo vo : list) { for (SynthesisQueryVo vo : list) {

View File

@ -49,9 +49,10 @@ public class HighQualityWatermark {
opacity = Math.max(MIN_OPACITY, Math.min(opacity, MAX_OPACITY)); opacity = Math.max(MIN_OPACITY, Math.min(opacity, MAX_OPACITY));
// 读取原始图片并获取其类型 // 读取原始图片并获取其类型
BufferedImage originalImage = ImageIO.read(new File(sourceImagePath)); 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_RGB
: BufferedImage.TYPE_INT_ARGB; : BufferedImage.TYPE_INT_ARGB;*/
int imageType = BufferedImage.TYPE_INT_RGB;
// 创建与原始图片相同大小的新图像 // 创建与原始图片相同大小的新图像
BufferedImage sourceImage = new BufferedImage( BufferedImage sourceImage = new BufferedImage(
originalImage.getWidth(), originalImage.getWidth(),
@ -347,8 +348,8 @@ public class HighQualityWatermark {
watermarkLines.add(proName.replaceAll("(.{18})", "$1@@")); watermarkLines.add(proName.replaceAll("(.{18})", "$1@@"));
watermarkLines.add("安全违章"); watermarkLines.add("安全违章");
watermarkLines.add("违章照片"); watermarkLines.add("违章照片");
String localPath = "C:\\Users\\10488\\Desktop\\3.jpg"; String localPath = "C:\\Users\\10488\\Desktop\\新建文件夹 (2)\\2.png";
String outPath = "C:\\Users\\10488\\Desktop\\output.jpg"; String outPath = "C:\\Users\\10488\\Desktop\\output.png";
// 添加高质量水印 // 添加高质量水印
addHighQualityWatermark(localPath, outPath, addHighQualityWatermark(localPath, outPath,
watermarkLines, "bottom-left", watermarkLines, "bottom-left",

View File

@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', function() {
try { try {
// 1. 生成唯一任务ID // 1. 生成唯一任务ID
currentTaskId = 'task_' + Date.now(); currentTaskId = Date.now();
// 2. 显示等待提示 // 2. 显示等待提示
const swalInstance = Swal.fire({ const swalInstance = Swal.fire({
title: '正在生成压缩包', title: '正在生成压缩包',

View File

@ -24,6 +24,9 @@ function setParams(obj) {
setSelectValueName(majors,'majorId','请选择专业'); setSelectValueName(majors,'majorId','请选择专业');
setSelectValueName(gxs,'gxId','请选择工序'); setSelectValueName(gxs,'gxId','请选择工序');
form.val('formInfo', highSearchData); form.val('formInfo', highSearchData);
$('input[name="photoType"]').each(function(){
$(this).prop('checked', false);
})
$.each(highSearchData.photoType,function(index,item){ $.each(highSearchData.photoType,function(index,item){
$('input[name="photoType"][value='+item+']').prop('checked', true); $('input[name="photoType"][value='+item+']').prop('checked', true);
}) })