Quellcode durchsuchen

Merge branch 'master' of http://192.168.2.4:3000/chengqiang/sg_audit

chengqiang vor 2 Jahren
Ursprung
Commit
f387b0e5bb
30 geänderte Dateien mit 3037 neuen und 259 gelöschten Zeilen
  1. 3 1
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/LiKuResourcePoolMapper.java
  2. 6 2
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/xml/LiKuResourcePoolMapper.xml
  3. 4 1
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/service/LiKuResourcePoolService.java
  4. 13 1
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/entity/MaterialReportDetails.java
  5. 145 9
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/utils/ExcelUtil.java
  6. 375 109
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/utils/ExportUtil.java
  7. 25 14
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/web/MaterialReportDetailsControllerTest.java
  8. 5 4
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/service/OnPassageMaterialsService.java
  9. 4 7
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/web/OnPassageMaterialsController.java
  10. 13 2
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/entity/PreferredMaterials.java
  11. 3 2
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/mapper/PreferredMaterialsMapper.java
  12. 10 2
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/mapper/xml/PreferredMaterialsMapper.xml
  13. 4 4
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/service/PreferredMaterialsService.java
  14. 31 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/standardMaterials/entity/StandardMaterials.java
  15. 14 2
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/standardMaterials/mapper/xml/StandardMaterialsMapper.xml
  16. 40 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/GoodsInfo.java
  17. 165 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/MaterialGoodsInfo.java
  18. 633 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/TransitMaterialGoods.java
  19. 35 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/mapper/TransitMaterialGoodsMapper.java
  20. 89 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/mapper/xml/TransitMaterialGoodsMapper.xml
  21. 149 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/service/TransitMaterialGoodsService.java
  22. 111 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/util/CreateSheetUtil.java
  23. 251 0
      src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/web/TransitMaterialGoodsController.java
  24. BIN
      src/main/resources/freemarker/excelmodel/materialReport02.xlsx
  25. 6 6
      src/main/webapp/webpage/modules/sg/annualMaterialReport/annualMaterialReportList.jsp
  26. 1 1
      src/main/webapp/webpage/modules/sg/balancedlibrary/materialReportDetails/MaterialReportDetailsList.js
  27. 62 55
      src/main/webapp/webpage/modules/sg/balancedlibrary/preferredMaterials/preferredMaterialsList.js
  28. 56 37
      src/main/webapp/webpage/modules/sg/balancedlibrary/standardMaterials/standardMaterialsList.js
  29. 707 0
      src/main/webapp/webpage/modules/sg/balancedlibrary/transitMaterialGoods/transitMaterialGoodsList.js
  30. 77 0
      src/main/webapp/webpage/modules/sg/balancedlibrary/transitMaterialGoods/transitMaterialGoodsList.jsp

+ 3 - 1
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/LiKuResourcePoolMapper.java

@@ -40,4 +40,6 @@ public interface LiKuResourcePoolMapper extends BaseMapper<LiKuResourcePool> {
      *
      * */
     void updateAllList(@Param("list") List<LiKuResourcePool> list);
-}
+
+    List<LiKuResourcePool> getAllPool();
+}

+ 6 - 2
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/xml/LiKuResourcePoolMapper.xml

@@ -137,7 +137,7 @@
 			#{delFlag}
 		)
 	</insert>
-	
+
 	<insert id="insertList">
 		insert into bla_resource_pool(
 		id,
@@ -268,4 +268,8 @@
 			</if>
 		</where>
 	</select>
-</mapper>
+    <select id="getAllPool"
+            resultType="com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool">
+		SELECT planner,materialCode,inventoryAmount,batch FROM `bla_resource_pool`
+	</select>
+</mapper>

+ 4 - 1
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/service/LiKuResourcePoolService.java

@@ -80,4 +80,7 @@ public class LiKuResourcePoolService extends CrudService<LiKuResourcePoolMapper,
 		mapper.updateAllList(list);
 	}
 
-}
+	public List<LiKuResourcePool> getAllPool(){
+		return mapper.getAllPool();
+	}
+}

+ 13 - 1
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/entity/MaterialReportDetails.java

