|
@@ -22,7 +22,6 @@ import com.uas.search.b2b.model.Sort;
|
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.Sort.Direction;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
@@ -83,6 +82,7 @@ public class MakeAcceptController {
|
|
|
pageInfo.expression(PredicateUtils.in("enUU", distribute.getDistribute(), true));
|
|
pageInfo.expression(PredicateUtils.in("enUU", distribute.getDistribute(), true));
|
|
|
}
|
|
}
|
|
|
if (StringUtils.isEmpty(filter.getKeyword())) {
|
|
if (StringUtils.isEmpty(filter.getKeyword())) {
|
|
|
|
|
+ pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
return SPageUtils.covertSPage(makeAcceptService.findAllByPageInfo(pageInfo, null, filter.getFromDate(), filter.getEndDate()));
|
|
return SPageUtils.covertSPage(makeAcceptService.findAllByPageInfo(pageInfo, null, filter.getFromDate(), filter.getEndDate()));
|
|
|
}
|
|
}
|
|
|
// 当前登录企业作为供应商
|
|
// 当前登录企业作为供应商
|
|
@@ -128,14 +128,17 @@ public class MakeAcceptController {
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/xls", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/xls", method = RequestMethod.GET)
|
|
|
public ModelAndView export(String keyword, Long fromDate, Long endDate) {
|
|
public ModelAndView export(String keyword, Long fromDate, Long endDate) {
|
|
|
- PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
|
|
|
|
|
- pageInfo.sorting("date", Direction.DESC);
|
|
|
|
|
- pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
|
|
|
|
+ PageParams params = new PageParams();
|
|
|
|
|
+ params.setPage(1);
|
|
|
|
|
+ params.setCount(JxlsExcelView.MAX_SIZE);
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
|
modelAndView.addObject("dateFormat", dateFormat);
|
|
modelAndView.addObject("dateFormat", dateFormat);
|
|
|
- modelAndView.addObject("data",
|
|
|
|
|
- makeAcceptService.findAllByPageInfo(pageInfo, keyword, fromDate, endDate).getContent());
|
|
|
|
|
|
|
+ SearchFilter filter = new SearchFilter();
|
|
|
|
|
+ filter.setKeyword(keyword);
|
|
|
|
|
+ filter.setFromDate(fromDate);
|
|
|
|
|
+ filter.setEndDate(endDate);
|
|
|
|
|
+ modelAndView.addObject("data", getAllMakeAccepts(params, JSONObject.toJSONString(filter)).getContent());
|
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/make/makeAccept", "委外验收单列表"));
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/make/makeAccept", "委外验收单列表"));
|
|
|
logger.log("委外验收单", "导出Excel列表", "导出全部Excel列表");
|
|
logger.log("委外验收单", "导出Excel列表", "导出全部Excel列表");
|
|
|
return modelAndView;
|
|
return modelAndView;
|