Эх сурвалжийг харах

更新处理数据的过程,添加截取逻辑。

CodeLife Leno 2 сар өмнө
parent
commit
896654fb3c

+ 5 - 1
Procedure/backend/project/src/main/java/com/sundata/product/rwa/calc/service/ReportUnitParamCalcService.java

@@ -77,7 +77,11 @@ public class ReportUnitParamCalcService {
             sqlParam.addValue("CALC_TOOK", timeInterval.interval());
             sqlParam.addValue("REPORT_UNIT_STR_TIME", DateUtil.formatDateTime(startDateTime));
             sqlParam.addValue("REPORT_UNIT_END_TIME", DateUtil.formatDateTime(new Date()));
-            sqlParam.addValue("REPORT_UNIT_RESULT",model.getValue());
+            String value = model.getValue().toString();
+            if (value.getBytes().length > 300) {
+                value = value.substring(0, 300/4);
+            }
+            sqlParam.addValue("REPORT_UNIT_RESULT",value);
             jdbcTemplate.update(sql, sqlParam);
         }