WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -67,6 +67,70 @@
        }
        #endregion
        #region 上模单 保存前、保存后控制
        //保存前控制
        public json BeforeSave_MouldUpperBill(Int64 HInterID, string HBillNo, Int64 OperationType)
        {
            DataSet BeforeSave = oCN.RunProcReturn("Exec h_p_Sc_MouldUpperBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldUpperBill_BeforeSaveCtrl");
            if (BeforeSave == null || BeforeSave.Tables[0].Rows.Count == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存前判断失败!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else if (DBUtility.ClsPub.isLong(BeforeSave.Tables[0].Rows[0]["HBack"]) == 1)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;  //失败!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //保存后控制
        public json AfterSave_MouldUpperBill(Int64 HInterID, string HBillNo, Int64 OperationType)
        {
            DataSet AfterSave = oCN.RunProcReturn("Exec h_p_Sc_MouldUpperBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldUpperBill_AfterSaveCtrl");
            if (AfterSave == null || AfterSave.Tables[0].Rows.Count == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存后判断失败!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else if (DBUtility.ClsPub.isLong(AfterSave.Tables[0].Rows[0]["HBack"]) == 1)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;  //失败!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 上模单 新增
        /// <summary>
        /// 新增单据-保存按钮
@@ -136,6 +200,16 @@
                if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 1);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //主表
                    oCN.RunProc(@"Insert Into Sc_MouldUpperBillMain   
                   (HBillType,HBillStatus, HBillSubType, HInterID, HBillNo, HDate
@@ -147,7 +221,18 @@
                }
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 2);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //修改
                    oCN.RunProc("update Sc_MouldUpperBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
@@ -157,7 +242,7 @@
                    oCN.RunProc("delete from Sc_MouldUpperBillSub where HInterID='" + HInterID + "'");
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID, HBillNo);
                objJsonResult = AddBillSub(msg3, HInterID, HBillNo, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -183,7 +268,7 @@
            }
        }
        public json AddBillSub(string msg3, long HInterID,string HBillNo)
        public json AddBillSub(string msg3, long HInterID,string HBillNo, Int64 OperationType)
        {
            List<ClsSc_MouldUpperBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldUpperBillSub>>(msg3);
            int i = 0;
@@ -200,6 +285,32 @@
                     "') ");
            }
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 2);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
@@ -746,6 +857,70 @@
        }
        #endregion
        #region 下模单 保存前、保存后控制
        //保存前控制
        public json BeforeSave_MouldLowerBill(Int64 HInterID, string HBillNo, Int64 OperationType)
        {
            DataSet BeforeSave = oCN.RunProcReturn("Exec h_p_Sc_MouldLowerBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldLowerBill_BeforeSaveCtrl");
            if (BeforeSave == null || BeforeSave.Tables[0].Rows.Count == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存前判断失败!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else if (DBUtility.ClsPub.isLong(BeforeSave.Tables[0].Rows[0]["HBack"]) == 1)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;  //失败!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //保存后控制
        public json AfterSave_MouldLowerBill(Int64 HInterID, string HBillNo, Int64 OperationType)
        {
            DataSet AfterSave = oCN.RunProcReturn("Exec h_p_Sc_MouldLowerBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldLowerBill_AfterSaveCtrl");
            if (AfterSave == null || AfterSave.Tables[0].Rows.Count == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存后判断失败!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else if (DBUtility.ClsPub.isLong(AfterSave.Tables[0].Rows[0]["HBack"]) == 1)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;  //失败!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 下模单 新增
        /// <summary>
        /// 新增单据-保存按钮
@@ -815,6 +990,16 @@
                if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 1);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //主表
                    oCN.RunProc(@"Insert Into Sc_MouldLowerBillMain   
                   (HBillType,HBillStatus, HBillSubType, HInterID, HBillNo, HDate
@@ -826,7 +1011,18 @@
                }
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 2);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //修改
                    oCN.RunProc("update Sc_MouldLowerBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
@@ -836,7 +1032,7 @@
                    oCN.RunProc("delete from Sc_MouldLowerBillSub where HInterID='" + HInterID + "'");
                }
                //保存子表
                objJsonResult = AddMouldLowerBill(msg3, HInterID, HBillNo);
                objJsonResult = AddMouldLowerBill(msg3, HInterID, HBillNo, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -862,7 +1058,7 @@
            }
        }
        public json AddMouldLowerBill(string msg3, long HInterID, string HBillNo)
        public json AddMouldLowerBill(string msg3, long HInterID, string HBillNo, Int64 OperationType)
        {
            List<ClsSc_MouldLowerBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldLowerBillSub>>(msg3);
            int i = 0;
@@ -879,6 +1075,32 @@
                     "') ");
            }
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                //保存后控制
                objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 2);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
