3.19优化
This commit is contained in:
@ -484,6 +484,18 @@
|
|||||||
return iWgzPayCalculationService.userApplyForPayrollSettlementList(req);
|
return iWgzPayCalculationService.userApplyForPayrollSettlementList(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【首页】【项目进行中】 项目进行中·申请工资结算(详情)
|
||||||
|
* 【首页】【已完成项目】 已完成项目·申请工资结算(详情) WgzAppUserApplyForPayrollSettlementDetails
|
||||||
|
*/
|
||||||
|
@ApiOperation("【首页】【项目进行中|已完成项目】 申请工资结算(详情)")
|
||||||
|
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementDetails')")
|
||||||
|
@RepeatSubmit
|
||||||
|
@PostMapping("/WgzAppUserApplyForPayrollSettlementDetails/{messageId}")
|
||||||
|
public AjaxResult<WgzAppUserApplyForPayrollSettlementDetails> userApplyForPayrollSettlementDetails(@NotNull(message = "主键ID不能为空") @PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(iWgzPayCalculationService.userApplyForPayrollSettlementDetails(id));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【消息】消息类型统计
|
* 【消息】消息类型统计
|
||||||
*/
|
*/
|
||||||
|
@ -52,7 +52,7 @@ public class BgtApplyForWgzPayAddDTO implements Serializable {
|
|||||||
@ApiModelProperty("出勤天数")
|
@ApiModelProperty("出勤天数")
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
|
|
||||||
@ApiModelProperty("联系电话")
|
@ApiModelProperty("联系电话")
|
||||||
|
@ -52,7 +52,7 @@ public class BgtApplyForWgzPayAddInfoVO implements Serializable {
|
|||||||
@ApiModelProperty("出勤天数")
|
@ApiModelProperty("出勤天数")
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
|
|
||||||
@ApiModelProperty("联系电话")
|
@ApiModelProperty("联系电话")
|
||||||
|
@ -71,7 +71,7 @@ public class WgzPayCalculationQueryBo extends BaseEntity {
|
|||||||
@ApiModelProperty("出勤天数")
|
@ApiModelProperty("出勤天数")
|
||||||
private Long num;
|
private Long num;
|
||||||
/** 务工状态 */
|
/** 务工状态 */
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
/** 联系电话 */
|
/** 联系电话 */
|
||||||
@ApiModelProperty("联系电话")
|
@ApiModelProperty("联系电话")
|
||||||
|
@ -13,6 +13,8 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -56,9 +58,10 @@ public class WgzApplyForPayrollSettlementAddReq implements Serializable {
|
|||||||
private BigDecimal recruitAmount;
|
private BigDecimal recruitAmount;
|
||||||
|
|
||||||
@ApiModelProperty("出勤天数")
|
@ApiModelProperty("出勤天数")
|
||||||
|
@Min(value = 1, message = "出勤天数不能为 0")
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
|
|
||||||
@ApiModelProperty("联系电话")
|
@ApiModelProperty("联系电话")
|
||||||
|
@ -55,7 +55,7 @@ public class WgzAppApplyForPayrollSettlementListRes implements Serializable {
|
|||||||
@ApiModelProperty("出勤天数")
|
@ApiModelProperty("出勤天数")
|
||||||
private Long num;
|
private Long num;
|
||||||
|
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
|
|
||||||
@ApiModelProperty("联系电话")
|
@ApiModelProperty("联系电话")
|
||||||
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.ruoyi.wgz.bo.res;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.wgz.bo.WgzPayCalculationFilesQueryBo;
|
||||||
|
import com.ruoyi.wgz.domain.WgzPayCalculationFiles;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel("工资结算详情")
|
||||||
|
public class WgzAppUserApplyForPayrollSettlementDetails {
|
||||||
|
|
||||||
|
@ApiModelProperty("任务名称")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务地址")
|
||||||
|
private String taskAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工主题")
|
||||||
|
private String recruitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进场时间")
|
||||||
|
private LocalDate entryTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("离场时间")
|
||||||
|
private LocalDate leaveTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人")
|
||||||
|
private String auditorUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("工资金额")
|
||||||
|
private BigDecimal recruitAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("出勤天数")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
|
private String workingState;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行")
|
||||||
|
private String bank;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行卡号")
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private List<WgzPayCalculationFiles> files;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工ID")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工者ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核人ID")
|
||||||
|
private Long auditorUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态(0未读 1待审核 2已同意 3已拒绝)")
|
||||||
|
private String auditorType;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核意见")
|
||||||
|
private String auditorOpinion;
|
||||||
|
|
||||||
|
@ApiModelProperty("同意|拒绝时间")
|
||||||
|
private LocalDateTime auditorTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人类型")
|
||||||
|
private String operatorType;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -88,7 +88,7 @@ public class WgzPayCalculation implements Serializable {
|
|||||||
|
|
||||||
/** 务工状态 */
|
/** 务工状态 */
|
||||||
@Excel(name = "务工状态")
|
@Excel(name = "务工状态")
|
||||||
@ApiModelProperty("务工状态")
|
@ApiModelProperty("务工状态(1进场 2离场)")
|
||||||
private String workingState;
|
private String workingState;
|
||||||
|
|
||||||
/** 联系电话 */
|
/** 联系电话 */
|
||||||
|
@ -13,9 +13,12 @@ import com.ruoyi.wgz.bo.WgzPayCalculationQueryBo;
|
|||||||
import com.ruoyi.wgz.bo.req.WgzAppApplyForPayrollSettlementListReq;
|
import com.ruoyi.wgz.bo.req.WgzAppApplyForPayrollSettlementListReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzApplyForPayrollSettlementAddReq;
|
import com.ruoyi.wgz.bo.req.WgzApplyForPayrollSettlementAddReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
|
import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
|
||||||
|
import com.ruoyi.wgz.bo.res.WgzAppUserApplyForPayrollSettlementDetails;
|
||||||
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
import com.ruoyi.wgz.domain.WgzPayCalculation;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -88,6 +91,11 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
|
|||||||
*/
|
*/
|
||||||
List<WgzPayCalculation> findByUserIdRecruitIdNewestData(Long userId, Long recruitId);
|
List<WgzPayCalculation> findByUserIdRecruitIdNewestData(Long userId, Long recruitId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户申请结算(详情)
|
||||||
|
*/
|
||||||
|
WgzAppUserApplyForPayrollSettlementDetails userApplyForPayrollSettlementDetails(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
|
@ -207,6 +207,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
} else {
|
} else {
|
||||||
wgzAttendance.setClockInTime(now);
|
wgzAttendance.setClockInTime(now);
|
||||||
LocalTime beginWorkTime = appById.getBeginWorkTime(); //上班
|
LocalTime beginWorkTime = appById.getBeginWorkTime(); //上班
|
||||||
|
wgzAttendance.setExceptionType("0");
|
||||||
if (!localTime.isBefore(beginWorkTime)) {
|
if (!localTime.isBefore(beginWorkTime)) {
|
||||||
wgzAttendance.setLate(1); //迟到
|
wgzAttendance.setLate(1); //迟到
|
||||||
wgzAttendance.setLateTime(now);
|
wgzAttendance.setLateTime(now);
|
||||||
@ -323,12 +324,12 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
|||||||
LocalDate clockDate = wa.getDate();
|
LocalDate clockDate = wa.getDate();
|
||||||
if (clockDate.equals(date)) {
|
if (clockDate.equals(date)) {
|
||||||
// 上班
|
// 上班
|
||||||
if (wa.getClockInTime() != null || wa.getMissedIn() == 1 || wa.getLeaveMarkId() != 0) {
|
if (wa.getClockInTime() != null || wa.getMissedIn() == 1 || (wa.getLeaveMarkId() != null && wa.getLeaveMarkId() != 0)) {
|
||||||
two.setNum(1);
|
two.setNum(1);
|
||||||
two.setSb(sbOrXb(wa, 1));
|
two.setSb(sbOrXb(wa, 1));
|
||||||
}
|
}
|
||||||
// 下班
|
// 下班
|
||||||
if (wa.getClockOutTime() != null || wa.getMissedOut()== 1 || wa.getLeaveMarkId() != 0) {
|
if (wa.getClockOutTime() != null || wa.getMissedOut() == 1 || (wa.getLeaveMarkId() != null && wa.getLeaveMarkId() != 0)) {
|
||||||
two.setNum(2);
|
two.setNum(2);
|
||||||
if (wa.getClockInTime() != null && wa.getClockOutTime() != null) {
|
if (wa.getClockInTime() != null && wa.getClockOutTime() != null) {
|
||||||
two.setManHour(calculateWorkingHours(wa.getClockInTime(), wa.getClockOutTime()));
|
two.setManHour(calculateWorkingHours(wa.getClockInTime(), wa.getClockOutTime()));
|
||||||
|
@ -180,7 +180,11 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
|||||||
}
|
}
|
||||||
//2、查询当前人员指定日期的所有日报情况
|
//2、查询当前人员指定日期的所有日报情况
|
||||||
Long appUserId = SecurityUtils.getAppUserId();
|
Long appUserId = SecurityUtils.getAppUserId();
|
||||||
LambdaQueryWrapper<WgzDailyClock> apply = new LambdaQueryWrapper<WgzDailyClock>().eq(WgzDailyClock::getUserId, appUserId).apply("DATE_FORMAT(dily_time, '%Y-%m') = {0}", req.getYearMonth());
|
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
|
||||||
|
LambdaQueryWrapper<WgzDailyClock> apply = new LambdaQueryWrapper<WgzDailyClock>()
|
||||||
|
.eq(WgzDailyClock::getRecruitId, by.getRecruitId())
|
||||||
|
.eq(WgzDailyClock::getUserId, appUserId)
|
||||||
|
.apply("DATE_FORMAT(dily_time, '%Y-%m') = {0}", req.getYearMonth());
|
||||||
List<WgzDailyClock> wgzDailyClocks = baseMapper.selectList(apply);
|
List<WgzDailyClock> wgzDailyClocks = baseMapper.selectList(apply);
|
||||||
//3、查看当前人、当前项目、当前月是否有请假
|
//3、查看当前人、当前项目、当前月是否有请假
|
||||||
Map<LocalDate, LocalDate> ll = iWgzLeaveService.selectByUserCancelLeave(req.getYearMonth());
|
Map<LocalDate, LocalDate> ll = iWgzLeaveService.selectByUserCancelLeave(req.getYearMonth());
|
||||||
@ -204,8 +208,22 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//4、获取当前务工者的招工信息的主题及招工创建人的基本信息
|
//5、查看fh的key最大和最小的日期之间差哪些日期,然后补齐数据
|
||||||
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(SecurityUtils.getAppUserId());
|
LocalDate minDate = fh.keySet().stream().map(LocalDate::parse).min(LocalDate::compareTo).orElse(null);
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
if (minDate != null){
|
||||||
|
LocalDate temp = minDate;
|
||||||
|
while (!temp.isAfter(now)) {
|
||||||
|
//判断当前日期是否存在fh的key,存在跳過,不存在就添加
|
||||||
|
if (!fh.containsKey(temp.toString())) {
|
||||||
|
fh.put(temp.toString(),new WgzAppAttachmentAcquisitionTwo().setStatus("1"));
|
||||||
|
}
|
||||||
|
temp = temp.plusDays(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//6、获取当前务工者的招工信息的主题及招工创建人的基本信息
|
||||||
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
|
||||||
BgtUser one = iBgtUserService.getOne(
|
BgtUser one = iBgtUserService.getOne(
|
||||||
new LambdaQueryWrapper<BgtUser>().
|
new LambdaQueryWrapper<BgtUser>().
|
||||||
|
@ -35,10 +35,12 @@ import com.ruoyi.wgz.bo.WgzPayCalculationQueryBo;
|
|||||||
import com.ruoyi.wgz.bo.req.WgzAppApplyForPayrollSettlementListReq;
|
import com.ruoyi.wgz.bo.req.WgzAppApplyForPayrollSettlementListReq;
|
||||||
import com.ruoyi.wgz.bo.req.WgzApplyForPayrollSettlementAddReq;
|
import com.ruoyi.wgz.bo.req.WgzApplyForPayrollSettlementAddReq;
|
||||||
import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
|
import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
|
||||||
|
import com.ruoyi.wgz.bo.res.WgzAppUserApplyForPayrollSettlementDetails;
|
||||||
import com.ruoyi.wgz.domain.*;
|
import com.ruoyi.wgz.domain.*;
|
||||||
import com.ruoyi.wgz.mapper.WgzPayCalculationMapper;
|
import com.ruoyi.wgz.mapper.WgzPayCalculationMapper;
|
||||||
import com.ruoyi.wgz.service.*;
|
import com.ruoyi.wgz.service.*;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.xmlbeans.impl.validator.ValidatingXMLStreamReader;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -368,6 +370,21 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
return baseMapper.selectList(eq);
|
return baseMapper.selectList(eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WgzAppUserApplyForPayrollSettlementDetails userApplyForPayrollSettlementDetails(Long id) {
|
||||||
|
WgzAppUserApplyForPayrollSettlementDetails wgz = new WgzAppUserApplyForPayrollSettlementDetails();
|
||||||
|
//1、获取结算详情
|
||||||
|
WgzPayCalculation wgzPayCalculation = baseMapper.selectById(id);
|
||||||
|
BeanUtils.copyProperties(wgzPayCalculation, wgz);
|
||||||
|
//2、获取附件信息
|
||||||
|
List<WgzPayCalculationFiles> files = iWgzPayCalculationFilesService.list(
|
||||||
|
Wrappers.<WgzPayCalculationFiles>lambdaQuery()
|
||||||
|
.eq(WgzPayCalculationFiles::getCalculationId, id)
|
||||||
|
);
|
||||||
|
wgz.setFiles(files);
|
||||||
|
return wgz;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> appQueryPageList(BgtPayCalculationListDTO dto) {
|
public TableDataInfo<WgzAppApplyForPayrollSettlementListRes> appQueryPageList(BgtPayCalculationListDTO dto) {
|
||||||
dto.setAuditorUserId(SecurityUtils.getAppUserId());
|
dto.setAuditorUserId(SecurityUtils.getAppUserId());
|
||||||
|
Reference in New Issue
Block a user