219 lines
7.0 KiB
C#
Executable File
219 lines
7.0 KiB
C#
Executable File
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json.Linq;
|
|
using Opsoft.NetCore.O3App.Domain.Models;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.Model;
|
|
using Opsoft.NetCore.O3App.Shared;
|
|
using Opsoft.NetCore.O3App.WebApi.Models;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Opsoft.NetCore.O3App.WebApi.Controllers.BaseData
|
|
{
|
|
/// <summary>
|
|
/// 系统配置数据
|
|
/// </summary>
|
|
[Authorize]
|
|
public class SysConfigDataController : BaseApiController<SysConfigDataController>
|
|
{
|
|
private readonly ISysConfigDataService _service;
|
|
public SysConfigDataController(IMapper mapper, ILogger<SysConfigDataController> logger, ISysConfigDataService Service)
|
|
: base(mapper, logger)
|
|
{
|
|
_service = Service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取APK版本
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<TBdAppversion>> GetLatestAppInfo(int appType)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetLatestAppInfo(appType);
|
|
}, LoginInfo);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取轮播图信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public async Task<BaseResponse<List<T_BAS_IMAGEPAGEVIEW>>> CarouselMap()
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetAllImagePageView();
|
|
}, LoginInfo);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取仓库信息
|
|
/// </summary>
|
|
/// <param name="paramaters"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<T_BD_STOCK>>> SearchStock([FromQuery] Dictionary<string, string> paramaters)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetAllStock(input);
|
|
}, paramaters);
|
|
}
|
|
/// <summary>
|
|
/// 获取仓位信息
|
|
/// </summary>
|
|
/// <param name="paramaters"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<BD_FLEXVALUES>>> SearchStockPlace([FromQuery] Dictionary<string, string> paramaters)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetAllFlexValues(input);
|
|
}, paramaters);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询个人日志信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<T_BD_PERSONDIARY>>> PersonDiary([FromQuery] Dictionary<string, string> paramaters)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetAllPersonDiary(input);
|
|
}, paramaters);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑个人日志信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<BaseResponse<List<T_BD_PERSONDIARY>>> EditPersonDiary([FromBody] T_BD_PERSONDIARY diary)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.UpdatePersonDiary(input);
|
|
}, diary);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除个人日志信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<string>> DelPersonDiary([FromQuery] string interId)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.DeletePersonDiary(input);
|
|
}, interId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询个人事项
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<T_BD_PERSONALMATTERS>>> PersonalMatters()
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.GetAllPersonalMatters();
|
|
}, LoginInfo);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询个人事项返回
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<BaseResponse<List<T_BD_PERSONALMATTERS>>> PersonalMatter([FromBody] JObject data)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.UpdatePersonalMatters(data);
|
|
}, data);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取系统使用的基本信息
|
|
/// </summary>
|
|
/// <param name="paramaters"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<Basic>>> QueryResource([FromQuery] Dictionary<string, string> paramaters)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.QueryALLResource(input);
|
|
}, paramaters);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取用户信息
|
|
/// </summary>
|
|
/// <param name="paramaters"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<LoginRequest>> QueryLoginUserInfo(string useNO)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.QueryLoginUserInfo(input);
|
|
}, useNO);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 上传图片
|
|
/// </summary>
|
|
/// <param name="file"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<BaseResponse<string>> Upload(IFormFile file)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.Upload(input);
|
|
}, file);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取系统打印参数
|
|
/// </summary>
|
|
/// <param name="SData"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<SysPrintData>>> SysPrintIteam(SysPrintIteam SData)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.SysPrintIteam(SData);
|
|
}, SData);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取全部蓝牙打印机设置
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<BaseResponse<List<Basic>>> QueryBluetooth(SysPrintIteam SData)
|
|
{
|
|
return await TryProcess(async input =>
|
|
{
|
|
return await _service.SysPrintBluetooth(SData);
|
|
}, LoginInfo);
|
|
}
|
|
}
|
|
}
|