Browse Source

Merge branch 'master' of dd.tall.wiki:ccsens_wiki/defaultwbs

master
zy_Java 4 years ago
parent
commit
0d78891c01
  1. 59
      src/main/java/com/ccsens/defaultwbs/api/ClockingInController.java

59
src/main/java/com/ccsens/defaultwbs/api/ClockingInController.java

@ -0,0 +1,59 @@
package com.ccsens.defaultwbs.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.common.bean.dto.CClockingInDto;
import com.ccsens.common.bean.dto.CDeliverDto;
import com.ccsens.common.bean.vo.CClockingInVo;
import com.ccsens.common.bean.vo.CDeliverVo;
import com.ccsens.common.service.IClockingInService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author AUSU
*/
@Api(tags = "考勤相关")
@RestController
@RequestMapping("/clock")
@Slf4j
public class ClockingInController {
@Resource
private IClockingInService clockingInService;
@MustLogin
@ApiOperation(value = "查询考勤信息", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CClockingInVo.ClockingInInfo>> queryDeliverOfTask(@ApiParam @Validated @RequestBody QueryDto<CClockingInDto.QueryClockingIn> params) throws Exception{
List<CClockingInVo.ClockingInInfo> clockingInInfos = clockingInService.queryClockingIn(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok(clockingInInfos);
}
@MustLogin
@ApiOperation(value = "打卡", notes = "")
@RequestMapping(value = "/punch", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse punchTheClock(@ApiParam @Validated @RequestBody QueryDto<CClockingInDto.PunchTheClock> params) throws Exception{
clockingInService.punchTheClock(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "审核打卡", notes = "")
@RequestMapping(value = "/audit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse auditRecord(@ApiParam @Validated @RequestBody QueryDto<CClockingInDto.Audit> params) throws Exception{
clockingInService.auditRecord(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok();
}
}
Loading…
Cancel
Save