using AmrControl.ADS; using AmrControl.Dto; using System.Text; namespace AmrControl.Common { /// /// 测试数据 /// public class MockData { /// /// 车的初始化 /// /// public static List getJgrs() { List ls = new List(); //todo:补上数据接口 JGR_Tc_Model jGR_Tc_Model = new JGR_Tc_Model(); jGR_Tc_Model.jgrSN = "JGR-23001"; jGR_Tc_Model.jgrType = (byte)JgrType.StorageCar; //仓储车 jGR_Tc_Model.jgrID = 001; jGR_Tc_Model.isOnline = 1; jGR_Tc_Model.currLocation_X = 3; jGR_Tc_Model.currLocation_Y = 2; jGR_Tc_Model.electricity = 80; jGR_Tc_Model.displayX = 38; jGR_Tc_Model.displayY = 2; ls.Add(jGR_Tc_Model); jGR_Tc_Model = new JGR_Tc_Model(); jGR_Tc_Model.jgrSN = "JGR-23101"; jGR_Tc_Model.rfid = "230105"; jGR_Tc_Model.jgrType = (byte)JgrType.RailCar;//轨道车 jGR_Tc_Model.jgrID = 002; jGR_Tc_Model.isOnline = 1; jGR_Tc_Model.currLocation_X = 2; jGR_Tc_Model.currLocation_Y = 1; jGR_Tc_Model.displayX = 2; jGR_Tc_Model.displayY = 2; jGR_Tc_Model.electricity = 30; ls.Add(jGR_Tc_Model); return ls; } /// /// 充电桩初始化 /// /// public static List getChargingStations() { List ls = new List(); //todo:补上数据接口 ChargingStationDataModel jGR_Tc_Model = new ChargingStationDataModel(); jGR_Tc_Model.csSN = "JGP-23101"; jGR_Tc_Model.csType = (byte)JgrType.StorageCharging; //仓储的充电器 jGR_Tc_Model.csID = 001; jGR_Tc_Model.isOnline = 1; jGR_Tc_Model.positionX = 1; jGR_Tc_Model.positionX = 1; jGR_Tc_Model.displayX = 36; jGR_Tc_Model.displayY = 1; ls.Add(jGR_Tc_Model); jGR_Tc_Model = new ChargingStationDataModel(); jGR_Tc_Model.csSN = "JGP-23102"; jGR_Tc_Model.csType = (byte)JgrType.RailCharging; //轨道的充电器 jGR_Tc_Model.csID = 002; jGR_Tc_Model.isOnline = 1; jGR_Tc_Model.positionX = 33; jGR_Tc_Model.positionY = 1; jGR_Tc_Model.displayX = 33; jGR_Tc_Model.displayY = 2; ls.Add(jGR_Tc_Model); return ls; } /// /// 工位的初始化 /// /// public static List getStations() { List ls = new List(); //todo:补上数据接口 StationDataModel station = new StationDataModel(); station.stationID = "JGS-ZP-23201"; station.stationType = StationType.WS_CWCS; station.displayName = "常温测试"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 1; station.positionY = 5; station.displayX = 1; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-SPTS-23202"; station.stationType = StationType.WS_SPTS; station.displayName = "射频调试工位1"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 4; station.positionY = 5; station.displayX = 4; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-SPTS-23203"; station.stationType = StationType.WS_SPTS; station.displayName = "射频调试工位2"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 7; station.positionY = 5; station.displayX = 7; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-ZP-23204"; station.stationType = StationType.WS_ZP; station.displayName = "装配工位1"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 10; station.positionY = 5; station.displayX = 10; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-ZP-23205"; station.stationType = StationType.WS_ZP; station.displayName = "装配工位2"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 13; station.positionY = 5; station.displayX = 13; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-ZP-23206"; station.stationType = StationType.WS_ZP; station.displayName = "装配工位3"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 16; station.positionY = 5; station.displayX = 16; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-ZP-23207"; station.stationType = StationType.WS_ZP; station.displayName = "装配工位4"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 19; station.positionY = 5; station.displayX = 19; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-YCL-23208"; station.stationType = StationType.WS_YCL; station.displayName = "预处理工位1"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 22; station.positionY = 5; station.displayX = 22; station.displayY = 5; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-CC-JL-23301"; station.stationType = StationType.WS_CC_JL; station.displayName = "捡料工位"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 26; station.positionY = 8; station.displayX = 26; station.displayY = 8; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); station = new StationDataModel(); station.stationID = "JGS-CC-PF-23302"; station.stationType = StationType.WS_CC_PF; station.displayName = "派发工位"; station.userOnPosition = false; station.isPowerOn = true; station.positionX = 27; station.positionY = 8; station.displayX = 27; station.displayY = 8; station.taskCount = 8; station.finishedCount = 3; ls.Add(station); return ls; } public static List getIssueNodeDto() { List issueNodeDtos = new List(); IssueNoteDto node = new IssueNoteDto(); node.StationID = "JGS-ZP-23207"; node.ID = "ID230501"; node.MesTaskID = "mesid230501"; RequireRawBom bom = new RequireRawBom(); bom.MaterialID = "pcba-i001"; bom.MaterialType = "PCBA"; bom.MaterialName = "PCBA板"; bom.DemandQuantity = 2; bom.ReleaseQuantity = 0; node.RawBoms.Add(bom); bom = new RequireRawBom(); bom.MaterialID = "j30j29k-i022"; bom.MaterialName = "J30J-29K接头"; bom.MaterialType = "J30J"; bom.DemandQuantity = 5; bom.ReleaseQuantity = 0; node.RawBoms.Add(bom); issueNodeDtos.Add(node); return issueNodeDtos; } /// /// 根据物料号获取储位信息 /// /// /// public static List getStorageBox() { List boxs = new List(); StorageBox storageBox = new StorageBox(); storageBox.BoxRFID = "rfid001"; storageBox.PositionX = 1; storageBox.PositionY = 1; storageBox.PositionZ = 1; RawBom bom = new RawBom(); bom.MaterialID = "pcba-i001"; bom.MaterialName = "PCBA板"; bom.MaterialType = "PCBA"; bom.Quantity = 10; storageBox.RawBoms.Add(bom); boxs.Add(storageBox); storageBox = new StorageBox(); storageBox.BoxRFID = "rfid002"; storageBox.PositionX = 2; storageBox.PositionY = 2; storageBox.PositionZ = 1; bom = new RawBom(); bom.MaterialID = "j30j29k-i022"; bom.MaterialName = "J30J-29K接头"; bom.MaterialType = "J30J"; bom.Quantity = 20; storageBox.RawBoms.Add(bom); boxs.Add(storageBox); return boxs; } public static List getStorageBox(int x , int y) { List boxs = new List(); StorageBox storageBox = new StorageBox(); if(x ==1 && y==1) { storageBox.BoxRFID = "rfid001"; storageBox.PositionX = 1; storageBox.PositionY = 1; storageBox.PositionZ = 1; RawBom bom = new RawBom(); bom.MaterialID = "pcba-i001"; bom.MaterialName = "PCBA板"; bom.MaterialType = "PCBA"; bom.Quantity = 10; storageBox.RawBoms.Add(bom); boxs.Add(storageBox); } else if(x == 2 && y == 2) { storageBox = new StorageBox(); storageBox.BoxRFID = "rfid002"; storageBox.PositionX = 2; storageBox.PositionY = 2; storageBox.PositionZ = 1; RawBom bom = new RawBom(); bom.MaterialID = "j30j29k-i022"; bom.MaterialName = "J30J-29K接头"; bom.MaterialType = "J30J"; bom.Quantity = 20; storageBox.RawBoms.Add(bom); boxs.Add(storageBox); } return boxs; } } }