施工人员补卡记录、请假记录相关接口
This commit is contained in:
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.project.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.project.domain.vo.BusWorkerDailyReportVo;
|
||||||
|
import org.dromara.project.domain.bo.BusWorkerDailyReportBo;
|
||||||
|
import org.dromara.project.service.IBusWorkerDailyReportService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/workerDailyReport")
|
||||||
|
public class BusWorkerDailyReportController extends BaseController {
|
||||||
|
|
||||||
|
private final IBusWorkerDailyReportService busWorkerDailyReportService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工人员日报列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BusWorkerDailyReportVo> list(BusWorkerDailyReportBo bo, PageQuery pageQuery) {
|
||||||
|
return busWorkerDailyReportService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出施工人员日报列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:export")
|
||||||
|
@Log(title = "施工人员日报", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BusWorkerDailyReportBo bo, HttpServletResponse response) {
|
||||||
|
List<BusWorkerDailyReportVo> list = busWorkerDailyReportService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "施工人员日报", BusWorkerDailyReportVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工人员日报详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BusWorkerDailyReportVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(busWorkerDailyReportService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工人员日报
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:add")
|
||||||
|
@Log(title = "施工人员日报", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusWorkerDailyReportBo bo) {
|
||||||
|
return toAjax(busWorkerDailyReportService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工人员日报
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:edit")
|
||||||
|
@Log(title = "施工人员日报", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusWorkerDailyReportBo bo) {
|
||||||
|
return toAjax(busWorkerDailyReportService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除施工人员日报
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:workerDailyReport:remove")
|
||||||
|
@Log(title = "施工人员日报", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(busWorkerDailyReportService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.project.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报计件信息对象 bus_daily_piece_item
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_daily_piece_item")
|
||||||
|
public class BusDailyPieceItem extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日报id
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件类型
|
||||||
|
*/
|
||||||
|
private String pieceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件数量
|
||||||
|
*/
|
||||||
|
private Long pieceCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件单位
|
||||||
|
*/
|
||||||
|
private String pieceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,124 @@
|
|||||||
|
package org.dromara.project.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报对象 bus_worker_daily_report
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_worker_daily_report")
|
||||||
|
public class BusWorkerDailyReport extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班组id
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人名字
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日完成工作
|
||||||
|
*/
|
||||||
|
private String todayCompletedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未完成工作
|
||||||
|
*/
|
||||||
|
private String unfinishedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明日工作
|
||||||
|
*/
|
||||||
|
private String tomorrowWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需协调与帮助
|
||||||
|
*/
|
||||||
|
private String coordinationHelp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否审核(1审核 2不审核)
|
||||||
|
*/
|
||||||
|
private Long isReview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人id
|
||||||
|
*/
|
||||||
|
private Long reviewerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人名字
|
||||||
|
*/
|
||||||
|
private String reviewerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人意见(1未读 2同意 3拒绝)
|
||||||
|
*/
|
||||||
|
private String reviewOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人说明
|
||||||
|
*/
|
||||||
|
private String reviewExplain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人操作时间
|
||||||
|
*/
|
||||||
|
private Date reviewTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除时间
|
||||||
|
*/
|
||||||
|
private Date deletedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除(0正常 1删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private Long isDelete;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package org.dromara.project.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.project.domain.BusWorkerDailyReport;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报业务对象 bus_worker_daily_report
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BusWorkerDailyReport.class, reverseConvertGenerate = false)
|
||||||
|
public class BusWorkerDailyReportBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班组id
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "申请人id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人名字
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日完成工作
|
||||||
|
*/
|
||||||
|
private String todayCompletedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未完成工作
|
||||||
|
*/
|
||||||
|
private String unfinishedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明日工作
|
||||||
|
*/
|
||||||
|
private String tomorrowWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需协调与帮助
|
||||||
|
*/
|
||||||
|
private String coordinationHelp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -7,19 +7,20 @@ import lombok.Getter;
|
|||||||
* @date 2025/4/7 11:31
|
* @date 2025/4/7 11:31
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum ConstructionUserAttendanceClockStatusEnum {
|
public enum AttendanceClockStatusEnum {
|
||||||
|
|
||||||
NORMAL("正常", "1"),
|
NORMAL("正常", "1"),
|
||||||
LATE("迟到", "2"),
|
LATE("迟到", "2"),
|
||||||
LEAVEEARLY("早退", "3"),
|
LEAVEEARLY("早退", "3"),
|
||||||
UNCLOCK("缺卡", "4"),
|
UNCLOCK("缺卡", "4"),
|
||||||
REISSUE("补卡", "5");
|
REISSUE("补卡", "5"),
|
||||||
|
LEAVE("请假", "6");
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
ConstructionUserAttendanceClockStatusEnum(String text, String value) {
|
AttendanceClockStatusEnum(String text, String value) {
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
@ -7,16 +7,17 @@ import lombok.Getter;
|
|||||||
* @date 2025/4/7 12:29
|
* @date 2025/4/7 12:29
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum ConstructionUserAttendanceCommuterEnum {
|
public enum AttendanceCommuterEnum {
|
||||||
|
|
||||||
CLOCKIN("上班", "1"),
|
CLOCKIN("上班", "1"),
|
||||||
CLOCKOUT("下班", "2");
|
CLOCKOUT("下班", "2"),
|
||||||
|
ALLDAY("全天", "3");
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
ConstructionUserAttendanceCommuterEnum(String text, String value) {
|
AttendanceCommuterEnum(String text, String value) {
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package org.dromara.project.domain.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025/4/7 15:38
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum AttendanceStatusEnum {
|
||||||
|
|
||||||
|
NORMAL("全天考勤正常", "1"),
|
||||||
|
ERROR("当天存在异常迟到、早退、缺卡", "2"),
|
||||||
|
REISSUE("当天提交过补卡申请", "3"),
|
||||||
|
LEAVE("当天请假", "4");
|
||||||
|
|
||||||
|
private final String text;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
AttendanceStatusEnum(String text, String value) {
|
||||||
|
this.text = text;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,14 +4,15 @@ import lombok.Getter;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lcj
|
* @author lcj
|
||||||
* @date 2025/4/7 15:38
|
* @date 2025/4/9 14:10
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum ConstructionUserAttendanceStatusEnum {
|
public enum ConstructionUserAttendanceStatusEnum {
|
||||||
|
|
||||||
NORMAL("全天考勤正常", "1"),
|
NORMAL("全天考勤正常", "1"),
|
||||||
ERROR("当天存在异常迟到、早退、缺卡", "2"),
|
ONECLOCK("当天只打了一次卡", "2"),
|
||||||
REISSUE("当天提交过补卡申请", "3");
|
UNCLOCK("当天缺卡", "3"),
|
||||||
|
LEAVE("当天请假", "4");
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class ConstructionUserAttendanceMonthReq implements Serializable {
|
|||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "用户主键不能为空")
|
@NotNull(message = "用户主键不能为空")
|
||||||
private Long id;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打卡月份
|
* 打卡月份
|
||||||
|
@ -4,7 +4,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.dromara.project.domain.BusAttendance;
|
import org.dromara.project.domain.BusAttendance;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.AttendanceCommuterEnum;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -53,12 +53,12 @@ public class ConstructionUserAttendanceByDay {
|
|||||||
}
|
}
|
||||||
ConstructionUserAttendanceByDay constructionUserAttendanceByDay = new ConstructionUserAttendanceByDay();
|
ConstructionUserAttendanceByDay constructionUserAttendanceByDay = new ConstructionUserAttendanceByDay();
|
||||||
for (BusAttendance attendance : attendanceList) {
|
for (BusAttendance attendance : attendanceList) {
|
||||||
if (attendance.getCommuter().equals(ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue())) {
|
if (attendance.getCommuter().equals(AttendanceCommuterEnum.CLOCKIN.getValue())) {
|
||||||
constructionUserAttendanceByDay.setUpClockDate(attendance.getClockDate());
|
constructionUserAttendanceByDay.setUpClockDate(attendance.getClockDate());
|
||||||
if (attendance.getFacePic() != null) {
|
if (attendance.getFacePic() != null) {
|
||||||
constructionUserAttendanceByDay.setUpClockPicId(Long.valueOf(attendance.getFacePic()));
|
constructionUserAttendanceByDay.setUpClockPicId(Long.valueOf(attendance.getFacePic()));
|
||||||
}
|
}
|
||||||
} else if (attendance.getCommuter().equals(ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue())) {
|
} else if (attendance.getCommuter().equals(AttendanceCommuterEnum.CLOCKOUT.getValue())) {
|
||||||
constructionUserAttendanceByDay.setDownClockDate(attendance.getClockDate());
|
constructionUserAttendanceByDay.setDownClockDate(attendance.getClockDate());
|
||||||
if (attendance.getFacePic() != null) {
|
if (attendance.getFacePic() != null) {
|
||||||
constructionUserAttendanceByDay.setDownClockPicId(Long.valueOf(attendance.getFacePic()));
|
constructionUserAttendanceByDay.setDownClockPicId(Long.valueOf(attendance.getFacePic()));
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
package org.dromara.project.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.project.domain.BusDailyPieceItem;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报计件信息视图对象 bus_daily_piece_item
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusDailyPieceItem.class)
|
||||||
|
public class BusDailyPieceItemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件类型
|
||||||
|
*/
|
||||||
|
private String pieceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件数量
|
||||||
|
*/
|
||||||
|
private Long pieceCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计件单位
|
||||||
|
*/
|
||||||
|
private String pieceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package org.dromara.project.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.project.domain.BusWorkerDailyReport;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报视图对象 bus_worker_daily_report
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusWorkerDailyReport.class)
|
||||||
|
public class BusWorkerDailyReportVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人名字
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "申请人名字")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日完成工作
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "今日完成工作")
|
||||||
|
private String todayCompletedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未完成工作
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "未完成工作")
|
||||||
|
private String unfinishedWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明日工作
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "明日工作")
|
||||||
|
private String tomorrowWork;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需协调与帮助
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "需协调与帮助")
|
||||||
|
private String coordinationHelp;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.project.mapper;
|
||||||
|
|
||||||
|
import org.dromara.project.domain.BusDailyPieceItem;
|
||||||
|
import org.dromara.project.domain.vo.BusDailyPieceItemVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报计件信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
public interface BusDailyPieceItemMapper extends BaseMapperPlus<BusDailyPieceItem, BusDailyPieceItemVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.project.mapper;
|
||||||
|
|
||||||
|
import org.dromara.project.domain.BusWorkerDailyReport;
|
||||||
|
import org.dromara.project.domain.vo.BusWorkerDailyReportVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报Mapper接口
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
public interface BusWorkerDailyReportMapper extends BaseMapperPlus<BusWorkerDailyReport, BusWorkerDailyReportVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.dromara.project.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.project.domain.BusDailyPieceItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报计件信息Service接口
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
public interface IBusDailyPieceItemService extends IService<BusDailyPieceItem> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.project.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.project.domain.BusWorkerDailyReport;
|
||||||
|
import org.dromara.project.domain.bo.BusWorkerDailyReportBo;
|
||||||
|
import org.dromara.project.domain.vo.BusWorkerDailyReportVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报Service接口
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
public interface IBusWorkerDailyReportService extends IService<BusWorkerDailyReport> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工人员日报
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 施工人员日报
|
||||||
|
*/
|
||||||
|
BusWorkerDailyReportVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询施工人员日报列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 施工人员日报分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BusWorkerDailyReportVo> queryPageList(BusWorkerDailyReportBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工人员日报列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 施工人员日报列表
|
||||||
|
*/
|
||||||
|
List<BusWorkerDailyReportVo> queryList(BusWorkerDailyReportBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工人员日报
|
||||||
|
*
|
||||||
|
* @param bo 施工人员日报
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BusWorkerDailyReportBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工人员日报
|
||||||
|
*
|
||||||
|
* @param bo 施工人员日报
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BusWorkerDailyReportBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除施工人员日报信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -16,16 +16,15 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.project.domain.BusAttendance;
|
import org.dromara.project.domain.BusAttendance;
|
||||||
import org.dromara.project.domain.BusLeave;
|
import org.dromara.project.domain.BusLeave;
|
||||||
import org.dromara.project.domain.BusProjectTeamMember;
|
import org.dromara.project.domain.BusProjectTeamMember;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceClockStatusEnum;
|
import org.dromara.project.domain.enums.AttendanceClockStatusEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.AttendanceCommuterEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceStatusEnum;
|
import org.dromara.project.domain.enums.AttendanceStatusEnum;
|
||||||
import org.dromara.project.domain.req.attendance.AttendanceMonthByUserIdReq;
|
import org.dromara.project.domain.req.attendance.AttendanceMonthByUserIdReq;
|
||||||
import org.dromara.project.domain.req.attendance.AttendanceQueryReq;
|
import org.dromara.project.domain.req.attendance.AttendanceQueryReq;
|
||||||
import org.dromara.project.domain.req.attendance.AttendanceQueryTwoWeekReq;
|
import org.dromara.project.domain.req.attendance.AttendanceQueryTwoWeekReq;
|
||||||
import org.dromara.project.domain.resp.attendance.AttendanceClockDateForTwoWeekResp;
|
import org.dromara.project.domain.resp.attendance.AttendanceClockDateForTwoWeekResp;
|
||||||
import org.dromara.project.domain.resp.attendance.AttendanceListByDay;
|
import org.dromara.project.domain.resp.attendance.AttendanceListByDay;
|
||||||
import org.dromara.project.domain.resp.attendance.AttendanceMonthByUserIdResp;
|
import org.dromara.project.domain.resp.attendance.AttendanceMonthByUserIdResp;
|
||||||
import org.dromara.project.domain.resp.constructionuser.ConstructionUserAttendanceMonthResp;
|
|
||||||
import org.dromara.project.domain.vo.BusAttendanceVo;
|
import org.dromara.project.domain.vo.BusAttendanceVo;
|
||||||
import org.dromara.project.mapper.BusAttendanceMapper;
|
import org.dromara.project.mapper.BusAttendanceMapper;
|
||||||
import org.dromara.project.service.*;
|
import org.dromara.project.service.*;
|
||||||
@ -155,20 +154,20 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
String clockOutStatus = null;
|
String clockOutStatus = null;
|
||||||
// 遍历同一用户的考勤记录,分别获取上下班状态
|
// 遍历同一用户的考勤记录,分别获取上下班状态
|
||||||
for (BusAttendance a : userAttendanceList) {
|
for (BusAttendance a : userAttendanceList) {
|
||||||
if (ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue().equals(a.getCommuter())) {
|
if (AttendanceCommuterEnum.CLOCKIN.getValue().equals(a.getCommuter())) {
|
||||||
clockInStatus = a.getClockStatus();
|
clockInStatus = a.getClockStatus();
|
||||||
} else if (ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue().equals(a.getCommuter())) {
|
} else if (AttendanceCommuterEnum.CLOCKOUT.getValue().equals(a.getCommuter())) {
|
||||||
clockOutStatus = a.getClockStatus();
|
clockOutStatus = a.getClockStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 统计考勤状态
|
// 统计考勤状态
|
||||||
if ((ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockInStatus)
|
if ((AttendanceClockStatusEnum.NORMAL.getValue().equals(clockInStatus)
|
||||||
|| ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockInStatus))
|
|| AttendanceClockStatusEnum.REISSUE.getValue().equals(clockInStatus))
|
||||||
&& (ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockOutStatus)
|
&& (AttendanceClockStatusEnum.NORMAL.getValue().equals(clockOutStatus)
|
||||||
|| ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockOutStatus))) {
|
|| AttendanceClockStatusEnum.REISSUE.getValue().equals(clockOutStatus))) {
|
||||||
attendance++;
|
attendance++;
|
||||||
} else if (ConstructionUserAttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)
|
} else if (AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)
|
||||||
&& ConstructionUserAttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
&& AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
||||||
absenteeism++;
|
absenteeism++;
|
||||||
} else {
|
} else {
|
||||||
halfAttendance++;
|
halfAttendance++;
|
||||||
@ -233,27 +232,32 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
List<AttendanceListByDay> attendanceListByDayList = new ArrayList<>();
|
List<AttendanceListByDay> attendanceListByDayList = new ArrayList<>();
|
||||||
String clockInStatus = null;
|
String clockInStatus = null;
|
||||||
String clockOutStatus = null;
|
String clockOutStatus = null;
|
||||||
|
String clockAllDayStatus = null;
|
||||||
String status;
|
String status;
|
||||||
for (BusAttendance attendance : attendanceList) {
|
for (BusAttendance attendance : attendanceList) {
|
||||||
// 获取考勤记录
|
// 获取考勤记录
|
||||||
AttendanceListByDay day = AttendanceListByDay.build(attendance);
|
AttendanceListByDay day = AttendanceListByDay.build(attendance);
|
||||||
attendanceListByDayList.add(day);
|
attendanceListByDayList.add(day);
|
||||||
// 获取上下班状态
|
// 获取上下班状态
|
||||||
if (ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
if (AttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
||||||
clockInStatus = attendance.getClockStatus();
|
clockInStatus = attendance.getClockStatus();
|
||||||
} else if (ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
} else if (AttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
||||||
clockOutStatus = attendance.getClockStatus();
|
clockOutStatus = attendance.getClockStatus();
|
||||||
|
} else {
|
||||||
|
clockAllDayStatus = attendance.getClockStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 统计当天考勤状态
|
// 统计当天考勤状态
|
||||||
if (ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockInStatus)
|
if (AttendanceClockStatusEnum.LEAVE.getValue().equals(clockAllDayStatus)) {
|
||||||
&& ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockOutStatus)) {
|
status = AttendanceStatusEnum.LEAVE.getValue();
|
||||||
status = ConstructionUserAttendanceStatusEnum.NORMAL.getValue();
|
} else if (AttendanceClockStatusEnum.NORMAL.getValue().equals(clockInStatus)
|
||||||
} else if (ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockInStatus)
|
&& AttendanceClockStatusEnum.NORMAL.getValue().equals(clockOutStatus)) {
|
||||||
|| ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockOutStatus)) {
|
status = AttendanceStatusEnum.NORMAL.getValue();
|
||||||
status = ConstructionUserAttendanceStatusEnum.REISSUE.getValue();
|
} else if (AttendanceClockStatusEnum.REISSUE.getValue().equals(clockInStatus)
|
||||||
|
|| AttendanceClockStatusEnum.REISSUE.getValue().equals(clockOutStatus)) {
|
||||||
|
status = AttendanceStatusEnum.REISSUE.getValue();
|
||||||
} else {
|
} else {
|
||||||
status = ConstructionUserAttendanceStatusEnum.ERROR.getValue();
|
status = AttendanceStatusEnum.ERROR.getValue();
|
||||||
}
|
}
|
||||||
resp.setStatus(status);
|
resp.setStatus(status);
|
||||||
resp.setAttendanceList(attendanceListByDayList);
|
resp.setAttendanceList(attendanceListByDayList);
|
||||||
|
@ -18,8 +18,8 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.project.constant.ConstructionUserConstant;
|
import org.dromara.project.constant.ConstructionUserConstant;
|
||||||
import org.dromara.project.domain.*;
|
import org.dromara.project.domain.*;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceClockStatusEnum;
|
import org.dromara.project.domain.enums.AttendanceClockStatusEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.AttendanceCommuterEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceStatusEnum;
|
import org.dromara.project.domain.enums.ConstructionUserAttendanceStatusEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserFileStatusEnum;
|
import org.dromara.project.domain.enums.ConstructionUserFileStatusEnum;
|
||||||
import org.dromara.project.domain.exportvo.BusConstructionUserExportVo;
|
import org.dromara.project.domain.exportvo.BusConstructionUserExportVo;
|
||||||
@ -140,7 +140,7 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ConstructionUserAttendanceMonthResp> queryAttendanceMonthList(ConstructionUserAttendanceMonthReq req) {
|
public List<ConstructionUserAttendanceMonthResp> queryAttendanceMonthList(ConstructionUserAttendanceMonthReq req) {
|
||||||
Long id = req.getId();
|
Long id = req.getUserId();
|
||||||
String clockMonth = req.getClockMonth();
|
String clockMonth = req.getClockMonth();
|
||||||
if (this.getById(id) == null) {
|
if (this.getById(id) == null) {
|
||||||
throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("施工人员信息不存在", HttpStatus.NOT_FOUND);
|
||||||
@ -189,24 +189,29 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
|||||||
}
|
}
|
||||||
String clockInStatus = null;
|
String clockInStatus = null;
|
||||||
String clockOutStatus = null;
|
String clockOutStatus = null;
|
||||||
|
String clockAllDayStatus = null;
|
||||||
String status;
|
String status;
|
||||||
for (BusAttendance attendance : attendanceList) {
|
for (BusAttendance attendance : attendanceList) {
|
||||||
// 获取上下班状态
|
// 获取上下班状态
|
||||||
if (ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
if (AttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
||||||
clockInStatus = attendance.getClockStatus();
|
clockInStatus = attendance.getClockStatus();
|
||||||
} else if (ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
} else if (AttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
||||||
clockOutStatus = attendance.getClockStatus();
|
clockOutStatus = attendance.getClockStatus();
|
||||||
|
} else {
|
||||||
|
clockAllDayStatus = attendance.getClockStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 统计当天考勤状态
|
// 统计当天考勤状态
|
||||||
if (ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockInStatus)
|
if (AttendanceClockStatusEnum.LEAVE.getValue().equals(clockAllDayStatus)) {
|
||||||
&& ConstructionUserAttendanceClockStatusEnum.NORMAL.getValue().equals(clockOutStatus)) {
|
status = ConstructionUserAttendanceStatusEnum.LEAVE.getValue();
|
||||||
status = ConstructionUserAttendanceStatusEnum.NORMAL.getValue();
|
} else if (AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)
|
||||||
} else if (ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockInStatus)
|
&& AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
||||||
|| ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue().equals(clockOutStatus)) {
|
status = ConstructionUserAttendanceStatusEnum.UNCLOCK.getValue();
|
||||||
status = ConstructionUserAttendanceStatusEnum.REISSUE.getValue();
|
} else if (AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)
|
||||||
|
|| AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
||||||
|
status = ConstructionUserAttendanceStatusEnum.ONECLOCK.getValue();
|
||||||
} else {
|
} else {
|
||||||
status = ConstructionUserAttendanceStatusEnum.ERROR.getValue();
|
status = ConstructionUserAttendanceStatusEnum.NORMAL.getValue();
|
||||||
}
|
}
|
||||||
resp.setStatus(status);
|
resp.setStatus(status);
|
||||||
resp.setClockList(day);
|
resp.setClockList(day);
|
||||||
@ -861,23 +866,23 @@ public class BusConstructionUserServiceImpl extends ServiceImpl<BusConstructionU
|
|||||||
String clockOutStatus = null;
|
String clockOutStatus = null;
|
||||||
// 获取上下班状态
|
// 获取上下班状态
|
||||||
for (BusAttendance attendance : dailyList) {
|
for (BusAttendance attendance : dailyList) {
|
||||||
if (ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
if (AttendanceCommuterEnum.CLOCKIN.getValue().equals(attendance.getCommuter())) {
|
||||||
clockInStatus = attendance.getClockStatus();
|
clockInStatus = attendance.getClockStatus();
|
||||||
} else if (ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
} else if (AttendanceCommuterEnum.CLOCKOUT.getValue().equals(attendance.getCommuter())) {
|
||||||
clockOutStatus = attendance.getClockStatus();
|
clockOutStatus = attendance.getClockStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 统计考勤状态
|
// 统计考勤状态
|
||||||
if (ConstructionUserAttendanceClockStatusEnum.LATE.getValue().equals(clockInStatus)) {
|
if (AttendanceClockStatusEnum.LATE.getValue().equals(clockInStatus)) {
|
||||||
lateDays++;
|
lateDays++;
|
||||||
}
|
}
|
||||||
if (ConstructionUserAttendanceClockStatusEnum.LEAVEEARLY.getValue().equals(clockOutStatus)) {
|
if (AttendanceClockStatusEnum.LEAVEEARLY.getValue().equals(clockOutStatus)) {
|
||||||
leaveEarlyDays++;
|
leaveEarlyDays++;
|
||||||
}
|
}
|
||||||
if (clockInStatus == null || ConstructionUserAttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)) {
|
if (clockInStatus == null || AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockInStatus)) {
|
||||||
unClockDays++;
|
unClockDays++;
|
||||||
}
|
}
|
||||||
if (clockOutStatus == null || ConstructionUserAttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
if (clockOutStatus == null || AttendanceClockStatusEnum.UNCLOCK.getValue().equals(clockOutStatus)) {
|
||||||
unClockDays++;
|
unClockDays++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.dromara.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.project.domain.BusDailyPieceItem;
|
||||||
|
import org.dromara.project.mapper.BusDailyPieceItemMapper;
|
||||||
|
import org.dromara.project.service.IBusDailyPieceItemService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报计件信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BusDailyPieceItemServiceImpl extends ServiceImpl<BusDailyPieceItemMapper, BusDailyPieceItem>
|
||||||
|
implements IBusDailyPieceItemService {
|
||||||
|
|
||||||
|
}
|
@ -16,8 +16,8 @@ import org.dromara.project.domain.BusAttendance;
|
|||||||
import org.dromara.project.domain.BusProject;
|
import org.dromara.project.domain.BusProject;
|
||||||
import org.dromara.project.domain.BusProjectTeam;
|
import org.dromara.project.domain.BusProjectTeam;
|
||||||
import org.dromara.project.domain.BusReissueCard;
|
import org.dromara.project.domain.BusReissueCard;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceClockStatusEnum;
|
import org.dromara.project.domain.enums.AttendanceClockStatusEnum;
|
||||||
import org.dromara.project.domain.enums.ConstructionUserAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.AttendanceCommuterEnum;
|
||||||
import org.dromara.project.domain.enums.OpinionStatusEnum;
|
import org.dromara.project.domain.enums.OpinionStatusEnum;
|
||||||
import org.dromara.project.domain.enums.ReviewStatusEnum;
|
import org.dromara.project.domain.enums.ReviewStatusEnum;
|
||||||
import org.dromara.project.domain.req.reissuecard.ReissueCardManagerReviewReq;
|
import org.dromara.project.domain.req.reissuecard.ReissueCardManagerReviewReq;
|
||||||
@ -137,17 +137,17 @@ public class BusReissueCardServiceImpl extends ServiceImpl<BusReissueCardMapper,
|
|||||||
// 根据补卡类型更新考勤时间
|
// 根据补卡类型更新考勤时间
|
||||||
String[] clockTime = project.getPunchRange().split(",");
|
String[] clockTime = project.getPunchRange().split(",");
|
||||||
String reissueCardType = oldReissueCard.getReissueCardType();
|
String reissueCardType = oldReissueCard.getReissueCardType();
|
||||||
if (ConstructionUserAttendanceCommuterEnum.CLOCKIN.getValue().equals(reissueCardType)) {
|
if (AttendanceCommuterEnum.CLOCKIN.getValue().equals(reissueCardType)) {
|
||||||
// 拼接时间,获取项目的上班打卡时间
|
// 拼接时间,获取项目的上班打卡时间
|
||||||
Date date = DateUtils.combineDateAndTime(oldAttendance.getClockDate(), clockTime[0] + ":00");
|
Date date = DateUtils.combineDateAndTime(oldAttendance.getClockDate(), clockTime[0] + ":00");
|
||||||
attendance.setClockTime(date);
|
attendance.setClockTime(date);
|
||||||
} else if (ConstructionUserAttendanceCommuterEnum.CLOCKOUT.getValue().equals(reissueCardType)) {
|
} else if (AttendanceCommuterEnum.CLOCKOUT.getValue().equals(reissueCardType)) {
|
||||||
// 拼接时间,获取项目的下班打卡时间
|
// 拼接时间,获取项目的下班打卡时间
|
||||||
Date date = DateUtils.combineDateAndTime(oldAttendance.getClockDate(), clockTime[1] + ":00");
|
Date date = DateUtils.combineDateAndTime(oldAttendance.getClockDate(), clockTime[1] + ":00");
|
||||||
attendance.setClockTime(date);
|
attendance.setClockTime(date);
|
||||||
}
|
}
|
||||||
attendance.setId(oldReissueCard.getAttendanceId());
|
attendance.setId(oldReissueCard.getAttendanceId());
|
||||||
attendance.setClockStatus(ConstructionUserAttendanceClockStatusEnum.REISSUE.getValue());
|
attendance.setClockStatus(AttendanceClockStatusEnum.REISSUE.getValue());
|
||||||
boolean updateAttendance = attendanceService.updateById(attendance);
|
boolean updateAttendance = attendanceService.updateById(attendance);
|
||||||
if (!updateAttendance) {
|
if (!updateAttendance) {
|
||||||
throw new ServiceException("更新考勤记录失败", HttpStatus.ERROR);
|
throw new ServiceException("更新考勤记录失败", HttpStatus.ERROR);
|
||||||
|
@ -0,0 +1,131 @@
|
|||||||
|
package org.dromara.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.project.domain.BusWorkerDailyReport;
|
||||||
|
import org.dromara.project.domain.bo.BusWorkerDailyReportBo;
|
||||||
|
import org.dromara.project.domain.vo.BusWorkerDailyReportVo;
|
||||||
|
import org.dromara.project.mapper.BusWorkerDailyReportMapper;
|
||||||
|
import org.dromara.project.service.IBusWorkerDailyReportService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工人员日报Service业务层处理
|
||||||
|
*
|
||||||
|
* @author lcj
|
||||||
|
* @date 2025-04-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BusWorkerDailyReportServiceImpl extends ServiceImpl<BusWorkerDailyReportMapper, BusWorkerDailyReport>
|
||||||
|
implements IBusWorkerDailyReportService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工人员日报
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 施工人员日报
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusWorkerDailyReportVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询施工人员日报列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 施工人员日报分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusWorkerDailyReportVo> queryPageList(BusWorkerDailyReportBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusWorkerDailyReport> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BusWorkerDailyReportVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工人员日报列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 施工人员日报列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusWorkerDailyReportVo> queryList(BusWorkerDailyReportBo bo) {
|
||||||
|
LambdaQueryWrapper<BusWorkerDailyReport> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BusWorkerDailyReport> buildQueryWrapper(BusWorkerDailyReportBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BusWorkerDailyReport> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BusWorkerDailyReport::getId);
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusWorkerDailyReport::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(bo.getTeamId() != null, BusWorkerDailyReport::getTeamId, bo.getTeamId());
|
||||||
|
lqw.eq(bo.getUserId() != null, BusWorkerDailyReport::getUserId, bo.getUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getUserName()), BusWorkerDailyReport::getUserName, bo.getUserName());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工人员日报
|
||||||
|
*
|
||||||
|
* @param bo 施工人员日报
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BusWorkerDailyReportBo bo) {
|
||||||
|
BusWorkerDailyReport add = MapstructUtils.convert(bo, BusWorkerDailyReport.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工人员日报
|
||||||
|
*
|
||||||
|
* @param bo 施工人员日报
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BusWorkerDailyReportBo bo) {
|
||||||
|
BusWorkerDailyReport update = MapstructUtils.convert(bo, BusWorkerDailyReport.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BusWorkerDailyReport entity) {
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除施工人员日报信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.project.mapper.BusDailyPieceItemMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.project.mapper.BusLeaveMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.project.mapper.BusWorkerDailyReportMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -608,3 +608,50 @@ CREATE TABLE `bus_leave`
|
|||||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id',
|
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id',
|
||||||
INDEX `idx_team_id` (`team_id` ASC) USING BTREE comment '班组id'
|
INDEX `idx_team_id` (`team_id` ASC) USING BTREE comment '班组id'
|
||||||
) comment = '施工人员请假申请' collate = utf8mb4_unicode_ci;
|
) comment = '施工人员请假申请' collate = utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `bus_worker_daily_report`;
|
||||||
|
CREATE TABLE `bus_worker_daily_report`
|
||||||
|
(
|
||||||
|
`id` bigint not null auto_increment comment '主键id',
|
||||||
|
`project_id` bigint not null comment '项目id',
|
||||||
|
`team_id` bigint null comment '班组id',
|
||||||
|
`user_id` bigint not null comment '申请人id',
|
||||||
|
`user_name` varchar(50) not null comment '申请人名字',
|
||||||
|
`today_completed_work` text null comment '今日完成工作',
|
||||||
|
`unfinished_work` text null comment '未完成工作',
|
||||||
|
`tomorrow_work` text null comment '明日工作',
|
||||||
|
`coordination_help` text null comment '需协调与帮助',
|
||||||
|
`file` varchar(1024) null comment '附件',
|
||||||
|
`is_review` tinyint(4) default 1 not null comment '是否审核(1审核 2不审核)',
|
||||||
|
`reviewer_id` bigint null comment '审核人id',
|
||||||
|
`reviewer_name` varchar(50) null comment '审核人名字',
|
||||||
|
`review_opinion` char(1) default '1' not null comment '审核人意见(1未读 2同意 3拒绝)',
|
||||||
|
`review_explain` varchar(512) null comment '审核人说明',
|
||||||
|
`review_time` datetime null comment '审核人操作时间',
|
||||||
|
`remark` varchar(512) null comment '备注',
|
||||||
|
`create_by` varchar(64) null comment '创建者',
|
||||||
|
`update_by` varchar(64) null comment '更新者',
|
||||||
|
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||||
|
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||||
|
`deleted_at` datetime null comment '删除时间',
|
||||||
|
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_user_id` (`user_id` ASC) USING BTREE comment '用户id',
|
||||||
|
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id',
|
||||||
|
INDEX `idx_team_id` (`team_id` ASC) USING BTREE comment '班组id'
|
||||||
|
) comment = '施工人员日报' collate = utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `bus_daily_piece_item`;
|
||||||
|
CREATE TABLE `bus_daily_piece_item`
|
||||||
|
(
|
||||||
|
`id` bigint not null auto_increment comment '主键id',
|
||||||
|
`report_id` bigint not null comment '日报id',
|
||||||
|
`piece_type` varchar(50) not null comment '计件类型',
|
||||||
|
`piece_count` int not null comment '计件数量',
|
||||||
|
`piece_unit` varchar(20) null comment '计件单位',
|
||||||
|
`remark` varchar(512) null comment '备注',
|
||||||
|
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||||
|
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `idx_report_id` (`report_id` ASC) USING BTREE comment '日报id'
|
||||||
|
) comment = '施工人员日报计件信息' collate = utf8mb4_unicode_ci;
|
||||||
|
Reference in New Issue
Block a user