Browse Source

审核考勤信息

tall3
ma 4 years ago
parent
commit
cc802f4561
  1. 7
      common/src/main/java/com/ccsens/common/bean/dto/CClockingInDto.java
  2. 36
      common/src/main/java/com/ccsens/common/service/ClockingInService.java
  3. 2
      common/src/main/java/com/ccsens/common/service/IClockingInService.java
  4. 8
      util/src/main/java/com/ccsens/util/PoiUtil.java

7
common/src/main/java/com/ccsens/common/bean/dto/CClockingInDto.java

@ -50,8 +50,12 @@ public class CClockingInDto {
@Data
@ApiModel("检查人审核打卡")
public static class Audit{
@NotNull(message = "打卡信息错误")
@ApiModelProperty("打卡记录id")
private Long id;
@NotNull(message = "项目信息错误")
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("审批类型(0-修改,1-驳回)")
private Byte type;
@ApiModelProperty("早打卡时间")
@ -63,6 +67,9 @@ public class CClockingInDto {
@Data
@ApiModel("导出打卡记录")
public static class ExportRecord{
@NotNull(message = "项目信息错误")
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("开始时间")
private Long startTime;
@ApiModelProperty("结束时间")

36
common/src/main/java/com/ccsens/common/service/ClockingInService.java

@ -159,11 +159,43 @@ public class ClockingInService implements IClockingInService {
@Override
public void auditRecord(CClockingInDto.Audit params, Long userId) {
ProClockingIn record = clockingInDao.selectByPrimaryKey(params.getId());
Long userOfMemberId = memberDao.findUserOfMemberId(params.getProjectId(), userId);
if (!record.getCheckerId().equals(userOfMemberId)) {
throw new BaseException(CommonCodeError.NO_POWER);
}
//修改
if (0 == params.getType()) {
ProClockingIn proClockingIn = new ProClockingIn();
proClockingIn.setId(params.getId());
if (ObjectUtil.isNotNull(params.getMorning())) {
proClockingIn.setMorning(params.getMorning());
}
if (ObjectUtil.isNotNull(params.getNight())) {
proClockingIn.setNight(params.getNight());
}
clockingInDao.updateByPrimaryKeySelective(proClockingIn);
}
//驳回
if (1 == params.getType()) {
ProClockingIn proClockingIn = new ProClockingIn();
if (ObjectUtil.isNotNull(params.getMorning())) {
proClockingIn.setMorningStatus((byte)2);
}
if (ObjectUtil.isNotNull(params.getNight())) {
proClockingIn.setNightStatus((byte)2);
}
clockingInDao.updateByPrimaryKeySelective(proClockingIn);
}
}
@Override
public CClockingInVo.ExcelUrl exportRecord(CClockingInDto.ExportRecord params, Long userId) {
public CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params, Long userId) {
log.info("开始调用查询考勤方法");
List<CClockingInVo.ClockingInInfo> clockingInInfos = queryClockingIn(params, userId);
log.info("调用查询考勤方法结束{}",clockingInInfos);
return null;
}
}

2
common/src/main/java/com/ccsens/common/service/IClockingInService.java

@ -38,5 +38,5 @@ public interface IClockingInService {
* @param userId 当前用户userId
* @return excel的路径
*/
CClockingInVo.ExcelUrl exportRecord(CClockingInDto.ExportRecord params,Long userId);
CClockingInVo.ExcelUrl exportRecord(CClockingInDto.QueryClockingIn params,Long userId);
}

8
util/src/main/java/com/ccsens/util/PoiUtil.java

@ -640,8 +640,9 @@ public class PoiUtil {
PoiUtilCell poiUtilCell = new PoiUtilCell();
poiUtilCell.setValue("111222333");
/*poiUtilCell.setColspan(2);
poiUtilCell.setRowspan(1);*/
poiUtilCell.setColspan(2);
poiUtilCell.setRowspan(1);
PoiUtilCell poiUtilCell1 = new PoiUtilCell();
poiUtilCell1.setValue("1112222");
PoiUtilCell poiUtilCell3 = new PoiUtilCell();
@ -655,10 +656,11 @@ public class PoiUtil {
List<PoiUtilCell> cells = new ArrayList<>();
cells.add(poiUtilCell);
cells.add(poiUtilCell1);
cells.add(poiUtilCell1);
cells.add(poiUtilCell3);
cells.add(poiUtilCell2);
List<PoiUtilCell> cells2 = new ArrayList<>();
List<List<PoiUtilCell>> list = new ArrayList<>();
list.add(cells);

Loading…
Cancel
Save