增加开关,增加管理员视图看全部的活动清单数据
This commit is contained in:
parent
1ea8334cd9
commit
7d80b96236
@ -27,6 +27,7 @@ import java.sql.Timestamp;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ijob implements IJob {
|
public class ijob implements IJob {
|
||||||
@ -42,7 +43,7 @@ public class ijob implements IJob {
|
|||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
ArrayList<String> sendList = new ArrayList<String>();
|
ArrayList<String> sendList = new ArrayList<String>();
|
||||||
|
|
||||||
ProcessInstance pc = SDK.getProcessAPI().getInstanceById("a4de6914-4158-45ab-984c-44ec812d879e");
|
ProcessInstance pc = SDK.getProcessAPI().getInstanceById(cc);
|
||||||
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
||||||
.addQuery("BINDID=", pc.getId())
|
.addQuery("BINDID=", pc.getId())
|
||||||
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
@ -119,12 +120,21 @@ public class ijob implements IJob {
|
|||||||
*//*}*//*
|
*//*}*//*
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
List<String> list = new LinkedList<>();
|
||||||
|
|
||||||
for (String user : sendList) {
|
List<BO> bo_eu_require_data = SDK.getBOAPI().query("BO_EU_REQUIRE_DATA", true).addQuery("PROCESS_ID = ", cc).list();
|
||||||
|
|
||||||
|
for(BO bo:bo_eu_require_data){
|
||||||
|
String id = bo.getString("USER_ID");
|
||||||
|
list.add(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("新list>>>>>>"+list.size());
|
||||||
|
for (String user : list) {
|
||||||
try {
|
try {
|
||||||
SendOARead(jsonObject, pc, user, "批量推送");
|
SendOARead(jsonObject, pc, user, "批量推送");
|
||||||
} catch (Exception e) { // TODO: handle exception
|
} catch (Exception e) { // TODO: handle exception
|
||||||
|
//2023-07-12 14:51:03--job worker-9d60ecf3-d70c-4b15-a271-6cfce754ff25,ijob--sendList.size()==============20393
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +153,6 @@ public class ijob implements IJob {
|
|||||||
*
|
*
|
||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @param processInstance
|
* @param processInstance
|
||||||
* @param results
|
|
||||||
* @throws DocumentException
|
* @throws DocumentException
|
||||||
*/
|
*/
|
||||||
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, String userIds, String type)
|
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, String userIds, String type)
|
||||||
@ -542,9 +551,7 @@ public class ijob implements IJob {
|
|||||||
/**
|
/**
|
||||||
* 创建待阅日志
|
* 创建待阅日志
|
||||||
*
|
*
|
||||||
* @param processExecutionContext
|
|
||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @param users
|
|
||||||
* @param startTime
|
* @param startTime
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -552,9 +559,9 @@ public class ijob implements IJob {
|
|||||||
ArrayList<String> arr, long startTime, long endTimes) {
|
ArrayList<String> arr, long startTime, long endTimes) {
|
||||||
BO bo_Read_log = new BO();
|
BO bo_Read_log = new BO();
|
||||||
String processInstId = pc.getId();
|
String processInstId = pc.getId();
|
||||||
bo_Read_log.set("USREID", "10039924");
|
bo_Read_log.set("USREID", pc.getCreateUser());
|
||||||
bo_Read_log.set("DEPID", "84bac1df-9374-4879-8706-4c4dcaf90201");
|
bo_Read_log.set("DEPID", pc.getCreateUserDeptId());
|
||||||
bo_Read_log.set("BUNAME", "总部");
|
bo_Read_log.set("BUNAME", UserContext.fromUID(pc.getCreateUser()).getUserModel().getExt4());
|
||||||
bo_Read_log.set("TITLE", jsonObject.get("title"));
|
bo_Read_log.set("TITLE", jsonObject.get("title"));
|
||||||
bo_Read_log.set("PROCESSID", processInstId);
|
bo_Read_log.set("PROCESSID", processInstId);
|
||||||
bo_Read_log.set("SENDNUM", arr.size());
|
bo_Read_log.set("SENDNUM", arr.size());
|
||||||
|
|||||||
@ -23,37 +23,44 @@ import java.util.List;
|
|||||||
public class ViewRefishBeforeEvent implements DataWindowBeforeLoadEventInterface {
|
public class ViewRefishBeforeEvent implements DataWindowBeforeLoadEventInterface {
|
||||||
@Override
|
@Override
|
||||||
public boolean excute(UserContext userContext, DataView dataView) {
|
public boolean excute(UserContext userContext, DataView dataView) {
|
||||||
|
//process.epc process.flowchart
|
||||||
List<PALRepositoryModel> palRepositoryModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getAllCoeProcessLevelByWsId("7d3ca852-a0bd-42e6-80b1-3dcea6f55083");
|
List<PALRepositoryModel> palRepositoryModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getAllCoeProcessLevelByWsId("7d3ca852-a0bd-42e6-80b1-3dcea6f55083");
|
||||||
for (PALRepositoryModel palRepositoryModel : palRepositoryModels){
|
for (PALRepositoryModel palRepositoryModel : palRepositoryModels) {
|
||||||
String publishFileId = palRepositoryModel.getId();
|
String publishFileId = palRepositoryModel.getId();
|
||||||
String fileName = palRepositoryModel.getName();
|
String fileName = palRepositoryModel.getName();
|
||||||
|
String file_type = palRepositoryModel.getMethodId();
|
||||||
|
System.out.println("file_type>>>>>>>>" + file_type);
|
||||||
|
if (file_type.equals("process.epc") || file_type.equals("process.flowchart")) {
|
||||||
|
|
||||||
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(publishFileId, 0);
|
|
||||||
if (defineModel == null) {
|
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(publishFileId, 0);
|
||||||
|
if (defineModel == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String definition = defineModel.getDefinition().trim();
|
||||||
|
JSONObject definitionJo = JSONObject.parseObject(definition);
|
||||||
|
JSONObject elements = (JSONObject) definitionJo.get("elements");
|
||||||
|
ArrayList<BO> bos = new ArrayList<>();
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
//流程架构等级
|
||||||
|
List<RowMap> processLevel = DBSql.getMaps(String.format("select PROPERTYID,PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PROPERTYID in ('Process_Architecture_L1','Process_Architecture_L2','Process_Architecture_L3','Process_Architecture_L4') AND PLID='%s' ORDER BY PROPERTYID", publishFileId));
|
||||||
|
elements.forEach((k, v) -> {
|
||||||
|
setShapeAttr(bos, publishFileId, (JSONObject) v, fileName, processLevel);
|
||||||
|
});
|
||||||
|
if (bos.size() == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ProcessInstance processInst = SDK.getProcessAPI().createBOProcessInstance("obj_f188537a313e4c6a9bb44eb65f2a0ecd", userContext.getUID(), "流程清单");
|
||||||
|
BO oldBo = (BO) ((BOQueryAPI) SDK.getBOAPI().query("BO_ACT_PAL_PROCESS_MANIFEST").addQuery("MODELID = ", publishFileId)).detail();
|
||||||
|
if (oldBo != null) {
|
||||||
|
SDK.getBOAPI().removeByBindId("BO_ACT_PAL_PROCESS_MANIFEST", oldBo.getBindId());
|
||||||
|
SDK.getBOAPI().create("BO_ACT_PAL_PROCESS_MANIFEST", bos, processInst, userContext);
|
||||||
|
} else {
|
||||||
|
SDK.getBOAPI().create("BO_ACT_PAL_PROCESS_MANIFEST", bos, processInst, userContext);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String definition = defineModel.getDefinition();
|
|
||||||
JSONObject definitionJo = JSONObject.parseObject(definition);
|
|
||||||
JSONObject elements = (JSONObject) definitionJo.get("elements");
|
|
||||||
ArrayList<BO> bos = new ArrayList<>();
|
|
||||||
ResponseObject ro = ResponseObject.newOkResponse();
|
|
||||||
//流程架构等级
|
|
||||||
List<RowMap> processLevel = DBSql.getMaps(String.format("select PROPERTYID,PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PROPERTYID in ('Process_Architecture_L1','Process_Architecture_L2','Process_Architecture_L3','Process_Architecture_L4') AND PLID='%s' ORDER BY PROPERTYID", publishFileId));
|
|
||||||
elements.forEach((k, v) -> {
|
|
||||||
setShapeAttr(bos, publishFileId, (JSONObject) v, fileName, processLevel);
|
|
||||||
});
|
|
||||||
if (bos.size() == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ProcessInstance processInst = SDK.getProcessAPI().createBOProcessInstance("obj_f188537a313e4c6a9bb44eb65f2a0ecd", userContext.getUID(), "流程清单");
|
|
||||||
BO oldBo = (BO) ((BOQueryAPI) SDK.getBOAPI().query("BO_ACT_PAL_PROCESS_MANIFEST").addQuery("MODELID = ", publishFileId)).detail();
|
|
||||||
if (oldBo != null) {
|
|
||||||
SDK.getBOAPI().removeByBindId("BO_ACT_PAL_PROCESS_MANIFEST", oldBo.getBindId());
|
|
||||||
SDK.getBOAPI().create("BO_ACT_PAL_PROCESS_MANIFEST", bos, processInst, userContext);
|
|
||||||
} else {
|
|
||||||
SDK.getBOAPI().create("BO_ACT_PAL_PROCESS_MANIFEST", bos, processInst, userContext);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4036,7 +4036,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
JSONArray steps = new JSONArray();
|
JSONArray steps = new JSONArray();
|
||||||
//轮播图的页面地址
|
//轮播图的页面地址
|
||||||
String url = "./w?sid=" + _uc.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_guide_carousel";
|
String url = "./w?sid=" + _uc.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_guide_carousel";
|
||||||
String sql = "SELECT STEP,MODELTYPE,TITLE,POSITION,GUIDETARGET FROM BO_ACT_PAL_MODELING_GUIDANCE WHERE MODELTYPE=? ORDER BY STEP";
|
String sql = "SELECT STEP,MODELTYPE,TITLE,POSITION,GUIDETARGET FROM BO_ACT_PAL_MODELING_GUIDANCE WHERE ISHIDDEN = '1' AND MODELTYPE=? ORDER BY STEP";
|
||||||
List<RowMap> guideMaps = DBSql.getMaps(sql, methodId);
|
List<RowMap> guideMaps = DBSql.getMaps(sql, methodId);
|
||||||
for (int i = 0; i < guideMaps.size(); i++) {
|
for (int i = 0; i < guideMaps.size(); i++) {
|
||||||
StringBuilder urlSb = new StringBuilder();
|
StringBuilder urlSb = new StringBuilder();
|
||||||
|
|||||||
@ -165,22 +165,22 @@ public class CreateProcessController {
|
|||||||
String plName1 = map1.getString("PLNAME");
|
String plName1 = map1.getString("PLNAME");
|
||||||
String name3 = plName1.substring(plName1.lastIndexOf(".") + 2).trim();
|
String name3 = plName1.substring(plName1.lastIndexOf(".") + 2).trim();
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name3);
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name3);
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '5' WHERE ID = '"+uuid1+"'");
|
//DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '5' WHERE ID = '"+uuid1+"'");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", name1);
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name2);
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name2);
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name1);
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name4);
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '4' WHERE ID = '"+uuid2+"'");
|
//DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '4' WHERE ID = '"+uuid2+"'");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L4", "/");
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", name1);
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name1);
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name4);
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '3' WHERE ID = '"+uuid3+"'");
|
//DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '3' WHERE ID = '"+uuid3+"'");
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
@ -188,7 +188,7 @@ public class CreateProcessController {
|
|||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L2", "/");
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L3", "/");
|
||||||
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name1);
|
propertyDao.updatePropertyByPropertyId(uuid, "Process_Architecture_L1", name1);
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '2' WHERE ID = '"+uuid+"'");
|
//DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLLEVEL = '1' WHERE ID = '"+uuid+"'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user