|
@@ -398,7 +398,7 @@ public class RaiseCapitalDesignService extends CrudService<RaiseCapitalDesignMap
|
|
|
if(null != bytes){
|
|
|
list = JSON.parseArray(new String(bytes),InventoryInfo.class);
|
|
|
}else{
|
|
|
-
|
|
|
+ list=inventoryListData();
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
@@ -482,22 +482,44 @@ public class RaiseCapitalDesignService extends CrudService<RaiseCapitalDesignMap
|
|
|
String cableSeventyListJson = JSON.toJSONString(cableSeventyList);
|
|
|
CacheChannel channel = J2Cache.getChannel();
|
|
|
RedisClient client = ((RedisCacheProvider)channel.getL2Provider()).getRedisClient();
|
|
|
- BinaryJedisCommands binaryJedisCommands = client.get();
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableDisposeData").getBytes(),cableDisposeDataJson.getBytes());
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableFourHundred").getBytes(),cableFourHundredListJson.getBytes());
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),cableHundredAndTwentyListJson.getBytes());
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),cableThreeHundredListJson.getBytes());
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),cableTwoHundredFortyListJson.getBytes());
|
|
|
- binaryJedisCommands.set((cableSectionData.getUuid()+"cableSeventy").getBytes(),cableSeventyListJson.getBytes());
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableDisposeData").getBytes(),86400);
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableFourHundred").getBytes(),86400);
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),86400);
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),86400);
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),86400);
|
|
|
- binaryJedisCommands.expire((cableSectionData.getUuid()+"cableSeventy").getBytes(),86400);
|
|
|
+ try {
|
|
|
+ BinaryJedisCommands binaryJedisCommands = client.get();
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableDisposeData").getBytes(),cableDisposeDataJson.getBytes());
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableFourHundred").getBytes(),cableFourHundredListJson.getBytes());
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),cableHundredAndTwentyListJson.getBytes());
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),cableThreeHundredListJson.getBytes());
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),cableTwoHundredFortyListJson.getBytes());
|
|
|
+ binaryJedisCommands.set((cableSectionData.getUuid()+"cableSeventy").getBytes(),cableSeventyListJson.getBytes());
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableDisposeData").getBytes(),86400);
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableFourHundred").getBytes(),86400);
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),86400);
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),86400);
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),86400);
|
|
|
+ binaryJedisCommands.expire((cableSectionData.getUuid()+"cableSeventy").getBytes(),86400);
|
|
|
+ }finally {
|
|
|
+ client.release();
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 拆旧材料清单计算处理
|
|
|
+ * @param inventoryData
|
|
|
+ */
|
|
|
+ @Transactional(readOnly = false)
|
|
|
+ public void saveInventory(InventoryData inventoryData) {
|
|
|
+ List<InventoryInfo> inventoryListData = inventoryData.getInventoryList();
|
|
|
+ String inventoryJson = JSON.toJSONString(inventoryListData);
|
|
|
+ CacheChannel channel = J2Cache.getChannel();
|
|
|
+ RedisClient client = ((RedisCacheProvider)channel.getL2Provider()).getRedisClient();
|
|
|
+ try {
|
|
|
+ BinaryJedisCommands binaryJedisCommands = client.get();
|
|
|
+ binaryJedisCommands.set((inventoryData.getUuid()+"inventory").getBytes(),inventoryJson.getBytes());
|
|
|
+ binaryJedisCommands.expire((inventoryData.getUuid()+"inventory").getBytes(),86400);
|
|
|
+ } finally {
|
|
|
+ client.release();
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* 页面需要的数据
|
|
|
* @param cableSectionData
|
|
@@ -538,14 +560,218 @@ public class RaiseCapitalDesignService extends CrudService<RaiseCapitalDesignMap
|
|
|
return dataList;
|
|
|
}
|
|
|
|
|
|
- public List<InventoryInfo> InventoryData(){
|
|
|
+ public List<InventoryInfo> inventoryListData(){
|
|
|
List<InventoryInfo> list = Lists.newArrayList();
|
|
|
- InventoryInfo inventory1=new InventoryInfo();
|
|
|
- inventory1.setNum("1");
|
|
|
- inventory1.setName("10kV电力电缆");
|
|
|
- inventory1.setNum("YJV22-8.7/15-3×400");
|
|
|
- inventory1.setNum("1");
|
|
|
-
|
|
|
+ InventoryInfo inventoryYi=new InventoryInfo();
|
|
|
+ inventoryYi.setNum("1");
|
|
|
+ inventoryYi.setName("10kV电力电缆");
|
|
|
+ inventoryYi.setSpecifications("YJV22-8.7/15-3×400");
|
|
|
+ inventoryYi.setCompany("米");
|
|
|
+ list.add(inventoryYi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryEr=new InventoryInfo();
|
|
|
+ inventoryEr.setNum("1");
|
|
|
+ inventoryEr.setName("10kV电力电缆");
|
|
|
+ inventoryEr.setSpecifications("YJV22-8.7/15-3×300");
|
|
|
+ inventoryEr.setCompany("米");
|
|
|
+ list.add(inventoryEr);
|
|
|
+
|
|
|
+ InventoryInfo inventorySan=new InventoryInfo();
|
|
|
+ inventorySan.setNum("1");
|
|
|
+ inventorySan.setName("10kV电力电缆");
|
|
|
+ inventorySan.setSpecifications("YJV22-8.7/15-3×95");
|
|
|
+ inventorySan.setCompany("米");
|
|
|
+ list.add(inventorySan);
|
|
|
+
|
|
|
+ InventoryInfo inventorySi=new InventoryInfo();
|
|
|
+ inventorySi.setNum("1");
|
|
|
+ inventorySi.setName("10kV电力电缆");
|
|
|
+ inventorySi.setSpecifications("YJV22-8.7/15-3×35");
|
|
|
+ inventorySi.setCompany("米");
|
|
|
+ list.add(inventorySi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryWu=new InventoryInfo();
|
|
|
+ inventoryWu.setNum("2");
|
|
|
+ inventoryWu.setName("10kV架空导线");
|
|
|
+ inventoryWu.setSpecifications("JKLYJ-240");
|
|
|
+ inventoryWu.setCompany("米");
|
|
|
+ inventoryWu.setRemarks("折单长度(单回路径)");
|
|
|
+ list.add(inventoryWu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryLiu=new InventoryInfo();
|
|
|
+ inventoryLiu.setNum("2");
|
|
|
+ inventoryLiu.setName("10kV架空导线");
|
|
|
+ inventoryLiu.setSpecifications("JKLYJ-185");
|
|
|
+ inventoryLiu.setCompany("米");
|
|
|
+ list.add(inventoryLiu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryQi=new InventoryInfo();
|
|
|
+ inventoryQi.setNum("2");
|
|
|
+ inventoryQi.setName("10kV架空导线");
|
|
|
+ inventoryQi.setSpecifications("JKLYJ-150");
|
|
|
+ inventoryQi.setCompany("米");
|
|
|
+ list.add(inventoryQi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryBa=new InventoryInfo();
|
|
|
+ inventoryBa.setNum("2");
|
|
|
+ inventoryBa.setName("10kV架空导线");
|
|
|
+ inventoryBa.setSpecifications("LGJ-240");
|
|
|
+ inventoryBa.setCompany("米");
|
|
|
+ list.add(inventoryBa);
|
|
|
+
|
|
|
+ InventoryInfo inventoryJiu=new InventoryInfo();
|
|
|
+ inventoryJiu.setNum("2");
|
|
|
+ inventoryJiu.setName("10kV架空导线");
|
|
|
+ inventoryJiu.setSpecifications("LGJ-185");
|
|
|
+ inventoryJiu.setCompany("米");
|
|
|
+ list.add(inventoryJiu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShi=new InventoryInfo();
|
|
|
+ inventoryShi.setNum("2");
|
|
|
+ inventoryShi.setName("10kV架空导线");
|
|
|
+ inventoryShi.setSpecifications("LGJ-150");
|
|
|
+ inventoryShi.setCompany("米");
|
|
|
+ list.add(inventoryShi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiYi=new InventoryInfo();
|
|
|
+ inventoryShiYi.setNum("3");
|
|
|
+ inventoryShiYi.setName("10kV电杆");
|
|
|
+ inventoryShiYi.setSpecifications("钢管杆");
|
|
|
+ inventoryShiYi.setCompany("基");
|
|
|
+ list.add(inventoryShiYi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiEr=new InventoryInfo();
|
|
|
+ inventoryShiEr.setNum("3");
|
|
|
+ inventoryShiEr.setName("10kV电杆");
|
|
|
+ inventoryShiEr.setSpecifications("宅基塔");
|
|
|
+ inventoryShiEr.setCompany("基");
|
|
|
+ list.add(inventoryShiEr);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiSan=new InventoryInfo();
|
|
|
+ inventoryShiSan.setNum("3");
|
|
|
+ inventoryShiSan.setName("10kV电杆");
|
|
|
+ inventoryShiSan.setSpecifications("Φ190×15");
|
|
|
+ inventoryShiSan.setCompany("基");
|
|
|
+ list.add(inventoryShiSan);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiSi=new InventoryInfo();
|
|
|
+ inventoryShiSi.setNum("3");
|
|
|
+ inventoryShiSi.setName("10kV电杆");
|
|
|
+ inventoryShiSi.setSpecifications("Φ190×12");
|
|
|
+ inventoryShiSi.setCompany("基");
|
|
|
+ list.add(inventoryShiSi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiWu=new InventoryInfo();
|
|
|
+ inventoryShiWu.setNum("4");
|
|
|
+ inventoryShiWu.setName("10kV电缆分支箱");
|
|
|
+ inventoryShiWu.setSpecifications("1进1出");
|
|
|
+ inventoryShiWu.setCompany("台");
|
|
|
+ list.add(inventoryShiWu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiLiu=new InventoryInfo();
|
|
|
+ inventoryShiLiu.setNum("4");
|
|
|
+ inventoryShiLiu.setName("10kV电缆分支箱");
|
|
|
+ inventoryShiLiu.setSpecifications("1进2出");
|
|
|
+ inventoryShiLiu.setCompany("台");
|
|
|
+ list.add(inventoryShiLiu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiQi=new InventoryInfo();
|
|
|
+ inventoryShiQi.setNum("4");
|
|
|
+ inventoryShiQi.setName("10kV电缆分支箱");
|
|
|
+ inventoryShiQi.setSpecifications("1进3出");
|
|
|
+ inventoryShiQi.setCompany("台");
|
|
|
+ list.add(inventoryShiQi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiBa=new InventoryInfo();
|
|
|
+ inventoryShiBa.setNum("5");
|
|
|
+ inventoryShiBa.setName("10kV电缆环网柜");
|
|
|
+ inventoryShiBa.setSpecifications("2进2出");
|
|
|
+ inventoryShiBa.setCompany("台");
|
|
|
+ list.add(inventoryShiBa);
|
|
|
+
|
|
|
+ InventoryInfo inventoryShiJiu=new InventoryInfo();
|
|
|
+ inventoryShiJiu.setNum("5");
|
|
|
+ inventoryShiJiu.setName("10kV电缆环网柜");
|
|
|
+ inventoryShiJiu.setSpecifications("2进3出");
|
|
|
+ inventoryShiJiu.setCompany("台");
|
|
|
+ list.add(inventoryShiJiu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErYi=new InventoryInfo();
|
|
|
+ inventoryErYi.setNum("6");
|
|
|
+ inventoryErYi.setName("10kV变压器");
|
|
|
+ inventoryErYi.setSpecifications("50kVA");
|
|
|
+ inventoryErYi.setCompany("台");
|
|
|
+ list.add(inventoryErYi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErEr=new InventoryInfo();
|
|
|
+ inventoryErEr.setNum("6");
|
|
|
+ inventoryErEr.setName("10kV变压器");
|
|
|
+ inventoryErEr.setSpecifications("315kVA");
|
|
|
+ inventoryErEr.setCompany("台");
|
|
|
+ list.add(inventoryErEr);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErSan=new InventoryInfo();
|
|
|
+ inventoryErSan.setNum("7");
|
|
|
+ inventoryErSan.setName("10kV柱上设备");
|
|
|
+ inventoryErSan.setSpecifications("断路器开关");
|
|
|
+ inventoryErSan.setCompany("台");
|
|
|
+ list.add(inventoryErSan);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErSi=new InventoryInfo();
|
|
|
+ inventoryErSi.setNum("7");
|
|
|
+ inventoryErSi.setName("10kV柱上设备");
|
|
|
+ inventoryErSi.setSpecifications("SF6开关");
|
|
|
+ inventoryErSi.setCompany("台");
|
|
|
+ list.add(inventoryErSi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErWu=new InventoryInfo();
|
|
|
+ inventoryErWu.setNum("7");
|
|
|
+ inventoryErWu.setName("10kV柱上设备");
|
|
|
+ inventoryErWu.setSpecifications("熔断器");
|
|
|
+ inventoryErWu.setCompany("只");
|
|
|
+ list.add(inventoryErWu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErLiu=new InventoryInfo();
|
|
|
+ inventoryErLiu.setNum("8");
|
|
|
+ inventoryErLiu.setName("0.4kV电气设备");
|
|
|
+ inventoryErLiu.setSpecifications("低压综合配电箱");
|
|
|
+ inventoryErLiu.setCompany("套");
|
|
|
+ list.add(inventoryErLiu);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErQi=new InventoryInfo();
|
|
|
+ inventoryErQi.setNum("8");
|
|
|
+ inventoryErQi.setName("0.4kV电气设备");
|
|
|
+ inventoryErQi.setSpecifications("低压综合配电箱");
|
|
|
+ inventoryErQi.setCompany("面");
|
|
|
+ list.add(inventoryErQi);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErBa=new InventoryInfo();
|
|
|
+ inventoryErBa.setNum("9");
|
|
|
+ inventoryErBa.setName("0.4kV电缆");
|
|
|
+ inventoryErBa.setSpecifications("");
|
|
|
+ inventoryErBa.setCompany("米");
|
|
|
+ list.add(inventoryErBa);
|
|
|
+
|
|
|
+ InventoryInfo inventoryErJiu=new InventoryInfo();
|
|
|
+ inventoryErJiu.setNum("10");
|
|
|
+ inventoryErJiu.setName("铁附件");
|
|
|
+ inventoryErJiu.setSpecifications("变压器全套框架等");
|
|
|
+ inventoryErJiu.setCompany("吨");
|
|
|
+ list.add(inventoryErJiu);
|
|
|
+
|
|
|
+ InventoryInfo inventorySanYi=new InventoryInfo();
|
|
|
+ inventorySanYi.setNum("11");
|
|
|
+ inventorySanYi.setName("10kV箱变");
|
|
|
+ inventorySanYi.setSpecifications("");
|
|
|
+ inventorySanYi.setCompany("台");
|
|
|
+ list.add(inventorySanYi);
|
|
|
+
|
|
|
+ InventoryInfo inventorySanEr=new InventoryInfo();
|
|
|
+ inventorySanEr.setNum("12");
|
|
|
+ inventorySanEr.setName("10kV箱变");
|
|
|
+ inventorySanEr.setSpecifications("");
|
|
|
+ inventorySanEr.setCompany("台");
|
|
|
+ list.add(inventorySanEr);
|
|
|
return list;
|
|
|
}
|
|
|
}
|