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
e943afc0
Commit
e943afc0
authored
Apr 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a455126a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
78 deletions
+83
-78
NoticeModule.cs
Edu.Module.User/NoticeModule.cs
+53
-72
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+30
-6
No files found.
Edu.Module.User/NoticeModule.cs
View file @
e943afc0
...
@@ -10,6 +10,7 @@ using System.Collections.Generic;
...
@@ -10,6 +10,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
VT.FW.DB
;
using
VT.FW.DB
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Module.User
namespace
Edu.Module.User
{
{
...
@@ -68,11 +69,13 @@ namespace Edu.Module.User
...
@@ -68,11 +69,13 @@ namespace Edu.Module.User
/// </summary>
/// </summary>
/// <param name="dmodel"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
/// <returns></returns>
public
string
SetNoticeBaseInfo
(
RB_Notice_Base_ViewModel
dmodel
)
{
public
string
SetNoticeBaseInfo
(
RB_Notice_Base_ViewModel
dmodel
)
{
bool
flag
;
bool
flag
;
if
(
dmodel
.
Id
>
0
)
if
(
dmodel
.
Id
>
0
)
{
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Notice_Base
.
Image
),
dmodel
.
Image
},
{
nameof
(
RB_Notice_Base
.
Image
),
dmodel
.
Image
},
{
nameof
(
RB_Notice_Base
.
CopyPeople
),
dmodel
.
CopyPeople
},
{
nameof
(
RB_Notice_Base
.
CopyPeople
),
dmodel
.
CopyPeople
},
{
nameof
(
RB_Notice_Base
.
From
),
dmodel
.
From
},
{
nameof
(
RB_Notice_Base
.
From
),
dmodel
.
From
},
...
@@ -80,26 +83,20 @@ namespace Edu.Module.User
...
@@ -80,26 +83,20 @@ namespace Edu.Module.User
{
nameof
(
RB_Notice_Base
.
UpdateBy
),
dmodel
.
UpdateBy
},
{
nameof
(
RB_Notice_Base
.
UpdateBy
),
dmodel
.
UpdateBy
},
{
nameof
(
RB_Notice_Base
.
UpdateTime
),
DateTime
.
Now
},
{
nameof
(
RB_Notice_Base
.
UpdateTime
),
DateTime
.
Now
},
};
};
List
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
{
flag
=
notice_BaseRepository
.
Update
(
keyValues
,
new
WhereHelper
(
nameof
(
RB_Notice_Base
.
Id
),
dmodel
.
Id
));
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Notice_Base
.
Id
),
FiledValue
=
dmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
}
};
else
flag
=
notice_BaseRepository
.
Update
(
keyValues
,
whereHelpers
);
{
}
else
{
var
model
=
notice_BaseRepository
.
GetList
(
new
RB_Notice_Base_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
}).
FirstOrDefault
();
var
model
=
notice_BaseRepository
.
GetList
(
new
RB_Notice_Base_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
}).
FirstOrDefault
();
if
(
model
==
null
)
if
(
model
==
null
)
{
{
flag
=
notice_BaseRepository
.
Insert
(
dmodel
)
>
0
;
flag
=
notice_BaseRepository
.
Insert
(
dmodel
)
>
0
;
}
}
else
{
else
{
return
"已存在配置,无法新增"
;
return
"已存在配置,无法新增"
;
}
}
}
}
return
flag
?
""
:
"出错了,请联系管理员"
;
return
flag
?
""
:
"出错了,请联系管理员"
;
}
}
...
@@ -115,22 +112,14 @@ namespace Edu.Module.User
...
@@ -115,22 +112,14 @@ namespace Edu.Module.User
public
List
<
RB_Notice_ViewModel
>
GetNoticePageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Notice_ViewModel
dmodel
)
public
List
<
RB_Notice_ViewModel
>
GetNoticePageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Notice_ViewModel
dmodel
)
{
{
var
list
=
noticeRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
dmodel
);
var
list
=
noticeRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
dmodel
);
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
//查询阅读人数
//查询阅读人数
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
//var dList = notice_DeptRepository.GetList(new RB_Notice_Dept() { }, NoticeIds);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
//var idList = dList.Where(x => x.NoticeId == item.Id).ToList();
//if (idList.Any())
//{
// item.To = string.Join(",", idList.Select(x => x.DeptId));
//}
//else
//{
// item.To = "-1";
//}
}
}
}
}
return
list
;
return
list
;
...
@@ -148,7 +137,8 @@ namespace Edu.Module.User
...
@@ -148,7 +137,8 @@ namespace Edu.Module.User
{
{
#
region
我的上级部门
#
region
我的上级部门
var
dlist
=
departmentRepository
.
GetAllSuperiorDepartmentListRepository
(
dmodel
.
DeptId
);
var
dlist
=
departmentRepository
.
GetAllSuperiorDepartmentListRepository
(
dmodel
.
DeptId
);
if
(
dlist
.
Any
())
{
if
(
dlist
.
Any
())
{
dmodel
.
To
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
DeptId
));
dmodel
.
To
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
DeptId
));
}
}
#
endregion
#
endregion
...
@@ -158,18 +148,9 @@ namespace Edu.Module.User
...
@@ -158,18 +148,9 @@ namespace Edu.Module.User
//查询阅读人数
//查询阅读人数
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
//var dList = notice_DeptRepository.GetList(new RB_Notice_Dept() { }, NoticeIds);
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
//var idList = dList.Where(x => x.NoticeId == item.Id).ToList();
//if (idList.Any())
//{
// item.To = string.Join(",", idList.Select(x => x.DeptId));
//}
//else {
// item.To = "-1";
//}
}
}
}
}
return
list
;
return
list
;
...
@@ -186,15 +167,18 @@ namespace Edu.Module.User
...
@@ -186,15 +167,18 @@ namespace Edu.Module.User
if
(
model
==
null
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
model
==
null
)
{
return
ApiResult
.
ParamIsNull
();
}
var
dList
=
notice_DeptRepository
.
GetList
(
new
RB_Notice_Dept
()
{
NoticeId
=
noticeId
},
""
);
var
dList
=
notice_DeptRepository
.
GetList
(
new
RB_Notice_Dept
()
{
NoticeId
=
noticeId
},
""
);
model
.
To
=
"-1"
;
model
.
To
=
"-1"
;
if
(
dList
.
Any
())
{
if
(
dList
.
Any
())
{
model
.
To
=
string
.
Join
(
","
,
dList
.
Select
(
x
=>
x
.
DeptId
));
model
.
To
=
string
.
Join
(
","
,
dList
.
Select
(
x
=>
x
.
DeptId
));
}
}
List
<
object
>
DepartmentList
=
new
List
<
object
>()
{
new
{
DepartmentId
=
-
1
,
DeptName
=
"全公司"
}
};
List
<
object
>
DepartmentList
=
new
List
<
object
>()
{
new
{
DepartmentId
=
-
1
,
DeptName
=
"全公司"
}
};
if
(!
string
.
IsNullOrEmpty
(
model
.
To
)
&&
model
.
To
!=
"-1"
)
{
if
(!
string
.
IsNullOrEmpty
(
model
.
To
)
&&
model
.
To
!=
"-1"
)
{
//查询所有的部门
//查询所有的部门
var
dlist
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
QDeptIds
=
model
.
To
});
var
dlist
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
QDeptIds
=
model
.
To
});
DepartmentList
=
new
List
<
object
>();
DepartmentList
=
new
List
<
object
>();
foreach
(
var
item
in
dlist
)
{
foreach
(
var
item
in
dlist
)
{
DepartmentList
.
Add
(
new
DepartmentList
.
Add
(
new
{
{
DepartmentId
=
item
.
DeptId
,
DepartmentId
=
item
.
DeptId
,
...
@@ -203,10 +187,12 @@ namespace Edu.Module.User
...
@@ -203,10 +187,12 @@ namespace Edu.Module.User
}
}
}
}
List
<
object
>
CopyPeopleList
=
new
List
<
object
>();
List
<
object
>
CopyPeopleList
=
new
List
<
object
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
CopyPeople
)
&&
model
.
CopyPeople
!=
"-1"
)
{
if
(!
string
.
IsNullOrEmpty
(
model
.
CopyPeople
)
&&
model
.
CopyPeople
!=
"-1"
)
{
//查询所有人
//查询所有人
var
elist
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
QIds
=
model
.
CopyPeople
});
var
elist
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
QIds
=
model
.
CopyPeople
});
foreach
(
var
item
in
elist
)
{
foreach
(
var
item
in
elist
)
{
CopyPeopleList
.
Add
(
new
CopyPeopleList
.
Add
(
new
{
{
EmployeeId
=
item
.
Id
,
EmployeeId
=
item
.
Id
,
...
@@ -214,13 +200,12 @@ namespace Edu.Module.User
...
@@ -214,13 +200,12 @@ namespace Edu.Module.User
});
});
}
}
}
}
//转换文件列表
//转换文件列表
model
.
FileList
=
new
List
<
FileModel
>();
model
.
FileList
=
new
List
<
FileModel
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
File
))
{
if
(!
string
.
IsNullOrEmpty
(
model
.
File
))
{
model
.
FileList
=
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
model
.
File
);
model
.
FileList
=
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
model
.
File
);
}
}
return
ApiResult
.
Success
(
""
,
new
return
ApiResult
.
Success
(
""
,
new
{
{
model
.
Id
,
model
.
Id
,
...
@@ -291,7 +276,8 @@ namespace Edu.Module.User
...
@@ -291,7 +276,8 @@ namespace Edu.Module.User
return
false
;
return
false
;
}
}
}
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Notice
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Notice
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Notice
.
UpdateTime
),
DateTime
.
Now
},
{
nameof
(
RB_Notice
.
UpdateTime
),
DateTime
.
Now
},
};
};
...
@@ -311,14 +297,7 @@ namespace Edu.Module.User
...
@@ -311,14 +297,7 @@ namespace Edu.Module.User
{
{
keyValues
.
Add
(
nameof
(
RB_Notice
.
Status
),
Common
.
Enum
.
DateStateEnum
.
Delete
);
keyValues
.
Add
(
nameof
(
RB_Notice
.
Status
),
Common
.
Enum
.
DateStateEnum
.
Delete
);
}
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
return
noticeRepository
.
Update
(
keyValues
,
new
WhereHelper
(
nameof
(
RB_Notice
.
Id
),
noticeId
));
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Notice
.
Id
),
FiledValue
=
noticeId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
noticeRepository
.
Update
(
keyValues
,
wheres
);
}
}
}
}
...
@@ -340,19 +319,16 @@ namespace Edu.Module.User
...
@@ -340,19 +319,16 @@ namespace Edu.Module.User
{
nameof
(
RB_Notice
.
Title
),
demodel
.
Title
},
{
nameof
(
RB_Notice
.
Title
),
demodel
.
Title
},
{
nameof
(
RB_Notice
.
Content
),
demodel
.
Content
},
{
nameof
(
RB_Notice
.
Content
),
demodel
.
Content
},
{
nameof
(
RB_Notice
.
File
),
demodel
.
File
},
{
nameof
(
RB_Notice
.
File
),
demodel
.
File
},
{
nameof
(
RB_Notice
.
NoticeState
),
demodel
.
NoticeState
},
{
nameof
(
RB_Notice
.
NoticeState
),
(
int
)
demodel
.
NoticeState
},
{
nameof
(
RB_Notice
.
Is_Top
),
demodel
.
Is_Top
},
{
nameof
(
RB_Notice
.
Is_Top
),
demodel
.
Is_Top
},
{
nameof
(
RB_Notice
.
UpdateBy
),
demodel
.
UpdateBy
},
{
nameof
(
RB_Notice
.
UpdateBy
),
demodel
.
UpdateBy
},
{
nameof
(
RB_Notice
.
UpdateTime
),
demodel
.
UpdateTime
}
{
nameof
(
RB_Notice
.
UpdateTime
),
demodel
.
UpdateTime
}
};
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
new
WhereHelper
(){
{
FiledName
=
nameof
(
RB_Notice
.
Id
),
new
WhereHelper
(
nameof
(
RB_Notice
.
Id
),
demodel
.
Id
)
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
};
bool
flag
=
noticeRepository
.
Update
(
keyValues
,
wheres
);
bool
flag
=
noticeRepository
.
Update
(
keyValues
,
where
Helper
s
);
if
(
flag
)
if
(
flag
)
{
{
//更新部门
//更新部门
...
@@ -376,7 +352,8 @@ namespace Edu.Module.User
...
@@ -376,7 +352,8 @@ namespace Edu.Module.User
notice_DeptRepository
.
Delete
(
item
);
notice_DeptRepository
.
Delete
(
item
);
}
}
}
}
else
{
else
{
//删除部门关联
//删除部门关联
foreach
(
var
item
in
dList
)
foreach
(
var
item
in
dList
)
{
{
...
@@ -387,7 +364,6 @@ namespace Edu.Module.User
...
@@ -387,7 +364,6 @@ namespace Edu.Module.User
if
(
flag
&&
oldModel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Draft
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
if
(
flag
&&
oldModel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Draft
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
{
{
//推送消息
//推送消息
}
}
return
flag
;
return
flag
;
}
}
...
@@ -395,7 +371,10 @@ namespace Edu.Module.User
...
@@ -395,7 +371,10 @@ namespace Edu.Module.User
{
{
//查询生成规则
//查询生成规则
var
model
=
notice_BaseRepository
.
GetList
(
new
RB_Notice_Base_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
}).
FirstOrDefault
();
var
model
=
notice_BaseRepository
.
GetList
(
new
RB_Notice_Base_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
}).
FirstOrDefault
();
if
(
model
==
null
)
{
return
false
;
}
if
(
model
==
null
)
{
return
false
;
}
demodel
.
Number
=
""
;
demodel
.
Number
=
""
;
demodel
.
NumberRule
=
model
.
NumberRule
;
demodel
.
NumberRule
=
model
.
NumberRule
;
if
(
model
.
NumberRule
==
Common
.
Enum
.
User
.
NoticeRuleEnum
.
One
)
if
(
model
.
NumberRule
==
Common
.
Enum
.
User
.
NoticeRuleEnum
.
One
)
...
@@ -414,7 +393,8 @@ namespace Edu.Module.User
...
@@ -414,7 +393,8 @@ namespace Edu.Module.User
Letter
=
LetterStr
.
Substring
(
Index
,
Index
+
1
);
Letter
=
LetterStr
.
Substring
(
Index
,
Index
+
1
);
Num
=
1
;
Num
=
1
;
}
}
else
{
else
{
Num
++;
Num
++;
}
}
demodel
.
Number
=
DateTime
.
Now
.
ToString
(
"yyyy"
)
+
"-"
+
Letter
+
"-"
+
Num
.
ToString
().
PadLeft
(
3
,
'0'
);
demodel
.
Number
=
DateTime
.
Now
.
ToString
(
"yyyy"
)
+
"-"
+
Letter
+
"-"
+
Num
.
ToString
().
PadLeft
(
3
,
'0'
);
...
@@ -424,15 +404,16 @@ namespace Edu.Module.User
...
@@ -424,15 +404,16 @@ namespace Edu.Module.User
demodel
.
Number
=
DateTime
.
Now
.
ToString
(
"yyyy"
)
+
"-A-001"
;
demodel
.
Number
=
DateTime
.
Now
.
ToString
(
"yyyy"
)
+
"-A-001"
;
}
}
}
}
int
Id
=
noticeRepository
.
Insert
(
demodel
);
int
Id
=
noticeRepository
.
Insert
(
demodel
);
bool
flag
=
Id
>
0
;
bool
flag
=
Id
>
0
;
if
(
flag
)
{
if
(
flag
)
{
//更新部门
//更新部门
if
(
demodel
.
To
!=
"-1"
)
if
(
demodel
.
To
!=
"-1"
)
{
{
List
<
int
>
ToList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
To
+
"]"
);
List
<
int
>
ToList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
To
+
"]"
);
foreach
(
var
item
in
ToList
)
{
foreach
(
var
item
in
ToList
)
{
notice_DeptRepository
.
Insert
(
new
RB_Notice_Dept
()
notice_DeptRepository
.
Insert
(
new
RB_Notice_Dept
()
{
{
Id
=
0
,
Id
=
0
,
...
@@ -445,10 +426,10 @@ namespace Edu.Module.User
...
@@ -445,10 +426,10 @@ namespace Edu.Module.User
if
(
flag
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
if
(
flag
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
{
{
//推送消息
//推送消息
}
}
return
flag
;
return
flag
;
}
}
}
}
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
e943afc0
...
@@ -10,6 +10,7 @@ using Edu.Common.API;
...
@@ -10,6 +10,7 @@ using Edu.Common.API;
using
Edu.Common.Enum.User
;
using
Edu.Common.Enum.User
;
using
Edu.Common.Plugin
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.CacheModel
;
using
Edu.Model.Public
;
using
Edu.Model.ViewModel.User
;
using
Edu.Model.ViewModel.User
;
using
Edu.Module.User
;
using
Edu.Module.User
;
using
Edu.WebApi.Filter
;
using
Edu.WebApi.Filter
;
...
@@ -107,7 +108,14 @@ namespace Edu.WebApi.Controllers.User
...
@@ -107,7 +108,14 @@ namespace Edu.WebApi.Controllers.User
[
HttpPost
]
[
HttpPost
]
public
ApiResult
SetNoticeBaseInfo
()
public
ApiResult
SetNoticeBaseInfo
()
{
{
var
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Notice_Base_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
demodel
=
new
RB_Notice_Base_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Image
=
base
.
ParmJObj
.
GetStringValue
(
"Image"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
NumberRule
=
(
NoticeRuleEnum
)
base
.
ParmJObj
.
GetInt
(
"NumberRule"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
};
demodel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
demodel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
demodel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
demodel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
demodel
.
CreateBy
=
base
.
UserInfo
.
Id
;
demodel
.
CreateBy
=
base
.
UserInfo
.
Id
;
...
@@ -196,7 +204,26 @@ namespace Edu.WebApi.Controllers.User
...
@@ -196,7 +204,26 @@ namespace Edu.WebApi.Controllers.User
public
ApiResult
SetNoticeInfo
()
public
ApiResult
SetNoticeInfo
()
{
{
UserInfo
userInfo
=
base
.
UserInfo
;
UserInfo
userInfo
=
base
.
UserInfo
;
RB_Notice_ViewModel
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Notice_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
RB_Notice_ViewModel
demodel
=
new
RB_Notice_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Content
=
base
.
ParmJObj
.
GetStringValue
(
"Content"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
Is_Top
=
base
.
ParmJObj
.
GetInt
(
"Is_Top"
),
NoticeState
=(
NoticeStateEnum
)
base
.
ParmJObj
.
GetInt
(
"NoticeState"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
To
=
base
.
ParmJObj
.
GetStringValue
(
"To"
)
};
try
{
demodel
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
base
.
ParmJObj
.
GetStringValue
(
"FileList"
));
}
catch
(
Exception
ex
)
{
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
From
))
if
(
string
.
IsNullOrEmpty
(
demodel
.
From
))
{
{
return
ApiResult
.
ParamIsNull
(
"请传递来源"
);
return
ApiResult
.
ParamIsNull
(
"请传递来源"
);
...
@@ -205,10 +232,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -205,10 +232,7 @@ namespace Edu.WebApi.Controllers.User
{
{
return
ApiResult
.
ParamIsNull
(
"请传递发送部门"
);
return
ApiResult
.
ParamIsNull
(
"请传递发送部门"
);
}
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
CopyPeople
))
{
return
ApiResult
.
ParamIsNull
(
"请选择抄送人"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Title
))
if
(
string
.
IsNullOrEmpty
(
demodel
.
Title
))
{
{
return
ApiResult
.
ParamIsNull
(
"请输入标题"
);
return
ApiResult
.
ParamIsNull
(
"请输入标题"
);
...
...
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