王 垚
2022-04-06 9167264eeb081fdbb94d8a1d2f76f35a6ccdd5fe
WebAPI/Controllers/QC_POStockInCheckBillController.cs
@@ -24,17 +24,28 @@
        /// <summary>
        /// 返回列表
        /// 来料入库检验单
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
       [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")]
        [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")]
        [HttpGet]
        public object GetPOStockInCheckBill(string sWhere)
        public object GetPOStockInCheckBill(string sWhere,string user)
        {
            try
            {
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = QC_POStockInCheckBill(sWhere);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "返回记录成功!";
@@ -55,12 +66,12 @@
        {
            if (sWhere == null || sWhere.Equals(""))
            {
                return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_QC_Edit_POStockInCheckBillList order by 日期 desc", "h_v_QC_Edit_POStockInCheckBillList");
                return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_QC_Edit_POStockInCheckBillList order by hmainid desc", "h_v_QC_Edit_POStockInCheckBillList");
            }
            else
            {
                string sql1 = "select * from h_v_QC_Edit_POStockInCheckBillList where 1 = 1 ";
                string sql = sql1 + sWhere + "order by 日期 desc";
                string sql = sql1 + sWhere + "order by hmainid desc";
                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_QC_Edit_POStockInCheckBillList");
            }
@@ -148,8 +159,19 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();
            try
            {
                //判断权限
                if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                msg2 = "[" + msg2.ToString() + "]";
                List<QC_POStockInCheckBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_POStockInCheckBill>>(msg2);
                int HYear = 2021;
@@ -275,10 +297,20 @@
        /// <returns></returns>
        [Route("QC_POStockInCheckBill/DeltetPOStockInCheckBill")]
        [HttpGet]
        public object DeltetPOStockInCheckBill(string HInterID)
        public object DeltetPOStockInCheckBill(string HInterID,string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("Delete From QC_POStockInCheckBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From QC_POStockInCheckBillSub where HInterID = " + HInterID);