| | |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MateOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") //ç³»ç»åæ°æ¯å¦ä¸ºç§æäºæ¨¡å¼,N为å
¬æäºæ¨¡å¼ï¼Yä¸ºç§æäºæ¨¡å¼ |
| | | { |
| | | if(HSourceBillType == "1214") |
| | | { |
| | | //鿰忥ç产åæéç¥å |
| | | Kf_MateOutRequestBillController obill = new Kf_MateOutRequestBillController(); |
| | | objJsonResult = obill.GetKf_MateOutRequestBill_Sync_Json(HSourceBillNo, HSourceBillType); |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, 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 = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HSourceBillNos = "0"; |
| | | string HUnitIDs = "0"; |
| | | //æ¥è¯¢éè´è®¢å |
| | | ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a |
| | | inner join Cg_POOrderBillSub b on a.HInterID = b.HInterID where HBillNo='" + str[3] + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "æ¡ç è§£æå¤±è´¥,请确认æ¡ç éè´è®¢åæ¯å¦æ£ç¡®!"; |
| | | //return null; |
| | | } |
| | | else |
| | | { |
| | | HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HSourceBillNos = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | |
| | | string HInnerBillNos = ""; |
| | | //æ¥è¯¢å
é¨éè´è®¢åå· |
| | | ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where éè´è®¢åå·= '" + str[3] + "' ", "h_v_IF_POInStockList"); |
| | |
| | | else |
| | | { |
| | | HInnerBillNos = ds.Tables[0].Rows[0]["å
é¨éè´è®¢åå·"].ToString(); |
| | | HSourceBillNos = ds.Tables[0].Rows[0]["éè´è®¢åå·"].ToString(); |
| | | } |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HUnitIDs = "0"; |
| | | //æ¥è¯¢éè´è®¢å |
| | | ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a |
| | | inner join Cg_POOrderBillSub b on a.HInterID = b.HInterID where HBillNo='" + HSourceBillNos + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "æ¡ç è§£æå¤±è´¥,请确认æ¡ç éè´è®¢åæ¯å¦æ£ç¡®!"; |
| | | //return null; |
| | | } |
| | | else |
| | | { |
| | | HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | |
| | | double HQty = double.Parse(str[6]); |
| | | |
| | | //æ¥æè·åæ¹å¼ |