using WIDESEAWCS_BasicInfoRepository;
|
using WIDESEAWCS_Core;
|
using WIDESEAWCS_Core.BaseServices;
|
using WIDESEAWCS_ISystemServices;
|
using WIDESEAWCS_Model.Models;
|
|
namespace WIDESEAWCS_BasicInfoService
|
{
|
public partial class Dt_StationManagerService : ServiceBase<Dt_StationManager, IDt_StationManagerRepository>, IDt_StationManagerService
|
{
|
private readonly ISys_ConfigService _sys_ConfigService;
|
|
public Dt_StationManagerService(IDt_StationManagerRepository BaseDal, ISys_ConfigService sys_ConfigService) : base(BaseDal)
|
{
|
_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;
|
}
|
}
|
}
|
}
|