完成【我的·工资结算记录】板块

This commit is contained in:
2025-02-22 16:09:45 +08:00
parent 8ee2e24976
commit 10db6568fc
10 changed files with 69 additions and 14 deletions

View File

@ -366,8 +366,9 @@ public class WgzAppController {
/**
* 【首页】【项目进行中】 项目进行中(分页,但是理论上这里始终只会有一条数据)
* 【首页】【已完成项目】 已完成项目
*/
@ApiOperation("【首页】【项目进行中】 项目进行中")
@ApiOperation("【首页】【项目进行中|已完成项目】 项目进行中")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userUnderway')")
@GetMapping("/WgzAppUserUnderway")
public TableDataInfo<WgzAppUnderwayRes> userUnderway(@Validated WgzAppUnderwayReq req) {
@ -376,8 +377,9 @@ public class WgzAppController {
/**
* 【首页】【项目进行中】 项目进行中·详情
* 【首页】【已完成项目】 已完成项目·详情
*/
@ApiOperation("【首页】【项目进行中】 项目进行中·详情")
@ApiOperation("【首页】【项目进行中|已完成项目】 详情")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userProjectInProgressDetails')")
@GetMapping("/WgzAppUserProjectInProgressDetails/{id}")
public AjaxResult<WgzApplyForPayrollSettlementAddRes> userProjectInProgressDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) {
@ -420,8 +422,9 @@ public class WgzAppController {
/**
* 【首页】【项目进行中】 项目进行中·申请工资结算(新增)
* 【首页】【已完成项目】 已完成项目·申请工资结算(新增)
*/
@ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(新增)")
@ApiOperation("【首页】【项目进行中|已完成项目】 申请工资结算(新增)")
@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementAdd')")
@PostMapping("/WgzAppUserApplyForPayrollSettlementAdd")
public AjaxResult<Boolean> userApplyForPayrollSettlementAdd(@Validated @RequestBody WgzApplyForPayrollSettlementAddReq req) {

View File

@ -29,5 +29,5 @@ public interface BgtProjectRecruitApplyMapper extends BaseMapperPlus<BgtProjectR
List<BgtProjectRecruitApplyVO> todayAttendanceList(@Param("dto") BgtAttendanceDayDTO dto);
// 获取指定项目下的所有成员(分页)
Page<WgzAppUnderwayRes> underwayPage (@Param("page") Page<WgzAppUnderwayReq> page, @Param("userId") Long userId);
Page<WgzAppUnderwayRes> underwayPage (@Param("page") Page<WgzAppUnderwayReq> page);
}

View File

@ -226,11 +226,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
@Override
public TableDataInfo<WgzAppUnderwayRes> userUnderway(WgzAppUnderwayReq req) {
Long userId = SecurityUtils.getAppUserId();
req.setUserId(SecurityUtils.getAppUserId());
Page<WgzAppUnderwayReq> pe = new Page<>();
pe.setCurrent(req.getPageNum());
pe.setSize(req.getPageSize());
return PageUtils.buildDataInfo(baseMapper.underwayPage(pe, userId));
return PageUtils.buildDataInfo(baseMapper.underwayPage(pe));
}
}

View File

@ -14,6 +14,6 @@ import java.io.Serializable;
@Accessors(chain = true)
@ApiModel("申请工资结算(列表)请求对象")
public class WgzAppApplyForPayrollSettlementListReq extends PageReq {
@ApiModelProperty("0已结算 1未结算")
@ApiModelProperty("0申请中 1已结算 2未通过 3未结算申请中+未通过)")
private String auditorType;
}

View File

@ -3,6 +3,7 @@ package com.ruoyi.wgz.bo.req;
import com.ruoyi.common.bo.PageReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@ -16,5 +17,11 @@ import java.time.LocalDateTime;
@Accessors(chain = true)
@ApiModel("项目进行中请求对象")
public class WgzAppUnderwayReq extends PageReq {
@ApiModelProperty("招工ID")
private String type;
@ApiModelProperty("务工者唯一标识")
@Hidden
private Long userId;
}

View File

@ -49,6 +49,9 @@ public class WgzApplyForPayrollSettlementAddReq implements Serializable {
@ApiModelProperty("进场时间")
private LocalDate entryTime;
@ApiModelProperty("退场时间(注意:完成项目才填写退场时间)")
private LocalDate leaveTime;
@ApiModelProperty("工资金额")
private BigDecimal recruitAmount;

View File

@ -50,6 +50,9 @@ public class WgzAppApplyForPayrollSettlementListRes implements Serializable {
@ApiModelProperty("进场时间")
private LocalDate entryTime;
@ApiModelProperty("退场时间")
private LocalDate leaveTime;
@ApiModelProperty("工资金额")
private BigDecimal recruitAmount;

View File

@ -8,6 +8,7 @@ import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@ -49,7 +50,16 @@ public class WgzAppUnderwayRes implements Serializable {
@ApiModelProperty("招工要求")
private String recruitRequirement;
@ApiModelProperty("已报名数量")
private Integer numberOfRegistered;
@ApiModelProperty("发布时间")
private LocalDateTime taskCreateTime;
@ApiModelProperty("进场时间")
private LocalDate entryTime;
@ApiModelProperty("离场时间")
private LocalDate leaveTime;
// @ApiModelProperty("已报名数量")
// private Integer numberOfRegistered;
}

View File

@ -80,19 +80,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="underwayPage" resultType="com.ruoyi.wgz.bo.res.WgzAppUnderwayRes">
SELECT
a.entry_time,
a.leave_time,
b.*,
c.task_name,
c.task_address,
c.task_img,
(SELECT count(1) FROM bgt_project_recruit_apply WHERE recruit_id = a.id) as numberOfRegistered
c.create_time as taskCreateTime
FROM
bgt_project_recruit_apply as a
LEFT JOIN bgt_project_recruit as b on(a.recruit_id = b.id and b.del_flag = 0 )
LEFT JOIN fbs_project_task as c ON (b.task_id = c.id AND c.del_flag = 0)
WHERE
a.user_id = #{userId} AND
a.status IN ('3', '5')AND
<where>
<if test="page.userId!=null and dto.userId!=0 ">
a.user_id = #{dto.userId} AND
</if>
<choose>
<when test="page.type!=null and page.type!='' and page.type=='1'">
a.status IN ('3', '5') AND
</when>
<when test="page.type!=null and page.type!='' and page.type=='2'">
a.status IN ('6') AND
</when>
</choose>
a.del_flag = 0
</where>
</select>
</mapper>

View File

@ -113,9 +113,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.update_time AS file_update_time,
f.remark AS file_remark
FROM
your_main_table w
wgz_pay_calculation w
LEFT JOIN
wgz_pay_calculation_files f ON w.id = f.calculation_id
<where>
<choose>
<when test="page.auditorType != null and taskId != '' and auditorType == '0'">
AND w.auditor_type in ('0', '1') and
</when>
<when test="page.auditorType != null and taskId != '' and auditorType == '1'">
AND w.auditor_type = '2' and
</when>
<when test="page.auditorType != null and taskId != '' and auditorType == '2'">
AND w.auditor_type = '3' and
</when>
<when test="page.auditorType != null and taskId != '' and auditorType == '2'">
AND w.auditor_type = in ('0', '1','3') and
</when>
</choose>
w.del_flag = 0
</where>
</select>