| | |
| | | using System.Threading.Tasks; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Sharetronic.Shelf; |
| | | using System.ComponentModel; |
| | | |
| | | namespace Tiger.Business.MES.Transaction |
| | | { |
| | |
| | | public string OrgCode { get; set; } |
| | | public bool his_isComplete { get; set; } |
| | | public bool isManual { get; set; } |
| | | public decimal cutQty { get; set; } |
| | | /// <summary> |
| | | /// 步骤类型 |
| | | /// </summary> |
| | | public enum Step_Types |
| | | { |
| | | /// <summary> |
| | | /// 扫描机器编码 |
| | | /// </summary> |
| | | [Description("机器编码")] |
| | | SmtCode, |
| | | /// <summary> |
| | | /// 扫描槽位 |
| | | /// </summary> |
| | | [Description("槽位")] |
| | | SlotNo, |
| | | /// <summary> |
| | | /// 扫描飞达 |
| | | /// </summary> |
| | | [Description("Feeder")] |
| | | Feeder, |
| | | /// <summary> |
| | | /// 扫描料盘SN |
| | | /// </summary> |
| | | [Description("料盘码")] |
| | | SN, |
| | | } |
| | | |
| | | #endregion Propertys & Variables |
| | | |
| | |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction<ProdReqOutput>> ScanItem(BaseCodeInput input) |
| | | public async Task<ApiAction<ProdReqOutput>> ScanItem(SmtLoadingInput input) |
| | | { |
| | | var action = new ApiAction<ProdReqOutput>(); |
| | | try |
| | |
| | | if (input.Code.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("条码不能为空"); |
| | | action.LocaleMsg = Biz.L($"{EnumHelper.GetEnum<Step_Types>(input.Step).GetDesc()}不能为空"); |
| | | return action; |
| | | } |
| | | |
| | | switch (EnumHelper.GetEnum<Step_Types>(input.Step)) |
| | | { |
| | | case Step_Types.SmtCode: |
| | | ExecuteSmtCode(); |
| | | break; |
| | | case Step_Types.SlotNo: |
| | | ExecuteSlotNo(); |
| | | break; |
| | | case Step_Types.Feeder: |
| | | ExecuteFeeder(); |
| | | break; |
| | | case Step_Types.SN: |
| | | ExecuteSN(); |
| | | break; |
| | | } |
| | | |
| | | //action.Data = new ProdReqOutput() |
| | |
| | | return action; |
| | | } |
| | | |
| | | private ApiAction ExecuteSmtCode() { |
| | | var action = new ApiAction(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"扫描机器编码异常"); |
| | | } |
| | | return action; |
| | | } |
| | | |
| | | private ApiAction ExecuteSlotNo() |
| | | { |
| | | var action = new ApiAction(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"扫描槽位异常"); |
| | | } |
| | | return action; |
| | | } |
| | | |
| | | private ApiAction ExecuteFeeder() |
| | | { |
| | | var action = new ApiAction(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"扫描Feeder异常"); |
| | | } |
| | | return action; |
| | | } |
| | | |
| | | private ApiAction ExecuteSN() |
| | | { |
| | | var action = new ApiAction(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"扫描料盘码异常"); |
| | | } |
| | | return action; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加一个ApiAction的历史记录 |
| | | /// </summary> |