This commit is contained in:
zt
2025-04-29 17:45:42 +08:00
parent 2c15d26bcc
commit c982cbaa75
32 changed files with 936 additions and 370 deletions

View File

@ -17,12 +17,12 @@ import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO;
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
import com.ruoyi.bgt.mapper.BgtMessageMapper;
import com.ruoyi.bgt.service.IBgtMessageService;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
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.core.redis.RedisCache;
import com.ruoyi.common.enums.BgtMessageType;
import com.ruoyi.common.util.MessageUtil;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.domain.FbsProjectTask;
@ -32,7 +32,10 @@ import com.ruoyi.fbs.service.IFbsProjectTaskService;
import com.ruoyi.wgz.domain.WgzDailyClock;
import com.ruoyi.wgz.domain.WgzLeave;
import com.ruoyi.wgz.domain.WgzReissueacard;
import com.ruoyi.wgz.service.*;
import com.ruoyi.wgz.service.IWgzDailyClockService;
import com.ruoyi.wgz.service.IWgzLeaveService;
import com.ruoyi.wgz.service.IWgzReissueacardService;
import com.ruoyi.wgz.service.IWgzUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@ -59,15 +62,7 @@ import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED
public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, BgtMessage> implements IBgtMessageService {
@Autowired
@Lazy
private IBgtProjectRecruitApplyService recruitApplyService;
@Autowired
private IBgtProjectRecruitService recruitService;
@Autowired
@Lazy
private IWgzPayCalculationService payCalculationService;
private RedisCache redisCache;
@Autowired
@Lazy
@ -170,11 +165,14 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
@Override
@Transactional
public Boolean sendAMessage(BgtMessage bo) {
return save(bo);
boolean save = save(bo);
MessageUtil.saveMessagePush(bo.getRecipientType(), bo.getRecipientId(), bo.getMessageLargeType(), bo.getIsOperation());
return save;
}
@Override
public BgtMessageCountVO countUnread() {
// Object cacheObject = redisCache.getCacheObject(REIDS_KEY + SecurityUtils.getAppUserId());
List<BgtMessage> bgtMessages = baseMapper.selectList(Wrappers.<BgtMessage>lambdaQuery()
.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
.eq(BgtMessage::getReadStatus, "0"));
@ -189,6 +187,7 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
.eq(BgtMessage::getIsOperation, OPERATION_NEED));
bgtMessageCountVO.setHandleMessageCount(handle);
redisCache.setCacheObject(REDIS_KEY+SecurityUtils.getAppUserId(), bgtMessageCountVO);
return bgtMessageCountVO;
}
@ -283,6 +282,7 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
wrapper.eq(BgtMessage::getTableName, tableName);
wrapper.set(BgtMessage::getIsOperation, OPERATION_ALREADY);
update(wrapper);
MessageUtil.operationMessagePush(recipientType, recipientId, 1);
}

View File

@ -611,7 +611,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
.setRecipientId(vo.getUserId())
.setHeadline(map.get(HEADLINE))
.setSubheading(map.get(SUBHEADING))
.setTableId(vo.getRecruitId())
.setTableId(vo.getId())
.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName())
.setMessageLargeType(LARGE_OTHER)
.setMessageSmallType(SMALL_EXIT);
@ -741,7 +741,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
throw new RuntimeException("修改招工申请信息失败!");
}
//3-2、修改消息
boolean b = iWgzMessageService.updateById(new WgzMessage().setId(req.getMessageId()).setIsOperation("2"));
boolean b = iWgzMessageService.updateOperationStatus(req.getMessageId());
if (!b) {
throw new RuntimeException("修改消息失败!");
}

View File

@ -9,17 +9,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.ruoyi.bgt.bo.BgtProjectTaskProgressQueryBo;
import com.ruoyi.bgt.domain.BgtMessage;
import com.ruoyi.bgt.domain.BgtProjectRecruit;
import com.ruoyi.bgt.domain.BgtProjectTaskProgress;
import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO;
import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO;
import com.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper;
import com.ruoyi.bgt.service.IBgtMessageService;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
import com.ruoyi.bgt.service.IBgtProjectTaskProgressService;
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.enums.RecruitStatus;
import com.ruoyi.common.exception.BaseException;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
@ -55,7 +57,7 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
@Autowired
private IBgtMessageService bgtMessageService;
@Autowired
private IBgtProjectRecruitApplyService recruitApplyService;
private IBgtProjectRecruitService recruitService;
@Override
public BgtProjectTaskProgress queryById(Long id){
@ -159,6 +161,16 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec
if(lastProgress>=entity.getProgress()){
throw new BaseException("当前进度不能小于等于上一个进度");
}
if(entity.getProgress()==100){
List<BgtProjectRecruit> recruitList = recruitService.list(Wrappers.<BgtProjectRecruit>lambdaQuery()
.eq(BgtProjectRecruit::getTaskId, entity.getTaskId())
.ne(BgtProjectRecruit::getStatus, RecruitStatus.OVERDUE.getCode())
);
if(CollectionUtil.isNotEmpty(recruitList)){
throw new BaseException("招工结束前不能完成任务");
}
}
}

