Commit 331f9b00 authored by 黄奎's avatar 黄奎

页面修改

parent 6d388b91
......@@ -275,8 +275,22 @@ namespace Edu.Module.User
}
else if (item.CreateType == StuCreateTypeEnum.CustomerInput)
{
item.StuSourceIdName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.CustomerName ?? "";
item.EnterpriseName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.EnterpriseName ?? "";
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId);
item.StuSourceIdName = tempCustomer?.CustomerName ?? "";
if (tempCustomer != null)
{
if (tempCustomer.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.Other)
{
item.EnterpriseName = tempCustomer?.CategoryName ?? "";
}
else
{
item.EnterpriseName = tempCustomer?.EnterpriseName ?? "";
}
}
else {
item.EnterpriseName = "";
}
}
else if (item.CreateType == StuCreateTypeEnum.TransIntroduction)
{
......
......@@ -198,8 +198,23 @@ namespace Edu.Module.User
}
else if (item.CreateType == StuCreateTypeEnum.CustomerInput)
{
item.StuSourceIdName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.CustomerName ?? "";
item.EnterpriseName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.EnterpriseName ?? "";
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId);
item.StuSourceIdName = tempCustomer?.CustomerName ?? "";
if (tempCustomer != null)
{
if (tempCustomer.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.Other)
{
item.EnterpriseName = tempCustomer?.CategoryName ?? "";
}
else
{
item.EnterpriseName = tempCustomer?.EnterpriseName ?? "";
}
}
else
{
item.EnterpriseName = "";
}
}
else if (item.CreateType == StuCreateTypeEnum.TransIntroduction)
{
......
......@@ -105,8 +105,8 @@ WHERE 1=1
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Customer AS A
SELECT A.*,IFNULL(B.CategoryName,'') AS CategoryName
FROM RB_Customer AS A LEFT JOIN rb_customer_category AS B ON A.CategoryId=B.CategoryId
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_Extend.Status), (int)DateStateEnum.Normal);
......
......@@ -190,10 +190,18 @@ WHERE 1=1
{
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId);
var tempStr = (tempCustomer?.CustomerName ?? "");
if ((tempCustomer?.EnterpriseName ?? "") != "")
if (tempCustomer != null)
{
if (tempCustomer.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.Other)
{
tempStr += "(" + (tempCustomer?.EnterpriseName ?? "") + ")";
}
else
{
tempStr += "(" + (tempCustomer?.CategoryName ?? "") + ")";
}
}
item.StuSourceIdName = tempStr ;
}
else if (item.CreateType == StuCreateTypeEnum.TransIntroduction)
......
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