|
@@ -58,36 +58,24 @@ public <T> Object execute(IRequest request, T para) throws Exception {
|
|
|
wherepart = wherepart + " and pk_wa_class in (" + powersqlclass + ")";
|
|
|
|
|
|
// add by longht 增加查询过滤,按权限项目 20211220 start
|
|
|
- String powersqlpro = "select wa_classitem.pk_wa_classitem "
|
|
|
-// "select wa_itempower.pk_itempower,\n"
|
|
|
-// + " wa_classitem.pk_wa_class,\n"
|
|
|
-// + " wa_classitem.pk_wa_item,\n"
|
|
|
-// + " wa_classitem.name name,\n"
|
|
|
-// + " wa_classitem.pk_wa_classitem,\n"
|
|
|
-// + " wa_itempower.editflag,\n"
|
|
|
-// + " wa_itempower.moduleflag,\n"
|
|
|
-// + " wa_classitem.pk_org,\n"
|
|
|
-// + " wa_classitem.pk_group,\n"
|
|
|
-// + " wa_itempower.ts,\n"
|
|
|
-// + " wa_classitem.ifromflag,\n"
|
|
|
-// + " wa_itempower.subject_type,\n"
|
|
|
-// + " wa_itempower.pk_subject\n"
|
|
|
- + " from wa_classitem\n" + " inner join wa_waclass\n"
|
|
|
- + " on wa_waclass.pk_org = wa_classitem.pk_org\n"
|
|
|
- + " and wa_waclass.pk_wa_class = wa_classitem.pk_wa_class\n"
|
|
|
- + " and wa_waclass.cyear = wa_classitem.cyear\n" + " and wa_waclass.cperiod = wa_classitem.cperiod\n"
|
|
|
- + " inner join wa_item\n" + " on wa_classitem.pk_wa_item = wa_item.pk_wa_item\n"
|
|
|
- + " left outer join wa_itempower\n" + " on wa_itempower.pk_wa_item = wa_classitem.pk_wa_item\n"
|
|
|
- + " and wa_itempower.pk_wa_class = wa_classitem.pk_wa_class\n"
|
|
|
- + " and wa_itempower.pk_org = wa_classitem.pk_org\n" + " and ( wa_itempower.pk_subject = '"
|
|
|
- + AppContext.getInstance().getPkUser() + "'"
|
|
|
- + " or pk_subject in ( SELECT sur.pk_role FROM sm_user_role sur where sur.cuserid = '"
|
|
|
- + AppContext.getInstance().getPkUser() + "'))\n"
|
|
|
-//+ " where wa_waclass.pk_org = '"+pk_org+"' \n"
|
|
|
- + " where 1=1 \n"
|
|
|
-//+ " wa_waclass.pk_wa_class = '"+pk_wa_class+"'\n"
|
|
|
- + " and wa_item.mid = 'N'\n" + " and wa_itempower.editflag ='Y'";
|
|
|
-
|
|
|
+ String powersqlpro =
|
|
|
+ "select distinct wa_classitem.pk_wa_classitem\n" +
|
|
|
+ " from wa_classitem\n" +
|
|
|
+ " inner join wa_item\n" +
|
|
|
+ " on wa_classitem.pk_wa_item = wa_item.pk_wa_item\n" +
|
|
|
+ " inner join wa_itempower\n" +
|
|
|
+ " on wa_itempower.pk_wa_item = wa_classitem.pk_wa_item\n" +
|
|
|
+ " and wa_itempower.pk_wa_class = wa_classitem.pk_wa_class\n" +
|
|
|
+ " and wa_itempower.pk_org = wa_classitem.pk_org\n" +
|
|
|
+ " and (wa_itempower.pk_subject = '"+ AppContext.getInstance().getPkUser() +"' or\n" +
|
|
|
+ " wa_itempower.pk_subject in\n" +
|
|
|
+ " (SELECT sur.pk_role\n" +
|
|
|
+ " FROM sm_user_role sur\n" +
|
|
|
+ " where sur.cuserid = '"+ AppContext.getInstance().getPkUser() +"'))\n" +
|
|
|
+ " where 1 = 1\n" +
|
|
|
+ " and wa_item.mid = 'N'\n" ;
|
|
|
+ //" and wa_itempower.editflag = 'Y'"; //20220105 add by longht 去掉,保证能查到历史数据
|
|
|
+
|
|
|
wherepart = wherepart +" and pk_wa_classitem in ("+powersqlpro+")";
|
|
|
|
|
|
|