|
|
|
|
@ -3,12 +3,14 @@ package com.flossom.miniProgram.controller;
|
|
|
|
|
import com.flossom.common.core.constant.Constants;
|
|
|
|
|
import com.flossom.common.core.domain.R;
|
|
|
|
|
import com.flossom.common.core.domain.SysFile;
|
|
|
|
|
import com.flossom.common.core.domain.entity.WxClockLog;
|
|
|
|
|
import com.flossom.common.core.domain.entity.WxClockStatistics;
|
|
|
|
|
import com.flossom.common.core.domain.req.WxClockLogReq;
|
|
|
|
|
import com.flossom.common.core.domain.ret.WxClockLogRet;
|
|
|
|
|
import com.flossom.common.core.exception.ServiceException;
|
|
|
|
|
import com.flossom.common.core.web.controller.BaseController;
|
|
|
|
|
import com.flossom.common.core.web.page.TableDataInfo;
|
|
|
|
|
import com.flossom.common.security.utils.SecurityUtils;
|
|
|
|
|
import com.flossom.miniProgram.service.IWxClockLogService;
|
|
|
|
|
import com.flossom.system.api.RemoteFileService;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
@ -18,8 +20,13 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.LocalTime;
|
|
|
|
|
import java.time.YearMonth;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用户打卡Controller
|
|
|
|
|
@ -58,10 +65,13 @@ public class WxClockLogController extends BaseController {
|
|
|
|
|
* 分页查询用户的打卡记录
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
public TableDataInfo list() {
|
|
|
|
|
startPage();
|
|
|
|
|
List<WxClockLogRet> list = wxClockLogService.selectWxClockLogList();
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
public R list(@RequestParam(value = "year") Integer year, @RequestParam(value = "month") Integer month) {
|
|
|
|
|
WxClockLog queryClockLog = new WxClockLog();
|
|
|
|
|
queryClockLog.setUserId(SecurityUtils.getLoginUser().getWxUserMember().getId());
|
|
|
|
|
YearMonth targetYearMonth = YearMonth.of(year, month);
|
|
|
|
|
queryClockLog.getParams().put("beginTime", targetYearMonth.atDay(1).atStartOfDay());
|
|
|
|
|
queryClockLog.getParams().put("endTime", targetYearMonth.atEndOfMonth().atTime(LocalTime.MAX));
|
|
|
|
|
return R.ok(wxClockLogService.selectWxClockLogList(queryClockLog));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|