Merge branch 'master' of http://101.43.201.20:3000/yanghongwei/lg_backend
This commit is contained in:
		
						commit
						db7444c365
					
				| 
						 | 
					@ -13,9 +13,11 @@ namespace langguanApi.Controllers
 | 
				
			||||||
    public class TransportController : ControllerBase
 | 
					    public class TransportController : ControllerBase
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private TransportService _transportService;
 | 
					        private TransportService _transportService;
 | 
				
			||||||
        public TransportController(TransportService transportService)
 | 
					        private WasherService _washerService;
 | 
				
			||||||
 | 
					        public TransportController(TransportService transportService, WasherService washerService)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _transportService = transportService;
 | 
					            _transportService = transportService;
 | 
				
			||||||
 | 
					            _washerService = washerService;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 获取清洁运输列表
 | 
					        /// 获取清洁运输列表
 | 
				
			||||||
| 
						 | 
					@ -39,7 +41,7 @@ namespace langguanApi.Controllers
 | 
				
			||||||
            return Ok(result);
 | 
					            return Ok(result);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 新增清洁运输
 | 
					        /// 新增门禁
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <param name="input"></param>
 | 
					        /// <param name="input"></param>
 | 
				
			||||||
        /// <returns></returns>
 | 
					        /// <returns></returns>
 | 
				
			||||||
| 
						 | 
					@ -49,5 +51,35 @@ namespace langguanApi.Controllers
 | 
				
			||||||
            await _transportService.addTransport(input);
 | 
					            await _transportService.addTransport(input);
 | 
				
			||||||
            return Ok(new ApiResult() { code = 0 });
 | 
					            return Ok(new ApiResult() { code = 0 });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region  洗车机
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       /// <summary>
 | 
				
			||||||
 | 
					       /// 新增洗车机
 | 
				
			||||||
 | 
					       /// </summary>
 | 
				
			||||||
 | 
					       /// <param name="input"></param>
 | 
				
			||||||
 | 
					       /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost("addwasher")]
 | 
				
			||||||
 | 
					        public async Task<IActionResult> AddWasher(AddWasher input)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            await _washerService.addWasher(input);
 | 
				
			||||||
 | 
					            return Ok(new ApiResult() { code = 0 });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 新增洗车机历史记录
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="input"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        [HttpPost("addwasherhistory")]
 | 
				
			||||||
 | 
					        public async Task<IActionResult> AddWasherHistory(AddWasherHistory input)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            await _washerService.AddWasherHistory(input);
 | 
				
			||||||
 | 
					            return Ok(new ApiResult() { code = 0 });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #endregion
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,162 @@
 | 
				
			||||||
 | 
					namespace langguanApi.Model
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class Washer : BaseModel
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 洗车机名称(Name)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Name { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 设备状态(EquipmentStatus,0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int EquipmentStatus { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 运行状态(RunStatus,0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int RunStatus { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水压报警(WPAlarm 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int WPAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 相序报警(PSAlarm0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int PSAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 故障报警(FaultAlarm 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int FaultAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗压力
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinsePressure { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗电流
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinseCurrent { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗电压(RinseVoltage  单位V)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinseVoltage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水流量(Discharge  单位T)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Discharge { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 电量(Electricity  KW/H)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Electricity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 电流(Current A)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Current { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水压(WaterPressure MPa)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double WaterPressure { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 运行时间(RunTime)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string RunTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 清洗记录时间(RecodeTime)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string RecodeTime { get; set; }
 | 
				
			||||||
 | 
					        //车牌号(CarNumber)
 | 
				
			||||||
 | 
					        public string CarNumber { get; set; }
 | 
				
			||||||
 | 
					        //清洗时间(Time 单位s)
 | 
				
			||||||
 | 
					        public int Time { get; set; }
 | 
				
			||||||
 | 
					        //设备状态(State 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 添加洗车机
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AddWasher
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 洗车机名称(Name)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string Name { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 设备状态(EquipmentStatus,0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int EquipmentStatus { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 运行状态(RunStatus,0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int RunStatus { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水压报警(WPAlarm 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int WPAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 相序报警(PSAlarm0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int PSAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 故障报警(FaultAlarm 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int FaultAlarm { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗压力
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinsePressure { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗电流
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinseCurrent { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 冲洗电压(RinseVoltage  单位V)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double RinseVoltage { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水流量(Discharge  单位T)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Discharge { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 电量(Electricity  KW/H)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Electricity { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 电流(Current A)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double Current { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 水压(WaterPressure MPa)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public double WaterPressure { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// 添加洗车机历史
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
 | 
					    public class AddWasherHistory
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 运行时间(RunTime)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string RunTime { get; set; }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 清洗记录时间(RecodeTime)
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string RecodeTime { get; set; }
 | 
				
			||||||
 | 
					        //车牌号(CarNumber)
 | 
				
			||||||
 | 
					        public string CarNumber { get; set; }
 | 
				
			||||||
 | 
					        //清洗时间(Time 单位s)
 | 
				
			||||||
 | 
					        public int Time { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //设备名称(Name)
 | 
				
			||||||
 | 
					        public string Name { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //设备状态(State 0表示异常,1表示正常)
 | 
				
			||||||
 | 
					        public int State { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,38 @@
 | 
				
			||||||
 | 
					using langguanApi.Extensions.AutoDI;
 | 
				
			||||||
 | 
					using langguanApi.Model;
 | 
				
			||||||
 | 
					using langguanApi.Model.Entity;
 | 
				
			||||||
 | 
					using Mapster;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace langguanApi.Service
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    [ServiceInjection(InjectionType.Transient)]
 | 
				
			||||||
 | 
					    public class WasherService : BaseService<Washer>
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public WasherService(IConfiguration config) : base(config, nameof(Washer))
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 新增洗车机
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="input"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public async Task<Washer> addWasher(AddWasher input)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var entity = input.Adapt<Washer>();
 | 
				
			||||||
 | 
					            return await base.CreateAsync(entity);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 新增洗车机历史记录
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="input"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public async Task<Washer> AddWasherHistory(AddWasherHistory input)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var entity = input.Adapt<Washer>();
 | 
				
			||||||
 | 
					            return await base.CreateAsync(entity);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue