Authored by zhaoyue

Merge branch 'zhaoyue-dev4' into 'master'

Mod set default as -1 for没有传上来值的item



See merge request !58
... ... @@ -204,7 +204,13 @@ public class ReportService implements IReportService {
*/
JSONObject rpDetails = rpJson.getJSONObject("detail");
for (int item_id = 1; item_id <= 125; item_id++) {
float val = rpDetails.getFloat(String.valueOf(item_id)).floatValue();
float val;
try {
val = rpDetails.getFloat(String.valueOf(item_id)).floatValue();
} catch (Exception e) {
val = -1f;
log.info("WARNING, lose one item value and set " + item_id + " as defalut -1!!! " + e);
}
XklAmpReportDetailEntity detail = new XklAmpReportDetailEntity();
detail.setItemValue(val);
detail.setItemId(item_id);
... ...