forked from xxhjsb/wit-park-backend
统计接口代码提交
parent
afc05a575f
commit
94ab95b70f
|
@ -61,8 +61,8 @@ public class MajorHazardSources extends BaseEntity
|
|||
@Excel(name = "危险源统一编码")
|
||||
private String unifiedCoding;
|
||||
|
||||
/** 单元类型 */
|
||||
private String unitType;
|
||||
/** 单元类型 0-生产单元 1-存储单元*/
|
||||
private int unitType;
|
||||
|
||||
/** 当前存储量 */
|
||||
private String memorySpace;
|
||||
|
@ -186,11 +186,11 @@ public class MajorHazardSources extends BaseEntity
|
|||
this.unifiedCoding = unifiedCoding;
|
||||
}
|
||||
|
||||
public String getUnitType() {
|
||||
public int getUnitType() {
|
||||
return unitType;
|
||||
}
|
||||
|
||||
public void setUnitType(String unitType) {
|
||||
public void setUnitType(int unitType) {
|
||||
this.unitType = unitType;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,12 +117,12 @@ public class MajorHazardSourcesServiceImpl implements IMajorHazardSourcesService
|
|||
|
||||
// 获取生产单元数量
|
||||
int productionUnit = (int) list.stream()
|
||||
.filter(s -> s.getUnitType().equals("生产单元")).count();
|
||||
.filter(s -> s.getUnitType() == 0).count();
|
||||
map.put("productionUnit", productionUnit);
|
||||
|
||||
// 获取存储单元数量
|
||||
int storageCell = (int) list.stream()
|
||||
.filter(s -> s.getUnitType().equals("存储单元")).count();
|
||||
.filter(s -> s.getUnitType() == 0).count();
|
||||
map.put("storageCell", storageCell);
|
||||
|
||||
return JSONObject.toJSONString(map);
|
||||
|
|
Loading…
Reference in New Issue