@@ -221,7 +221,19 @@ public class MaterialReportDetails extends DataEntity<MaterialReportDetails> {
     private Double lengthOfMetre;//段长物资的长度(以米为单位)
     //枚举标识
     private AreaCodeFlagEnum areaCodeFlagEnum;
-/****************************************************************************************************************/
+
+    //备注文本
+    private String remarkText;
+
+    public String getRemarkText() {
+        return remarkText;
+    }
+
+    public void setRemarkText(String remarkText) {
+        this.remarkText = remarkText;
+    }
+
+    /****************************************************************************************************************/
 
     @ExcelField(title = "上报地区", align = 2, sort = 1)
     public String getReportingArea() {

+ 145 - 9
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/utils/ExcelUtil.java

@@ -7,7 +7,9 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.utils.Reflections;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.sg.balancedlibrary.materialQuota.entity.MaterialQuota;
+import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
 import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
 import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
@@ -18,7 +20,6 @@ import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.text.DecimalFormat;
 import java.text.NumberFormat;
@@ -168,7 +170,7 @@ public class ExcelUtil {
 		this.headerNum = headerNum;
 		log.debug("Initialize success.");
 	}
-	
+
 	/**
 	 * 获取行对象
 	 * @param rownum
@@ -185,7 +187,7 @@ public class ExcelUtil {
 	public int getDataRowNum(){
 		return headerNum+1;
 	}
-	
+
 	/**
 	 * 获取最后一个数据行号
 	 * @return
@@ -193,7 +195,7 @@ public class ExcelUtil {
 	public int getLastDataRowNum(){
 		return this.sheet.getLastRowNum()+headerNum;
 	}
-	
+
 	/**
 	 * 获取最后一个列号
 	 * @return
@@ -201,7 +203,7 @@ public class ExcelUtil {
 	public int getLastCellNum(){
 		return this.getRow(headerNum).getLastCellNum();
 	}
-	
+
 	/**
 	 * 获取单元格值
 	 * @param row 获取的行
@@ -292,7 +294,7 @@ public class ExcelUtil {
 		}
 		return val;
 	}
-	
+
 	/**
 	 * 获取导入数据列表
 	 * @param cls 导入对象类型
@@ -300,7 +302,7 @@ public class ExcelUtil {
 	 */
 	public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException{
 		List<Object[]> annotationList = Lists.newArrayList();
-		// Get annotation field 
+		// Get annotation field
 		Field[] fs = cls.getDeclaredFields();
 		for (Field f : fs){
 			ExcelField ef = f.getAnnotation(ExcelField.class);
@@ -404,7 +406,7 @@ public class ExcelUtil {
 							val = Float.valueOf(val.toString());
 						}else if (valType == Date.class){
 							SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
-							val=sdf.parse(val.toString()); 
+							val=sdf.parse(val.toString());
 						}else if (valType == User.class){
 							val = UserUtils.getByUserName(val.toString());
 						}else if (valType == Office.class){
@@ -415,7 +417,7 @@ public class ExcelUtil {
 							if (ef.fieldType() != Class.class){
 								val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString());
 							}else{
-								val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(), 
+								val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(),
 										"fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString());
 							}
 						}
@@ -525,6 +527,140 @@ public class ExcelUtil {
 	}
 
 	/**
+	 * 在途验证项目需求物资
+	 * @param standardList
+	 * @param preferredCodes
+	 * @param quotaList
+	 */
+	public void dealVerifyZt(List<StandardMaterials> standardList, List<String> preferredCodes,
+							 List<MaterialQuota> quotaList, List<TransitMaterialGoods> goodsList,
+							 List<MaterialInformation> materList, Map<String, String> reportPersonMap){
+		Map<String,StandardMaterials> standardMap = new HashMap<>();
+		for(StandardMaterials standard:standardList){
+			standardMap.put(standard.getMaterialCode(),standard);
+		}
+		Map<String,MaterialQuota> quotaMap = new HashMap<>();
+		for(MaterialQuota quota:quotaList){
+			quotaMap.put(quota.getMaterialCode(),quota);
+		}
+
+		//在途物资统计表 key=统计物料编码-部门 去重汇总统计
+		Map<String, BigDecimal> onPassageMaterialsMap = new HashMap<>();
+		//项目物资需求表 key=统计物料编码-部门 去重汇总统计
+		Map<String, BigDecimal> materialInformationMap = new HashMap<>();
+
+		//在途物资统计表 如果计划编制人为空存储
+		//Map<String, BigDecimal> isEmptyMap = new HashMap<>();
+
+		//在途物资统计表与项目物资需求表比较  在途物资统计表J列>=项目物资需求表H列 标识
+		List<String> flagList = new ArrayList<>();
+		/**************************************************************************/
+
+		//在途物资统计表 去重汇总统计
+		goodsList.forEach(opm -> {
+			if (com.jeeplus.common.utils.StringUtils.isBlank(opm.getContractCount())) {
+				opm.setContractCount("0");
+			}
+			//根据提报人 找到对应部门
+			String reportPersonOfDepartment = reportPersonMap.get(opm.getPlanner());
+			//如果没有部门 表示空部门 物料编码-部门
+			String key = "";
+			if (reportPersonOfDepartment == null) {
+				key = opm.getMaterialCode() + "-";
+			} else {
+				key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
+			}
+			if (onPassageMaterialsMap.containsKey(key)) {
+				onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()).add(onPassageMaterialsMap.get(key)));
+			} else {
+				if (com.jeeplus.common.utils.StringUtils.isNotBlank(opm.getMaterialCode())) {
+					onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
+				}
+			}
+		});
+
+		//项目物资需求表 去重汇总统计
+		materList.forEach(m -> {
+			if (com.jeeplus.common.utils.StringUtils.isBlank(m.getTotal())) {
+				m.setTotal("0");
+			}
+			//物料编码-部门
+			String key = m.getMaterialCode() + "-" + m.getReportingDepartment();
+			if (materialInformationMap.containsKey(key)) {
+				materialInformationMap.put(key, new BigDecimal(m.getTotal()).add(materialInformationMap.get(key)));
+			} else {
+				if (com.jeeplus.common.utils.StringUtils.isNotBlank(m.getMaterialCode())) {
+					materialInformationMap.put(key, new BigDecimal(m.getTotal()));
+				}
+			}
+		});
+		//两表比较 添加标识
+		materialInformationMap.forEach((k, v) -> {
+			if (onPassageMaterialsMap.containsKey(k)) {
+				if (onPassageMaterialsMap.get(k).compareTo(v) >= 0) {
+					flagList.add(k);
+				}
+			}
+		});
+		Map<String,String> test = new HashMap<>();
+		//根据标识在原表中追加备注
+		materList.forEach(l -> {
+			String key = l.getMaterialCode() + "-" + l.getReportingDepartment();
+			if (flagList.contains(key)) {
+				l.setRemarkText("在途已有" + onPassageMaterialsMap.get(key) + "单位,请核实本次需求");
+				test.put(l.getMaterialCode(),l.getRemarkText());
+			}
+		});
+
+
+		//处理标题行
+		Row title = sheet.getRow(1);
+		Cell cell14 = title.createCell(14);
+		Cell cell15 = title.createCell(15);
+		Cell cell16 = title.createCell(16);
+		Cell cell17 = title.createCell(17);
+		cell14.setCellValue("采购标准标识");
+		cell15.setCellValue("三级清单物料");
+		cell16.setCellValue("物资数量校验");
+		cell17.setCellValue("");
+		CellStyle cellStyle = title.getCell(13).getCellStyle();
+		cell14.setCellStyle(cellStyle);
+		cell15.setCellStyle(cellStyle);
+		cell16.setCellStyle(cellStyle);
+		cell17.setCellStyle(cellStyle);
+		//处理数据行
+		for(int i=2;i<=sheet.getLastRowNum();i++){
+			Row row = sheet.getRow(i);
+			String materialCode = row.getCell(2).getStringCellValue();
+			if(materialCode!=null&&!materialCode.isEmpty()){
+				Cell standardCell = row.createCell(14);
+				standardCell.setCellValue(standardMap.get(materialCode).getPurchaseStandardId());
+				Cell preferredCell = row.createCell(15);
+				if(preferredCodes.contains(materialCode)){
+					preferredCell.setCellValue("优选");
+				}else{
+					preferredCell.setCellValue("非优选");
+				}
+				Cell quotaCell = row.createCell(16);
+				Double number = row.getCell(7).getNumericCellValue();//物资需求数量
+				MaterialQuota quota = quotaMap.get(materialCode);
+				if(quota!=null){
+					Double quotaNum = quota.getQuota();
+					if(quotaNum!=null){
+						if(number!=null&& number>quotaNum){
+							quotaCell.setCellValue("超限额");
+						}
+					}
+				}
+				Cell bzCell = row.createCell(17);
+				if (test.get(materialCode) != null){
+					bzCell.setCellValue(test.get(materialCode));
+				}
+			}
+		}
+	}
+
+	/**
 	 * 将处理好的excel表保存到服务器上
 	 * @param sessionId
 	 * @throws IOException

+ 375 - 109
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/utils/ExportUtil.java

@@ -1,12 +1,13 @@
 package com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils;
 
 import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool;
+import com.jeeplus.modules.sg.balancedlibrary.materialQuota.entity.MaterialQuota;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.LikuDetail;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
-import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
-import com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget;
-import com.jeeplus.modules.sg.financial.settlement.util.MyExportUtil;
-import org.apache.poi.hssf.usermodel.HSSFFont;
+import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.entity.PreferredMaterials;
+import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.apache.poi.xssf.usermodel.XSSFFont;
@@ -14,10 +15,12 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
+import java.math.BigDecimal;
 import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 public class ExportUtil {
     private XSSFCellStyle style = null;
@@ -28,7 +31,7 @@ public class ExportUtil {
 
     public ExportUtil(){
         try {
-            String path = this.getClass().getResource("/").getPath() + "/freemarker/excelmodel/materialReport.xlsx";
+            String path = this.getClass().getResource("/").getPath() + "/freemarker/excelmodel/materialReport02.xlsx";
             File file = new File(path);
             InputStream inputStream = new FileInputStream(file);// 将excel文件转为输入流
             workbook = new XSSFWorkbook(inputStream);// 创建个workbook,
@@ -43,11 +46,109 @@ public class ExportUtil {
      * 导出费用检查管理
      * @param response
      */
-    public void exportDetails(HttpServletResponse response, List<MaterialReportDetails> reportList, List<LikuDetail> likuList){
+    public void exportDetails(HttpServletResponse response, List<MaterialReportDetails> reportList, List<LikuDetail> likuList,
+                              List<StandardMaterials> standardList,List<String> preferredCodes,
+                              List<MaterialQuota> quotaList,List<TransitMaterialGoods> goodsList,
+                              Map<String, String> reportPersonMap,List<PreferredMaterials> materialsList,
+                              List<LiKuResourcePool> poolList){
         OutputStream outputStream = null;
+
+        //利库map  批次
+        Map<String,LiKuResourcePool> likuMap = new HashMap();
+        for (LiKuResourcePool pool : poolList){
+            likuMap.put(pool.getBatch(),pool);
+        }
+
+        //标准物资map
+        Map<String,StandardMaterials> stanMater = new HashMap();
+        for (StandardMaterials materials : standardList){
+            stanMater.put(materials.getMaterialCode(),materials);
+        }
+        //优选物料map
+        Map<String,PreferredMaterials> preferMap = new HashMap();
+        for (PreferredMaterials materials : materialsList){
+            preferMap.put(materials.getMaterialCode(),materials);
+        }
+        //采购标准标识
+        /*Map<String,StandardMaterials> standardMap = new HashMap<>();
+        for(StandardMaterials standard:standardList){
+            standardMap.put(standard.getMaterialCode(),standard);
+        }*/
+        //物资数量校验
+        Map<String,MaterialQuota> quotaMap = new HashMap<>();
+        for(MaterialQuota quota:quotaList){
+            quotaMap.put(quota.getMaterialCode(),quota);
+        }
+        //在途物资统计校验
+        //在途物资统计表 key=统计物料编码-部门 去重汇总统计
+        Map<String, BigDecimal> onPassageMaterialsMap = new HashMap<>();
+        //项目物资需求表 key=统计物料编码-部门 去重汇总统计
+        Map<String, BigDecimal> materialInformationMap = new HashMap<>();
+        //在途物资统计表与项目物资需求表比较  在途物资统计表J列>=项目物资需求表H列 标识
+        List<String> flagList = new ArrayList<>();
+
+        //在途物资统计表 去重汇总统计
+        goodsList.forEach(opm -> {
+            if (com.jeeplus.common.utils.StringUtils.isBlank(opm.getContractCount())) {
+                opm.setContractCount("0");
+            }
+            //根据提报人 找到对应部门
+            String reportPersonOfDepartment = reportPersonMap.get(opm.getPlanner());
+            //如果没有部门 表示空部门 物料编码-部门
+            String key = "";
+            if (reportPersonOfDepartment == null) {
+                key = opm.getMaterialCode() + "-";
+            } else {
+                key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
+            }
+            if (onPassageMaterialsMap.containsKey(key)) {
+                onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()).add(onPassageMaterialsMap.get(key)));
+            } else {
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(opm.getMaterialCode())) {
+                    onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
+                }
+            }
+        });
+        //项目物资需求表 去重汇总统计
+        reportList.forEach(m -> {
+            if (com.jeeplus.common.utils.StringUtils.isBlank(m.getTotal().toString())) {
+                m.setTotal(0.0);
+            }
+            //物料编码-部门
+            if (m.getReportDepartment() == null){
+                m.setReportDepartment("");
+            }
+            String key = m.getMaterialCode() + "-" + m.getReportDepartment();
+//            likuCMap.put(key,m);
+            if (materialInformationMap.containsKey(key)) {
+                materialInformationMap.put(key, new BigDecimal(m.getTotal()).add(materialInformationMap.get(key)));
+            } else {
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(m.getMaterialCode())) {
+                    materialInformationMap.put(key, new BigDecimal(m.getTotal()));
+                }
+            }
+        });
+
+        //两表比较 添加标识
+        materialInformationMap.forEach((k, v) -> {
+            if (onPassageMaterialsMap.containsKey(k)) {
+                if (onPassageMaterialsMap.get(k).compareTo(v) >= 0) {
+                    flagList.add(k);
+                }
+            }
+        });
+        Map<String,String> test = new HashMap<>();
+        //根据标识在原表中追加备注
+        reportList.forEach(l -> {
+            String key = l.getMaterialCode() + "-" + l.getReportDepartment();
+            if (flagList.contains(key)) {
+                l.setRemarkText("在途已有" + onPassageMaterialsMap.get(key) + "单位,请核实本次需求");
+                test.put(l.getMaterialCode(),l.getRemarkText());
+            }
+        });
         try {
             int rowNum = 2;
-            //处理利库汇总情况
+            /*//处理利库汇总情况
             Sheet sheet1 = workbook.getSheetAt(0);
             if(reportList!=null&&reportList.size()>0){
                 for(int i=0;i<reportList.size();i++){
@@ -90,16 +191,18 @@ public class ExportUtil {
                     cell14.setCellValue(getDouble(report.getNumberOfApplications()));
 
                 }
-            }
+            }*/
+            //隐藏利库汇总情况sheet
+            workbook.setSheetHidden(workbook.getSheetIndex("利库汇总情况"),1);
             //利库明细情况
             Sheet sheet2 = workbook.getSheetAt(1);
             if(reportList!=null&&reportList.size()>0){
                 for(int i=0;i<reportList.size();i++){
                     MaterialReportDetails report = reportList.get(i);
                     //当利库数量不为0时 标红
-                    Double likuAmount = report.getNumberOfNiches();
+//                    Double likuAmount = report.getNumberOfNiches();
                     int color = 0;
-                    if(likuAmount>0) color=1;
+//                    if(likuAmount>0) color=1;
 
                     Row row = sheet2.createRow(rowNum+i);
                     Cell cell0 = crateCell(workbook,row,0,color); //上报地区
@@ -116,114 +219,247 @@ public class ExportUtil {
                     Cell cell11 = crateCell(workbook,row,11,color);//提报人
                     Cell cell12 = crateCell(workbook,row,12,color);//提报部门
                     Cell cell13 = crateCell(workbook,row,13,color); //备注
-                    Cell cell14 = crateCell(workbook,row,14,color); //利库数量
-                    Cell cell15 = crateCell(workbook,row,15,color); //利库金额
-                    Cell cell16 = crateCell(workbook,row,16,color); //申请数量
-                    Cell cell17 = crateCell(workbook,row,17,color); //本地利库批次号
-                    Cell cell18 = crateCell(workbook,row,18,color); //本地利库库存地
-                    Cell cell19 = crateCell(workbook,row,19,color); //本地利库数量
-                    Cell cell20 = crateCell(workbook,row,20,color); //跨区利库批次号
-                    Cell cell21 = crateCell(workbook,row,21,color); //跨区利库库存地
-                    Cell cell22 = crateCell(workbook,row,22,color); //跨区利库数量
-                    Cell cell23 = crateCell(workbook,row,23,color); //本地替代利库利库扩展编码
-                    Cell cell24 = crateCell(workbook,row,24,color); //本地替代利库利库扩展描述
-                    Cell cell25 = crateCell(workbook,row,25,color); //本地替代利库利库批次号
-                    Cell cell26 = crateCell(workbook,row,26,color); //本地替代利库利库库存地
-                    Cell cell27 = crateCell(workbook,row,27,color); //本地替代利库利库数量
-                    Cell cell28 = crateCell(workbook,row,28,color); //跨区替代利库利库扩展编码
-                    Cell cell29 = crateCell(workbook,row,29,color); //跨区替代利库利库扩展描述
-                    Cell cell30 = crateCell(workbook,row,30,color); //跨区替代利库利库批次号
-                    Cell cell31 = crateCell(workbook,row,31,color); //跨区替代利库利库库存地
-                    Cell cell32 = crateCell(workbook,row,32,color); //跨区替代利库利库数量
+                    Cell cell14 = crateCell(workbook,row,14,color); //标准物料  从bla_standard_materials表中获取     该表中物料编码字段唯一
+                    Cell cell15 = crateCell(workbook,row,15,color); //大类     从bla_standard_materials表中获取
+                    Cell cell16 = crateCell(workbook,row,16,color); //中类     从bla_standard_materials表中获取
+                    Cell cell17 = crateCell(workbook,row,17,color); //小类     从bla_standard_materials表中获取
+                    Cell cell18 = crateCell(workbook,row,18,color); //小类是否在清单内      从bla_preferred_materials表中获取区域字段    该表中物料编码字段唯一
+                    Cell cell19 = crateCell(workbook,row,19,color); //优选标识      从bla_preferred_materials表中获取三级清单物料字段
+                    Cell cell20 = crateCell(workbook,row,20,color); //在途说明      通过数据操作获取
+                    Cell cell21 = crateCell(workbook,row,21,color); //审核说明      通过数据操作获取
+                    Cell cell22 = crateCell(workbook,row,22,color); //意见反馈      空着
+                    Cell cell23 = crateCell(workbook,row,23,color); //库存计划编制人   从bla_resource_pool 表中获取计划编制人字段
+                    Cell cell24 = crateCell(workbook,row,24,color); //库存批次   由本地利库批次号、跨区利库批次号、本地替代利库利库批次号、跨区替代利库利库批次号拼接组成
+                    Cell cell25 = crateCell(workbook,row,25,color); //库存数量  从bla_resource_pool 表中获取库存数量字段
+                    Cell cell26 = crateCell(workbook,row,26,color); //库存地点  由本地利库库存地、跨区利库库存地、本地替代利库利库库存地、跨区替代利库利库库存地根据规则拼接
+                    Cell cell27 = crateCell(workbook,row,27,color); //利库数量
+                    Cell cell28 = crateCell(workbook,row,28,color); //申报数量
+                    Cell cell29 = crateCell(workbook,row,29,color); //本地利库批次号
+                    Cell cell30 = crateCell(workbook,row,30,color); //本地利库库存地
+                    Cell cell31 = crateCell(workbook,row,31,color); //本地利库数量
+                    Cell cell32 = crateCell(workbook,row,32,color); //跨区利库批次号
+                    Cell cell33 = crateCell(workbook,row,33,color); //跨区利库库存地
+                    Cell cell34 = crateCell(workbook,row,34,color); //跨区利库数量
+                    Cell cell35 = crateCell(workbook,row,35,color); //本地替代利库利库扩展编码
+                    Cell cell36 = crateCell(workbook,row,36,color); //本地替代利库利库扩展描述
+                    Cell cell37 = crateCell(workbook,row,37,color); //本地替代利库利库批次号
+                    Cell cell38 = crateCell(workbook,row,38,color); //本地替代利库利库库存地
+                    Cell cell39 = crateCell(workbook,row,39,color); //本地替代利库利库数量
+                    Cell cell40 = crateCell(workbook,row,40,color); //跨区替代利库利库扩展编码
+                    Cell cell41 = crateCell(workbook,row,41,color); //跨区替代利库利库扩展描述
+                    Cell cell42 = crateCell(workbook,row,42,color); //跨区替代利库利库批次号
+                    Cell cell43 = crateCell(workbook,row,43,color); //跨区替代利库利库库存地
+                    Cell cell44 = crateCell(workbook,row,44,color); //跨区替代利库利库数量
 
 
-                    cell0.setCellValue(getString(report.getReportingArea()));
-                    cell1.setCellValue(getString(report.getNameOfReserve()));
-                    cell2.setCellValue(getString(report.getMaterialCode()));
-                    cell3.setCellValue(getString(report.getMaterialName()));
-                    cell4.setCellValue(getString(report.getExtendedCoding()));
-                    cell5.setCellValue(getString(report.getExtendedDescription()));
-                    cell6.setCellValue(getString(report.getUnit()));
-                    cell7.setCellValue(getDouble(report.getTotal()));
-                    cell8.setCellValue(getString(report.getUnitWeight()));
-                    cell9.setCellValue(getString(report.getTotalWeight()));
-                    cell10.setCellValue(getString(report.getSupplied()));
+                    cell0.setCellValue(getString(report.getReportingArea()));//上报地区
+                    cell1.setCellValue(getString(report.getNameOfReserve()));//储备项目名称
+                    cell2.setCellValue(getString(report.getMaterialCode()));//物料编码
+                    cell3.setCellValue(getString(report.getMaterialName()));//物料名称
+                    cell4.setCellValue(getString(report.getExtendedCoding()));//扩展编码
+                    cell5.setCellValue(getString(report.getExtendedDescription()));//扩展描述
+                    cell6.setCellValue(getString(report.getUnit()));//单位
+                    cell7.setCellValue(getDouble(report.getTotal()));//总量
+                    cell8.setCellValue(getString(report.getUnitWeight()));//单重
+                    cell9.setCellValue(getString(report.getTotalWeight()));//总重
+                    cell10.setCellValue(getString(report.getSupplied()));//甲乙供
                     cell11.setCellValue(getString(report.getReportPerson()));//提报人
                     cell12.setCellValue(getString(report.getReportDepartment()));//提报部门
                     cell13.setCellValue(getString(report.getRemark()));//备注
-                    cell14.setCellValue(getDouble(report.getNumberOfNiches()));
-                    cell15.setCellValue(getString(report.getLiKuAmount()));//利库金额
-                    cell16.setCellValue(getDouble(report.getNumberOfApplications()));
-                    cell17.setCellValue(getString(report.getLocalWareBatch()));
-                    cell18.setCellValue(getString(report.getLocalWareHouse()));
-                    cell19.setCellValue(getString(report.getNumberOfLocal()));
-                    cell20.setCellValue(getString(report.getRegionalBatch()));
-                    cell21.setCellValue(getString(report.getRegionalHouse()));
-                    cell22.setCellValue(getString(report.getNumberOfRegional()));
-                    cell23.setCellValue(getString(report.getLocalReplacementExtendedCoding()));
-                    cell24.setCellValue(getString(report.getLocalReplacementExtendedDescription()));
-                    cell25.setCellValue(getString(report.getLocalReplacementBatch()));
-                    cell26.setCellValue(getString(report.getLocalReplacementHouse()));
-                    cell27.setCellValue(getString(report.getLocalReplacementNumber()));
-                    cell28.setCellValue(getString(report.getRegionalReplacementExtendedCoding()));
-                    cell29.setCellValue(getString(report.getRegionalReplacementExtendedDescription()));
-                    cell30.setCellValue(getString(report.getRegionalReplacementBatch()));
-                    cell31.setCellValue(getString(report.getRegionalReplacementHouse()));
-                    cell32.setCellValue(getString(report.getRegionalReplacementNumber()));
+                    //标准物料、大类、中类、小类
+                    cell14.setCellValue(stanMater.get(report.getMaterialCode()).getPurchaseStandardId());
+                    cell15.setCellValue(stanMater.get(report.getMaterialCode()).getBigCategoryDescript());
+                    cell16.setCellValue(stanMater.get(report.getMaterialCode()).getMiddleCategoryDescript());
+                    cell17.setCellValue(stanMater.get(report.getMaterialCode()).getSmallCategoryDescript());
+                    //小类是否在清单内(区域)、优选标识
+                    PreferredMaterials materials = preferMap.get(report.getMaterialCode());
+                    if (materials != null){
+                        cell18.setCellValue(preferMap.get(report.getMaterialCode()).getArea());
+                    }
+                    if (preferredCodes.contains(report.getMaterialCode())){
+                        cell19.setCellValue("优选");
+                    }else {
+                        cell19.setCellValue("非优选");
+                    }
+//                    cell19.setCellValue(preferMap.get(report.getMaterialCode()).getThirdClassList());
+                    //在途说明、审核说明、意见反馈
+                    cell20.setCellValue(test.get(report.getMaterialCode()));
+                    MaterialQuota quota = quotaMap.get(report.getMaterialCode());
+                    if(quota!=null){
+                        Double quotaNum = quota.getQuota();
+                        if(quotaNum!=null){
+                            if(report.getTotal()!=null&& report.getTotal()>quotaNum){
+                               cell21.setCellValue("超限额");
+                            }
+                        }
+                    }
+                    cell22.setCellValue("");
+
+                    //库存批次 由本地利库批次号、跨区利库批次号、本地替代利库利库批次号、跨区替代利库利库批次号拼接组成
+                    String pc = changeVal02(report.getLocalWareBatch())
+                            + changeVal02(report.getRegionalBatch())
+                            + changeVal02(report.getLocalReplacementBatch())
+                            + changeVal02(report.getRegionalReplacementBatch());
+                    cell24.setCellValue(pc);
+                    //库存计划编制人
+                    LiKuResourcePool liKuResourcePool = likuMap.get(pc);
+                    if (liKuResourcePool != null){
+                        cell23.setCellValue(liKuResourcePool.getPlanner());
+                    }
+                    //库存数量
+                    if (liKuResourcePool != null){
+                        cell25.setCellValue(liKuResourcePool.getInventoryAmount());
+                    }
+                    //库存地点  由本地利库库存地、跨区利库库存地、本地替代利库利库库存地、跨区替代利库利库库存地根据规则拼接
+                    String area = changeVal(report.getLocalWareHouse()) + "-" + changeVal(report.getRegionalHouse()) + "-" +
+                            changeVal(report.getLocalReplacementHouse()) + "-" + changeVal(report.getRegionalReplacementHouse());
+                    cell26.setCellValue(area);
+
+                    cell27.setCellValue(getDouble(report.getNumberOfNiches()));//利库数量
+                    cell28.setCellValue(getDouble(report.getNumberOfApplications()));//申报数量
+                    cell29.setCellValue(getString(report.getLocalWareBatch()));
+                    cell30.setCellValue(getString(report.getLocalWareHouse()));
+                    cell31.setCellValue(getString(report.getNumberOfLocal()));
+                    cell32.setCellValue(getString(report.getRegionalBatch()));
+                    cell33.setCellValue(getString(report.getRegionalHouse()));
+                    cell34.setCellValue(getString(report.getNumberOfRegional()));
+                    cell35.setCellValue(getString(report.getLocalReplacementExtendedCoding()));
+                    cell36.setCellValue(getString(report.getLocalReplacementExtendedDescription()));
+                    cell37.setCellValue(getString(report.getLocalReplacementBatch()));
+                    cell38.setCellValue(getString(report.getLocalReplacementHouse()));
+                    cell39.setCellValue(getString(report.getLocalReplacementNumber()));
+                    cell40.setCellValue(getString(report.getRegionalReplacementExtendedCoding()));
+                    cell41.setCellValue(getString(report.getRegionalReplacementExtendedDescription()));
+                    cell42.setCellValue(getString(report.getRegionalReplacementBatch()));
+                    cell43.setCellValue(getString(report.getRegionalReplacementHouse()));
+                    cell44.setCellValue(getString(report.getRegionalReplacementNumber()));
                 }
             }
-            /*if(likuList!=null&&likuList.size()>0){
-                for(int i=0;i<likuList.size();i++){
-                    LikuDetail liku = likuList.get(i);
-                    int color = 0;
-                    Row row = sheet2.createRow(rowNum+i);
-                    Cell cell0 = crateCell(workbook,row,0,color); //上报地区
-                    Cell cell1 = crateCell(workbook,row,1,color); //储备项目名称
-                    Cell cell2 = crateCell(workbook,row,2,color); //物料编码
-                    Cell cell3 = crateCell(workbook,row,3,color); //物料名称
-                    Cell cell4 = crateCell(workbook,row,4,color); //扩展编码
-                    Cell cell5 = crateCell(workbook,row,5,color); //扩展描述
-                    Cell cell6 = crateCell(workbook,row,6,color); //单位
-                    Cell cell7 = crateCell(workbook,row,7,color); //总量
-                    Cell cell8 = crateCell(workbook,row,8,color); //单重
-                    Cell cell9 = crateCell(workbook,row,9,color); //总重
-                    Cell cell10 = crateCell(workbook,row,10,color); //甲乙供
-                    Cell cell11 = crateCell(workbook,row,11,color); //利库数量
-                    Cell cell12 = crateCell(workbook,row,12,color); //申请数量
-                    Cell cell13 = crateCell(workbook,row,13,color); //利库类型
-                    Cell cell14 = crateCell(workbook,row,14,color); //利库批次号
-                    Cell cell15 = crateCell(workbook,row,15,color); //利库库存地
-                    Cell cell16 = crateCell(workbook,row,16,color); //利库明细数量
-
-
-                    cell0.setCellValue(getString(liku.getReportingArea()));
-                    cell1.setCellValue(getString(liku.getNameOfReserve()));
-                    cell2.setCellValue(getString(liku.getMaterialCode()));
-                    cell3.setCellValue(getString(liku.getMaterialName()));
-                    cell4.setCellValue(getString(liku.getExtendedCoding()));
-                    cell5.setCellValue(getString(liku.getExtendedDescription()));
-                    cell6.setCellValue(getString(liku.getUnit()));
-                    cell7.setCellValue(getDouble(liku.getTotal()));
-                    cell8.setCellValue(getString(liku.getUnitWeight()));
-                    cell9.setCellValue(getString(liku.getTotalWeight()));
-                    cell10.setCellValue(getString(liku.getSupplied()));
-                    //当利库数量=利库明细数量 表明这条记录只有一个利库明细数据
-                    if(liku.getNumberOfNiches().equals(liku.getNumberNiches())){
-                        cell11.setCellValue(getDouble(liku.getNumberOfNiches()));
-                        cell12.setCellValue(getDouble(liku.getNumberOfApplications()));
+            //创建一个新的sheet
+            /*//表头
+            String []title = {"上报地区","储备项目名称","物料编码","物料名称","扩展编码","扩展描述","单位","总量",
+                                "单重/kg","总重/吨","甲乙供","提报人","提报部门","备注","采购标准标识","三级清单物料",
+                                "物资数量校验","在途物资统计校验"};
+            //获取数据
+            //采购标准标识
+            Map<String,StandardMaterials> standardMap = new HashMap<>();
+            for(StandardMaterials standard:standardList){
+                standardMap.put(standard.getMaterialCode(),standard);
+            }
+            //三级清单物料
+            Map<String,MaterialQuota> quotaMap = new HashMap<>();
+            for(MaterialQuota quota:quotaList){
+                quotaMap.put(quota.getMaterialCode(),quota);
+            }
+            //在途物资统计校验
+            //在途物资统计表 key=统计物料编码-部门 去重汇总统计
+            Map<String, BigDecimal> onPassageMaterialsMap = new HashMap<>();
+            //项目物资需求表 key=统计物料编码-部门 去重汇总统计
+            Map<String, BigDecimal> materialInformationMap = new HashMap<>();
+            //在途物资统计表与项目物资需求表比较  在途物资统计表J列>=项目物资需求表H列 标识
+            List<String> flagList = new ArrayList<>();
+            //在途物资统计表 去重汇总统计
+            goodsList.forEach(opm -> {
+                if (com.jeeplus.common.utils.StringUtils.isBlank(opm.getContractCount())) {
+                    opm.setContractCount("0");
+                }
+                //根据提报人 找到对应部门
+                String reportPersonOfDepartment = reportPersonMap.get(opm.getPlanner());
+                //如果没有部门 表示空部门 物料编码-部门
+                String key = "";
+                if (reportPersonOfDepartment == null) {
+                    key = opm.getMaterialCode() + "-";
+                } else {
+                    key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
+                }
+                if (onPassageMaterialsMap.containsKey(key)) {
+                    onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()).add(onPassageMaterialsMap.get(key)));
+                } else {
+                    if (com.jeeplus.common.utils.StringUtils.isNotBlank(opm.getMaterialCode())) {
+                        onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
                     }
-                    cell13.setCellValue(getString(liku.getComparisonType()));
-                    cell14.setCellValue(getString(liku.getBatch()));
-                    cell15.setCellValue(getString(liku.getWarehouse()));
-                    //段长类要加第几段
-                    if(liku.getSegBelongs() == null){
-                        cell16.setCellValue(getDouble(liku.getNumberNiches()));
-                    }else{
-                        cell16.setCellValue(liku.getNumberNiches()+" 第"+liku.getSegBelongs()+"段");
+                }
+            });
+            //项目物资需求表 去重汇总统计
+            reportList.forEach(m -> {
+                if (com.jeeplus.common.utils.StringUtils.isBlank(m.getTotal().toString())) {
+                    m.setTotal(0.0);
+                }
+                //物料编码-部门
+                if (m.getReportDepartment() == null){
+                    m.setReportDepartment("");
+                }
+                String key = m.getMaterialCode() + "-" + m.getReportDepartment();
+                if (materialInformationMap.containsKey(key)) {
+                    materialInformationMap.put(key, new BigDecimal(m.getTotal()).add(materialInformationMap.get(key)));
+                } else {
+                    if (com.jeeplus.common.utils.StringUtils.isNotBlank(m.getMaterialCode())) {
+                        materialInformationMap.put(key, new BigDecimal(m.getTotal()));
                     }
+                }
+            });
 
+            //两表比较 添加标识
+            materialInformationMap.forEach((k, v) -> {
+                if (onPassageMaterialsMap.containsKey(k)) {
+                    if (onPassageMaterialsMap.get(k).compareTo(v) >= 0) {
+                        flagList.add(k);
+                    }
+                }
+            });
+            Map<String,String> test = new HashMap<>();
+            //根据标识在原表中追加备注
+            reportList.forEach(l -> {
+                String key = l.getMaterialCode() + "-" + l.getReportDepartment();
+                if (flagList.contains(key)) {
+                    l.setRemarkText("在途已有" + onPassageMaterialsMap.get(key) + "单位,请核实本次需求");
+                    test.put(l.getMaterialCode(),l.getRemarkText());
+                }
+            });
+
+            //赋值操作
+            String [][] content = new String[reportList.size()][18];
+            for (int i=0;i<reportList.size();i++){
+                content[i] = new String[title.length];
+                MaterialReportDetails mater = reportList.get(i);
+                content[i][0] = mater.getReportingArea();
+                content[i][1] = mater.getNameOfReserve();
+                content[i][2] = mater.getMaterialCode();
+                content[i][3] = mater.getMaterialName();
+                content[i][4] = mater.getExtendedCoding();
+                content[i][5] = mater.getExtendedDescription();
+                content[i][6] = mater.getUnit();
+                content[i][7] = mater.getTotal().toString();
+                content[i][8] = mater.getUnitWeight();
+                content[i][9] = mater.getTotalWeight();
+                content[i][10] = mater.getSupplied();
+                content[i][11] = mater.getReportPerson();
+                content[i][12] = mater.getReportDepartment();
+                content[i][13] = mater.getRemark();
+                content[i][14] = standardMap.get(mater.getMaterialCode()).getPurchaseStandardId();//采购标准标识
+                if (preferredCodes.contains(mater.getMaterialCode())){
+                    content[i][15] = "优选";//三级清单物料
+                }else {
+                    content[i][15] = "非优选";//三级清单物料
+                }
+                MaterialQuota quota = quotaMap.get(mater.getMaterialCode());
+                if(quota!=null){
+                    Double quotaNum = quota.getQuota();
+                    if(quotaNum!=null){
+                        if(mater.getTotal()!=null&& mater.getTotal()>quotaNum){
+                            content[i][16] = "超限额";
+                        }
+                    }
+                }
+                if (test.get(mater.getMaterialCode()) != null){
+                    content[i][17] = test.get(mater.getMaterialCode());
                 }
-            }*/
+
+            }
+
+            CreateSheetUtil util = new CreateSheetUtil();
+            util.createSheet("export",title,content,workbook,reportList,standardList,preferredCodes,quotaList,goodsList,reportPersonMap);
+*/
 
             String fileName = "物资上报利库情况表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
             String str = URLEncoder.encode(fileName, "UTF8");
