优化
This commit is contained in:
@ -67,6 +67,15 @@ public class AppBgtMessageController extends BaseController {
|
||||
return AjaxResult.success(iBgtMessageService.updateById(bgtMessage));
|
||||
}
|
||||
|
||||
@ApiOperation("已操作")
|
||||
@PutMapping("/operation/{id}")
|
||||
public AjaxResult<Boolean> operation(@PathVariable(value = "id") Long id) {
|
||||
BgtMessage bgtMessage = new BgtMessage();
|
||||
bgtMessage.setId(id);
|
||||
bgtMessage.setIsOperation("2");
|
||||
return AjaxResult.success(iBgtMessageService.updateById(bgtMessage));
|
||||
}
|
||||
|
||||
@ApiOperation("App务工者消息个人详情")
|
||||
@GetMapping("/userInfo")
|
||||
public AjaxResult<WgzAppPersonalBasicInformationRes> wgzMessageInformation(Long userId, Long recruitApplyId) {
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.ruoyi.web.controller.bgt;
|
||||
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@ -9,7 +10,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
import com.ruoyi.wgz.service.IWgzReissueacardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -36,13 +37,21 @@ public class AppBgtReissueacardController extends BaseController {
|
||||
|
||||
private final IWgzReissueacardService iWgzReissueacardService;
|
||||
|
||||
private final IWgzLeaveService iWgzLeaveService;
|
||||
|
||||
/**
|
||||
* 查询补卡申请列表
|
||||
*/
|
||||
@ApiOperation("查询补卡申请列表")
|
||||
@ApiOperation("查询审批申请列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WgzReplacementCardRecordRes> list(@Validated BgtReissueacardListDTO dto) {
|
||||
return iWgzReissueacardService.appQueryPageList(dto);
|
||||
public TableDataInfo<BgtAuditResultVO> list(@Validated BgtAuditListDTO dto) {
|
||||
TableDataInfo<BgtAuditResultVO> result = new TableDataInfo<>();
|
||||
if(dto.getDataType().equals("1")){
|
||||
result = iWgzReissueacardService.appQueryPageList(dto);
|
||||
} else if (dto.getDataType().equals("2")) {
|
||||
result = iWgzLeaveService.bgtLeaveAudit(dto);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,192 @@
|
||||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.dto.BgtUploadDTO;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.wgz.domain.WgzUser;
|
||||
import com.ruoyi.wgz.service.IWgzUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api(value = "网页模板下载", tags = {"网页模板下载"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
public class TemplateDownloadController {
|
||||
|
||||
@Autowired
|
||||
private IWgzUserService wgzUserService;
|
||||
|
||||
@Autowired
|
||||
private IBgtProjectRecruitService recruitService;
|
||||
|
||||
private static final String TEMP_DIR = "ruoyi/uploadPath/temporary";
|
||||
|
||||
@ApiOperation("下载模板")
|
||||
@PostMapping("/download-folders")
|
||||
public ResponseEntity<Resource> downloadFolders(@RequestBody BgtUploadDTO dto) {
|
||||
|
||||
BgtProjectRecruit recruit = recruitService.queryById(dto.getRecruitId());
|
||||
String firstLevelFolderName = recruit.getId() + "_" + recruit.getRecruitName();
|
||||
File baseDir = new File(TEMP_DIR);
|
||||
File folderToZip = new File(baseDir, firstLevelFolderName);
|
||||
File zipFile = new File(baseDir, folderToZip.getName() + ".zip");
|
||||
|
||||
// 在生成文件夹和压缩文件之前,检查并删除已存在的文件夹和压缩文件
|
||||
if (folderToZip.exists()) {
|
||||
deleteFolder(folderToZip);
|
||||
}
|
||||
if (zipFile.exists()) {
|
||||
if (!zipFile.delete()) {
|
||||
System.err.println("无法删除已存在的压缩文件: " + zipFile.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
generateFolders(dto);
|
||||
try {
|
||||
zipFolder(folderToZip, zipFile);
|
||||
System.out.println("文件夹已压缩为: " + zipFile.getName());
|
||||
|
||||
Resource resource = new FileSystemResource(zipFile);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + zipFile.getName());
|
||||
|
||||
ResponseEntity<Resource> response = ResponseEntity.ok()
|
||||
.headers(headers)
|
||||
.contentLength(zipFile.length())
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.body(resource);
|
||||
|
||||
return response;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return ResponseEntity.status(500).body(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void generateFolders(BgtUploadDTO dto) {
|
||||
List<Long> userIds = dto.getUserIds();
|
||||
|
||||
// 获取招工名
|
||||
BgtProjectRecruit recruit = recruitService.queryById(dto.getRecruitId());
|
||||
// 第一层文件夹名
|
||||
String firstLevelFolderName = recruit.getId() + "_" + recruit.getRecruitName();
|
||||
File baseDir = new File(TEMP_DIR);
|
||||
if (!baseDir.exists()) {
|
||||
if (!baseDir.mkdirs()) {
|
||||
System.err.println("无法创建基础目录: " + TEMP_DIR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
File firstLevelFolder = new File(baseDir, firstLevelFolderName);
|
||||
if (!firstLevelFolder.exists()) {
|
||||
if (firstLevelFolder.mkdirs()) {
|
||||
System.out.println("创建第一层文件夹: " + firstLevelFolderName);
|
||||
} else {
|
||||
System.err.println("无法创建第一层文件夹: " + firstLevelFolderName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 遍历每个用户 ID
|
||||
for (Long userId : userIds) {
|
||||
// 获取用户信息
|
||||
WgzUser wgzUser = wgzUserService.findByUserId(userId);
|
||||
String userName = wgzUser.getUsername();
|
||||
String idCard = wgzUser.getIdentityCard();
|
||||
// 第二层文件夹名
|
||||
String secondLevelFolderName = userName + "_" + idCard;
|
||||
File secondLevelFolder = new File(firstLevelFolder, secondLevelFolderName);
|
||||
if (!secondLevelFolder.exists()) {
|
||||
if (secondLevelFolder.mkdirs()) {
|
||||
System.out.println("创建第二层文件夹: " + secondLevelFolderName);
|
||||
} else {
|
||||
System.err.println("无法创建第二层文件夹: " + secondLevelFolderName);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 创建第三层的两个固定文件夹
|
||||
String[] thirdLevelFolderNames = {"劳务合同", "保险"};
|
||||
for (String thirdLevelFolderName : thirdLevelFolderNames) {
|
||||
File thirdLevelFolder = new File(secondLevelFolder, thirdLevelFolderName);
|
||||
if (!thirdLevelFolder.exists()) {
|
||||
if (thirdLevelFolder.mkdirs()) {
|
||||
System.out.println("创建第三层文件夹: " + thirdLevelFolderName);
|
||||
} else {
|
||||
System.err.println("无法创建第三层文件夹: " + thirdLevelFolderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void zipFolder(File folder, File zipFile) throws IOException {
|
||||
try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile))) {
|
||||
// 添加根文件夹
|
||||
zipOut.putNextEntry(new ZipEntry(folder.getName() + "/"));
|
||||
zipOut.closeEntry();
|
||||
zipFilesInFolder(folder, folder.getName(), zipOut);
|
||||
}
|
||||
}
|
||||
|
||||
private static void zipFilesInFolder(File folder, String parentPath, ZipOutputStream zipOut) throws IOException {
|
||||
File[] files = folder.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
// 添加文件夹条目
|
||||
zipOut.putNextEntry(new ZipEntry(parentPath + "/" + file.getName() + "/"));
|
||||
zipOut.closeEntry();
|
||||
zipFilesInFolder(file, parentPath + "/" + file.getName(), zipOut);
|
||||
} else {
|
||||
ZipEntry zipEntry = new ZipEntry(parentPath + "/" + file.getName());
|
||||
zipOut.putNextEntry(zipEntry);
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
byte[] bytes = new byte[1024];
|
||||
int length;
|
||||
while ((length = fis.read(bytes)) >= 0) {
|
||||
zipOut.write(bytes, 0, length);
|
||||
}
|
||||
}
|
||||
zipOut.closeEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void deleteFolder(File folder) {
|
||||
if (folder.isDirectory()) {
|
||||
File[] files = folder.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
deleteFolder(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!folder.delete()) {
|
||||
System.err.println("无法删除文件夹: " + folder.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ -34,4 +35,7 @@ public class BgtAttendanceDayDTO {
|
||||
@ApiModelProperty("任务ID")
|
||||
@NotNull(message = "任务ID不能为空")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty(value = "当前时间",hidden = true)
|
||||
private LocalTime currentTime;
|
||||
}
|
||||
|
@ -14,8 +14,8 @@ import java.time.LocalDate;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("App包工头补卡记录查询对象")
|
||||
public class BgtReissueacardListDTO {
|
||||
@ApiModel("App包工头审批记录查询对象")
|
||||
public class BgtAuditListDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
@ -33,7 +33,10 @@ public class BgtReissueacardListDTO {
|
||||
@ApiModelProperty("时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate nowTime;
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("类型 1- 补卡 2- 请假")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty(value = "审核人Id",hidden = true)
|
||||
private Long auditorUserId;
|
@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@ -30,11 +29,9 @@ public class BgtProjectRecruitApplyConsentDTO{
|
||||
private LocalDate entryTime;
|
||||
|
||||
@ApiModelProperty("入场材料")
|
||||
@Size(min = 1, message = "入场材料不能为空")
|
||||
List<AnnexDTO> entryMaterials;
|
||||
|
||||
@ApiModelProperty("保险")
|
||||
@Size(min = 1, message = "保险不能为空")
|
||||
List<AnnexDTO> insurances;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.bgt.domain.dto;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("App包工头资料上传对象")
|
||||
public class BgtUploadDTO {
|
||||
|
||||
@ApiModelProperty("招工ID")
|
||||
@NotNull(message = "招工ID不能为空")
|
||||
private Long recruitId ;
|
||||
|
||||
@ApiModelProperty("务工者Id")
|
||||
@NotNull(message = "务工者Id不能为空")
|
||||
private List<Long> userIds;
|
||||
}
|
@ -32,6 +32,9 @@ public class BgtAttendancePersonCountVO {
|
||||
@ApiModelProperty("早退分钟")
|
||||
private Integer earlyLeaveMinute = 0;
|
||||
|
||||
@ApiModelProperty("请假次数")
|
||||
private Integer leaveNum = 0;
|
||||
|
||||
@ApiModelProperty("早退记录")
|
||||
private List<WgzAttendanceRecordVO> earlyLeaveRecords;
|
||||
|
||||
@ -44,4 +47,7 @@ public class BgtAttendancePersonCountVO {
|
||||
@ApiModelProperty("考勤记录")
|
||||
private List<WgzAttendanceRecordVO> records;
|
||||
|
||||
@ApiModelProperty("请假记录")
|
||||
private List<WgzAttendanceRecordVO> leaveRecords;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.ruoyi.bgt.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("包工头审批记录返回对象")
|
||||
public class BgtAuditResultVO {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty("开始时间/补卡时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty("申请人姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("创建时间|申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("补卡理由")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝)")
|
||||
private String auditorType;
|
||||
|
||||
}
|
@ -82,7 +82,9 @@ public class BgtMessageDetailVO implements Serializable {
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
|
||||
//
|
||||
@ApiModelProperty("今日完成工作")
|
||||
private String finishToday;
|
||||
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation ;
|
||||
}
|
||||
|
@ -42,4 +42,5 @@ public class WgzAttendanceRecordVO implements Serializable {
|
||||
@ApiModelProperty("分钟")
|
||||
private Integer minutes;
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,11 +17,9 @@ import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.domain.dto.AnnexDTO;
|
||||
import com.ruoyi.common.enums.RecruitApplyStatus;
|
||||
import com.ruoyi.common.enums.RecruitStatus;
|
||||
import com.ruoyi.common.exception.BaseException;
|
||||
@ -47,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
|
||||
@ -255,13 +254,13 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
|
||||
recruitApply.setEntryTime(dto.getEntryTime());
|
||||
recruitApply.setStatus(RecruitApplyStatus.BGT_PASS.getCode());
|
||||
dto.getEntryMaterials().addAll(dto.getInsurances());
|
||||
for (AnnexDTO annexDTO : dto.getEntryMaterials()) {
|
||||
annexDTO.setRecruitId(recruitApply.getRecruitId());
|
||||
annexDTO.setUserId(recruitApply.getUserId());
|
||||
annexDTO.setUserType(Constants.WGZ);
|
||||
}
|
||||
annexService.insertBatch(dto.getEntryMaterials());
|
||||
// dto.getEntryMaterials().addAll(dto.getInsurances());
|
||||
// for (AnnexDTO annexDTO : dto.getEntryMaterials()) {
|
||||
// annexDTO.setRecruitId(recruitApply.getRecruitId());
|
||||
// annexDTO.setUserId(recruitApply.getUserId());
|
||||
// annexDTO.setUserType(Constants.WGZ);
|
||||
// }
|
||||
// annexService.insertBatch(dto.getEntryMaterials());
|
||||
//发消息
|
||||
HashMap<String, String> mp = new HashMap<>();
|
||||
mp.put("projectName", iBgtProjectRecruitService.getById(recruitApply.getRecruitId()).getRecruitName());
|
||||
@ -401,6 +400,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
Page<BgtAttendanceDayDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
|
||||
if(dto.getDate().equals(LocalDate.now())){
|
||||
dto.setCurrentTime(LocalTime.now());
|
||||
}
|
||||
|
||||
Page<BgtProjectRecruitApplyVO> queryVOPage = baseMapper.todayAttendanceList(queryDTOPage, dto);
|
||||
return PageUtils.buildDataInfo(queryVOPage);
|
||||
}
|
||||
@ -452,8 +456,6 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
iBgtProjectRecruitService.updateById(recruit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//发消息
|
||||
HashMap<String, String> mp = new HashMap<>();
|
||||
mp.put("projectName", recruit.getRecruitName());
|
||||
|
@ -95,6 +95,9 @@ public class FbsProjectTask implements Serializable {
|
||||
@ApiModelProperty("任务图片")
|
||||
private String taskImg;
|
||||
|
||||
@ApiModelProperty("任务附件")
|
||||
private String taskAnnex;
|
||||
|
||||
/** 资质要求 */
|
||||
@Excel(name = "资质要求")
|
||||
@ApiModelProperty("资质要求")
|
||||
|
@ -72,6 +72,9 @@ public class AppTaskDetailVO {
|
||||
@ApiModelProperty("任务图片")
|
||||
private String taskImg;
|
||||
|
||||
@ApiModelProperty("任务附件")
|
||||
private String taskAnnex;
|
||||
|
||||
/** 资质要求 */
|
||||
@ApiModelProperty("资质要求")
|
||||
private String qualification;
|
||||
|
@ -214,8 +214,10 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
||||
//计算到岗率
|
||||
if(totalNum!=0 && CollectionUtil.isNotEmpty(bgtDayAttendanceCountVOS)){
|
||||
BgtDayAttendanceCountVO bgtDayAttendanceCountVO = bgtDayAttendanceCountVOS.get(bgtDayAttendanceCountVOS.size() - 1);
|
||||
|
||||
int rate = new BigDecimal(bgtDayAttendanceCountVO.getReportToDutyNum()).divide(new BigDecimal(totalNum), 2, RoundingMode.HALF_UP)
|
||||
.multiply(new BigDecimal(100)).intValue();
|
||||
appTaskDetailVO.setReportToDutyNum(bgtDayAttendanceCountVO.getReportToDutyNum());
|
||||
appTaskDetailVO.setReportToDutyRate(rate);
|
||||
}
|
||||
return appTaskDetailVO;
|
||||
|
@ -15,9 +15,11 @@ import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
||||
import com.ruoyi.wgz.domain.WgzAttendance;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.wgz.domain.WgzMessage;
|
||||
import com.ruoyi.wgz.domain.WgzScoreRecord;
|
||||
import com.ruoyi.wgz.service.IWgzAttendanceService;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
import com.ruoyi.wgz.service.IWgzMessageService;
|
||||
import com.ruoyi.wgz.service.IWgzScoreRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -60,6 +62,9 @@ public class BusinessTask
|
||||
@Autowired
|
||||
private IWgzLeaveService iWgzLeaveService;
|
||||
|
||||
@Autowired
|
||||
private IWgzScoreRecordService wgzScoreRecordService;
|
||||
|
||||
public void ryNoParams()
|
||||
{
|
||||
Console.log("-------------------------------------------------------------------------");
|
||||
@ -124,23 +129,29 @@ public class BusinessTask
|
||||
List<BgtProjectRecruitApply> applyList = recruitApplyService.list(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||
.in(BgtProjectRecruitApply::getRecruitId, recruitIds));
|
||||
//筛选已离场的
|
||||
List<BgtProjectRecruitApply> outList = applyList.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.OUT_WORK.getCode())).collect(Collectors.toList());
|
||||
List<WgzScoreRecord> addList = new ArrayList<>();
|
||||
for (BgtProjectRecruitApply bgtProjectRecruitApply : outList) {
|
||||
WgzScoreRecord byUserIdAndRecruitApplyId = wgzScoreRecordService.getByUserIdAndRecruitApplyId(bgtProjectRecruitApply.getUserId(), bgtProjectRecruitApply.getId());
|
||||
if (byUserIdAndRecruitApplyId == null) {
|
||||
WgzScoreRecord wgzScoreRecord = new WgzScoreRecord();
|
||||
wgzScoreRecord.setRecruitId(bgtProjectRecruitApply.getRecruitId());
|
||||
wgzScoreRecord.setRecruitApplyId(bgtProjectRecruitApply.getId());
|
||||
wgzScoreRecord.setScore(5D);
|
||||
wgzScoreRecord.setContent("默认评分");
|
||||
wgzScoreRecord.setCreateBy("系统");
|
||||
wgzScoreRecord.setUpdateBy("系统");
|
||||
|
||||
addList.add(wgzScoreRecord);
|
||||
}
|
||||
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(addList)){
|
||||
wgzScoreRecordService.saveBatch(addList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// iFbsProjectTaskService.lambdaUpdate().in(FbsProjectTask::getId,collect)
|
||||
// .set(FbsProjectTask::getStatus, "3")
|
||||
// .update();
|
||||
// iWgzMessageService.saveBatch(WgzAndBgtMessageConstant.getScoreMessage(collect));
|
||||
}
|
||||
|
||||
|
||||
recruitApplyService.lambdaUpdate()
|
||||
.le(BgtProjectRecruitApply::getEntryTime, LocalDate.now())
|
||||
.eq(BgtProjectRecruitApply::getStatus,RecruitApplyStatus.WGZ_PASS.getCode())
|
||||
.set(BgtProjectRecruitApply::getStatus,RecruitApplyStatus.BGT_REFUSE.getCode())
|
||||
.update();
|
||||
Console.log("招工进场任务结束!");
|
||||
Console.log("务工评价任务结束!");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
package com.ruoyi.wgz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
@ -47,4 +48,5 @@ public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> {
|
||||
" a.id DESC")
|
||||
WgzAppUserLeaveDetailsRes userLeaveDetails(@Param("id") Long id);
|
||||
|
||||
Page<BgtAuditResultVO> bgtLeaveAudit(@Param("page") Page<BgtAuditListDTO> page, @Param("dto") BgtAuditListDTO dto);
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
package com.ruoyi.wgz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.wgz.bo.req.WgzAppReplacementCardRecordReq;
|
||||
import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes;
|
||||
import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes;
|
||||
import com.ruoyi.wgz.domain.WgzReissueacard;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -27,7 +28,7 @@ public interface WgzReissueacardMapper extends BaseMapperPlus<WgzReissueacard> {
|
||||
*/
|
||||
Page<WgzReplacementCardRecordRes> userReplacementCardRecordListPage(@Param("page") Page<WgzAppReplacementCardRecordReq> page,@Param("userId") Long userId);
|
||||
|
||||
Page<WgzReplacementCardRecordRes> appQueryPageList(@Param("page") Page<BgtReissueacardListDTO> page,@Param("dto") BgtReissueacardListDTO dto);
|
||||
Page<BgtAuditResultVO> appQueryPageList(@Param("page") Page<BgtAuditListDTO> page, @Param("dto") BgtAuditListDTO dto);
|
||||
|
||||
WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(@Param("id") Long id);
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.wgz.service;
|
||||
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
||||
@ -113,4 +115,8 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> {
|
||||
*/
|
||||
void refuseBatch(Long recruitId,Long userId);
|
||||
|
||||
/**
|
||||
* 包工头审核列表
|
||||
*/
|
||||
TableDataInfo<BgtAuditResultVO> bgtLeaveAudit(BgtAuditListDTO dto);
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.ruoyi.wgz.service;
|
||||
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wgz.bo.WgzReissueacardQueryBo;
|
||||
@ -81,7 +82,7 @@ public interface IWgzReissueacardService extends IServicePlus<WgzReissueacard> {
|
||||
/**
|
||||
* 补卡记录审核(分页)
|
||||
*/
|
||||
TableDataInfo<WgzReplacementCardRecordRes> appQueryPageList(BgtReissueacardListDTO dto);
|
||||
TableDataInfo<BgtAuditResultVO> appQueryPageList(BgtAuditListDTO dto);
|
||||
|
||||
/**
|
||||
* 审核
|
||||
|
@ -15,41 +15,49 @@ import java.util.List;
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
public interface IWgzScoreRecordService extends IServicePlus<WgzScoreRecord> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
WgzScoreRecord queryById(Long id);
|
||||
/**
|
||||
* 查询单个
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
WgzScoreRecord queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<WgzScoreRecord> queryPageList(WgzScoreRecordQueryBo bo);
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<WgzScoreRecord> queryPageList(WgzScoreRecordQueryBo bo);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<WgzScoreRecord> queryList(WgzScoreRecordQueryBo bo);
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<WgzScoreRecord> queryList(WgzScoreRecordQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入务工者评分记录
|
||||
* @param bo 务工者评分记录新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insert(WgzScoreRecord bo);
|
||||
/**
|
||||
* 根据新增业务对象插入务工者评分记录
|
||||
*
|
||||
* @param bo 务工者评分记录新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insert(WgzScoreRecord bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改务工者评分记录
|
||||
* @param bo 务工者评分记录编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean update(WgzScoreRecord bo);
|
||||
/**
|
||||
* 根据编辑业务对象修改务工者评分记录
|
||||
*
|
||||
* @param bo 务工者评分记录编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean update(WgzScoreRecord bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
*
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
WgzScoreRecord getByUserIdAndRecruitApplyId(Long userId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.*;
|
||||
@ -717,6 +716,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
List<WgzAttendanceRecordVO> earlyLeaveRecords = new ArrayList<>();
|
||||
List<WgzAttendanceRecordVO> missRecords = new ArrayList<>();
|
||||
List<WgzAttendanceRecordVO> records = new ArrayList<>();
|
||||
List<WgzAttendanceRecordVO> leaveRecords = new ArrayList<>();
|
||||
|
||||
for (WgzAttendance wgzAttendance : wgzAttendances) {
|
||||
|
||||
@ -766,6 +766,12 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
missRecordVO.setTime(endWorkTime);
|
||||
missRecords.add(missRecordVO);
|
||||
}
|
||||
//统计请假天数
|
||||
if(wgzAttendance.getLeaveMarkId() != null){
|
||||
WgzAttendanceRecordVO leaveRecordVO = BeanUtil.copyProperties(recordVO, WgzAttendanceRecordVO.class);
|
||||
leaveRecords.add(leaveRecordVO);
|
||||
}
|
||||
|
||||
}
|
||||
//出勤数据
|
||||
bgtAttendanceDetailVO.setDayNum(records.stream().mapToDouble(WgzAttendanceRecordVO::getDay).sum());
|
||||
@ -781,6 +787,9 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
//缺卡数据
|
||||
bgtAttendanceDetailVO.setMissNum(missRecords.size());
|
||||
bgtAttendanceDetailVO.setMissRecords(missRecords);
|
||||
//请假数据
|
||||
bgtAttendanceDetailVO.setLeaveNum(leaveRecords.size());
|
||||
bgtAttendanceDetailVO.setLeaveRecords(leaveRecords);
|
||||
return bgtAttendanceDetailVO;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,9 @@ import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||
import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
@ -345,4 +347,13 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
||||
bgtAudit(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BgtAuditResultVO> bgtLeaveAudit(BgtAuditListDTO dto) {
|
||||
dto.setAuditorUserId(SecurityUtils.getAppUserId());
|
||||
Page<BgtAuditListDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
return PageUtils.buildDataInfo(baseMapper.bgtLeaveAudit(queryDTOPage, dto));
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,9 @@ import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||
import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtAuditListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtReissueacardUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtAuditResultVO;
|
||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
@ -230,9 +231,9 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WgzReplacementCardRecordRes> appQueryPageList(BgtReissueacardListDTO dto) {
|
||||
public TableDataInfo<BgtAuditResultVO> appQueryPageList(BgtAuditListDTO dto) {
|
||||
dto.setAuditorUserId(SecurityUtils.getAppUserId());
|
||||
Page<BgtReissueacardListDTO> queryDTOPage = new Page<>();
|
||||
Page<BgtAuditListDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
return PageUtils.buildDataInfo(baseMapper.appQueryPageList(queryDTOPage, dto));
|
||||
|
@ -2,22 +2,21 @@ package com.ruoyi.wgz.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
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.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.wgz.bo.WgzScoreRecordQueryBo;
|
||||
import com.ruoyi.wgz.domain.WgzScoreRecord;
|
||||
import com.ruoyi.wgz.mapper.WgzScoreRecordMapper;
|
||||
import com.ruoyi.wgz.service.IWgzScoreRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 务工者评分记录Service业务层处理
|
||||
@ -85,4 +84,11 @@ public class WgzScoreRecordServiceImpl extends ServicePlusImpl<WgzScoreRecordMap
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgzScoreRecord getByUserIdAndRecruitApplyId(Long userId, Long recruitApplyId) {
|
||||
return getOne(Wrappers.<WgzScoreRecord>lambdaQuery()
|
||||
.eq(WgzScoreRecord::getUserId,userId)
|
||||
.eq(WgzScoreRecord::getRecruitApplyId,recruitApplyId).last("limit 1"));
|
||||
}
|
||||
}
|
||||
|
@ -115,9 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bpra.task_id,
|
||||
bpra.recruit_id,
|
||||
CASE
|
||||
WHEN wa.leave_mark_id = 1 THEN '请假'
|
||||
WHEN wa.leave_mark_id IS NOT NULL THEN '请假'
|
||||
WHEN wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0 THEN '正常'
|
||||
WHEN wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null THEN '异常'
|
||||
WHEN wa.late = 1 OR wa.missed_in = 1 OR wa.early_leave = 1 OR wa.missed_out = 1 THEN '异常'
|
||||
ELSE '异常'
|
||||
END AS attendance_status
|
||||
FROM bgt_project_recruit_apply bpra
|
||||
@ -131,10 +131,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and (wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0) and leave_mark_id is null
|
||||
</if>
|
||||
<if test="dto.attendanceType !=null and dto.attendanceType ==2 ">
|
||||
and (wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null) and leave_mark_id is null
|
||||
AND ((wa.late = 1 OR wa.missed_in = 1 OR wa.early_leave = 1 OR wa.missed_out = 1)
|
||||
AND leave_mark_id IS NULL)
|
||||
</if>
|
||||
<if test="dto.attendanceType !=null and dto.attendanceType ==3 ">
|
||||
and wa.leave_mark_id = 1
|
||||
and wa.leave_mark_id IS NOT NULL
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -62,8 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
wdc.dily_time,
|
||||
wu.avatar_name,
|
||||
wu.username,
|
||||
wu.status,
|
||||
wu.create_time
|
||||
wdc.status,
|
||||
wdc.create_time
|
||||
from wgz_daily_clock wdc
|
||||
left join wgz_user wu on wdc.user_id = wu.user_id
|
||||
where wdc.auditor_user_id = #{dto.auditorUserId}
|
||||
|
@ -40,5 +40,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
<select id="bgtLeaveAudit" resultType="com.ruoyi.bgt.domain.vo.BgtAuditResultVO">
|
||||
SELECT
|
||||
a.id,
|
||||
'2' as dataType,
|
||||
a.start_time,
|
||||
a.end_time,
|
||||
a.create_time,
|
||||
a.reason,
|
||||
a.auditor_type,
|
||||
b.username
|
||||
FROM
|
||||
wgz_leave a
|
||||
LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0)
|
||||
WHERE
|
||||
a.auditor_user_id = #{dto.auditorUserId}
|
||||
and a.recruit_id in (select id from bgt_project_recruit where task_id = #{dto.taskId})
|
||||
<if test="dto.auditorType != null and dto.auditorType != ''">
|
||||
and a.auditor_type = #{dto.auditorType}
|
||||
</if>
|
||||
<if test="dto.auditorType == null">
|
||||
and a.auditor_type in (0,1,2,3)
|
||||
</if>
|
||||
<if test="dto.date != null">
|
||||
and date(a.create_time) = #{dto.date}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -61,15 +61,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes">
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.bgt.domain.vo.BgtAuditResultVO">
|
||||
SELECT
|
||||
a.*,
|
||||
b.username as auditorname,
|
||||
b.avatar_name as auditorHead,
|
||||
c.username as userName
|
||||
a.id,
|
||||
'1' as dataType,
|
||||
a.now_time as startTime,
|
||||
a.create_time,
|
||||
a.reason,
|
||||
a.auditor_type,
|
||||
c.username
|
||||
FROM
|
||||
wgz_reissueacard a
|
||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
||||
LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0)
|
||||
WHERE
|
||||
a.auditor_user_id = #{dto.auditorUserId}
|
||||
@ -77,8 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dto.auditorType != null and dto.auditorType != ''">
|
||||
and a.auditor_type = #{dto.auditorType}
|
||||
</if>
|
||||
<if test="dto.nowTime != null">
|
||||
and date(a.create_time) = #{dto.nowTime}
|
||||
<if test="dto.date != null">
|
||||
and date(a.create_time) = #{dto.date}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
|
Reference in New Issue
Block a user