分包商

This commit is contained in:
zt
2025-03-28 10:38:49 +08:00
parent e35e17df3e
commit 14ed939008
16 changed files with 249 additions and 16 deletions

View File

@ -7,12 +7,15 @@ import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO;
import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
import com.ruoyi.bgt.service.IBgtUserService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.BgtUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@ -36,12 +39,15 @@ public class AppBgtProjectTaskProgressController extends BaseController {
private final IBgtProjectTaskProgressService iBgtProjectTaskProgressService;
private final IBgtUserService iBgtUserService;
/**
* 查询包工头项目任务进度列表
*/
@ApiOperation("查询项目任务进度列表")
@GetMapping("/list")
public TableDataInfo<BgtProjectTaskProgressVO> list(@Validated BgtProjectTaskProgressQueryDTO bo) {
bo.setUploaderId(SecurityUtils.getAppUserId());
return iBgtProjectTaskProgressService.appQueryPageList(bo);
}
@ -64,7 +70,10 @@ public class AppBgtProjectTaskProgressController extends BaseController {
@RepeatSubmit
@PostMapping()
public AjaxResult<Boolean> add(@Validated @RequestBody BgtProjectTaskProgressDTO dto) {
return AjaxResult.success(iBgtProjectTaskProgressService.insert(BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class)));
BgtUser bgtUser = iBgtUserService.selectUserByUserId(dto.getReviewerId());
BgtProjectTaskProgress bgtProjectTaskProgress = BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class);
bgtProjectTaskProgress.setReviewerName(bgtUser.getUsername());
return AjaxResult.success(iBgtProjectTaskProgressService.insert(bgtProjectTaskProgress));
}
}

View File

@ -120,14 +120,14 @@ public class AnnexController extends BaseController {
if(byId == null){
throw new BaseException("信息不存在");
}
List<String> list = Arrays.asList("1", "2");
List<String> list = Arrays.asList("1", "2","3");
List<String> notRecruitList = Arrays.asList("0");
String annexType = dto.getAnnexType();
LambdaQueryWrapper<Annex> wrapper = Wrappers.<Annex>lambdaQuery()
.eq(!notRecruitList.contains(annexType),Annex::getRecruitId, byId.getRecruitId())
.eq(Annex::getUserId, dto.getUserId())
.eq(Annex::getUserType, WGZ)
.eq(Annex::getRecruitApplyId, dto.getRecruitApplyId())
.eq(list.contains(annexType),Annex::getRecruitApplyId, dto.getRecruitApplyId())
.eq(!"3".equals(annexType), Annex::getAnnexType, annexType)
.in("3".equals(annexType), Annex::getAnnexType, list);
Page<Annex> result = iAnnexService.page(PageUtils.buildPage(), wrapper);

View File

@ -1,6 +1,9 @@
package com.ruoyi.web.controller.fbs;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.bgt.domain.dto.BgtProjectTaskUserDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtUserService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
@ -14,6 +17,7 @@ import com.ruoyi.fbs.domain.FbsProjectTask;
import com.ruoyi.fbs.domain.dto.FbsProjectTaskUpdateDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskApplyListDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskListDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskSwitchListDTO;
import com.ruoyi.fbs.domain.vo.*;
import com.ruoyi.fbs.service.IFbsProjectTaskApplyService;
import com.ruoyi.fbs.service.IFbsProjectTaskService;
@ -41,6 +45,7 @@ public class AppFbsProjectTaskController extends BaseController {
private final IFbsProjectTaskService iFbsProjectTaskService;
private final IFbsProjectTaskApplyService iFbsProjectTaskApplyService;
private final IBgtUserService iBgtUserService;
private final IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
@ApiOperation("分包商发布任务")
@Log(title = "分包商发布任务", businessType = BusinessType.INSERT)
@ -107,4 +112,16 @@ public class AppFbsProjectTaskController extends BaseController {
return AjaxResult.success(iFbsProjectTaskService.fbsWage(id));
}
@ApiOperation("分包商查询任务详情-务工人员数量")
@GetMapping("/wgzList")
public TableDataInfo<BgtProjectRecruitApplyVO> fbsWgzList(@Validated BgtProjectTaskUserDTO dto) {
return iBgtProjectRecruitApplyService.fbsTaskUserList(dto);
}
@ApiOperation("分包商查询任务详情-任务切换列表")
@GetMapping("/switchList")
public TableDataInfo<FbsProjectTaskListVO> switchList(FbsTaskSwitchListDTO dto) {
return iFbsProjectTaskService.switchList(dto);
}
}

View File

@ -0,0 +1,65 @@
package com.ruoyi.web.controller.fbs;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.bgt.domain.BgtProjectTaskProgress;
import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO;
import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.domain.dto.FbsProjectTaskProgressAuditDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
/**
* 包工头项目任务进度Controller
*
* @author ruoyi
* @date 2025-02-18
*/
@Api(value = "App分包商项目任务进度控制器", tags = {"App分包商"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/fbs/progress")
public class AppFbsProjectTaskProgressController extends BaseController {
private final IBgtProjectTaskProgressService iBgtProjectTaskProgressService;
@ApiOperation("分包商查询项目任务进度列表")
@GetMapping("/list")
public TableDataInfo<BgtProjectTaskProgressVO> list(@Validated BgtProjectTaskProgressQueryDTO bo) {
bo.setReviewerId(SecurityUtils.getAppUserId());
return iBgtProjectTaskProgressService.appQueryPageList(bo);
}
@ApiOperation("分包商查询项目任务进度详细信息")
@GetMapping("/{id}")
public AjaxResult<BgtProjectTaskProgressDetailVO> getInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iBgtProjectTaskProgressService.appQueryById(id));
}
@ApiOperation("分包商审核任务进度")
@Log(title = "分包商审核任务进度", businessType = BusinessType.UPDATE)
@RepeatSubmit
@PutMapping()
public AjaxResult<Boolean> edit(@Validated @RequestBody FbsProjectTaskProgressAuditDTO dto) {
BgtProjectTaskProgress bo = BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class);
return AjaxResult.success(iBgtProjectTaskProgressService.update(bo));
}
}