@@ -320,4 +556,34 @@ public class ExportUtil {
         return returnStr;
     }
 
+    public static String changeVal(String val){
+        if (val != null){
+            switch (val){
+                case "HLA2":
+                    val="镇江";
+                    break;
+                case "HLB1":
+                    val="丹阳";
+                    break;
+                case "HLC1":
+                    val="句容";
+                    break;
+                case "HLD1":
+                    val="扬中";
+                    break;
+                default:
+                    break;
+            }
+            return val;
+        }else {
+            return "";
+        }
+    }
+
+    public static String changeVal02(String val){
+        if (val==null){
+            val="";
+        }
+        return val;
+    }
 }

+ 25 - 14
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/web/MaterialReportDetailsControllerTest.java

@@ -5,7 +5,6 @@ package com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.web;
 
 import com.google.common.collect.Lists;
 import com.jeeplus.common.json.AjaxJson;
-import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.core.persistence.Page;
@@ -17,7 +16,6 @@ import com.jeeplus.modules.sg.balancedlibrary.materialQuota.entity.MaterialQuota
 import com.jeeplus.modules.sg.balancedlibrary.materialQuota.service.MaterialQuotaService;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.CompareHistory;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.LikuDetail;
-import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialDetails;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.service.CompareHistoryService;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.service.MaterialReportDetailsService;
@@ -25,18 +23,16 @@ import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.Adjust
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.ExcelUtil;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.ExportUtil;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.ImportExcel;
-import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
+import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.entity.PreferredMaterials;
 import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.service.PreferredMaterialsService;
 import com.jeeplus.modules.sg.balancedlibrary.replaceMaterial.entity.ReplaceMaterial;
 import com.jeeplus.modules.sg.balancedlibrary.replaceMaterial.service.ReplaceMaterialService;
 import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
 import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.service.StandardMaterialsService;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.service.TransitMaterialGoodsService;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ValidationUtils;
-import com.jeeplus.modules.sg.managementcenter.materialproject.entity.MaterialProject;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -49,16 +45,15 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.resource.spi.work.Work;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-import java.io.*;
-import java.math.BigDecimal;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.*;
 
-import static java.math.BigDecimal.ROUND_HALF_UP;
-
 /**
  * 物资上报明细Controller
  *
@@ -90,6 +85,9 @@ public class MaterialReportDetailsControllerTest extends BaseController {
     @Autowired
     private StandardMaterialsService standardMaterialsService;
 
+    @Autowired
+    private TransitMaterialGoodsService goodsService;
+
     @ModelAttribute
     public MaterialReportDetails get(@RequestParam(required = false) String id) {
         MaterialReportDetails entity = null;
@@ -223,8 +221,21 @@ public class MaterialReportDetailsControllerTest extends BaseController {
         entity.setPage(null);
         List<MaterialReportDetails> reportList = service.findList(entity);
         List<LikuDetail> likuList = service.getLikuDetails(entity);
+
+        //sheet3所需数据
+        List<StandardMaterials> standardList = standardMaterialsService.findAllList(new StandardMaterials());
+        List<String> preferredCodes = preferredMaterialsService.findAllCodes();
+        List<MaterialQuota> quotaList = materialQuotaService.findAllList(new MaterialQuota());
+        List<TransitMaterialGoods> goodsList = goodsService.getAllGoods();
+        //从数据库中获取所有的提报人与部门
+        Map<String, String> reportPersonMap = goodsService.getReportPerson();
+        //从数据库中获取bla_preferred_materials优选物料信息
+        List<PreferredMaterials> materialsList = preferredMaterialsService.findAllMater();
+        //获取利库资源池的计划编制人、物料编码、总数量
+        List<LiKuResourcePool> poolList = poolService.getAllPool();
+
         ExportUtil util = new ExportUtil();
-        util.exportDetails(response,reportList,likuList);
+        util.exportDetails(response,reportList,likuList,standardList,preferredCodes,quotaList,goodsList,reportPersonMap,materialsList,poolList);
     }
 
     /**
@@ -1019,4 +1030,4 @@ public class MaterialReportDetailsControllerTest extends BaseController {
     }
 
 
-}
+}

+ 5 - 4
src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/service/OnPassageMaterialsService.java

@@ -10,14 +10,15 @@ import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.OnPassag
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.mapper.OnPassageMaterialsMapper;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
-import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -147,4 +148,4 @@ public class OnPassageMaterialsService extends CrudService<OnPassageMaterialsMap
         return map;
     }
 
-}
+}

+ 4 - 7
src/main/java/com/jeeplus/modules/sg/balancedlibrary/onPassageMaterials/web/OnPassageMaterialsController.java

@@ -6,15 +6,13 @@ package com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.web;
 
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.OnPassageMaterials;
 import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.service.OnPassageMaterialsService;
-import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
-import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.service.ReportPersonService;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -27,8 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.*;
+import java.util.List;
 
 /**
  * 在途物资Controller
@@ -97,4 +94,4 @@ public class OnPassageMaterialsController extends BaseController {
     }
 
 
-}
+}

+ 13 - 2
src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/entity/PreferredMaterials.java

@@ -18,6 +18,8 @@ public class PreferredMaterials extends DataEntity<PreferredMaterials> {
 
     private String extendDesc;//扩展描述
 
+    private String area;//区域
+
     private String thirdClassList;//三级清单物料(是否优选)
 
     private String subclassDesc;//小类描述
@@ -58,7 +60,16 @@ public class PreferredMaterials extends DataEntity<PreferredMaterials> {
         this.extendDesc = extendDesc;
     }
 
-    @ExcelField(title = "三级清单物料", align = 2, sort = 5)
+    @ExcelField(title = "区域", align = 2, sort = 5)
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    @ExcelField(title = "三级清单物料", align = 2, sort = 6)
     public String getThirdClassList() {
         return thirdClassList;
     }
@@ -67,7 +78,7 @@ public class PreferredMaterials extends DataEntity<PreferredMaterials> {
         this.thirdClassList = thirdClassList;
     }
 
-    @ExcelField(title = "小类描述", align = 2, sort = 6)
+    @ExcelField(title = "小类描述", align = 2, sort = 7)
     public String getSubclassDesc() {
         return subclassDesc;
     }

+ 3 - 2
src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/mapper/PreferredMaterialsMapper.java

@@ -5,7 +5,6 @@ package com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.mapper;
 
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
-import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool;
 import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.entity.PreferredMaterials;
 import org.apache.ibatis.annotations.Param;
 
@@ -36,4 +35,6 @@ public interface PreferredMaterialsMapper extends BaseMapper<PreferredMaterials>
     void delList(@Param("list") List<String> list);
 
     List<String> findAllCodes();
-}
+
+    List<PreferredMaterials> findAllMater();
+}

+ 10 - 2
src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/mapper/xml/PreferredMaterialsMapper.xml

@@ -11,6 +11,7 @@
 		a.material_desc AS "materialDesc",
 		a.extend_code AS "extendCode",
 		a.extend_desc AS "extendDesc",
+		a.area AS "area",
 		a.third_class_list AS "thirdClassList",
 		a.subclass_desc AS "subclassDesc"
 	</sql>
@@ -59,7 +60,12 @@
 		</where>
 	</select>
 
-	
+	<select id="findAllMater"
+			resultType="com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.entity.PreferredMaterials">
+		SELECT material_code,area,third_class_list FROM `bla_preferred_materials`
+	</select>
+
+
 	<insert id="insertList">
 		insert into bla_preferred_materials(
 		id,
@@ -72,6 +78,7 @@
 		material_desc,
 		extend_code,
 		extend_desc,
+		area,
 		third_class_list,
 		subclass_desc
 		)VALUES
@@ -87,6 +94,7 @@
 			#{item.materialDesc},
 			#{item.extendCode},
 			#{item.extendDesc},
+			#{item.area},
 			#{item.thirdClassList},
 			#{item.subclassDesc}
 			)
@@ -112,4 +120,4 @@
 
 
 
-</mapper>
+</mapper>

+ 4 - 4
src/main/java/com/jeeplus/modules/sg/balancedlibrary/preferredMaterials/service/PreferredMaterialsService.java

@@ -5,11 +5,8 @@ package com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.service;
 
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
-import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool;
-import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.mapper.LiKuResourcePoolMapper;
 import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.entity.PreferredMaterials;
 import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.mapper.PreferredMaterialsMapper;
-import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -84,4 +81,7 @@ public class PreferredMaterialsService extends CrudService<PreferredMaterialsMap
 		return mapper.findAllCodes();
 	}
 
-}
+	public List<PreferredMaterials> findAllMater(){
+		return mapper.findAllMater();
+	}
+}

+ 31 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/standardMaterials/entity/StandardMaterials.java

@@ -19,6 +19,15 @@ public class StandardMaterials extends DataEntity<StandardMaterials> {
     //采购标准标识
     private String purchaseStandardId;
 
+    //大类描述
+    private String bigCategoryDescript;
+
+    //中类描述
+    private String middleCategoryDescript;
+
+    //小类描述
+    private String smallCategoryDescript;
+
     @ExcelField(title = "物料编码", align = 2, sort = 1)
     public String getMaterialCode() {
         return materialCode;
@@ -45,6 +54,28 @@ public class StandardMaterials extends DataEntity<StandardMaterials> {
     public void setPurchaseStandardId(String purchaseStandardId) {
         this.purchaseStandardId = purchaseStandardId;
     }
+    @ExcelField(title = "大类描述", align = 2, sort = 4)
+    public String getBigCategoryDescript() {
+        return bigCategoryDescript;
+    }
+
+    public void setBigCategoryDescript(String bigCategoryDescript) {
+        this.bigCategoryDescript = bigCategoryDescript;
+    }
+    @ExcelField(title = "中类描述", align = 2, sort = 5)
+    public String getMiddleCategoryDescript() {
+        return middleCategoryDescript;
+    }
 
+    public void setMiddleCategoryDescript(String middleCategoryDescript) {
+        this.middleCategoryDescript = middleCategoryDescript;
+    }
+    @ExcelField(title = "小类描述", align = 2, sort = 6)
+    public String getSmallCategoryDescript() {
+        return smallCategoryDescript;
+    }
 
+    public void setSmallCategoryDescript(String smallCategoryDescript) {
+        this.smallCategoryDescript = smallCategoryDescript;
+    }
 }

+ 14 - 2
src/main/java/com/jeeplus/modules/sg/balancedlibrary/standardMaterials/mapper/xml/StandardMaterialsMapper.xml

@@ -5,6 +5,9 @@
 		a.material_code AS "materialCode",
 		a.material_desc AS "materialDesc",
 		a.purchase_standard_id AS "purchaseStandardId",
+		a.bigCategoryDescript AS "bigCategoryDescript",
+		a.middleCategoryDescript AS "middleCategoryDescript",
+		a.smallCategoryDescript AS "smallCategoryDescript",
 		a.id AS "id",
 		a.create_by AS "createBy.id",
 		a.create_date AS "createDate",
@@ -44,7 +47,10 @@
 	<select id="findAllList" resultType="StandardMaterials" >
 		SELECT
 			a.material_code AS "materialCode",
-			a.purchase_standard_id AS "purchaseStandardId"
+			a.purchase_standard_id AS "purchaseStandardId",
+			a.bigCategoryDescript AS "bigCategoryDescript",
+			a.middleCategoryDescript AS "middleCategoryDescript",
+			a.smallCategoryDescript AS "smallCategoryDescript"
 		FROM bla_standard_materials a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
@@ -60,6 +66,9 @@
 		material_code,
 		material_desc,
 		purchase_standard_id,
+		bigCategoryDescript,
+		middleCategoryDescript,
+		smallCategoryDescript,
 		create_by,
 		create_date,
 		update_by,
@@ -72,6 +81,9 @@
 			#{item.materialCode},
 			#{item.materialDesc},
 			#{item.purchaseStandardId},
+			#{item.bigCategoryDescript},
+			#{item.middleCategoryDescript},
+			#{item.smallCategoryDescript},
 			#{item.createBy.id},
 			#{item.createDate},
 			#{item.updateBy.id},
@@ -97,4 +109,4 @@
 	</update>
 
 
-</mapper>
+</mapper>

+ 40 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/GoodsInfo.java

@@ -0,0 +1,40 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 导出在途物资
+ * @author: 王强
+ * @create: 2022-08-31 16:13
+ **/
+public class GoodsInfo extends DataEntity<GoodsInfo> {
+    private String materialCode;    //物料编码
+    private String contractCount;   //合同数量
+    private String planner;         //计划编制人
+
+    @ExcelField(title = "物料编码", align = 2, sort = 1)
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+    @ExcelField(title = "合同数量", align = 2, sort = 2)
+    public String getContractCount() {
+        return contractCount;
+    }
+
+    public void setContractCount(String contractCount) {
+        this.contractCount = contractCount;
+    }
+    @ExcelField(title = "计划编制人", align = 2, sort = 3)
+    public String getPlanner() {
+        return planner;
+    }
+
+    public void setPlanner(String planner) {
+        this.planner = planner;
+    }
+}

