Browse Source

乱七八糟改了很多

release/v1.0.0
yueminglinxia 4 years ago
parent
commit
b782f93c54
  1. 2
      air/src/main/java/com/air/housing/dto/BlockListDto.java
  2. 2
      air/src/main/java/com/air/housing/dto/HousingDefine.java
  3. 16
      air/src/main/java/com/air/housing/entity/Blocks.java
  4. 3
      air/src/main/java/com/air/housing/entity/Houses.java
  5. 82
      air/src/main/java/com/air/housing/entity/HousingEstates.java
  6. 20
      air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java
  7. 2
      air/src/main/java/com/air/housing/vo/HousingEstatesDetail.java
  8. 5
      air/src/main/java/com/air/land/controller/LandListedController.java
  9. 16
      air/src/main/java/com/air/land/controller/LandListedLonLatController.java
  10. 20
      air/src/main/java/com/air/land/controller/LandToListLonLatController.java
  11. 2
      air/src/main/java/com/air/land/entity/AuctionRecord.java
  12. 4
      air/src/main/java/com/air/land/entity/LandListedLonLat.java
  13. 5
      air/src/main/java/com/air/land/entity/LandToListLonLat.java
  14. 3
      air/src/main/java/com/air/land/vo/LandListedLonLatVo.java
  15. 2
      air/src/main/java/com/air/land/vo/LandToListLonLatVo.java
  16. 8
      air/src/main/resources/mapper/BlocksMapper.xml
  17. 27
      air/src/main/resources/mapper/HousingEstatesMapper.xml

2
air/src/main/java/com/air/housing/dto/BlockListDto.java

