CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
@@ -1,4 +1,6 @@ using Admin.NET.Application; using iWareCC.SrmService; using iWareCC.StationService; using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; @@ -24,6 +26,21 @@ { /// <summary> /// åå ¥ æ¥è¦ä¿¡æ¯ /// </summary> /// <param name="warningAddress"></param> /// <returns></returns> public static async Task<iWareCC.StationService.SdaResEntity> WriteBoolPlcDataForWarning(string warningAddress) { using (StationServiceClient client = new StationServiceClient()) { var res = await client.WriteBoolPlcDataAsync((int)EDevice.Station, "3000|" + warningAddress, true); return res; } } /// <summary> /// å¤ç 表 mes_order_gather /// </summary> /// <param name="wmsDB"></param> @@ -36,7 +53,8 @@ { errMsg = ""; //å¤ç表 mes_order_gather if (package == null) { if (package == null) { return true; } var isAddOrder = false; CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -1321,9 +1321,6 @@ private short W_PalletizingTaskIDField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool W_PersonAllowField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool W_ReqOutField; [System.Runtime.Serialization.OptionalFieldAttribute()] @@ -1706,19 +1703,6 @@ } [System.Runtime.Serialization.DataMemberAttribute()] public bool W_PersonAllow { get { return this.W_PersonAllowField; } set { if ((this.W_PersonAllowField.Equals(value) != true)) { this.W_PersonAllowField = value; this.RaisePropertyChanged("W_PersonAllow"); } } } [System.Runtime.Serialization.DataMemberAttribute()] public bool W_ReqOut { get { return this.W_ReqOutField; @@ -1876,6 +1860,12 @@ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/IsHaveHeatBeat", ReplyAction="http://tempuri.org/IStationService/IsHaveHeatBeatResponse")] System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> IsHaveHeatBeatAsync(int deviceId); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteBoolPlcData", ReplyAction="http://tempuri.org/IStationService/WriteBoolPlcDataResponse")] iWareCC.StationService.SdaResEntity WriteBoolPlcData(int deviceId, string dbAddress, bool value); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteBoolPlcData", ReplyAction="http://tempuri.org/IStationService/WriteBoolPlcDataResponse")] System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteBoolPlcDataAsync(int deviceId, string dbAddress, bool value); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteQiTaoInfo", ReplyAction="http://tempuri.org/IStationService/WriteQiTaoInfoResponse")] iWareCC.StationService.SdaResEntity WriteQiTaoInfo(int deviceId, string stationCode, bool value); @@ -2073,6 +2063,14 @@ return base.Channel.IsHaveHeatBeatAsync(deviceId); } public iWareCC.StationService.SdaResEntity WriteBoolPlcData(int deviceId, string dbAddress, bool value) { return base.Channel.WriteBoolPlcData(deviceId, dbAddress, value); } public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteBoolPlcDataAsync(int deviceId, string dbAddress, bool value) { return base.Channel.WriteBoolPlcDataAsync(deviceId, dbAddress, value); } public iWareCC.StationService.SdaResEntity WriteQiTaoInfo(int deviceId, string stationCode, bool value) { return base.Channel.WriteQiTaoInfo(deviceId, stationCode, value); } CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
@@ -62,6 +62,12 @@ <wsdl:message name="IStationService_IsHaveHeatBeat_OutputMessage"> <wsdl:part name="parameters" element="tns:IsHaveHeatBeatResponse" /> </wsdl:message> <wsdl:message name="IStationService_WriteBoolPlcData_InputMessage"> <wsdl:part name="parameters" element="tns:WriteBoolPlcData" /> </wsdl:message> <wsdl:message name="IStationService_WriteBoolPlcData_OutputMessage"> <wsdl:part name="parameters" element="tns:WriteBoolPlcDataResponse" /> </wsdl:message> <wsdl:message name="IStationService_WriteQiTaoInfo_InputMessage"> <wsdl:part name="parameters" element="tns:WriteQiTaoInfo" /> </wsdl:message> @@ -194,6 +200,10 @@ <wsdl:operation name="IsHaveHeatBeat"> <wsdl:input wsaw:Action="http://tempuri.org/IStationService/IsHaveHeatBeat" message="tns:IStationService_IsHaveHeatBeat_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IStationService/IsHaveHeatBeatResponse" message="tns:IStationService_IsHaveHeatBeat_OutputMessage" /> </wsdl:operation> <wsdl:operation name="WriteBoolPlcData"> <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteBoolPlcData" message="tns:IStationService_WriteBoolPlcData_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteBoolPlcDataResponse" message="tns:IStationService_WriteBoolPlcData_OutputMessage" /> </wsdl:operation> <wsdl:operation name="WriteQiTaoInfo"> <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteQiTaoInfo" message="tns:IStationService_WriteQiTaoInfo_InputMessage" /> @@ -343,6 +353,15 @@ <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="WriteBoolPlcData"> <soap:operation soapAction="http://tempuri.org/IStationService/WriteBoolPlcData" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="WriteQiTaoInfo"> <soap:operation soapAction="http://tempuri.org/IStationService/WriteQiTaoInfo" style="document" /> <wsdl:input> CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
@@ -139,6 +139,22 @@ </xs:sequence> </xs:complexType> </xs:element> <xs:element name="WriteBoolPlcData"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="deviceId" type="xs:int" /> <xs:element minOccurs="0" name="dbAddress" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="value" type="xs:boolean" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="WriteBoolPlcDataResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q10="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteBoolPlcDataResult" nillable="true" type="q10:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="WriteQiTaoInfo"> <xs:complexType> <xs:sequence> @@ -151,7 +167,7 @@ <xs:element name="WriteQiTaoInfoResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q10="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteQiTaoInfoResult" nillable="true" type="q10:SdaResEntity" /> <xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteQiTaoInfoResult" nillable="true" type="q11:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -167,7 +183,7 @@ <xs:element name="InboundFinishConfirmResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="InboundFinishConfirmResult" nillable="true" type="q11:SdaResEntity" /> <xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="InboundFinishConfirmResult" nillable="true" type="q12:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -184,7 +200,7 @@ <xs:element name="OutboundFinishConfirmResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="OutboundFinishConfirmResult" nillable="true" type="q12:SdaResEntity" /> <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="OutboundFinishConfirmResult" nillable="true" type="q13:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -200,7 +216,7 @@ <xs:element name="ChangeModeResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="ChangeModeResult" nillable="true" type="q13:SdaResEntity" /> <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="ChangeModeResult" nillable="true" type="q14:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -220,7 +236,7 @@ <xs:element name="WriteInStoreTaskInfoResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q14:SdaResEntity" /> <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q15:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -238,7 +254,7 @@ <xs:element name="WriteOutStoreTaskInfoResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q15:SdaResEntity" /> <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q16:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -263,7 +279,7 @@ <xs:element name="WritePalletizingTaskInfoResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WritePalletizingTaskInfoResult" nillable="true" type="q16:SdaResEntity" /> <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WritePalletizingTaskInfoResult" nillable="true" type="q17:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -279,7 +295,7 @@ <xs:element name="SetPalletizingTaskFinishAckResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetPalletizingTaskFinishAckResult" nillable="true" type="q17:SdaResEntity" /> <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetPalletizingTaskFinishAckResult" nillable="true" type="q18:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -301,7 +317,7 @@ <xs:element name="WriteSurroundTaskInfoResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteSurroundTaskInfoResult" nillable="true" type="q18:SdaResEntity" /> <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteSurroundTaskInfoResult" nillable="true" type="q19:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -317,7 +333,7 @@ <xs:element name="SetSurroundTaskFinishAckResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetSurroundTaskFinishAckResult" nillable="true" type="q19:SdaResEntity" /> <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetSurroundTaskFinishAckResult" nillable="true" type="q20:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -333,7 +349,7 @@ <xs:element name="WriteStation_FinishACKResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q20:SdaResEntity" /> <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q21:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -349,7 +365,7 @@ <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:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_ACKResult" nillable="true" type="q22:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -367,7 +383,7 @@ <xs:element name="WriteScanValidateACKResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q22:SdaResEntity" /> <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q23:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -385,7 +401,7 @@ <xs:element name="WriteStation_XigangGetDataForOutResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q23:SdaResEntity" /> <xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q24:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -401,7 +417,7 @@ <xs:element name="WriteStation_AllowInResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_AllowInResult" nillable="true" type="q24:SdaResEntity" /> <xs:element xmlns:q25="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_AllowInResult" nillable="true" type="q25:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -417,7 +433,7 @@ <xs:element name="WriteStation_PersonAllowResponse"> <xs:complexType> <xs:sequence> <xs:element xmlns:q25="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_PersonAllowResult" nillable="true" type="q25:SdaResEntity" /> <xs:element xmlns:q26="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_PersonAllowResult" nillable="true" type="q26:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
@@ -131,7 +131,6 @@ <xs:element minOccurs="0" name="W_PalletizingStation" type="xs:short" /> <xs:element minOccurs="0" name="W_PalletizingTaskFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="W_PalletizingTaskID" type="xs:short" /> <xs:element minOccurs="0" name="W_PersonAllow" type="xs:boolean" /> <xs:element minOccurs="0" name="W_ReqOut" type="xs:boolean" /> <xs:element minOccurs="0" name="W_Rotate" type="xs:short" /> <xs:element minOccurs="0" name="W_SurroundTaskFinish" type="xs:boolean" /> CC/iWareCC_ASRS/ThreadService/00_269¹¤Î»/DataProcess_269.cs
@@ -76,6 +76,10 @@ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-æ¨éplc 人工æ¾è¡ æå,WriteStation_PersonAllowAsyncï¼åæ°: ç«ç¹{rgvLocation}"); } } //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_269_1); SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; continue; //*/ CC/iWareCC_ASRS/ThreadService/01_BZ01¹¤Î»£¨Çå»Ò£¬Ï´°åºó¹¤Î»£©/DataProcess_BZ01.cs
@@ -71,6 +71,9 @@ var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); if (upiObj == null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ01_1); SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; continue; } CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/1¡¢DataProcess_BZ39.cs
@@ -72,6 +72,9 @@ var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); if (upiObj == null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ39_2); SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; continue; } @@ -79,6 +82,9 @@ var stock = wmsDB.wms_stock_quan.Where(x => x.Upi == upiObj.UPI).FirstOrDefault(); if (stock != null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ39_1); SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},UPI:{upiCode}å·²ç»å¨ç¼ååºä¸äº "; continue; } @@ -87,6 +93,9 @@ var place = StationHandlerV2.FindBestEmptyPlace(wmsDB, upiObj); if (place == null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ39_3); SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°ç¼ååºå²ç空åºä½ "; continue; } CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/1¡¢DataProcess_BZ12.cs
@@ -1,4 +1,5 @@ using Admin.NET.Application; using iWareCC.Common.Helper; using iWareCC.StationService; using iWareCommon.Common.Globle; using iWareCommon.Utils; @@ -16,7 +17,7 @@ { public class DataProcess_BZ12 { public static void Hander() public static async void Hander() { var alertMsg = ""; LogType logType = LogType.DataProcess_BZ12; @@ -85,6 +86,9 @@ var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); if (upiObj == null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_1); SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; continue; } @@ -94,6 +98,9 @@ //placeZ = (short)upiObj.MachineZCenter; if (upiObj.UpiStatus == (int)UpiStatusEnum.å·²ç å || upiObj.UpiStatus == (int)UpiStatusEnum.ç åä¸) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_3); SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}ç¶æå·²æ¯'å·²ç å'æ'ç åä¸' "; continue; } @@ -110,6 +117,9 @@ { if (upiObj.PackageCode != wms_rbline_runmode.PalletizingUPI) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_4); SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}ç å é¨ä»¶æ··æ¹ "; continue; } @@ -134,6 +144,9 @@ } else { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_6); SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}æ å¯ç¨ç åç®æ ä½ "; continue; } @@ -152,6 +165,9 @@ var oldupi = upiList.Where(x => x.Shelf < upiObj.Shelf && (x.UpiStatus != (int)UpiStatusEnum.å·²ç å && x.UpiStatus != (int)UpiStatusEnum.ç åä¸)).FirstOrDefault(); if (oldupi != null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_5); SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}ç å 顺åºé误 "; continue; } CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/2¡¢DataProcess_BZ12_IssueTask.cs
@@ -85,6 +85,9 @@ placeZ = (short)upiObj.MachineZCenter; if (isrotate != 1 && isrotate != 2) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ12_7); SystemWarningMsg._lbl_Alert_DataProcess_BZ12_IssueTask = $"{rgvLocation.ToString()},æ ¹æ®UPI:{task.Upi}çæè½¬æ¹åå¼ä¸æ¯1æ2 "; continue; } CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/1¡¢DataProcess_BZ21.cs
@@ -22,7 +22,7 @@ { public class DataProcess_BZ21 { public static void Hander() public static async void Hander() { var alertMsg = ""; LogType logType = LogType.DataProcess_BZ21; @@ -97,6 +97,9 @@ var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == result).FirstOrDefault(); if (upiObj == null) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ21_1); SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{result}æ²¡ææ¾å°å¯¹è±¡ "; continue; } @@ -105,6 +108,9 @@ var validteReslt = ValidateIsAllowCut(); if (validteReslt == false) { //åå ¥æ¥è¦ä¿¡æ¯ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_BZ21_2); continue; } CC/iWareCommon/Common/Globle/PlcWarningGloble.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@  using iWareModel; using System.Collections.Generic; namespace iWareCommon.Common.Globle { public static class PlcWarningGloble { #region 269 /// <summary> /// 269å·¥ä½ä¸ä½ç³»ç»æ æ¿ä»¶æ°æ® /// </summary> public static string Num_269_1 = "80.1"; #endregion #region BZ01 /// <summary> /// BZ01å·¥ä½ä¸ä½ç³»ç»æ æ¿ä»¶æ°æ® /// </summary> public static string Num_BZ01_1 = "82.0"; #endregion #region BZ39 /// <summary> /// ç¼åå²å·²ç»æè¯¥æ¿ä»¶åºå /// </summary> public static string Num_BZ39_1 = "84.0"; /// <summary> /// BZ39å·¥ä½ä¸ä½ç³»ç»æ æ¿ä»¶æ°æ® /// </summary> public static string Num_BZ39_2 = "84.1"; /// <summary> /// ç¼å岿 空åºä½åæ¾ /// </summary> public static string Num_BZ39_3 = "84.2"; #endregion #region BZ12 /// <summary> /// BZ12å·¥ä½ä¸ä½ç³»ç»æ æ¿ä»¶æ°æ® /// </summary> public static string Num_BZ12_1 = "86.0"; ///// <summary> ///// BZ12ç æ¿æ¬¡åºä¸å¯¹ ///// </summary> //public static string Num_BZ12_2 = "86.1"; /// <summary> /// BZ12æ¿ä»¶å·²ç»æ¯ç å䏿已ç å /// </summary> public static string Num_BZ12_3 = "86.2"; /// <summary> /// BZ12æ¿ä»¶æ··æ¹ /// </summary> public static string Num_BZ12_4 = "86.3"; /// <summary> /// BZ12æ¿ä»¶ç å 顺åºé误 /// </summary> public static string Num_BZ12_5 = "86.4"; /// <summary> /// BZ12æ¿ä»¶æ å¯ç¨ç åç®æ ä½ /// </summary> public static string Num_BZ12_6 = "86.5"; /// <summary> /// BZ12æ¿ä»¶æè½¬æ¹åå¼ä¸æ¯1æ2 /// </summary> public static string Num_BZ12_7 = "86.6"; #endregion #region BZ21 /// <summary> /// BZ21å·¥ä½ä¸ä½ç³»ç»æ æ¿ä»¶æ°æ® /// </summary> public static string Num_BZ21_1 = "88.0"; /// <summary> /// BZ21å·¥ä½ä¸å 许è£çº¸ /// </summary> public static string Num_BZ21_2 = "88.1"; #endregion } } CC/iWareCommon/iWareCommon.csproj
@@ -74,6 +74,7 @@ </ItemGroup> <ItemGroup> <Compile Include="Common\Dao\CommonDao.cs" /> <Compile Include="Common\Globle\PlcWarningGloble.cs" /> <Compile Include="Common\Globle\SysGloble.cs" /> <Compile Include="Common\Service\CommonService.cs" /> <Compile Include="Utils\CSharpHelper.cs" /> SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -179,7 +179,35 @@ } } /// <summary> /// åPLC bool /// </summary> /// <param name="dbAddress"></param> /// <param name="value"></param> /// <param name="msg"></param> /// <returns></returns> public bool WriteBoolPlcData(string dbAddress, bool value, out string msg) { try { msg = ""; MessageModel b2 = null; b2 = this.plcService.WriteValuePoint(dbAddress, value, value); if (!b2.result) { msg = string.Format($"åå ¥PLCå°å{dbAddress}ï¼å¼{value}失败"); return false; } return true; } catch (Exception ex) { msg = ex.Message; Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, $"å°å{dbAddress}失败:" + ex.Message, ex); return false; } } /// <summary> /// åå ¥é½å¥ç»æãè§£æç»æ SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -84,6 +84,16 @@ SdaResEntity IsHaveHeatBeat(int deviceId); /// <summary> /// åPLC bool /// </summary> /// <param name="deviceId"></param> /// <param name="dbAddress"></param> /// <param name="value"></param> /// <returns></returns> [OperationContract] SdaResEntity WriteBoolPlcData(int deviceId, string dbAddress, bool value); /// <summary> /// åå ¥é½å¥ä¿¡æ¯ /// </summary> /// <param name="deviceId"></param> SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -405,6 +405,38 @@ } } /// <summary> /// åPLC bool /// </summary> /// <param name="deviceId"></param> /// <param name="dbAddress"></param> /// <param name="value"></param> /// <returns></returns> public SdaResEntity WriteBoolPlcData(int deviceId, string dbAddress, bool value) { 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.WriteBoolPlcData(dbAddress, value, out msg); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; } catch (Exception ex) { _SdaResEntity.result = false; _SdaResEntity.resMsg = ex.Message; return _SdaResEntity; } } /// <summary> /// åå ¥é½å¥ç»æãè§£æç»æ