llj
12 小时以前 83ce7da7a744897443a0a6cb860a9a89e4c970ee
修复报废单生成其他出库单
2个文件已修改
45 ■■■■ 已修改文件
DAL/生产管理/模具管理/ClsSc_MouldScrapOutBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldScrapOutBill.cs
@@ -206,7 +206,7 @@
                    return false;
                }
                oCn.BeginTran();
                //oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into Sc_MouldStockBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -281,7 +281,7 @@
                {
                    sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žæˆåŠŸï¼";
                }
                oCn.Commit();
                //oCn.Commit();
                return true;
            }
            catch (Exception e)
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -10651,6 +10651,7 @@
        [HttpPost]
        public object SaveGetMouldScrapOutHouseBillList([FromBody] JObject msg)
        {
            oCN.BeginTran();
            DAL.ClsSc_MouldScrapOutBill oBill = new DAL.ClsSc_MouldScrapOutBill();
            var _value = msg["msg"].ToString();
@@ -10769,24 +10770,28 @@
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "海城")
                    {
                        if (setOutBill(msg))
                        if (setOutBill(msg, ref DBUtility.ClsPub.sErrInfo))
                        {
                            objJsonResult.code = "0";
                            oCN.Commit();
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;  //成功!
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            oCN.RollBack();
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "金蝶单据保存失败!";
                            objJsonResult.Message = "金蝶单据保存失败!"+ DBUtility.ClsPub.sErrInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    objJsonResult.code = "0";
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;  //成功!
                    objJsonResult.data = null;
@@ -10796,6 +10801,7 @@
                }
                else
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
@@ -10805,6 +10811,7 @@
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.Message;
@@ -10813,7 +10820,7 @@
            }
        }
        public bool setOutBill([FromBody] JObject msg)
        public bool setOutBill([FromBody] JObject msg, ref string sErrInfo)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
@@ -10821,6 +10828,8 @@
            string sMainStr = sArray[0].ToString();         //主表数据
            string sSubStr = sArray[1].ToString();          //子表数据
            string HMaker = sArray[2].ToString();           //制单人
            long id;
            DataSet ds = oCn.RunProcReturn("select max(HInterID) HInterID from Sc_MouldStockBillMain ", "Sc_MouldStockBillMain");
            try
            {
                //List<Model.ClsKf_OtherOutBillMain> lsmain = new List<Model.ClsKf_OtherOutBillMain>();
@@ -10833,9 +10842,13 @@
                //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                string sSourceBillType = "3832";
                if(lsmain[0].HInterID==0)
                {
                    id = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]);
                WebAPI.WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HInterID = id;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HSupID = lsmain[0].HSupID;
@@ -10862,16 +10875,26 @@
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return false;
                }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "请从新增界面生成金蝶单据" +DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return false;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "上传失败!" + e.ToString();