更新
This commit is contained in:
		@ -314,7 +314,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
				orderByDesc(BgtProjectRecruitApply::getId).
 | 
			
		||||
				last("limit 1")
 | 
			
		||||
		);
 | 
			
		||||
		if (oneApply!=null && !(oneApply.getStatus().equals("6") || oneApply.getStatus().equals("7"))) {
 | 
			
		||||
		if (oneApply!=null && !(oneApply.getStatus().equals("2") || oneApply.getStatus().equals("4") || oneApply.getStatus().equals("6") || oneApply.getStatus().equals("7"))) {
 | 
			
		||||
			throw new RuntimeException("已申请过当前项目,如若再次申请请发起退场或者取消操作!");
 | 
			
		||||
		}
 | 
			
		||||
		//3-4、检查当前用户是否满足对应工种
 | 
			
		||||
@ -517,6 +517,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
	@Override
 | 
			
		||||
	@Transactional
 | 
			
		||||
	public Boolean userCancelRegistration(Long recruitApplyId) {
 | 
			
		||||
		//1、判断当前招工信息是否还在报名状态,如果状态改变就无法取消
 | 
			
		||||
		BgtProjectRecruitApply recruitApply = getById(recruitApplyId);
 | 
			
		||||
		if(!RecruitApplyStatus.SIGN_UP.getCode().equals(recruitApply.getStatus())){
 | 
			
		||||
			throw new RuntimeException("您申请的招工状态已改变,无法直接取消申请!");
 | 
			
		||||
		}
 | 
			
		||||
		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply();
 | 
			
		||||
		bgtProjectRecruitApply.setId(recruitApplyId);
 | 
			
		||||
		bgtProjectRecruitApply.setStatus("7");
 | 
			
		||||
 | 
			
		||||
@ -148,6 +148,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
 | 
			
		||||
		Page<BgtProjectRecruitQueryDTO> queryDTOPage = new Page<>();
 | 
			
		||||
		queryDTOPage.setCurrent(dto.getPageNum());
 | 
			
		||||
		queryDTOPage.setSize(dto.getPageSize());
 | 
			
		||||
		dto.setUserId(SecurityUtils.getAppUserId());
 | 
			
		||||
		Page<BgtProjectRecruitVO> queryVOPage = baseMapper.appQueryPageList(queryDTOPage, dto);
 | 
			
		||||
		for(BgtProjectRecruitVO vo : queryVOPage.getRecords()) {
 | 
			
		||||
			BgtProjectRecruitApplyUserDTO userDTO = new BgtProjectRecruitApplyUserDTO();
 | 
			
		||||
@ -235,7 +236,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
 | 
			
		||||
		pe.setSize(req.getPageSize());
 | 
			
		||||
		TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId));
 | 
			
		||||
//		wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> {
 | 
			
		||||
//			//1、获取当前用户的取消、满员、失效、同意、拒绝状态
 | 
			
		||||
//			//1、获取当前用户的满员、失效、同意、拒绝、报名状态
 | 
			
		||||
//			//1、获取当前项目下的成员
 | 
			
		||||
//			List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(registeredProjectRes.getId());
 | 
			
		||||
//		});
 | 
			
		||||
 | 
			
		||||
@ -111,6 +111,6 @@ public class WgzAppCancelRegistrationProjectDetailsRes implements Serializable {
 | 
			
		||||
	@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)")
 | 
			
		||||
	private String full;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("务工者同意拒绝状态:3务工者同意  4务工者拒绝")
 | 
			
		||||
	@ApiModelProperty("务工者状态:0报名 1包工同意  2包工头拒绝 3务工者同意  4务工者拒绝  5进场 6离场 7取消")
 | 
			
		||||
	private String status;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -67,5 +67,11 @@ public class WgzAppRegisteredProjectRes implements Serializable {
 | 
			
		||||
	@ApiModelProperty("工种名称")
 | 
			
		||||
	private String typeOfWorkLabel;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工状态(1-进行中,2-已招满,3-已过期)")
 | 
			
		||||
	private String status;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("0报名 1包工同意  2包工头拒绝(截止时间)3务工者同意  4务工者拒绝  5进场 6离场 7取消")
 | 
			
		||||
	private String statusApply;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,7 +14,7 @@ import java.time.LocalDateTime;
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
public class WgzAppCardReplacementApplicationTwo implements Serializable {
 | 
			
		||||
	@ApiModelProperty("补卡自增ID")
 | 
			
		||||
	@ApiModelProperty("考勤打卡自增ID")
 | 
			
		||||
	private Long id;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("补卡状态(1迟到 2早退 3上班缺卡 4下班缺卡)")
 | 
			
		||||
 | 
			
		||||
@ -29,6 +29,6 @@ public interface WgzReissueacardMapper extends BaseMapperPlus<WgzReissueacard> {
 | 
			
		||||
 | 
			
		||||
	Page<WgzReplacementCardRecordRes> appQueryPageList(@Param("page") Page<BgtReissueacardListDTO> page,@Param("dto") BgtReissueacardListDTO dto);
 | 
			
		||||
 | 
			
		||||
	WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(@Param("userId") Long id);
 | 
			
		||||
	WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(@Param("id") Long id);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -32,9 +32,11 @@ import com.ruoyi.wgz.bo.rests.WgzAppCardReplacementApplicationTwo;
 | 
			
		||||
import com.ruoyi.wgz.bo.rests.WgzAppPunchTheCalendarRecordThree;
 | 
			
		||||
import com.ruoyi.wgz.bo.rests.WgzAppPunchTheCalendarRecordTwo;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzAttendance;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzReissueacard;
 | 
			
		||||
import com.ruoyi.wgz.mapper.WgzAttendanceMapper;
 | 
			
		||||
import com.ruoyi.wgz.service.IWgzAttendanceService;
 | 
			
		||||
import com.ruoyi.wgz.service.IWgzLeaveService;
 | 
			
		||||
import com.ruoyi.wgz.service.IWgzReissueacardService;
 | 
			
		||||
import com.ruoyi.wgz.service.IWgzUserService;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.context.annotation.Lazy;
 | 
			
		||||
@ -70,6 +72,9 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IFbsProjectTaskService taskService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzReissueacardService iWgzReissueacardService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
@ -367,6 +372,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
 | 
			
		||||
				addRecord(wgzAttendance, 4, LocalDateTime.from(appById.getEndWorkTime()), list);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		//
 | 
			
		||||
		return wgzAppCardReplacementApplicationRes.setList(list);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -590,7 +596,17 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
 | 
			
		||||
			.setFillingData(date)
 | 
			
		||||
			.setWeek(chineseWeekday)
 | 
			
		||||
			.setFillingDataTime(fillingDataTime);
 | 
			
		||||
		list.add(two);
 | 
			
		||||
		//判断当前数据是否存在在补卡申请表中,不存在责添加到列表中
 | 
			
		||||
		int count = iWgzReissueacardService.count(
 | 
			
		||||
			Wrappers.<WgzReissueacard>lambdaQuery().
 | 
			
		||||
				eq(WgzReissueacard::getRecruitId, wgzAttendance.getRecruitId()).
 | 
			
		||||
				eq(WgzReissueacard::getUserId, wgzAttendance.getUserId()).
 | 
			
		||||
				eq(WgzReissueacard::getAttendanceId, wgzAttendance.getId()).
 | 
			
		||||
				eq(WgzReissueacard::getType, type == 1 || type == 3 ? 0 : 1)
 | 
			
		||||
		);
 | 
			
		||||
		if (count == 0){
 | 
			
		||||
			list.add(two);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
 | 
			
		||||
@ -153,7 +153,7 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
 | 
			
		||||
		//1、获取当前用户信息
 | 
			
		||||
		Long appUserId = SecurityUtils.getAppUserId();
 | 
			
		||||
		BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
 | 
			
		||||
		BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId());
 | 
			
		||||
		BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
 | 
			
		||||
		//4、获取到原打卡的信息
 | 
			
		||||
		WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId());
 | 
			
		||||
		if (Objects.isNull(attendanceInfo)) {
 | 
			
		||||
@ -169,13 +169,12 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
 | 
			
		||||
		WgzReissueacard wgzReissueacard = new WgzReissueacard().
 | 
			
		||||
			setRecruitId(recruitApply.getRecruitId()).
 | 
			
		||||
			setUserId(appUserId).
 | 
			
		||||
			setAttendanceId(req.getAttendanceId()).
 | 
			
		||||
			setAttendanceId(attendanceInfo.getId()).
 | 
			
		||||
			setType(req.getType()).
 | 
			
		||||
			setRecruitName(recruit.getRecruitName()).
 | 
			
		||||
			setRawTime(rawTime).
 | 
			
		||||
			setNowTime(req.getNowTime()).
 | 
			
		||||
			setReason(req.getReason()).
 | 
			
		||||
			setAttendanceId(recruit.getUserId());
 | 
			
		||||
			setReason(req.getReason());
 | 
			
		||||
		int insert = baseMapper.insert(wgzReissueacard);
 | 
			
		||||
		//6、发送消息
 | 
			
		||||
		WgzUser byId = wgzUserService.findByUserId(appUserId);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user