@@ -1375,6 +1597,41 @@
        }
        #endregion
        #region 下模单查询上模单信息 列表查询
        [Route("Sc_MouldLowerBill/Sc_MouldUpperBillList")]
        [HttpGet]
        public object Sc_MouldUpperBillList(string sWhere)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from  h_v_Qj_Sc_MouldUpperBillList where 1=1" + sWhere, "h_v_Qj_Sc_MouldUpperBillList");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查无数据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                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_MouldUpperBill/txtHBarCode_KeyDown")]
@@ -1392,73 +1649,7 @@
                    return objJsonResult;
                }
                //拆分条形码
                string sBillBarCode = HBarCode.Trim();
                //截取条码类型 前两位
                string BillNoType2 = sBillBarCode.Substring(0, Math.Min(2, sBillBarCode.Length));
                //截取条码类型 前五位
                string BillNoType3 = sBillBarCode.Substring(0, Math.Min(5, sBillBarCode.Length));
                //截取条码类型3 前四位
                string BillNoType4 = sBillBarCode.Substring(0, Math.Min(4, sBillBarCode.Length));
                //截取条码类型 前八位
                string BillNoType5 = sBillBarCode.Substring(0, Math.Min(8, sBillBarCode.Length));
                switch (BillNoType2)
                {
                    //生产资源
                    case "BM":
                    case "SS":
                        ds = oCN.RunProcReturn("select HItemID,HName,HNumber from Gy_Source where HNumber = '" + HBarCode + "'", "Gy_Source");
                        break;
                    case "MO":
                        ds = oCN.RunProcReturn("select 单据号,hmainid,HEntryID from h_v_IF_ICMOBillList where 单据号 = '" + HBarCode + "'", "h_v_IF_ICMOBillList");
                        break;
                    default:
                        break;
                }
                switch (BillNoType3)
                {
                    //器具档案
                    case "MJD":
                    case "PAK":
                    case "https":
                        HBarCode = HBarCode.Substring(23, HBarCode.Length-23);
                        ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList where 条码编号 = '" + HBarCode + "'", "h_v_Gy_MouldFileList");
                        break;
                    default:
                        break;
                }
                switch (BillNoType4)
                {
                    //流转卡
                    case "GXLX":
                        ds = oCN.RunProcReturn("select 任务单号,hicmointerid,HICMOEntryID,单据号,hmainid,HEntryID from h_v_Sc_ProcessExchangeBillQuerySub where 单据号 = '" + HBarCode + "'", "h_v_Sc_ProcessExchangeBillQuerySub");
                        break;
                    //生产订单
                    case "9010":
                        ds = oCN.RunProcReturn("select 单据号,hmainid,HEntryID from h_v_IF_ICMOBillList where 单据号 = '" + HBarCode + "'", "h_v_IF_ICMOBillList");
                        break;
                    default:
                        break;
                }
                DateTime date;
                bool flag = false;
                if (BillNoType5.Length == 8) {
                    BillNoType5 = BillNoType5.Substring(0, 4) + "-" + BillNoType5.Substring(4, 2) + "-" + BillNoType5.Substring(6, 2);
                }
                flag = DateTime.TryParse(BillNoType5, out date);
                if (flag) {
                    ds = oCN.RunProcReturn("select 任务单号,hicmointerid,HICMOEntryID,单据号,hmainid,HEntryID from h_v_Sc_ProcessExchangeBillQuerySub where 单据号 = '" + HBarCode + "'", "h_v_Sc_ProcessExchangeBillQuerySub");
                }
                ds = oCN.RunProcReturn("exec h_p_Sc_AllowLoadData '" + HBarCode + "'", "h_p_Sc_AllowLoadData");
                if (ds == null || ds .Tables.Count== 0 || ds.Tables[0].Rows.Count == 0)
                {
@@ -1554,6 +1745,16 @@
                if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 1);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //主表
                    oCN.RunProc(@"Insert Into Sc_MouldUpperBillMain   
                   (HBillType,HBillStatus, HBillSubType, HInterID, HBillNo, HDate
@@ -1565,7 +1766,18 @@
                }
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 2);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //修改
                    oCN.RunProc("update Sc_MouldUpperBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
@@ -1575,7 +1787,7 @@
                    oCN.RunProc("delete from Sc_MouldUpperBillSub where HInterID='" + HInterID + "'");
                }
                //保存子表
                objJsonResult = AddBillSub_PDA(msg2, HInterID, HBillNo);
                objJsonResult = AddBillSub_PDA(msg2, HInterID, HBillNo, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -1601,7 +1813,7 @@
            }
        }
        public json AddBillSub_PDA(string msg2, long HInterID, string HBillNo)
        public json AddBillSub_PDA(string msg2, long HInterID, string HBillNo, Int64 OperationType)
        {
            List<ClsSc_MouldUpperBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldUpperBillSub>>(msg2);
            int i = 0;
@@ -1619,11 +1831,34 @@
                     + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString()
                     + "','" + oSub.HProcExchBillNo.ToString() + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString()
                     + ",'" + oSub.HScanDate.ToString() + "','" + oSub.HMouldNumber.ToString() + "') ");
                //反写模具状态
                oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='领出' where HInterID= "+ oSub.HMouldID.ToString());
            }
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 2);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
@@ -1701,6 +1936,16 @@
                if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 1);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //主表
                    oCN.RunProc(@"Insert Into Sc_MouldLowerBillMain   
                   (HBillType,HBillStatus, HBillSubType, HInterID, HBillNo, HDate
@@ -1712,7 +1957,18 @@
                }
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                {
                    //保存前控制
                    objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 2);
                    if (objJsonResult.count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //修改
                    oCN.RunProc("update Sc_MouldLowerBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
@@ -1722,7 +1978,7 @@
                    oCN.RunProc("delete from Sc_MouldLowerBillSub where HInterID='" + HInterID + "'");
                }
                //保存子表
                objJsonResult = AddSc_MouldLowerBillSub_PDA(msg2, HInterID, HBillNo);
                objJsonResult = AddSc_MouldLowerBillSub_PDA(msg2, HInterID, HBillNo, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -1748,7 +2004,7 @@
            }
        }
        public json AddSc_MouldLowerBillSub_PDA(string msg2, long HInterID, string HBillNo)
        public json AddSc_MouldLowerBillSub_PDA(string msg2, long HInterID, string HBillNo, Int64 OperationType)
        {
            List<ClsSc_MouldLowerBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldLowerBillSub>>(msg2);
            int i = 0;
@@ -1766,11 +2022,34 @@
                     + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString()
                     + "','" + oSub.HProcExchBillNo.ToString() + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString()
                     + ",'" + oSub.HScanDate.ToString() + "','" + oSub.HMouldNumber.ToString() + "') ");
                //反写模具状态
                oCN.RunProc("update Gy_MouldFileMain set HMouldStatus='在库' where HInterID= " + oSub.HMouldID.ToString());
            }
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                //保存后控制
                objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 2);
                if (objJsonResult.count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;