陈雯静
2024-03-15 4fd75e476900a304dbe4eb18b0afa2c810b2e0cc
WebAPI/Controllers/WebAPIController.cs
@@ -8109,14 +8109,34 @@
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已禁用!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有数据,无法删除!";
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                    return objJsonResult;
                }
@@ -10050,7 +10070,7 @@
        /// <returns></returns>
        [Route("Web/GetEquipmentBillsList")]
        [HttpGet]
        public object GetEquipmentBillsList(string sWhere, string Type)
        public object GetEquipmentBillsList(string sWhere, string Type,string user)
        {            
            try
            {
@@ -10082,6 +10102,15 @@
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                {
                    //不是管理员
                    sWhere += " and 制单人 = '" + user + "'";
                }
                string sql = string.Format(@"select * from " + HView + " where 1 = 1 " + sWhere);
                ds = oCN.RunProcReturn(sql, HView);
                //添加列名