总包方

This commit is contained in:
zt
2025-04-08 10:41:50 +08:00
parent 7aa7db4d37
commit 069529f78c
52 changed files with 1180 additions and 88 deletions

View File

@ -7,15 +7,17 @@ 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.domain.entity.FbsUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.domain.FbsProjectTask;
import com.ruoyi.fbs.service.IFbsProjectTaskService;
import com.ruoyi.fbs.service.IFbsUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@ -39,7 +41,9 @@ public class AppBgtProjectTaskProgressController extends BaseController {
private final IBgtProjectTaskProgressService iBgtProjectTaskProgressService;
private final IBgtUserService iBgtUserService;
private final IFbsUserService iFbsUserService;
private final IFbsProjectTaskService iFbsProjectTaskService;
/**
* 查询包工头项目任务进度列表
@ -70,9 +74,12 @@ public class AppBgtProjectTaskProgressController extends BaseController {
@RepeatSubmit
@PostMapping()
public AjaxResult<Boolean> add(@Validated @RequestBody BgtProjectTaskProgressDTO dto) {
BgtUser bgtUser = iBgtUserService.selectUserByUserId(dto.getReviewerId());
FbsProjectTask task = iFbsProjectTaskService.getById(dto.getTaskId());
FbsUser fbsUser = iFbsUserService.selectUserByUserId(task.getCreateId());
BgtProjectTaskProgress bgtProjectTaskProgress = BeanUtil.copyProperties(dto, BgtProjectTaskProgress.class);
bgtProjectTaskProgress.setReviewerName(bgtUser.getUsername());
bgtProjectTaskProgress.setReviewerName(fbsUser.getUsername());
bgtProjectTaskProgress.setReviewerId(fbsUser.getUserId());
return AjaxResult.success(iBgtProjectTaskProgressService.insert(bgtProjectTaskProgress));
}

View File

@ -69,28 +69,6 @@ public class AppFbsProjectController extends BaseController {
}
}
// @ApiOperation("分包商查看可报名项目详情")
// @GetMapping("/signUp/{id}")
// public AjaxResult<FbsProjectDetailVO> signUpDetail(@NotNull(message = "主键不能为空")
// @PathVariable("id") Long id) {
// return AjaxResult.success(zbfProjectService.signUpDetail(id));
// }
//
// @ApiOperation("分包商查看已申请项目详情")
// @GetMapping("/apply/{id}")
// public AjaxResult<FbsProjectDetailVO> applyDetail(@NotNull(message = "主键不能为空")
// @PathVariable("id") Long id) {
// return AjaxResult.success(zbfProjectService.applyDetail(id));
// }
//
// @ApiOperation("分包商查看已加入或已竣工项目详情")
// @GetMapping("/joinOrComplete/{id}")
// public AjaxResult<FbsProjectDetailVO> joinOrCompleteDetail(@NotNull(message = "主键不能为空")
// @PathVariable("id") Long id) {
// return AjaxResult.success(zbfProjectService.joinOrCompleteDetail(id));
// }
@ApiOperation("分包商查询我的项目列表-项目切换")
@GetMapping("/switchList")
public TableDataInfo<FbsProjectListVO> switchList(FbsProjectListDTO dto) {

View File

@ -6,10 +6,12 @@ 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.zbf.domain.ZbfProject;
import com.ruoyi.zbf.domain.dto.ZbfProgressListDTO;
import com.ruoyi.zbf.domain.dto.ZbfProjectAddDTO;
import com.ruoyi.zbf.domain.dto.ZbfProjectListDTO;
import com.ruoyi.zbf.domain.vo.ZbfProjectCountVO;
import com.ruoyi.zbf.domain.vo.ZbfProjectListVO;
import com.ruoyi.zbf.domain.dto.ZbfProjectSwitchListDTO;
import com.ruoyi.zbf.domain.vo.*;
import com.ruoyi.zbf.service.IZbfProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -18,6 +20,8 @@ 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
*
@ -47,11 +51,83 @@ public class AppZbfProjectController extends BaseController {
return iZbfProjectService.queryZbfList(dto);
}
@ApiOperation("总包方查询自建项目统计")
@ApiOperation("总包方项目统计")
@GetMapping("/count")
public AjaxResult<ZbfProjectCountVO> projectCount() {
return AjaxResult.success(iZbfProjectService.projectCount());
}
@ApiOperation("总包方项目列表(精简)")
@GetMapping("/conciseList")
public TableDataInfo<ZbfProject> conciseList(@Validated ZbfProjectListDTO dto) {
return iZbfProjectService.conciseList(dto);
}
@ApiOperation("总包方项目详情-项目信息")
@GetMapping("/{id}")
public AjaxResult<ZbfProjectDetailVO> zbfInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iZbfProjectService.zbfInfo(id));
}
@ApiOperation("总包方项目详情-项目标段信息")
@GetMapping("/sectionInfo/{id}")
public AjaxResult<ZbfProjectDetailSectionVO> sectionInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iZbfProjectService.sectionInfo(id));
}
@ApiOperation("总包方项目详情-用工数量")
@GetMapping("/personCount/{id}")
public AjaxResult<ZbfPersonCountVO> personCount(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iZbfProjectService.personCount(id));
}
@ApiOperation("总包方项目详情-考勤情况")
@GetMapping("/attendanceCount/{id}")
public AjaxResult<ZbfAttendanceCountVO> attendanceCount(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iZbfProjectService.attendanceCount(id));
}
@ApiOperation("总包方项目详情-用工进度")
@GetMapping("/progress")
public AjaxResult<ZbfProjectDetailProgressVO> zbfProgress(Long projectId) {
return AjaxResult.success(iZbfProjectService.zbfProgress(projectId));
}
@ApiOperation("总包方项目详情-用工进度列表")
@GetMapping("/progressList")
public TableDataInfo<ZbfProgressListVO> zbfProgressList(ZbfProgressListDTO dto) {
return iZbfProjectService.zbfProgressList(dto);
}
@ApiOperation("总包方项目详情-付款情况")
@GetMapping("/wage")
public AjaxResult<ZbfProjectDetailWageVO> zbfWage(Long projectId) {
return AjaxResult.success(iZbfProjectService.zbfWage(projectId));
}
@ApiOperation("总包方项目详情-付款情况查看更多")
@GetMapping("/wageList")
public TableDataInfo<ZbfWageApplicationVO> zbfWageList(Long projectId) {
return iZbfProjectService.zbfWageList(projectId);
}
@ApiOperation("总包方项目详情-项目切换")
@GetMapping("/switchList")
public TableDataInfo<ZbfProject> zbfSwitchList(ZbfProjectSwitchListDTO dto) {
return iZbfProjectService.zbfSwitchList(dto);
}
}

View File

@ -0,0 +1,39 @@
package com.ruoyi.web.controller.zbf;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.zbf.domain.dto.ZbfSubSwitchListDTO;
import com.ruoyi.zbf.domain.vo.ZbfProjectSectionListVO;
import com.ruoyi.zbf.service.IZbfProjectSectionService;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 总包方项目标段Controller
*
* @author ruoyi
* @date 2025-02-17
*/
@Api(value = "App总包方总包方项目标段控制器", tags = {"App总包方"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/zbf/section")
public class AppZbfProjectSectionController extends BaseController {
private final IZbfProjectSectionService iZbfProjectSectionService;
@ApiOperation("总包方查询分包切换列表")
@GetMapping("/zbfSubSwitchList")
public TableDataInfo<ZbfProjectSectionListVO> zbfSubSwitchList(@Validated ZbfSubSwitchListDTO dto) {
return iZbfProjectSectionService.zbfSubSwitchList(dto);
}
}

View File

@ -4,16 +4,16 @@ 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.zbf.domain.dto.ZbfProjectSubApplyListDTO;
import com.ruoyi.zbf.domain.vo.ZbfProjectSubcontractingApplyListVO;
import com.ruoyi.zbf.service.IZbfProjectSubcontractingApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
@ -41,5 +41,10 @@ public class AppZbfProjectSubcontractingApplyController extends BaseController {
return toAjax(iZbfProjectSubcontractingApplyService.choose(id));
}
@ApiOperation("总包方项目分包详情-申请列表")
@GetMapping("/fbsList/{subId}")
public TableDataInfo<ZbfProjectSubcontractingApplyListVO> getFbsList(ZbfProjectSubApplyListDTO dto) {
return iZbfProjectSubcontractingApplyService.getFbsList(dto);
}
}

View File

@ -0,0 +1,48 @@
package com.ruoyi.web.controller.zbf;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.zbf.domain.ZbfProjectSubcontracting;
import com.ruoyi.zbf.domain.vo.ZbfProjectSubcontractingDetailVO;
import com.ruoyi.zbf.service.IZbfProjectSectionService;
import com.ruoyi.zbf.service.IZbfProjectSubcontractingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
/**
* 总包方项目分包Controller
*
* @author ruoyi
* @date 2025-02-17
*/
@Api(value = "App总包方项目分包控制器", tags = {"App总包方"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/zbf/subcontracting")
public class AppZbfProjectSubcontractingController extends BaseController {
private final IZbfProjectSubcontractingService iZbfProjectSubcontractingService;
private final IZbfProjectSectionService iZbfProjectSectionService;
@ApiOperation("总包方项目分包详情-分包信息")
@GetMapping("/info/{id}")
public AjaxResult<ZbfProjectSubcontractingDetailVO> getInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
ZbfProjectSubcontracting zbfProjectSubcontracting = iZbfProjectSubcontractingService.queryById(id);
ZbfProjectSubcontractingDetailVO vo = BeanUtil.copyProperties(zbfProjectSubcontracting, ZbfProjectSubcontractingDetailVO.class);
vo.setSectionName(iZbfProjectSectionService.getById(vo.getSectionId()).getSectionName());
return AjaxResult.success(vo);
}
}

View File

@ -0,0 +1,41 @@
package com.ruoyi.web.controller.zbf;
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.domain.dto.CompanyAuthenticateDTO;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.zbf.service.IZbfUserService;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* APP总包方用户Controller
*
* @author ruoyi
* @date 2025-03-31
*/
@Api(value = "App总包方用户控制器", tags = {"App总包方"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/zbf/user")
public class AppZbfUserController extends BaseController {
private final IZbfUserService iZbfUserService;
@ApiOperation("总包方企业认证")
@Log(title = "总包方企业认证", businessType = BusinessType.UPDATE)
@RepeatSubmit
@PutMapping()
public AjaxResult<Long> edit(@Validated @RequestBody CompanyAuthenticateDTO dto) {
return AjaxResult.success(iZbfUserService.authenticate(dto));
}
}

View File

@ -0,0 +1,109 @@
package com.ruoyi.web.controller.zbf;
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.poi.ExcelUtil;
import com.ruoyi.zbf.bo.ZbfMessageQueryBo;
import com.ruoyi.zbf.domain.ZbfMessage;
import com.ruoyi.zbf.service.IZbfMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Arrays;
import java.util.List;
/**
* 消息Controller
*
* @author ruoyi
* @date 2025-03-31
*/
@Api(value = "消息控制器", tags = {"消息管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/zbf/message")
public class ZbfMessageController extends BaseController {
private final IZbfMessageService iZbfMessageService;
/**
* 查询消息列表
*/
@ApiOperation("查询消息列表")
@PreAuthorize("@ss.hasPermi('zbf:message:list')")
@GetMapping("/list")
public TableDataInfo<ZbfMessage> list(@Validated ZbfMessageQueryBo bo) {
return iZbfMessageService.queryPageList(bo);
}
/**
* 导出消息列表
*/
@ApiOperation("导出消息列表")
@PreAuthorize("@ss.hasPermi('zbf:message:export')")
@Log(title = "消息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult<ZbfMessage> export(@Validated ZbfMessageQueryBo bo) {
List<ZbfMessage> list = iZbfMessageService.queryList(bo);
ExcelUtil<ZbfMessage> util = new ExcelUtil<ZbfMessage>(ZbfMessage.class);
return util.exportExcel(list, "消息");
}
/**
* 获取消息详细信息
*/
@ApiOperation("获取消息详细信息")
@PreAuthorize("@ss.hasPermi('zbf:message:query')")
@GetMapping("/{id}")
public AjaxResult<ZbfMessage> getInfo(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return AjaxResult.success(iZbfMessageService.queryById(id));
}
/**
* 新增消息
*/
@ApiOperation("新增消息")
@PreAuthorize("@ss.hasPermi('zbf:message:add')")
@Log(title = "消息", businessType = BusinessType.INSERT)
@RepeatSubmit
@PostMapping()
public AjaxResult<Void> add(@Validated @RequestBody ZbfMessage bo) {
return toAjax(iZbfMessageService.insert(bo) ? 1 : 0);
}
/**
* 修改消息
*/
@ApiOperation("修改消息")
@PreAuthorize("@ss.hasPermi('zbf:message:edit')")
@Log(title = "消息", businessType = BusinessType.UPDATE)
@RepeatSubmit
@PutMapping()
public AjaxResult<Void> edit(@Validated @RequestBody ZbfMessage bo) {
return toAjax(iZbfMessageService.update(bo) ? 1 : 0);
}
/**
* 删除消息
*/
@ApiOperation("删除消息")
@PreAuthorize("@ss.hasPermi('zbf:message:remove')")
@Log(title = "消息" , businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
return toAjax(iZbfMessageService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
}
}