| | |
| | | if (oldhtytask ==null) |
| | | { |
| | | task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode; |
| | | task.Grade = 1; |
| | | task.Remark = (int)MateTypeEnum.ZiChan; |
| | | //æ¥æ¾ç¸é»çåºä½ |
| | | Dt_LocationInfo Towlocation = new Dt_LocationInfo(); |
| | | var Onelocation = _LocationInfoRepository.QueryFirst(v => v.LocationCode == task.TargetAddress); |
| | | if (Onelocation.Depth == 1) |
| | | { |
| | | Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 2); |
| | | } |
| | | else |
| | | { |
| | | Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 1); |
| | | } |
| | | task.NextAddress = Towlocation.LocationCode; |
| | | task.Roadway = "TC01"; |
| | | task.TaskType = (int)TaskInboundTypeEnum.Inbound; |
| | | task.TaskState = (int)TaskInStatusEnum.InNew; |
| | | task.PalletCode = "text"; |
| | | task.CurrentAddress = "text"; |
| | | task.WMSId = 3; |
| | | _dt_taskRepositiry.AddData(task); |
| | | } |
| | | } |
| | | if (OHTJob.oHTReadData.R_RGVMode && OHTJob.oHTReadData.R_DK_isready)//RGVä¸ææ¨¡å¼ï¼ä¸è¥¿è·¨æ¶åæä¸æä¿¡å· |
| | | { |
| | | var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "ä¸è·¨æ¶å"); |
| | | task.SourceAddress = station.Row + "-" + station.Column + "-1"; |
| | | var oldhtytask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == task.SourceAddress); |
| | | if (oldhtytask==null) |
| | | { |
| | | task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode; |
| | | var DKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "西跨æ¶å"); |
| | | var DKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "ä¸è·¨æ¶å"); |
| | | string address = DKstation.Row + "-" + DKstation.Column + "-1"; |
| | | var oldtask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == address); |
| | | if (oldtask != null && oldtask.TaskState == (int)TaskInStatusEnum.InNew) |
| | |
| | | _dt_taskRepositiry.AddData(task); |
| | | } |
| | | } |
| | | if (OHTJob.oHTReadData.R_RGVMode && OHTJob.oHTReadData.R_DK_isready)//RGVä¸ææ¨¡å¼ï¼ä¸è¥¿è·¨æ¶åæä¸æä¿¡å· |
| | | { |
| | | var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "ä¸è·¨æ¶å"); |
| | | task.SourceAddress = station.Row + "-" + station.Column + "-1"; |
| | | var oldhtytask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == task.SourceAddress); |
| | | if (oldhtytask==null) |
| | | { |
| | | task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode; |
| | | |
| | | task.Grade = 1; |
| | | task.Remark = (int)MateTypeEnum.ZiChan; |
| | | //æ¥æ¾ç¸é»çåºä½ |
| | | Dt_LocationInfo Towlocation = new Dt_LocationInfo(); |
| | | var Onelocation = _LocationInfoRepository.QueryFirst(v => v.LocationCode == task.TargetAddress); |
| | | if (Onelocation.Depth == 1) |
| | | { |
| | | Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 2); |
| | | } |
| | | else |
| | | { |
| | | Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 1); |
| | | } |
| | | task.NextAddress = Towlocation.LocationCode; |
| | | task.Roadway = "TC01"; |
| | | task.TaskType = (int)TaskInboundTypeEnum.Inbound; |
| | | task.TaskState = (int)TaskInStatusEnum.InNew; |
| | | task.PalletCode = "text"; |
| | | task.CurrentAddress = "text"; |
| | | task.WMSId = 3; |
| | | _dt_taskRepositiry.AddData(task); |
| | | } |
| | | } |
| | | if (OHTJob.oHTReadData.R_CCMode && OHTJob.oHTReadData.R_DK_isready)//人工åè½¦ä¸ææ¨¡å¼ï¼ä¸è¥¿è·¨æ¶åæä¸æä¿¡å· |
| | | { |
| | | var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "ä¸è·¨æ¶å"); |
| | |
| | | if (oldhtytask==null) |
| | | { |
| | | task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode; |
| | | var XKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "西跨æ¶å"); |
| | | string address = XKstation.Row + "-" + XKstation.Column + "-1"; |
| | | var oldtask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == address); |
| | | if (oldtask != null && oldtask.TaskState == (int)TaskInStatusEnum.InNew) |
| | | { |
| | | task.Grade = 2; |
| | | } |
| | | else |
| | | { |
| | | task.Grade = 1; |
| | | } |
| | | task.Grade = 1; |
| | | task.Remark = (int)MateTypeEnum.WaiGou; |
| | | //æ¥æ¾ç¸é»çåºä½ |
| | |
| | | if (oldhtytask == null) |
| | | { |
| | | task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode; |
| | | var XKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "ä¸è·¨æ¶å"); |
| | | string address = XKstation.Row + "-" + XKstation.Column + "-1"; |
| | | var oldtask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == address); |
| | | if (oldtask != null && oldtask.TaskState == (int)TaskInStatusEnum.InNew) |
| | | { |
| | | task.Grade = 2; |
| | | } |
| | | else |
| | | { |
| | | task.Grade = 1; |
| | | } |
| | | task.Grade = 1; |
| | | task.Remark = (int)MateTypeEnum.WaiGou; |
| | | //æ¥æ¾ç¸é»çåºä½ |
| | | Dt_LocationInfo Towlocation = new Dt_LocationInfo(); |
| | |
| | | try |
| | | { |
| | | #region çæåºåºä»»å¡ |
| | | if (!OHTJob.oHTReadData.R_ZXJ_isWork) |
| | | { |
| | | throw new Exception($"æ´å½¢æºæå
¥ä½¿ç¨ä¿¡å·ä¸ºfalse"); |
| | | } |
| | | //if (!OHTJob.oHTReadData.R_ZXJ_isWork) |
| | | //{ |
| | | // throw new Exception($"æ´å½¢æºæå
¥ä½¿ç¨ä¿¡å·ä¸ºfalse"); |
| | | //} |
| | | var isout = _outStockRepository.QueryFirst(v => v.Id == 1); |
| | | if (isout.isout == 1) |
| | | { |