|
@@ -7,6 +7,7 @@ import nc.impl.pubapp.pattern.database.IDQueryBuilder;
|
|
|
import nccloud.itf.bd.wadataexplain.IWadataexplainQryService;
|
|
|
import nc.ui.querytemplate.querytree.IQueryScheme;
|
|
|
import nc.vo.hrwa.wadataexplain.Wadataexplain;
|
|
|
+import nc.vo.pubapp.AppContext;
|
|
|
import nccloud.dto.baseapp.querytree.dataformat.QueryTreeFormatVO;
|
|
|
import nccloud.framework.service.ServiceLocator;
|
|
|
import nccloud.framework.web.container.IRequest;
|
|
@@ -36,6 +37,45 @@ public <T> Object execute(IRequest request, T para) throws Exception {
|
|
|
IWadataexplainQryService service = ServiceLocator.find(IWadataexplainQryService.class);
|
|
|
String wherepart = scheme.getWhereSQLOnly();
|
|
|
wherepart = wherepart == null ? "1=1" : wherepart;
|
|
|
+
|
|
|
+ //add by longht 增加查询过滤,按权限项目 20211220 start
|
|
|
+ String powersql = "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'";
|
|
|
+
|
|
|
+ wherepart = wherepart +" and pk_wa_classitem in ("+powersql+")";
|
|
|
+ //add by longht 增加查询过滤,按权限项目 20211220 end
|
|
|
String[] ids = service.queryPKs(wherepart);
|
|
|
if(ids == null || ids.length <= 0) {
|
|
|
return grid;
|