Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
6d388b91
Commit
6d388b91
authored
Feb 09, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
44046a8a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
3 deletions
+48
-3
RB_Customer_Category_Extend.cs
Edu.Model/ViewModel/Customer/RB_Customer_Category_Extend.cs
+5
-0
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+26
-1
RB_Customer_CategoryRepository.cs
Edu.Repository/Customer/RB_Customer_CategoryRepository.cs
+4
-0
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+13
-2
No files found.
Edu.Model/ViewModel/Customer/RB_Customer_Category_Extend.cs
View file @
6d388b91
...
@@ -29,5 +29,10 @@ namespace Edu.Model.ViewModel.Customer
...
@@ -29,5 +29,10 @@ namespace Edu.Model.ViewModel.Customer
/// 订单金额
/// 订单金额
/// </summary>
/// </summary>
public
decimal
OrderSales
{
get
;
set
;
}
public
decimal
OrderSales
{
get
;
set
;
}
/// <summary>
/// 是否查询全部
/// </summary>
public
int
IsQueryAll
{
get
;
set
;
}
}
}
}
}
Edu.Module.Customer/CustomerModule.cs
View file @
6d388b91
...
@@ -546,6 +546,31 @@ namespace Edu.Module.Customer
...
@@ -546,6 +546,31 @@ namespace Edu.Module.Customer
return
list
;
return
list
;
}
}
/// <summary>
/// 检测同行是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
CheckCustomerCategoryModule
(
RB_Customer_Category_Extend
model
)
{
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>
{
new
WhereHelper
(
nameof
(
RB_Customer_Category_Extend
.
CategoryName
),
model
.
CategoryName
),
new
WhereHelper
(
nameof
(
RB_Customer_Category_Extend
.
Status
),
0
),
new
WhereHelper
(
nameof
(
RB_Customer_Category_Extend
.
Group_Id
),
model
.
Group_Id
)
};
if
(
model
.
CategoryId
>
0
)
{
list
.
Add
(
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Category_Extend
.
CategoryId
),
FiledValue
=
model
.
CategoryId
,
OperatorEnum
=
OperatorEnum
.
NotEqual
});
}
return
customer_CategoryRepository
.
Exists
(
list
);
}
/// <summary>
/// <summary>
/// 新增修改同行
/// 新增修改同行
/// </summary>
/// </summary>
...
@@ -558,7 +583,7 @@ namespace Edu.Module.Customer
...
@@ -558,7 +583,7 @@ namespace Edu.Module.Customer
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Customer_Category_Extend
.
CategoryName
),
model
.
CategoryName
},
{
nameof
(
RB_Customer_Category_Extend
.
CategoryName
),
model
.
CategoryName
.
Trim
()
},
{
nameof
(
RB_Customer_Category_Extend
.
CatetoryType
),
model
.
CatetoryType
},
{
nameof
(
RB_Customer_Category_Extend
.
CatetoryType
),
model
.
CatetoryType
},
{
nameof
(
RB_Customer_Category_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Customer_Category_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Customer_Category_Extend
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Customer_Category_Extend
.
UpdateTime
),
model
.
UpdateTime
},
...
...
Edu.Repository/Customer/RB_Customer_CategoryRepository.cs
View file @
6d388b91
...
@@ -47,6 +47,10 @@ WHERE 1=1
...
@@ -47,6 +47,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_Category_Extend
.
CatetoryType
),
(
int
)
query
.
CatetoryType
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_Category_Extend
.
CatetoryType
),
(
int
)
query
.
CatetoryType
);
}
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_Category_Extend
.
CreateBy
),
query
.
CreateBy
);
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Customer_Category_Extend
.
CategoryId
));
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Customer_Category_Extend
.
CategoryId
));
return
GetPage
<
RB_Customer_Category_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Customer_Category_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
...
...
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
6d388b91
...
@@ -484,6 +484,7 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -484,6 +484,7 @@ namespace Edu.WebApi.Controllers.Customer
x
.
ContactNumber
,
x
.
ContactNumber
,
x
.
EnterpriseName
,
x
.
EnterpriseName
,
x
.
CustomerType
,
x
.
CustomerType
,
CustomerTypeName
=
x
.
CustomerType
.
ToName
(),
x
.
StuNum
,
x
.
StuNum
,
x
.
OrderNum
,
x
.
OrderNum
,
x
.
OrderSales
,
x
.
OrderSales
,
...
@@ -491,7 +492,9 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -491,7 +492,9 @@ namespace Edu.WebApi.Controllers.Customer
x
.
ApproveStateStr
,
x
.
ApproveStateStr
,
x
.
CreateBy
,
x
.
CreateBy
,
x
.
CreateByName
,
x
.
CreateByName
,
x
.
CreateTimeStr
x
.
CreateTimeStr
,
x
.
CategoryName
,
x
.
CategoryId
,
});
});
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
...
@@ -795,7 +798,11 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -795,7 +798,11 @@ namespace Edu.WebApi.Controllers.Customer
CategoryName
=
base
.
ParmJObj
.
GetStringValue
(
"CategoryName"
),
CategoryName
=
base
.
ParmJObj
.
GetStringValue
(
"CategoryName"
),
CatetoryType
=(
CatetoryTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CatetoryType"
),
CatetoryType
=(
CatetoryTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CatetoryType"
),
};
};
query
.
CreateBy
=
userInfo
.
Id
;
int
IsQueryAll
=
base
.
ParmJObj
.
GetInt
(
"IsQueryAll"
);
if
(
IsQueryAll
==
0
)
{
query
.
CreateBy
=
userInfo
.
Id
;
}
var
list
=
customerModule
.
GetCustomerCategoryPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
var
list
=
customerModule
.
GetCustomerCategoryPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
...
@@ -874,6 +881,10 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -874,6 +881,10 @@ namespace Edu.WebApi.Controllers.Customer
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
if
(
customerModule
.
CheckCustomerCategoryModule
(
extModel
))
{
return
ApiResult
.
Failed
(
message
:
"已存在此同行信息,请重新录入!"
);
}
bool
flag
=
customerModule
.
SetCustomerCategoryModule
(
extModel
);
bool
flag
=
customerModule
.
SetCustomerCategoryModule
(
extModel
);
if
(
flag
&&
CategoryId
<=
0
)
if
(
flag
&&
CategoryId
<=
0
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment