fs-danaus
2021-03-16 b9e8fc5bba5c30050cae3419a414c3d999365295
src/com/yc/app/v2/service/impl/BaseFormServiceImpl.java
@@ -318,7 +318,12 @@
        } else {
            final Map map = (Map)formVOEntity.getPersion().get(formVOEntity.getFormId()+"");
            if (map == null ) {
                throw new ApplicationException("没有打开" + formVOEntity.getFormId() + "功能号权限,请联系系统管理员");
                //多表子功能号的权限取主功能号
                if(formVOEntity.getIs496()!=null&&formVOEntity.getIs496()==1){
                    return null;
                }else {
                    throw new ApplicationException("没有打开" + formVOEntity.getFormId() + "功能号权限,请联系系统管理员");
                }
            } else {
                //9801设置的操作权限,优先级最高
                if (gformEntity.getOptype() != null ) {
@@ -464,9 +469,11 @@
                    //----统计列表
                    String tbexpr = " case when (" + gFieldEntity.getShowfieldvalueexpression() + ") = 0  then 0 else   " + fieldId + " end ";
                    valueExp.add(expr);
                    //----权限表达式决定是星号还是原值
                    //----权限表达式决定是星号还是原值,
                    // 由于前端公式需要用到原值,不能直接输出星号 by danaus 2021/3/15 15:46
                    String valueExpr = " case  (" + gFieldEntity.getShowfieldvalueexpression() + ")  when  0  then '******'  else cast(" + fieldId + " as varchar(30)) end as [" + fieldId + "]";
                    valueExp.add(valueExpr);
                   // valueExp.add("[" + fieldId + "]");
                    tbExpMap.put(fieldId, tbexpr);
                } else {
                    valueExp.add("[" + fieldId + "]");
@@ -643,6 +650,7 @@
     * @return
     */
    protected String compareWhere(GformEntity gformEntity, String where, Map<String, String> env) {
        if(!gformEntity.isGetHeadTabe()) return  where;
        StringBuilder sb = new StringBuilder();
        if (StringUtils.isNotBlank(where)) {
            sb.append(where);
@@ -758,7 +766,11 @@
                    String sybo = "'";
                    parmStr = parmStr.replaceAll(s, sybo + env.get(s.replaceAll("'", "")) + sybo);
                } else {
                    parmStr = parmStr.replaceAll(s, env.get(s));
                    try {
                        parmStr = parmStr.replaceAll(s, env.get(s));
                    }catch (Exception e){
                        parmStr = parmStr.replaceAll(s, env.get("@"+s));
                    }
                }
            }