Browse Source

1.1.0 地块模板导入功能重构

feature/v1.1.0
peihao 4 years ago
parent
commit
2ed6ef796e
  1. 20
      air/src/main/java/com/air/land/controller/LandListedController.java
  2. 4
      air/src/main/java/com/air/land/entity/LandListed.java
  3. 235
      air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java
  4. 151
      air/src/main/java/com/air/land/service/impl/LandToListServiceImpl.java
  5. 63
      air/src/main/java/com/air/utils/DateUtil.java
  6. 195
      air/src/main/java/com/air/utils/ExcelUtil.java
  7. 8
      air/src/main/resources/application.yml
  8. 380
      air/src/main/resources/config/landListed-config.json
  9. 266
      air/src/main/resources/config/landToList-config.json
  10. 24
      air/src/main/resources/mapper/AppletsMapMapper.xml

20
air/src/main/java/com/air/land/controller/LandListedController.java

@ -2,11 +2,8 @@ package com.air.land.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.air.land.dto.LandListedDto;
import com.air.land.dto.LandListedStatisticsDto;
import com.air.land.entity.LandListed;
import com.air.land.service.LandListedService;
import com.air.land.vo.LandListedAppletsVo;
import com.air.land.vo.LandListedPageVo;
import com.air.land.vo.LandListedVo;
import com.air.utils.DateUtil;
@ -17,12 +14,10 @@ import com.cinderella.framework.common.core.util.R;
import com.cinderella.framework.common.data.mybatis.QueryPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -30,10 +25,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@ -56,6 +48,7 @@ public class LandListedController {
@Value("${template.land_listed}")
private String landListedUrl;
/**
* 分页查询
*
@ -136,7 +129,7 @@ public class LandListedController {
public R<String> saveLandListed(@RequestBody LandListedVo landListedVo) {
LandListed landListed = new LandListed();
BeanUtil.copyProperties(landListedVo, landListed);
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(),"yyyyMMdd",landListedService.selectId()));
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(), "yyyyMMdd", landListedService.selectId()));
landListedService.save(landListed);
return R.ok(landListed.getLandListedId());
}
@ -164,7 +157,7 @@ public class LandListedController {
@ApiOperation(value = "通过id删除已挂牌地块", notes = "通过id删除已挂牌地块")
@DeleteMapping
public R removeByIds(@RequestBody List<String> landListedIds) {
return R.ok(landListedService.removeLandByIds(landListedIds),"删除成功");
return R.ok(landListedService.removeLandByIds(landListedIds), "删除成功");
}
/**
@ -193,7 +186,7 @@ public class LandListedController {
@ApiOperation(value = "导入已挂牌地块信息", notes = "导入已挂牌地块信息")
@PostMapping(value = "/importLandListExcel")
public R importLandListExcel(@RequestParam(value = "uploadFile") MultipartFile file) {
return R.ok(landListedService.importLandListExcel(file),"导入成功");
return R.ok(landListedService.importLandListExcel(file), "导入成功");
}
/**
@ -208,7 +201,7 @@ public class LandListedController {
List<List<String>> landList = landListedService.getLandList(ids);
InputStream resourceAsStream = LandListedController.class.getClassLoader().getResourceAsStream("templates/excel/exportLandList.xlsx");
// 读取excel模板
XSSFWorkbook wb = ExcelUtil.exportLandListedExcel(landList,resourceAsStream,2);
XSSFWorkbook wb = ExcelUtil.exportLandListedExcel(landList, resourceAsStream, 2);
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=report.xlsx");
OutputStream outputStream = response.getOutputStream();
@ -223,8 +216,9 @@ public class LandListedController {
@ApiOperation(value = "下载已挂牌地块模板", notes = "下载已挂牌地块模板")
@GetMapping("/getTemplate")
public R<String> getLandListedTemplate() {
return R.ok(minioDownUrl+landListedUrl);
return R.ok(minioDownUrl + landListedUrl);
}
}

4
air/src/main/java/com/air/land/entity/LandListed.java

@ -88,9 +88,9 @@ public class LandListed extends Model<LandListed> {
private BigDecimal civilAirDefence;
@ApiModelProperty(value = "特殊条件")
private String specialPlan;
@ApiModelProperty(value = "装配要求")
@ApiModelProperty(value = "装配建筑")
private String assemblyBuilding;
@ApiModelProperty(value = "绿色要求")
@ApiModelProperty(value = "绿色建筑")
private String greenBuilding;
@ApiModelProperty(value = "其他条件")
private String otherConditions;

235
air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java

@ -11,6 +11,7 @@ import com.air.land.mapper.LandListedMapper;
import com.air.land.service.*;
import com.air.land.vo.LandListedAppletsVo;
import com.air.utils.DateUtil;
import com.air.utils.ExcelUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -79,26 +80,26 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
}
@Override
public R<List<LandListedStatisticsDto>> appletsCalendar(String date, String city,String canton) {
List<LandListedStatisticsDto> annoDateList = baseMapper.appletsCalendarToAnnoDate(date, city,canton);
List<LandListedStatisticsDto> auctionDateList = baseMapper.appletsCalendarToAuctionDate(date, city,canton);
if (CollectionUtil.isEmpty(annoDateList)){
public R<List<LandListedStatisticsDto>> appletsCalendar(String date, String city, String canton) {
List<LandListedStatisticsDto> annoDateList = baseMapper.appletsCalendarToAnnoDate(date, city, canton);
List<LandListedStatisticsDto> auctionDateList = baseMapper.appletsCalendarToAuctionDate(date, city, canton);
if (CollectionUtil.isEmpty(annoDateList)) {
return R.ok(auctionDateList);
}
if (CollectionUtil.isEmpty(auctionDateList)){
if (CollectionUtil.isEmpty(auctionDateList)) {
return R.ok(annoDateList);
}
List<LandListedStatisticsDto> indexs = new ArrayList<>();
for(LandListedStatisticsDto annoDateVo : annoDateList){
for(int i =0 ;i<auctionDateList.size();i++){
if (annoDateVo.getDate().equals(auctionDateList.get(i).getDate())){
for (LandListedStatisticsDto annoDateVo : annoDateList) {
for (int i = 0; i < auctionDateList.size(); i++) {
if (annoDateVo.getDate().equals(auctionDateList.get(i).getDate())) {
annoDateVo.setAuctionCount(auctionDateList.get(i).getAuctionCount());
indexs.add(auctionDateList.get(i));
}
}
}
auctionDateList.removeAll(indexs);
if (CollectionUtil.isNotEmpty(auctionDateList)){
if (CollectionUtil.isNotEmpty(auctionDateList)) {
annoDateList.addAll(auctionDateList);
}
return R.ok(annoDateList);
@ -108,18 +109,66 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
public boolean importLandListExcel(MultipartFile file) {
List<LandListed> dataList;
try {
dataList = importLandListedExcel(file);
dataList = ExcelUtil.importExcel(file.getInputStream(), 0, 1, 0, LandListed.class, "config/landListed-config.json");
} catch (Exception e) {
log.error("导入已挂牌地块数据解析出错",e);
log.error("导入已挂牌地块数据出错", e);
throw new BusinessException("导入已挂牌地块数据出错");
}
if (CollectionUtil.isNotEmpty(dataList)) {
dataList.forEach(landListed -> {
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(), "yyyyMMdd", this.selectId()));
//土地出让面积,计算土地出让面积(亩)(出让面积/2000*3)
BigDecimal landTransferSquare = landListed.getLandTransferSquare();
if (landTransferSquare != null) {
landListed.setLandTransferMu(landTransferSquare.divide(new BigDecimal(2000), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(3)).setScale(0, BigDecimal.ROUND_HALF_UP));
}
//总建筑面积
BigDecimal totalConsArea = landListed.getTotalConsArea();
//成交价(万元)
BigDecimal dealPrice = null;
//出让价款起始价(万元)
BigDecimal transferPrice = null;
if (totalConsArea != null) {
//计算容积率(总建筑面积/土地出让面积)
if (landTransferSquare != null) {
landListed.setPlotRatio(totalConsArea.doubleValue() == 0 ? new BigDecimal(0) : totalConsArea.divide(landTransferSquare, 2, BigDecimal.ROUND_HALF_UP));
}
//出让价款起始价(万元),计算起始楼面价(元/㎡) (出让价款起始价/总建筑面积*10000)
transferPrice = landListed.getTransferPrice();
if (transferPrice != null) {
landListed.setStartingFloorPrice((transferPrice.doubleValue() == 0 || totalConsArea.doubleValue() == 0)
? new BigDecimal(0) : transferPrice.divide(totalConsArea, 4, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(10000)).setScale(0, BigDecimal.ROUND_HALF_UP));
}
//商业面积,商务面积
BigDecimal bizSpace = landListed.getBizSpace() == null ? new BigDecimal(0) : landListed.getBizSpace();
BigDecimal commerceSpace = landListed.getCommerceSpace() == null ? new BigDecimal(0) : landListed.getCommerceSpace();
//计算商业商务占比((商业面积+商务面积)/总建筑面积)
landListed.setBizCommerceRate(totalConsArea.doubleValue() == 0 ? new BigDecimal(0) : (bizSpace.add(commerceSpace)).
divide(totalConsArea, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
//成交价(万元),计算成交楼面价(元/㎡) (成交价/总建筑面积*10000)
dealPrice = landListed.getDealPrice();
if (dealPrice != null) {
landListed.setDealFloorPrice((dealPrice.doubleValue() == 0 || totalConsArea.doubleValue() == 0)
? new BigDecimal(0) : dealPrice.divide(totalConsArea, 4, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(10000)).setScale(0, BigDecimal.ROUND_HALF_UP));
}
}
//计算溢价率
if (dealPrice != null && transferPrice != null) {
landListed.setPremiumRate((dealPrice.doubleValue() == 0 || transferPrice.doubleValue() == 0)
? new BigDecimal(0) : (dealPrice.subtract(transferPrice)).divide(transferPrice, 4, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
}
});
}
return this.saveBatch(dataList);
}
@Override
public List<List<String>> getLandList(List<String> ids) {
List<LandListed> landListeds = this.listByIds(ids);
if (CollectionUtil.isEmpty(landListeds)){
if (CollectionUtil.isEmpty(landListeds)) {
throw new BusinessException("未查询到已挂牌地块数据!");
}
List<List<String>> list = new ArrayList<>();
@ -133,11 +182,11 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
public List<LandDto> appletsLandListed(Page page, LandVo landVo) {
landVo.setNowDate(cn.hutool.core.date.DateUtil.formatDate(new Date()));
List<LandDto> landDtos = baseMapper.appletsLandListed(page, landVo);
if(StringUtils.isEmpty(landVo.getTransactionStatus())){
if (StringUtils.isEmpty(landVo.getTransactionStatus())) {
landDtos.forEach(landDto -> {
landDto.setIsToBeListed("0");
});
}else {
} else {
landDtos.forEach(landDto -> {
landDto.setIsToBeListed("0");
landDto.setTransactionStatus(landVo.getTransactionStatus());
@ -154,15 +203,15 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
@Transactional(rollbackFor = Exception.class)
@Override
public boolean removeLandByIds(List<String> landListedIds){
public boolean removeLandByIds(List<String> landListedIds) {
this.removeByIds(landListedIds);
listedLonLatService.remove(Wrappers.<LandListedLonLat>query().lambda().in(LandListedLonLat::getLandListedId,landListedIds));
listedLonLatService.remove(Wrappers.<LandListedLonLat>query().lambda().in(LandListedLonLat::getLandListedId, landListedIds));
conductEnterpriseService.remove(Wrappers.<LandListedConductEnterprise>query().lambda()
.in(LandListedConductEnterprise::getLandListedId,landListedIds));
.in(LandListedConductEnterprise::getLandListedId, landListedIds));
constructionPlanService.remove(Wrappers.<LandListedConstructionPlan>query().lambda()
.in(LandListedConstructionPlan::getLandListedId,landListedIds));
auctionRecordService.remove(Wrappers.<AuctionRecord>query().lambda().in(AuctionRecord::getLandListedId,landListedIds));
attachmentService.remove(Wrappers.<LandAttachment>query().lambda().in(LandAttachment::getLandListedId,landListedIds));
.in(LandListedConstructionPlan::getLandListedId, landListedIds));
auctionRecordService.remove(Wrappers.<AuctionRecord>query().lambda().in(AuctionRecord::getLandListedId, landListedIds));
attachmentService.remove(Wrappers.<LandAttachment>query().lambda().in(LandAttachment::getLandListedId, landListedIds));
return true;
}
@ -184,24 +233,24 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
for (int i = 2; i < rowSum; i++) {
XSSFRow sheetRow = sheet.getRow(i);
LandListed landListed = new LandListed();
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(), "yyyyMMdd",this.selectId()));
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(), "yyyyMMdd", this.selectId()));
//公告信息
landListed.setAnnoId(getAnnoId(sheetRow.getCell(0)));
log.info("公告序号为: {}",landListed.getAnnoId());
log.info("公告序号为: {}", landListed.getAnnoId());
landListed.setLandCode(getCellStrValue(sheetRow.getCell(1)));
landListed.setLandPosition(getCellStrValue(sheetRow.getCell(2)));
landListed.setLandUsage(getCellStrValue(sheetRow.getCell(3)));
landListed.setLandTransferSquare(numberFormat(getCellValue(sheetRow.getCell(4)),0));
landListed.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(5)),0));
landListed.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(6)),0));
landListed.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(7)),2));
landListed.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(8)),100,0));
landListed.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(9)),100,0));
landListed.setLandTransferSquare(numberFormat(getCellValue(sheetRow.getCell(4)), 0));
landListed.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(5)), 0));
landListed.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(6)), 0));
landListed.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(7)), 2));
landListed.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(8)), 100, 0));
landListed.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(9)), 100, 0));
landListed.setHeighPermitted(getCellStrValue(sheetRow.getCell(10)));
landListed.setRemiseYears(getCellStrValue(sheetRow.getCell(11)));
landListed.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(12)),0));
landListed.setStartingFloorPrice(numberFormat(getCellValue(sheetRow.getCell(13)),0));
landListed.setBidMargin(numberFormat(getCellStrValue(sheetRow.getCell(14)),0));
landListed.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(12)), 0));
landListed.setStartingFloorPrice(numberFormat(getCellValue(sheetRow.getCell(13)), 0));
landListed.setBidMargin(numberFormat(getCellStrValue(sheetRow.getCell(14)), 0));
landListed.setBizRemark(getCellStrValue(sheetRow.getCell(15)));
try {
landListed.setAnnoDate(DateUtil.dateToLocalDate(sheetRow.getCell(16).getDateCellValue()));
@ -218,21 +267,21 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
} catch (Exception e) {
log.error("拍卖日期转换出错", e);
}
landListed.setLicensedArea(numberFormat(getCellStrValue(sheetRow.getCell(19)),0));
landListed.setLicensedArea(numberFormat(getCellStrValue(sheetRow.getCell(19)), 0));
//规划条件
landListed.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(20)),0));
landListed.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(21)),0));
landListed.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(22)),100,2));
landListed.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(20)), 0));
landListed.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(21)), 0));
landListed.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(22)), 100, 2));
landListed.setAllocationCapacity(getCellStrValue(sheetRow.getCell(23)));
landListed.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(24)));
//建设条件
landListed.setGeologicHazard(getCellStrValue(sheetRow.getCell(25)));
landListed.setCivilAirDefence(numberFormat(getCellStrValue(sheetRow.getCell(26)),0));
landListed.setCivilAirDefence(numberFormat(getCellStrValue(sheetRow.getCell(26)), 0));
landListed.setSpecialPlan(getCellStrValue(sheetRow.getCell(27)));
landListed.setAssemblyBuilding(getCellStrValue(sheetRow.getCell(28)));
landListed.setGreenBuilding(getCellStrValue(sheetRow.getCell(29)));
landListed.setOtherConditions(getCellStrValue(sheetRow.getCell(30)));
landListed.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(31)),0));
landListed.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(31)), 0));
//竞买条件
landListed.setBiddingConditions(getCellStrValue(sheetRow.getCell(32)));
landListed.setHookForm(getCellStrValue(sheetRow.getCell(33)));
@ -250,25 +299,25 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
landListed.setOvePosition(getCellStrValue(sheetRow.getCell(44)));
landListed.setLonLatBd(getCellStrValue(sheetRow.getCell(45)));
//成交信息
if ("是".equals(getCellStrValue(sheetRow.getCell(46)))){
if ("是".equals(getCellStrValue(sheetRow.getCell(46)))) {
landListed.setDeal("1");
}else if("否".equals(getCellStrValue(sheetRow.getCell(46)))){
} else if ("否".equals(getCellStrValue(sheetRow.getCell(46)))) {
landListed.setDeal("0");
}
landListed.setTransferMode(getCellStrValue(sheetRow.getCell(47)));
landListed.setAssignee(getCellStrValue(sheetRow.getCell(48)));
landListed.setLandEnterpriseShort(getCellStrValue(sheetRow.getCell(49)));
landListed.setDealPrice(numberFormat(getCellStrValue(sheetRow.getCell(50)),0));
landListed.setDealFloorPrice(numberFormat(getCellValue(sheetRow.getCell(51)),0));
landListed.setPremiumRate(numberFormat(getCellValue(sheetRow.getCell(52)),100,2));
landListed.setCommercialSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(53)),100,0));
BigDecimal year = numberFormat(getCellStrValue(sheetRow.getCell(54)),0);
landListed.setCommercialSelfYear(year == null? null:year.intValue());
landListed.setHomeSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(55)),100,0));
year = numberFormat(getCellStrValue(sheetRow.getCell(56)),0);
landListed.setHomeSelfYear(year == null? null:year.intValue());
landListed.setPercentUnpaid(numberFormat(getCellStrValue(sheetRow.getCell(57)),2));
landListed.setTalenApartmentArea(numberFormat(getCellStrValue(sheetRow.getCell(58)),2));
landListed.setDealPrice(numberFormat(getCellStrValue(sheetRow.getCell(50)), 0));
landListed.setDealFloorPrice(numberFormat(getCellValue(sheetRow.getCell(51)), 0));
landListed.setPremiumRate(numberFormat(getCellValue(sheetRow.getCell(52)), 100, 2));
landListed.setCommercialSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(53)), 100, 0));
BigDecimal year = numberFormat(getCellStrValue(sheetRow.getCell(54)), 0);
landListed.setCommercialSelfYear(year == null ? null : year.intValue());
landListed.setHomeSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(55)), 100, 0));
year = numberFormat(getCellStrValue(sheetRow.getCell(56)), 0);
landListed.setHomeSelfYear(year == null ? null : year.intValue());
landListed.setPercentUnpaid(numberFormat(getCellStrValue(sheetRow.getCell(57)), 2));
landListed.setTalenApartmentArea(numberFormat(getCellStrValue(sheetRow.getCell(58)), 2));
landListed.setParticipatingEnterprises(getCellStrValue(sheetRow.getCell(59)));
//项目开发
landListed.setProjectStatus(getCellStrValue(sheetRow.getCell(60)));
@ -294,10 +343,11 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
/**
* 将已挂牌地块信息转换为excel导出格式
* @author peihao
*
* @param data 拟已牌地块信息
* @date 2021/8/25
* @return
* @author peihao
* @date 2021/8/25
**/
private List<String> entityToList(LandListed data) {
List<String> list = new ArrayList<>();
@ -306,36 +356,36 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
list.add(data.getLandCode());
list.add(data.getLandPosition());
list.add(data.getLandUsage());
list.add(stringFormat(data.getLandTransferSquare(),0));
list.add(stringFormat(data.getLandTransferMu(),0));
list.add(stringFormat(data.getTotalConsArea(),0));
list.add(stringFormat(data.getPlotRatio(),2));
list.add(strRateFormat(data.getBuildingDensity(),0));
list.add(strRateFormat(data.getGreenSpaceRatio(),0));
list.add(stringFormat(data.getLandTransferSquare(), 0));
list.add(stringFormat(data.getLandTransferMu(), 0));
list.add(stringFormat(data.getTotalConsArea(), 0));
list.add(stringFormat(data.getPlotRatio(), 2));
list.add(strRateFormat(data.getBuildingDensity(), 0));
list.add(strRateFormat(data.getGreenSpaceRatio(), 0));
list.add(data.getHeighPermitted());
list.add(data.getRemiseYears());
list.add(stringFormat(data.getTransferPrice(),0));
list.add(stringFormat(data.getStartingFloorPrice(),0));
list.add(stringFormat(data.getBidMargin(),0));
list.add(stringFormat(data.getTransferPrice(), 0));
list.add(stringFormat(data.getStartingFloorPrice(), 0));
list.add(stringFormat(data.getBidMargin(), 0));
list.add(data.getBizRemark());
list.add(DateUtil.fromString(data.getAnnoDate(),"yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAnnoEndDate(),"yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAuctionDate(),"yyyy-MM-dd"));
list.add(stringFormat(data.getLicensedArea(),0));
list.add(DateUtil.fromString(data.getAnnoDate(), "yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAnnoEndDate(), "yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAuctionDate(), "yyyy-MM-dd"));
list.add(stringFormat(data.getLicensedArea(), 0));
//规划条件
list.add(stringFormat(data.getBizSpace(),0));
list.add(stringFormat(data.getCommerceSpace(),0));
list.add(strRateFormat(data.getBizCommerceRate(),0));
list.add(stringFormat(data.getBizSpace(), 0));
list.add(stringFormat(data.getCommerceSpace(), 0));
list.add(strRateFormat(data.getBizCommerceRate(), 0));
list.add(data.getAllocationCapacity());
list.add(data.getAllocationNotCapacity());
//建设条件
list.add(data.getGeologicHazard());
list.add(stringFormat(data.getCivilAirDefence(),0));
list.add(stringFormat(data.getCivilAirDefence(), 0));
list.add(data.getSpecialPlan());
list.add(data.getAssemblyBuilding());
list.add(data.getGreenBuilding());
list.add(data.getOtherConditions());
list.add(stringFormat(data.getPercentFinishedHousing(),0));
list.add(stringFormat(data.getPercentFinishedHousing(), 0));
//竞买条件
list.add(data.getBiddingConditions());
list.add(data.getHookForm());
@ -353,19 +403,19 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
list.add(data.getOvePosition());
list.add(data.getLonLatBd());
//成交信息
list.add(data.getDeal().equals("1")?"是":"否");
list.add(data.getDeal().equals("1") ? "是" : "否");
list.add(data.getTransferMode());
list.add(data.getAssignee());
list.add(data.getLandEnterpriseShort());
list.add(stringFormat(data.getDealPrice(),0));
list.add(stringFormat(data.getDealFloorPrice(),0));
list.add(strRateFormat(data.getPremiumRate(),0));
list.add(strRateFormat(data.getCommercialSelfRatio(),0));
list.add(data.getCommercialSelfYear() == null?"":data.getCommercialSelfYear().toString());
list.add(strRateFormat(data.getHomeSelfRatio(),0));
list.add(data.getHomeSelfYear() == null?"":data.getHomeSelfYear().toString());
list.add(strRateFormat(data.getPercentUnpaid(),0));
list.add(stringFormat(data.getTalenApartmentArea(),0));
list.add(stringFormat(data.getDealPrice(), 0));
list.add(stringFormat(data.getDealFloorPrice(), 0));
list.add(strRateFormat(data.getPremiumRate(), 0));
list.add(strRateFormat(data.getCommercialSelfRatio(), 0));
list.add(data.getCommercialSelfYear() == null ? "" : data.getCommercialSelfYear().toString());
list.add(strRateFormat(data.getHomeSelfRatio(), 0));
list.add(data.getHomeSelfYear() == null ? "" : data.getHomeSelfYear().toString());
list.add(strRateFormat(data.getPercentUnpaid(), 0));
list.add(stringFormat(data.getTalenApartmentArea(), 0));
list.add(data.getParticipatingEnterprises());
//项目开发
list.add(data.getProjectStatus());
@ -415,11 +465,11 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
return valueFormat(value);
}
public String getAnnoId(XSSFCell cell){
public String getAnnoId(XSSFCell cell) {
try {
Double str = Double.valueOf(cell.toString());
Double value = Double.valueOf(cell.getRawValue());
if (str.doubleValue() == value.doubleValue()){
if (str.doubleValue() == value.doubleValue()) {
return getCellValue(cell);
}
} catch (NumberFormatException e) {
@ -451,43 +501,44 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
* @author peihao
* @date 2021/6/25
**/
private BigDecimal numberFormat(String value,int decimal) {
private BigDecimal numberFormat(String value, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).setScale(decimal,BigDecimal.ROUND_HALF_UP);
return new BigDecimal(value).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
private BigDecimal numberFormat(String value,int mulitple,int decimal) {
private BigDecimal numberFormat(String value, int mulitple, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal,BigDecimal.ROUND_HALF_UP);
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
/**
* 格式化列值为字符串
*
* @param value 数据
* @param decimal 保留小数位
* @param decimal 保留小数位
* @return
* @author peihao
* @date 2021/6/25
**/
private String stringFormat(BigDecimal value,int decimal) {
private String stringFormat(BigDecimal value, int decimal) {
if (value == null) {
return "";
}
return value.setScale(decimal,BigDecimal.ROUND_HALF_UP).toString();
return value.setScale(decimal, BigDecimal.ROUND_HALF_UP).toString();
}
/**
* 数字转换百分比
*
* @return
* @author peihao
* @date 2021/8/25
* @return
**/
private String strRateFormat(BigDecimal value,int decimal){
return value == null? null:stringFormat(value,decimal)+"%";
private String strRateFormat(BigDecimal value, int decimal) {
return value == null ? null : stringFormat(value, decimal) + "%";
}
}

151
air/src/main/java/com/air/land/service/impl/LandToListServiceImpl.java

@ -2,10 +2,7 @@ package com.air.land.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.air.applets.dto.LandDto;
import com.air.applets.dto.MeasureTrendDto;
import com.air.applets.vo.LandVo;
import com.air.common.Constant;
import com.air.enums.LandListStatusEnum;
@ -72,13 +69,13 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
LandToList land = new LandToList();
land.setProposedseriaId(proposedseriaId);
land.setStatusCd(Constant.LAND_TO_STATUS_1100);
return R.ok(this.updateById(land),"发送成功");
return R.ok(this.updateById(land), "发送成功");
}
@Override
public List<List<String>> getLandList(List<String> ids) {
List<LandToList> landListeds = this.listByIds(ids);
if (CollectionUtil.isEmpty(landListeds)){
if (CollectionUtil.isEmpty(landListeds)) {
throw new BusinessException("未查询到拟挂牌地块数据!");
}
List<List<String>> list = new ArrayList<>();
@ -92,16 +89,48 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
public boolean importLandToListExcel(MultipartFile file) {
List<LandToList> dataList;
try {
dataList = importLandListedExcel(file);
dataList = ExcelUtil.importExcel(file.getInputStream(), 0, 1, 0, LandToList.class, "config/landToList-config.json");
} catch (Exception e) {
log.error("导入拟挂牌地块数据解析出错",e);
log.error("导入拟挂牌地块数据解析出错", e);
throw new BusinessException("导入拟挂牌地块数据出错");
}
if (CollectionUtil.isNotEmpty(dataList)) {
dataList.forEach(landToList -> {
landToList.setProposedseriaId(DateUtil.landToListIdfromDate(LocalDateTime.now(), "yyyyMMdd", this.selectId()));
//土地出让面积,计算土地出让面积(亩)(出让面积/2000*3)
BigDecimal landTransferSquare = landToList.getLandTransferSquare();
if (landTransferSquare != null) {
landToList.setLandTransferMu(landTransferSquare.divide(new BigDecimal(2000), 4, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(3)).setScale(0, BigDecimal.ROUND_HALF_UP));
}
//总建筑面积
BigDecimal totalConsArea = landToList.getTotalConsArea();
if (totalConsArea != null) {
//计算容积率(总建筑面积/土地出让面积)
if (landTransferSquare != null) {
landToList.setPlotRatio(totalConsArea.doubleValue() == 0 ? new BigDecimal(0) : totalConsArea.divide(landTransferSquare, 2, BigDecimal.ROUND_HALF_UP));
}
//出让价款起始价(万元),计算起始楼面价(元/㎡) (出让价款起始价/总建筑面积*10000)
BigDecimal transferPrice = landToList.getTransferPrice();
if (transferPrice != null) {
landToList.setStartingFloorPrice((transferPrice.doubleValue() == 0 || totalConsArea.doubleValue() == 0)
? new BigDecimal(0) : transferPrice.divide(totalConsArea, 4, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(10000)).setScale(0, BigDecimal.ROUND_HALF_UP));
}
//商业面积,商务面积
BigDecimal bizSpace = landToList.getBizSpace() == null ? new BigDecimal(0) : landToList.getBizSpace();
BigDecimal commerceSpace = landToList.getCommerceSpace() == null ? new BigDecimal(0) : landToList.getCommerceSpace();
//计算商业商务占比((商业面积+商务面积)/总建筑面积)
landToList.setBizCommerceRate(totalConsArea.doubleValue() == 0 ? new BigDecimal(0) : (bizSpace.add(commerceSpace))
.divide(totalConsArea, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
}
});
}
return this.saveBatch(dataList);
}
@Override
public List<LandDto> appletsLandToList(Page page , LandVo landVo) {
public List<LandDto> appletsLandToList(Page page, LandVo landVo) {
List<LandDto> landDtos = baseMapper.appletsLandToList(page, landVo);
landDtos.forEach(landDto -> {
landDto.setIsToBeListed("1");
@ -117,14 +146,14 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
@Transactional(rollbackFor = Exception.class)
@Override
public boolean removeLandToListByIds(List<String> proposedseriaIds){
public boolean removeLandToListByIds(List<String> proposedseriaIds) {
this.removeByIds(proposedseriaIds);
landToListLonLatService.remove(Wrappers.<LandToListLonLat>query().lambda().in(LandToListLonLat::getProposedseriaId,proposedseriaIds));
landToListLonLatService.remove(Wrappers.<LandToListLonLat>query().lambda().in(LandToListLonLat::getProposedseriaId, proposedseriaIds));
conductEnterpriseService.remove(Wrappers.<LandToListConductEnterprise>query().lambda()
.in(LandToListConductEnterprise::getProposedseriaId,proposedseriaIds));
.in(LandToListConductEnterprise::getProposedseriaId, proposedseriaIds));
constructionPlanService.remove(Wrappers.<LandToListConstructionPlan>query().lambda()
.in(LandToListConstructionPlan::getProposedseriaId,proposedseriaIds));
attachmentService.remove(Wrappers.<LandToListAttachment>query().lambda().in(LandToListAttachment::getProposedseriaId,proposedseriaIds));
.in(LandToListConstructionPlan::getProposedseriaId, proposedseriaIds));
attachmentService.remove(Wrappers.<LandToListAttachment>query().lambda().in(LandToListAttachment::getProposedseriaId, proposedseriaIds));
return true;
}
@ -146,27 +175,27 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
for (int i = 2; i < rowSum; i++) {
XSSFRow sheetRow = sheet.getRow(i);
LandToList landToList = new LandToList();
landToList.setProposedseriaId(DateUtil.landToListIdfromDate(LocalDateTime.now(), "yyyyMMdd",this.selectId()));
landToList.setProposedseriaId(DateUtil.landToListIdfromDate(LocalDateTime.now(), "yyyyMMdd", this.selectId()));
//拟挂牌信息
landToList.setSupplyStatus(getCellStrValue(sheetRow.getCell(0)));
landToList.setEstimatedListingTime(getCellStrValue(sheetRow.getCell(1)));
//公告信息
landToList.setAnnoId(getCellValue(sheetRow.getCell(2)));
log.info("公告序号为: {}",landToList.getAnnoId());
log.info("公告序号为: {}", landToList.getAnnoId());
landToList.setLandCode(getCellStrValue(sheetRow.getCell(3)));
landToList.setLandPosition(getCellStrValue(sheetRow.getCell(4)));
landToList.setLandUsage(getCellStrValue(sheetRow.getCell(5)));
landToList.setLandTransferSquare(numberFormat(getCellValue(sheetRow.getCell(6)),0));
landToList.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(7)),0));
landToList.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(8)),0));
landToList.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(9)),2));
landToList.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(10)),100,0));
landToList.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(11)),100,0));
landToList.setLandTransferSquare(numberFormat(getCellValue(sheetRow.getCell(6)), 0));
landToList.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(7)), 0));
landToList.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(8)), 0));
landToList.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(9)), 2));
landToList.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(10)), 100, 0));
landToList.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(11)), 100, 0));
landToList.setHeighPermitted(getCellStrValue(sheetRow.getCell(12)));
landToList.setRemiseYears(getCellStrValue(sheetRow.getCell(13)));
landToList.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(14)),0));
landToList.setStartingFloorPrice(numberFormat(getCellValue(sheetRow.getCell(15)),0));
landToList.setBidMargin(numberFormat(getCellStrValue(sheetRow.getCell(16)),0));
landToList.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(14)), 0));
landToList.setStartingFloorPrice(numberFormat(getCellValue(sheetRow.getCell(15)), 0));
landToList.setBidMargin(numberFormat(getCellStrValue(sheetRow.getCell(16)), 0));
landToList.setBizRemark(getCellStrValue(sheetRow.getCell(17)));
try {
landToList.setAnnoDate(DateUtil.dateToLocalDate(sheetRow.getCell(18).getDateCellValue()));
@ -183,21 +212,21 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
} catch (Exception e) {
log.error("拍卖日期转换出错", e);
}
landToList.setLicensedArea(numberFormat(getCellStrValue(sheetRow.getCell(21)),0));
landToList.setLicensedArea(numberFormat(getCellStrValue(sheetRow.getCell(21)), 0));
//规划条件
landToList.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(22)),0));
landToList.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(23)),0));
landToList.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(24)),100,2));
landToList.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(22)), 0));
landToList.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(23)), 0));
landToList.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(24)), 100, 2));
landToList.setAllocationCapacity(getCellStrValue(sheetRow.getCell(25)));
landToList.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(26)));
//建设条件
landToList.setGeologicHazard(getCellStrValue(sheetRow.getCell(27)));
landToList.setCivilAirDefence(numberFormat(getCellStrValue(sheetRow.getCell(28)),0));
landToList.setCivilAirDefence(numberFormat(getCellStrValue(sheetRow.getCell(28)), 0));
landToList.setSpecialPlan(getCellStrValue(sheetRow.getCell(29)));
landToList.setAssemblyBuilding(getCellStrValue(sheetRow.getCell(30)));
landToList.setGreenBuilding(getCellStrValue(sheetRow.getCell(31)));
landToList.setOtherConditions(getCellStrValue(sheetRow.getCell(32)));
landToList.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(33)),0));
landToList.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(33)), 0));
//竞买条件
landToList.setBiddingConditions(getCellStrValue(sheetRow.getCell(34)));
landToList.setHookForm(getCellStrValue(sheetRow.getCell(35)));
@ -221,10 +250,11 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
/**
* 将拟挂牌地块信息转换为excel导出格式
* @author peihao
*
* @param data 拟挂牌地块信息
* @date 2021/8/25
* @return
* @author peihao
* @date 2021/8/25
**/
private List<String> entityToList(LandToList data) {
List<String> list = new ArrayList<>();
@ -236,36 +266,36 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
list.add(data.getLandCode());
list.add(data.getLandPosition());
list.add(data.getLandUsage());
list.add(stringFormat(data.getLandTransferSquare(),0));
list.add(stringFormat(data.getLandTransferMu(),0));
list.add(stringFormat(data.getTotalConsArea(),0));
list.add(stringFormat(data.getPlotRatio(),2));
list.add(strRateFormat(data.getBuildingDensity(),0));
list.add(strRateFormat(data.getGreenSpaceRatio(),0));
list.add(stringFormat(data.getLandTransferSquare(), 0));
list.add(stringFormat(data.getLandTransferMu(), 0));
list.add(stringFormat(data.getTotalConsArea(), 0));
list.add(stringFormat(data.getPlotRatio(), 2));
list.add(strRateFormat(data.getBuildingDensity(), 0));
list.add(strRateFormat(data.getGreenSpaceRatio(), 0));
list.add(data.getHeighPermitted());
list.add(data.getRemiseYears());
list.add(stringFormat(data.getTransferPrice(),0));
list.add(stringFormat(data.getStartingFloorPrice(),0));
list.add(stringFormat(data.getBidMargin(),0));
list.add(stringFormat(data.getTransferPrice(), 0));
list.add(stringFormat(data.getStartingFloorPrice(), 0));
list.add(stringFormat(data.getBidMargin(), 0));
list.add(data.getBizRemark());
list.add(DateUtil.fromString(data.getAnnoDate(),"yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAnnoEndDate(),"yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAuctionDate(),"yyyy-MM-dd"));
list.add(stringFormat(data.getLicensedArea(),0));
list.add(DateUtil.fromString(data.getAnnoDate(), "yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAnnoEndDate(), "yyyy-MM-dd"));
list.add(DateUtil.fromString(data.getAuctionDate(), "yyyy-MM-dd"));
list.add(stringFormat(data.getLicensedArea(), 0));
//规划条件
list.add(stringFormat(data.getBizSpace(),0));
list.add(stringFormat(data.getCommerceSpace(),0));
list.add(strRateFormat(data.getBizCommerceRate(),0));
list.add(stringFormat(data.getBizSpace(), 0));
list.add(stringFormat(data.getCommerceSpace(), 0));
list.add(strRateFormat(data.getBizCommerceRate(), 0));
list.add(data.getAllocationCapacity());
list.add(data.getAllocationNotCapacity());
//建设条件
list.add(data.getGeologicHazard());
list.add(stringFormat(data.getCivilAirDefence(),0));
list.add(stringFormat(data.getCivilAirDefence(), 0));
list.add(data.getSpecialPlan());
list.add(data.getAssemblyBuilding());
list.add(data.getGreenBuilding());
list.add(data.getOtherConditions());
list.add(stringFormat(data.getPercentFinishedHousing(),0));
list.add(stringFormat(data.getPercentFinishedHousing(), 0));
//竞买条件
list.add(data.getBiddingConditions());
list.add(data.getHookForm());
@ -344,43 +374,44 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
* @author peihao
* @date 2021/6/25
**/
private BigDecimal numberFormat(String value,int decimal) {
private BigDecimal numberFormat(String value, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).setScale(decimal,BigDecimal.ROUND_HALF_UP);
return new BigDecimal(value).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
private BigDecimal numberFormat(String value,int mulitple,int decimal) {
private BigDecimal numberFormat(String value, int mulitple, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal,BigDecimal.ROUND_HALF_UP);
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
/**
* 格式化列值为字符串
*
* @param value 数据
* @param decimal 保留小数位
* @param decimal 保留小数位
* @return
* @author peihao
* @date 2021/6/25
**/
private String stringFormat(BigDecimal value,int decimal) {
private String stringFormat(BigDecimal value, int decimal) {
if (value == null) {
return "";
}
return value.setScale(decimal,BigDecimal.ROUND_HALF_UP).toString();
return value.setScale(decimal, BigDecimal.ROUND_HALF_UP).toString();
}
/**
* 数字转换百分比
*
* @return
* @author peihao
* @date 2021/8/25
* @return
**/
private String strRateFormat(BigDecimal value,int decimal){
return value == null? null:stringFormat(value,decimal)+"%";
private String strRateFormat(BigDecimal value, int decimal) {
return value == null ? null : stringFormat(value, decimal) + "%";
}
}

63
air/src/main/java/com/air/utils/DateUtil.java

@ -1,6 +1,7 @@
package com.air.utils;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.text.SimpleDateFormat;
@ -16,6 +17,7 @@ import java.util.Date;
* @author peihao
* @date 2020-06-28
**/
@Slf4j
public class DateUtil {
/**
@ -34,33 +36,35 @@ public class DateUtil {
/**
* 距离今天多久
* @author peihao
*
* @param date 时间
* @date 2020/6/28
* @return
* @author peihao
* @date 2020/6/28
**/
public static String fromToday(Date date) {
long time = date.getTime() / 1000;
long now = System.currentTimeMillis() / 1000;
long ago = now-time;
if (ago <= ONE_HOUR){
long ago = now - time;
if (ago <= ONE_HOUR) {
return ago / ONE_MINUTE + "分钟前";
}else if (ago <= ONE_DAY){
} else if (ago <= ONE_DAY) {
return ago / ONE_HOUR + "小时" + (ago % ONE_HOUR / ONE_MINUTE) + "分钟前";
}else {
} else {
return new SimpleDateFormat("yyyy-MM-dd").format(date);
}
}
/**
* 字符串转时间
* @author peihao
*
* @param dateString 时间
* @date 2020/6/28
* @return
* @author peihao
* @date 2020/6/28
**/
public static LocalDate fromLocalDate(String dateString,String pattern) {
if (StrUtil.isEmpty(dateString)){
public static LocalDate fromLocalDate(String dateString, String pattern) {
if (StrUtil.isEmpty(dateString)) {
return null;
}
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
@ -69,55 +73,64 @@ public class DateUtil {
/**
* 字符串转时间
* @author peihao
*
* @param dateString 时间
* @date 2020/6/28
* @return
* @author peihao
* @date 2020/6/28
**/
public static LocalDateTime fromLocalDateTime(String dateString,String pattern) {
public static LocalDateTime fromLocalDateTime(String dateString, String pattern) {
LocalDate localDate = fromLocalDate(dateString, pattern);
return localDate.atStartOfDay();
}
/**
* date转 LocalDate
* @author peihao
*
* @param date 时间
* @date 2020/6/28
* @return
* @author peihao
* @date 2020/6/28
**/
public static LocalDate dateToLocalDate(Date date) {
if(null == date) {
if (null == date) {
return null;
}
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate localDate = null;
try {
localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
} catch (Exception e) {
log.error("时间格式解析错误:", e);
}
return localDate;
}
/**
* 字符串转时间
* @author peihao
*
* @param dateString 时间
* @date 2020/6/28
* @return
* @author peihao
* @date 2020/6/28
**/
public static String fromString(LocalDate dateString,String pattern) {
if(null == dateString || StringUtils.isEmpty(pattern)){
public static String fromString(LocalDate dateString, String pattern) {
if (null == dateString || StringUtils.isEmpty(pattern)) {
return "";
}
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
return fmt.format(dateString);
}
public static String landListedIdfromDate(LocalDateTime dateString,String pattern,Integer sequence){
public static String landListedIdfromDate(LocalDateTime dateString, String pattern, Integer sequence) {
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
String seq = String.format("%04d", Integer.parseInt("0000") + sequence);
return "CQ"+fmt.format(dateString)+seq;
return "CQ" + fmt.format(dateString) + seq;
}
public static String landToListIdfromDate(LocalDateTime dateString,String pattern,Integer sequence){
public static String landToListIdfromDate(LocalDateTime dateString, String pattern, Integer sequence) {
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
String seq = String.format("%04d", Integer.parseInt("0000") + sequence);
return "NICQ"+fmt.format(dateString)+seq;
return "NICQ" + fmt.format(dateString) + seq;
}
}

195
air/src/main/java/com/air/utils/ExcelUtil.java

@ -1,14 +1,13 @@
package com.air.utils;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.air.common.entity.ExcelConfig;
import com.cinderella.framework.common.core.exception.BusinessException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
@ -18,6 +17,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.Charset;
import java.util.*;
import java.util.stream.Collectors;
@ -28,6 +28,7 @@ import java.util.stream.Collectors;
* @author peihao
* @date 2021-05-31
**/
@Slf4j
public class ExcelUtil {
@ -36,26 +37,26 @@ public class ExcelUtil {
*
* @param dataList 导出数据
* @param inputStream 模板流
* @param startRow 开始导出行
* @param startRow 开始导出行
* @return
* @author peihao
* @date 2021/6/17
**/
public static XSSFWorkbook exportLandListedExcel(List<List<String>> dataList, InputStream inputStream,int startRow) throws IOException {
public static XSSFWorkbook exportLandListedExcel(List<List<String>> dataList, InputStream inputStream, int startRow) throws IOException {
// 读取excel模板
XSSFWorkbook wb = new XSSFWorkbook(inputStream);
XSSFSheet sheet = wb.getSheetAt(0);
//填充数据
for (int i = 0; i < dataList.size(); i++) {
XSSFRow sheetRow = sheet.getRow(i + startRow);
if (sheetRow == null){
sheetRow = sheet.createRow(i+startRow);
if (sheetRow == null) {
sheetRow = sheet.createRow(i + startRow);
}
List<String> list = dataList.get(i);
for (int j = 0; j < list.size(); j++) {
String value = list.get(j);
XSSFCell cell = sheetRow.getCell(j);
if (cell == null){
if (cell == null) {
cell = sheetRow.createCell(j);
}
cell.setCellValue(value);
@ -104,80 +105,202 @@ public class ExcelUtil {
return result;
}
public static <T> List<T> importExcel(InputStream fileInputStream,int startSheet,int titleRow,int titleColumn,Class<T> clazz,String path) throws IOException{
/**
* 导入数据解析
*
* @param fileInputStream 文件流
* @param startSheet 读取的sheet
* @param titleRow 表头行
* @param titleColumn 开始列
* @param clazz 返回数据类
* @param path 配置文件路径
* @return
* @author peihao
* @date 2021/10/13
**/
public static <T> List<T> importExcel(InputStream fileInputStream, int startSheet, int titleRow, int titleColumn, Class<T> clazz, String path) throws IOException {
//读取文件的指定sheet
XSSFWorkbook workbook = new XSSFWorkbook(fileInputStream);
XSSFSheet sheet = workbook.getSheetAt(startSheet);
//总行数
int totalRows = sheet.getPhysicalNumberOfRows();
//读取表头,设置对应列索引
List<ExcelConfig> excelConfigList = getExcelJsonConfig(path,ExcelConfig.class);
List<ExcelConfig> excelConfigList = getExcelJsonConfig(path, ExcelConfig.class);
XSSFRow sheetRow = sheet.getRow(titleRow);
int totalColumns = sheetRow.getPhysicalNumberOfCells();
//获取每个表头在excel中的列
for (int i = titleColumn;i<totalColumns;i++){
for (int i = titleColumn; i < totalColumns; i++) {
String cellStrValue = getCellStrValue(sheetRow.getCell(i));
Optional<ExcelConfig> excelConfig = excelConfigList.stream().filter(item -> item.getTitleName().equals(cellStrValue)).findAny();
if (excelConfig.isPresent()){
if (excelConfig.isPresent()) {
excelConfig.get().setColumn(i);
}
}
//判断是否有为空的数据
Optional<ExcelConfig> any = excelConfigList.stream().filter(e -> e.getColumn() == null).findAny();
if (any.isPresent() && any.get().isRequired()){
throw new BusinessException(any.get().getTitleName()+"列不能为空");
if (any.isPresent() && any.get().isRequired()) {
throw new BusinessException(any.get().getTitleName() + "列不能为空");
}
//读取数据
List<Map<String,Object>> mapList = new ArrayList<>();
for (int i = titleRow+1;i<totalRows;i++){
Map<String,Object> map = new HashMap<>();
List<Map<String, Object>> mapList = new ArrayList<>();
for (int i = titleRow + 1; i < totalRows; i++) {
Map<String, Object> map = new HashMap<>();
XSSFRow row = sheet.getRow(i);
for (ExcelConfig e:excelConfigList){
Object value = getCellString(row.getCell(e.getColumn()), e.getValueType());
map.put(e.getFieldName(),value);
for (ExcelConfig excelConfig : excelConfigList) {
try {
Object value = getCellString(row.getCell(excelConfig.getColumn()), excelConfig.getValueType());
map.put(excelConfig.getFieldName(), value);
} catch (Exception e) {
log.error("解析出错:", e);
throw new BusinessException("第" + i + "行,第" + excelConfig.getFieldName() + "列数据解析出现错误");
}
}
mapList.add(map);
}
return mapList.stream().map(e -> BeanUtil.mapToBean(e,clazz,true)).collect(Collectors.toList());
return mapList.stream().map(e -> BeanUtil.mapToBean(e, clazz, true)).collect(Collectors.toList());
}
public static <T> List<T> getExcelJsonConfig(String path,Class<T> clazz){
/**
* 读取excel数据列模板配置
*
* @param path 配置文件路径
* @param clazz 配置实体类
* @return
* @author peihao
* @date 2021/10/13
**/
public static <T> List<T> getExcelJsonConfig(String path, Class<T> clazz) {
String config = ResourceUtil.readStr(path, Charset.defaultCharset());
return JSONUtil.parseArray(config).stream().map(e ->JSONUtil.toBean((JSONObject)e,clazz)).collect(Collectors.toList());
return JSONUtil.parseArray(config).stream().map(e -> JSONUtil.toBean((JSONObject) e, clazz)).collect(Collectors.toList());
}
public static Object getCellString(XSSFCell cell,String valueType){
/**
* 根据不同的数据类型获取列的值
*
* @param cell
* @param valueType 数据类型
* @return
* @author peihao
* @date 2021/10/13
**/
public static Object getCellString(XSSFCell cell, String valueType) {
String cellStrValue = getCellStrValue(cell);
switch (valueType){
switch (valueType) {
case "string":
return cellStrValue;
case "stringInt":
return String.valueOf(Double.valueOf(cellStrValue).intValue());
case "int":
return Integer.valueOf(cellStrValue);
case "date":
return DateUtil.dateToLocalDate(cell.getDateCellValue());
case "BigDecimal":
return numberFormat(cellStrValue, 0);
case "BigDecimal_mu":
return numberFormat(cellStrValue, 100, 0);
case "BigDecimal_2":
return numberFormat(cellStrValue, 2);
case "Integer":
return StrUtil.isEmpty(cellStrValue) ? null : Integer.valueOf(cellStrValue);
case "LocalDate":
return dateFormat(cell);
case "enum":
return null;
return getEnumValue(cellStrValue);
default:
return null;
}
}
public static String getCellStrValue(XSSFCell cell){
/**
* 字符串转换数字
*
* @param decimal 保留小数位
* @param value 数据
* @return
* @author peihao
* @date 2021/6/25
**/
private static BigDecimal numberFormat(String value, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
/**
* 字符串转换数字
*
* @param decimal 保留小数位
* @param value 数据
* @param mulitple 倍数
* @return
* @author peihao
* @date 2021/6/25
**/
private static BigDecimal numberFormat(String value, int mulitple, int decimal) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal, BigDecimal.ROUND_HALF_UP);
}
/**
* 获取单元格的值
*
* @param cell 单元格
* @return
* @author peihao
* @date 2021/10/13
**/
public static String getCellStrValue(XSSFCell cell) {
if (cell == null) {
return null;
}
String value;
try {
value = cell.getRawValue();
value = cell.getStringCellValue();
} catch (Exception e) {
value = cell.toString();
value = cell.getRawValue();
}
return valueFormat(value);
}
/**
* 去除字符串中的空格和'-'
*
* @param value
* @return
* @author peihao
* @date 2021/10/13
**/
private static String valueFormat(String value) {
value = StringUtils.isNotEmpty(value) ? value.trim() : value;
value = StringUtils.isNotEmpty(value) ? StrUtil.trim(value) : value;
value = StringUtils.equals("-", value) ? "" : value;
return value;
}
/**
* 获取单元格时间
*
* @param cell 单元格
* @return
* @author peihao
* @date 2021/10/13
**/
private static Date dateFormat(XSSFCell cell) {
Date dateCellValue = null;
try {
dateCellValue = cell.getDateCellValue();
} catch (Exception e) {
log.error("时间格式解析错误", e);
}
return dateCellValue;
}
private static String getEnumValue(String value) {
if (StrUtil.isBlank(value)) {
return null;
}
if ("是".equals(value)) {
value = "1";
} else if ("否".equals(value)) {
value = "0";
}
return value;
}
}

8
air/src/main/resources/application.yml

@ -10,8 +10,8 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: air
password: air123456
url: jdbc:mysql://127.0.0.1:4000/air?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
# url: jdbc:mysql://124.71.210.242:4000/air?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
# url: jdbc:mysql://127.0.0.1:4000/air?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://124.71.210.242:4000/air?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
stat-view-servlet:
enabled: true
url-pattern: /druid/*
@ -34,7 +34,7 @@ spring:
multipart:
max-file-size: 100MB
max-request-size: 100MB
location: /opt/air/tmp_files
# location: /opt/air/tmp_files
freemarker:
allow-request-override: false
allow-session-override: false
@ -85,7 +85,7 @@ security:
- /applets/landlisted/calendar/**
- /applets/landlisted/list/**
- /cityArea/**
# - /**
- /**
# 文件系统
minio:

380
air/src/main/resources/config/landListed-config.json

@ -1,6 +1,374 @@
[{
"title": "地块编号",
"key": "landCode",
"valueType": "string",
"required": true
}]
[
{
"titleName": "公告序号",
"fieldName": "annoId",
"valueType": "string",
"required": true
},
{
"titleName": "地块编号",
"fieldName": "landCode",
"valueType": "string",
"required": true
},
{
"titleName": "地块位置",
"fieldName": "landPosition",
"valueType": "string",
"required": true
},
{
"titleName": "土地用途",
"fieldName": "landUsage",
"valueType": "string",
"required": false
},
{
"titleName": "土地出让面积(㎡)",
"fieldName": "landTransferSquare",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "总计容建筑面积(㎡)",
"fieldName": "totalConsArea",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "建筑密度(%)",
"fieldName": "buildingDensity",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "绿地率(%)",
"fieldName": "greenSpaceRatio",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "限高",
"fieldName": "heighPermitted",
"valueType": "string",
"required": false
},
{
"titleName": "出让年限",
"fieldName": "remiseYears",
"valueType": "string",
"required": false
},
{
"titleName": "出让价款起始价(万元)",
"fieldName": "transferPrice",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "竞买保证金(万元)",
"fieldName": "bidMargin",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "备注",
"fieldName": "bizRemark",
"valueType": "string",
"required": false
},
{
"titleName": "公告开始日期",
"fieldName": "annoDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "公告截止日期",
"fieldName": "annoEndDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "拍卖日期",
"fieldName": "auctionDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "持证准用面积",
"fieldName": "licensedArea",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "商业面积(㎡)",
"fieldName": "bizSpace",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "商务面积(㎡)",
"fieldName": "commerceSpace",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "配建-计容(㎡)",
"fieldName": "allocationCapacity",
"valueType": "string",
"required": false
},
{
"titleName": "配建-不计容(㎡)",
"fieldName": "allocationNotCapacity",
"valueType": "string",
"required": false
},
{
"titleName": "地质灾害",
"fieldName": "geologicHazard",
"valueType": "string",
"required": false
},
{
"titleName": "人防还建(㎡)",
"fieldName": "civilAirDefence",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "特殊条件",
"fieldName": "specialPlan",
"valueType": "string",
"required": false
},
{
"titleName": "装配建筑",
"fieldName": "assemblyBuilding",
"valueType": "string",
"required": false
},
{
"titleName": "绿色建筑",
"fieldName": "greenBuilding",
"valueType": "string",
"required": false
},
{
"titleName": "其他条件",
"fieldName": "otherConditions",
"valueType": "string",
"required": false
},
{
"titleName": "成品住宅比例(%)",
"fieldName": "percentFinishedHousing",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "竞买条件",
"fieldName": "biddingConditions",
"valueType": "string",
"required": false
},
{
"titleName": "勾地形式",
"fieldName": "hookForm",
"valueType": "string",
"required": false
},
{
"titleName": "一级治理方",
"fieldName": "firstGovernance",
"valueType": "string",
"required": false
},
{
"titleName": "勾地企业",
"fieldName": "landEnterprises",
"valueType": "string",
"required": false
},
{
"titleName": "付款节奏",
"fieldName": "paymentRhythm",
"valueType": "string",
"required": false
},
{
"titleName": "出让人",
"fieldName": "bargainor",
"valueType": "string",
"required": false
},
{
"titleName": "城市",
"fieldName": "city",
"valueType": "string",
"required": false
},
{
"titleName": "行政区",
"fieldName": "canton",
"valueType": "string",
"required": false
},
{
"titleName": "特区",
"fieldName": "specialZone",
"valueType": "string",
"required": false
},
{
"titleName": "环线",
"fieldName": "loopWire",
"valueType": "string",
"required": false
},
{
"titleName": "大组团",
"fieldName": "bigGroup",
"valueType": "string",
"required": false
},
{
"titleName": "小组团",
"fieldName": "smallGroup",
"valueType": "string",
"required": false
},
{
"titleName": "奥维定位",
"fieldName": "ovePosition",
"valueType": "string",
"required": false
},
{
"titleName": "经纬度(百度BD09)",
"fieldName": "lonLatBd",
"valueType": "string",
"required": false
},
{
"titleName": "是否成交",
"fieldName": "deal",
"valueType": "enum",
"required": false
},
{
"titleName": "出让方式",
"fieldName": "transferMode",
"valueType": "string",
"required": false
},
{
"titleName": "受让单位",
"fieldName": "assignee",
"valueType": "string",
"required": false
},
{
"titleName": "拿地企业-简称",
"fieldName": "landEnterpriseShort",
"valueType": "string",
"required": false
},
{
"titleName": "成交总价(万元)",
"fieldName": "dealPrice",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "商业自持比例(%)",
"fieldName": "commercialSelfRatio",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "商业自持年份",
"fieldName": "commercialSelfYear",
"valueType": "Integer",
"required": false
},
{
"titleName": "住宅自持比例(%)",
"fieldName": "homeSelfRatio",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "住宅自持年份",
"fieldName": "homeSelfYear",
"valueType": "Integer",
"required": false
},
{
"titleName": "无偿移交比例(%)",
"fieldName": "percentUnpaid",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "人才公寓面积(㎡)",
"fieldName": "talenApartmentArea",
"valueType": "BigDecimal_2",
"required": false
},
{
"titleName": "参拍企业",
"fieldName": "participatingEnterprises",
"valueType": "string",
"required": false
},
{
"titleName": "项目状态",
"fieldName": "projectStatus",
"valueType": "string",
"required": false
},
{
"titleName": "楼盘名称",
"fieldName": "buildingName",
"valueType": "string",
"required": false
},
{
"titleName": "项目公司",
"fieldName": "projectCompany",
"valueType": "string",
"required": false
},
{
"titleName": "确权时间",
"fieldName": "confirmationTime",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "操盘企业",
"fieldName": "tradingEnterprises",
"valueType": "string",
"required": false
},
{
"titleName": "合作方",
"fieldName": "partner",
"valueType": "string",
"required": false
},
{
"titleName": "经营企业",
"fieldName": "conductEnterprise",
"valueType": "string",
"required": false
},
{
"titleName": "项目首开时间",
"fieldName": "firstOpenTime",
"valueType": "LocalDate",
"required": false
}
]

266
air/src/main/resources/config/landToList-config.json

@ -0,0 +1,266 @@
[
{
"titleName": "供地状态",
"fieldName": "supplyStatus",
"valueType": "string",
"required": false
},
{
"titleName": "预计挂牌时间",
"fieldName": "estimatedListingTime",
"valueType": "string",
"required": false
},
{
"titleName": "公告序号",
"fieldName": "annoId",
"valueType": "string",
"required": false
},
{
"titleName": "地块编号",
"fieldName": "landCode",
"valueType": "string",
"required": true
},
{
"titleName": "地块位置",
"fieldName": "landPosition",
"valueType": "string",
"required": true
},
{
"titleName": "土地用途",
"fieldName": "landUsage",
"valueType": "string",
"required": false
},
{
"titleName": "土地出让面积(㎡)",
"fieldName": "landTransferSquare",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "总计容建筑面积(㎡)",
"fieldName": "totalConsArea",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "建筑密度(%)",
"fieldName": "buildingDensity",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "绿地率(%)",
"fieldName": "greenSpaceRatio",
"valueType": "BigDecimal_mu",
"required": false
},
{
"titleName": "限高",
"fieldName": "heighPermitted",
"valueType": "string",
"required": false
},
{
"titleName": "出让年限",
"fieldName": "remiseYears",
"valueType": "string",
"required": false
},
{
"titleName": "出让价款起始价(万元)",
"fieldName": "transferPrice",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "竞买保证金(万元)",
"fieldName": "bidMargin",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "备注",
"fieldName": "bizRemark",
"valueType": "string",
"required": false
},
{
"titleName": "公告开始日期",
"fieldName": "annoDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "公告截止日期",
"fieldName": "annoEndDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "拍卖日期",
"fieldName": "auctionDate",
"valueType": "LocalDate",
"required": false
},
{
"titleName": "持证准用面积",
"fieldName": "licensedArea",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "商业面积(㎡)",
"fieldName": "bizSpace",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "商务面积(㎡)",
"fieldName": "commerceSpace",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "配建-计容(㎡)",
"fieldName": "allocationCapacity",
"valueType": "string",
"required": false
},
{
"titleName": "配建-不计容(㎡)",
"fieldName": "allocationNotCapacity",
"valueType": "string",
"required": false
},
{
"titleName": "地质灾害",
"fieldName": "geologicHazard",
"valueType": "string",
"required": false
},
{
"titleName": "人防还建(㎡)",
"fieldName": "civilAirDefence",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "特殊条件",
"fieldName": "specialPlan",
"valueType": "string",
"required": false
},
{
"titleName": "装配建筑",
"fieldName": "assemblyBuilding",
"valueType": "string",
"required": false
},
{
"titleName": "绿色建筑",
"fieldName": "greenBuilding",
"valueType": "string",
"required": false
},
{
"titleName": "其他条件",
"fieldName": "otherConditions",
"valueType": "string",
"required": false
},
{
"titleName": "成品住宅比例(%)",
"fieldName": "percentFinishedHousing",
"valueType": "BigDecimal",
"required": false
},
{
"titleName": "竞买条件",
"fieldName": "biddingConditions",
"valueType": "string",
"required": false
},
{
"titleName": "勾地形式",
"fieldName": "hookForm",
"valueType": "string",
"required": false
},
{
"titleName": "一级治理方",
"fieldName": "firstGovernance",
"valueType": "string",
"required": false
},
{
"titleName": "勾地企业",
"fieldName": "landEnterprises",
"valueType": "string",
"required": false
},
{
"titleName": "付款节奏",
"fieldName": "paymentRhythm",
"valueType": "string",
"required": false
},
{
"titleName": "出让人",
"fieldName": "bargainor",
"valueType": "string",
"required": false
},
{
"titleName": "城市",
"fieldName": "city",
"valueType": "string",
"required": false
},
{
"titleName": "行政区",
"fieldName": "canton",
"valueType": "string",
"required": false
},
{
"titleName": "特区",
"fieldName": "specialZone",
"valueType": "string",
"required": false
},
{
"titleName": "环线",
"fieldName": "loopWire",
"valueType": "string",
"required": false
},
{
"titleName": "大组团",
"fieldName": "bigGroup",
"valueType": "string",
"required": false
},
{
"titleName": "小组团",
"fieldName": "smallGroup",
"valueType": "string",
"required": false
},
{
"titleName": "奥维定位",
"fieldName": "ovePosition",
"valueType": "string",
"required": false
},
{
"titleName": "经纬度(百度BD09)",
"fieldName": "lonLatBd",
"valueType": "string",
"required": false
}
]

24
air/src/main/resources/mapper/AppletsMapMapper.xml

@ -46,21 +46,21 @@
<select id="getLandToList" resultType="com.air.land.entity.LandListedLonLat">
SELECT
lat_id,
proposedseria_id landListedId,
land_code,
name,
land_lon_lat,
line_width,
line_color,
line_opaqueness,
fill_color,
fill_opaqueness
a.lat_id,
a.proposedseria_id landListedId,
a.land_code,
a.name,
a.land_lon_lat,
a.line_width,
a.line_color,
a.line_opaqueness,
a.fill_color,
a.fill_opaqueness
from
land_to_list_lon_lat
land_to_list_lon_lat a join land_to_list b on a.proposedseria_id = b.proposedseria_id
<where>
<if test="city != null and city != ''">
city = #{city}
a.city = #{city}
</if>
</where>
</select>

Loading…
Cancel
Save