Browse Source

1.0.0 修改bug和新需求

release/v1.0.0
peihao 4 years ago
parent
commit
6558483dcb
  1. 2
      air/src/main/java/com/air/land/controller/AuctionRecordController.java
  2. 2
      air/src/main/java/com/air/land/controller/LandAttachmentController.java
  3. 25
      air/src/main/java/com/air/land/controller/LandListedController.java
  4. 10
      air/src/main/java/com/air/land/controller/LandListedLonLatController.java
  5. 2
      air/src/main/java/com/air/land/controller/LandToListController.java
  6. 2
      air/src/main/java/com/air/land/dto/LandListedDto.java
  7. 14
      air/src/main/java/com/air/land/entity/LandListed.java
  8. 2
      air/src/main/java/com/air/land/entity/LandListedLonLat.java
  9. 11
      air/src/main/java/com/air/land/entity/LandToList.java
  10. 2
      air/src/main/java/com/air/land/service/LandAttachmentService.java
  11. 3
      air/src/main/java/com/air/land/service/LandListedLonLatService.java
  12. 2
      air/src/main/java/com/air/land/service/impl/LandAttachmentServiceImpl.java
  13. 49
      air/src/main/java/com/air/land/service/impl/LandListedLonLatServiceImpl.java
  14. 10
      air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java
  15. 10
      air/src/main/java/com/air/land/service/impl/LandToListServiceImpl.java
  16. 2
      air/src/main/java/com/air/land/vo/AuctionRecordVo.java
  17. 3
      air/src/main/java/com/air/land/vo/LandListedLonLatVo.java
  18. 3
      air/src/main/java/com/air/land/vo/LandListedPageVo.java
  19. 12
      air/src/main/java/com/air/land/vo/LandListedVo.java
  20. 12
      air/src/main/java/com/air/land/vo/LandToListVo.java
  21. 3
      air/src/main/java/com/air/measuredata/serivce/impl/MeasureDataServiceImpl.java
  22. 15
      air/src/main/java/com/air/utils/DateUtil.java
  23. 33
      air/src/main/java/com/air/utils/ExcelUtil.java

2
air/src/main/java/com/air/land/controller/AuctionRecordController.java