View File

@ -111,6 +111,12 @@ public class BgtProjectTaskProgress implements Serializable {
@ApiModelProperty("审核人Id")
private Long reviewerId;
@ApiModelProperty("审核人名字")
private String reviewerName;
@ApiModelProperty("审核意见")
private String auditOpinion;
/** 删除标志0代表存在 2代表删除 */
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
@ApiModelProperty("删除标志0代表存在 2代表删除")

View File

@ -29,6 +29,9 @@ public class BgtProjectTaskProgressQueryDTO {
@ApiModelProperty(value = "上传人Id",hidden = true)
private Long uploaderId;
@ApiModelProperty(value = "审核人Id",hidden = true)
private Long reviewerId;
@ApiModelProperty("任务ID")
private Long taskId;

View File

@ -41,12 +41,15 @@ public interface BgtProjectRecruitApplyMapper extends BaseMapperPlus<BgtProjectR
// 获取指定项目下的所有成员(分页)
Page<WgzAppUnderwayRes> underwayPage (@Param("page") Page<WgzAppUnderwayReq> page,@Param("req") WgzAppUnderwayReq req);
// 我的招工任务详情-务工者申请列表分页
// 包工头 我的招工任务详情-务工者申请列表分页
Page<BgtProjectRecruitApplyVO> recruitApplyList(@Param("page")Page<BgtProjectRecruitApplyUserDTO> queryDTOPage,@Param("dto") BgtProjectRecruitApplyUserDTO dto);
// 我的任务详情-务工者人员列表分页
// 包工头 我的任务详情-务工者人员列表分页
Page<BgtProjectRecruitApplyVO> taskUserList(@Param("page")Page<BgtProjectTaskUserDTO> queryDTOPage, @Param("dto") BgtProjectTaskUserDTO dto);
// 分包商 任务详情-务工者人员列表分页
Page<BgtProjectRecruitApplyVO> fbsTaskUserList(@Param("page")Page<BgtProjectTaskUserDTO> queryDTOPage, @Param("dto") BgtProjectTaskUserDTO dto);
/**
* 获取指定用户的所有招工
* @param userId 用户id

View File

@ -67,15 +67,20 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
/**
* 我的招工任务详情-务工者申请列表分页
* 包工头 我的招工任务详情-务工者申请列表分页
*/
TableDataInfo<BgtProjectRecruitApplyVO> recruitApplyList(BgtProjectRecruitApplyUserDTO dto);
/**
* 我的任务详情-务工者人员列表分页
* 包工头 我的任务详情-务工者人员列表分页
*/
TableDataInfo<BgtProjectRecruitApplyVO> taskUserList(BgtProjectTaskUserDTO dto);
/**
* 分包商 查询任务详情-务工人员数量
*/
TableDataInfo<BgtProjectRecruitApplyVO> fbsTaskUserList(BgtProjectTaskUserDTO dto);
/**
* 查询列表
*/

View File

@ -198,6 +198,15 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
return PageUtils.buildDataInfo(queryVOPage);
}
@Override
public TableDataInfo<BgtProjectRecruitApplyVO> fbsTaskUserList(BgtProjectTaskUserDTO dto) {
Page<BgtProjectTaskUserDTO> queryDTOPage = new Page<>();
queryDTOPage.setCurrent(dto.getPageNum());
queryDTOPage.setSize(dto.getPageSize());
Page<BgtProjectRecruitApplyVO> queryVOPage = baseMapper.fbsTaskUserList(queryDTOPage, dto);
return PageUtils.buildDataInfo(queryVOPage);
}
@Override
public List<BgtProjectRecruitApplyVO> appAllList(BgtProjectRecruitApplyQueryDTO dto) {
if (dto.getTaskId() != null) {

View File

@ -115,7 +115,6 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
Page<BgtProjectTaskProgressQueryDTO> queryDTOPage = new Page<>();
queryDTOPage.setCurrent(dto.getPageNum());
queryDTOPage.setSize(dto.getPageSize());
dto.setUploaderId(SecurityUtils.getAppUserId());
Page<BgtProjectTaskProgressVO> queryVOPage = baseMapper.appQueryPageList(queryDTOPage, dto);
return PageUtils.buildDataInfo(queryVOPage);
}

View File

@ -0,0 +1,31 @@
package com.ruoyi.fbs.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 FbsProjectTaskProgressAuditDTO {
@ApiModelProperty("主键自增ID")
private Long id;
@ApiModelProperty("审核状态1审核中 2已审核 3未审核")
private String auditStatus;
@ApiModelProperty("审核意见")
private String auditOpinion;
}

View File

@ -0,0 +1,19 @@
package com.ruoyi.fbs.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("分包商任务切换列表查询条件")
public class FbsTaskSwitchListDTO {
@ApiModelProperty("分页大小")
private Integer pageSize;
/** 当前页数 */
@ApiModelProperty("当前页数")
private Integer pageNum;
@ApiModelProperty("任务名")
private String taskName;
}

View File

@ -11,6 +11,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.fbs.bo.FbsProjectTaskQueryBo;
import com.ruoyi.fbs.domain.FbsProjectTask;
import com.ruoyi.fbs.domain.dto.FbsTaskListDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskSwitchListDTO;
import com.ruoyi.fbs.domain.vo.*;
import java.util.Collection;
@ -116,7 +117,13 @@ public interface IFbsProjectTaskService extends IServicePlus<FbsProjectTask> {
TableDataInfo<FbsProjectTaskListVO> fbsPageList(FbsTaskListDTO dto);
/**
* 任务详情-结算
* 分包商查询任务详情-工资结算审批
*/
FbsTaskDetailWageVO fbsWage(Long id);
/**
* 分包商查询任务详情-任务切换列表
*/
TableDataInfo<FbsProjectTaskListVO> switchList(FbsTaskSwitchListDTO dto);
}

View File

@ -28,6 +28,7 @@ import com.ruoyi.fbs.bo.FbsProjectTaskQueryBo;
import com.ruoyi.fbs.domain.FbsProjectTask;
import com.ruoyi.fbs.domain.dto.FbsTaskApplyListDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskListDTO;
import com.ruoyi.fbs.domain.dto.FbsTaskSwitchListDTO;
import com.ruoyi.fbs.domain.vo.*;
import com.ruoyi.fbs.mapper.FbsProjectTaskMapper;
import com.ruoyi.fbs.service.IFbsProjectTaskApplyService;
@ -356,4 +357,20 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
fbsTaskDetailWageVO.setTaskApplyAmount(taskApplyAmount);
return fbsTaskDetailWageVO;
}
@Override
public TableDataInfo<FbsProjectTaskListVO> switchList(FbsTaskSwitchListDTO dto) {
LambdaQueryWrapper<FbsProjectTask> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(FbsProjectTask::getCreateId,SecurityUtils.getAppUserId());
wrapper.like(StrUtil.isNotBlank(dto.getTaskName()),FbsProjectTask::getTaskName,dto.getTaskName());
wrapper.orderByDesc(FbsProjectTask::getId);
Page<FbsProjectTask> page = page(PageUtils.buildPage(), wrapper);
Page<FbsProjectTaskListVO> fbsProjectTaskListVOPage = new Page<>();
fbsProjectTaskListVOPage.setTotal(page.getTotal());
List<FbsProjectTaskListVO> fbsProjectTaskListVOS = BeanUtil.copyToList(page.getRecords(), FbsProjectTaskListVO.class);
fbsProjectTaskListVOPage.setRecords(fbsProjectTaskListVOS);
return PageUtils.buildDataInfo(fbsProjectTaskListVOPage);
}
}

