刘磊
7 天以前 2de09bec5cc05bf875543fa8956167ca7db73021
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/Dt_StationManagerService.cs
@@ -1,4 +1,5 @@
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model.Models;
@@ -13,5 +14,39 @@
        {
            _sys_ConfigService = sys_ConfigService;
        }
        public WebResponseContent GetStation()
        {
            return WebResponseContent.Instance.OK(data: BaseDal.QueryData(x => x.stationRemark == "AGV放货站台").ToList());
        }
        public WebResponseContent UpdateStation(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string stationid = saveModel.MainData["stationid"].ToString();
                string stationLoc = stationid == "1" ? "2033" : "2043";
                Dt_StationManager dt_Station = BaseDal.QueryFirst(x => x.stationLocation == stationLoc);
                if (dt_Station.stationStatus == "0")
                {
                    dt_Station.stationStatus = "1";
                }
                else
                {
                    dt_Station.stationStatus = "0";
                }
                BaseDal.UpdateData(dt_Station);
                return content.OK();
            }
            catch (Exception ex)
            {
                return content.Error("错误信息:" + ex);
                throw;
            }
        }
    }
}