Browse Source

--------update-------
1. 应急计划改为初始三位数字
2. 指标数据自动生成

QuietShadow 3 years ago
parent
commit
b07bf3fd92

+ 10 - 2
src/main/java/com/steerinfo/ems/emsgmpcjh/mapper/EmsGmPcJhMapper.xml

@@ -728,9 +728,17 @@
   </delete>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!-- to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID 2022-02-11更改为3位 -->
   <select id="getMaxid" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh" resultType="java.lang.String">
   <select id="getMaxid" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh" resultType="java.lang.String">
- select #{type} || #{startTime} || '-' ||
-       to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
+ select
+    <choose>
+      <when test='tag != null and tag != "" and tag != "1"'>
+        #{type} || #{startTime} || '-' || to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
+      </when>
+      <otherwise>
+        #{type} || #{startTime} || '-' || to_char(nvl(max(substr(ID, 15, 3) + 1), 1), 'fm000') as ID
+      </otherwise>
+    </choose>
   from ems_gm_pc_jh
   from ems_gm_pc_jh
  where WORKPROC_TYPE = #{workprocType}
  where WORKPROC_TYPE = #{workprocType}
    and ID like '%' || #{type} || '%'
    and ID like '%' || #{type} || '%'

+ 6 - 0
src/main/java/com/steerinfo/task/SpringCronTask.java

@@ -399,6 +399,12 @@ public class SpringCronTask implements SchedulingConfigurer{
 //					// 能源上报_晋泰信和
 //					// 能源上报_晋泰信和
 //					usageDataService.autoUpload();
 //					usageDataService.autoUpload();
 //				}
 //				}
+				 else if (taskId.equalsIgnoreCase("111")) {
+					// 指标管理数据生成
+					long start = System.currentTimeMillis();
+					tRmIndexValueService.statData();
+					logger.info("定时任务"+taskId+"执行时长:" + (System.currentTimeMillis() - start)/1000 + "秒");
+				}
 				else if(taskId.equalsIgnoreCase("113")){
 				else if(taskId.equalsIgnoreCase("113")){
 					//平衡数据维护
 					//平衡数据维护
 					long start = System.currentTimeMillis();
 					long start = System.currentTimeMillis();