分包商
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
package com.ruoyi.web.controller.bgt;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtLeaveDetailVO;
|
||||
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.enums.BusinessType;
|
||||
import com.ruoyi.wgz.domain.WgzLeave;
|
||||
import com.ruoyi.wgz.domain.WgzUser;
|
||||
import com.ruoyi.wgz.service.IWgzLeaveService;
|
||||
import com.ruoyi.wgz.service.IWgzUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -30,15 +34,20 @@ import javax.validation.constraints.NotNull;
|
||||
public class AppBgtLeaveController extends BaseController {
|
||||
|
||||
private final IWgzLeaveService iWgzLeaveService;
|
||||
private final IWgzUserService wgzUserService;
|
||||
|
||||
/**
|
||||
* 获取请假详细信息
|
||||
*/
|
||||
@ApiOperation("获取请假详细信息")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<WgzLeave> getInfo(@NotNull(message = "主键不能为空")
|
||||
public AjaxResult<BgtLeaveDetailVO> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iWgzLeaveService.queryById(id));
|
||||
WgzLeave wgzLeave = iWgzLeaveService.queryById(id);
|
||||
WgzUser byUserId = wgzUserService.findByUserId(wgzLeave.getUserId());
|
||||
BgtLeaveDetailVO bgtLeaveDetailVO = BeanUtil.copyProperties(wgzLeave, BgtLeaveDetailVO.class);
|
||||
bgtLeaveDetailVO.setAvatarName(byUserId.getAvatarName());
|
||||
return AjaxResult.success(bgtLeaveDetailVO);
|
||||
}
|
||||
|
||||
@ApiOperation("请假审核")
|
||||
|
@ -0,0 +1,72 @@
|
||||
package com.ruoyi.web.controller.fbs;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.fbs.domain.FbsMessage;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageDetailDTO;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageMyListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageCountVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageDetailVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageVO;
|
||||
import com.ruoyi.fbs.service.IFbsMessageService;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
@Api(value = "App分包商消息控制器", tags = {"App分包商"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/app/fbs/message")
|
||||
public class AppFbsMessageController extends BaseController {
|
||||
|
||||
private final IFbsMessageService iFbsMessageService;
|
||||
|
||||
@ApiOperation("分包商未读消息统计")
|
||||
@GetMapping("/countUnread")
|
||||
public AjaxResult<FbsMessageCountVO> count() {
|
||||
return AjaxResult.success(iFbsMessageService.countUnread());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分包商消息列表")
|
||||
@GetMapping("/myList")
|
||||
public TableDataInfo<FbsMessageVO> myList(FbsMessageMyListDTO dto) {
|
||||
return iFbsMessageService.queryMyPageList(dto);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分包商消息详情列表")
|
||||
@GetMapping("/detailList")
|
||||
public TableDataInfo<FbsMessageDetailVO> otherList(FbsMessageDetailDTO dto) {
|
||||
return iFbsMessageService.queryDetailPageList(dto);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分包商消息已读")
|
||||
@PutMapping("/read/{id}")
|
||||
public AjaxResult<Boolean> read(@PathVariable(value = "id") Long id) {
|
||||
FbsMessage fbsMessage = new FbsMessage();
|
||||
fbsMessage.setId(id);
|
||||
fbsMessage.setReadStatus("1");
|
||||
return AjaxResult.success(iFbsMessageService.updateById(fbsMessage));
|
||||
}
|
||||
|
||||
@ApiOperation("分包商消息已操作")
|
||||
@PutMapping("/operation/{id}")
|
||||
public AjaxResult<Boolean> operation(@PathVariable(value = "id") Long id) {
|
||||
FbsMessage fbsMessage = new FbsMessage();
|
||||
fbsMessage.setId(id);
|
||||
fbsMessage.setIsOperation("2");
|
||||
return AjaxResult.success(iFbsMessageService.updateById(fbsMessage));
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,10 @@
|
||||
package com.ruoyi.web.controller.fbs;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.bgt.domain.BgtWageApplication;
|
||||
import com.ruoyi.bgt.domain.vo.BgtWageApplicationDetailVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtWageApplicationVO;
|
||||
import com.ruoyi.bgt.service.IBgtWageApplicationService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@ -8,7 +13,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.fbs.domain.FbsWageApplication;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageApplicationListDTO;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditDTO;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditListDTO;
|
||||
import com.ruoyi.fbs.service.IFbsWageApplicationService;
|
||||
import com.ruoyi.zbf.service.IZbfProjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -24,13 +32,15 @@ import javax.validation.constraints.NotNull;
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Api(value = "APP分包商工资申请控制器", tags = {"APP分包商"})
|
||||
@Api(value = "App分包商工资申请控制器", tags = {"App分包商"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/app/fbs/application")
|
||||
public class AppFbsWageApplicationController extends BaseController {
|
||||
|
||||
private final IFbsWageApplicationService iFbsWageApplicationService;
|
||||
private final IBgtWageApplicationService iBgtWageApplicationService;
|
||||
private final IZbfProjectService iZbfProjectService;
|
||||
|
||||
@ApiOperation("分包商查询自己的工资申请列表")
|
||||
@GetMapping("/list")
|
||||
@ -50,8 +60,35 @@ public class AppFbsWageApplicationController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Boolean> add(@Validated @RequestBody FbsWageApplication bo) {
|
||||
//todo: 插入审核人的名字
|
||||
// ZbfProject byId = iZbfProjectService.getById(bo.getProjectId());
|
||||
//
|
||||
// bo.setReviewerName(byId.getUnitName())
|
||||
return AjaxResult.success(iFbsWageApplicationService.insert(bo));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分包商查询审核工资申请列表")
|
||||
@GetMapping("/audit/list")
|
||||
public TableDataInfo<BgtWageApplicationVO> auditList(@Validated FbsWageAuditListDTO dto) {
|
||||
return iBgtWageApplicationService.fbsAuditPageList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("分包商查询审核工资申请详细信息")
|
||||
@GetMapping("/audit/{id}")
|
||||
public AjaxResult<BgtWageApplicationDetailVO> getAuditInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iBgtWageApplicationService.appQueryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("分包商审核包工头工资申请")
|
||||
@Log(title = "分包商审核包工头工资申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping("/audit")
|
||||
public AjaxResult<Boolean> audit(@Validated @RequestBody FbsWageAuditDTO dto) {
|
||||
BgtWageApplication bo = iBgtWageApplicationService.getById(dto.getId());
|
||||
BeanUtil.copyProperties(dto, bo);
|
||||
return AjaxResult.success(iBgtWageApplicationService.update(bo));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.web.controller.fbs;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.fbs.domain.FbsMessage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.fbs.bo.FbsMessageQueryBo;
|
||||
import com.ruoyi.fbs.service.IFbsMessageService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 消息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
@Api(value = "消息控制器", tags = {"消息管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fbs/message")
|
||||
public class FbsMessageController extends BaseController {
|
||||
|
||||
private final IFbsMessageService iFbsMessageService;
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*/
|
||||
@ApiOperation("查询消息列表")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<FbsMessage> list(@Validated FbsMessageQueryBo bo) {
|
||||
return iFbsMessageService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出消息列表
|
||||
*/
|
||||
@ApiOperation("导出消息列表")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:export')")
|
||||
@Log(title = "消息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<FbsMessage> export(@Validated FbsMessageQueryBo bo) {
|
||||
List<FbsMessage> list = iFbsMessageService.queryList(bo);
|
||||
ExcelUtil<FbsMessage> util = new ExcelUtil<FbsMessage>(FbsMessage.class);
|
||||
return util.exportExcel(list, "消息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息详细信息
|
||||
*/
|
||||
@ApiOperation("获取消息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<FbsMessage> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iFbsMessageService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消息
|
||||
*/
|
||||
@ApiOperation("新增消息")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:add')")
|
||||
@Log(title = "消息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody FbsMessage bo) {
|
||||
return toAjax(iFbsMessageService.insert(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*/
|
||||
@ApiOperation("修改消息")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:edit')")
|
||||
@Log(title = "消息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody FbsMessage bo) {
|
||||
return toAjax(iFbsMessageService.update(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息
|
||||
*/
|
||||
@ApiOperation("删除消息")
|
||||
@PreAuthorize("@ss.hasPermi('fbs:message:remove')")
|
||||
@Log(title = "消息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iFbsMessageService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.web.controller.fbs;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.fbs.domain.dto.FbsProjectSectionListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsProjectSectionListVO;
|
||||
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/fbs/section")
|
||||
public class FbsProjectSectionController extends BaseController {
|
||||
|
||||
private final IZbfProjectSectionService iZbfProjectSectionService;
|
||||
|
||||
@ApiOperation("分包商查询自己的项目分包列表")
|
||||
@GetMapping("/fbsSubList")
|
||||
public TableDataInfo<FbsProjectSectionListVO> fbsSubList(@Validated FbsProjectSectionListDTO dto) {
|
||||
return iZbfProjectSectionService.fbsSubList(dto);
|
||||
}
|
||||
|
||||
}
|
@ -7,9 +7,9 @@ package com.ruoyi.common.enums;
|
||||
*/
|
||||
public enum BgtMessageType
|
||||
{
|
||||
TASK("1", "包工头同意"),
|
||||
SETTLEMENT("2", "包工头拒绝"),
|
||||
OTHER("3", "务工者同意"),
|
||||
TASK("1", "任务/报名"),
|
||||
SETTLEMENT("2", "结算"),
|
||||
OTHER("3", "其他"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
@ -1,9 +1,6 @@
|
||||
package com.ruoyi.bgt.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -32,7 +29,7 @@ public class BgtWageApplication implements Serializable {
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 项目ID */
|
||||
@ -85,7 +82,7 @@ public class BgtWageApplication implements Serializable {
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty("申请时间")
|
||||
private String applyTime;
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
/** 申请金额 */
|
||||
@Excel(name = "申请金额")
|
||||
@ -117,6 +114,9 @@ public class BgtWageApplication implements Serializable {
|
||||
@ApiModelProperty("审核人Id")
|
||||
private Long reviewerId;
|
||||
|
||||
@ApiModelProperty("审核人名字")
|
||||
private String reviewerName;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.bgt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 请假对象 wgz_leave
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-19
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("请假视图对象")
|
||||
public class BgtLeaveDetailVO {
|
||||
|
||||
|
||||
|
||||
/** 主键自增ID */
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long recruitId;
|
||||
|
||||
|
||||
@ApiModelProperty("招工申请主键自增id")
|
||||
private Long applyKey;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("请假人")
|
||||
private Long userId;
|
||||
|
||||
|
||||
@ApiModelProperty("招工主题")
|
||||
private String subject;
|
||||
|
||||
|
||||
@ApiModelProperty("请假类型(字典)")
|
||||
private String leaveType;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty("请假事由")
|
||||
private String reason;
|
||||
|
||||
|
||||
@ApiModelProperty("审核人ID")
|
||||
private Long auditorUserId;
|
||||
|
||||
|
||||
@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝 4=已取消)")
|
||||
private String auditorType;
|
||||
|
||||
|
||||
@ApiModelProperty("审核意见")
|
||||
private String auditorOpinion;
|
||||
|
||||
@ApiModelProperty("同意|拒绝时间")
|
||||
private LocalDateTime auditorTime;
|
||||
|
||||
@ApiModelProperty("上班时间")
|
||||
private LocalTime workingTime;
|
||||
|
||||
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime closingTime;
|
||||
|
||||
|
||||
@ApiModelProperty("取消请假")
|
||||
private LocalDateTime cancelLeave;
|
||||
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
|
||||
@ApiModelProperty("创建者")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
@ApiModelProperty("更新者")
|
||||
private String updateBy;
|
||||
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("头像地址")
|
||||
private String avatarName;
|
||||
|
||||
}
|
@ -45,8 +45,8 @@ public class BgtWageApplicationDetailVO {
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
@ -36,8 +36,8 @@ public class BgtWageApplicationVO {
|
||||
private BigDecimal applicantAmount;
|
||||
|
||||
@ApiModelProperty("申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String taskName;
|
||||
|
@ -7,6 +7,7 @@ import com.ruoyi.bgt.domain.vo.BgtWageApplicationListVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtWageApplicationVO;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditListDTO;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -25,4 +26,9 @@ public interface BgtWageApplicationMapper extends BaseMapperPlus<BgtWageApplicat
|
||||
Page<BgtWageApplicationVO> appQueryPageList(@Param("page") Page<BgtWageApplicationQueryDTO> page, @Param("dto") BgtWageApplicationQueryDTO dto);
|
||||
|
||||
List<BgtWageApplicationListVO> appQueryList(@Param("dto") BgtWageApplicationQueryDTO dto);
|
||||
|
||||
/**
|
||||
* 分包商查询包工头的工资申请
|
||||
*/
|
||||
Page<BgtWageApplicationVO> fbsAuditPageList(@Param("page") Page<FbsWageAuditListDTO> page, @Param("dto") FbsWageAuditListDTO dto);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.ruoyi.bgt.domain.vo.BgtWageApplicationListVO;
|
||||
import com.ruoyi.bgt.domain.vo.BgtWageApplicationVO;
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditListDTO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -71,4 +72,11 @@ public interface IBgtWageApplicationService extends IServicePlus<BgtWageApplicat
|
||||
* 查询不分页列表
|
||||
*/
|
||||
List<BgtWageApplicationListVO> appQueryList(BgtWageApplicationQueryDTO dto);
|
||||
|
||||
|
||||
/**
|
||||
* 分包商查询审核列表
|
||||
*/
|
||||
TableDataInfo<BgtWageApplicationVO> fbsAuditPageList(FbsWageAuditListDTO dto);
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,9 @@ import com.ruoyi.bgt.service.IBgtWageApplicationService;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||
import com.ruoyi.fbs.domain.dto.FbsWageAuditListDTO;
|
||||
import com.ruoyi.fbs.service.IFbsProjectTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -151,4 +153,14 @@ public class BgtWageApplicationServiceImpl extends ServicePlusImpl<BgtWageApplic
|
||||
public List<BgtWageApplicationListVO> appQueryList(BgtWageApplicationQueryDTO dto) {
|
||||
return baseMapper.appQueryList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BgtWageApplicationVO> fbsAuditPageList(FbsWageAuditListDTO dto) {
|
||||
Page<FbsWageAuditListDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
dto.setReviewerId(SecurityUtils.getAppUserId());
|
||||
Page<BgtWageApplicationVO> queryVOPage = baseMapper.fbsAuditPageList(queryDTOPage, dto);
|
||||
return PageUtils.buildDataInfo(queryVOPage);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,140 @@
|
||||
package com.ruoyi.common.constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FbsMessageConstant {
|
||||
// 公共常量
|
||||
|
||||
public static final String FBS_LARGE_TASK = "1"; //大类型-任务
|
||||
public static final String FBS_LARGE_SETTLEMENT = "2"; //大类型-结算
|
||||
public static final String FBS_LARGE_OTHER = "3"; //大类型-其它
|
||||
|
||||
public static final String FBS_SMALL_SIGN_UP = "1"; //小类型-包工头报名
|
||||
public static final String FBS_SMALL_PAY = "2"; //小类型-付款
|
||||
public static final String FBS_SMALL_LEAVE = "3"; //小类型-进度
|
||||
|
||||
public static final List<String> AUDIT_TYPE = Arrays.asList("2", "3");
|
||||
/**
|
||||
* ============================================分包商->包工头 模板==================================================
|
||||
* ============================================分包商->包工头 模板==================================================
|
||||
* ============================================分包商->包工头 模板==================================================
|
||||
*/
|
||||
|
||||
//任务审批
|
||||
public static final String FBS_SIGN_UP_APPLY_HEADLINE = "您申请的【%s】任务,已得到回复!";
|
||||
public static final String FBS_SIGN_UP_APPLY_SUBHEADING = "您申请的【%s】任务,审核人【%s】已%s!";
|
||||
//工资审批
|
||||
public static final String FBS_PAY_APPLY_HEADLINE = "您【%s】任务工资申请已审批!";
|
||||
public static final String FBS_PAY_APPLY_SUBHEADING = "您申请的【%s】任务工资,审核人【%s】已%s!";
|
||||
//进度审批
|
||||
public static final String FBS_PROGRESS_HEADLINE = "您【%s】任务的上传进度已审批!";
|
||||
public static final String FBS_PROGRESS_SUBHEADING = "您【%s】任务的上传进度,审核人【%s】已%s!";
|
||||
|
||||
|
||||
//分包商->包工头 消息类型
|
||||
public static final String FBS_TYPE_SIGN_UP = "1"; //包工头报名
|
||||
public static final String FBS_TYPE_PAY = "2"; //付款
|
||||
public static final String FBS_TYPE_PROGRESS = "3"; //进度
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
*/
|
||||
//承接任务
|
||||
public static final String FBS_SUB_APPLY_HEADLINE = "您已成功申请【%s】项目【%s】分包";
|
||||
public static final String FBS_SUB_APPLY_SUBHEADING = "您已成功申请到【%s】项目【%s】分包,请耐心等待回复!";
|
||||
//取消承接任务
|
||||
public static final String FBS_TASK_APPLY_CANCEL_HEADLINE = "您已成功取消【%s】项目【%s】分包申请!";
|
||||
public static final String FBS_TASK_APPLY_CANCEL_SUBHEADING = "您已成功取消【%s】项目【%s】分包申请";
|
||||
//工资结算
|
||||
public static final String FBS_SETTLEMENT_APPLY_HEADLINE = "您正在申请【%s】项目【%s】分包,总共【%s】元的工资结算操作!";
|
||||
public static final String FBS_SETTLEMENT_APPLY_SUBHEADING = "您已成功发起金额为【%s】元的工资结算操作,请耐心等待回复!";
|
||||
|
||||
|
||||
//系统->包工头 消息类型
|
||||
public static final String FBS_TYPE_TASK = "4"; //任务报名
|
||||
public static final String FBS_TYPE_TASK_CANCEL = "5"; //任务取消
|
||||
public static final String FBS_TYPE_SETTLEMENT = "6"; //结算
|
||||
|
||||
|
||||
/**
|
||||
* ============================================分包商->总包方 模板==================================================
|
||||
* ============================================分包商->总包方 模板==================================================
|
||||
* ============================================分包商->总包方 模板==================================================
|
||||
*/
|
||||
//承接任务
|
||||
public static final String FBS_TO_ZBF_APPLY_SUB_HEADLINE = "分包商【%s】正在向你申请承接【%s】项目【%s】分包!";
|
||||
public static final String FBS_TO_ZBF_APPLY_SUB_SUBHEADING = "分包商【%s】正在向你申请承接【%s】项目【%s】分包,您可点击查看更多信息!";
|
||||
//工资结算
|
||||
public static final String FBS_TO_ZBF_SETTLEMENT_APPLY_HEADLINE = "分包商【%s】正在向你发起工资结算!";
|
||||
public static final String FBS_TO_ZBF_SETTLEMENT_APPLY_SUBHEADING = "分包商【%s】向你发起金额为【%s】元的工资结算操作!";
|
||||
|
||||
//分包商->总包方 消息类型
|
||||
public static final String FBS_TYPE_SUB_TO_ZBF = "7"; //任务
|
||||
public static final String FBS_TYPE_SETTLEMEN_TO_FBGT = "8"; //结算
|
||||
|
||||
|
||||
/**
|
||||
* ============================================调用方法==================================================
|
||||
* ============================================调用方法==================================================
|
||||
* ============================================调用方法==================================================
|
||||
*/
|
||||
//主副标志
|
||||
public static final String HEADLINE = "headline"; //主标题
|
||||
public static final String SUBHEADING = "subheading"; //副标题
|
||||
|
||||
//包工头消息返回
|
||||
public static Map<String, String> bgtMessage(Map<String, String> mp, String type, Boolean isPass) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String pass = isPass ? "通过" : "拒绝";
|
||||
String projectName = mp.get("projectName");
|
||||
String subName = mp.get("subName");
|
||||
String auditor = mp.get("auditor");
|
||||
String amount = mp.get("amount");
|
||||
switch (type) {
|
||||
case "1":
|
||||
map.put(HEADLINE, String.format(FBS_SIGN_UP_APPLY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(FBS_SIGN_UP_APPLY_SUBHEADING, projectName, auditor, pass));
|
||||
break;
|
||||
case "2":
|
||||
map.put(HEADLINE, String.format(FBS_PAY_APPLY_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(FBS_PAY_APPLY_SUBHEADING, projectName, auditor, pass));
|
||||
break;
|
||||
case "3":
|
||||
map.put(HEADLINE, String.format(FBS_PROGRESS_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(FBS_PROGRESS_SUBHEADING, projectName, auditor, pass));
|
||||
break;
|
||||
case "4":
|
||||
map.put(HEADLINE, String.format(FBS_SUB_APPLY_HEADLINE, projectName,subName));
|
||||
map.put(SUBHEADING, String.format(FBS_SUB_APPLY_SUBHEADING, projectName,subName));
|
||||
break;
|
||||
case "5":
|
||||
map.put(HEADLINE, String.format(FBS_TASK_APPLY_CANCEL_HEADLINE, projectName,subName));
|
||||
map.put(SUBHEADING, String.format(FBS_TASK_APPLY_CANCEL_SUBHEADING, projectName,subName));
|
||||
break;
|
||||
case "6":
|
||||
map.put(HEADLINE, String.format(FBS_SETTLEMENT_APPLY_HEADLINE, projectName,subName,amount));
|
||||
map.put(SUBHEADING, String.format(FBS_SETTLEMENT_APPLY_SUBHEADING, amount));
|
||||
break;
|
||||
case "7":
|
||||
map.put(HEADLINE, String.format(FBS_TO_ZBF_APPLY_SUB_HEADLINE, auditor, projectName,subName));
|
||||
map.put(SUBHEADING, String.format(FBS_TO_ZBF_APPLY_SUB_SUBHEADING, auditor, projectName,subName));
|
||||
break;
|
||||
case "8":
|
||||
map.put(HEADLINE, String.format(FBS_TO_ZBF_SETTLEMENT_APPLY_HEADLINE, auditor));
|
||||
map.put(SUBHEADING, String.format(FBS_TO_ZBF_SETTLEMENT_APPLY_SUBHEADING, auditor,amount));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.fbs.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDate;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 消息分页查询对象 fbs_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("消息分页查询对象")
|
||||
public class FbsMessageQueryBo extends BaseEntity {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
/** 排序列 */
|
||||
@ApiModelProperty("排序列")
|
||||
private String orderByColumn;
|
||||
/** 排序的方向desc或者asc */
|
||||
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||
private String isAsc;
|
||||
|
||||
|
||||
/** 发送类型(0系统 1务工者 2包工头 3分包商 4总包方) */
|
||||
@ApiModelProperty("发送类型(0系统 1务工者 2包工头 3分包商 4总包方)")
|
||||
private String senderType;
|
||||
/** 发送人 */
|
||||
@ApiModelProperty("发送人")
|
||||
private Long senderId;
|
||||
/** 接收类型(1务工者 2包工头 3分包商 4总包方) */
|
||||
@ApiModelProperty("接收类型(1务工者 2包工头 3分包商 4总包方)")
|
||||
private String recipientType;
|
||||
/** 接收人 */
|
||||
@ApiModelProperty("接收人")
|
||||
private Long recipientId;
|
||||
/** 标题 */
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
/** 副标题 */
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
/** 表ID */
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
/** 表名 */
|
||||
@ApiModelProperty("表名")
|
||||
private String tableName;
|
||||
/** 大类型(字典bgt_message_large_type) */
|
||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
private String messageLargeType;
|
||||
/** 小类型(字典bgt_message_small_type) */
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
/** 读状态(0未读 1已读) */
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
/** 是否需要操作(0不需要 1需要 2已操作) */
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation;
|
||||
|
||||
}
|
133
ruoyi-system/src/main/java/com/ruoyi/fbs/domain/FbsMessage.java
Normal file
133
ruoyi-system/src/main/java/com/ruoyi/fbs/domain/FbsMessage.java
Normal file
@ -0,0 +1,133 @@
|
||||
package com.ruoyi.fbs.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 消息对象 fbs_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("fbs_message")
|
||||
@ApiModel("消息视图对象")
|
||||
public class FbsMessage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/** 主键自增ID */
|
||||
@ApiModelProperty("主键自增ID")
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 发送类型(0系统 1务工者 2包工头 3分包商 4总包方) */
|
||||
@Excel(name = "发送类型" , readConverterExp = "0=系统,1=务工者,2=包工头,3=分包商,4=总包方")
|
||||
@ApiModelProperty("发送类型(0系统 1务工者 2包工头 3分包商 4总包方)")
|
||||
private String senderType;
|
||||
|
||||
/** 发送人 */
|
||||
@Excel(name = "发送人")
|
||||
@ApiModelProperty("发送人")
|
||||
private Long senderId;
|
||||
|
||||
/** 接收类型(1务工者 2包工头 3分包商 4总包方) */
|
||||
@Excel(name = "接收类型" , readConverterExp = "1=务工者,2=包工头,3=分包商,4=总包方")
|
||||
@ApiModelProperty("接收类型(1务工者 2包工头 3分包商 4总包方)")
|
||||
private String recipientType;
|
||||
|
||||
/** 接收人 */
|
||||
@Excel(name = "接收人")
|
||||
@ApiModelProperty("接收人")
|
||||
private Long recipientId;
|
||||
|
||||
/** 标题 */
|
||||
@Excel(name = "标题")
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
|
||||
/** 副标题 */
|
||||
@Excel(name = "副标题")
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
|
||||
/** 表ID */
|
||||
@Excel(name = "表ID")
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
|
||||
/** 表名 */
|
||||
@Excel(name = "表名")
|
||||
@ApiModelProperty("表名")
|
||||
private String tableName;
|
||||
|
||||
/** 大类型(字典bgt_message_large_type) */
|
||||
@Excel(name = "大类型" , readConverterExp = "字=典bgt_message_large_type")
|
||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
/** 小类型(字典bgt_message_small_type) */
|
||||
@Excel(name = "小类型" , readConverterExp = "字=典bgt_message_small_type")
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
/** 读状态(0未读 1已读) */
|
||||
@Excel(name = "读状态" , readConverterExp = "0=未读,1=已读")
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Excel(name = "删除标志" , readConverterExp = "0=代表存在,2=代表删除")
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
/** 创建者 */
|
||||
@Excel(name = "创建者")
|
||||
@ApiModelProperty("创建者")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@Excel(name = "更新者")
|
||||
@ApiModelProperty("更新者")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@Excel(name = "更新时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
/** 是否需要操作(0不需要 1需要 2已操作) */
|
||||
@Excel(name = "是否需要操作" , readConverterExp = "0=不需要,1=需要,2=已操作")
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation;
|
||||
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package com.ruoyi.fbs.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -32,7 +30,7 @@ public class FbsWageApplication implements Serializable {
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 项目ID */
|
||||
@ -98,6 +96,7 @@ public class FbsWageApplication implements Serializable {
|
||||
/** 申请时间 */
|
||||
@Excel(name = "申请时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
/** 用工情况 */
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.ruoyi.fbs.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("分包商消息详情查询对象")
|
||||
public class FbsMessageDetailDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("是否待处理")
|
||||
private Boolean isHandle = false;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("消息列表查询对象")
|
||||
public class FbsMessageMyListDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.fbs.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("分包商项目列表查询条件")
|
||||
public class FbsProjectSectionListDTO {
|
||||
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("项目Id")
|
||||
private Long projectId;
|
||||
|
||||
@ApiModelProperty(value = "分包商Id",hidden = true)
|
||||
private Long fbsUserId;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ruoyi.fbs.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 包工头工资申请分页查询对象 bgt_wage_application
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("App包工头工资申请分页查询对象")
|
||||
public class FbsWageAuditDTO {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
@NotNull(message = "主键ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审核状态(1审核中 2已审核 3未通过)")
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.fbs.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 包工头工资申请分页查询对象 bgt_wage_application
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("App包工头工资申请分页查询对象")
|
||||
public class FbsWageAuditListDTO {
|
||||
|
||||
/** 分页大小 */
|
||||
@ApiModelProperty("分页大小")
|
||||
private Integer pageSize;
|
||||
/** 当前页数 */
|
||||
@ApiModelProperty("当前页数")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String taskName;
|
||||
/** 申请人ID */
|
||||
@ApiModelProperty("审核人ID")
|
||||
private Long reviewerId;
|
||||
/** 审核状态(1审核中 2已审核 3未审核) */
|
||||
// @ApiModelProperty("审核状态(1审核中 2已审核 3未通过)")
|
||||
// private String auditStatus;
|
||||
|
||||
@ApiModelProperty("筛选(1申请中 2已结算)")
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.ruoyi.fbs.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("分包商未读消息统计视图对象")
|
||||
public class FbsMessageCountVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("申请消息")
|
||||
private Integer taskMessageCount;
|
||||
|
||||
@ApiModelProperty("结算消息")
|
||||
private Integer settlementMessageCount;
|
||||
|
||||
@ApiModelProperty("其他消息")
|
||||
private Integer otherMessageCount;
|
||||
|
||||
@ApiModelProperty("待处理消息")
|
||||
private Integer handleMessageCount;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ruoyi.fbs.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("分包商消息列表详情视图对象")
|
||||
public class FbsMessageDetailVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("发送人")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long senderId;
|
||||
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
|
||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("是否需要操作(0不需要 1需要 2已操作)")
|
||||
private String isOperation ;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.fbs.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息对象 bgt_message
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("分包商消息列表视图对象")
|
||||
public class FbsMessageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty("主键自增ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("表ID")
|
||||
private Long tableId;
|
||||
|
||||
@ApiModelProperty("发送人")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long senderId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String headline;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subheading;
|
||||
|
||||
@ApiModelProperty("大类型(字典bgt_message_large_type)")
|
||||
private String messageLargeType;
|
||||
|
||||
@ApiModelProperty("小类型(字典bgt_message_small_type)")
|
||||
private String messageSmallType;
|
||||
|
||||
@ApiModelProperty("读状态(0未读 1已读)")
|
||||
private String readStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.fbs.mapper;
|
||||
|
||||
import com.ruoyi.fbs.domain.FbsMessage;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
|
||||
/**
|
||||
* 消息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface FbsMessageMapper extends BaseMapperPlus<FbsMessage> {
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.ruoyi.fbs.service;
|
||||
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.fbs.bo.FbsMessageQueryBo;
|
||||
import com.ruoyi.fbs.domain.FbsMessage;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageDetailDTO;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageMyListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageCountVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageDetailVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageVO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
public interface IFbsMessageService extends IServicePlus<FbsMessage> {
|
||||
/**
|
||||
* 查询单个
|
||||
* @return
|
||||
*/
|
||||
FbsMessage queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
TableDataInfo<FbsMessage> queryPageList(FbsMessageQueryBo bo);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<FbsMessage> queryList(FbsMessageQueryBo bo);
|
||||
|
||||
/**
|
||||
* 根据新增业务对象插入消息
|
||||
* @param bo 消息新增业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean insert(FbsMessage bo);
|
||||
|
||||
/**
|
||||
* 根据编辑业务对象修改消息
|
||||
* @param bo 消息编辑业务对象
|
||||
* @return
|
||||
*/
|
||||
Boolean update(FbsMessage bo);
|
||||
|
||||
/**
|
||||
* 校验并删除数据
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 分包商的未读消息统计
|
||||
*/
|
||||
FbsMessageCountVO countUnread();
|
||||
|
||||
/**
|
||||
* 分包商的消息列表
|
||||
*/
|
||||
TableDataInfo<FbsMessageVO> queryMyPageList(FbsMessageMyListDTO dto);
|
||||
|
||||
/**
|
||||
* 消息详情列表
|
||||
*/
|
||||
TableDataInfo<FbsMessageDetailVO> queryDetailPageList(FbsMessageDetailDTO dto);
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.ruoyi.fbs.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BgtMessageType;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.bo.FbsMessageQueryBo;
|
||||
import com.ruoyi.fbs.domain.FbsMessage;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageDetailDTO;
|
||||
import com.ruoyi.fbs.domain.dto.FbsMessageMyListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageCountVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageDetailVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsMessageVO;
|
||||
import com.ruoyi.fbs.mapper.FbsMessageMapper;
|
||||
import com.ruoyi.fbs.service.IFbsMessageService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED;
|
||||
|
||||
/**
|
||||
* 消息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-28
|
||||
*/
|
||||
@Service
|
||||
public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, FbsMessage> implements IFbsMessageService {
|
||||
|
||||
@Override
|
||||
public FbsMessage queryById(Long id){
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<FbsMessage> queryPageList(FbsMessageQueryBo bo) {
|
||||
Page<FbsMessage> result = page(PageUtils.buildPage(), buildQueryWrapper(bo));
|
||||
return PageUtils.buildDataInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FbsMessage> queryList(FbsMessageQueryBo bo) {
|
||||
return list(buildQueryWrapper(bo));
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<FbsMessage> buildQueryWrapper(FbsMessageQueryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<FbsMessage> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getSenderType()), FbsMessage::getSenderType, bo.getSenderType());
|
||||
lqw.eq(bo.getSenderId() != null, FbsMessage::getSenderId, bo.getSenderId());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getRecipientType()), FbsMessage::getRecipientType, bo.getRecipientType());
|
||||
lqw.eq(bo.getRecipientId() != null, FbsMessage::getRecipientId, bo.getRecipientId());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getHeadline()), FbsMessage::getHeadline, bo.getHeadline());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getSubheading()), FbsMessage::getSubheading, bo.getSubheading());
|
||||
lqw.eq(bo.getTableId() != null, FbsMessage::getTableId, bo.getTableId());
|
||||
lqw.like(StrUtil.isNotBlank(bo.getTableName()), FbsMessage::getTableName, bo.getTableName());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getMessageLargeType()), FbsMessage::getMessageLargeType, bo.getMessageLargeType());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getMessageSmallType()), FbsMessage::getMessageSmallType, bo.getMessageSmallType());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getReadStatus()), FbsMessage::getReadStatus, bo.getReadStatus());
|
||||
lqw.eq(StrUtil.isNotBlank(bo.getIsOperation()), FbsMessage::getIsOperation, bo.getIsOperation());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insert(FbsMessage bo) {
|
||||
FbsMessage add = BeanUtil.toBean(bo, FbsMessage.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(FbsMessage bo) {
|
||||
FbsMessage update = BeanUtil.toBean(bo, FbsMessage.class);
|
||||
validEntityBeforeSave(update);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*
|
||||
* @param entity 实体类数据
|
||||
*/
|
||||
private void validEntityBeforeSave(FbsMessage entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FbsMessageCountVO countUnread() {
|
||||
List<FbsMessage> fbsMessages = baseMapper.selectList(Wrappers.<FbsMessage>lambdaQuery()
|
||||
.eq(FbsMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||
.eq(FbsMessage::getReadStatus, "0"));
|
||||
Map<String, Long> map = fbsMessages.stream().collect(Collectors.groupingBy(FbsMessage::getMessageLargeType, Collectors.counting()));
|
||||
|
||||
FbsMessageCountVO fbsMessageCountVO = new FbsMessageCountVO();
|
||||
fbsMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(), 0L).intValue());
|
||||
fbsMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(), 0L).intValue());
|
||||
fbsMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(), 0L).intValue());
|
||||
|
||||
Integer handle = baseMapper.selectCount(Wrappers.<FbsMessage>lambdaQuery()
|
||||
.eq(FbsMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||
.eq(FbsMessage::getIsOperation, OPERATION_NEED));
|
||||
fbsMessageCountVO.setHandleMessageCount(handle);
|
||||
return fbsMessageCountVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<FbsMessageVO> queryMyPageList(FbsMessageMyListDTO dto) {
|
||||
LambdaQueryWrapper<FbsMessage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(FbsMessage::getRecipientId, SecurityUtils.getAppUserId());
|
||||
wrapper.orderByDesc(FbsMessage::getCreateTime);
|
||||
Page<FbsMessage> result = page(PageUtils.buildPage(), wrapper);
|
||||
Page<FbsMessageVO> fbsMessageVOPage = new Page<>();
|
||||
fbsMessageVOPage.setTotal(result.getTotal());
|
||||
fbsMessageVOPage.setRecords(BeanUtil.copyToList(result.getRecords(), FbsMessageVO.class));
|
||||
return PageUtils.buildDataInfo(fbsMessageVOPage);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<FbsMessageDetailVO> queryDetailPageList(FbsMessageDetailDTO dto) {
|
||||
LambdaQueryWrapper<FbsMessage> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(FbsMessage::getRecipientId, SecurityUtils.getAppUserId());
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getMessageLargeType()), FbsMessage::getMessageLargeType, dto.getMessageLargeType());
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getMessageSmallType()), FbsMessage::getMessageSmallType, dto.getMessageSmallType());
|
||||
wrapper.eq(dto.getIsHandle(), FbsMessage::getIsOperation,OPERATION_NEED);
|
||||
if(dto.getDate() != null) {
|
||||
wrapper.between(FbsMessage::getCreateTime, dto.getDate().atStartOfDay(), dto.getDate().atStartOfDay().with(LocalTime.MAX));
|
||||
}
|
||||
wrapper.orderByDesc(FbsMessage::getId);
|
||||
Page<FbsMessage> result = page(PageUtils.buildPage(), wrapper);
|
||||
Page<FbsMessageDetailVO> page = new Page<>();
|
||||
page.setTotal(result.getTotal());
|
||||
|
||||
ArrayList<FbsMessageDetailVO> fbsMessageDetailVOS = new ArrayList<>();
|
||||
|
||||
for (FbsMessage message : result.getRecords()) {
|
||||
FbsMessageDetailVO fbsMessageDetailVO = BeanUtil.copyProperties(message, FbsMessageDetailVO.class);
|
||||
// if (BGT_LARGE_TASK.equals(message.getMessageLargeType())) {
|
||||
// FbsProjectTask task = taskService.getById(message.getTableId());
|
||||
// bgtMessageDetailVO.setTaskName(task.getTaskName());
|
||||
// } else if (BGT_LARGE_SETTLEMENT.equals(message.getMessageLargeType())) {
|
||||
// BgtWageApplication wageApplication = wageApplicationService.getById(message.getTableId());
|
||||
// FbsProjectTask task = taskService.getById(wageApplication.getTaskId());
|
||||
// bgtMessageDetailVO.setTaskName(task.getTaskName());
|
||||
// } else if (BGT_LARGE_OTHER.equals(message.getMessageLargeType())) {
|
||||
// switch (message.getMessageSmallType()) {
|
||||
// case BGT_SMALL_SIGN_UP:
|
||||
// BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruit = recruitService.getById(recruitApply.getRecruitId());
|
||||
// bgtMessageDetailVO.setRecruitName(recruit.getRecruitName());
|
||||
// break;
|
||||
// case BGT_SMALL_PAY:
|
||||
// WgzPayCalculation payCalculation = payCalculationService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruitPay = recruitService.getById(payCalculation.getRecruitId());
|
||||
// bgtMessageDetailVO.setRecruitName(recruitPay.getRecruitName());
|
||||
// break;
|
||||
// case BGT_SMALL_LEAVE:
|
||||
// WgzLeave wgzLeave = leaveService.getById(message.getTableId());
|
||||
// bgtMessageDetailVO.setReason(wgzLeave.getReason());
|
||||
// bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(wgzLeave.getUserId()).getUsername());
|
||||
// bgtMessageDetailVO.setStartTime(wgzLeave.getStartTime());
|
||||
// bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime());
|
||||
// break;
|
||||
// case BGT_SMALL_MAKE_UP:
|
||||
// WgzReissueacard reissueCard = reissueacardService.getById(message.getTableId());
|
||||
// bgtMessageDetailVO.setReason(reissueCard.getReason());
|
||||
// bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(reissueCard.getUserId()).getUsername());
|
||||
// bgtMessageDetailVO.setNowTime(reissueCard.getNowTime());
|
||||
// break;
|
||||
// case BGT_SMALL_REPORT_MAKE_UP:
|
||||
// WgzDailyClock dailyClock = dailyClockService.getById(message.getTableId());
|
||||
// BgtProjectRecruit recruitClock = recruitService.getById(dailyClock.getRecruitId());
|
||||
// bgtMessageDetailVO.setUsername(wgzUserService.findByUserId(dailyClock.getUserId()).getUsername());
|
||||
// bgtMessageDetailVO.setRecruitName(recruitClock.getRecruitName());
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
fbsMessageDetailVOS.add(fbsMessageDetailVO);
|
||||
}
|
||||
page.setRecords(fbsMessageDetailVOS);
|
||||
return PageUtils.buildDataInfo(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
package com.ruoyi.zbf.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -31,7 +28,7 @@ public class ZbfProjectSubcontractingApply implements Serializable {
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 项目ID */
|
||||
|
@ -1,10 +1,14 @@
|
||||
package com.ruoyi.zbf.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.fbs.domain.dto.FbsProjectSectionListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsProjectSectionListVO;
|
||||
import com.ruoyi.zbf.domain.ZbfProjectSection;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 总包方项目标段Mapper接口
|
||||
@ -16,4 +20,7 @@ import org.apache.ibatis.annotations.CacheNamespace;
|
||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||
public interface ZbfProjectSectionMapper extends BaseMapperPlus<ZbfProjectSection> {
|
||||
|
||||
// 查询分包商已加入的项目标段
|
||||
Page<FbsProjectSectionListVO> joinSectionList(@Param("page") Page<FbsProjectSectionListDTO> page, @Param("dto") FbsProjectSectionListDTO dto);
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.ruoyi.zbf.service;
|
||||
|
||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.fbs.domain.dto.FbsProjectSectionListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsProjectSectionListVO;
|
||||
import com.ruoyi.zbf.bo.ZbfProjectSectionQueryBo;
|
||||
import com.ruoyi.zbf.domain.ZbfProjectSection;
|
||||
|
||||
@ -53,4 +55,10 @@ public interface IZbfProjectSectionService extends IServicePlus<ZbfProjectSectio
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 分包商查询自己的项目分包列表
|
||||
*/
|
||||
TableDataInfo<FbsProjectSectionListVO> fbsSubList(FbsProjectSectionListDTO dto) ;
|
||||
}
|
||||
|
@ -8,12 +8,20 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.fbs.domain.dto.FbsProjectSectionListDTO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsProjectSectionListVO;
|
||||
import com.ruoyi.fbs.domain.vo.FbsProjectSubcontractingListVO;
|
||||
import com.ruoyi.zbf.bo.ZbfProjectSectionQueryBo;
|
||||
import com.ruoyi.zbf.domain.ZbfProjectSection;
|
||||
import com.ruoyi.zbf.domain.ZbfProjectSubcontracting;
|
||||
import com.ruoyi.zbf.mapper.ZbfProjectSectionMapper;
|
||||
import com.ruoyi.zbf.service.IZbfProjectSectionService;
|
||||
import com.ruoyi.zbf.service.IZbfProjectSubcontractingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -27,6 +35,9 @@ import java.util.Map;
|
||||
@Service
|
||||
public class ZbfProjectSectionServiceImpl extends ServicePlusImpl<ZbfProjectSectionMapper, ZbfProjectSection> implements IZbfProjectSectionService {
|
||||
|
||||
@Autowired
|
||||
private IZbfProjectSubcontractingService zbfProjectSubcontractingService;
|
||||
|
||||
@Override
|
||||
public ZbfProjectSection queryById(Long id){
|
||||
return getById(id);
|
||||
@ -82,4 +93,31 @@ public class ZbfProjectSectionServiceImpl extends ServicePlusImpl<ZbfProjectSect
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<FbsProjectSectionListVO> fbsSubList(FbsProjectSectionListDTO dto) {
|
||||
Page<FbsProjectSectionListDTO> queryDTOPage = new Page<>();
|
||||
queryDTOPage.setCurrent(dto.getPageNum());
|
||||
queryDTOPage.setSize(dto.getPageSize());
|
||||
dto.setFbsUserId(SecurityUtils.getAppUserId());
|
||||
Page<FbsProjectSectionListVO> queryVOPage = baseMapper.joinSectionList(queryDTOPage, dto);
|
||||
|
||||
for (FbsProjectSectionListVO sectionListVO : queryVOPage.getRecords()){
|
||||
//分包处理
|
||||
List<FbsProjectSubcontractingListVO> subListVO = new ArrayList<>();
|
||||
//查询标段下的所有已承接的分包
|
||||
List<ZbfProjectSubcontracting> subList = zbfProjectSubcontractingService.list(Wrappers.<ZbfProjectSubcontracting>lambdaQuery()
|
||||
.eq(ZbfProjectSubcontracting::getSectionId, sectionListVO.getId())
|
||||
.eq(ZbfProjectSubcontracting::getUserId, SecurityUtils.getAppUserId()));
|
||||
|
||||
for (ZbfProjectSubcontracting sub : subList){
|
||||
FbsProjectSubcontractingListVO fbsProjectSubcontractingListVO = new FbsProjectSubcontractingListVO();
|
||||
BeanUtil.copyProperties(sub, fbsProjectSubcontractingListVO);
|
||||
subListVO.add(fbsProjectSubcontractingListVO);
|
||||
}
|
||||
sectionListVO.setSubList(subListVO);
|
||||
}
|
||||
|
||||
return PageUtils.buildDataInfo(queryVOPage);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bwa.task_staff_num,
|
||||
bwa.task_address,
|
||||
bwa.applicant_amount,
|
||||
bwa.create_time,
|
||||
bwa.apply_time,
|
||||
bwa.id,
|
||||
bwa.username,
|
||||
bwa.project_name,
|
||||
@ -73,5 +73,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by bwa.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="fbsAuditPageList" resultType="com.ruoyi.bgt.domain.vo.BgtWageApplicationVO">
|
||||
select bwa.task_name,
|
||||
bwa.task_staff_num,
|
||||
bwa.task_address,
|
||||
bwa.applicant_amount,
|
||||
bwa.apply_time,
|
||||
bwa.id,
|
||||
bwa.username,
|
||||
bwa.project_name,
|
||||
bwa.audit_status
|
||||
from bgt_wage_application bwa
|
||||
<where>
|
||||
<if test="dto.reviewerId != null ">
|
||||
and bwa.reviewer_id = #{dto.reviewerId}
|
||||
</if>
|
||||
<if test="dto.taskId != null ">
|
||||
and bwa.task_id = #{dto.taskId}
|
||||
</if>
|
||||
<if test="dto.taskName != null and dto.taskName != ''">
|
||||
and bpr.task_name like concat('%', #{dto.taskName}, '%')
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 1 ">
|
||||
and bwa.audit_status = '1'
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 2 ">
|
||||
and bwa.audit_status in ('2','3')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.fbs.mapper.FbsMessageMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.fbs.domain.FbsMessage" id="FbsMessageResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="senderType" column="sender_type"/>
|
||||
<result property="senderId" column="sender_id"/>
|
||||
<result property="recipientType" column="recipient_type"/>
|
||||
<result property="recipientId" column="recipient_id"/>
|
||||
<result property="headline" column="headline"/>
|
||||
<result property="subheading" column="subheading"/>
|
||||
<result property="tableId" column="table_id"/>
|
||||
<result property="tableName" column="table_name"/>
|
||||
<result property="messageLargeType" column="message_large_type"/>
|
||||
<result property="messageSmallType" column="message_small_type"/>
|
||||
<result property="readStatus" column="read_status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isOperation" column="is_operation"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dto.auditorType != null and dto.auditorType != ''">
|
||||
and a.auditor_type = #{dto.auditorType}
|
||||
</if>
|
||||
<if test="dto.auditorType == null">
|
||||
<if test="dto.auditorType == null or dto.auditorType == ''">
|
||||
and a.auditor_type in (0,1,2,3)
|
||||
</if>
|
||||
<if test="dto.date != null">
|
||||
|
@ -17,5 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="joinSectionList" resultType="com.ruoyi.fbs.domain.vo.FbsProjectSectionListVO">
|
||||
SELECT zps.id, zps.project_id, zps.section_name
|
||||
from zbf_project_section zps
|
||||
left join zbf_project zp on zps.project_id = zp.id
|
||||
where EXISTS (SELECT 1
|
||||
FROM zbf_project_subcontracting zpsu
|
||||
WHERE zpsu.user_id = #{dto.fbsUserId}
|
||||
AND zps.id = zpsu.section_id)
|
||||
<if test="dto.projectId!=null">
|
||||
and zps.project_id = #{dto.projectId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
BIN
ruoyi/uploadPath/appResource/recruitDefault.png
Normal file
BIN
ruoyi/uploadPath/appResource/recruitDefault.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
Reference in New Issue
Block a user