|
@@ -11,6 +11,8 @@ import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
|
|
|
import com.jeeplus.modules.sg.raiseCapital.entity.RaiseCapital;
|
|
|
import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionData;
|
|
|
import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionInfo;
|
|
|
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.InventoryData;
|
|
|
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.InventoryInfo;
|
|
|
import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageData;
|
|
|
import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageInfo;
|
|
|
import com.jeeplus.modules.sys.utils.DictUtils;
|
|
@@ -429,6 +431,150 @@ public class RaiseCapitalDesignExportUtil {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //拆旧材料清单计算表
|
|
|
+ public static void getSheetInventoryList(Sheet sheet, InventoryData inventoryData, RaiseCapital raiseCapital, Workbook workbook) {
|
|
|
+ if (sheet != null) {
|
|
|
+ CellStyle style = getCellStyleFont(workbook);
|
|
|
+ CellStyle cellStyle = getCellStyle(workbook);
|
|
|
+
|
|
|
+ XSSFRow row = (XSSFRow) sheet.getRow(0);
|
|
|
+ XSSFCell cell = row.getCell(0);
|
|
|
+
|
|
|
+ List<InventoryInfo> inventoryList = inventoryData.getInventoryList();
|
|
|
+
|
|
|
+ for (InventoryInfo inventoryInfo : inventoryList) {
|
|
|
+ if (inventoryInfo.getName().equals("10kV电力电缆")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "YJV22-8.7/15-3×400":
|
|
|
+ disposeinventoryRowData(1,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "YJV22-8.7/15-3×300":
|
|
|
+ disposeinventoryRowData(2,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "YJV22-8.7/15-3×95":
|
|
|
+ disposeinventoryRowData(3,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "YJV22-8.7/15-3×35":
|
|
|
+ disposeinventoryRowData(4,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV架空导线")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "JKLYJ-240":
|
|
|
+ disposeinventoryRowData(5,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "JKLYJ-185":
|
|
|
+ disposeinventoryRowData(6,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "JKLYJ-150":
|
|
|
+ disposeinventoryRowData(7,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "LGJ-240":
|
|
|
+ disposeinventoryRowData(8,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "LGJ-185":
|
|
|
+ disposeinventoryRowData(9,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "LGJ-150":
|
|
|
+ disposeinventoryRowData(10,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV电杆")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "钢管杆":
|
|
|
+ disposeinventoryRowData(11,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "宅基塔":
|
|
|
+ disposeinventoryRowData(12,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "Φ190×15":
|
|
|
+ disposeinventoryRowData(13,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "Φ190×12":
|
|
|
+ disposeinventoryRowData(14,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV电缆分支箱")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "1进1出":
|
|
|
+ disposeinventoryRowData(15,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "1进2出":
|
|
|
+ disposeinventoryRowData(16,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "1进3出":
|
|
|
+ disposeinventoryRowData(17,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV电缆环网柜")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "2进2出":
|
|
|
+ disposeinventoryRowData(18,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "2进3出":
|
|
|
+ disposeinventoryRowData(19,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV变压器")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "50kVA":
|
|
|
+ disposeinventoryRowData(20,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "315kVA":
|
|
|
+ disposeinventoryRowData(21,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV柱上设备")){
|
|
|
+ switch (inventoryInfo.getSpecifications()){
|
|
|
+ case "断路器开关":
|
|
|
+ disposeinventoryRowData(22,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "SF6开关":
|
|
|
+ disposeinventoryRowData(23,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "熔断器":
|
|
|
+ disposeinventoryRowData(24,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("0.4kV电气设备")){
|
|
|
+ if (inventoryInfo.getSpecifications().equals("低压综合配电箱")){
|
|
|
+ switch (inventoryInfo.getCompany()){
|
|
|
+ case "套":
|
|
|
+ disposeinventoryRowData(25,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "面":
|
|
|
+ disposeinventoryRowData(26,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("0.4kV电缆")){
|
|
|
+ disposeinventoryRowData(27,sheet,inventoryInfo,cellStyle);
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("铁附件")){
|
|
|
+ disposeinventoryRowData(28,sheet,inventoryInfo,cellStyle);
|
|
|
+ }
|
|
|
+ if (inventoryInfo.getName().equals("10kV箱变")){
|
|
|
+ switch (inventoryInfo.getNum()){
|
|
|
+ case "11":
|
|
|
+ disposeinventoryRowData(29,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ case "12":
|
|
|
+ disposeinventoryRowData(30,sheet,inventoryInfo,cellStyle);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 架空导线表数据处理
|
|
@@ -455,7 +601,7 @@ public class RaiseCapitalDesignExportUtil {
|
|
|
} else {
|
|
|
cell = row.getCell(2);
|
|
|
}
|
|
|
- cell.setCellValue(voltageInfo.getDoubleCircuitPath());//双回路路径
|
|
|
+ cell.setCellValue(voltageInfo.getDoubleCircuitPath());//物料名称
|
|
|
|
|
|
//第四列
|
|
|
if (row.getCell(3) == null) {
|
|
@@ -464,11 +610,38 @@ public class RaiseCapitalDesignExportUtil {
|
|
|
cell = row.getCell(3);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(voltageInfo.getSingleLong())){
|
|
|
- cell.setCellValue(voltageInfo.getSingleLong());//单线长
|
|
|
+ cell.setCellValue(voltageInfo.getSingleLong());//扩展描述
|
|
|
+ }else{
|
|
|
+ cell.setCellValue("0");//扩展描述
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void disposeinventoryRowData(Integer rowLineNumber, Sheet sheet, InventoryInfo inventoryInfo, CellStyle cellStyle){
|
|
|
+
|
|
|
+ XSSFRow row = (XSSFRow) sheet.getRow(rowLineNumber);
|
|
|
+ XSSFCell cell = row.getCell(1);
|
|
|
+ //第二列
|
|
|
+ if (row.getCell(4) == null) {
|
|
|
+ cell = row.getCell(4);
|
|
|
+ } else {
|
|
|
+ cell = row.getCell(4);
|
|
|
+ }
|
|
|
+ cell.setCellValue(inventoryInfo.getQuantity());//数量
|
|
|
+
|
|
|
+ //第三列
|
|
|
+ if (row.getCell(5) == null) {
|
|
|
+ cell = row.getCell(5);
|
|
|
+ } else {
|
|
|
+ cell = row.getCell(5);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(inventoryInfo.getRemarks())){
|
|
|
+ cell.setCellValue(inventoryInfo.getRemarks());//备注
|
|
|
}else{
|
|
|
- cell.setCellValue("0");//单线长
|
|
|
+ cell.setCellValue("");//备注
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|