111
cjs
2025-06-18 8ab19ae17dc98d3c79f87ca54aa4cdc75d174b12
ams/Hanhe.iWCS.TaizhouGEMTwoProtocol/WMSHelper.cs
@@ -423,30 +423,30 @@
                        }
                        else
                        {
                            //var time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoComTwo>(Query.EQ("timeStamp", timeStamp), "TimeCuoInfoCom");
                            //CMMLog.Info($"WMSIn-{startBit}:{ItemCode}:查询条件:timeStamp={timeStamp},读出 TimeCuoInfoComTwo 表数据为:{JsonConvert.SerializeObject(time)}");
                            //var erpItemTableInfo = MongoDBSingleton.Instance.FindOne<ERPItemTable>(Query.EQ("item_code", time.materialCode), "ERPItemTable");
                            //CMMLog.Info($"WMSIn-{startBit}:查询条件:item_code={time.materialCode},读出 ERPItemTable 表数据为:{JsonConvert.SerializeObject(erpItemTableInfo)}");
                            //if (ItemCode == "time" && time != null && erpItemTableInfo != null)
                            //{
                            //    CMMLog.Info($"WMSIn-{startBit}:time获取时间戳数据为:{time.TimeCuo}!");
                            //    model.data.Add(new ItemData()
                            //    {
                            //        itemCode = time.productModel,
                            //        lotNo = time.lotNo,
                            //        machineNo = time.packingMachineNumber1.ToString(),
                            //        packageCode = time.bagNumber1.ToString(),
                            //        foldingbag = time.isFold1.ToString(),
                            //        timeStamp = int.Parse(time.TimeCuo),
                            //        realWeight = time.realWeight1,
                            //
                            //        Jm_Item_Code = time.materialCode,
                            //        Jm_Item_Name = time.materialName,
                            //        Jm_Item_Model = time.productModel,
                            //        Jm_Item_Unit = time.measurementUnit,
                            //        Jm_Item_Staff = employee_id
                            //    });
                            //}
                            var time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoComTwo>(Query.EQ("timeStamp", timeStamp), "TimeCuoInfoCom");
                            CMMLog.Info($"WMSIn-{startBit}:{ItemCode}:查询条件:timeStamp={timeStamp},读出 TimeCuoInfoComTwo 表数据为:{JsonConvert.SerializeObject(time)}");
                            var erpItemTableInfo = MongoDBSingleton.Instance.FindOne<ERPItemTable>(Query.EQ("item_code", time.materialCode), "ERPItemTable");
                            CMMLog.Info($"WMSIn-{startBit}:查询条件:item_code={time.materialCode},读出 ERPItemTable 表数据为:{JsonConvert.SerializeObject(erpItemTableInfo)}");
                            if (ItemCode == "time" && time != null && erpItemTableInfo != null)
                            {
                                CMMLog.Info($"WMSIn-{startBit}:time获取时间戳数据为:{time.TimeCuo}!");
                                model.data.Add(new ItemData()
                                {
                                    itemCode = erpItemTableInfo.item_code,
                                    lotNo = erpItemTableInfo.item_spec,
                                    machineNo = time.packingMachineNumber.ToString(),
                                    packageCode = time.bagNumber.ToString(),
                                    foldingbag = time.isFold.ToString(),
                                    timeStamp = int.Parse(time.TimeCuo),
                                    realWeight = time.realWeight,
                                    Jm_Item_Code = erpItemTableInfo.item_code,
                                    Jm_Item_Name = erpItemTableInfo.item_name,
                                    Jm_Item_Model = erpItemTableInfo.item_spec,
                                    Jm_Item_Unit = erpItemTableInfo.item_uom,
                                    Jm_Item_Staff = employee_id
                                });
                            }
                        }
                    }
                    else
@@ -632,41 +632,6 @@
                                    //totalCount = time.totalCount,
                                });
                            }
                        }
                        else
                        {
                            //var time = MongoDBSingleton.Instance.FindOne<TimeCuoInfoComTwo>(Query.EQ("timeStamp", timeStamp), "TimeCuoInfoCom");
                            //CMMLog.Info($"WMSInTwo-{startBit}:{ItemCode}:查询条件:timeStamp={timeStamp},读出 TimeCuoInfoComTwo 表数据为:{JsonConvert.SerializeObject(time)}");
                            //if (ItemCode == "time" && time != null)
                            //{
                            //    CMMLog.Info($"WMSInTwo-{startBit}:time获取时间戳数据为:{time.TimeCuo}!");
                            //    model.data.Add(new ItemData()
                            //    {
                            //        //1楼拆盘机调WMS获取入库终点,传输时间戳数据(暂定)
                            //        //isFold = time.isFold,
                            //        //packingMachineNumber = time.packingMachineNumber,
                            //        itemCode = time.productModel,
                            //        lotNo = time.lotNo,
                            //        machineNo = time.packingMachineNumber1.ToString(),
                            //        packageCode = time.bagNumber1.ToString(),
                            //        //palletLayers = time.bagNumber1.ToString(),
                            //        foldingbag = time.isFold1.ToString(),
                            //        //totalWeight = time.totalWeight,
                            //        timeStamp = int.Parse(time.TimeCuo),
                            //        //productType = time.productModel,
                            //        //bagNumber = time.bagNumber,
                            //        //needWeight = time.needWeight,
                            //        realWeight = time.realWeight1,
                            //        //batchNumber = time.batchNumber,
                            //        //totalCount = time.totalCount,
                            //
                            //        Jm_Item_Code = time.materialCode,
                            //        Jm_Item_Name = time.materialName,
                            //        Jm_Item_Model = time.productModel,
                            //        Jm_Item_Unit = time.measurementUnit,
                            //        Jm_Item_Staff = employee_id
                            //    });
                            //}
                        }
                    }