+ 165 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/MaterialGoodsInfo.java

@@ -0,0 +1,165 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 物料信息
+ * @author: 王强
+ * @create: 2022-08-30 14:05
+ **/
+public class MaterialGoodsInfo extends DataEntity<MaterialGoodsInfo> {
+
+    //上报地区
+    private String reportingArea;
+    //储备项目名称
+    private String reserveItemName;
+    //物料编码
+    private String materialCode;
+    //物料名称
+    private String materialName;
+    //扩展编码
+    private String extendedEncode;
+    //扩展描述
+    private String extendedDescription;
+    //单位
+    private String unit;
+    //总量
+    private String total;
+    //单重/kg
+    private String singleWeightKg;
+    //总重/吨
+    private String grossWeightTons;
+    //甲乙供
+    private String aAndB;
+    //提报人
+    private String planner;
+    //提报部门
+    private String reportingDepartment;
+    //备注
+    private String remark;
+    //备注文本
+    private String remarkText;
+
+    public void setReportingArea(String reportingArea) {
+        this.reportingArea = reportingArea;
+    }
+
+    public void setReserveItemName(String reserveItemName) {
+        this.reserveItemName = reserveItemName;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public void setExtendedEncode(String extendedEncode) {
+        this.extendedEncode = extendedEncode;
+    }
+
+    public void setExtendedDescription(String extendedDescription) {
+        this.extendedDescription = extendedDescription;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    public void setTotal(String total) {
+        this.total = total;
+    }
+
+    public void setSingleWeightKg(String singleWeightKg) {
+        this.singleWeightKg = singleWeightKg;
+    }
+
+    public void setGrossWeightTons(String grossWeightTons) {
+        this.grossWeightTons = grossWeightTons;
+    }
+
+    public void setaAndB(String aAndB) {
+        this.aAndB = aAndB;
+    }
+
+    public void setPlanner(String planner) {
+        this.planner = planner;
+    }
+
+    public void setReportingDepartment(String reportingDepartment) {
+        this.reportingDepartment = reportingDepartment;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public void setRemarkText(String remarkText) {
+        this.remarkText = remarkText;
+    }
+
+    @ExcelField(title = "上报地区", align = 2, sort = 1)
+    public String getReportingArea() {
+        return reportingArea;
+    }
+    @ExcelField(title = "储备项目名称", align = 2, sort = 2)
+    public String getReserveItemName() {
+        return reserveItemName;
+    }
+    @ExcelField(title = "物料编码", align = 2, sort = 3)
+    public String getMaterialCode() {
+        return materialCode;
+    }
+    @ExcelField(title = "物料名称", align = 2, sort = 4)
+    public String getMaterialName() {
+        return materialName;
+    }
+    @ExcelField(title = "扩展编码", align = 2, sort = 5)
+    public String getExtendedEncode() {
+        return extendedEncode;
+    }
+    @ExcelField(title = "扩展描述", align = 2, sort = 6)
+    public String getExtendedDescription() {
+        return extendedDescription;
+    }
+    @ExcelField(title = "单位", align = 2, sort = 7)
+    public String getUnit() {
+        return unit;
+    }
+    @ExcelField(title = "总量", align = 2, sort = 8)
+    public String getTotal() {
+        return total;
+    }
+    @ExcelField(title = "单重/kg", align = 2, sort = 9)
+    public String getSingleWeightKg() {
+        return singleWeightKg;
+    }
+    @ExcelField(title = "总重/吨", align = 2, sort = 10)
+    public String getGrossWeightTons() {
+        return grossWeightTons;
+    }
+    @ExcelField(title = "甲乙供", align = 2, sort = 11)
+    public String getaAndB() {
+        return aAndB;
+    }
+    @ExcelField(title = "提报人", align = 2, sort = 12)
+    public String getPlanner() {
+        return planner;
+    }
+    @ExcelField(title = "提报部门", align = 2, sort = 13)
+    public String getReportingDepartment() {
+        return reportingDepartment;
+    }
+
+    @ExcelField(title = "备注", align = 2, sort = 14)
+    public String getRemark() {
+        return remark;
+    }
+    @ExcelField(title = "", align = 2, sort = 15)
+    public String getRemarkText() {
+        return remarkText;
+    }
+}

+ 633 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/entity/TransitMaterialGoods.java

@@ -0,0 +1,633 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity;
+
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.core.persistence.DataEntity;
+
+import java.util.Date;
+
+/**
+ * 在途物资Entity
+ * @author: 王强
+ * @create: 2022-08-30 14:07
+ **/
+public class TransitMaterialGoods extends DataEntity<TransitMaterialGoods> {
+
+    private String serialNumber;    //序号
+    private String externalContractNumber;  //外部合同编号
+    private String factory; //工厂
+    private String factoryName; //工厂名称
+    private String batch;   //批次
+    private String materialCode;    //物料编码
+    private String materialDescription; //物料描述
+    private String contractName;    //合同
+    private String contractLineItem;    //合同行项目
+    private String contractCount;   //合同数量
+    private String unit;    //度量单位文本
+    private String unitPrice;   //单价
+    private String money;   //金额
+    private String supplierCode;    //供应商编码
+    private String supplierName;    //供应商名称
+    private String purchaseOrder;   //采购订单
+    private String orderLineItem;   //订单行项目
+    private String netPurchaseOrderPrice;   //采购订单净价
+    private String purchaseApplicationNo;   //采购申请号
+    private String projectOfPurchasingApplicantBank;    //采购申请行项目
+    private String purchaseApplicationQuantity; //采购申请数量
+    private String orderUnit;   //订单单位
+    private String materialCompanySO;   //物资公司SO
+    private String soLineItem;//    SO项目行
+    private String materialCompanyPO;//物资公司PO
+    private String poLineItem;//    PO项目行
+    private Date contractPlannedDeliveryDate; //合同计划交货日期
+    private String deliveryScheduleOfTheDeliveryOrderIsPlanned; //配送单计划交货期
+    private String quantityDelivered;   //已交货数量
+    private String materialDocument103;    //103物料凭证
+    private Date postingDate103; //103过账日期
+    private String electronicAcceptanceReport;  //电子验收报告
+    private String electronicAcceptanceReportStatus;    //电子验收报告审批状态
+    private Date electronicAcceptanceReportDate;//电子验收报告审批日期
+    private String materialDocument105;    //105物料凭证
+    private Date postingDate105; //105过账日期
+    private String arrivalRegistrant;   //到货登记人
+    private String demandForTheUnit;    //需求单位
+    private String requirementUnitDescription;  //需求单位描述
+    private String deliveryPlace;   //配送地点
+    private String distributionLocationDescription; //配送地点描述
+    private String drawersCode; //出票方编码
+    private String drawersName; //出票方名称
+    private String supplierInvoice;//供应商发票
+    private Date dateOfIssue;   //开票日期
+    private Date payTheTicketDate;  //交票日期
+    private String invoiceNumber;//发票数量
+    private String invoiceCheckQuantity;    //发票校验数量
+    private String invoiceAmount;   //发票金额
+    private String invoiceStatus;   //发票状态
+    private String taxCode; //税码
+    private String assessmentType;//评估类型、
+    private String moneyAttribute;//资金属性
+    private String propertyRightAttribute;//产权属性
+    private String theRatioOfPayment;//付款比例
+    private String advancePayment;//预付款
+    private String cashOnDelivery;//到货款
+    private String putMoney;//投运款
+    private String qualityAssuranceModel;//质保款
+    private String theMunicipalTerritory;//市级属地
+    private String amountOfApplicationForPayment;//申请付款金额
+    private String amountOfInventory;//入库金额
+    private String forTheAwb;//投运单号
+    private String waybillStatus;//投运状态
+    private String qualityPolicyNo;//质保单号
+    private String pledgedPolicyStatus;//质保单状态
+    private String guaranteePeriod;//质保期
+    private String planner;//计划编制人
+
+    @ExcelField(title = "序号", align = 2, sort = 1)
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+    @ExcelField(title = "外部合同编号", align = 2, sort = 2)
+    public String getExternalContractNumber() {
+        return externalContractNumber;
+    }
+    @ExcelField(title = "工厂", align = 2, sort = 3)
+    public String getFactory() {
+        return factory;
+    }
+    @ExcelField(title = "工厂名称", align = 2, sort = 4)
+    public String getFactoryName() {
+        return factoryName;
+    }
+    @ExcelField(title = "批次", align = 2, sort = 5)
+    public String getBatch() {
+        return batch;
+    }
+    @ExcelField(title = "物料编码", align = 2, sort = 6)
+    public String getMaterialCode() {
+        return materialCode;
+    }
+    @ExcelField(title = "物料描述", align = 2, sort = 7)
+    public String getMaterialDescription() {
+        return materialDescription;
+    }
+    @ExcelField(title = "合同", align = 2, sort = 8)
+    public String getContractName() {
+        return contractName;
+    }
+    @ExcelField(title = "合同行项目", align = 2, sort = 9)
+    public String getContractLineItem() {
+        return contractLineItem;
+    }
+    @ExcelField(title = "合同数量", align = 2, sort = 10)
+    public String getContractCount() {
+        return contractCount;
+    }
+    @ExcelField(title = "度量单位文本", align = 2, sort = 11)
+    public String getUnit() {
+        return unit;
+    }
+    @ExcelField(title = "单价", align = 2, sort = 12)
+    public String getUnitPrice() {
+        return unitPrice;
+    }
+    @ExcelField(title = "金额", align = 2, sort = 13)
+    public String getMoney() {
+        return money;
+    }
+    @ExcelField(title = "供应商编码", align = 2, sort = 14)
+    public String getSupplierCode() {
+        return supplierCode;
+    }
+    @ExcelField(title = "供应商名称", align = 2, sort = 15)
+    public String getSupplierName() {
+        return supplierName;
+    }
+    @ExcelField(title = "采购订单", align = 2, sort = 16)
+    public String getPurchaseOrder() {
+        return purchaseOrder;
+    }
+    @ExcelField(title = "订单行项目", align = 2, sort = 17)
+    public String getOrderLineItem() {
+        return orderLineItem;
+    }
+    @ExcelField(title = "采购订单净价", align = 2, sort = 18)
+    public String getNetPurchaseOrderPrice() {
+        return netPurchaseOrderPrice;
+    }
+    @ExcelField(title = "采购申请号", align = 2, sort = 19)
+    public String getPurchaseApplicationNo() {
+        return purchaseApplicationNo;
+    }
+    @ExcelField(title = "采购申请行项目", align = 2, sort = 20)
+    public String getProjectOfPurchasingApplicantBank() {
+        return projectOfPurchasingApplicantBank;
+    }
+    @ExcelField(title = "采购申请数量", align = 2, sort = 21)
+    public String getPurchaseApplicationQuantity() {
+        return purchaseApplicationQuantity;
+    }
+    @ExcelField(title = "订单单位", align = 2, sort = 22)
+    public String getOrderUnit() {
+        return orderUnit;
+    }
+    @ExcelField(title = "物资公司SO", align = 2, sort = 23)
+    public String getMaterialCompanySO() {
+        return materialCompanySO;
+    }
+    @ExcelField(title = "SO项目行", align = 2, sort = 24)
+    public String getSoLineItem() {
+        return soLineItem;
+    }
+    @ExcelField(title = "物资公司PO", align = 2, sort = 25)
+    public String getMaterialCompanyPO() {
+        return materialCompanyPO;
+    }
+    @ExcelField(title = "PO项目行", align = 2, sort = 26)
+    public String getPoLineItem() {
+        return poLineItem;
+    }
+    @ExcelField(title = "合同计划交货日期", align = 2, sort = 27)
+    public Date getContractPlannedDeliveryDate() {
+        return contractPlannedDeliveryDate;
+    }
+    @ExcelField(title = "配送单计划交货期", align = 2, sort = 28)
+    public String getDeliveryScheduleOfTheDeliveryOrderIsPlanned() {
+        return deliveryScheduleOfTheDeliveryOrderIsPlanned;
+    }
+    @ExcelField(title = "已交货数量", align = 2, sort = 29)
+    public String getQuantityDelivered() {
+        return quantityDelivered;
+    }
+    @ExcelField(title = "103物料凭证", align = 2, sort = 30)
+    public String getMaterialDocument103() {
+        return materialDocument103;
+    }
+    @ExcelField(title = "103过账日期", align = 2, sort = 31)
+    public Date getPostingDate103() {
+        return postingDate103;
+    }
+    @ExcelField(title = "电子验收报告", align = 2, sort = 32)
+    public String getElectronicAcceptanceReport() {
+        return electronicAcceptanceReport;
+    }
+    @ExcelField(title = "电子验收报告审批状态", align = 2, sort = 33)
+    public String getElectronicAcceptanceReportStatus() {
+        return electronicAcceptanceReportStatus;
+    }
+    @ExcelField(title = "电子验收报告审批日期", align = 2, sort = 34)
+    public Date getElectronicAcceptanceReportDate() {
+        return electronicAcceptanceReportDate;
+    }
+    @ExcelField(title = "105物料凭证", align = 2, sort = 35)
+    public String getMaterialDocument105() {
+        return materialDocument105;
+    }
+    @ExcelField(title = "105过账日期", align = 2, sort = 36)
+    public Date getPostingDate105() {
+        return postingDate105;
+    }
+    @ExcelField(title = "到货登记人", align = 2, sort = 37)
+    public String getArrivalRegistrant() {
+        return arrivalRegistrant;
+    }
+    @ExcelField(title = "需求单位", align = 2, sort = 38)
+    public String getDemandForTheUnit() {
+        return demandForTheUnit;
+    }
+    @ExcelField(title = "需求单位描述", align = 2, sort = 39)
+    public String getRequirementUnitDescription() {
+        return requirementUnitDescription;
+    }
+    @ExcelField(title = "配送地点", align = 2, sort = 40)
+    public String getDeliveryPlace() {
+        return deliveryPlace;
+    }
+    @ExcelField(title = "配送地点描述", align = 2, sort = 41)
+    public String getDistributionLocationDescription() {
+        return distributionLocationDescription;
+    }
+    @ExcelField(title = "出票方编码", align = 2, sort = 42)
+    public String getDrawersCode() {
+        return drawersCode;
+    }
+    @ExcelField(title = "出票方名称", align = 2, sort = 43)
+    public String getDrawersName() {
+        return drawersName;
+    }
+    @ExcelField(title = "供应商发票", align = 2, sort = 44)
+    public String getSupplierInvoice() {
+        return supplierInvoice;
+    }
+    @ExcelField(title = "开票日期", align = 2, sort = 45)
+    public Date getDateOfIssue() {
+        return dateOfIssue;
+    }
+    @ExcelField(title = "交票日期", align = 2, sort = 46)
+    public Date getPayTheTicketDate() {
+        return payTheTicketDate;
+    }
+
+
+
+    @ExcelField(title = "发票数量", align = 2, sort = 47)
+    public String getInvoiceNumber() {
+        return invoiceNumber;
+    }
+    @ExcelField(title = "发票校验数量", align = 2, sort = 48)
+    public String getInvoiceCheckQuantity() {
+        return invoiceCheckQuantity;
+    }
+    @ExcelField(title = "发票金额", align = 2, sort = 49)
+    public String getInvoiceAmount() {
+        return invoiceAmount;
+    }
+    @ExcelField(title = "发票状态", align = 2, sort = 50)
+    public String getInvoiceStatus() {
+        return invoiceStatus;
+    }
+    @ExcelField(title = "税码", align = 2, sort = 51)
+    public String getTaxCode() {
+        return taxCode;
+    }
+    @ExcelField(title = "评估类型", align = 2, sort = 52)
+    public String getAssessmentType() {
+        return assessmentType;
+    }
+    @ExcelField(title = "资金属性", align = 2, sort = 53)
+    public String getMoneyAttribute() {
+        return moneyAttribute;
+    }
+    @ExcelField(title = "产权属性", align = 2, sort = 54)
+    public String getPropertyRightAttribute() {
+        return propertyRightAttribute;
+    }
+    @ExcelField(title = "付款比例", align = 2, sort = 55)
+    public String getTheRatioOfPayment() {
+        return theRatioOfPayment;
+    }
+    @ExcelField(title = "预付款", align = 2, sort = 56)
+    public String getAdvancePayment() {
+        return advancePayment;
+    }
+    @ExcelField(title = "到货款", align = 2, sort = 57)
+    public String getCashOnDelivery() {
+        return cashOnDelivery;
+    }
+    @ExcelField(title = "投运款", align = 2, sort = 58)
+    public String getPutMoney() {
+        return putMoney;
+    }
+    @ExcelField(title = "质保款", align = 2, sort = 59)
+    public String getQualityAssuranceModel() {
+        return qualityAssuranceModel;
+    }
+    @ExcelField(title = "市级属地", align = 2, sort = 60)
+    public String getTheMunicipalTerritory() {
+        return theMunicipalTerritory;
+    }
+    @ExcelField(title = "申请付款金额", align = 2, sort = 61)
+    public String getAmountOfApplicationForPayment() {
+        return amountOfApplicationForPayment;
+    }
+    @ExcelField(title = "入库金额", align = 2, sort = 62)
+    public String getAmountOfInventory() {
+        return amountOfInventory;
+    }
+    @ExcelField(title = "投运单号", align = 2, sort = 63)
+    public String getForTheAwb() {
+        return forTheAwb;
+    }
+    @ExcelField(title = "投运状态", align = 2, sort = 64)
+    public String getWaybillStatus() {
+        return waybillStatus;
+    }
+    @ExcelField(title = "质保单号", align = 2, sort = 65)
+    public String getQualityPolicyNo() {
+        return qualityPolicyNo;
+    }
+    @ExcelField(title = "质保单状态", align = 2, sort = 66)
+    public String getPledgedPolicyStatus() {
+        return pledgedPolicyStatus;
+    }
+    @ExcelField(title = "质保期", align = 2, sort = 67)
+    public String getGuaranteePeriod() {
+        return guaranteePeriod;
+    }
+    @ExcelField(title = "计划编制人", align = 2, sort = 68)
+    public String getPlanner() {
+        return planner;
+    }
+
+
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public void setExternalContractNumber(String externalContractNumber) {
+        this.externalContractNumber = externalContractNumber;
+    }
+
+    public void setFactory(String factory) {
+        this.factory = factory;
+    }
+
+    public void setFactoryName(String factoryName) {
+        this.factoryName = factoryName;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public void setMaterialDescription(String materialDescription) {
+        this.materialDescription = materialDescription;
+    }
+
+    public void setContractName(String contractName) {
+        this.contractName = contractName;
+    }
+
+    public void setContractLineItem(String contractLineItem) {
+        this.contractLineItem = contractLineItem;
+    }
+
+    public void setContractCount(String contractCount) {
+        this.contractCount = contractCount;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    public void setUnitPrice(String unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public void setMoney(String money) {
+        this.money = money;
+    }
+
+    public void setSupplierCode(String supplierCode) {
+        this.supplierCode = supplierCode;
+    }
+
+    public void setSupplierName(String supplierName) {
+        this.supplierName = supplierName;
+    }
+
+    public void setPurchaseOrder(String purchaseOrder) {
+        this.purchaseOrder = purchaseOrder;
+    }
+
+    public void setOrderLineItem(String orderLineItem) {
+        this.orderLineItem = orderLineItem;
+    }
+
+    public void setNetPurchaseOrderPrice(String netPurchaseOrderPrice) {
+        this.netPurchaseOrderPrice = netPurchaseOrderPrice;
+    }
+
+    public void setPurchaseApplicationNo(String purchaseApplicationNo) {
+        this.purchaseApplicationNo = purchaseApplicationNo;
+    }
+
+    public void setProjectOfPurchasingApplicantBank(String projectOfPurchasingApplicantBank) {
+        this.projectOfPurchasingApplicantBank = projectOfPurchasingApplicantBank;
+    }
+
+    public void setPurchaseApplicationQuantity(String purchaseApplicationQuantity) {
+        this.purchaseApplicationQuantity = purchaseApplicationQuantity;
+    }
+
+    public void setOrderUnit(String orderUnit) {
+        this.orderUnit = orderUnit;
+    }
+
+    public void setMaterialCompanySO(String materialCompanySO) {
+        this.materialCompanySO = materialCompanySO;
+    }
+
+    public void setSoLineItem(String soLineItem) {
+        this.soLineItem = soLineItem;
+    }
+
+    public void setMaterialCompanyPO(String materialCompanyPO) {
+        this.materialCompanyPO = materialCompanyPO;
+    }
+
+    public void setPoLineItem(String poLineItem) {
+        this.poLineItem = poLineItem;
+    }
+
+    public void setContractPlannedDeliveryDate(Date contractPlannedDeliveryDate) {
+        this.contractPlannedDeliveryDate = contractPlannedDeliveryDate;
+    }
+
+    public void setDeliveryScheduleOfTheDeliveryOrderIsPlanned(String deliveryScheduleOfTheDeliveryOrderIsPlanned) {
+        this.deliveryScheduleOfTheDeliveryOrderIsPlanned = deliveryScheduleOfTheDeliveryOrderIsPlanned;
+    }
+
+    public void setQuantityDelivered(String quantityDelivered) {
+        this.quantityDelivered = quantityDelivered;
+    }
+
+    public void setMaterialDocument103(String materialDocument103) {
+        this.materialDocument103 = materialDocument103;
+    }
+
+    public void setPostingDate103(Date postingDate103) {
+        this.postingDate103 = postingDate103;
+    }
+
+    public void setElectronicAcceptanceReport(String electronicAcceptanceReport) {
+        this.electronicAcceptanceReport = electronicAcceptanceReport;
+    }
+
+    public void setElectronicAcceptanceReportStatus(String electronicAcceptanceReportStatus) {
+        this.electronicAcceptanceReportStatus = electronicAcceptanceReportStatus;
+    }
+
+    public void setElectronicAcceptanceReportDate(Date electronicAcceptanceReportDate) {
+        this.electronicAcceptanceReportDate = electronicAcceptanceReportDate;
+    }
+
+    public void setMaterialDocument105(String materialDocument105) {
+        this.materialDocument105 = materialDocument105;
+    }
+
+    public void setPostingDate105(Date postingDate105) {
+        this.postingDate105 = postingDate105;
+    }
+
+    public void setArrivalRegistrant(String arrivalRegistrant) {
+        this.arrivalRegistrant = arrivalRegistrant;
+    }
+
+    public void setDemandForTheUnit(String demandForTheUnit) {
+        this.demandForTheUnit = demandForTheUnit;
+    }
+
+    public void setRequirementUnitDescription(String requirementUnitDescription) {
+        this.requirementUnitDescription = requirementUnitDescription;
+    }
+
+    public void setDeliveryPlace(String deliveryPlace) {
+        this.deliveryPlace = deliveryPlace;
+    }
+
+    public void setDistributionLocationDescription(String distributionLocationDescription) {
+        this.distributionLocationDescription = distributionLocationDescription;
+    }
+
+    public void setDrawersCode(String drawersCode) {
+        this.drawersCode = drawersCode;
+    }
+
+    public void setDrawersName(String drawersName) {
+        this.drawersName = drawersName;
+    }
+
+    public void setDateOfIssue(Date dateOfIssue) {
+        this.dateOfIssue = dateOfIssue;
+    }
+
+    public void setPayTheTicketDate(Date payTheTicketDate) {
+        this.payTheTicketDate = payTheTicketDate;
+    }
+
+    public void setInvoiceNumber(String invoiceNumber) {
+        this.invoiceNumber = invoiceNumber;
+    }
+
+    public void setInvoiceCheckQuantity(String invoiceCheckQuantity) {
+        this.invoiceCheckQuantity = invoiceCheckQuantity;
+    }
+
+    public void setInvoiceAmount(String invoiceAmount) {
+        this.invoiceAmount = invoiceAmount;
+    }
+
+    public void setInvoiceStatus(String invoiceStatus) {
+        this.invoiceStatus = invoiceStatus;
+    }
+
+    public void setTaxCode(String taxCode) {
+        this.taxCode = taxCode;
+    }
+
+    public void setAssessmentType(String assessmentType) {
+        this.assessmentType = assessmentType;
+    }
+
+    public void setMoneyAttribute(String moneyAttribute) {
+        this.moneyAttribute = moneyAttribute;
+    }
+
+    public void setPropertyRightAttribute(String propertyRightAttribute) {
+        this.propertyRightAttribute = propertyRightAttribute;
+    }
+
+    public void setTheRatioOfPayment(String theRatioOfPayment) {
+        this.theRatioOfPayment = theRatioOfPayment;
+    }
+
+    public void setAdvancePayment(String advancePayment) {
+        this.advancePayment = advancePayment;
+    }
+
+    public void setCashOnDelivery(String cashOnDelivery) {
+        this.cashOnDelivery = cashOnDelivery;
+    }
+
+    public void setPutMoney(String putMoney) {
+        this.putMoney = putMoney;
+    }
+
+    public void setQualityAssuranceModel(String qualityAssuranceModel) {
+        this.qualityAssuranceModel = qualityAssuranceModel;
+    }
+
+    public void setTheMunicipalTerritory(String theMunicipalTerritory) {
+        this.theMunicipalTerritory = theMunicipalTerritory;
+    }
+
+    public void setAmountOfApplicationForPayment(String amountOfApplicationForPayment) {
+        this.amountOfApplicationForPayment = amountOfApplicationForPayment;
+    }
+
+    public void setAmountOfInventory(String amountOfInventory) {
+        this.amountOfInventory = amountOfInventory;
+    }
+
+    public void setForTheAwb(String forTheAwb) {
+        this.forTheAwb = forTheAwb;
+    }
+
+    public void setWaybillStatus(String waybillStatus) {
+        this.waybillStatus = waybillStatus;
+    }
+
+    public void setQualityPolicyNo(String qualityPolicyNo) {
+        this.qualityPolicyNo = qualityPolicyNo;
+    }
+
+    public void setPledgedPolicyStatus(String pledgedPolicyStatus) {
+        this.pledgedPolicyStatus = pledgedPolicyStatus;
+    }
+
+    public void setGuaranteePeriod(String guaranteePeriod) {
+        this.guaranteePeriod = guaranteePeriod;
+    }
+
+    public void setPlanner(String planner) {
+        this.planner = planner;
+    }
+
+    public void setSupplierInvoice(String supplierInvoice) {
+        this.supplierInvoice = supplierInvoice;
+    }
+
+}

+ 35 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/mapper/TransitMaterialGoodsMapper.java

@@ -0,0 +1,35 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 在途物资MAPPER接口
+ * @author: 王强
+ * @create: 2022-08-30 14:09
+ **/
+@MyBatisMapper
+public interface TransitMaterialGoodsMapper extends BaseMapper<TransitMaterialGoods> {
+
+    /**
+     * 批量插入替换物料信息
+     * @param list 插入信息
+     * */
+    void insertList(@Param("list") List<TransitMaterialGoods> list);
+
+    /**
+     * 根据id批量删除
+     * @param list
+     */
+    void delList(@Param("list") List<String> list);
+
+    /**
+     * 查询出所有的在途物资
+     * @return
+     */
+    List<TransitMaterialGoods> getAllGoods();
+}

+ 89 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/mapper/xml/TransitMaterialGoodsMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.mapper.TransitMaterialGoodsMapper">
+
+    <sql id="replaceColumns">
+		a.id AS "id",
+        a.materialCode,
+        a.contractCount,
+        a.planner
+	</sql>
+
+    <insert id="insertList">
+        insert into bla_transitmaterial_goods(
+        id,
+        create_by,
+        create_date,
+        update_by,
+        update_date,
+        del_flag,
+        materialCode,
+        contractCount,
+        planner
+        )VALUES
+        <foreach collection="list" item="item" index="index" separator=",">
+            (
+            #{item.id},
+            #{item.createBy.id},
+            #{item.createDate},
+            #{item.updateBy.id},
+            #{item.updateDate},
+            #{item.delFlag},
+            #{item.materialCode},
+            #{item.contractCount},
+            #{item.planner}
+            )
+        </foreach>
+    </insert>
+    <delete id="delList">
+        DELETE FROM bla_transitmaterial_goods
+        WHERE id in
+        (
+        <foreach collection="list" item="item" index="index" separator=",">
+            #{item}
+        </foreach>
+        )
+    </delete>
+
+    <select id="findList" resultType="TransitMaterialGoods">
+        SELECT
+        <include refid="replaceColumns"/>
+        FROM bla_transitmaterial_goods a
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            ${dataScope}
+            <if test="materialCode != null and materialCode != ''">
+                AND a.materialCode like concat('%',#{materialCode},'%')
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+    <select id="getAllGoods"
+            resultType="com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods">
+        select
+        <include refid="replaceColumns"/>
+        FROM bla_transitmaterial_goods a
+        <where>
+            a.del_flag = 0
+            ${dataScope}
+            <if test="materialCode != null and materialCode != ''">
+                AND a.materialCode like concat('%',#{materialCode},'%')
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+</mapper>

+ 149 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/service/TransitMaterialGoodsService.java

@@ -0,0 +1,149 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.service;
+
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.MaterialGoodsInfo;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.mapper.TransitMaterialGoodsMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 在途物资Service
+ * @author: 王强
+ * @create: 2022-08-30 14:12
+ **/
+@Service
+@Transactional(readOnly = true)
+public class TransitMaterialGoodsService extends CrudService<TransitMaterialGoodsMapper, TransitMaterialGoods> {
+
+    @Autowired
+    private ReportPersonMapper reportPersonMapper;
+
+    @Autowired
+    private TransitMaterialGoodsMapper mapper;
+
+    public void comparativeData(List<TransitMaterialGoods> transitMaterialGoodsList, List<MaterialGoodsInfo> materialGoodsInfoList) {
+
+        //在途物资统计表 key=统计物料编码-部门 去重汇总统计
+        Map<String, BigDecimal> onPassageMaterialsMap = new HashMap<>();
+        //项目物资需求表 key=统计物料编码-部门 去重汇总统计
+        Map<String, BigDecimal> materialInformationMap = new HashMap<>();
+
+        //在途物资统计表 如果计划编制人为空存储
+        //Map<String, BigDecimal> isEmptyMap = new HashMap<>();
+
+        //在途物资统计表与项目物资需求表比较  在途物资统计表J列>=项目物资需求表H列 标识
+        List<String> flagList = new ArrayList<>();
+        /**************************************************************************/
+
+
+        //从数据库中获取所有的提报人与部门
+        Map<String, String> reportPersonMap = getReportPerson();
+
+        //在途物资统计表 去重汇总统计
+        transitMaterialGoodsList.forEach(opm -> {
+            if (StringUtils.isBlank(opm.getContractCount())) {
+                opm.setContractCount("0");
+            }
+            //根据提报人 找到对应部门
+            String reportPersonOfDepartment = reportPersonMap.get(opm.getPlanner());
+            //如果没有部门 表示空部门 物料编码-部门
+            String key = "";
+            if (reportPersonOfDepartment == null) {
+                key = opm.getMaterialCode() + "-";
+            } else {
+                key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
+            }
+            if (onPassageMaterialsMap.containsKey(key)) {
+                onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()).add(onPassageMaterialsMap.get(key)));
+            } else {
+                if (StringUtils.isNotBlank(opm.getMaterialCode())) {
+                    onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
+                }
+            }
+        });
+
+        //项目物资需求表 去重汇总统计
+        materialGoodsInfoList.forEach(m -> {
+            if (StringUtils.isBlank(m.getTotal())) {
+                m.setTotal("0");
+            }
+            //物料编码-部门
+            String key = m.getMaterialCode() + "-" + m.getReportingDepartment();
+            if (materialInformationMap.containsKey(key)) {
+                materialInformationMap.put(key, new BigDecimal(m.getTotal()).add(materialInformationMap.get(key)));
+            } else {
+                if (StringUtils.isNotBlank(m.getMaterialCode())) {
+                    materialInformationMap.put(key, new BigDecimal(m.getTotal()));
+                }
+            }
+        });
+
+        //两表比较 添加标识
+        materialInformationMap.forEach((k, v) -> {
+            if (onPassageMaterialsMap.containsKey(k)) {
+                if (onPassageMaterialsMap.get(k).compareTo(v) >= 0) {
+                    flagList.add(k);
+                }
+            }
+        });
+
+        //根据标识在原表中追加备注
+        materialGoodsInfoList.forEach(l -> {
+            String key = l.getMaterialCode() + "-" + l.getReportingDepartment();
+            if (flagList.contains(key)) {
+                l.setRemarkText("在途已有" + onPassageMaterialsMap.get(key) + "单位,请核实本次需求");
+            }
+        });
+    }
+
+    /**
+     * 查询数据库获取对应的部门及部门下的人
+     *
+     * @return
+     */
+    public Map<String, String> getReportPerson() {
+        Map<String, String> map = new HashMap<>();
+        List<ReportPerson> departmentGroupByPerson = reportPersonMapper.findDepartmentGroupByPerson();
+        departmentGroupByPerson.forEach(l -> {
+            map.put(l.getReportPerson(), l.getReportDepartment());
+        });
+        return map;
+    }
+
+    @Transactional(readOnly = false)
+    public void insertList(List<TransitMaterialGoods> list) {
+        for (TransitMaterialGoods goods : list){
+            goods.preInsert();
+        }
+        mapper.insertList(list);
+    }
+
+    @Override
+    public Page<TransitMaterialGoods> findPage(Page<TransitMaterialGoods> page, TransitMaterialGoods entity) {
+        return super.findPage(page, entity);
+    }
+
+    /**
+     * 批量删除在途物资
+     */
+    @Transactional(readOnly = false)
+    public void deleteList(List<String> list) {
+        mapper.delList(list);
+    }
+
+    public List<TransitMaterialGoods> getAllGoods(){
+        return mapper.getAllGoods();
+    }
+}

+ 111 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/util/CreateSheetUtil.java

@@ -0,0 +1,111 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.util;
+
+import com.jeeplus.modules.sg.balancedlibrary.materialQuota.entity.MaterialQuota;
+import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
+import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFCellStyle;
+import org.apache.poi.xssf.usermodel.XSSFFont;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 创建新的sheet
+ * @author: 王强
+ * @create: 2022-09-01 09:33
+ **/
+public class CreateSheetUtil {
+
+    public void createSheet(String sheetName, String []title, String [][]values, XSSFWorkbook workbook,
+                            List<MaterialReportDetails> reportList,
+                            List<StandardMaterials> standardList, List<String> preferredCodes,
+                            List<MaterialQuota> quotaList, List<TransitMaterialGoods> goodsList,
+                            Map<String, String> reportPersonMap){
+
+        //添加一个新的sheet
+        Sheet sheet3 = workbook.createSheet(sheetName);
+        //大标题样式
+        XSSFCellStyle headStyle = workbook.createCellStyle();   //创建样式
+        headStyle.setAlignment(CellStyle.ALIGN_CENTER);    //居中
+        headStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
+        Font titleFont = workbook.createFont(); //创建字体样式
+        titleFont.setFontName("Arial");     //设置字体
+        titleFont.setFontHeightInPoints((short)16); //字体大小
+        titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);  //粗体
+        headStyle.setFont(titleFont);
+
+        //设置标题样式 -- title
+        XSSFCellStyle cellStyle = workbook.createCellStyle();
+        cellStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER);
+        cellStyle.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());     //背景颜色
+        cellStyle.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);
+
+        cellStyle.setBorderBottom(XSSFCellStyle.BORDER_THIN);       //边框
+        cellStyle.setBorderLeft(XSSFCellStyle.BORDER_THIN);
+        cellStyle.setBorderTop(XSSFCellStyle.BORDER_THIN);
+        cellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);
+
+        XSSFFont font = workbook.createFont();
+        font.setFontName("Arial");
+        font.setFontHeightInPoints((short)12);
+        font.setBoldweight(Font.BOLDWEIGHT_BOLD);
+        font.setColor(IndexedColors.WHITE.getIndex());      //字体颜色
+        cellStyle.setFont(font);
+
+        //设置内容样式
+        XSSFCellStyle contentStyle = workbook.createCellStyle();
+        contentStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER);
+        contentStyle.setBorderBottom(XSSFCellStyle.BORDER_THIN);
+        contentStyle.setBorderLeft(XSSFCellStyle.BORDER_THIN);
+        contentStyle.setBorderTop(XSSFCellStyle.BORDER_THIN);
+        contentStyle.setBorderRight(XSSFCellStyle.BORDER_THIN);
+
+        XSSFFont contentFont = workbook.createFont();
+        contentFont.setFontName("Calibri");
+        contentFont.setFontHeightInPoints((short)11);
+        contentFont.setColor(IndexedColors.BLACK.getIndex());   //字体颜色
+        contentStyle.setFont(contentFont);
+        contentStyle.setWrapText(true);     //设置单元格内容自动换行
+        contentStyle.setAlignment(CellStyle.ALIGN_CENTER);    //居中
+        contentStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
+
+        //在sheet中添加表头第0行,
+        Row row = sheet3.createRow(0);
+        Cell cell = null;
+
+        cell = row.createCell(0);
+        cell.setCellValue("物料信息表");
+        cell.setCellStyle(headStyle);
+
+        //创建标题
+        row = sheet3.createRow(1);
+        for (int i=0;i<title.length;i++){
+            cell = row.createCell(i);
+            cell.setCellValue(title[i]);
+            cell.setCellStyle(cellStyle);
+        }
+
+        //创建内容
+        for (int i=0;i<values.length;i++){
+            row = sheet3.createRow(i+2);
+            for (int j=0;j<values[i].length;j++){
+                //将内容按顺序赋给对应的列对象
+                Cell cell1 = row.createCell(j);
+                cell1.setCellValue(values[i][j]);
+                cell1.setCellStyle(contentStyle);
+            }
+        }
+        //大标题合并居中
+        CellRangeAddress region = new CellRangeAddress(0,0,0,title.length-1);   //大标题合并居中
+        sheet3.addMergedRegion(region);
+        //设置行宽
+        for (int i=0;i<title.length;i++) {
+            sheet3.setColumnWidth(i, 4000);
+        }
+    }
+}

