优化
This commit is contained in:
@ -4,6 +4,7 @@ import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageUnAuditDetailDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
||||
@ -88,4 +89,11 @@ public class AppBgtMessageController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("未审批消息详情列表")
|
||||
@GetMapping("/unAuditList")
|
||||
public TableDataInfo<BgtMessageDetailVO> unAuditList(BgtMessageUnAuditDetailDTO dto) {
|
||||
return iBgtMessageService.unAuditList(dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ public class AppBgtPayCalculationController extends BaseController {
|
||||
|
||||
@ApiOperation("总体考勤情况-工资结算-基础信息")
|
||||
@GetMapping("/baseInfo")
|
||||
public AjaxResult<BgtPayCalculationDetailBaseVO> baseInfo(Long userId, Long recruitId) {
|
||||
return AjaxResult.success(iWgzPayCalculationService.baseInfo(userId,recruitId));
|
||||
public AjaxResult<BgtPayCalculationDetailBaseVO> baseInfo(Long userId, Long recruitApplyId) {
|
||||
return AjaxResult.success(iWgzPayCalculationService.baseInfo(userId,recruitApplyId));
|
||||
}
|
||||
|
||||
@ApiOperation("总体考勤情况-工资结算-结算记录")
|
||||
@ -93,8 +93,8 @@ public class AppBgtPayCalculationController extends BaseController {
|
||||
|
||||
@ApiOperation("总体考勤情况-工资结算-获取工资结算所需的信息")
|
||||
@GetMapping("/payInfo")
|
||||
public AjaxResult<BgtApplyForWgzPayAddInfoVO> payInfo(Long userId, Long recruitId) {
|
||||
return AjaxResult.success(iWgzPayCalculationService.payInfo(userId,recruitId));
|
||||
public AjaxResult<BgtApplyForWgzPayAddInfoVO> payInfo(Long userId, Long recruitApplyId) {
|
||||
return AjaxResult.success(iWgzPayCalculationService.payInfo(userId,recruitApplyId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
@ -83,6 +84,7 @@ public class BgtProjectRecruit implements Serializable {
|
||||
*/
|
||||
@Excel(name = "招工金额")
|
||||
@ApiModelProperty("招工金额")
|
||||
@Pattern(regexp = "^[0-9]+(\\.[0-9]{1,2})?$",message = "只能两位小数的数字")
|
||||
private BigDecimal recruitAmount;
|
||||
|
||||
/**
|
||||
@ -90,6 +92,7 @@ public class BgtProjectRecruit implements Serializable {
|
||||
*/
|
||||
@Excel(name = "招工数量")
|
||||
@ApiModelProperty("招工数量")
|
||||
@Pattern(regexp = "^[0-9]+$",message = "只能是整数")
|
||||
private Integer recruitStaffNum;
|
||||
|
||||
/**
|
||||
@ -116,6 +119,7 @@ public class BgtProjectRecruit implements Serializable {
|
||||
*/
|
||||
@Excel(name = "联系电话")
|
||||
@ApiModelProperty("联系电话")
|
||||
@Pattern(regexp = "^[0-9]+$",message = "联系电话只能是数字")
|
||||
private String recruitContactPhone;
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,9 @@ public class BgtApplyForWgzPayAddDTO implements Serializable {
|
||||
@ApiModelProperty("招工ID")
|
||||
private Long recruitId;
|
||||
|
||||
@ApiModelProperty("招工申请ID")
|
||||
private Long recruitApplyId;
|
||||
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
|
||||
|
@ -0,0 +1,51 @@
|
||||
package com.ruoyi.bgt.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("务工者未审批消息对象")
|
||||
public class BgtMessageUnAuditDetailDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
// @ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
// private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("务工者ID")
|
||||
@NotNull(message = "未指定用户")
|
||||
private Long userId;
|
||||
|
||||
// @ApiModelProperty("是否待处理")
|
||||
// private Boolean isHandle = false;
|
||||
|
||||
}
|
@ -32,5 +32,8 @@ public class BgtPayCalculationRecordDTO {
|
||||
@ApiModelProperty("申请人ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("招工申请ID")
|
||||
private Long recruitApplyId;
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.ruoyi.bgt.bo.BgtMessageQueryBo;
|
||||
import com.ruoyi.bgt.domain.BgtMessage;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageUnAuditDetailDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
||||
@ -85,6 +86,11 @@ public interface IBgtMessageService extends IServicePlus<BgtMessage> {
|
||||
*/
|
||||
TableDataInfo<BgtMessageDetailVO> queryDetailPageList(BgtMessageDetailDTO dto);
|
||||
|
||||
/**
|
||||
* 务工者未读消息详情列表
|
||||
*/
|
||||
TableDataInfo<BgtMessageDetailVO> unAuditList(BgtMessageUnAuditDetailDTO dto);
|
||||
|
||||
/**
|
||||
* operation
|
||||
*/
|
||||
|
@ -13,6 +13,7 @@ import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||
import com.ruoyi.bgt.domain.BgtWageApplication;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
|
||||
import com.ruoyi.bgt.domain.dto.BgtMessageUnAuditDetailDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
||||
@ -279,4 +280,74 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
||||
wrapper.set(BgtMessage::getIsOperation, OPERATION_ALREADY);
|
||||
update(wrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BgtMessageDetailVO> unAuditList(BgtMessageUnAuditDetailDTO dto) {
|
||||
LambdaQueryWrapper<BgtMessage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId());
|
||||
wrapper.eq(BgtMessage::getMessageLargeType, BGT_LARGE_OTHER);
|
||||
wrapper.eq(BgtMessage::getSenderId, dto.getUserId());
|
||||
wrapper.in(BgtMessage::getMessageSmallType, AUDIT_TYPE);
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getMessageSmallType()), BgtMessage::getMessageSmallType, dto.getMessageSmallType());
|
||||
wrapper.eq(BgtMessage::getIsOperation,OPERATION_NEED);
|
||||
if(dto.getDate() != null) {
|
||||
wrapper.between(BgtMessage::getCreateTime, dto.getDate().atStartOfDay(), dto.getDate().atStartOfDay().with(LocalTime.MAX));
|
||||
}
|
||||
wrapper.orderByDesc(BgtMessage::getCreateTime);
|
||||
Page<BgtMessage> result = page(PageUtils.buildPage(), wrapper);
|
||||
Page<BgtMessageDetailVO> bgtMessageVOPage = new Page<>();
|
||||
bgtMessageVOPage.setTotal(result.getTotal());
|
||||
|
||||
ArrayList<BgtMessageDetailVO> bgtMessageVOS = new ArrayList<>();
|
||||
|
||||
for (BgtMessage message : result.getRecords()) {
|
||||
BgtMessageDetailVO bgtMessageDetailVO = BeanUtil.copyProperties(message, BgtMessageDetailVO.class);
|
||||
if (BGT_LARGE_TASK.equals(message.getMessageLargeType())) {
|
||||
FbsProjectTask task = taskService.getById(message.getTableId());
|
||||
bgtMessageDetailVO.setTaskName(task.getTaskName());
|
||||
} else if (BGT_LARGE_SETTLEMENT.equals(message.getMessageLargeType())) {
|
||||
BgtWageApplication wageApplication = wageApplicationService.getById(message.getTableId());
|
||||
FbsProjectTask task = taskService.getById(wageApplication.getTaskId());
|
||||
bgtMessageDetailVO.setTaskName(task.getTaskName());
|
||||
} else if (BGT_LARGE_OTHER.equals(message.getMessageLargeType())) {
|
||||
switch (message.getMessageSmallType()) {
|
||||
case BGT_SMALL_SIGN_UP:
|
||||
// BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruit = recruitService.getById(recruitApply.getRecruitId());
|
||||
// bgtMessageDetailVO.setRecruitName(recruit.getRecruitName());
|
||||
break;
|
||||
case BGT_SMALL_PAY:
|
||||
// WgzPayCalculation payCalculation = payCalculationService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruitPay = recruitService.getById(payCalculation.getRecruitId());
|
||||
// bgtMessageDetailVO.setRecruitName(recruitPay.getRecruitName());
|
||||
break;
|
||||
case BGT_SMALL_LEAVE:
|
||||
WgzLeave wgzLeave = leaveService.getById(message.getTableId());
|
||||
bgtMessageDetailVO.setReason(wgzLeave.getReason());
|
||||
bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(wgzLeave.getUserId()).getUsername());
|
||||
bgtMessageDetailVO.setStartTime(wgzLeave.getStartTime());
|
||||
bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime());
|
||||
break;
|
||||
case BGT_SMALL_MAKE_UP:
|
||||
WgzReissueacard reissueCard = reissueacardService.getById(message.getTableId());
|
||||
bgtMessageDetailVO.setReason(reissueCard.getReason());
|
||||
bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(reissueCard.getUserId()).getUsername());
|
||||
bgtMessageDetailVO.setNowTime(reissueCard.getNowTime());
|
||||
break;
|
||||
case BGT_SMALL_REPORT_MAKE_UP:
|
||||
WgzDailyClock dailyClock = dailyClockService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruitClock = recruitService.getById(dailyClock.getRecruitId());
|
||||
bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(dailyClock.getUserId()).getUsername());
|
||||
// bgtMessageDetailVO.setRecruitName(recruitClock.getRecruitName());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
bgtMessageVOS.add(bgtMessageDetailVO);
|
||||
}
|
||||
bgtMessageVOPage.setRecords(bgtMessageVOS);
|
||||
return PageUtils.buildDataInfo(bgtMessageVOPage);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.common.constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class BgtMessageConstant {
|
||||
@ -16,6 +18,7 @@ public class BgtMessageConstant {
|
||||
public static final String BGT_SMALL_MAKE_UP = "4"; //小类型-补卡
|
||||
public static final String BGT_SMALL_REPORT_MAKE_UP = "5"; //小类型-日报补卡
|
||||
|
||||
public static final List<String> AUDIT_TYPE = Arrays.asList("2", "3", "4", "5");
|
||||
/**
|
||||
* ============================================包工头->务工者 模板==================================================
|
||||
* ============================================包工头->务工者 模板==================================================
|
||||
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
@ -60,11 +61,13 @@ public class FbsProjectTask implements Serializable {
|
||||
/** 任务金额 */
|
||||
@Excel(name = "任务金额")
|
||||
@ApiModelProperty("任务金额")
|
||||
@Pattern(regexp = "^[0-9]+(\\.[0-9]{1,2})?$",message = "只能两位小数的数字")
|
||||
private BigDecimal taskAmount;
|
||||
|
||||
/** 用工数量 */
|
||||
@Excel(name = "用工数量")
|
||||
@ApiModelProperty("用工数量")
|
||||
@Pattern(regexp = "^[0-9]+$",message = "只能是整数")
|
||||
private Integer taskStaffNum;
|
||||
|
||||
/** 任务开始时间 */
|
||||
@ -83,6 +86,7 @@ public class FbsProjectTask implements Serializable {
|
||||
/** 联系电话 */
|
||||
@Excel(name = "联系电话")
|
||||
@ApiModelProperty("联系电话")
|
||||
@Pattern(regexp = "^[0-9]+$",message = "联系电话只能是数字")
|
||||
private String taskContactPhone;
|
||||
|
||||
/** 分包描述 */
|
||||
|
@ -132,6 +132,11 @@ public interface IWgzAttendanceService extends IServicePlus<WgzAttendance> {
|
||||
*/
|
||||
Integer attendanceDetail(Long userId,Long recruitId, Integer num);
|
||||
|
||||
/**
|
||||
* 务工者个人未结算工资统计
|
||||
*/
|
||||
Integer unFinishCount(Long userId,Long recruitId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 务工者个人考勤统计
|
||||
*/
|
||||
|
@ -117,7 +117,7 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
|
||||
/**
|
||||
* 总体考勤情况-工资结算-基础信息
|
||||
*/
|
||||
BgtPayCalculationDetailBaseVO baseInfo(Long userId, Long recruitId);
|
||||
BgtPayCalculationDetailBaseVO baseInfo(Long userId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 总体考勤情况-工资结算-结算记录
|
||||
@ -132,7 +132,7 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
|
||||
/**
|
||||
* 结算基础信息
|
||||
*/
|
||||
BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitId);
|
||||
BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitApplyId);
|
||||
|
||||
/**
|
||||
* 是否还有在审核的申请
|
||||
|
@ -417,7 +417,23 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
return baseMapper.selectCount(apply);
|
||||
}
|
||||
|
||||
// @Override
|
||||
@Override
|
||||
public Integer unFinishCount(Long userId, Long recruitId, Long recruitApplyId) {
|
||||
|
||||
LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>().
|
||||
eq(WgzAttendance::getUserId, userId).
|
||||
eq(WgzAttendance::getApplyKey, recruitApplyId).
|
||||
eq(WgzAttendance::getSettlement, 0). //为0就表示当天工资还未结算
|
||||
eq(WgzAttendance::getRecruitId, recruitId).and(wrapper -> wrapper
|
||||
.isNotNull(WgzAttendance::getClockInTime)
|
||||
.or()
|
||||
.isNotNull(WgzAttendance::getClockOutTime)
|
||||
);
|
||||
apply.orderByAsc(WgzAttendance::getDate);
|
||||
return baseMapper.selectCount(apply);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Integer attendanceDetail(Long userId, Long recruitId, Integer num) {
|
||||
// LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>().
|
||||
// eq(WgzAttendance::getUserId, userId).
|
||||
@ -703,14 +719,15 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
BgtAttendancePersonCountVO bgtAttendanceDetailVO = new BgtAttendancePersonCountVO();
|
||||
|
||||
//获取任务下的所有招工
|
||||
List<BgtProjectRecruit> bgtProjectRecruits = iBgtProjectRecruitService.getBaseMapper().selectList(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
||||
.eq(BgtProjectRecruit::getTaskId, dto.getTaskId()));
|
||||
List<Long> recruitIds = bgtProjectRecruits.stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
|
||||
// List<BgtProjectRecruit> bgtProjectRecruits = iBgtProjectRecruitService.getBaseMapper().selectList(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
||||
// .eq(BgtProjectRecruit::getTaskId, dto.getTaskId()));
|
||||
// List<Long> recruitIds = bgtProjectRecruits.stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
|
||||
|
||||
//查询该务工者在这个项目里指定月份的所有考勤数据
|
||||
LambdaQueryWrapper<WgzAttendance> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(WgzAttendance::getUserId, dto.getUserId());
|
||||
wrapper.in(WgzAttendance::getRecruitId, recruitIds);
|
||||
// wrapper.in(WgzAttendance::getRecruitId, recruitIds);
|
||||
wrapper.eq(WgzAttendance::getApplyKey, dto.getRecruitApplyId());
|
||||
LocalDate date = dto.getDate();
|
||||
LocalDate startDate = date.with(TemporalAdjusters.firstDayOfMonth());
|
||||
LocalDate endData = date.with(TemporalAdjusters.lastDayOfMonth());
|
||||
@ -719,8 +736,15 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
List<WgzAttendance> wgzAttendances = baseMapper.selectList(wrapper);
|
||||
|
||||
//获取招工打卡时间
|
||||
List<BgtProjectRecruit> list = iBgtProjectRecruitService.list(Wrappers.<BgtProjectRecruit>lambdaQuery().in(BgtProjectRecruit::getId,recruitIds));
|
||||
Map<Long, BgtProjectRecruit> recruitMap = list.stream().collect(Collectors.toMap(BgtProjectRecruit::getId, recruit -> recruit));
|
||||
// List<BgtProjectRecruit> list = iBgtProjectRecruitService.list(Wrappers.<BgtProjectRecruit>lambdaQuery().in(BgtProjectRecruit::getId,recruitIds));
|
||||
// Map<Long, BgtProjectRecruit> recruitMap = list.stream().collect(Collectors.toMap(BgtProjectRecruit::getId, recruit -> recruit));
|
||||
|
||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.getById(dto.getRecruitApplyId());
|
||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitApply.getRecruitId());
|
||||
//上班时间
|
||||
LocalTime beginWorkTime = recruit.getBeginWorkTime();
|
||||
//下班时间
|
||||
LocalTime endWorkTime = recruit.getEndWorkTime();
|
||||
|
||||
// 创建SimpleDateFormat对象,格式化日期为中文星期
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE", Locale.CHINA);
|
||||
@ -734,10 +758,6 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
|
||||
for (WgzAttendance wgzAttendance : wgzAttendances) {
|
||||
|
||||
//上下班时间
|
||||
BgtProjectRecruit recruit = recruitMap.get(wgzAttendance.getRecruitId());
|
||||
LocalTime beginWorkTime = recruit.getBeginWorkTime();
|
||||
LocalTime endWorkTime = recruit.getEndWorkTime();
|
||||
//上下班打卡时间
|
||||
LocalDateTime clockInTime = wgzAttendance.getClockInTime();
|
||||
LocalDateTime clockOutTime = wgzAttendance.getClockOutTime();
|
||||
|
@ -467,7 +467,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
}
|
||||
|
||||
@Override
|
||||
public BgtPayCalculationDetailBaseVO baseInfo(Long userId, Long recruitId) {
|
||||
public BgtPayCalculationDetailBaseVO baseInfo(Long userId, Long recruitApplyId) {
|
||||
BgtPayCalculationDetailBaseVO vo = new BgtPayCalculationDetailBaseVO();
|
||||
WgzUser wgzUser = wgzUserService.findByUserId(userId);
|
||||
vo.setScore(wgzUser.getScore());
|
||||
@ -475,6 +475,12 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setAvatarName(wgzUser.getAvatarName());
|
||||
vo.setIdentityCard(wgzUser.getIdentityCard());
|
||||
|
||||
//招工信息
|
||||
BgtProjectRecruitApply apply = iBgtProjectRecruitApplyService.getById(recruitApplyId);
|
||||
vo.setEntryTime(apply.getEntryTime());
|
||||
|
||||
Long recruitId = apply.getRecruitId();
|
||||
|
||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitId);
|
||||
vo.setRecruitName(recruit.getRecruitName());
|
||||
|
||||
@ -485,15 +491,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setRecruitId(recruitId);
|
||||
vo.setTaskId(recruit.getTaskId());
|
||||
|
||||
BgtProjectRecruitApply apply = iBgtProjectRecruitApplyService.getOne(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||
.eq(BgtProjectRecruitApply::getRecruitId, recruitId).eq(BgtProjectRecruitApply::getUserId, userId)
|
||||
.orderByDesc(BgtProjectRecruitApply::getId)
|
||||
.last("limit 1"));
|
||||
vo.setEntryTime(apply.getEntryTime());
|
||||
|
||||
int i = iWgzAttendanceService.count(
|
||||
new LambdaQueryWrapper<WgzAttendance>().
|
||||
eq(WgzAttendance::getUserId, userId).
|
||||
eq(WgzAttendance::getApplyKey,recruitApplyId).
|
||||
eq(WgzAttendance::getRecruitId,recruitId).and(wrapper -> wrapper
|
||||
.isNotNull(WgzAttendance::getClockInTime)
|
||||
.or()
|
||||
@ -515,7 +516,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setResidueAmount(vo.getAllAmount().subtract(vo.getPayAmount()));
|
||||
|
||||
//未结算天数
|
||||
Integer days = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
Integer days = attendanceService.unFinishCount(userId, recruitId, recruitApplyId);
|
||||
vo.setIsPay(days>0);
|
||||
return vo;
|
||||
}
|
||||
@ -525,6 +526,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
LambdaQueryWrapper<WgzPayCalculation> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(WgzPayCalculation::getUserId, dto.getUserId())
|
||||
.eq(WgzPayCalculation::getRecruitId, dto.getRecruitId())
|
||||
.eq(WgzPayCalculation::getApplyKey, dto.getRecruitApplyId())
|
||||
.eq(WgzPayCalculation::getAuditorUserId, SecurityUtils.getAppUserId())
|
||||
.in(WgzPayCalculation::getAuditorType,AuditStatus.getAudit())
|
||||
.orderByDesc(WgzPayCalculation::getCreateTime);
|
||||
@ -546,6 +548,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
payCalculation.setAuditorTime(LocalDateTime.now());
|
||||
payCalculation.setAuditorUserId(SecurityUtils.getAppUserId());
|
||||
payCalculation.setAuditorUserName(SecurityUtils.getUsername());
|
||||
payCalculation.setApplyKey(dto.getRecruitApplyId());
|
||||
payCalculation.setOperatorType(Constants.BGT);
|
||||
boolean save = save(payCalculation);
|
||||
|
||||
@ -567,6 +570,8 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
|
||||
//修改其余未审批申请的状态
|
||||
List<WgzPayCalculation> payList = list(Wrappers.<WgzPayCalculation>lambdaQuery().eq(WgzPayCalculation::getAuditorType, AuditStatus.UNREAD.getCode())
|
||||
.eq(WgzPayCalculation::getRecruitId, dto.getRecruitId())
|
||||
.eq(WgzPayCalculation::getApplyKey, dto.getRecruitApplyId())
|
||||
.eq(WgzPayCalculation::getUserId, dto.getUserId()));
|
||||
if(CollectionUtil.isNotEmpty(payList)) {
|
||||
payList.forEach(pay -> {
|
||||
@ -587,10 +592,17 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
}
|
||||
|
||||
@Override
|
||||
public BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitId) {
|
||||
public BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitApplyId) {
|
||||
BgtApplyForWgzPayAddInfoVO vo = new BgtApplyForWgzPayAddInfoVO();
|
||||
|
||||
//申请信息
|
||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.getById(recruitApplyId);
|
||||
vo.setEntryTime(recruitApply.getEntryTime());
|
||||
vo.setLeaveTime(recruitApply.getLeaveTime());
|
||||
vo.setWorkingState(recruitApply.getStatus().equals("5")?"1":"2");
|
||||
|
||||
//招工信息
|
||||
Long recruitId = recruitApply.getRecruitId();
|
||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitId);
|
||||
vo.setRecruitId(recruitId);
|
||||
vo.setRecruitAmount(recruit.getRecruitAmount());
|
||||
@ -601,16 +613,9 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
||||
vo.setTaskId(task.getId());
|
||||
vo.setTaskName(task.getTaskName());
|
||||
vo.setTaskAddress(task.getTaskAddress());
|
||||
|
||||
//申请信息
|
||||
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.getOneByUserIdAndRecruitId(userId, recruitId);
|
||||
vo.setEntryTime(recruitApply.getEntryTime());
|
||||
vo.setLeaveTime(recruitApply.getLeaveTime());
|
||||
vo.setWorkingState(recruitApply.getStatus().equals("5")?"1":"2");
|
||||
|
||||
//出勤天数
|
||||
//未结算天数
|
||||
Integer i = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||
Integer i = attendanceService.unFinishCount(userId, recruitId, recruitApplyId);
|
||||
|
||||
if(i<=0){
|
||||
throw new BaseException("工资已全部结算完毕");
|
||||
|
Reference in New Issue
Block a user