Browse Source

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

ld_liqk 9 năm trước cách đây
mục cha
commit
dd5c1f831f

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

@@ -160,6 +160,10 @@ public class GlobalData {
 		if (StringUtils.hasLength(prop)) {
 			WEIXIN_IP = prop;
 		}
+		prop = String.valueOf(p.get("weixin.port"));
+		if (StringUtils.hasLength(prop)) {
+			WEIXIN_PORT = prop;
+		}
 		prop = String.valueOf(p.get("sjyh.url"));
 		if (StringUtils.hasLength(prop)) {
 			SJYH_URL = prop;

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

@@ -51,6 +51,7 @@ import com.xt.jygl.workflow.service.impl.BaseWorkFlowServiceImpl;
 import com.xtframe.core.support.SecurityMgr;
 import com.xtframe.sec.common.BaseEntity;
 import com.xtframe.sec.common.SecRepository;
+import com.xtframe.sec.role.entity.RoleEntity;
 import com.xtframe.sec.user.entity.UserEntity;
 import com.xtframe.sec.utils.SecUtils;
 import com.xtframe.util.StringUtils;
@@ -152,14 +153,21 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 			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);
+			List<RoleEntity> reList = securityMgr.roleService().findByCode(Constants.ROLE_DCSBSC);
+			if (reList != null && reList.size() > 0) {
+				for (RoleEntity re : reList) {
+					List<UserEntity> ueList = securityMgr.userService().findByRole(re.getId());
+					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;
 
@@ -279,6 +287,7 @@ public class DcsbServiceImpl extends BaseWorkFlowServiceImpl<DcsbEntity, String>
 			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\"}";
+			System.out.println("@@@@"+json);
 			sendWxmsg(json);
 		} catch (Exception e) {
 			flag = false;