Merge remote-tracking branch 'origin/1.0' into 1.0
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.Min; |
| | | import java.time.LocalDate; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "最大下单数量") |
| | | @Min(value = 0, message = "不能为负") |
| | | @Max(value = 99999, message = "最大不能超过99999") |
| | | private Integer maxOrderNum; |
| | | |
| | | public Boolean getStatus() { |
| | |
| | | |
| | | @ApiOperation(value = "上班打卡", tags = "运维APP-排班与考勤") |
| | | @PostMapping("/maintenance-app/api/v1/clock/clockIn") |
| | | public R<String> clockIn(@RequestBody ClockDTO dto) { |
| | | public R<Integer> clockIn(@RequestBody ClockDTO dto) { |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | dto.setOperationsUserId(id); |
| | | return xpClockInService.clockIn(dto); |
| | |
| | | |
| | | @ApiOperation(value = "下班打卡", tags = "运维APP-排班与考勤") |
| | | @PostMapping("/maintenance-app/api/v1/clock/clockOut") |
| | | public R<String> clockOut(@RequestBody ClockDTO dto) { |
| | | public R<Integer> clockOut(@RequestBody ClockDTO dto) { |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | dto.setOperationsUserId(id); |
| | | return xpClockInService.clockOut(dto); |
| | |
| | | @PostMapping("/api/v1/clock/exportClockInStatisticsDetails") |
| | | public void exportClockInStatisticsDetails(@RequestBody ClockInStatisticsDetailsVo query, HttpServletResponse response) { |
| | | xpClockInService.exportClockInStatisticsDetails(query, response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取打卡详情", tags = "运维APP-排班与考勤") |
| | | @PostMapping("/maintenance-app/api/v1/clock/getClockInfo") |
| | | public R<XpClockIn> getClockInfo(){ |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | XpClockIn one = xpClockInService.getOne(new QueryWrapper<XpClockIn>().eq("app_user_id", id) |
| | | .eq("is_deleted", 0).last(" and DATE(create_time) = DATE(NOW())")); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | R<String> clockIn(ClockDTO dto); |
| | | R<Integer> clockIn(ClockDTO dto); |
| | | |
| | | /** |
| | | * 下班打卡 |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | R<String> clockOut(ClockDTO dto); |
| | | R<Integer> clockOut(ClockDTO dto); |
| | | /** |
| | | * 检查用户是否上班中 |
| | | * @param appUserId 用户ID |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<String> clockIn(ClockDTO dto) { |
| | | public R<Integer> clockIn(ClockDTO dto) { |
| | | |
| | | XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId()); |
| | | if (null == xpCheckLocation) { |
| | |
| | | } |
| | | this.save(xpClockIn); |
| | | sendAgreementUpdateNotification(now); |
| | | return R.ok(); |
| | | return R.ok(xpClockIn.getClockInResult()); |
| | | } |
| | | |
| | | @Override |
| | | public R<String> clockOut(ClockDTO dto) { |
| | | public R<Integer> clockOut(ClockDTO dto) { |
| | | |
| | | XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId()); |
| | | if (null == xpCheckLocation) { |
| | |
| | | xpClockIn.setAppUserId(null); |
| | | this.updateById(xpClockIn); |
| | | sendAgreementUpdateNotification(now); |
| | | return R.ok(); |
| | | return R.ok(xpClockIn.getClockOutResult()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | candidates.add(account); |
| | | } |
| | | if (CollUtil.isEmpty(candidates)) { |
| | | return R.fail("所有帐号添加失败,请检查帐号格式或唯一性"); |
| | | } |
| | | |
| | | Set<String> existsAccounts = new HashSet<>(); |
| | | if (CollUtil.isNotEmpty(candidates)) { |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, nick_name, account, status, is_priority_dispatch, whitelist_source, is_deleted, create_time, update_time, create_by, update_by |
| | | id, nick_name, account, status, is_priority_dispatch, whitelist_source,expire_time, is_deleted, create_time, update_time, create_by, update_by |
| | | </sql> |
| | | <select id="pageList" resultType="com.xiaopeng.api.model.operation.XpWhitelist"> |
| | | select id,nick_name as nickName,account,status,is_priority_dispatch as isPriorityDispatch,whitelist_source as whitelistSource |
| | | select |
| | | id,nick_name as nickName,account,status,is_priority_dispatch as isPriorityDispatch,whitelist_source as whitelistSource,expire_time as expireTime |
| | | ,create_time as createTime,update_time as updateTime,create_by as createBy,update_by as updateBy |
| | | from xp_whitelist |
| | | where is_deleted = 0 |
| | |
| | | order by create_time desc |
| | | </select> |
| | | <select id="exportList" resultType="com.xiaopeng.api.model.operation.XpWhitelist"> |
| | | select id,nick_name as nickName,account,status,is_priority_dispatch as isPriorityDispatch,whitelist_source as whitelistSource |
| | | select id,nick_name as nickName,account,status,is_priority_dispatch as isPriorityDispatch,whitelist_source as whitelistSource,expire_time as expireTime |
| | | ,create_time as createTime,update_time as updateTime,create_by as createBy,update_by as updateBy |
| | | from xp_whitelist |
| | | where is_deleted = 0 |