Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
28433c4c59
Binary file not shown.
@ -2559,7 +2559,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
String name = parseObject.getString("name");
|
String name = parseObject.getString("name");
|
||||||
if (!"流程制度".equals(name)) {
|
if (!"流程制度".equals(name)) {
|
||||||
String versionId = parseObject.getString("versionId");
|
String versionId = parseObject.getString("versionId");
|
||||||
String sql = "SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLVERSIONID = '" + versionId + "' and ISPUBLISH = '0' and ISSTOP = '0' ";
|
String sql = "SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLVERSIONID = '" + versionId + "' and ISPUBLISH = '0' and ISSTOP = '0' order by plver ";
|
||||||
String newName = DBSql.getString(sql);
|
String newName = DBSql.getString(sql);
|
||||||
parseObject.replace("name", newName);
|
parseObject.replace("name", newName);
|
||||||
parseObject.replace("isParent", "false");
|
parseObject.replace("isParent", "false");
|
||||||
|
|||||||
@ -114,6 +114,18 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//发送消息通知
|
||||||
|
List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",ext.getProcessInstance().getId()).addQuery("RESULT=","待处理").list();
|
||||||
|
if(readCountBO.size()>0){
|
||||||
|
SDK.getNotificationAPI().sendMessage("admin", "admin", "文件名称:"+ext.getProcessInstance().getTitle()+"文件有失败记录,请及时处理!!!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//更新任务状态
|
||||||
|
int r1 = DBSql.update("UPDATE BO_ACT_EXECUTIVE_TASK SET ISTASKEND='2' WHERE TASKID ='" + ext.getProcessInstance().getId() + "'");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessData(ProcessExecutionContext processExecutionContext,Connection open) throws Exception {
|
public void ProcessData(ProcessExecutionContext processExecutionContext,Connection open) throws Exception {
|
||||||
@ -551,30 +563,29 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
/**
|
/**
|
||||||
* 创建索引
|
* 创建索引
|
||||||
* @param processExecutionContext 流程实例
|
* @param processExecutionContext 流程实例
|
||||||
* @param index 索引名称 (随便填写,aslp那边已经有固定的)
|
* @param contents 索引内容
|
||||||
* @param type 类型(随便填写,aslp中也是有固定的)
|
* @return
|
||||||
* @param documentPath dc全路径
|
|
||||||
* @param fileNames 文件名称
|
|
||||||
*/
|
*/
|
||||||
public void createIndexByFile(ProcessExecutionContext processExecutionContext,String index,String type,String documentPath,JSONObject fileNames) {
|
|
||||||
|
public boolean createIndexesByContent(ProcessExecutionContext processExecutionContext,JSONArray contents) {
|
||||||
// 调用App
|
// 调用App
|
||||||
String sourceAppId = processExecutionContext.getProcessInstance().getAppId();
|
String sourceAppId =processExecutionContext.getProcessInstance().getAppId() ;
|
||||||
// aslp服务地址
|
// aslp服务地址
|
||||||
String aslp = "aslp://com.actionsoft.apps.addons.es/createIndexByFile";
|
String aslp = "aslp://com.actionsoft.apps.addons.es/createIndexesByContent";
|
||||||
// 参数定义列表
|
// 参数定义列表
|
||||||
Map params = new HashMap<String, Object>();
|
Map params = new HashMap<String, Object>();
|
||||||
|
//索引内容(JSONArray格式, JSONArray中包含JSONObject, JSONObject的内容同创建单个索引),必填
|
||||||
|
params.put("contents", contents);
|
||||||
//索引名称(文档在哪存放),必填
|
//索引名称(文档在哪存放),必填
|
||||||
params.put("index", index);
|
params.put("index", "com.actionsoft.apps.kms_kmsdoc_card");
|
||||||
//类型(索引中对数据进行逻辑分区。不同 type的文档可能有不同的字段,但最好能够非常相似,比如:存储所有产品到索引products中,但是你有许多不同的产品类别,这些产品共享一种相同的(或非常相似)的模式:他们有一个标题、描述、产品代码和价格。他们只是正好属于“产品”下的一些子类。用type表示不同的类别),必填
|
//类型(索引中对数据进行逻辑分区。不同 type的文档可能有不同的字段,但最好能够非常相似,比如:存储所有产品到索引products中,但是你有许多不同的产品类别,这些产品共享一种相同的(或非常相似)的模式:他们有一个标题、描述、产品代码和价格。他们只是正好属于“产品”下的一些子类。用type表示不同的类别),必填
|
||||||
params.put("type", type);
|
params.put("type", "kmsdoc_card");
|
||||||
//要入库的文件全路径,必填
|
|
||||||
params.put("documentPath", documentPath);
|
|
||||||
//文件实际名称, jsonObject,非必填
|
|
||||||
params.put("fileNames", fileNames);
|
|
||||||
AppAPI appAPI = SDK.getAppAPI();
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
//入库操作,从文件创建内容索引
|
//入库操作,创建内容索引(多个)
|
||||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
System.out.println("ro===================="+ro);
|
|
||||||
|
System.out.println("ro==================="+ro);
|
||||||
|
return ro.isOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -659,15 +670,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//发送消息通知
|
|
||||||
List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",processExecutionContext.getProcessInstance().getId()).addQuery("RESULT=","待处理").list();
|
|
||||||
if(readCountBO.size()>0){
|
|
||||||
SDK.getNotificationAPI().sendMessage("admin", "admin", "文件名称:"+processExecutionContext.getProcessInstance().getTitle()+"文件有失败记录,请及时处理!!!");
|
|
||||||
}
|
|
||||||
|
|
||||||
//更新任务状态
|
|
||||||
int r1 = DBSql.update("UPDATE BO_ACT_EXECUTIVE_TASK SET ISTASKEND='2' WHERE TASKID ='" + processExecutionContext.getProcessInstance().getId() + "'");
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("等待中断异常");
|
System.out.println("等待中断异常");
|
||||||
@ -760,7 +762,16 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
//创建文件
|
//创建文件
|
||||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
System.out.println("流程手册的存入=================" + ro);
|
System.out.println("流程手册的存入=================" + ro);
|
||||||
createIndexByFile(processExecutionContext, dcContext.getFileName(),"process",dcContext.getFilePath(),new JSONObject());
|
|
||||||
|
JSONArray coontest = new JSONArray(new LinkedList<>());
|
||||||
|
JSONObject jsonObject = new JSONObject(new LinkedHashMap<>());
|
||||||
|
jsonObject.put("documentId", cardId);
|
||||||
|
jsonObject.put("content", "");//信息附件
|
||||||
|
jsonObject.put("abstract", dcContext);//信息摘要
|
||||||
|
jsonObject.put("title", dcContext.getFileName().substring(0,dcContext.getFileName().indexOf(".")));//信息标题
|
||||||
|
coontest.add(jsonObject);
|
||||||
|
//createIndexesByContent(processExecutionContext,coontest);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,7 +810,16 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
paramss.put("dc", dcContexts);
|
paramss.put("dc", dcContexts);
|
||||||
AppAPI appAPIs = SDK.getAppAPI();
|
AppAPI appAPIs = SDK.getAppAPI();
|
||||||
ResponseObject ros = appAPIs.callASLP(appAPIs.getAppContext(sourceAppId), aslp, paramss);
|
ResponseObject ros = appAPIs.callASLP(appAPIs.getAppContext(sourceAppId), aslp, paramss);
|
||||||
//createIndexByFile(processExecutionContext, dcContexts.getFileName(),"process",dcContexts.getFilePath(),new JSONObject());
|
|
||||||
|
JSONArray coontest = new JSONArray(new LinkedList<>());
|
||||||
|
JSONObject jsonObject = new JSONObject(new LinkedHashMap<>());
|
||||||
|
jsonObject.put("documentId", cardId);
|
||||||
|
jsonObject.put("content", "");//信息附件
|
||||||
|
jsonObject.put("abstract", dcContexts);//信息摘要
|
||||||
|
jsonObject.put("title", dcContexts.getFileName().substring(0,dcContexts.getFileName().indexOf(".")));//信息标题
|
||||||
|
coontest.add(jsonObject);
|
||||||
|
//createIndexesByContent(processExecutionContext,coontest);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2097,7 +2117,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
jsonObject_ehsq.put("releasescope", "内蒙古伊利实业集团股份有限公司");
|
jsonObject_ehsq.put("releasescope", "内蒙古伊利实业集团股份有限公司");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
String departname = "";
|
/*String departname = "";
|
||||||
String orgperm = bo1.getString("ORGPERM");
|
String orgperm = bo1.getString("ORGPERM");
|
||||||
String dleass = "";
|
String dleass = "";
|
||||||
String[] deptSplit = orgperm.split(",");
|
String[] deptSplit = orgperm.split(",");
|
||||||
@ -2114,9 +2134,10 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
if(UtilString.isNotEmpty(departname)&&departname.length()>500) {
|
if(UtilString.isNotEmpty(departname)&&departname.length()>500) {
|
||||||
String substring = departname.substring(0, 500);
|
String substring = departname.substring(0, 500);
|
||||||
departname = substring.substring(0,substring.lastIndexOf(";"));
|
departname = substring.substring(0,substring.lastIndexOf(";"));
|
||||||
}
|
}*/
|
||||||
jsonObject_ehsq.put("releasescope", departname);
|
//jsonObject_ehsq.put("releasescope", departname);
|
||||||
|
|
||||||
|
jsonObject_ehsq.put("releasescope", byProcess.getString("IS_THE_UNIT"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1150,7 +1150,6 @@ public class OutputWordUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
System.out.println("生成附件路径是=================="+outFile.getPath());
|
|
||||||
doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013);
|
doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@ -221,7 +221,6 @@ public class PALRepositoryRemoveInfo extends DaoObject<PALRepositoryRemoveInfoMo
|
|||||||
sql.append(" AND r.PLNAME like " + namelike);
|
sql.append(" AND r.PLNAME like " + namelike);
|
||||||
// param.put("PLNAME", namelike);
|
// param.put("PLNAME", namelike);
|
||||||
}
|
}
|
||||||
System.out.println("sql============"+sql);
|
|
||||||
return DBSql.getInt(sql.toString(), "totalCount", param);
|
return DBSql.getInt(sql.toString(), "totalCount", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -680,7 +679,6 @@ public class PALRepositoryRemoveInfo extends DaoObject<PALRepositoryRemoveInfoMo
|
|||||||
// 发布知识
|
// 发布知识
|
||||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
|
||||||
System.out.println("知识发布============" + ro);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -875,12 +875,15 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
macroLibraries.put("treeData", jsonArr_new.toString());
|
macroLibraries.put("treeData", jsonArr_new.toString());
|
||||||
}else if(attrId.equals("role")){
|
}else if(attrId.equals("role")){
|
||||||
if (objects != null) {
|
if (objects != null) {
|
||||||
|
|
||||||
for (int i = 0; i < objects.size(); i++) {
|
for (int i = 0; i < objects.size(); i++) {
|
||||||
String id = objects.getJSONObject(i).getString("id");
|
String id = objects.getJSONObject(i).getString("id");
|
||||||
String url = objects.getJSONObject(i).getString("url");
|
String url = objects.getJSONObject(i).getString("url");
|
||||||
|
|
||||||
if (UtilString.isNotEmpty(url)) {
|
if (UtilString.isNotEmpty(url)) {
|
||||||
String titles = objects.getJSONObject(i).getString("title");
|
String titles = objects.getJSONObject(i).getString("title");
|
||||||
|
|
||||||
|
System.out.println("titles============"+titles);
|
||||||
if (titles.equals("角色模型")) {
|
if (titles.equals("角色模型")) {
|
||||||
objects.getJSONObject(i).put("nocheck", true);
|
objects.getJSONObject(i).put("nocheck", true);
|
||||||
jsonArr_new.add(objects.getJSONObject(i));
|
jsonArr_new.add(objects.getJSONObject(i));
|
||||||
@ -1225,6 +1228,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
System.out.println("jsonArray========="+jsonArray);
|
||||||
return jsonArray.toString();
|
return jsonArray.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1343,6 +1347,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
} else {
|
} else {
|
||||||
list = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsId, pid, teamId);
|
list = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsId, pid, teamId);
|
||||||
}
|
}
|
||||||
|
System.out.println("list=========="+list);
|
||||||
|
|
||||||
JSONArray result = new JSONArray();
|
JSONArray result = new JSONArray();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -1350,6 +1355,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
node.put("url", "./jd?sid=" + super.getContext().getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_info&ruuid=" + node.getString("id") + "&uuid=" + node.getString("id"));
|
node.put("url", "./jd?sid=" + super.getContext().getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_info&ruuid=" + node.getString("id") + "&uuid=" + node.getString("id"));
|
||||||
result.add(node);
|
result.add(node);
|
||||||
}
|
}
|
||||||
|
System.out.println("result========"+result);
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2795,8 +2801,6 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
map.put("treeData", treeData);
|
map.put("treeData", treeData);
|
||||||
|
|
||||||
/******************************自定义排序******************************************************/
|
/******************************自定义排序******************************************************/
|
||||||
System.out.println("depjsonArray==================="+depjsonArray);
|
|
||||||
|
|
||||||
if (depjsonArray.size() > 0 ) {
|
if (depjsonArray.size() > 0 ) {
|
||||||
boolean containsJSONObject = true;
|
boolean containsJSONObject = true;
|
||||||
for(int i=0;i<depjsonArray.size();i++){
|
for(int i=0;i<depjsonArray.size();i++){
|
||||||
@ -4229,7 +4233,6 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
String sql = "SELECT COUNT(1) FROM APP_ACT_COE_PAL_REPOSITORY WHERE CREATEUSER=? AND PLMETHODID=? ";
|
String sql = "SELECT COUNT(1) FROM APP_ACT_COE_PAL_REPOSITORY WHERE CREATEUSER=? AND PLMETHODID=? ";
|
||||||
String uid = _uc.getUID();
|
String uid = _uc.getUID();
|
||||||
int anInt = DBSql.getInt(sql, new Object[]{uid, methodId});
|
int anInt = DBSql.getInt(sql, new Object[]{uid, methodId});
|
||||||
System.out.println("是否第一次新建模型>>>>>" + anInt);
|
|
||||||
//只有一条记录的时候判断是否第一次创建对应模型
|
//只有一条记录的时候判断是否第一次创建对应模型
|
||||||
if (type.equals("0")) {
|
if (type.equals("0")) {
|
||||||
if (anInt == 1) {
|
if (anInt == 1) {
|
||||||
@ -4237,7 +4240,6 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
String getID = DBSql.getString(getCreateDateSql);
|
String getID = DBSql.getString(getCreateDateSql);
|
||||||
String isfirstSql = "SELECT ISFIRSTCREATE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '" + getID + "'";
|
String isfirstSql = "SELECT ISFIRSTCREATE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '" + getID + "'";
|
||||||
String isfirst = DBSql.getString(isfirstSql);
|
String isfirst = DBSql.getString(isfirstSql);
|
||||||
System.out.println("isfirst>>>>>>>>" + isfirst);
|
|
||||||
if (isfirst == null || isfirst == "") {
|
if (isfirst == null || isfirst == "") {
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET ISFIRSTCREATE = 1 WHERE ID = '" + getID + "'");
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET ISFIRSTCREATE = 1 WHERE ID = '" + getID + "'");
|
||||||
ro.put("isFirst", true);
|
ro.put("isFirst", true);
|
||||||
|
|||||||
@ -4215,8 +4215,15 @@ public class CoeDesignerWeb extends ActionWeb {
|
|||||||
//1.创建角色模型
|
//1.创建角色模型
|
||||||
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
||||||
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(oldUUID);
|
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(oldUUID);
|
||||||
if (oldModelList.size() > 0 && oldModelList.get(0).getAttrId().equals("role")) {
|
|
||||||
CreateRelevanceRoleModel(isLargeIteration, oldUUID, PALRepositoryCache.getCache().get(newUUID), mapNewUUID, tempVer, teamId);
|
|
||||||
|
if (oldModelList.size() > 0) {
|
||||||
|
for (DesignerShapeRelationModel oldModel : oldModelList) {
|
||||||
|
if (oldModel.getAttrId().equals("role")) {
|
||||||
|
CreateRelevanceRoleModel(isLargeIteration, oldUUID, PALRepositoryCache.getCache().get(newUUID), mapNewUUID, tempVer, teamId,oldModel.getRelationFileId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建绩效关联关系
|
//创建绩效关联关系
|
||||||
@ -4246,13 +4253,14 @@ public class CoeDesignerWeb extends ActionWeb {
|
|||||||
* @param isLargeIteration
|
* @param isLargeIteration
|
||||||
* @param olduuid
|
* @param olduuid
|
||||||
*/
|
*/
|
||||||
public String CreateRelevanceRoleModel(boolean isLargeIteration, String olduuid, PALRepositoryModel newModel, Map<String, String> mapNewUUID, Double tempVer, String teamId) {
|
public String CreateRelevanceRoleModel(boolean isLargeIteration, String olduuid, PALRepositoryModel newModel, Map<String, String> mapNewUUID, Double tempVer, String teamId,String relationFileId) {
|
||||||
ResponseObject ro = null;
|
ResponseObject ro = null;
|
||||||
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
||||||
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(olduuid);
|
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(olduuid);
|
||||||
|
|
||||||
|
|
||||||
//1.创建角色模型
|
//1.创建角色模型
|
||||||
String relationFileId = oldModelList.get(0).getRelationFileId();
|
//String relationFileId = oldModelList.get(0).getRelationFileId();
|
||||||
String srcPath = "";// 源文件路径
|
String srcPath = "";// 源文件路径
|
||||||
String targetPath = "";// 目标文件路径
|
String targetPath = "";// 目标文件路径
|
||||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
||||||
@ -4335,98 +4343,6 @@ public class CoeDesignerWeb extends ActionWeb {
|
|||||||
ro = ResponseObject.newWarnResponse("创建失败," + e.getMessage());
|
ro = ResponseObject.newWarnResponse("创建失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*if(oldModelList.size()>0){
|
|
||||||
for (DesignerShapeRelationModel oldModel : oldModelList) {
|
|
||||||
|
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(newModel.getId());
|
|
||||||
//如果关联角色图,则同步复制角色图关联关系
|
|
||||||
if(oldModel.getAttrId().equals("role")){
|
|
||||||
String methodIds="org.role";
|
|
||||||
if (mapNewUUID.containsKey(oldModel.getShapeId())) {
|
|
||||||
|
|
||||||
String srcPath = "";// 源文件路径
|
|
||||||
String targetPath = "";// 目标文件路径
|
|
||||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
|
||||||
PALRepositoryModelImpl lastplModel = (PALRepositoryModelImpl) coeProcessLevel.getInstance(oldModel.getRelationFileId());
|
|
||||||
final String oldUUID = lastplModel.getId();
|
|
||||||
lastplModel.setId(UUIDGener.getUUID());
|
|
||||||
final String newUUID = lastplModel.getId();
|
|
||||||
//大小版本号处理
|
|
||||||
tempVer = isLargeIteration ? coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId()) : coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId(),lastplModel.getVersion());
|
|
||||||
lastplModel.setHistoryMaxVersion("0");
|
|
||||||
lastplModel.setVersion(VersionUtil.increaseVersionNo(tempVer,isLargeIteration));
|
|
||||||
lastplModel.setUse(false);
|
|
||||||
srcPath = lastplModel.getFilePath();
|
|
||||||
if (!"".equals(srcPath) && srcPath != null) {
|
|
||||||
targetPath = srcPath.replace(oldModel.getRelationFileId(), lastplModel.getId());
|
|
||||||
}
|
|
||||||
lastplModel.setFilePath(targetPath);
|
|
||||||
lastplModel.setPublish(false);
|
|
||||||
lastplModel.setStop(false);
|
|
||||||
lastplModel.setApproval(false);
|
|
||||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
|
||||||
String uid = super.getContext().getUID();
|
|
||||||
lastplModel.setCreateUser(uid);
|
|
||||||
lastplModel.setCreateDate(nowTime);
|
|
||||||
lastplModel.setModifyUser(uid);
|
|
||||||
lastplModel.setModifyDate(nowTime);
|
|
||||||
List data=new ArrayList<>();
|
|
||||||
data.add(0,"org.role");
|
|
||||||
data.add(1,newModel.getId());
|
|
||||||
lastplModel.setExt2(data.toString());
|
|
||||||
//密级
|
|
||||||
lastplModel.setSecurityLevel(-1);
|
|
||||||
int store = 0;
|
|
||||||
try {
|
|
||||||
store = CoeProcessLevelDaoFacotory.createCoeProcessLevel().insert(lastplModel);
|
|
||||||
if (store == 1) {
|
|
||||||
// 修改设计器文件
|
|
||||||
CoeFile fileUtil = new CoeFile();
|
|
||||||
fileUtil.copyDefaultVersion(srcPath, oldModel.getRelationFileId(), targetPath, lastplModel.getId());
|
|
||||||
|
|
||||||
// 获取新旧节点关联关系
|
|
||||||
final Map<String, String> mapNewUUID1 = createShapeIdRelation(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), true);
|
|
||||||
// 处理流程属性
|
|
||||||
String property = CoePropertyUtil.getPropertyValue(oldModel.getRelationFileId() + "_attr");
|
|
||||||
if (!UtilString.isEmpty(property)) {
|
|
||||||
CoePropertyUtil.createProperty(newUUID + "_attr", property);
|
|
||||||
}
|
|
||||||
|
|
||||||
//重新设置修订关联关系
|
|
||||||
DesignerShapeRelationModel newModel1 = new DesignerShapeRelationModel();
|
|
||||||
newModel1.setId(UUIDGener.getUUID());
|
|
||||||
newModel1.setFileId(newModel.getId());
|
|
||||||
newModel1.setShapeId(mapNewUUID.get(oldModel.getShapeId()));
|
|
||||||
newModel1.setShapeText(oldModel.getShapeText());
|
|
||||||
newModel1.setAttrId(oldModel.getAttrId());
|
|
||||||
newModel1.setRelationFileId(newUUID);
|
|
||||||
newModel1.setRelationShapeId(oldModel.getRelationShapeId());
|
|
||||||
newModel1.setRelationShapeText(oldModel.getRelationShapeText());
|
|
||||||
dao.insert(newModel1);
|
|
||||||
|
|
||||||
|
|
||||||
CoeProcessLevelUtil.copyRepositoryProperty(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), PALRepositoryCache.getCache().get(newUUID), mapNewUUID1, _uc);
|
|
||||||
ro = ResponseObject.newOkResponse("创建成功");
|
|
||||||
ro.put("uuid", lastplModel.getId());
|
|
||||||
}else{
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败," + e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}else{
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}*/
|
|
||||||
return ro.toString();
|
return ro.toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,8 +114,8 @@ public class RepositoryTreeUtil {
|
|||||||
if (model != null) palObject.put("dutyUserName", model.getUserName());
|
if (model != null) palObject.put("dutyUserName", model.getUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
String sqls = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PROPERTYNAME='文件编码' and PLID = '"+palModel.getId()+"'";
|
//String sqls = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PROPERTYNAME='文件编码' and PLID = '"+palModel.getId()+"'";
|
||||||
palObject.put("stopNumber", DBSql.getString(sqls));
|
//palObject.put("stopNumber", DBSql.getString(sqls));
|
||||||
// if (professionalIcon) {
|
// if (professionalIcon) {
|
||||||
if (false) {
|
if (false) {
|
||||||
palObject.put("icon", "../apps/" + CoEConstant.APP_ID + "/img/method/" + palModel.getMethodId() + "/16.png");
|
palObject.put("icon", "../apps/" + CoEConstant.APP_ID + "/img/method/" + palModel.getMethodId() + "/16.png");
|
||||||
|
|||||||
Binary file not shown.
@ -90,7 +90,8 @@ public class CreateWorkflowServiceJob implements IJob {
|
|||||||
// HttpURLConnection 发送SOAP请求
|
// HttpURLConnection 发送SOAP请求
|
||||||
System.out.println("HttpURLConnection 发送SOAP请求");
|
System.out.println("HttpURLConnection 发送SOAP请求");
|
||||||
|
|
||||||
String postSoap = UtilUrl.doPostSoap("http://10.105.1.59:80/services/WorkflowService", xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap("http://10.105.1.59:80/services/WorkflowService", xmlStr, "");
|
||||||
|
|
||||||
/*// HttpClient发送SOAP请求
|
/*// HttpClient发送SOAP请求
|
||||||
System.out.println("HttpClient 发送SOAP请求");
|
System.out.println("HttpClient 发送SOAP请求");
|
||||||
|
|||||||
@ -889,8 +889,8 @@ public class SendReadBycontract implements IJob {
|
|||||||
"</soapenv:Envelope>";
|
"</soapenv:Envelope>";
|
||||||
System.out.println("xmlStr>>>>>>>>"+xmlStr);
|
System.out.println("xmlStr>>>>>>>>"+xmlStr);
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
UtilUrl uc=new UtilUrl();
|
||||||
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
Document document = DocumentHelper.parseText(postSoap);
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
Element rootElement = document.getRootElement();
|
Element rootElement = document.getRootElement();
|
||||||
System.out.println("rootElement>>>>>>"+rootElement);
|
System.out.println("rootElement>>>>>>"+rootElement);
|
||||||
|
|||||||
@ -608,7 +608,8 @@ public class TestSendOARead implements IJob {
|
|||||||
System.out.println("xmlStr>>>>>>>>"+xmlStr);
|
System.out.println("xmlStr>>>>>>>>"+xmlStr);
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
|
||||||
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
Document document = DocumentHelper.parseText(postSoap);
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
Element rootElement = document.getRootElement();
|
Element rootElement = document.getRootElement();
|
||||||
System.out.println("rootElement>>>>>>"+rootElement);
|
System.out.println("rootElement>>>>>>"+rootElement);
|
||||||
|
|||||||
@ -901,7 +901,8 @@ public class sendReadByDataid {
|
|||||||
//System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
//System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
|
||||||
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
Document document = DocumentHelper.parseText(postSoap);
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
Element rootElement = document.getRootElement();
|
Element rootElement = document.getRootElement();
|
||||||
//System.out.println("rootElement>>>>>>" + rootElement);
|
//System.out.println("rootElement>>>>>>" + rootElement);
|
||||||
|
|||||||
@ -897,7 +897,8 @@ public class sendReadByDataid2 {
|
|||||||
System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
|
||||||
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
Document document = DocumentHelper.parseText(postSoap);
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
Element rootElement = document.getRootElement();
|
Element rootElement = document.getRootElement();
|
||||||
System.out.println("rootElement>>>>>>" + rootElement);
|
System.out.println("rootElement>>>>>>" + rootElement);
|
||||||
|
|||||||
@ -699,7 +699,8 @@ public class sendReadByDataid3 {
|
|||||||
System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
|
||||||
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
Document document = DocumentHelper.parseText(postSoap);
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
Element rootElement = document.getRootElement();
|
Element rootElement = document.getRootElement();
|
||||||
System.out.println("rootElement>>>>>>" + rootElement);
|
System.out.println("rootElement>>>>>>" + rootElement);
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import com.actionsoft.bpms.server.fs.DCContext;
|
|||||||
import com.actionsoft.bpms.util.DBSql;
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
import com.actionsoft.bpms.util.UUIDGener;
|
import com.actionsoft.bpms.util.UUIDGener;
|
||||||
import com.actionsoft.bpms.util.UtilString;
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
import com.actionsoft.exception.AWSDataAccessException;
|
||||||
import com.actionsoft.exception.AWSException;
|
import com.actionsoft.exception.AWSException;
|
||||||
import com.actionsoft.exception.AWSQuotaException;
|
import com.actionsoft.exception.AWSQuotaException;
|
||||||
import com.actionsoft.sdk.local.SDK;
|
import com.actionsoft.sdk.local.SDK;
|
||||||
@ -111,58 +112,83 @@ public class TaskController {
|
|||||||
* @param logType
|
* @param logType
|
||||||
*/
|
*/
|
||||||
public void setUserLog(String processInstId, String userid, String logType) {
|
public void setUserLog(String processInstId, String userid, String logType) {
|
||||||
|
Connection open = DBSql.open();
|
||||||
System.err.println("用户登录记录存入日志========>" + userid + "_类型:" + logType);
|
System.err.println("用户登录记录存入日志========>" + userid + "_类型:" + logType);
|
||||||
if (UtilString.isNotEmpty(userid)) {
|
if (UtilString.isNotEmpty(userid)) {
|
||||||
//待阅更新已读记录
|
try {
|
||||||
if ("3".equals(logType)) {
|
//待阅更新已读记录
|
||||||
String dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
if ("3".equals(logType)) {
|
||||||
/*
|
String dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||||
* RowMap map = DBSql.getMap("SELECT * FROM BO_ACT_DATAID WHERE PROCESSID = '"
|
/*
|
||||||
* +processInstId+"' AND USER_ID = '"+userid+"' AND READSTATE = '已读'");
|
* RowMap map = DBSql.getMap("SELECT * FROM BO_ACT_DATAID WHERE PROCESSID = '"
|
||||||
* if(null!=map) { int readCount = map.getInt("READCOUNT")+1;
|
* +processInstId+"' AND USER_ID = '"+userid+"' AND READSTATE = '已读'");
|
||||||
* DBSql.update("UPDATE BO_ACT_DATAID SET READSTATE = '已读',READTIMES = '"
|
* if(null!=map) { int readCount = map.getInt("READCOUNT")+1;
|
||||||
* +dateTime+"',READCOUNT = "+readCount+" WHERE PROCESSID = '"
|
* DBSql.update("UPDATE BO_ACT_DATAID SET READSTATE = '已读',READTIMES = '"
|
||||||
* +processInstId+"' AND USER_ID = '"+userid+"'"); }else { }
|
* +dateTime+"',READCOUNT = "+readCount+" WHERE PROCESSID = '"
|
||||||
*/
|
* +processInstId+"' AND USER_ID = '"+userid+"'"); }else { }
|
||||||
DBSql.update("UPDATE BO_ACT_DATAID SET READSTATE = '已读',READTIMES = '" + dateTime + "',READCOUNT = 1 WHERE PROCESSID = '" + processInstId + "' AND USER_ID = '" + userid + "'");
|
*/
|
||||||
|
//DBSql.update(open,"UPDATE BO_ACT_DATAID SET READSTATE = '已读',READTIMES = '" + dateTime + "',READCOUNT = 1 WHERE PROCESSID = '" + processInstId + "' AND USER_ID = '" + userid + "'");
|
||||||
|
|
||||||
|
|
||||||
//将已读数据插入至BO_ACT_ALREADY_DATAID ,并把BO_ACT_DATAID中此条已读数据删除
|
//将已读数据插入至BO_ACT_ALREADY_DATAID ,并把BO_ACT_DATAID中此条已读数据删除
|
||||||
/*String sql = "INSERT INTO BO_ACT_ALREADY_DATAID (\"ID\",ORGID,BINDID,CREATEDATE,CREATEUSER,UPDATEDATE,UPDATEUSER,PROCESSDEFID,ISEND,PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,\"RESULT\",TITLE,SENDTYPE,READSTATE,READCOUNT,\"TYPE\")\n" +
|
/*String sql = "INSERT INTO BO_ACT_ALREADY_DATAID (\"ID\",ORGID,BINDID,CREATEDATE,CREATEUSER,UPDATEDATE,UPDATEUSER,PROCESSDEFID,ISEND,PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,\"RESULT\",TITLE,SENDTYPE,READSTATE,READCOUNT,\"TYPE\")\n" +
|
||||||
"\t\t\t\tSELECT \"ID\",ORGID,BINDID,CREATEDATE,CREATEUSER,UPDATEDATE,UPDATEUSER,PROCESSDEFID,ISEND,PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,\"RESULT\",TITLE,SENDTYPE,READSTATE,READCOUNT,\"TYPE\"\n" +
|
"\t\t\t\tSELECT \"ID\",ORGID,BINDID,CREATEDATE,CREATEUSER,UPDATEDATE,UPDATEUSER,PROCESSDEFID,ISEND,PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,\"RESULT\",TITLE,SENDTYPE,READSTATE,READCOUNT,\"TYPE\"\n" +
|
||||||
"\t\t\t\tFROM BO_ACT_DATAID WHERE READSTATE='已读' AND PROCESSID = '" + processInstId + "' AND USER_ID = '" + userid + "'";
|
"\t\t\t\tFROM BO_ACT_DATAID WHERE READSTATE='已读' AND PROCESSID = '" + processInstId + "' AND USER_ID = '" + userid + "'";
|
||||||
DBSql.update(sql);*/
|
DBSql.update(sql);*/
|
||||||
|
|
||||||
|
|
||||||
String sqly = "SELECT PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,TITLE,SENDTYPE,READSTATE,READCOUNT FROM BO_ACT_DATAID WHERE PROCESSID='" + processInstId + "' AND USER_ID='"+userid+"' ";
|
String sqly = "SELECT PROCESSID,USER_ID,USERDEP,READTIMES,DATAID,TITLE,SENDTYPE,READSTATE,READCOUNT,ID FROM BO_ACT_DATAID WHERE PROCESSID='" + processInstId + "' AND USER_ID='"+userid+"' ";
|
||||||
RowMap mapsy = DBSql.getMap(sqly);
|
RowMap mapsy = DBSql.getMap(open,sqly);
|
||||||
if (null != mapsy && !mapsy.isEmpty()) {
|
if (null != mapsy && !mapsy.isEmpty()) {
|
||||||
String alsqly = "SELECT USER_ID FROM BO_ACT_ALREADY_DATAID WHERE PROCESSID='" + processInstId + "' AND USER_ID='"+userid+"' ";
|
String alsqly = "SELECT USER_ID FROM BO_ACT_ALREADY_DATAID WHERE PROCESSID='" + processInstId + "' AND USER_ID='"+userid+"' ";
|
||||||
if(alsqly==null){
|
RowMap alsqlyMap = DBSql.getMap(open,alsqly);
|
||||||
String sql = "insert into BO_ACT_ALREADY_DATAID (ID,PROCESSID,USER_ID,READTIMES,DATAID,TITLE,READSTATE) values ('%s', '%s', '%s', '%s', '%s', '%s','%s')";
|
if(alsqlyMap==null){
|
||||||
String id = UUIDGener.getUUID();
|
String sql = "insert into BO_ACT_ALREADY_DATAID (ID,PROCESSID,USER_ID,READTIMES,DATAID,TITLE,READSTATE) values ('%s', '%s', '%s', '%s', '%s', '%s','%s')";
|
||||||
int update = DBSql.update(String.format(sql, id, mapsy.getString("PROCESSID"), mapsy.getString("USER_ID"), mapsy.get("READTIMES"), mapsy.getString("DATAID"),mapsy.getString("TITLE"),mapsy.getString("READSTATE")));
|
String id = UUIDGener.getUUID();
|
||||||
if(update!=0){
|
int update = DBSql.update(open,String.format(sql, id, mapsy.getString("PROCESSID"), mapsy.getString("USER_ID"), dateTime, mapsy.getString("DATAID"),mapsy.getString("TITLE"),mapsy.getString("READSTATE")));
|
||||||
String sql1 = "DELETE FROM BO_ACT_DATAID WHERE READSTATE='已读' AND PROCESSID='"+processInstId+"'AND USER_ID='"+userid+"'";
|
|
||||||
DBSql.update(sql1);
|
/* ProcessInstance boProcessInstance = SDK.getProcessAPI()
|
||||||
|
.createBOProcessInstance("obj_1a2207bf57eb4ed982ed24b9ed80e260", "admin", "OA已阅日志");
|
||||||
|
|
||||||
|
BO bo=new BO();
|
||||||
|
bo.set("PROCESSID",mapsy.getString("PROCESSID"));
|
||||||
|
bo.set("USER_ID",mapsy.getString("USER_ID"));
|
||||||
|
bo.set("READTIMES",mapsy.getString("READTIMES"));
|
||||||
|
bo.set("DATAID",mapsy.getString("DATAID"));
|
||||||
|
bo.set("TITLE",mapsy.getString("TITLE"));
|
||||||
|
bo.set("READSTATE",mapsy.getString("READSTATE"));
|
||||||
|
int count=SDK.getBOAPI().create("BO_ACT_ALREADY_DATAID", bo, boProcessInstance.getId(), boProcessInstance.getCreateUser());*/
|
||||||
|
|
||||||
|
if(update!=0){
|
||||||
|
System.out.println("count==========="+update);
|
||||||
|
String sql1 = "DELETE FROM BO_ACT_DATAID WHERE PROCESSID='"+processInstId+"'AND USER_ID='"+userid+"'";
|
||||||
|
DBSql.update(open,sql1);
|
||||||
|
|
||||||
|
//SDK.getBOAPI().remove("BO_ACT_DATAID",mapsy.getString("ID"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
String logTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||||
|
BO bo = new BO();
|
||||||
|
ORGAPI orgapi = SDK.getORGAPI();
|
||||||
|
UserModel user = orgapi.getUser(userid);
|
||||||
|
DepartmentModel departmentByUser = orgapi.getDepartmentByUser(userid);
|
||||||
|
bo.set("LOGINUSERNAME", userid);
|
||||||
|
bo.set("USERBUNAME", user.getExt4());
|
||||||
|
bo.set("USERPOST", user.getPositionName());
|
||||||
|
bo.set("USERDEPTNAME", departmentByUser.getPathNameOfCache());
|
||||||
|
bo.set("LOGINTIME", logTime);
|
||||||
|
bo.set("LOGINCOUNTS", 1);
|
||||||
|
bo.set("LOGTYPE", Integer.valueOf(logType));
|
||||||
|
SDK.getBOAPI().createDataBO("BO_EU_USER_LOGIN_LOG", bo, UserContext.fromUID("admin"));
|
||||||
|
|
||||||
|
DBSql.close(open);
|
||||||
|
} catch (Exception e) {
|
||||||
|
DBSql.close(open);
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
String logTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
||||||
BO bo = new BO();
|
|
||||||
ORGAPI orgapi = SDK.getORGAPI();
|
|
||||||
UserModel user = orgapi.getUser(userid);
|
|
||||||
DepartmentModel departmentByUser = orgapi.getDepartmentByUser(userid);
|
|
||||||
bo.set("LOGINUSERNAME", userid);
|
|
||||||
bo.set("USERBUNAME", user.getExt4());
|
|
||||||
bo.set("USERPOST", user.getPositionName());
|
|
||||||
bo.set("USERDEPTNAME", departmentByUser.getPathNameOfCache());
|
|
||||||
bo.set("LOGINTIME", logTime);
|
|
||||||
bo.set("LOGINCOUNTS", 1);
|
|
||||||
bo.set("LOGTYPE", Integer.valueOf(logType));
|
|
||||||
SDK.getBOAPI().createDataBO("BO_EU_USER_LOGIN_LOG", bo, UserContext.fromUID("admin"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,6 +268,10 @@ public class TaskController {
|
|||||||
//pc端待阅
|
//pc端待阅
|
||||||
@Mapping("com.yili_process_page")
|
@Mapping("com.yili_process_page")
|
||||||
public String processTest(UserContext me, RequestParams params) throws IOException, SQLException {
|
public String processTest(UserContext me, RequestParams params) throws IOException, SQLException {
|
||||||
|
|
||||||
|
long start_time = System.currentTimeMillis();
|
||||||
|
System.out.println("com.yili_process_page开始时间>>>>>>>>>>>>"+start_time);
|
||||||
|
|
||||||
// System.out.println("params>>>>>>>>>>>>"+params.toString());
|
// System.out.println("params>>>>>>>>>>>>"+params.toString());
|
||||||
// System.out.println("UserContext>>>>>>>>>>>>"+me.getUID());
|
// System.out.println("UserContext>>>>>>>>>>>>"+me.getUID());
|
||||||
String userMobile = me.getDeviceType();
|
String userMobile = me.getDeviceType();
|
||||||
@ -257,7 +287,7 @@ public class TaskController {
|
|||||||
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processInstId);
|
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processInstId);
|
||||||
try {
|
try {
|
||||||
// 记录门户待阅
|
// 记录门户待阅
|
||||||
setRecord(me.getUID(), processInstId, instanceById.getTitle());
|
setRecord(me.getUID(), processInstId, instanceById.getTitle(),conn);
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -676,7 +706,8 @@ public class TaskController {
|
|||||||
HttpClient client = new HttpClient();
|
HttpClient client = new HttpClient();
|
||||||
int timeout = 10000;
|
int timeout = 10000;
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
String s = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String s = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
System.err.println(instanceById.getTitle() + "OA待阅PC端阅读返回=======>" + s);
|
System.err.println(instanceById.getTitle() + "OA待阅PC端阅读返回=======>" + s);
|
||||||
String nums = DBSql.getString(
|
String nums = DBSql.getString(
|
||||||
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
||||||
@ -705,7 +736,8 @@ public class TaskController {
|
|||||||
HttpClient client = new HttpClient();
|
HttpClient client = new HttpClient();
|
||||||
int timeout = 10000;
|
int timeout = 10000;
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
String s = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String s = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
System.err.println(instanceById.getTitle() + "OA待阅PC端阅读返回=======>" + s);
|
System.err.println(instanceById.getTitle() + "OA待阅PC端阅读返回=======>" + s);
|
||||||
String nums = DBSql.getString(
|
String nums = DBSql.getString(
|
||||||
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
||||||
@ -723,25 +755,29 @@ public class TaskController {
|
|||||||
// 用户打开阅览界面日志
|
// 用户打开阅览界面日志
|
||||||
setUserLog(processInstId, me.getUID(), "3");
|
setUserLog(processInstId, me.getUID(), "3");
|
||||||
|
|
||||||
|
long have_time = System.currentTimeMillis();
|
||||||
|
|
||||||
|
System.out.println("com.yili_process_page耗时时间>>>>>>>>>>>>"+(have_time-start_time)/ 1000 + "秒");
|
||||||
|
DBSql.close(conn);
|
||||||
// }
|
// }
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
conn.close();
|
DBSql.close(conn);
|
||||||
}
|
}
|
||||||
return HtmlPageTemplate.merge("com.awspaas.user.apps.yili.integration", html, map);
|
return HtmlPageTemplate.merge("com.awspaas.user.apps.yili.integration", html, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
//门户待阅同步更新
|
//门户待阅同步更新
|
||||||
public String setRecord(String uid, String id, String fileName) {
|
public String setRecord(String uid, String id, String fileName,Connection conn) {
|
||||||
String sql = "SELECT READFILECOUNT FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?";
|
String sql = "SELECT READFILECOUNT FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?";
|
||||||
RowMap map= DBSql.getMap(sql, new Object[]{id, uid});
|
RowMap map= DBSql.getMap(conn,sql, new Object[]{id, uid});
|
||||||
int num = 0;
|
int num = 0;
|
||||||
if (null != map) {
|
if (null != map) {
|
||||||
String readCount = map.getString("READFILECOUNT");
|
String readCount = map.getString("READFILECOUNT");
|
||||||
int count = Integer.parseInt(readCount) + 1;
|
int count = Integer.parseInt(readCount) + 1;
|
||||||
String s = "UPDATE BO_EU_PAL_RECORD SET READFILECOUNT = ? WHERE FILEID = ? AND READFILENAME = ?";
|
String s = "UPDATE BO_EU_PAL_RECORD SET READFILECOUNT = ? WHERE FILEID = ? AND READFILENAME = ?";
|
||||||
num = DBSql.update(s, new Object[]{count, id, uid});
|
num = DBSql.update(conn,s, new Object[]{count, id, uid});
|
||||||
} else {
|
} else {
|
||||||
BO bo = new BO();
|
BO bo = new BO();
|
||||||
bo.set("FILEID", id);
|
bo.set("FILEID", id);
|
||||||
@ -758,6 +794,8 @@ public class TaskController {
|
|||||||
|
|
||||||
@Mapping("com.yili_process_page_phone")
|
@Mapping("com.yili_process_page_phone")
|
||||||
public String processPhone(UserContext me, RequestParams params) throws SQLException {
|
public String processPhone(UserContext me, RequestParams params) throws SQLException {
|
||||||
|
long start_time = System.currentTimeMillis();
|
||||||
|
System.out.println("com.yili_process_page_phone开始时间>>>>>>>>>>>>"+start_time);
|
||||||
ArrayList<String> isNumberAscArray = new ArrayList<String>();
|
ArrayList<String> isNumberAscArray = new ArrayList<String>();
|
||||||
String userMobile = me.getDeviceType();
|
String userMobile = me.getDeviceType();
|
||||||
Connection conn = DBSql.open();
|
Connection conn = DBSql.open();
|
||||||
@ -773,7 +811,7 @@ public class TaskController {
|
|||||||
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processInstId);
|
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processInstId);
|
||||||
try {
|
try {
|
||||||
//记录门户待阅
|
//记录门户待阅
|
||||||
setRecord(me.getUID(), processInstId, instanceById.getTitle());
|
setRecord(me.getUID(), processInstId, instanceById.getTitle(),conn);
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -1375,7 +1413,8 @@ public class TaskController {
|
|||||||
+ " </web:service>" + " </soapenv:Body>" + "</soapenv:Envelope>";
|
+ " </web:service>" + " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
int timeout = 10000;
|
int timeout = 10000;
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
String s = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String s = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
//System.err.println(instanceById.getTitle()+"_OA待阅移动端阅读返回=======>"+s);
|
//System.err.println(instanceById.getTitle()+"_OA待阅移动端阅读返回=======>"+s);
|
||||||
String nums = DBSql.getString(
|
String nums = DBSql.getString(
|
||||||
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
||||||
@ -1402,7 +1441,8 @@ public class TaskController {
|
|||||||
+ " </web:service>" + " </soapenv:Body>" + "</soapenv:Envelope>";
|
+ " </web:service>" + " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
int timeout = 10000;
|
int timeout = 10000;
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
String s = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String s = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
System.err.println(instanceById.getTitle() + "_OA待阅移动端阅读返回=======>" + s);
|
System.err.println(instanceById.getTitle() + "_OA待阅移动端阅读返回=======>" + s);
|
||||||
String nums = DBSql.getString(
|
String nums = DBSql.getString(
|
||||||
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
"select READNUM from BO_EU_PAL_READ_LOG where PROCESSID = '" + processInstId + "'");
|
||||||
@ -1463,11 +1503,18 @@ public class TaskController {
|
|||||||
* DBSql.update("update BO_EU_PAL_READ_LOG set READNUM = '" + read_num +
|
* DBSql.update("update BO_EU_PAL_READ_LOG set READNUM = '" + read_num +
|
||||||
* "' where PROCESSID = '" + processInstId + "'"); }
|
* "' where PROCESSID = '" + processInstId + "'"); }
|
||||||
*/
|
*/
|
||||||
|
DBSql.close(conn);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
conn.close();
|
DBSql.close(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long have_time = System.currentTimeMillis();
|
||||||
|
|
||||||
|
System.out.println("com.yili_process_page_phone耗时时间>>>>>>>>>>>>"+(have_time-start_time)/ 1000 + "秒");
|
||||||
|
|
||||||
|
|
||||||
return HtmlPageTemplate.merge("com.awspaas.user.apps.yili.integration", html, map);
|
return HtmlPageTemplate.merge("com.awspaas.user.apps.yili.integration", html, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,8 @@ public class HttpClientUtils {
|
|||||||
"</soapenv:Envelope>";
|
"</soapenv:Envelope>";
|
||||||
|
|
||||||
System.out.println("xmlstr================"+xmlStr);
|
System.out.println("xmlstr================"+xmlStr);
|
||||||
String postSoap = UtilUrl.doPostSoap(url, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(url, xmlStr, "");
|
||||||
|
|
||||||
return postSoap;
|
return postSoap;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,8 @@ public class HttpClientUtils {
|
|||||||
"</soapenv:Envelope>";
|
"</soapenv:Envelope>";
|
||||||
|
|
||||||
System.out.println("xmlstr================"+xmlStr);
|
System.out.println("xmlstr================"+xmlStr);
|
||||||
String postSoap = UtilUrl.doPostSoap(url, xmlStr, "");
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap = uc.doPostSoap(url, xmlStr, "");
|
||||||
|
|
||||||
return postSoap;
|
return postSoap;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import java.nio.charset.Charset;
|
|||||||
public class UtilUrl {
|
public class UtilUrl {
|
||||||
|
|
||||||
//使用SOAP1.1发送消息
|
//使用SOAP1.1发送消息
|
||||||
public static String doPostSoap(String postUrl, String soapXml, String soapAction) {
|
public String doPostSoap(String postUrl, String soapXml, String soapAction) {
|
||||||
String retStr = "";
|
String retStr = "";
|
||||||
// 创建HttpClientBuilder
|
// 创建HttpClientBuilder
|
||||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user