View File

@ -271,6 +271,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by bpra.create_time desc
</select>
<select id="fbsTaskUserList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
select bpra.id,
bpra.entry_time,
bpra.leave_time,
bpra.recruit_id,
wu.user_id,
wu.phone,
wu.score,
wu.avatar_name,
wu.username,
wu.identity_card,
bpra.status,
wu.type_of_work,
fpt.task_name,
bpra.task_id
from bgt_project_recruit_apply bpra
left join wgz_user wu on bpra.user_id = wu.user_id
left join fbs_project_task fpt on fpt.id = bpr.task_id
<where>
<if test="dto.username !=null and dto.username !='' ">
and wu.username like concat('%', #{dto.username}, '%')
</if>
<if test="dto.taskId != null">
and bpra.task_id = #{dto.taskId}
</if>
<if test="dto.status != null">
AND bpra.status = #{dto.status}
</if>
<if test="dto.status == null">
AND bpra.status in ('5','6')
</if>
</where>
order by bpra.create_time desc
</select>
<select id="userAllRecruitment" resultType="com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo">
SELECT

View File

@ -37,13 +37,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bptp.task_name,
bptp.project_name
from bgt_project_task_progress bptp
where bptp.uploader_id = #{dto.uploaderId}
<if test="dto.auditStatus != null and dto.auditStatus != '' ">
and bptp.audit_status = #{dto.auditStatus}
</if>
<if test="dto.taskId != null">
and bptp.task_id = #{dto.taskId}
</if>
<where>
<if test="dto.uploaderId != null ">
and bptp.uploader_id = #{dto.uploaderId}
</if>
<if test="dto.reviewerId != null ">
and bptp.reviewer_id = #{dto.reviewerId}
</if>
<if test="dto.auditStatus != null and dto.auditStatus != '' ">
and bptp.audit_status = #{dto.auditStatus}
</if>
<if test="dto.taskId != null">
and bptp.task_id = #{dto.taskId}
</if>
</where>
</select>
</mapper>