Browse Source

1.1.0 地块导入导出修改

feature/v1.1.0
peihao 4 years ago
parent
commit
d258577a5f
  1. 2
      air/src/main/java/com/air/applets/controller/AuctionRecordController.java
  2. 4
      air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java
  3. 2
      air/src/main/java/com/air/land/entity/AuctionRecord.java
  4. 4
      air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java
  5. 46
      air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java
  6. 34
      air/src/main/java/com/air/land/service/impl/LandToListServiceImpl.java
  7. 2
      air/src/main/resources/mapper/AuctionRecordMapper.xml

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

@ -44,7 +44,7 @@ public class AuctionRecordController {
public R<IPage<AuctionRecord>> getAuctionRecordPage(QueryPage page, String landListedId) { public R<IPage<AuctionRecord>> getAuctionRecordPage(QueryPage page, String landListedId) {
LambdaQueryWrapper<AuctionRecord> query = Wrappers.<AuctionRecord>query().lambda() LambdaQueryWrapper<AuctionRecord> query = Wrappers.<AuctionRecord>query().lambda()
.eq(StrUtil.isNotEmpty(landListedId), AuctionRecord::getLandListedId, landListedId) .eq(StrUtil.isNotEmpty(landListedId), AuctionRecord::getLandListedId, landListedId)
.orderByDesc(AuctionRecord::getUpdateDate); .orderByAsc(AuctionRecord::getRanking);
IPage<AuctionRecord> recordPage = auctionRecordService.page(page.toPage(), query); IPage<AuctionRecord> recordPage = auctionRecordService.page(page.toPage(), query);
return R.ok(recordPage, "查询成功"); return R.ok(recordPage, "查询成功");
} }

4
air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java

@ -44,7 +44,7 @@ public class BlocksServiceImpl extends ServiceImpl<BlocksMapper, Blocks> impleme
//计算去化率 //计算去化率
BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal()); BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal());
BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal()); BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal());
saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).doubleValue()); saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue());
} }
// 住宅均价 // 住宅均价
@ -71,7 +71,7 @@ public class BlocksServiceImpl extends ServiceImpl<BlocksMapper, Blocks> impleme
//计算去化率 //计算去化率
BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal()); BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal());
BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal()); BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal());
saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).doubleValue()); saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue());
} }
}); });
} }

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

