123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- using AmrControl.ADS;
- using AmrControl.Dto;
- using System.Text;
- namespace AmrControl.Common
- {
- /// <summary>
- /// 测试数据
- /// </summary>
- public class MockData
- {
- /// <summary>
- /// 车的初始化
- /// </summary>
- /// <returns></returns>
- public static List<JGR_Tc_Model> getJgrs()
- {
- List<JGR_Tc_Model> ls = new List<JGR_Tc_Model>();
- //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;
- }
- /// <summary>
- /// 充电桩初始化
- /// </summary>
- /// <returns></returns>
- public static List<ChargingStationDataModel> getChargingStations()
- {
- List<ChargingStationDataModel> ls = new List<ChargingStationDataModel>();
- //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;
- }
- /// <summary>
- /// 工位的初始化
- /// </summary>
- /// <returns></returns>
- public static List<StationDataModel> getStations()
- {
- List<StationDataModel> ls = new List<StationDataModel>();
- //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<IssueNoteDto> getIssueNodeDto()
- {
- List<IssueNoteDto> issueNodeDtos = new List<IssueNoteDto>();
- 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;
- }
- /// <summary>
- /// 根据物料号获取储位信息
- /// </summary>
- /// <param name="materialid"></param>
- /// <returns></returns>
- public static List<StorageBox> getStorageBox()
- {
- List<StorageBox> boxs = new List<StorageBox>();
- 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<StorageBox> getStorageBox(int x , int y)
- {
- List<StorageBox> boxs = new List<StorageBox>();
- 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;
- }
- }
- }
|