|
@@ -0,0 +1,1929 @@
|
|
|
+package com.example.controller;
|
|
|
+
|
|
|
+import com.example.config.annotation.IgnoreAuth;
|
|
|
+import com.example.entity.OtnAreaEntity;
|
|
|
+import com.example.entity.WzBuildManageDetailsEntity;
|
|
|
+import com.example.entity.WzHouseMaintenaCostEntity;
|
|
|
+import com.example.entity.WzStrategyEntity;
|
|
|
+import com.example.entity.vo.BuildManageVo;
|
|
|
+import com.example.entity.vo.housemanager.HouseYearVo;
|
|
|
+import com.example.entity.vo.housemanager.LeaveUseVo;
|
|
|
+import com.example.entity.vo.housemanager.WzBuildmanageAvageareaVo;
|
|
|
+import com.example.service.WzBuildManageDetailsService;
|
|
|
+import com.example.service.WzBuildmanageAvageareaService;
|
|
|
+import com.example.service.WzHouseMaintenaCostService;
|
|
|
+import com.example.service.WzOtnAreaService;
|
|
|
+import com.example.service.WzStrategyService;
|
|
|
+import com.example.utils.PageMap;
|
|
|
+import com.example.utils.PageUtils;
|
|
|
+import com.example.utils.Query;
|
|
|
+import com.example.utils.R;
|
|
|
+import com.example.utils.excel.ExcelExport;
|
|
|
+import com.example.vo.HouseStaticVo;
|
|
|
+import com.itextpdf.kernel.font.PdfFont;
|
|
|
+import com.itextpdf.kernel.font.PdfFontFactory;
|
|
|
+import com.itextpdf.kernel.geom.PageSize;
|
|
|
+import com.itextpdf.kernel.pdf.PdfDocument;
|
|
|
+import com.itextpdf.kernel.pdf.PdfWriter;
|
|
|
+import com.itextpdf.layout.Document;
|
|
|
+import com.itextpdf.layout.element.Cell;
|
|
|
+import com.itextpdf.layout.element.Paragraph;
|
|
|
+import com.itextpdf.layout.element.Table;
|
|
|
+import com.itextpdf.layout.property.HorizontalAlignment;
|
|
|
+import com.itextpdf.layout.property.TextAlignment;
|
|
|
+import com.itextpdf.layout.property.UnitValue;
|
|
|
+import com.itextpdf.layout.property.VerticalAlignment;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.servlet.ServletOutputStream;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
+import java.text.DateFormat;
|
|
|
+import java.text.DecimalFormat;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/house-car/house/dist/api/WzBuildManageDetails")
|
|
|
+public class WzBuildManageDetailsController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private WzBuildManageDetailsService wzBuildManageDetailsService;
|
|
|
+ @Autowired
|
|
|
+ private WzBuildmanageAvageareaService wzBuildmanageAvageareaService;
|
|
|
+ @Autowired
|
|
|
+ private WzHouseMaintenaCostService wzHouseMaintenaCostService;
|
|
|
+ @Autowired
|
|
|
+ private WzOtnAreaService otnAreaService;
|
|
|
+ @Autowired
|
|
|
+ private WzStrategyService wzStrategyService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 房屋管理-->闲置管理看板
|
|
|
+ */
|
|
|
+ @RequestMapping("/list")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R list(@RequestBody PageMap pageMap) {
|
|
|
+
|
|
|
+ List<LeaveUseVo> resultList = wzBuildManageDetailsService.queryLeaveUseList(pageMap.getMap());
|
|
|
+ PageUtils pageUtil = new PageUtils(resultList, 10, 10, 10);
|
|
|
+ return R.ok().put("page", pageUtil);
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/queryHouseYear")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R queryHouseYear(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Query query = new Query(pageMap);
|
|
|
+
|
|
|
+ int repeatNum = 0;
|
|
|
+ //全省节点
|
|
|
+ HouseYearVo province = new HouseYearVo();
|
|
|
+ province.setCountyName("全省");
|
|
|
+ province.setCounty("全省");
|
|
|
+
|
|
|
+ int aoneNum = 0;
|
|
|
+ int atwoNum = 0;
|
|
|
+ int athrNum = 0;
|
|
|
+ int aforNum = 0;
|
|
|
+ int afivNum = 0;
|
|
|
+ int asixNum = 0;
|
|
|
+
|
|
|
+ List<LeaveUseVo> leaveUseVoList = wzBuildManageDetailsService.queryLeaveUseByEchart(pageMap.getMap());
|
|
|
+ Map<String, List<LeaveUseVo>> map = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : leaveUseVoList) {
|
|
|
+ double avera = leaveUseVo.getBuildingAreaIdelArea() / (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea());
|
|
|
+ if (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea() == 0) {
|
|
|
+ avera = 0;
|
|
|
+ } else {
|
|
|
+ avera = formatDouble(avera);
|
|
|
+ }
|
|
|
+ leaveUseVo.setAverage(avera);
|
|
|
+ int num = 0;
|
|
|
+ if (leaveUseVo.getBuildingStartyear() == null || leaveUseVo.getBuildingStartyear().equals("")) {
|
|
|
+ num = 0;
|
|
|
+ } else {
|
|
|
+ int year1 = Integer.parseInt(leaveUseVo.getBuildingStartyear());
|
|
|
+ Calendar cal2 = Calendar.getInstance();
|
|
|
+ cal2.setTime(new Date());
|
|
|
+ int year2 = cal2.get(Calendar.YEAR);
|
|
|
+ num = year2 - year1;
|
|
|
+ }
|
|
|
+ leaveUseVo.setHouseYearNum(num);
|
|
|
+
|
|
|
+
|
|
|
+ List<LeaveUseVo> list;
|
|
|
+ if (map.get(leaveUseVo.getCity()) != null) {
|
|
|
+ list = map.get(leaveUseVo.getCity());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ map.put(leaveUseVo.getCity(), list);
|
|
|
+ }
|
|
|
+ List<HouseYearVo> resultList = new ArrayList<>();
|
|
|
+ List<HouseYearVo> cityList = new ArrayList<>();
|
|
|
+
|
|
|
+ double provinceYearNum = 0;
|
|
|
+ double provinceSize = 0;
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> entry : map.entrySet()) {
|
|
|
+
|
|
|
+ double cityYearNum = 0;
|
|
|
+ double citySize = 0;
|
|
|
+
|
|
|
+ List<LeaveUseVo> list = entry.getValue();
|
|
|
+ //对该list相同的县进行统计
|
|
|
+ Map<String, List<LeaveUseVo>> leaveMap = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : list) {
|
|
|
+ if (leaveMap.get(leaveUseVo.getCounty()) != null) {
|
|
|
+ list = leaveMap.get(leaveUseVo.getCounty());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ leaveMap.put(leaveUseVo.getCounty(), list);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<HouseYearVo> houseYearVoList = new ArrayList<>();
|
|
|
+ int oneNum = 0;
|
|
|
+ int twoNum = 0;
|
|
|
+ int thrNum = 0;
|
|
|
+ int forNum = 0;
|
|
|
+ int fivNum = 0;
|
|
|
+ int sixNum = 0;
|
|
|
+
|
|
|
+
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> entry1 : leaveMap.entrySet()) {
|
|
|
+
|
|
|
+ List<LeaveUseVo> value = entry1.getValue();
|
|
|
+ citySize += value.size();
|
|
|
+ provinceSize += value.size();
|
|
|
+
|
|
|
+ HouseYearVo yearVo = new HouseYearVo();
|
|
|
+ yearVo.setCity(value.get(0).getCity());
|
|
|
+ yearVo.setCityName(value.get(0).getCityName());
|
|
|
+ yearVo.setCounty(value.get(0).getCounty());
|
|
|
+ yearVo.setCountyName(value.get(0).getCountyName());
|
|
|
+ double houseYear = 0;
|
|
|
+
|
|
|
+ String reapStr = "";
|
|
|
+ if (entry1.getKey().equals("市本部")) {
|
|
|
+ reapStr = "市本部" + repeatNum;
|
|
|
+ repeatNum++;
|
|
|
+ }
|
|
|
+ if (!reapStr.equals("")) {
|
|
|
+ yearVo.setCity(reapStr);
|
|
|
+ yearVo.setCounty(reapStr);
|
|
|
+ yearVo.setCountyName(reapStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (LeaveUseVo leaveUseVo : value) {
|
|
|
+ houseYear += leaveUseVo.getHouseYearNum();
|
|
|
+ cityYearNum += leaveUseVo.getHouseYearNum();
|
|
|
+ provinceYearNum += leaveUseVo.getHouseYearNum();
|
|
|
+ if(leaveUseVo.getHouseYearNum()==0){
|
|
|
+ System.out.println();
|
|
|
+ }
|
|
|
+ else if (leaveUseVo.getHouseYearNum() < 10) {
|
|
|
+ oneNum++;
|
|
|
+ aoneNum++;
|
|
|
+ yearVo.setOneLevelYear(yearVo.getOneLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 11 && leaveUseVo.getHouseYearNum() < 21) {
|
|
|
+ twoNum++;
|
|
|
+ atwoNum++;
|
|
|
+ yearVo.setTwoLevelYear(yearVo.getTwoLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 20 && leaveUseVo.getHouseYearNum() < 31) {
|
|
|
+ thrNum++;
|
|
|
+ athrNum++;
|
|
|
+ yearVo.setThrLevelYear(yearVo.getThrLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 30 && leaveUseVo.getHouseYearNum() < 41) {
|
|
|
+ forNum++;
|
|
|
+ aforNum++;
|
|
|
+ yearVo.setFouLevelYear(yearVo.getFouLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 40 && leaveUseVo.getHouseYearNum() < 51) {
|
|
|
+ fivNum++;
|
|
|
+ afivNum++;
|
|
|
+ yearVo.setFivLevelYear(yearVo.getFivLevelYear() + 1);
|
|
|
+ } else {
|
|
|
+ sixNum++;
|
|
|
+ asixNum++;
|
|
|
+ yearVo.setSixLevelYear(yearVo.getSixLevelYear() + 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ double aveage = houseYear / value.size();
|
|
|
+ yearVo.setAverage(formatDouble1(aveage));
|
|
|
+ houseYearVoList.add(yearVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<HouseYearVo> orderCountyList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ //对countList 进行排序
|
|
|
+ OtnAreaEntity area = otnAreaService.queryObject(list.get(0).getCity());
|
|
|
+ List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
|
|
|
+ int i=0;
|
|
|
+ for (OtnAreaEntity otnAreaEntity : countyAreaList) {
|
|
|
+ for (HouseYearVo wzCity : houseYearVoList) {
|
|
|
+ if (wzCity.getCounty().contains(otnAreaEntity.getName())) {
|
|
|
+ i++;
|
|
|
+ wzCity.setFlag(i%2==0);
|
|
|
+ orderCountyList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ orderCountyList = houseYearVoList;
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ HouseYearVo parent = new HouseYearVo();
|
|
|
+ parent.setOneLevelYear(oneNum);
|
|
|
+ parent.setTwoLevelYear(twoNum);
|
|
|
+ parent.setThrLevelYear(thrNum);
|
|
|
+ parent.setFouLevelYear(forNum);
|
|
|
+ parent.setFivLevelYear(fivNum);
|
|
|
+ parent.setSixLevelYear(sixNum);
|
|
|
+ parent.setCity(houseYearVoList.get(0).getCity());
|
|
|
+ parent.setCounty(houseYearVoList.get(0).getCity());
|
|
|
+ parent.setCountyName(houseYearVoList.get(0).getCityName());
|
|
|
+ parent.setChildren(orderCountyList);
|
|
|
+ double cityAvage = cityYearNum / citySize;
|
|
|
+ parent.setAverage(formatDouble1(cityAvage));
|
|
|
+
|
|
|
+ cityList.add(parent);
|
|
|
+ }
|
|
|
+
|
|
|
+ //对cityList 进行排序
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
+ List<HouseYearVo> orderList = new ArrayList<>();
|
|
|
+ int i=0;
|
|
|
+ for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
|
+ for (HouseYearVo wzCity : cityList) {
|
|
|
+ if (otnAreaEntity.getName().equals(wzCity.getCity())) {
|
|
|
+ wzCity.setFlag(i%2==0);
|
|
|
+ orderList.add(wzCity);
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ province.setOneLevelYear(aoneNum);
|
|
|
+ province.setTwoLevelYear(atwoNum);
|
|
|
+ province.setThrLevelYear(athrNum);
|
|
|
+ province.setFouLevelYear(aforNum);
|
|
|
+ province.setFivLevelYear(afivNum);
|
|
|
+ province.setSixLevelYear(asixNum);
|
|
|
+ province.setChildren(orderList);
|
|
|
+ double provinceAvage = provinceYearNum / provinceSize;
|
|
|
+ province.setAverage(formatDouble1(provinceAvage));
|
|
|
+ if(orderList.size()>0){
|
|
|
+ resultList.add(province);
|
|
|
+ }
|
|
|
+ int total = wzBuildManageDetailsService.queryTotal(query);
|
|
|
+ PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 房产详情
|
|
|
+ */
|
|
|
+ @RequestMapping("/queryHouseDetail")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R queryHouseDetail(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Query query = new Query(pageMap);
|
|
|
+ List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(query);
|
|
|
+ Query query1 = new Query(pageMap);
|
|
|
+ int total = wzBuildManageDetailsService.queryTotal(query1);
|
|
|
+
|
|
|
+ PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
|
|
|
+ return R.ok().put("page", pageUtil);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 清单excel
|
|
|
+ */
|
|
|
+ @GetMapping("/excel")
|
|
|
+ @IgnoreAuth
|
|
|
+ public void excel(String name,
|
|
|
+ String statisticalMonth,
|
|
|
+ String buildingNameAlias,
|
|
|
+ String investmentEntity,
|
|
|
+ String city,
|
|
|
+ String county,
|
|
|
+ String code,
|
|
|
+ HttpServletResponse response) {
|
|
|
+
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ if (buildingNameAlias != null) {
|
|
|
+ map.put("buildingNameAlias", buildingNameAlias);
|
|
|
+ }
|
|
|
+ if (city != null) {
|
|
|
+ map.put("city", city);
|
|
|
+ }
|
|
|
+ if (county != null) {
|
|
|
+ map.put("county", county);
|
|
|
+ }
|
|
|
+ if(statisticalMonth==null||statisticalMonth.equals("")||statisticalMonth.equals("undefined")){
|
|
|
+ }else{
|
|
|
+ map.put("statisticalMonth",statisticalMonth);
|
|
|
+ }
|
|
|
+ if(investmentEntity==null||investmentEntity.equals("")||investmentEntity.equals("undefined")){
|
|
|
+ }else{
|
|
|
+ map.put("investmentEntity",investmentEntity);
|
|
|
+ }
|
|
|
+ if(code==null||code.equals("")||code.equals("undefined")){
|
|
|
+ }else{
|
|
|
+ map.put("code",code);
|
|
|
+ }
|
|
|
+ if (buildingNameAlias != null) {
|
|
|
+ map.put("buildingNameAlias", buildingNameAlias);
|
|
|
+ }
|
|
|
+
|
|
|
+ DateFormat df = new SimpleDateFormat("yyyyMMdd");
|
|
|
+ ExcelExport ee1 ;
|
|
|
+ //判定是闲置管理还是详情
|
|
|
+ if (name.contains("自有房产")) {
|
|
|
+ ee1 = new ExcelExport("房屋管理_自有房产人均办公面积" + df.format(new Date()));
|
|
|
+ responseTab1(df, ee1, map);
|
|
|
+ ee1.export(response);
|
|
|
+ } else if (name.contains("闲置管理")) {
|
|
|
+ ee1 = new ExcelExport("房屋管理_闲置管理" + df.format(new Date()));
|
|
|
+ responseTab2(df, ee1, map);
|
|
|
+ ee1.export(response);
|
|
|
+ } else if (name.contains("房龄统计")) {
|
|
|
+ ee1 = new ExcelExport("房屋管理_房龄统计" + df.format(new Date()));
|
|
|
+ responseTab3(df, ee1, map);
|
|
|
+ ee1.export(response);
|
|
|
+ } else if (name.contains("房产详单")) {
|
|
|
+ ee1 = new ExcelExport("房屋管理_房产详单" + df.format(new Date()));
|
|
|
+ responseTab4(df, ee1, map);
|
|
|
+ ee1.export(response);
|
|
|
+ } else if (name.contains("空置")) {
|
|
|
+ ee1 = new ExcelExport("房屋空置_空置1000平方米以上" + df.format(new Date()));
|
|
|
+ map.put("buildingAreaIdelArea", 1000);
|
|
|
+ responseTab5(df, ee1, map);
|
|
|
+ ee1.export(response);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void responseTab5(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
|
|
|
+ try {
|
|
|
+ List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(map1);
|
|
|
+ List<Object> colList;
|
|
|
+ List<Object[]> allList = new ArrayList();
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add(list.get(i).getProvince());
|
|
|
+ colList.add(list.get(i).getCity());
|
|
|
+ colList.add(list.get(i).getCounty());
|
|
|
+ colList.add(list.get(i).getBuildingAias());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaIdelArea(),true));
|
|
|
+ colList.add(list.get(i).getParentBuildingName());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaUnavailable(),true));
|
|
|
+ colList.add(list.get(i).getParentLandName());
|
|
|
+ colList.add(list.get(i).getBuildingRate());
|
|
|
+ colList.add(list.get(i).getBuildingSource());
|
|
|
+ colList.add(list.get(i).getGetDate());
|
|
|
+ colList.add(list.get(i).getBuildingStartYear());
|
|
|
+ colList.add(list.get(i).getInvestmentEntity());
|
|
|
+ colList.add(list.get(i).getManagementHierarchy());
|
|
|
+ colList.add(list.get(i).getBuildingStructure());
|
|
|
+ colList.add(list.get(i).getTotalNumberOfFloors());
|
|
|
+ colList.add(list.get(i).getBuildingFaceStreet());
|
|
|
+ colList.add(list.get(i).getCourtyard());
|
|
|
+ colList.add(list.get(i).getWholeBuilding());
|
|
|
+ colList.add(list.get(i).getPremisesPermit());
|
|
|
+ colList.add(list.get(i).getNoPremisesPermitReason());
|
|
|
+ colList.add(list.get(i).getUnrelatedAssets());
|
|
|
+ colList.add(list.get(i).getAssetCode());
|
|
|
+ colList.add(list.get(i).getAstsLabe());
|
|
|
+ colList.add(list.get(i).getUseState());
|
|
|
+ colList.add(list.get(i).getBuildingUse());
|
|
|
+ colList.add(list.get(i).getOwnershipStatus());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingFloorArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaSelfUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaUnavailableArea(),true));
|
|
|
+ colList.add(list.get(i).getBuildingManageName());
|
|
|
+ colList.add(list.get(i).getBuildingManageCompany());
|
|
|
+ colList.add(list.get(i).getBuildingLongitude());
|
|
|
+ colList.add(list.get(i).getBuildingDimension());
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ }
|
|
|
+
|
|
|
+ String[] header = new String[]{
|
|
|
+ "资产所属单位(一级)",
|
|
|
+ "资产所属单位(二级)",
|
|
|
+ "资产所属单位(三级)",
|
|
|
+ "建筑别名",
|
|
|
+ "建筑面积(m²)",
|
|
|
+ "建筑面积-出租(㎡)",
|
|
|
+ "建筑面积-闲置(㎡)",
|
|
|
+ "上级局址名称",
|
|
|
+ "建筑面积-自用(㎡)",
|
|
|
+ "建筑面积-不可使用(㎡)",
|
|
|
+ "上级土地名称",
|
|
|
+ "得房率",
|
|
|
+ "房屋来源",
|
|
|
+ "取得日期",
|
|
|
+ "房龄开始年份",
|
|
|
+ "投资主体",
|
|
|
+ "管理层级",
|
|
|
+ "房屋结构",
|
|
|
+ "楼层总数",
|
|
|
+ "是否临街",
|
|
|
+ "是否有院落",
|
|
|
+ "整栋是否独有",
|
|
|
+ "是否有房产证",
|
|
|
+ "无房产证原因",
|
|
|
+ "未关联资产",
|
|
|
+ "资产编号",
|
|
|
+ "资产标签号",
|
|
|
+ "使用状态",
|
|
|
+ "建筑用途",
|
|
|
+ "权属状态",
|
|
|
+ "建筑占地面积(㎡)",
|
|
|
+ "使用面积(㎡)",
|
|
|
+ "使用面积-自用(㎡)",
|
|
|
+ "使用面积-出租(㎡)",
|
|
|
+ "使用面积-闲置(㎡)",
|
|
|
+ "使用面积-不可使用(㎡)",
|
|
|
+ "楼长姓名",
|
|
|
+ "楼长所在单位",
|
|
|
+ "经度",
|
|
|
+ "纬度",
|
|
|
+ };
|
|
|
+ ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 报表=>自有房产人均办公面积
|
|
|
+ */
|
|
|
+ public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
|
|
|
+ try {
|
|
|
+ //全省节点
|
|
|
+ WzBuildmanageAvageareaVo province = new WzBuildmanageAvageareaVo();
|
|
|
+ double pareaNum = 0l;
|
|
|
+ double pallEmp = 0l;
|
|
|
+
|
|
|
+ List<WzBuildmanageAvageareaVo> appointmentRecordList = wzBuildmanageAvageareaService.queryVoList(map1);
|
|
|
+ Map<String, List<WzBuildmanageAvageareaVo>> map = new HashMap<>();
|
|
|
+ for (WzBuildmanageAvageareaVo wzBuildmanageAvageareaVo : appointmentRecordList) {
|
|
|
+ double avera = wzBuildmanageAvageareaVo.getOfficeArea() / wzBuildmanageAvageareaVo.getEmployees();
|
|
|
+ avera = formatDouble(avera);
|
|
|
+ wzBuildmanageAvageareaVo.setAverage(avera);
|
|
|
+ List<WzBuildmanageAvageareaVo> list;
|
|
|
+ if (map.get(wzBuildmanageAvageareaVo.getCity()) != null) {
|
|
|
+ list = map.get(wzBuildmanageAvageareaVo.getCity());
|
|
|
+ list.add(wzBuildmanageAvageareaVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(wzBuildmanageAvageareaVo);
|
|
|
+ }
|
|
|
+ map.put(wzBuildmanageAvageareaVo.getCity(), list);
|
|
|
+ pareaNum += wzBuildmanageAvageareaVo.getOfficeArea();
|
|
|
+ pallEmp += wzBuildmanageAvageareaVo.getEmployees();
|
|
|
+ }
|
|
|
+ pareaNum = formatDouble(pareaNum);
|
|
|
+ double pavera = 0;
|
|
|
+ if (pallEmp != 0) {
|
|
|
+ pavera = formatDouble(pareaNum / pallEmp);
|
|
|
+ }
|
|
|
+ province.setOfficeArea(pareaNum);
|
|
|
+ province.setEmployees(pallEmp);
|
|
|
+ province.setCountyName("全省");
|
|
|
+ province.setCity("全省");
|
|
|
+ province.setAverage(pavera);
|
|
|
+
|
|
|
+ List<WzBuildmanageAvageareaVo> resultList = new ArrayList<>();
|
|
|
+ List<WzBuildmanageAvageareaVo> cityList = new ArrayList<>();
|
|
|
+
|
|
|
+ double allareaNum = 0l;
|
|
|
+ double allEmp = 0l;
|
|
|
+ for (Map.Entry<String, List<WzBuildmanageAvageareaVo>> entry : map.entrySet()) {
|
|
|
+
|
|
|
+ List<WzBuildmanageAvageareaVo> list = entry.getValue();
|
|
|
+ double cityAreaNum=0l;
|
|
|
+ double cityEmp=0l;
|
|
|
+ //县的Map集合
|
|
|
+ Map<String, List<WzBuildmanageAvageareaVo>> countyMap = new HashMap<>();
|
|
|
+ for (WzBuildmanageAvageareaVo leaveUseVo : list) {
|
|
|
+ if (countyMap.get(leaveUseVo.getCounty()) != null) {
|
|
|
+ list = countyMap.get(leaveUseVo.getCounty());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ countyMap.put(leaveUseVo.getCounty(), list);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<WzBuildmanageAvageareaVo> countyList = new ArrayList<>();
|
|
|
+ for (Map.Entry<String, List<WzBuildmanageAvageareaVo>> countyEntry : countyMap.entrySet()) {
|
|
|
+ double areaNum=0l;
|
|
|
+ double emp=0l;
|
|
|
+ for (WzBuildmanageAvageareaVo wzBuildmanageAvageareaVo : countyEntry.getValue()) {
|
|
|
+ areaNum += wzBuildmanageAvageareaVo.getOfficeArea();
|
|
|
+ emp += wzBuildmanageAvageareaVo.getEmployees();
|
|
|
+ cityAreaNum += wzBuildmanageAvageareaVo.getOfficeArea();
|
|
|
+ cityEmp += wzBuildmanageAvageareaVo.getEmployees();
|
|
|
+ allareaNum += wzBuildmanageAvageareaVo.getOfficeArea();
|
|
|
+ allEmp += wzBuildmanageAvageareaVo.getEmployees();
|
|
|
+ }
|
|
|
+ WzBuildmanageAvageareaVo countyObject = new WzBuildmanageAvageareaVo();
|
|
|
+ double avera = formatDouble(areaNum / emp);
|
|
|
+ countyObject.setOfficeArea(formatDouble(areaNum));
|
|
|
+ countyObject.setEmployees(emp);
|
|
|
+ countyObject.setCity(countyEntry.getValue().get(0).getCounty());
|
|
|
+ countyObject.setCountyName(list.get(0).getCityName());
|
|
|
+ countyObject.setAverage(formatDouble(avera));
|
|
|
+ countyList.add(countyObject);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<WzBuildmanageAvageareaVo> orderCountyList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ //对countList 进行排序
|
|
|
+ OtnAreaEntity area = otnAreaService.queryObject(list.get(0).getCity());
|
|
|
+ List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
|
|
|
+ int i=0;
|
|
|
+ for (OtnAreaEntity otnAreaEntity : countyAreaList) {
|
|
|
+ for (WzBuildmanageAvageareaVo wzCity : countyList) {
|
|
|
+ if (wzCity.getCity().contains(otnAreaEntity.getName())) {
|
|
|
+ i++;
|
|
|
+ wzCity.setFlag(i%2==0);
|
|
|
+ orderCountyList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ orderCountyList = countyList;
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ double cityavera = formatDouble(cityAreaNum / cityEmp);
|
|
|
+ WzBuildmanageAvageareaVo cityObject = new WzBuildmanageAvageareaVo();
|
|
|
+ cityObject.setOfficeArea(formatDouble(cityAreaNum));
|
|
|
+ cityObject.setEmployees(cityEmp);
|
|
|
+ cityObject.setCity(list.get(0).getCity());
|
|
|
+ cityObject.setCountyName(list.get(0).getCityName());
|
|
|
+ cityObject.setAverage(formatDouble(cityavera));
|
|
|
+ cityObject.setChildren(orderCountyList);
|
|
|
+ cityList.add(cityObject);
|
|
|
+ }
|
|
|
+ //对cityList 进行排序
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
+ List<WzBuildmanageAvageareaVo> orderList = new ArrayList<>();
|
|
|
+ for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
|
+ for (WzBuildmanageAvageareaVo wzCity : cityList) {
|
|
|
+ if (wzCity.getCity().contains(otnAreaEntity.getName())) {
|
|
|
+ orderList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ province.setChildren(orderList);
|
|
|
+ resultList.add(province);
|
|
|
+
|
|
|
+
|
|
|
+ List<Object> colList = new ArrayList();
|
|
|
+ List<Object[]> allList = new ArrayList();
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+
|
|
|
+ if (resultList.get(i).getCity().contains("省")) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add(resultList.get(i).getCity());
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOfficeArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getEmployees(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+
|
|
|
+ //处理城市的
|
|
|
+ List<WzBuildmanageAvageareaVo> cityList1 = resultList.get(i).getChildren();
|
|
|
+ for (WzBuildmanageAvageareaVo floorNoUserVo : cityList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add(floorNoUserVo.getCity());
|
|
|
+ colList.add("");
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOfficeArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getEmployees(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ //处理县城的
|
|
|
+ List<WzBuildmanageAvageareaVo> countyList1 = floorNoUserVo.getChildren();
|
|
|
+ for (WzBuildmanageAvageareaVo noUserVo : countyList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(noUserVo.getCity());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOfficeArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getEmployees(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] header = new String[]{
|
|
|
+ "资产所属单位(一级)",
|
|
|
+ "资产所属单位(二级)",
|
|
|
+ "资产所属单位(三级)",
|
|
|
+ "建筑面积-自用办公房(m²)",
|
|
|
+ "县市的合同人员+紧密外包人员",
|
|
|
+ "人均办公面积=B/C"
|
|
|
+ };
|
|
|
+ ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
|
|
|
+ try {
|
|
|
+ int repeatNum = 0;
|
|
|
+ //全省节点
|
|
|
+ LeaveUseVo province = new LeaveUseVo();
|
|
|
+ province.setCountyName("全省");
|
|
|
+ province.setCity("全省");
|
|
|
+ double abuildingAreaIdelArea = 0l;
|
|
|
+ double abuildingAreaRentArea = 0l;
|
|
|
+ double abuildArea = 0l;
|
|
|
+ double abuildingAreaUnavailable = 0l;
|
|
|
+ double abuildingAreaUseArea = 0l;
|
|
|
+
|
|
|
+ List<LeaveUseVo> leaveUseVoList = wzBuildManageDetailsService.queryLeaveUseList(map1);
|
|
|
+ //城市的Map
|
|
|
+ Map<String, List<LeaveUseVo>> map = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : leaveUseVoList) {
|
|
|
+ double avera;
|
|
|
+ if (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea() == 0) {
|
|
|
+ avera = 0;
|
|
|
+ } else {
|
|
|
+ avera = leaveUseVo.getBuildingAreaIdelArea() / (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea());
|
|
|
+ avera = formatDouble(avera);
|
|
|
+ }
|
|
|
+
|
|
|
+ leaveUseVo.setAverage(formatDouble1(avera * 100));
|
|
|
+ List<LeaveUseVo> list;
|
|
|
+ if (map.get(leaveUseVo.getCity()) != null) {
|
|
|
+ list = map.get(leaveUseVo.getCity());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ map.put(leaveUseVo.getCity(), list);
|
|
|
+ }
|
|
|
+ List<LeaveUseVo> resultList = new ArrayList<>();
|
|
|
+ List<LeaveUseVo> cityList = new ArrayList<>();
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> entry : map.entrySet()) {
|
|
|
+ List<LeaveUseVo> list = entry.getValue();
|
|
|
+ //县的Map集合
|
|
|
+ Map<String, List<LeaveUseVo>> countyMap = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : list) {
|
|
|
+ if (countyMap.get(leaveUseVo.getCounty()) != null) {
|
|
|
+ list = countyMap.get(leaveUseVo.getCounty());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ countyMap.put(leaveUseVo.getCounty(), list);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<LeaveUseVo> countyList = new ArrayList<>();
|
|
|
+ double citybuildingAreaIdelArea = 0l;
|
|
|
+ double citybuildingAreaRentArea = 0l;
|
|
|
+ double citybuildArea = 0l;
|
|
|
+ double citybuildingAreaUnavailable = 0l;
|
|
|
+ double citybuildingAreaUseArea = 0l;
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> countyEntry : countyMap.entrySet()) {
|
|
|
+ double buildingAreaIdelArea = 0l;
|
|
|
+ double buildingAreaRentArea = 0l;
|
|
|
+ double buildArea = 0l;
|
|
|
+ double buildingAreaUnavailable = 0l;
|
|
|
+ double buildingAreaUseArea = 0l;
|
|
|
+
|
|
|
+ LeaveUseVo county = new LeaveUseVo();
|
|
|
+ String reapStr = "";
|
|
|
+ if (countyEntry.getKey().equals("市本部")) {
|
|
|
+ reapStr = "市本部" + repeatNum;
|
|
|
+ repeatNum++;
|
|
|
+ }
|
|
|
+ for (LeaveUseVo leaveUseVo : countyEntry.getValue()) {
|
|
|
+ if (!reapStr.equals("")) {
|
|
|
+ county.setCity(reapStr);
|
|
|
+ county.setCountyName(reapStr);
|
|
|
+ } else {
|
|
|
+ county.setCity(leaveUseVo.getCounty());
|
|
|
+ county.setCountyName(leaveUseVo.getCounty());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ buildingAreaIdelArea += leaveUseVo.getBuildingAreaIdelArea();
|
|
|
+ buildingAreaRentArea += leaveUseVo.getBuildingAreaRentArea();
|
|
|
+ buildArea += leaveUseVo.getBuildingArea();
|
|
|
+ buildingAreaUnavailable += leaveUseVo.getBuildingAreaUnavailable();
|
|
|
+ buildingAreaUseArea += leaveUseVo.getBuildingAreaUseArea();
|
|
|
+
|
|
|
+ citybuildingAreaIdelArea += leaveUseVo.getBuildingAreaIdelArea();
|
|
|
+ citybuildingAreaRentArea += leaveUseVo.getBuildingAreaRentArea();
|
|
|
+ citybuildArea += leaveUseVo.getBuildingArea();
|
|
|
+ citybuildingAreaUnavailable += leaveUseVo.getBuildingAreaUnavailable();
|
|
|
+ citybuildingAreaUseArea += leaveUseVo.getBuildingAreaUseArea();
|
|
|
+
|
|
|
+ abuildingAreaIdelArea += leaveUseVo.getBuildingAreaIdelArea();
|
|
|
+ abuildingAreaRentArea += leaveUseVo.getBuildingAreaRentArea();
|
|
|
+ abuildArea += leaveUseVo.getBuildingArea();
|
|
|
+ abuildingAreaUnavailable += leaveUseVo.getBuildingAreaUnavailable();
|
|
|
+ abuildingAreaUseArea += leaveUseVo.getBuildingAreaUseArea();
|
|
|
+ }
|
|
|
+ double avera;
|
|
|
+ if (buildingAreaIdelArea + buildingAreaRentArea == 0) {
|
|
|
+ avera = 0;
|
|
|
+ } else {
|
|
|
+ avera = formatDouble(buildingAreaIdelArea / (buildingAreaRentArea + buildingAreaIdelArea));
|
|
|
+ }
|
|
|
+ county.setBuildingArea(formatDouble(buildArea));
|
|
|
+ county.setBuildingAreaIdelArea(formatDouble(buildingAreaIdelArea));
|
|
|
+ county.setBuildingAreaUnavailable(formatDouble(buildingAreaUnavailable));
|
|
|
+ county.setBuildingAreaUseArea(formatDouble(buildingAreaUseArea));
|
|
|
+ county.setBuildingAreaRentArea(formatDouble(buildingAreaRentArea));
|
|
|
+ county.setAverage(formatDouble1(avera));
|
|
|
+ countyList.add(county);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<LeaveUseVo> orderCountyList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ //对countList 进行排序
|
|
|
+ OtnAreaEntity area = otnAreaService.queryObject(list.get(0).getCity());
|
|
|
+ List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
|
|
|
+ for (OtnAreaEntity otnAreaEntity : countyAreaList) {
|
|
|
+ for (LeaveUseVo wzCity : countyList) {
|
|
|
+ if (wzCity.getCity().contains(otnAreaEntity.getName())) {
|
|
|
+ orderCountyList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ orderCountyList = countyList;
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ double avera;
|
|
|
+ if (citybuildingAreaRentArea + citybuildingAreaIdelArea == 0) {
|
|
|
+ avera = 0;
|
|
|
+ } else {
|
|
|
+ avera = formatDouble(citybuildingAreaIdelArea / (citybuildingAreaRentArea + citybuildingAreaIdelArea));
|
|
|
+ }
|
|
|
+ LeaveUseVo parent = new LeaveUseVo();
|
|
|
+ parent.setBuildingArea(formatDouble(citybuildArea));
|
|
|
+ parent.setBuildingAreaIdelArea(formatDouble(citybuildingAreaIdelArea));
|
|
|
+ parent.setBuildingAreaUnavailable(formatDouble(citybuildingAreaUnavailable));
|
|
|
+ parent.setBuildingAreaUseArea(formatDouble(citybuildingAreaUseArea));
|
|
|
+ parent.setBuildingAreaRentArea(formatDouble(citybuildingAreaRentArea));
|
|
|
+ parent.setCity(list.get(0).getCity());
|
|
|
+ parent.setCountyName(list.get(0).getCityName());
|
|
|
+ parent.setAverage(formatDouble1(avera * 100.0));
|
|
|
+ parent.setChildren(orderCountyList);
|
|
|
+ cityList.add(parent);
|
|
|
+ }
|
|
|
+
|
|
|
+ //对cityList 进行排序
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
+ List<LeaveUseVo> orderList = new ArrayList<>();
|
|
|
+ for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
|
+ for (LeaveUseVo wzCity : cityList) {
|
|
|
+ if (otnAreaEntity.getName().equals(wzCity.getCity())) {
|
|
|
+ orderList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ double aavera = formatDouble(abuildingAreaIdelArea / (abuildingAreaRentArea + abuildingAreaIdelArea)) * 100;
|
|
|
+ province.setAverage(formatDouble(aavera));
|
|
|
+ province.setChildren(orderList);
|
|
|
+ province.setBuildingArea(formatDouble(abuildArea));
|
|
|
+ province.setBuildingAreaIdelArea(formatDouble(abuildingAreaIdelArea));
|
|
|
+ province.setBuildingAreaUnavailable(formatDouble(abuildingAreaUnavailable));
|
|
|
+ province.setBuildingAreaUseArea(formatDouble(abuildingAreaUseArea));
|
|
|
+ province.setBuildingAreaRentArea(formatDouble(abuildingAreaRentArea));
|
|
|
+ resultList.add(province);
|
|
|
+
|
|
|
+
|
|
|
+ List<Object> colList = new ArrayList();
|
|
|
+ ;
|
|
|
+ List<Object[]> allList = new ArrayList();
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+
|
|
|
+ if (resultList.get(i).getCity().contains("省")) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add(resultList.get(i).getCity());
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getIdelNum(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+
|
|
|
+ //处理城市的
|
|
|
+ List<LeaveUseVo> cityList1 = resultList.get(i).getChildren();
|
|
|
+ for (LeaveUseVo floorNoUserVo : cityList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add(floorNoUserVo.getCity());
|
|
|
+ colList.add("");
|
|
|
+
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBuildingArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getIdelNum(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBuildingAreaUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBuildingAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBuildingAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+
|
|
|
+ //处理县城的
|
|
|
+ List<LeaveUseVo> countyList1 = floorNoUserVo.getChildren();
|
|
|
+ for (LeaveUseVo noUserVo : countyList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(noUserVo.getCity());
|
|
|
+
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBuildingArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getIdelNum(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBuildingAreaUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBuildingAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBuildingAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getAverage(),true));
|
|
|
+
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] header = new String[]{
|
|
|
+ "资产所属单位(一级)",
|
|
|
+ "资产所属单位(二级)",
|
|
|
+ "资产所属单位(三级)",
|
|
|
+ "建筑面积(㎡)",
|
|
|
+ "闲置建筑数量",
|
|
|
+ "建筑面积-自用(㎡)",
|
|
|
+ "建筑面积-出租(㎡)",
|
|
|
+ "建筑面积-闲置(㎡)",
|
|
|
+ "闲置率"
|
|
|
+ };
|
|
|
+ ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void responseTab3(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
|
|
|
+ try {
|
|
|
+ //查询列表数据
|
|
|
+// Query query = new Query(pageMap);
|
|
|
+
|
|
|
+ int repeatNum = 0;
|
|
|
+ //全省节点
|
|
|
+ HouseYearVo province = new HouseYearVo();
|
|
|
+ province.setCountyName("全省");
|
|
|
+ province.setCounty("全省");
|
|
|
+
|
|
|
+ int aoneNum = 0;
|
|
|
+ int atwoNum = 0;
|
|
|
+ int athrNum = 0;
|
|
|
+ int aforNum = 0;
|
|
|
+ int afivNum = 0;
|
|
|
+ int asixNum = 0;
|
|
|
+
|
|
|
+ List<LeaveUseVo> leaveUseVoList = wzBuildManageDetailsService.queryLeaveUseList(map1);
|
|
|
+ Map<String, List<LeaveUseVo>> map = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : leaveUseVoList) {
|
|
|
+ double avera = leaveUseVo.getBuildingAreaIdelArea() / (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea());
|
|
|
+ if (leaveUseVo.getBuildingAreaIdelArea() + leaveUseVo.getBuildingAreaRentArea() == 0) {
|
|
|
+ avera = 0;
|
|
|
+ } else {
|
|
|
+ avera = formatDouble(avera);
|
|
|
+ }
|
|
|
+ leaveUseVo.setAverage(avera);
|
|
|
+ int num = 0;
|
|
|
+ if (leaveUseVo.getBuildingStartyear() == null || leaveUseVo.getBuildingStartyear().equals("")) {
|
|
|
+ num = 0;
|
|
|
+ } else {
|
|
|
+ int year1 = Integer.parseInt(leaveUseVo.getBuildingStartyear());
|
|
|
+ Calendar cal2 = Calendar.getInstance();
|
|
|
+ cal2.setTime(new Date());
|
|
|
+ int year2 = cal2.get(Calendar.YEAR);
|
|
|
+ num = year2 - year1;
|
|
|
+ }
|
|
|
+ leaveUseVo.setHouseYearNum(num);
|
|
|
+
|
|
|
+
|
|
|
+ List<LeaveUseVo> list;
|
|
|
+ if (map.get(leaveUseVo.getCity()) != null) {
|
|
|
+ list = map.get(leaveUseVo.getCity());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ map.put(leaveUseVo.getCity(), list);
|
|
|
+ }
|
|
|
+ List<HouseYearVo> resultList = new ArrayList<>();
|
|
|
+ List<HouseYearVo> cityList = new ArrayList<>();
|
|
|
+
|
|
|
+ double provinceYearNum = 0;
|
|
|
+ double provinceSize = 0;
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> entry : map.entrySet()) {
|
|
|
+
|
|
|
+ double cityYearNum = 0;
|
|
|
+ double citySize = 0;
|
|
|
+
|
|
|
+ List<LeaveUseVo> list = entry.getValue();
|
|
|
+ //对该list相同的县进行统计
|
|
|
+ Map<String, List<LeaveUseVo>> leaveMap = new HashMap<>();
|
|
|
+ for (LeaveUseVo leaveUseVo : list) {
|
|
|
+ if (leaveMap.get(leaveUseVo.getCounty()) != null) {
|
|
|
+ list = leaveMap.get(leaveUseVo.getCounty());
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ } else {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ list.add(leaveUseVo);
|
|
|
+ }
|
|
|
+ leaveMap.put(leaveUseVo.getCounty(), list);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<HouseYearVo> houseYearVoList = new ArrayList<>();
|
|
|
+ int oneNum = 0;
|
|
|
+ int twoNum = 0;
|
|
|
+ int thrNum = 0;
|
|
|
+ int forNum = 0;
|
|
|
+ int fivNum = 0;
|
|
|
+ int sixNum = 0;
|
|
|
+
|
|
|
+
|
|
|
+ for (Map.Entry<String, List<LeaveUseVo>> entry1 : leaveMap.entrySet()) {
|
|
|
+
|
|
|
+ List<LeaveUseVo> value = entry1.getValue();
|
|
|
+ citySize += value.size();
|
|
|
+ provinceSize += value.size();
|
|
|
+
|
|
|
+ HouseYearVo yearVo = new HouseYearVo();
|
|
|
+ yearVo.setCity(value.get(0).getCity());
|
|
|
+ yearVo.setCityName(value.get(0).getCityName());
|
|
|
+ yearVo.setCounty(value.get(0).getCounty());
|
|
|
+ yearVo.setCountyName(value.get(0).getCountyName());
|
|
|
+ double houseYear = 0;
|
|
|
+
|
|
|
+ String reapStr = "";
|
|
|
+ if (entry1.getKey().equals("市本部")) {
|
|
|
+ reapStr = "市本部" + repeatNum;
|
|
|
+ repeatNum++;
|
|
|
+ }
|
|
|
+ if (!reapStr.equals("")) {
|
|
|
+ yearVo.setCity(reapStr);
|
|
|
+ yearVo.setCounty(reapStr);
|
|
|
+ yearVo.setCountyName(reapStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (LeaveUseVo leaveUseVo : value) {
|
|
|
+ houseYear += leaveUseVo.getHouseYearNum();
|
|
|
+ cityYearNum += leaveUseVo.getHouseYearNum();
|
|
|
+ provinceYearNum += leaveUseVo.getHouseYearNum();
|
|
|
+
|
|
|
+ if (leaveUseVo.getHouseYearNum() < 10) {
|
|
|
+ oneNum++;
|
|
|
+ aoneNum++;
|
|
|
+ yearVo.setOneLevelYear(yearVo.getOneLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 11 && leaveUseVo.getHouseYearNum() < 21) {
|
|
|
+ twoNum++;
|
|
|
+ atwoNum++;
|
|
|
+ yearVo.setTwoLevelYear(yearVo.getTwoLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 20 && leaveUseVo.getHouseYearNum() < 31) {
|
|
|
+ thrNum++;
|
|
|
+ athrNum++;
|
|
|
+ yearVo.setThrLevelYear(yearVo.getThrLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 30 && leaveUseVo.getHouseYearNum() < 41) {
|
|
|
+ forNum++;
|
|
|
+ aforNum++;
|
|
|
+ yearVo.setFouLevelYear(yearVo.getFouLevelYear() + 1);
|
|
|
+ } else if (leaveUseVo.getHouseYearNum() > 40 && leaveUseVo.getHouseYearNum() < 51) {
|
|
|
+ fivNum++;
|
|
|
+ afivNum++;
|
|
|
+ yearVo.setFivLevelYear(yearVo.getFivLevelYear() + 1);
|
|
|
+ } else {
|
|
|
+ sixNum++;
|
|
|
+ asixNum++;
|
|
|
+ yearVo.setSixLevelYear(yearVo.getSixLevelYear() + 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ double aveage = houseYear / value.size();
|
|
|
+ yearVo.setAverage(formatDouble1(aveage));
|
|
|
+ houseYearVoList.add(yearVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<HouseYearVo> orderCountyList = new ArrayList<>();
|
|
|
+ try {
|
|
|
+ //对countList 进行排序
|
|
|
+ OtnAreaEntity area = otnAreaService.queryObject(list.get(0).getCity());
|
|
|
+ List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
|
|
|
+ for (OtnAreaEntity otnAreaEntity : countyAreaList) {
|
|
|
+ for (HouseYearVo wzCity : houseYearVoList) {
|
|
|
+ if (wzCity.getCounty().contains(otnAreaEntity.getName())) {
|
|
|
+ orderCountyList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ orderCountyList = houseYearVoList;
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ HouseYearVo parent = new HouseYearVo();
|
|
|
+ parent.setOneLevelYear(oneNum);
|
|
|
+ parent.setTwoLevelYear(twoNum);
|
|
|
+ parent.setThrLevelYear(thrNum);
|
|
|
+ parent.setFouLevelYear(forNum);
|
|
|
+ parent.setFivLevelYear(fivNum);
|
|
|
+ parent.setSixLevelYear(sixNum);
|
|
|
+ parent.setCity(houseYearVoList.get(0).getCity());
|
|
|
+ parent.setCounty(houseYearVoList.get(0).getCity());
|
|
|
+ parent.setCountyName(houseYearVoList.get(0).getCityName());
|
|
|
+ parent.setChildren(orderCountyList);
|
|
|
+ double cityAvage = cityYearNum / citySize;
|
|
|
+ parent.setAverage(formatDouble1(cityAvage));
|
|
|
+
|
|
|
+ cityList.add(parent);
|
|
|
+ }
|
|
|
+
|
|
|
+ //对cityList 进行排序
|
|
|
+ List<OtnAreaEntity> areaList = otnAreaService.getCityOption(0l);
|
|
|
+ List<HouseYearVo> orderList = new ArrayList<>();
|
|
|
+ for (OtnAreaEntity otnAreaEntity : areaList) {
|
|
|
+ for (HouseYearVo wzCity : cityList) {
|
|
|
+ if (otnAreaEntity.getName().equals(wzCity.getCity())) {
|
|
|
+ orderList.add(wzCity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ province.setOneLevelYear(aoneNum);
|
|
|
+ province.setTwoLevelYear(atwoNum);
|
|
|
+ province.setThrLevelYear(athrNum);
|
|
|
+ province.setFouLevelYear(aforNum);
|
|
|
+ province.setFivLevelYear(afivNum);
|
|
|
+ province.setSixLevelYear(asixNum);
|
|
|
+ province.setChildren(orderList);
|
|
|
+ double provinceAvage = provinceYearNum / provinceSize;
|
|
|
+ province.setAverage(formatDouble1(provinceAvage));
|
|
|
+ resultList.add(province);
|
|
|
+
|
|
|
+
|
|
|
+ List<Object> colList = new ArrayList();
|
|
|
+ List<Object[]> allList = new ArrayList();
|
|
|
+ for (int i = 0; i < resultList.size(); i++) {
|
|
|
+
|
|
|
+ if (resultList.get(i).getCounty().contains("省")) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add(resultList.get(i).getCity());
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOneLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTwoLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getThrLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getFouLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getFivLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSixLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+
|
|
|
+ //处理城市的
|
|
|
+ List<HouseYearVo> cityList1 = resultList.get(i).getChildren();
|
|
|
+ for (HouseYearVo floorNoUserVo : cityList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add(floorNoUserVo.getCity());
|
|
|
+ colList.add("");
|
|
|
+
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOneLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getTwoLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getThrLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getFouLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getFivLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getSixLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getAverage(),true));
|
|
|
+ allList.add(colList.toArray());
|
|
|
+
|
|
|
+ //处理县城的
|
|
|
+ List<HouseYearVo> countyList1 = floorNoUserVo.getChildren();
|
|
|
+ for (HouseYearVo noUserVo : countyList1) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add("");
|
|
|
+ colList.add("");
|
|
|
+ colList.add(noUserVo.getCounty());
|
|
|
+
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOneLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getTwoLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getThrLevelYear(), false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getFouLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getFivLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getSixLevelYear(),false));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getAverage(),true));
|
|
|
+
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] header = new String[]{
|
|
|
+ "资产所属单位(一级)",
|
|
|
+ "资产所属单位(二级)",
|
|
|
+ "资产所属单位(三级)",
|
|
|
+ "1-10年",
|
|
|
+ "11-20年",
|
|
|
+ "21-30年",
|
|
|
+ "31-40年",
|
|
|
+ "41-50年",
|
|
|
+ "50以上",
|
|
|
+ "平均房龄"
|
|
|
+ };
|
|
|
+ ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void responseTab4(DateFormat df, ExcelExport ee1, Map<String, Object> map) {
|
|
|
+ try {
|
|
|
+ List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(map);
|
|
|
+ List<Object> colList;
|
|
|
+ List<Object[]> allList = new ArrayList();
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ colList = new ArrayList();
|
|
|
+ colList.add(list.get(i).getProvince());
|
|
|
+ colList.add(list.get(i).getCity());
|
|
|
+ colList.add(list.get(i).getCounty());
|
|
|
+ colList.add(list.get(i).getBuildingAias());
|
|
|
+ colList.add(list.get(i).getBuildingNameAlias());
|
|
|
+ colList.add(list.get(i).getBuildingAddressNumber());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingRate(),true));
|
|
|
+ colList.add(list.get(i).getParentBuildingName());
|
|
|
+ colList.add(list.get(i).getParentLandName());
|
|
|
+ colList.add(list.get(i).getBuildingSource());
|
|
|
+ colList.add(list.get(i).getBuildingStartYear());
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingFloorArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getBuildingAreaUnavailable(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaSelfUseArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaRentArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaIdelArea(),true));
|
|
|
+ colList.add(WzHouseMaintenaCostController.toThousands(list.get(i).getUseAreaUnavailableArea(),true));
|
|
|
+ colList.add(list.get(i).getBuildingManageName());
|
|
|
+ colList.add(list.get(i).getBuildingManageCompany());
|
|
|
+ colList.add(list.get(i).getBuildingLongitude());
|
|
|
+ colList.add(list.get(i).getBuildingDimension());
|
|
|
+ colList.add(list.get(i).getBuildingActualPropertyRights());
|
|
|
+ allList.add(colList.toArray());
|
|
|
+ }
|
|
|
+
|
|
|
+ String[] header = new String[]{
|
|
|
+ "资产所属单位(一级)",
|
|
|
+ "资产所属单位(二级)",
|
|
|
+ "资产所属单位(三级)",
|
|
|
+ "建筑别名",
|
|
|
+ "局址别名",
|
|
|
+ "局址编码",
|
|
|
+ "得房率",
|
|
|
+ "上级局指名称",
|
|
|
+ "上级土地名称",
|
|
|
+ "房屋来源",
|
|
|
+ "取得日期",
|
|
|
+ "建筑占地面积(㎡)",
|
|
|
+ "建筑面积(㎡)",
|
|
|
+ "建筑面积-自用(㎡)",
|
|
|
+ "建筑面积-出租(㎡)",
|
|
|
+ "建筑面积-闲置(㎡)",
|
|
|
+ "建筑面积-不可使用(㎡)",
|
|
|
+ "使用面积(㎡)",
|
|
|
+ "使用面积-自用(㎡)",
|
|
|
+ "使用面积-出租(㎡)",
|
|
|
+ "使用面积-闲置(㎡)",
|
|
|
+ "使用面积-不可使用(㎡)",
|
|
|
+ "楼长姓名",
|
|
|
+ "楼长所在单位",
|
|
|
+ "房屋经度",
|
|
|
+ "房屋纬度",
|
|
|
+ "房屋实际产权"
|
|
|
+ };
|
|
|
+ ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取局址别名
|
|
|
+ */
|
|
|
+ @RequestMapping("/getLastStaticMonth")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R getLastStaticMonth(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Query query = new Query(pageMap);
|
|
|
+ String month="";
|
|
|
+ String tableName=query.get("tableName").toString();
|
|
|
+ if(tableName.equals("wz_f_houser_lease_use_management")){
|
|
|
+ month = wzBuildManageDetailsService.getLastStaticMonth(query);
|
|
|
+ }
|
|
|
+ else if(tableName.equals("wz_f_houserent_contrac_manage")){
|
|
|
+ month = wzBuildManageDetailsService.getLastStaticMonth(query);
|
|
|
+ }
|
|
|
+ else if(tableName.equals("wz_f_buildmanage_avagearea")){
|
|
|
+ month=wzBuildmanageAvageareaService.getLastStaticMonth();
|
|
|
+ }
|
|
|
+ else if(tableName.equals("wz_f_buildmanage_building_details")){
|
|
|
+ month = wzBuildManageDetailsService.getLastStaticMonth1(query);
|
|
|
+ }
|
|
|
+ else if(tableName.equals("wz_f_houserent_rent_out_arrears_manage")){
|
|
|
+ month = wzBuildManageDetailsService.getLastStaticMonth2(query);
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.ok().put("page", month);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取局址别名
|
|
|
+ */
|
|
|
+ @RequestMapping("/getBuildingNameAlias")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R getBuildingNameAlias(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Query query = new Query(pageMap);
|
|
|
+ List<String> list = wzBuildManageDetailsService.getBuildingNameAlias(query);
|
|
|
+ Query query1 = new Query(pageMap);
|
|
|
+ int total = wzBuildManageDetailsService.getBuildingNameAliasTotal(query1);
|
|
|
+ PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
|
|
|
+ return R.ok().put("page", pageUtil);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 土地详情
|
|
|
+ */
|
|
|
+ @RequestMapping("/queryBuildDetailByCode")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R queryBuildDetailByCode(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Map<String, Object> query = new HashMap<>();
|
|
|
+ Map<String, Object> query1 = new HashMap<>();
|
|
|
+ query.putAll(pageMap.getMap());
|
|
|
+ query1.putAll(pageMap.getMap());
|
|
|
+ // 没有选择局址默认燕赵信息大厦
|
|
|
+ if (!StringUtils.hasText((String) query.get("buildingAddressNumber"))
|
|
|
+ && !StringUtils.hasText((String) query.get("buildingNameAlias"))) {
|
|
|
+ query.put("buildingAddressNumber", "13000001");
|
|
|
+ }
|
|
|
+ if(query.get("buildingAddressNumber")!=null&&query.get("buildingAddressNumber").toString().equals("")
|
|
|
+ &&query.get("buildingAias")!=null&&query.get("buildingAias").toString().equals("")){
|
|
|
+ query.put("offset",0);
|
|
|
+ query.put("limit",12);
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer month= 202311;
|
|
|
+ if(query1.get("statisticalMonth")!=null&&!query1.get("statisticalMonth").toString().equals("")){
|
|
|
+ query1.put("statisticalMonth1",query1.get("statisticalMonth"));
|
|
|
+ query1.remove("statisticalMonth");
|
|
|
+ month=Integer.valueOf(query1.get("statisticalMonth1").toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(query);
|
|
|
+ //查询局址编码buildingAddressNumber
|
|
|
+ List<WzHouseMaintenaCostEntity> costEntityList=wzHouseMaintenaCostService.queryList1(query1);
|
|
|
+ //查询房屋维修费
|
|
|
+ Map<String,Double> costMap=new HashMap<>();
|
|
|
+ double ss=0l;
|
|
|
+ double cx=0l;
|
|
|
+ for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : costEntityList) {
|
|
|
+ if(costMap.get(wzHouseMaintenaCostEntity.getStatisticalMonth())==null){
|
|
|
+ costMap.put(wzHouseMaintenaCostEntity.getStatisticalMonth(),wzHouseMaintenaCostEntity.getErpCreditedAmount());
|
|
|
+ }else{
|
|
|
+ Double num=costMap.get(wzHouseMaintenaCostEntity.getStatisticalMonth())+wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ costMap.put(wzHouseMaintenaCostEntity.getStatisticalMonth(),num);
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if(wzHouseMaintenaCostEntity.getInvestmentEntity()!=null){
|
|
|
+ if(wzHouseMaintenaCostEntity.getInvestmentEntity().equals("上市")){
|
|
|
+ ss+=wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ }else{
|
|
|
+ cx+=wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //key的转换
|
|
|
+ for(int i=202301;i<month+1;i++){
|
|
|
+ if(costMap.get(i+"")==null){
|
|
|
+ costMap.put(i+"", 0.0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Double> _costMap=new HashMap<>();
|
|
|
+ for(Map.Entry<String,Double> entry:costMap.entrySet()){
|
|
|
+ String key="";
|
|
|
+ if(entry.getKey().contains("202301")){
|
|
|
+ key="one";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202302")){
|
|
|
+ key="two";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202303")){
|
|
|
+ key="thr";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202304")){
|
|
|
+ key="fou";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202305")){
|
|
|
+ key="fiv";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202306")){
|
|
|
+ key="six";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202307")){
|
|
|
+ key="sev";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202308")){
|
|
|
+ key="eig";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202309")){
|
|
|
+ key="nic";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202310")){
|
|
|
+ key="ten";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202311")){
|
|
|
+ key="twi";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202312")){
|
|
|
+ key="twt";
|
|
|
+ }
|
|
|
+ _costMap.put(key,formatDouble(entry.getValue()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ _costMap.put("cx",formatDouble(cx));
|
|
|
+ _costMap.put("ss",formatDouble(ss));
|
|
|
+ if(list.size()>0){
|
|
|
+ _costMap.put("preIdea",formatDouble(Double.valueOf(list.get(0).getBuildingAreaIdelArea()==null?"0":list.get(0).getBuildingAreaIdelArea())));
|
|
|
+ _costMap.put("lastIdea",formatDouble(Double.valueOf(list.get(list.size()-1).getBuildingAreaIdelArea()==null?"0":list.get(list.size()-1).getBuildingAreaIdelArea())));
|
|
|
+ if(_costMap.get("preIdea")==0){
|
|
|
+ _costMap.put("average",formatDouble(0));
|
|
|
+ }else{
|
|
|
+ double average=(_costMap.get("lastIdea")-_costMap.get("preIdea"))/_costMap.get("preIdea");
|
|
|
+ _costMap.put("average",formatDouble(average));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ HouseStaticVo staticVo=new HouseStaticVo();
|
|
|
+ staticVo.setCostMap(_costMap);
|
|
|
+ staticVo.setList(list);
|
|
|
+ return R.ok().put("page", staticVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 土地详情
|
|
|
+ */
|
|
|
+ @RequestMapping("/queryCityAreaByCode")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R queryCityAreaByCode(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Map<String, Object> query = new HashMap<>();
|
|
|
+ query.putAll(pageMap.getMap());
|
|
|
+ // 没有选择局址默认燕赵信息大厦
|
|
|
+ if (!StringUtils.hasText((String) query.get("buildingAddressNumber"))
|
|
|
+ && !StringUtils.hasText((String) query.get("buildingNameAlias"))) {
|
|
|
+ query.put("buildingAddressNumber", "13000001");
|
|
|
+ }
|
|
|
+ //判断是否有日期
|
|
|
+ BuildManageVo data = wzBuildManageDetailsService.queryCityAreaByCode(query);
|
|
|
+ return R.ok().put("data", data);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取局址别名
|
|
|
+ */
|
|
|
+ @RequestMapping("/getBuildingNameCode")
|
|
|
+ @IgnoreAuth
|
|
|
+ public R getBuildingNameCode(@RequestBody PageMap pageMap) {
|
|
|
+ //查询列表数据
|
|
|
+ Query query = new Query(pageMap);
|
|
|
+ List<String> list = wzBuildManageDetailsService.getBuildingNameCode(query);
|
|
|
+ Query query1 = new Query(pageMap);
|
|
|
+ int total = wzBuildManageDetailsService.queryBuildDetailByCodeTotal(query1);
|
|
|
+ PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
|
|
|
+ return R.ok().put("page", pageUtil);
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/loadWord")
|
|
|
+ @IgnoreAuth
|
|
|
+ public void loadWord(String buildingAddressNumber, String buildingAias,String statisticalMonth, String city, String county, HttpServletResponse response) throws Exception {
|
|
|
+
|
|
|
+ Map<String, Object> query = new HashMap<>();
|
|
|
+ Map<String, Object> query1 = new HashMap<>();
|
|
|
+ query.put("buildingAddressNumber",buildingAddressNumber);
|
|
|
+ query.put("statisticalMonth",statisticalMonth);
|
|
|
+ query.put("buildingAias",buildingAias);
|
|
|
+ query.put("city",city);
|
|
|
+ query.put("county",county);
|
|
|
+
|
|
|
+ query1.put("buildingAddressNumber",buildingAddressNumber);
|
|
|
+ query1.put("statisticalMonth",statisticalMonth);
|
|
|
+ query1.put("buildingAias",buildingAias);
|
|
|
+ query1.put("city",city);
|
|
|
+ query1.put("county",county);
|
|
|
+
|
|
|
+ if(query.get("buildingAddressNumber")!=null&&query.get("buildingAddressNumber").toString().equals("")
|
|
|
+ &&query.get("buildingAias")!=null&&query.get("buildingAias").toString().equals("")){
|
|
|
+ query.put("offset",0);
|
|
|
+ query.put("limit",12);
|
|
|
+ }
|
|
|
+ if(query1.get("statisticalMonth")!=null&&!query1.get("statisticalMonth").toString().equals("")){
|
|
|
+ query1.put("statisticalMonth1",query1.get("statisticalMonth"));
|
|
|
+ query1.remove("statisticalMonth");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<WzBuildManageDetailsEntity> list = wzBuildManageDetailsService.queryList(query);
|
|
|
+ //查询局址编码buildingAddressNumber
|
|
|
+ List<WzHouseMaintenaCostEntity> costEntityList=wzHouseMaintenaCostService.queryList1(query1);
|
|
|
+ //查询房屋维修费
|
|
|
+ Map<String,Double> costMap=new HashMap<>();
|
|
|
+ double ss=0l;
|
|
|
+ double cx=0l;
|
|
|
+ for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : costEntityList) {
|
|
|
+ if(costMap.get(wzHouseMaintenaCostEntity.getStatisticalMonth())==null){
|
|
|
+ costMap.put(wzHouseMaintenaCostEntity.getStatisticalMonth(),wzHouseMaintenaCostEntity.getErpCreditedAmount());
|
|
|
+ }else{
|
|
|
+ Double num=costMap.get(wzHouseMaintenaCostEntity.getStatisticalMonth())+wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ costMap.put(wzHouseMaintenaCostEntity.getStatisticalMonth(),num);
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if(wzHouseMaintenaCostEntity.getInvestmentEntity()!=null){
|
|
|
+ if(wzHouseMaintenaCostEntity.getInvestmentEntity().equals("上市")){
|
|
|
+ ss+=wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ }else{
|
|
|
+ cx+=wzHouseMaintenaCostEntity.getErpCreditedAmount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Integer month= 202311;
|
|
|
+ //key的转换
|
|
|
+ for(int i=202301;i<month+1;i++){
|
|
|
+ if(costMap.get(i+"")==null){
|
|
|
+ costMap.put(i+"", 0.0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Double> _costMap=new HashMap<>();
|
|
|
+ for(Map.Entry<String,Double> entry:costMap.entrySet()){
|
|
|
+ String key="";
|
|
|
+ if(entry.getKey().contains("202301")){
|
|
|
+ key="one";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202302")){
|
|
|
+ key="two";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202303")){
|
|
|
+ key="thr";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202304")){
|
|
|
+ key="fou";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202305")){
|
|
|
+ key="fiv";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202306")){
|
|
|
+ key="six";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202307")){
|
|
|
+ key="sev";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202308")){
|
|
|
+ key="eig";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202309")){
|
|
|
+ key="nic";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202310")){
|
|
|
+ key="ten";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202311")){
|
|
|
+ key="twi";
|
|
|
+ }
|
|
|
+ if(entry.getKey().contains("202312")){
|
|
|
+ key="twt";
|
|
|
+ }
|
|
|
+ _costMap.put(key,formatDouble(entry.getValue()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ _costMap.put("cx",formatDouble(cx));
|
|
|
+ _costMap.put("ss",formatDouble(ss));
|
|
|
+ if(list.size()>0){
|
|
|
+ _costMap.put("preIdea",formatDouble(Double.valueOf(list.get(0).getBuildingAreaIdelArea()==null?"0":list.get(0).getBuildingAreaIdelArea())));
|
|
|
+ _costMap.put("lastIdea",formatDouble(Double.valueOf(list.get(list.size()-1).getBuildingAreaIdelArea()==null?"0":list.get(list.size()-1).getBuildingAreaIdelArea())));
|
|
|
+ if(_costMap.get("preIdea")==0){
|
|
|
+ _costMap.put("average",formatDouble(0));
|
|
|
+ }else{
|
|
|
+ double average=(_costMap.get("lastIdea")-_costMap.get("preIdea"))/_costMap.get("preIdea");
|
|
|
+ _costMap.put("average",formatDouble(average));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //------------------------->>>>>>>>>>>>>>>>>>>>>-------------------------
|
|
|
+
|
|
|
+
|
|
|
+ // 新建一个输出流
|
|
|
+ ByteArrayOutputStream bao = new ByteArrayOutputStream();
|
|
|
+ // pdfWriter 使用传递输出流为参数的构造函数
|
|
|
+ PdfWriter pdfWriter = new PdfWriter(bao);
|
|
|
+
|
|
|
+ PdfDocument pdfDoc = new PdfDocument(pdfWriter);
|
|
|
+
|
|
|
+
|
|
|
+ PageSize ps = PageSize.A4;
|
|
|
+ Document doc = new Document(pdfDoc, ps.rotate());
|
|
|
+ doc.setMargins(20, 0, 20,0);
|
|
|
+ //中文字体
|
|
|
+ PdfFont zhFont = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false);
|
|
|
+ Table table = new Table(new float[]{1,1,1,1,1,1,1,1,1,1,1,1,1,1});
|
|
|
+ // 构建表格以100%的宽度
|
|
|
+ table.setWidth(UnitValue.createPercentValue(95))
|
|
|
+ .setTextAlignment(TextAlignment.CENTER)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setPadding(0f);
|
|
|
+ //第一行
|
|
|
+ table.addCell(new Cell(3, 1)
|
|
|
+ .add(new Paragraph("基\n础\n信\n息").setFontSize(11).setFont(zhFont).setBold()).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("局址编码").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph(list.get(0).getBuildingAddressNumber()==null?"":list.get(0).getBuildingAddressNumber())
|
|
|
+ .setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("局址别名").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph(list.get(0).getBuildingAias()==null?"":list.get(0).getBuildingAias())
|
|
|
+ .setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("所属市区").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph(list.get(0).getCity()==null?"":list.get(0).getCity())
|
|
|
+ .setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("所属区县").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph(list.get(0).getCounty()==null?"":list.get(0).getCounty())
|
|
|
+ .setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ //第二行
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("局址地址").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 5).add(new Paragraph(list.get(0).getStandardAddress()==null?"":list.get(0).getStandardAddress())
|
|
|
+ .setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("所处地段").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("一般街道 (2类)").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("建筑数量").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph(list.size()+"").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ //第三行
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("建筑面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph(list.get(0).getBuildingArea()==null?"":list.get(0).getBuildingArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("土地面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph(list.get(0).getUseArea()==null?"":list.get(0).getUseArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("办公人数").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 6).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ //第四行
|
|
|
+ table.addCell(new Cell(13, 1)
|
|
|
+ .add(new Paragraph("建\n筑\n信\n息").setFontSize(11).setFont(zhFont).setBold()).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("资产编号").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("建筑别名").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("房龄开始日期").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("投资主体").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("楼层总数").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("建筑用途").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("自建面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("自用面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("出租面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("闲置面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("资产原值").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("累计折旧").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ for(int i=0;i<list.size();i++){
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getId()+"").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingAias()==null?"":list.get(i).getBuildingAias()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingStartYear()==null?"":list.get(i).getBuildingStartYear()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getInvestmentEntity()==null?"":list.get(i).getInvestmentEntity()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getTotalNumberOfFloors()==null?"":list.get(i).getTotalNumberOfFloors()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingUse()==null?"":list.get(i).getBuildingUse()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingArea()==null?"":list.get(i).getBuildingArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingAreaUseArea()==null?"":list.get(i).getBuildingAreaUseArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingAreaRentArea()==null?"":list.get(i).getBuildingAreaRentArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(list.get(i).getBuildingAreaIdelArea()==null?"":list.get(i).getBuildingAreaIdelArea()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f).setHeight(18));
|
|
|
+ }
|
|
|
+ for(int i=0;i<12-list.size();i++){
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f).setHeight(18));
|
|
|
+ }
|
|
|
+
|
|
|
+ //第四行
|
|
|
+ table.addCell(new Cell(8, 1)
|
|
|
+ .add(new Paragraph("出\n租\n信\n息").setFontSize(11).setFont(zhFont).setBold()).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("上市累计").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("对外出租收入").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("对外出租累计欠费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("水电取暖等杂费欠费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("存续累计").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("对外出租收入").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("对外出租累计欠费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("水电取暖等杂费欠费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(2, 1).add(new Paragraph("分月数据").setFontSize(10).setFont(zhFont)).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 13).add(new Paragraph("12个月数据").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("1月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("2月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("3月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("4月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("5月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("6月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("7月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("8月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("9月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("10月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("11月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("12月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("对外出租收入(上市)").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("对外出租欠费(上市)").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("对外租出收入(存续)").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("对外租出欠费(存续)").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+
|
|
|
+ //第五行
|
|
|
+ table.addCell(new Cell(6, 1)
|
|
|
+ .add(new Paragraph("费\n用\n信\n息").setFontSize(11).setFont(zhFont).setBold()).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("上市累计").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("房屋维修费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("ss")==null?"":_costMap.get("ss").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("物业管理费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("存续累计").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("房屋维修费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("cx")==null?"":_costMap.get("cx").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("物业管理费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(2, 1).add(new Paragraph("分月数据").setFontSize(10).setFont(zhFont)).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 13).add(new Paragraph("12个月数据").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("1月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("2月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("3月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("4月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("5月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("6月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("7月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("8月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("9月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("10月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("11月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("12月").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("房屋维修费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("one")==null?"":_costMap.get("one").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("two")==null?"":_costMap.get("two").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("thr")==null?"":_costMap.get("thr").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("fou")==null?"":_costMap.get("fou").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("fiv")==null?"":_costMap.get("fiv").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("six")==null?"":_costMap.get("six").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("sev")==null?"":_costMap.get("sev").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("eig")==null?"":_costMap.get("eig").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("nic")==null?"":_costMap.get("nic").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("ten")==null?"":_costMap.get("ten").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("twi")==null?"":_costMap.get("twi").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("twt")==null?"":_costMap.get("twt").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("物业管理费").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+
|
|
|
+ //第六行
|
|
|
+ table.addCell(new Cell(3, 1)
|
|
|
+ .add(new Paragraph("评\n价\n信\n息").setFontSize(11).setFont(zhFont).setBold()).setPadding(4f).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("指标").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("年初").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("当期").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("变化率").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("指标").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("年初").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("当期").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("变化率").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("自有房产人均办公面积").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("房屋面积闲置率").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("preIdea")==null?"":_costMap.get("preIdea").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("lastIdea")==null?"":_costMap.get("lastIdea").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph(_costMap.get("average")==null?"":_costMap.get("average").toString()).setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("对外出租平均单价").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("-").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 2).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 1).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+ table.addCell(new Cell(1, 3).add(new Paragraph("").setFontSize(10).setFont(zhFont)).setPadding(4f));
|
|
|
+
|
|
|
+ doc.add(table);
|
|
|
+
|
|
|
+ //边距
|
|
|
+ doc.close();
|
|
|
+
|
|
|
+ // 返回给客户端
|
|
|
+ byte[] bytes = bao.toByteArray();
|
|
|
+ response.reset();
|
|
|
+ response.setHeader("Content-Disposition","attachment;filename=totalExcel.pdf");
|
|
|
+ response.setContentType("application/pdf;charset=UTF-8");
|
|
|
+ response.setContentLength(bytes.length);
|
|
|
+ ServletOutputStream ouputStream = response.getOutputStream();
|
|
|
+ ouputStream.write(bytes, 0, bytes.length);
|
|
|
+ ouputStream.flush();
|
|
|
+ ouputStream.close();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public double formatDouble(double num) {
|
|
|
+ if (num == 0) return 0;
|
|
|
+ DecimalFormat format2 = new DecimalFormat("#.0000");
|
|
|
+ String str2 = format2.format(num);
|
|
|
+ double avera = Double.parseDouble(str2);
|
|
|
+ return avera;
|
|
|
+ }
|
|
|
+
|
|
|
+ public double formatDouble1(double num) {
|
|
|
+ if (num == 0) return 0;
|
|
|
+ DecimalFormat format2 = new DecimalFormat("#.00");
|
|
|
+ String str2 = format2.format(num);
|
|
|
+ double avera = Double.parseDouble(str2);
|
|
|
+ return avera;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|