| | |
| | | { |
| | | new SugarParameter("@daa001", query.daa001), |
| | | new SugarParameter("@pi_orgId",orgId), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP1", query.userName), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | var womdabs = Db.Ado.SqlQuery<ItemDetailModel>("EXEC prc_pda_scll_detailList @daa001", parameters); |
| | | var womdabs = Db.Ado.SqlQuery<dynamic>("EXEC prc_pda_scll_detailList @daa001,@pi_orgId,@inP1", parameters); |
| | | |
| | | var DS_list = womdabs.Where(s => s.DSQty > 0).ToList(); |
| | | var YS_list = womdabs.Where(s => s.SQty > 0).ToList(); |
| | |
| | | throw new Exception("该工单信息不存在,请核对!"); |
| | | } |
| | | |
| | | var dto = new ProductionPickDto |
| | | var dto = new |
| | | { |
| | | daa001 = query.daa001, |
| | | daaInfo = womdaa, |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取物料相关条码信息 |
| | | /// </summary> |
| | | /// <param name="unity"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public dynamic GetBarKwByItemCK(dynamic unity) |
| | | { |
| | | if (unity == null) |
| | | throw new ArgumentNullException(nameof(unity), "参数对象不能为null"); |
| | | |
| | | if (string.IsNullOrEmpty(unity.itemId?.ToString())) |
| | | throw new ArgumentException("物料ID不能为空", nameof(unity.itemId)); |
| | | |
| | | try |
| | | { |
| | | var parameters = new List<SugarParameter> |
| | | { |
| | | new SugarParameter("@itemId", unity.itemId), |
| | | new SugarParameter("@inP1", unity.type), |
| | | new SugarParameter("@inP2", unity.billNo) |
| | | }; |
| | | |
| | | return Db.Ado.SqlQuery<dynamic>("EXEC prc_pda_scll_selBarMx @itemId,@inP1,@inP2", parameters); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception($"获取条码信息失败:{ex.Message}"); |
| | | } |
| | | |
| | | } |
| | | |
| | | public dynamic ProductBinding(dynamic query) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public dynamic getKbBarInfo(dynamic query) |
| | | public dynamic getKbBarInfo(dynamic query) |
| | | { |
| | | if (string.IsNullOrEmpty(query.Kbbarcode?.ToString())) |
| | | throw new ArgumentException("卡板条码不允许为空", nameof(query.Kbbarcode)); |
| | | |
| | | var parameters = new[] |
| | | { |
| | | if (string.IsNullOrEmpty(query.Kbbarcode?.ToString())) |
| | | throw new ArgumentException("卡板条码不允许为空", nameof(query.userName)); |
| | | |
| | | var sql = string.Format(@"SELECT QUANTITY, |
| | | ISNULL((SELECT COUNT(1) FROM MES_INV_ITEM_BARCODES_TBMX WHERE ABOUT_TB_BARCODE = '{0}'), 0) AS YSum, |
| | | DAA001 |
| | | FROM MES_INV_ITEM_BARCODES A LEFT JOIN WOMDAA B ON A.ABOUT_GUID = B.guid |
| | | WHERE ITEM_BARCODE = '{0}' ", query.Kbbarcode); |
| | | |
| | | var ZsBarInfo = Db.Ado.SqlQuery<dynamic>(sql); |
| | | |
| | | new SugarParameter("@pi_kbbarcode", query.Kbbarcode), |
| | | new SugarParameter("@inP1", null), |
| | | new SugarParameter("@inP2", null), |
| | | new SugarParameter("@inP3", null), |
| | | new SugarParameter("@inP4", null) |
| | | }; |
| | | |
| | | try |
| | | { |
| | | var ZsBarInfo = Db.Ado.SqlQuery<dynamic>( |
| | | "EXEC prc_pda_getKbBarInfo @pi_kbbarcode,@inP1,@inP2,@inP3,@inP4", parameters); |
| | | |
| | | if (ZsBarInfo.Count < 1) |
| | | { |
| | | throw new Exception($"该卡板码{query.Zsbarcode}不存在!"); |
| | | throw new Exception($"该卡板码{query.Kbbarcode}不存在!"); |
| | | } |
| | | |
| | | |
| | | return ZsBarInfo; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception($"{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取卡板明细信息 |
| | |
| | | var sqlParams = new List<SugarParameter> { }; |
| | | |
| | | var sql2 = new StringBuilder(@" |
| | | SELECT NAME,line_no FROM MES_WORKSHOP_LINE WHERE isAgv = 1 ORDER BY line_no"); |
| | | SELECT NAME,line_no,agvPostion FROM MES_WORKSHOP_LINE WHERE isAgv = 1 ORDER BY line_no"); |
| | | |
| | | |
| | | var XtItem = Db.Ado.SqlQuery<dynamic>(sql2.ToString(), sqlParams); |
| | |
| | | { |
| | | new("@pi_user", SqlDbType.NVarChar, 100) { Value = query.userAccount }, |
| | | new("@pi_kb_barcode", SqlDbType.NVarChar, 100) { Value = query.KbBar }, |
| | | new("@in1", SqlDbType.NVarChar, 100) { Value = query.AgvDw }, |
| | | new("@outMsg", SqlDbType.NVarChar, 2500) { Direction = ParameterDirection.Output }, |
| | | new("@outSum", SqlDbType.Int) { Direction = ParameterDirection.Output } |
| | | }; |
| | |
| | | |
| | | var result = new |
| | | { |
| | | message = parameters[2].Value?.ToString(), |
| | | status = Convert.ToInt32(parameters[3].Value) |
| | | message = parameters[3].Value?.ToString(), |
| | | status = Convert.ToInt32(parameters[4].Value) |
| | | }; |
| | | |
| | | if (result.status <= 0) |
| | |
| | | { |
| | | new("@pi_user", SqlDbType.NVarChar, 100) { Value = query.userAccount }, |
| | | new("@pi_xtNum", SqlDbType.NVarChar, 100) { Value = query.XtNum }, |
| | | new("@in1", SqlDbType.NVarChar, 100) { Value = query.AgvDw }, |
| | | new("@outMsg", SqlDbType.NVarChar, 2500) { Direction = ParameterDirection.Output }, |
| | | new("@outSum", SqlDbType.Int) { Direction = ParameterDirection.Output } |
| | | }; |