|
@@ -8,7 +8,6 @@ import com.project.common.utils.StringUtils;
|
|
import com.project.zcustom.domain.addional.LargeHousingLand;
|
|
import com.project.zcustom.domain.addional.LargeHousingLand;
|
|
import com.project.zcustom.mapper.logistics.PlatHousingLandMapper;
|
|
import com.project.zcustom.mapper.logistics.PlatHousingLandMapper;
|
|
import com.project.zcustom.service.logistics.ILargeHousingLandService;
|
|
import com.project.zcustom.service.logistics.ILargeHousingLandService;
|
|
-import com.project.zcustom.service.logistics.ILargePlatAssetService;
|
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
import org.apache.poi.ss.usermodel.*;
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -28,12 +27,12 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> getStockOfEstateResources(String appOrg){
|
|
public Map<String, Object> getStockOfEstateResources(String appOrg){
|
|
- String[] strArr = {"办公用房", "周转用房", "生产管理", "教育培训用房", "交流干部住房", "单身公寓/单身宿舍"};
|
|
|
|
|
|
+ String[] strArr = {"供电所用房", "物资仓储用房", "办公用房", "周转用房"};
|
|
List<LargeHousingLand> arr = new ArrayList<>();
|
|
List<LargeHousingLand> arr = new ArrayList<>();
|
|
- for (int i = 0; i < 6; i++){
|
|
|
|
|
|
+ for (int i = 0; i < 4; i++){
|
|
LargeHousingLand land = new LargeHousingLand();
|
|
LargeHousingLand land = new LargeHousingLand();
|
|
- land.setNum(0L);
|
|
|
|
- land.setAcreage(BigDecimal.valueOf(0));
|
|
|
|
|
|
+ land.setHouseNum(0L);
|
|
|
|
+ land.setHouseAcreage(BigDecimal.valueOf(0));
|
|
land.setType((long) i);
|
|
land.setType((long) i);
|
|
land.setTypeName(strArr[i]);
|
|
land.setTypeName(strArr[i]);
|
|
arr.add(land);
|
|
arr.add(land);
|
|
@@ -43,10 +42,10 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
BigDecimal housingAcreage = new BigDecimal(0);
|
|
BigDecimal housingAcreage = new BigDecimal(0);
|
|
Long housingNum = 0L;
|
|
Long housingNum = 0L;
|
|
for (LargeHousingLand it : list){
|
|
for (LargeHousingLand it : list){
|
|
- housingAcreage = housingAcreage.add(it.getAcreage());
|
|
|
|
- housingNum += it.getNum();
|
|
|
|
- arr.get(it.getType().intValue()).setAcreage(it.getAcreage());
|
|
|
|
- arr.get(it.getType().intValue()).setNum(it.getNum());
|
|
|
|
|
|
+ housingAcreage = housingAcreage.add(it.getHouseAcreage());
|
|
|
|
+ housingNum += it.getHouseNum();
|
|
|
|
+ arr.get(it.getType().intValue()).setHouseAcreage(it.getHouseAcreage());
|
|
|
|
+ arr.get(it.getType().intValue()).setHouseNum(it.getHouseNum());
|
|
}
|
|
}
|
|
map.put("pieChart", arr);
|
|
map.put("pieChart", arr);
|
|
map.put("housingNum", housingNum);
|
|
map.put("housingNum", housingNum);
|
|
@@ -55,7 +54,30 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
}
|
|
}
|
|
|
|
|
|
public Map<String, Object> getStockOfLandResources(String appOrg){
|
|
public Map<String, Object> getStockOfLandResources(String appOrg){
|
|
- return platHousingLandMapper.getStockOfLandResources(appOrg);
|
|
|
|
|
|
+ String[] strArr = {"供电所土地", "物资仓储土地", "办公土地", "周转土地"};
|
|
|
|
+ List<LargeHousingLand> arr = new ArrayList<>();
|
|
|
|
+ for (int i = 0; i < 4; i++){
|
|
|
|
+ LargeHousingLand land = new LargeHousingLand();
|
|
|
|
+ land.setLandNum(0L);
|
|
|
|
+ land.setLandAcreage(BigDecimal.valueOf(0));
|
|
|
|
+ land.setType((long) i);
|
|
|
|
+ land.setTypeName(strArr[i]);
|
|
|
|
+ arr.add(land);
|
|
|
|
+ }
|
|
|
|
+ List<LargeHousingLand> list = platHousingLandMapper.getStockOfLandResources(appOrg);
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ BigDecimal landAcreage = new BigDecimal(0);
|
|
|
|
+ Long landNum = 0L;
|
|
|
|
+ for (LargeHousingLand it : list){
|
|
|
|
+ landAcreage = landAcreage.add(it.getLandAcreage());
|
|
|
|
+ landNum += it.getLandNum();
|
|
|
|
+ arr.get(it.getType().intValue()).setLandAcreage(it.getLandAcreage());
|
|
|
|
+ arr.get(it.getType().intValue()).setLandNum(it.getLandNum());
|
|
|
|
+ }
|
|
|
|
+ map.put("chart", arr);
|
|
|
|
+ map.put("landNum", landNum);
|
|
|
|
+ map.put("landAcreage", landAcreage);
|
|
|
|
+ return map;
|
|
}
|
|
}
|
|
|
|
|
|
public Map<String, Object> getInvestFinishState(String appOrg){
|
|
public Map<String, Object> getInvestFinishState(String appOrg){
|
|
@@ -97,12 +119,10 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
List<LargeHousingLand> data = new ArrayList<>();
|
|
List<LargeHousingLand> data = new ArrayList<>();
|
|
|
|
|
|
Map<String, Long> mapType = new HashMap<>();
|
|
Map<String, Long> mapType = new HashMap<>();
|
|
- mapType.put("办公用房", 0L);
|
|
|
|
- mapType.put("周转用房", 1L);
|
|
|
|
- mapType.put("生产管理", 2L);
|
|
|
|
- mapType.put("教育培训用房", 3L);
|
|
|
|
- mapType.put("交流干部住房", 4L);
|
|
|
|
- mapType.put("单身公寓/单身宿舍", 5L);
|
|
|
|
|
|
+ mapType.put("供电所", 0L);
|
|
|
|
+ mapType.put("物资仓储", 1L);
|
|
|
|
+ mapType.put("办公", 2L);
|
|
|
|
+ mapType.put("周转", 3L);
|
|
|
|
|
|
// 跳过表头
|
|
// 跳过表头
|
|
if (rowIterator.hasNext()) {
|
|
if (rowIterator.hasNext()) {
|
|
@@ -120,34 +140,32 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
switch (i) {
|
|
switch (i) {
|
|
case 0:
|
|
case 0:
|
|
if (cell != null && cell.getCellType() == CellType.STRING) {
|
|
if (cell != null && cell.getCellType() == CellType.STRING) {
|
|
- a.setHousing(cell.getStringCellValue());
|
|
|
|
|
|
+ a.setAppOrg(cell.getStringCellValue());
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
- a.setAcreage(BigDecimal.valueOf(cell.getNumericCellValue()));
|
|
|
|
|
|
+ a.setHouseNum((long) cell.getNumericCellValue());
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- if (cell != null && cell.getCellType() == CellType.STRING) {
|
|
|
|
- a.setType(mapType.get(cell.getStringCellValue()));
|
|
|
|
|
|
+ if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
|
|
+ a.setHouseAcreage(BigDecimal.valueOf(cell.getNumericCellValue()));
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
- a.setOwnershipFlag((int) cell.getNumericCellValue());
|
|
|
|
|
|
+ a.setLandNum((long) cell.getNumericCellValue());
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
- a.setInvestmentPlanFlag((int) cell.getNumericCellValue());
|
|
|
|
|
|
+ a.setLandAcreage(BigDecimal.valueOf(cell.getNumericCellValue()));
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 5:
|
|
case 5:
|
|
- if (cell != null && cell.getCellType() == CellType.NUMERIC) {
|
|
|
|
- if (DateUtil.isCellDateFormatted(cell)) {
|
|
|
|
- a.setConstructionTime(cell.getDateCellValue());
|
|
|
|
- }
|
|
|
|
|
|
+ if (cell != null && cell.getCellType() == CellType.STRING) {
|
|
|
|
+ a.setType(mapType.get(cell.getStringCellValue()));
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
@@ -167,24 +185,12 @@ public class LargeHousingLandServiceImpl extends ServiceImpl<PlatHousingLandMapp
|
|
*/
|
|
*/
|
|
private LambdaQueryWrapper<LargeHousingLand> getLambdaQueryWrapper(LargeHousingLand largePlatHousingLand) {
|
|
private LambdaQueryWrapper<LargeHousingLand> getLambdaQueryWrapper(LargeHousingLand largePlatHousingLand) {
|
|
LambdaQueryWrapper<LargeHousingLand> lqw = new LambdaQueryWrapper<LargeHousingLand>();
|
|
LambdaQueryWrapper<LargeHousingLand> lqw = new LambdaQueryWrapper<LargeHousingLand>();
|
|
- if (StringUtils.isNotBlank(largePlatHousingLand.getHousing())){
|
|
|
|
- lqw.eq(LargeHousingLand::getHousing ,largePlatHousingLand.getHousing());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotNull(largePlatHousingLand.getAcreage())){
|
|
|
|
- lqw.eq(LargeHousingLand::getAcreage ,largePlatHousingLand.getAcreage());
|
|
|
|
|
|
+ if (StringUtils.isNotNull(largePlatHousingLand.getAppOrg())){
|
|
|
|
+ lqw.eq(LargeHousingLand::getAppOrg ,largePlatHousingLand.getAppOrg());
|
|
}
|
|
}
|
|
if (StringUtils.isNotNull(largePlatHousingLand.getType())){
|
|
if (StringUtils.isNotNull(largePlatHousingLand.getType())){
|
|
lqw.eq(LargeHousingLand::getType ,largePlatHousingLand.getType());
|
|
lqw.eq(LargeHousingLand::getType ,largePlatHousingLand.getType());
|
|
}
|
|
}
|
|
- if (StringUtils.isNotNull(largePlatHousingLand.getConstructionTime())){
|
|
|
|
- lqw.eq(LargeHousingLand::getConstructionTime ,largePlatHousingLand.getConstructionTime());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotNull(largePlatHousingLand.getOwnershipFlag())){
|
|
|
|
- lqw.eq(LargeHousingLand::getOwnershipFlag ,largePlatHousingLand.getOwnershipFlag());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotNull(largePlatHousingLand.getInvestmentPlanFlag())){
|
|
|
|
- lqw.eq(LargeHousingLand::getInvestmentPlanFlag ,largePlatHousingLand.getInvestmentPlanFlag());
|
|
|
|
- }
|
|
|
|
return lqw;
|
|
return lqw;
|
|
}
|
|
}
|
|
}
|
|
}
|