| | |
| | | WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain(); |
| | | string text = ""; |
| | | string text1 = ""; |
| | | bool flag = HBillType == "1201"; |
| | | //gy_billnumber 单据类型表 |
| | | bool flag = HBillType == "1201"; //WMS 采购入库 |
| | | if (flag) |
| | | { |
| | | string[] array = sBarCodeNew.Split(new char[] |
| | | { |
| | | '@' |
| | | }); |
| | | string str = array[0]; |
| | | string str = array[0]; //物料代码 |
| | | long num = (long)ClsPub.isInt(array[4]); |
| | | string text2 = array[6]; |
| | | DateTime dateTime = ClsPub.isDate(array[3]); |
| | |
| | | string str3 = ClsPub.isStrNull(dataSet.Tables[0].Rows[0]["HNumber"]); |
| | | |
| | | |
| | | |
| | | //用拆分出来的物料代码查询物料表里的新物料编码 |
| | | DataSet Dss7; |
| | | Dss7 = clsCN.RunProcReturn(" select * from AIS20220914133941..T_BD_MATERIAL where FNumber = '" + str + "'", "T_BD_MATERIAL"); |
| | | if (Dss7 == null || Dss7.Tables[0].Rows.Count == 0) |
| | | { |
| | | //新物料表里没有返回数据则查询物料表里的旧物料编码 |
| | | DataSet Dss8; |
| | | Dss8 = clsCN.RunProcReturn(" select * from AIS20220914133941..T_BD_MATERIAL where FOldNumber = '" + str + "'", "T_BD_MATERIAL"); |
| | | str = DBUtility.ClsPub.isStrNull(Dss8.Tables[0].Rows[0]["FNumber"]); |
| | |
| | | long num3 = (long)ClsPub.isInt(dataSet2.Tables[0].Rows[0]["HUnitID"]); |
| | | text = str3 + num2.ToString() + text2 + "#" + num; |
| | | text1 = str3 + num2.ToString() + text2; |
| | | //找源单 |
| | | DataSet dataSet3 = clsCN.RunProcReturn(" select fid,FMATERIALID,FENTRYID,FBILLNO from h_v_RECEIVEQuery where FSRCBILLNO= '" + str2 + "' and FLOT_TEXT = '" + text2 + "' and FMATERIALID = " + num2.ToString(), "h_v_RECEIVEQuery"); |
| | | //DataSet dataSet3 = clsCN.RunProcReturn(" select fid,FMATERIALID,FENTRYID,FBILLNO from h_v_RECEIVEQuery where FLOT_TEXT= '" + text2 + "' and FPRODUCEDATE = '" + dateTime + "' and FMATERIALID = " + num2.ToString(), "h_v_RECEIVEQuery"); |
| | | num2 = ClsPub.isLong(dataSet3.Tables[0].Rows[0]["FMATERIALID"]); |
| | |
| | | { |
| | | DataSet dataSet5 = clsCN.RunProcReturn(string.Concat(new string[] |
| | | { |
| | | //扫码临时记录表 |
| | | " select * from KF_PonderationBillMain_Temp where HInterID = ", |
| | | hinterid.ToString(), |
| | | " and HBillType = '", |
| | |
| | | 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); |
| | | |
| | | |
| | | |
| | |
| | | bool flag4 = dataSet6.Tables[0].Rows.Count > 0; |
| | | if (!flag4) |
| | | { |
| | | POStockInBillController postockInBillController2 = new POStockInBillController(); |
| | | postockInBillController2.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); |
| | | //POStockInBillController postockInBillController2 = new POStockInBillController(); |
| | | //postockInBillController2.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); |
| | | } |
| | | } |
| | | } |
| | | bool flag5 = HBillType == "1202"; |
| | | bool flag5 = HBillType == "1202"; //WMS 生产入库 |
| | | if (flag5) |
| | | { |
| | | string text6 = sBarCodeNew.Remove(0, sBarCodeNew.Length - 4); |
| | |
| | | bool flag6 = text7.Contains("W") || text7.Contains("N"); |
| | | if (flag6) |
| | | { |
| | | string text8 = sBarCodeNew.Substring(0, 10); |
| | | string str4 = sBarCodeNew.Substring(10, 10); |
| | | string text8 = sBarCodeNew.Substring(0, 10);//商品码 商品码+物料代码+生产日期+批次+失效日期+一位字母+三位数字 |
| | | string str4 = sBarCodeNew.Substring(10, 10);//物料代码 |
| | | string text9 = "20" + sBarCodeNew.Substring(20, 6); |
| | | long num8 = (long)ClsPub.isInt(text9.Substring(0, 4)); |
| | | long num9 = (long)ClsPub.isInt(text9.Substring(4, 2)); |
| | | long num10 = (long)ClsPub.isInt(text9.Substring(6, 2)); |
| | | long num11 = (long)ClsPub.isInt(sBarCodeNew.Remove(0, sBarCodeNew.Length - 3)); |
| | | string text10 = sBarCodeNew.Remove(0, sBarCodeNew.Length - 10); |
| | | long num8 = (long)ClsPub.isInt(text9.Substring(0, 4)); //年 |
| | | long num9 = (long)ClsPub.isInt(text9.Substring(4, 2)); //月 |
| | | long num10 = (long)ClsPub.isInt(text9.Substring(6, 2)); //日 |
| | | long num11 = (long)ClsPub.isInt(sBarCodeNew.Remove(0, sBarCodeNew.Length - 3));//后三位永远都是数字 |
| | | string text10 = sBarCodeNew.Remove(0, sBarCodeNew.Length - 10);//失效日期+一位字母+三位数字 |
| | | string text11 = "20" + text10.Substring(0, 6); |
| | | long num12 = (long)ClsPub.isInt(text11.Substring(0, 4)); |
| | | long num13 = (long)ClsPub.isInt(text11.Substring(4, 2)); |
| | |
| | | { |
| | | str4 = DBUtility.ClsPub.isStrNull(Dss7.Tables[0].Rows[0]["FNumber"]); |
| | | } |
| | | |
| | | |
| | | DataSet dataSet7 = clsCN2.RunProcReturn(" select HItemID,HName,HModel,HUnitID from Gy_Material where HNumber= '" + str4 + "' and huseorgid = " + HOrgID.ToString(), "Gy_Material"); |
| | | long num15 = ClsPub.isLong(dataSet7.Tables[0].Rows[0]["HItemID"]); |
| | |
| | | } |
| | | else |
| | | { |
| | | string str6 = sBarCodeNew.Substring(0, 10); |
| | | /*前十位物料代码,后六位生效日期,倒数前三位是数字前六位是失效日期 */ |
| | | string str6 = sBarCodeNew.Substring(0, 10);//物料代码 |
| | | string text17 = "20" + sBarCodeNew.Substring(10, 6); |
| | | long num21 = (long)ClsPub.isInt(text17.Substring(0, 4)); |
| | | long num22 = (long)ClsPub.isInt(text17.Substring(4, 2)); |
| | |
| | | "-", |
| | | num27.ToString() |
| | | })); |
| | | string text20 = sBarCodeNew.Remove(0, 16); |
| | | string text21 = text20.Remove(text20.Length - 9, 9); |
| | | ClsCN clsCN3 = new ClsCN(); |
| | | string text20 = sBarCodeNew.Remove(0, 16); //SAE1300100 230309 2303704 250308 010 |
| | | string text21 = text20.Remove(text20.Length - 9 , 9); //SAE1300100230309 2303704 250308010 |
| | | ClsCN clsCN3 = new ClsCN(); |
| | | DataSet dataSet13 = clsCN3.RunProcReturn(" select HItemID,HName,HModel,HUnitID from Gy_Material where HNumber= '" + str6 + "' and huseorgid = " + HOrgID.ToString(), "Gy_Material"); |
| | | long num28 = ClsPub.isLong(dataSet13.Tables[0].Rows[0]["HItemID"]); |
| | | string text22 = ClsPub.isStrNull(dataSet13.Tables[0].Rows[0]["HName"]); |
| | |
| | | "-", |
| | | num23.ToString() |
| | | })); |
| | | DataSet dataSet16 = clsCN3.RunProcReturn(" select * from Gy_BarCodeBill where HBarCode= '" + text1 + "'", "Gy_BarCodeBill"); |
| | | DataSet dataSet16 = clsCN3.RunProcReturn(" select * from Gy_BarCodeBill where HBarCode= '" + text1 + "'", "Gy_BarCodeBill"); |
| | | bool flag10 = dataSet16.Tables[0].Rows.Count > 0; |
| | | if (flag10) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | //可能和他们的登录组织有关系 |
| | | string billCode3 = "85"; |
| | | long num32 = ClsPub.CreateBillID_Prod(billCode3, ref ClsPub.sExeReturnInfo); |
| | | long num33 = 0L; |
| | |
| | | } |
| | | } |
| | | } |
| | | bool flag13 = HBillType == "1244"; |
| | | bool flag13 = HBillType == "1244"; //WMS 生产退料单 |
| | | if (flag13) |
| | | { |
| | | bool flag14 = sBarCodeNew.Contains("@"); |
| | |
| | | } |
| | | } |
| | | } |
| | | bool flag19 = HBillType == "1207"; |
| | | bool flag19 = HBillType == "1207"; //WMS 直接调拨 |
| | | if (flag19) |
| | | { |
| | | bool flag20 = sBarCodeNew.Contains("@"); |
| | |
| | | } |
| | | } |
| | | } |
| | | bool flag25 = HBillType == "1206"; |
| | | bool flag25 = HBillType == "1206"; //WMS 销售出库 |
| | | if (flag25) |
| | | { |
| | | bool flag26 = sBarCodeNew.Contains("@"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | bool flag31 = HBillType == "1204"; |
| | | } |
| | | bool flag31 = HBillType == "1204"; //WMS 生产领料 |
| | | if (flag31) |
| | | { |
| | | bool flag32 = sBarCodeNew.Contains("@"); |
| | |
| | | } |
| | | } |
| | | } |
| | | bool flag37 = HBillType == "1254" || HBillType == "1211" || HBillType == "1255"; |
| | | bool flag37 = HBillType == "1254" /*生产补料*/ || HBillType == "1211" || HBillType == "1255"; |
| | | if (flag37) |
| | | { |
| | | bool flag38 = sBarCodeNew.Contains("@"); |
| | |
| | | } |
| | | } |
| | | } |
| | | bool flag43 = HBillType == "1205"; |
| | | bool flag43 = HBillType == "1205"; |
| | | if (flag43) |
| | | { |
| | | bool flag44 = sBarCodeNew.Contains("@"); |
| | |
| | | List<Model.ClsKf_POStockInBillMain> lsmain = new List<Model.ClsKf_POStockInBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getPOStockInBillMainByJson(msg1); |
| | | lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = lsmain[0].HBillType; |
| | | |
| | | WebAPI.WebS.ClsKf_POStockInBillMain websLsmain = new WebS.ClsKf_POStockInBillMain(); |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功!单据号为:"; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功! |
| | | //objJsonResult.Message = "成功!单据号为:"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败! |
| | | //objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | [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) |
| | | { |
| | |
| | | { |
| | | DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast"); |
| | | DataRow dataRow = dataSet.Tables[0].Rows[0]; |
| | | if (dataSet.Tables[0].Rows.Count == 1 && dataSet.Tables[0].Rows[0]["FRECEIVENumber"].ToString() == "0") |
| | | { |
| | | this.objJsonResult.code = "0"; |
| | | this.objJsonResult.count = 0; |
| | | this.objJsonResult.Message = "存在多个采购订单单据类型,不允许提交!"; |
| | | this.objJsonResult.data = null; |
| | | return this.objJsonResult; |
| | | } |
| | | bool flag4 = dataSet.Tables[0].Rows.Count <= 0; |
| | | bool flag5 = flag4; |
| | | bool flag6 = flag5; |
| | |
| | | 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()); |
| | | //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(); |
| | |
| | | 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()); |
| | | jobject16.Add("FPrice", dataRow2["FPRICE"].ToString()); |
| | | jobject16.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString()); |
| | | jobject16.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString()); |
| | | //jobject16.Add("F_UJDY_Qty", dataRow2["HQTY"].ToString()); |
| | | JObject jobject31 = jobject16; |
| | | string text19 = "FDetailEntity_Link"; |
| | | JArray jarray2 = new JArray(); |
| | |
| | | { |
| | | Ids = text2 |
| | | }; |
| | | string text27 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); |
| | | 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); |
| | | LogService.Write("收料通知单提交失败jsonRoot:" + f__AnonymousType.ToString(), "Vlog", true); |
| | | this.objJsonResult.code = "0"; |
| | | this.objJsonResult.count = 0; |
| | | this.objJsonResult.Message = "金蝶收料通知单提交失败" + text27; |
| | |
| | | } |
| | | else |
| | | { |
| | | text27 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType)); |
| | | 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); |
| | | LogService.Write("收料通知单审核失败jsonRoot:" + f__AnonymousType.ToString(), "Vlog", true); |
| | | this.objJsonResult.code = "0"; |
| | | this.objJsonResult.count = 0; |
| | | this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text27; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | //public object AuditPOInStockBillPost_AR([FromBody] JObject msg) |
| | | //{ |
| | | // string msg1 = msg["msg"].ToString(); |
| | | // msg1 = msg1.Replace("\\", ""); |
| | | // msg1 = msg1.Replace("\n", ""); |
| | | // msg1 = msg1.Substring(1, msg1.Length-2); |
| | | // try |
| | | // { |
| | | // List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | // ListModels oListModels = new ListModels(); |
| | | // lsmain = oListModels.getPOInStockBillMainByJson(msg1); |
| | | // lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | // lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | // string sSourceBillType = "1103"; |
| | | |
| | | // WebAPI.WebS.ClsCg_POInStockBillMain websLsmain = new WebS.ClsCg_POInStockBillMain(); |
| | | |
| | | // websLsmain.HInterID = lsmain[0].HInterID; |
| | | // websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | // //websLsmain.HBillType = "1103";//固定值 |
| | | // websLsmain.HDate = lsmain[0].HDate; |
| | | // //websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | // //websLsmain.HEmpID = 0; |
| | | // //websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | // //websLsmain.HRemark = ""; |
| | | // //websLsmain.HMainSourceBillType = lsmain[0].HBillType; |
| | | |
| | | |
| | | // if (webserver.set_SavePOInStockBill_NEW_Json(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "成功!单据号为:"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "上传失败!" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | #region PDA其他出库 |
| | |
| | | }; |
| | | string result1 = string.Empty; |
| | | string result2 = string.Empty; |
| | | DataSet Ds = oCn.RunProcReturn("select FDOCUMENTSTATUS,FID from AIS20210811135644..T_PUR_RECEIVE where FBILLNO='" + HBarCode + "'", "AIS20210811135644..T_PUR_RECEIVE"); |
| | | DataSet Ds = oCn.RunProcReturn("select FDOCUMENTSTATUS,FID from AIS20220914133941..T_PUR_RECEIVE where FBILLNO='" + HBarCode + "'", "AIS20220914133941..T_PUR_RECEIVE"); |
| | | //判断当前收料通知单状态——已创建则先提交再审核、以提交则只审核 |
| | | if (Ds.Tables[0].Rows[0][0].ToString() == "A" || Ds.Tables[0].Rows[0][0].ToString() == "D") |
| | | { |