Merge remote-tracking branch 'origin/master'
This commit is contained in:
		@ -1,20 +1,15 @@
 | 
			
		||||
package com.ruoyi.bgt.domain;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.*;
 | 
			
		||||
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.io.Serializable;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
import java.time.LocalTime;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息对象 bgt_message
 | 
			
		||||
@ -33,7 +28,7 @@ public class BgtMessage implements Serializable {
 | 
			
		||||
 | 
			
		||||
    /** 主键自增ID */
 | 
			
		||||
    @ApiModelProperty("主键自增ID")
 | 
			
		||||
    @TableId(value = "id")
 | 
			
		||||
    @TableId(value = "id", type = IdType.AUTO)
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    /** 发送类型(0系统 1务工者 2包工头) */
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,32 @@
 | 
			
		||||
package com.ruoyi.bgt.domain.dto;
 | 
			
		||||
 | 
			
		||||
import io.swagger.annotations.ApiModel;
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
import lombok.experimental.Accessors;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息对象 bgt_message
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2025-02-25
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
@ApiModel("消息列表查询对象")
 | 
			
		||||
public class BgtMessageMyListDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID=1L;
 | 
			
		||||
 | 
			
		||||
	/** 分页大小 */
 | 
			
		||||
	@ApiModelProperty("分页大小")
 | 
			
		||||
	private Integer pageSize;
 | 
			
		||||
	/** 当前页数 */
 | 
			
		||||
	@ApiModelProperty("当前页数")
 | 
			
		||||
	private Integer pageNum;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,41 @@
 | 
			
		||||
package com.ruoyi.bgt.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 java.io.Serializable;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息对象 bgt_message
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2025-02-25
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
@ApiModel("其他消息查询对象")
 | 
			
		||||
public class BgtMessageOtherDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID=1L;
 | 
			
		||||
 | 
			
		||||
	/** 分页大小 */
 | 
			
		||||
	@ApiModelProperty("分页大小")
 | 
			
		||||
	private Integer pageSize;
 | 
			
		||||
	/** 当前页数 */
 | 
			
		||||
	@ApiModelProperty("当前页数")
 | 
			
		||||
	private Integer pageNum;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("日期")
 | 
			
		||||
	@JsonFormat(pattern = "yyyy-MM-dd hh", timezone = "GMT+8")
 | 
			
		||||
	private LocalDateTime date;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("小类型(字典bgt_message_small_type)")
 | 
			
		||||
	private String messageSmallType;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotEmpty;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@ -22,9 +21,11 @@ public class BgtProjectRecruitApplyQueryDTO extends BaseEntity {
 | 
			
		||||
	private Integer pageNum;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工ID列表")
 | 
			
		||||
	@NotEmpty(message = "招工ID列表不能为空")
 | 
			
		||||
	private List<Long> recruitIds;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("任务Id")
 | 
			
		||||
	private Long taskId;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("选择状态(0报名 1包工同意  2包工头拒绝(截止时间)3务工者同意  4务工者拒绝  5进场 6离场)")
 | 
			
		||||
	private List<String> status;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,33 @@
 | 
			
		||||
package com.ruoyi.bgt.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 BgtMessageCountVO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID=1L;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("任务消息")
 | 
			
		||||
    private Integer taskMessageCount;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("结算消息")
 | 
			
		||||
	private Integer settlementMessageCount;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("其他消息")
 | 
			
		||||
	private Integer otherMessageCount;
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,75 @@
 | 
			
		||||
package com.ruoyi.bgt.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 BgtMessageOtherVO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID=1L;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty("主键自增ID")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
	@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("创建时间")
 | 
			
		||||
    private LocalDateTime createTime;
 | 
			
		||||
 | 
			
		||||
	//补卡
 | 
			
		||||
	@ApiModelProperty("现补卡时间")
 | 
			
		||||
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
 | 
			
		||||
	private LocalDateTime nowTime;
 | 
			
		||||
 | 
			
		||||
	//报名 付款
 | 
			
		||||
	@ApiModelProperty("招工主题")
 | 
			
		||||
	private String recruitName;
 | 
			
		||||
 | 
			
		||||
	//请假
 | 
			
		||||
	@ApiModelProperty("请假开始时间")
 | 
			
		||||
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
 | 
			
		||||
	private LocalDateTime startTime;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("请假结束时间")
 | 
			
		||||
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
 | 
			
		||||
	private LocalDateTime endTime;
 | 
			
		||||
 | 
			
		||||
	//请假 补卡
 | 
			
		||||
	@ApiModelProperty("申请人")
 | 
			
		||||
	private String username;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("补卡/请假理由")
 | 
			
		||||
	private String reason;
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,50 @@
 | 
			
		||||
package com.ruoyi.bgt.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;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息对象 bgt_message
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2025-02-25
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@Accessors(chain = true)
 | 
			
		||||
@ApiModel("消息列表视图对象")
 | 
			
		||||
public class BgtMessageVO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID=1L;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty("主键自增ID")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
	@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("创建时间")
 | 
			
		||||
    private LocalDateTime createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -56,5 +56,8 @@ public class BgtProjectRecruitApplyVO implements Serializable {
 | 
			
		||||
	@ApiModelProperty("任务名")
 | 
			
		||||
	private String taskName;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("0报名 1包工同意  2包工头拒绝(截止时间)3务工者同意  4务工者拒绝  5进场 6离场")
 | 
			
		||||
	private String status;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -108,4 +108,10 @@ public class BgtProjectRecruitDetailVO implements Serializable {
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("申请者列表")
 | 
			
		||||
	List<BgtProjectRecruitApplyVO> applylist;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("总人数")
 | 
			
		||||
	private Integer totalNum;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("同意人数")
 | 
			
		||||
	private Integer passNum;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,13 @@
 | 
			
		||||
package com.ruoyi.bgt.mapper;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
 | 
			
		||||
import org.apache.ibatis.annotations.CacheNamespace;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息Mapper接口
 | 
			
		||||
@ -15,4 +19,5 @@ import org.apache.ibatis.annotations.CacheNamespace;
 | 
			
		||||
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
 | 
			
		||||
public interface BgtMessageMapper extends BaseMapperPlus<BgtMessage> {
 | 
			
		||||
 | 
			
		||||
	Page<BgtMessageOtherVO> queryOtherPageList(@Param("page")Page<BgtMessageOtherDTO> page,@Param("dto") BgtMessageOtherDTO dto);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,14 @@
 | 
			
		||||
package com.ruoyi.bgt.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.bgt.bo.BgtMessageQueryBo;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
 | 
			
		||||
import com.ruoyi.common.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzMessage;
 | 
			
		||||
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@ -66,4 +70,18 @@ public interface IBgtMessageService extends IServicePlus<BgtMessage> {
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean sendAMessage(BgtMessage bo);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 我的未读消息统计
 | 
			
		||||
	 */
 | 
			
		||||
	BgtMessageCountVO countUnread();
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 我的消息列表
 | 
			
		||||
	 */
 | 
			
		||||
	TableDataInfo<BgtMessageVO> queryMyPageList(BgtMessageMyListDTO dto);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 其他消息列表
 | 
			
		||||
	 */
 | 
			
		||||
	TableDataInfo<BgtMessageOtherVO> queryOtherPageList(BgtMessageOtherDTO dto);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,10 +14,7 @@ import com.ruoyi.wgz.bo.res.WgzAppJobListingRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.PathVariable;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotEmpty;
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@ -73,10 +70,15 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 查询单个
 | 
			
		||||
	 * @return
 | 
			
		||||
	 */
 | 
			
		||||
	BgtProjectRecruitDetailVO appQueryById(Long id);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 获取任务下的所有招工Id
 | 
			
		||||
	 */
 | 
			
		||||
	List<Long> getRecruitIdsByTaskId(Long taskId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * LC-APP相关
 | 
			
		||||
	 * =================================================================================================================
 | 
			
		||||
 | 
			
		||||
@ -2,23 +2,32 @@ package com.ruoyi.bgt.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.util.StrUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.utils.PageUtils;
 | 
			
		||||
import com.ruoyi.common.core.page.PagePlus;
 | 
			
		||||
import com.ruoyi.common.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzMessage;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
 | 
			
		||||
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.bgt.bo.BgtMessageQueryBo;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
 | 
			
		||||
import com.ruoyi.bgt.mapper.BgtMessageMapper;
 | 
			
		||||
import com.ruoyi.bgt.service.IBgtMessageService;
 | 
			
		||||
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 org.springframework.stereotype.Service;
 | 
			
		||||
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 消息Service业务层处理
 | 
			
		||||
@ -104,4 +113,38 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
 | 
			
		||||
	public Boolean sendAMessage(BgtMessage bo) {
 | 
			
		||||
		return save(bo);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public BgtMessageCountVO countUnread() {
 | 
			
		||||
		List<BgtMessage> bgtMessages = baseMapper.selectList(Wrappers.<BgtMessage>lambdaQuery()
 | 
			
		||||
			.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
 | 
			
		||||
			.eq(BgtMessage::getReadStatus, "0"));
 | 
			
		||||
		Map<String, Long> map = bgtMessages.stream().collect(Collectors.groupingBy(BgtMessage::getMessageLargeType, Collectors.counting()));
 | 
			
		||||
 | 
			
		||||
		BgtMessageCountVO bgtMessageCountVO = new BgtMessageCountVO();
 | 
			
		||||
		bgtMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(),0L).intValue());
 | 
			
		||||
		bgtMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(),0L).intValue());
 | 
			
		||||
		bgtMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(),0L).intValue());
 | 
			
		||||
		return bgtMessageCountVO;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public TableDataInfo<BgtMessageVO> queryMyPageList(BgtMessageMyListDTO dto) {
 | 
			
		||||
		LambdaQueryWrapper<BgtMessage> wrapper = new LambdaQueryWrapper<>();
 | 
			
		||||
		wrapper.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId());
 | 
			
		||||
		Page<BgtMessage> result = page(PageUtils.buildPage(), wrapper);
 | 
			
		||||
		Page<BgtMessageVO> bgtMessageVOPage = new Page<>();
 | 
			
		||||
		bgtMessageVOPage.setTotal(result.getTotal());
 | 
			
		||||
		bgtMessageVOPage.setRecords(BeanUtil.copyToList(result.getRecords(),BgtMessageVO.class));
 | 
			
		||||
		return PageUtils.buildDataInfo(bgtMessageVOPage);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public TableDataInfo<BgtMessageOtherVO> queryOtherPageList(BgtMessageOtherDTO dto) {
 | 
			
		||||
		Page<BgtMessageOtherDTO> queryDTOPage = new Page<>();
 | 
			
		||||
		queryDTOPage.setCurrent(dto.getPageNum());
 | 
			
		||||
		queryDTOPage.setSize(dto.getPageSize());
 | 
			
		||||
		Page<BgtMessageOtherVO> queryVOPage = baseMapper.queryOtherPageList(queryDTOPage, dto);
 | 
			
		||||
		return PageUtils.buildDataInfo(queryVOPage);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -20,6 +20,7 @@ import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
 | 
			
		||||
import com.ruoyi.common.core.domain.entity.SysDictData;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
 | 
			
		||||
import com.ruoyi.common.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.domain.dto.AnnexDTO;
 | 
			
		||||
import com.ruoyi.common.enums.RecruitApplyStatus;
 | 
			
		||||
import com.ruoyi.common.exception.BaseException;
 | 
			
		||||
import com.ruoyi.common.service.IAnnexService;
 | 
			
		||||
@ -61,14 +62,14 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzUserService wgzUserService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IBgtProjectRecruitService iBgtProjectRecruitService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService iWgzMessageService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IBgtMessageService iBgtMessageService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService wgzMessageService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private ISysDictTypeService dictTypeService;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@ -128,6 +129,15 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public TableDataInfo<BgtProjectRecruitApplyVO> appQueryPageList(BgtProjectRecruitApplyQueryDTO dto) {
 | 
			
		||||
		if(dto.getTaskId()!=null){
 | 
			
		||||
			List<Long> recruitIdsByTaskId = iBgtProjectRecruitService.getRecruitIdsByTaskId(dto.getTaskId());
 | 
			
		||||
			if(dto.getRecruitIds()==null){
 | 
			
		||||
				dto.setRecruitIds(recruitIdsByTaskId);
 | 
			
		||||
			}else {
 | 
			
		||||
				dto.getRecruitIds().addAll(recruitIdsByTaskId);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Page<BgtProjectRecruitApplyQueryDTO> queryDTOPage = new Page<>();
 | 
			
		||||
		queryDTOPage.setCurrent(dto.getPageNum());
 | 
			
		||||
		queryDTOPage.setSize(dto.getPageSize());
 | 
			
		||||
@ -156,7 +166,26 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
		recruitApply.setEntryTime(dto.getEntryTime());
 | 
			
		||||
		recruitApply.setStatus(RecruitApplyStatus.BGT_PASS.getCode());
 | 
			
		||||
		dto.getEntryMaterials().addAll(dto.getInsurances());
 | 
			
		||||
		for (AnnexDTO annexDTO : dto.getEntryMaterials()) {
 | 
			
		||||
			annexDTO.setRecruitId(recruitApply.getRecruitId());
 | 
			
		||||
		}
 | 
			
		||||
		annexService.insertBatch(dto.getEntryMaterials());
 | 
			
		||||
		//发消息
 | 
			
		||||
		HashMap<String, String> mp = new HashMap<>();
 | 
			
		||||
		mp.put("projectName",iBgtProjectRecruitService.getById(recruitApply.getRecruitId()).getRecruitName());
 | 
			
		||||
		mp.put("auditor",SecurityUtils.getUsername());
 | 
			
		||||
		Map<String, String> map = bgtMessage(mp, BGT_TYPE_SIGN_UP, true);
 | 
			
		||||
		WgzMessage wgzMessage = new WgzMessage()
 | 
			
		||||
			.setSenderType(USERTYPE_BGT)
 | 
			
		||||
			.setRecipientType(USERTYPE_WGZ)
 | 
			
		||||
			.setRecipientId(recruitApply.getUserId())
 | 
			
		||||
			.setHeadline(map.get(HEADLINE))
 | 
			
		||||
			.setSubheading(map.get(SUBHEADING))
 | 
			
		||||
			.setTableId(recruitApply.getId())
 | 
			
		||||
			.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName())
 | 
			
		||||
			.setMessageLargeType(LARGE_APPLY)
 | 
			
		||||
			.setMessageSmallType(SMALL_SYSTEM);
 | 
			
		||||
		wgzMessageService.sendAMessage(wgzMessage);
 | 
			
		||||
		return updateById(recruitApply);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -303,7 +332,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
		bgtProjectRecruitApply.setStatus("7");
 | 
			
		||||
		if(baseMapper.updateById(bgtProjectRecruitApply) >0){
 | 
			
		||||
			Long appUserId = SecurityUtils.getAppUserId();
 | 
			
		||||
			BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
 | 
			
		||||
			BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
 | 
			
		||||
			BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getUserId());
 | 
			
		||||
			Map<String, String> mp = new HashMap<>();
 | 
			
		||||
			mp.put("projectName",appById.getRecruitName());
 | 
			
		||||
@ -340,7 +369,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
 | 
			
		||||
		//1、获取当前用户
 | 
			
		||||
		WgzUser byUserId = wgzUserService.findByUserId(SecurityUtils.getAppUserId());
 | 
			
		||||
		//2、当前申请报名的工地信息
 | 
			
		||||
		BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.queryById(req.getRecruitApplyId());
 | 
			
		||||
		BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId());
 | 
			
		||||
		BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId());
 | 
			
		||||
		//3、更新报名状态
 | 
			
		||||
		BgtProjectRecruitApply apply = new BgtProjectRecruitApply();
 | 
			
		||||
 | 
			
		||||
@ -9,6 +9,7 @@ import com.ruoyi.bgt.bo.BgtProjectRecruitQueryBo;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
 | 
			
		||||
import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper;
 | 
			
		||||
@ -33,10 +34,8 @@ import org.springframework.beans.BeanUtils;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 包工头招工Service业务层处理
 | 
			
		||||
@ -53,6 +52,10 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IBgtProjectRecruitApplyService bgtProjectRecruitApplyService;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 包工头招工任务能看到的申请状态
 | 
			
		||||
	 */
 | 
			
		||||
	private static final List<String> applyStatus = Arrays.asList(RecruitApplyStatus.SIGN_UP.getCode(),RecruitApplyStatus.BGT_PASS.getCode());
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public BgtProjectRecruit queryById(Long id){
 | 
			
		||||
@ -130,7 +133,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
 | 
			
		||||
		for(BgtProjectRecruitVO vo : queryVOPage.getRecords()) {
 | 
			
		||||
			BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO();
 | 
			
		||||
			bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(vo.getId()));
 | 
			
		||||
			bgtProjectRecruitApplyQueryDTO.setStatus(dto.getStatus());
 | 
			
		||||
			bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus);
 | 
			
		||||
			vo.setApplylist(bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO));
 | 
			
		||||
		}
 | 
			
		||||
		return PageUtils.buildDataInfo(queryVOPage);
 | 
			
		||||
@ -144,11 +147,22 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
 | 
			
		||||
		vo.setTaskName(task.getTaskName());
 | 
			
		||||
		BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO();
 | 
			
		||||
		bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(vo.getId()));
 | 
			
		||||
		bgtProjectRecruitApplyQueryDTO.setStatus(Collections.singletonList(RecruitApplyStatus.SIGN_UP.getCode()));
 | 
			
		||||
		vo.setApplylist(bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO));
 | 
			
		||||
		bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus);
 | 
			
		||||
		List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO);
 | 
			
		||||
		vo.setTotalNum(bgtProjectRecruitApplyVOS.size());
 | 
			
		||||
		int count = (int)bgtProjectRecruitApplyVOS.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.BGT_PASS.getCode())).count();
 | 
			
		||||
		vo.setPassNum(count);
 | 
			
		||||
		vo.setApplylist(bgtProjectRecruitApplyVOS.subList(0, Math.min(count, 3)));
 | 
			
		||||
		return vo;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public List<Long> getRecruitIdsByTaskId(Long taskId) {
 | 
			
		||||
		LambdaQueryWrapper<BgtProjectRecruit> wrapper = new LambdaQueryWrapper<>();
 | 
			
		||||
		wrapper.eq(BgtProjectRecruit::getTaskId, taskId);
 | 
			
		||||
		return baseMapper.selectList(wrapper).stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * LC-APP相关
 | 
			
		||||
	 * =================================================================================================================
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,9 @@ public class AnnexDTO {
 | 
			
		||||
	/** 用户类型 */
 | 
			
		||||
	@ApiModelProperty("用户类型")
 | 
			
		||||
	private String userType;
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("招工任务ID")
 | 
			
		||||
	private Long recruitId;
 | 
			
		||||
	/** 附件类型 */
 | 
			
		||||
	@ApiModelProperty("附件类型")
 | 
			
		||||
	private String annexType;
 | 
			
		||||
 | 
			
		||||
@ -19,6 +19,8 @@ public class AppTaskDetailRecruitVO {
 | 
			
		||||
	List<BgtProjectRecruitApplyVO> applyList;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	@ApiModelProperty("总数")
 | 
			
		||||
	private Integer total;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -11,6 +11,7 @@ import com.ruoyi.bgt.domain.BgtProjectRecruit;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.dto.BgtWageApplicationQueryDTO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtAttendanceCountVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO;
 | 
			
		||||
import com.ruoyi.bgt.domain.vo.BgtWageApplicationListVO;
 | 
			
		||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
 | 
			
		||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
 | 
			
		||||
@ -22,6 +23,7 @@ import com.ruoyi.common.enums.AuditStatus;
 | 
			
		||||
import com.ruoyi.common.enums.ProjectTaskStatus;
 | 
			
		||||
import com.ruoyi.common.enums.RecruitApplyStatus;
 | 
			
		||||
import com.ruoyi.common.util.DataUtil;
 | 
			
		||||
import com.ruoyi.common.utils.DateUtils;
 | 
			
		||||
import com.ruoyi.common.utils.PageUtils;
 | 
			
		||||
import com.ruoyi.common.utils.SecurityUtils;
 | 
			
		||||
import com.ruoyi.fbs.bo.FbsProjectTaskQueryBo;
 | 
			
		||||
@ -39,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.math.RoundingMode;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
@ -203,18 +206,33 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public AppTaskDetailAttendanceVO attendance(Long id) {
 | 
			
		||||
		FbsProjectTask task = getById(id);
 | 
			
		||||
		LocalDate taskBeginTime = DateUtils.str2Localdate(task.getTaskBeginTime(), DateUtils.YYYY_MM_DD);
 | 
			
		||||
		LocalDate taskEndTime = DateUtils.str2Localdate(task.getTaskEndTime(), DateUtils.YYYY_MM_DD);
 | 
			
		||||
		//考勤情况
 | 
			
		||||
		AppTaskDetailAttendanceVO appTaskDetailVO = new AppTaskDetailAttendanceVO();
 | 
			
		||||
		appTaskDetailVO.setId(id);
 | 
			
		||||
		LocalDate date = LocalDate.now();
 | 
			
		||||
		LocalDate startOfMonth = date.withDayOfMonth(1);
 | 
			
		||||
		List<BgtAttendanceCountVO> countVOS = attendanceService.countByTaskId(id, startOfMonth, date);
 | 
			
		||||
		if(taskEndTime!=null &&taskEndTime.isBefore(date)){
 | 
			
		||||
			date = taskEndTime;
 | 
			
		||||
		}
 | 
			
		||||
		LocalDate startTime = date.minusDays(7);
 | 
			
		||||
		if (taskBeginTime!=null &&taskBeginTime.isAfter(startTime)){
 | 
			
		||||
			startTime = taskBeginTime;
 | 
			
		||||
		}
 | 
			
		||||
		List<BgtAttendanceCountVO>
 | 
			
		||||
			countVOS = attendanceService.countByTaskId(id, startTime, date);
 | 
			
		||||
		if(CollectionUtil.isNotEmpty(countVOS)){
 | 
			
		||||
			BgtAttendanceCountVO vo = countVOS.get(0);
 | 
			
		||||
			appTaskDetailVO.setCountVOS(DataUtil.fillMissingDates(countVOS, startOfMonth, date));
 | 
			
		||||
			appTaskDetailVO.setCountVOS(DataUtil.fillMissingDates(countVOS, startTime, date));
 | 
			
		||||
			appTaskDetailVO.setTotalNum(vo.getTotalNum());
 | 
			
		||||
			appTaskDetailVO.setReportToDutyNum(vo.getReportToDutyNum());
 | 
			
		||||
			appTaskDetailVO.setReportToDutyRate(vo.getReportToDutyNum()/vo.getTotalNum()*100);
 | 
			
		||||
			if(vo.getTotalNum()!=0){
 | 
			
		||||
				int rate = new BigDecimal(vo.getReportToDutyNum()).divide(new BigDecimal(vo.getTotalNum()), 2, RoundingMode.HALF_UP)
 | 
			
		||||
					.multiply(new BigDecimal(100)).intValue();
 | 
			
		||||
				appTaskDetailVO.setReportToDutyRate(rate);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		return appTaskDetailVO;
 | 
			
		||||
	}
 | 
			
		||||
@ -261,7 +279,9 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
 | 
			
		||||
		BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO();
 | 
			
		||||
		bgtProjectRecruitApplyQueryDTO.setRecruitIds(recruitIds);
 | 
			
		||||
		bgtProjectRecruitApplyQueryDTO.setStatus(Collections.singletonList(RecruitApplyStatus.WORKING.getCode()));
 | 
			
		||||
		appTaskDetailVO.setApplyList(recruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO));
 | 
			
		||||
		List<BgtProjectRecruitApplyVO> vos = recruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO);
 | 
			
		||||
		appTaskDetailVO.setTotal(vos.size());
 | 
			
		||||
		appTaskDetailVO.setApplyList(vos.subList(0, Math.min(vos.size(), 3)));
 | 
			
		||||
		return appTaskDetailVO;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ 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.baomidou.mybatisplus.extension.toolkit.SqlHelper;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
 | 
			
		||||
@ -20,6 +21,7 @@ import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
 | 
			
		||||
import com.ruoyi.common.core.domain.entity.SysUser;
 | 
			
		||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
 | 
			
		||||
import com.ruoyi.common.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.enums.AuditStatus;
 | 
			
		||||
import com.ruoyi.common.utils.PageUtils;
 | 
			
		||||
import com.ruoyi.common.utils.SecurityUtils;
 | 
			
		||||
import com.ruoyi.fbs.domain.FbsProjectTask;
 | 
			
		||||
@ -28,6 +30,10 @@ import com.ruoyi.wgz.bo.WgzPayCalculationQueryBo;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzAppApplyForPayrollSettlementListReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.req.WgzApplyForPayrollSettlementAddReq;
 | 
			
		||||
import com.ruoyi.wgz.bo.res.WgzAppApplyForPayrollSettlementListRes;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzMessage;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzPayCalculation;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzPayCalculationFiles;
 | 
			
		||||
import com.ruoyi.wgz.domain.WgzUser;
 | 
			
		||||
import com.ruoyi.wgz.domain.*;
 | 
			
		||||
import com.ruoyi.wgz.mapper.WgzPayCalculationMapper;
 | 
			
		||||
import com.ruoyi.wgz.service.*;
 | 
			
		||||
@ -45,6 +51,9 @@ import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
 | 
			
		||||
 | 
			
		||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
 | 
			
		||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.SMALL_SYSTEM;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 工资结算Service业务层处理
 | 
			
		||||
 *
 | 
			
		||||
@ -72,6 +81,9 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzAttendanceService attendanceService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService wgzMessageService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService iWgzMessageService;
 | 
			
		||||
 | 
			
		||||
@ -251,6 +263,24 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
 | 
			
		||||
	public Boolean appUpdate(BgtPayCalculationUpdateDTO dto) {
 | 
			
		||||
		WgzPayCalculation payCalculation = BeanUtil.copyProperties(dto, WgzPayCalculation.class);
 | 
			
		||||
		payCalculation.setAuditorTime(LocalDateTime.now());
 | 
			
		||||
 | 
			
		||||
		//发消息
 | 
			
		||||
		//发消息
 | 
			
		||||
		HashMap<String, String> mp = new HashMap<>();
 | 
			
		||||
		mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName());
 | 
			
		||||
		mp.put("auditor",SecurityUtils.getUsername());
 | 
			
		||||
		Map<String, String> map = bgtMessage(mp, BGT_TYPE_PAY, AuditStatus.PASS.getCode().equals(dto.getAuditorType()));
 | 
			
		||||
		WgzMessage wgzMessage = new WgzMessage()
 | 
			
		||||
			.setSenderType(USERTYPE_BGT)
 | 
			
		||||
			.setRecipientType(USERTYPE_WGZ)
 | 
			
		||||
			.setRecipientId(payCalculation.getUserId())
 | 
			
		||||
			.setHeadline(map.get(HEADLINE))
 | 
			
		||||
			.setSubheading(map.get(SUBHEADING))
 | 
			
		||||
			.setTableId(payCalculation.getId())
 | 
			
		||||
			.setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName())
 | 
			
		||||
			.setMessageLargeType(LARGE_SALARY)
 | 
			
		||||
			.setMessageSmallType(SMALL_SYSTEM);
 | 
			
		||||
		wgzMessageService.sendAMessage(wgzMessage);
 | 
			
		||||
		return updateById(payCalculation);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ 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.baomidou.mybatisplus.extension.toolkit.SqlHelper;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtMessage;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
 | 
			
		||||
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
 | 
			
		||||
@ -60,6 +61,9 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzAttendanceService iWgzAttendanceService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService wgzMessageService;
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private IWgzMessageService iWgzMessageService;
 | 
			
		||||
 | 
			
		||||
@ -233,7 +237,27 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	@Transactional(rollbackFor = Exception.class)
 | 
			
		||||
	public Boolean appUpdate(BgtReissueacardUpdateDTO dto) {
 | 
			
		||||
		return updateById(BeanUtil.copyProperties(dto,WgzReissueacard.class));
 | 
			
		||||
		WgzReissueacard byId = getById(dto.getId());
 | 
			
		||||
		BeanUtil.copyProperties(dto, byId);
 | 
			
		||||
		boolean b = updateById(byId);
 | 
			
		||||
		//发消息
 | 
			
		||||
		HashMap<String, String> mp = new HashMap<>();
 | 
			
		||||
		mp.put("projectName",iBgtProjectRecruitService.getById(byId.getRecruitId()).getRecruitName());
 | 
			
		||||
		mp.put("auditor",SecurityUtils.getUsername());
 | 
			
		||||
		Map<String, String> map = bgtMessage(mp, BGT_TYPE_MAKE_UP, true);
 | 
			
		||||
		WgzMessage wgzMessage = new WgzMessage()
 | 
			
		||||
			.setSenderType(USERTYPE_BGT)
 | 
			
		||||
			.setRecipientType(USERTYPE_WGZ)
 | 
			
		||||
			.setRecipientId(byId.getUserId())
 | 
			
		||||
			.setHeadline(map.get(HEADLINE))
 | 
			
		||||
			.setSubheading(map.get(SUBHEADING))
 | 
			
		||||
			.setTableId(byId.getId())
 | 
			
		||||
			.setTableName(SqlHelper.table(WgzReissueacard.class).getTableName())
 | 
			
		||||
			.setMessageLargeType(LARGE_OTHER)
 | 
			
		||||
			.setMessageSmallType(SMALL_CARD);
 | 
			
		||||
		wgzMessageService.sendAMessage(wgzMessage);
 | 
			
		||||
		return b;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user