bug修改

This commit is contained in:
mashuai 2025-03-19 15:46:47 +08:00
parent 3998874d75
commit ee8255d465
3 changed files with 14 additions and 5 deletions

View File

@ -305,7 +305,9 @@ public class ArchivesServiceImpl implements ArchivesService {
*/
@Override
public AjaxResult download(ArchivesVo archivesVo, HttpServletRequest request, HttpServletResponse response) {
String zipSavePath = "D:/" + DateTimeHelper.getNowDate() + ".zip";
// 使用系统临时目录
//String zipSavePath = "D:/" + DateTimeHelper.getNowDate() + ".zip";
String zipSavePath = System.getProperty("java.io.tmpdir") + File.separator + DateTimeHelper.getNowDate() + ".zip";
List<Long> idList = new ArrayList<>();
String[] arr = archivesVo.getIds().split(",");
for (String s : arr) {
@ -363,7 +365,9 @@ public class ArchivesServiceImpl implements ArchivesService {
originalPath = originalPath + fileInfo.getDocType();
}
}
String savePath = "D:/" + originalPath;
// 使用系统临时目录
//String zipSavePath = "D:/" + DateTimeHelper.getNowDate() + ".zip";
String savePath = System.getProperty("java.io.tmpdir") + File.separator + originalPath;
// 获取 Path 对象
Path path = Paths.get(savePath);
try {
@ -389,7 +393,7 @@ public class ArchivesServiceImpl implements ArchivesService {
// 压缩完成后,关闭压缩流
zipOut.close();
//拼接下载默认名称并转为ISO-8859-1格式
String fileName = new String((DateTimeHelper.getNowDate() + "下载文件.zip").getBytes(),"ISO-8859-1");
String fileName = new String((DateTimeHelper.getNowDate() + "下载文件.zip").getBytes("UTF-8"),"ISO-8859-1");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
//该流不可以手动关闭,手动关闭下载会出问题,下载完成后会自动关闭
ServletOutputStream outputStream = response.getOutputStream();

View File

@ -154,7 +154,7 @@ public class RepairTask {
* 维修人员
*/
@ApiModelProperty(value = "维修人员")
@Excel(name = "维修人员",sort = 15)
@Excel(name = "维修班组",sort = 15)
private String repairer;
/**
* 维修时间

View File

@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( pci.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
ORDER BY pcd.input_time DESC
</select>
<select id="getPurChaseReportDetailsList"
@ -129,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
ORDER BY a.createTime DESC
</select>
<select id="getLeaseOutDetailsList" resultType="com.bonus.material.basic.domain.report.LeaseOutDetails">
@ -198,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( bad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
ORDER BY bad.create_time DESC
</select>
<select id="getBackDetailsInputList" resultType="com.bonus.material.basic.domain.report.BackInputDetails">
@ -236,7 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM(IFNULL( rad.scrap_num, 0 )) as pendingScrapNum,
SUM(IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 )- IFNULL( rad.scrap_num, 0 )) as pendingRepairNum,
rad.create_time as backTime,
a.create_time as repairTime,
IFNULL(a.create_time, rad.update_time) as repairTime,
bu.unit_name as leaseUnitName,
bp.pro_name as leaseProjectName,
rad.repairer as repairPersonName,
@ -273,6 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<![CDATA[and DATE_FORMAT( rad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
GROUP BY rad.task_id, rad.type_id
ORDER BY rad.create_time DESC
</select>
<select id="getRepairDetailsList" resultType="com.bonus.material.basic.domain.report.RepairDetails">
@ -341,6 +345,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<![CDATA[and DATE_FORMAT( rid.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
GROUP BY rid.task_id,rid.type_id
ORDER BY a.create_time DESC
</select>
<select id="getRepairInputDetailsList" resultType="com.bonus.material.basic.domain.report.RepairInputDetails">