发布流程结束更新作废人、作废时间字段
This commit is contained in:
parent
c59ad7cf96
commit
ce6505c24d
Binary file not shown.
@ -14,6 +14,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||
import com.actionsoft.apps.coe.pal.system.util.StringUtil;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.exception.AWSDataAccessException;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.dom4j.Document;
|
||||
@ -336,7 +337,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
bo.set("PUBLISH_DATE",sdf.format(endTime));
|
||||
SDK.getBOAPI().createDataBO("BO_EU__OA_MONITOR",bo,UserContext.fromUID(ta.getTarget()));
|
||||
}
|
||||
System.out.println("new_uid>>>>>>>>>>>>>>"+users.length);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
@ -504,12 +504,12 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
for (BO bo : bo_act_coe_publish_n) {
|
||||
try {
|
||||
String fileId = bo.getString("PUBLISHFILEID");
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+fileId+"'");
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+fileId+"'");
|
||||
|
||||
|
||||
/**
|
||||
* 更新部门视图EXT6字段
|
||||
*/
|
||||
* 更新部门视图EXT6字段
|
||||
*/
|
||||
List<RowMap> rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+fileId+"' and ATTRID='Issuing_department'");
|
||||
if(rlatRowMap.size()>0){
|
||||
// 发布部门
|
||||
@ -636,15 +636,29 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+fileId+"'");
|
||||
|
||||
|
||||
//更新作废人
|
||||
PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao();
|
||||
propertyDao.updatePropertyByPropertyId(fileId, "nullifier", processExecutionContext.getUserContext().getUID());
|
||||
|
||||
String sql = "insert into APP_ACT_COE_PAL_SHAPE_RLAT (ID,FILEID,ATTRID,RELATIONFILEID,RELATIONSHAPEID,RELATIONSHAPETEXT) values ('%s', '%s', '%s','%s','%s','%s')";
|
||||
|
||||
JSONObject js=new JSONObject();
|
||||
js.put("name", processExecutionContext.getUserContext().getUserName());
|
||||
js.put("id", processExecutionContext.getUserContext().getUID());
|
||||
js.put("type", "user");
|
||||
String id = UUIDGener.getUUID();
|
||||
int update = DBSql.update(String.format(sql, id, fileId, "nullifier","00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000000",js));
|
||||
|
||||
//作废时间
|
||||
Date date=new Date();
|
||||
SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd");
|
||||
propertyDao.updatePropertyByPropertyId(fileId, "obsolescence_time", sdfs.format(date));
|
||||
|
||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||
if (plModel != null) {
|
||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@ -666,7 +680,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
if(departmentById!=null) {
|
||||
String departemenId = departmentById.getId();
|
||||
String pathIdOfCache=departmentById.getPathIdOfCache();
|
||||
System.out.println("depId========"+depId);
|
||||
if(departemenId.equals(depId)&&"是".equals(issend)) {
|
||||
sendEhqs = true;
|
||||
} else {
|
||||
@ -689,7 +702,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
try {
|
||||
// 推送EHSQ
|
||||
if(bo_act_coe_publish_n.size()>0) {
|
||||
System.out.println("发送EHSQ====================");
|
||||
sendEHSQ(processExecutionContext, bo_act_coe_publish_n);
|
||||
}
|
||||
// 更新EHSQ
|
||||
@ -742,7 +754,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
//入库操作,创建内容索引(多个)
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
|
||||
System.out.println("ro==================="+ro);
|
||||
return ro.isOk();
|
||||
}
|
||||
|
||||
@ -766,7 +777,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
@Override
|
||||
|
||||
public void run() {
|
||||
System.out.println("最后一个数组是什么>>>>>>>"+Arrays.asList(resrt).size());
|
||||
String userIds = "";
|
||||
userIds = StringUtils.join(resrt, ",");
|
||||
System.out.println("userIDs>>>>>>>>>>>>>>>"+userIds);
|
||||
@ -859,6 +869,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
if (StringUtils.isNotEmpty(cardId)) {
|
||||
String sql_ext4 = "select * from APP_ACT_COE_PAL_REPOSITORY where EXT4 = '" + cardId + "'";
|
||||
RowMap map = DBSql.getMap(sql_ext4);
|
||||
System.out.println("maps======>>>>>>>" + map);
|
||||
System.out.println("fileid==》》》》" + fileid);
|
||||
System.out.println("id==》》》》" + map.getString("ID"));
|
||||
RowMap rowMap = DBSql
|
||||
.getMap("SELECT * FROM " + bo_name + " where " + fileid + " '" + map.getString("ID") + "'");
|
||||
// BO bos =
|
||||
@ -889,7 +902,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
+ rowMap.getString("CHANGEDFILEIDNEW") + "'";
|
||||
}
|
||||
String lever = DBSql.getString(sql_lever);
|
||||
System.out.println("版本号::::::::::::" + lever);
|
||||
// lever = lever.substring(0,3);
|
||||
if (lever.length() == 5 && lever.substring(4).equals("0")) {
|
||||
lever.substring(0, 3);
|
||||
@ -916,7 +928,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
AppAPI appAPI = SDK.getAppAPI();
|
||||
//创建文件
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
System.out.println("流程手册的存入=================" + ro);
|
||||
|
||||
JSONArray coontest = new JSONArray(new LinkedList<>());
|
||||
JSONObject jsonObject = new JSONObject(new LinkedHashMap<>());
|
||||
@ -1065,7 +1076,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
AppAPI appAPI = SDK.getAppAPI();
|
||||
// 取消发布知识(全部维度)
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
System.out.println("取消发布的ro=====>>>>" + ro);
|
||||
return ro.isOk();
|
||||
}
|
||||
|
||||
@ -1117,7 +1127,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
AppAPI appAPI = SDK.getAppAPI();
|
||||
// 推送待阅文件到xpage门户
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
System.out.println("ros++++++++=====待阅》》》》》》》》》》" + ro);
|
||||
return ro.isOk();
|
||||
}
|
||||
|
||||
@ -1174,7 +1183,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
AppAPI appAPI = SDK.getAppAPI();
|
||||
// 增量同步数据
|
||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||
System.out.println("同步数据看板底表结果>>>>>>>>>>>>>" + ro);
|
||||
return ro.isOk();
|
||||
}
|
||||
|
||||
@ -1258,16 +1266,11 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
Element result = rootElement.element("Body").element("serviceResponse").element("out");
|
||||
String resultString = result.getData().toString();
|
||||
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
||||
System.out.println("jsonObject1==============="+jsonObject1);
|
||||
String datas = jsonObject1.getString("data");
|
||||
long have_time = System.currentTimeMillis();
|
||||
System.out.println("接收到返回的待阅ID时间>>>>>>>>>>>>>>>>"+have_time);
|
||||
bo_OA_read.set("HAVE_TIME",have_time);
|
||||
System.out.println("接收到返回的待阅耗时时间>>>>>>>>>>>>"+(have_time-start_time));
|
||||
bo_OA_read.set("SUM_TIME",(have_time-start_time));
|
||||
System.out.println("data================="+datas);
|
||||
String status = jsonObject1.getString("status");
|
||||
System.out.println("推送》》》》》》》》》》》" + status);
|
||||
|
||||
|
||||
if ("true".equals(status)) {
|
||||
@ -1367,7 +1370,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
recordFailLists.add(bo);
|
||||
}
|
||||
}
|
||||
System.out.println("recordFailLists========="+recordFailLists.size());
|
||||
SDK.getBOAPI().create("BO_EU_READ_COUNT", recordFailLists, processInstance, UserContext.fromUID(processInstance.getCreateUser()));
|
||||
}
|
||||
|
||||
@ -1394,7 +1396,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
throws DocumentException {
|
||||
|
||||
|
||||
System.out.println("idList========="+idList.toString());
|
||||
String processInstId = processInstance.getId();
|
||||
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
||||
|
||||
@ -1466,11 +1467,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
Element result = rootElement.element("Body").element("serviceResponse").element("out");
|
||||
String resultString = result.getData().toString();
|
||||
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
||||
System.out.println("jsonObject1==============="+jsonObject1);
|
||||
String datas = jsonObject1.getString("data");
|
||||
System.out.println("data================="+datas);
|
||||
String status = jsonObject1.getString("status");
|
||||
System.out.println("推送》》》》》》》》》》》" + status);
|
||||
|
||||
|
||||
if ("true".equals(status)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user