|
@@ -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;
|