| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选取列表 |
| | | /// </summary> |
| | | /// <param name="unity"></param> |
| | | /// <param name="RequestInfo"></param> |
| | | /// <returns></returns> |
| | | public dynamic GetWWCKsq(dynamic unity, dynamic RequestInfo) |
| | | { |
| | | var orgId = RequestInfo.OrgId; |
| | | var parameters = new List<SugarParameter> |
| | | { |
| | | new SugarParameter("@pi_selectKey", unity.selectKey), |
| | | new SugarParameter("@pi_type", unity.type), // 可选参数 |
| | | new SugarParameter("@pi_orgId", orgId), // 可选参数 |
| | | new SugarParameter("@inP1", null), // 可选参数 |
| | | new SugarParameter("@inP2", null), // 可选参数 |
| | | new SugarParameter("@inP3", null), // 可选参数 |
| | | new SugarParameter("@inP4", null), // 可选参数 |
| | | // ...其他可选参数 |
| | | }; |
| | | var result = Db.Ado.SqlQuery<dynamic>("EXEC prc_pda_wwcksq_list @pi_selectKey, @pi_type, @pi_orgId , @inP1, @inP2, @inP3, @inP4", parameters); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 列表明细 |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 委外出库申请单号获取明细 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <param name="RequestInfo"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | /// <exception cref="ArgumentNullException"></exception> |
| | | /// <exception cref="ArgumentException"></exception> |
| | | public dynamic GetItemsByWwckNo(WarehouseQuery query, dynamic RequestInfo) |
| | | { |
| | | if (string.IsNullOrEmpty(query.daa001)) throw new Exception("请选工单号!"); |
| | | if (query == null) |
| | | throw new ArgumentNullException(nameof(query), "参数对象不能为null"); |
| | | if (string.IsNullOrEmpty(query.daa001?.ToString())) |
| | | throw new ArgumentException("工单号不存在", nameof(query.daa001)); |
| | | |
| | | var orgId = RequestInfo.OrgId; |
| | | if (orgId == null) |
| | | throw new Exception("组织不存在!"); |
| | | |
| | | var parameters = new[] |
| | | { |
| | | new SugarParameter("@daa001", query.daa001), |
| | | new SugarParameter("@pi_orgId", orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | try |
| | | { |
| | | List<dynamic>? blDetails = Db.Ado.SqlQuery<dynamic>( |
| | | "EXEC prc_pda_wwll_detailList @daa001,@pi_orgId,@inP1,@inP2,@inP3,@inP4", parameters); |
| | | var items = blDetails.Where(x => x.DSQty > 0).ToList(); // 待扫物料 |
| | | var ysitems = blDetails.Where(x => x.SQty > 0).ToList(); // 已扫物料 |
| | | var planNo = blDetails.FirstOrDefault()?.ErpProductionOrderNo?.ToString();// 获取工单计划号 |
| | | return new |
| | | { |
| | | daa001 = query.daa001, |
| | | PlanNo = planNo, |
| | | items = items, |
| | | ysitems = ysitems |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception($"{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | #region 委外退料 |
| | | |
| | | /// <summary> |