+ 251 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/transitMaterialGoods/web/TransitMaterialGoodsController.java

@@ -0,0 +1,251 @@
+package com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.balancedlibrary.materialQuota.entity.MaterialQuota;
+import com.jeeplus.modules.sg.balancedlibrary.materialQuota.service.MaterialQuotaService;
+import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.ExcelUtil;
+import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.utils.ExportUtil;
+import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
+import com.jeeplus.modules.sg.balancedlibrary.preferredMaterials.service.PreferredMaterialsService;
+import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.entity.StandardMaterials;
+import com.jeeplus.modules.sg.balancedlibrary.standardMaterials.service.StandardMaterialsService;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.GoodsInfo;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.entity.TransitMaterialGoods;
+import com.jeeplus.modules.sg.balancedlibrary.transitMaterialGoods.service.TransitMaterialGoodsService;
+import com.jeeplus.modules.sg.financial.erpcredit.util.ValidationUtils;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 在途物资Controller
+ * @author: 王强
+ * @create: 2022-08-30 14:18
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/transitMaterialGoods")
+public class TransitMaterialGoodsController extends BaseController {
+
+    @Autowired
+    private TransitMaterialGoodsService service;
+
+    @Autowired
+    private StandardMaterialsService standardMaterialsService;
+
+    @Autowired
+    private PreferredMaterialsService preferredMaterialsService;
+
+    @Autowired
+    private MaterialQuotaService materialQuotaService;
+
+    @ModelAttribute
+    public TransitMaterialGoods get(@RequestParam(required = false) String id) {
+        TransitMaterialGoods entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = service.get(id);
+        }
+        if (entity == null) {
+            entity = new TransitMaterialGoods();
+        }
+        return entity;
+    }
+
+    /**
+     * 物料替换列表页面
+     */
+    @RequiresPermissions("sg:balancedlibrary:transitMaterialGoods:list")
+    @RequestMapping(value = "list")
+    public String list(TransitMaterialGoods entity, Model model) {
+        model.addAttribute("entity", entity);
+        return "modules/sg/balancedlibrary/transitMaterialGoods/transitMaterialGoodsList";
+    }
+
+    /**
+     * 标准物资列表数据
+     */
+    @ResponseBody
+    @RequiresPermissions("sg:balancedlibrary:transitMaterialGoods:list")
+    @RequestMapping(value = "data")
+    public Map<String, Object> data(TransitMaterialGoods entity, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<TransitMaterialGoods> page = service.findPage(new Page<TransitMaterialGoods>(request, response), entity);
+        return getBootstrapData(page);
+    }
+
+    /**
+     * 在途物资-导入Excel数据
+     */
+    @ResponseBody
+    @PostMapping("import")
+    public AjaxJson importFile(@RequestParam("file") MultipartFile[] file, HttpServletResponse response, HttpServletRequest request) {
+        AjaxJson ajaxJson = new AjaxJson();
+
+        try {
+            //获取两张excel表
+            ImportExcel onPassageMaterialsFile = new ImportExcel(file[0], 1, 0);
+//            ImportExcel materialInformationFile = new ImportExcel(file[1], 1, 0);
+            //转换为集合
+            List<TransitMaterialGoods> onPassageMaterialsList = onPassageMaterialsFile.getDataList(TransitMaterialGoods.class);
+            service.insertList(onPassageMaterialsList);
+//            List<MaterialGoodsInfo> materialInformationList = materialInformationFile.getDataList(MaterialGoodsInfo.class);
+
+//            service.comparativeData(onPassageMaterialsList,materialInformationList);
+
+            /***********************************************/
+//            String fileName = "项目物资需求表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
+//            new ExportExcel("", MaterialInformation.class).setDataList(materialInformationList).write(response, fileName).dispose();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ajaxJson;
+    }
+
+    /**
+     * 批量删除在途物资
+     */
+    @ResponseBody
+    @RequiresPermissions("sg:balancedlibrary:transitMaterialGoods:del")
+    @RequestMapping(value = "deleteAll")
+    public AjaxJson deleteAll(String ids) {
+        AjaxJson j = new AjaxJson();
+        String idArr[] =ids.split(",");
+        List<String> idList = Arrays.asList(idArr);
+        service.deleteList(idList);
+        j.setMsg("删除标准物资成功");
+        return j;
+    }
+
+    /**
+     * 导出excel文件
+     */
+    @ResponseBody
+    @RequiresPermissions("sg:balancedlibrary:transitMaterialGoods:export")
+    @RequestMapping(value = "export")
+    public AjaxJson exportFile(TransitMaterialGoods entity, HttpServletRequest request, HttpServletResponse response) {
+        AjaxJson j = new AjaxJson();
+        try {
+            String fileName = "在途物资统计表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<TransitMaterialGoods> page = service.findPage(new Page<TransitMaterialGoods>(request, response, -1), entity);
+            new ExportExcel("", GoodsInfo.class).setDataList(page.getList()).write(response, fileName).dispose();
+            j.setSuccess(true);
+            j.setMsg("导出成功!");
+            return j;
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导出在途物资统计表失败!失败信息:"+e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * 下载在途物资统计数据模板
+     */
+    @ResponseBody
+    @RequiresPermissions("sg:balancedlibrary:transitMaterialGoods:import")
+    @RequestMapping(value = "import/template")
+    public AjaxJson importFileTemplate(HttpServletResponse response) {
+        AjaxJson j = new AjaxJson();
+        try {
+            String fileName = "在途物资统数据导入模板.xlsx";
+            List<TransitMaterialGoods> list = Lists.newArrayList();
+            new ExportExcel("", TransitMaterialGoods.class, 1).setDataList(list).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg( "导入模板下载失败!失败信息:"+e.getMessage());
+        }
+        return j;
+    }
+
+    /**
+     * 下载物资上报明细导入模板 新的直接从模板文件中获取
+     */
+    @ResponseBody
+    @RequestMapping(value = "import/templateNew")
+    public void  importFileTemplateNew(HttpServletResponse response) throws IOException {
+        String fileName = "项目物资需求.xlsx";
+        String path = this.getClass().getResource("/").getPath()+ "freemarker/excelmodel/requiredMaterialModel.xlsx";
+        File file = new File(path);
+        InputStream inputStream = new FileInputStream(file);// 将excel文件转为输入流
+        XSSFWorkbook workbook = new XSSFWorkbook(inputStream);// 创建个workbook,
+        ExportUtil.exportFile(response,fileName,workbook);
+    }
+
+    /**
+     * 对项目需求物资做验证
+     */
+    @ResponseBody
+    @RequestMapping(value = "importVerify")
+    public AjaxJson importFileAndVerify(@RequestParam("file") MultipartFile file, HttpServletResponse response, HttpServletRequest request) throws IOException, InvalidFormatException {
+        AjaxJson j = new AjaxJson();
+        try {
+            ImportExcel materialInformationFile = new ImportExcel(file, 1, 0);
+            //转换为集合
+            List<MaterialInformation> materList = materialInformationFile.getDataList(MaterialInformation.class);
+            //从数据库中获取所有的提报人与部门
+            Map<String, String> reportPersonMap = service.getReportPerson();
+
+            ExcelUtil util = new ExcelUtil(file,1,0);
+
+            List<StandardMaterials> standardList = standardMaterialsService.findAllList(new StandardMaterials());
+            List<String> preferredCodes = preferredMaterialsService.findAllCodes();
+            List<MaterialQuota> quotaList = materialQuotaService.findAllList(new MaterialQuota());
+            List<TransitMaterialGoods> goodsList = service.getAllGoods();
+            util.dealVerifyZt(standardList,preferredCodes,quotaList,goodsList,materList,reportPersonMap);
+
+            HttpSession session = request.getSession();
+            session.setAttribute(ValidationUtils.REQUIRED_MATERIAL_VERIFY,file.getOriginalFilename());
+            util.saveToServer(session.getId());
+//
+//            ValidationUtils.storeObjToRedis(request,workbook,ValidationUtils.REQUIRED_MATERIAL_VERIFY);
+
+            j.setSuccess(true);
+            j.setMsg("导入成功,马上下载!");
+            return j;
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入项目需求物资失败!失败信息:" + e.getMessage());
+        }
+        return j;
+
+
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "exportVerify")
+    public void exportVerify(HttpServletResponse response, HttpServletRequest request) throws IOException, InvalidFormatException {
+//        ExcelUtil util = new ExcelUtil(file,1,0);
+
+//        Workbook workbook = ValidationUtils.getSessionRedisObj(request,ValidationUtils.REQUIRED_MATERIAL_VERIFY,Workbook.class);
+        HttpSession session = request.getSession();
+        String  fileName = (String)session.getAttribute(ValidationUtils.REQUIRED_MATERIAL_VERIFY);
+        ExcelUtil util = new ExcelUtil();
+        util.exportFile(response,fileName,session.getId());
+
+
+
+    }
+
+}

BIN
src/main/resources/freemarker/excelmodel/materialReport02.xlsx


+ 6 - 6
src/main/webapp/webpage/modules/sg/annualMaterialReport/annualMaterialReportList.jsp

@@ -16,7 +16,7 @@
 		<h3 class="panel-title">年度物资上报明细</h3>
 	</div>
 	<div class="panel-body">
-	
+
 	<!-- 搜索 -->
 	<div id="search-collapse" class="collapse">
 		<div class="accordion-inner">
@@ -38,11 +38,11 @@
 			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
 			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
 			 </div>
-	    </div>	
+	    </div>
 	</form:form>
 	</div>
 	</div>
-	
+
 	<!-- 工具栏 -->
 		<div id="toolbar">
 			<shiro:hasPermission name="annualMaterial:reportDetails:import">
@@ -56,15 +56,15 @@
 					</button>
 				</shiro:hasPermission>
 		</div>
-		
+
 	<!-- 表格 -->
 	<table id="dataTable"  style="table-layout:fixed"   data-toolbar="#toolbar"></table>
 
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">
-    </ul>  
+    </ul>
 	</div>
 	</div>
 	</div>
 </body>
-</html>
+</html>

+ 1 - 1
src/main/webapp/webpage/modules/sg/balancedlibrary/materialReportDetails/MaterialReportDetailsList.js

@@ -394,4 +394,4 @@ $(document).ready(function() {
 
 
 
-</script>
+</script>

+ 62 - 55
src/main/webapp/webpage/modules/sg/balancedlibrary/preferredMaterials/preferredMaterialsList.js

@@ -2,7 +2,7 @@
 <script>
 $(document).ready(function() {
 	$('#leave1Table').bootstrapTable({
-		 
+
 		  //请求方法
                method: 'post',
                //类型json
@@ -24,23 +24,23 @@ $(document).ready(function() {
     	       minimumCountColumns: 2,
                //是否显示行间隔色
                striped: true,
-               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
-               cache: false,    
-               //是否显示分页(*)  
-               pagination: true,   
-                //排序方式 
-               sortOrder: "asc",  
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+               cache: false,
+               //是否显示分页(*)
+               pagination: true,
+                //排序方式
+               sortOrder: "asc",
                //初始化加载第一页,默认第一页
-               pageNumber:1,   
-               //每页的记录行数(*)   
-               pageSize: 10,  
-               //可供选择的每页的行数(*)    
+               pageNumber:1,
+               //每页的记录行数(*)
+               pageSize: 10,
+               //可供选择的每页的行数(*)
                pageList: [10, 25, 50, 100],
-               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
                url: "${ctx}/preferredMaterials/data",
                //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
-               //queryParamsType:'',   
-               ////查询参数,每次调用是会带上这个参数,可自定义                         
+               //queryParamsType:'',
+               ////查询参数,每次调用是会带上这个参数,可自定义
                queryParams : function(params) {
                	var searchParam = $("#searchForm").serializeJSON();
                	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
@@ -69,12 +69,12 @@ $(document).ready(function() {
                    	  			jp.error(data.msg);
                    	  		}
                    	  	})
-                   	   
+
                    	});
-                      
-                   } 
+
+                   }
                },
-              
+
                onClickRow: function(row, $el){
                },
                	onShowSearch: function () {
@@ -82,7 +82,7 @@ $(document).ready(function() {
 		},
                columns: [{
 		        checkbox: true
-		       
+
 		    },{
 				   field: 'materialCode',
 				   title: '物料编码',
@@ -95,49 +95,56 @@ $(document).ready(function() {
 		        title: '物料描述',
 		        sortable: true,
 		        sortName: 'materialDesc'
-		       
+
 		    }
 			,{
 		        field: 'extendCode',
 		        title: '扩展编码',
 		        sortable: true,
 		        sortName: 'extendCode'
-		       
+
 		    }
-                   ,{
-                       field: 'extendDesc',
-                       title: '扩展描述',
-                       sortable: true,
-                       sortName: 'extendDesc'
+		   ,{
+			   field: 'extendDesc',
+			   title: '扩展描述',
+			   sortable: true,
+			   sortName: 'extendDesc'
 
-                   }
-                   ,{
-                       field: 'thirdClassList',
-                       title: '三级清单物料',
-                       sortable: true,
-                       sortName: 'thirdClassList'
+		   }
+		   ,{
+			   field: 'area',
+			   title: '区域',
+			   sortable: true,
+			   sortName: 'area'
 
-                   }
-                   ,{
-                       field: 'subclassDesc',
-                       title: '小类描述',
-                       sortable: true,
-                       sortName: 'subclassDesc'
+		   }
+		   ,{
+			   field: 'thirdClassList',
+			   title: '三级清单物料',
+			   sortable: true,
+			   sortName: 'thirdClassList'
 
-                   }
+		   }
+		   ,{
+			   field: 'subclassDesc',
+			   title: '小类描述',
+			   sortable: true,
+			   sortName: 'subclassDesc'
+
+		   }
 
 
 		     ]
-		
+
 		});
-		
-		  
+
+
 	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
 
-		 
+
 		  $('#leave1Table').bootstrapTable("toggleView");
 		}
-	  
+
 	  $('#leave1Table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
                 'check-all.bs.table uncheck-all.bs.table', function () {
             $('#remove').prop('disabled', ! $('#leave1Table').bootstrapTable('getSelections').length);
@@ -215,23 +222,23 @@ $(document).ready(function() {
         });
     });
 
-		
+
 	 $("#export").click(function(){//导出Excel文件
 			jp.downloadFile('${ctx}/preferredMaterials/export');
 	  });
 
-		    
+
 	  $("#search").click("click", function() {// 绑定查询按扭
 		  $('#leave1Table').bootstrapTable('refresh');
 		});
-	 
+
 	 $("#reset").click("click", function() {// 绑定查询按扭
 		  $("#searchForm  input").val("");
 		  $("#searchForm  select").val("");
 		  $("#searchForm  .select-item").html("");
 		  $('#leave1Table').bootstrapTable('refresh');
 		});
-		
+
 		$('#beginBeginDate').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
 		});
@@ -241,19 +248,19 @@ $(document).ready(function() {
 		$('#endDate').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
 		});
-		
+
 	});
-		
+
   function getIdSelections() {
         return $.map($("#leave1Table").bootstrapTable('getSelections'), function (row) {
             return row.id;
         });
     }
-  
+
   function deleteAll(){
 
 		jp.confirm('确认要删除该优选物资记录吗?', function(){
-			jp.loading();  	
+			jp.loading();
 			jp.get("${ctx}/preferredMaterials/deleteAll?ids=" + getIdSelections(), function(data){
          	  		if(data.success){
          	  			$('#leave1Table').bootstrapTable('refresh');
@@ -262,7 +269,7 @@ $(document).ready(function() {
          	  			jp.error(data.msg);
          	  		}
          	  	})
-          	   
+
 		})
   }
 
@@ -270,8 +277,8 @@ $(document).ready(function() {
   function refresh(){
   	$('#leave1Table').bootstrapTable('refresh');
   }
-  
 
 
 
-</script>
+
+</script>

+ 56 - 37
src/main/webapp/webpage/modules/sg/balancedlibrary/standardMaterials/standardMaterialsList.js

@@ -2,7 +2,7 @@
 <script>
 $(document).ready(function() {
 	$('#leave1Table').bootstrapTable({
-		 
+
 		  //请求方法
                method: 'post',
                //类型json
@@ -24,23 +24,23 @@ $(document).ready(function() {
     	       minimumCountColumns: 2,
                //是否显示行间隔色
                striped: true,
-               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
-               cache: false,    
-               //是否显示分页(*)  
-               pagination: true,   
-                //排序方式 
-               sortOrder: "asc",  
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+               cache: false,
+               //是否显示分页(*)
+               pagination: true,
+                //排序方式
+               sortOrder: "asc",
                //初始化加载第一页,默认第一页
-               pageNumber:1,   
-               //每页的记录行数(*)   
-               pageSize: 10,  
-               //可供选择的每页的行数(*)    
+               pageNumber:1,
+               //每页的记录行数(*)
+               pageSize: 10,
+               //可供选择的每页的行数(*)
                pageList: [10, 25, 50, 100],
-               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
                url: "${ctx}/standardMaterials/data",
                //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
-               //queryParamsType:'',   
-               ////查询参数,每次调用是会带上这个参数,可自定义                         
+               //queryParamsType:'',
+               ////查询参数,每次调用是会带上这个参数,可自定义
                queryParams : function(params) {
                	var searchParam = $("#searchForm").serializeJSON();
                	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
@@ -69,12 +69,12 @@ $(document).ready(function() {
                    	  			jp.error(data.msg);
                    	  		}
                    	  	})
-                   	   
+
                    	});
-                      
-                   } 
+
+                   }
                },
-              
+
                onClickRow: function(row, $el){
                },
                	onShowSearch: function () {
@@ -82,7 +82,7 @@ $(document).ready(function() {
 		},
                columns: [{
 		        checkbox: true
-		       
+
 		    },{
 				   field: 'materialCode',
 				   title: '物料编码',
@@ -95,28 +95,47 @@ $(document).ready(function() {
 		        title: '物料描述',
 		        sortable: true,
 		        sortName: 'materialDesc'
-		       
+
 		    }
 			,{
 		        field: 'purchaseStandardId',
 		        title: '采购标准标识',
 		        sortable: true,
 		        sortName: 'purchaseStandardId'
-		       
+
 		    }
+		   ,{
+			   field: 'bigCategoryDescript',
+			   title: '大类描述',
+			   sortable: true,
+			   sortName: 'bigCategoryDescript'
+
+		   }
+		   ,{
+			   field: 'middleCategoryDescript',
+			   title: '中类描述',
+			   sortable: true,
+			   sortName: 'middleCategoryDescript'
 
+		   }
+		   ,{
+			   field: 'smallCategoryDescript',
+			   title: '小类描述',
+			   sortable: true,
+			   sortName: 'smallCategoryDescript'
 
+		   }
 		     ]
-		
+
 		});
-		
-		  
+
+
 	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
 
-		 
+
 		  $('#leave1Table').bootstrapTable("toggleView");
 		}
-	  
+
 	  $('#leave1Table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
                 'check-all.bs.table uncheck-all.bs.table', function () {
             $('#remove').prop('disabled', ! $('#leave1Table').bootstrapTable('getSelections').length);
@@ -193,23 +212,23 @@ $(document).ready(function() {
             }
         });
     });
-		
+
 	 $("#export").click(function(){//导出Excel文件
 			jp.downloadFile('${ctx}/standardMaterials/export');
 	  });
 
-		    
+
 	  $("#search").click("click", function() {// 绑定查询按扭
 		  $('#leave1Table').bootstrapTable('refresh');
 		});
-	 
+
 	 $("#reset").click("click", function() {// 绑定查询按扭
 		  $("#searchForm  input").val("");
 		  $("#searchForm  select").val("");
 		  $("#searchForm  .select-item").html("");
 		  $('#leave1Table').bootstrapTable('refresh');
 		});
-		
+
 		$('#beginBeginDate').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
 		});
@@ -219,19 +238,19 @@ $(document).ready(function() {
 		$('#endDate').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
 		});
-		
+
 	});
-		
+
   function getIdSelections() {
         return $.map($("#leave1Table").bootstrapTable('getSelections'), function (row) {
             return row.id;
         });
     }
-  
+
   function deleteAll(){
 
 		jp.confirm('确认要删除该标准物资记录吗?', function(){
-			jp.loading();  	
+			jp.loading();
 			jp.get("${ctx}/standardMaterials/deleteAll?ids=" + getIdSelections(), function(data){
          	  		if(data.success){
          	  			$('#leave1Table').bootstrapTable('refresh');
@@ -240,7 +259,7 @@ $(document).ready(function() {
          	  			jp.error(data.msg);
          	  		}
          	  	})
-          	   
+
 		})
   }
 
@@ -248,8 +267,8 @@ $(document).ready(function() {
   function refresh(){
   	$('#leave1Table').bootstrapTable('refresh');
   }
-  
 
 
 
-</script>
+
+</script>

+ 707 - 0
src/main/webapp/webpage/modules/sg/balancedlibrary/transitMaterialGoods/transitMaterialGoodsList.js

@@ -0,0 +1,707 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	$('#leave1Table').bootstrapTable({
+
+		  //请求方法
+               method: 'post',
+               //类型json
+               dataType: "json",
+               contentType: "application/x-www-form-urlencoded",
+               //显示检索按钮
+	           showSearch: true,
+               //显示刷新按钮
+               showRefresh: true,
+               //显示切换手机试图按钮
+               showToggle: true,
+               //显示 内容列下拉框
+    	       showColumns: true,
+    	       //显示到处按钮
+    	       showExport: true,
+    	       //显示切换分页按钮
+    	       showPaginationSwitch: true,
+    	       //最低显示2行
+    	       minimumCountColumns: 2,
+               //是否显示行间隔色
+               striped: true,
+               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+               cache: false,
+               //是否显示分页(*)
+               pagination: true,
+                //排序方式
+               sortOrder: "asc",
+               //初始化加载第一页,默认第一页
+               pageNumber:1,
+               //每页的记录行数(*)
+               pageSize: 10,
+               //可供选择的每页的行数(*)
+               pageList: [10, 25, 50, 100],
+               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+               url: "${ctx}/transitMaterialGoods/data",
+               //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
+               //queryParamsType:'',
+               ////查询参数,每次调用是会带上这个参数,可自定义
+               queryParams : function(params) {
+               	var searchParam = $("#searchForm").serializeJSON();
+               	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
+               	searchParam.pageSize = params.limit === undefined? -1 : params.limit;
+               	searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+  params.order;
+                   return searchParam;
+               },
+               //分页方式:client客户端分页,server服务端分页(*)
+               sidePagination: "server",
+               contextMenuTrigger:"right",//pc端 按右键弹出菜单
+               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
+               contextMenu: '#context-menu',
+               onContextMenuItem: function(row, $el){
+                   if($el.data("item") == "edit"){
+                   		edit(row.id);
+                   }else if($el.data("item") == "view"){
+                       view(row.id);
+                   } else if($el.data("item") == "delete"){
+                        jp.confirm('确认要删除该标准物资记录吗?', function(){
+                       	jp.loading();
+                       	jp.get("${ctx}/transitMaterialGoods/delete?id="+row.id, function(data){
+                   	  		if(data.success){
+                   	  			$('#leave1Table').bootstrapTable('refresh');
+                   	  			jp.success(data.msg);
+                   	  		}else{
+                   	  			jp.error(data.msg);
+                   	  		}
+                   	  	})
+
+                   	});
+
+                   }
+               },
+
+               onClickRow: function(row, $el){
+               },
+               	onShowSearch: function () {
+			$("#search-collapse").slideToggle();
+		},
+               columns: [{
+		        checkbox: true
+
+		    },/*{
+				   field: 'externalContractNumber',
+				   title: '外部合同编号',
+				   sortable: true,
+				   sortName: 'externalContractNumber'
+
+			   }
+			,{
+		        field: 'factory',
+		        title: '工厂',
+		        sortable: true,
+		        sortName: 'factory'
+
+		    }
+			,{
+		        field: 'factoryName',
+		        title: '工厂名称',
+		        sortable: true,
+		        sortName: 'factoryName'
+
+		    }
+				   ,{
+					   field: 'batch',
+					   title: '批次',
+					   sortable: true,
+					   sortName: 'batch'
+
+				   }*/
+				   {
+					   field: 'materialCode',
+					   title: '物料编码',
+					   sortable: true,
+					   sortName: 'materialCode'
+
+				   }
+				   /*,{
+					   field: 'materialDescription',
+					   title: '物料描述',
+					   sortable: true,
+					   sortName: 'materialDescription'
+
+				   }
+				   ,{
+					   field: 'contractName',
+					   title: '合同',
+					   sortable: true,
+					   sortName: 'contractName'
+
+				   }
+				   ,{
+					   field: 'contractLineItem',
+					   title: '合同行项目',
+					   sortable: true,
+					   sortName: 'contractLineItem'
+
+				   }*/
+				   ,{
+					   field: 'contractCount',
+					   title: '合同数量',
+					   sortable: true,
+					   sortName: 'contractCount'
+
+				   }
+				   /*,{
+					   field: 'unit',
+					   title: '度量单位文本',
+					   sortable: true,
+					   sortName: 'unit'
+
+				   }
+				   ,{
+					   field: 'unitPrice',
+					   title: '单价',
+					   sortable: true,
+					   sortName: 'unitPrice'
+
+				   }
+				   ,{
+					   field: 'money',
+					   title: '金额',
+					   sortable: true,
+					   sortName: 'money'
+
+				   }
+				   ,{
+					   field: 'supplierCode',
+					   title: '供应商编码',
+					   sortable: true,
+					   sortName: 'supplierCode'
+
+				   }
+				   ,{
+					   field: 'supplierName',
+					   title: '供应商名称',
+					   sortable: true,
+					   sortName: 'supplierName'
+
+				   }
+				   ,{
+					   field: 'purchaseOrder',
+					   title: '采购订单',
+					   sortable: true,
+					   sortName: 'purchaseOrder'
+
+				   }
+				   ,{
+					   field: 'orderLineItem',
+					   title: '订单行项目',
+					   sortable: true,
+					   sortName: 'orderLineItem'
+
+				   }
+				   ,{
+					   field: 'netPurchaseOrderPrice',
+					   title: '采购订单净价',
+					   sortable: true,
+					   sortName: 'netPurchaseOrderPrice'
+
+				   }
+				   ,{
+					   field: 'purchaseApplicationNo',
+					   title: '采购申请号',
+					   sortable: true,
+					   sortName: 'purchaseApplicationNo'
+
+				   }
+				   ,{
+					   field: 'projectOfPurchasingApplicantBank',
+					   title: '采购申请行项目',
+					   sortable: true,
+					   sortName: 'projectOfPurchasingApplicantBank'
+
+				   }
+				   ,{
+					   field: 'purchaseApplicationQuantity',
+					   title: '采购申请数量',
+					   sortable: true,
+					   sortName: 'purchaseApplicationQuantity'
+
+				   }
+				   ,{
+					   field: 'orderUnit',
+					   title: '订单单位',
+					   sortable: true,
+					   sortName: 'orderUnit'
+
+				   }
+				   ,{
+					   field: 'materialCompanySO',
+					   title: '物资公司SO',
+					   sortable: true,
+					   sortName: 'materialCompanySO'
+
+				   }
+				   ,{
+					   field: 'soLineItem',
+					   title: 'SO项目行',
+					   sortable: true,
+					   sortName: 'soLineItem'
+
+				   }
+				   ,{
+					   field: 'materialCompanyPO',
+					   title: '物资公司PO',
+					   sortable: true,
+					   sortName: 'materialCompanyPO'
+
+				   }
+				   ,{
+					   field: 'poLineItem',
+					   title: 'PO项目行',
+					   sortable: true,
+					   sortName: 'poLineItem'
+
+				   }
+				   ,{
+					   field: 'contractPlannedDeliveryDate',
+					   title: '合同计划交货日期',
+					   sortable: true,
+					   sortName: 'contractPlannedDeliveryDate'
+
+				   }
+				   ,{
+					   field: 'deliveryScheduleOfTheDeliveryOrderIsPlanned',
+					   title: '配送单计划交货期',
+					   sortable: true,
+					   sortName: 'deliveryScheduleOfTheDeliveryOrderIsPlanned'
+
+				   }
+				   ,{
+					   field: 'quantityDelivered',
+					   title: '已交货数量',
+					   sortable: true,
+					   sortName: 'quantityDelivered'
+
+				   }
+				   ,{
+					   field: 'materialDocument103',
+					   title: '103物料凭证',
+					   sortable: true,
+					   sortName: 'materialDocument103'
+
+				   }
+				   ,{
+					   field: 'postingDate103',
+					   title: '103过账日期',
+					   sortable: true,
+					   sortName: 'postingDate103'
+
+				   }
+				   ,{
+					   field: 'electronicAcceptanceReport',
+					   title: '电子验收报告',
+					   sortable: true,
+					   sortName: 'electronicAcceptanceReport'
+
+				   }
+				   ,{
+					   field: 'electronicAcceptanceReportStatus',
+					   title: '电子验收报告审批状态',
+					   sortable: true,
+					   sortName: 'electronicAcceptanceReportStatus'
+
+				   }
+				   ,{
+					   field: 'electronicAcceptanceReportDate',
+					   title: '电子验收报告审批日期',
+					   sortable: true,
+					   sortName: 'electronicAcceptanceReportDate'
+
+				   }
+				   ,{
+					   field: 'materialDocument105',
+					   title: '105物料凭证',
+					   sortable: true,
+					   sortName: 'materialDocument105'
+
+				   }
+				   ,{
+					   field: 'postingDate105',
+					   title: '105过账日期',
+					   sortable: true,
+					   sortName: 'postingDate105'
+
+				   }
+				   ,{
+					   field: 'arrivalRegistrant',
+					   title: '到货登记人',
+					   sortable: true,
+					   sortName: 'arrivalRegistrant'
+
+				   }
+				   ,{
+					   field: 'demandForTheUnit',
+					   title: '需求单位',
+					   sortable: true,
+					   sortName: 'demandForTheUnit'
+
+				   }
+				   ,{
+					   field: 'requirementUnitDescription',
+					   title: '需求单位描述',
+					   sortable: true,
+					   sortName: 'requirementUnitDescription'
+
+				   }
+				   ,{
+					   field: 'deliveryPlace',
+					   title: '配送地点',
+					   sortable: true,
+					   sortName: 'deliveryPlace'
+
+				   }
+				   ,{
+					   field: 'distributionLocationDescription',
+					   title: '配送地点描述',
+					   sortable: true,
+					   sortName: 'distributionLocationDescription'
+
+				   }
+				   ,{
+					   field: 'drawersCode',
+					   title: '出票方编码',
+					   sortable: true,
+					   sortName: 'drawersCode'
+
+				   }
+				   ,{
+					   field: 'drawersName',
+					   title: '出票方名称',
+					   sortable: true,
+					   sortName: 'drawersName'
+
+				   }
+				   ,{
+					   field: 'supplierInvoice',
+					   title: '供应商发票',
+					   sortable: true,
+					   sortName: 'supplierInvoice'
+
+				   }
+				   ,{
+					   field: 'dateOfIssue',
+					   title: '开票日期',
+					   sortable: true,
+					   sortName: 'dateOfIssue'
+
+				   }
+				   ,{
+					   field: 'payTheTicketDate',
+					   title: '交票日期',
+					   sortable: true,
+					   sortName: 'payTheTicketDate'
+
+				   }
+				   ,{
+					   field: 'invoiceNumber',
+					   title: '发票数量',
+					   sortable: true,
+					   sortName: 'invoiceNumber'
+
+				   }
+				   ,{
+					   field: 'invoiceCheckQuantity',
+					   title: '发票校验数量',
+					   sortable: true,
+					   sortName: 'invoiceCheckQuantity'
+
+				   }
+				   ,{
+					   field: 'invoiceAmount',
+					   title: '发票金额',
+					   sortable: true,
+					   sortName: 'invoiceAmount'
+
+				   }
+				   ,{
+					   field: 'invoiceStatus',
+					   title: '发票状态',
+					   sortable: true,
+					   sortName: 'invoiceStatus'
+
+				   }
+				   ,{
+					   field: 'taxCode',
+					   title: '税码',
+					   sortable: true,
+					   sortName: 'taxCode'
+
+				   }
+				   ,{
+					   field: 'assessmentType',
+					   title: '评估类型',
+					   sortable: true,
+					   sortName: 'assessmentType'
+
+				   }
+				   ,{
+					   field: 'moneyAttribute',
+					   title: '资金属性',
+					   sortable: true,
+					   sortName: 'moneyAttribute'
+
+				   }
+				   ,{
+					   field: 'propertyRightAttribute',
+					   title: '产权属性',
+					   sortable: true,
+					   sortName: 'propertyRightAttribute'
+
+				   }
+				   ,{
+					   field: 'theRatioOfPayment',
+					   title: '付款比例',
+					   sortable: true,
+					   sortName: 'theRatioOfPayment'
+
+				   }
+				   ,{
+					   field: 'advancePayment',
+					   title: '预付款',
+					   sortable: true,
+					   sortName: 'advancePayment'
+
+				   }
+				   ,{
+					   field: 'cashOnDelivery',
+					   title: '到货款',
+					   sortable: true,
+					   sortName: 'cashOnDelivery'
+
+				   }
+				   ,{
+					   field: 'putMoney',
+					   title: '投运款',
+					   sortable: true,
+					   sortName: 'putMoney'
+
+				   }
+				   ,{
+					   field: 'qualityAssuranceModel',
+					   title: '质保款',
+					   sortable: true,
+					   sortName: 'qualityAssuranceModel'
+
+				   }
+				   ,{
+					   field: 'theMunicipalTerritory',
+					   title: '市级属地',
+					   sortable: true,
+					   sortName: 'theMunicipalTerritory'
+
+				   }
+				   ,{
+					   field: 'amountOfApplicationForPayment',
+					   title: '申请付款金额',
+					   sortable: true,
+					   sortName: 'amountOfApplicationForPayment'
+
+				   }
+				   ,{
+					   field: 'amountOfInventory',
+					   title: '入库金额',
+					   sortable: true,
+					   sortName: 'amountOfInventory'
+
+				   }
+				   ,{
+					   field: 'forTheAwb',
+					   title: '投运单号',
+					   sortable: true,
+					   sortName: 'forTheAwb'
+
+				   }
+				   ,{
+					   field: 'waybillStatus',
+					   title: '投运状态',
+					   sortable: true,
+					   sortName: 'waybillStatus'
+
+				   }
+				   ,{
+					   field: 'qualityPolicyNo',
+					   title: '质保单号',
+					   sortable: true,
+					   sortName: 'qualityPolicyNo'
+
+				   }
+				   ,{
+					   field: 'pledgedPolicyStatus',
+					   title: '质保单状态',
+					   sortable: true,
+					   sortName: 'pledgedPolicyStatus'
+
+				   }
+				   ,{
+					   field: 'guaranteePeriod',
+					   title: '质保期',
+					   sortable: true,
+					   sortName: 'guaranteePeriod'
+
+				   }*/
+				   ,{
+					   field: 'planner',
+					   title: '计划编制人',
+					   sortable: true,
+					   sortName: 'planner'
+
+				   }
+
+
+
+
+
+
+		     ]
+
+		});
+
+
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+
+
+		  $('#leave1Table').bootstrapTable("toggleView");
+		}
+
+	  $('#leave1Table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+                'check-all.bs.table uncheck-all.bs.table', function () {
+            $('#remove').prop('disabled', ! $('#leave1Table').bootstrapTable('getSelections').length);
+            $('#view,#edit').prop('disabled', $('#leave1Table').bootstrapTable('getSelections').length!=1);
+        });
+
+	  /**
+	   * 导出利库资源池基础信息表
+	   * */
+	$("#btnImport").click(function(){
+		jp.open({
+			type: 2,
+			area: [500, 200],
+			auto: true,
+			title:"导入数据",
+			content: "${ctx}/tag/importExcel" ,
+			btn: ['下载模板','确定', '关闭'],
+				btn1: function(index, layero){
+				  jp.downloadFile('${ctx}/transitMaterialGoods/import/template');
+			  },
+			btn2: function(index, layero){
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					iframeWin.contentWindow.importExcel('${ctx}/transitMaterialGoods/import', function (data) {
+						if(data.success){
+							jp.success(data.msg);
+							refresh();
+						}else{
+							jp.error(data.msg);
+						}
+						jp.close(index);
+					});//调用保存事件
+					return false;
+			  },
+
+			  btn3: function(index){
+				//  jp.close(index);
+			   }
+		});
+	});
+
+
+    /**
+     * 导入物资需求表
+     * */
+    $("#importMaterial").click(function(){
+        jp.open({
+            type: 2,
+            area: [500, 200],
+            auto: true,
+            title:"导入数据",
+            content: "${ctx}/tag/importExcel" ,
+            btn: ['下载模板','确定', '关闭'],
+            btn1: function(index, layero){
+                jp.downloadFile('${ctx}/transitMaterialGoods/import/templateNew');
+            },
+            btn2: function(index, layero){
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                iframeWin.contentWindow.importExcel('${ctx}/transitMaterialGoods/importVerify', function (data) {
+                    if(data.success){
+                        jp.success(data.msg);
+                        jp.downloadFile('${ctx}/MaterialReportDetails/exportVerify','finalAccount');//给个name是为了能够在某些条件下下载两个文件	refresh();
+
+                        refresh();
+                    }else{
+                        jp.error(data.msg);
+                    }
+                    jp.close(index);
+                });//调用保存事件
+                return false;
+            },
+
+            btn3: function(index){
+                //  jp.close(index);
+            }
+        });
+    });
+
+	 $("#export").click(function(){//导出Excel文件
+			jp.downloadFile('${ctx}/transitMaterialGoods/export');
+	  });
+
+
+	  $("#search").click("click", function() {// 绑定查询按扭
+		  $('#leave1Table').bootstrapTable('refresh');
+		});
+
+	 $("#reset").click("click", function() {// 绑定查询按扭
+		  $("#searchForm  input").val("");
+		  $("#searchForm  select").val("");
+		  $("#searchForm  .select-item").html("");
+		  $('#leave1Table').bootstrapTable('refresh');
+		});
+
+		$('#beginBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endBeginDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+		$('#endDate').datetimepicker({
+			 format: "YYYY-MM-DD HH:mm:ss"
+		});
+
+	});
+
+  function getIdSelections() {
+        return $.map($("#leave1Table").bootstrapTable('getSelections'), function (row) {
+            return row.id;
+        });
+    }
+
+  function deleteAll(){
+
+		jp.confirm('确认要删除该标准物资记录吗?', function(){
+			jp.loading();
+			jp.get("${ctx}/transitMaterialGoods/deleteAll?ids=" + getIdSelections(), function(data){
+         	  		if(data.success){
+         	  			$('#leave1Table').bootstrapTable('refresh');
+         	  			jp.success(data.msg);
+         	  		}else{
+         	  			jp.error(data.msg);
+         	  		}
+         	  	})
+
+		})
+  }
+
+    //刷新列表
+  function refresh(){
+  	$('#leave1Table').bootstrapTable('refresh');
+  }
+
+
+
+
+</script>

+ 77 - 0
src/main/webapp/webpage/modules/sg/balancedlibrary/transitMaterialGoods/transitMaterialGoodsList.jsp

@@ -0,0 +1,77 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>在途物资统计管理</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="transitMaterialGoodsList.js" %>
+</head>
+<body>
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+	<div class="panel-heading">
+		<h3 class="panel-title">在途物资统计列表</h3>
+	</div>
+	<div class="panel-body">
+
+	<!-- 搜索 -->
+	<div id="search-collapse" class="collapse">
+		<div class="accordion-inner">
+			<form:form id="searchForm" modelAttribute="entity" class="form form-horizontal well clearfix">
+			 <div class="col-xs-12 col-sm-6 col-md-4">
+				<label class="label-item single-overflow pull-left" title="物料编码:">物料编码:</label>
+				<form:input path="materialCode" htmlEscape="false" maxlength="257"  class=" form-control"/>
+			</div>
+		 <div class="col-xs-12 col-sm-6 col-md-4">
+			<div style="margin-top:26px">
+			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
+			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
+			 </div>
+	    </div>
+	</form:form>
+	</div>
+	</div>
+
+	<!-- 工具栏 -->
+	<div id="toolbar">
+		<shiro:hasPermission name="sg:balancedlibrary:transitMaterialGoods:del">
+			<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+				<i class="glyphicon glyphicon-remove"></i> 删除
+			</button>
+		</shiro:hasPermission>
+		<shiro:hasPermission name="sg:balancedlibrary:transitMaterialGoods:import">
+			<button id="btnImport" class="btn btn-info">
+				<i class="fa fa-folder-open-o"></i> 导入在途物资统计表
+			</button>
+		</shiro:hasPermission>
+
+		<shiro:hasPermission name="sg:balancedlibrary:transitMaterialGoods:export">
+			<button id="export" class="btn btn-warning">
+				<i class="fa fa-file-excel-o"></i> 导出
+			</button>
+		 </shiro:hasPermission>
+		<shiro:hasPermission name="sg:balancedlibrary:transitMaterialGoods:import">
+			<button id="importMaterial" class="btn btn-info">
+				<i class="fa fa-folder-open-o"></i> 导入项目物资需求表
+			</button>
+		</shiro:hasPermission>
+	</div>
+
+	<!-- 表格 -->
+	<table id="leave1Table"   data-toolbar="#toolbar"></table>
+
+    <!-- context menu -->
+    <ul id="context-menu" class="dropdown-menu">
+        <shiro:hasPermission name="sg:balancedlibrary:transitMaterialGoods:del">
+        <li data-item="delete"><a>删除</a></li>
+        </shiro:hasPermission>
+        <li data-item="action1"><a>取消</a></li>
+    </ul>
+	</div>
+	</div>
+	</div>
+</body>
+</html>