public ActionResult GetGoodsInfoPageList(MdmGoodsListQuery query)
 {
     try
     {
         var result = _mdmGoodsListRepository.GetGoodsInfoPageList(query);
         return(Page(result.Data, result.Page));
     }
     catch (Exception ex)
     {
         return(Fail("获取失败:" + ex.Message));
     }
 }
 /// <summary>
 /// 获取商品分页数据
 /// </summary>
 /// <param name="query"></param>
 /// <returns></returns>
 public dynamic GetGoodsInfoPageList(MdmGoodsListQuery query)
 {
     return(_sqlQuery.Select(@"gd.GL_ID,gd.GL_NO,gd.GL_NAME,gd.GL_STATUS,gd.UDF2,gd.UPDATE_DATE,CASE WHEN gd.GL_STATUS=1 THEN '已上架' ELSE '未上架' END GL_STATUS_TEXT       
                         ,(SELECT CLASS_NAME FROM MDM_GOODS_CLASS WHERE CLASS_ID=gd.GL_LARGECLASS) AS LARGECLASS_TEXT
                         ,(SELECT CLASS_NAME FROM MDM_GOODS_CLASS WHERE CLASS_ID=gd.GL_INCLASS) AS INCLASS_TEXT
                         ,(SELECT CLASS_NAME FROM MDM_GOODS_CLASS WHERE CLASS_ID=gd.GL_SMALLCLASS) AS SMALLCLASS_TEXT
                         ,(SELECT CLASS_NAME FROM MDM_GOODS_CLASS WHERE CLASS_ID=gd.GL_SUBCLASS) AS SUBCLASS_TEXT,
                         gd.GL_LARGECLASS,gd.GL_INCLASS,gd.GL_SMALLCLASS,
                         bu.BU_NAME,BU.PARENT_BU_NAME")
            .Filter("gd.DEL_FLAG", 1)
            .Filter("gd.CREATE_ORG_NO", AbpSession.ORG_NO)
            .Filter("gd.IS_ERPGOODS", 0)
            .Contains("gd.GL_NAME", query.GL_NAME)
            .Contains("gd.GL_NO", query.GL_NO)
            .Filter("gd.GL_STATUS", query.GL_STATUS)
            .Filter("gd.GL_LARGECLASS", query.GL_LARGECLASS)
            .Filter("gd.GL_INCLASS", query.GL_INCLASS)
            .Filter("gd.GL_SMALLCLASS", query.GL_SMALLCLASS)
            .Filter("bu.PARENT_BU_NO", query.AREA_NO)
            .Filter("bu.BU_NO", query.BU_NO)
            .OrderBy("gd.UPDATE_DATE desc")
            .GetPageList <dynamic>(@"MDM_GOODS_LIST gd left join mdm_bu_mstr bu on gd.bu_no=bu.bu_no", Context.Database.GetDbConnection(), query));
 }