/// <summary>
        /// 返回下拉列表
        /// </summary>
        /// <param name="vSql"></param>
        /// <returns></returns>
        public List <LH_Policy> Select_List()
        {
            var helper = new OracleDBHelper();

            var list = helper.Select <LH_Policy>(@"SELECT DISTINCT HEADID,POLICYNAME,ORDERTYPE,ORDERSUBTYPE,PRODCHANNEL,DEPTNAME from LH_POLICY");

            return(list);
        }
Exemplo n.º 2
0
        public List <LH_Policy> GetPolicies(ICPOBILL_PolicyDTO header)
        {
            //检查传入参数是否合法
            CheckNull(header);
            var helper = new OracleDBHelper();
            var sql    =
                @"SELECT DISTINCT HEADID,POLICYNAME,ORDERTYPE,ORDERSUBTYPE,PRODCHANNEL,DEPTNAME from LH_POLICY WHERE 1=1 ";

            //选择订单类型为常规订单的,如果用户要选择促销政策头ID的话则需要同时判断:订单所属公司(事业部)、厂家账号(经销商账号)、销售渠道、业务类型、五项头字段信息来取促销政策头ID信息
            string where = $@"AND ORDERTYPE='{header.OrderType}' AND DEPTNAME LIKE '%{header.BrandName}%' 
                                    AND ORDERSUBTYPE='{header.OrderSubType}' AND PRODCHANNEL='{header.Channel}' AND ACCTCODES LIKE '%{header.Account}%'";

            sql += where;

            var policies = helper.Select <LH_Policy>(sql);

            return(policies);
        }