更新
This commit is contained in:
@ -314,7 +314,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
orderByDesc(BgtProjectRecruitApply::getId).
|
orderByDesc(BgtProjectRecruitApply::getId).
|
||||||
last("limit 1")
|
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("已申请过当前项目,如若再次申请请发起退场或者取消操作!");
|
throw new RuntimeException("已申请过当前项目,如若再次申请请发起退场或者取消操作!");
|
||||||
}
|
}
|
||||||
//3-4、检查当前用户是否满足对应工种
|
//3-4、检查当前用户是否满足对应工种
|
||||||
@ -517,6 +517,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean userCancelRegistration(Long recruitApplyId) {
|
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 bgtProjectRecruitApply = new BgtProjectRecruitApply();
|
||||||
bgtProjectRecruitApply.setId(recruitApplyId);
|
bgtProjectRecruitApply.setId(recruitApplyId);
|
||||||
bgtProjectRecruitApply.setStatus("7");
|
bgtProjectRecruitApply.setStatus("7");
|
||||||
|
@ -148,6 +148,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
|||||||
Page<BgtProjectRecruitQueryDTO> queryDTOPage = new Page<>();
|
Page<BgtProjectRecruitQueryDTO> queryDTOPage = new Page<>();
|
||||||
queryDTOPage.setCurrent(dto.getPageNum());
|
queryDTOPage.setCurrent(dto.getPageNum());
|
||||||
queryDTOPage.setSize(dto.getPageSize());
|
queryDTOPage.setSize(dto.getPageSize());
|
||||||
|
dto.setUserId(SecurityUtils.getAppUserId());
|
||||||
Page<BgtProjectRecruitVO> queryVOPage = baseMapper.appQueryPageList(queryDTOPage, dto);
|
Page<BgtProjectRecruitVO> queryVOPage = baseMapper.appQueryPageList(queryDTOPage, dto);
|
||||||
for(BgtProjectRecruitVO vo : queryVOPage.getRecords()) {
|
for(BgtProjectRecruitVO vo : queryVOPage.getRecords()) {
|
||||||
BgtProjectRecruitApplyUserDTO userDTO = new BgtProjectRecruitApplyUserDTO();
|
BgtProjectRecruitApplyUserDTO userDTO = new BgtProjectRecruitApplyUserDTO();
|
||||||
@ -235,7 +236,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
|||||||
pe.setSize(req.getPageSize());
|
pe.setSize(req.getPageSize());
|
||||||
TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId));
|
TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId));
|
||||||
// wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> {
|
// wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> {
|
||||||
// //1、获取当前用户的取消、满员、失效、同意、拒绝状态
|
// //1、获取当前用户的满员、失效、同意、拒绝、报名状态
|
||||||
// //1、获取当前项目下的成员
|
// //1、获取当前项目下的成员
|
||||||
// List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(registeredProjectRes.getId());
|
// List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(registeredProjectRes.getId());
|
||||||
// });
|
// });
|
||||||
|
@ -111,6 +111,6 @@ public class WgzAppCancelRegistrationProjectDetailsRes implements Serializable {
|
|||||||
@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)")
|
@ApiModelProperty("招工是否正常(0正常 1已招满 2已失效)")
|
||||||
private String full;
|
private String full;
|
||||||
|
|
||||||
@ApiModelProperty("务工者同意拒绝状态:3务工者同意 4务工者拒绝")
|
@ApiModelProperty("务工者状态:0报名 1包工同意 2包工头拒绝 3务工者同意 4务工者拒绝 5进场 6离场 7取消")
|
||||||
private String status;
|
private String status;
|
||||||
}
|
}
|
||||||
|
@ -67,5 +67,11 @@ public class WgzAppRegisteredProjectRes implements Serializable {
|
|||||||
@ApiModelProperty("工种名称")
|
@ApiModelProperty("工种名称")
|
||||||
private String typeOfWorkLabel;
|
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
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class WgzAppCardReplacementApplicationTwo implements Serializable {
|
public class WgzAppCardReplacementApplicationTwo implements Serializable {
|
||||||
@ApiModelProperty("补卡自增ID")
|
@ApiModelProperty("考勤打卡自增ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ApiModelProperty("补卡状态(1迟到 2早退 3上班缺卡 4下班缺卡)")
|
@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);
|
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.WgzAppPunchTheCalendarRecordThree;
|
||||||
import com.ruoyi.wgz.bo.rests.WgzAppPunchTheCalendarRecordTwo;
|
import com.ruoyi.wgz.bo.rests.WgzAppPunchTheCalendarRecordTwo;
|
||||||
import com.ruoyi.wgz.domain.WgzAttendance;
|
import com.ruoyi.wgz.domain.WgzAttendance;
|
||||||
|
import com.ruoyi.wgz.domain.WgzReissueacard;
|
||||||
import com.ruoyi.wgz.mapper.WgzAttendanceMapper;
|
import com.ruoyi.wgz.mapper.WgzAttendanceMapper;
|
||||||
import com.ruoyi.wgz.service.IWgzAttendanceService;
|
import com.ruoyi.wgz.service.IWgzAttendanceService;
|
||||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||||
|
import com.ruoyi.wgz.service.IWgzReissueacardService;
|
||||||
import com.ruoyi.wgz.service.IWgzUserService;
|
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;
|
||||||
@ -70,6 +72,9 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IFbsProjectTaskService taskService;
|
private IFbsProjectTaskService taskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWgzReissueacardService iWgzReissueacardService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -367,6 +372,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
addRecord(wgzAttendance, 4, LocalDateTime.from(appById.getEndWorkTime()), list);
|
addRecord(wgzAttendance, 4, LocalDateTime.from(appById.getEndWorkTime()), list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//
|
||||||
return wgzAppCardReplacementApplicationRes.setList(list);
|
return wgzAppCardReplacementApplicationRes.setList(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,7 +596,17 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
.setFillingData(date)
|
.setFillingData(date)
|
||||||
.setWeek(chineseWeekday)
|
.setWeek(chineseWeekday)
|
||||||
.setFillingDataTime(fillingDataTime);
|
.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
|
@Override
|
||||||
|
@ -153,7 +153,7 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
|||||||
//1、获取当前用户信息
|
//1、获取当前用户信息
|
||||||
Long appUserId = SecurityUtils.getAppUserId();
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId());
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
|
||||||
//4、获取到原打卡的信息
|
//4、获取到原打卡的信息
|
||||||
WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId());
|
WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId());
|
||||||
if (Objects.isNull(attendanceInfo)) {
|
if (Objects.isNull(attendanceInfo)) {
|
||||||
@ -169,13 +169,12 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
|||||||
WgzReissueacard wgzReissueacard = new WgzReissueacard().
|
WgzReissueacard wgzReissueacard = new WgzReissueacard().
|
||||||
setRecruitId(recruitApply.getRecruitId()).
|
setRecruitId(recruitApply.getRecruitId()).
|
||||||
setUserId(appUserId).
|
setUserId(appUserId).
|
||||||
setAttendanceId(req.getAttendanceId()).
|
setAttendanceId(attendanceInfo.getId()).
|
||||||
setType(req.getType()).
|
setType(req.getType()).
|
||||||
setRecruitName(recruit.getRecruitName()).
|
setRecruitName(recruit.getRecruitName()).
|
||||||
setRawTime(rawTime).
|
setRawTime(rawTime).
|
||||||
setNowTime(req.getNowTime()).
|
setNowTime(req.getNowTime()).
|
||||||
setReason(req.getReason()).
|
setReason(req.getReason());
|
||||||
setAttendanceId(recruit.getUserId());
|
|
||||||
int insert = baseMapper.insert(wgzReissueacard);
|
int insert = baseMapper.insert(wgzReissueacard);
|
||||||
//6、发送消息
|
//6、发送消息
|
||||||
WgzUser byId = wgzUserService.findByUserId(appUserId);
|
WgzUser byId = wgzUserService.findByUserId(appUserId);
|
||||||
|
@ -60,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="userRegisteredProject" resultType="com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes">
|
<select id="userRegisteredProject" resultType="com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes">
|
||||||
SELECT
|
SELECT
|
||||||
a.id as recruitApplyId,
|
a.id as recruitApplyId,
|
||||||
|
a.status as statusApply,
|
||||||
b.*,
|
b.*,
|
||||||
c.task_name,
|
c.task_name,
|
||||||
c.task_address,
|
c.task_address,
|
||||||
@ -75,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
a.user_id = #{userId} AND
|
a.user_id = #{userId} AND
|
||||||
(a.status = '0' or a.status = '1') AND
|
(a.status = '0' or a.status = '1') AND
|
||||||
a.del_flag = 0
|
a.del_flag = 0
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="GetsTheMembersUnderTheCurrentProject" resultType="com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo">
|
<select id="GetsTheMembersUnderTheCurrentProject" resultType="com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo">
|
||||||
|
@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
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)
|
LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0)
|
||||||
WHERE
|
WHERE
|
||||||
a.user_id = #{userId} and a.del_flag = 0
|
a.id = #{id} and a.del_flag = 0
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.id DESC
|
a.id DESC
|
||||||
</select>
|
</select>
|
||||||
|
Reference in New Issue
Block a user