@ -44,7 +44,7 @@ public class AuctionRecord extends Model<AuctionRecord> {
private String landName; private String landName;
@ApiModelProperty(value = "排名") @ApiModelProperty(value = "排名")
private String ranking; private Integer ranking;
@ApiModelProperty(value = "举牌企业") @ApiModelProperty(value = "举牌企业")
private String raiseEnterprise; private String raiseEnterprise;

4
air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java

@ -123,7 +123,7 @@ public class AuctionRecordServiceImpl extends ServiceImpl<AuctionRecordMapper, A
} }
AuctionRecord record = new AuctionRecord().setCity(city).setLandName(landName).setWinnerEnterprises(winnerEnterprise); AuctionRecord record = new AuctionRecord().setCity(city).setLandName(landName).setWinnerEnterprises(winnerEnterprise);
//排名 //排名
record.setRanking(rank); record.setRanking(Integer.valueOf(rank));
//举牌企业 //举牌企业
record.setRaiseEnterprise(getCellValue(sheetRow.getCell(startCell + 1))); record.setRaiseEnterprise(getCellValue(sheetRow.getCell(startCell + 1)));
//举牌价 //举牌价
@ -149,7 +149,7 @@ public class AuctionRecordServiceImpl extends ServiceImpl<AuctionRecordMapper, A
auctionRecords.forEach(auctionRecord -> { auctionRecords.forEach(auctionRecord -> {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add(auctionRecord.getLandCode()); list.add(auctionRecord.getLandCode());
list.add(auctionRecord.getRanking()); list.add(auctionRecord.getRanking().toString());
list.add(auctionRecord.getRaiseEnterprise()); list.add(auctionRecord.getRaiseEnterprise());
list.add(auctionRecord.getRaisePrice()); list.add(auctionRecord.getRaisePrice());
list.add(auctionRecord.getNominalFloorPrice()); list.add(auctionRecord.getNominalFloorPrice());

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

@ -196,8 +196,8 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
landListed.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(5)),0)); landListed.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(5)),0));
landListed.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(6)),0)); landListed.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(6)),0));
landListed.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(7)),2)); landListed.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(7)),2));
landListed.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(8)),0)); landListed.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(8)),100,0));
landListed.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(9)),0)); landListed.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(9)),100,0));
landListed.setHeighPermitted(getCellStrValue(sheetRow.getCell(10))); landListed.setHeighPermitted(getCellStrValue(sheetRow.getCell(10)));
landListed.setRemiseYears(getCellStrValue(sheetRow.getCell(11))); landListed.setRemiseYears(getCellStrValue(sheetRow.getCell(11)));
landListed.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(12)),0)); landListed.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(12)),0));
@ -223,14 +223,14 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
//规划条件 //规划条件
landListed.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(20)),0)); landListed.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(20)),0));
landListed.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(21)),0)); landListed.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(21)),0));
landListed.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(22)),2)); landListed.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(22)),100,2));
landListed.setAllocationCapacity(getCellStrValue(sheetRow.getCell(23))); landListed.setAllocationCapacity(getCellStrValue(sheetRow.getCell(23)));
landListed.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(24))); landListed.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(24)));
//建设条件 //建设条件
landListed.setGeologicHazard(getCellStrValue(sheetRow.getCell(25))); 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.setSpecialPlan(getCellStrValue(sheetRow.getCell(27)));
landListed.setAssemblyBuilding(numberFormat(getCellStrValue(sheetRow.getCell(28)),0)); landListed.setAssemblyBuilding(numberFormat(getCellStrValue(sheetRow.getCell(28)),100,0));
landListed.setGreenBuilding(getCellStrValue(sheetRow.getCell(29))); landListed.setGreenBuilding(getCellStrValue(sheetRow.getCell(29)));
landListed.setOtherConditions(getCellStrValue(sheetRow.getCell(30))); landListed.setOtherConditions(getCellStrValue(sheetRow.getCell(30)));
landListed.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(31)),0)); landListed.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(31)),0));
@ -261,13 +261,11 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
landListed.setLandEnterpriseShort(getCellStrValue(sheetRow.getCell(49))); landListed.setLandEnterpriseShort(getCellStrValue(sheetRow.getCell(49)));
landListed.setDealPrice(numberFormat(getCellStrValue(sheetRow.getCell(50)),0)); landListed.setDealPrice(numberFormat(getCellStrValue(sheetRow.getCell(50)),0));
landListed.setDealFloorPrice(numberFormat(getCellValue(sheetRow.getCell(51)),0)); landListed.setDealFloorPrice(numberFormat(getCellValue(sheetRow.getCell(51)),0));
landListed.setPremiumRate(numberFormat(getCellValue(sheetRow.getCell(52)),2)); landListed.setPremiumRate(numberFormat(getCellValue(sheetRow.getCell(52)),100,2));
String cellStrValue = getCellStrValue(sheetRow.getCell(53)); landListed.setCommercialSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(53)),100,0));
double commercialSelfRatio = StrUtil.isNotEmpty(cellStrValue)?Double.valueOf(cellStrValue)*100 : 0;
landListed.setCommercialSelfRatio(new BigDecimal(commercialSelfRatio).setScale(0,BigDecimal.ROUND_HALF_UP));
BigDecimal year = numberFormat(getCellStrValue(sheetRow.getCell(54)),0); BigDecimal year = numberFormat(getCellStrValue(sheetRow.getCell(54)),0);
landListed.setCommercialSelfYear(year == null? null:year.intValue()); landListed.setCommercialSelfYear(year == null? null:year.intValue());
landListed.setHomeSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(55)),0)); landListed.setHomeSelfRatio(numberFormat(getCellStrValue(sheetRow.getCell(55)),100,0));
year = numberFormat(getCellStrValue(sheetRow.getCell(56)),0); year = numberFormat(getCellStrValue(sheetRow.getCell(56)),0);
landListed.setHomeSelfYear(year == null? null:year.intValue()); landListed.setHomeSelfYear(year == null? null:year.intValue());
landListed.setPercentUnpaid(numberFormat(getCellStrValue(sheetRow.getCell(57)),2)); landListed.setPercentUnpaid(numberFormat(getCellStrValue(sheetRow.getCell(57)),2));
@ -313,8 +311,8 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
list.add(stringFormat(data.getLandTransferMu(),0)); list.add(stringFormat(data.getLandTransferMu(),0));
list.add(stringFormat(data.getTotalConsArea(),0)); list.add(stringFormat(data.getTotalConsArea(),0));
list.add(stringFormat(data.getPlotRatio(),2)); list.add(stringFormat(data.getPlotRatio(),2));
list.add(stringFormat(data.getBuildingDensity(),0)); list.add(strRateFormat(data.getBuildingDensity(),0));
list.add(stringFormat(data.getGreenSpaceRatio(),0)); list.add(strRateFormat(data.getGreenSpaceRatio(),0));
list.add(data.getHeighPermitted()); list.add(data.getHeighPermitted());
list.add(data.getRemiseYears()); list.add(data.getRemiseYears());
list.add(stringFormat(data.getTransferPrice(),0)); list.add(stringFormat(data.getTransferPrice(),0));
@ -328,14 +326,14 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
//规划条件 //规划条件
list.add(stringFormat(data.getBizSpace(),0)); list.add(stringFormat(data.getBizSpace(),0));
list.add(stringFormat(data.getCommerceSpace(),0)); list.add(stringFormat(data.getCommerceSpace(),0));
list.add(strRateFormat(data.getBizCommerceRate())); list.add(strRateFormat(data.getBizCommerceRate(),0));
list.add(data.getAllocationCapacity()); list.add(data.getAllocationCapacity());
list.add(data.getAllocationNotCapacity()); list.add(data.getAllocationNotCapacity());
//建设条件 //建设条件
list.add(data.getGeologicHazard()); list.add(data.getGeologicHazard());
list.add(stringFormat(data.getCivilAirDefence(),0)); list.add(stringFormat(data.getCivilAirDefence(),0));
list.add(data.getSpecialPlan()); list.add(data.getSpecialPlan());
list.add(stringFormat(data.getAssemblyBuilding(),0)); list.add(strRateFormat(data.getAssemblyBuilding(),0));
list.add(data.getGreenBuilding()); list.add(data.getGreenBuilding());
list.add(data.getOtherConditions()); list.add(data.getOtherConditions());
list.add(stringFormat(data.getPercentFinishedHousing(),0)); list.add(stringFormat(data.getPercentFinishedHousing(),0));
@ -362,13 +360,12 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
list.add(data.getLandEnterpriseShort()); list.add(data.getLandEnterpriseShort());
list.add(stringFormat(data.getDealPrice(),0)); list.add(stringFormat(data.getDealPrice(),0));
list.add(stringFormat(data.getDealFloorPrice(),0)); list.add(stringFormat(data.getDealFloorPrice(),0));
list.add(strRateFormat(data.getPremiumRate())); list.add(strRateFormat(data.getPremiumRate(),0));
list.add((data.getCommercialSelfRatio() == null ? list.add(strRateFormat(data.getCommercialSelfRatio(),0));
0d:data.getCommercialSelfRatio().setScale(0,BigDecimal.ROUND_HALF_UP).doubleValue())+"%");
list.add(data.getCommercialSelfYear() == null?"":data.getCommercialSelfYear().toString()); list.add(data.getCommercialSelfYear() == null?"":data.getCommercialSelfYear().toString());
list.add(strRateFormat(data.getHomeSelfRatio())); list.add(strRateFormat(data.getHomeSelfRatio(),0));
list.add(data.getHomeSelfYear() == null?"":data.getHomeSelfYear().toString()); list.add(data.getHomeSelfYear() == null?"":data.getHomeSelfYear().toString());
list.add(strRateFormat(data.getPercentUnpaid())); list.add(strRateFormat(data.getPercentUnpaid(),0));
list.add(stringFormat(data.getTalenApartmentArea(),0)); list.add(stringFormat(data.getTalenApartmentArea(),0));
list.add(data.getParticipatingEnterprises()); list.add(data.getParticipatingEnterprises());
//项目开发 //项目开发
@ -449,6 +446,13 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
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) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal,BigDecimal.ROUND_HALF_UP);
}
/** /**
* 格式化列值为字符串 * 格式化列值为字符串
* *
@ -471,9 +475,7 @@ public class LandListedServiceImpl extends ServiceImpl<LandListedMapper, LandLis
* @date 2021/8/25 * @date 2021/8/25
* @return * @return
**/ **/
private String strRateFormat(BigDecimal value){ private String strRateFormat(BigDecimal value,int decimal){
double bizRate = value == null ? return value == null? null:stringFormat(value,decimal)+"%";
0d:value.multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
return bizRate+"%";
} }
} }

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

