批量修改更改清单的文件
This commit is contained in:
parent
7dadf6acf3
commit
59f76bca40
@ -24,47 +24,52 @@ public class UpdateKnowJobs implements IJob {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
Connection open = DBSql.open();
|
Connection open = DBSql.open();
|
||||||
List<BO> list = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).addQuery("SEND_SCOP=", "1").addQuery("SEND_SCOPE_ORG IS NULL", null).list();
|
List<BO> list = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).addQuery("ISEND=","1").addQuery("SEND_SCOP=", "1").addQuery("SEND_SCOPE_ORG IS NULL", null).list();
|
||||||
for (BO bo:list) {
|
for (BO bo:list) {
|
||||||
String bindid = bo.getString("BINDID");
|
String bindid = bo.getString("BINDID");
|
||||||
List<BO> bo_act_coe_publish_n = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N", true).addQuery("BINDID = ", bindid).list();
|
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(bindid);
|
||||||
for (BO bo1:bo_act_coe_publish_n) {
|
boolean end = instanceById.isEnd();
|
||||||
String publishfileid = bo1.getString("PUBLISHFILEID");
|
if (end) {
|
||||||
RowMap map = DBSql.getMap("select * from APP_ACT_COE_PAL_REPOSITORY where ID = '" + publishfileid + "' AND ISPUBLISH = '1' AND ISSTOP='0'");
|
|
||||||
String ext4 = map.getString("EXT4");
|
|
||||||
RowMap map1 = DBSql.getMap("select * from app_act_kms_card where ID = '" + ext4 + "'");
|
|
||||||
if (map1!=null){
|
|
||||||
int update = DBSql.update("delete from sys_ac where RESOURCEID = '" + ext4 + "' AND RESOURCETYPE = 'kms.card'");
|
|
||||||
SDK.getLogAPI().consoleInfo("删除ac授权文件>>>>>>>>>>"+update);
|
|
||||||
JSONArray jsonArray1 = new JSONArray();
|
|
||||||
JSONObject jsonObjecta = new JSONObject();
|
|
||||||
jsonObjecta.put("assignmentType", "company");
|
|
||||||
jsonObjecta.put("assignmentId", "8911e732-b42a-4556-853f-ad32761bcbee");
|
|
||||||
jsonArray1.add(jsonObjecta);
|
|
||||||
UserContext userContext = UserContext.fromUID("admin");
|
|
||||||
AddKnwlAC(jsonArray1,userContext.getSessionId(),ext4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BO> bo_act_coe_publish_c = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C", true).addQuery("BINDID = ", bindid).list();
|
List<BO> bo_act_coe_publish_n = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N", true).addQuery("BINDID = ", bindid).list();
|
||||||
for (BO bo1:bo_act_coe_publish_c) {
|
for (BO bo1 : bo_act_coe_publish_n) {
|
||||||
String publishfileid = bo1.getString("CHANGEDFILEIDNEW");
|
String publishfileid = bo1.getString("PUBLISHFILEID");
|
||||||
RowMap map = DBSql.getMap("select * from APP_ACT_COE_PAL_REPOSITORY where ID = '" + publishfileid + "' AND ISPUBLISH = '1' AND ISSTOP='0'");
|
RowMap map = DBSql.getMap("select * from APP_ACT_COE_PAL_REPOSITORY where ID = '" + publishfileid + "' AND ISPUBLISH = '1' AND ISSTOP='0'");
|
||||||
String ext4 = map.getString("EXT4");
|
String ext4 = map.getString("EXT4");
|
||||||
RowMap map1 = DBSql.getMap("select * from app_act_kms_card where ID = '" + ext4 + "'");
|
RowMap map1 = DBSql.getMap("select * from app_act_kms_card where ID = '" + ext4 + "'");
|
||||||
if (map1!=null){
|
if (map1 != null) {
|
||||||
int update = DBSql.update("delete from sys_ac where RESOURCEID = '" + ext4 + "' AND RESOURCETYPE = 'kms.card'");
|
int update = DBSql.update("delete from sys_ac where RESOURCEID = '" + ext4 + "' AND RESOURCETYPE = 'kms.card'");
|
||||||
SDK.getLogAPI().consoleInfo("删除ac授权文件>>>>>>>>>>"+update);
|
SDK.getLogAPI().consoleInfo("删除ac授权文件>>>>>>>>>>" + update);
|
||||||
JSONArray jsonArray1 = new JSONArray();
|
JSONArray jsonArray1 = new JSONArray();
|
||||||
JSONObject jsonObjecta = new JSONObject();
|
JSONObject jsonObjecta = new JSONObject();
|
||||||
jsonObjecta.put("assignmentType", "company");
|
jsonObjecta.put("assignmentType", "company");
|
||||||
jsonObjecta.put("assignmentId", "8911e732-b42a-4556-853f-ad32761bcbee");
|
jsonObjecta.put("assignmentId", "8911e732-b42a-4556-853f-ad32761bcbee");
|
||||||
jsonArray1.add(jsonObjecta);
|
jsonArray1.add(jsonObjecta);
|
||||||
UserContext userContext = UserContext.fromUID("admin");
|
UserContext userContext = UserContext.fromUID("admin");
|
||||||
AddKnwlAC(jsonArray1,userContext.getSessionId(),ext4);
|
AddKnwlAC(jsonArray1, userContext.getSessionId(), ext4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
List<BO> bo_act_coe_publish_c = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C", true).addQuery("BINDID = ", bindid).list();
|
||||||
|
for (BO bo1 : bo_act_coe_publish_c) {
|
||||||
|
String publishfileid = bo1.getString("CHANGEDFILEIDNEW");
|
||||||
|
RowMap map = DBSql.getMap("select * from APP_ACT_COE_PAL_REPOSITORY where ID = '" + publishfileid + "' AND ISPUBLISH = '1' AND ISSTOP='0'");
|
||||||
|
String ext4 = map.getString("EXT4");
|
||||||
|
RowMap map1 = DBSql.getMap("select * from app_act_kms_card where ID = '" + ext4 + "'");
|
||||||
|
if (map1 != null) {
|
||||||
|
int update = DBSql.update("delete from sys_ac where RESOURCEID = '" + ext4 + "' AND RESOURCETYPE = 'kms.card'");
|
||||||
|
SDK.getLogAPI().consoleInfo("删除ac授权文件>>>>>>>>>>" + update);
|
||||||
|
JSONArray jsonArray1 = new JSONArray();
|
||||||
|
JSONObject jsonObjecta = new JSONObject();
|
||||||
|
jsonObjecta.put("assignmentType", "company");
|
||||||
|
jsonObjecta.put("assignmentId", "8911e732-b42a-4556-853f-ad32761bcbee");
|
||||||
|
jsonArray1.add(jsonObjecta);
|
||||||
|
UserContext userContext = UserContext.fromUID("admin");
|
||||||
|
AddKnwlAC(jsonArray1, userContext.getSessionId(), ext4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user