| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据物料+工序获取检验方案 |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | #region 通过单据类型、单据号查询单据信息 |
| | | /// <summary> |
| | | /// 通过单据类型获取对应视图并通过单据号查询单据信息 |
| | | /// </summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 通过单据类型、单据内码、子内码查询单据信息 |
| | | /// <summary> |
| | | /// 通过单据类型获取对应视图并通过单据号查询单据信息 |
| | | /// </summary> |
| | | /// <param name="HBillNo"></param> |
| | | /// <param name="HBillType"></param> |
| | | /// <param name="HStoreOrgID"></param> |
| | | /// <returns></returns> |
| | | [Route("Web/GetBillInfo_GenerateBillCode")] |
| | | [HttpGet] |
| | | public object GetBillInfo_GenerateBillCode(string HBillType, string HInterID, int HEntryID) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_GetBillInfo_GenerateCode N'" + HBillType + "'," + HInterID + |
| | | "," + HEntryID, "h_p_Gy_GetBillInfo_GenerateCode"); |
| | | |
| | | if (ds == null) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else if ((bool)ds.Tables[1].Rows[0]["returnType"] == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ds.Tables[1].Rows[1]["payload"]; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | #region 小卫电器获取物料条码对应单据 |
| | | /// <summary> |
| | | /// 小卫电器获取物料条码对应单据 |
| | | /// </summary> |
| | |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | |
| | | |
| | | |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 惠康 生产领料单校验 扫描源单 获取生产领料单和下游领料单未审核 单据 |
| | | [Route("web/get_BillBarCode_BillCheck_Json_MateOut_HuiKang")] |
| | | [HttpGet] |
| | | public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | try |
| | | { |
| | | WebSoBar = null; |
| | | // 1. 查询金蝶云中 所有符合的生产领料单和下游领料单 |
| | | ds = oCN.RunProcReturn($@" |
| | | select HBillNo from h_v_Kf_MateOutBillList_K3 where HBillNo like '%{HBillNo}%' |
| | | ", "h_v_Kf_MateOutBillList_K3"); |
| | | |
| | | List<string> HBillNoList = new List<string>(); |
| | | foreach(var row in ds.Tables[0].Rows) |
| | | { |
| | | HBillNoList.Add(row.ToString()); |
| | | } |
| | | |
| | | // 2. 遍历获取的生产领料单 |
| | | foreach(string HBillNoOne in HBillNoList) |
| | | { |
| | | WebSoBar = oWebs.get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | |
| | | if(WebSoBar != null) |
| | | { |
| | | // 3. 获取到符合条件的返回值,立即返回 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | // 3. 所有单据都被审核,或者没有符合要求的单据,返回错误信息 |
| | | 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 = "扫描单据条码失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |