bug51987失效下载问题
This commit is contained in:
+18
-5
@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.RedisUtil;
|
||||
import com.jero.common.util.TokenUtils;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryInfoEOServiceImpl;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
@@ -31,6 +34,7 @@ import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -73,6 +77,12 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
@Autowired
|
||||
private DummyInventoryInfoEOServiceImpl dummyInventoryInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -444,6 +454,10 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
*/
|
||||
@Override
|
||||
public void exportDataToXls(String cut, HttpServletResponse response, HttpServletRequest request, List<ProjectRelatedPersonnel> dataList) {
|
||||
//验证token
|
||||
String token = request.getHeader("X-Access-Token");
|
||||
TokenUtils.verifyToken(token, sysBaseAPI, redisUtil);
|
||||
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
String fileOriName = "法规清单导入模板.xls";
|
||||
@@ -548,10 +562,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
*/
|
||||
@Override
|
||||
public void exportTemplate(ProjectRelatedPersonnel projectRelatedPersonnel, HttpServletResponse response, HttpServletRequest request) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
if (sysUser != null) {
|
||||
|
||||
//验证token
|
||||
String token = request.getHeader("X-Access-Token");
|
||||
TokenUtils.verifyToken(token, sysBaseAPI, redisUtil);
|
||||
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
@@ -638,7 +651,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user