修改接口调用方式及关闭数据库连接
This commit is contained in:
parent
4922064aa6
commit
58794136d9
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