@ -160,8 +160,8 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
landToList.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(7)),0)); landToList.setLandTransferMu(numberFormat(getCellValue(sheetRow.getCell(7)),0));
landToList.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(8)),0)); landToList.setTotalConsArea(numberFormat(getCellValue(sheetRow.getCell(8)),0));
landToList.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(9)),2)); landToList.setPlotRatio(numberFormat(getCellValue(sheetRow.getCell(9)),2));
landToList.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(10)),0)); landToList.setBuildingDensity(numberFormat(getCellStrValue(sheetRow.getCell(10)),100,0));
landToList.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(11)),0)); landToList.setGreenSpaceRatio(numberFormat(getCellStrValue(sheetRow.getCell(11)),100,0));
landToList.setHeighPermitted(getCellStrValue(sheetRow.getCell(12))); landToList.setHeighPermitted(getCellStrValue(sheetRow.getCell(12)));
landToList.setRemiseYears(getCellStrValue(sheetRow.getCell(13))); landToList.setRemiseYears(getCellStrValue(sheetRow.getCell(13)));
landToList.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(14)),0)); landToList.setTransferPrice(numberFormat(getCellStrValue(sheetRow.getCell(14)),0));
@ -187,14 +187,14 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
//规划条件 //规划条件
landToList.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(22)),0)); landToList.setBizSpace(numberFormat(getCellStrValue(sheetRow.getCell(22)),0));
landToList.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(23)),0)); landToList.setCommerceSpace(numberFormat(getCellStrValue(sheetRow.getCell(23)),0));
landToList.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(24)),2)); landToList.setBizCommerceRate(numberFormat(getCellValue(sheetRow.getCell(24)),100,2));
landToList.setAllocationCapacity(getCellStrValue(sheetRow.getCell(25))); landToList.setAllocationCapacity(getCellStrValue(sheetRow.getCell(25)));
landToList.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(26))); landToList.setAllocationNotCapacity(getCellStrValue(sheetRow.getCell(26)));
//建设条件 //建设条件
landToList.setGeologicHazard(getCellStrValue(sheetRow.getCell(27))); 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.setSpecialPlan(getCellStrValue(sheetRow.getCell(29)));
landToList.setAssemblyBuilding(numberFormat(getCellStrValue(sheetRow.getCell(30)),0)); landToList.setAssemblyBuilding(numberFormat(getCellStrValue(sheetRow.getCell(30)),100,0));
landToList.setGreenBuilding(getCellStrValue(sheetRow.getCell(31))); landToList.setGreenBuilding(getCellStrValue(sheetRow.getCell(31)));
landToList.setOtherConditions(getCellStrValue(sheetRow.getCell(32))); landToList.setOtherConditions(getCellStrValue(sheetRow.getCell(32)));
landToList.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(33)),0)); landToList.setPercentFinishedHousing(numberFormat(getCellStrValue(sheetRow.getCell(33)),0));
@ -240,8 +240,8 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
list.add(stringFormat(data.getLandTransferMu(),0)); list.add(stringFormat(data.getLandTransferMu(),0));
list.add(stringFormat(data.getTotalConsArea(),0)); list.add(stringFormat(data.getTotalConsArea(),0));
list.add(stringFormat(data.getPlotRatio(),2)); list.add(stringFormat(data.getPlotRatio(),2));
list.add(stringFormat(data.getBuildingDensity(),0)); list.add(strRateFormat(data.getBuildingDensity(),0));
list.add(stringFormat(data.getGreenSpaceRatio(),0)); list.add(strRateFormat(data.getGreenSpaceRatio(),0));
list.add(data.getHeighPermitted()); list.add(data.getHeighPermitted());
list.add(data.getRemiseYears()); list.add(data.getRemiseYears());
list.add(stringFormat(data.getTransferPrice(),0)); list.add(stringFormat(data.getTransferPrice(),0));
@ -255,15 +255,14 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
//规划条件 //规划条件
list.add(stringFormat(data.getBizSpace(),0)); list.add(stringFormat(data.getBizSpace(),0));
list.add(stringFormat(data.getCommerceSpace(),0)); list.add(stringFormat(data.getCommerceSpace(),0));
double bizRate = data.getBizCommerceRate() == null?0d:data.getBizCommerceRate().multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue(); list.add(strRateFormat(data.getBizCommerceRate(),0));
list.add(bizRate+"%");
list.add(data.getAllocationCapacity()); list.add(data.getAllocationCapacity());
list.add(data.getAllocationNotCapacity()); list.add(data.getAllocationNotCapacity());
//建设条件 //建设条件
list.add(data.getGeologicHazard()); list.add(data.getGeologicHazard());
list.add(stringFormat(data.getCivilAirDefence(),0)); list.add(stringFormat(data.getCivilAirDefence(),0));
list.add(data.getSpecialPlan()); list.add(data.getSpecialPlan());
list.add(stringFormat(data.getAssemblyBuilding(),0)); list.add(strRateFormat(data.getAssemblyBuilding(),0));
list.add(data.getGreenBuilding()); list.add(data.getGreenBuilding());
list.add(data.getOtherConditions()); list.add(data.getOtherConditions());
list.add(stringFormat(data.getPercentFinishedHousing(),0)); list.add(stringFormat(data.getPercentFinishedHousing(),0));
@ -352,6 +351,13 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
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) {
if (StringUtils.isEmpty(value)) {
return null;
}
return new BigDecimal(value).multiply(new BigDecimal(mulitple)).setScale(decimal,BigDecimal.ROUND_HALF_UP);
}
/** /**
* 格式化列值为字符串 * 格式化列值为字符串
* *
@ -367,4 +373,14 @@ public class LandToListServiceImpl extends ServiceImpl<LandToListMapper, LandToL
} }
return value.setScale(decimal,BigDecimal.ROUND_HALF_UP).toString(); return value.setScale(decimal,BigDecimal.ROUND_HALF_UP).toString();
} }
/**
* 数字转换百分比
* @author peihao
* @date 2021/8/25
* @return
**/
private String strRateFormat(BigDecimal value,int decimal){
return value == null? null:stringFormat(value,decimal)+"%";
}
} }

2
air/src/main/resources/mapper/AuctionRecordMapper.xml

@ -34,7 +34,7 @@
and ar.winner_enterprises like concat ('%',#{param.winnerEnterprises},'%') and ar.winner_enterprises like concat ('%',#{param.winnerEnterprises},'%')
</if> </if>
</where> </where>
order by ar.create_date desc order by ar.ranking asc
</select> </select>
<select id="getAuctionRecords" resultType="com.air.land.entity.AuctionRecord"> <select id="getAuctionRecords" resultType="com.air.land.entity.AuctionRecord">

Loading…
Cancel
Save