zzr99
2022-02-10 dac1d793ad118eebf9048588a356ae0ea8a3aa95
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -43,11 +43,11 @@
                string sql1 = string.Format(@"select * from h_v_Gy_MaterialList where 组织名称='" + Organization + "'");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn(sql1 + sWhere + "order by HItemID desc", "h_v_Gy_MaterialList");
                    ds = oCN.RunProcReturn(sql1 + sWhere + " order by 物料代码 ", "h_v_Gy_MaterialList");
                }
                else
                {
                    string sql = sql1 + sWhere + "order by HItemID desc";
                    string sql = sql1 + sWhere + " order by 物料代码 ";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterialList");
                }
@@ -383,12 +383,12 @@
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 日期 desc", "h_v_Gy_MouldFileList");
                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by hmainid desc", "h_v_Gy_MouldFileList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_MouldFileList where 1 = 1 ";
                    string sql = sql1 + sWhere + "order by 日期 desc";
                    string sql = sql1 + sWhere + "order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -477,18 +477,28 @@
        /// </summary>
        [Route("Gy_BarCodeBillList/GetBarCodeBillList")]
        [HttpGet]
        public object GetBarCodeBillList(string sWhere)
        public object GetBarCodeBillList(string sWhere,string user)
        {
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList " + sWhere + "order by 日期 desc", "h_v_IF_BarCodeBillList");
                    ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList order by hmainid desc", "h_v_IF_BarCodeBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_BarCodeBillList where 1 = 1 ";
                    string sql = sql1 + sWhere + "order by 日期 desc";
                    string sql = sql1 + sWhere + "order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)