Commit 5414ab84 authored by 黄奎's avatar 黄奎

新增投资采购审核

parent e5b4a493
......@@ -175,5 +175,25 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态
/// </summary>
public DateStateEnum Status { get; set; }
/// <summary>
/// 审核状态(0-待审核,1-审核通过,2-拒绝)
/// </summary>
public int AuditStatus { get; set; }
/// <summary>
/// 审核内容
/// </summary>
public string AuditContent { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审核人
/// </summary>
public int AuditBy { get; set; }
}
}
......@@ -7,6 +7,24 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public class RB_InvestmentProcurement_Extend : RB_InvestmentProcurement
{
/// <summary>
/// 审核状态字符串
/// </summary>
public string AuditStatusStr
{
get
{
string str = "待审核";
if (this.AuditStatus == 1)
{
str = "审核通过";
}
if (this.AuditStatus == 2)
{
str = "拒绝";
}
return str;
}
}
}
}
......@@ -107,5 +107,23 @@ namespace Mall.Module.TradePavilion
return flag;
}
/// <summary>
/// 采购/投资审核
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool AuditInvestmentProcurementModule(RB_InvestmentProcurement_Extend model)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_InvestmentProcurement_Extend.AuditStatus),model.AuditStatus },
{nameof(RB_InvestmentProcurement_Extend.AuditBy),model.AuditBy },
{nameof(RB_InvestmentProcurement_Extend.AuditTime),model.AuditTime },
{nameof(RB_InvestmentProcurement_Extend.AuditContent),model.AuditContent },
};
bool flag = repository.Update(fileds, new WhereHelper(nameof(RB_InvestmentProcurement_Extend.Id), model.Id));
return flag;
}
}
}
......@@ -227,6 +227,26 @@ namespace Mall.WebApi.Controllers.TradePavilion
var flag = procurementModule.RemoveInvestmentProcurementModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 投资采购审核
/// </summary>
/// <returns></returns>
public ApiResult AutitInvestmentProcurement()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
Int32.TryParse(RequestParm.uid, out int Uid);
var extModel = new RB_InvestmentProcurement_Extend()
{
Id = parms.GetInt("Id"),
AuditStatus=parms.GetInt("AuditStatus"),
AuditTime = DateTime.Now,
AuditBy = Uid,
AuditContent = parms.GetStringValue("AuditContent")
};
var flag = procurementModule.AuditInvestmentProcurementModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 公司信息管理
......
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