更新待阅已阅人数
This commit is contained in:
parent
d552ed0259
commit
7627c95023
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
package com.actionsoft.apps.coe.pal.datamigration;
|
||||
|
||||
import com.actionsoft.bpms.bo.engine.BO;
|
||||
import com.actionsoft.bpms.schedule.IJob;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class InsertDyrsJob implements IJob {
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
List<BO> pal_pulbish_success = SDK.getBOAPI().query("BO_EU_PAL_PULBISH_SUCCESS").list();
|
||||
|
||||
for (int i = 0; i < pal_pulbish_success.size(); i++) {
|
||||
|
||||
String bindid = pal_pulbish_success.get(i).getString("PROCESSID");
|
||||
|
||||
System.out.println("bindid========" + bindid);
|
||||
|
||||
String datanum = DBSql.getString("select count(user_id) AS NUMBERS from BO_ACT_DATAID where 1=1 AND PROCESSID='" + bindid + "'");
|
||||
|
||||
String alerynum = DBSql.getString("select count(user_id) AS NUMBERS from BO_ACT_ALREADY_DATAID where 1=1 AND PROCESSID='" + bindid + "'");
|
||||
|
||||
System.out.println("datanum=========" + datanum);
|
||||
|
||||
System.out.println("alerynum===========" + alerynum);
|
||||
BO bo = pal_pulbish_success.get(i);
|
||||
|
||||
System.out.println("bo=============" + bo);
|
||||
bo.set("ID", ((BO)pal_pulbish_success.get(i)).getId());
|
||||
bo.set("DYRS", Integer.valueOf(Integer.parseInt(datanum)));
|
||||
bo.set("YYRS", Integer.valueOf(Integer.parseInt(alerynum)));
|
||||
|
||||
int count = SDK.getBOAPI().update("BO_EU_PAL_PULBISH_SUCCESS", bo);
|
||||
|
||||
System.out.println("count=======" + count);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user