Compare commits

..

No commits in common. "5cdfa9b3e58b17b767d3f9ee134f5df540f35357" and "6f9a2986f96968a79b8acdc76e3b388ae68c30a5" have entirely different histories.

View File

@ -250,8 +250,7 @@ public class DataViewServiceImpl implements DataViewService {
studentInfoMap.put("schoolRate", 0 != schoolRate ? (Double.parseDouble(df.format(schoolRate)) * 100) : 0); studentInfoMap.put("schoolRate", 0 != schoolRate ? (Double.parseDouble(df.format(schoolRate)) * 100) : 0);
studentInfoMap.put("businessNum", businessNum); studentInfoMap.put("businessNum", businessNum);
studentInfoMap.put("businessAmount", businessAmount); studentInfoMap.put("businessAmount", businessAmount);
// studentInfoMap.put("businessRate", 0 != businessRate ? (Double.parseDouble(df.format(businessRate)) * 100) : 0); studentInfoMap.put("businessRate", 0 != businessRate ? (Double.parseDouble(df.format(businessRate)) * 100) : 0);
studentInfoMap.put("businessRate", businessRate != 0 ? formatRate(businessRate) : 0);
rtnObj.setStudentInfo(studentInfoMap); rtnObj.setStudentInfo(studentInfoMap);
/*4.财务情况--*/ /*4.财务情况--*/
//应收 //应收
@ -393,12 +392,7 @@ public class DataViewServiceImpl implements DataViewService {
return rtnObj; return rtnObj;
} }
private Double formatRate(double rate) {
return BigDecimal.valueOf(rate)
.multiply(BigDecimal.valueOf(100)) // 转为百分比
.setScale(2, RoundingMode.HALF_UP) // 四舍五入保留两位小数
.doubleValue(); // 转为 Double 存入 Map
}
@Override @Override
public IndexDataVO selectIndexInfoByBusiness(String type, String timeType, Long coachId, String startTime, String endTime, Integer isSign) { public IndexDataVO selectIndexInfoByBusiness(String type, String timeType, Long coachId, String startTime, String endTime, Integer isSign) {
IndexDataVO rtnObj = new IndexDataVO(); IndexDataVO rtnObj = new IndexDataVO();