| | |
| | | public class SharedService : CMSPluginAppService |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分拣功能 |
| | | /// </summary> |
| | | /// <param name="_serviceProvider"></param> |
| | | /// <param name="input"></param> |
| | | /// <param name="myCurrentUser"></param> |
| | | /// <returns></returns> |
| | | public async Task<MesOrderResponse> CommonPick(IServiceProvider _serviceProvider, PickInput input, MyCurrentUser myCurrentUser) |
| | | { |
| | | //1、记录分拣记录表 |
| | | //2、更新作业计划表的状态 =已分拣 |
| | | //3、写入 分拣变量 |
| | | //4、写入追溯报表 |
| | | //5、物料组盘 |
| | | |
| | | VariableService _variableService = _serviceProvider.GetRequiredService<VariableService>(); |
| | | var _workSectionManager = _serviceProvider.GetRequiredService<IWorkSectionManager>(); |
| | |
| | | var materialProvider = _serviceProvider.GetRequiredService<IMaterialProvider>(); |
| | | var workPlanAppService = _serviceProvider.GetRequiredService<IWorkPlanAppService>(); |
| | | |
| | | Dictionary<string, object?> keyValuePairs = new Dictionary<string, object?> |
| | | { |
| | | { "分拣托盘号","托盘1"}, |
| | | { "分拣方向", "短管装配"}, |
| | | { "分拣人", myCurrentUser.UserAccount } |
| | | }; |
| | | _variableService.WriteValueAsync(keyValuePairs); |
| | | //Dictionary<string, object?> keyValuePairs = new Dictionary<string, object?> |
| | | // { |
| | | // { "分拣托盘号","托盘1"}, |
| | | // { "分拣方向", "短管装配"}, |
| | | // { "分拣人", myCurrentUser.UserAccount } |
| | | // }; |
| | | //_variableService.WriteValueAsync(keyValuePairs); |
| | | |
| | | //根据工序名获取工序对象 |
| | | var workSection = await _workSectionManager.GetByNameAsync("分拣工序"); |
| | |
| | | { |
| | | _value = "短管装配"; |
| | | } |
| | | if (item.Name == "分拣托盘号") |
| | | { |
| | | _value = input.ContinerNo; |
| | | } |
| | | if (item.Name == "分拣人") |
| | | { |
| | | _value = myCurrentUser.UserAccount; |
| | | } |
| | | //item.Key |
| | | TraceParamModel traceParamModel = new TraceParamModel() |
| | | { |