流程发布推送文件调整
This commit is contained in:
parent
459f9177c0
commit
2c0e28288d
@ -428,11 +428,15 @@ public class Report1Gener {
|
||||
indexOf2 = fileNamel.indexOf(":");
|
||||
}
|
||||
String numberStr = fileNamel.substring(2,indexOf2);
|
||||
if(isNumeric(numberStr)) {
|
||||
if(isNumeric(numberStr)&&!"".equals(numberStr)) {
|
||||
isNumberAscArray.add("true");
|
||||
int fileNumber = Integer.parseInt(numberStr);
|
||||
object.put("file_number", fileNumber);
|
||||
}else {
|
||||
isNumberAscArray.add("false");
|
||||
}
|
||||
}else {
|
||||
isNumberAscArray.add("false");
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@ -83,18 +81,10 @@ public class ApplyTaskAfterCreated extends ExecuteListener implements ExecuteLis
|
||||
}
|
||||
String substring = sb.substring(0, sb.length()-1);
|
||||
// 可以为boData中的字段进行赋值
|
||||
Connection open = DBSql.open();
|
||||
RowMap data = DBSql.getMap(open,"select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGDEPART in ("+substring+")");
|
||||
RowMap data = DBSql.getMap("select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGDEPART in ("+substring+")");
|
||||
if(null==data) {
|
||||
throw new AWSException("请联系管理员,配置流程经理和流程校对人!");
|
||||
}
|
||||
|
||||
try {
|
||||
open.close();
|
||||
} catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
// RowMap data = DBSql.getMap(String.format("select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGNAME like'%s' and ORGDEPART like'%s'", allpath, allpath));
|
||||
if(data != null&&null!=boData){
|
||||
boData.set("DEPARTMENT_PROOFREADER", data.getString("DEAPRTMNUM"));
|
||||
|
||||
@ -57,15 +57,12 @@ public class PublishLoadBefore extends ExecuteListener {
|
||||
}
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
// 可以为boData中的字段进行赋值
|
||||
Connection open = DBSql.open();
|
||||
RowMap data = DBSql.getMap(open,
|
||||
"select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGDEPART in (" + substring
|
||||
RowMap data = DBSql.getMap("select DEAPRTMNUM,PROCESSMNUMBER from BO_ACT_PROCESSMANAGER where ORGDEPART in (" + substring
|
||||
+ ")");
|
||||
if (null == data) {
|
||||
throw new AWSException("请联系管理员,配置流程经理和流程校对人!");
|
||||
}
|
||||
|
||||
open.close();
|
||||
// RowMap data = DBSql.getMap(String.format("select DEAPRTMNUM,PROCESSMNUMBER
|
||||
// from BO_ACT_PROCESSMANAGER where ORGNAME like'%s' and ORGDEPART like'%s'",
|
||||
// allpath, allpath));
|
||||
|
||||
@ -124,7 +124,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
||||
updateRoleAndPerformance(boN.get("PUBLISHFILEID").toString(),model.getPublishDate(),"N");
|
||||
|
||||
//绩效模型中数据模型回填流程编号
|
||||
updateProcessNumber(boN.get("PUBLISHFILEID").toString(),param.getUserContext(),bo.get("WSID").toString(),boN.getString("PUBLISH_NUMBER"),model.getPublishDate());
|
||||
//updateProcessNumber(boN.get("PUBLISHFILEID").toString(),param.getUserContext(),bo.get("WSID").toString(),boN.getString("PUBLISH_NUMBER"),model.getPublishDate());
|
||||
|
||||
|
||||
}
|
||||
@ -178,7 +178,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
||||
// 生效日期信息处理&并创建手册
|
||||
updateEffectiveDateProperty(processInstId, bo, nowTime, bolistN, bolistC);
|
||||
// 流程发布范围权限单独存储
|
||||
//savePublishScope(bo, bolistN, bolistC, bolistS);
|
||||
savePublishScope(bo, bolistN, bolistC, bolistS);
|
||||
}
|
||||
|
||||
private void updateEffectiveDateProperty(String processInstId, BO bo, Timestamp publishDate, List<BO> bolistN, List<BO> bolistC) {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.publisher.pubEvent;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@ -95,7 +94,6 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
|
||||
public void ProcessData(ProcessExecutionContext processExecutionContext) throws Exception {
|
||||
System.err.println(processExecutionContext.getTaskInstance().getTitle() + "_推送文件开始========>");
|
||||
Connection open = DBSql.open();
|
||||
// http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219
|
||||
/**
|
||||
* 当流程不等于终止的时候往下走
|
||||
@ -338,7 +336,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
/**
|
||||
* 推送到EHSQ
|
||||
*/
|
||||
boolean sendEhqs = false;
|
||||
boolean sendEhqs = true;
|
||||
String depId = processExecutionContext.getUserContext().getDepartmentModel().getId();
|
||||
//获取EHSQ配置表判断是否发送
|
||||
String sql = "SELECT * FROM BO_ACT_ACT_ESQ_SEND";
|
||||
@ -392,7 +390,6 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
open.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -815,7 +812,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String SendEHSQFile(JSONArray jsonArray) throws Exception {
|
||||
public String SendEHSQFile(String plName,JSONArray jsonArray) throws Exception {
|
||||
/**
|
||||
* 首先需要将传过来的参数进行加密操作,并设置
|
||||
*/
|
||||
@ -835,9 +832,9 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
jsonObject.put("token", encrypt);
|
||||
jsonObject.put("infos", jsonArray);
|
||||
HttpUtil httpUtil = new HttpUtil();
|
||||
System.out.println("发送EHSQ参数>>>>>" + jsonObject);
|
||||
//System.out.println(plName+"发送EHSQ参数>>>>>" + jsonObject);
|
||||
String s = httpUtil.sendPost(jsonObject, EHSQUrl);
|
||||
System.out.println("发送EHSQ结果>>>>>" + s);
|
||||
//System.out.println(plName+"发送EHSQ结果>>>>>" + s);
|
||||
|
||||
return s;
|
||||
}
|
||||
@ -1472,15 +1469,24 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
UserContext.fromUID(processExecutionContext.getProcessInstance().getCreateUser()),
|
||||
bo.getString("TASKID"), publishfileid);
|
||||
jsonObject_ehsq.put("fileid", bo.getString("TASKID"));
|
||||
String plName = bo.getString("PUBLISHFILENAME");
|
||||
jsonObject_ehsq.put("filename", bo.getString("PUBLISHFILENAME"));
|
||||
String plNumer = bo.getString("PUBLISH_NUMBER");
|
||||
jsonObject_ehsq.put("filecode",bo.getString("PUBLISH_NUMBER"));
|
||||
//jsonObject_ehsq.put("filecode", "123456");
|
||||
String sql_n = "select * from APP_ACT_COE_PAL_REPOSITORY where id = '" + publishfileid + "'";
|
||||
RowMap map = DBSql.getMap(sql_n);
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(publishfileid);
|
||||
jsonObject_ehsq.put("version", "V"+palRepositoryModel.getVersion()+"");
|
||||
jsonObject_ehsq.put("releasedate", simpleDateFormat.format(new Date()));
|
||||
jsonObject_ehsq.put("effectivedate", simpleDateFormat.format(new Date()));
|
||||
BO byProcess = SDK.getBOAPI().getByProcess("BO_ACT_COE_PUBLISH", processExecutionContext.getProcessInstance().getId());
|
||||
String cdeDate = byProcess.getString("CHOICEEFFECTIVEDATE");
|
||||
if("1".equals(cdeDate)) {
|
||||
jsonObject_ehsq.put("releasedate", byProcess.getString("EFFECTIVEDATE"));
|
||||
jsonObject_ehsq.put("effectivedate", byProcess.getString("EFFECTIVEDATE"));
|
||||
}else {
|
||||
jsonObject_ehsq.put("releasedate", simpleDateFormat.format(new Date()));
|
||||
jsonObject_ehsq.put("effectivedate", simpleDateFormat.format(new Date()));
|
||||
}
|
||||
jsonObject_ehsq.put("authorcode", processExecutionContext.getTaskInstance().getTarget()); // jsonObject_ehsq.put("authorcode","00116465");
|
||||
jsonObject_ehsq.put("authorname",
|
||||
UserContext.fromUID(processExecutionContext.getTaskInstance().getTarget()).getUserName());
|
||||
@ -1491,11 +1497,11 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
jsonObject_ehsq.put("authorcompany", UserContext
|
||||
.fromUID(processExecutionContext.getTaskInstance().getTarget()).getDepartmentModel().getName()); // jsonObject_ehsq.put("authorcompany","总部质量管理部");
|
||||
// //
|
||||
jsonObject_ehsq.put("releasescope", "总部质量管理部");
|
||||
BO bo1 = SDK.getBOAPI().query("BO_ACT_PUBLISH_PERM_SCOPE", true)
|
||||
.addQuery("PALNAME=", bo.getString("PUBLISHFILENAME")).detail();
|
||||
if (bo1 != null) {
|
||||
if (bo1.getString("PERMTYPE").equals("1")) {
|
||||
jsonObject_ehsq.put("releasescope", "内蒙古伊利实业集团股份有限公司");
|
||||
} else {
|
||||
|
||||
String departname = "";
|
||||
@ -1512,7 +1518,11 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
for (RowMap rowmas : maps) {
|
||||
departname += rowmas.getString("DEPARTMENTNAME") + ";";
|
||||
}
|
||||
jsonObject_ehsq.put("releasescope", "总部质量管理部");
|
||||
if(UtilString.isNotEmpty(departname)&&departname.length()>500) {
|
||||
String substring = departname.substring(0, 500);
|
||||
departname = substring.substring(0,substring.lastIndexOf(";"));
|
||||
}
|
||||
jsonObject_ehsq.put("releasescope", departname);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1558,15 +1568,55 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
jsonObject_ehsq.put("recordfiles", new_name);
|
||||
jsonObject_ehsq.put("recordurls", new_url);
|
||||
jsonArray_EHSQ.add(jsonObject_ehsq);
|
||||
|
||||
Date date = new Date();
|
||||
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserContext uc = processExecutionContext.getUserContext();
|
||||
String userName = uc.getUserName();
|
||||
try {
|
||||
SendEHSQFile(jsonArray_EHSQ);
|
||||
String sql = "SELECT ID FROM BO_EU_PAL_SEND_EHSQ_JOB WHERE PLID = '"+publishfileid+"' AND USERNAMES = '"+userName+"'";
|
||||
String id = DBSql.getString(sql);
|
||||
String sendEHSQFile = SendEHSQFile(plName,jsonArray_EHSQ);
|
||||
System.err.println("EHSQ流程发布推送结果====>"+processExecutionContext.getProcessInstance().getTitle()+"=========>"+sendEHSQFile);
|
||||
if(UtilString.isNotEmpty(id)) {
|
||||
BO bos = SDK.getBOAPI().get("BO_EU_PAL_SEND_EHSQ_JOB", id);
|
||||
updateSendLog(bos,userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布推送", sendEHSQFile);
|
||||
}else {
|
||||
createSendLog(userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布推送", sendEHSQFile);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
String sql = "SELECT ID FROM BO_EU_PAL_SEND_EHSQ_JOB WHERE PLID = '"+publishfileid+"' AND USERNAMES = '"+userName+"'";
|
||||
String id = DBSql.getString(sql);
|
||||
if(UtilString.isNotEmpty(id)) {
|
||||
BO bos = SDK.getBOAPI().get("BO_EU_PAL_SEND_EHSQ_JOB", id);
|
||||
updateSendLog(bos,userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布推送", e.getMessage());
|
||||
}else {
|
||||
createSendLog(userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布推送", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void createSendLog(String username,String userDempet,String plId,String plName,String plNumer,String sendTime,String sendType,String sendResult) {
|
||||
BO bo = new BO();
|
||||
bo.set("PLID", plId);
|
||||
bo.set("PLNAME", plName);
|
||||
bo.set("PLNUMER", plNumer);
|
||||
bo.set("SENDTIME", sendTime);
|
||||
bo.set("SENDTYPE", sendType);
|
||||
bo.set("SENDRESULT", sendResult);
|
||||
bo.set("USERNAMES", username);
|
||||
bo.set("USERDEMPET", userDempet);
|
||||
SDK.getBOAPI().createDataBO("BO_EU_PAL_SEND_EHSQ_JOB", bo, UserContext.fromUID("admin"));
|
||||
}
|
||||
public void updateSendLog(BO bo,String username,String userDempet,String plId,String plName,String plNumer,String sendTime,String sendType,String sendResult) {
|
||||
bo.set("PLNUMER", plNumer);
|
||||
bo.set("SENDTIME", sendTime);
|
||||
bo.set("SENDTYPE", sendType);
|
||||
bo.set("SENDRESULT", sendResult);
|
||||
SDK.getBOAPI().update("BO_EU_PAL_SEND_EHSQ_JOB", bo);
|
||||
}
|
||||
public void updateEHSQ(ProcessExecutionContext processExecutionContext, List<BO> bo_act_coe_publish_c) {
|
||||
DownloadUtil downloadUtil = new DownloadUtil();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@ -1580,15 +1630,24 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
UserContext.fromUID(processExecutionContext.getTaskInstance().getTarget()), bo.getString("TASKID"),
|
||||
publishfileid);
|
||||
jsonObject_ehsq.put("fileid", bo.getString("TASKID"));
|
||||
jsonObject_ehsq.put("filename", bo.getString("CHANGEDFILENAMENEW"));
|
||||
jsonObject_ehsq.put("filecode",bo.getString("CHANGE_NUMBER"));
|
||||
String plName = bo.getString("CHANGEDFILENAMENEW");
|
||||
String plNumer = bo.getString("CHANGE_NUMBER");
|
||||
jsonObject_ehsq.put("filename", plName);
|
||||
jsonObject_ehsq.put("filecode",plNumer);
|
||||
//jsonObject_ehsq.put("filecode", "123456");
|
||||
String sql_n = "select * from APP_ACT_COE_PAL_REPOSITORY where id = '" + publishfileid + "'";
|
||||
RowMap map = DBSql.getMap(sql_n);
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(publishfileid);
|
||||
jsonObject_ehsq.put("version", "V"+palRepositoryModel.getVersion()+"");
|
||||
jsonObject_ehsq.put("releasedate", simpleDateFormat.format(new Date()));
|
||||
jsonObject_ehsq.put("effectivedate", simpleDateFormat.format(new Date()));
|
||||
BO byProcess = SDK.getBOAPI().getByProcess("BO_ACT_COE_PUBLISH", processExecutionContext.getProcessInstance().getId());
|
||||
String cdeDate = byProcess.getString("CHOICEEFFECTIVEDATE");
|
||||
if("1".equals(cdeDate)) {
|
||||
jsonObject_ehsq.put("releasedate", byProcess.getString("EFFECTIVEDATE"));
|
||||
jsonObject_ehsq.put("effectivedate", byProcess.getString("EFFECTIVEDATE"));
|
||||
}else {
|
||||
jsonObject_ehsq.put("releasedate", simpleDateFormat.format(new Date()));
|
||||
jsonObject_ehsq.put("effectivedate", simpleDateFormat.format(new Date()));
|
||||
}
|
||||
jsonObject_ehsq.put("authorcode", processExecutionContext.getTaskInstance().getTarget());
|
||||
jsonObject_ehsq.put("authorname",
|
||||
UserContext.fromUID(processExecutionContext.getTaskInstance().getTarget()).getUserName());
|
||||
@ -1602,7 +1661,6 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
if (bo1.getString("PERMTYPE").equals("1")) {
|
||||
jsonObject_ehsq.put("releasescope", "内蒙古伊利实业集团股份有限公司");
|
||||
} else {
|
||||
|
||||
String departname = "";
|
||||
String orgperm = bo1.getString("ORGPERM");
|
||||
String dleass = "";
|
||||
@ -1617,6 +1675,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
for (RowMap rowmas : maps) {
|
||||
departname += rowmas.getString("DEPARTMENTNAME") + ";";
|
||||
}
|
||||
if(UtilString.isNotEmpty(departname)&&departname.length()>500) {
|
||||
String substring = departname.substring(0, 500);
|
||||
departname = substring.substring(0,substring.lastIndexOf(";"));
|
||||
}
|
||||
jsonObject_ehsq.put("releasescope", departname);
|
||||
|
||||
}
|
||||
@ -1661,11 +1723,30 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
||||
jsonObject_ehsq.put("recordfiles", new_name);
|
||||
jsonObject_ehsq.put("recordurls", new_url);
|
||||
jsonArray_EHSQ.add(jsonObject_ehsq);
|
||||
Date date = new Date();
|
||||
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserContext uc = processExecutionContext.getUserContext();
|
||||
String userName = uc.getUserName();
|
||||
try {
|
||||
SendEHSQFile(jsonArray_EHSQ);
|
||||
String sql = "SELECT ID FROM BO_EU_PAL_SEND_EHSQ_JOB WHERE PLID = '"+publishfileid+"' AND USERNAMES = '"+userName+"'";
|
||||
String id = DBSql.getString(sql);
|
||||
String sendEHSQFile = SendEHSQFile(plName,jsonArray_EHSQ);
|
||||
System.err.println("EHSQ流程发布更新===>"+processExecutionContext.getProcessInstance().getTitle()+"==========>"+sendEHSQFile);
|
||||
if(UtilString.isNotEmpty(id)) {
|
||||
BO bos = SDK.getBOAPI().get("BO_EU_PAL_SEND_EHSQ_JOB", id);
|
||||
updateSendLog(bos,userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布更新", sendEHSQFile);
|
||||
}else {
|
||||
createSendLog(userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布更新", sendEHSQFile);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
String sql = "SELECT ID FROM BO_EU_PAL_SEND_EHSQ_JOB WHERE PLID = '"+publishfileid+"' AND USERNAMES = '"+userName+"'";
|
||||
String id = DBSql.getString(sql);
|
||||
if(UtilString.isNotEmpty(id)) {
|
||||
BO bos = SDK.getBOAPI().get("BO_EU_PAL_SEND_EHSQ_JOB", id);
|
||||
updateSendLog(bos,userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布更新", e.getMessage());
|
||||
}else {
|
||||
createSendLog(userName, uc.getDepartmentModel().getName(), publishfileid, plName, plNumer, dateFormat.format(date), "流程发布更新", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,15 @@
|
||||
package com.actionsoft.apps.coe.pal.pal.repository.job;
|
||||
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
||||
@ -8,29 +17,19 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.DiagramsUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.ShapeUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
|
||||
import com.actionsoft.bpms.cc.Adapter;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.schedule.IJob;
|
||||
import com.actionsoft.bpms.server.Quota;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import jodd.util.StringUtil;
|
||||
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* 同步部门、岗位数据
|
||||
|
||||
@ -285,7 +285,6 @@ public class SynchronousPortJob implements IJob {
|
||||
JSONArray shapes = new JSONArray();
|
||||
if (orgdepartmentList.size() > 0) {
|
||||
|
||||
|
||||
for (int i = 0; i < orgdepartmentList.size(); i++) {
|
||||
|
||||
boolean flag=true;
|
||||
@ -370,6 +369,8 @@ public class SynchronousPortJob implements IJob {
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,18 +1,26 @@
|
||||
package com.actionsoft.apps.coe.pal.pal.repository.job;
|
||||
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeRepositoryImportUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.DiagramsUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.ShapeUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.schedule.IJob;
|
||||
import com.actionsoft.bpms.server.Quota;
|
||||
@ -22,13 +30,8 @@ import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jodd.util.StringUtil;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
import jodd.util.StringUtil;
|
||||
|
||||
|
||||
/**
|
||||
@ -252,14 +255,10 @@ public class SynchronousUpdatePortJob implements IJob {
|
||||
* @return
|
||||
*/
|
||||
public void createPostData(String uuid, String departmentId, PALRepositoryModelImpl model, Connection conn) {
|
||||
|
||||
Map<String, String> idRelationMap = new HashMap<>();
|
||||
|
||||
|
||||
List<RowMap> orgdepartmentList = DBSql.getMaps(conn, "select DESCR,DEPTNAME from BO_EU_ORG_POSTS WHERE DEPTID=? AND DESCR IS NOT NULL AND STATUS='A' ", departmentId);
|
||||
|
||||
|
||||
JSONArray shapes = new JSONArray();
|
||||
//判断岗位接口表里如果该部门下有岗位数据
|
||||
if (orgdepartmentList.size() > 0) {
|
||||
//拿到基础结构
|
||||
JSONObject shape = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position");
|
||||
@ -350,6 +349,11 @@ public class SynchronousUpdatePortJob implements IJob {
|
||||
|
||||
|
||||
|
||||
}else {
|
||||
//删除岗位接口表里没有数据的岗位模型
|
||||
CoeProcessLevelWeb c = new CoeProcessLevelWeb(_uc);
|
||||
c.removeTreeNode(uuid,model.getWsId());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -118,6 +118,7 @@ public class updatePostJob implements IJob {
|
||||
defineModel.setDefinition(definition.toString());
|
||||
// 保存文件
|
||||
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -506,11 +506,15 @@ public class Report1Gener {
|
||||
indexOf2 = fileNamel.indexOf(":");
|
||||
}
|
||||
String numberStr = fileNamel.substring(2,indexOf2);
|
||||
if(isNumeric(numberStr)) {
|
||||
if(isNumeric(numberStr)&&!"".equals(numberStr)) {
|
||||
isNumberAscArray.add("true");
|
||||
int fileNumber = Integer.parseInt(numberStr);
|
||||
object.put("file_number", fileNumber);
|
||||
}else {
|
||||
isNumberAscArray.add("false");
|
||||
}
|
||||
}else {
|
||||
isNumberAscArray.add("false");
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user