bug修改
This commit is contained in:
parent
3998874d75
commit
ee8255d465
|
|
@ -305,7 +305,9 @@ public class ArchivesServiceImpl implements ArchivesService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult download(ArchivesVo archivesVo, HttpServletRequest request, HttpServletResponse response) {
|
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<>();
|
List<Long> idList = new ArrayList<>();
|
||||||
String[] arr = archivesVo.getIds().split(",");
|
String[] arr = archivesVo.getIds().split(",");
|
||||||
for (String s : arr) {
|
for (String s : arr) {
|
||||||
|
|
@ -363,7 +365,9 @@ public class ArchivesServiceImpl implements ArchivesService {
|
||||||
originalPath = originalPath + fileInfo.getDocType();
|
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 path = Paths.get(savePath);
|
Path path = Paths.get(savePath);
|
||||||
try {
|
try {
|
||||||
|
|
@ -389,7 +393,7 @@ public class ArchivesServiceImpl implements ArchivesService {
|
||||||
// 压缩完成后,关闭压缩流
|
// 压缩完成后,关闭压缩流
|
||||||
zipOut.close();
|
zipOut.close();
|
||||||
//拼接下载默认名称并转为ISO-8859-1格式
|
//拼接下载默认名称并转为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);
|
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||||
//该流不可以手动关闭,手动关闭下载会出问题,下载完成后会自动关闭
|
//该流不可以手动关闭,手动关闭下载会出问题,下载完成后会自动关闭
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ public class RepairTask {
|
||||||
* 维修人员
|
* 维修人员
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "维修人员")
|
@ApiModelProperty(value = "维修人员")
|
||||||
@Excel(name = "维修人员",sort = 15)
|
@Excel(name = "维修班组",sort = 15)
|
||||||
private String repairer;
|
private String repairer;
|
||||||
/**
|
/**
|
||||||
* 维修时间
|
* 维修时间
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<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} ]]>
|
<![CDATA[and DATE_FORMAT( pci.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY pcd.input_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPurChaseReportDetailsList"
|
<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 != ''">
|
<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} ]]>
|
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY a.createTime DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeaseOutDetailsList" resultType="com.bonus.material.basic.domain.report.LeaseOutDetails">
|
<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 != ''">
|
<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} ]]>
|
<![CDATA[and DATE_FORMAT( bad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY bad.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBackDetailsInputList" resultType="com.bonus.material.basic.domain.report.BackInputDetails">
|
<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.scrap_num, 0 )) as pendingScrapNum,
|
||||||
SUM(IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 )- IFNULL( rad.scrap_num, 0 )) as pendingRepairNum,
|
SUM(IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 )- IFNULL( rad.scrap_num, 0 )) as pendingRepairNum,
|
||||||
rad.create_time as backTime,
|
rad.create_time as backTime,
|
||||||
a.create_time as repairTime,
|
IFNULL(a.create_time, rad.update_time) as repairTime,
|
||||||
bu.unit_name as leaseUnitName,
|
bu.unit_name as leaseUnitName,
|
||||||
bp.pro_name as leaseProjectName,
|
bp.pro_name as leaseProjectName,
|
||||||
rad.repairer as repairPersonName,
|
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} ]]>
|
<![CDATA[and DATE_FORMAT( rad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
GROUP BY rad.task_id, rad.type_id
|
GROUP BY rad.task_id, rad.type_id
|
||||||
|
ORDER BY rad.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairDetailsList" resultType="com.bonus.material.basic.domain.report.RepairDetails">
|
<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} ]]>
|
<![CDATA[and DATE_FORMAT( rid.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
GROUP BY rid.task_id,rid.type_id
|
GROUP BY rid.task_id,rid.type_id
|
||||||
|
ORDER BY a.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairInputDetailsList" resultType="com.bonus.material.basic.domain.report.RepairInputDetails">
|
<select id="getRepairInputDetailsList" resultType="com.bonus.material.basic.domain.report.RepairInputDetails">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue