增加日期查询
This commit is contained in:
@ -167,4 +167,5 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
||||
* 根据招工和务工者Id获该务工者的最近一条申请信息(只查进场和立场)
|
||||
*/
|
||||
BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId);
|
||||
|
||||
}
|
||||
|
@ -760,4 +760,5 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
||||
.orderByDesc(BgtProjectRecruitApply::getCreateTime));
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,9 @@ import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ -22,4 +25,8 @@ public class WgzAppGetMessageListReq extends PageReq {
|
||||
|
||||
@ApiModelProperty("字典(message_small_type)largeType为3填写")
|
||||
private String smallType;
|
||||
|
||||
@ApiModelProperty(value = "日期(格式:年-月-日),不填查全部")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate rq;
|
||||
}
|
||||
|
@ -161,6 +161,9 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
//2、获取当前用户所在的工地id
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
|
||||
throw new RuntimeException("包工头还未确认进场!");
|
||||
}
|
||||
//3、根据工地id得到完整的工地信息
|
||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||
//4、在进场时间时才能打卡,如果有退场记录就不允许打卡
|
||||
|
@ -244,6 +244,9 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
//1、获取当前人、当前工的上下班时间范围
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
|
||||
throw new RuntimeException("包工头还未确认进场!");
|
||||
}
|
||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||
//2、为补卡时now的时间就为前端传递的日期
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
@ -150,8 +150,11 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
||||
//1、现获取用户的唯一标识
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
Long appUserId = user.getUserId();
|
||||
//2、根据唯一标识获取到当前用户的招工
|
||||
//2、根据唯一标识获取到当前用户的招工(并判断当前项目是否进场)
|
||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
if (!(by.getStatus().equals("5") && by.getEntryTime()!=null)) {
|
||||
throw new RuntimeException("包工头还未确认进场!");
|
||||
}
|
||||
//3、根据招工id获取到具体招工信息
|
||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||
//4、查看当前用户、当前招工、当前请假时间段是否有重复的请假
|
||||
|
@ -156,6 +156,9 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
//1、获取当前用户信息
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||
if (!(recruitApply.getStatus().equals("5") && recruitApply.getEntryTime()!=null)) {
|
||||
throw new RuntimeException("包工头还未确认进场!");
|
||||
}
|
||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
|
||||
//4、获取到原打卡的信息
|
||||
WgzAttendance attendanceInfo = iWgzAttendanceService.findById(req.getAttendanceId());
|
||||
|
@ -100,6 +100,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="req.smallType !=null and req.smallType!=''">
|
||||
AND a.message_small_type = #{req.smallType}
|
||||
</if>
|
||||
<if test="req.rq!=null">
|
||||
DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} and
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
@ -128,6 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="req.largeType !=null and req.largeType!='3'">
|
||||
a.is_operation = '1' AND
|
||||
</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.del_flag = "0"
|
||||
</where>
|
||||
|
Reference in New Issue
Block a user