Commit 14fdf92f authored by 侯彦文's avatar 侯彦文

Merge remote-tracking branch 'origin/master'

parents 8feff26c a923cb11
......@@ -124,7 +124,7 @@ public class EasyExcelUtils {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode(rawFileName, "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
}
/**
......
......@@ -6,6 +6,7 @@ import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.util.BeanMapUtils;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.util.StringUtils;
import com.google.common.collect.Lists;
import com.yonde.dcs.plan.common.constants.Constants;
import com.yonde.dcs.plan.common.utils.SearchUtil;
import com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO;
......@@ -15,6 +16,7 @@ import com.yonde.dcs.plan.core.util.CommonUtils;
import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import com.yonde.dex.basedata.data.search.SortItem;
import com.yonde.dex.basedata.entity.data.DxPageImpl;
import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.basedata.exception.DxBusinessException;
......@@ -184,8 +186,15 @@ public class ICMPlanExcelListenner extends AnalysisEventListener<ExtICMPlanExcel
public ExtICMExternalInterfacePlanVO getICMPlanByPlanNumber(String planNumber) {
//根据文件编号查询ICM计划
DxPageImpl<ExtICMExternalInterfacePlanVO> ICMPlanPage = extICMExternalInterfacePlanService.findRecursion(SearchUtil.buildQuery("planNumber", SearchItem.Operator.EQ, planNumber));
SortItem sortByModifyTime = new SortItem("createTime", "desc");
SearchItems icmPlanSearch = new SearchItems();
SearchItem numberFilter = new SearchItem("planNumber", SearchItem.Operator.EQ, planNumber, (Object)null);
SearchItem latestFilter = new SearchItem("latest", SearchItem.Operator.EQ, true, (Object)null);
icmPlanSearch.addItem(numberFilter);
icmPlanSearch.addItem(latestFilter);
SearchQueryCondition searchQuery = SearchQueryCondition.builder().searchItems(icmPlanSearch).sortItem(Lists.newArrayList(new SortItem[]{sortByModifyTime})).build();
//根据计划编码查询出最新版本的计划
DxPageImpl<ExtICMExternalInterfacePlanVO> ICMPlanPage = extICMExternalInterfacePlanService.findRecursion(searchQuery);
if (!CollectionUtils.isEmpty(ICMPlanPage.getContent())) {
ExtICMExternalInterfacePlanVO extICMPlanVOForDB = DxPageUtils.getFirst(ICMPlanPage);
return extICMPlanVOForDB;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment