| | |
| | | else |
| | | { |
| | | |
| | | //TODO:暂时生成产品ID |
| | | var productID = DateTime.Now.ToString("yyyyMMddHHmmssfff"); |
| | | //var productID = new_workPlanList.Last().PipeSpecCode; |
| | | Dictionary<string, object?> keyValuePairs_productID = new Dictionary<string, object?> |
| | | { |
| | | { "打码_ProductID", productID}, |
| | | }; |
| | | var ret = _variableService.WriteValueAsync(keyValuePairs_productID); |
| | | |
| | | |
| | | var myTaskNo = plcTaskNo.Content.Value.SafeString().ToString(); |
| | | CallMaterialOrder callMaterialOrder = null; |
| | |
| | | //根据原料标识寻找 作业计划 |
| | | var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | if (workPlanList?.Count == 0) return;//结束 |
| | | |
| | | //TODO:暂时生成产品ID |
| | | //var productID = DateTime.Now.ToString("yyyyMMddHHmmssfff"); |
| | | var productID = workPlanList.First().PipeSpecCode; |
| | | Dictionary<string, object?> keyValuePairs_productID = new Dictionary<string, object?> |
| | | { |
| | | { "打码_ProductID", productID}, |
| | | }; |
| | | var ret = _variableService.WriteValueAsync(keyValuePairs_productID); |
| | | |
| | | //更新为生产中 |
| | | foreach (var item in workPlanList) |
| | |
| | | { "打码工件1",code1}, |
| | | { "打码工件2", code2}, |
| | | { "打码工件3", code3 }, |
| | | { "打码管段编码", new_workPlanList.First().PipeSpecCode }, |
| | | { "打码管段名称", new_workPlanList.First().PipeSectionName }, |
| | | { "打码原料管型号", new_workPlanList.First().MaterialMode }, |
| | | { "打码原料标识", new_workPlanList.First().DataIdentifier } |
| | | }; |