已添加3个文件
已删除8个文件
已修改83个文件
已重命名2个文件
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.QrCodeUtils; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | | import com.doumee.dao.web.request.MeetingPageRequest; |
| | |
| | | @ApiOperation(value = "彿ä¼è®®è¡¨", notes = "彿ä¼è®®è¡¨") |
| | | @GetMapping("/monthMeeting") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "yearMonth", value = "å¹´æ yyyy-MM", required = true) |
| | | }) |
| | | public ApiResponse<List<MonthDataResponse>> monthDay(@RequestParam String yearMonth) { |
| | |
| | | |
| | | @ApiOperation("æçä¼è®®å表") |
| | | @PostMapping("/myMeetingPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<IPage<MeetingListResponse>> myMeetingPage(@RequestBody PageWrap<MeetingPageRequest> pageWrap) { |
| | | LoginUserInfo user = getLoginUser(null); |
| | | pageWrap.getModel().setUserId(user.getId()); |
| | |
| | | @ApiOperation("ä¼è®®è¯¦æ
") |
| | | @GetMapping("/meetingDetail") |
| | | @ApiImplicitParams({ |
| | | // @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse<MeetingDetailResponse> meetingDetail(@RequestParam Integer id) { |
| | |
| | | @ApiOperation("è·åä¼è®®å¼é¨äºç»´ç ") |
| | | @GetMapping("/getQrCode") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse<String> getQrCode(@RequestParam Integer id) { |
| | |
| | | @ApiOperation("è·åä¼è®®å¼é¨äºç»´ç -å¾çæµ") |
| | | @GetMapping("/getQrCodeImg") |
| | | @ApiImplicitParams({ |
| | | // @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public void getQrCodeImg(@RequestParam Integer id,@RequestParam String token, HttpServletResponse response) throws Exception { |
| | | LoginUserInfo user = getLoginUser(null); |
| | |
| | | |
| | | @ApiOperation("ä¼è®®é¢çº¦") |
| | | @PostMapping("/reservationMeeting") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<Integer> reservationMeeting(@RequestBody BookingsRequest bookingsRequest) { |
| | | LoginUserInfo user = getLoginUser(null); |
| | | bookingsRequest.setCreator(user.getId()); |
| | |
| | | } |
| | | |
| | | @ApiOperation("åæ¶ä¼è®®é¢çº¦") |
| | | @GetMapping("/reservationCancel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse reservationCancel(@RequestParam Integer id) { |
| | | @PostMapping("/reservationCancel") |
| | | public ApiResponse reservationCancel(@RequestBody BusinessOverDTO businessOverDTO) { |
| | | LoginUserInfo user = getLoginUser(null); |
| | | bookingsService.reservationCancel(id,user.getId()); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationCancel(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æåç»æä¼è®®") |
| | | @PostMapping("/reservationOver") |
| | | public ApiResponse reservationOver(@RequestBody BusinessOverDTO businessOverDTO) { |
| | | LoginUserInfo user = getLoginUser(null); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationOver(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | bookquery.eq(Bookings::getIsdeleted, Constants.ZERO); |
| | | bookquery.eq(Bookings::getStatus, Constants.ZERO); |
| | | bookquery.apply("DATE_FORMAT(t.START_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') " ); |
| | | Integer todayBookingsNum= bookingsJoinMapper.selectCount(bookquery); |
| | | Long todayBookingsNum= bookingsJoinMapper.selectCount(bookquery); |
| | | json.put("todayBookingsNum",todayBookingsNum); |
| | | |
| | | //仿¥ä¼è®®æ¶é¿ï¼å°æ¶ï¼ |
| | |
| | | MPJLambdaWrapper<Rooms> rm1 = new MPJLambdaWrapper<>(); |
| | | rm1.eq(Rooms::getIsdeleted, Constants.ZERO); |
| | | rm1.eq(Rooms::getStatus, Constants.ZERO); |
| | | Integer roomNum= roomsJoinMapper.selectCount(rm1); |
| | | Long roomNum= roomsJoinMapper.selectCount(rm1); |
| | | json.put("roomNum",roomNum); |
| | | |
| | | //åå·¥æ°é |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.QrCodeUtils; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | | import com.doumee.dao.web.request.MeetingPageRequest; |
| | |
| | | return ApiResponse.success("æä½æå",bookingsService.reservationMeeting(bookingsRequest)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("åæ¶ä¼è®®é¢çº¦") |
| | | @GetMapping("/reservationCancel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse reservationCancel(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | // LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | @PostMapping("/reservationCancel") |
| | | public ApiResponse reservationCancel(@RequestBody BusinessOverDTO businessOverDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | bookingsService.reservationCancel(id,user.getId()); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationCancel(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @ApiOperation("æåç»æä¼è®®") |
| | | @PostMapping("/reservationOver") |
| | | public ApiResponse reservationOver(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationOver(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | |
| | | } |
| | | |
| | | @ApiOperation("åæ¶ä¼è®®é¢çº¦") |
| | | @GetMapping("/reservationCancel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "ä¼è®®ä¸»é®", required = true), |
| | | }) |
| | | public ApiResponse reservationCancel(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | @PostMapping("/reservationCancel") |
| | | public ApiResponse reservationCancel(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | bookingsService.reservationCancel(id,user.getId()); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationCancel(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æåç»æä¼è®®") |
| | | @PostMapping("/reservationOver") |
| | | public ApiResponse reservationOver(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | businessOverDTO.setUserId(user.getId()); |
| | | bookingsService.reservationOver(businessOverDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | config: |
| | | server-addr: http://175.27.187.84:8848 #é
ç½®Nacoså°å |
| | | namespace: dmvisit |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | | password: nacos |
| | | # file-extension: yaml |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://175.27.187.84:8848 #é
ç½®Nacoså°å |
| | | # namespace: dev_renkang |
| | | namespace: dmvisit |
| | | username: nacos |
| | | password: nacos |
| | |
| | | spring: |
| | | profiles: |
| | | active: test |
| | | active: dev |
| | | application: |
| | | name: meetingAdmin |
| | | # å®å
¨é
ç½® |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.admin.request; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.dao.admin.response.DevWgResponseParam; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | @Data |
| | | @ApiModel("ä¼è®®ç»æè¯·æ±ç±»") |
| | | public class BusinessOverDTO { |
| | | @ApiModelProperty(value = "ä¸å¡ä¸»é®") |
| | | private Integer id ; |
| | | @ApiModelProperty(value = "ä¸å¡æä½å¤æ³¨") |
| | | private String businessRemark; |
| | | @ApiModelProperty(value = "ç¨æ·ä¸»é®",required = true) |
| | | private Integer userId ; |
| | | |
| | | } |
| | |
| | | |
| | | @Select(" select a.id , a.START_TIME , a.END_TIME , b.`NAME` as roomName , a.`NAME` as meetingName ,date_format(a.START_TIME,'%Y-%m-%d') as meetingDate , a.START_TIME as startTime, a.status ," + |
| | | " CONCAT(date_format(a.START_TIME,'%H:%i') , ' ~ ',date_format(a.END_TIME,'%H:%i')) as meetingTime, c.REALNAME as bookingUser ," + |
| | | " CASE WHEN a.START_TIME > now() and a.`STATUS` = 0 THEN 1 WHEN a.END_TIME < now() or a.`STATUS` = 1 THEN 3 ELSE 2 END meetingStatus , b.IMGURL as imgUrl ," + |
| | | " CASE WHEN a.START_TIME > now() AND a.`STATUS` = 0 THEN 1 WHEN a.END_TIME < now() AND a.`STATUS` = 0 THEN 3 WHEN a.`STATUS` = 1 THEN 5 ELSE 2 END meetingStatus ," + |
| | | " b.IMGURL as imgUrl ," + |
| | | " a.remark " + |
| | | " from meeting_book a inner join meeting_rooms b on a.ROOM_ID = b.ID " + |
| | | " inner join system_user c on a.CREATOR = c.id " + |
| | |
| | | |
| | | @Select(" select a.id , a.START_TIME , a.END_TIME , b.id as roomId, b.`NAME` as roomName , a.`NAME` as meetingName ,date_format(a.START_TIME,'%Yå¹´%mæ%dæ¥') as meetingDate ," + |
| | | " CONCAT(date_format(a.START_TIME,'%H:%i') , ' ~ ',date_format(a.END_TIME,'%H:%i')) as meetingTime, c.REALNAME as bookingUserName ," + |
| | | " CASE WHEN a.START_TIME > now() and a.`STATUS` = 0 THEN 1 WHEN a.END_TIME < now() or a.`STATUS` = 1 THEN 3 ELSE 2 END meetingStatus ," + |
| | | " CASE WHEN a.START_TIME > now() AND a.`STATUS` = 0 THEN 1 WHEN a.END_TIME < now() AND a.`STATUS` = 0 THEN 3 WHEN a.`STATUS` = 1 THEN 5 ELSE 2 END meetingStatus ," + |
| | | " a.CONTENT as meetingContent, c.MOBILE as bookingUserMobile , e.`NAME` as bookingUserDepartment , a.CREATOR as bookingUserId , a.remark " + |
| | | " from meeting_book a inner join meeting_rooms b on a.ROOM_ID = b.ID " + |
| | | " left join system_user c on a.CREATOR = c.id " + |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ExcelColumn(name="æ¶é´æ®µç¼ç ï¼å
³èroom_time表ï¼") |
| | | private Integer timeId; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¶é´ HH:mm",hidden = true) |
| | | @TableField(exist = false) |
| | | private String endTime; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ä¼è®®å
容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | @ApiModelProperty(value = "ç¶æ 0å·²é¢çº¦ 1å·²æ¤é 2å·²ç»æ ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "åæ¶äºº") |
| | |
| | | @ApiModelProperty(value = "åééç¥ï¼0=æªåé 1=å·²åé") |
| | | private Integer sendNotice; |
| | | |
| | | @ApiModelProperty(value = "忶夿³¨") |
| | | private String cancelInfo; |
| | | |
| | | @ApiModelProperty(value = "æåç»æäºº") |
| | | private Integer doneUserId; |
| | | |
| | | @ApiModelProperty(value = "æåç»ææ¶é´") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "忶夿³¨") |
| | | private String doneInfo; |
| | | |
| | | @ApiModelProperty(value = "é¢çº¦äºº") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "weekday") |
| | | @TableField(exist = false) |
| | | private String weekday; |
| | | |
| | | @ApiModelProperty(value = "ä¼è®®ç¶æ: 1=æªå¼å§ï¼2=è¿è¡ä¸ï¼3=å·²ç»æ ; 4=å³å°å¼å§; 5=å·²æ¤é") |
| | | @TableField(exist = false) |
| | | private Integer meetingStatus; |
| | | } |
| | |
| | | @ExcelColumn(name="弿¾å¼å§æ¶é´") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "å¼åç»ææ¶é´") |
| | | @ExcelColumn(name="å¼åç»ææ¶é´") |
| | | @ApiModelProperty(value = "弿¾ç»ææ¶é´") |
| | | @ExcelColumn(name="弿¾ç»ææ¶é´") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯é 1ä¸å¯é ", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "ä¼è®®å®¤ä¸»é®") |
| | | private Integer roomsId; |
| | | |
| | | @ApiModelProperty(value = "ä¼è®®ç¶æ: 1=æªå¼å§ï¼2=è¿è¡ä¸ï¼3=å·²ç»æ ; 4=å³å°å¼å§; 5=å·²æ¤é") |
| | | private Integer meetingStatus; |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.admin.response.DevWgResponseParam; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.business.vo.RoomStatisticsVo; |
| | |
| | | * @param id |
| | | * @param userId |
| | | */ |
| | | void reservationCancel(Integer id,Integer userId); |
| | | void reservationCancel(BusinessOverDTO businessOverDTO); |
| | | |
| | | |
| | | /** |
| | |
| | | void sendBookingsNotice(); |
| | | |
| | | IPage<UserResponse> getUserPage(PageWrap<UserPageRequest> pageWrap); |
| | | |
| | | void reservationOver(BusinessOverDTO businessOverDTO); |
| | | } |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.MeetConstants; |
| | | import com.doumee.core.wx.SendWxMessage; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.admin.request.QrOpenDoorDto; |
| | | import com.doumee.dao.admin.response.DevWgResponseParam; |
| | | import com.doumee.dao.business.*; |
| | |
| | | bookquery.selectAs(BookingTime::getTimeId, Bookings::getRoomTimeId); |
| | | bookquery.selectAs(BookingTime::getId, Bookings::getBookingTimeId); |
| | | bookquery.eq(Bookings::getIsdeleted, MeetConstants.ZERO); |
| | | bookquery.eq(BookingTime::getIsdeleted, MeetConstants.ZERO); |
| | | bookquery.eq(Bookings::getRoomId, bookings.getRoomId()); |
| | | bookquery.eq(Bookings::getStatus, MeetConstants.ZERO); |
| | | //bookquery.ge(Bookings::getStartTime, bookings.getStartTime()); |
| | |
| | | |
| | | |
| | | bookings.getBookingTimeList().stream().forEach(s -> { |
| | | s.setId(null); |
| | | s.setCreator(user.getId()); |
| | | s.setCreateDate(new Date()); |
| | | s.setIsdeleted(MeetConstants.ZERO); |
| | | s.setBookingId(bookings.getId()); |
| | | bookingTimeJoinMapper.insert(s); |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | public void updateManager(Bookings bookings, LoginUserInfo user) { |
| | |
| | | userRel.setIsdeleted(MeetConstants.ONE); |
| | | userRelJoinMapper.update(userRel, updateWrapper); |
| | | } |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(bookings.getSysList())){ |
| | | bookings.getSysList().stream().forEach(s -> { |
| | | s.setId(null); |
| | | s.setIsdeleted(MeetConstants.ZERO); |
| | | s.setCreateDate(new Date()); |
| | | s.setCreator(user.getId()); |
| | |
| | | s.setObjType(MeetConstants.ONE); |
| | | userRelJoinMapper.insert(s); |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | public void updateProjectRel(Bookings rooms, LoginUserInfo user) { |
| | |
| | | projectRelJoinMapper.update(projectRel, updateWrapper); |
| | | |
| | | rooms.getProjectList().stream().forEach(s -> { |
| | | |
| | | s.setId(null); |
| | | s.setIsdeleted(MeetConstants.ZERO); |
| | | s.setCreateDate(new Date()); |
| | | s.setCreator(user.getId()); |
| | |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()), Bookings::getName, pageWrap.getModel().getName()); |
| | | queryWrapper.eq(pageWrap.getModel().getStatus() != null, Bookings::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getRealName()), SystemUser::getRealname, pageWrap.getModel().getRealName()); |
| | | queryWrapper.eq(pageWrap.getModel().getDepartmentId() != null, SystemUser::getId, pageWrap.getModel().getDepartmentId()); |
| | | queryWrapper.eq(pageWrap.getModel().getDepartmentId() != null, Company::getId, pageWrap.getModel().getDepartmentId()); |
| | | |
| | | if (pageWrap.getModel().getStartTime() != null) { |
| | | queryWrapper.ge(Bookings::getStartTime, pageWrap.getModel().getStartTime()); |
| | |
| | | SimpleDateFormat format1 = new SimpleDateFormat("HH:mm"); |
| | | IPage<Bookings> result = bookingsJoinMapper.selectJoinPage(page, Bookings.class, queryWrapper); |
| | | result.getRecords().stream().forEach(s -> { |
| | | if(s.getStartTime().getTime()>System.currentTimeMillis()&&s.getStatus().equals(Constants.ZERO)){ |
| | | s.setMeetingStatus(Constants.ONE); |
| | | }else if(s.getEndTime().getTime()<System.currentTimeMillis()||Constants.equalsInteger(s.getStatus(),Constants.ONE) || Constants.equalsInteger(s.getStatus(),Constants.TWO) ){ |
| | | s.setMeetingStatus(Constants.THREE); |
| | | }else{ |
| | | s.setMeetingStatus(Constants.TWO); |
| | | } |
| | | MPJLambdaWrapper<Multifile> bookquery = new MPJLambdaWrapper<>(); |
| | | bookquery.eq(Multifile::getIsdeleted, MeetConstants.ZERO); |
| | | bookquery.eq(Multifile::getObjId, s.getId()); |
| | |
| | | */ |
| | | @Override |
| | | public IPage<MeetingListResponse> getMyMeetingPage(PageWrap<MeetingPageRequest> pageWrap) { |
| | | IPage<MeetingListResponse> page = bookingsMapper.myMeetingPage(pageWrap.toPage(), new QueryWrapper<MeetingListResponse>() |
| | | |
| | | QueryWrapper queryWrapper = new QueryWrapper<MeetingListResponse>() |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getRoomsName()), |
| | | j -> j.like("a.NAME",pageWrap.getModel().getRoomsName()).or() |
| | | .like(" b.NAME", pageWrap.getModel().getRoomsName())) |
| | |
| | | .eq("b.ISDELETED",MeetConstants.ZERO) |
| | | .eq("b.STATUS",MeetConstants.ZERO) |
| | | .eq("a.ISDELETED",MeetConstants.ZERO) |
| | | .orderByDesc(!Objects.isNull(pageWrap.getModel().getStatus())&&pageWrap.getModel().getStatus().equals(MeetConstants.TWO),"a.START_TIME") |
| | | .orderByAsc(Objects.isNull(pageWrap.getModel().getStatus())||pageWrap.getModel().getStatus().equals(MeetConstants.ONE),"a.START_TIME") |
| | | ); |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.ONE), |
| | | " now() > a.START_TIME and a.status = 0 " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.TWO), |
| | | " now() >= a.START_TIME and a.END_TIME >= now() " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.THREE), |
| | | " now() > a.END_TIME or a.status = 2 " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.FOUR), |
| | | " now() > a.START_TIME and SUBDATE(NOW(), INTERVAL 120 MINUTE) > a.START_TIME " |
| | | ) |
| | | .apply(Objects.nonNull(pageWrap.getModel().getMeetingStatus()) |
| | | &&Constants.equalsInteger(pageWrap.getModel().getMeetingStatus(),Constants.FIVE), |
| | | " a.STATUS = 1 " |
| | | ) |
| | | // .orderByDesc(!Objects.isNull(pageWrap.getModel().getStatus())&&pageWrap.getModel().getStatus().equals(MeetConstants.TWO),"a.START_TIME") |
| | | // .orderByAsc(Objects.isNull(pageWrap.getModel().getStatus())||pageWrap.getModel().getStatus().equals(MeetConstants.ONE),"a.START_TIME") |
| | | .orderByDesc( Constants.equalsInteger(pageWrap.getModel().getQueryType(),MeetConstants.TWO),"a.CREATE_DATE") |
| | | .orderByAsc(Constants.equalsInteger(pageWrap.getModel().getQueryType(),MeetConstants.ONE),"a.START_TIME"); |
| | | |
| | | IPage<MeetingListResponse> page = bookingsMapper.myMeetingPage(pageWrap.toPage(), queryWrapper); |
| | | String path = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); |
| | | page.getRecords().forEach(i -> { |
| | | i.setPrefixUrl(path); |
| | | if(i.getMeetingStatus().equals(Constants.ZERO)){ |
| | | if(i.getStatus()==Constants.ONE){ |
| | | i.setMeetingStatus(5); |
| | | }else{ |
| | | //å¼å§å5åé 大äºå½åæ¶é´ åæ¾ç¤ºå³å°å¼å§ |
| | | if(DateUtil.afterMinutesDate(i.getStartTime(),-5).getTime()>System.currentTimeMillis()){ |
| | | if(i.getMeetingStatus()==Constants.ONE){ |
| | | //å¼å§å120åé 大äºå½åæ¶é´ åæ¾ç¤ºå³å°å¼å§ |
| | | if(DateUtil.afterMinutesDate(i.getStartTime(),-120).getTime()>System.currentTimeMillis()){ |
| | | i.setMeetingStatus(4); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | }); |
| | |
| | | |
| | | /** |
| | | * ä¼è®®é¢çº¦è®°å½åæ¶ |
| | | * |
| | | * @param id |
| | | * @param userId |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void reservationCancel(Integer id, Integer userId) { |
| | | Bookings bookings = bookingsMapper.selectById(id); |
| | | public void reservationCancel(BusinessOverDTO businessOverDTO) { |
| | | Bookings bookings = bookingsMapper.selectById(businessOverDTO.getId()); |
| | | if (Objects.isNull(bookings)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "æªæ¥è¯¢å°é¢çº¦è®°å½"); |
| | | } |
| | | if (!bookings.getCreator().equals(userId)) { |
| | | if (!bookings.getCreator().equals(businessOverDTO.getUserId())) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "éä½ çé¢çº¦è®°å½,æ æ³è¿è¡åæ¶"); |
| | | } |
| | | if (System.currentTimeMillis() > bookings.getStartTime().getTime()) { |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "æ¬æ¬¡æä½å¤±è´¥,é¢çº¦ç¶æå·²æµè½¬"); |
| | | } |
| | | bookings.setCancelTime(new Date()); |
| | | bookings.setCancelUser(userId); |
| | | bookings.setCancelUser(businessOverDTO.getUserId()); |
| | | bookings.setCancelInfo(businessOverDTO.getBusinessRemark()); |
| | | bookings.setStatus(MeetConstants.ONE); |
| | | bookings.setEditDate(new Date()); |
| | | bookings.setEditor(userId); |
| | | bookings.setEditor(businessOverDTO.getUserId()); |
| | | bookingsMapper.updateById(bookings); |
| | | //åæ¶ä¼è®® åéåæ¶éç¥ |
| | | this.sendNotice(bookings, 3); |
| | |
| | | sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void reservationOver(BusinessOverDTO businessOverDTO) { |
| | | if(Objects.isNull(businessOverDTO) |
| | | || Objects.isNull(businessOverDTO.getUserId()) |
| | | || Objects.isNull(businessOverDTO.getId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Bookings bookings = bookingsMapper.selectById(businessOverDTO.getId()); |
| | | if (Objects.isNull(bookings)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "æªæ¥è¯¢å°é¢çº¦è®°å½"); |
| | | } |
| | | Long userRelList = userRelMapper.selectCount(new QueryWrapper<UserRel>().lambda() |
| | | .eq(UserRel::getIsdeleted,Constants.ZERO) |
| | | .eq(UserRel::getObjId,bookings.getRoomId()) |
| | | .eq(UserRel::getObjType,Constants.ONE) |
| | | .eq(UserRel::getUserId,businessOverDTO.getUserId())); |
| | | |
| | | if (!bookings.getCreator().equals(businessOverDTO.getUserId()) && userRelList <= 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "éä½ çé¢çº¦è®°å½,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if (System.currentTimeMillis() < bookings.getStartTime().getTime()) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ä¼è®®æªå¼å§,æ æ³è¿è¡ç»æï¼å¦é该æä½è¯·ä½¿ç¨åæ¶åè½"); |
| | | } |
| | | if (System.currentTimeMillis() > bookings.getEndTime().getTime()) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ä¼è®®å·²ç»æï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!bookings.getStatus().equals(MeetConstants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "æ¬æ¬¡æä½å¤±è´¥,ä¼è®®ç¶æå·²æµè½¬"); |
| | | } |
| | | bookings.setDoneDate(new Date()); |
| | | bookings.setDoneUserId(businessOverDTO.getUserId()); |
| | | bookings.setStatus(MeetConstants.TWO); |
| | | bookings.setEditDate(new Date()); |
| | | bookings.setEditor(businessOverDTO.getUserId()); |
| | | bookingsMapper.updateById(bookings); |
| | | |
| | | //æ¥è¯¢ææçé¢çº¦æ¶é´ |
| | | List<BookingTime> bookingTimeList = bookingTimeJoinMapper.selectJoinList(BookingTime.class, |
| | | new MPJLambdaWrapper<BookingTime>() |
| | | .selectAll(BookingTime.class) |
| | | .selectAs(RoomTime::getEndTime,BookingTime::getEndTime) |
| | | .leftJoin(RoomTime.class,RoomTime::getId,BookingTime::getTimeId) |
| | | .eq(BookingTime::getBookingId,bookings.getId())); |
| | | //è·åå½å¤© åªæå½å¤©æ¥æå
å¯ä»¥å¤ç |
| | | String today = DateUtil.dateToString(new Date(),"yyyy-mm-dd"); |
| | | //å¾ªç¯æ è®°æ°æ®ä¸ºå·²å é¤ ä¸åå ç¨ |
| | | for (BookingTime bookingTime:bookingTimeList) { |
| | | if(DateUtil.getDateFromString(today + " " + bookingTime.getEndTime() +":00").getTime()>System.currentTimeMillis()){ |
| | | bookingTime.setIsdeleted(Constants.ZERO); |
| | | bookingTimeJoinMapper.updateById(bookingTime); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 宿¶åéä¼è®® å³å°å¼å§éç¥ |
| | |
| | | Notices notices = new Notices(noticeObjectType,bookings.getId(),noticeObjectType.getInfo(),bookings.getCreator(), Constants.ZERO); |
| | | noticeList.add(notices); |
| | | if(noticeList.size()>0){ |
| | | noticesMapper.insertBatchSomeColumn(noticeList); |
| | | noticesMapper.insert(noticeList); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.MeetConstants; |
| | | import com.doumee.dao.business.ProjectsMapper; |
| | |
| | | public Integer create(Projects projects) { |
| | | |
| | | Projects insert = new Projects(); |
| | | insert.setIsdeleted(Constants.ZERO); |
| | | insert.setCreator(projects.getCreator()); |
| | | insert.setEditor(projects.getEditor()); |
| | | insert.setName(projects.getName()); |
| | |
| | | bookquery.selectAs(BookingTime::getTimeId, Bookings::getRoomTimeId); |
| | | bookquery.selectAs(BookingTime::getId, Bookings::getBookingTimeId); |
| | | bookquery.eq(Bookings::getIsdeleted, Constants.ZERO); |
| | | bookquery.eq(BookingTime::getIsdeleted, Constants.ZERO); |
| | | bookquery.eq(Bookings::getRoomId, roomTime.getRoomId()); |
| | | bookquery.eq(Bookings::getStatus,Constants.ZERO); |
| | | bookquery.apply("DATE_FORMAT(t.START_TIME,'%Y-%m-%d') = DATE_FORMAT('" + DateUtil.dateToString(roomTime.getYudingDate(), "yyyy-MM-dd") + "','%Y-%m-%d') "); |
| | |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | @Bean |
| | | public EasySqlInjector sqlInjector() { |
| | | return new EasySqlInjector(); |
| | | } |
| | | |
| | | } |
| | |
| | | NOT_ALLOWED(5110, "ä¸å
许çæä½"), |
| | | TOKEN_EXCEED_TIME(5111, "TOKENè¿æ"), |
| | | NO_LOGIN(5112, "æªç»å½"), |
| | | NO_ALLOW_LOGIN(5113, "è¯¥ç±»ç¨æ·ä¸å
许ç»å½"), |
| | | ; |
| | | |
| | | private int code; |
| | |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | |
| | | private String sessionId; |
| | | |
| | | private Date loginDate; |
| | | @ApiModelProperty(value = "è´¦æ·æ¥æºï¼0=åå°æ·»å ï¼ 2=叿ºæ³¨å") |
| | | private Integer source; |
| | | |
| | | private List<String> roles; |
| | | |
| | |
| | | public static final String ERP ="ERP" ; |
| | | public static final Integer THREE =3 ; |
| | | public static final Integer FOUR =4 ; |
| | | public static final Integer FIVE =5 ; |
| | | public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; |
| | | public static final String VIRTUAL_CARD_INDEX = "02098469790"; |
| | | public static final String RETRY_CONNECT_NUM ="RETRY_CONNECT_NUM" ; |
| | |
| | | |
| | | |
| | | public interface memberType{ |
| | | int lw_visitor = 0;//å³å¡è®¿å®¢ |
| | | int driver = 0;//叿ºäººå |
| | | int visitor = 1;//æ®é访客 |
| | | int internal = 2;//å
é¨äººå |
| | | } |
| | |
| | | */ |
| | | public interface CompanyMapper extends BaseMapper<Company> { |
| | | |
| | | void insertBatchSomeColumn(List<Company> addList); |
| | | } |
| | |
| | | */ |
| | | public interface MultifileMapper extends BaseMapper<Multifile> { |
| | | |
| | | void insertBatchSomeColumn(List<Multifile> fileList); |
| | | } |
| | |
| | | List<SystemUserListVO> selectManageList(@Param("dto") QuerySystemUserDTO dto, @Param("orderByClause") String orderByClause); |
| | | |
| | | |
| | | void insertBatchSomeColumn(List<SystemUser> userList); |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/05/04 18:21 |
| | | */ |
| | | @Data |
| | | @ApiModel("微信ç»å½ææåæ°") |
| | | public class LoginAuthDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "ç¼ç ") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ç±»å") |
| | | private Integer soucre; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/05/04 18:21 |
| | | */ |
| | | @Data |
| | | @ApiModel("å
¬ä¼å·ç»å½åæ°") |
| | | public class LoginByOpenidDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "userId" , hidden = true) |
| | | private Integer userId; |
| | | } |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | private Integer queryType; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¥æ") |
| | | @JsonFormat(pattern="yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¥æ") |
| | | @JsonFormat(pattern="yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | @ApiModelProperty(value = "0è®¿å®¢å®¡æ¹ 1访客æ¥å¤ 2ç¨è½¦å®¡æ¹ 3鿣å¤ç 4ç©æµè½¦å®¡æ¹ 5ç³»ç»ç³»ç»") |
| | |
| | | */ |
| | | public interface NoticesJoinMapper extends MPJJoinMapper<Notices> { |
| | | |
| | | void insertBatchSomeColumn(List<Notices> noticeList); |
| | | } |
| | |
| | | private Integer status; |
| | | @ApiModelProperty(value = "ä¼ä¸ç¼ç ï¼å
³ècompanyï¼") |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "0 å¯ç¨ 1 ç¦ç¨") |
| | | @ApiModelProperty(value = "è´¦æ·æ¥æºï¼0=åå°æ·»å ï¼ 2=叿ºæ³¨å") |
| | | private Integer source; |
| | | @ApiModelProperty(value = "å
¬å¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "æ°æ®æéå
é¨é¨ç¼ç éå") |
| | |
| | | package com.doumee.service.system; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.dao.system.dto.LoginByOpenidDTO; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | |
| | |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | String loginByPassword (LoginDTO dto, HttpServletRequest request); |
| | | |
| | | LoginUserInfo loginByPasswordNew (LoginDTO dto, ServerHttpRequest request); |
| | | |
| | | /** |
| | | * æ ¹æ® openIdç»å½ |
| | | * @param userId |
| | | * @param request |
| | | * @return |
| | | */ |
| | | String loginByUserId(Integer userId); |
| | | } |
| | |
| | | package com.doumee.service.system.impl; |
| | | |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.system.dto.LoginByOpenidDTO; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.model.*; |
| | | import com.doumee.service.common.CaptchaService; |
| | | import com.doumee.service.system.*; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | |
| | | @Resource |
| | | private JwtTokenUtil jwtTokenUtil; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String loginByPassword(LoginDTO dto, HttpServletRequest request) { |
| | |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT.getCode(),"对ä¸èµ·ï¼éªè¯ç 䏿£ç¡®ï¼"); |
| | | } |
| | | } |
| | | |
| | | // æ ¹æ®ç¨æ·åæ¥è¯¢ç¨æ·å¯¹è±¡ |
| | | SystemUser queryDto = new SystemUser(); |
| | | queryDto.setUsername(dto.getUsername()); |
| | |
| | | SystemUser user = systemUserService.findOne(queryDto); |
| | | if (user == null) { |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | if(!Constants.equalsInteger(user.getSource(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN); |
| | | } |
| | | String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt()); |
| | | // æ¯è¾å¯ç |
| | |
| | | return userInfo; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
é¨äººå ä¸ å¸æº æ ¹æ®codeæ¥è¯¢openIdåè¿è¡ç»å½æ¥å£ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String loginByUserId(Integer userId) { |
| | | SystemLoginLog loginLog = new SystemLoginLog(); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | |
| | | // æ ¹æ®ç¨æ·åæ¥è¯¢ç¨æ·å¯¹è±¡ |
| | | SystemUser user = systemUserService.findById(userId); |
| | | if (user == null) { |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | Company company = new Company(); |
| | | if(Objects.nonNull(user.getCompanyId())){ |
| | | company = companyMapper.selectById(user.getCompanyId()); |
| | | } |
| | | // è·åç»å½ç¨æ·ä¿¡æ¯ |
| | | List<SystemRole> roles = systemRoleService.findByUserId(user.getId()); |
| | | List<SystemPermission> permissions = systemPermissionService.findByUserId(user.getId()); |
| | | |
| | | SystemRole rt = new SystemRole(); |
| | | rt.setDeleted(Boolean.FALSE); |
| | | //æ°æ®é¨é¨æééå |
| | | user.setCompanyIdList(systemDataPermissionService.selectHighRole(new SystemDataPermission(),rt,user)); |
| | | |
| | | LoginUserInfo userInfo = LoginUserInfo.from(user, roles, permissions,company,null); |
| | | String token = jwtTokenUtil.generateToken(userInfo); |
| | | |
| | | return token; |
| | | } |
| | | |
| | | } |
| | |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:visits:query") |
| | | public ApiResponse<PageData<Visits>> findPage (@RequestBody PageWrap<Visits> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | pageWrap.getModel().setMemberId(getLoginUser(token).getMemberId()); |
| | | pageWrap.getModel().setReceptMemberId(getLoginUser(token).getMemberId()); |
| | | return ApiResponse.success(visitsService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(visitsService.retentionPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation(value = "PCç«¯è®¿å®¢è®°å½æäº¤", notes = "访客æäº¤") |
| | | @PostMapping("/createFk") |
| | | public ApiResponse createFk(@RequestBody Visits visits) { |
| | | visits.setSourceType(Constants.ZERO); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false,Constants.ONE)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "访客æ¥å¤", notes = "访客æ¥å¤") |
| | |
| | | package com.doumee.cloud.web; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.cloud.web.ApiController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | |
| | | @PostMapping("/createVisit") |
| | | public ApiResponse createVisit(@RequestBody Visits visits,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | visits.setCreateMemberId(getLoginUser(token).getMemberId()); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false)); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false,Constants.ZERO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ¹æµè®°å½å®¡æ¹", notes = "å
é¨äººå") |
| | |
| | | package com.doumee.cloud.web; |
| | | |
| | | import com.doumee.cloud.web.ApiController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | @LoginNoRequired |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/problem") |
| | | @Slf4j |
| | | public class ProblemWebController extends ApiController { |
| | | public class ProblemWebController { |
| | | |
| | | @Autowired |
| | | private ProblemsService problemsService; |
| | |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.server.ServerWebExchange; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @ApiOperation(value = "访客微信ææ", notes = "访客微信ææè·åopenId") |
| | | @GetMapping("/wxAuthorize") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "ææç ", required = true) |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "ææç ", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "source", value = "æ¥æº:0=叿ºï¼1=访客ï¼2=å
é¨åå·¥", required = true) |
| | | }) |
| | | public ApiResponse<WxAuthorizeVO> wxAuthorize(@RequestParam String code) { |
| | | WxAuthorizeVO wxAuthorizeVO = memberService.wxAuthorize(code); |
| | | public ApiResponse<WxAuthorizeVO> wxAuthorize(@RequestParam String code,@RequestParam Integer source) { |
| | | WxAuthorizeVO wxAuthorizeVO = memberService.wxAuthorize(code,source); |
| | | return ApiResponse.success("æ¥è¯¢æå",wxAuthorizeVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/createFk") |
| | | public ApiResponse createFk(@RequestBody Visits visits) { |
| | | visits.setSourceType(Constants.ZERO); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false)); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false,Constants.ZERO)); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiOperation(value = "访客记å½è¯¦æ
", notes = "访客记å½è¯¦æ
") |
| | | @GetMapping("/detail") |
| | | public ApiResponse<VisitDetailVO> detail(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.getVisitDetail(id,getLoginUser(token).getMemberId())); |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.getVisitDetail(id, Objects.isNull(loginUserInfo)?null:loginUserInfo.getMemberId())); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public interface ApproveMapper extends BaseMapper<Approve> { |
| | | |
| | | void insertBatchSomeColumn(List<Approve> list); |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface ApproveParamMapper extends BaseMapper<ApproveParam> { |
| | | |
| | | void insertBatchSomeColumn(List<ApproveParam> paramList); |
| | | } |
| | |
| | | */ |
| | | public interface CarEventMapper extends BaseMapper<CarEvent> { |
| | | |
| | | void insertBatchSomeColumn(List<CarEvent> list); |
| | | } |
| | |
| | | */ |
| | | public interface CarsMapper extends BaseMapper<Cars> { |
| | | |
| | | void insertBatchSomeColumn(List<Cars> allHkList); |
| | | } |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface DeviceEventMapper extends BaseMapper<DeviceEvent> { |
| | | void insertBatchSomeColumn(List<DeviceEvent> addList); |
| | | } |
| | |
| | | */ |
| | | public interface DeviceMapper extends BaseMapper<Device> { |
| | | |
| | | Integer insertBatchSomeColumn(Collection<Device> entityList); |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface DeviceRoleMapper extends BaseMapper<DeviceRole> { |
| | | |
| | | void insertBatchSomeColumn(List<DeviceRole> addList); |
| | | } |
| | |
| | | */ |
| | | public interface EmpowerMapper extends BaseMapper<Empower> { |
| | | |
| | | void insertBatchSomeColumn(List<Empower> list); |
| | | } |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface MemberCardMapper extends BaseMapper<MemberCard> { |
| | | |
| | | void insertBatchSomeColumn(List<MemberCard> list); |
| | | } |
| | |
| | | */ |
| | | public interface MemberMapper extends MPJBaseMapper<Member> { |
| | | |
| | | void insertBatchSomeColumn(List<Member> list); |
| | | } |
| | |
| | | */ |
| | | public interface MemberRoleMapper extends BaseMapper<MemberRole> { |
| | | |
| | | void insertBatchSomeColumn(List<MemberRole> list); |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface ParkBookMapper extends BaseMapper<ParkBook> { |
| | | |
| | | void insertBatchSomeColumn(List<ParkBook> list); |
| | | } |
| | |
| | | */ |
| | | public interface ParksMapper extends BaseMapper<Parks> { |
| | | |
| | | void insertBatchSomeColumn(List<Parks> addList); |
| | | } |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface RetentionMapper extends BaseMapper<Retention> { |
| | | |
| | | void insertBatchSomeColumn(List<Retention> retentionList); |
| | | } |
| | |
| | | */ |
| | | public interface TrainTimeMapper extends BaseMapper<TrainTime> { |
| | | |
| | | void insertBatchSomeColumn(List<TrainTime> newList); |
| | | } |
| | |
| | | */ |
| | | public interface VisitEventMapper extends BaseMapper<VisitEvent> { |
| | | |
| | | void insertBatchSomeColumn(List<VisitEvent> list); |
| | | } |
| | |
| | | */ |
| | | public interface VisitsMapper extends BaseMapper<Visits> { |
| | | |
| | | void insertBatchSomeColumn(List<Visits> withUserList); |
| | | } |
| | |
| | | */ |
| | | public interface ApproveJoinMapper extends MPJJoinMapper<Approve> { |
| | | |
| | | void insertBatchSomeColumn(List<Approve> list); |
| | | |
| | | |
| | | } |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface EmpowerJoinMapper extends MPJJoinMapper<Empower> { |
| | | void insertBatchSomeColumn(List<Empower> list); |
| | | } |
| | |
| | | @ExcelColumn(name="ç³è¯·äººç¼ç (å
³èmember)") |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "叿ºç¼ç ï¼å
³ècar_driverï¼", example = "1") |
| | | @ExcelColumn(name="叿ºç¼ç ï¼å
³ècar_driverï¼") |
| | | @ApiModelProperty(value = "叿ºç¼ç ï¼å
³èmemberIdï¼", example = "1") |
| | | @ExcelColumn(name="叿ºç¼ç ï¼å
³èmemberIdï¼") |
| | | private Integer driverId; |
| | | |
| | | @ApiModelProperty(value = "叿ºå§å", example = "1") |
| | |
| | | @ExcelColumn(name="å¥åº·ç ") |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | @ApiModelProperty(value = "ç±»å 0叿ºäººå 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0叿ºäººå 1æ®é访客 2å
é¨äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°/å
é¨äººå") |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å ç¨") |
| | | private Integer isUse; |
| | | |
| | | @ApiModelProperty(value = "ç¨è½¦è®°å½ä¸»é®") |
| | | private Integer carUseBookId; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Data |
| | | public class VisitDetailVO { |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "审æ¹ç¶æ") |
| | | private Integer status; |
| | |
| | | @ApiModelProperty(value = "审æ¹ä¿¡æ¯æ°æ®") |
| | | private ApproveDataVO approveDateVO; |
| | | |
| | | @ApiModelProperty(value = "è¯ä»¶ç±»å 0èº«ä»½è¯ 1港澳è¯ä»¶ 2æ¤ç
§", example = "1") |
| | | private Integer idcardType; |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.web.reqeust.VisitMemberDTO; |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | WxAuthorizeVO wxAuthorize(String code); |
| | | WxAuthorizeVO wxAuthorize(String code,Integer source); |
| | | |
| | | |
| | | |
| | | List<MemberVO> getVisitedMember(CheckVisitedDTO checkVisitedDTO); |
| | | |
| | | |
| | | /** |
| | | * è´¦å·å¯ç |
| | | * å
é¨äººå/å³å¡è®¿å®¢ç»å½ |
| | | * @param accountLoginDTO |
| | | * @return |
| | | */ |
| | | WxAuthorizeVO accountLogin(AccountLoginDTO accountLoginDTO); |
| | | |
| | | /** |
| | | * å
é¨å¯æè®¿äººåå页 |
| | |
| | | import com.doumee.dao.web.reqeust.VisitRecordDTO; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | import com.doumee.dao.web.response.VisitRecordVO; |
| | | import io.swagger.models.auth.In; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | Integer create(Visits visits); |
| | | |
| | | Integer createFk(Visits visits,Boolean isERP); |
| | | Integer createFk(Visits visits, Boolean isERP, Integer source); |
| | | |
| | | /** |
| | | * 访客æ¥å¤ |
| | |
| | | * @param accessSecret |
| | | * @return |
| | | */ |
| | | AccessTokenResponse createERPToken(String accessKey, String accessSecret); |
| | | // AccessTokenResponse createERPToken(String accessKey, String accessSecret); |
| | | |
| | | |
| | | /** |
| | |
| | | import org.apache.xpath.operations.Bool; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | ).count() |
| | | ); |
| | | //å·²å¤çæ°æ® |
| | | internalHomeVO.setNoticeDealNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId) |
| | | &&StringUtils.equals(i.getParam4(),i.getUserId().toString()) |
| | | &&Constants.equalsInteger(i.getStatus(),Constants.ONE) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | ).count() |
| | | ); |
| | | |
| | | //æåèµ·çæ°æ® |
| | | internalHomeVO.setNoticeCreateNum( |
| | | noticesJoinMapper.selectCount(new QueryWrapper<Notices>().lambda().eq(Notices::getParam3,memberId)) |
| | | ); |
| | | |
| | | //æéæçæ°æ® |
| | | internalHomeVO.setNoticeCopyNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ONE) |
| | |
| | | if(CollectionUtils.isNotEmpty(approveCopyList)){ |
| | | this.organizeApproveCopyData(approveTempl,approveParamList,businessId,approveList); |
| | | } |
| | | approveMapper.insertBatchSomeColumn(approveList); |
| | | approveJoinMapper.insert(approveList); |
| | | // approveJoinMapper.insert(approveList); |
| | | |
| | | } |
| | | |
| | |
| | | createUserApprove.setIsdeleted(Constants.ZERO); |
| | | createUserApprove.setTemplatId(approveTempl.getId()); |
| | | createUserApprove.setChekorId(createMember.getId()); |
| | | createUserApprove.setCheckDate(createUserApprove.getCreateDate()); |
| | | createUserApprove.setStatus(Constants.approveStatus.pass); |
| | | createUserApprove.setTitle("åèµ·ç³è¯·"); |
| | | createUserApprove.setStatusInfo(""); |
| | |
| | | approve.setChekorId(memberId); |
| | | approve.setStatus(i==0?Constants.ONE:Constants.ZERO); |
| | | approve.setStatusInfo(i==0?"审æ¹ä¸":"å¾
审æ¹"); |
| | | approve.setTitle("审æ¹äºº"); |
| | | approve.setIsEndCheck((i+1) == approveParamList.size()?Constants.ONE:Constants.ZERO); |
| | | approve.setObjId(businessId); |
| | | approve.setLevel(i+1); |
| | |
| | | for(Approve level:levelList){ |
| | | List<Approve> tlist = getLevelInfoFromList(level,approveGroupList); |
| | | approveDateVO.getApproveList().addAll(tlist); |
| | | if(tlist.size() ==0 |
| | | ||Constants.equalsInteger(Constants.approveStatus.unPass, tlist.get(0).getStatus()) |
| | | ||Constants.equalsInteger(Constants.approveStatus.cancel, tlist.get(0).getStatus())){ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | waitModel.setApproveList(copyList); |
| | | approveDateVO.getApproveList().add(waitModel); |
| | | } |
| | | System.out.println(JSONObject.toJSONString(approveDateVO)); |
| | | return approveDateVO; |
| | | } |
| | | |
| | |
| | | if(CollectionUtils.isNotEmpty(approveList)){ |
| | | waitModel.setCreateDate(approveList.get(Constants.ZERO).getCreateDate()); |
| | | } |
| | | if(Constants.equalsInteger(waitModel.getStatus(),Constants.approveStatus.pass)){ |
| | | waitModel.setMemberName("å·²æé"+ approveList.size() +"人"); |
| | | }else if(Constants.equalsInteger(waitModel.getStatus(),Constants.approveStatus.wait)){ |
| | | waitModel.setMemberName("å¤çä¸"); |
| | | } |
| | | waitModel.setApproveList(approveList); |
| | | list.add(waitModel); |
| | | } |
| | | //å¦ææ¯æç¾ |
| | | // if(otherPassList.size()>0){ |
| | | // Approve waitModel = new Approve(); |
| | | // waitModel.setApproveType(Constants.ONE); |
| | | // waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")+"ï¼æéæç¾å®¡æ¹äººï¼"); |
| | | // waitModel.setStatus(Constants.ONE); |
| | | // waitModel.setApproveList(otherPassList); |
| | | // list.add(waitModel); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.auditIng,approve.getStatus())||Constants.equalsInteger(Constants.approveStatus.wait,approve.getStatus())){ |
| | | waitList.add(approve); |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.unPass,approve.getStatus())){ |
| | | refuseModel = approve; |
| | | BeanUtils.copyProperties(approve,refuseModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | .eq(Notices::getUserId,approve.getChekorId()) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .eq(Notices::getIsdeleted,Constants.ZERO) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(notices)){ |
| | | log.info("æªæ¥è¯¢å°éç¥è®°å½"); |
| | |
| | | approve.setCheorId(approveDTO.getLoginUserInfo().getMemberId().toString()); |
| | | approve.setCheckorName(approveDTO.getLoginUserInfo().getRealname()); |
| | | approve.setCheckDate(new Date()); |
| | | approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"å·²åæ":approveDTO.getCheckInfo()); |
| | | approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"å·²åæ":"已驳å"); |
| | | //æ¬çº§ææ å¾
审æ¹è®°å½ |
| | | List<Approve> approveList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>() |
| | |
| | | Boolean dealBusinessBean = false; |
| | | //审æ¹é©³åæ
åµ |
| | | if(approveDTO.getStatus().equals(Constants.THREE)){ |
| | | dealBusinessBean = true; |
| | | //ä¿®æ¹å
¶ä»ææå¾
审æ¹å审æ¹ä¸è®°å½æ°æ® |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.otherUnPass) |
| | | .set(Approve::getCheckDate,new Date()) |
| | | .in(Approve::getStatus,Constants.approveStatus.auditIng,Constants.approveStatus.wait) |
| | | .eq(Approve::getObjId,approve.getObjId()) |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | |
| | | ); |
| | | } |
| | | } |
| | | return; |
| | | }else{ |
| | | //å¤çå
¶ä»ä¸å¡æ°æ® |
| | | if((Constants.equalsInteger(approve.getApproveType(),Constants.ZERO) |
| | |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.otherDeal) |
| | | .set(Approve::getCheckDate,new Date()) |
| | | .in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList()))); |
| | | } |
| | | dealBusinessBean = true; |
| | |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.otherDeal) |
| | | .set(Approve::getCheckDate,new Date()) |
| | | .in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList()))); |
| | | } |
| | | /**å¼å¯ä¸ä¸çº§å«çæ°æ®ä¸ºå¾
å®¡æ ¸**/ |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.auditIng) |
| | | .set(Approve::getTitle,"审æ¹äºº") |
| | | .set(Approve::getCheckDate,new Date()) |
| | | .eq(Approve::getStatus,Constants.approveStatus.wait) |
| | | .eq(Approve::getObjId,approve.getObjId()) |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1)) |
| | | ); |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,false); |
| | | } |
| | | }else if(approve.getApproveType().equals(Constants.ONE)){ |
| | | //ä¼ç¾ ä¸ç»å®¡ |
| | | //æ ä»äººå®¡æ¹çæ
åµ åä¿®æ¹æ°æ®ç¶æ |
| | |
| | | .eq(Approve::getType,Constants.ZERO) |
| | | .eq(Approve::getLevel,(approve.getLevel() + Constants.ONE)) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(nextApproveList)){ |
| | | if(CollectionUtils.isEmpty(nextApproveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµæ°æ®å¼å¸¸"); |
| | | } |
| | | Notices newNotices = new Notices(); |
| | |
| | | visitsMapper.updateById(visits); |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | // å¸å
å¤ç¨è½¦ç³è¯· |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(approveDTO.getObjId()); |
| | | if(Objects.isNull(carUseBook)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ç¨è½¦è®°å½"); |
| | | } |
| | | carUseBook.setStatus(approveDTO.getStatus()); |
| | | carUseBook.setEditDate(new Date()); |
| | | carUseBook.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | //妿é
置修æ¹å¸æº ä¸ å
¥åäºæ´æ¢å叿ºä¿¡æ¯ |
| | | if(approveDTO.getStatus()==Constants.TWO&&Constants.equalsInteger(approve.getDriverParam(),Constants.ONE)){ |
| | | CarDriver carDriver = carDriverMapper.selectById(approveDTO.getDriverId()); |
| | | if(Objects.isNull(carDriver)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°å¸æºä¿¡æ¯"); |
| | | } |
| | | carUseBook.setDriverId(carDriver.getId()); |
| | | } |
| | | carUseBookMapper.updateById(carUseBook); |
| | | this.updDriver(approveDTO,approve,true); |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.logisticsCarUse)){ |
| | | //TODO ç©æµè½¦é¢çº¦ |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public void updDriver(ApproveDTO approveDTO,Approve approve,Boolean dealBusinessBean){ |
| | | // å¸å
å¤ç¨è½¦ç³è¯· |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(approveDTO.getObjId()); |
| | | if(Objects.isNull(carUseBook)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ç¨è½¦è®°å½"); |
| | | } |
| | | if(dealBusinessBean){ |
| | | carUseBook.setStatus(approveDTO.getStatus()); |
| | | }else{ |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)){ |
| | | carUseBook.setStatus(Constants.ONE); |
| | | } |
| | | } |
| | | carUseBook.setEditDate(new Date()); |
| | | carUseBook.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | //妿é
置修æ¹å¸æº ä¸ å
¥åäºæ´æ¢å叿ºä¿¡æ¯ |
| | | if(approveDTO.getStatus()==Constants.TWO&&Constants.equalsInteger(approve.getDriverParam(),Constants.ONE)){ |
| | | CarDriver carDriver = carDriverMapper.selectOne(new QueryWrapper<CarDriver>().lambda() |
| | | .eq(CarDriver::getIsdeleted,Constants.ZERO) |
| | | .eq(CarDriver::getStatus,Constants.ZERO) |
| | | .eq(CarDriver::getMemberId,approveDTO.getDriverId())); |
| | | if(Objects.isNull(carDriver)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°å¸æºä¿¡æ¯"); |
| | | } |
| | | carUseBook.setDriverId(carDriver.getMemberId()); |
| | | } |
| | | carUseBookMapper.updateById(carUseBook); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ApproveParamMapper; |
| | | import com.doumee.dao.business.ApproveTemplMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApproveParamDataVO; |
| | | import com.doumee.service.business.ApproveTemplService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å®¡æ¹æ¨¡çä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | approveParamMapper.delete(new UpdateWrapper<ApproveParam>().lambda() |
| | | .eq(ApproveParam::getTemplId,template.getId())); |
| | | //æ¹éæå
¥æ°çé
ç½® |
| | | approveParamMapper.insertBatchSomeColumn(model.getParamList()); |
| | | approveParamMapper.insert(model.getParamList()); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | || Objects.isNull(carUseBook.getStartTime()) |
| | | || Objects.isNull(carUseBook.getEndTime()) |
| | | || Objects.isNull(carUseBook.getCreator()) |
| | | || Objects.isNull(carUseBook.getMemberId()) |
| | | || Objects.isNull(carUseBook.getPlanUseDate()) |
| | | || Objects.isNull(carUseBook.getType()) |
| | | || StringUtils.isEmpty(carUseBook.getMemberIds()) |
| | |
| | | || StringUtils.isEmpty(carUseBook.getAddr()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(Objects.nonNull(carUseBook.getCreator())&&Objects.isNull(carUseBook.getMemberId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç»å½ç¨æ·æ æ³è¿è¡è¯¥æä½!"); |
| | | } |
| | | if(carUseBook.getEndTime().getTime()<=System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"éæ©æ¥æå¼å¸¸[ç»ææ¶é´å°äºå½åæ¶é´],è¯·å·æ°éè¯"); |
| | |
| | | if(Objects.isNull(cars)||!cars.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"车è¾ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | carUseBook.setCarCode(cars.getCode()); |
| | | //æ ¹æ®è½¦è¾æ¥è¯¢å¸æºä¿¡æ¯ |
| | | CarDriver carDriver = carDriverMapper.selectOne(new QueryWrapper<CarDriver>().lambda() |
| | | .eq(CarDriver::getCarId,cars.getId()) |
| | |
| | | } |
| | | carUseBookMapper.insert(carUseBook); |
| | | //ç¨è½¦ç³è¯· 审æ¹è®°å½å建 |
| | | |
| | | approveService.createApproveFlow(carUseBook.getType()==0?3:4,carUseBook.getId(),carUseBook.getMemberId()); |
| | | return carUseBook.getId(); |
| | | } |
| | |
| | | } |
| | | } |
| | | approve.setCheckInfo(model.getCancelInfo()); |
| | | approve.setCheckDate(model.getCancelTime()); |
| | | approveList.add(approve); |
| | | } |
| | | model.setApproveDateVO(approveDataVO); |
| | |
| | | .or().apply(" START_TIME < '"+dateDay+" 00:00:00' and END_TIME > '"+dateDay+" 23:59:59' ")) |
| | | ); |
| | | for (DateIntervalVO dateIntervalVO:dateIntervalVOList) { |
| | | //夿æ¶é´æ¯å¦å¤§äºå½å |
| | | if(DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()<=System.currentTimeMillis()){ |
| | | dateIntervalVO.setIsUse(Constants.ONE); |
| | | continue; |
| | | } |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)){ |
| | | for (CarUseBook i:carUseBookList ) { |
| | | if( |
| | |
| | | (DateUtil.getDateFromString(dateIntervalVO.getStartTime()).getTime() >= i.getStartTime().getTime() && |
| | | DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime() <= i.getEndTime().getTime()) |
| | | ){ |
| | | dateIntervalVO.setCarUseBookId(i.getId()); |
| | | dateIntervalVO.setIsUse(Constants.ONE); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | //夿æ¶é´æ¯å¦å¤§äºå½å |
| | | if(Constants.equalsInteger(dateIntervalVO.getIsUse(),Constants.ZERO) && DateUtil.getDateFromString(dateIntervalVO.getEndTime()).getTime()<=System.currentTimeMillis()){ |
| | | dateIntervalVO.setIsUse(Constants.ONE); |
| | | continue; |
| | | } |
| | | } |
| | | return dateIntervalVOList; |
| | |
| | | carUseBook.setCancelTime(new Date()); |
| | | carUseBook.setCancelStatus(Constants.ONE); |
| | | carUseBook.setStatus(Constants.FOUR); |
| | | carUseBook.setCancelUser(loginUserInfo.getId()); |
| | | carUseBook.setCancelUser(loginUserInfo.getMemberId()); |
| | | carUseBook.setCancelType(Constants.ONE); |
| | | if(loginUserInfo.getId().equals(carUseBook.getCreator())){ |
| | | carUseBook.setCancelType(Constants.ZERO); |
| | |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = model.getLoginUserInfo(); |
| | | } |
| | | if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | .eq(HiddenDangerParam::getType,model.getType()) |
| | | .eq(HiddenDangerParam::getName,model.getName()) |
| | | .eq(HiddenDangerParam::getIsdeleted,Constants.ZERO) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥åç§°å·²åå¨!"); |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | //妿æ¯åºåé
ç½® |
| | | List<Integer> ids = model.getMemberIdList(); |
| | |
| | | if(hiddenDangerParam == null || Constants.equalsInteger(hiddenDangerParam.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥é
置信æ¯ä¸åå¨ï¼è¯·è¿åå·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | .eq(HiddenDangerParam::getType,model.getType()) |
| | | .eq(HiddenDangerParam::getName,model.getName()) |
| | | .eq(HiddenDangerParam::getIsdeleted,Constants.ZERO) |
| | | .ne(HiddenDangerParam::getId,model.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥åç§°å·²åå¨!"); |
| | | } |
| | | if(Constants.equalsInteger(hiddenDangerParam.getType(),Constants.ZERO)){ |
| | | //妿æ¯åºåé
ç½®,æ ¡éªå®å
¨åä¿¡æ¯æ¯å¦æ£ç¡® |
| | | List<Integer> ids =model.getMemberIdList(); |
| | |
| | | if(Objects.isNull(hiddenDangerParam)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°éæ£åºå"); |
| | | } |
| | | |
| | | HiddenDangerParam hiddenDangerCate = hiddenDangerParamMapper.selectById(hiddenDanger.getCateId()); |
| | | if(Objects.isNull(hiddenDangerCate)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°éæ£ç±»å"); |
| | |
| | | .eq(pageWrap.getModel().getCheckInfo() != null, HiddenDanger::getCheckInfo, pageWrap.getModel().getCheckInfo()) |
| | | .eq(pageWrap.getModel().getCheckUserId() != null, HiddenDanger::getCheckUserId, pageWrap.getModel().getCheckUserId()) |
| | | .eq(pageWrap.getModel().getAreaName() != null, HiddenDanger::getAreaName, pageWrap.getModel().getAreaName()) |
| | | .like(pageWrap.getModel().getCompanyName() != null,"t4.company_name_path",pageWrap.getModel().getCompanyName()) |
| | | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | |
| | | } |
| | | } |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insertBatchSomeColumn(fileList); |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import cn.hutool.core.util.PhoneUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Autowired |
| | | @Lazy |
| | | private SmsEmailService smsEmailService; |
| | | |
| | | @Autowired |
| | | private SystemLoginService systemLoginService; |
| | | |
| | | @Value("${debug_model}") |
| | | private Boolean isDebug; |
| | |
| | | memberRole.setRoleId(deviceRole.getId()); |
| | | memberRoleList.add(memberRole); |
| | | } |
| | | memberRoleMapper.insertBatchSomeColumn(memberRoleList); |
| | | memberRoleMapper.insert(memberRoleList); |
| | | } |
| | | member.setRoleId(ids); |
| | | return 1; |
| | |
| | | queryWrapper.eq(Member::getCompanyId,member.getCompanyId()); |
| | | } |
| | | queryWrapper.eq(Member::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(Member::getWorkStatus,Constants.ZERO); |
| | | List<Member> list = memberJoinMapper.selectJoinList(Member.class,queryWrapper); |
| | | // if(list!=null){ |
| | | // for(Member m : list){ |
| | |
| | | list.add(model); |
| | | } |
| | | //导å
¥æ°å¢çææä¿¡æ¯ |
| | | empowerMapper.insertBatchSomeColumn(list); |
| | | empowerMapper.insert(list); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public WxAuthorizeVO wxAuthorize(String code){ |
| | | public WxAuthorizeVO wxAuthorize(String code, Integer source){ |
| | | if(StringUtils.isBlank(code)||Objects.isNull(source)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | String appId = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode(); |
| | | String appSecret = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode(); |
| | | String getTokenUrl = WXConstant.GET_USER_INFO_URL.replace("CODE", code) |
| | |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Member::getOpenid,openId) |
| | | .eq(Member::getType,source) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(Member::getCreateDate) |
| | | .last(" limit 1 ") |
| | |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | member.setPrefixUrl(prefixUrl); |
| | | // JwtPayLoad payLoad = new JwtPayLoad(Integer.toString(member.getId())); |
| | | // String token = JwtTokenUtil.generateToken(payLoad); |
| | | // //åå¨tokenè³redis |
| | | // RedisUtil.addObject(redisTemplate,Constants.RedisKeys.INTERNAL_TOKEN+"_"+member.getId(),token,Constants.RedisKeys.EXPIRE_TIME); |
| | | // wxAuthorizeVO.setToken(token); |
| | | wxAuthorizeVO.setMember(member); |
| | | //叿º ä¸ å
é¨äººå æä¾token |
| | | if(Constants.equalsInteger(source,Constants.ZERO)||Constants.equalsInteger(source,Constants.TWO)){ |
| | | SystemUser systemUser = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda().eq(SystemUser::getMemberId,member.getId()) |
| | | .eq(SystemUser::getStatus,Constants.ZERO).last(" limit 1 ")); |
| | | if(Objects.nonNull(systemUser)){ |
| | | String token = systemLoginService.loginByUserId(systemUser.getId()); |
| | | wxAuthorizeVO.setToken(token); |
| | | } |
| | | } |
| | | } |
| | | return wxAuthorizeVO; |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public WxAuthorizeVO accountLogin(AccountLoginDTO accountLoginDTO){ |
| | | System.out.println(DESUtil.decrypt(Constants.EDS_PWD,"eIaPD5AR5DBuTBE9MW14QRG07IDKXCdh")); |
| | | if(accountLoginDTO.getAccount().length()!=18 |
| | | //&&!IdcardUtil.isValidCard(accountLoginDTO.getAccount()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼èº«ä»½è¯å·ç æè¯¯ï¼è¯·æ ¸å®åéè¯ï¼"); |
| | | } |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIdcardNo, DESUtil.encrypt(Constants.EDS_PWD, accountLoginDTO.getAccount())) |
| | | .ne(Member::getType,Constants.memberType.visitor) |
| | | ); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ç¨æ·,请è系管çå"); |
| | | } |
| | | if(member.getIsdeleted() == Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²å é¤,请è系管çå"); |
| | | } |
| | | if(member.getStatus() != Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²ç¦ç¨,请è系管çå"); |
| | | } |
| | | String md5Password = DESUtil.encrypt(Constants.EDS_PWD, accountLoginDTO.getPassword()); |
| | | if(!md5Password.equals(member.getPassward())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦æ·å¯ç é误!"); |
| | | } |
| | | if(StringUtils.isNotBlank(accountLoginDTO.getOpenId())){ |
| | | //å
æ¸
空åæè®¿å®¢çopenidç»å®å
³ç³» |
| | | memberMapper.update(null, new UpdateWrapper<Member>().lambda() |
| | | .ne(Member::getType,Constants.memberType.visitor) |
| | | .eq(Member::getOpenid,accountLoginDTO.getOpenId()) |
| | | .set(Member::getOpenid,null) |
| | | ); |
| | | //æ´æ°å½åç»å½ç¨æ· openId |
| | | member.setOpenid(accountLoginDTO.getOpenId()); |
| | | memberMapper.updateById(member); |
| | | } |
| | | WxAuthorizeVO wxAuthorizeVO = new WxAuthorizeVO(); |
| | | JwtPayLoad payLoad = new JwtPayLoad(Integer.toString(member.getId())); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | //åå¨tokenè³redis |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.INTERNAL_TOKEN+"_"+member.getId(),token,Constants.RedisKeys.EXPIRE_TIME); |
| | | wxAuthorizeVO.setToken(token); |
| | | return wxAuthorizeVO; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda().eq(Member::getIsdeleted,Constants.ZERO)); |
| | | if(CollectionUtils.isNotEmpty(memberList)){ |
| | | stagingHeadVO.setWorkerCount(memberList.stream().filter(m->m.getType().equals(Constants.memberType.internal)).count()); |
| | | stagingHeadVO.setLwCount(memberList.stream().filter(m->m.getType().equals(Constants.memberType.lw_visitor)).count()); |
| | | stagingHeadVO.setLwCount(memberList.stream().filter(m->m.getType().equals(Constants.memberType.driver)).count()); |
| | | stagingHeadVO.setVisitorCount(memberList.stream().filter(m->m.getType().equals(Constants.memberType.visitor)).count()); |
| | | } |
| | | //å¨åºè½¦è¾ |
| | |
| | | new MPJLambdaWrapper<Member>() |
| | | .select("count(1) as memberCount, t1.name as companyName") |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Member::getType,Constants.memberType.lw_visitor) |
| | | .eq(Member::getType,Constants.memberType.driver) |
| | | .groupBy(Company::getId,Company::getName) |
| | | ); |
| | | List<Map<String,Object>> retentionMaps = retentionJoinMapper.selectMaps(new MPJLambdaWrapper<Retention>() |
| | |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼å工信æ¯ã"+insert.getName()+"ã忥å®é²å¹³å°å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | } |
| | | memberMapper.insertBatchSomeColumn(newList); |
| | | memberMapper.insert(newList); |
| | | List<SystemUser> userList = new ArrayList<>(); |
| | | for(Member insert: newList){ |
| | | //å建系ç»ç»éè´¦å·ï¼é»è®¤æ ä»»ä½è§è²ï¼ |
| | |
| | | } |
| | | } |
| | | if(userList.size()>0){ |
| | | systemUserMapper.insertBatchSomeColumn(userList); |
| | | systemUserMapper.insert(userList); |
| | | } |
| | | }catch (Exception e){ |
| | | //妿åçå¼å¸¸ï¼å é¤å·²ç»å建ç人åä¿¡æ¯ |
| | |
| | | parkBook.setRemark("å¾
忥å®é²å¹³å°"); |
| | | parkBookList.add(parkBook); |
| | | } |
| | | parkBookMapper.insertBatchSomeColumn(parkBookList); |
| | | parkBookMapper.insert(parkBookList); |
| | | } |
| | | return 0; |
| | | } |
| | |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å³å¡äººå"); |
| | | } |
| | | if(!member.getType().equals(Constants.memberType.lw_visitor)){ |
| | | if(!member.getType().equals(Constants.memberType.driver)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éå³å¡äººåç±»åï¼çé¢å¤±è´¥"); |
| | | } |
| | | if(!member.getStatus().equals(Constants.ZERO)){ |
| | |
| | | if(newList == null || newList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å½å
¥æææ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | trainTimeMapper.insertBatchSomeColumn(newList); |
| | | trainTimeMapper.insert(newList); |
| | | return "导å
¥æå"; |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | |
| | | update.setEditor(userInfo.getId()); |
| | | update.setEditDate(new Date()); |
| | | update.setIsdeleted(Constants.ONE); |
| | | update.setId(id); |
| | | visitReasonMapper.updateById(update); |
| | | |
| | | } |
| | |
| | | } |
| | | visits.setWithUserList(visitsList); |
| | | } |
| | | this.createFk(visits,true); |
| | | this.createFk(visits,true,Constants.ONE); |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.NOT_SUPPORTED) |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer createFk(Visits visits,Boolean isERP) { |
| | | public Integer createFk(Visits visits,Boolean isERP,Integer source) { |
| | | isValidBaseParam(visits); |
| | | //æ£æ¥æ¯å¦å¿
é¡»çé¢ï¼å¹¶ä¸ç¬¦åçé¢è¦æ± |
| | | ProblemLog problemLog = isValidProblemLog(visits); |
| | | ProblemLog problemLog = isValidProblemLog(visits,source); |
| | | //è·åç³è¯·ç海康访é®é¨ç¦ç»ä¿¡æ¯ |
| | | getHkDeviceRoles(visits,isERP); |
| | | //æ£éªæè®¿äººæ¯å¦åæ³ |
| | | Member visitMember = isValideVisitedUser(visits.getReceptMemberId()); |
| | | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())&&visits.getIdcardNo().length()!=18 |
| | | // &&!IdcardUtil.isValidCard(visits.getIdcardNo()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼èº«ä»½è¯å·ç æè¯¯ï¼è¯·æ ¸å®åéè¯ï¼"); |
| | | } |
| | |
| | | approve.setObjId(visitId); |
| | | approveList.add(approve); |
| | | } |
| | | approveMapper.insertBatchSomeColumn(approveList); |
| | | approveMapper.insert(approveList); |
| | | } |
| | | } |
| | | |
| | |
| | | approve.setObjId(visitId); |
| | | approveList.add(approve); |
| | | } |
| | | approveMapper.insertBatchSomeColumn(approveList); |
| | | approveMapper.insert(approveList); |
| | | } |
| | | } |
| | | |
| | |
| | | }else if(visits.getType().equals(Constants.ONE) && StringUtils.isBlank(visits.getConstructionReason())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æªå¡«åæ½å·¥äºç±ï¼"); |
| | | } |
| | | if(visits.getEndtime().getTime() < System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼å
¥åæ¶é´å¿
须大äºå½åæ¶é´ï¼");// |
| | | } |
| | | if(visits.getEndtime().getTime() <= visits.getStarttime().getTime()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ç¦»åæ¶é´å¿
须大äºå
¥åæ¶é´ï¼");// |
| | | } |
| | | if(visits.getEndtime().getTime() <= System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼å
¥åæ¶é´å¿
须大äºå½åæ¶é´ï¼");// |
| | | } |
| | | if(!DateUtil.getDateLong(visits.getEndtime()).equals(DateUtil.getDateLong(visits.getStarttime()))){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼é¢çº¦æ¥æä¸å¯ä»¥è·¨å¤©ï¼"); |
| | |
| | | v.setSourceType(visits.getSourceType()); |
| | | } |
| | | //æ¹éæå
¥æ°æ® |
| | | visitsMapper.insertBatchSomeColumn(visits.getWithUserList()); |
| | | visitsMapper.insert(visits.getWithUserList()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | //æ ¸æ¥é¢çº¦ç¨æ·æ¯å¦å卿ªç¾ç¦»çé¢çº¦è®°å½ |
| | | // isExsitNoOutVisisRecord(member); |
| | | |
| | | member.setFaceImg(visits.getFaceImg()); |
| | | member.setImgurl(StringUtils.isNotBlank(visits.getImgurl())?visits.getImgurl():null); |
| | | member.setEditDate(visits.getCreateDate()); |
| | |
| | | return member; |
| | | } |
| | | |
| | | private ProblemLog isValidProblemLog(Visits visits) { |
| | | /** |
| | | * æ¯å¦éè¦çé¢ |
| | | * @param visits |
| | | * @param source |
| | | * @return |
| | | */ |
| | | private ProblemLog isValidProblemLog(Visits visits,Integer source) { |
| | | if(!Constants.equalsInteger(source,Constants.ZERO)){ |
| | | return null; |
| | | } |
| | | String required = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.PROBLEM_VISIT_REQUIRED).getCode(); |
| | | if(StringUtils.equals(required,Constants.ONE+"")&&visits.getSourceType()==Constants.ZERO&&!visits.getType().equals(Constants.TWO)){ |
| | | //妿å¿
é¡»çé¢ï¼æ¥æ¾çé¢è®°å½ |
| | |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | |
| | | queryWrapper.eq(Visits::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getType()),Visits::getType,pageWrap.getModel().getType()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getType())&&Constants.equalsInteger(pageWrap.getModel().getType(),Constants.TWO),Visits::getType,pageWrap.getModel().getType()); |
| | | queryWrapper.ne(Objects.nonNull(pageWrap.getModel().getType())&&!Constants.equalsInteger(pageWrap.getModel().getType(),Constants.TWO),Visits::getType,Constants.TWO); |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getOpenid()),Visits::getOpenid,pageWrap.getModel().getOpenid()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getCarNos()),Visits::getCarNos,pageWrap.getModel().getCarNos()); |
| | | // queryWrapper.eq(StringUtils.isBlank(pageWrap.getModel().getOpenid()),"1","2"); |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getName()),ms->ms.like(Visits::getName,pageWrap.getModel().getName()) |
| | | .or().like(Visits::getPhone,pageWrap.getModel().getName())) |
| | |
| | | .eq(Objects.nonNull(pageWrap.getModel().getStatus()),Visits::getStatus,pageWrap.getModel().getStatus()); |
| | | queryWrapper.isNull(Visits::getParentId); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Visits::getMemberId,pageWrap.getModel().getMemberId()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getReceptMemberId()),Visits::getReceptMemberId,pageWrap.getModel().getReceptMemberId()); |
| | | queryWrapper.orderByDesc(Visits::getCreateDate); |
| | | IPage<Visits> result = visitsJoinMapper.selectJoinPage(page, Visits.class,queryWrapper); |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°è¢«è®¿å工信æ¯"); |
| | | } |
| | | VisitDetailVO visitDetailVO = new VisitDetailVO(); |
| | | visitDetailVO.setCreateTime(visits.getCreateDate()); |
| | | visitDetailVO.setStatus(visits.getStatus()); |
| | | visitDetailVO.setCarNos(visits.getCarNos()); |
| | | visitDetailVO.setPhone(visits.getPhone()); |
| | | visitDetailVO.setVisitUserName(member.getName()); |
| | | visitDetailVO.setVisitReason(visits.getReason()); |
| | | visitDetailVO.setQrcode(visits.getQrcode()); |
| | | visitDetailVO.setIdcardType(visits.getIdcardType()); |
| | | visitDetailVO.setVisitTime(DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm") + " è³ " + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm") ); |
| | | //被访人åé¨é¨ |
| | | Company company = companyMapper.selectById(member.getCompanyId()); |
| | |
| | | visitDetailVO.setConstructionReason(visits.getConstructionReason()); |
| | | visitDetailVO.setImgUrl(visits.getImgurl()); |
| | | visitDetailVO.setIdCardDecode(visits.getIdcardDecode()); |
| | | visitDetailVO.setFaceImg(visits.getFaceImg()); |
| | | visitDetailVO.setPrefix(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode()); |
| | | if(StringUtils.isNotBlank(visits.getDoors())){ |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.erp.ErpConstants; |
| | | import com.doumee.core.erp.ErpTool; |
| | |
| | | List<Company> allList = companyMapper.selectList(new QueryWrapper<Company>().lambda().eq(Company::getType,Constants.ONE)); |
| | | dealCompanyChangeList(list,addList,updateList,delIds,allList); |
| | | if(addList.size()>0){ |
| | | companyMapper.insertBatchSomeColumn(addList); |
| | | companyMapper.insert(addList); |
| | | } |
| | | if(updateList.size()>0){ |
| | | for(Company c : updateList){ |
| | |
| | | .eq(Member::getType, Constants.memberType.internal)); |
| | | dealUserChangeList(list,addList,updateList,delList,allList,param); |
| | | if(addList.size()>0){ |
| | | memberMapper.insertBatchSomeColumn(addList); |
| | | memberMapper.insert(addList); |
| | | /* for (Member member:addList) { |
| | | dealRoleEmpower(member ); |
| | | }*/ |
| | |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public AccessTokenResponse createERPToken(String accessKey, String accessSecret){ |
| | | AccessTokenResponse result = new AccessTokenResponse(); |
| | | try{ |
| | | String erpAccessKey = systemDictDataBiz.queryByCode(Constants.ERP_CONFIG,Constants.ERP_ACCESS_KEY).getCode(); |
| | | String erpAccessSecret = systemDictDataBiz.queryByCode(Constants.ERP_CONFIG,Constants.ERP_ACCESS_SECRET).getCode(); |
| | | if(!(accessKey.equals(erpAccessKey)&&erpAccessSecret.equals(accessSecret))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç§é¥å¹é
失败"); |
| | | } |
| | | JwtPayLoad payLoad = new JwtPayLoad(erpAccessKey+"-"+erpAccessSecret); |
| | | String token = JwtTokenUtil.generateToken(payLoad); |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.ERP_TOKEN,token,Constants.RedisKeys.EXPIRE_TIME); |
| | | result.setToken(token); |
| | | result.setExpireTime(Constants.RedisKeys.EXPIRE_TIME); |
| | | return result; |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | }finally { |
| | | Map<String,String> param = new HashMap<>(); |
| | | param.put("accessKey",accessKey); |
| | | param.put("accessSecret",accessSecret); |
| | | saveInterfaceLog(param,"/visitBiz/accesstoken",JSONObject.toJSONString(result),Constants.ZERO); |
| | | } |
| | | |
| | | } |
| | | // @Override |
| | | // public AccessTokenResponse createERPToken(String accessKey, String accessSecret){ |
| | | // AccessTokenResponse result = new AccessTokenResponse(); |
| | | // try{ |
| | | // String erpAccessKey = systemDictDataBiz.queryByCode(Constants.ERP_CONFIG,Constants.ERP_ACCESS_KEY).getCode(); |
| | | // String erpAccessSecret = systemDictDataBiz.queryByCode(Constants.ERP_CONFIG,Constants.ERP_ACCESS_SECRET).getCode(); |
| | | // if(!(accessKey.equals(erpAccessKey)&&erpAccessSecret.equals(accessSecret))){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç§é¥å¹é
失败"); |
| | | // |
| | | // String token = JwtTokenUtil.generateToken(payLoad); |
| | | // RedisUtil.addObject(redisTemplate,Constants.RedisKeys.ERP_TOKEN,token,Constants.RedisKeys.EXPIRE_TIME); |
| | | // result.setToken(token); |
| | | // result.setExpireTime(Constants.RedisKeys.EXPIRE_TIME); |
| | | // return result; |
| | | // }catch (BusinessException e){ |
| | | // throw e; |
| | | // }finally { |
| | | // Map<String,String> param = new HashMap<>(); |
| | | // param.put("accessKey",accessKey); |
| | | // param.put("accessSecret",accessSecret); |
| | | // saveInterfaceLog(param,"/visitBiz/accesstoken",JSONObject.toJSONString(result),Constants.ZERO); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * é¨ç¦ç»å
¨éæ¥å£ |
| | |
| | | } |
| | | } |
| | | if(memberCardList.size()>0){ |
| | | memberCardMapper.insertBatchSomeColumn(memberCardList); |
| | | memberCardMapper.insert(memberCardList); |
| | | } |
| | | } |
| | | } |
| | |
| | | parkBook.setRemark("å¾
忥å®é²å¹³å°"); |
| | | parkBookList.add(parkBook); |
| | | } |
| | | parkBookMapper.insertBatchSomeColumn(parkBookList); |
| | | parkBookMapper.insert(parkBookList); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å车åºä¿¡æ¯ä¸åå¨ï¼ææå¤±è´¥"); |
| | | } |
| | |
| | | } |
| | | } |
| | | if(addList.size()>0){ |
| | | deviceMapper.insertBatchSomeColumn(addList); |
| | | deviceMapper.insert(addList); |
| | | } |
| | | if(editList.size()>0){ |
| | | for(Device d : editList){ |
| | |
| | | } |
| | | } |
| | | if(addList.size()>0){ |
| | | deviceMapper.insertBatchSomeColumn(addList); |
| | | deviceMapper.insert(addList); |
| | | } |
| | | if(editList.size()>0){ |
| | | for(Device d : editList){ |
| | |
| | | } |
| | | } |
| | | if(addList.size()>0){ |
| | | parksMapper.insertBatchSomeColumn(addList); |
| | | parksMapper.insert(addList); |
| | | } |
| | | if(editList.size()>0){ |
| | | for(Parks d : editList){ |
| | |
| | | |
| | | List<CarEvent> sublist = allHkList.subList(startIndex, endIndex); |
| | | if(sublist.size()>0){ |
| | | carEventMapper.insertBatchSomeColumn(sublist);//æå
¥æ°æ°æ® |
| | | carEventMapper.insert(sublist);//æå
¥æ°æ°æ® |
| | | } |
| | | startIndex = endIndex; |
| | | endIndex += sublistSize; |
| | |
| | | } |
| | | } |
| | | if(addList.size()>0){ |
| | | DeviceRoleMapper.insertBatchSomeColumn(addList); |
| | | DeviceRoleMapper.insert(addList); |
| | | } |
| | | if(editList.size()>0){ |
| | | for(DeviceRole d : editList){ |
| | |
| | | } |
| | | if(list.size()>0){ |
| | | //æå
¥é¨ç¦è®°å½ |
| | | deviceEventMapper.insertBatchSomeColumn(list); |
| | | deviceEventMapper.insert(list); |
| | | } |
| | | if(delRetentionLis.size()>0){ |
| | | //å
å é¤åæçå¨åºäººå(å
é¨äººåï¼ |
| | |
| | | } |
| | | if(retentionList.size()>0){ |
| | | //åæå
¥ææ°çå¨å人å |
| | | retentionMapper.insertBatchSomeColumn(retentionList); |
| | | retentionMapper.insert(retentionList); |
| | | } |
| | | log.error("ãæµ·åº·é¨ç¦äºä»¶æ¨éã========æå======="); |
| | | }catch (Exception e) { |
| | |
| | | } |
| | | if(list.size()>0){ |
| | | //æå
¥é¨ç¦è®°å½ |
| | | visitEventMapper.insertBatchSomeColumn(list); |
| | | visitEventMapper.insert(list); |
| | | } |
| | | if(delRetentionLis.size()>0){ |
| | | //å
å é¤åæçå¨åºäººå(æ®éè®¿å®¢ï¼ |
| | |
| | | } |
| | | if(retentionList.size()>0){ |
| | | //åæå
¥ææ°çå¨å人å |
| | | retentionMapper.insertBatchSomeColumn(retentionList); |
| | | retentionMapper.insert(retentionList); |
| | | } |
| | | log.error("ãæµ·åº·è®¿å®¢äºä»¶æ¨éã========æå======="); |
| | | }catch (Exception e){ |
| | |
| | | } |
| | | if(list.size()>0){ |
| | | //æå
¥é¨ç¦è®°å½ |
| | | carEventMapper.insertBatchSomeColumn(list); |
| | | carEventMapper.insert(list); |
| | | } |
| | | if(delRetentionList.size()>0){ |
| | | //å
å é¤åæçå¨åºäººå(å
é¨äººåï¼ |
| | |
| | | } |
| | | if(retentionList.size()>0){ |
| | | //åæå
¥ææ°çå¨å人å |
| | | retentionMapper.insertBatchSomeColumn(retentionList); |
| | | retentionMapper.insert(retentionList); |
| | | } |
| | | log.error("ãæµ·åº·å车åºäºä»¶æ¨éã========æå======="); |
| | | }catch (Exception e){ |
| | |
| | | .eq(Empower::getMemberId,member.getId()) |
| | | .eq(Empower::getIsdeleted,Constants.ZERO) |
| | | .in(Empower::getDeviceId,deviceIds) ); |
| | | empowerMapper.insertBatchSomeColumn(list); |
| | | empowerMapper.insert(list); |
| | | } |
| | | } |
| | | } |
| | |
| | | .eq(Empower::getMemberId,member.getId()) |
| | | .eq(Empower::getIsdeleted,Constants.ZERO) |
| | | .in(Empower::getDeviceId,deviceIds) ); |
| | | empowerMapper.insertBatchSomeColumn(list); |
| | | empowerMapper.insert(list); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ç»ç»ä¿¡æ¯ï¼"); |
| | | } |
| | | companyMapper.delete(new UpdateWrapper<>());//æ¸
ç©ºåææ°æ® |
| | | companyMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | companyMapper.insert(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | }catch (Exception e){ |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ç»ç»ä¿¡æ¯ï¼"); |
| | | } |
| | | memberMapper.delete(new UpdateWrapper<>());//æ¸
ç©ºåææ°æ® |
| | | memberMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | memberMapper.insert(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | }catch (Exception e){ |
| | |
| | | } |
| | | //æ¸
空åæçæ°æ® |
| | | carsMapper.delete(new UpdateWrapper<>()); |
| | | carsMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | carsMapper.insert(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | } |
| | |
| | | .ge(Visits::getStarttime,start) |
| | | .eq(Visits::getType,Constants.ONE) |
| | | .le(Visits::getStarttime,end)); |
| | | visitsMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | visitsMapper.insert(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | } |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | return request; |
| | | } |
| | | |
| | | protected String getToken() { |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.HEADER_KEY); |
| | | return obj != null ? obj.toString() : null; |
| | | } |
| | | // protected String getToken() { |
| | | // Object obj = this.getRequest().getAttribute(JwtTokenUtil.HEADER_KEY); |
| | | // return obj != null ? obj.toString() : null; |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | @RestController |
| | | @RequestMapping("/visitbiz") |
| | | @Slf4j |
| | | public class BizResourceController extends ApiController { |
| | | public class BizResourceController{ |
| | | |
| | | @Autowired |
| | | private ERPSyncService erpSyncService; |
| | |
| | | private VisitsService visitsService; |
| | | |
| | | |
| | | @ApiOperation(value = "è°ç¨åæ®è·åæ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼åERPæä¾ç»æ¥å£è°ç¨åè¯") |
| | | /* @ApiOperation(value = "è°ç¨åæ®è·åæ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼åERPæä¾ç»æ¥å£è°ç¨åè¯") |
| | | @GetMapping("/accesstoken") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "accessKey", value = "访é®keyï¼ç±è®¿å®¢ç«¯æä¾", required = true), |
| | |
| | | public ApiResponse<AccessTokenResponse> accesstoken(@RequestParam String accessKey, @RequestParam String accessSecret) { |
| | | ApiResponse response = ApiResponse.success(null); |
| | | try { |
| | | response.setData(erpSyncService.createERPToken(accessKey,accessSecret)); |
| | | // response.setData(erpSyncService.createERPToken(accessKey,accessSecret)); |
| | | }catch (BusinessException e){ |
| | | response = ApiResponse.failed(e.getCode(), e.getMessage()); |
| | | }catch (Exception e){ |
| | |
| | | map.put("FTPèµæºè®¿é®æ å°å°å", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()); |
| | | return ApiResponse.success(map); |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/erp/resource") |
| | | @Slf4j |
| | | public class ErpResourceController extends ApiController { |
| | | public class ErpResourceController{ |
| | | @ApiOperation(value = "å
¨éç»ç»ä¿¡æ¯æ¥å£", notes = "ERP端æä¾ï¼ä¾è®¿å®¢ç«¯æåå
¨é¨ç»ç»ä¿¡æ¯ï¼ç¨äºåå§ååå¨ææ§æ°æ®æ ¸æ¥") |
| | | @PostMapping("/org/list") |
| | | public ERPApiResponse<PageData<ErpOrgListResponse>> orgList (@RequestBody PageWrap<OrgListRequest> pageWrap) { |