wtt
2025-03-17 15316f51a5e129c2ebcf8dabff4ac30c1ee1dc32
WebAPI/Controllers/Éú²ú¹ÜÀí/ÖÊÁ¿»ã±¨µ¥/Sc_QualityReportBillController.cs
@@ -91,18 +91,26 @@
                    {
                        ds = oCN.RunProcReturn
                     ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                     ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID" +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty " +
                     ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HSourceID,s.HName HSourceName" +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName,a.HProcID,p.HName HProcName" +
                     " from Sc_ICMOBillStatus_Tmp a " +
                     " left join Gy_Material m on a.HMaterID=m.HItemID " +
                     " left join Gy_Department d on a.HDeptID=d.HItemID " +
                     " left join Gy_Unit u on m.HUnitID=u.HItemID " +
                     " left join Gy_Source s on a.HSourceID=s.HItemID " +
                     " left join Gy_Process p on a.HProcID = p.HItemID " +
                     " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                    else {
                        ds = oCN.RunProcReturn
                         ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID " +
                         ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID,a.HSourceID,s.HName HSourceName" +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName,a.HProcID,p.HName HProcName " +
                         " from Sc_ICMOBillStatus_Tmp a " +
                         " left join Gy_Material m on a.HMaterID=m.HItemID " +
                         " left join Gy_Department d on a.HDeptID=d.HItemID " +
                         " left join Gy_Unit u on m.HUnitID=u.HItemID " +
                         " left join Gy_Source s on a.HSourceID=s.HItemID " +
                         " left join Gy_Process p on a.HProcID = p.HItemID " +
                         " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                 
@@ -231,6 +239,7 @@
                BillNew.HMaterID = mainList[0].HMaterID;
                BillNew.HSourceID = mainList[0].HSourceID;
                BillNew.HGroupID = mainList[0].HGroupID;
                BillNew.HDeptID = mainList[0].HDeptID;
                BillNew.HCheckManID = mainList[0].HCheckManID;
                BillNew.HBadReasonID = mainList[0].HBadReasonID;
                BillNew.HBarCode = mainList[0].HBarCode;
@@ -246,13 +255,13 @@
                oCN.RunProc("Insert Into Sc_ICMOBillQualityStatus_Tmp " +
                    " (HInterID,HBillNo,HDate,HICMOBillNo,HICMOInterID" +
                    ",HProcExchBillNo,HProcExchInterID,HProcExchEntryID,HProcID,HMaterID" +
                    ",HSourceID,HGroupID,HCheckManID,HBadReasonID,HBarCode" +
                    ",HSourceID,HGroupID,HDeptID,HCheckManID,HBadReasonID,HBarCode" +
                    ",HMaker,HMakeDate,HBillType,HReportType,HSourceBillNo" +
                    ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID,HBadReasonHQty" +
                ") " +
                " values(" + BillNew.HInterID + ",'" + BillNew.HBillNo + "','" + BillNew.HDate + "','" + BillNew.HICMOBillNo + "'," + BillNew.HICMOInterID + 
                ",'" + BillNew.HProcExchBillNo + "'," + BillNew.HProcExchInterID + "," + BillNew.HProcExchEntryID + "," + BillNew.HProcID + "," + BillNew.HMaterID +
                "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HDeptID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                ",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "','" + BillNew.HBillType + "','" + +BillNew.HReportType + "','" +BillNew.HSourceBillNo + "'" +
                "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HICMOEntryID + "," + BillNew.HBadReasonHQty +
                ") ");
@@ -631,7 +640,7 @@
        #region æäº¤ä¿å­˜ï¼Œå­˜ä¸»å­è¡¨åŠæ˜Žç»†è¡¨
        [Route("Sc_QualityReportBill/set_SaveBill")]
        [HttpGet]
        public object set_SaveBill(long HInterID,string HBillNo, string HChecker,string HBadReasonHQty)
        public object set_SaveBill(long HInterID,string HBillNo, string HChecker,string HBillSubType)
        {
            try
            {
@@ -658,8 +667,18 @@
                    return objJsonResult;
                }
                //=========================================================
                //保存
                oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID+",'"+ HBadReasonHQty +"'");
                //保存  æ‰¹é‡ä¿å­˜å…ˆçœ‹å­è¡¨æ˜¯å¦æœ‰æ•°æ®,有数据就进 å­˜å…¥ä¸»è¡¨  æ˜Žç»†è¡¨    æ²¡æœ‰å°±å­˜å‚¨ä¸»å­æ˜Žç»†è¡¨
                string sql = "select * from Sc_QualityReportBillSub where HInterID = '" + HInterID + "'";
                ds = oCN.RunProcReturn(sql, "Sc_QualityReportBillSub");
                if (ds.Tables[0].Rows.Count>0)
                {
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBillSum '" + HInterID + "','" + HBillSubType +"'");
                }
                else
                {
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBill '" + HInterID + "','" + HBillSubType + "'");
                }
                //判断是否允许保存,不允许则回滚
                ds = oCN.RunProcReturn("exec h_p_JIT_ICMOBillQualityStatus_SaveCtrl", "h_p_JIT_ICMOBillQualityStatus_SaveCtrl");
                if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
@@ -744,7 +763,102 @@
        }
        #endregion
        #region ä¸è‰¯é‡‡é›†æ‰¹é‡æ±‡æŠ¥ æ–°å¢ž
        [Route("Sc_QualityReportBill/SaveSc_QualityReportBillSub")]
        [HttpPost]
        public object SaveSc_QualityReportBillSub([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();                             //表头数据
            string msg3 = sArray[1].ToString();                             //子表1数据
            string refSav = sArray[2].ToString();                           //操作方式
            string msg4 = sArray[3].ToString();                             //用户
            DBUtility.ClsPub.CurUserName = msg4;
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsSc_QualityReportBill oBill = new DAL.ClsSc_QualityReportBill();
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                List<Model.ClsSc_QualityReportBillSub> ls = new List<Model.ClsSc_QualityReportBillSub>();
                ls = oListModels.getObjectByJson_Sc_QualityReportBillSub(msg3);
                int i = 0;
                foreach (Model.ClsSc_QualityReportBillSub oSub in ls)
                {
                    i++;
                    oSub.HMakeDate = DateTime.Now;
                    oSub.HEntryID = i;
                    string subSql = "Insert into Sc_QualityReportBillSub " +
                 " (HInterID,HEntryID,HBillNo_bak,HRemark" +
                 ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                 ",HMaterID,HUnitID,HQty,HResult,HEmpID,HSourceID,HProcID,HBadReasonID,HBadReasonNumber,HBadPhenomenaID,HGroupID" +
                 ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
                 ",HBarCode,HReportType" +
                 ",HAddr,HMaker,HMakeDate" +
                 ") values(" +
                 "" + oSub.HInterID.ToString() + "" +
                 "," + oSub.HEntryID.ToString() + "" +
                 ",'" + oSub.HBillNo_bak + "'" +
                 ",'" + oSub.HRemark + "'" +
                 "," + oSub.HSourceInterID.ToString() + "" +
                 "," + oSub.HSourceEntryID.ToString() + "" +
                 ",'" + oSub.HSourceBillNo + "'" +
                 ",'" + oSub.HSourceBillType + "'" +
                 "," + oSub.HRelationQty.ToString() + "" +
                 "," + oSub.HRelationMoney.ToString() +
                 "," + oSub.HMaterID.ToString() + "" +
                 "," + oSub.HUnitID.ToString() + "" +
                 ",'" + oSub.HQty.ToString() +
                 "','" + oSub.HResult + "'" +
                 "," + oSub.HEmpID.ToString() + "" +
                 "," + oSub.HSourceID.ToString() + "" +
                 "," + oSub.HProcID.ToString() + "" +
                 "," + oSub.HBadReasonID.ToString() + "" +
                 ",'" + oSub.HBadReasonNumber.ToString() + "'" +
                "," + oSub.HBadPhenomenaID.ToString() + "" +
                 ",'" + oSub.HGroupID.ToString() + "'" +
                 "," + oSub.HICMOInterID.ToString() + "" +
                 "," + oSub.HICMOEntryID.ToString() + "" +
                 ",'" + oSub.HICMOBillNo + "'" +
                 "," + oSub.HProcExchInterID + "" +
                 "," + oSub.HProcExchEntryID + "" +
                 ",'" + oSub.HProcExchBillNo + "'" +
                 ",'" + oSub.HBadReasonNumber.ToString() + "'" +
                 ",'" + 1 +
                 "','" + oSub.HAddr + "'" +
                 ",'" + msg4 + "'" +
                 ",GETDATE()" +
                 ") ";
                    oCN.RunProc(subSql);
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存成功!";
                objJsonResult.data = 1;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
@@ -1621,6 +1735,9 @@
            public string HName;
            public DateTime HBeginDate;
            public DateTime HEndDate;
            public string HProcName;
            public string HEquipName;
            public string HBactNo;
        }
        [Route("Sc_QualityReportBill/getSc_QualityReportBillDay")]
        [HttpGet]
@@ -1639,7 +1756,7 @@
                    return objJsonResult;
                }
                ReportWorkDemandPlanBill Report = JsonConvert.DeserializeObject<ReportWorkDemandPlanBill>(sWhere);
                ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMain  '{Report.HBeginDate}','{Report.HEndDate}','{Report.HNumber}','{Report.HName}'", "h_p_Sc_StationOutBillMain");
                ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMain  '{Report.HBeginDate}','{Report.HEndDate}','{Report.HNumber}','{Report.HName}','{Report.HProcName}','{Report.HEquipName}','{Report.HBactNo}'", "h_p_Sc_StationOutBillMain");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1667,6 +1784,328 @@
        }
        #endregion
        #region ç”Ÿäº§è´¨é‡æœˆæ±‡æŠ¥å•列表 æŸ¥è¯¢
        public class ReportWorkDemandPlanBill1
        {
            public string HYear;
            public string HWorkCenter;
            public string HName;
            public DateTime HBeginDate;
            public DateTime HEndDate;
        }
        [Route("Sc_QualityReportBill/getSc_QualityReportBillMonth")]
        [HttpGet]
        public object getSc_QualityReportBillMonth(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ReportWorkDemandPlanBill1 Report = JsonConvert.DeserializeObject<ReportWorkDemandPlanBill1>(sWhere);
                ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMonth  '{Report.HYear}','{Report.HWorkCenter}','{Report.HName}', '{Report.HBeginDate}','{Report.HEndDate}'", "h_p_Sc_StationOutBillMonth");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™ç”Ÿäº§è‰¯çŽ‡ç»Ÿè®¡(斯莫尔) æŸ¥è¯¢
        [Route("Sc_QualityReportBill/getSc_HMaterYieldStatistics")]
        [HttpGet]
        public object getSc_HMaterYieldStatistics(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_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_Sc_HMater_Yield_Statistics_Query order by å•据号 desc", "h_v_Sc_HMater_Yield_Statistics_Query");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_HMater_Yield_Statistics_Query where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by æ—¥æœŸ desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_HMater_Yield_Statistics_Query");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ä»»åŠ¡å•é€šè¿‡çŽ‡(斯莫尔) æŸ¥è¯¢
        [Route("Sc_QualityReportBill/getSc_HICMMaterStatistics")]
        [HttpGet]
        public object getSc_HICMMaterStatistics(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_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_Sc_HICMMater_Statistics_Query order by å•据号 desc", "h_v_Sc_HICMMater_Statistics_Query");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_HICMMater_Statistics_Query where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by æ—¥æœŸ desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_HICMMater_Statistics_Query");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç”Ÿäº§è´¨é‡æ±‡æŠ¥å•_PDA æ–°å¢ž
        [Route("Sc_QualityReportBill/SaveSc_QualityReportBill_PDA")]
        [HttpPost]
        public object SaveSc_QualityReportBill_PDA([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();                             //表头数据
            string msg3 = sArray[1].ToString();                             //子表1数据
            string refSav = sArray[2].ToString();                           //操作方式
            string msg4 = sArray[3].ToString();                             //用户
            DBUtility.ClsPub.CurUserName = msg4;
            ListModels oListModels = new ListModels();
            string s = "";
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Sc_QualityReportBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsSc_QualityReportBill oBill = new DAL.ClsSc_QualityReportBill();
                List<Model.ClsSc_QualityReportBillMain> lsmain = new List<Model.ClsSc_QualityReportBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Sc_QualityReportBillMain(msg2);
                foreach (Model.ClsSc_QualityReportBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsSc_QualityReportBillSub> ls = new List<Model.ClsSc_QualityReportBillSub>();
                ls = oListModels.getObjectByJson_Sc_QualityReportBillSub(msg3);
                int i = 0;
                foreach (Model.ClsSc_QualityReportBillSub oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (refSav == "Add")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (refSav == "Update")
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = false;
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
    }
}