|
|
|
@ -5,6 +5,7 @@ import com.mh.user.annotation.SysLogger; |
|
|
|
import com.mh.user.entity.BuildingEntity; |
|
|
|
import com.mh.user.entity.BuildingEntity; |
|
|
|
import com.mh.user.model.AreaBuildingTreeModel; |
|
|
|
import com.mh.user.model.AreaBuildingTreeModel; |
|
|
|
import com.mh.user.model.BuildingModel; |
|
|
|
import com.mh.user.model.BuildingModel; |
|
|
|
|
|
|
|
import com.mh.user.service.AreaService; |
|
|
|
import com.mh.user.service.BuildingService; |
|
|
|
import com.mh.user.service.BuildingService; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCell; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCell; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
|
|
@ -29,6 +30,9 @@ public class BuildingController { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private BuildingService buildingService; |
|
|
|
private BuildingService buildingService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private AreaService areaService; |
|
|
|
|
|
|
|
|
|
|
|
//保存
|
|
|
|
//保存
|
|
|
|
@SysLogger(title="楼栋信息",optDesc = "保存楼栋信息") |
|
|
|
@SysLogger(title="楼栋信息",optDesc = "保存楼栋信息") |
|
|
|
@PostMapping(value="/save") |
|
|
|
@PostMapping(value="/save") |
|
|
|
@ -185,6 +189,9 @@ public class BuildingController { |
|
|
|
case 9 : |
|
|
|
case 9 : |
|
|
|
rolName = "热泵个数"; |
|
|
|
rolName = "热泵个数"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 10: |
|
|
|
|
|
|
|
rolName = "区域名称"; |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if ((rol >= 1)&&(rol <= 4)&&(sCell.equals(""))){ |
|
|
|
if ((rol >= 1)&&(rol <= 4)&&(sCell.equals(""))){ |
|
|
|
msg = rolName + "不能为空" ; |
|
|
|
msg = rolName + "不能为空" ; |
|
|
|
@ -205,7 +212,15 @@ public class BuildingController { |
|
|
|
uploadEntity.setTankHeight(Double.parseDouble(deviceList.get(6))); //默认(高区)水箱高度
|
|
|
|
uploadEntity.setTankHeight(Double.parseDouble(deviceList.get(6))); //默认(高区)水箱高度
|
|
|
|
uploadEntity.setLowTankHeight(Double.parseDouble(deviceList.get(7))); //低区水箱高度
|
|
|
|
uploadEntity.setLowTankHeight(Double.parseDouble(deviceList.get(7))); //低区水箱高度
|
|
|
|
uploadEntity.setPumpCount(Integer.parseInt(deviceList.get(8))); //热泵个数
|
|
|
|
uploadEntity.setPumpCount(Integer.parseInt(deviceList.get(8))); //热泵个数
|
|
|
|
|
|
|
|
uploadEntity.setAreaName(deviceList.get(9)); //区域名称
|
|
|
|
|
|
|
|
// 根据区域名称查询区域ID
|
|
|
|
|
|
|
|
int areaId = areaService.selectByAreaName(uploadEntity.getAreaName()); |
|
|
|
|
|
|
|
if (areaId != 0) { |
|
|
|
|
|
|
|
httpResult.setMsg(uploadEntity.getAreaName() + "区域名称有误!"); |
|
|
|
|
|
|
|
httpResult.setCode(500); |
|
|
|
|
|
|
|
return httpResult; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
uploadEntity.setAreaId(String.valueOf(areaId)); |
|
|
|
deviceList.clear(); |
|
|
|
deviceList.clear(); |
|
|
|
|
|
|
|
|
|
|
|
uploadEntityList.add(uploadEntity); |
|
|
|
uploadEntityList.add(uploadEntity); |
|
|
|
|