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