优化
This commit is contained in:
@ -11,9 +11,9 @@ import java.util.List;
|
|||||||
public enum AuditStatus
|
public enum AuditStatus
|
||||||
{
|
{
|
||||||
UNREAD("0","未读"),
|
UNREAD("0","未读"),
|
||||||
AUDIT("1", "审核中"),
|
AUDIT("1", "待审核"),
|
||||||
PASS("2", "已审核"),
|
PASS("2", "已同意"),
|
||||||
REFUSE("3", "未通过"),
|
REFUSE("3", "已拒绝"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
@ -36,7 +36,14 @@ public enum AuditStatus
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取审核状态列表
|
||||||
public static List<String> getAudit(){
|
public static List<String> getAudit(){
|
||||||
|
// 将PASS和REFUSE的code值转换为List<String>类型
|
||||||
return Arrays.asList(PASS.getCode(),REFUSE.getCode());
|
return Arrays.asList(PASS.getCode(),REFUSE.getCode());
|
||||||
}
|
}
|
||||||
|
// 获取待审核的列表
|
||||||
|
public static List<String> getToAudit(){
|
||||||
|
// 将UNREAD和AUDIT的code值转换为List<String>类型
|
||||||
|
return Arrays.asList(UNREAD.getCode(),AUDIT.getCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,7 @@ public class BgtReissueacardUpdateDTO {
|
|||||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝)")
|
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝)")
|
||||||
private String auditorType;
|
private String auditorType;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核意见")
|
||||||
|
private String auditorOpinion;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ public class BgtScoreDTO {
|
|||||||
/** 招工ID */
|
/** 招工ID */
|
||||||
@ApiModelProperty("招工ID")
|
@ApiModelProperty("招工ID")
|
||||||
private Long recruitId;
|
private Long recruitId;
|
||||||
|
@ApiModelProperty("招工申请ID")
|
||||||
|
private Long recruitApplyId;
|
||||||
/** 被评人ID(务工者) */
|
/** 被评人ID(务工者) */
|
||||||
@ApiModelProperty("被评人ID(务工者)")
|
@ApiModelProperty("被评人ID(务工者)")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
@ -37,9 +37,7 @@ import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes;
|
|||||||
import com.ruoyi.wgz.domain.WgzMessage;
|
import com.ruoyi.wgz.domain.WgzMessage;
|
||||||
import com.ruoyi.wgz.domain.WgzScoreRecord;
|
import com.ruoyi.wgz.domain.WgzScoreRecord;
|
||||||
import com.ruoyi.wgz.domain.WgzUser;
|
import com.ruoyi.wgz.domain.WgzUser;
|
||||||
import com.ruoyi.wgz.service.IWgzMessageService;
|
import com.ruoyi.wgz.service.*;
|
||||||
import com.ruoyi.wgz.service.IWgzScoreRecordService;
|
|
||||||
import com.ruoyi.wgz.service.IWgzUserService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@ -93,6 +91,14 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWgzService iWgzService;
|
private IWgzService iWgzService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private IWgzReissueacardService wgzReissueacardService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private IWgzLeaveService wgzLeaveService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BgtProjectRecruitApply queryById(Long id) {
|
public BgtProjectRecruitApply queryById(Long id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -383,6 +389,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
recruit.setStatus(RecruitStatus.PROGRESS.getCode());
|
recruit.setStatus(RecruitStatus.PROGRESS.getCode());
|
||||||
iBgtProjectRecruitService.updateById(recruit);
|
iBgtProjectRecruitService.updateById(recruit);
|
||||||
}
|
}
|
||||||
|
//批量拒绝请假和补卡
|
||||||
|
wgzReissueacardService.refuseBatch(recruitApply.getRecruitId(),recruitApply.getUserId());
|
||||||
|
wgzLeaveService.refuseBatch(recruitApply.getRecruitId(),recruitApply.getUserId());
|
||||||
|
|
||||||
//发消息
|
//发消息
|
||||||
HashMap<String, String> mp = new HashMap<>();
|
HashMap<String, String> mp = new HashMap<>();
|
||||||
|
@ -12,15 +12,13 @@ import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
|
|||||||
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO;
|
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO;
|
||||||
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO;
|
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO;
|
||||||
import com.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper;
|
import com.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
|
||||||
import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
|
import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.AuditStatus;
|
||||||
import com.ruoyi.common.exception.BaseException;
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -36,14 +34,6 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjectTaskProgressMapper, BgtProjectTaskProgress> implements IBgtProjectTaskProgressService {
|
public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjectTaskProgressMapper, BgtProjectTaskProgress> implements IBgtProjectTaskProgressService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IFbsProjectTaskService fbsProjectTaskService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBgtProjectRecruitApplyService recruitApplyService;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BgtProjectTaskProgress queryById(Long id){
|
public BgtProjectTaskProgress queryById(Long id){
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -140,6 +130,7 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
public Integer getLastProgress(Long taskId) {
|
public Integer getLastProgress(Long taskId) {
|
||||||
LambdaQueryWrapper<BgtProjectTaskProgress> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BgtProjectTaskProgress> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(BgtProjectTaskProgress::getTaskId, taskId);
|
wrapper.eq(BgtProjectTaskProgress::getTaskId, taskId);
|
||||||
|
wrapper.eq(BgtProjectTaskProgress::getAuditStatus, AuditStatus.PASS.getCode());
|
||||||
wrapper.orderByDesc(BgtProjectTaskProgress::getProgress);
|
wrapper.orderByDesc(BgtProjectTaskProgress::getProgress);
|
||||||
List<BgtProjectTaskProgress> list = baseMapper.selectList(wrapper);
|
List<BgtProjectTaskProgress> list = baseMapper.selectList(wrapper);
|
||||||
return CollectionUtil.isEmpty(list)?0:list.get(0).getProgress();
|
return CollectionUtil.isEmpty(list)?0:list.get(0).getProgress();
|
||||||
|
@ -27,6 +27,9 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.util.ValidUtil.isValidBankCard;
|
||||||
|
import static com.ruoyi.common.util.ValidUtil.isValidIdentityCard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP包工头Service业务层处理
|
* APP包工头Service业务层处理
|
||||||
*
|
*
|
||||||
@ -128,6 +131,15 @@ public class BgtUserServiceImpl extends ServicePlusImpl<BgtUserMapper, BgtUser>
|
|||||||
if(bgtUser == null){
|
if(bgtUser == null){
|
||||||
throw new BaseException("用户不存在");
|
throw new BaseException("用户不存在");
|
||||||
}
|
}
|
||||||
|
// 校验身份证号
|
||||||
|
if (!isValidIdentityCard(dto.getIdentityCard())) {
|
||||||
|
throw new BaseException("身份证号格式不正确");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验银行卡号
|
||||||
|
if (!isValidBankCard(dto.getCardNo())) {
|
||||||
|
throw new BaseException("银行卡号格式不正确");
|
||||||
|
}
|
||||||
BeanUtil.copyProperties(dto, bgtUser);
|
BeanUtil.copyProperties(dto, bgtUser);
|
||||||
for (AnnexDTO annexDTO:dto.getAnnexList()){
|
for (AnnexDTO annexDTO:dto.getAnnexList()){
|
||||||
annexDTO.setUserId(dto.getUserId());
|
annexDTO.setUserId(dto.getUserId());
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.common.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验工具类
|
||||||
|
* @author zhangqiao
|
||||||
|
* @since 2020/4/16 16:05
|
||||||
|
*/
|
||||||
|
public class ValidUtil {
|
||||||
|
|
||||||
|
public static boolean isValidIdentityCard(String identityCard) {
|
||||||
|
// 简单的身份证号校验逻辑,可以根据需要进行更复杂的校验
|
||||||
|
return identityCard != null && identityCard.matches("\\d{15}|\\d{18}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isValidBankCard(String bankCard) {
|
||||||
|
// 简单的银行卡号校验逻辑,可以根据需要进行更复杂的校验
|
||||||
|
return bankCard != null && bankCard.matches("\\d{16,19}");
|
||||||
|
}
|
||||||
|
}
|
@ -103,6 +103,46 @@ public class BusinessTask
|
|||||||
Console.log("招工进场任务结束!");
|
Console.log("招工进场任务结束!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动给两个月前的任务下的人员默认5分的评价
|
||||||
|
*/
|
||||||
|
public void score()
|
||||||
|
{
|
||||||
|
Console.log("开始进行务工评价任务");
|
||||||
|
//搜索时间在两个月前的已完结的任务
|
||||||
|
List<FbsProjectTask> taskList = iFbsProjectTaskService.list(Wrappers.<FbsProjectTask>lambdaQuery()
|
||||||
|
.eq(FbsProjectTask::getStatus, "2")
|
||||||
|
.lt(FbsProjectTask::getTaskBeginTime, LocalDate.now().plusMonths(-2)));
|
||||||
|
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
|
||||||
|
if(CollectionUtil.isNotEmpty(taskIds)){
|
||||||
|
//任务下的招工
|
||||||
|
List<BgtProjectRecruit> recruitList = recruitService.list(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
||||||
|
.in(BgtProjectRecruit::getTaskId, taskIds));
|
||||||
|
List<Long> recruitIds = recruitList.stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
|
||||||
|
if(CollectionUtil.isNotEmpty(recruitIds)){
|
||||||
|
//招工下的人员
|
||||||
|
List<BgtProjectRecruitApply> applyList = recruitApplyService.list(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
|
.in(BgtProjectRecruitApply::getRecruitId, recruitIds));
|
||||||
|
//筛选已离场的
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// 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("招工进场任务结束!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上班缺卡
|
* 上班缺卡
|
||||||
|
@ -36,6 +36,9 @@ public class WgzScoreRecord implements Serializable {
|
|||||||
@ApiModelProperty("招工ID")
|
@ApiModelProperty("招工ID")
|
||||||
private Long recruitId;
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工申请ID")
|
||||||
|
private Long recruitApplyId;
|
||||||
|
|
||||||
/** 被评人ID(务工者) */
|
/** 被评人ID(务工者) */
|
||||||
@Excel(name = "被评人ID(务工者)")
|
@Excel(name = "被评人ID(务工者)")
|
||||||
@ApiModelProperty("被评人ID(务工者)")
|
@ApiModelProperty("被评人ID(务工者)")
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.ruoyi.wgz.service;
|
package com.ruoyi.wgz.service;
|
||||||
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO;
|
import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
||||||
@ -10,7 +9,6 @@ import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
|
|||||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes;
|
import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes;
|
|
||||||
import com.ruoyi.wgz.domain.WgzLeave;
|
import com.ruoyi.wgz.domain.WgzLeave;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -110,4 +108,9 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> {
|
|||||||
*/
|
*/
|
||||||
Boolean bgtAudit(BgtLeaveUpdateDTO dto);
|
Boolean bgtAudit(BgtLeaveUpdateDTO dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量拒绝请假
|
||||||
|
*/
|
||||||
|
void refuseBatch(Long recruitId,Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,8 @@ import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes;
|
|||||||
import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes;
|
import com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes;
|
||||||
import com.ruoyi.wgz.domain.WgzReissueacard;
|
import com.ruoyi.wgz.domain.WgzReissueacard;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -92,4 +90,9 @@ public interface IWgzReissueacardService extends IServicePlus<WgzReissueacard> {
|
|||||||
|
|
||||||
WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(Long id);
|
WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒绝批量操作
|
||||||
|
*/
|
||||||
|
void refuseBatch(Long recruitId,Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
|
|||||||
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes;
|
import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes;
|
|
||||||
import com.ruoyi.wgz.domain.WgzAttendance;
|
import com.ruoyi.wgz.domain.WgzAttendance;
|
||||||
import com.ruoyi.wgz.domain.WgzLeave;
|
import com.ruoyi.wgz.domain.WgzLeave;
|
||||||
import com.ruoyi.wgz.domain.WgzMessage;
|
import com.ruoyi.wgz.domain.WgzMessage;
|
||||||
@ -306,6 +305,7 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
|||||||
.setMessageSmallType(SMALL_LEAVE);
|
.setMessageSmallType(SMALL_LEAVE);
|
||||||
iWgzMessageService.sendAMessage(wgzMessage);
|
iWgzMessageService.sendAMessage(wgzMessage);
|
||||||
|
|
||||||
|
if(AuditStatus.PASS.getCode().equals(dto.getAuditorType())){
|
||||||
//考勤信息
|
//考勤信息
|
||||||
List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery()
|
List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery()
|
||||||
.eq(WgzAttendance::getRecruitId, recruit.getId())
|
.eq(WgzAttendance::getRecruitId, recruit.getId())
|
||||||
@ -326,6 +326,23 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
|||||||
wgzAttendance.setExceptionType("7");
|
wgzAttendance.setExceptionType("7");
|
||||||
attendanceService.save(wgzAttendance);
|
attendanceService.save(wgzAttendance);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return updateById(wgzLeave);
|
return updateById(wgzLeave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void refuseBatch(Long recruitId, Long userId) {
|
||||||
|
List<WgzLeave> list = list(Wrappers.<WgzLeave>lambdaQuery()
|
||||||
|
.eq(WgzLeave::getRecruitId, recruitId)
|
||||||
|
.eq(WgzLeave::getUserId, userId)
|
||||||
|
.in(WgzLeave::getAuditorType, AuditStatus.getToAudit()));
|
||||||
|
for(WgzLeave wgzLeave : list){
|
||||||
|
BgtLeaveUpdateDTO dto = new BgtLeaveUpdateDTO();
|
||||||
|
dto.setId(wgzLeave.getId());
|
||||||
|
dto.setAuditorType(AuditStatus.REFUSE.getCode());
|
||||||
|
dto.setAuditorOpinion("您已退场");
|
||||||
|
bgtAudit(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
|||||||
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.AuditStatus;
|
||||||
import com.ruoyi.common.util.LocalDateToChineseWeekday;
|
import com.ruoyi.common.util.LocalDateToChineseWeekday;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
@ -40,7 +41,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
||||||
@ -243,8 +243,10 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
|||||||
public Boolean appUpdate(BgtReissueacardUpdateDTO dto) {
|
public Boolean appUpdate(BgtReissueacardUpdateDTO dto) {
|
||||||
WgzReissueacard byId = getById(dto.getId());
|
WgzReissueacard byId = getById(dto.getId());
|
||||||
BeanUtil.copyProperties(dto, byId);
|
BeanUtil.copyProperties(dto, byId);
|
||||||
|
byId.setAuditorTime(LocalDateTime.now());
|
||||||
boolean b = updateById(byId);
|
boolean b = updateById(byId);
|
||||||
|
boolean isPass = AuditStatus.PASS.getCode().equals(dto.getAuditorType());
|
||||||
|
if(isPass){
|
||||||
//修改考勤标记
|
//修改考勤标记
|
||||||
WgzAttendance attendance = iWgzAttendanceService.getById(byId.getAttendanceId());
|
WgzAttendance attendance = iWgzAttendanceService.getById(byId.getAttendanceId());
|
||||||
|
|
||||||
@ -270,12 +272,13 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
|||||||
}
|
}
|
||||||
iWgzAttendanceService.updateById(attendance);
|
iWgzAttendanceService.updateById(attendance);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//发消息
|
//发消息
|
||||||
HashMap<String, String> mp = new HashMap<>();
|
HashMap<String, String> mp = new HashMap<>();
|
||||||
mp.put("projectName", iBgtProjectRecruitService.getById(byId.getRecruitId()).getRecruitName());
|
mp.put("projectName", iBgtProjectRecruitService.getById(byId.getRecruitId()).getRecruitName());
|
||||||
mp.put("auditor", SecurityUtils.getUsername());
|
mp.put("auditor", SecurityUtils.getUsername());
|
||||||
Map<String, String> map = bgtMessage(mp, BGT_TYPE_MAKE_UP, true);
|
Map<String, String> map = bgtMessage(mp, BGT_TYPE_MAKE_UP, isPass);
|
||||||
WgzMessage wgzMessage = new WgzMessage()
|
WgzMessage wgzMessage = new WgzMessage()
|
||||||
.setSenderType(USERTYPE_BGT)
|
.setSenderType(USERTYPE_BGT)
|
||||||
.setSenderId(SecurityUtils.getAppUserId())
|
.setSenderId(SecurityUtils.getAppUserId())
|
||||||
@ -297,4 +300,20 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
|||||||
info.setWeek( LocalDateToChineseWeekday.getChineseWeekday(info.getRawTime().toLocalDate()));
|
info.setWeek( LocalDateToChineseWeekday.getChineseWeekday(info.getRawTime().toLocalDate()));
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void refuseBatch(Long recruitId, Long userId) {
|
||||||
|
List<WgzReissueacard> list = list(new LambdaQueryWrapper<WgzReissueacard>()
|
||||||
|
.eq(WgzReissueacard::getRecruitId, recruitId)
|
||||||
|
.eq(WgzReissueacard::getUserId, userId)
|
||||||
|
.in(WgzReissueacard::getAuditorType,AuditStatus.getToAudit()));
|
||||||
|
for (WgzReissueacard wgzReissueacard : list) {
|
||||||
|
BgtReissueacardUpdateDTO bgtReissueacardUpdateDTO = new BgtReissueacardUpdateDTO();
|
||||||
|
bgtReissueacardUpdateDTO.setId(wgzReissueacard.getId());
|
||||||
|
bgtReissueacardUpdateDTO.setAuditorType(AuditStatus.REFUSE.getCode());
|
||||||
|
bgtReissueacardUpdateDTO.setAuditorOpinion("您已退场");
|
||||||
|
appUpdate(bgtReissueacardUpdateDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
left join wgz_user wu on bpra.user_id = wu.user_id
|
left join wgz_user wu on bpra.user_id = wu.user_id
|
||||||
left join bgt_project_recruit bpr on bpr.id = bpra.recruit_id
|
left join bgt_project_recruit bpr on bpr.id = bpra.recruit_id
|
||||||
left join fbs_project_task fpt on fpt.id = bpr.task_id
|
left join fbs_project_task fpt on fpt.id = bpr.task_id
|
||||||
left join wgz_score_record wsr on bpra.user_id = wsr.user_id and bpra.recruit_id = wsr.recruit_id
|
left join wgz_score_record wsr on bpra.user_id = wsr.user_id and bpra.id = wsr.recruit_apply_id
|
||||||
<where>
|
<where>
|
||||||
<if test="dto.username !=null and dto.username !='' ">
|
<if test="dto.username !=null and dto.username !='' ">
|
||||||
and wu.username like concat('%', #{dto.username}, '%')
|
and wu.username like concat('%', #{dto.username}, '%')
|
||||||
@ -222,11 +222,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
wu.type_of_work,
|
wu.type_of_work,
|
||||||
bpr.recruit_name,
|
bpr.recruit_name,
|
||||||
fpt.task_name,
|
fpt.task_name,
|
||||||
bpr.task_id
|
bpr.task_id,
|
||||||
|
wsr.score as hasScore
|
||||||
from bgt_project_recruit_apply bpra
|
from bgt_project_recruit_apply bpra
|
||||||
left join wgz_user wu on bpra.user_id = wu.user_id
|
left join wgz_user wu on bpra.user_id = wu.user_id
|
||||||
left join bgt_project_recruit bpr on bpr.id = bpra.recruit_id
|
left join bgt_project_recruit bpr on bpr.id = bpra.recruit_id
|
||||||
left join fbs_project_task fpt on fpt.id = bpr.task_id
|
left join fbs_project_task fpt on fpt.id = bpr.task_id
|
||||||
|
left join wgz_score_record wsr on bpra.user_id = wsr.user_id and bpra.id = wsr.recruit_apply_id
|
||||||
<where>
|
<where>
|
||||||
<if test="dto.username !=null and dto.username !='' ">
|
<if test="dto.username !=null and dto.username !='' ">
|
||||||
and wu.username like concat('%', #{dto.username}, '%')
|
and wu.username like concat('%', #{dto.username}, '%')
|
||||||
|
Reference in New Issue
Block a user