Commit 259b6acb authored by 黄奎's avatar 黄奎

新增实体类

parent de0b37aa
...@@ -22,9 +22,9 @@ namespace Mall.Module.TradePavilion ...@@ -22,9 +22,9 @@ namespace Mall.Module.TradePavilion
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Company_Extend> GetContractPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Company_Extend query) public List<RB_Company_Extend> GetCompanyPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Company_Extend query)
{ {
return companyRepository.GetContractPageListRepository(pageIndex, pageSize, out rowsCount, query); return companyRepository.GetCompanyPageListRepository(pageIndex, pageSize, out rowsCount, query);
} }
/// <summary> /// <summary>
...@@ -32,7 +32,7 @@ namespace Mall.Module.TradePavilion ...@@ -32,7 +32,7 @@ namespace Mall.Module.TradePavilion
/// </summary> /// </summary>
/// <param name="CompanyId"></param> /// <param name="CompanyId"></param>
/// <returns></returns> /// <returns></returns>
public RB_Company_Extend GetContractModule(object CompanyId) public RB_Company_Extend GetCompanyModule(object CompanyId)
{ {
return companyRepository.GetEntity<RB_Company_Extend>(CompanyId); return companyRepository.GetEntity<RB_Company_Extend>(CompanyId);
} }
......
...@@ -25,9 +25,9 @@ namespace Mall.Module.TradePavilion ...@@ -25,9 +25,9 @@ namespace Mall.Module.TradePavilion
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_InvestmentProcurement_Extend> GetContractPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_InvestmentProcurement_Extend query) public List<RB_InvestmentProcurement_Extend> GetInvestmentProcurementPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_InvestmentProcurement_Extend query)
{ {
return repository.GetContractPageListRepository(pageIndex, pageSize, out rowsCount, query); return repository.GetInvestmentProcurementPageListRepository(pageIndex, pageSize, out rowsCount, query);
} }
/// <summary> /// <summary>
......
...@@ -22,7 +22,7 @@ namespace Mall.Repository.TradePavilion ...@@ -22,7 +22,7 @@ namespace Mall.Repository.TradePavilion
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Company_Extend> GetContractPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Company_Extend query) public List<RB_Company_Extend> GetCompanyPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Company_Extend query)
{ {
rowsCount = 0; rowsCount = 0;
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
......
...@@ -23,7 +23,7 @@ namespace Mall.Repository.TradePavilion ...@@ -23,7 +23,7 @@ namespace Mall.Repository.TradePavilion
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_InvestmentProcurement_Extend> GetContractPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_InvestmentProcurement_Extend query) public List<RB_InvestmentProcurement_Extend> GetInvestmentProcurementPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_InvestmentProcurement_Extend query)
{ {
rowsCount = 0; rowsCount = 0;
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
......
...@@ -20,13 +20,24 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -20,13 +20,24 @@ namespace Mall.WebApi.Controllers.TradePavilion
[ApiExceptionFilter] [ApiExceptionFilter]
[ApiController] [ApiController]
[EnableCors("AllowCors")] [EnableCors("AllowCors")]
public class ContractController : BaseController public class TradeController : BaseController
{ {
/// <summary> /// <summary>
/// 联系人处理类对象 /// 联系人处理类对象
/// </summary> /// </summary>
private readonly ContractModule module = new ContractModule(); private readonly ContractModule module = new ContractModule();
/// <summary>
/// 投资采购处理类对象
/// </summary>
private readonly InvestmentProcurementModule procurementModule = new InvestmentProcurementModule();
/// <summary>
/// 公司信息处理类对象
/// </summary>
private readonly CompanyModule companyModule = new CompanyModule();
#region 联系人管理
/// <summary> /// <summary>
/// 获取联系人分页列表 /// 获取联系人分页列表
...@@ -95,5 +106,133 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -95,5 +106,133 @@ namespace Mall.WebApi.Controllers.TradePavilion
var flag = module.RemoveContractModule(Id, Status); var flag = module.RemoveContractModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
#endregion
#region 投资采购管理
/// <summary>
/// 获取投资采购分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetInvestmentProcurementPage()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
var query = JsonConvert.DeserializeObject<RB_InvestmentProcurement_Extend>(RequestParm.msg.ToString());
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = procurementModule.GetInvestmentProcurementPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 新增修改投资采购
/// </summary>
/// <returns></returns>
public ApiResult SetInvestmentProcurement()
{
var extModel = JsonConvert.DeserializeObject<RB_InvestmentProcurement_Extend>(RequestParm.msg.ToString());
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
Int32.TryParse(RequestParm.uid, out int Uid);
extModel.CreateBy = Uid;
extModel.CreateDate = DateTime.Now;
extModel.UpdateBy = Uid;
extModel.UpdateDate = DateTime.Now;
var flag = procurementModule.SetInvestmentProcurementModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取投资采购详情
/// </summary>
/// <returns></returns>
public ApiResult GetInvestmentProcurement()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var extModel = procurementModule.GetInvestmentProcurementModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 删除投资采购信息
/// </summary>
/// <returns></returns>
public ApiResult RemoveInvestmentProcurement()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var Status = parms.GetInt("Status", 0);
var flag = procurementModule.RemoveInvestmentProcurementModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 公司信息管理
/// <summary>
/// 获取公司信息分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetCompanyPageList()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
var query = JsonConvert.DeserializeObject<RB_Company_Extend>(RequestParm.msg.ToString());
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = companyModule.GetCompanyPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 新增修改公司信息
/// </summary>
/// <returns></returns>
public ApiResult SetCompany()
{
var extModel = JsonConvert.DeserializeObject<RB_Company_Extend>(RequestParm.msg.ToString());
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
Int32.TryParse(RequestParm.uid, out int Uid);
extModel.CreateBy = Uid;
extModel.CreateDate = DateTime.Now;
extModel.UpdateBy = Uid;
extModel.UpdateDate = DateTime.Now;
var flag = companyModule.SetCompanyModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取公司信息详情
/// </summary>
/// <returns></returns>
public ApiResult GetCompany()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var CompanyId = parms.GetInt("CompanyId", 0);
var extModel = companyModule.GetCompanyModule(CompanyId);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 删除公司信息
/// </summary>
/// <returns></returns>
public ApiResult RemoveCompany()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var CompanyId = parms.GetInt("CompanyId", 0);
var Status = parms.GetInt("Status", 0);
var flag = companyModule.RemoveCompanyModule(CompanyId, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment