1.PDA获取扫码产品称重数据
2.仓库信息调整
3.采购入库优化
| | |
| | | } |
| | | } |
| | | |
| | | //GetItemsXcsl |
| | | /// <summary> |
| | | /// 根据线体获取仪器重量 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetWeightByXt")] |
| | | public ResponseResult GetWeightByXt(dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetWeightByXt(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | |
| | | /// <summary> |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "depot_guid")] |
| | | public Guid? DepotGuid { get; set; } |
| | | public string? DepotGuid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ID(SEQ_INV_ID)(ERPID) |
| | |
| | | /// 默认值: (newid()) |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "guid", IsPrimaryKey = true)] |
| | | public Guid Guid { get; set; } |
| | | public string Guid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ID(SEQ_INV_ID) |
| | |
| | | throw new Exception("此条码不属于到货条码,无法用采购入库!"); |
| | | |
| | | var inventory = Db.Queryable<MesInvItemArn>() |
| | | .Where(it => it.BillNo == itemBarcodeDetails.BillNo && it.Status == 1 ) |
| | | .Where(it => it.BillNo == itemBarcodeDetails.BillNo && it.Fstatus == true ) |
| | | .First(); |
| | | |
| | | if (inventory == null) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public dynamic GetWeightByXt(dynamic unity) |
| | | { |
| | | |
| | | //// 使用参数化查询防止SQL注入 |
| | | var sqlParams = new List<SugarParameter> { new("@LINEID", unity.shdh) }; |
| | | |
| | | var sql2 = @"SELECT TOP 1 realWeight FROM WORK_WEIGHT WHERE lineId = '' ORDER BY createDate DESC"; |
| | | |
| | | var XcslItem = Db.Ado.SqlQuery<dynamic>(sql2, sqlParams); |
| | | |
| | | if (XcslItem.Count < 1) |
| | | throw new Exception($"送货单号【{unity.shdh}】条码明细不存在或未同步!"); |
| | | |
| | | return XcslItem; // 返回第一行数据,如果没有则返回 null |
| | | } |
| | | |
| | | } |