| | |
| | | private short R_Outbound_TaskIDField; |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | | private bool R_PalletizingAckField; |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | | private bool R_PalletizingFinishField; |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | |
| | | if ((this.R_Outbound_TaskIDField.Equals(value) != true)) { |
| | | this.R_Outbound_TaskIDField = value; |
| | | this.RaisePropertyChanged("R_Outbound_TaskID"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [System.Runtime.Serialization.DataMemberAttribute()] |
| | | public bool R_PalletizingAck { |
| | | get { |
| | | return this.R_PalletizingAckField; |
| | | } |
| | | set { |
| | | if ((this.R_PalletizingAckField.Equals(value) != true)) { |
| | | this.R_PalletizingAckField = value; |
| | | this.RaisePropertyChanged("R_PalletizingAck"); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | | private string W_PackageWidthField; |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | | private short W_PalletizingBucketTypeField; |
| | | |
| | | [System.Runtime.Serialization.OptionalFieldAttribute()] |
| | | private short W_PalletizingPlaceXField; |
| | |
| | | if ((object.ReferenceEquals(this.W_PackageWidthField, value) != true)) { |
| | | this.W_PackageWidthField = value; |
| | | this.RaisePropertyChanged("W_PackageWidth"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [System.Runtime.Serialization.DataMemberAttribute()] |
| | | public short W_PalletizingBucketType { |
| | | get { |
| | | return this.W_PalletizingBucketTypeField; |
| | | } |
| | | set { |
| | | if ((this.W_PalletizingBucketTypeField.Equals(value) != true)) { |
| | | this.W_PalletizingBucketTypeField = value; |
| | | this.RaisePropertyChanged("W_PalletizingBucketType"); |
| | | } |
| | | } |
| | | } |
| | |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WritePalletizingTaskInfo", ReplyAction="http://tempuri.org/IStationService/WritePalletizingTaskInfoResponse")] |
| | | iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ); |
| | | iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WritePalletizingTaskInfo", ReplyAction="http://tempuri.org/IStationService/WritePalletizingTaskInfoResponse")] |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ); |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/SetPalletizingTaskFinishAck", ReplyAction="http://tempuri.org/IStationService/SetPalletizingTaskFinishAckResponse")] |
| | | iWareCC.StationService.SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode); |
| | |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_FinishACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_FinishACKResponse")] |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_FinishACKAsync(int deviceId, bool value, int plcTaskId); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_ACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_ACKResponse")] |
| | | iWareCC.StationService.SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_ACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_ACKResponse")] |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_ACKAsync(int deviceId, bool value, string stationCode); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteScanValidateACK", ReplyAction="http://tempuri.org/IStationService/WriteScanValidateACKResponse")] |
| | | iWareCC.StationService.SdaResEntity WriteScanValidateACK(bool isReset, int deviceId, string stationCode, bool value, int plcTaskId); |
| | |
| | | return base.Channel.WriteOutStoreTaskInfoAsync(deviceId, stationCode, sourcePlaceNo, outbound_TaskID); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ) { |
| | | return base.Channel.WritePalletizingTaskInfo(deviceId, stationCode, taskID, isLast, isFirst, length, width, height, rotate, toplace, placeX, placeY, placeZ); |
| | | public iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) { |
| | | return base.Channel.WritePalletizingTaskInfo(deviceId, stationCode, taskID, length, width, height, rotate, toplace, placeX, placeY, placeZ, lastnum); |
| | | } |
| | | |
| | | public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ) { |
| | | return base.Channel.WritePalletizingTaskInfoAsync(deviceId, stationCode, taskID, isLast, isFirst, length, width, height, rotate, toplace, placeX, placeY, placeZ); |
| | | public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) { |
| | | return base.Channel.WritePalletizingTaskInfoAsync(deviceId, stationCode, taskID, length, width, height, rotate, toplace, placeX, placeY, placeZ, lastnum); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode) { |
| | |
| | | return base.Channel.WriteStation_FinishACKAsync(deviceId, value, plcTaskId); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode) { |
| | | return base.Channel.WriteStation_ACK(deviceId, value, stationCode); |
| | | } |
| | | |
| | | public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_ACKAsync(int deviceId, bool value, string stationCode) { |
| | | return base.Channel.WriteStation_ACKAsync(deviceId, value, stationCode); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity WriteScanValidateACK(bool isReset, int deviceId, string stationCode, bool value, int plcTaskId) { |
| | | return base.Channel.WriteScanValidateACK(isReset, deviceId, stationCode, value, plcTaskId); |
| | | } |
| | |
| | | <wsdl:message name="IStationService_WriteStation_FinishACK_OutputMessage"> |
| | | <wsdl:part name="parameters" element="tns:WriteStation_FinishACKResponse" /> |
| | | </wsdl:message> |
| | | <wsdl:message name="IStationService_WriteStation_ACK_InputMessage"> |
| | | <wsdl:part name="parameters" element="tns:WriteStation_ACK" /> |
| | | </wsdl:message> |
| | | <wsdl:message name="IStationService_WriteStation_ACK_OutputMessage"> |
| | | <wsdl:part name="parameters" element="tns:WriteStation_ACKResponse" /> |
| | | </wsdl:message> |
| | | <wsdl:message name="IStationService_WriteScanValidateACK_InputMessage"> |
| | | <wsdl:part name="parameters" element="tns:WriteScanValidateACK" /> |
| | | </wsdl:message> |
| | |
| | | <wsdl:operation name="WriteStation_FinishACK"> |
| | | <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteStation_FinishACK" message="tns:IStationService_WriteStation_FinishACK_InputMessage" /> |
| | | <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteStation_FinishACKResponse" message="tns:IStationService_WriteStation_FinishACK_OutputMessage" /> |
| | | </wsdl:operation> |
| | | <wsdl:operation name="WriteStation_ACK"> |
| | | <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteStation_ACK" message="tns:IStationService_WriteStation_ACK_InputMessage" /> |
| | | <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteStation_ACKResponse" message="tns:IStationService_WriteStation_ACK_OutputMessage" /> |
| | | </wsdl:operation> |
| | | <wsdl:operation name="WriteScanValidateACK"> |
| | | <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteScanValidateACK" message="tns:IStationService_WriteScanValidateACK_InputMessage" /> |
| | |
| | | <soap:body use="literal" /> |
| | | </wsdl:output> |
| | | </wsdl:operation> |
| | | <wsdl:operation name="WriteStation_ACK"> |
| | | <soap:operation soapAction="http://tempuri.org/IStationService/WriteStation_ACK" style="document" /> |
| | | <wsdl:input> |
| | | <soap:body use="literal" /> |
| | | </wsdl:input> |
| | | <wsdl:output> |
| | | <soap:body use="literal" /> |
| | | </wsdl:output> |
| | | </wsdl:operation> |
| | | <wsdl:operation name="WriteScanValidateACK"> |
| | | <soap:operation soapAction="http://tempuri.org/IStationService/WriteScanValidateACK" style="document" /> |
| | | <wsdl:input> |
| | |
| | | <xs:element minOccurs="0" name="deviceId" type="xs:int" /> |
| | | <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" /> |
| | | <xs:element minOccurs="0" name="taskID" type="xs:int" /> |
| | | <xs:element minOccurs="0" name="isLast" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="isFirst" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="length" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="width" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="height" type="xs:short" /> |
| | |
| | | <xs:element minOccurs="0" name="placeX" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="placeY" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="placeZ" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="lastnum" type="xs:short" /> |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | | <xs:element name="WriteStation_ACK"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | | <xs:element minOccurs="0" name="deviceId" type="xs:int" /> |
| | | <xs:element minOccurs="0" name="value" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" /> |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | | <xs:element name="WriteStation_ACKResponse"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | | <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_ACKResult" nillable="true" type="q21:SdaResEntity" /> |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | | <xs:element name="WriteScanValidateACK"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | |
| | | <xs:element name="WriteScanValidateACKResponse"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | | <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q21:SdaResEntity" /> |
| | | <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q22:SdaResEntity" /> |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | |
| | | <xs:element name="WriteStation_XigangGetDataForOutResponse"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | | <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q22:SdaResEntity" /> |
| | | <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q23:SdaResEntity" /> |
| | | </xs:sequence> |
| | | </xs:complexType> |
| | | </xs:element> |
| | |
| | | <xs:element minOccurs="0" name="R_OutboundFinish" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="R_OutboundNumber" nillable="true" type="xs:string" /> |
| | | <xs:element minOccurs="0" name="R_Outbound_TaskID" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="R_PalletizingAck" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="R_PalletizingFinish" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="R_PalletizingStation1" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="R_PalletizingStation2" type="xs:short" /> |
| | |
| | | <xs:element minOccurs="0" name="W_Outbound_TaskID" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="W_PackageLength" nillable="true" type="xs:string" /> |
| | | <xs:element minOccurs="0" name="W_PackageWidth" nillable="true" type="xs:string" /> |
| | | <xs:element minOccurs="0" name="W_PalletizingBucketType" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="W_PalletizingPlaceX" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="W_PalletizingPlaceY" type="xs:short" /> |
| | | <xs:element minOccurs="0" name="W_PalletizingPlaceZ" type="xs:short" /> |
| | |
| | | { |
| | | Id = _id, |
| | | TaskNo = plcTaskNo, |
| | | |
| | | UPI = upiObj.UPI, |
| | | Length = upiObj.Length, |
| | | Width = upiObj.Width, |
| | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = string.Empty; |
| | | try |
| | | { |
| | | if ( SystemValue.isStartedModel) |
| | | if (SystemValue.isStartedModel) |
| | | { |
| | | var rgvLocation = StationLocationEnum.BZ12.ToString(); |
| | | /* |
| | |
| | | * 2ãæ ¹æ®é½å¥ç»æï¼æ¨éç»PLC |
| | | */ |
| | | var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | if (obj.R_PalletizingAck) |
| | | { |
| | | //ç»PLCæ¨éä»»å¡å®æ¥æ¶å®æå¤ä½ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.WriteStation_ACK((int)EDevice.Station, false, rgvLocation); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | if (obj.R_ReqParseData) |
| | | { |
| | | var result = obj.R_ReadCodeResult; |
| | |
| | | continue; |
| | | } |
| | | var upiCode = result.Replace("/r", ""); ; |
| | | bool islast = false;//æ¯å¦æ«æ¿ |
| | | bool isfirst = false;//æ¯å¦æ«æ¿ |
| | | short lastnum = 0;//æ¯å¦æ«æ¿ |
| | | short isrotate = 0;//æ¯å¦æè½¬ |
| | | short placeX = 0; |
| | | short placeY = 0; |
| | |
| | | using (WmsDBModel wmsDB = new WmsDBModel()) |
| | | { |
| | | //è¦æ¯æå·²ä¸åçä»»å¡ï¼å°±ä¸è¦æ§è¡ |
| | | var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB,result); |
| | | var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB, result); |
| | | if (!isValidate) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-æâå·²ä¸åâçä»»å¡ï¼ä¸è½å¤ç,æ¤æ¬¡å¾ªç¯ç»æ"; |
| | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; |
| | | continue; |
| | | } |
| | | isrotate = 1; |
| | | isrotate = 2; |
| | | placeX = (short)upiObj.MachineXCenter; |
| | | placeY = (short)upiObj.MachineYCenter; |
| | | placeZ = (short)upiObj.MachineZCenter; |
| | | |
| | | if (upiObj.UpiStatus == 3) |
| | | { |
| | | continue; |
| | | } |
| | | //æ¥å¤è¿å
ææçæ°é |
| | | var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); |
| | | //æ¥è¯¢æ¯å¦æ«æ¿å¹¶ä¸å¤æææ²¡ææ··æ¹ |
| | |
| | | } |
| | | else |
| | | { |
| | | isfirst = true; |
| | | lastnum = 1; |
| | | wms_rbline_runmode.PalletizingUPI = upiObj.PackageCode; |
| | | if (obj.R_PalletizingStation1 == 1) |
| | | { |
| | |
| | | |
| | | } |
| | | else |
| | | { |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}æ å¯ç¨ç åç®æ ä½ "; |
| | | continue; |
| | | } |
| | | wms_rbline_runmode.PalletizingStation = int.Parse(place); |
| | | } |
| | | //å¦ææ¬¡åºçäºå½é±å
æ»æ°éï¼æ¯å¦æ«æ¿ç½®ä¸ºtrue |
| | | if (upiObj.Shelf == upiList.Count()) |
| | | { |
| | | islast = true; |
| | | lastnum = 2; |
| | | wms_rbline_runmode.PalletizingUPI = null; |
| | | wms_rbline_runmode.PalletizingStation = 0; |
| | | } |
| | |
| | | CreateUserName = "CC", |
| | | UpdateTime = DateTime.Now, |
| | | UpdateUserName = "CC", |
| | | PlaceCode=place |
| | | PlaceCode = place |
| | | }; |
| | | |
| | | wmsDB.wms_rbline_task.Add(task); |
| | |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | |
| | | var res = client.WritePalletizingTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo), islast,isfirst, |
| | | (short)upiObj.Length, (short)upiObj.Width, (short)upiObj.Thk, isrotate, short.Parse(task.PlaceCode), placeX, placeY,placeZ); |
| | | var res = client.WritePalletizingTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo), |
| | | (short)upiObj.Length, (short)upiObj.Width, (short)upiObj.Thk, isrotate, short.Parse(task.PlaceCode), placeX, placeY, placeZ, lastnum); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ 失败,WriteInStoreTaskInfoAsync è¿å:{res.resMsg}"; |
| | |
| | | { |
| | | public class DataProcess_BZ12_FinishTask |
| | | { |
| | | public static void Handler() |
| | | public static void Handler() |
| | | { |
| | | var alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_BZ12; |
| | | while (true) |
| | | { |
| | | Thread.Sleep(2000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã |
| | | Thread.Sleep(1000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = string.Empty; |
| | | try |
| | | { |
| | |
| | | var task = wmsDB.wms_rbline_task.Where(x => |
| | | x.TaskNo == obj.R_PalletizingTaskNo.ToString() |
| | | && x.RbTaskType == (int)RbTaskTypeEnum.ç æ¿ä»»å¡ |
| | | && x.TaskStatus == (int)TaskStatusEnum.å·²ä¸å).FirstOrDefault(); |
| | | ).OrderByDescending(x=>x.Id).FirstOrDefault(); |
| | | if (task == null) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()},æ ¹æ® R_InboundNumber:{obj.R_InboundNumber}æ²¡ææ¾å°å·²ä¸åçä»»å¡ "; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | if (task.TaskStatus == (int)TaskStatusEnum.已宿) |
| | | { |
| | | //ç»PLCæ¨éä»»å¡å®æç¡®è®¤ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == task.UPI).FirstOrDefault(); |
| | | if (upiobj != null) |
| | |
| | | task.TaskStatusName = TaskStatusEnum.已宿.ToString(); |
| | | task.FinishedTime = DateTime.Now; |
| | | |
| | | |
| | | //ç»PLCæ¨éä»»å¡å®æç¡®è®¤ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | if (wmsDB.SaveChanges() > 0) |
| | | { |
| | | var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); |
| | | if (!res.result) |
| | | var isRight = true; |
| | | while (isRight) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | isRight = obj.R_PalletizingFinish; |
| | | //ç»PLCæ¨éä»»å¡å®æç¡®è®¤ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | |
| | | wmsDB.SaveChanges(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //ç»PLCæ¨éä»»å¡å®æç¡®è®¤ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, false, rgvLocation); |
| | | //if (!res.result) |
| | | //{ |
| | | // SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | // continue; |
| | | //} |
| | | //else |
| | | //{ |
| | | // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | //} |
| | | } |
| | | } |
| | | } |
| | |
| | | * 2ãæ ¹æ®é½å¥ç»æï¼æ¨éç»PLC |
| | | */ |
| | | var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | if (obj.R_PalletizingAck) |
| | | { |
| | | //ç»PLCæ¨éä»»å¡å®æ¥æ¶å®æå¤ä½ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.WriteStation_ACK((int)EDevice.Station, false, rgvLocation); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | if (obj.R_ReqParseData) |
| | | { |
| | | var result = obj.R_ReadCodeResult; |
| | |
| | | continue; |
| | | } |
| | | var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == task.PackageCode).ToList(); |
| | | if (upiobj .Count>0) |
| | | if (upiobj.Count > 0) |
| | | { |
| | | foreach (var item in upiobj) |
| | | { |
| | |
| | | wmsDB.SaveChanges(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //ç»PLCæ¨éä»»å¡å®æç¡®è®¤ä¿¡å· |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.SetSurroundTaskFinishAck((int)EDevice.Station, false, rgvLocation); |
| | | //if (!res.result) |
| | | //{ |
| | | // SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-ä¸åç æ¿ä»»å¡ 失败,SetPalletizingTaskFinishAck è¿å:{res.resMsg}"; |
| | | // continue; |
| | | //} |
| | | //else |
| | | //{ |
| | | // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå
¥åºä»»å¡ æå,SetPalletizingTaskFinishAckï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | //} |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// å·²åå
|
| | | /// </summary> |
| | | [Description("å·²åå
")] |
| | | å·²åå
= 4 |
| | | |
| | | } |
| | | å·²åå
= 4, |
| | | /// <summary> |
| | | /// ç åä¸ |
| | | /// </summary> |
| | | [Description("ç åä¸")] |
| | | ç åä¸ = 5, |
| | | } |
| | | } |
| | |
| | | : base("name=WmsDBModel") |
| | | { |
| | | } |
| | | public virtual DbSet<mes_batchOrderUPI_new> mes_batchOrderUPI_new { get; set; } |
| | | public virtual DbSet<mes_PushPackageCode> mes_PushPackageCode { get; set; } |
| | | public virtual DbSet<ApprovalFlow> ApprovalFlow { get; set; } |
| | | public virtual DbSet<DingTalkUser> DingTalkUser { get; set; } |
| | | public virtual DbSet<GoViewPro> GoViewPro { get; set; } |
| | | public virtual DbSet<GoViewProData> GoViewProData { get; set; } |
| | | public virtual DbSet<mes_batchOrderUPI_new> mes_batchOrderUPI_new { get; set; } |
| | | public virtual DbSet<SysCodeGen> SysCodeGen { get; set; } |
| | | public virtual DbSet<SysCodeGenConfig> SysCodeGenConfig { get; set; } |
| | | public virtual DbSet<SysConfig> SysConfig { get; set; } |
| | |
| | | public string UpdateUserName { get; set; } |
| | | |
| | | public bool IsDelete { get; set; } |
| | | /// <summary> |
| | | /// éå®åååå· |
| | | /// </summary> |
| | | |
| | | [StringLength(60)] |
| | | public string Info4 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产åå· |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info5 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 第å å
|
| | | /// </summary> |
| | | |
| | | [StringLength(60)] |
| | | public string Info6 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»éåºåç§° |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info7 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产ååç§° |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info8 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·åç§° |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info10 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
è£
ç¼ç |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info9 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èªæoråè´§ |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info11 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
è£
é¨ä»¶æ»æ°é |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info12 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
è£
é¢ç§¯ |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info13 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨ä»¶åç§° |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info14 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨ä»¶æ°é |
| | | /// </summary> |
| | | public int Info15 { get; set; } |
| | | public int? Info15 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨ä»¶å°ºå¯¸ |
| | | /// </summary> |
| | | [StringLength(60)] |
| | | public string Info16 { get; set; } |
| | | /// <summary> |
| | | /// æºæ¢°èæ¯å¦æè½¬ |
| | | /// </summary> |
| | | |
| | | [StringLength(60)] |
| | | public string Info17 { get; set; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Info16", ColumnDescription = "é¨ä»¶å°ºå¯¸", Length = 60)] |
| | | public string? Info16 { get; set; } |
| | | /// <summary> |
| | | /// æºæ¢°èæ¯å¦æè½¬ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Info17", ColumnDescription = "æºæ¢°èæ¯å¦æè½¬", Length = 60)] |
| | | public string? Info17 { get; set; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("åå
ä»»å¡å·")] |
| | | public int W_SurroundTaskNo { get; set; } |
| | | /// <summary> |
| | | /// ç å馿«æ¿ |
| | | /// </summary> |
| | | [Description("ç å馿«æ¿")] |
| | | public short W_PalletizingBucketType { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [Description("ç åä»»å¡å®æç¡®è®¤")] |
| | | public string W_PalletizingTaskFinish { get; set; } |
| | | /// <summary> |
| | | /// ç å馿«æ¿ |
| | | /// </summary> |
| | | [Description("ç å馿«æ¿")] |
| | | public string W_PalletizingBucketType { get; set; } |
| | | /// <summary> |
| | | /// é½å¥ä¿¡æ¯ï¼998é½å¥ï¼999å¼å¸¸åºåºï¼ |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("ç åä½ç½®2ç¶æ")] |
| | | public short R_PalletizingStation2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç å任塿¥æ¶å®æ |
| | | /// </summary> |
| | | [Description("ç å任塿¥æ¶å®æ")] |
| | | public bool R_PalletizingAck { get; set; } |
| | | /// <summary> |
| | | /// 强å¶åºåºæ¨¡å¼ |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("åå
ä»»å¡å·")] |
| | | public string R_SurrouondTaskNo { get; set; } |
| | | /// <summary> |
| | | /// ç å任塿¥æ¶å®æ |
| | | /// </summary> |
| | | [Description("ç å任塿¥æ¶å®æ")] |
| | | public string R_PalletizingAck { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <param name=""></param> |
| | | /// <param name=""></param> |
| | | /// <returns></returns> |
| | | public bool WritePalletizingTaskInfo(string stationCode, int taskID, bool isLast,bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, out string msg) |
| | | public bool WritePalletizingTaskInfo(string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum, out string msg) |
| | | { |
| | | try |
| | | { |
| | |
| | | stationObj.W_Inbound_TaskID); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_EndMark, isLast, view_stationObj.W_EndMark); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å æ¯å¦æ«æ¿ " + isLast + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Destination_In); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_FirstMark, isFirst, view_stationObj.W_FirstMark); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å æ¯å¦é¦æ¿ " + isFirst + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Destination_In); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Length, length, view_stationObj.W_Length); |
| | | if (!b2.result) |
| | | { |
| | |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å Zåæ " + placeZ + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Height); |
| | | return false; |
| | | } |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_PalletizingBucketType, lastnum, view_stationObj.W_PalletizingBucketType); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å 馿«æ¿ " + lastnum + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Height); |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åå
¥ç«ç¹ä»»å¡å®æç¡®è®¤ |
| | | /// </summary> |
| | | /// <param name="stationCode"></param> |
| | | /// <param name="value"></param> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | public bool WriteStation_ACK(string stationCode, bool value, out string msg) |
| | | { |
| | | try |
| | | { |
| | | msg = ""; |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, value, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStation" + stationCode + " åå
¥ä»»å¡å®æç¡®è®¤ å°å{0} å " + value + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_OutboundFinishConfirm); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | msg = ex.Message; |
| | | var logcontext = string.Format("åStatio åºåºä»»å¡å®æç¡®è®¤ åºç°å¼å¸¸:" + JsonConvert.SerializeObject(ex), |
| | | ""); |
| | | Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex); |
| | | return false; |
| | | } |
| | | } |
| | | public bool WriteSurround_FinishACK(string stationCode, bool value, out string msg) |
| | | { |
| | | try |
| | |
| | | W_Length = W_DBHeaderWithSeparate_BZ12 + "2.0", |
| | | W_Width = W_DBHeaderWithSeparate_BZ12 + "4.0", |
| | | W_Height = W_DBHeaderWithSeparate_BZ12 + "6.0", |
| | | |
| | | W_PalletizingBucketType= W_DBHeaderWithSeparate_BZ12 + "20.0", |
| | | W_PalletizingStation = W_DBHeaderWithSeparate_BZ12 + "10.0", |
| | | W_PalletizingTaskFinish = W_DBHeaderWithSeparate_BZ12 + "0.2", |
| | | }); |
| | |
| | | R_ReadCodeResult = W_DBHeaderWithSeparate_BZ12 + "52.0", |
| | | R_PalletizingStation1 = W_DBHeaderWithSeparate_BZ12 + "104.0", |
| | | R_PalletizingStation2 = W_DBHeaderWithSeparate_BZ12 + "106.0", |
| | | |
| | | R_PalletizingAck = W_DBHeaderWithSeparate_BZ12 + "50.2", |
| | | //R_Inbound_TaskID = W_DBHeaderWithSeparate_BZ12 + "112.0", |
| | | //R_Outbound_TaskID = W_DBHeaderWithSeparate_BZ12 + "114.0", |
| | | |
| | |
| | | _dbBlockForRead.R_StationForReadCommList.Add(new StationDBForReadComm() |
| | | { |
| | | StationCode = StationLocationEnum.BZ21.ToString(), |
| | | R_PalletizingAck = W_DBHeaderWithSeparate_BZ12 + "50.2", |
| | | |
| | | R_ReqParseData = W_DBHeaderWithSeparate_BZ21 + "50.0", |
| | | R_SurrouondTaskFinish = W_DBHeaderWithSeparate_BZ21 + "50.1", |
| | |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ); |
| | | SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum); |
| | | |
| | | /// <summary> |
| | | /// ç åå®æå·²ç¡®è®¤ |
| | |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | SdaResEntity WriteStation_FinishACK(int deviceId, bool value, int plcTaskId); |
| | | /// <summary> |
| | | /// å¤ä½è§£æå®æ |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value"></param> |
| | | /// <param name="stationCode"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode); |
| | | |
| | | /// <summary> |
| | | /// å个å
¥åºå£æ«æéªè¯ACKèµå¼ |
| | |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, bool isLast, bool isFirst, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ) |
| | | public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ,short lastnum) |
| | | { |
| | | SdaResEntity _SdaResEntity = new SdaResEntity(); |
| | | try |
| | |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast,isFirst, length, width, height,rotate,toplace,placeX,placeY,placeZ, out msg); |
| | | var result = Station.WritePalletizingTaskInfo(stationCode, taskID, length, width, height,rotate,toplace,placeX,placeY,placeZ,lastnum ,out msg); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |
| | |
| | | return _SdaResEntity; |
| | | } |
| | | } |
| | | public SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode) |
| | | { |
| | | SdaResEntity _SdaResEntity = new SdaResEntity(); |
| | | try |
| | | { |
| | | var StationResult = Station_CacheEntity.GetDeviceObj(deviceId); |
| | | if (!StationResult.result) |
| | | { |
| | | return StationResult; |
| | | } |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.WriteStation_ACK(stationCode, value, out msg); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _SdaResEntity.result = false; |
| | | _SdaResEntity.resMsg = ex.Message; |
| | | return _SdaResEntity; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åå
¥åºåºä»»å¡ä¿¡æ¯ |
| | | /// </summary> |