|  |  |  | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [Route("POStockInBill/get_CheckTypeByBarCode_Json")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID) | 
|---|
|  |  |  | //public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | //    try | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        string sErrMsg = ""; | 
|---|
|  |  |  | //        string sJXCode = ""; | 
|---|
|  |  |  | //        if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  客户定制化名称     空白为通用 | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker); | 
|---|
|  |  |  | //            SourceFlag = true; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        else | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            sJXCode = sCode; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker); | 
|---|
|  |  |  | //        //if (sRedBlue == true) | 
|---|
|  |  |  | //        //{ | 
|---|
|  |  |  | //        //    HBillType = "1239"; | 
|---|
|  |  |  | //        //} | 
|---|
|  |  |  | //        //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | //        WebS.WebService1 oWebs = new WebS.WebService1(); | 
|---|
|  |  |  | //        WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); | 
|---|
|  |  |  | //        string sExpressNumber = ""; | 
|---|
|  |  |  | //        WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | //        //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | //        if (WebSoBar == null) | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            objJsonResult.code = "0"; | 
|---|
|  |  |  | //            objJsonResult.count = 0; | 
|---|
|  |  |  | //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo; | 
|---|
|  |  |  | //            objJsonResult.data = null; | 
|---|
|  |  |  | //            return objJsonResult; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        else | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            objJsonResult.code = "0"; | 
|---|
|  |  |  | //            objJsonResult.count = 1; | 
|---|
|  |  |  | //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo; | 
|---|
|  |  |  | //            objJsonResult.data = WebSoBar; | 
|---|
|  |  |  | //            return objJsonResult; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | //    catch (Exception e) | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        objJsonResult.code = "0"; | 
|---|
|  |  |  | //        objJsonResult.count = 1; | 
|---|
|  |  |  | //        objJsonResult.Message = e.Message + ";" + e.StackTrace; | 
|---|
|  |  |  | //        objJsonResult.data = null; | 
|---|
|  |  |  | //        return objJsonResult; | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //} | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string sBillNo, string sBillType, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | object result; | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker); | 
|---|
|  |  |  | //if (sRedBlue == true) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | //    HBillType = "1239"; | 
|---|
|  |  |  | //} | 
|---|
|  |  |  | //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | WebS.WebService1 oWebs = new WebS.WebService1(); | 
|---|
|  |  |  | WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); | 
|---|
|  |  |  | string sExpressNumber = ""; | 
|---|
|  |  |  | WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | if (WebSoBar == null) | 
|---|
|  |  |  | string hexpressNumber = ""; | 
|---|
|  |  |  | WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, this.HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo); | 
|---|
|  |  |  | bool flag = WebSoBar == null; | 
|---|
|  |  |  | if (flag) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = ClsPub.sErrInfo; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | result = this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; | 
|---|
|  |  |  | objJsonResult.data = WebSoBar; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 1; | 
|---|
|  |  |  | this.objJsonResult.Message = ClsPub.sErrInfo; | 
|---|
|  |  |  | this.objJsonResult.data = WebSoBar; | 
|---|
|  |  |  | result = this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | catch (Exception ex) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = e.Message + ";" + e.StackTrace; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 1; | 
|---|
|  |  |  | this.objJsonResult.Message = ex.Message + ";" + ex.StackTrace; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | result = this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | bool flag3 = dataSet5.Tables[0].Rows.Count > 0; | 
|---|
|  |  |  | if (!flag3) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //POStockInBillController postockInBillController = new POStockInBillController(); | 
|---|
|  |  |  | //postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); | 
|---|
|  |  |  | POStockInBillController postockInBillController = new POStockInBillController(); | 
|---|
|  |  |  | postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WEBSController webscontroller4 = new WEBSController(); | 
|---|
|  |  |  | object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  | //WEBSController webscontroller4 = new WEBSController(); | 
|---|
|  |  |  | //object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | '@' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | string str14 = array3[0]; | 
|---|
|  |  |  | long num61 = (long)ClsPub.isInt(array3[4]); | 
|---|
|  |  |  | //long num61 = (long)ClsPub.isInt(array3[4]); | 
|---|
|  |  |  | Double num61 = ClsPub.isDoule(array3[4]); | 
|---|
|  |  |  | string text46 = array3[6]; | 
|---|
|  |  |  | DateTime dateTime13 = ClsPub.isDate(array3[3]); | 
|---|
|  |  |  | DateTime dateTime14 = ClsPub.isDate(array3[5]); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //[Route("POStockInBill/set_SavePOStockInBill_Json")] | 
|---|
|  |  |  | //[HttpPost] | 
|---|
|  |  |  | //public object set_SavePOStockInBill_Json([FromBody] JObject oMain) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | //    string text = oMain["oMain"].ToString(); | 
|---|
|  |  |  | //    string jsonString = text.ToString(); | 
|---|
|  |  |  | //    object result; | 
|---|
|  |  |  | //    try | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        List<ClsKf_POStockInBillMain> list = new List<ClsKf_POStockInBillMain>(); | 
|---|
|  |  |  | //        ListModels listModels = new ListModels(); | 
|---|
|  |  |  | //        list = listModels.getPOStockInBillMainByJson(jsonString); | 
|---|
|  |  |  | //        list[0].HYear = ClsPub.isLong(DateTime.Now.Year); | 
|---|
|  |  |  | //        list[0].HDate = ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | //        string hbillType = list[0].HBillType; | 
|---|
|  |  |  | //        WebAPI.WebS.ClsKf_POStockInBillMain clsKf_POStockInBillMain = new WebAPI.WebS.ClsKf_POStockInBillMain(); | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HInterID = list[0].HInterID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HBillNo = list[0].HBillNo; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HBillType = "1201"; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HDate = list[0].HDate; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HDeptID = list[0].HDeptID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HWHID = list[0].HWHID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HSCWHID = 0L; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HSupID = list[0].HSupID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HKeeperID = list[0].HKeeperID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HSecManagerID = list[0].HSecManagerID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HEmpID = 0L; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HManagerID = 0L; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HBillerID = list[0].HBillerID; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HRemark = ""; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HInnerBillNo = ""; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HRedBlueFlag = false; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HMainSourceBillType = list[0].HBillType; | 
|---|
|  |  |  | //        clsKf_POStockInBillMain.HExplanation = list[0].HExplanation; | 
|---|
|  |  |  | //        bool flag = this.webserver.set_SavePOStockInBill_New(clsKf_POStockInBillMain, hbillType, ref ClsPub.sErrInfo); | 
|---|
|  |  |  | //        if (flag) | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //            this.objJsonResult.count = 1; | 
|---|
|  |  |  | //            this.objJsonResult.Message = "成功!单据号为:"; | 
|---|
|  |  |  | //            this.objJsonResult.data = null; | 
|---|
|  |  |  | //            result = this.objJsonResult; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        else | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //            this.objJsonResult.count = 0; | 
|---|
|  |  |  | //            this.objJsonResult.Message = "上传失败!" + ClsPub.sErrInfo; | 
|---|
|  |  |  | //            this.objJsonResult.data = null; | 
|---|
|  |  |  | //            result = this.objJsonResult; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | //    catch (Exception ex) | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //        this.objJsonResult.count = 0; | 
|---|
|  |  |  | //        this.objJsonResult.Message = "上传失败!" + ex.ToString(); | 
|---|
|  |  |  | //        this.objJsonResult.data = null; | 
|---|
|  |  |  | //        result = this.objJsonResult; | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | //    return result; | 
|---|
|  |  |  | //} | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 生产汇报单/提交/直接调webservice | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [Route("POStockInBillList/AuditPOInStockBillPost_AR")] | 
|---|
|  |  |  | [HttpPost] | 
|---|
|  |  |  | //public object AuditPOInStockBillPost_AR([FromBody] JObject msg) | 
|---|
|  |  |  | //{ | 
|---|
|  |  |  | //    object result; | 
|---|
|  |  |  | //    try | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        string text = msg["msg"].ToString(); | 
|---|
|  |  |  | //        text = text.Replace("\\", ""); | 
|---|
|  |  |  | //        text = text.Replace("\n", ""); | 
|---|
|  |  |  | //        List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text); | 
|---|
|  |  |  | //        DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); | 
|---|
|  |  |  | //        string hinterID = list[0].HInterID; | 
|---|
|  |  |  | //        string text2 = list[0].FID; | 
|---|
|  |  |  | //        string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | //        string singleSystemParameter2 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_ErpAduit", ref ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | //        string singleSystemParameter3 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_BarCodeCtl", ref ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | //        string configKey = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName"); | 
|---|
|  |  |  | //        string empty = string.Empty; | 
|---|
|  |  |  | //        this.oCn.BeginTran(); | 
|---|
|  |  |  | //        this.oCn.Commit(); | 
|---|
|  |  |  | //        bool flag = singleSystemParameter.Contains("安瑞"); | 
|---|
|  |  |  | //        if (flag) | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast"); | 
|---|
|  |  |  | //            DataRow dataRow = dataSet.Tables[0].Rows[0]; | 
|---|
|  |  |  | //            bool flag2 = dataSet.Tables[0].Rows.Count <= 0; | 
|---|
|  |  |  | //            if (flag2) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                this.objJsonResult.Message = "未找到对应的单据"; | 
|---|
|  |  |  | //                this.objJsonResult.data = null; | 
|---|
|  |  |  | //                return this.objJsonResult; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            bool flag3 = dataSet.Tables[0].Rows.Count >= 0; | 
|---|
|  |  |  | //            if (flag3) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                JObject jobject = new JObject(); | 
|---|
|  |  |  | //                string value = "SLD01_SYS"; | 
|---|
|  |  |  | //                string value2 = "CG"; | 
|---|
|  |  |  | //                bool flag4 = dataRow["FTYPENAME"].ToString().Contains("委外"); | 
|---|
|  |  |  | //                if (flag4) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    value = "SLD03_SYS"; | 
|---|
|  |  |  | //                    value2 = "WW"; | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //                bool flag5 = dataRow["FTYPENAME"].ToString().Contains("资产"); | 
|---|
|  |  |  | //                if (flag5) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    value = "SLD04_SYS"; | 
|---|
|  |  |  | //                    value2 = "ZCCG"; | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //                JObject jobject2 = jobject; | 
|---|
|  |  |  | //                string propertyName = "FBILLTYPEID"; | 
|---|
|  |  |  | //                JObject jobject3 = new JObject(); | 
|---|
|  |  |  | //                jobject3["Fnumber"] = value; | 
|---|
|  |  |  | //                jobject2.Add(propertyName, jobject3); | 
|---|
|  |  |  | //                jobject.Add("FBusinessType", value2); | 
|---|
|  |  |  | //                jobject.Add("FBILLNO", dataRow["HBillNo"].ToString()); | 
|---|
|  |  |  | //                jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | //                JObject jobject4 = jobject; | 
|---|
|  |  |  | //                string propertyName2 = "FStockOrgId"; | 
|---|
|  |  |  | //                JObject jobject5 = new JObject(); | 
|---|
|  |  |  | //                jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject4.Add(propertyName2, jobject5); | 
|---|
|  |  |  | //                JObject jobject6 = jobject; | 
|---|
|  |  |  | //                string propertyName3 = "FPurOrgId"; | 
|---|
|  |  |  | //                JObject jobject7 = new JObject(); | 
|---|
|  |  |  | //                jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject6.Add(propertyName3, jobject7); | 
|---|
|  |  |  | //                JObject jobject8 = jobject; | 
|---|
|  |  |  | //                string propertyName4 = "FSupplierId"; | 
|---|
|  |  |  | //                JObject jobject9 = new JObject(); | 
|---|
|  |  |  | //                jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject8.Add(propertyName4, jobject9); | 
|---|
|  |  |  | //                JObject jobject10 = jobject; | 
|---|
|  |  |  | //                string propertyName5 = "FPURCHASERID"; | 
|---|
|  |  |  | //                JObject jobject11 = new JObject(); | 
|---|
|  |  |  | //                jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject10.Add(propertyName5, jobject11); | 
|---|
|  |  |  | //                jobject.Add("FOwnerTypeIdHead", "BD_Supplier"); | 
|---|
|  |  |  | //                JObject jobject12 = jobject; | 
|---|
|  |  |  | //                string propertyName6 = "FOwnerIdHead"; | 
|---|
|  |  |  | //                JObject jobject13 = new JObject(); | 
|---|
|  |  |  | //                jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject12.Add(propertyName6, jobject13); | 
|---|
|  |  |  | //                jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() }); | 
|---|
|  |  |  | //                JArray jarray = new JArray(); | 
|---|
|  |  |  | //                foreach (object obj in dataSet.Tables[0].Rows) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    DataRow dataRow2 = (DataRow)obj; | 
|---|
|  |  |  | //                    JObject jobject14 = new JObject(); | 
|---|
|  |  |  | //                    JObject jobject15 = jobject14; | 
|---|
|  |  |  | //                    string propertyName7 = "FMaterialId"; | 
|---|
|  |  |  | //                    JObject jobject16 = new JObject(); | 
|---|
|  |  |  | //                    jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString(); | 
|---|
|  |  |  | //                    jobject15.Add(propertyName7, jobject16); | 
|---|
|  |  |  | //                    JObject jobject17 = jobject14; | 
|---|
|  |  |  | //                    string propertyName8 = "FUnitID"; | 
|---|
|  |  |  | //                    JObject jobject18 = new JObject(); | 
|---|
|  |  |  | //                    jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | //                    jobject17.Add(propertyName8, jobject18); | 
|---|
|  |  |  | //                    jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | //                    JObject jobject19 = jobject14; | 
|---|
|  |  |  | //                    string propertyName9 = "FPriceUnitId"; | 
|---|
|  |  |  | //                    JObject jobject20 = new JObject(); | 
|---|
|  |  |  | //                    jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | //                    jobject19.Add(propertyName9, jobject20); | 
|---|
|  |  |  | //                    JObject jobject21 = jobject14; | 
|---|
|  |  |  | //                    string propertyName10 = "FStockUnitID"; | 
|---|
|  |  |  | //                    JObject jobject22 = new JObject(); | 
|---|
|  |  |  | //                    jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | //                    jobject21.Add(propertyName10, jobject22); | 
|---|
|  |  |  | //                    JObject jobject23 = jobject14; | 
|---|
|  |  |  | //                    string propertyName11 = "FStockID"; | 
|---|
|  |  |  | //                    JObject jobject24 = new JObject(); | 
|---|
|  |  |  | //                    jobject24["Fnumber"] = "BJCK-SH.01.005"; | 
|---|
|  |  |  | //                    jobject23.Add(propertyName11, jobject24); | 
|---|
|  |  |  | //                    jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"])); | 
|---|
|  |  |  | //                    jobject14.Add("FOwnerTypeId", "BD_OwnerOrg"); | 
|---|
|  |  |  | //                    JObject jobject25 = jobject14; | 
|---|
|  |  |  | //                    string propertyName12 = "FOwnerID"; | 
|---|
|  |  |  | //                    JObject jobject26 = new JObject(); | 
|---|
|  |  |  | //                    jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString(); | 
|---|
|  |  |  | //                    jobject25.Add(propertyName12, jobject26); | 
|---|
|  |  |  | //                    jobject14.Add("FSrcId", dataRow2["FID"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder"); | 
|---|
|  |  |  | //                    jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FPrice", dataRow2["FPRICE"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString()); | 
|---|
|  |  |  | //                    JObject jobject27 = jobject14; | 
|---|
|  |  |  | //                    string propertyName13 = "FLOT"; | 
|---|
|  |  |  | //                    JObject jobject28 = new JObject(); | 
|---|
|  |  |  | //                    jobject28["Fnumber"] = dataRow2["hbatchno"].ToString(); | 
|---|
|  |  |  | //                    jobject27.Add(propertyName13, jobject28); | 
|---|
|  |  |  | //                    jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString()); | 
|---|
|  |  |  | //                    //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString()); | 
|---|
|  |  |  | //                    jobject14.Add("FDetailEntity_Link", new JArray | 
|---|
|  |  |  | //                    { | 
|---|
|  |  |  | //                        new JObject | 
|---|
|  |  |  | //                        { | 
|---|
|  |  |  | //                            { | 
|---|
|  |  |  | //                                "FDetailEntity_Link_FRULEID", | 
|---|
|  |  |  | //                                "PUR_PurchaseOrder-PUR_ReceiveBill" | 
|---|
|  |  |  | //                            }, | 
|---|
|  |  |  | //                            { | 
|---|
|  |  |  | //                                "FDetailEntity_Link_FSTableName", | 
|---|
|  |  |  | //                                "t_PUR_POOrderEntry" | 
|---|
|  |  |  | //                            }, | 
|---|
|  |  |  | //                            { | 
|---|
|  |  |  | //                                "FDetailEntity_Link_FSBillId", | 
|---|
|  |  |  | //                                dataRow2["FID"].ToString() | 
|---|
|  |  |  | //                            }, | 
|---|
|  |  |  | //                            { | 
|---|
|  |  |  | //                                "FDetailEntity_Link_FSId", | 
|---|
|  |  |  | //                                dataRow2["FEntryID"].ToString() | 
|---|
|  |  |  | //                            } | 
|---|
|  |  |  | //                        } | 
|---|
|  |  |  | //                    }); | 
|---|
|  |  |  | //                    jarray.Add(jobject14); | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //                jobject.Add("FDetailEntity", jarray); | 
|---|
|  |  |  | //                JObject jobject29 = new JObject(); | 
|---|
|  |  |  | //                JObject jobject30 = jobject29; | 
|---|
|  |  |  | //                string propertyName14 = "FSettleOrgId"; | 
|---|
|  |  |  | //                JObject jobject31 = new JObject(); | 
|---|
|  |  |  | //                jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject30.Add(propertyName14, jobject31); | 
|---|
|  |  |  | //                JObject jobject32 = jobject29; | 
|---|
|  |  |  | //                string propertyName15 = "FSettleCurrId"; | 
|---|
|  |  |  | //                JObject jobject33 = new JObject(); | 
|---|
|  |  |  | //                jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString(); | 
|---|
|  |  |  | //                jobject32.Add(propertyName15, jobject33); | 
|---|
|  |  |  | //                jobject29.Add("FPricePoint", 0); | 
|---|
|  |  |  | //                jobject.Add("FinanceEntity ", jobject29); | 
|---|
|  |  |  | //                JObject jobject34 = new JObject(); | 
|---|
|  |  |  | //                jobject34["Creator"] = ""; | 
|---|
|  |  |  | //                jobject34["NeedUpDateFields"] = new JArray(); | 
|---|
|  |  |  | //                jobject34["NeedReturnFields"] = new JArray(); | 
|---|
|  |  |  | //                jobject34["IsDeleteEntry"] = "false"; | 
|---|
|  |  |  | //                jobject34["SubSystemId"] = ""; | 
|---|
|  |  |  | //                jobject34["IsVerifyBaseDataField"] = "false"; | 
|---|
|  |  |  | //                jobject34["Model"] = jobject; | 
|---|
|  |  |  | //                JObject jobject35 = jobject34; | 
|---|
|  |  |  | //                string text3 = InvokeHelper.Login(); | 
|---|
|  |  |  | //                int num = JObject.Parse(text3)["LoginResultType"].Value<int>(); | 
|---|
|  |  |  | //                bool flag6 = num == 0; | 
|---|
|  |  |  | //                if (flag6) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                    this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                    this.objJsonResult.Message = text3; | 
|---|
|  |  |  | //                    this.objJsonResult.data = null; | 
|---|
|  |  |  | //                    return this.objJsonResult; | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //                string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString()); | 
|---|
|  |  |  | //                bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE"; | 
|---|
|  |  |  | //                if (!flag7) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                    this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                    this.objJsonResult.Message = text4; | 
|---|
|  |  |  | //                    this.objJsonResult.data = null; | 
|---|
|  |  |  | //                    return this.objJsonResult; | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //                string text5 = JObject.Parse(text4)["Result"]["Number"].ToString(); | 
|---|
|  |  |  | //                text2 = JObject.Parse(text4)["Result"]["Id"].ToString(); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            else | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                LogService.Write("收料通知单审核无数据:" + empty, "Vlog", true); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        else | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            JObject jobject36 = new JObject(); | 
|---|
|  |  |  | //            jobject36.Add("Creator", ""); | 
|---|
|  |  |  | //            jobject36.Add("NeedUpDateFields", new JArray()); | 
|---|
|  |  |  | //            jobject36.Add("NeedReturnFields", new JArray()); | 
|---|
|  |  |  | //            jobject36.Add("IsDeleteEntry", "false"); | 
|---|
|  |  |  | //            jobject36.Add("SubSystemId", ""); | 
|---|
|  |  |  | //            jobject36.Add("IsVerifyBaseDataField", ""); | 
|---|
|  |  |  | //            JObject jobject37 = new JObject(); | 
|---|
|  |  |  | //            jobject37.Add("FID", text2); | 
|---|
|  |  |  | //            JArray jarray2 = new JArray(); | 
|---|
|  |  |  | //            foreach (ReciveBill_FastModel reciveBill_FastModel in list) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                bool flag8 = reciveBill_FastModel.HSQty == 0m; | 
|---|
|  |  |  | //                if (!flag8) | 
|---|
|  |  |  | //                { | 
|---|
|  |  |  | //                    jarray2.Add(new JObject | 
|---|
|  |  |  | //                    { | 
|---|
|  |  |  | //                        { | 
|---|
|  |  |  | //                            "FEntryID", | 
|---|
|  |  |  | //                            reciveBill_FastModel.FEntryID | 
|---|
|  |  |  | //                        }, | 
|---|
|  |  |  | //                        { | 
|---|
|  |  |  | //                            "FActReceiveQty ", | 
|---|
|  |  |  | //                            reciveBill_FastModel.HSQty | 
|---|
|  |  |  | //                        } | 
|---|
|  |  |  | //                    }); | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            jobject37.Add("FDetailEntity", jarray2); | 
|---|
|  |  |  | //            jobject36.Add("Model", jobject37); | 
|---|
|  |  |  | //            string text6 = InvokeHelper.Login(); | 
|---|
|  |  |  | //            int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>(); | 
|---|
|  |  |  | //            bool flag9 = num2 <= 0; | 
|---|
|  |  |  | //            if (flag9) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                this.objJsonResult.Message = text6; | 
|---|
|  |  |  | //                this.objJsonResult.data = null; | 
|---|
|  |  |  | //                return this.objJsonResult; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString()); | 
|---|
|  |  |  | //            bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | //            if (flag10) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                LogService.Write("收料通知单修改失败jsonRoot:" + jobject36.ToString(), "Vlog", true); | 
|---|
|  |  |  | //                this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                this.objJsonResult.Message = "金蝶收料通知单更新失败" + text7; | 
|---|
|  |  |  | //                this.objJsonResult.data = null; | 
|---|
|  |  |  | //                return this.objJsonResult; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        var f__AnonymousType = new | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            Ids = text2 | 
|---|
|  |  |  | //        }; | 
|---|
|  |  |  | //        string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | //        JObject jobject38 = JObject.Parse(text8); | 
|---|
|  |  |  | //        bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | //        if (flag11) | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            LogService.Write("收料通知单提交失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true); | 
|---|
|  |  |  | //            this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //            this.objJsonResult.count = 0; | 
|---|
|  |  |  | //            this.objJsonResult.Message = "金蝶收料通知单提交失败" + text8; | 
|---|
|  |  |  | //            this.objJsonResult.data = null; | 
|---|
|  |  |  | //            result = this.objJsonResult; | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        else | 
|---|
|  |  |  | //        { | 
|---|
|  |  |  | //            text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | //            jobject38 = JObject.Parse(text8); | 
|---|
|  |  |  | //            bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | //            if (flag12) | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                LogService.Write("收料通知单审核失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true); | 
|---|
|  |  |  | //                this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //                this.objJsonResult.count = 0; | 
|---|
|  |  |  | //                this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text8; | 
|---|
|  |  |  | //                this.objJsonResult.data = null; | 
|---|
|  |  |  | //                result = this.objJsonResult; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            else | 
|---|
|  |  |  | //            { | 
|---|
|  |  |  | //                this.objJsonResult.code = "1"; | 
|---|
|  |  |  | //                this.objJsonResult.count = 1; | 
|---|
|  |  |  | //                this.objJsonResult.Message = "操作成功!"; | 
|---|
|  |  |  | //                this.objJsonResult.data = null; | 
|---|
|  |  |  | //                result = this.objJsonResult; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | //    catch (Exception ex) | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | //        this.objJsonResult.code = "0"; | 
|---|
|  |  |  | //        this.objJsonResult.count = 0; | 
|---|
|  |  |  | //        this.objJsonResult.Message = "异常!" + ex.ToString(); | 
|---|
|  |  |  | //        this.objJsonResult.data = null; | 
|---|
|  |  |  | //        result = this.objJsonResult; | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | //    return result; | 
|---|
|  |  |  | //} | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public object AuditPOInStockBillPost_AR([FromBody] JObject msg) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | object result; | 
|---|
|  |  |  | 
|---|
|  |  |  | text = text.Replace("\\", ""); | 
|---|
|  |  |  | text = text.Replace("\n", ""); | 
|---|
|  |  |  | List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text); | 
|---|
|  |  |  | DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); | 
|---|
|  |  |  | ClsCg_POInStockBill clsCg_POInStockBill = new ClsCg_POInStockBill(); | 
|---|
|  |  |  | string hinterID = list[0].HInterID; | 
|---|
|  |  |  | string text2 = list[0].FID; | 
|---|
|  |  |  | string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo); | 
|---|
|  |  |  | 
|---|
|  |  |  | this.oCn.BeginTran(); | 
|---|
|  |  |  | this.oCn.Commit(); | 
|---|
|  |  |  | bool flag = singleSystemParameter.Contains("安瑞"); | 
|---|
|  |  |  | if (flag) | 
|---|
|  |  |  | bool flag2 = flag; | 
|---|
|  |  |  | bool flag3 = flag2; | 
|---|
|  |  |  | if (flag3) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast"); | 
|---|
|  |  |  | DataRow dataRow = dataSet.Tables[0].Rows[0]; | 
|---|
|  |  |  | bool flag2 = dataSet.Tables[0].Rows.Count <= 0; | 
|---|
|  |  |  | if (flag2) | 
|---|
|  |  |  | bool flag4 = dataSet.Tables[0].Rows.Count <= 0; | 
|---|
|  |  |  | bool flag5 = flag4; | 
|---|
|  |  |  | bool flag6 = flag5; | 
|---|
|  |  |  | if (flag6) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | return this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | bool flag3 = dataSet.Tables[0].Rows.Count >= 0; | 
|---|
|  |  |  | if (flag3) | 
|---|
|  |  |  | bool flag7 = dataSet.Tables[0].Rows.Count >= 0; | 
|---|
|  |  |  | bool flag8 = flag7; | 
|---|
|  |  |  | bool flag9 = flag8; | 
|---|
|  |  |  | if (flag9) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | JObject jobject = new JObject(); | 
|---|
|  |  |  | string value = "SLD01_SYS"; | 
|---|
|  |  |  | string value2 = "CG"; | 
|---|
|  |  |  | bool flag4 = dataRow["FTYPENAME"].ToString().Contains("委外"); | 
|---|
|  |  |  | if (flag4) | 
|---|
|  |  |  | string text3 = "SLD01_SYS"; | 
|---|
|  |  |  | string text4 = "CG"; | 
|---|
|  |  |  | bool flag10 = dataRow["FTYPENAME"].ToString().Contains("委外"); | 
|---|
|  |  |  | bool flag11 = flag10; | 
|---|
|  |  |  | bool flag12 = flag11; | 
|---|
|  |  |  | if (flag12) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value = "SLD03_SYS"; | 
|---|
|  |  |  | value2 = "WW"; | 
|---|
|  |  |  | text3 = "SLD03_SYS"; | 
|---|
|  |  |  | text4 = "WW"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | bool flag5 = dataRow["FTYPENAME"].ToString().Contains("资产"); | 
|---|
|  |  |  | if (flag5) | 
|---|
|  |  |  | bool flag13 = dataRow["FTYPENAME"].ToString().Contains("资产"); | 
|---|
|  |  |  | bool flag14 = flag13; | 
|---|
|  |  |  | bool flag15 = flag14; | 
|---|
|  |  |  | if (flag15) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value = "SLD04_SYS"; | 
|---|
|  |  |  | value2 = "ZCCG"; | 
|---|
|  |  |  | text3 = "SLD04_SYS"; | 
|---|
|  |  |  | text4 = "ZCCG"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | JObject jobject2 = jobject; | 
|---|
|  |  |  | string propertyName = "FBILLTYPEID"; | 
|---|
|  |  |  | string text5 = "FBILLTYPEID"; | 
|---|
|  |  |  | JObject jobject3 = new JObject(); | 
|---|
|  |  |  | jobject3["Fnumber"] = value; | 
|---|
|  |  |  | jobject2.Add(propertyName, jobject3); | 
|---|
|  |  |  | jobject.Add("FBusinessType", value2); | 
|---|
|  |  |  | jobject3["Fnumber"] = text3; | 
|---|
|  |  |  | jobject2.Add(text5, jobject3); | 
|---|
|  |  |  | jobject.Add("FBusinessType", text4); | 
|---|
|  |  |  | jobject.Add("FBILLNO", dataRow["HBillNo"].ToString()); | 
|---|
|  |  |  | jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | JObject jobject4 = jobject; | 
|---|
|  |  |  | string propertyName2 = "FStockOrgId"; | 
|---|
|  |  |  | string text6 = "FStockOrgId"; | 
|---|
|  |  |  | JObject jobject5 = new JObject(); | 
|---|
|  |  |  | jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString(); | 
|---|
|  |  |  | jobject4.Add(propertyName2, jobject5); | 
|---|
|  |  |  | jobject4.Add(text6, jobject5); | 
|---|
|  |  |  | JObject jobject6 = jobject; | 
|---|
|  |  |  | string propertyName3 = "FPurOrgId"; | 
|---|
|  |  |  | string text7 = "FPurOrgId"; | 
|---|
|  |  |  | JObject jobject7 = new JObject(); | 
|---|
|  |  |  | jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString(); | 
|---|
|  |  |  | jobject6.Add(propertyName3, jobject7); | 
|---|
|  |  |  | jobject6.Add(text7, jobject7); | 
|---|
|  |  |  | JObject jobject8 = jobject; | 
|---|
|  |  |  | string propertyName4 = "FSupplierId"; | 
|---|
|  |  |  | string text8 = "FSupplierId"; | 
|---|
|  |  |  | JObject jobject9 = new JObject(); | 
|---|
|  |  |  | jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString(); | 
|---|
|  |  |  | jobject8.Add(propertyName4, jobject9); | 
|---|
|  |  |  | jobject8.Add(text8, jobject9); | 
|---|
|  |  |  | JObject jobject10 = jobject; | 
|---|
|  |  |  | string propertyName5 = "FPURCHASERID"; | 
|---|
|  |  |  | string text9 = "FPURCHASERID"; | 
|---|
|  |  |  | JObject jobject11 = new JObject(); | 
|---|
|  |  |  | jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString(); | 
|---|
|  |  |  | jobject10.Add(propertyName5, jobject11); | 
|---|
|  |  |  | jobject10.Add(text9, jobject11); | 
|---|
|  |  |  | jobject.Add("FOwnerTypeIdHead", "BD_Supplier"); | 
|---|
|  |  |  | JObject jobject12 = jobject; | 
|---|
|  |  |  | string propertyName6 = "FOwnerIdHead"; | 
|---|
|  |  |  | string text10 = "FOwnerIdHead"; | 
|---|
|  |  |  | JObject jobject13 = new JObject(); | 
|---|
|  |  |  | jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString(); | 
|---|
|  |  |  | jobject12.Add(propertyName6, jobject13); | 
|---|
|  |  |  | jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() }); | 
|---|
|  |  |  | jobject12.Add(text10, jobject13); | 
|---|
|  |  |  | JObject jobject14 = jobject; | 
|---|
|  |  |  | string text11 = "F_RYMA_Assistant"; | 
|---|
|  |  |  | JObject jobject15 = new JObject(); | 
|---|
|  |  |  | jobject15["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString(); | 
|---|
|  |  |  | jobject14.Add(text11, jobject15); | 
|---|
|  |  |  | JArray jarray = new JArray(); | 
|---|
|  |  |  | foreach (object obj in dataSet.Tables[0].Rows) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | DataRow dataRow2 = (DataRow)obj; | 
|---|
|  |  |  | JObject jobject14 = new JObject(); | 
|---|
|  |  |  | JObject jobject15 = jobject14; | 
|---|
|  |  |  | string propertyName7 = "FMaterialId"; | 
|---|
|  |  |  | JObject jobject16 = new JObject(); | 
|---|
|  |  |  | jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString(); | 
|---|
|  |  |  | jobject15.Add(propertyName7, jobject16); | 
|---|
|  |  |  | JObject jobject17 = jobject14; | 
|---|
|  |  |  | string propertyName8 = "FUnitID"; | 
|---|
|  |  |  | JObject jobject17 = jobject16; | 
|---|
|  |  |  | string text12 = "FMaterialId"; | 
|---|
|  |  |  | JObject jobject18 = new JObject(); | 
|---|
|  |  |  | jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | jobject17.Add(propertyName8, jobject18); | 
|---|
|  |  |  | jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | JObject jobject19 = jobject14; | 
|---|
|  |  |  | string propertyName9 = "FPriceUnitId"; | 
|---|
|  |  |  | jobject18["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString(); | 
|---|
|  |  |  | jobject17.Add(text12, jobject18); | 
|---|
|  |  |  | JObject jobject19 = jobject16; | 
|---|
|  |  |  | string text13 = "FUnitID"; | 
|---|
|  |  |  | JObject jobject20 = new JObject(); | 
|---|
|  |  |  | jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | jobject19.Add(propertyName9, jobject20); | 
|---|
|  |  |  | JObject jobject21 = jobject14; | 
|---|
|  |  |  | string propertyName10 = "FStockUnitID"; | 
|---|
|  |  |  | jobject19.Add(text13, jobject20); | 
|---|
|  |  |  | jobject16.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd")); | 
|---|
|  |  |  | JObject jobject21 = jobject16; | 
|---|
|  |  |  | string text14 = "FPriceUnitId"; | 
|---|
|  |  |  | JObject jobject22 = new JObject(); | 
|---|
|  |  |  | jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | jobject21.Add(propertyName10, jobject22); | 
|---|
|  |  |  | JObject jobject23 = jobject14; | 
|---|
|  |  |  | string propertyName11 = "FStockID"; | 
|---|
|  |  |  | jobject21.Add(text14, jobject22); | 
|---|
|  |  |  | JObject jobject23 = jobject16; | 
|---|
|  |  |  | string text15 = "FStockUnitID"; | 
|---|
|  |  |  | JObject jobject24 = new JObject(); | 
|---|
|  |  |  | jobject24["Fnumber"] = "BJCK-SH.01.005"; | 
|---|
|  |  |  | jobject23.Add(propertyName11, jobject24); | 
|---|
|  |  |  | jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"])); | 
|---|
|  |  |  | jobject14.Add("FOwnerTypeId", "BD_OwnerOrg"); | 
|---|
|  |  |  | JObject jobject25 = jobject14; | 
|---|
|  |  |  | string propertyName12 = "FOwnerID"; | 
|---|
|  |  |  | jobject24["Fnumber"] = dataRow2["FUNITNUMBER"].ToString(); | 
|---|
|  |  |  | jobject23.Add(text15, jobject24); | 
|---|
|  |  |  | JObject jobject25 = jobject16; | 
|---|
|  |  |  | string text16 = "FStockID"; | 
|---|
|  |  |  | JObject jobject26 = new JObject(); | 
|---|
|  |  |  | jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString(); | 
|---|
|  |  |  | jobject25.Add(propertyName12, jobject26); | 
|---|
|  |  |  | jobject14.Add("FSrcId", dataRow2["FID"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder"); | 
|---|
|  |  |  | jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FPrice", dataRow2["FPRICE"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString()); | 
|---|
|  |  |  | JObject jobject27 = jobject14; | 
|---|
|  |  |  | string propertyName13 = "FLOT"; | 
|---|
|  |  |  | jobject26["Fnumber"] = "BJCK-SH.01.005"; | 
|---|
|  |  |  | jobject25.Add(text16, jobject26); | 
|---|
|  |  |  | jobject16.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"])); | 
|---|
|  |  |  | jobject16.Add("FOwnerTypeId", "BD_OwnerOrg"); | 
|---|
|  |  |  | JObject jobject27 = jobject16; | 
|---|
|  |  |  | string text17 = "FOwnerID"; | 
|---|
|  |  |  | JObject jobject28 = new JObject(); | 
|---|
|  |  |  | jobject28["Fnumber"] = dataRow2["hbatchno"].ToString(); | 
|---|
|  |  |  | jobject27.Add(propertyName13, jobject28); | 
|---|
|  |  |  | jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString()); | 
|---|
|  |  |  | jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString()); | 
|---|
|  |  |  | //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString()); | 
|---|
|  |  |  | jobject14.Add("FDetailEntity_Link", new JArray | 
|---|
|  |  |  | { | 
|---|
|  |  |  | new JObject | 
|---|
|  |  |  | { | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FDetailEntity_Link_FRULEID", | 
|---|
|  |  |  | "PUR_PurchaseOrder-PUR_ReceiveBill" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FDetailEntity_Link_FSTableName", | 
|---|
|  |  |  | "t_PUR_POOrderEntry" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FDetailEntity_Link_FSBillId", | 
|---|
|  |  |  | dataRow2["FID"].ToString() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FDetailEntity_Link_FSId", | 
|---|
|  |  |  | dataRow2["FEntryID"].ToString() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | jarray.Add(jobject14); | 
|---|
|  |  |  | jobject28["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString(); | 
|---|
|  |  |  | jobject27.Add(text17, jobject28); | 
|---|
|  |  |  | jobject16.Add("FSrcId", dataRow2["FID"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FSRCFORMID", "PUR_PurchaseOrder"); | 
|---|
|  |  |  | jobject16.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FPrice", dataRow2["FPRICE"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString()); | 
|---|
|  |  |  | JObject jobject29 = jobject16; | 
|---|
|  |  |  | string text18 = "FLOT"; | 
|---|
|  |  |  | JObject jobject30 = new JObject(); | 
|---|
|  |  |  | jobject30["Fnumber"] = dataRow2["hbatchno"].ToString(); | 
|---|
|  |  |  | jobject29.Add(text18, jobject30); | 
|---|
|  |  |  | jobject16.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FProduceDate", dataRow2["HBeginDate"].ToString()); | 
|---|
|  |  |  | jobject16.Add("FExpiryDate", dataRow2["HEndDate"].ToString()); | 
|---|
|  |  |  | jobject16.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString()); | 
|---|
|  |  |  | jobject16.Add("F_UJDY_Qty", dataRow2["HQTY"].ToString()); | 
|---|
|  |  |  | JObject jobject31 = jobject16; | 
|---|
|  |  |  | string text19 = "FDetailEntity_Link"; | 
|---|
|  |  |  | JArray jarray2 = new JArray(); | 
|---|
|  |  |  | JObject jobject32 = new JObject(); | 
|---|
|  |  |  | jobject32.Add("FDetailEntity_Link_FRULEID", "PUR_PurchaseOrder-PUR_ReceiveBill"); | 
|---|
|  |  |  | jobject32.Add("FDetailEntity_Link_FSTableName", "t_PUR_POOrderEntry"); | 
|---|
|  |  |  | jobject32.Add("FDetailEntity_Link_FSBillId", dataRow2["FID"].ToString()); | 
|---|
|  |  |  | jobject32.Add("FDetailEntity_Link_FSId", dataRow2["FEntryID"].ToString()); | 
|---|
|  |  |  | jarray2.Add(jobject32); | 
|---|
|  |  |  | jobject31.Add(text19, jarray2); | 
|---|
|  |  |  | jarray.Add(jobject16); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | jobject.Add("FDetailEntity", jarray); | 
|---|
|  |  |  | JObject jobject29 = new JObject(); | 
|---|
|  |  |  | JObject jobject30 = jobject29; | 
|---|
|  |  |  | string propertyName14 = "FSettleOrgId"; | 
|---|
|  |  |  | JObject jobject31 = new JObject(); | 
|---|
|  |  |  | jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString(); | 
|---|
|  |  |  | jobject30.Add(propertyName14, jobject31); | 
|---|
|  |  |  | JObject jobject32 = jobject29; | 
|---|
|  |  |  | string propertyName15 = "FSettleCurrId"; | 
|---|
|  |  |  | JObject jobject33 = new JObject(); | 
|---|
|  |  |  | jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString(); | 
|---|
|  |  |  | jobject32.Add(propertyName15, jobject33); | 
|---|
|  |  |  | jobject29.Add("FPricePoint", 0); | 
|---|
|  |  |  | jobject.Add("FinanceEntity ", jobject29); | 
|---|
|  |  |  | JObject jobject34 = new JObject(); | 
|---|
|  |  |  | jobject34["Creator"] = ""; | 
|---|
|  |  |  | jobject34["NeedUpDateFields"] = new JArray(); | 
|---|
|  |  |  | jobject34["NeedReturnFields"] = new JArray(); | 
|---|
|  |  |  | jobject34["IsDeleteEntry"] = "false"; | 
|---|
|  |  |  | jobject34["SubSystemId"] = ""; | 
|---|
|  |  |  | jobject34["IsVerifyBaseDataField"] = "false"; | 
|---|
|  |  |  | jobject34["Model"] = jobject; | 
|---|
|  |  |  | JObject jobject35 = jobject34; | 
|---|
|  |  |  | string text3 = InvokeHelper.Login(); | 
|---|
|  |  |  | int num = JObject.Parse(text3)["LoginResultType"].Value<int>(); | 
|---|
|  |  |  | bool flag6 = num == 0; | 
|---|
|  |  |  | if (flag6) | 
|---|
|  |  |  | JObject jobject34 = jobject33; | 
|---|
|  |  |  | string text20 = "FSettleOrgId"; | 
|---|
|  |  |  | JObject jobject35 = new JObject(); | 
|---|
|  |  |  | jobject35["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString(); | 
|---|
|  |  |  | jobject34.Add(text20, jobject35); | 
|---|
|  |  |  | JObject jobject36 = jobject33; | 
|---|
|  |  |  | string text21 = "FSettleCurrId"; | 
|---|
|  |  |  | JObject jobject37 = new JObject(); | 
|---|
|  |  |  | jobject37["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString(); | 
|---|
|  |  |  | jobject36.Add(text21, jobject37); | 
|---|
|  |  |  | jobject33.Add("FPricePoint", 0); | 
|---|
|  |  |  | jobject.Add("FinanceEntity ", jobject33); | 
|---|
|  |  |  | JObject jobject38 = new JObject(); | 
|---|
|  |  |  | jobject38["Creator"] = ""; | 
|---|
|  |  |  | jobject38["NeedUpDateFields"] = new JArray(); | 
|---|
|  |  |  | jobject38["NeedReturnFields"] = new JArray(); | 
|---|
|  |  |  | jobject38["IsDeleteEntry"] = "false"; | 
|---|
|  |  |  | jobject38["SubSystemId"] = ""; | 
|---|
|  |  |  | jobject38["IsVerifyBaseDataField"] = "false"; | 
|---|
|  |  |  | jobject38["Model"] = jobject; | 
|---|
|  |  |  | JObject jobject39 = jobject38; | 
|---|
|  |  |  | string text22 = InvokeHelper.Login(); | 
|---|
|  |  |  | int num = Extensions.Value<int>(JObject.Parse(text22)["LoginResultType"]); | 
|---|
|  |  |  | bool flag16 = num == 0; | 
|---|
|  |  |  | bool flag17 = flag16; | 
|---|
|  |  |  | bool flag18 = flag17; | 
|---|
|  |  |  | if (flag18) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = text3; | 
|---|
|  |  |  | this.objJsonResult.Message = text22; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | return this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString()); | 
|---|
|  |  |  | bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE"; | 
|---|
|  |  |  | if (!flag7) | 
|---|
|  |  |  | string text23 = InvokeHelper.Save("PUR_ReceiveBill", jobject39.ToString()); | 
|---|
|  |  |  | bool flag19 = JObject.Parse(text23)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE"; | 
|---|
|  |  |  | bool flag20 = !flag19; | 
|---|
|  |  |  | bool flag21 = flag20; | 
|---|
|  |  |  | if (flag21) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = text4; | 
|---|
|  |  |  | this.objJsonResult.Message = text23; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | return this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | string text5 = JObject.Parse(text4)["Result"]["Number"].ToString(); | 
|---|
|  |  |  | text2 = JObject.Parse(text4)["Result"]["Id"].ToString(); | 
|---|
|  |  |  | string text24 = JObject.Parse(text23)["Result"]["Number"].ToString(); | 
|---|
|  |  |  | text2 = JObject.Parse(text23)["Result"]["Id"].ToString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | JObject jobject36 = new JObject(); | 
|---|
|  |  |  | jobject36.Add("Creator", ""); | 
|---|
|  |  |  | jobject36.Add("NeedUpDateFields", new JArray()); | 
|---|
|  |  |  | jobject36.Add("NeedReturnFields", new JArray()); | 
|---|
|  |  |  | jobject36.Add("IsDeleteEntry", "false"); | 
|---|
|  |  |  | jobject36.Add("SubSystemId", ""); | 
|---|
|  |  |  | jobject36.Add("IsVerifyBaseDataField", ""); | 
|---|
|  |  |  | JObject jobject37 = new JObject(); | 
|---|
|  |  |  | jobject37.Add("FID", text2); | 
|---|
|  |  |  | JArray jarray2 = new JArray(); | 
|---|
|  |  |  | JObject jobject40 = new JObject(); | 
|---|
|  |  |  | jobject40.Add("Creator", ""); | 
|---|
|  |  |  | jobject40.Add("NeedUpDateFields", new JArray()); | 
|---|
|  |  |  | jobject40.Add("NeedReturnFields", new JArray()); | 
|---|
|  |  |  | jobject40.Add("IsDeleteEntry", "false"); | 
|---|
|  |  |  | jobject40.Add("SubSystemId", ""); | 
|---|
|  |  |  | jobject40.Add("IsVerifyBaseDataField", ""); | 
|---|
|  |  |  | JObject jobject41 = new JObject(); | 
|---|
|  |  |  | jobject41.Add("FID", text2); | 
|---|
|  |  |  | JArray jarray3 = new JArray(); | 
|---|
|  |  |  | foreach (ReciveBill_FastModel reciveBill_FastModel in list) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | bool flag8 = reciveBill_FastModel.HSQty == 0m; | 
|---|
|  |  |  | if (!flag8) | 
|---|
|  |  |  | bool flag22 = reciveBill_FastModel.HSQty == 0m; | 
|---|
|  |  |  | bool flag23 = !flag22; | 
|---|
|  |  |  | bool flag24 = flag23; | 
|---|
|  |  |  | if (flag24) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | jarray2.Add(new JObject | 
|---|
|  |  |  | { | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FEntryID", | 
|---|
|  |  |  | reciveBill_FastModel.FEntryID | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | "FActReceiveQty ", | 
|---|
|  |  |  | reciveBill_FastModel.HSQty | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | JArray jarray4 = jarray3; | 
|---|
|  |  |  | JObject jobject42 = new JObject(); | 
|---|
|  |  |  | jobject42.Add("FEntryID", reciveBill_FastModel.FEntryID); | 
|---|
|  |  |  | jobject42.Add("FActReceiveQty ", reciveBill_FastModel.HSQty); | 
|---|
|  |  |  | jarray4.Add(jobject42); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | jobject37.Add("FDetailEntity", jarray2); | 
|---|
|  |  |  | jobject36.Add("Model", jobject37); | 
|---|
|  |  |  | string text6 = InvokeHelper.Login(); | 
|---|
|  |  |  | int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>(); | 
|---|
|  |  |  | bool flag9 = num2 <= 0; | 
|---|
|  |  |  | if (flag9) | 
|---|
|  |  |  | jobject41.Add("FDetailEntity", jarray3); | 
|---|
|  |  |  | jobject40.Add("Model", jobject41); | 
|---|
|  |  |  | string text25 = InvokeHelper.Login(); | 
|---|
|  |  |  | int num2 = Extensions.Value<int>(JObject.Parse(text25)["LoginResultType"]); | 
|---|
|  |  |  | bool flag25 = num2 <= 0; | 
|---|
|  |  |  | bool flag26 = flag25; | 
|---|
|  |  |  | bool flag27 = flag26; | 
|---|
|  |  |  | if (flag27) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = text6; | 
|---|
|  |  |  | this.objJsonResult.Message = text25; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | return this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString()); | 
|---|
|  |  |  | bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | if (flag10) | 
|---|
|  |  |  | string text26 = InvokeHelper.Save("PUR_ReceiveBill", jobject40.ToString()); | 
|---|
|  |  |  | bool flag28 = JObject.Parse(text26)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | bool flag29 = flag28; | 
|---|
|  |  |  | bool flag30 = flag29; | 
|---|
|  |  |  | if (flag30) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | LogService.Write("收料通知单修改失败jsonRoot:" + jobject36.ToString(), "Vlog", true); | 
|---|
|  |  |  | LogService.Write("收料通知单修改失败jsonRoot:" + jobject40.ToString(), "Vlog", true); | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单更新失败" + text7; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单更新失败" + text26; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | return this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Ids = text2 | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | JObject jobject38 = JObject.Parse(text8); | 
|---|
|  |  |  | bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | if (flag11) | 
|---|
|  |  |  | string text27 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | JObject jobject43 = JObject.Parse(text27); | 
|---|
|  |  |  | bool flag31 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | bool flag32 = flag31; | 
|---|
|  |  |  | bool flag33 = flag32; | 
|---|
|  |  |  | if (flag33) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | LogService.Write("收料通知单提交失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true); | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单提交失败" + text8; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单提交失败" + text27; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | result = this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | jobject38 = JObject.Parse(text8); | 
|---|
|  |  |  | bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | if (flag12) | 
|---|
|  |  |  | text27 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); | 
|---|
|  |  |  | jobject43 = JObject.Parse(text27); | 
|---|
|  |  |  | bool flag34 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE"; | 
|---|
|  |  |  | bool flag35 = flag34; | 
|---|
|  |  |  | bool flag36 = flag35; | 
|---|
|  |  |  | if (flag36) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | LogService.Write("收料通知单审核失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true); | 
|---|
|  |  |  | this.objJsonResult.code = "0"; | 
|---|
|  |  |  | this.objJsonResult.count = 0; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text8; | 
|---|
|  |  |  | this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text27; | 
|---|
|  |  |  | this.objJsonResult.data = null; | 
|---|
|  |  |  | result = this.objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #region PDA其他出库 | 
|---|
|  |  |  | 
|---|
|  |  |  | '@' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | string text = array[0]; | 
|---|
|  |  |  | long num = ClsPub.isLong(array[4]); | 
|---|
|  |  |  | Double num = ClsPub.isDoule(array[4]); | 
|---|
|  |  |  | string text2 = array[6]; | 
|---|
|  |  |  | DateTime dateTime = ClsPub.isDate(array[3]); | 
|---|
|  |  |  | DateTime dateTime2 = ClsPub.isDate(array[5]); | 
|---|