|
@@ -21,6 +21,7 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
|
import org.apache.shiro.authz.annotation.Logical;
|
|
import org.apache.shiro.authz.annotation.Logical;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.http.HttpRequest;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
@@ -183,11 +184,11 @@ public class MaterialProjectController extends BaseController {
|
|
@RequestMapping(value = "export")
|
|
@RequestMapping(value = "export")
|
|
public AjaxJson exportFile(MaterialProject materialProject, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
public AjaxJson exportFile(MaterialProject materialProject, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
|
|
+ HttpSession session = request.getSession();
|
|
|
|
+ MaterialProject materialProject1 = (MaterialProject)session.getAttribute("materialPro");
|
|
try {
|
|
try {
|
|
- HttpSession session = request.getSession();
|
|
|
|
- MaterialProject materialProject1 = (MaterialProject)session.getAttribute("materialPro");
|
|
|
|
String fileName = "物料"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
String fileName = "物料"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
- List<MaterialProject> list = null;
|
|
|
|
|
|
+ List<MaterialProject> list = new ArrayList<MaterialProject>();
|
|
if (!materialProject1.getReserveProjectName().equals("")||!materialProject1.getProjectName().equals("")||!materialProject1.getProjectCode().equals("")||
|
|
if (!materialProject1.getReserveProjectName().equals("")||!materialProject1.getProjectName().equals("")||!materialProject1.getProjectCode().equals("")||
|
|
!materialProject1.getReserveCode().equals("")||!materialProject1.getProjectAttribute().equals("")||!materialProject1.getProjectDefine().equals("")){
|
|
!materialProject1.getReserveCode().equals("")||!materialProject1.getProjectAttribute().equals("")||!materialProject1.getProjectDefine().equals("")){
|
|
list = materialProjectService.findList(materialProject1);
|
|
list = materialProjectService.findList(materialProject1);
|