222
schangxiang@126.com
2024-11-23 00f88de97d7ff3bdca5a445f17fa25c3fd28a1db
222
已修改9个文件
201 ■■■■ 文件已修改
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -507,7 +507,7 @@
        private bool W_InboundFinishConfirmField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int W_Inbound_TaskIDField;
        private short W_Inbound_TaskIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private bool W_IsRotateField;
@@ -519,10 +519,13 @@
        private short W_LengthField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_ModeField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private bool W_OutboundFinishConfirmField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int W_Outbound_TaskIDField;
        private short W_Outbound_TaskIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string W_PackageLengthField;
@@ -657,7 +660,7 @@
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int W_Inbound_TaskID {
        public short W_Inbound_TaskID {
            get {
                return this.W_Inbound_TaskIDField;
            }
@@ -709,6 +712,19 @@
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public short W_Mode {
            get {
                return this.W_ModeField;
            }
            set {
                if ((this.W_ModeField.Equals(value) != true)) {
                    this.W_ModeField = value;
                    this.RaisePropertyChanged("W_Mode");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool W_OutboundFinishConfirm {
            get {
                return this.W_OutboundFinishConfirmField;
@@ -722,7 +738,7 @@
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int W_Outbound_TaskID {
        public short W_Outbound_TaskID {
            get {
                return this.W_Outbound_TaskIDField;
            }
@@ -1511,6 +1527,12 @@
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/OutboundFinishConfirm", ReplyAction="http://tempuri.org/IStationService/OutboundFinishConfirmResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/ChangeMode", ReplyAction="http://tempuri.org/IStationService/ChangeModeResponse")]
        iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/ChangeMode", ReplyAction="http://tempuri.org/IStationService/ChangeModeResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> ChangeModeAsync(int deviceId, int value, string stationCode);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteInStoreTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteInStoreTaskInfoResponse")]
        iWareCC.StationService.SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID);
        
@@ -1665,6 +1687,14 @@
            return base.Channel.OutboundFinishConfirmAsync(deviceId, value, stationCode);
        }
        
        public iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode) {
            return base.Channel.ChangeMode(deviceId, value, stationCode);
        }
        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> ChangeModeAsync(int deviceId, int value, string stationCode) {
            return base.Channel.ChangeModeAsync(deviceId, value, stationCode);
        }
        public iWareCC.StationService.SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID) {
            return base.Channel.WriteInStoreTaskInfo(deviceId, stationCode, toPlaceNo, length, width, height, inbound_TaskID);
        }
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
@@ -81,6 +81,12 @@
  <wsdl:message name="IStationService_OutboundFinishConfirm_OutputMessage">
    <wsdl:part name="parameters" element="tns:OutboundFinishConfirmResponse" />
  </wsdl:message>
  <wsdl:message name="IStationService_ChangeMode_InputMessage">
    <wsdl:part name="parameters" element="tns:ChangeMode" />
  </wsdl:message>
  <wsdl:message name="IStationService_ChangeMode_OutputMessage">
    <wsdl:part name="parameters" element="tns:ChangeModeResponse" />
  </wsdl:message>
  <wsdl:message name="IStationService_WriteInStoreTaskInfo_InputMessage">
    <wsdl:part name="parameters" element="tns:WriteInStoreTaskInfo" />
  </wsdl:message>
@@ -159,6 +165,10 @@
    <wsdl:operation name="OutboundFinishConfirm">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/OutboundFinishConfirm" message="tns:IStationService_OutboundFinishConfirm_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/OutboundFinishConfirmResponse" message="tns:IStationService_OutboundFinishConfirm_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="ChangeMode">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/ChangeMode" message="tns:IStationService_ChangeMode_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/ChangeModeResponse" message="tns:IStationService_ChangeMode_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="WriteInStoreTaskInfo">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteInStoreTaskInfo" message="tns:IStationService_WriteInStoreTaskInfo_InputMessage" />
@@ -291,6 +301,15 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="ChangeMode">
      <soap:operation soapAction="http://tempuri.org/IStationService/ChangeMode" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="WriteInStoreTaskInfo">
      <soap:operation soapAction="http://tempuri.org/IStationService/WriteInStoreTaskInfo" style="document" />
      <wsdl:input>
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
@@ -187,6 +187,22 @@
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ChangeMode">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="deviceId" type="xs:int" />
        <xs:element minOccurs="0" name="value" type="xs:int" />
        <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <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:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="WriteInStoreTaskInfo">
    <xs:complexType>
      <xs:sequence>
@@ -203,7 +219,7 @@
  <xs:element name="WriteInStoreTaskInfoResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q13:SdaResEntity" />
        <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q14:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -220,7 +236,7 @@
  <xs:element name="WriteOutStoreTaskInfoResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q14:SdaResEntity" />
        <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q15:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -236,7 +252,7 @@
  <xs:element name="WriteStation_FinishACKResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q15:SdaResEntity" />
        <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q16:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -254,7 +270,7 @@
  <xs:element name="WriteScanValidateACKResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q16:SdaResEntity" />
        <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q17:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -272,7 +288,7 @@
  <xs:element name="WriteStation_XigangGetDataForOutResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q17:SdaResEntity" />
        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q18:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
@@ -44,12 +44,13 @@
      <xs:element minOccurs="0" name="W_Destination_Out" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="W_Height" type="xs:short" />
      <xs:element minOccurs="0" name="W_InboundFinishConfirm" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_Inbound_TaskID" type="xs:int" />
      <xs:element minOccurs="0" name="W_Inbound_TaskID" type="xs:short" />
      <xs:element minOccurs="0" name="W_IsRotate" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_KittingInfo" type="xs:short" />
      <xs:element minOccurs="0" name="W_Length" type="xs:short" />
      <xs:element minOccurs="0" name="W_Mode" type="xs:short" />
      <xs:element minOccurs="0" name="W_OutboundFinishConfirm" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_Outbound_TaskID" type="xs:int" />
      <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_ReqOut" type="xs:boolean" />
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/DataProcess_RobotBuffer_ModeChange.cs
@@ -36,7 +36,7 @@
                {
                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange && SystemValue.isStartedModel)
                    {
                        var rgvLocation = StationLocationEnum.BZ39.ToString();
                        if (FormCC.IsAllowRunOutMode)
                        {
                            using (WmsDBModel wmsDB = new WmsDBModel())
@@ -52,19 +52,19 @@
                                rbRunMode.UpdateTime = DateTime.Now;
                                //推送给PLC切换模式
                                //using (StationServiceClient client = new StationServiceClient())
                                //{
                                //    var res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo));
                                //    if (!res.result)
                                //    {
                                //        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-下发出库任务 å¤±è´¥,WriteOutStoreTaskInfoAsync è¿”回:{res.resMsg}";
                                //        continue;
                                //    }
                                //    else
                                //    {
                                //        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-下发出库任务 æˆåŠŸ,WriteOutStoreTaskInfoAsync,参数: ç«™ç‚¹{rgvLocation}");
                                //    }
                                //}
                                using (StationServiceClient client = new StationServiceClient())
                                {
                                    var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.出库模式, rgvLocation);
                                    if (!res.result)
                                    {
                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-推送给PLC切换模式 å¤±è´¥,ChangeModeAsync è¿”回:{res.resMsg}";
                                        continue;
                                    }
                                    else
                                    {
                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-推送给PLC切换模式 æˆåŠŸ,ChangeModeAsync,参数: ç«™ç‚¹{rgvLocation}");
                                    }
                                }
                                wmsDB.SaveChanges();
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
@@ -137,6 +137,12 @@
        [Description("出库完成已确认")]
        public bool W_OutboundFinishConfirm { get; set; }
        /// <summary>
        /// æ¨¡å¼ï¼ˆ1:入库, 2:出库   3:强制出库)
        /// </summary>
        [Description("模式(1:入库, 2:出库   3:强制出库)")]
        public short W_Mode { get; set; }
    }
    /// <summary>
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -290,6 +290,41 @@
            }
        }
        /// <summary>
        /// åˆ‡æ¢æ¨¡å¼
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="value"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public bool ChangeMode(string stationCode, int 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_Mode, value, view_stationObj.W_Mode);
                if (!b2.result)
                {
                    msg = string.Format("向Station åˆ‡æ¢æ¨¡å¼ åœ°å€{0} å†™  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_Mode);
                    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 WriteInStoreTaskInfo(string stationCode, string toPlaceNo, short length, short width, short height, out string msg, int inbound_TaskID)
        {
            try
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -110,6 +110,17 @@
        [OperationContract]
        SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode);
        /// <summary>
        /// åˆ‡æ¢æ¨¡å¼
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <param name="stationCode"></param>
        /// <returns></returns>
        [OperationContract]
        SdaResEntity ChangeMode(int deviceId, int value, string stationCode);
        /// <summary>
        /// å†™å…¥å…¥åº“任务信息
        /// </summary>
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -503,6 +503,39 @@
        }
        /// <summary>
        /// åˆ‡æ¢æ¨¡å¼
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <param name="stationCode"></param>
        /// <returns></returns>
        public SdaResEntity ChangeMode(int deviceId, int 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.ChangeMode(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>
        /// <param name="deviceId"></param>