@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode;
public class BlockListDto {
@ApiModelProperty(value = "楼盘id")
Long housingEstatesId;
Long housingEstateId;
@ApiModelProperty(value = "大业态")
String largeFormat;

2
air/src/main/java/com/air/housing/dto/HousingDefine.java

@ -14,7 +14,7 @@ public class HousingDefine {
@ApiModelProperty(value = "blocks_origin主键")
private Long blockId;
@ApiModelProperty(value = "楼盘id")
private Long housingEstatesId;
private Long housingEstateId;
@ApiModelProperty(value = "楼盘名称")
private String name;
@ApiModelProperty(value = "公告id")

16
air/src/main/java/com/air/housing/entity/Blocks.java

@ -1,5 +1,6 @@
package com.air.housing.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -28,7 +29,10 @@ public class Blocks extends Model<Blocks> {
private Long blockId;
@ApiModelProperty(value = "楼盘id")
private Long housingEstatesId;
private Long housingEstateId;
@ApiModelProperty(value = "数据编号(315上的数据id,保存起来方便更新)")
private String dataId;
@ApiModelProperty(value = "预售许可证号")
private String preSalePermitNo;
@ -36,6 +40,16 @@ public class Blocks extends Model<Blocks> {
@ApiModelProperty(value = "楼栋名称")
private String blockName;
@ApiModelProperty(value = "物业类型")
private String propertyType;
@ApiModelProperty(value = "物业类型")
private String largeFormat;
@ApiModelProperty(value = "物业类型")
@TableField(value = "`format`")
private String format;
@ApiModelProperty(value = "状态")
private String statusCd;

3
air/src/main/java/com/air/housing/entity/Houses.java

@ -32,6 +32,9 @@ public class Houses extends Model<Houses> {
@ApiModelProperty(value = "楼栋id")
private Long blockId;
@ApiModelProperty(value = "数据编号(315上的数据id,保存起来方便更新)")
private String dataId;
@ApiModelProperty(value = "名义层最大值")
private Integer maxNominalLayer;

82
air/src/main/java/com/air/housing/entity/HousingEstates.java

@ -1,6 +1,5 @@
package com.air.housing.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -27,87 +26,17 @@ public class HousingEstates extends Model<HousingEstates> {
@TableId
@ApiModelProperty(value = "楼盘id")
private Long housingEstatesId;
private Long housingEstateId;
@ApiModelProperty(value = "公告id")
private String annoId;
@ApiModelProperty(value = "315楼盘名称(爬虫获取的)")
private String netName;
@ApiModelProperty(value = "公告id")
private String otherAnnoIds;
@ApiModelProperty(value = "楼盘名称")
private String name;
@ApiModelProperty(value = "楼盘简称")
private String shortName;
@ApiModelProperty(value = "经纬度(百度BD09)")
private String lonLatBd;
@ApiModelProperty(value = "物业类型")
private String propertyType;
@ApiModelProperty(value = "大业态")
private String largeFormat;
@ApiModelProperty(value = "业态")
@TableField(value = "`format`")
private String format;
@ApiModelProperty(value = "拟售总价")
private Integer totalProposedPrice;
@ApiModelProperty(value = "操盘企业")
private String tradingEnterprises;
@ApiModelProperty(value = "开发企业")
private String devCompany;
@ApiModelProperty(value = "合作商")
private String partner;
@ApiModelProperty(value = "销售状态")
private String salesStatus;
@ApiModelProperty(value = "装修标准")
private String decorateStandards;
@ApiModelProperty(value = "业态体量")
private String volume;
@ApiModelProperty(value = "业态首推时间")
private LocalDateTime firstPushTime;
@ApiModelProperty(value = "供应套数")
private Integer supplyKits;
@ApiModelProperty(value = "供应面积")
private Integer supplyArea;
@ApiModelProperty(value = "成交套数")
private Integer dealKits;
@ApiModelProperty(value = "成交面积")
private Integer dealArea;
@ApiModelProperty(value = "狭义库存")
private Integer narrowStock;
@ApiModelProperty(value = "未推库存")
private Integer unpushedStock;
@ApiModelProperty(value = "广义库存")
private Integer generalStock;
@ApiModelProperty(value = "最近6月月均成交量")
private Integer halfYearDealVolume;
@ApiModelProperty(value = "狭义去化周期")
private Integer narrowCycle;
@ApiModelProperty(value = "广义去化周期")
private Integer generalCycle;
@ApiModelProperty(value = "状态")
private String statusCd;
@ -126,9 +55,10 @@ public class HousingEstates extends Model<HousingEstates> {
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateDate;
@ApiModelProperty(value = "已挂牌地块id")
private Long landListedId;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "其他编号")
private String otherNo;
}

20
air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java

@ -1,6 +1,7 @@
package com.air.housing.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.air.common.Constant;
import com.air.enums.BlocksOriginStatusEnum;
import com.air.housing.dto.HousingDefine;
import com.air.housing.dto.HousingEstatesQuery;
@ -69,15 +70,16 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
@Override
@Transactional(rollbackFor = Exception.class)
public boolean createFromOrigin(HousingDefine housingDefine) {
if (housingDefine.getHousingEstatesId() == null) {
if (housingDefine.getHousingEstateId() == null) {
HousingEstates housingEstates = new HousingEstates();
housingEstates.setFormat(housingDefine.getFormat());
housingEstates.setLargeFormat(housingDefine.getLargeFormat());
housingEstates.setPropertyType(housingDefine.getPropertyType());
// housingEstates.setFormat(housingDefine.getFormat());
// housingEstates.setLargeFormat(housingDefine.getLargeFormat());
// housingEstates.setPropertyType(housingDefine.getPropertyType());
housingEstates.setName(housingDefine.getName());
housingEstates.setAnnoId(housingDefine.getAnnoId());
housingEstates.setStatusCd(Constant.COMMON_STATUS_1000);
save(housingEstates);
housingDefine.setHousingEstatesId(housingEstates.getHousingEstatesId());
housingDefine.setHousingEstateId(housingEstates.getHousingEstateId());
}
if (housingDefine.getBlockId() == null) {
throw new BusinessException("blockId不存在");
@ -91,12 +93,12 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
copyHousesOriginToHouses(housingDefine.getBlockId(), housingDefine);
//查询业态表
Format format = formatService.getOne(Wrappers.<Format>query().lambda().eq(Format::getHousingEstateId, housingDefine.getHousingEstatesId())
Format format = formatService.getOne(Wrappers.<Format>query().lambda().eq(Format::getHousingEstateId, housingDefine.getHousingEstateId())
.eq(Format::getLargeFormat, housingDefine.getLargeFormat())
.eq(Format::getFormat, housingDefine.getFormat()));
if (format == null) {
format = new Format();
format.setHousingEstateId(housingDefine.getHousingEstatesId());
format.setHousingEstateId(housingDefine.getHousingEstateId());
format.setLargeFormat(housingDefine.getLargeFormat());
format.setFormat(housingDefine.getFormat());
formatService.save(format);
@ -110,7 +112,7 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
@Override
public HousingEstatesDetail getHousingEstatesDetail(Long housingEstatesId, Long blockId) {
HousingEstates housingEstates = baseMapper.selectById(housingEstatesId);
List<LandListed> landListed = landListedMapper.selectList(Wrappers.<LandListed>lambdaQuery().eq(LandListed::getAnnoId,housingEstates.getAnnoId()));
LandListed landListed = landListedMapper.selectOne(Wrappers.<LandListed>lambdaQuery().eq(LandListed::getAnnoId,housingEstates.getAnnoId()));
HousingEstatesDetail detail = new HousingEstatesDetail();
detail.setHousingEstates(housingEstates);
detail.setLandListed(landListed);
@ -128,7 +130,7 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
private void copyBlocksOriginToBlocks(BlocksOrigin blocksOrigin, HousingDefine housingDefine) {
Blocks blocks = new Blocks();
blocks.setHousingEstatesId(housingDefine.getHousingEstatesId());
blocks.setHousingEstateId(housingDefine.getHousingEstateId());
blocks.setBlockName(housingDefine.getName());
blocks.setPreSalePermitNo(blocksOrigin.getPreSaleLicenseNo());
blocksService.save(blocks);

2
air/src/main/java/com/air/housing/vo/HousingEstatesDetail.java

@ -21,5 +21,5 @@ public class HousingEstatesDetail {
Format format;
List<LandListed> landListed;
LandListed landListed;
}

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

@ -96,10 +96,11 @@ public class LandListedController {
*/
@ApiOperation(value = "保存已挂牌地块(新增,修改)", notes = "新增已挂牌地块(传id为修改,不传为新增)")
@PostMapping
public R<Boolean> saveLandListed(@RequestBody LandListedVo landListedVo) {
public R<Long> saveLandListed(@RequestBody LandListedVo landListedVo) {
LandListed landListed = new LandListed();
BeanUtil.copyProperties(landListedVo, landListed);
return R.ok(landListedService.saveOrUpdate(landListed), "保存成功");
landListedService.saveOrUpdate(landListed);
return R.ok(landListed.getLandListedId());
}
/**

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

@ -74,11 +74,16 @@ public class LandListedLonLatController {
@ApiOperation(value = "修改拟挂牌地块经纬度", notes = "修改拟挂牌地块经纬度")
@PutMapping
public R update(@RequestBody @Validated LandListedLonLatVo landListedLonLatVo) {
List<LandListedLonLat> list = landListedLonLatService.list(Wrappers.<LandListedLonLat>query().lambda()
.eq(LandListedLonLat::getLandListedId, landListedLonLatVo.getLandListedId())
.eq(LandListedLonLat::getLandCode, landListedLonLatVo.getLandCode()));
if (CollectionUtil.isNotEmpty(list)) {
return R.failed("地块编号已存在");
}
LandListedLonLat landListedLonLat = new LandListedLonLat();
BeanUtil.copyProperties(landListedLonLatVo, landListedLonLat);
landListedLonLatService.update(landListedLonLat, Wrappers.<LandListedLonLat>query().lambda()
.eq(LandListedLonLat::getLandListedId, landListedLonLatVo.getLandListedId())
.eq(LandListedLonLat::getLandCode, landListedLonLatVo.getLandCode()));
.eq(LandListedLonLat::getLatId, landListedLonLatVo.getLatId()));
return R.ok("修改成功");
}
@ -90,10 +95,9 @@ public class LandListedLonLatController {
* @return R
*/
@ApiOperation(value = "通过id删除已挂牌地块经纬度", notes = "通过id删除已挂牌地块经纬度")
@DeleteMapping("/{landListedId}/{landCode}")
public R removeById(@PathVariable Long landListedId, @PathVariable String landCode) {
boolean remove = landListedLonLatService.remove(Wrappers.<LandListedLonLat>query().lambda()
.eq(LandListedLonLat::getLandListedId, landListedId).eq(LandListedLonLat::getLandCode, landCode));
@DeleteMapping("/{latId}")
public R removeById(@PathVariable Long latId) {
boolean remove = landListedLonLatService.removeById(latId);
return R.ok(remove);
}

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

@ -73,26 +73,28 @@ public class LandToListLonLatController {
@ApiOperation(value = "修改拟挂牌地块经纬度", notes = "修改拟挂牌地块经纬度")
@PutMapping
public R update(@RequestBody @Validated LandToListLonLatVo landToListLonLatVo) {
List<LandToListLonLat> list = landToListLonLatService.list(Wrappers.<LandToListLonLat>query().lambda()
.eq(LandToListLonLat::getProposedseriaId, landToListLonLatVo.getProposedseriaId())
.eq(LandToListLonLat::getLandCode, landToListLonLatVo.getLandCode()));
if (CollectionUtil.isNotEmpty(list)) {
return R.failed("地块编号已存在");
}
LandToListLonLat landToListLonLat = new LandToListLonLat();
BeanUtil.copyProperties(landToListLonLatVo, landToListLonLat);
landToListLonLatService.update(landToListLonLat, Wrappers.<LandToListLonLat>query().lambda()
.eq(LandToListLonLat::getProposedseriaId, landToListLonLatVo.getProposedseriaId())
.eq(LandToListLonLat::getLandCode, landToListLonLatVo.getLandCode()));
.eq(LandToListLonLat::getLatId, landToListLonLatVo.getLatId()));
return R.ok("修改成功");
}
/**
* 通过拟公告序号和地块编号删除拟挂牌地块经纬度
*
* @param proposedseriaId 拟公告序号
* @param landCode 地块编号
* 地块编号
* @return R
*/
@ApiOperation(value = "通过拟公告序号和地块编号删除", notes = "通过拟公告序号和地块编号删除")
@DeleteMapping("/{proposedseriaId}/{landCode}")
public R removeById(@PathVariable String proposedseriaId, @PathVariable String landCode) {
boolean remove = landToListLonLatService.remove(Wrappers.<LandToListLonLat>query().lambda()
.eq(LandToListLonLat::getProposedseriaId, proposedseriaId).eq(LandToListLonLat::getLandCode, landCode));
@DeleteMapping("/{latId}")
public R removeById(@PathVariable String latId) {
boolean remove = landToListLonLatService.removeById(latId);
return R.ok(remove);
}

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

@ -40,7 +40,7 @@ public class AuctionRecord extends Model<AuctionRecord> {
@ApiModelProperty(value = "地块名称")
private String landName;
@ApiModelProperty(value = "地块位置")
@ApiModelProperty(value = "排名")
private String ranking;
@ApiModelProperty(value = "举牌企业")

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

@ -1,5 +1,6 @@
package com.air.land.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
@ -22,6 +23,9 @@ import java.time.LocalDateTime;
public class LandListedLonLat extends Model<LandListedLonLat> {
private static final long serialVersionUID = 1L;
@TableId
@ApiModelProperty(value = "id(主键)")
private Long latId;
@ApiModelProperty(value = "已挂牌地块id,主键")
private Long landListedId;

5
air/src/main/java/com/air/land/entity/LandToListLonLat.java

@ -1,6 +1,7 @@
package com.air.land.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
@ -23,6 +24,10 @@ import java.time.LocalDateTime;
public class LandToListLonLat extends Model<LandToListLonLat> {
private static final long serialVersionUID = 1L;
@TableId
@ApiModelProperty(value = "id(主键)")
private Long latId;
@ApiModelProperty(value = "拟出让序号")
private Long proposedseriaId;

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

@ -17,7 +17,8 @@ import javax.validation.constraints.NotNull;
@ApiModel(value = "已挂牌地块经纬度")
public class LandListedLonLatVo {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "已挂牌主键", required = true)
private Long latId;
@NotNull(message = "已挂牌标识不能为空")
@ApiModelProperty(value = "已挂牌主键", required = true)

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

@ -18,6 +18,8 @@ import javax.validation.constraints.NotNull;
public class LandToListLonLatVo {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "已挂牌主键", required = true)
private Long latId;
@NotNull(message = "拟出让序号不能为空")
@ApiModelProperty(value = "拟出让序号", required = true)
private Long proposedseriaId;

8
air/src/main/resources/mapper/BlocksMapper.xml

@ -12,19 +12,19 @@
from blocks b
<choose>
<when test="Blocks.largeFormat !=null and Blocks.format == null">
join `format` f ON b.housing_estates_id = f.housing_estate_id and f.large_format = #{Blocks.largeFormat} and f.status_cd=1000 and b.status_cd = 1000
join `format` f ON b.housing_estate_id = f.housing_estate_id and f.large_format = #{Blocks.largeFormat} and f.status_cd=1000 and b.status_cd = 1000
</when>
<when test="Blocks.largeFormat ==null and Blocks.format != null">
join `format` f ON b.housing_estates_id = f.housing_estate_id and f.`format` = #{Blocks.format} and f.status_cd=1000 and b.status_cd = 1000
join `format` f ON b.housing_estate_id = f.housing_estate_id and f.`format` = #{Blocks.format} and f.status_cd=1000 and b.status_cd = 1000
</when>
<when test="Blocks.largeFormat !=null and Blocks.format != null">
join `format` f ON b.housing_estates_id = f.housing_estate_id and f.`format` = #{Blocks.format} and f.large_format = #{Blocks.largeFormat} and f.status_cd=1000 and b.status_cd = 1000
join `format` f ON b.housing_estate_id = f.housing_estate_id and f.`format` = #{Blocks.format} and f.large_format = #{Blocks.largeFormat} and f.status_cd=1000 and b.status_cd = 1000
</when>
<otherwise>
where b.status_cd = 1000
</otherwise>
</choose>
and b.housing_estates_id = #{Blocks.housingEstatesId}
and b.housing_estate_id = #{Blocks.housingEstateId}
</select>
</mapper>

27
air/src/main/resources/mapper/HousingEstatesMapper.xml

@ -11,33 +11,10 @@
</select>
<select id="selectIPage" resultType="com.air.housing.vo.HousingEstatesListVO">
select h.housing_estates_id,
select h.housing_estate_id,
h.anno_id,
h.net_name,
h.other_anno_ids,
h.`name`,
h.short_name,
h.lon_lat_bd,
h.property_type,
h.large_format,
h.`format`,
h.total_proposed_price,
h.trading_enterprises,
h.dev_company,
h.partner,
h.sales_status,
h.decorate_standards,
h.volume,
h.first_push_time,
h.supply_kits,
h.supply_area,
h.deal_kits,
h.deal_area,
h.narrow_stock,
h.unpushed_stock,
h.general_stock,
h.half_year_deal_volume,
h.narrow_cycle,
h.general_cycle,
h.status_cd,
h.status_date,
h.create_user_id,

Loading…
Cancel
Save