提交 8b5ca585 authored 作者: zhoushaopan's avatar zhoushaopan

feat(装备管理): 新增了是否是配件字段

设备统计中新增是否是配件字段,在已报废,已销毁,已退役中添加是否是配件字段
上级 2bc956f4
...@@ -42,4 +42,7 @@ public class DeviceNewVo { ...@@ -42,4 +42,7 @@ public class DeviceNewVo {
@ApiModelProperty(value = "装备id") @ApiModelProperty(value = "装备id")
private List<Integer> devicesId; private List<Integer> devicesId;
@ApiModelProperty("是否是配件")
private Integer isPart;
} }
...@@ -299,7 +299,7 @@ public class StatisticalController { ...@@ -299,7 +299,7 @@ public class StatisticalController {
List<ScrappedDestroyedRetiredVo> destroyedRetiredVoList = new ArrayList<>(); List<ScrappedDestroyedRetiredVo> destroyedRetiredVoList = new ArrayList<>();
if (lifeStatus.containsAll(deviceLibrarySelectVo.getLifeStatus())){ if (lifeStatus.containsAll(deviceLibrarySelectVo.getLifeStatus())){
//进行组合 //进行组合
Map<String, List<DeviceLibrary>> map = libraryList.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel() + "Ǵ" + deviceLibrary.getName() + "Ǵ" + deviceLibrary.getMatchingRangeName())); Map<String, List<DeviceLibrary>> map = libraryList.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel() + "Ǵ" + deviceLibrary.getName() + "Ǵ" + deviceLibrary.getMatchingRangeName()+"Ǵ"+deviceLibrary.getIsPart()));
if (map.size()>0){ if (map.size()>0){
for (String s : map.keySet()) { for (String s : map.keySet()) {
String[] strings = s.split("Ǵ"); String[] strings = s.split("Ǵ");
...@@ -308,6 +308,7 @@ public class StatisticalController { ...@@ -308,6 +308,7 @@ public class StatisticalController {
scrappedDestroyedRetiredVo.setModel(strings[0]); scrappedDestroyedRetiredVo.setModel(strings[0]);
scrappedDestroyedRetiredVo.setName(strings[1]); scrappedDestroyedRetiredVo.setName(strings[1]);
scrappedDestroyedRetiredVo.setMatchingRangeName(strings[2]); scrappedDestroyedRetiredVo.setMatchingRangeName(strings[2]);
scrappedDestroyedRetiredVo.setIsPart(Integer.valueOf(strings[3]));
scrappedDestroyedRetiredVo.setNum(map.get(s).size()); scrappedDestroyedRetiredVo.setNum(map.get(s).size());
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
List<DeviceLibrary> deviceLibraries = map.get(s); List<DeviceLibrary> deviceLibraries = map.get(s);
......
...@@ -38,4 +38,8 @@ public class ScrappedDestroyedRetiredVo { ...@@ -38,4 +38,8 @@ public class ScrappedDestroyedRetiredVo {
@ApiModelProperty(value = "装备id") @ApiModelProperty(value = "装备id")
private List<Integer> devicesId; private List<Integer> devicesId;
@ApiModelProperty(value = "是否是配件")
private Integer isPart;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论