From 7285fd041c9ed732ae2039c4cc54f3eb382d9112 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 08 12月 2024 14:48:50 +0800
Subject: [PATCH] 33
---
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 32 +++++
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs | 10 +
CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs | 3
CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/2、DataProcess_BZ12_IssueTask.cs | 3
CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd | 1
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl | 19 +++
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd | 48 +++++--
CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/1、DataProcess_BZ12.cs | 18 ++
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs | 9 +
CC/iWareCommon/iWareCommon.csproj | 1
CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs | 20 +++
CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/1、DataProcess_BZ21.cs | 8 +
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs | 30 ++--
CC/iWareCommon/Common/Globle/PlcWarningGloble.cs | 104 +++++++++++++++++
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 28 ++++
CC/iWareCC_ASRS/ThreadService/00_269工位/DataProcess_269.cs | 4
16 files changed, 302 insertions(+), 36 deletions(-)
diff --git a/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs b/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
index a1b91dc..af8655c 100644
--- a/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
+++ b/CC/iWareCC_ASRS/Common/Helper/MyExtendHelper.cs
@@ -1,4 +1,6 @@
锘縰sing 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;
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
index 94406fd..bf763b1 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
+++ b/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);
}
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
index 4f3c289..4b3c1a8 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
+++ b/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>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
index 9263dc8..0f02fe4 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
+++ b/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>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
index b033b77..e0069a0 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
+++ b/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" />
diff --git "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
index 76b5f98..d924945 100644
--- "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
@@ -76,6 +76,10 @@
Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�乸lc 浜哄伐鏀捐 鎴愬姛,WriteStation_PersonAllowAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
}
}
+
+ //鍐欏叆鎶ヨ淇℃伅
+ await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_269_1);
+
SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 ";
continue;
//*/
diff --git "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
index b750c13..ad050d1 100644
--- "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/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;
}
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs"
index 4e75984..9f80b7f 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_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;
}
diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
index 61b35ac..3b04667 100644
--- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
@@ -1,4 +1,5 @@
锘縰sing 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;
}
diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/2\343\200\201DataProcess_BZ12_IssueTask.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/2\343\200\201DataProcess_BZ12_IssueTask.cs"
index 3504c2e..d509dea 100644
--- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/2\343\200\201DataProcess_BZ12_IssueTask.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/2\343\200\201DataProcess_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;
}
diff --git "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/1\343\200\201DataProcess_BZ21.cs" "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/1\343\200\201DataProcess_BZ21.cs"
index 8da34c8..e42f7b3 100644
--- "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/1\343\200\201DataProcess_BZ21.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/1\343\200\201DataProcess_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;
}
diff --git a/CC/iWareCommon/Common/Globle/PlcWarningGloble.cs b/CC/iWareCommon/Common/Globle/PlcWarningGloble.cs
new file mode 100644
index 0000000..7d699c2
--- /dev/null
+++ b/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
+
+
+
+
+
+
+ }
+}
diff --git a/CC/iWareCommon/iWareCommon.csproj b/CC/iWareCommon/iWareCommon.csproj
index fa252f3..a227cd5 100644
--- a/CC/iWareCommon/iWareCommon.csproj
+++ b/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" />
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index 813d817..5f7e820 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -179,7 +179,35 @@
}
}
+ /// <summary>
+ /// 鍐橮LC 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>
/// 鍐欏叆榻愬缁撴灉銆佽В鏋愮粨鏋�
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
index f0bbe48..e9a6fa6 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -84,6 +84,16 @@
SdaResEntity IsHaveHeatBeat(int deviceId);
/// <summary>
+ /// 鍐橮LC 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>
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index 0d878af..34f3225 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -405,6 +405,38 @@
}
}
+ /// <summary>
+ /// 鍐橮LC 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>
/// 鍐欏叆榻愬缁撴灉銆佽В鏋愮粨鏋�
--
Gitblit v1.9.3