update bug
This commit is contained in:
+3
-2
@@ -42,7 +42,7 @@ public class CommercialController {
|
||||
|
||||
if (model.getShowSample()!=null && model.getShowSample()==1 && json.containsKey("case")) {
|
||||
List<BusinessCaseDto> dtos = createBusiness((JSONArray) json.get("case"), "sell");
|
||||
resultMap.put("samples", dtos);
|
||||
resultMap.put("result", dtos);
|
||||
}
|
||||
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(resultMap));
|
||||
@@ -106,7 +106,7 @@ public class CommercialController {
|
||||
|
||||
if (model.getShowSample()!=null && model.getShowSample()==1 && json.containsKey("case")) {
|
||||
List<BusinessCaseDto> dtos = createBusiness((JSONArray) json.get("case"), "rent");
|
||||
resultMap.put("samples", dtos);
|
||||
resultMap.put("result", dtos);
|
||||
}
|
||||
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(resultMap));
|
||||
@@ -139,6 +139,7 @@ public class CommercialController {
|
||||
|
||||
dto.setTotalPrice(jsonObject.getInt("totalPrice"));
|
||||
dto.setDistance(jsonObject.getInt("distance"));
|
||||
|
||||
dto.setSize(jsonObject.getDouble("size"));
|
||||
if(jsonObject.containsKey("type")){
|
||||
dto.setType(jsonObject.getString("type"));
|
||||
|
||||
+2
-2
@@ -534,7 +534,7 @@ public class OfficeController {
|
||||
Long totalPrice = (long) (evaluation.getUnitPrice() * model.getSize() * 30);
|
||||
districtPriceMap.put("totalPrice", totalPrice);
|
||||
if(model.getShow()!=null && model.getShow()==1) {
|
||||
districtPriceMap.put("samples", evaluation.getSeawater());
|
||||
districtPriceMap.put("result", evaluation.getSeawater());
|
||||
}
|
||||
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||
@@ -755,7 +755,7 @@ public class OfficeController {
|
||||
if (evaluation.getUnitPrice() != null && evaluation.getUnitPrice() != 0) {
|
||||
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||
List<BusinessCaseDto> createBusiness = createBusiness(evaluation.getSeawater(), "office_rent", district);
|
||||
districtPriceMap.put("samples", createBusiness);
|
||||
districtPriceMap.put("result", createBusiness);
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||
return mav;
|
||||
}
|
||||
|
||||
+3
-3
@@ -309,7 +309,7 @@ public class OfficeSellController {
|
||||
Long totalPrice = (long) (evaluation.getUnitPrice() * model.getSize());
|
||||
districtPriceMap.put("totalPrice", totalPrice);
|
||||
if(model.getShow()!=null && model.getShow()==1){
|
||||
districtPriceMap.put("samples", evaluation.getSeawater());
|
||||
districtPriceMap.put("result", evaluation.getSeawater());
|
||||
}
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||
// try {
|
||||
@@ -386,7 +386,7 @@ public class OfficeSellController {
|
||||
districtPriceMap.put("city", evaluation.getCity());
|
||||
districtPriceMap.put("district", evaluation.getDistrict());
|
||||
districtPriceMap.put("name", evaluation.getName());
|
||||
districtPriceMap.put("samples", evaluation.getSeawater());
|
||||
districtPriceMap.put("result", evaluation.getSeawater());
|
||||
districtPriceMap.put("location", evaluation.getLocation());
|
||||
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||
@@ -471,7 +471,7 @@ public class OfficeSellController {
|
||||
if (evaluation.getUnitPrice() != null && evaluation.getUnitPrice() != 0) {
|
||||
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||
List<BusinessCaseDto> createBusiness = createBusiness(evaluation.getSeawater(), "office_sell", district);
|
||||
districtPriceMap.put("samples", createBusiness);
|
||||
districtPriceMap.put("result", createBusiness);
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||
return mav;
|
||||
}
|
||||
|
||||
+2
-2
@@ -6572,9 +6572,9 @@ public class PropertyController {
|
||||
caseDto.setDistrict(house.getRegion());
|
||||
caseDto.setName(house.getDistrictName());
|
||||
caseDto.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
|
||||
if(house.getCategory() == "sell"){
|
||||
if(house.getCategory().equals("sell")){
|
||||
caseDto.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
|
||||
}else if(house.getCategory() == "rent"){
|
||||
}else if(house.getCategory().equals("rent")){
|
||||
Double dayPrice = house.getTotalPrice()/(30*house.getArea());
|
||||
caseDto.setUnitPrice(DataUtil.getDoubleRound(2, dayPrice));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user