瀏覽代碼

git-svn-id: https://192.168.57.71/svn/jsgkj@549 931142cf-59ea-a443-aa0e-51397b428577

ld_liqk 9 年之前
父節點
當前提交
f0375f024e

+ 32 - 3
gkjsjy/trunk/src/com/xt/jygl/common/BaseWebCtl.java

@@ -3,20 +3,49 @@ package com.xt.jygl.common;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
 import java.net.URL;
+import java.net.URLEncoder;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
-
+import java.util.Map;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
 import javax.servlet.http.HttpServletRequest;
 
 import net.sf.json.JsonConfig;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.conn.ssl.X509HostnameVerifier;
+import org.apache.http.entity.ContentType;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.util.EntityUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.propertyeditors.CustomBooleanEditor;
@@ -35,7 +64,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.liandi.encrypt.Des;
 import com.xt.jygl.ftp.Ftp;
-import com.xt.jygl.gkjcxx.gq.service.GqService;
 import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
 import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.service.GkjyrService;
 import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.vo.GkjyrVo;
@@ -434,7 +462,7 @@ public class BaseWebCtl extends BaseCtl {
 	public boolean getTbStatus(String uStr) {
 		boolean flag = false;
 		try {
-			String str = "http://10.1.30.118:9701/xtdsp/task/run";
+			String str = GlobalData.SJYH_URL + GlobalData.CITY_CODE + "_";
 			URL url = new URL(str + uStr);
 			HttpURLConnection con = (HttpURLConnection) url.openConnection();
 			con.connect();
@@ -469,4 +497,5 @@ public class BaseWebCtl extends BaseCtl {
 		f.setPath(GlobalData.FTP_UPLOAD_PATH);
 		return f;
 	}
+
 }

+ 5 - 6
gkjsjy/trunk/src/com/xt/jygl/common/Constants.java

@@ -39,13 +39,13 @@ public class Constants {
 	public final static String ROLE_NDSHCL = "ndshcl";// 年度审核材料
 
 	public final static String ROLE_NDSHPZ = "ndshpz";// 年度审核批准
-	
+
 	public final static String ROLE_LD = "ld";// 领导
-	
-	public final static String ROLE_KS = "ksfzr";//科室负责人
-	
+
+	public final static String ROLE_KS = "ksfzr";// 科室负责人
+
 	public final static String ROLE_FGLD = "fgld";// 领导
-	
+
 	public final static String ROLE_JBR = "jbr";// 经办人
 
 	public final static String ROLE_ZJPS = "zjps";// 专家评审
@@ -271,5 +271,4 @@ public class Constants {
 	public static final String GROUP_CODE_PORT = "WS.PORT";
 
 	// ======================流程定义================================
-
 }

+ 14 - 0
gkjsjy/trunk/src/com/xt/jygl/common/GlobalData.java

@@ -40,6 +40,12 @@ public class GlobalData {
 	public static String FTP_XK_USER = "";
 	public static String FTP_QT_USER = "";
 
+	public static String CORPID = "wxa70527e1ffa01384";
+	public static String WEIXIN_IP = "";
+	public static String WEIXIN_PORT = "";
+	public static String SECRET = "SPW4uWGVp7TvscIiNxnMzSilJXRe8yvftS1FCji1aDUDL-hdjMs5KopiVPqnQqLs";
+	public static String SJYH_URL = "";
+
 	public static void init(ServletContext sc) {
 		String ftp_xk_user = sc.getInitParameter("ftp_xk_user");
 		if (StringUtils.hasLength(ftp_xk_user)) {
@@ -150,5 +156,13 @@ public class GlobalData {
 		if (StringUtils.hasLength(prop)) {
 			FTP_PORT = prop;
 		}
+		prop = String.valueOf(p.get("weixin.ip"));
+		if (StringUtils.hasLength(prop)) {
+			WEIXIN_IP = prop;
+		}
+		prop = String.valueOf(p.get("sjyh.url"));
+		if (StringUtils.hasLength(prop)) {
+			SJYH_URL = prop;
+		}
 	}
 }

+ 1 - 1
gkjsjy/trunk/src/com/xt/jygl/gkjsgl/jgsq/ctl/JgsqCtl.java

@@ -1212,7 +1212,7 @@ public class JgsqCtl extends BaseWebCtl {
 				entity = jgsqService.save(entity);
 				// 如果是省级审核通过或不通过后同步到市级
 				try {
-					String url = "/GK_OPERATION_JSJY_JGSQ_ONE_PC?condition=ID=" + entity.getId();
+					String url = "GK_OPERATION_JSJY_JGSQ_ONE_PC?condition=ID=" + entity.getId();
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");

+ 1 - 1
gkjsjy/trunk/src/com/xt/jygl/gkjsgl/jsjdbg/ctl/JsjdbgCtl.java

@@ -1105,7 +1105,7 @@ public class JsjdbgCtl extends BaseWebCtl {
 						fjid = fjid.substring(0, fjid.length() - 1);
 					}
 
-					String url = "/GK_OPERATION_JSJY_JSJDBG_ONE_PC?condition=ID=" + entity.getId() + ";FJID=" + fjid;
+					String url = "GK_OPERATION_JSJY_JSJDBG_ONE_PC?condition=ID=" + entity.getId() + ";FJID=" + fjid;
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");

+ 1 - 1
gkjsjy/trunk/src/com/xt/jygl/gkjsgl/jsjdbg/ctl/JsjdbgdsCtl.java

@@ -1247,7 +1247,7 @@ public class JsjdbgdsCtl extends BaseWebCtl {
 		entity.setSftb(Constants.YES);
 		jsjdbgdsService.save(entity);
 
-		String url = "/GK_OPERATION_JSJY_JSJDBG_ONE_CP?condition=ID=" + id + ";FJID=1";
+		String url = "GK_OPERATION_JSJY_JSJDBG_ONE_CP?condition=ID=" + id + ";FJID=1";
 
 		boolean flag = getTbStatus(url);
 		if (flag) {

+ 1 - 1
gkjsjy/trunk/src/com/xt/jygl/gkjsgl/jsjdcbsj/ctl/JsjdcbsjCtl.java

@@ -1292,7 +1292,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
 				entity = jsjdcbsjService.save(entity);
 				// 如果是省级审核通过或不通过后同步到市级
 				try {
-					String url = "/GK_OPERATION_JSJY_JSJDCBSJ_ONE_PC?condition=ID=" + entity.getId();
+					String url = "GK_OPERATION_JSJY_JSJDCBSJ_ONE_PC?condition=ID=" + entity.getId();
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");

+ 2 - 2
gkjsjy/trunk/src/com/xt/jygl/gkjsgl/jsjdgl/ctl/JsjdglCtl.java

@@ -357,9 +357,9 @@ public class JsjdglCtl extends BaseWebCtl {
 		entity.setSftb(Constants.YES);
 		xmxxglService.save(entity);
 
-		String url = "/GK_OPERATION_JSJY_JSJDCBSJ_ONE_CP?condition=ID=" + id;
+		String url = "GK_OPERATION_JSJY_JSJDCBSJ_ONE_CP?condition=ID=" + id;
 		if ("2".equals(entity.getFlowstatus()) || "8".equals(spflag)) {
-			url = "/GK_OPERATION_JSJY_JGSQ_ONE_CP?condition=ID=" + id;
+			url = "GK_OPERATION_JSJY_JGSQ_ONE_CP?condition=ID=" + id;
 		}
 
 		boolean flag = getTbStatus(url);

+ 193 - 1
gkjsjy/trunk/src/com/xt/jygl/gkjygl/cghzyxxgl/dcsb/service/impl/DcsbServiceImpl.java

@@ -1,16 +1,47 @@
 package com.xt.jygl.gkjygl.cghzyxxgl.dcsb.service.impl;
 
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.SocketTimeoutException;
+import java.net.URLEncoder;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.conn.ssl.X509HostnameVerifier;
+import org.apache.http.entity.ContentType;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.xt.jygl.common.Constants;
 import com.xt.jygl.common.GlobalData;
+import com.xt.jygl.gkjcxx.gq.entity.GqEntity;
+import com.xt.jygl.gkjcxx.gq.service.GqService;
 import com.xt.jygl.gkjygl.cghzyxxgl.dcsb.dao.DcsbDao;
 import com.xt.jygl.gkjygl.cghzyxxgl.dcsb.entity.DcsbEntity;
 import com.xt.jygl.gkjygl.cghzyxxgl.dcsb.service.DcsbService;
@@ -31,6 +62,8 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 	private DcsbDao dao;
 	@Autowired
 	protected SecurityMgr securityMgr;
+	@Autowired
+	private GqService gqService;
 
 	@Override
 	protected SecRepository<DcsbEntity, String> getDao() {
@@ -55,6 +88,10 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 			param.put(WorkFlowParam.IS_AUDIT, "false");
 			param.put(WorkFlowParam.DESCRIPTION, entity.getSsjyr().getGkjyr() + "的单船申报");
 			complete(param, variables);
+			UserEntity ue = securityMgr.userService().findByssjyr(entity.getSsjyr().getId());
+			if (ue != null && ue.getWeixinid() != null) {
+				tuisong(" 您收到一条提醒", entity.getSsjyr().getGkjyr() + "的单船申报", 7, ue.getWeixinid(), entity.getId(), false);
+			}
 		} else {
 			SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd");
 			Date today = new Date();
@@ -113,12 +150,21 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 			param.put(WorkFlowParam.BUSINESS_KEY, entity.getId().toString());
 			// 提交流程
 			create(param, variables);
+			//
+			GqEntity gq = gqService.findOne(gqid);
+			List<UserEntity> ueList = securityMgr.userService().findByRole(Constants.ROLE_DCSBSC);
+			if (ueList != null && gq != null && gq.getSsgkglbm() != null) {
+				for (UserEntity ue : ueList) {
+					if (ue.getSsglbm() != null && ue.getSsglbm().getId() != null && ue.getSsglbm().getId().equals(gq.getSsgkglbm().getId())) {
+						tuisong(" 您收到一条提醒", entity.getSsjyr().getGkjyr() + "的单船申报", 7, ue.getWeixinid(), entity.getId(), true);
+					}
+				}
+			}
 		}
 		return entity;
 
 	}
 
-
 	@Override
 	public boolean changeAudit(String shyj, DcsbEntity entity, boolean flag) {
 		Map<String, Object> variables = new HashMap<String, Object>();
@@ -219,4 +265,150 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 		return dao.dcsbtjbg2(sTime, eTime, hwzldedl, nwmid, szdid, szgkid, szgqid, jcgid);
 	}
 
+	// 参数顺序 标题,内容,微信应用id,微信id,业务key(PC端调用),查看or编辑页面
+	private boolean tuisong(String title, String content, int agentid, String weixinid, String busskey, boolean readOnly) {
+		boolean flag = true;
+		content = content.split(",")[0];
+		try {
+			StringBuffer sbf = new StringBuffer();
+			sbf.append("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa70527e1ffa01384&redirect_uri=");
+			String path = "dcsbView";
+			if (!readOnly) {
+				path = "dcsbEdit";
+			}
+			sbf.append(URLEncoder.encode(("http://" + GlobalData.WEIXIN_IP + ":" + GlobalData.WEIXIN_PORT + "/weixinoa/mobile/dcsb/" + path + ".html?hname=db&isDone=1&id=" + busskey), "utf-8"));
+			sbf.append("&response_type=code&scope=snsapi_base&state=a#wechat_redirect");
+			String json = "{\"touser\": \"" + weixinid + "\",\"toparty\": \"" + "" + "\"" + ",\"totag\": \"\",\"msgtype\": \"text\",\"agentid\": \"" + agentid + "\",\"text\": {\"content\": \"" + content + ",<a href='" + sbf.toString() + "'>点击查看</a>" + "\"},\"safe\":\"0\"}";
+			sendWxmsg(json);
+		} catch (Exception e) {
+			flag = false;
+		}
+		/**
+		 * 微信推送
+		 */
+
+		return flag;
+
+	}
+
+	/**
+	 * 推送微信消息
+	 * 
+	 * @param param
+	 * @throws UnsupportedEncodingException
+	 */
+	private static void sendWxmsg(String param) {
+		try {
+			String urlString = "http://193.168.1.151:8091/weixinoa/weixincontroller/sendPost.do";
+			Map<String, String> params = new HashMap<String, String>();
+			params.put("param", param);
+			sendPostSSLRequest(urlString, params, "UTF-8");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 发送HTTP_POST_SSL请求
+	 * 
+	 * @see 1)该方法会自动关闭连接,释放资源
+	 * @see 2)该方法亦可处理普通的HTTP_POST请求
+	 * @see 3)当处理HTTP_POST_SSL请求时,默认请求的是对方443端口,除非reqURL参数中指明了SSL端口
+	 * @see 4)方法内设置了连接和读取超时时间,单位为毫秒,超时或发生其它异常时方法会自动返回"通信失败"字符串
+	 * @see 5)请求参数含中文等特殊字符时,可直接传入本方法,并指明其编码字符集encodeCharset参数,方法内部会自动对其转码
+	 * @see 6)方法内部会自动注册443作为SSL端口,若实际使用中reqURL指定的SSL端口非443,可自行尝试更改方法内部注册的SSL端口
+	 * @see 7)该方法在解码响应报文时所采用的编码,取自响应消息头中的[Content-Type:text/html;
+	 *      charset=GBK]的charset值
+	 * @see 若响应消息头中未指定Content-Type属性,则会使用HttpClient内部默认的ISO-8859-1
+	 * @param reqURL
+	 *            请求地址
+	 * @param params
+	 *            请求参数
+	 * @param encodeCharset
+	 *            编码字符集,编码请求数据时用之,当其为null时,则取HttpClient内部默认的ISO-8859-1编码请求参数
+	 * @return 远程主机响应正文
+	 */
+	private static String sendPostSSLRequest(String reqURL, Map<String, String> params, String encodeCharset) {
+		String responseContent = "通信失败";
+		HttpClient httpClient = new DefaultHttpClient();
+		httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 10000);
+		httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 20000);
+		// 创建TrustManager()
+		// 用于解决javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
+		X509TrustManager trustManager = new X509TrustManager() {
+			@Override
+			public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+			}
+
+			@Override
+			public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+			}
+
+			@Override
+			public X509Certificate[] getAcceptedIssuers() {
+				return null;
+			}
+		};
+		// 创建HostnameVerifier
+		// 用于解决javax.net.ssl.SSLException: hostname in certificate didn't match:
+		// <123.125.97.66> != <123.125.97.241>
+		X509HostnameVerifier hostnameVerifier = new X509HostnameVerifier() {
+			@Override
+			public void verify(String host, SSLSocket ssl) throws IOException {
+			}
+
+			@Override
+			public void verify(String host, X509Certificate cert) throws SSLException {
+			}
+
+			@Override
+			public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
+			}
+
+			@Override
+			public boolean verify(String arg0, SSLSession arg1) {
+				return true;
+			}
+		};
+		try {
+			// TLS1.0与SSL3.0基本上没有太大的差别,可粗略理解为TLS是SSL的继承者,但它们使用的是相同的SSLContext
+			SSLContext sslContext = SSLContext.getInstance(SSLSocketFactory.TLS);
+			// 使用TrustManager来初始化该上下文,TrustManager只是被SSL的Socket所使用
+			sslContext.init(null, new TrustManager[] { trustManager }, null);
+			// 创建SSLSocketFactory
+			SSLSocketFactory socketFactory = new SSLSocketFactory(sslContext, hostnameVerifier);
+			// 通过SchemeRegistry将SSLSocketFactory注册到HttpClient上
+			httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory));
+			// 创建HttpPost
+			HttpPost httpPost = new HttpPost(reqURL);
+			// 由于下面使用的是new
+			// UrlEncodedFormEntity(....),所以这里不需要手工指定CONTENT_TYPE为application/x-www-form-urlencoded
+			// 因为在查看了HttpClient的源码后发现,UrlEncodedFormEntity所采用的默认CONTENT_TYPE就是application/x-www-form-urlencoded
+			// httpPost.setHeader(HTTP.CONTENT_TYPE,
+			// "application/x-www-form-urlencoded; charset=" + encodeCharset);
+			// 构建POST请求的表单参数
+			if (null != params) {
+				List<NameValuePair> formParams = new ArrayList<NameValuePair>();
+				for (Map.Entry<String, String> entry : params.entrySet()) {
+					formParams.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
+				}
+				httpPost.setEntity(new UrlEncodedFormEntity(formParams, encodeCharset));
+			}
+			HttpResponse response = httpClient.execute(httpPost);
+			HttpEntity entity = response.getEntity();
+			if (null != entity) {
+				responseContent = EntityUtils.toString(entity, ContentType.getOrDefault(entity).getCharset());
+				EntityUtils.consume(entity);
+			}
+		} catch (ConnectTimeoutException cte) {
+			System.out.println("请求通信[" + reqURL + "]时连接超时,堆栈轨迹如下" + cte);
+		} catch (SocketTimeoutException ste) {
+			System.out.println("请求通信[" + reqURL + "]时读取超时,堆栈轨迹如下" + ste);
+		} catch (Exception e) {
+			System.out.println("请求通信[" + reqURL + "]时偶遇异常,堆栈轨迹如下" + e);
+		} finally {
+			httpClient.getConnectionManager().shutdown();
+		}
+		return responseContent;
+	}
 }

