| | |
| | | using System.Threading.Tasks; |
| | | using Tiger.IBusiness; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | |
| | | namespace Tiger.Business.WMS.Transaction |
| | | { |
| | |
| | | var location = Biz.Db.Queryable<V_WH_UNIT>().Where(q => q.LOCATION_CODE == targetLocation && q.AUTH_ORG == option.CurOrg).IncludesAllFirstLayer().First(); |
| | | if (!location.IsNullOrEmpty()) |
| | | { |
| | | var isTransfer = CurInvItem.Location?.LOCATION_CODE != location.LOCATION_CODE; |
| | | var isTransfer = CurInvItem?.Location?.LOCATION_CODE != location.LOCATION_CODE; |
| | | foreach (var item in CurInvItem.Items) |
| | | { |
| | | item.STATUS = WMS_ITEM.STATUSs.InStore.GetValue(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置当前条码的工序信息 |
| | | /// </summary> |
| | | public ApiAction<ScanOutput> SetOutPutMqttMsg(ApiAction<ScanOutput> action, string locale = null) |
| | | { |
| | | MQTT.Message msg = new() |
| | | { |
| | | IsSuccessed = action.IsSuccessed, |
| | | Content = Biz.T(action.LocaleMsg, locale), |
| | | }; |
| | | switch (action.Status) |
| | | { |
| | | case ApiAction.StatusCodes.Success: |
| | | msg.Voice = MQTT.Voice.Success; |
| | | msg.Color = "#FF1E90FF"; |
| | | break; |
| | | case ApiAction.StatusCodes.Warning: |
| | | msg.Voice = MQTT.Voice.Warning; |
| | | msg.Color = "#FFB8860B"; |
| | | break; |
| | | case ApiAction.StatusCodes.Error: |
| | | case ApiAction.StatusCodes.Failed: |
| | | msg.Voice = MQTT.Voice.Fail; |
| | | msg.Color = "#FFFF0000"; |
| | | break; |
| | | case ApiAction.StatusCodes.Exception: |
| | | msg.Voice = MQTT.Voice.Fail; |
| | | msg.Color = "#FF8B0000"; |
| | | break; |
| | | case ApiAction.StatusCodes.Normal: |
| | | case ApiAction.StatusCodes.NeedConfrim: |
| | | case ApiAction.StatusCodes.Confrimed: |
| | | default: |
| | | msg.Voice = MQTT.Voice.Silent; |
| | | msg.Color = "#FF000000"; |
| | | break; |
| | | } |
| | | if (action.IsSuccessed) |
| | | { |
| | | msg.Voice = MQTT.Voice.Pass; |
| | | msg.Color = "#FF228B22"; |
| | | } |
| | | else if (!action.IsSuccessed) |
| | | { |
| | | msg.Voice = MQTT.Voice.Fail; |
| | | msg.Color = "#FFFF0000"; |
| | | } |
| | | else |
| | | { |
| | | msg.Voice = MQTT.Voice.Silent; |
| | | msg.Color = "#FF000000"; |
| | | } |
| | | action.Data.MqttMsg = msg; |
| | | return action; |
| | | } |
| | | #endregion Functions |
| | | |
| | | public override bool Close(bool needSaveHistoryLog = false) |