增加日期查询

This commit is contained in:
2025-03-21 15:03:49 +08:00
parent e2fe948bfe
commit 118c1a6ddf
8 changed files with 28 additions and 1 deletions

View File

@ -167,4 +167,5 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
* 根据招工和务工者Id获该务工者的最近一条申请信息(只查进场和立场) * 根据招工和务工者Id获该务工者的最近一条申请信息(只查进场和立场)
*/ */
BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId); BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId);
} }

View File

@ -760,4 +760,5 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
.orderByDesc(BgtProjectRecruitApply::getCreateTime)); .orderByDesc(BgtProjectRecruitApply::getCreateTime));
return list.get(0); return list.get(0);
} }
} }

View File

@ -8,6 +8,9 @@ import io.swagger.v3.oas.annotations.Hidden;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@ -22,4 +25,8 @@ public class WgzAppGetMessageListReq extends PageReq {
@ApiModelProperty("字典message_small_typelargeType为3填写") @ApiModelProperty("字典message_small_typelargeType为3填写")
private String smallType; private String smallType;
@ApiModelProperty(value = "日期(格式:年-月-日),不填查全部")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate rq;
} }

View File

@ -161,6 +161,9 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
//2、获取当前用户所在的工地id //2、获取当前用户所在的工地id
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
throw new RuntimeException("包工头还未确认进场!");
}
//3、根据工地id得到完整的工地信息 //3、根据工地id得到完整的工地信息
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
//4、在进场时间时才能打卡如果有退场记录就不允许打卡 //4、在进场时间时才能打卡如果有退场记录就不允许打卡

View File

@ -244,6 +244,9 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
//1、获取当前人、当前工的上下班时间范围 //1、获取当前人、当前工的上下班时间范围
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
throw new RuntimeException("包工头还未确认进场!");
}
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
//2、为补卡时now的时间就为前端传递的日期 //2、为补卡时now的时间就为前端传递的日期
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();

View File

@ -150,8 +150,11 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
//1、现获取用户的唯一标识 //1、现获取用户的唯一标识
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
Long appUserId = user.getUserId(); Long appUserId = user.getUserId();
//2、根据唯一标识获取到当前用户的招工 //2、根据唯一标识获取到当前用户的招工(并判断当前项目是否进场)
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
throw new RuntimeException("包工头还未确认进场!");
}
//3、根据招工id获取到具体招工信息 //3、根据招工id获取到具体招工信息
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
//4、查看当前用户、当前招工、当前请假时间段是否有重复的请假 //4、查看当前用户、当前招工、当前请假时间段是否有重复的请假

View File

@ -156,6 +156,9 @@ 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);
if (!(recruitApply.getStatus().equals("5") && recruitApply.getEntryTime()!=null)) {
throw new RuntimeException("包工头还未确认进场!");
}
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId()); BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
//4、获取到原打卡的信息 //4、获取到原打卡的信息
WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId()); WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId());

View File

@ -100,6 +100,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="req.smallType !=null and req.smallType!=''"> <if test="req.smallType !=null and req.smallType!=''">
AND a.message_small_type = #{req.smallType} AND a.message_small_type = #{req.smallType}
</if> </if>
<if test="req.rq!=null">
DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} and
</if>
</where> </where>
order by a.create_time desc order by a.create_time desc
</select> </select>
@ -128,6 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="req.largeType !=null and req.largeType!='3'"> <if test="req.largeType !=null and req.largeType!='3'">
a.is_operation = '1' AND a.is_operation = '1' AND
</if> </if>
<if test="req.rq!=null">
DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} and
</if>
a.message_small_type is null AND a.message_small_type is null AND
a.del_flag = "0" a.del_flag = "0"
</where> </where>