|
|
@@ -380,14 +380,13 @@ public class ReleaseProductByBatchController {
|
|
|
public ModelAndView exportOrderses(String batch, HttpServletRequest request, @RequestParam(defaultValue = "false") Boolean isAjax, String currency, Integer isPerson) {
|
|
|
HttpSession session = request.getSession();
|
|
|
ModelAndView modelAndView = AjaxUtil.checkIsAjax(session, isAjax);
|
|
|
- if (null != modelAndView) {
|
|
|
+ if (!modelAndView.isEmpty()) {
|
|
|
return modelAndView;
|
|
|
}
|
|
|
Object loading = session.getAttribute("load-error-ing");
|
|
|
if (loading == null || !Boolean.valueOf(loading.toString())) {
|
|
|
session.setAttribute("load-error-ing", true);
|
|
|
}
|
|
|
- modelAndView = new ModelAndView();
|
|
|
modelAndView.addObject("data", releaseProductByBatchService.findFailureReleaseProductByBatch(batch));
|
|
|
String url ="";
|
|
|
if (null != isPerson && isPerson.intValue() == IntegerConstant.YES_SHORT.intValue()) {
|
|
|
@@ -437,14 +436,13 @@ public class ReleaseProductByBatchController {
|
|
|
public ModelAndView exportFailureData(String batch, HttpServletRequest request, @RequestParam(defaultValue = "false") Boolean isAjax) throws UnsupportedEncodingException {
|
|
|
HttpSession session = request.getSession();
|
|
|
ModelAndView modelAndView = AjaxUtil.checkIsAjax(session, isAjax);
|
|
|
- if (null != modelAndView) {
|
|
|
+ if (!modelAndView.isEmpty()) {
|
|
|
return modelAndView;
|
|
|
}
|
|
|
Object loading = session.getAttribute("load-error-ing");
|
|
|
if (loading == null || !Boolean.valueOf(loading.toString())) {
|
|
|
session.setAttribute("load-error-ing", true);
|
|
|
}
|
|
|
- modelAndView = new ModelAndView();
|
|
|
modelAndView.addObject("data", releaseProductByBatchService.findFailureReleaseProductByBatch(batch));
|
|
|
String url = "classpath:jxls-tpl/trade/products-error";
|
|
|
modelAndView.setView(new JxlsExcelView(url, "修改失败产品-优软商城"));
|