| | |
| | | using CMS.Plugin.PipeLineLems.Domain.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Domain.CallMaterialOrderRecord; |
| | | using Volo.Abp.Users; |
| | | using CmsQueryExtensions.Entitys; |
| | | using CMS.Unit.RuntimeValue.Abstractions; |
| | | using CMS.Extensions.Variable; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Application.Implements; |
| | | |
| | |
| | | /// </summary> |
| | | public class SharedService : CMSPluginAppService |
| | | { |
| | | |
| | | |
| | | public async Task<MesOrderResponse> CommonPick(IServiceProvider _serviceProvider, PickInput input, MyCurrentUser myCurrentUser) |
| | | { |
| | | //1、记录分拣记录表 |
| | | //2、更新作业计划表的状态 =已分拣 |
| | | //3、写入 分拣变量 |
| | | |
| | | VariableService _variableService = _serviceProvider.GetRequiredService<VariableService>(); |
| | | |
| | | Dictionary<string, object?> keyValuePairs = new Dictionary<string, object?> |
| | | { |
| | | { "分拣托盘号","托盘1"}, |
| | | { "分拣方向", "短管装配"}, |
| | | { "分拣人", myCurrentUser.UserAccount } |
| | | }; |
| | | _variableService.WriteValueAsync(keyValuePairs); |
| | | var response = new MesOrderResponse |
| | | { |
| | | Code = "000000", |
| | | Data = "", |
| | | Fail = false, |
| | | Mesg = "处理成功", |
| | | Success = true, |
| | | Time = DateTime.UtcNow |
| | | }; |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// 创建作业计划 |
| | | /// </summary> |
| | |
| | | insertObj.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.未执行; |
| | | insertObj.WorkPlanStatus = Domain.Shared.Enums.WorkPlanStatusEnum.未生产; |
| | | insertObj.Sort = 1; |
| | | insertObj.CreatorId = userId; |
| | | insertObj.CreatorName = userAccount; |
| | | await workPlanAppService.CreateAsync(insertObj); |
| | | } |