ch
2022-07-29 098d529e0d74efd131ec2c70df59b84abb336da7
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÁìÁÏ·¢»õ/Kf_MateOutBackBillController.cs
@@ -24,16 +24,46 @@
        [Route("Kf_MateOutBackBill/GetMateOutBillList")]
        [HttpGet]
        public object GetMateOutBillList(string sWhere)
        public object GetMateOutBillList(string sWhere,string user)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by æ—¥æœŸ desc", "h_v_IF_MateOutBackBillList");
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Kf_MateOutBackBill_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_MateOutBackBillList order by hmainid desc", "h_v_IF_MateOutBackBillList");
                }
                else
                {
                    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 = "返回记录成功!";
                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)
            {
@@ -57,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;
@@ -151,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;
@@ -258,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;
@@ -440,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;
@@ -559,10 +589,10 @@
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    //oItemSub.HRemark = "";         //备注
                    oItemSub.HSourceInterID = 0;     // æºå•主内码
                    oItemSub.HSourceEntryID = 0;   //源单子内码
                    //oItemSub.HSourceBillNo = "";  //源单单号
                    //oItemSub.HSourceBillType = ""; //源单类型
                    oItemSub.HSourceInterID = lsmain[0].HSourceInterID;     // æºå•主内码
                    oItemSub.HSourceEntryID = lsmain[0].HSourceEntryID;   //源单子内码
                    oItemSub.HSourceBillNo = lsmain[0].HSourceBillNo;  //源单单号
                    oItemSub.HSourceBillType = lsmain[0].HSourceBillType; //源单类型
                    //oItemSub.HRelationQty = 0;     //关联数量
                    //oItemSub.HRelationMoney = 0;   //关联金额 
                    //oItemSub.HRepairID = 0;       //维修项目
@@ -619,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;