|
|
|
@ -97,7 +97,10 @@ public class ParamServiceImpl implements IParamService {
|
|
|
|
|
String realData = JSON.toJSONString(realDataR.getData().getDataMap().get(p.getSignage())); |
|
|
|
|
if("0".equals(JSONObject.parseObject(realData).getString("q"))) { |
|
|
|
|
String value = JSONObject.parseObject(realData).getString("v"); |
|
|
|
|
if(StringUtil.isNotBlank(p.getDbType()) && "double".equals(p.getDbType()) |
|
|
|
|
if(StringUtil.isNotBlank(p.getDbType()) && "int".equals(p.getDbType()) && StringUtil.isNotBlank(value)) { |
|
|
|
|
value = String.valueOf(new BigDecimal(value).setScale(0, RoundingMode.HALF_UP).doubleValue()); |
|
|
|
|
} |
|
|
|
|
else if(StringUtil.isNotBlank(p.getDbType()) && "double".equals(p.getDbType()) |
|
|
|
|
&& StringUtil.isNotBlank(value) && ObjectUtil.isNotEmpty(p.getKeepFigures())) { |
|
|
|
|
value = String.valueOf(new BigDecimal(value).setScale(p.getKeepFigures(), RoundingMode.HALF_UP).doubleValue()); |
|
|
|
|
} |
|
|
|
|