View File

@ -7,6 +7,7 @@ import java.util.Map;
public class BgtMessageConstant {
// 公共常量
public static final String REDIS_KEY = "messageCount:bgt:";
public static final String BGT_LARGE_TASK = "1"; //大类型-任务
public static final String BGT_LARGE_SETTLEMENT = "2"; //大类型-结算

View File

@ -10,6 +10,7 @@ import static com.ruoyi.common.constants.BgtMessageConstant.SUBHEADING;
public class FbsMessageConstant {
// 公共常量
public static final String REDIS_KEY = "messageCount:fbs:";
public static final String FBS_LARGE_TASK = "1"; //大类型-项目
public static final String FBS_LARGE_SETTLEMENT = "2"; //大类型-结算

View File

@ -3,12 +3,14 @@ package com.ruoyi.common.constants;
import java.util.Map;
public class WgzAndBgtMessageConstant {
public static final String REDIS_KEY = "messageCount:wgz:";
// 公共常量
public static final String USERTYPE_SYSTEM = "0"; //系统
public static final String USERTYPE_WGZ = "1"; //务工者
public static final String USERTYPE_BGT = "2"; //包工头
public static final String USERTYPE_FBS = "3"; //分包商
public static final String USERTYPE_ZBF = "4"; //分包商
public static final String USERTYPE_ZBF = "4"; //总包方
//系统ID
public static final Long SYSTEM_ID = 0L;

View File

@ -11,6 +11,8 @@ import static com.ruoyi.common.constants.BgtMessageConstant.SUBHEADING;
public class ZbfMessageConstant {
// 公共常量
public static final String REDIS_KEY = "messageCount:zbf:";
public static final String ZBF_LARGE_TASK = "1"; //大类型-任务
public static final String ZBF_LARGE_SETTLEMENT = "2"; //大类型-结算
public static final String ZBF_LARGE_OTHER = "3"; //大类型-其它

View File

@ -64,4 +64,6 @@ public class CompanyAuthenticateDTO {
@ApiModelProperty("资质与荣誉")
private String url;
@ApiModelProperty("备注")
private String remark;
}

View File

@ -0,0 +1,297 @@
package com.ruoyi.common.util;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
import com.ruoyi.common.constants.BgtMessageConstant;
import com.ruoyi.common.constants.FbsMessageConstant;
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
import com.ruoyi.common.constants.ZbfMessageConstant;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.fbs.domain.vo.FbsMessageCountVO;
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
import com.ruoyi.zbf.domain.vo.ZbfMessageCountVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import static com.ruoyi.common.constants.BgtMessageConstant.*;
import static com.ruoyi.common.constants.FbsMessageConstant.*;
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED;
import static com.ruoyi.common.constants.ZbfMessageConstant.*;
public class MessageUtil {
//获取日志
public static final Logger log = LoggerFactory.getLogger(MessageUtil.class);
/**
* 保存消息是像客户端发送消息
*
* @param recipientType 用户类型
* @param recipientId 用户ID
* @param messageLargeType 消息大类型
* @param isOperation 操作类型
*/
public static void saveMessagePush(String recipientType, Long recipientId, String messageLargeType, String isOperation) {
try {
String messageKey = "";
String data = "";
String redisKey = "";
Object cacheObject;
RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
switch (recipientType) {
case WgzAndBgtMessageConstant.USERTYPE_WGZ:
redisKey = WgzAndBgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.WGZ_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
WgzAppMessageTypeStatisticsRes res = (WgzAppMessageTypeStatisticsRes) cacheObject;
Map<String, Integer> mp = res.getMp();
if ("0".equals(messageLargeType)) {
mp.put("0", mp.get("0") + 1);
} else if ("1".equals(messageLargeType)) {
mp.put("1", mp.get("1") + 1);
} else if ("2".equals(messageLargeType)) {
mp.put("2", mp.get("2") + 1);
}
if (OPERATION_NEED.equals(isOperation)) {
mp.put("3", mp.get("3") + 1);
}
redisCache.setCacheObject(redisKey, res);
data = JSONUtil.toJsonStr(res);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_BGT:
redisKey = BgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.BGT_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
BgtMessageCountVO bgtMessageCountVO = (BgtMessageCountVO) cacheObject;
if (BGT_LARGE_TASK.equals(messageLargeType)) {
bgtMessageCountVO.setTaskMessageCount(bgtMessageCountVO.getTaskMessageCount() + 1);
} else if (BGT_LARGE_SETTLEMENT.equals(messageLargeType)) {
bgtMessageCountVO.setSettlementMessageCount(bgtMessageCountVO.getSettlementMessageCount() + 1);
} else if (BGT_LARGE_OTHER.equals(messageLargeType)) {
bgtMessageCountVO.setOtherMessageCount(bgtMessageCountVO.getOtherMessageCount() + 1);
}
if (OPERATION_NEED.equals(isOperation)) {
bgtMessageCountVO.setHandleMessageCount(bgtMessageCountVO.getHandleMessageCount() + 1);
}
redisCache.setCacheObject(redisKey, bgtMessageCountVO);
data = JSONUtil.toJsonStr(bgtMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_FBS:
redisKey = FbsMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.FBS_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
FbsMessageCountVO fbsMessageCountVO = (FbsMessageCountVO) cacheObject;
if (FBS_LARGE_TASK.equals(messageLargeType)) {
fbsMessageCountVO.setTaskMessageCount(fbsMessageCountVO.getTaskMessageCount() + 1);
} else if (FBS_LARGE_SETTLEMENT.equals(messageLargeType)) {
fbsMessageCountVO.setSettlementMessageCount(fbsMessageCountVO.getSettlementMessageCount() + 1);
} else if (FBS_LARGE_OTHER.equals(messageLargeType)) {
fbsMessageCountVO.setOtherMessageCount(fbsMessageCountVO.getOtherMessageCount() + 1);
}
if (OPERATION_NEED.equals(isOperation)) {
fbsMessageCountVO.setHandleMessageCount(fbsMessageCountVO.getHandleMessageCount() + 1);
}
redisCache.setCacheObject(redisKey, fbsMessageCountVO);
data = JSONUtil.toJsonStr(fbsMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_ZBF:
redisKey = ZbfMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.ZBF_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
ZbfMessageCountVO zbfMessageCountVO = (ZbfMessageCountVO) cacheObject;
if (ZBF_LARGE_TASK.equals(messageLargeType)) {
zbfMessageCountVO.setTaskMessageCount(zbfMessageCountVO.getTaskMessageCount() + 1);
} else if (ZBF_LARGE_SETTLEMENT.equals(messageLargeType)) {
zbfMessageCountVO.setSettlementMessageCount(zbfMessageCountVO.getSettlementMessageCount() + 1);
} else if (ZBF_LARGE_OTHER.equals(messageLargeType)) {
zbfMessageCountVO.setOtherMessageCount(zbfMessageCountVO.getOtherMessageCount() + 1);
}
if (OPERATION_NEED.equals(isOperation)) {
zbfMessageCountVO.setHandleMessageCount(zbfMessageCountVO.getHandleMessageCount() + 1);
}
redisCache.setCacheObject(redisKey, zbfMessageCountVO);
data = JSONUtil.toJsonStr(zbfMessageCountVO);
}
break;
default:
break;
}
if(StrUtil.isNotBlank(data)){
SseUtil.pushMessage(messageKey, data);
}
} catch (Exception e) {
log.error("sse推送异常", e);
}
}
public static void readMessagePush(String recipientType, Long recipientId, String messageLargeType, String readStatus) {
try {
String messageKey = "";
String data = "";
String redisKey;
Object cacheObject;
RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
switch (recipientType) {
case WgzAndBgtMessageConstant.USERTYPE_WGZ:
redisKey = WgzAndBgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.WGZ_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null && "0".equals(readStatus)) {
WgzAppMessageTypeStatisticsRes res = (WgzAppMessageTypeStatisticsRes) cacheObject;
Map<String, Integer> mp = res.getMp();
if ("0".equals(messageLargeType)) {
mp.put("0", mp.get("0") - 1);
} else if ("1".equals(messageLargeType)) {
mp.put("1", mp.get("1") - 1);
} else if ("2".equals(messageLargeType)) {
mp.put("2", mp.get("2") - 1);
}
redisCache.setCacheObject(redisKey, res);
data = JSONUtil.toJsonStr(res);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_BGT:
redisKey = BgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.BGT_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null && "0".equals(readStatus)) {
BgtMessageCountVO bgtMessageCountVO = (BgtMessageCountVO) cacheObject;
if (BGT_LARGE_TASK.equals(messageLargeType)) {
bgtMessageCountVO.setTaskMessageCount(bgtMessageCountVO.getTaskMessageCount() - 1);
} else if (BGT_LARGE_SETTLEMENT.equals(messageLargeType)) {
bgtMessageCountVO.setSettlementMessageCount(bgtMessageCountVO.getSettlementMessageCount() - 1);
} else if (BGT_LARGE_OTHER.equals(messageLargeType)) {
bgtMessageCountVO.setOtherMessageCount(bgtMessageCountVO.getOtherMessageCount() - 1);
}
redisCache.setCacheObject(redisKey, bgtMessageCountVO);
data = JSONUtil.toJsonStr(bgtMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_FBS:
redisKey = FbsMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.FBS_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null && "0".equals(readStatus)) {
FbsMessageCountVO fbsMessageCountVO = (FbsMessageCountVO) cacheObject;
if (FBS_LARGE_TASK.equals(messageLargeType)) {
fbsMessageCountVO.setTaskMessageCount(fbsMessageCountVO.getTaskMessageCount() - 1);
} else if (FBS_LARGE_SETTLEMENT.equals(messageLargeType)) {
fbsMessageCountVO.setSettlementMessageCount(fbsMessageCountVO.getSettlementMessageCount() - 1);
} else if (FBS_LARGE_OTHER.equals(messageLargeType)) {
fbsMessageCountVO.setOtherMessageCount(fbsMessageCountVO.getOtherMessageCount() - 1);
}
redisCache.setCacheObject(redisKey, fbsMessageCountVO);
data = JSONUtil.toJsonStr(fbsMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_ZBF:
redisKey = ZbfMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.ZBF_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null && "0".equals(readStatus)) {
ZbfMessageCountVO zbfMessageCountVO = (ZbfMessageCountVO) cacheObject;
if (ZBF_LARGE_TASK.equals(messageLargeType)) {
zbfMessageCountVO.setTaskMessageCount(zbfMessageCountVO.getTaskMessageCount() - 1);
} else if (ZBF_LARGE_SETTLEMENT.equals(messageLargeType)) {
zbfMessageCountVO.setSettlementMessageCount(zbfMessageCountVO.getSettlementMessageCount() - 1);
} else if (ZBF_LARGE_OTHER.equals(messageLargeType)) {
zbfMessageCountVO.setOtherMessageCount(zbfMessageCountVO.getOtherMessageCount() - 1);
}
redisCache.setCacheObject(redisKey, zbfMessageCountVO);
data = JSONUtil.toJsonStr(zbfMessageCountVO);
}
break;
default:
break;
}
if(StrUtil.isNotBlank(data)){
SseUtil.pushMessage(messageKey, data);
}
} catch (Exception e) {
log.error("sse推送异常", e);
}
}
public static void operationMessagePush(String recipientType, Long recipientId, Integer num) {
try {
String messageKey = "";
String data = "";
String redisKey;
Object cacheObject;
RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
switch (recipientType) {
case WgzAndBgtMessageConstant.USERTYPE_WGZ:
redisKey = WgzAndBgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.WGZ_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
WgzAppMessageTypeStatisticsRes res = (WgzAppMessageTypeStatisticsRes) cacheObject;
Map<String, Integer> mp = res.getMp();
mp.put("3", mp.get("3") - num);
redisCache.setCacheObject(redisKey, res);
data = JSONUtil.toJsonStr(res);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_BGT:
redisKey = BgtMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.BGT_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
BgtMessageCountVO bgtMessageCountVO = (BgtMessageCountVO) cacheObject;
bgtMessageCountVO.setHandleMessageCount(bgtMessageCountVO.getHandleMessageCount() - num);
redisCache.setCacheObject(redisKey, bgtMessageCountVO);
data = JSONUtil.toJsonStr(bgtMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_FBS:
redisKey = FbsMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.FBS_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
FbsMessageCountVO fbsMessageCountVO = (FbsMessageCountVO) cacheObject;
fbsMessageCountVO.setHandleMessageCount(fbsMessageCountVO.getHandleMessageCount() - num);
redisCache.setCacheObject(redisKey, fbsMessageCountVO);
data = JSONUtil.toJsonStr(fbsMessageCountVO);
}
break;
case WgzAndBgtMessageConstant.USERTYPE_ZBF:
redisKey = ZbfMessageConstant.REDIS_KEY + recipientId;
messageKey = SseUtil.ZBF_PREFIX + recipientId;
cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
ZbfMessageCountVO zbfMessageCountVO = (ZbfMessageCountVO) cacheObject;
zbfMessageCountVO.setHandleMessageCount(zbfMessageCountVO.getHandleMessageCount() - num);
redisCache.setCacheObject(redisKey, zbfMessageCountVO);
data = JSONUtil.toJsonStr(zbfMessageCountVO);
}
break;
default:
break;
}
if(StrUtil.isNotBlank(data)){
SseUtil.pushMessage(messageKey, data);
}
} catch (Exception e) {
log.error("sse推送异常", e);
}
}
}

View File

@ -0,0 +1,75 @@
package com.ruoyi.common.util;
import cn.hutool.json.JSONUtil;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.spring.SpringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class SseUtil {
//日志
private static final Logger log = LoggerFactory.getLogger(SseUtil.class);
private final static Map<String, SseEmitter> emitterMap = new ConcurrentHashMap<>();
public static final String WGZ_PREFIX = "wgz-";
public static final String BGT_PREFIX = "bgt-";
public static final String FBS_PREFIX = "fbs-";
public static final String ZBF_PREFIX = "zbf-";
public static SseEmitter subscribe(String userId,String prefix) {
// Spring Boot 2.4.7中SseEmitter构造函数支持超时时间单位毫秒
SseEmitter emitter = new SseEmitter(1 * 60 * 1000L); // 30分钟超时
// 存储emitter并设置回调2.4.7中回调机制与主流版本一致)
String key = prefix + "-" +userId;
emitterMap.put(key, emitter);
// 利用闭包特性捕获userId和prefix
emitter.onCompletion(() -> emitterMap.remove(key));
emitter.onTimeout(() -> {
emitter.complete();
emitterMap.remove(key);
log.info("用户{}连接已超时", key);
});
emitter.onError(e -> emitterMap.remove(key));
String redisKey = "messageCount:"+prefix+":"+userId;
Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(redisKey);
// String name = cacheObj == null ? "connect" + userId : "messageCount";
String data = cacheObj == null ? "连接已建立用户ID" + userId : JSONUtil.toJsonStr(cacheObj);
// 发送初始连接确认
try {
emitter.send(SseEmitter.event()
// .id("init")
// .name(name)
.data(data)
);
} catch (IOException e) {
emitter.completeWithError(e);
}
return emitter;
}
public static void pushMessage(String key,String data){
SseEmitter emitter = emitterMap.get(key);
if (emitter != null) {
try {
// 发送自定义事件(客户端通过事件名监听)
emitter.send(SseEmitter.event()
// .id(String.valueOf(System.currentTimeMillis()))
// .name("messageCount")
.data(data)
);
} catch (IOException e) {
emitter.completeWithError(e);
emitterMap.remove(key); // 异常时清理无效连接
}
}
}
}

View File

@ -46,4 +46,6 @@ public class FbsProjectDetailVO {
@ApiModelProperty("标段列表")
private List<FbsProjectSectionListVO> sectionList;
@ApiModelProperty("备注")
private String remark;
}

View File

@ -22,6 +22,11 @@ public class FbsProjectSectionListVO {
@ApiModelProperty("项目地址")
private String projectAddress;
@ApiModelProperty("标段描述")
private String sectionDescribe;
@ApiModelProperty("分包列表")
private List<FbsProjectSubcontractingListVO> subList;

View File

@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.constants.FbsMessageConstant;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.BgtMessageType;
import com.ruoyi.common.util.MessageUtil;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.fbs.bo.FbsMessageQueryBo;
@ -20,6 +23,7 @@ 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalTime;
@ -41,6 +45,9 @@ import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED
@Service
public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, FbsMessage> implements IFbsMessageService {
@Autowired
private RedisCache redisCache;
@Override
public FbsMessage queryById(Long id){
return getById(id);
@ -122,6 +129,8 @@ public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, Fbs
.eq(FbsMessage::getRecipientId, SecurityUtils.getAppUserId())
.eq(FbsMessage::getIsOperation, OPERATION_NEED));
fbsMessageCountVO.setHandleMessageCount(handle);
redisCache.setCacheObject(FbsMessageConstant.REDIS_KEY+SecurityUtils.getAppUserId(), fbsMessageCountVO);
return fbsMessageCountVO;
}
@ -208,7 +217,9 @@ public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, Fbs
@Override
public Boolean sendAMessage(FbsMessage bo) {
return save(bo);
boolean save = save(bo);
MessageUtil.saveMessagePush(bo.getRecipientType(), bo.getRecipientId(), bo.getMessageLargeType(), bo.getIsOperation());
return save;
}
@Override
@ -222,6 +233,8 @@ public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, Fbs
wrapper.eq(FbsMessage::getTableName, tableName);
wrapper.set(FbsMessage::getIsOperation, OPERATION_ALREADY);
update(wrapper);
MessageUtil.operationMessagePush(recipientType, recipientId, 1);
}
@Override
@ -233,5 +246,6 @@ public class FbsMessageServiceImpl extends ServicePlusImpl<FbsMessageMapper, Fbs
wrapper.eq(FbsMessage::getTableName, tableName);
wrapper.set(FbsMessage::getIsOperation, OPERATION_ALREADY);
update(wrapper);
MessageUtil.operationMessagePush(recipientType, recipientId, tableIds.size());
}
}

View File

@ -29,6 +29,7 @@ import com.ruoyi.common.enums.RecruitApplyStatus;
import com.ruoyi.common.enums.TaskApplyStatus;
import com.ruoyi.common.exception.BaseException;
import com.ruoyi.common.util.DataUtil;
import com.ruoyi.common.util.ValidUtil;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
@ -168,6 +169,9 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
if( fbsUser.getCompanyId()==null){
throw new BaseException("尚未企业认证");
}
if (!ValidUtil.isValidChineseMobile(entity.getTaskContactPhone())) {
throw new BaseException("手机号格式不正确");
}
}
@Override

View File

@ -1,15 +1,14 @@
package com.ruoyi.wgz.service;
import com.ruoyi.wgz.bo.req.WgzAppConfirmRegistrationReq;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
import com.ruoyi.wgz.bo.req.WgzAppReadUnreadReq;
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.validation.annotation.Validated;
import java.time.LocalDate;
@ -98,4 +97,9 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
* 修改已读未读状态
*/
Boolean userReadUnread(@Validated WgzAppReadUnreadReq req);
/**
* 修改操作状态
*/
Boolean updateOperationStatus(Long id);
}

View File

@ -153,4 +153,9 @@ public interface IWgzPayCalculationService extends IServicePlus<WgzPayCalculatio
* 获取任务下已审核通过的数据
*/
List<WgzPayCalculation> getPassListByTaskIds(List<Long> taskIds);
/**
* 总收入
*/
BigDecimal grossIncome();
}

