Преглед изворни кода

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

ld_xuhx пре 9 година
родитељ
комит
6c2ec0c4d4

+ 17 - 9
gkjsjy/trunk/src/com/xt/jygl/common/BaseWebCtl.java

@@ -28,7 +28,6 @@ import rtx.RTXSvrApi;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.liandi.encrypt.Des;
-import com.xt.jygl.gkjcxx.gq.entity.GqEntity;
 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;
@@ -352,18 +351,27 @@ public class BaseWebCtl extends BaseCtl {
 	}
 
 	// rtx提醒
-	public void rtxSend(String gqid, String role, String msg) {
-		if (!StringUtils.isEmpty(gqid)) {
-			GqEntity gq = gqService.findOne(gqid);
-			RoleEntity roleEntity = securityMgr.roleService().findById(role);
-			List<UserEntity> ulist = securityMgr.userService().findByRole(roleEntity.getId());
-			if (ulist != null && ulist.size() > 0) {
-				for (UserEntity u : ulist) {
-					if (u.getSsglbm().getId() == gq.getSsgkglbm().getId()) {
+	public void rtxSend(String userids, String role, String msg) {
+
+		if (StringUtils.isEmpty(userids)) {
+			List<RoleEntity> rolelist = securityMgr.roleService().findByCode(role);
+			RoleEntity roleEntity = new RoleEntity();
+			if (rolelist != null && rolelist.size() > 0) {
+				roleEntity = rolelist.get(0);
+				List<UserEntity> ulist = securityMgr.userService().findByRole(roleEntity.getId());
+				if (ulist != null && ulist.size() > 0) {
+					for (UserEntity u : ulist) {
 						inserttx(u.getId(), msg);
 					}
 				}
 			}
+		} else {
+			if (!StringUtils.isEmpty(userids)) {
+				String[] users = userids.split(",");
+				for (String userid : users) {
+					inserttx(userid, msg);
+				}
+			}
 		}
 
 	}

+ 8 - 1
gkjsjy/trunk/src/com/xt/jygl/common/Constants.java

@@ -40,8 +40,15 @@ public class Constants {
 
 	public final static String ROLE_NDSHPZ = "ndshpz";// 年度审核批准
 	
-	public final static String ROLE_LD = "ld";// 年度审核批准
+	public final static String ROLE_LD = "ld";// 领导
+	
+	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";// 专家评审
 	// 已办结
 	public static String BLTX_STATUS_DONE = "2";
 	// 已办结