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
9c2edb14
Commit
9c2edb14
authored
Mar 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
ccc9b6ae
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
3 deletions
+86
-3
SupplierTypeEnum.cs
Edu.Common/Enum/Sale/SupplierTypeEnum.cs
+40
-0
RB_Supplier.cs
Edu.Model/Entity/StudyAbroad/RB_Supplier.cs
+12
-1
SupplierModule.cs
Edu.Module.StudyAbroad/SupplierModule.cs
+2
-0
RB_SupplierRepository.cs
Edu.Repository/StudyAbroad/RB_SupplierRepository.cs
+8
-0
StudyAbroadController.cs
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
+21
-1
publish.cmd
Edu.WebApi/publish.cmd
+3
-1
No files found.
Edu.Common/Enum/Sale/SupplierTypeEnum.cs
0 → 100644
View file @
9c2edb14
using
Edu.Common.Plugin
;
namespace
Edu.Common.Enum.Sale
{
/// <summary>
/// 供应商类型枚举
/// </summary>
public
enum
SupplierTypeEnum
{
/// <summary>
/// 私塾
/// </summary>
[
EnumField
(
"私塾"
)]
PrivateSchool
=
1
,
/// <summary>
/// 语言学校
/// </summary>
[
EnumField
(
"语言学校"
)]
LanguageSchool
=
2
,
/// <summary>
/// 研究生项目
/// </summary>
[
EnumField
(
"研究生项目"
)]
GraduatePrograms
=
3
,
/// <summary>
/// 就业
/// </summary>
[
EnumField
(
"就业"
)]
ObtainEmployment
=
4
,
/// <summary>
/// 别科
/// </summary>
[
EnumField
(
"别科"
)]
OtherBranches
=
5
,
}
}
Edu.Model/Entity/StudyAbroad/RB_Supplier.cs
View file @
9c2edb14
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Sale
;
using
System
;
using
VT.FW.DB
;
...
...
@@ -19,7 +20,7 @@ namespace Edu.Model.Entity.StudyAbroad
/// <summary>
/// 供应商类型
/// </summary>
public
int
Type
{
get
;
set
;
}
public
SupplierTypeEnum
Type
{
get
;
set
;
}
/// <summary>
/// 供应商名称
...
...
@@ -80,5 +81,15 @@ namespace Edu.Model.Entity.StudyAbroad
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 返佣类型(0-百分比,1-固定金额)
/// </summary>
public
int
CommissionType
{
get
;
set
;
}
/// <summary>
/// 返佣值
/// </summary>
public
decimal
CommissionMoney
{
get
;
set
;
}
}
}
Edu.Module.StudyAbroad/SupplierModule.cs
View file @
9c2edb14
...
...
@@ -56,6 +56,8 @@ namespace Edu.Module.StudyAbroad
{
nameof
(
RB_Supplier_ViewModel
.
LinkTel
),
model
.
LinkTel
},
{
nameof
(
RB_Supplier_ViewModel
.
LinkAddress
),
model
.
LinkAddress
},
{
nameof
(
RB_Supplier_ViewModel
.
Remark
),
model
.
Remark
},
{
nameof
(
RB_Supplier_ViewModel
.
CommissionType
),
model
.
CommissionType
},
{
nameof
(
RB_Supplier_ViewModel
.
CommissionMoney
),
model
.
CommissionMoney
},
};
flag
=
supplierRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Supplier_ViewModel
.
Id
),
model
.
Id
));
}
...
...
Edu.Repository/StudyAbroad/RB_SupplierRepository.cs
View file @
9c2edb14
...
...
@@ -48,6 +48,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Supplier_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_Supplier_ViewModel
.
Type
),(
int
)
query
.
Type
);
}
return
GetPage
<
RB_Supplier_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
@@ -82,6 +86,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Supplier_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_Supplier_ViewModel
.
Type
),
(
int
)
query
.
Type
);
}
return
Get
<
RB_Supplier_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
View file @
9c2edb14
...
...
@@ -46,6 +46,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
query
=
new
RB_Supplier_ViewModel
()
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Type
=(
SupplierTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"Type"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
...
...
@@ -64,12 +65,15 @@ namespace Edu.WebApi.Controllers.StudyAbroad
{
item
.
Id
,
item
.
Type
,
TypeName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
item
.
Type
),
item
.
Name
,
item
.
LinkMan
,
item
.
LinkTel
,
item
.
LinkAddress
,
item
.
Remark
,
item
.
CreateByName
,
item
.
CommissionType
,
item
.
CommissionMoney
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
UpdateByName
,
UpdateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
UpdateTime
),
...
...
@@ -92,6 +96,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
query
=
new
RB_Supplier_ViewModel
()
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Type
=
(
SupplierTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"Type"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
...
...
@@ -121,7 +126,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
extModel
=
new
RB_Supplier_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Type
=
(
SupplierTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"Type"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
LinkMan
=
base
.
ParmJObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
base
.
ParmJObj
.
GetStringValue
(
"LinkTel"
),
...
...
@@ -133,6 +138,8 @@ namespace Edu.WebApi.Controllers.StudyAbroad
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
this
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
CommissionMoney
=
base
.
ParmJObj
.
GetDecimal
(
"CommissionMoney"
),
CommissionType
=
base
.
ParmJObj
.
GetInt
(
"CommissionType"
),
};
bool
flag
=
supplierModule
.
SetSupplierModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
@@ -156,6 +163,8 @@ namespace Edu.WebApi.Controllers.StudyAbroad
LinkTel
=
extModel
?.
LinkTel
??
""
,
LinkAddress
=
extModel
?.
LinkAddress
??
""
,
Remark
=
extModel
?.
Remark
??
""
,
CommissionType
=
extModel
?.
CommissionType
??
0
,
CommissionMoney
=
extModel
?.
CommissionMoney
??
0
,
};
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
@@ -172,6 +181,17 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
flag
=
supplierModule
.
RemoveSupplierModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取供应商类型列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSupplierType
()
{
var
list
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
SupplierTypeEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
#
endregion
#
region
留学就业管理
...
...
Edu.WebApi/publish.cmd
View file @
9c2edb14
@echo off
dotnet publish -o F:\վ\edu_publish -c realease
iisreset /STOP
dotnet publish -o E:\publish\edu.oytour.com -c realease
iisreset /START
exit
\ No newline at end of file
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