wtt
10 小时以前 e1ef8b7895ff3d5b0f36c7678fbe529a569fa4ac
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -800,8 +800,11 @@
        }
        [Route("Cg_POOrderBill/jindieCloud")]
        [HttpPost]
        public bool jindieCloud(int HSupID,int MaterID)
        public object jindieCloud(int HSupID,int MaterID)
        {
            try
            {
                oCN.BeginTran();
            Int64 HInterID = 0;
            string HBillNo = "";
            string sErrMsg = "";
@@ -816,24 +819,43 @@
            websLsmain.HEmpID = MaterID;
            websLsmain.HSTOCKORGID = 100038;
            //websLsmain.HBillType = mainList[0].HBillType;
            if (!oWebs.set_Bill_New(websLsmain, "1100", ref DBUtility.ClsPub.sErrInfo))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "返回金蝶单据失败";  //成功!
                objJsonResult.data = null;
                return false;
            }
            objJsonResult = AddBillMould(HBillNo, MaterID, HSupID);
            if (objJsonResult.code == "0")
            {
                    oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = objJsonResult.Message;
                objJsonResult.data = null;
                return false;
                    return objJsonResult;
            }
            return true;
                if (!oWebs.set_Bill_New(websLsmain, "1100", ref DBUtility.ClsPub.sErrInfo))
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "返回金蝶单据失败";  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "提交成功";  //成功!
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        public json AddBillMould(string HBillNo,int MaterID,int HSupID)
        {