yzh
2021-10-08 21141fd4e8a1b3445a500733a1aeb880d5be748f
web/Dao/GwProductDao.cs
@@ -249,7 +249,37 @@
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.Append("select ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, OP_GROUP_ID, API_SP_XH_ID, GIVING_NUM, REMARK from GW_PRODUCT where 1=1");
            //stringBuilder.Append("select ID, NAME, ICON, INSTRUCTIONS, CLASSES, PARENT_ID, PATH, IS_DEFAULT, IS_ENABLE, SORT, OP_GROUP_ID, API_SP_XH_ID, GIVING_NUM, REMARK from GW_PRODUCT where 1=1");
            stringBuilder.Append(" select * from ( ");
            stringBuilder.Append(" select ID, NAME, ICON, INSTRUCTIONS,  ");
            stringBuilder.Append(" case CLASSES when 0 then '0-产品分类' ");
            stringBuilder.Append(" else '1-产品' ");
            stringBuilder.Append(" END AS ");
            stringBuilder.Append(" CLASSES,  ");
            stringBuilder.Append(" type_id||'-'||type_name PARENT_ID, ");
            stringBuilder.Append(" PATH,  ");
            stringBuilder.Append(" case IS_DEFAULT when 0 then '0-否' ");
            stringBuilder.Append(" else '1-默认' ");
            stringBuilder.Append(" END AS ");
            stringBuilder.Append(" IS_DEFAULT,  ");
            stringBuilder.Append(" case IS_ENABLE when 0 then '0-已停用' ");
            stringBuilder.Append(" else '1-已启用' ");
            stringBuilder.Append(" END AS ");
            stringBuilder.Append(" IS_ENABLE,  ");
            stringBuilder.Append(" SORT,  ");
            stringBuilder.Append(" (select group_id||'-'||group_name from gw_op_group where group_id=OP_GROUP_ID ) ");
            stringBuilder.Append(" OP_GROUP_ID,  ");
            stringBuilder.Append(" (select xh_id||'-'||xh_name from sys_xh where xh_id=API_SP_XH_ID ) ");
            stringBuilder.Append(" API_SP_XH_ID,  ");
            stringBuilder.Append(" GIVING_NUM, REMARK  ");
            stringBuilder.Append(" from GW_PRODUCT a ");
            stringBuilder.Append(" left join (select id type_id, name type_name from gw_product where classes=0) b ");
            stringBuilder.Append(" on a.PARENT_ID = b.type_id ");
            stringBuilder.Append(" ) aa ");
            stringBuilder.Append(" where 1=1 ");
            OracleParameter[] oracleParameterArray = new OracleParameter[3];
            if (name != null && name != "")
            {
@@ -271,7 +301,7 @@
            }
            if (op_group_id != null && op_group_id != "")
            {
                oracleParameterArray[2] = new OracleParameter(":op_group_id", (OracleDbType)126);
                oracleParameterArray[2] = new OracleParameter(":op_group_id", (OracleDbType)112);
                ((DbParameter)oracleParameterArray[2]).Value = (object)op_group_id;
                stringBuilder.Append(" and op_group_id=:op_group_id");
            }