From 1520b96cb9627610f978d6080a0c1784e6bd8e0c Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Fri, 15 Apr 2022 10:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=E3=80=81?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=85=A5=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 12 + .../api/carapply/CarApplyController.java | 22 +- .../api/meeting/MeetingController.java | 10 +- .../api/carapply/CarApplyAppController.java | 22 +- .../DepartmentBaseAppController.java | 45 +++ .../app/api/meeting/MeetingAppController.java | 15 +- .../meetingroom/MeetingRoomAppController.java | 85 +----- .../api/userexpand/UserExpandController.java | 90 ++++++ .../systemoa/enums/NoticeTypeEnum.java | 6 +- .../meeting/impl/MeetingServiceImpl.java | 59 +++- .../mapper/carapply/car-apply-mapper.xml | 19 +- .../mybatis/mapper/meeting/meeting-mapper.xml | 17 +- .../resources/static/route/car/select.html | 55 ++-- .../resources/static/route/carapply/show.html | 279 ++++++++++++++++++ .../resources/static/route/driver/select.html | 63 ++-- .../route/meetingroom/meeting-calendar.html | 44 +-- .../static/route/meetingroom/select-room.html | 58 ++-- .../static/route/overseeuser/list.html | 35 ++- .../static/route/overseeuser/show.html | 173 +++++++++++ .../static/route/routineworkuser/show.html | 18 -- .../static/route/workreport/save.html | 1 + .../static/route/workreport/update.html | 22 +- src/main/resources/templates/index/user.html | 63 ++-- 23 files changed, 962 insertions(+), 251 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/systemoa/controller/app/api/departmentbase/DepartmentBaseAppController.java create mode 100644 src/main/java/cn/com/tenlion/systemoa/controller/app/api/userexpand/UserExpandController.java create mode 100644 src/main/resources/static/route/carapply/show.html create mode 100644 src/main/resources/static/route/overseeuser/show.html diff --git a/pom.xml b/pom.xml index 26052ad..dc0f07f 100644 --- a/pom.xml +++ b/pom.xml @@ -58,6 +58,18 @@ 1.0-SNAPSHOT + + ink.wgink + basic-app + 1.0-SNAPSHOT + + + + ink.wgink + module-file + 1.0-SNAPSHOT + + ink.wgink diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/api/carapply/CarApplyController.java b/src/main/java/cn/com/tenlion/systemoa/controller/api/carapply/CarApplyController.java index 94219e6..4795d75 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/api/carapply/CarApplyController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/api/carapply/CarApplyController.java @@ -50,19 +50,29 @@ public class CarApplyController extends DefaultBaseController { @ApiOperation(value = "车辆申请记录", notes = "车辆申请记录接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-bycarid/{carId}") - public List listByCarId(@PathVariable("carId") String carId){ - Map params = new HashMap<>(1); + @GetMapping("list-bycarid/{carId}/{startTime}/{endTime}") + public List listByCarId(@PathVariable("carId") String carId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + ){ + Map params = new HashMap<>(3); params.put("carApplyCarId",carId); + params.put("carApplyStartTime",startTime); + params.put("carApplyEndTime",endTime); return carApplyService.list(params); } @ApiOperation(value = "司机驾驶记录", notes = "司机驾驶记录接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-bydriverId/{driverId}") - public List listByDriverId(@PathVariable("driverId") String driverId){ - Map params = new HashMap<>(1); + @GetMapping("list-bydriverId/{driverId}/{startTime}/{endTime}") + public List listByDriverId(@PathVariable("driverId") String driverId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + ){ + Map params = new HashMap<>(3); params.put("carApplyDriverId",driverId); + params.put("carApplyStartTime",startTime); + params.put("carApplyEndTime",endTime); return carApplyService.list(params); } diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/api/meeting/MeetingController.java b/src/main/java/cn/com/tenlion/systemoa/controller/api/meeting/MeetingController.java index 41129f1..8426627 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/api/meeting/MeetingController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/api/meeting/MeetingController.java @@ -50,10 +50,16 @@ public class MeetingController extends DefaultBaseController { @ApiOperation(value = "会议室会议管理列表", notes = "会议管理列表接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-byroomid/{roomId}") - public List listByRoomId(@PathVariable("roomId") String roomId) { + @GetMapping("list-byroomid/{roomId}/{startTime}/{endTime}") + public List listByRoomId(@PathVariable("roomId") String roomId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + + ) { Map params = requestParams(); params.put("meetingRoomId",roomId); + params.put("meetingStartTime",startTime); + params.put("meetingEndTime",endTime); return meetingService.list(params); } diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/carapply/CarApplyAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/carapply/CarApplyAppController.java index bf7b903..05c5dd3 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/carapply/CarApplyAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/carapply/CarApplyAppController.java @@ -124,19 +124,29 @@ public class CarApplyAppController extends DefaultBaseController { @ApiOperation(value = "车辆申请记录", notes = "车辆申请记录接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-bycarid/{carId}") - public List listByCarId(@PathVariable("carId") String carId){ - Map params = new HashMap<>(1); + @GetMapping("list-bycarid/{carId}/{startTime}/{endTime}") + public List listByCarId(@PathVariable("carId") String carId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + ){ + Map params = new HashMap<>(3); params.put("carApplyCarId",carId); + params.put("carApplyStartTime",startTime); + params.put("carApplyEndTime",endTime); return carApplyService.list(params); } @ApiOperation(value = "司机驾驶记录", notes = "司机驾驶记录接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-bydriverId/{driverId}") - public List listByDriverId(@PathVariable("driverId") String driverId){ - Map params = new HashMap<>(1); + @GetMapping("list-bydriverId/{driverId}/{startTime}/{endTime}") + public List listByDriverId(@PathVariable("driverId") String driverId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + ){ + Map params = new HashMap<>(3); params.put("carApplyDriverId",driverId); + params.put("carApplyStartTime",startTime); + params.put("carApplyEndTime",endTime); return carApplyService.list(params); } diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/departmentbase/DepartmentBaseAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/departmentbase/DepartmentBaseAppController.java new file mode 100644 index 0000000..fbefce7 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/departmentbase/DepartmentBaseAppController.java @@ -0,0 +1,45 @@ +package cn.com.tenlion.systemoa.controller.app.api.departmentbase; + +import cn.com.tenlion.systemoa.pojo.dtos.carapply.CarApplyDTO; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.interfaces.department.IDepartmentBaseService; +import ink.wgink.pojo.dtos.department.DepartmentDTO; +import ink.wgink.pojo.result.ErrorResult; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * + * 部门数据封装 + * @author : LY + * @date :2022-4-13 17:38 + * @description : + * @modyified By: + */ + +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "组织机构数据封装") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/department/base") +public class DepartmentBaseAppController { + + + @Autowired + private IDepartmentBaseService departmentBaseService; + + + + @ApiOperation(value = "组织结构列表", notes = "组织结构列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "path") + }) + @GetMapping("list-byparentid/{parentId}") + public List listByParentId(@RequestHeader("token") String token, @PathVariable("parentId") String parentId){ + return departmentBaseService.listByParentId(parentId); + } + +} diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meeting/MeetingAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meeting/MeetingAppController.java index d186200..e5beccc 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meeting/MeetingAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meeting/MeetingAppController.java @@ -131,10 +131,21 @@ public class MeetingAppController extends DefaultBaseController { @ApiOperation(value = "会议室会议列表", notes = "会议室会议列表接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list-byroomid/{roomId}") - public List listByRoomId(@PathVariable("roomId") String roomId) { + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "roomId", value = "会议室ID", paramType = "path"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "path"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "path") + }) + @GetMapping("list-byroomid/{roomId}/{startTime}/{endTime}") + public List listByRoomId(@PathVariable("roomId") String roomId, + @PathVariable("startTime") String startTime, + @PathVariable("endTime") String endTime + ) { Map params = requestParams(); params.put("meetingRoomId",roomId); + params.put("meetingStartTime",startTime); + params.put("meetingEndTime",endTime); return meetingService.list(params); } diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meetingroom/MeetingRoomAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meetingroom/MeetingRoomAppController.java index 71a2807..b3ac66a 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meetingroom/MeetingRoomAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/meetingroom/MeetingRoomAppController.java @@ -34,88 +34,27 @@ public class MeetingRoomAppController extends DefaultBaseController { @Autowired private IMeetingRoomService meetingRoomService; - @ApiOperation(value = "新增会议室管理", notes = "新增会议室管理接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header") - }) - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PostMapping("save") - @CheckRequestBodyAnnotation - public SuccessResult save(@RequestHeader("token") String token, @RequestBody MeetingRoomVO meetingRoomVO) { - meetingRoomService.save(token, meetingRoomVO); - return new SuccessResult(); - } - @ApiOperation(value = "删除会议室管理(id列表)", notes = "删除会议室管理(id列表)接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), - @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") - }) - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @DeleteMapping("remove/{ids}") - public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) { - meetingRoomService.remove(token, Arrays.asList(ids.split("\\_"))); - return new SuccessResult(); - } - @ApiOperation(value = "修改会议室管理", notes = "修改会议室管理接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), - @ApiImplicitParam(name = "roomId", value = "会议室管理ID", paramType = "path") - }) + @ApiOperation(value = "选择会议室列表", notes = "选择会议室列表接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @PutMapping("updatemeetingroom/{roomId}") - @CheckRequestBodyAnnotation - public SuccessResult updateMeetingRoom(@RequestHeader("token") String token, @PathVariable("roomId") String roomId, @RequestBody MeetingRoomVO meetingRoomVO) { - meetingRoomService.update(token, roomId, meetingRoomVO); - return new SuccessResult(); - } + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "roomType", value = "类型ID", paramType = "path") - @ApiOperation(value = "会议室管理详情(通过ID)", notes = "会议室管理详情(通过ID)接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), - @ApiImplicitParam(name = "roomId", value = "会议室管理ID", paramType = "path") }) - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("get/{roomId}") - public MeetingRoomDTO get(@RequestHeader("token") String token, @PathVariable("roomId") String roomId) { - return meetingRoomService.get(roomId); - } - - @ApiOperation(value = "会议室管理列表", notes = "会议室管理列表接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header") - }) - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("list") - public List list(@RequestHeader("token") String token) { + @GetMapping("list-select/{roomType}") + public List listSelect(@PathVariable("roomType") String roomType) { Map params = requestParams(); + params.put("roomType",roomType); + params.put("roomOpenStatus","Y"); return meetingRoomService.list(params); } - @ApiOperation(value = "会议室管理分页列表", notes = "会议室管理分页列表接口") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), - @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), - @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), - @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") - }) - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("listpage") - public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { - Map params = requestParams(); - page.setParams(params); - return meetingRoomService.listPage(page); - } - @ApiOperation(value = "会议室管理统计", notes = "会议室管理统计接口") - @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("count") - SuccessResultData count() { - Map params = requestParams(); - return new SuccessResultData<>(meetingRoomService.count(params)); - } + + + + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userexpand/UserExpandController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userexpand/UserExpandController.java new file mode 100644 index 0000000..273904c --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userexpand/UserExpandController.java @@ -0,0 +1,90 @@ +package cn.com.tenlion.systemoa.controller.app.api.userexpand; + +import cn.com.tenlion.systemoa.pojo.dtos.userexpand.UserExpand; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.common.component.SecurityComponent; +import ink.wgink.exceptions.TokenException; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.interfaces.department.IDepartmentUserBaseService; +import ink.wgink.interfaces.user.IUserBaseService; +import ink.wgink.interfaces.user.IUserExpandBaseService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.app.AppTokenUser; +import ink.wgink.pojo.bos.UserInfoBO; +import ink.wgink.pojo.dtos.department.DepartmentDTO; +import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO; +import ink.wgink.pojo.dtos.user.UserDTO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.service.user.service.IUserService; +import ink.wgink.util.ReflectUtil; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户拓展信息 + * @author : LY + * @date :2022-4-13 16:50 + * @description : + * @modyified By: + */ + +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "用户拓展信息") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/user/expand") +public class UserExpandController extends DefaultBaseController { + + @Autowired + private IUserBaseService userBaseService; + @Autowired + private SecurityComponent securityComponent; +@Autowired + private IDepartmentUserBaseService departmentUserBaseService; + + + @ApiOperation(value = "用户详情", notes = "用户详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-user-info") + public UserInfoBO getUserInfo(@RequestHeader("token") String token) { + UserInfoBO userInfoBO = new UserInfoBO(); + String userId = null; + try { + userId = securityComponent.getAppToken(token).getUserId(); + } catch (ReflectUtil.ReflectException e) { + throw new TokenException("登录失效,请重新登录"); + } + UserDTO userDTO = userBaseService.get(userId); + //基础信息 + userInfoBO.setUserId(userDTO.getUserId()); + userInfoBO.setUserName(userDTO.getUserName()); + userInfoBO.setUserUsername(userDTO.getUserUsername()); + userInfoBO.setUserPhone(userDTO.getUserPhone()); + userInfoBO.setUserEmail(userDTO.getUserEmail()); + userInfoBO.setUserAvatar(userDTO.getUserAvatar()); + //获取用户部门信息 + List departmentDTOS = departmentUserBaseService.listDepartmentByUserId(userId); + List departmentSimpleDTOs = new ArrayList<>(); + departmentDTOS.forEach(departmentPO -> { + DepartmentSimpleDTO departmentSimpleDTO = new DepartmentSimpleDTO(); + departmentSimpleDTO.setDepartmentId(departmentPO.getDepartmentId()); + departmentSimpleDTO.setDepartmentParentId(departmentPO.getDepartmentParentId()); + departmentSimpleDTO.setDepartmentName(departmentPO.getDepartmentName()); + departmentSimpleDTO.setDepartmentCode(departmentPO.getDepartmentCode()); + departmentSimpleDTOs.add(departmentSimpleDTO); + }); + userInfoBO.setDepartments(departmentSimpleDTOs); + return userInfoBO; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systemoa/enums/NoticeTypeEnum.java b/src/main/java/cn/com/tenlion/systemoa/enums/NoticeTypeEnum.java index 2bd8a82..32f5761 100644 --- a/src/main/java/cn/com/tenlion/systemoa/enums/NoticeTypeEnum.java +++ b/src/main/java/cn/com/tenlion/systemoa/enums/NoticeTypeEnum.java @@ -6,9 +6,9 @@ package cn.com.tenlion.systemoa.enums; */ public enum NoticeTypeEnum { - SMS("sms","短信"), - MAIL("mail","邮件"), - MESSAGE("message","站内通知"); + SMS("1","短信"), + MAIL("2","邮件"), + MESSAGE("3","站内通知"); diff --git a/src/main/java/cn/com/tenlion/systemoa/service/meeting/impl/MeetingServiceImpl.java b/src/main/java/cn/com/tenlion/systemoa/service/meeting/impl/MeetingServiceImpl.java index 9efaabb..5e2691d 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/meeting/impl/MeetingServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/meeting/impl/MeetingServiceImpl.java @@ -1,6 +1,9 @@ package cn.com.tenlion.systemoa.service.meeting.impl; +import cn.com.tenlion.schedule.pojo.vos.schedule.ScheduleVO; +import cn.com.tenlion.schedule.service.schedule.IScheduleSaveService; import cn.com.tenlion.schedule.service.schedule.IScheduleService; +import cn.com.tenlion.systemoa.enums.NoticeTypeEnum; import cn.com.tenlion.systemoa.enums.meetinguser.UserTypeEnum; import cn.com.tenlion.systemoa.pojo.dtos.meeting.MeetingQRCodeDTO; import cn.com.tenlion.systemoa.pojo.dtos.meetinguser.MeetingUserDTO; @@ -52,10 +55,14 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe @Autowired private ISmsService smsService; @Autowired - private IScheduleService scheduleService; + private IScheduleSaveService scheduleSaveService; - - private final static String SIGN_URL = "app/meetinguser/update-sign"; + //APP签到接口 + private final static String APP_SIGN_URL = "app/meetinguser/update-sign"; + //会议详情页路径 + private final static String MEETING_SHOW_URL = "route/meeting/show.html?meetingId="; + //会议日程类型ID + private final static String SCHEDULE_TYPE_ID = "d49aeaee-1448-4dbc-b8d9-f3e6fff90cb1"; @@ -78,7 +85,7 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe } try { - fileId = QRCodeUtil.deStyle1(userId, SIGN_URL); + fileId = QRCodeUtil.deStyle1(userId, APP_SIGN_URL); } catch (Exception e) { e.printStackTrace(); } @@ -119,6 +126,8 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe meetingDao.save(params); //保存人员 this.saveMeetingUser(token,meetingId,meetingVO); + //检查配置 + this.checkConfig(meetingId,meetingVO); return meetingId; } @@ -300,7 +309,47 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe - private void checkConfig(){ + private void checkConfig(String meetingId,MeetingVO meetingVO){ + //主持人ID + String hostUserId = meetingVO.getMeetingHostUserId(); + //参会人员ID + String userIds = meetingVO.getMeetingUserIds(); + //加入日程 + ScheduleVO scheduleVO = new ScheduleVO(); + scheduleVO.setScheduleType(SCHEDULE_TYPE_ID); + scheduleVO.setScheduleTitle(meetingVO.getMeetingTitle()); + scheduleVO.setScheduleStart(meetingVO.getMeetingStartTime()); + scheduleVO.setScheduleEnd(meetingVO.getMeetingEndTime()); + scheduleVO.setScheduleMessageType("1,2");//站内+短信 + scheduleVO.setScheduleMessageConfig(10);//提前十分钟提醒 + scheduleVO.setScheduleOpen("0");//不公开 + scheduleVO.setScheduleLevel("1");//一般 + //封装日程人员 + List userList = new ArrayList(); + userList.add(hostUserId); + for (String userId : userIds.split("_")) { + if(!userId.equals(hostUserId)){ + userList.add(userId); + } + } + scheduleSaveService.save(userList,meetingId,MEETING_SHOW_URL + meetingId,scheduleVO); + + //会议通知 + String noticeType = meetingVO.getMeetingNoticeType(); + for (String s : noticeType.split(",")) { + if(NoticeTypeEnum.MESSAGE.getValue().equals(s)){ + //站内通知 + } + if(NoticeTypeEnum.MAIL.getValue().equals(s)){ + //邮件 + } + if(NoticeTypeEnum.SMS.getValue().equals(s)){ + //短信 + } + } + + + } diff --git a/src/main/resources/mybatis/mapper/carapply/car-apply-mapper.xml b/src/main/resources/mybatis/mapper/carapply/car-apply-mapper.xml index 3e234c0..01498cd 100644 --- a/src/main/resources/mybatis/mapper/carapply/car-apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/carapply/car-apply-mapper.xml @@ -391,13 +391,20 @@ AND LEFT(t1.gmt_create, 10) #{endTime} - - AND - t1.car_apply_id IN - - #{carApplyIds[${index}]} - + + + AND + ( + DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d') + OR + DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d') + OR + DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d') + OR + DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d') + ) + AND t1.car_apply_car_id = #{carApplyCarId} diff --git a/src/main/resources/mybatis/mapper/meeting/meeting-mapper.xml b/src/main/resources/mybatis/mapper/meeting/meeting-mapper.xml index 76bbd2a..e634774 100644 --- a/src/main/resources/mybatis/mapper/meeting/meeting-mapper.xml +++ b/src/main/resources/mybatis/mapper/meeting/meeting-mapper.xml @@ -304,12 +304,17 @@ AND t1.meeting_room_id = #{meetingRoomId} - - AND - t1.meeting_id IN - - #{meetingIds[${index}]} - + + AND + ( + DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d') + OR + DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d') + OR + DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d') + OR + DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d') + ) AND t1.creator = #{creator} diff --git a/src/main/resources/static/route/car/select.html b/src/main/resources/static/route/car/select.html index 07fb2cb..ac1db97 100644 --- a/src/main/resources/static/route/car/select.html +++ b/src/main/resources/static/route/car/select.html @@ -86,9 +86,36 @@ aspectRatio: 3, height: $win.height() - 200, width: $win.width(), + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay' + }, dateClick: function(info) { info.jsEvent.preventDefault(); }, + events:function (info,callback) { + var startTime = info.startStr.split("T"); + var endTime = info.endStr.split("T"); + var carId = $('#carId option:selected').val(); + if(carId == ''){ + return; + } + top.restAjax.get(top.restAjax.path('api/carapply/list-bycarid/{carId}/{startTime}/{endTime}', [carId,startTime,endTime]), {}, null, function(code, data, args) { + var events = []; + for(var i = 0, item; item = data[i++];) { + events.push({ + id: item.carApplyId, + start: item.carApplyStartTime, + end: item.carApplyEndTime, + title: item.carApplyStartPlace + '-' + item.carApplyEndPlace + }); + } + callback(events); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }, eventClick: function(info) { var info = info.event; top.dialog.open({ @@ -117,28 +144,6 @@ selectObj['carId'] = selectValue; form.val('dataForm', selectObj); } - initCarApplyList(selectValue) - }, function(code, data) { - top.dialog.msg(data.msg); - }); - } - - - //初始化车辆申请 - function initCarApplyList(carId) { - calendar.removeAllEvents(); - if(carId == ''){ - return; - } - top.restAjax.get(top.restAjax.path('api/carapply/list-bycarid/{carId}', [carId]), {}, null, function(code, data, args) { - for(var i = 0, item; item = data[i++];) { - calendar.addEvent({ - id: item.carApplyId, - start: item.carApplyStartTime, - end: item.carApplyEndTime, - title: item.carApplyStartPlace + '-' + item.carApplyEndPlace - }); - } }, function(code, data) { top.dialog.msg(data.msg); }); @@ -186,7 +191,7 @@ return } top.dialog.open({ - url: top.restAjax.path('route/meetingroom/show.html?roomId={roomId}', [roomId]), + url: top.restAjax.path('rote/meetingroom/show.html?roomId={roomId}', [roomId]), title: '车辆详情', width: '700px', height: '500px', @@ -198,8 +203,8 @@ - form.on('select(carId)',function (data) { - initCarApplyList(data.value) + form.on('select(carId)',function () { + calendar.refetchEvents(); }); // 校验 diff --git a/src/main/resources/static/route/carapply/show.html b/src/main/resources/static/route/carapply/show.html new file mode 100644 index 0000000..c3186d8 --- /dev/null +++ b/src/main/resources/static/route/carapply/show.html @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/driver/select.html b/src/main/resources/static/route/driver/select.html index a1269e5..ac78f42 100644 --- a/src/main/resources/static/route/driver/select.html +++ b/src/main/resources/static/route/driver/select.html @@ -86,9 +86,36 @@ aspectRatio: 3, height: $win.height() - 200, width: $win.width(), + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay' + }, dateClick: function(info) { info.jsEvent.preventDefault(); }, + events:function (info,callback) { + var startTime = info.startStr.split("T"); + var endTime = info.endStr.split("T"); + var driverId = $('#driverId option:selected').val(); + if(driverId == ''){ + return; + } + top.restAjax.get(top.restAjax.path('api/carapply/list-bydriverId/{driverId}/{startTime}/{endTime}', [driverId,startTime,endTime]), {}, null, function(code, data, args) { + var events = []; + for(var i = 0, item; item = data[i++];) { + events.push({ + id: item.carApplyId, + start: item.carApplyStartTime, + end: item.carApplyEndTime, + title: item.carApplyStartPlace + '-' + item.carApplyEndPlace + }); + } + callback(events); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }, eventClick: function(info) { var info = info.event; top.dialog.open({ @@ -117,38 +144,11 @@ selectObj['driverId'] = selectValue; form.val('dataForm', selectObj); } - initCarApplyDriverList(selectValue) }, function(code, data) { top.dialog.msg(data.msg); }); } - - //初始化驾驶员驾驶记录 - function initCarApplyDriverList(driverId) { - calendar.removeAllEvents(); - if(carId == ''){ - return; - } - top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [driverId]), {}, null, function(code, data, args) { - for(var i = 0, item; item = data[i++];) { - calendar.addEvent({ - id: item.meetingId, - start: item.meetingStartTime, - end: item.meetingEndTime, - title: item.meetingTitle - }); - } - }, function(code, data) { - top.dialog.msg(data.msg); - }); - } - - - - - - // 初始化内容 function initData() { initDriverSelect(selectDriverId); @@ -178,6 +178,15 @@ closeBox(); }); + + + + //驾驶员改变事件 + form.on('select(driverId)', function(data){ + calendar.refetchEvents(); + }); + + //车辆详情 $(document).on('click','#driverShow',function () { var roomId = $('#roomId').val(); diff --git a/src/main/resources/static/route/meetingroom/meeting-calendar.html b/src/main/resources/static/route/meetingroom/meeting-calendar.html index 938f481..c9143a9 100644 --- a/src/main/resources/static/route/meetingroom/meeting-calendar.html +++ b/src/main/resources/static/route/meetingroom/meeting-calendar.html @@ -60,9 +60,32 @@ aspectRatio: 3, height: $win.height() - 100, width: $win.width(), + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay' + }, dateClick: function(info) { info.jsEvent.preventDefault(); }, + events:function (info,callback) { + var startTime = info.startStr.split("T"); + var endTime = info.endStr.split("T"); + top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}/{startTime}/{endTime}', [roomId,startTime,endTime]), {}, null, function(code, data, args) { + var events = []; + for(var i = 0, item; item = data[i++];) { + events.push({ + id: item.meetingId, + start: item.meetingStartTime, + end: item.meetingEndTime, + title: item.meetingTitle + }); + } + callback(events); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }, eventClick: function(info) { var info = info.event; top.dialog.open({ @@ -81,25 +104,7 @@ } - //初始化会议室会议 - function initRoomMeetingList(roomId) { - calendar.removeAllEvents(); - if(roomId == ''){ - return; - } - top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [roomId]), {}, null, function(code, data, args) { - for(var i = 0, item; item = data[i++];) { - calendar.addEvent({ - id: item.meetingId, - start: item.meetingStartTime, - end: item.meetingEndTime, - title: item.meetingTitle - }); - } - }, function(code, data) { - top.dialog.msg(data.msg); - }); - } + @@ -107,7 +112,6 @@ // 初始化内容 function initData() { initFullCalendar(); - initRoomMeetingList(roomId) } initData(); diff --git a/src/main/resources/static/route/meetingroom/select-room.html b/src/main/resources/static/route/meetingroom/select-room.html index 34a44a8..33eb303 100644 --- a/src/main/resources/static/route/meetingroom/select-room.html +++ b/src/main/resources/static/route/meetingroom/select-room.html @@ -131,9 +131,37 @@ aspectRatio: 3, height: $win.height() - 200, width: $win.width(), + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay' + }, dateClick: function(info) { info.jsEvent.preventDefault(); }, + events:function (info,callback) { + var startTime = info.startStr.split("T"); + var endTime = info.endStr.split("T"); + var roomId = $('#roomId option:selected').val(); + if(roomId == ''){ + return; + } + top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}/{startTime}/{endTime}', [roomId,startTime,endTime]), {}, null, function(code, data, args) { + var events = []; + for(var i = 0, item; item = data[i++];) { + events.push({ + id: item.meetingId, + start: item.meetingStartTime, + end: item.meetingEndTime, + title: item.meetingTitle + }); + } + callback(events); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }, + eventClick: function(info) { var info = info.event; top.dialog.open({ @@ -163,7 +191,6 @@ selectObj['roomType'] = selectValue; form.val('dataForm', selectObj); } - initRoomIdSelect(selectValue,selectRoomId) }, function(code, data) { top.dialog.msg(data.msg); }); @@ -183,42 +210,17 @@ var selectObj = {}; selectObj['roomId'] = selectValue; form.val('dataForm', selectObj); - initRoomMeetingList(selectValue); } }, function(code, data) { top.dialog.msg(data.msg); }); } - //初始化会议室会议 - function initRoomMeetingList(roomId) { - calendar.removeAllEvents(); - if(roomId == ''){ - return; - } - top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [roomId]), {}, null, function(code, data, args) { - for(var i = 0, item; item = data[i++];) { - calendar.addEvent({ - id: item.meetingId, - start: item.meetingStartTime, - end: item.meetingEndTime, - title: item.meetingTitle - }); - } - }, function(code, data) { - top.dialog.msg(data.msg); - }); - } - - - - - // 初始化内容 function initData() { initRoomTypeSelect(selectRoomType); - //initRoomIdSelect(selectRoomType,selectRoomId); + initRoomIdSelect(selectRoomType,selectRoomId); initFullCalendar(); } initData(); @@ -261,7 +263,7 @@ //日历联动 form.on('select(roomId)',function (data) { - initRoomMeetingList(data.value) + calendar.refetchEvents(); }); diff --git a/src/main/resources/static/route/overseeuser/list.html b/src/main/resources/static/route/overseeuser/list.html index d865751..73ae8bb 100644 --- a/src/main/resources/static/route/overseeuser/list.html +++ b/src/main/resources/static/route/overseeuser/list.html @@ -102,15 +102,24 @@ if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { return '-'; } + if('to' == rowData){ + return '已办结'; + } + if('nto' == rowData){ + return '未办结'; + } return rowData; } }, {field: 'cz', width: 180, title: '操作', align:'center', templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; + var rowData = ''; + var status = row['status']; + rowData += '
'; + if(status == 'to') { + rowData += ''; } + rowData += '
'; return rowData; } }, @@ -241,6 +250,26 @@ } } }); + + //事件 + table.on('tool(dataTable)', function (obj) { + var layEvent = obj.event; + var data = obj.data; + if(layEvent === 'showUser') { + layer.open({ + type: 2, + title: false, + closeBtn: 0, + area: ['90%', '90%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/overseeuser/show.html?overseeUserId={overseeUserId}', [data.overseeUserId]), + end: function() { + reloadTable(); + } + }); + } + }); }); diff --git a/src/main/resources/static/route/overseeuser/show.html b/src/main/resources/static/route/overseeuser/show.html new file mode 100644 index 0000000..9a26a9a --- /dev/null +++ b/src/main/resources/static/route/overseeuser/show.html @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/routineworkuser/show.html b/src/main/resources/static/route/routineworkuser/show.html index 9e8d1e1..6c603d7 100644 --- a/src/main/resources/static/route/routineworkuser/show.html +++ b/src/main/resources/static/route/routineworkuser/show.html @@ -454,24 +454,6 @@ }); - $(document).on('click', '.showFile',function() { - var fileName = $(this).attr('title') - var fileId = $(this).attr('data-id') - var url = "http://192.168.0.120:8080/systemoa/route/file/download/false/" + fileId; - var previewUrl = url + '?fullfilename=' + fileName - layer.open({ - type: 2, - title: '文件预览', - closeBtn: 1, - area: ['80%', '80%'], - shadeClose: true, - anim: 2, - content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), - end: function() { - reloadTable(); - } - }); - }); diff --git a/src/main/resources/static/route/workreport/save.html b/src/main/resources/static/route/workreport/save.html index 736a61b..79ee51b 100644 --- a/src/main/resources/static/route/workreport/save.html +++ b/src/main/resources/static/route/workreport/save.html @@ -118,6 +118,7 @@ +