diff --git a/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar b/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar index 3ac075d2..409a028b 100644 Binary files a/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar and b/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar differ diff --git a/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/job/batchUpdateSort.java b/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/job/batchUpdateSort.java new file mode 100644 index 00000000..2665906d --- /dev/null +++ b/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/job/batchUpdateSort.java @@ -0,0 +1,67 @@ +package com.actionsoft.apps.coe.pal.batch.job; + +import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache; +import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository; +import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl; +import com.actionsoft.bpms.commons.database.RowMap; +import com.actionsoft.bpms.schedule.IJob; +import com.actionsoft.bpms.util.DBSql; +import com.actionsoft.sdk.local.SDK; +import com.alibaba.fastjson.JSONObject; +import jodd.util.StringUtil; +import org.docx4j.wml.P; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import javax.swing.tree.RowMapper; +import java.sql.Connection; +import java.util.ArrayList; +import java.util.List; + +public class batchUpdateSort implements IJob { + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + PALRepository dao = new PALRepository(); + Connection open = DBSql.open(); + List rowMaps=DBSql.getMaps("SELECT ID,PLNAME FROM APP_ACT_COE_PAL_REPOSITORY"); + int b = 0; + for(int i=0;i processList = new ArrayList<>(); + processList.add(0, "control.kpi"); + processList.add(1, plid); + try { + String str1 = "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT2 ='"+processList.toString()+"' WHERE ID=" +"'"+rowMap1.getString("ID")+"' AND PLMETHODID='control.kpi'"; + + + int update = DBSql.update(open, str1); + if (update > 0) { + SDK.getLogAPI().consoleInfo("[成功]刷新绩效图EXT2字段内容,绩效图[" + rowMap1.getString("PLNAME") + "][" + rowMap1.getString("ID") + "],改为[" + processList.toString() + "]"); + b++; + } else { + SDK.getLogAPI().consoleErr("[失败]刷新绩效图EXT2字段内容,绩效图[" + rowMap1.getString("PLNAME") + "][" + rowMap1.getString("ID") + "],改为[" + processList.toString() + "]"); + } + } catch (Exception e) { + e.printStackTrace(); + SDK.getLogAPI().consoleErr("[失败]刷新绩效图EXT2字段内容,绩效图[" + rowMap1.getString("PLNAME") + "][" +rowMap1.getString("ID") + "],改为[" + processList.toString() + "],错误信息:" + e.getMessage()); + } + + + } + + } + + + } + SDK.getLogAPI().consoleInfo("[完成]刷新绩效图图EXT2字段内容,总共更新[" + b + "]条"); + if (b > 0) { + PALRepositoryCache.getCache().reload(); + } + + + } +}