+ 2 - 2
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gklhxkgl/gkjylhbg/ctl/LhbgCtl.java

@@ -391,7 +391,7 @@ public class LhbgCtl extends BaseWebCtl {
 
 		entity.setSftb(Constants.YES);
 		lhbgService.save(entity);
-		String url = "/GK_OPERATION_JSJY_LHBG_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
+		String url = "GK_OPERATION_JSJY_LHBG_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
 
 		boolean flag = getTbStatus(url);
 		if (flag) {
@@ -604,7 +604,7 @@ public class LhbgCtl extends BaseWebCtl {
 						}
 						fjid = fjid.substring(0, fjid.length() - 1);
 					}
-					String url = "/GK_OPERATION_JSJY_LHBG_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
+					String url = "GK_OPERATION_JSJY_LHBG_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");

+ 3 - 3
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gklhxkgl/gkjylhsq/ctl/LhsqCtl.java

@@ -493,7 +493,7 @@ public class LhsqCtl extends BaseWebCtl {
 
 				lhsqEntity.setSftb(Constants.YES);
 				lhsqService.save(lhsqEntity);
-				String url = "/GK_OPERATION_JSJY_LHSQ_ONE_CP?condition=ID=" + lhsqEntity.getId() + ";FJID=" + fjid;
+				String url = "GK_OPERATION_JSJY_LHSQ_ONE_CP?condition=ID=" + lhsqEntity.getId() + ";FJID=" + fjid;
 
 				boolean flag = getTbStatus(url);
 				if (flag) {
@@ -611,7 +611,7 @@ public class LhsqCtl extends BaseWebCtl {
 
 		entity.setSftb(Constants.YES);
 		lhsqService.save(entity);
-		String url = "/GK_OPERATION_JSJY_LHSQ_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
+		String url = "GK_OPERATION_JSJY_LHSQ_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
 
 		boolean flag = getTbStatus(url);
 		if (flag) {
@@ -775,7 +775,7 @@ public class LhsqCtl extends BaseWebCtl {
 						fjid = fjid.substring(0, fjid.length() - 1);
 					}
 					
-					String url = "/GK_OPERATION_JSJY_LHSQ_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
+					String url = "GK_OPERATION_JSJY_LHSQ_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");

+ 2 - 2
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gklhxkgl/gkjylhyx/ctl/LhyxCtl.java

@@ -599,7 +599,7 @@ public class LhyxCtl extends BaseWebCtl {
 						fjid = fjid.substring(0, fjid.length() - 1);
 					}
 					
-					String url = "/GK_OPERATION_JSJY_LHYX_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
+					String url = "GK_OPERATION_JSJY_LHYX_ONE_PC?condition=ID=" + entity.getId()+";FJID="+fjid;
 					boolean tbflag = getTbStatus(url);
 					if (tbflag) {
 						entity.setTbzt("Y");
@@ -637,7 +637,7 @@ public class LhyxCtl extends BaseWebCtl {
 
 		entity.setSftb(Constants.YES);
 		lhyxService.save(entity);
-		String url = "/GK_OPERATION_JSJY_LHYX_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
+		String url = "GK_OPERATION_JSJY_LHYX_ONE_CP?condition=ID=" + id + ";FJID=" + fjid;
 
 		boolean flag = getTbStatus(url);
 		if (flag) {

+ 31 - 1
gkjsjy/trunk/src/com/xt/jygl/workflow/service/impl/BaseWorkFlowServiceImpl.java

@@ -1,20 +1,49 @@
 package com.xt.jygl.workflow.service.impl;
 
+import java.io.IOException;
 import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.net.SocketTimeoutException;
+import java.net.URLEncoder;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
 import java.text.ParseException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import javax.el.MethodNotFoundException;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
 
 import org.activiti.engine.ActivitiException;
 import org.activiti.engine.impl.pvm.delegate.ActivityExecution;
 import org.activiti.engine.task.Task;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.conn.ssl.X509HostnameVerifier;
+import org.apache.http.entity.ContentType;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 
+import com.xt.jygl.common.GlobalData;
 import com.xt.jygl.common.service.JyglBaseService;
 import com.xt.jygl.workflow.entity.TaskInfoEntity;
 import com.xt.jygl.workflow.param.WorkFlowParam;
@@ -22,6 +51,7 @@ import com.xt.jygl.workflow.service.BaseWorkFlowService;
 import com.xt.jygl.workflow.service.TaskInfoService;
 import com.xt.jygl.workflow.service.WorkflowMangerService;
 import com.xtframe.sec.common.BaseEntity;
+import com.xtframe.sec.user.entity.UserEntity;
 import com.xtframe.sec.utils.SecUtils;
 
 /**
@@ -198,5 +228,5 @@ public abstract class BaseWorkFlowServiceImpl<T extends BaseEntity<ID>, ID exten
 	public List<TaskInfoEntity> findByBusIdAndBusKeyAndRecordStatus(String busId) {
 		return taskInfoService.findByBusIdAndBusKeyAndRecordStatus(busId, getProcessDefinitionKey());
 	}
-
+	
 }