|
@@ -71,16 +71,16 @@ public class SaleProduceServiceImpl extends ServiceImpl<SaleProduceMapper, SaleP
|
|
}
|
|
}
|
|
DecimalFormat def = new DecimalFormat("0.00");
|
|
DecimalFormat def = new DecimalFormat("0.00");
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
- jsonObject.put("monthSaleMoney", def.format(monthSaleMoney));
|
|
|
|
- jsonObject.put("yearSaleMoney",def.format(yearSaleMoney));
|
|
|
|
|
|
+ jsonObject.put("monthPrice", def.format(monthSaleMoney));
|
|
|
|
+ jsonObject.put("yearPrice",def.format(yearSaleMoney));
|
|
if (materials.size() != 0) {
|
|
if (materials.size() != 0) {
|
|
double v = monthPrice / materials.size();
|
|
double v = monthPrice / materials.size();
|
|
double v1 = yearPrice / materials.size();
|
|
double v1 = yearPrice / materials.size();
|
|
- jsonObject.put("monthPrice", def.format(v));
|
|
|
|
- jsonObject.put("yearPrice", def.format(v1));
|
|
|
|
|
|
+ jsonObject.put("monthSaleMoney", def.format(v));
|
|
|
|
+ jsonObject.put("yearSaleMoney", def.format(v1));
|
|
} else {
|
|
} else {
|
|
- jsonObject.put("monthPrice", "0");
|
|
|
|
- jsonObject.put("yearPrice", "0");
|
|
|
|
|
|
+ jsonObject.put("monthSaleMoney", "0");
|
|
|
|
+ jsonObject.put("yearSaleMoney", "0");
|
|
}
|
|
}
|
|
return jsonObject;
|
|
return jsonObject;
|
|
}
|
|
}
|