View File

@ -8,10 +8,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.bgt.domain.BgtProjectRecruit;
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
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.core.redis.RedisCache;
import com.ruoyi.common.service.IAnnexService;
import com.ruoyi.common.util.MessageUtil;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysDictTypeService;
@ -69,6 +72,8 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
@Autowired
private IBgtProjectRecruitService iBgtProjectRecruitService;
@Autowired
private RedisCache redisCache;
@Override
public WgzMessage queryById(Long id){
@ -143,7 +148,9 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
@Override
public Boolean sendAMessage(WgzMessage bo) {
return save(bo);
boolean save = save(bo);
MessageUtil.saveMessagePush(bo.getRecipientType(), bo.getRecipientId(), bo.getMessageLargeType(), bo.getIsOperation());
return save;
}
@Override
@ -192,7 +199,9 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
);
mp.put("3",daiBanCount);
}
return res.setMp(mp);
res.setMp(mp);
redisCache.setCacheObject(WgzAndBgtMessageConstant.REDIS_KEY+SecurityUtils.getAppUserId(), res);
return res;
}
@Override
@ -256,10 +265,25 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
@Override
public Boolean userReadUnread(WgzAppReadUnreadReq req) {
WgzMessage wgzMessage = new WgzMessage().setId(req.getMessageId()).setReadStatus("1");
return baseMapper.updateById(wgzMessage) > 0;
WgzMessage wgzMessage = baseMapper.selectById(req.getMessageId());
boolean b = true;
if("0".equals(wgzMessage.getReadStatus())){
MessageUtil.readMessagePush(wgzMessage.getRecipientType(), wgzMessage.getRecipientId(), wgzMessage.getMessageLargeType(), wgzMessage.getReadStatus());
wgzMessage.setReadStatus("1");
b = baseMapper.updateById(wgzMessage) > 0;
}
return b;
}
@Override
public Boolean updateOperationStatus(Long id) {
WgzMessage wgzMessage = baseMapper.selectById(id);
MessageUtil.operationMessagePush(wgzMessage.getRecipientType(), wgzMessage.getRecipientId(), 1);
wgzMessage.setIsOperation("2");
return baseMapper.updateById(wgzMessage) > 0;
}
/**
* 判断招工是否已招满或已过期

View File

@ -701,4 +701,19 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
.eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode());
return list(wrapper);
}
@Override
public BigDecimal grossIncome() {
LambdaQueryWrapper<WgzPayCalculation> wrapper = new LambdaQueryWrapper<>();
wrapper.in(WgzPayCalculation::getUserId, SecurityUtils.getAppUserId())
.eq(WgzPayCalculation::getAuditorType, AuditStatus.PASS.getCode());
List<WgzPayCalculation> list = list(wrapper);
BigDecimal total = BigDecimal.ZERO;
for (WgzPayCalculation wgzPayCalculation : list) {
//金额*天数=实际工资
total = total.add(wgzPayCalculation.getRecruitAmount().multiply(new BigDecimal(wgzPayCalculation.getNum())));
}
return total;
}
}

View File

@ -16,4 +16,7 @@ public class ZbfSubSwitchListDTO {
@ApiModelProperty("总包方用户")
private Long zbfUserId;
@ApiModelProperty("项目ID")
private Long projectId;
}

View File

@ -19,6 +19,9 @@ public class ZbfProjectSectionListVO {
@ApiModelProperty("标段名称")
private String sectionName;
@ApiModelProperty("标段描述")
private String sectionDescribe;
@ApiModelProperty("项目地址")
private String projectAddress;

View File

@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.constants.ZbfMessageConstant;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.BgtMessageType;
import com.ruoyi.common.util.MessageUtil;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.zbf.bo.ZbfMessageQueryBo;
@ -20,6 +23,7 @@ import com.ruoyi.zbf.domain.vo.ZbfMessageDetailVO;
import com.ruoyi.zbf.domain.vo.ZbfMessageVO;
import com.ruoyi.zbf.mapper.ZbfMessageMapper;
import com.ruoyi.zbf.service.IZbfMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalTime;
@ -40,6 +44,8 @@ import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.OPERATION_NEED
@Service
public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, ZbfMessage> implements IZbfMessageService {
@Autowired
private RedisCache redisCache;
@Override
public ZbfMessage queryById(Long id){
return getById(id);
@ -107,7 +113,9 @@ public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, Zbf
@Override
public Boolean sendAMessage(ZbfMessage bo) {
return save(bo);
boolean save = save(bo);
MessageUtil.saveMessagePush(bo.getRecipientType(), bo.getRecipientId(), bo.getMessageLargeType(), bo.getIsOperation());
return save;
}
@Override
@ -121,6 +129,7 @@ public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, Zbf
wrapper.eq(ZbfMessage::getTableName, tableName);
wrapper.set(ZbfMessage::getIsOperation, OPERATION_ALREADY);
update(wrapper);
MessageUtil.operationMessagePush(recipientType, recipientId, 1);
}
@Override
@ -132,6 +141,7 @@ public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, Zbf
wrapper.eq(ZbfMessage::getTableName, tableName);
wrapper.set(ZbfMessage::getIsOperation, OPERATION_ALREADY);
update(wrapper);
MessageUtil.operationMessagePush(recipientType, recipientId, tableIds.size());
}
@Override
@ -150,6 +160,7 @@ public class ZbfMessageServiceImpl extends ServicePlusImpl<ZbfMessageMapper, Zbf
.eq(ZbfMessage::getRecipientId, SecurityUtils.getAppUserId())
.eq(ZbfMessage::getIsOperation, OPERATION_NEED));
zbfMessageCountVO.setHandleMessageCount(handle);
redisCache.setCacheObject(ZbfMessageConstant.REDIS_KEY+SecurityUtils.getAppUserId(), zbfMessageCountVO);
return zbfMessageCountVO;
}

View File

@ -204,9 +204,6 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
}
subListVO.add(fbsProjectSubcontractingListVO);
}
if (CollectionUtil.isEmpty(subListVO)) {
continue;
}
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
fbsProjectSectionListVO.setSubList(subListVO);
@ -363,9 +360,6 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
}
subListVO.add(fbsProjectSubcontractingListVO);
}
if (CollectionUtil.isEmpty(subListVO)) {
continue;
}
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
fbsProjectSectionListVO.setSubList(subListVO);
@ -543,15 +537,25 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
public TableDataInfo<FbsProgressListVO> fbsProgressList(FbsProgressListDTO dto) {
Page<FbsProgressListVO> fbsProgressListVOPage = new Page<>();
//查询所有创建的任务
List<FbsProjectTask> taskList = fbsProjectTaskService.list(Wrappers.<FbsProjectTask>lambdaQuery()
LambdaQueryWrapper<FbsProjectTask> wrapper = Wrappers.<FbsProjectTask>lambdaQuery()
.eq(FbsProjectTask::getCreateId, SecurityUtils.getAppUserId())
.eq(FbsProjectTask::getProjectId, dto.getProjectId())
);
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
.orderByDesc(FbsProjectTask::getId);
Page<FbsProjectTask> fbsProjectTaskPage = fbsProjectTaskService.getBaseMapper().selectPage(PageUtils.buildPage(), wrapper);
List<Long> taskIds = fbsProjectTaskPage.getRecords().stream().map(FbsProjectTask::getId).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(taskIds)) {
TableDataInfo<BgtProjectTaskProgress> progressByTaskIds = bgtProjectTaskProgressService.getProgressByTaskIds(dto.getPageSize(), dto.getPageNum(), taskIds);
fbsProgressListVOPage.setTotal(progressByTaskIds.getTotal());
fbsProgressListVOPage.setRecords(BeanUtil.copyToList(progressByTaskIds.getRows(), FbsProgressListVO.class));
List<BgtProjectTaskProgress> progressByTaskIds = bgtProjectTaskProgressService.getProgressByTaskIds(taskIds);
Map<Long, Integer> map = progressByTaskIds.stream().collect(Collectors.toMap(BgtProjectTaskProgress::getTaskId, BgtProjectTaskProgress::getProgress));
ArrayList<FbsProgressListVO> fbsProgressListVOS = new ArrayList<>();
for (FbsProjectTask fbsProjectTask : fbsProjectTaskPage.getRecords()) {
FbsProgressListVO fbsProgressListVO = new FbsProgressListVO();
fbsProgressListVO.setId(fbsProjectTask.getId());
fbsProgressListVO.setTaskName(fbsProjectTask.getTaskName());
fbsProgressListVO.setProgress(map.get(fbsProjectTask.getId())==null?0:map.get(fbsProjectTask.getId()));
fbsProgressListVOS.add(fbsProgressListVO);
}
fbsProgressListVOPage.setTotal(fbsProjectTaskPage.getTotal());
fbsProgressListVOPage.setRecords(fbsProgressListVOS);
}
return PageUtils.buildDataInfo(fbsProgressListVOPage);
}
@ -586,8 +590,9 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
//已支付金额
vo.setPayAmount(BigDecimal.ZERO);
if (CollectionUtil.isNotEmpty(subIds)) {
List<BgtWageApplication> payList = bgtWageApplicationService.getPassListByTaskIds(subIds);
if (CollectionUtil.isNotEmpty(taskList)) {
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
List<BgtWageApplication> payList = bgtWageApplicationService.getPassListByTaskIds(taskIds);
BigDecimal payAmount = payList.stream().map(BgtWageApplication::getApplicantAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setPayAmount(payAmount);
}
@ -867,7 +872,8 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
.eq(FbsProjectTask::getProjectId, id)
.isNotNull(FbsProjectTask::getUserId)
);
zbfPersonCountVO.setBgtCount(list.size());
Set<Long> collect = list.stream().map(FbsProjectTask::getUserId).collect(Collectors.toSet());
zbfPersonCountVO.setBgtCount(collect.size());
List<Long> taskIds = list.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
zbfPersonCountVO.setWgzCount(0);
if (CollectionUtil.isNotEmpty(taskIds)) {
@ -924,14 +930,24 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
public TableDataInfo<ZbfProgressListVO> zbfProgressList(ZbfProgressListDTO dto) {
Page<ZbfProgressListVO> voPage = new Page<>();
//查询所有创建的任务
List<FbsProjectTask> taskList = fbsProjectTaskService.list(Wrappers.<FbsProjectTask>lambdaQuery()
LambdaQueryWrapper<FbsProjectTask> wrapper = Wrappers.<FbsProjectTask>lambdaQuery()
.eq(FbsProjectTask::getProjectId, dto.getProjectId())
);
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
.orderByDesc(FbsProjectTask::getId);
Page<FbsProjectTask> fbsProjectTaskPage = fbsProjectTaskService.getBaseMapper().selectPage(PageUtils.buildPage(), wrapper);
List<Long> taskIds = fbsProjectTaskPage.getRecords().stream().map(FbsProjectTask::getId).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(taskIds)) {
TableDataInfo<BgtProjectTaskProgress> progressByTaskIds = bgtProjectTaskProgressService.getProgressByTaskIds(dto.getPageSize(), dto.getPageNum(), taskIds);
voPage.setTotal(progressByTaskIds.getTotal());
voPage.setRecords(BeanUtil.copyToList(progressByTaskIds.getRows(), ZbfProgressListVO.class));
List<BgtProjectTaskProgress> progressByTaskIds = bgtProjectTaskProgressService.getProgressByTaskIds(taskIds);
Map<Long, Integer> map = progressByTaskIds.stream().collect(Collectors.toMap(BgtProjectTaskProgress::getTaskId, BgtProjectTaskProgress::getProgress));
ArrayList<ZbfProgressListVO> zbfProgressListVOS = new ArrayList<>();
for (FbsProjectTask fbsProjectTask : fbsProjectTaskPage.getRecords()) {
ZbfProgressListVO zbfProgressListVO = new ZbfProgressListVO();
zbfProgressListVO.setId(fbsProjectTask.getId());
zbfProgressListVO.setTaskName(fbsProjectTask.getTaskName());
zbfProgressListVO.setProgress(map.get(fbsProjectTask.getId())==null?0:map.get(fbsProjectTask.getId()));
zbfProgressListVOS.add(zbfProgressListVO);
}
voPage.setTotal(fbsProjectTaskPage.getTotal());
voPage.setRecords(zbfProgressListVOS);
}
return PageUtils.buildDataInfo(voPage);
}
@ -980,6 +996,7 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
LambdaQueryWrapper<ZbfProject> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ZbfProject::getUserId, SecurityUtils.getAppUserId());
wrapper.like(StrUtil.isNotBlank(dto.getProjectName()), ZbfProject::getProjectName, dto.getProjectName());
wrapper.orderByDesc(ZbfProject::getId);
Page<ZbfProject> result = page(PageUtils.buildPage(), wrapper);
return PageUtils.buildDataInfo(result);
}