@ -39,7 +39,7 @@ public class AuctionRecordController {
*/
@ApiOperation(value = "查询参拍记录列表", notes = "查询参拍记录列表")
@GetMapping("/list")
public R<IPage<AuctionRecord>> getAuctionRecordPage(QueryPage page, @RequestParam(required = false) Long landListedId) {
public R<IPage<AuctionRecord>> getAuctionRecordPage(QueryPage page, @RequestParam(required = false) String landListedId) {
LambdaQueryWrapper<AuctionRecord> lambda = Wrappers.<AuctionRecord>query().lambda();
if (landListedId != null) {
lambda.eq(AuctionRecord::getLandListedId, landListedId);

2
air/src/main/java/com/air/land/controller/LandAttachmentController.java

@ -39,7 +39,7 @@ public class LandAttachmentController {
*/
@ApiOperation(value = "通过序号和文件类型查询文件列表", notes = "通过序号和文件类型查询文件列表")
@GetMapping
public R<List<LandAttachment>> getAuctionRecordPage(@RequestParam Long landListedId, String fileType) {
public R<List<LandAttachment>> getAuctionRecordPage(@RequestParam String landListedId, String fileType) {
return attachmentService.getListAttachment(landListedId, fileType);
}

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

@ -9,6 +9,7 @@ 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;
import com.air.utils.ExcelUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -31,6 +32,7 @@ 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;
@ -94,15 +96,30 @@ public class LandListedController {
* @param landListedVo 已挂牌地块参数
* @return R
*/
@ApiOperation(value = "保存已挂牌地块(新增,修改)", notes = "新增已挂牌地块(传id为修改,不传为新增)")
@ApiOperation(value = "新增已挂牌地块", notes = "新增已挂牌地块")
@PostMapping
public R<Long> saveLandListed(@RequestBody LandListedVo landListedVo) {
public R<String> saveLandListed(@RequestBody LandListedVo landListedVo) {
LandListed landListed = new LandListed();
BeanUtil.copyProperties(landListedVo, landListed);
landListedService.saveOrUpdate(landListed);
landListed.setLandListedId(DateUtil.landListedIdfromDate(LocalDateTime.now(),"yyyyMMddHHmmssSSS"));
landListedService.save(landListed);
return R.ok(landListed.getLandListedId());
}
/**
* 修改已挂牌地块
*
* @param landListedVo 已挂牌地块参数
* @return R
*/
@ApiOperation(value = "修改已挂牌地块", notes = "修改已挂牌地块")
@PutMapping
public R<Boolean> updateLandListed(@RequestBody LandListedVo landListedVo) {
LandListed landListed = new LandListed();
BeanUtil.copyProperties(landListedVo, landListed);
return R.ok(landListedService.updateById(landListed));
}
/**
* 通过id删除已挂牌地块
*
@ -189,7 +206,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.exportExcel(landList,resourceAsStream);
XSSFWorkbook wb = ExcelUtil.exportLandListedExcel(landList,resourceAsStream);
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=report.xlsx");
OutputStream outputStream = response.getOutputStream();

10
air/src/main/java/com/air/land/controller/LandListedLonLatController.java

@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.air.land.entity.LandListedLonLat;
import com.air.land.service.LandListedLonLatService;
import com.air.land.vo.LandListedLonLatVo;
import com.air.utils.DateUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.cinderella.framework.common.core.util.R;
import io.swagger.annotations.Api;
@ -14,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime;
import java.util.List;
@ -38,7 +40,7 @@ public class LandListedLonLatController {
*/
@ApiOperation(value = "通过公告序号经纬度列表查询", notes = "通过公告序号经纬度列表查询")
@GetMapping("/list/{landListedId}")
public R<List<LandListedLonLat>> getLandListedLonLatPage(@PathVariable Long landListedId) {
public R<List<LandListedLonLat>> getLandListedLonLatPage(@PathVariable String landListedId) {
List<LandListedLonLat> list = landListedLonLatService.list(Wrappers.<LandListedLonLat>query().lambda()
.eq(LandListedLonLat::getLandListedId, landListedId)
.orderByDesc(LandListedLonLat::getUpdateDate));
@ -90,8 +92,7 @@ public class LandListedLonLatController {
/**
* 通过id删除已挂牌地块经纬度
*
* @param landListedId 公告id
* @param landCode 地块编号
* @param latId id
* @return R
*/
@ApiOperation(value = "通过id删除已挂牌地块经纬度", notes = "通过id删除已挂牌地块经纬度")
@ -110,6 +111,7 @@ public class LandListedLonLatController {
@ApiOperation(value = "导入已挂牌地块经纬度数据", notes = "导入已挂牌地块经纬度数据")
@PostMapping(value = "/importLandListLatExcel")
public R importLandListLatExcel(@RequestParam(value="uploadFile") MultipartFile file){
return R.ok();
return R.ok(landListedLonLatService.importLandListedLonLatExcel(file));
}
}

2
air/src/main/java/com/air/land/controller/LandToListController.java

@ -148,7 +148,7 @@ public class LandToListController {
List<List<String>> landList = landToListService.getLandList(ids);
InputStream resourceAsStream = LandListedController.class.getClassLoader().getResourceAsStream("templates/excel/exportLandToList.xlsx");
// 读取excel模板
XSSFWorkbook wb = ExcelUtil.exportExcel(landList,resourceAsStream);
XSSFWorkbook wb = ExcelUtil.exportLandListedExcel(landList,resourceAsStream);
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition","attachment;filename=report.xlsx");
OutputStream outputStream = response.getOutputStream();

2
air/src/main/java/com/air/land/dto/LandListedDto.java

@ -16,7 +16,7 @@ public class LandListedDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "已挂牌地块标识")
private Long landListedId;
private String landListedId;
@ApiModelProperty(value = "公告序号")
private String annoId;

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

@ -1,5 +1,6 @@
package com.air.land.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -8,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
@ -23,9 +25,9 @@ import java.time.LocalDateTime;
public class LandListed extends Model<LandListed> {
private static final long serialVersionUID = 1L;
@TableId
@TableId(type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "id(主键)")
private Long landListedId;
private String landListedId;
@ApiModelProperty(value = "公告id,以土地网爬取数据为准(主键)")
private String annoId;
@ -76,10 +78,10 @@ public class LandListed extends Model<LandListed> {
private String bizRemark;
@ApiModelProperty(value = "公告日期")
private LocalDateTime annoDate;
private LocalDate annoDate;
@ApiModelProperty(value = "拍卖日期")
private LocalDateTime auctionDate;
private LocalDate auctionDate;
@ApiModelProperty(value = "持证准用面积")
private String licensedArea;
@ -199,7 +201,7 @@ public class LandListed extends Model<LandListed> {
private String projectCompany;
@ApiModelProperty(value = "确权时间")
private LocalDateTime confirmationTime;
private LocalDate confirmationTime;
@ApiModelProperty(value = "操盘企业")
private String tradingEnterprises;
@ -211,7 +213,7 @@ public class LandListed extends Model<LandListed> {
private String conductEnterprise;
@ApiModelProperty(value = "项目首开时间")
private LocalDateTime firstOpenTime;
private LocalDate firstOpenTime;
@ApiModelProperty(value = "规划条件函")
private String planningConditionsLetter;

2
air/src/main/java/com/air/land/entity/LandListedLonLat.java

@ -28,7 +28,7 @@ public class LandListedLonLat extends Model<LandListedLonLat> {
private Long latId;
@ApiModelProperty(value = "已挂牌地块id,主键")
private Long landListedId;
private String landListedId;
@ApiModelProperty(value = "公告id")
private String annoId;

11
air/src/main/java/com/air/land/entity/LandToList.java

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
@ -38,7 +39,7 @@ public class LandToList extends Model<LandToList> {
@ApiModelProperty(value = "预计挂牌时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
private LocalDateTime estimatedListingTime;
private LocalDate estimatedListingTime;
@ApiModelProperty(value = "预计挂牌批次")
private String estimatedListingBatch;
@ -95,10 +96,10 @@ public class LandToList extends Model<LandToList> {
private String bizRemark;
@ApiModelProperty(value = "公告日期")
private LocalDateTime annoDate;
private LocalDate annoDate;
@ApiModelProperty(value = "拍卖日期")
private LocalDateTime auctionDate;
private LocalDate auctionDate;
@ApiModelProperty(value = "持证准用面积")
private String licensedArea;
@ -220,7 +221,7 @@ public class LandToList extends Model<LandToList> {
@ApiModelProperty(value = "确权时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
private LocalDateTime confirmationTime;
private LocalDate confirmationTime;
@ApiModelProperty(value = "操盘企业")
private String tradingEnterprises;
@ -233,7 +234,7 @@ public class LandToList extends Model<LandToList> {
@ApiModelProperty(value = "项目首开时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
private LocalDateTime firstOpenTime;
private LocalDate firstOpenTime;
@ApiModelProperty(value = "规划条件函")
private String planningConditionsLetter;

2
air/src/main/java/com/air/land/service/LandAttachmentService.java

@ -24,5 +24,5 @@ public interface LandAttachmentService extends IService<LandAttachment> {
* @author peihao
* @date 2021/5/21
**/
R<List<LandAttachment>> getListAttachment(Long annoId, String fileType);
R<List<LandAttachment>> getListAttachment(String annoId, String fileType);
}

3
air/src/main/java/com/air/land/service/LandListedLonLatService.java

@ -2,6 +2,7 @@ package com.air.land.service;
import com.air.land.entity.LandListedLonLat;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
/**
* 已挂牌地块经纬度
@ -11,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface LandListedLonLatService extends IService<LandListedLonLat> {
boolean importLandListedLonLatExcel(MultipartFile file);
}

2
air/src/main/java/com/air/land/service/impl/LandAttachmentServiceImpl.java

@ -27,7 +27,7 @@ public class LandAttachmentServiceImpl extends ServiceImpl<LandAttachmentMapper,
private final FileUtil fileUtil;
@Override
public R<List<LandAttachment>> getListAttachment(Long landListedId, String fileType) {
public R<List<LandAttachment>> getListAttachment(String landListedId, String fileType) {
List<LandAttachment> list = this.list(Wrappers.<LandAttachment>query().lambda().eq(LandAttachment::getLandListedId, landListedId)
.eq(StringUtils.isNotEmpty(fileType), LandAttachment::getFileType, fileType));
if (CollectionUtil.isNotEmpty(list)) {

49
air/src/main/java/com/air/land/service/impl/LandListedLonLatServiceImpl.java

@ -1,10 +1,21 @@
package com.air.land.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.air.land.entity.LandListed;
import com.air.land.entity.LandListedLonLat;
import com.air.land.mapper.LandListedLonLatMapper;
import com.air.land.service.LandListedLonLatService;
import com.air.utils.DateUtil;
import com.air.utils.ExcelUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cinderella.framework.common.core.exception.BusinessException;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* 已挂牌地块经纬度
@ -15,4 +26,42 @@ import org.springframework.stereotype.Service;
@Service
public class LandListedLonLatServiceImpl extends ServiceImpl<LandListedLonLatMapper, LandListedLonLat> implements LandListedLonLatService {
@Override
public boolean importLandListedLonLatExcel(MultipartFile file) {
List<List<String>> dataList = new ArrayList<>();
try{
dataList = ExcelUtil.importExcel(file,0,1,0);
}catch (IOException e){
new BusinessException("导入已挂牌地块数据出错");
}
List<LandListedLonLat> list = new ArrayList<>(dataList.size());
dataList.forEach(data ->{
try {
LandListedLonLat landListedLonLat = listToEntity(data);
if(ObjectUtil.isNotEmpty(landListedLonLat)){
list.add(landListedLonLat);
}
}catch (Exception e){
e.printStackTrace();
new BusinessException("导入已挂牌地块数据转换出错");
}
});
return this.saveBatch(list);
}
private LandListedLonLat listToEntity(List<String> data) {
LandListedLonLat landListedLonLat = new LandListedLonLat();
if (StrUtil.isNotEmpty(data.get(0))) {
landListedLonLat.setLandListedId(data.get(0));
landListedLonLat.setAnnoId(data.get(1));
landListedLonLat.setName(data.get(2));
landListedLonLat.setLandLonLat(data.get(3));
landListedLonLat.setLineWidth(data.get(4));
landListedLonLat.setLineColor(data.get(5));
landListedLonLat.setLineOpaqueness(data.get(6));
landListedLonLat.setFillColor(data.get(7));
landListedLonLat.setFillOpaqueness(data.get(8));
}
return landListedLonLat;
}
}

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

@ -59,7 +59,7 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
public boolean importLandListExcel(MultipartFile file) {
List<List<String>> dataList = new ArrayList<>();
try{
dataList = ExcelUtil.importExcel(file);
dataList = ExcelUtil.importExcel(file,0,2,0);
}catch (IOException e){
new BusinessException("导入已挂牌地块数据出错");
}
@ -108,10 +108,10 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
landListed.setBidMargin(data.get(14));
landListed.setBizRemark(data.get(15));
if(StrUtil.isNotEmpty(data.get(16))){
landListed.setAnnoDate(DateUtil.fromLocalDateTime(data.get(16),"yyyy-MM-dd"));
landListed.setAnnoDate(DateUtil.fromLocalDate(data.get(16),"yyyy-MM-dd"));
}
if(StrUtil.isNotEmpty(data.get(17))){
landListed.setAuctionDate( DateUtil.fromLocalDateTime(data.get(17),"yyyy-MM-dd"));
landListed.setAuctionDate( DateUtil.fromLocalDate(data.get(17),"yyyy-MM-dd"));
}
landListed.setLicensedArea(data.get(18));
landListed.setBizSpace(data.get(19));
@ -156,13 +156,13 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
landListed.setBuildingName(data.get(57));
landListed.setProjectCompany(data.get(58));
if(StrUtil.isNotEmpty(data.get(59))){
landListed.setConfirmationTime(DateUtil.fromLocalDateTime(data.get(59),"yyyy-MM-dd"));
landListed.setConfirmationTime(DateUtil.fromLocalDate(data.get(59),"yyyy-MM-dd"));
}
landListed.setTradingEnterprises(data.get(60));
landListed.setPartner(data.get(61));
landListed.setConductEnterprise(data.get(62));
if(StrUtil.isNotEmpty(data.get(63))){
landListed.setFirstOpenTime(DateUtil.fromLocalDateTime(data.get(63),"yyyy-MM-dd"));
landListed.setFirstOpenTime(DateUtil.fromLocalDate(data.get(63),"yyyy-MM-dd"));
}
return landListed;
}

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

@ -65,7 +65,7 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
public boolean importLandToListExcel(MultipartFile file) {
List<List<String>> dataList = new ArrayList<>();
try{
dataList = ExcelUtil.importExcel(file);
dataList = ExcelUtil.importExcel(file,0,2,0);
}catch (IOException e){
new BusinessException("导入已挂牌地块数据出错");
}
@ -181,8 +181,8 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
landListed.setStartingFloorPrice(data.get(13));
landListed.setBidMargin(data.get(14));
landListed.setBizRemark(data.get(15));
landListed.setAnnoDate(DateUtil.fromLocalDateTime(data.get(16),"yyyy-MM-dd"));
landListed.setAuctionDate(DateUtil.fromLocalDateTime(data.get(17),"yyyy-MM-dd"));
landListed.setAnnoDate(DateUtil.fromLocalDate(data.get(16),"yyyy-MM-dd"));
landListed.setAuctionDate(DateUtil.fromLocalDate(data.get(17),"yyyy-MM-dd"));
landListed.setLicensedArea(data.get(18));
landListed.setBizSpace(data.get(19));
landListed.setCommerceSpace(data.get(20));
@ -225,11 +225,11 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
landListed.setProjectStatus(data.get(56));
landListed.setBuildingName(data.get(57));
landListed.setProjectCompany(data.get(58));
landListed.setConfirmationTime(DateUtil.fromLocalDateTime(data.get(59),"yyyy-MM-dd"));
landListed.setConfirmationTime(DateUtil.fromLocalDate(data.get(59),"yyyy-MM-dd"));
landListed.setTradingEnterprises(data.get(60));
landListed.setPartner(data.get(61));
landListed.setConductEnterprise(data.get(62));
landListed.setFirstOpenTime(DateUtil.fromLocalDateTime(data.get(63),"yyyy-MM-dd"));
landListed.setFirstOpenTime(DateUtil.fromLocalDate(data.get(63),"yyyy-MM-dd"));
return landListed;
}
}

2
air/src/main/java/com/air/land/vo/AuctionRecordVo.java

@ -25,7 +25,7 @@ public class AuctionRecordVo {
@NotNull(message = "已挂牌地块标识不能为空")
@ApiModelProperty(value = "已挂牌地块标识",required = true)
private Long landListedId;
private String landListedId;
@ApiModelProperty(value = "公告id")
private String annoId;

3
air/src/main/java/com/air/land/vo/LandListedLonLatVo.java

@ -22,13 +22,12 @@ public class LandListedLonLatVo {
@NotNull(message = "已挂牌标识不能为空")
@ApiModelProperty(value = "已挂牌主键", required = true)
private Long landListedId;
private String landListedId;
@NotBlank(message = "公告序号不能为空")
@ApiModelProperty(value = "公告序号", required = true)
private String annoId;
@NotBlank(message = "地块编号不能为空")
@ApiModelProperty(value = "地块编号", required = true)
private String landCode;

3
air/src/main/java/com/air/land/vo/LandListedPageVo.java

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
@ -27,7 +28,7 @@ public class LandListedPageVo {
private String landUsage;
@ApiModelProperty(value = "公告日期")
private LocalDateTime annoDate;
private String annoDate;
@ApiModelProperty(value = "大组团")
private String bigGroup;

12
air/src/main/java/com/air/land/vo/LandListedVo.java

@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.time.LocalDate;
/**
* 已挂牌地块保存参数
@ -19,7 +19,7 @@ public class LandListedVo {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id,主键")
private Long landListedId;
private String landListedId;
@NotBlank(message = "公告id不能为空")
@ApiModelProperty(value = "公告id", required = true)
@ -73,10 +73,10 @@ public class LandListedVo {
private String bizRemark;
@ApiModelProperty(value = "公告日期")
private LocalDateTime annoDate;
private LocalDate annoDate;
@ApiModelProperty(value = "拍卖日期")
private LocalDateTime auctionDate;
private LocalDate auctionDate;
@ApiModelProperty(value = "持证准用面积")
private String licensedArea;
@ -196,7 +196,7 @@ public class LandListedVo {
private String projectCompany;
@ApiModelProperty(value = "确权时间")
private LocalDateTime confirmationTime;
private LocalDate confirmationTime;
@ApiModelProperty(value = "操盘企业")
private String tradingEnterprises;
@ -208,7 +208,7 @@ public class LandListedVo {
private String conductEnterprise;
@ApiModelProperty(value = "项目首开时间")
private LocalDateTime firstOpenTime;
private LocalDate firstOpenTime;
@ApiModelProperty(value = "规划条件函")
private String planningConditionsLetter;

12
air/src/main/java/com/air/land/vo/LandToListVo.java

@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.time.LocalDate;
/**
* 拟挂牌地块参数
@ -29,7 +29,7 @@ public class LandToListVo {
private String supplyStatus;
@ApiModelProperty(value = "预计挂牌时间")
private LocalDateTime estimatedListingTime;
private String estimatedListingTime;
@ApiModelProperty(value = "预计挂牌批次")
private String estimatedListingBatch;
@ -86,10 +86,10 @@ public class LandToListVo {
private String bizRemark;
@ApiModelProperty(value = "公告日期")
private LocalDateTime annoDate;
private LocalDate annoDate;
@ApiModelProperty(value = "拍卖日期")
private LocalDateTime auctionDate;
private LocalDate auctionDate;
@ApiModelProperty(value = "持证准用面积")
private String licensedArea;
@ -209,7 +209,7 @@ public class LandToListVo {
private String projectCompany;
@ApiModelProperty(value = "确权时间")
private LocalDateTime confirmationTime;
private LocalDate confirmationTime;
@ApiModelProperty(value = "操盘企业")
private String tradingEnterprises;
@ -221,7 +221,7 @@ public class LandToListVo {
private String conductEnterprise;
@ApiModelProperty(value = "项目首开时间")
private LocalDateTime firstOpenTime;
private LocalDate firstOpenTime;
@ApiModelProperty(value = "规划条件函")
private String planningConditionsLetter;

3
air/src/main/java/com/air/measuredata/serivce/impl/MeasureDataServiceImpl.java

@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@ -50,7 +51,7 @@ public class MeasureDataServiceImpl extends ServiceImpl<MeasureDataMapper, Measu
@Override
public List<MeasureTrendDto> trend() {
//统计时间
LocalDateTime now = LocalDateTime.now();
LocalDate now = LocalDate.now();
String startTime = DateUtil.fromString(now.minusYears(1), "yyyyMM");
String endTime = DateUtil.fromString(now, "yyyyMM");
List<MeasureTrendDto> list = baseMapper.getTrend(startTime, endTime);

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

@ -1,5 +1,7 @@
package com.air.utils;
import org.apache.commons.lang3.StringUtils;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -55,10 +57,9 @@ public class DateUtil {
* @date 2020/6/28
* @return
**/
public static LocalDateTime fromLocalDateTime(String dateString,String pattern) {
public static LocalDate fromLocalDate(String dateString,String pattern) {
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
LocalDate ld = LocalDate.parse(dateString, fmt);
return LocalDateTime.of(ld, LocalDateTime.now().toLocalTime());
return LocalDate.parse(dateString, fmt);
}
/**
@ -68,13 +69,17 @@ public class DateUtil {
* @date 2020/6/28
* @return
**/
public static String fromString(LocalDateTime dateString,String pattern) {
if(null == dateString){
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){
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
return "CQ"+fmt.format(dateString)+"0";
}
}

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

@ -1,6 +1,5 @@
package com.air.utils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
@ -20,7 +19,16 @@ import java.util.List;
**/
public class ExcelUtil {
public static XSSFWorkbook exportExcel(List<List<String>> dataList, InputStream inputStream) throws IOException {
/**
* 已挂牌地块数据导出
* @author peihao
* @param dataList 导出数据
* @param inputStream 模板流
* @date 2021/6/17
* @return
**/
public static XSSFWorkbook exportLandListedExcel(List<List<String>> dataList, InputStream inputStream) throws IOException {
// 读取excel模板
XSSFWorkbook wb = new XSSFWorkbook(inputStream);
XSSFSheet sheet = wb.getSheetAt(0);
@ -36,18 +44,27 @@ public class ExcelUtil {
return wb;
}
public static List<List<String>> importExcel(MultipartFile file) throws IOException {
/**
* 导入数据
* @author peihao
* @param file 导入文件
* @param startSheet 第几个sheet
* @param startRow 开始读取行
* @param startCell 开始读取列
* @date 2021/6/17
* @return
**/
public static List<List<String>> importExcel(MultipartFile file,int startSheet,int startRow, int startCell) throws IOException {
// 读取excel模板
XSSFWorkbook wb = new XSSFWorkbook(file.getInputStream());
XSSFSheet sheet = wb.getSheetAt(0);
XSSFSheet sheet = wb.getSheetAt(startSheet);
int rowSum = sheet.getPhysicalNumberOfRows();
//获取数据
List<List<String>> result = new ArrayList<>();
for (int i = 2; i < rowSum; i++) {
for (int i = startRow; i < rowSum; i++) {
XSSFRow sheetRow = sheet.getRow(i);
List<String> list = new ArrayList<>();
for (int j = 0; j < sheetRow.getPhysicalNumberOfCells(); j++) {
for (int j = startCell; j < sheetRow.getPhysicalNumberOfCells(); j++) {
String value;
XSSFCell cell = sheetRow.getCell(j);
try {
@ -66,4 +83,6 @@ public class ExcelUtil {
}

Loading…
Cancel
Save