dengjunjie
7 天以前 6d9829c889a826d39cbc911ef5d01825edd1bffc
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ProductionLineJob/CommonProductionLineJob.cs
@@ -40,14 +40,6 @@
                OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams");
                if (ProductionLine != null)
                {
                    //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
                    //{
                    //    stationCode = ProductionLine.DeviceCode,
                    //    traytype = 4,
                    //    Barcode = "25000037",
                    //    batchNo = "250325T1",
                    //};
                    //var content = ProductionLineToWMSRequest(MaterielGroupDTO);
                    #region MyRegion
                    var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request);
                    if (request == 1)
@@ -57,10 +49,13 @@
                        if (traytype == 4)
                        {
                            var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode).Replace("\0", "");
                            if (string.IsNullOrEmpty(Barcode)) throw new Exception("产线申请托盘号为空!");
                            var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode);
                            if (task == null)
                            {
                                var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", "");
                                if (string.IsNullOrEmpty(batchNo)) throw new Exception("产线申请批号为空!");
                                WriteDebug($"{ProductionLine.DeviceName}申请入库", $"托盘号【{Barcode}】,批柜号【{batchNo}】");
                                ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO()
                                {
                                    stationCode = ProductionLine.DeviceCode,
@@ -80,7 +75,7 @@
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(nameof(CommonProductionLineJob) + ":" + ex.ToString());
                //Console.Out.WriteLine(nameof(CommonProductionLineJob) + ":" + ex.ToString());
            }
            return Task.CompletedTask;
        }