ch
2022-05-07 3a7b856d957e777310d33b1b016b167f92b002bc
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÁìÁÏ·¢»õ/Kf_MateOutBackBillController.cs
@@ -24,35 +24,46 @@
        [Route("Kf_MateOutBackBill/GetMateOutBillList")]
        [HttpGet]
        public object GetMateOutBillList(string sWhere)
        public object GetMateOutBillList(string sWhere,string user)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by æ—¥æœŸ desc", "h_v_IF_MateOutBackBillList");
                }
                else
                {
                    string sql = "select * from h_v_IF_MateOutBackBillList " + sWhere+ " order by æ—¥æœŸ desc";
                    ds = oCn.RunProcReturn(sql, "h_v_IF_MateOutBackBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Kf_MateOutBackBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "false!";
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by hmainid desc", "h_v_IF_MateOutBackBillList");
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                    string sql = "select * from h_v_IF_MateOutBackBillList " + sWhere+ " order by hmainid desc";
                    ds = oCn.RunProcReturn(sql, "h_v_IF_MateOutBackBillList");
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception ex)
            {
@@ -76,7 +87,7 @@
        public object set_DeleteBill(string HInterID,string user)
        {
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Delete", 1, true, user))
            if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Drop", 1, false, user))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
@@ -170,7 +181,7 @@
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -277,7 +288,7 @@
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -459,7 +470,7 @@
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Edit", 1, true, msg4))
                if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -638,7 +649,7 @@
        {
            //flag=1 å®¡æ ¸ï¼›  flag=2 åå®¡æ ¸
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Check", 1, true, user))
            if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Check", 1, false, user))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;