|
@@ -109,21 +109,23 @@ public class InformationController extends BaseController {
|
|
|
HttpSession session = request.getSession();
|
|
|
Object path = session.getAttribute("path");
|
|
|
if (hiddenSign.equals("不是第一次加载")) {
|
|
|
- List<Information> tList = new ArrayList<>();
|
|
|
- try {
|
|
|
- BufferedReader bufferedReader = null;
|
|
|
- bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
- String string;
|
|
|
- while ((string=bufferedReader.readLine()) != null){
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(string);
|
|
|
- tList.add(information1);
|
|
|
+ if (path !=null && !path.equals("")) {
|
|
|
+ List<Information> tList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ BufferedReader bufferedReader = null;
|
|
|
+ bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
+ String string;
|
|
|
+ while ((string=bufferedReader.readLine()) != null){
|
|
|
+ Information information1 = new Information();
|
|
|
+ information1.setProjectId(string);
|
|
|
+ tList.add(information1);
|
|
|
+ }
|
|
|
+ bufferedReader.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- bufferedReader.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- information.setFileList(tList);
|
|
|
+ information.setFileList(tList);
|
|
|
+ }
|
|
|
} else {
|
|
|
if (path != null && path != "") {
|
|
|
RandomUtil.delete(path.toString());
|
|
@@ -131,7 +133,6 @@ public class InformationController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
String str = information.getProjectId();
|
|
|
if (str.equals("")) {
|
|
|
|
|
@@ -139,7 +140,6 @@ public class InformationController extends BaseController {
|
|
|
String[] strArr = str.split("\\s+");
|
|
|
information.setAttrs(strArr);
|
|
|
}
|
|
|
-// Page<Information> page = informationService.findSearchPage(new Page<Information>(request, response), information,String[] strArr);
|
|
|
Page<Information> page = informationService.findPage(new Page<Information>(request, response), information);
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
@@ -183,8 +183,9 @@ public class InformationController extends BaseController {
|
|
|
// @RequiresPermissions("modules:sg:information:information:import")
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "importTwo")
|
|
|
- public String importFile(MultipartFile btnCom,MultipartFile btnInformation, HttpServletResponse response, HttpServletRequest request) {
|
|
|
- try {
|
|
|
+ public AjaxJson importFile(MultipartFile btnCom,MultipartFile btnInformation, HttpServletResponse response, HttpServletRequest request) {
|
|
|
+ AjaxJson j = new AjaxJson();
|
|
|
+ try {
|
|
|
ImportExcel importExcel = new ImportExcel(btnInformation, 1, 0);
|
|
|
int excelLastDataRowNum = importExcel.getLastDataRowNum();
|
|
|
Map<String, Integer> importCom = ImportInformation.importCom(importExcel, excelLastDataRowNum);
|
|
@@ -193,11 +194,12 @@ public class InformationController extends BaseController {
|
|
|
Map<String, Object> information = ImportInformation.importmation(ei, lastDataRowNum);
|
|
|
Record record = new Record();
|
|
|
recordService.save(record);
|
|
|
- return "插入成功";
|
|
|
+ j.setMsg("成功");
|
|
|
} catch (Exception e) {
|
|
|
- e.getMessage();
|
|
|
- return "插入失败";
|
|
|
+ j.setSuccess(false);
|
|
|
+ j.setMsg("失败");
|
|
|
}
|
|
|
+ return j;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -260,7 +262,7 @@ public class InformationController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @RequiresPermissions("modules:sg:information:information:import")
|
|
|
+ @RequiresPermissions("modules:sg:information:information:importTrial")
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "importInTrial")
|
|
|
public AjaxJson importInTrial(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
@@ -344,7 +346,7 @@ public class InformationController extends BaseController {
|
|
|
}
|
|
|
|
|
|
//导入原因类型
|
|
|
- @RequiresPermissions("modules:sg:information:information:import")
|
|
|
+ @RequiresPermissions("modules:sg:information:information:importReason")
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "btnInReason")
|
|
|
public AjaxJson btnInReason(@RequestParam("file")MultipartFile file, Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
@@ -437,66 +439,80 @@ public class InformationController extends BaseController {
|
|
|
String projectYear = "";
|
|
|
String firstUnits = "";
|
|
|
String secondUnits = "";
|
|
|
-
|
|
|
+ String firstFinish = "";
|
|
|
+ String extendedStatus = "";
|
|
|
+ String extendedTime = "";
|
|
|
+ String hiddenSign = "";
|
|
|
try {
|
|
|
- projectId = request.getParameter("projectId");
|
|
|
- projectName = request.getParameter("projectName");
|
|
|
+ projectId = request.getParameter("projectId");
|
|
|
+ projectId = new String(projectId.getBytes("iso8859-1"),"utf-8");
|
|
|
+ if (projectId.equals("")) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ String[] strArr = projectId.split("\\s+");
|
|
|
+ information.setAttrs(strArr);
|
|
|
+ }
|
|
|
+ projectName = request.getParameter("projectName");
|
|
|
projectName = new String(projectName.getBytes("iso8859-1"),"utf-8");
|
|
|
- projectType = request.getParameter("projectType");
|
|
|
+ information.setProjectName(projectName);
|
|
|
+ projectType = request.getParameter("projectType");
|
|
|
projectType = new String(projectType.getBytes("iso8859-1"),"utf-8");
|
|
|
- projectYear = request.getParameter("projectYear");
|
|
|
+ information.setProjectType(projectType);
|
|
|
+ projectYear = request.getParameter("projectYear");
|
|
|
projectYear = new String(projectYear.getBytes("iso8859-1"),"utf-8");
|
|
|
- firstUnits= request.getParameter("firstUnits");
|
|
|
+ information.setProjectType(projectYear);
|
|
|
+ firstUnits= request.getParameter("firstUnits");
|
|
|
firstUnits = new String(firstUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
- secondUnits= request.getParameter("secondUnits");
|
|
|
+ information.setFirstUnits(firstUnits);
|
|
|
+ secondUnits= request.getParameter("secondUnits");
|
|
|
secondUnits = new String(secondUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
-
|
|
|
+ information.setSecondUnits(secondUnits);
|
|
|
+ firstFinish= request.getParameter("firstFinish");
|
|
|
+ firstFinish = new String(firstFinish.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setFirstFinish(firstFinish);
|
|
|
+ extendedStatus= request.getParameter("extendedStatus");
|
|
|
+ extendedStatus = new String(extendedStatus.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedStatus(extendedStatus);
|
|
|
+ extendedTime= request.getParameter("extendedTime");
|
|
|
+ extendedTime = new String(extendedTime.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedTime(extendedTime);
|
|
|
+ hiddenSign= request.getParameter("hiddenSign");
|
|
|
+ hiddenSign = new String(hiddenSign.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setHiddenSign(hiddenSign);
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
- List<Information> tList = new ArrayList<>();
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
HttpSession session = request.getSession();
|
|
|
Object path = session.getAttribute("path");
|
|
|
- if (path != null && path != "") {
|
|
|
-// * 读取临时文件中的内容
|
|
|
- BufferedReader bufferedReader = null;
|
|
|
- try {
|
|
|
- bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
- String string;
|
|
|
- while ((string=bufferedReader.readLine()) != null){
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(string);
|
|
|
- tList.add(information1);
|
|
|
- }
|
|
|
- bufferedReader.close();
|
|
|
+ if (hiddenSign.equals("不是第一次加载")) {
|
|
|
+ if (path !=null && !path.equals("")) {
|
|
|
+ List<Information> tList = new ArrayList<>();
|
|
|
try {
|
|
|
- String fileName = "导出物料清单"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
- List<Material> materialList = informationService.allNoBack(tList);
|
|
|
- new ExportExcel("导出物料清单", Material.class).setDataList(materialList).write(response, fileName).dispose();
|
|
|
- j.setSuccess(true);
|
|
|
- j.setMsg("导出成功!");
|
|
|
- return j;
|
|
|
- } catch (Exception e) {
|
|
|
- j.setSuccess(false);
|
|
|
- j.setMsg("导出物料清单!失败信息:"+e.getMessage());
|
|
|
+ BufferedReader bufferedReader = null;
|
|
|
+ bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
+ String string;
|
|
|
+ while ((string=bufferedReader.readLine()) != null){
|
|
|
+ Information information1 = new Information();
|
|
|
+ information1.setProjectId(string);
|
|
|
+ tList.add(information1);
|
|
|
+ }
|
|
|
+ bufferedReader.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ information.setFileList(tList);
|
|
|
}
|
|
|
} else {
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(projectId);
|
|
|
- information1.setProjectName(projectName);
|
|
|
- information1.setProjectType(projectType);
|
|
|
- information1.setProjectYear(projectYear);
|
|
|
- information1.setFirstUnits(firstUnits);
|
|
|
- information1.setSecondUnits(secondUnits);
|
|
|
- tList.add(information1);
|
|
|
- try {
|
|
|
+ if (path != null && path != "") {
|
|
|
+ RandomUtil.delete(path.toString());
|
|
|
+ session.removeAttribute("path");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Information> list = informationService.findList(information);
|
|
|
+ try {
|
|
|
String fileName = "导出物料清单"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
- List<Material> materialList = informationService.allNo(tList);
|
|
|
+ List<Material> materialList = informationService.allNo(list);
|
|
|
new ExportExcel("导出物料清单", Material.class).setDataList(materialList).write(response, fileName).dispose();
|
|
|
j.setSuccess(true);
|
|
|
j.setMsg("导出成功!");
|
|
@@ -505,7 +521,6 @@ public class InformationController extends BaseController {
|
|
|
j.setSuccess(false);
|
|
|
j.setMsg("导出物料清单!失败信息:"+e.getMessage());
|
|
|
}
|
|
|
- }
|
|
|
return j;
|
|
|
}
|
|
|
|
|
@@ -520,63 +535,80 @@ public class InformationController extends BaseController {
|
|
|
String projectYear = "";
|
|
|
String firstUnits = "";
|
|
|
String secondUnits = "";
|
|
|
+ String firstFinish = "";
|
|
|
+ String extendedStatus = "";
|
|
|
+ String extendedTime = "";
|
|
|
+ String hiddenSign = "";
|
|
|
try {
|
|
|
projectId = request.getParameter("projectId");
|
|
|
+ projectId = new String(projectId.getBytes("iso8859-1"),"utf-8");
|
|
|
+ if (projectId.equals("")) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ String[] strArr = projectId.split("\\s+");
|
|
|
+ information.setAttrs(strArr);
|
|
|
+ }
|
|
|
projectName = request.getParameter("projectName");
|
|
|
projectName = new String(projectName.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectName(projectName);
|
|
|
projectType = request.getParameter("projectType");
|
|
|
projectType = new String(projectType.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectType(projectType);
|
|
|
projectYear = request.getParameter("projectYear");
|
|
|
projectYear = new String(projectYear.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectType(projectYear);
|
|
|
firstUnits= request.getParameter("firstUnits");
|
|
|
firstUnits = new String(firstUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setFirstUnits(firstUnits);
|
|
|
secondUnits= request.getParameter("secondUnits");
|
|
|
secondUnits = new String(secondUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setSecondUnits(secondUnits);
|
|
|
+ firstFinish= request.getParameter("firstFinish");
|
|
|
+ firstFinish = new String(firstFinish.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setFirstFinish(firstFinish);
|
|
|
+ extendedStatus= request.getParameter("extendedStatus");
|
|
|
+ extendedStatus = new String(extendedStatus.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedStatus(extendedStatus);
|
|
|
+ extendedTime= request.getParameter("extendedTime");
|
|
|
+ extendedTime = new String(extendedTime.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedTime(extendedTime);
|
|
|
+ hiddenSign= request.getParameter("hiddenSign");
|
|
|
+ hiddenSign = new String(hiddenSign.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setHiddenSign(hiddenSign);
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+ AjaxJson j = new AjaxJson();
|
|
|
HttpSession session = request.getSession();
|
|
|
Object path = session.getAttribute("path");
|
|
|
- List<Information> tList = new ArrayList<>();
|
|
|
- AjaxJson j = new AjaxJson();
|
|
|
- if (path != null && path != "") {
|
|
|
-// * 读取临时文件中的内容
|
|
|
- BufferedReader bufferedReader = null;
|
|
|
- try {
|
|
|
- bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
- String string;
|
|
|
- while ((string=bufferedReader.readLine()) != null){
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(string);
|
|
|
- tList.add(information1);
|
|
|
- }
|
|
|
- bufferedReader.close();
|
|
|
+ if (hiddenSign.equals("不是第一次加载")) {
|
|
|
+ if (path !=null && !path.equals("")) {
|
|
|
+ List<Information> tList = new ArrayList<>();
|
|
|
try {
|
|
|
- String fileName = "导出项目清单"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
- List<Information> informationList = informationService.exportInfor(tList);
|
|
|
- new ExportExcel("导出项目清单", Information.class).setDataList(informationList).write(response, fileName).dispose();
|
|
|
- j.setSuccess(true);
|
|
|
- j.setMsg("导出成功!");
|
|
|
- return j;
|
|
|
- } catch (Exception e) {
|
|
|
- j.setSuccess(false);
|
|
|
- j.setMsg("导出项目清单!失败信息:"+e.getMessage());
|
|
|
+ BufferedReader bufferedReader = null;
|
|
|
+ bufferedReader = new BufferedReader(new FileReader(path.toString()));
|
|
|
+ String string;
|
|
|
+ while ((string=bufferedReader.readLine()) != null){
|
|
|
+ Information information1 = new Information();
|
|
|
+ information1.setProjectId(string);
|
|
|
+ tList.add(information1);
|
|
|
+ }
|
|
|
+ bufferedReader.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ information.setFileList(tList);
|
|
|
}
|
|
|
} else {
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(projectId);
|
|
|
- information1.setProjectName(projectName);
|
|
|
- information1.setProjectType(projectType);
|
|
|
- information1.setProjectYear(projectYear);
|
|
|
- information1.setFirstUnits(firstUnits);
|
|
|
- information1.setSecondUnits(secondUnits);
|
|
|
- tList.add(information1);
|
|
|
+ if (path != null && path != "") {
|
|
|
+ RandomUtil.delete(path.toString());
|
|
|
+ session.removeAttribute("path");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
try {
|
|
|
String fileName = "导出项目清单"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
- List<Information> informationList = informationService.export(tList);
|
|
|
+ List<Information> informationList = informationService.findList(information);
|
|
|
new ExportExcel("导出项目清单", Information.class).setDataList(informationList).write(response, fileName).dispose();
|
|
|
j.setSuccess(true);
|
|
|
j.setMsg("导出成功!");
|
|
@@ -585,7 +617,6 @@ public class InformationController extends BaseController {
|
|
|
j.setSuccess(false);
|
|
|
j.setMsg("导出项目清单!失败信息:"+e.getMessage());
|
|
|
}
|
|
|
- }
|
|
|
return j;
|
|
|
}
|
|
|
|
|
@@ -602,26 +633,76 @@ public class InformationController extends BaseController {
|
|
|
String projectYear = "";
|
|
|
String firstUnits = "";
|
|
|
String secondUnits = "";
|
|
|
+ String firstFinish = "";
|
|
|
+ String extendedStatus = "";
|
|
|
+ String extendedTime = "";
|
|
|
+ String hiddenSign = "";
|
|
|
try {
|
|
|
projectId = request.getParameter("projectId");
|
|
|
+ projectId = new String(projectId.getBytes("iso8859-1"),"utf-8");
|
|
|
+ if (projectId.equals("")) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ String[] strArr = projectId.split("\\s+");
|
|
|
+ information.setAttrs(strArr);
|
|
|
+ }
|
|
|
projectName = request.getParameter("projectName");
|
|
|
projectName = new String(projectName.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectName(projectName);
|
|
|
projectType = request.getParameter("projectType");
|
|
|
projectType = new String(projectType.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectType(projectType);
|
|
|
projectYear = request.getParameter("projectYear");
|
|
|
projectYear = new String(projectYear.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setProjectType(projectYear);
|
|
|
firstUnits= request.getParameter("firstUnits");
|
|
|
firstUnits = new String(firstUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setFirstUnits(firstUnits);
|
|
|
secondUnits= request.getParameter("secondUnits");
|
|
|
secondUnits = new String(secondUnits.getBytes("iso8859-1"),"utf-8");
|
|
|
-
|
|
|
+ information.setSecondUnits(secondUnits);
|
|
|
+ firstFinish= request.getParameter("firstFinish");
|
|
|
+ firstFinish = new String(firstFinish.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setFirstFinish(firstFinish);
|
|
|
+ extendedStatus= request.getParameter("extendedStatus");
|
|
|
+ extendedStatus = new String(extendedStatus.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedStatus(extendedStatus);
|
|
|
+ extendedTime= request.getParameter("extendedTime");
|
|
|
+ extendedTime = new String(extendedTime.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setExtendedTime(extendedTime);
|
|
|
+ hiddenSign= request.getParameter("hiddenSign");
|
|
|
+ hiddenSign = new String(hiddenSign.getBytes("iso8859-1"),"utf-8");
|
|
|
+ information.setHiddenSign(hiddenSign);
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- HttpSession session = request.getSession();
|
|
|
- Object pathSession = session.getAttribute("path");
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
-
|
|
|
+ HttpSession session = request.getSession();
|
|
|
+ Object outPath = session.getAttribute("path");
|
|
|
+ if (hiddenSign.equals("不是第一次加载")) {
|
|
|
+ if (outPath !=null && !outPath.equals("")) {
|
|
|
+ List<Information> tList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ BufferedReader bufferedReader = null;
|
|
|
+ bufferedReader = new BufferedReader(new FileReader(outPath.toString()));
|
|
|
+ String string;
|
|
|
+ while ((string=bufferedReader.readLine()) != null){
|
|
|
+ Information information1 = new Information();
|
|
|
+ information1.setProjectId(string);
|
|
|
+ tList.add(information1);
|
|
|
+ }
|
|
|
+ bufferedReader.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ information.setFileList(tList);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (outPath != null && outPath != "") {
|
|
|
+ RandomUtil.delete(outPath.toString());
|
|
|
+ session.removeAttribute("path");
|
|
|
+ }
|
|
|
+ }
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
Template template=null;
|
|
|
File path = new File(this.getClass().getResource("/").getPath()+"/freemarker");
|
|
@@ -636,24 +717,7 @@ public class InformationController extends BaseController {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
Map<String,Object> data = new HashMap<>();
|
|
|
- List<Information> tList = new ArrayList<>();
|
|
|
- if (pathSession != null && pathSession != "") {
|
|
|
- BufferedReader bufferedReader = null;
|
|
|
- try {
|
|
|
- bufferedReader = new BufferedReader(new FileReader(pathSession.toString()));
|
|
|
- String string;
|
|
|
- while ((string = bufferedReader.readLine()) != null) {
|
|
|
- Information information1 = new Information();
|
|
|
- information1.setProjectId(string);
|
|
|
- tList.add(information1);
|
|
|
- }
|
|
|
- bufferedReader.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- List<Material> proId = materialService.findProId(tList);
|
|
|
- if (proId.size()!=0) {
|
|
|
- List<Information> informationList = materialService.proIdName(proId);
|
|
|
+ List<Information> informationList = informationService.findListWord(information);
|
|
|
for (int i = 0; i < informationList.size(); i++) {
|
|
|
stringBuilder.append(i + 1 + "." + informationList.get(i).getProjectName() + "(" + informationList.get(i).getProjectId() + ")");
|
|
|
Information information1 = informationList.get(i);
|
|
@@ -665,33 +729,6 @@ public class InformationController extends BaseController {
|
|
|
stringBuilder.append("<w:p></w:p>");
|
|
|
stringBuilder.append("<w:p></w:p>");
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- Information infor = new Information();
|
|
|
- infor.setProjectId(projectId);
|
|
|
- infor.setProjectName(projectName);
|
|
|
- infor.setProjectType(projectType);
|
|
|
- infor.setProjectYear(projectYear);
|
|
|
- infor.setFirstUnits(firstUnits);
|
|
|
- infor.setSecondUnits(secondUnits);
|
|
|
- tList.add(infor);
|
|
|
- List<Information> idByList = informationService.findIdByList(tList);
|
|
|
- List<Material> proId = materialService.findProId(idByList);
|
|
|
- if (proId.size()!=0) {
|
|
|
- List<Information> informationList = materialService.proIdName(proId);
|
|
|
- for (int i = 0; i < informationList.size(); i++) {
|
|
|
- stringBuilder.append(i + 1 + "." + informationList.get(i).getProjectName() + "(" + informationList.get(i).getProjectId() + ")");
|
|
|
- Information information1 = informationList.get(i);
|
|
|
- List<Material> mateial = materialService.findMateial(information1);
|
|
|
- for (int k = 0; k < mateial.size(); k++) {
|
|
|
- stringBuilder.append("<w:p></w:p>");
|
|
|
- stringBuilder.append(k + 1 + "." + mateial.get(k).getMaterialName() + "(" + mateial.get(k).getInforId() + "),出库数量为" + mateial.get(k).getOutboundNumber() + ",审定数量为" + mateial.get(k).getAuthorizedNumber() + ",由于原因" + mateial.get(k).getStatus() + ":" + mateial.get(k).getInfo() + ",已完成甲供物资领退料。");
|
|
|
- }
|
|
|
- stringBuilder.append("<w:p></w:p>");
|
|
|
- stringBuilder.append("<w:p></w:p>");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
data.put("mb",stringBuilder);
|
|
|
File docFile = new File(path+"\\甲供物资超欠供说明.doc");
|
|
|
FreemarkerUtil.generateFile(data,template,docFile);
|