Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
This commit is contained in:
commit
9a9d791ae5
|
@ -21,6 +21,7 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
@ -35,6 +36,13 @@ import java.util.Map;
|
||||||
@RequestMapping("bookMeeting")
|
@RequestMapping("bookMeeting")
|
||||||
public class BookMeetingRoomController {
|
public class BookMeetingRoomController {
|
||||||
|
|
||||||
|
@Value("${big_date.name}")
|
||||||
|
private String bigDateDeptName; // 大数据局名称
|
||||||
|
@Value("${big_date.default_assignee_role_id}")
|
||||||
|
private String defaultAssigneeRoleId; // 当某部门未设置部门审批人时,将使用该用户审批
|
||||||
|
@Value("${big_date.assignee_role_name}")
|
||||||
|
private String roleName; // 具备审批的角色名称
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TMeetingroomBookService tMeetingroomBookService;
|
private TMeetingroomBookService tMeetingroomBookService;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -91,6 +99,39 @@ public class BookMeetingRoomController {
|
||||||
}
|
}
|
||||||
dto.setState(1);
|
dto.setState(1);
|
||||||
tMeetingroomBookService.save(dto);
|
tMeetingroomBookService.save(dto);
|
||||||
|
// 发起预约后推送消息
|
||||||
|
String content = "【通知】请审核" + dto.getName() + "发起的" + dto.getRoomName() +
|
||||||
|
"会议室申请";
|
||||||
|
SysNoticeDTO sysNoticeDTO = new SysNoticeDTO();
|
||||||
|
sysNoticeDTO.setType(2);
|
||||||
|
sysNoticeDTO.setTitle("会议室申请审核通知");
|
||||||
|
sysNoticeDTO.setContent(content); // 通知内容
|
||||||
|
sysNoticeDTO.setReceiverType(1);
|
||||||
|
sysNoticeDTO.setReceiverTypeIds(defaultAssigneeRoleId);
|
||||||
|
sysNoticeDTO.setStatus(NoticeStatusEnum.SEND.value());
|
||||||
|
sysNoticeDTO.setSenderName("流程系统");
|
||||||
|
sysNoticeDTO.setSenderDate(new Date());
|
||||||
|
sysNoticeDTO.setCreator(dto.getCreator());
|
||||||
|
sysNoticeDTO.setCreateDate(new Date());
|
||||||
|
sysNoticeDTO.setFrom("通知");
|
||||||
|
sysNoticeService.save(sysNoticeDTO);
|
||||||
|
// 还要发送自己能看到的的谁给我审核的消息
|
||||||
|
String ownedContent = "【通知】您发起的" + dto.getRoomName() +
|
||||||
|
"会议室申请,当前审核部门为:" + bigDateDeptName + ",审核负责人:" + roleName;
|
||||||
|
SysNoticeDTO ownedSysNoticeDTO = new SysNoticeDTO();
|
||||||
|
ownedSysNoticeDTO.setType(2);
|
||||||
|
ownedSysNoticeDTO.setTitle("会议室申请发起通知");
|
||||||
|
ownedSysNoticeDTO.setContent(ownedContent); // 通知内容
|
||||||
|
ownedSysNoticeDTO.setReceiverType(1);
|
||||||
|
ownedSysNoticeDTO.setReceiverTypeIds(dto.getCreator().toString());
|
||||||
|
ownedSysNoticeDTO.setStatus(NoticeStatusEnum.SEND.value());
|
||||||
|
ownedSysNoticeDTO.setSenderName("流程系统");
|
||||||
|
ownedSysNoticeDTO.setSenderDate(new Date());
|
||||||
|
ownedSysNoticeDTO.setCreator(dto.getCreator());
|
||||||
|
ownedSysNoticeDTO.setCreateDate(new Date());
|
||||||
|
ownedSysNoticeDTO.setFrom("通知");
|
||||||
|
sysNoticeService.save(ownedSysNoticeDTO);
|
||||||
|
|
||||||
return new Result();
|
return new Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue