|
@@ -1,14 +1,15 @@
|
|
package com.example.controller;
|
|
package com.example.controller;
|
|
|
|
|
|
import com.example.config.annotation.IgnoreAuth;
|
|
import com.example.config.annotation.IgnoreAuth;
|
|
|
|
+import com.example.dao.WzHouseMaintenaCostDao;
|
|
import com.example.entity.OtnAreaEntity;
|
|
import com.example.entity.OtnAreaEntity;
|
|
import com.example.entity.WzBuildManageDetailsEntity;
|
|
import com.example.entity.WzBuildManageDetailsEntity;
|
|
import com.example.entity.WzHouseMaintenaCostEntity;
|
|
import com.example.entity.WzHouseMaintenaCostEntity;
|
|
-import com.example.entity.WzStrategyEntity;
|
|
|
|
import com.example.entity.vo.BuildManageVo;
|
|
import com.example.entity.vo.BuildManageVo;
|
|
import com.example.entity.vo.housemanager.HouseYearVo;
|
|
import com.example.entity.vo.housemanager.HouseYearVo;
|
|
import com.example.entity.vo.housemanager.LeaveUseVo;
|
|
import com.example.entity.vo.housemanager.LeaveUseVo;
|
|
import com.example.entity.vo.housemanager.WzBuildmanageAvageareaVo;
|
|
import com.example.entity.vo.housemanager.WzBuildmanageAvageareaVo;
|
|
|
|
+import com.example.pojo.vo.HouseStaticVo;
|
|
import com.example.service.WzBuildManageDetailsService;
|
|
import com.example.service.WzBuildManageDetailsService;
|
|
import com.example.service.WzBuildmanageAvageareaService;
|
|
import com.example.service.WzBuildmanageAvageareaService;
|
|
import com.example.service.WzHouseMaintenaCostService;
|
|
import com.example.service.WzHouseMaintenaCostService;
|
|
@@ -19,7 +20,6 @@ import com.example.utils.PageUtils;
|
|
import com.example.utils.Query;
|
|
import com.example.utils.Query;
|
|
import com.example.utils.R;
|
|
import com.example.utils.R;
|
|
import com.example.utils.excel.ExcelExport;
|
|
import com.example.utils.excel.ExcelExport;
|
|
-import com.example.vo.HouseStaticVo;
|
|
|
|
import com.itextpdf.kernel.font.PdfFont;
|
|
import com.itextpdf.kernel.font.PdfFont;
|
|
import com.itextpdf.kernel.font.PdfFontFactory;
|
|
import com.itextpdf.kernel.font.PdfFontFactory;
|
|
import com.itextpdf.kernel.geom.PageSize;
|
|
import com.itextpdf.kernel.geom.PageSize;
|
|
@@ -46,6 +46,8 @@ import java.io.ByteArrayOutputStream;
|
|
import java.text.DateFormat;
|
|
import java.text.DateFormat;
|
|
import java.text.DecimalFormat;
|
|
import java.text.DecimalFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Calendar;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -67,6 +69,8 @@ public class WzBuildManageDetailsController {
|
|
private WzOtnAreaService otnAreaService;
|
|
private WzOtnAreaService otnAreaService;
|
|
@Autowired
|
|
@Autowired
|
|
private WzStrategyService wzStrategyService;
|
|
private WzStrategyService wzStrategyService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WzHouseMaintenaCostDao wzHouseMaintenaCostDao;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 房屋管理-->闲置管理看板
|
|
* 房屋管理-->闲置管理看板
|
|
@@ -265,7 +269,7 @@ public class WzBuildManageDetailsController {
|
|
}
|
|
}
|
|
|
|
|
|
//对cityList 进行排序
|
|
//对cityList 进行排序
|
|
- List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
|
|
List<HouseYearVo> orderList = new ArrayList<>();
|
|
List<HouseYearVo> orderList = new ArrayList<>();
|
|
int i=0;
|
|
int i=0;
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
@@ -296,29 +300,29 @@ public class WzBuildManageDetailsController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
|
- * 房屋管理-->闲置管理看板
|
|
|
|
- */
|
|
|
|
- @RequestMapping("/ideList")
|
|
|
|
- @IgnoreAuth
|
|
|
|
- public R ideList(@RequestBody PageMap pageMap) {
|
|
|
|
- //查询列表数据
|
|
|
|
- Query query = new Query(pageMap);
|
|
|
|
- int value=1000;
|
|
|
|
- //获取配置参数
|
|
|
|
- WzStrategyEntity objectByType = wzStrategyService.getObjectByType();
|
|
|
|
- if(objectByType!=null){
|
|
|
|
- String[] values=objectByType.getValue().split(",");
|
|
|
|
- value=Integer.valueOf(values[0]);
|
|
|
|
- }
|
|
|
|
- query.put("buildingAreaIdelArea", value);
|
|
|
|
- List<WzBuildManageDetailsEntity> resultList = wzBuildManageDetailsService.queryList(query);
|
|
|
|
- Query query1 = new Query(pageMap);
|
|
|
|
- query1.put("buildingAreaIdelArea", value);
|
|
|
|
- int total = wzBuildManageDetailsService.queryTotal(query1);
|
|
|
|
- PageUtils pageUtil = new PageUtils(resultList, total, 10, 10);
|
|
|
|
- return R.ok().put("page", pageUtil);
|
|
|
|
- }
|
|
|
|
|
|
+// /**
|
|
|
|
+// * 房屋管理-->闲置管理看板
|
|
|
|
+// */
|
|
|
|
+// @RequestMapping("/ideList")
|
|
|
|
+// @IgnoreAuth
|
|
|
|
+// public R ideList(@RequestBody PageMap pageMap) {
|
|
|
|
+// //查询列表数据
|
|
|
|
+// Query query = new Query(pageMap);
|
|
|
|
+// int value=1000;
|
|
|
|
+// //获取配置参数
|
|
|
|
+// WzStrategyEntity objectByType = wzStrategyService.getObjectByType();
|
|
|
|
+// if(objectByType!=null){
|
|
|
|
+// String[] values=objectByType.getValue().split(",");
|
|
|
|
+// value=Integer.valueOf(values[0]);
|
|
|
|
+// }
|
|
|
|
+// query.put("buildingAreaIdelArea", value);
|
|
|
|
+// List<WzBuildManageDetailsEntity> resultList = wzBuildManageDetailsService.queryList(query);
|
|
|
|
+// Query query1 = new Query(pageMap);
|
|
|
|
+// query1.put("buildingAreaIdelArea", value);
|
|
|
|
+// int total = wzBuildManageDetailsService.queryTotal(query1);
|
|
|
|
+// PageUtils pageUtil = new PageUtils(resultList, total, 10, 10);
|
|
|
|
+// return R.ok().put("page", pageUtil);
|
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 房产详情
|
|
* 房产详情
|
|
@@ -617,7 +621,7 @@ public class WzBuildManageDetailsController {
|
|
cityList.add(cityObject);
|
|
cityList.add(cityObject);
|
|
}
|
|
}
|
|
//对cityList 进行排序
|
|
//对cityList 进行排序
|
|
- List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
|
|
List<WzBuildmanageAvageareaVo> orderList = new ArrayList<>();
|
|
List<WzBuildmanageAvageareaVo> orderList = new ArrayList<>();
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (WzBuildmanageAvageareaVo wzCity : cityList) {
|
|
for (WzBuildmanageAvageareaVo wzCity : cityList) {
|
|
@@ -836,7 +840,7 @@ public class WzBuildManageDetailsController {
|
|
}
|
|
}
|
|
|
|
|
|
//对cityList 进行排序
|
|
//对cityList 进行排序
|
|
- List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
|
|
List<LeaveUseVo> orderList = new ArrayList<>();
|
|
List<LeaveUseVo> orderList = new ArrayList<>();
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (LeaveUseVo wzCity : cityList) {
|
|
for (LeaveUseVo wzCity : cityList) {
|
|
@@ -1107,7 +1111,7 @@ public class WzBuildManageDetailsController {
|
|
}
|
|
}
|
|
|
|
|
|
//对cityList 进行排序
|
|
//对cityList 进行排序
|
|
- List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
|
|
List<HouseYearVo> orderList = new ArrayList<>();
|
|
List<HouseYearVo> orderList = new ArrayList<>();
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
for (HouseYearVo wzCity : cityList) {
|
|
for (HouseYearVo wzCity : cityList) {
|
|
@@ -1343,11 +1347,30 @@ public class WzBuildManageDetailsController {
|
|
query.put("limit",12);
|
|
query.put("limit",12);
|
|
}
|
|
}
|
|
|
|
|
|
- Integer month= 202311;
|
|
|
|
|
|
+ Integer month = null;
|
|
|
|
+ Integer startMonth = null;
|
|
if(query1.get("statisticalMonth")!=null&&!query1.get("statisticalMonth").toString().equals("")){
|
|
if(query1.get("statisticalMonth")!=null&&!query1.get("statisticalMonth").toString().equals("")){
|
|
|
|
+ String statisticalMonth = (String) query1.get("statisticalMonth");
|
|
|
|
+ // 结束账期
|
|
|
|
+ LocalDate endLocalDate = LocalDate.parse(statisticalMonth + "01", DateTimeFormatter.ofPattern("yyyyMMdd"));
|
|
|
|
+ // 开始账期
|
|
|
|
+ LocalDate startLocalDate = endLocalDate.withDayOfYear(1);
|
|
|
|
+ String startStaticalMonth = startLocalDate.format(DateTimeFormatter.ofPattern("yyyyMM"));
|
|
|
|
+ startMonth = Integer.valueOf(startStaticalMonth);
|
|
query1.put("statisticalMonth1",query1.get("statisticalMonth"));
|
|
query1.put("statisticalMonth1",query1.get("statisticalMonth"));
|
|
- query1.remove("statisticalMonth");
|
|
|
|
|
|
+// query1.remove("statisticalMonth");
|
|
|
|
+ query1.put("statisticalMonth", startStaticalMonth);
|
|
month=Integer.valueOf(query1.get("statisticalMonth1").toString());
|
|
month=Integer.valueOf(query1.get("statisticalMonth1").toString());
|
|
|
|
+ } else {
|
|
|
|
+ month = wzHouseMaintenaCostDao.getLatestDate();
|
|
|
|
+ // 结束账期
|
|
|
|
+ LocalDate endLocalDate = LocalDate.parse(month + "01", DateTimeFormatter.ofPattern("yyyyMMdd"));
|
|
|
|
+ // 开始账期
|
|
|
|
+ LocalDate startLocalDate = endLocalDate.withDayOfYear(1);
|
|
|
|
+ String startStaticalMonth = startLocalDate.format(DateTimeFormatter.ofPattern("yyyyMM"));
|
|
|
|
+ query1.put("statisticalMonth1",query1.get("statisticalMonth"));
|
|
|
|
+ query1.put("statisticalMonth", startStaticalMonth);
|
|
|
|
+ startMonth = Integer.valueOf(startStaticalMonth);
|
|
}
|
|
}
|
|
|
|
|
|
List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(query);
|
|
List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(query);
|
|
@@ -1374,7 +1397,7 @@ public class WzBuildManageDetailsController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//key的转换
|
|
//key的转换
|
|
- for(int i=202301;i<month+1;i++){
|
|
|
|
|
|
+ for(int i=startMonth;i<month+1;i++){
|
|
if(costMap.get(i+"")==null){
|
|
if(costMap.get(i+"")==null){
|
|
costMap.put(i+"", 0.0);
|
|
costMap.put(i+"", 0.0);
|
|
}
|
|
}
|
|
@@ -1383,40 +1406,40 @@ public class WzBuildManageDetailsController {
|
|
Map<String,Double> _costMap=new HashMap<>();
|
|
Map<String,Double> _costMap=new HashMap<>();
|
|
for(Map.Entry<String,Double> entry:costMap.entrySet()){
|
|
for(Map.Entry<String,Double> entry:costMap.entrySet()){
|
|
String key="";
|
|
String key="";
|
|
- if(entry.getKey().contains("202301")){
|
|
|
|
|
|
+ if(entry.getKey().contains("01")){
|
|
key="one";
|
|
key="one";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202302")){
|
|
|
|
|
|
+ if(entry.getKey().contains("02")){
|
|
key="two";
|
|
key="two";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202303")){
|
|
|
|
|
|
+ if(entry.getKey().contains("03")){
|
|
key="thr";
|
|
key="thr";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202304")){
|
|
|
|
|
|
+ if(entry.getKey().contains("04")){
|
|
key="fou";
|
|
key="fou";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202305")){
|
|
|
|
|
|
+ if(entry.getKey().contains("05")){
|
|
key="fiv";
|
|
key="fiv";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202306")){
|
|
|
|
|
|
+ if(entry.getKey().contains("06")){
|
|
key="six";
|
|
key="six";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202307")){
|
|
|
|
|
|
+ if(entry.getKey().contains("07")){
|
|
key="sev";
|
|
key="sev";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202308")){
|
|
|
|
|
|
+ if(entry.getKey().contains("08")){
|
|
key="eig";
|
|
key="eig";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202309")){
|
|
|
|
|
|
+ if(entry.getKey().contains("09")){
|
|
key="nic";
|
|
key="nic";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202310")){
|
|
|
|
|
|
+ if(entry.getKey().contains("10")){
|
|
key="ten";
|
|
key="ten";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202311")){
|
|
|
|
|
|
+ if(entry.getKey().contains("11")){
|
|
key="twi";
|
|
key="twi";
|
|
}
|
|
}
|
|
- if(entry.getKey().contains("202312")){
|
|
|
|
|
|
+ if(entry.getKey().contains("12")){
|
|
key="twt";
|
|
key="twt";
|
|
}
|
|
}
|
|
_costMap.put(key,formatDouble(entry.getValue()));
|
|
_costMap.put(key,formatDouble(entry.getValue()));
|