Browse Source

20211019加日志

master
zy_Java 4 years ago
parent
commit
f8fff7f96e
  1. 6
      src/main/java/com/ccsens/defaultwbs/api/ClockingInController.java
  2. 2
      src/main/java/com/ccsens/defaultwbs/bean/dto/ClockingInDto.java
  3. 4
      src/main/java/com/ccsens/defaultwbs/service/ClockingInService.java

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

@ -2,9 +2,7 @@ package com.ccsens.defaultwbs.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.defaultwbs.bean.dto.ClockingInDto;
import com.ccsens.defaultwbs.bean.dto.DeliverDto;
import com.ccsens.defaultwbs.bean.vo.ClockingInVo;
import com.ccsens.defaultwbs.bean.vo.DeliverVo;
import com.ccsens.defaultwbs.service.IClockingInService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
@ -37,7 +35,9 @@ public class ClockingInController {
@ApiOperation(value = "查询考勤信息", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ClockingInVo.ClockingInInfo>> queryDeliverOfTask(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.QueryClockingIn> params) throws Exception{
log.info("查询打卡信息:{}",params);
List<ClockingInVo.ClockingInInfo> clockingInInfos = clockingInService.queryClockingIn(params.getParam(), params.getUserId());
log.info("查询-打卡信息返回:{}",clockingInInfos);
return JsonResponse.newInstance().ok(clockingInInfos);
}
@ -45,6 +45,7 @@ public class ClockingInController {
@ApiOperation(value = "打卡", notes = "")
@RequestMapping(value = "/punch", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse punchTheClock(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.PunchTheClock> params) throws Exception{
log.info("打卡:{}",params);
clockingInService.punchTheClock(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok();
}
@ -53,6 +54,7 @@ public class ClockingInController {
@ApiOperation(value = "审核打卡", notes = "")
@RequestMapping(value = "/audit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse auditRecord(@ApiParam @Validated @RequestBody QueryDto<ClockingInDto.Audit> params) throws Exception{
log.info("审核打卡:{}",params);
clockingInService.auditRecord(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok();
}

2
src/main/java/com/ccsens/defaultwbs/bean/dto/ClockingInDto.java

@ -51,7 +51,7 @@ public class ClockingInDto {
@Data
@ApiModel("检查人审核打卡")
public static class Audit{
@NotNull(message = "打卡信息错误")
// @NotNull(message = "打卡信息错误")
@ApiModelProperty("打卡记录id")
private Long id;
@NotNull(message = "项目信息错误")

4
src/main/java/com/ccsens/defaultwbs/service/ClockingInService.java

@ -221,6 +221,7 @@ public class ClockingInService implements IClockingInService {
@Override
public void auditRecord(ClockingInDto.Audit params, Long userId) {
ProClockingIn record = clockingInDao.selectByPrimaryKey(params.getId());
log.info("查找打卡记录:{}",record);
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
if (!record.getCheckerId().equals(userOfMemberId)) {
throw new BaseException(CommonCodeError.NO_POWER);
@ -238,6 +239,7 @@ public class ClockingInService implements IClockingInService {
proClockingIn.setNightStatus((byte)1);
}
clockingInDao.updateByPrimaryKeySelective(proClockingIn);
log.info("修改打卡记录:{}",proClockingIn);
}
//驳回
if (1 == params.getType()) {
@ -250,6 +252,7 @@ public class ClockingInService implements IClockingInService {
proClockingIn.setNightStatus((byte)2);
}
clockingInDao.updateByPrimaryKeySelective(proClockingIn);
log.info("驳回打卡记录:{}",proClockingIn);
}
//审核通过
if (2 == params.getType()) {
@ -262,6 +265,7 @@ public class ClockingInService implements IClockingInService {
proClockingIn.setNightStatus((byte)3);
}
clockingInDao.updateByPrimaryKeySelective(proClockingIn);
log.info("审核通过打卡记录:{}",proClockingIn);
}
}

Loading…
Cancel
Save