修复渤海银行估价失败异常

This commit is contained in:
Jian Shen
2022-01-26 14:24:17 +08:00
parent c036d5d677
commit 12c1b22b6d
@@ -462,8 +462,14 @@ public class WeiXinEvaluationController {
}else if(bhDists.size()>1){
int mod = Integer.MAX_VALUE;
for(JSONObject jo : bhDists){
double price = Double.valueOf((String)jo.get("price"));
int bhprice = (int)price;
int bhprice = 0;
if (jo.get("price") == null || jo.get("price").equals("null")) {
bhprice = 0;
} else {
double price = Double.valueOf((String)jo.get("price"));
bhprice = (int)price;
}
int bhmod = Math.abs(bhprice - avgPrice);
if(bhmod<mod){
mod = bhmod;