| | |
| | | //} |
| | | var MaxDC = CurPoolList.Any(x => x.ITEM_CODE == CurInv.ItemInfo.ITEM_CODE) ? CurPoolList.Where(x => x.ITEM_CODE == CurInv.ItemInfo.ITEM_CODE).Max(t => t.PROD_DATE) : DateTime.MinValue; |
| | | //判断系统参数是否设置先进先出 |
| | | if (Biz.SysParam["YesOrNo"].PARAM_VALUE == "Y") |
| | | if (Cache.SysParam["YesOrNo"].PARAM_VALUE == "Y") |
| | | { |
| | | if (CurInv.Items.Max(x => x.PROD_DATE).Date > MaxDC.Date) |
| | | { |
| | |
| | | } |
| | | |
| | | //发送到MES |
| | | var isSend = Biz.SysParam["IsSend", "SendToMES"].PARAM_VALUE.ToString() == "Y"; |
| | | var isSend = Cache.SysParam["IsSend", "SendToMES"].PARAM_VALUE.ToString() == "Y"; |
| | | if (isSend && !isCutting) |
| | | { |
| | | var mesApi = _factory != null ? _factory.MES_API : Biz.SysParam["apiUrl", "SendToMES"].PARAM_VALUE.ToString(); |
| | | var mesApi = _factory != null ? _factory.MES_API : Cache.SysParam["apiUrl", "SendToMES"].PARAM_VALUE.ToString(); |
| | | var response = HttpHelper.PostAsync(mesApi, JsonConvert.SerializeObject(toMes)).Result; |
| | | var _action = JsonConvert.DeserializeObject<ApiAction>(response.Message); |
| | | Logger.Interface.Info($"工单领料 =>发料完成,单号[{req.BILLCODE}],条码[{CurInv.SN}],状态[{req.STATUS.GetEnumDesc<BIZ_ERP_PROD_OUT.STATUSs>()}],MES返回:{response.Message}"); |