优化
This commit is contained in:
@ -1,9 +1,12 @@
|
|||||||
package com.ruoyi.web.controller.bgt;
|
package com.ruoyi.web.controller.bgt;
|
||||||
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailBaseVO;
|
import com.ruoyi.bgt.domain.dto.BgtApplyForWgzPayAddDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailListVO;
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
||||||
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationRecordDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtApplyForWgzPayAddInfoVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailBaseVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
@ -20,7 +23,6 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工资结算Controller
|
* 工资结算Controller
|
||||||
@ -75,8 +77,24 @@ public class AppBgtPayCalculationController extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation("总体考勤情况-工资结算-结算记录")
|
@ApiOperation("总体考勤情况-工资结算-结算记录")
|
||||||
@GetMapping("/record")
|
@GetMapping("/record")
|
||||||
public AjaxResult<List<BgtPayCalculationDetailListVO>> record(Long id, Long recruitId) {
|
public TableDataInfo<BgtPayCalculationDetailListVO> record(BgtPayCalculationRecordDTO dto) {
|
||||||
return AjaxResult.success(iWgzPayCalculationService.record(id,recruitId));
|
return iWgzPayCalculationService.record(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("包工头结算务工者剩余工资")
|
||||||
|
@Log(title = "包工头结算务工者剩余工资", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PostMapping("/bgtAdd")
|
||||||
|
public AjaxResult<Boolean> bgtAdd(@Validated @RequestBody BgtApplyForWgzPayAddDTO dto) {
|
||||||
|
return AjaxResult.success(iWgzPayCalculationService.bgtAdd(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("总体考勤情况-工资结算-获取工资结算所需的信息")
|
||||||
|
@GetMapping("/payInfo")
|
||||||
|
public AjaxResult<BgtApplyForWgzPayAddInfoVO> payInfo(Long userId, Long recruitId) {
|
||||||
|
return AjaxResult.success(iWgzPayCalculationService.payInfo(userId,recruitId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public enum AuditStatus
|
public enum AuditStatus
|
||||||
{
|
{
|
||||||
|
UNREAD("0","未读"),
|
||||||
AUDIT("1", "审核中"),
|
AUDIT("1", "审核中"),
|
||||||
PASS("2", "已审核"),
|
PASS("2", "已审核"),
|
||||||
REFUSE("3", "未通过"),
|
REFUSE("3", "未通过"),
|
||||||
|
@ -43,4 +43,9 @@ public enum RecruitApplyStatus
|
|||||||
return Arrays.asList(BGT_PASS.getCode(),WGZ_PASS.getCode(),WORKING.getCode(), OUT_WORK.getCode());
|
return Arrays.asList(BGT_PASS.getCode(),WGZ_PASS.getCode(),WORKING.getCode(), OUT_WORK.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//进场和立场
|
||||||
|
public static List<String> getWorkStatus(){
|
||||||
|
return Arrays.asList(WORKING.getCode(), OUT_WORK.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.ruoyi.bgt.domain.dto;
|
||||||
|
|
||||||
|
|
||||||
|
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.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel("包工头为务工者申请工资结算(新增)请求对象")
|
||||||
|
public class BgtApplyForWgzPayAddDTO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工ID")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务名称")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务地址")
|
||||||
|
private String taskAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工名称")
|
||||||
|
private String recruitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工者ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进场时间")
|
||||||
|
private LocalDate entryTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("退场时间(注意:完成项目才填写退场时间)")
|
||||||
|
private LocalDate leaveTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("工资金额")
|
||||||
|
private BigDecimal recruitAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("出勤天数")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工状态")
|
||||||
|
private String workingState;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行")
|
||||||
|
private String bank;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行卡号")
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件实体数据")
|
||||||
|
private List<WgzPayCalculationFiles> payCalculation;
|
||||||
|
|
||||||
|
}
|
@ -6,8 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
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.io.Serializable;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,6 +31,7 @@ public class BgtMessageDetailDTO {
|
|||||||
|
|
||||||
@ApiModelProperty("日期")
|
@ApiModelProperty("日期")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate date;
|
private LocalDate date;
|
||||||
|
|
||||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.bgt.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工资结算分页查询对象 wgz_pay_calculation
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-02-21
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel("包工头工资结算审核记录查询对象")
|
||||||
|
public class BgtPayCalculationRecordDTO {
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/** 当前页数 */
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工ID")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.ruoyi.bgt.domain.vo;
|
||||||
|
|
||||||
|
|
||||||
|
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.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel("包工头为务工者申请工资结算基础信息对象")
|
||||||
|
public class BgtApplyForWgzPayAddInfoVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工ID")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务名称")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务地址")
|
||||||
|
private String taskAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("招工名称")
|
||||||
|
private String recruitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工者ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进场时间")
|
||||||
|
private LocalDate entryTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("退场时间(注意:完成项目才填写退场时间)")
|
||||||
|
private LocalDate leaveTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("工资金额")
|
||||||
|
private BigDecimal recruitAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("出勤天数")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工状态")
|
||||||
|
private String workingState;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行")
|
||||||
|
private String bank;
|
||||||
|
|
||||||
|
@ApiModelProperty("银行卡号")
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件实体数据")
|
||||||
|
private List<WgzPayCalculationFiles> payCalculation;
|
||||||
|
|
||||||
|
}
|
@ -71,4 +71,6 @@ public class BgtDailyClockDetailVO {
|
|||||||
@ApiModelProperty("已读|审核时间")
|
@ApiModelProperty("已读|审核时间")
|
||||||
private LocalDateTime auditorTime;
|
private LocalDateTime auditorTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("日报状态(0正常 1补卡)")
|
||||||
|
private String status;
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,11 @@ public class BgtDailyClockListVO {
|
|||||||
@ApiModelProperty("姓名")
|
@ApiModelProperty("姓名")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty("日报状态(0正常 1补卡)")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class BgtMessageDetailVO implements Serializable {
|
|||||||
@ApiModelProperty("主键自增ID")
|
@ApiModelProperty("主键自增ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("发送人")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
|
private Long senderId;
|
||||||
|
|
||||||
@ApiModelProperty("表ID")
|
@ApiModelProperty("表ID")
|
||||||
private Long tableId;
|
private Long tableId;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.bgt.domain.dto;
|
package com.ruoyi.bgt.domain.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@ -43,4 +43,18 @@ public class BgtPayCalculationDetailBaseVO {
|
|||||||
|
|
||||||
@ApiModelProperty("剩余工资")
|
@ApiModelProperty("剩余工资")
|
||||||
private BigDecimal residueAmount;
|
private BigDecimal residueAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("身份证号")
|
||||||
|
private String identityCard;
|
||||||
|
|
||||||
|
|
||||||
|
//结算工资需要的参数
|
||||||
|
@ApiModelProperty("招工Id")
|
||||||
|
private Long recruitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务Id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty("务工者Id")
|
||||||
|
private Long userId;
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.bgt.domain.dto;
|
package com.ruoyi.bgt.domain.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
@ -146,4 +146,9 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
|||||||
* 根据任务和务工者Id获该务工者的报名信息
|
* 根据任务和务工者Id获该务工者的报名信息
|
||||||
*/
|
*/
|
||||||
BgtProjectRecruitApply getOne(Long taskId,Long userId);
|
BgtProjectRecruitApply getOne(Long taskId,Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据招工和务工者Id获该务工者的最近一条申请信息(只查进场和立场)
|
||||||
|
*/
|
||||||
|
BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId);
|
||||||
}
|
}
|
||||||
|
@ -671,8 +671,21 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BgtProjectRecruitApply getOne(Long taskId, Long userId) {
|
public BgtProjectRecruitApply getOne(Long taskId, Long userId) {
|
||||||
List<BgtProjectRecruitApply> list = baseMapper.selectList(Wrappers.<BgtProjectRecruitApply>lambdaQuery().eq(BgtProjectRecruitApply::getTaskId, taskId)
|
List<BgtProjectRecruitApply> list = baseMapper.selectList(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
.eq(BgtProjectRecruitApply::getUserId, userId));
|
.eq(BgtProjectRecruitApply::getTaskId, taskId)
|
||||||
|
.eq(BgtProjectRecruitApply::getUserId, userId)
|
||||||
|
.orderByDesc(BgtProjectRecruitApply::getCreateTime));
|
||||||
return CollectionUtil.isNotEmpty(list)?list.get(0):new BgtProjectRecruitApply();
|
return CollectionUtil.isNotEmpty(list)?list.get(0):new BgtProjectRecruitApply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId) {
|
||||||
|
|
||||||
|
List<BgtProjectRecruitApply> list = baseMapper.selectList(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
|
.eq(BgtProjectRecruitApply::getRemark, recruitId)
|
||||||
|
.eq(BgtProjectRecruitApply::getUserId, userId)
|
||||||
|
.in(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.getWorkStatus())
|
||||||
|
.orderByDesc(BgtProjectRecruitApply::getCreateTime));
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,8 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
|||||||
@Override
|
@Override
|
||||||
public List<BgtProjectRecruit> appQueryList() {
|
public List<BgtProjectRecruit> appQueryList() {
|
||||||
return list(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
return list(Wrappers.<BgtProjectRecruit>lambdaQuery()
|
||||||
.eq(BgtProjectRecruit::getUserId, SecurityUtils.getAppUserId()));
|
.eq(BgtProjectRecruit::getUserId, SecurityUtils.getAppUserId())
|
||||||
|
.orderByDesc(BgtProjectRecruit::getCreateTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,7 +64,7 @@ public class AppTaskVO {
|
|||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@ApiModelProperty("申请数量")
|
@ApiModelProperty("申请数量")
|
||||||
private Integer applyNum;
|
private Integer applyNum=0;
|
||||||
|
|
||||||
@ApiModelProperty("判断标志")
|
@ApiModelProperty("判断标志")
|
||||||
private Boolean myTask;
|
private Boolean myTask;
|
||||||
|
@ -129,6 +129,9 @@ public class WgzPayCalculation implements Serializable {
|
|||||||
@ApiModelProperty("同意|拒绝时间")
|
@ApiModelProperty("同意|拒绝时间")
|
||||||
private LocalDateTime auditorTime;
|
private LocalDateTime auditorTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人类型")
|
||||||
|
private String operatorType;
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package com.ruoyi.wgz.service;
|
package com.ruoyi.wgz.service;
|
||||||
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailBaseVO;
|
import com.ruoyi.bgt.domain.dto.BgtApplyForWgzPayAddDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailListVO;
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
||||||
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationRecordDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtApplyForWgzPayAddInfoVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailBaseVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wgz.bo.WgzPayCalculationQueryBo;
|
import com.ruoyi.wgz.bo.WgzPayCalculationQueryBo;
|
||||||
@ -113,6 +116,9 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
|
|||||||
/**
|
/**
|
||||||
* 总体考勤情况-工资结算-结算记录
|
* 总体考勤情况-工资结算-结算记录
|
||||||
*/
|
*/
|
||||||
List<BgtPayCalculationDetailListVO> record(Long userId, Long recruitId);
|
TableDataInfo<BgtPayCalculationDetailListVO> record(BgtPayCalculationRecordDTO dto);
|
||||||
|
|
||||||
|
Boolean bgtAdd(BgtApplyForWgzPayAddDTO dto);
|
||||||
|
|
||||||
|
BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitId);
|
||||||
}
|
}
|
||||||
|
@ -327,9 +327,9 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
|||||||
public BgtDailyClockDetailVO appQueryById(Long id) {
|
public BgtDailyClockDetailVO appQueryById(Long id) {
|
||||||
WgzDailyClock dailyClock = getById(id);
|
WgzDailyClock dailyClock = getById(id);
|
||||||
BgtDailyClockDetailVO detailVO = BeanUtil.copyProperties(dailyClock, BgtDailyClockDetailVO.class);
|
BgtDailyClockDetailVO detailVO = BeanUtil.copyProperties(dailyClock, BgtDailyClockDetailVO.class);
|
||||||
BgtUser bgtUser = userService.getById(dailyClock.getUserId());
|
WgzUser wgzUser = wgzUserService.findByUserId(dailyClock.getUserId());
|
||||||
detailVO.setUsername(bgtUser.getUsername());
|
detailVO.setUsername(wgzUser.getUsername());
|
||||||
detailVO.setAvatarName(bgtUser.getAvatarName());
|
detailVO.setAvatarName(wgzUser.getAvatarName());
|
||||||
BgtProjectRecruit recruit = recruitService.getById(dailyClock.getRecruitId());
|
BgtProjectRecruit recruit = recruitService.getById(dailyClock.getRecruitId());
|
||||||
detailVO.setRecruitName(recruit.getRecruitName());
|
detailVO.setRecruitName(recruit.getRecruitName());
|
||||||
return detailVO;
|
return detailVO;
|
||||||
|
@ -15,6 +15,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
|||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.AuditStatus;
|
import com.ruoyi.common.enums.AuditStatus;
|
||||||
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
import com.ruoyi.wgz.bo.WgzLeaveQueryBo;
|
||||||
@ -213,6 +214,9 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean bgtAudit(BgtLeaveUpdateDTO dto) {
|
public Boolean bgtAudit(BgtLeaveUpdateDTO dto) {
|
||||||
WgzLeave wgzLeave = getById(dto.getId());
|
WgzLeave wgzLeave = getById(dto.getId());
|
||||||
|
if(!AuditStatus.UNREAD.getCode().equals(wgzLeave.getAuditorType())){
|
||||||
|
throw new BaseException("该条请假申请状态已改变,请刷新页面");
|
||||||
|
}
|
||||||
BeanUtil.copyProperties(dto, wgzLeave);
|
BeanUtil.copyProperties(dto, wgzLeave);
|
||||||
wgzLeave.setAuditorTime(LocalDateTime.now());
|
wgzLeave.setAuditorTime(LocalDateTime.now());
|
||||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(wgzLeave.getRecruitId());
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(wgzLeave.getRecruitId());
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
package com.ruoyi.wgz.service.impl;
|
package com.ruoyi.wgz.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||||
import com.ruoyi.bgt.domain.BgtMessage;
|
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailBaseVO;
|
import com.ruoyi.bgt.domain.dto.BgtApplyForWgzPayAddDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationDetailListVO;
|
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationListDTO;
|
||||||
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationRecordDTO;
|
||||||
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO;
|
||||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
import com.ruoyi.bgt.domain.vo.BgtApplyForWgzPayAddInfoVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailBaseVO;
|
||||||
|
import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||||
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
@ -32,15 +34,16 @@ import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
|
|||||||
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.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;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
||||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
|
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
|
||||||
@ -75,12 +78,6 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWgzMessageService wgzMessageService;
|
private IWgzMessageService wgzMessageService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IWgzMessageService iWgzMessageService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBgtMessageService iBgtMessageService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWgzAttendanceService iWgzAttendanceService;
|
private IWgzAttendanceService iWgzAttendanceService;
|
||||||
|
|
||||||
@ -341,16 +338,28 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean appUpdate(BgtPayCalculationUpdateDTO dto) {
|
public Boolean appUpdate(BgtPayCalculationUpdateDTO dto) {
|
||||||
WgzPayCalculation payCalculation = getById(dto.getId());
|
WgzPayCalculation payCalculation = getById(dto.getId());
|
||||||
BeanUtil.copyProperties(dto, payCalculation);
|
BeanUtil.copyProperties(dto, payCalculation);
|
||||||
|
boolean isPass = AuditStatus.PASS.getCode().equals(dto.getAuditorType());
|
||||||
payCalculation.setAuditorTime(LocalDateTime.now());
|
payCalculation.setAuditorTime(LocalDateTime.now());
|
||||||
|
if(!isPass){
|
||||||
|
List<WgzPayCalculationMiddle> list = iWgzPayCalculationMiddleService.list(Wrappers.<WgzPayCalculationMiddle>lambdaQuery()
|
||||||
|
.eq(WgzPayCalculationMiddle::getCalculationId, dto.getId()));
|
||||||
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
|
List<Long> collect = list.stream().map(WgzPayCalculationMiddle::getAttendanceId).collect(Collectors.toList());
|
||||||
|
attendanceService.lambdaUpdate().in(WgzAttendance::getId,collect)
|
||||||
|
.set(WgzAttendance::getSettlement, 0).update();
|
||||||
|
iWgzPayCalculationMiddleService.removeByIds(list.stream().map(WgzPayCalculationMiddle::getId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//发消息
|
//发消息
|
||||||
HashMap<String, String> mp = new HashMap<>();
|
HashMap<String, String> mp = new HashMap<>();
|
||||||
mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName());
|
mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName());
|
||||||
mp.put("auditor",SecurityUtils.getUsername());
|
mp.put("auditor",SecurityUtils.getUsername());
|
||||||
Map<String, String> map = bgtMessage(mp, BGT_TYPE_PAY, AuditStatus.PASS.getCode().equals(dto.getAuditorType()));
|
Map<String, String> map = bgtMessage(mp, BGT_TYPE_PAY, isPass);
|
||||||
WgzMessage wgzMessage = new WgzMessage()
|
WgzMessage wgzMessage = new WgzMessage()
|
||||||
.setSenderType(USERTYPE_BGT)
|
.setSenderType(USERTYPE_BGT)
|
||||||
.setSenderId(SecurityUtils.getAppUserId())
|
.setSenderId(SecurityUtils.getAppUserId())
|
||||||
@ -380,6 +389,7 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
vo.setScore(wgzUser.getScore());
|
vo.setScore(wgzUser.getScore());
|
||||||
vo.setUsername(wgzUser.getUsername());
|
vo.setUsername(wgzUser.getUsername());
|
||||||
vo.setAvatarName(wgzUser.getAvatarName());
|
vo.setAvatarName(wgzUser.getAvatarName());
|
||||||
|
vo.setIdentityCard(wgzUser.getIdentityCard());
|
||||||
|
|
||||||
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitId);
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitId);
|
||||||
vo.setRecruitName(recruit.getRecruitName());
|
vo.setRecruitName(recruit.getRecruitName());
|
||||||
@ -387,6 +397,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
FbsProjectTask task = taskService.getById(recruit.getTaskId());
|
FbsProjectTask task = taskService.getById(recruit.getTaskId());
|
||||||
vo.setTaskName(task.getTaskName());
|
vo.setTaskName(task.getTaskName());
|
||||||
|
|
||||||
|
vo.setUserId(userId);
|
||||||
|
vo.setRecruitId(recruitId);
|
||||||
|
vo.setTaskId(recruit.getTaskId());
|
||||||
|
|
||||||
BgtProjectRecruitApply apply = iBgtProjectRecruitApplyService.getOne(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
BgtProjectRecruitApply apply = iBgtProjectRecruitApplyService.getOne(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
.eq(BgtProjectRecruitApply::getRecruitId, recruitId).eq(BgtProjectRecruitApply::getUserId, userId)
|
.eq(BgtProjectRecruitApply::getRecruitId, recruitId).eq(BgtProjectRecruitApply::getUserId, userId)
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
@ -410,10 +424,99 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BgtPayCalculationDetailListVO> record(Long userId, Long recruitId) {
|
public TableDataInfo<BgtPayCalculationDetailListVO> record(BgtPayCalculationRecordDTO dto) {
|
||||||
List<WgzPayCalculation> wgzPayCalculations = baseMapper.selectList(Wrappers.<WgzPayCalculation>lambdaQuery()
|
LambdaQueryWrapper<WgzPayCalculation> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(WgzPayCalculation::getUserId, dto.getUserId())
|
||||||
|
.eq(WgzPayCalculation::getRecruitId, dto.getRecruitId())
|
||||||
|
.eq(WgzPayCalculation::getAuditorUserId, SecurityUtils.getAppUserId())
|
||||||
|
.in(WgzPayCalculation::getAuditorType,AuditStatus.getAudit())
|
||||||
|
.orderByDesc(WgzPayCalculation::getCreateTime);
|
||||||
|
Page<WgzPayCalculation> result = page(PageUtils.buildPage(), wrapper);
|
||||||
|
Page<BgtPayCalculationDetailListVO> res = new Page<>();
|
||||||
|
res.setRecords(BeanUtil.copyToList(result.getRecords(), BgtPayCalculationDetailListVO.class));
|
||||||
|
res.setTotal(result.getTotal());
|
||||||
|
return PageUtils.buildDataInfo(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public Boolean bgtAdd(BgtApplyForWgzPayAddDTO dto) {
|
||||||
|
|
||||||
|
//添加申请
|
||||||
|
WgzPayCalculation payCalculation = BeanUtil.copyProperties(dto, WgzPayCalculation.class);
|
||||||
|
payCalculation.setAuditorType(AuditStatus.PASS.getCode());
|
||||||
|
payCalculation.setAuditorTime(LocalDateTime.now());
|
||||||
|
payCalculation.setAuditorUserId(SecurityUtils.getAppUserId());
|
||||||
|
payCalculation.setAuditorUserName(SecurityUtils.getUsername());
|
||||||
|
payCalculation.setOperatorType(Constants.BGT);
|
||||||
|
boolean save = save(payCalculation);
|
||||||
|
|
||||||
|
//修改标记,添加中间表
|
||||||
|
List<WgzPayCalculationMiddle> middleList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<WgzAttendance> list = iWgzAttendanceService.list(Wrappers.<WgzAttendance>lambdaQuery()
|
||||||
|
.eq(WgzAttendance::getRecruitId, dto.getRecruitId())
|
||||||
|
.eq(WgzAttendance::getSettlement, 0));
|
||||||
|
for(WgzAttendance data : list) {
|
||||||
|
data.setSettlement(1);
|
||||||
|
WgzPayCalculationMiddle wgzPayCalculationMiddle = new WgzPayCalculationMiddle();
|
||||||
|
wgzPayCalculationMiddle.setCalculationId(payCalculation.getId());
|
||||||
|
wgzPayCalculationMiddle.setAttendanceId(data.getId());
|
||||||
|
middleList.add(wgzPayCalculationMiddle);
|
||||||
|
}
|
||||||
|
iWgzAttendanceService.updateBatchById(list);
|
||||||
|
iWgzPayCalculationMiddleService.saveBatch(middleList);
|
||||||
|
|
||||||
|
//修改其余未审批申请的状态
|
||||||
|
List<WgzPayCalculation> payList = list(Wrappers.<WgzPayCalculation>lambdaQuery().eq(WgzPayCalculation::getAuditorType, AuditStatus.UNREAD.getCode())
|
||||||
|
.eq(WgzPayCalculation::getUserId, dto.getUserId()));
|
||||||
|
if(CollectionUtil.isNotEmpty(payList)) {
|
||||||
|
payList.forEach(pay -> {
|
||||||
|
pay.setAuditorType(AuditStatus.REFUSE.getCode());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updateBatchById(payList);
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BgtApplyForWgzPayAddInfoVO payInfo(Long userId, Long recruitId) {
|
||||||
|
BgtApplyForWgzPayAddInfoVO vo = new BgtApplyForWgzPayAddInfoVO();
|
||||||
|
|
||||||
|
//招工信息
|
||||||
|
BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitId);
|
||||||
|
vo.setRecruitId(recruitId);
|
||||||
|
vo.setRecruitAmount(recruit.getRecruitAmount());
|
||||||
|
vo.setRecruitName(recruit.getRecruitName());
|
||||||
|
|
||||||
|
//任务信息
|
||||||
|
FbsProjectTask task = taskService.getById(recruit.getTaskId());
|
||||||
|
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());
|
||||||
|
|
||||||
|
//出勤天数
|
||||||
|
//总天数
|
||||||
|
Integer i = attendanceService.attendanceDetail(userId, recruitId, null);
|
||||||
|
//已结算天数
|
||||||
|
List<WgzPayCalculation> list = list(Wrappers.<WgzPayCalculation>lambdaQuery()
|
||||||
.eq(WgzPayCalculation::getUserId, userId)
|
.eq(WgzPayCalculation::getUserId, userId)
|
||||||
.eq(WgzPayCalculation::getRecruitId, recruitId));
|
.eq(WgzPayCalculation::getRecruitId, recruitId)
|
||||||
return BeanUtil.copyToList(wgzPayCalculations, BgtPayCalculationDetailListVO.class);
|
.eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode()));
|
||||||
|
if(CollectionUtil.isNotEmpty(list)) {
|
||||||
|
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
||||||
|
i = i - sum;
|
||||||
|
}
|
||||||
|
vo.setNum(i);
|
||||||
|
|
||||||
|
//个人信息
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,22 +45,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
fpt.task_describe,
|
fpt.task_describe,
|
||||||
fpt.task_address,
|
fpt.task_address,
|
||||||
fpt.create_time,
|
fpt.create_time,
|
||||||
#{dto.myTask} as myTask,
|
taskApply.applyNum as applyNum,
|
||||||
COALESCE(apply.applyNum, 0) as applyNum,
|
wage.taskReceiveAmount as taskReceiveAmount,
|
||||||
COALESCE(wage.taskReceiveAmount, 0) as taskReceiveAmount
|
#{dto.myTask} as myTask
|
||||||
FROM fbs_project_task fpt
|
FROM fbs_project_task fpt
|
||||||
LEFT JOIN zbf_project zp ON fpt.project_id = zp.id
|
LEFT JOIN zbf_project zp ON fpt.project_id = zp.id
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(SELECT task_id, COUNT(*) as applyNum
|
(SELECT task_id, COUNT(*) as applyNum
|
||||||
FROM fbs_project_task_apply
|
FROM fbs_project_task_apply
|
||||||
GROUP BY task_id)
|
GROUP BY task_id) taskApply ON fpt.id = taskApply.task_id
|
||||||
apply ON fpt.id = apply.task_id
|
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(SELECT task_id, SUM(applicant_amount) as taskReceiveAmount
|
(SELECT task_id, SUM(applicant_amount) as taskReceiveAmount
|
||||||
FROM bgt_wage_application
|
FROM bgt_wage_application
|
||||||
WHERE audit_status = '2'
|
WHERE audit_status = '2'
|
||||||
GROUP BY task_id)
|
GROUP BY task_id) wage ON fpt.id = wage.task_id
|
||||||
wage ON fpt.id = wage.task_id
|
|
||||||
<where>
|
<where>
|
||||||
<if test='!dto.myTask and dto.status != null and dto.status == "0"'>
|
<if test='!dto.myTask and dto.status != null and dto.status == "0"'>
|
||||||
AND NOT EXISTS (
|
AND NOT EXISTS (
|
||||||
|
@ -53,22 +53,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
wdc.auditor_type,
|
wdc.auditor_type,
|
||||||
wdc.dily_time,
|
wdc.dily_time,
|
||||||
wu.avatar_name,
|
wu.avatar_name,
|
||||||
wu.username
|
wu.username,
|
||||||
|
wu.status,
|
||||||
|
wu.create_time
|
||||||
from wgz_daily_clock wdc
|
from wgz_daily_clock wdc
|
||||||
left join wgz_user wu on wdc.user_id = wu.user_id
|
left join wgz_user wu on wdc.user_id = wu.user_id
|
||||||
where wdc.auditor_user_id = #{dto.auditorUserId}
|
where wdc.auditor_user_id = #{dto.auditorUserId}
|
||||||
and wdc.recruit_id in (select id from bgt_project_recruit where task_id = #{dto.taskId})
|
<if test="dto.recruitId != null">
|
||||||
|
and wdc.recruit_id = #{dto.recruitId}
|
||||||
|
</if>
|
||||||
<if test="dto.username != null and dto.username != ''">
|
<if test="dto.username != null and dto.username != ''">
|
||||||
and wu.username like concat('%', #{dto.username}, '%')
|
and wu.username like concat('%', #{dto.username}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.auditorType != null and dto.auditorType != ''">
|
<if test="dto.auditorType != null and dto.auditorType != ''">
|
||||||
and wdc.auditor_type = #{dto.auditorType}
|
and wdc.auditor_type = #{dto.auditorType}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.recruit_id != null">
|
<if test="dto.dilyTime != null">
|
||||||
and DATE(wdc.dily_time) = #{dto.dilyTime}
|
and DATE(wdc.dily_time) = #{dto.dilyTime}
|
||||||
</if>
|
</if>
|
||||||
order by wdc.create_time desc
|
order by wdc.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -182,13 +182,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where w.auditor_user_id = #{dto.auditorUserId}
|
where w.auditor_user_id = #{dto.auditorUserId}
|
||||||
|
|
||||||
<if test="dto.taskId != null">
|
<if test="dto.taskId != null">
|
||||||
and a.task_id = #{dto.taskId}
|
and w.task_id = #{dto.taskId}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.username != null and dto.username != ''">
|
<if test="dto.username != null and dto.username != ''">
|
||||||
and w.user_name like concat('%', #{dto.userName}, '%')
|
and w.user_name like concat('%', #{dto.userName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.auditorTypes != null and dto.auditorTypes.size() > 0">
|
<if test="dto.auditorTypes != null and dto.auditorTypes.size() > 0">
|
||||||
AND bpra.auditor_type IN
|
AND w.auditor_type IN
|
||||||
<foreach collection="dto.auditorTypes" item="auditorType" open="(" separator="," close=")">
|
<foreach collection="dto.auditorTypes" item="auditorType" open="(" separator="," close=")">
|
||||||
#{auditorType}
|
#{auditorType}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
Reference in New Issue
Block a user