Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
34770ed2
Commit
34770ed2
authored
Nov 03, 2023
by
xuwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查看个人电子档案列表
parent
aaea5227
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
67 deletions
+120
-67
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/auditorium/SchoolAuditoriumController.java
+34
-34
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacher/SchoolTeacherLeaveController.java
+79
-26
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesNoticeMapper.xml
+7
-7
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/auditorium/SchoolAuditoriumController.java
View file @
34770ed2
...
...
@@ -172,23 +172,23 @@ public class SchoolAuditoriumController extends BaseController
schoolAuditorium
.
setApplyTime
(
DateUtils
.
getNowDate
());
schoolAuditoriumService
.
submitApply
(
schoolAuditorium
,
userName
,
AUDITORIUMAPPLY
,
new
HashMap
<>());
/** 发送发送钉钉审批实例 */
String
ddInstanceId
=
schoolAuditoriumService
.
sendDdInstance
(
schoolAuditorium
);
// /** 发送发送钉钉审批实例 */
// String ddInstanceId = schoolAuditoriumService.sendDdInstance(schoolAuditorium);
//
// //转换时间
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
// Date time = schoolAuditorium.getApplyTime();
// String applyTime = format.format(time);
//转换时间
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
time
=
schoolAuditorium
.
getApplyTime
();
String
applyTime
=
format
.
format
(
time
);
//发送钉钉消息到分管领导
//获取钉钉用户id
// //发送钉钉消息到分管领导
// //获取钉钉用户id
// String ddUserId = teacherService.getDdUserIdByUserId(schoolAuditorium.getLeadershipId());
// //发送钉钉消息给分管领导
// DingMessageVo messageVo = new DingMessageVo();
// OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
// msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
// msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
// msg.getOa().getHead().setText("
二中校园测试
");
// msg.getOa().getHead().setText("
智慧校园
");
// msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
// msg.getOa().getBody().setAuthor(schoolAuditorium.getApplyName());
// msg.getOa().getBody().setContent("申请内容:" + schoolAuditorium.getActivityName());
...
...
@@ -288,35 +288,35 @@ public class SchoolAuditoriumController extends BaseController
//获取钉钉用户id
String
ddUserId
=
teacherService
.
getDdUserIdByUserId
(
leave
.
getApplyId
());
//发送钉钉消息给分管领导
//
DingMessageVo messageVo = new DingMessageVo();
//
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
//
msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
//
msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
// msg.getOa().getHead().setText("二中校园测试
");
//
msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
//
msg.getOa().getBody().setAuthor(leave.getLeadershipName());
//
msg.getOa().getBody().setContent(flag ? "已通过" : "已驳回");
//
msg.getOa().getBody().setTitle("您好,您的礼堂预约申请已回复。");
//
msg.getOa().setPcMessageUrl("https://open.dingtalk.com/");
//
msg.getOa().setMessageUrl("https://open.dingtalk.com/");
//
msg.setMsgtype("oa");
//
messageVo.setMsg(msg);
//
messageVo.setToAllUser(false);
//
messageVo.setUseridList(ddUserId);
//
dingMessageUtils.sendMessage(messageVo);
DingMessageVo
messageVo
=
new
DingMessageVo
();
OapiMessageCorpconversationAsyncsendV2Request
.
Msg
msg
=
new
OapiMessageCorpconversationAsyncsendV2Request
.
Msg
();
msg
.
setOa
(
new
OapiMessageCorpconversationAsyncsendV2Request
.
OA
());
msg
.
getOa
().
setHead
(
new
OapiMessageCorpconversationAsyncsendV2Request
.
Head
());
msg
.
getOa
().
getHead
().
setText
(
"智慧校园
"
);
msg
.
getOa
().
setBody
(
new
OapiMessageCorpconversationAsyncsendV2Request
.
Body
());
msg
.
getOa
().
getBody
().
setAuthor
(
leave
.
getLeadershipName
());
msg
.
getOa
().
getBody
().
setContent
(
flag
?
"已通过"
:
"已驳回"
);
msg
.
getOa
().
getBody
().
setTitle
(
"您好,您的礼堂预约申请已回复。"
);
msg
.
getOa
().
setPcMessageUrl
(
"https://open.dingtalk.com/"
);
msg
.
getOa
().
setMessageUrl
(
"https://open.dingtalk.com/"
);
msg
.
setMsgtype
(
"oa"
);
messageVo
.
setMsg
(
msg
);
messageVo
.
setToAllUser
(
false
);
messageVo
.
setUseridList
(
ddUserId
);
dingMessageUtils
.
sendMessage
(
messageVo
);
//修改消息任务状态为已完成
//
dingMessageUtils.updateStatusBar(leave.getDdTaskId(), "已完成", "0xFF78C06E");
dingMessageUtils
.
updateStatusBar
(
leave
.
getDdTaskId
(),
"已完成"
,
"0xFF78C06E"
);
/**发送模板消息到申请人,审批结果*/
//获取申请人openId
String
openId
=
teacherService
.
getOpenIdByUserId
(
leave
.
getApplyId
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"toUserOpenId"
,
openId
);
map
.
put
(
"first"
,
"您好,您的礼堂预约申请已回复。"
);
map
.
put
(
"content"
,
flag
?
"已通过"
:
"已驳回"
);
map
.
put
(
"remark"
,
"审批留言: "
+
variables
.
get
(
"comment"
));
VxTemlateSendApi
.
sendVxTemlate
(
map
);
//
String openId = teacherService.getOpenIdByUserId(leave.getApplyId());
//
Map<String,Object> map = new HashMap<>();
//
map.put("toUserOpenId",openId);
//
map.put("first","您好,您的礼堂预约申请已回复。");
//
map.put("content",flag ? "已通过" : "已驳回");
//
map.put("remark","审批留言: "+ variables.get("comment"));
//
VxTemlateSendApi.sendVxTemlate(map);
// LeaveResultTemplate template = new LeaveResultTemplate();
// template.setFirst("您好,您的礼堂预约申请已回复。");
// template.setToUserOpenId(openId);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/teacher/SchoolTeacherLeaveController.java
View file @
34770ed2
...
...
@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.controller.teacher;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.core.utils.HolidayDateUtil
;
import
com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
...
...
@@ -42,6 +43,8 @@ import yangtz.cs.liu.campus.util.VxTemlateSendApi;
import
yangtz.cs.liu.campus.vo.teacher.SchoolTeacherLeaveVO
;
import
yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO
;
import
yangtz.cs.liu.campus.vo.teacher.TeacherLeaveVO
;
import
yangtz.cs.liu.dingding.utils.DingMessageUtils
;
import
yangtz.cs.liu.dingding.vo.DingMessageVo
;
import
yangtz.cs.liu.wechat.domain.template.LeaveStateTemplate
;
import
yangtz.cs.liu.wechat.domain.template.LeaveTemplate
;
import
yangtz.cs.liu.wechat.service.api.IWxApiService
;
...
...
@@ -97,6 +100,10 @@ public class SchoolTeacherLeaveController extends BaseController {
@Autowired
private
ISysDeptService
deptService
;
//钉钉消息通知
@Autowired
private
DingMessageUtils
dingMessageUtils
;
//职工
private
static
final
String
TYPE
=
"1"
;
...
...
@@ -265,35 +272,81 @@ public class SchoolTeacherLeaveController extends BaseController {
schoolTeacherLeave
.
setApplyTime
(
DateUtils
.
getNowDate
());
schoolTeacherLeaveService
.
submitApply
(
schoolTeacherLeave
,
userName
,
TEACHERLEAVE
,
new
HashMap
<>());
//转换时间
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
time
=
schoolTeacherLeave
.
getApplyTime
();
String
applyTime
=
format
.
format
(
time
);
//
//转换时间
//
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
//
Date time = schoolTeacherLeave.getApplyTime();
//
String applyTime = format.format(time);
/** 发送申请通知 */
//获取openid
String
openId
=
schoolTeacherService
.
getOpenIdByUserId
(
schoolTeacherLeave
.
getHandUserId1
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"toUserOpenId"
,
openId
);
map
.
put
(
"applyTime"
,
applyTime
);
map
.
put
(
"remark"
,
"共计"
+
schoolTeacherLeave
.
getTotalTime
()
+
"天,请您尽快处理"
);
map
.
put
(
"applyUser"
,
schoolTeacherLeave
.
getTeacherName
());
String
start
=
""
;
String
end
=
""
;
//请假开始时间、结束时间
//教工
if
(
"0"
.
equals
(
schoolTeacherLeave
.
getApplyType
())){
start
=
HolidayDateUtil
.
format
.
format
(
schoolTeacherLeave
.
getStartTime
())
+
" 第"
+
schoolTeacherLeave
.
getStartSort
()
+
"节课"
;
end
=
HolidayDateUtil
.
format
.
format
(
schoolTeacherLeave
.
getEndTime
())
+
" 第"
+
schoolTeacherLeave
.
getEndSort
()
+
"节课"
;
//发送钉钉通知
// String start = "";
// String end = "";
// //请假开始时间、结束时间
// //教工
// if("0".equals(schoolTeacherLeave.getApplyType())){
// start = HolidayDateUtil.format.format(schoolTeacherLeave.getStartTime()) +" 第" + schoolTeacherLeave.getStartSort() + "节课";
// end = HolidayDateUtil.format.format(schoolTeacherLeave.getEndTime()) +" 第" + schoolTeacherLeave.getEndSort() + "节课";
//
// }else{
// //教工
// start = HolidayDateUtil.format.format(schoolTeacherLeave.getStartTime());
// end = HolidayDateUtil.format.format(schoolTeacherLeave.getEndTime());
// }
//
// //获取钉钉用户id
// String ddUserId = schoolTeacherService.getDdUserIdByUserId(schoolTeacherLeave.getHandUserId1());
// //发送钉钉消息给级部/处室主任
// DingMessageVo messageVo = new DingMessageVo();
// OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
// msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
// msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
// msg.getOa().getHead().setText("智慧校园");
// msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
// msg.getOa().getBody().setAuthor(schoolTeacherLeave.getApplyUser());
// msg.getOa().getBody().setContent("申请内容:" + "从" + start + "至" + end);
// msg.getOa().getBody().setTitle(schoolTeacherLeave.getTeacherName() + "的请假申请需要您审批。");
// OapiMessageCorpconversationAsyncsendV2Request.Form form1 = new OapiMessageCorpconversationAsyncsendV2Request.Form();
// form1.setKey("申请时间:");
// form1.setValue(applyTime);
// msg.getOa().getBody().setForm(Arrays.asList(form1));
// msg.getOa().setPcMessageUrl("https://open.dingtalk.com/");
// msg.getOa().setMessageUrl("https://open.dingtalk.com/");
// msg.setMsgtype("oa");
// OapiMessageCorpconversationAsyncsendV2Request.StatusBar statusBar = new OapiMessageCorpconversationAsyncsendV2Request.StatusBar();
// statusBar.setStatusBg("0xFFF65E5E");
// statusBar.setStatusValue("进行中");
// msg.getOa().setStatusBar(statusBar);
// messageVo.setMsg(msg);
// messageVo.setToAllUser(false);
// messageVo.setUseridList(ddUserId);
// Long ddTaskId = dingMessageUtils.sendMessage(messageVo);
}
else
{
//教工
start
=
HolidayDateUtil
.
format
.
format
(
schoolTeacherLeave
.
getStartTime
());
end
=
HolidayDateUtil
.
format
.
format
(
schoolTeacherLeave
.
getEndTime
());
}
map
.
put
(
"content"
,
"从"
+
start
+
"至"
+
end
);
map
.
put
(
"first"
,
schoolTeacherLeave
.
getTeacherName
()
+
"的请假申请需要您审批。"
);
VxTemlateSendApi
.
sendVxTemlate
(
map
);
//获取openid
// String openId = schoolTeacherService.getOpenIdByUserId(schoolTeacherLeave.getHandUserId1());
// Map<String,Object> map = new HashMap<>();
// map.put("toUserOpenId",openId);
// map.put("applyTime",applyTime);
// map.put("remark","共计" + schoolTeacherLeave.getTotalTime() +"天,请您尽快处理");
// map.put("applyUser",schoolTeacherLeave.getTeacherName());
// String start = "";
// String end = "";
// //请假开始时间、结束时间
// //教工
// if("0".equals(schoolTeacherLeave.getApplyType())){
// start = HolidayDateUtil.format.format(schoolTeacherLeave.getStartTime()) +" 第" + schoolTeacherLeave.getStartSort() + "节课";
// end = HolidayDateUtil.format.format(schoolTeacherLeave.getEndTime()) +" 第" + schoolTeacherLeave.getEndSort() + "节课";
//
// }else{
// //教工
// start = HolidayDateUtil.format.format(schoolTeacherLeave.getStartTime());
// end = HolidayDateUtil.format.format(schoolTeacherLeave.getEndTime());
// }
// map.put("content","从" + start + "至" + end);
// map.put("first",schoolTeacherLeave.getTeacherName() + "的请假申请需要您审批。");
// VxTemlateSendApi.sendVxTemlate(map);
// TeacherLeaveTemplate template = new TeacherLeaveTemplate();
// //String openId = userService.getOpenIdByUserId(schoolTeacherLeave.getHandUserId1());
...
...
smart-campus/src/main/resources/mapper/teacherFiles/TeacherFilesNoticeMapper.xml
View file @
34770ed2
...
...
@@ -49,13 +49,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selctTeacherByUserId"
resultType=
"yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice"
>
SELECT fn.*,tf.state,tf.id as fId from teacher_files tf LEFT JOIN teacher_files_notice fn on fn.id= tf.notice_id WHERE tf.teacher_id = #{userId}
and fn.notice_state = 2
<if
test=
"
noticeRange != null and
noticeRange != ''"
>
and fn.notice_range = #{teacherFiles.noticeRange}
</if>
<if
test=
"
noticeYear != null and
noticeYear != ''"
>
and fn.notice_year = #{teacherFiles.noticeYear}
</if>
<if
test=
"
noticeSemester != null and
noticeSemester != ''"
>
and fn.notice_semester = #{teacherFiles.noticeSemester}
</if>
<if
test=
"
noticeName != null and
noticeName != ''"
>
and fn.notice_name like concat('%', #{teacherFiles.noticeName}, '%')
</if>
<if
test=
"
noticeState != null and
noticeState != ''"
>
and fn.notice_state = #{teacherFiles.noticeState}
</if>
<if
test=
"startTime != null "
>
and start_time = #{teacherFiles.startTime}
</if>
<if
test=
"endTime != null "
>
and end_time = #{teacherFiles.endTime}
</if>
<if
test=
"
teacherFiles.noticeRange != null and teacherFiles.
noticeRange != ''"
>
and fn.notice_range = #{teacherFiles.noticeRange}
</if>
<if
test=
"
teacherFiles.noticeYear != null and teacherFiles.
noticeYear != ''"
>
and fn.notice_year = #{teacherFiles.noticeYear}
</if>
<if
test=
"
teacherFiles.noticeSemester != null and teacherFiles.
noticeSemester != ''"
>
and fn.notice_semester = #{teacherFiles.noticeSemester}
</if>
<if
test=
"
teacherFiles.noticeName != null and teacherFiles.
noticeName != ''"
>
and fn.notice_name like concat('%', #{teacherFiles.noticeName}, '%')
</if>
<if
test=
"
teacherFiles.noticeState != null and teacherFiles.
noticeState != ''"
>
and fn.notice_state = #{teacherFiles.noticeState}
</if>
<if
test=
"
teacherFiles.
startTime != null "
>
and start_time = #{teacherFiles.startTime}
</if>
<if
test=
"
teacherFiles.
endTime != null "
>
and end_time = #{teacherFiles.endTime}
</if>
</select>
<select
id=
"selectTeacherFilesNoticeListByUser"
parameterType=
"TeacherFilesNotice"
resultType=
"TeacherFilesNoticeTotal"
>
...
...
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