Forráskód Böngészése

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

ld_xuhx 8 éve
szülő
commit
d99609c4cf
1 módosított fájl, 25 hozzáadás és 14 törlés
  1. 25 14
      gkjsjy/trunk/src/com/xt/jygl/gkjcxx/gq/ctl/GqCtl.java

+ 25 - 14
gkjsjy/trunk/src/com/xt/jygl/gkjcxx/gq/ctl/GqCtl.java

@@ -117,7 +117,8 @@ public class GqCtl extends BaseWebCtl {
 					CacheSearchCondition.predicateList(list, cacheSCmap, root, cb, "id", "ssgkglbm");
 				}
 				if (isJyr()) {
-					//list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + getSsjyr().getId() + "%"));
+					// list.add(cb.like(root.get("ssjyr").get("id").as(String.class),
+					// "%" + getSsjyr().getId() + "%"));
 				} else {
 					In<String> in = cb.in(root.get("id").as(String.class));
 					@SuppressWarnings("unchecked")
@@ -268,18 +269,22 @@ public class GqCtl extends BaseWebCtl {
 			entity.setSzd(szd);
 			entity.setZyid(code.getZyid());
 			gqService.save(entity);
+
+			List<String> gqList = gqService.findGqListByUserId(securityMgr.getCurrUser().getId());
+			Utils.getSession().setAttribute("gqList", gqList);
+			if (gqList != null && gqList.size() > 0) {
+				Utils.getSession().setAttribute("gkList", gkService.findByGqList(gqList));
+			}
 			// 如果是市级新增或者修改,保存后同步到省级
-			/*try {
-				if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY) && needWS()) {
-					GqWebService webService = gqService.getWebService(null);
-					webService.save(code);
-					code.setTbzt(Constants.YES);
-					gqService.save(code);
-				}
-			} catch (Exception e) {
-				code.setTbzt(Constants.NO);
-				gqService.save(code);
-			}*/
+			/*
+			 * try { if
+			 * (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY) &&
+			 * needWS()) { GqWebService webService =
+			 * gqService.getWebService(null); webService.save(code);
+			 * code.setTbzt(Constants.YES); gqService.save(code); } } catch
+			 * (Exception e) { code.setTbzt(Constants.NO); gqService.save(code);
+			 * }
+			 */
 		} catch (Exception e) {
 			wr.setSuccess(false);
 			wr.setMessage("操作失败!");
@@ -375,7 +380,13 @@ public class GqCtl extends BaseWebCtl {
 			gqService.logicDelete(id);
 			// 如果是市级刪除,省级也刪除
 			GqEntity gq = gqService.findOne(id);
-			try {
+			// 港口管理人员的权限设置,取得有权限的港区
+			List<String> gqList = gqService.findGqListByUserId(securityMgr.getCurrUser().getId());
+			Utils.getSession().setAttribute("gqList", gqList);
+			if (gqList != null && gqList.size() > 0) {
+				Utils.getSession().setAttribute("gkList", gkService.findByGqList(gqList));
+			}
+			/*try {
 				if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY) && needWS()) {
 					GqWebService webService = gqService.getWebService(null);
 					webService.delete(id);
@@ -385,7 +396,7 @@ public class GqCtl extends BaseWebCtl {
 			} catch (Exception e) {
 				gq.setTbzt(Constants.NO);
 				gqService.save(gq);
-			}
+			}*/
 		} catch (Exception e) {
 			wr.setSuccess(false);
 			wr.setMessage("删除失败!");