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
f017b2fb
Commit
f017b2fb
authored
Mar 19, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询修改
parent
88082baa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
25 deletions
+53
-25
RB_StudyAbroad_ViewModel.cs
Edu.Model/ViewModel/StudyAbroad/RB_StudyAbroad_ViewModel.cs
+5
-0
StudyAbroadModule.cs
Edu.Module.StudyAbroad/StudyAbroadModule.cs
+13
-2
RB_StudyAbroadRepository.cs
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
+14
-0
StudyAbroadController.cs
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
+21
-23
No files found.
Edu.Model/ViewModel/StudyAbroad/RB_StudyAbroad_ViewModel.cs
View file @
f017b2fb
...
@@ -44,5 +44,10 @@ namespace Edu.Model.ViewModel.StudyAbroad
...
@@ -44,5 +44,10 @@ namespace Edu.Model.ViewModel.StudyAbroad
/// 是否查询优惠价格
/// 是否查询优惠价格
/// </summary>
/// </summary>
public
int
IsQPrice
{
get
;
set
;
}
public
int
IsQPrice
{
get
;
set
;
}
/// <summary>
/// 审核类型(1-主管审核,2-部门负责人审核)
/// </summary>
public
int
AuditType
{
get
;
set
;
}
}
}
}
}
Edu.Module.StudyAbroad/StudyAbroadModule.cs
View file @
f017b2fb
...
@@ -224,11 +224,15 @@ namespace Edu.Module.StudyAbroad
...
@@ -224,11 +224,15 @@ namespace Edu.Module.StudyAbroad
/// </summary>
/// </summary>
/// <param name="Id"></param>
/// <param name="Id"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetSaleStateModule
(
int
Id
)
public
bool
SetSaleStateModule
(
int
Id
,
int
SaleState
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),(
int
)
SaleStateEnum
.
Audit
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),
SaleState
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
DirectorAuditTime
),
null
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
DirectorId
),
0
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
DirectorOpinion
),
""
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
DirectorStatus
),
0
},
};
};
bool
flag
=
studyAbroadRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
Id
));
bool
flag
=
studyAbroadRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
Id
));
return
flag
;
return
flag
;
...
@@ -255,6 +259,13 @@ namespace Edu.Module.StudyAbroad
...
@@ -255,6 +259,13 @@ namespace Edu.Module.StudyAbroad
{
{
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),
(
int
)
SaleStateEnum
.
Fail
);
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
SaleState
),
(
int
)
SaleStateEnum
.
Fail
);
}
}
else
if
(
model
.
DirectorStatus
==
1
)
{
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
ManagerId
),
0
);
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
ManagerOpinion
),
""
);
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
ManagerStatus
),
0
);
fileds
.
Add
(
nameof
(
RB_StudyAbroad_ViewModel
.
ManagerAuditTime
),
null
);
}
bool
flag
=
studyAbroadRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
model
.
Id
));
bool
flag
=
studyAbroadRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
model
.
Id
));
return
flag
;
return
flag
;
}
}
...
...
Edu.Repository/StudyAbroad/RB_StudyAbroadRepository.cs
View file @
f017b2fb
...
@@ -48,6 +48,20 @@ WHERE 1=1
...
@@ -48,6 +48,20 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_StudyAbroad_ViewModel
.
Name
));
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_StudyAbroad_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
}
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1}"
,
nameof
(
RB_StudyAbroad_ViewModel
.
Type
),
query
.
Type
);
}
if
(
query
.
AuditType
==
1
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorStatus=0 "
);
}
else
if
(
query
.
AuditType
==
2
)
{
builder
.
AppendFormat
(
" AND A.SaleState=2 AND A.DirectorId>0 AND A.DirectorStatus=1 AND A.ManagerStatus=0 "
);
}
return
GetPage
<
RB_StudyAbroad_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_StudyAbroad_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
...
...
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
View file @
f017b2fb
...
@@ -119,13 +119,13 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -119,13 +119,13 @@ namespace Edu.WebApi.Controllers.StudyAbroad
{
{
var
extModel
=
new
RB_Supplier_ViewModel
()
var
extModel
=
new
RB_Supplier_ViewModel
()
{
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
LinkMan
=
base
.
ParmJObj
.
GetStringValue
(
"LinkMan"
),
LinkMan
=
base
.
ParmJObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
base
.
ParmJObj
.
GetStringValue
(
"LinkTel"
),
LinkTel
=
base
.
ParmJObj
.
GetStringValue
(
"LinkTel"
),
LinkAddress
=
base
.
ParmJObj
.
GetStringValue
(
"LinkAddress"
),
LinkAddress
=
base
.
ParmJObj
.
GetStringValue
(
"LinkAddress"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
CreateBy
=
UserInfo
.
Id
,
CreateBy
=
UserInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
UserInfo
.
Id
,
UpdateBy
=
UserInfo
.
Id
,
...
@@ -151,7 +151,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -151,7 +151,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
Id
=
extModel
?.
Id
??
0
,
Id
=
extModel
?.
Id
??
0
,
Type
=
extModel
?.
Type
??
0
,
Type
=
extModel
?.
Type
??
0
,
Name
=
extModel
?.
Name
??
""
,
Name
=
extModel
?.
Name
??
""
,
LinkMan
=
extModel
?.
LinkMan
??
""
,
LinkMan
=
extModel
?.
LinkMan
??
""
,
LinkTel
=
extModel
?.
LinkTel
??
""
,
LinkTel
=
extModel
?.
LinkTel
??
""
,
LinkAddress
=
extModel
?.
LinkAddress
??
""
,
LinkAddress
=
extModel
?.
LinkAddress
??
""
,
Remark
=
extModel
?.
Remark
??
""
,
Remark
=
extModel
?.
Remark
??
""
,
...
@@ -186,9 +186,10 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -186,9 +186,10 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
query
=
new
RB_StudyAbroad_ViewModel
()
var
query
=
new
RB_StudyAbroad_ViewModel
()
{
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
SupplierId
=
base
.
ParmJObj
.
GetInt
(
"SupplierId"
),
SupplierId
=
base
.
ParmJObj
.
GetInt
(
"SupplierId"
),
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
)
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
),
AuditType
=
base
.
ParmJObj
.
GetInt
(
"AuditType"
),
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
...
@@ -223,6 +224,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -223,6 +224,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
item
.
SellPrice
,
item
.
SellPrice
,
item
.
Remark
,
item
.
Remark
,
item
.
SaleState
,
item
.
SaleState
,
SaleStateName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
item
.
SaleState
),
item
.
CreateByName
,
item
.
CreateByName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
UpdateByName
,
item
.
UpdateByName
,
...
@@ -232,7 +234,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -232,7 +234,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
item
.
DirectorId
,
item
.
DirectorId
,
item
.
DirectorStatus
,
item
.
DirectorStatus
,
item
.
DirectorOpinion
,
item
.
DirectorOpinion
,
DirectorAuditTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
DirectorAuditTime
),
DirectorAuditTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
DirectorAuditTime
),
item
.
ManagerName
,
item
.
ManagerName
,
item
.
ManagerId
,
item
.
ManagerId
,
item
.
ManagerStatus
,
item
.
ManagerStatus
,
...
@@ -257,7 +259,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -257,7 +259,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
query
=
new
RB_StudyAbroad_ViewModel
()
var
query
=
new
RB_StudyAbroad_ViewModel
()
{
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
)
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
)
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
@@ -290,9 +292,9 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -290,9 +292,9 @@ namespace Edu.WebApi.Controllers.StudyAbroad
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Type
=
base
.
ParmJObj
.
GetInt
(
"Type"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
SupplierId
=
base
.
ParmJObj
.
GetInt
(
"SupplierId"
),
SupplierId
=
base
.
ParmJObj
.
GetInt
(
"SupplierId"
),
SupplierContract
=
base
.
ParmJObj
.
GetStringValue
(
"SupplierContract"
),
SupplierContract
=
base
.
ParmJObj
.
GetStringValue
(
"SupplierContract"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
CreateBy
=
UserInfo
.
Id
,
CreateBy
=
UserInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
UserInfo
.
Id
,
UpdateBy
=
UserInfo
.
Id
,
...
@@ -355,7 +357,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -355,7 +357,7 @@ namespace Edu.WebApi.Controllers.StudyAbroad
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
int
IsGetPrice
=
base
.
ParmJObj
.
GetInt
(
"IsGetPrice"
);
int
IsGetPrice
=
base
.
ParmJObj
.
GetInt
(
"IsGetPrice"
);
var
extModel
=
studyAbroadModule
.
GetStudyAbroadModule
(
Id
,
IsGetPrice
:
IsGetPrice
);
var
extModel
=
studyAbroadModule
.
GetStudyAbroadModule
(
Id
,
IsGetPrice
:
IsGetPrice
);
if
(
extModel
==
null
)
if
(
extModel
==
null
)
{
{
extModel
=
new
RB_StudyAbroad_ViewModel
();
extModel
=
new
RB_StudyAbroad_ViewModel
();
...
@@ -384,7 +386,8 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -384,7 +386,8 @@ namespace Edu.WebApi.Controllers.StudyAbroad
public
ApiResult
SetSaleState
()
public
ApiResult
SetSaleState
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
flag
=
studyAbroadModule
.
SetSaleStateModule
(
Id
);
var
SaleState
=
base
.
ParmJObj
.
GetInt
(
"SaleState"
,
0
);
var
flag
=
studyAbroadModule
.
SetSaleStateModule
(
Id
,
SaleState
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -395,8 +398,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -395,8 +398,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
[
HttpPost
]
[
HttpPost
]
public
ApiResult
SetDirectorAudit
()
public
ApiResult
SetDirectorAudit
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
,
0
);
var
extModel
=
new
RB_StudyAbroad_ViewModel
()
var
extModel
=
new
RB_StudyAbroad_ViewModel
()
{
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
...
@@ -416,8 +417,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -416,8 +417,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
[
HttpPost
]
[
HttpPost
]
public
ApiResult
SetManagerAudit
()
public
ApiResult
SetManagerAudit
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
,
0
);
var
extModel
=
new
RB_StudyAbroad_ViewModel
()
var
extModel
=
new
RB_StudyAbroad_ViewModel
()
{
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
...
@@ -428,7 +427,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
...
@@ -428,7 +427,6 @@ namespace Edu.WebApi.Controllers.StudyAbroad
var
flag
=
studyAbroadModule
.
SetManagerAuditModule
(
extModel
,
base
.
UserInfo
);
var
flag
=
studyAbroadModule
.
SetManagerAuditModule
(
extModel
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
#
endregion
#
endregion
}
}
}
}
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