Compare commits
10 Commits
ee9fd26068
...
19406135bf
Author | SHA1 | Date | |
---|---|---|---|
19406135bf | |||
d2e46801d1 | |||
53d9675807 | |||
e3ada9fa9c | |||
bcc965026a | |||
51ce8f2cf4 | |||
1612bbaf5c | |||
8651495124 | |||
bf9fd22327 | |||
9b1fc6fe99 |
@ -25,28 +25,5 @@ public class SseController {
|
|||||||
return SseUtil.subscribe(userId,prefix);
|
return SseUtil.subscribe(userId,prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 触发消息数量推送(适配2.4.7)
|
|
||||||
// */
|
|
||||||
// @GetMapping("/push")
|
|
||||||
// public void pushMessageCount(String userId) {
|
|
||||||
// SseEmitter emitter = emitterMap.get(userId);
|
|
||||||
// if (emitter != null) {
|
|
||||||
// BgtMessageCountVO bgtMessageCountVO = new BgtMessageCountVO();
|
|
||||||
// bgtMessageCountVO.setTaskMessageCount(1);
|
|
||||||
// bgtMessageCountVO.setSettlementMessageCount(0);
|
|
||||||
// try {
|
|
||||||
// // 发送自定义事件(客户端通过事件名监听)
|
|
||||||
// emitter.send(SseEmitter.event()
|
|
||||||
// .id(String.valueOf(System.currentTimeMillis()))
|
|
||||||
// .name("messageCount")
|
|
||||||
// .data(JSONUtil.toJsonStr(bgtMessageCountVO))
|
|
||||||
// );
|
|
||||||
// } catch (IOException e) {
|
|
||||||
// emitter.completeWithError(e);
|
|
||||||
// emitterMap.remove(userId); // 异常时清理无效连接
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ public class UploadZipController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 记录附件信息(更新文件名为MD5后的值)
|
// 记录附件信息(更新文件名为MD5后的值)
|
||||||
String newRelativePath = SAVE_DIR + File.separator + newFilePath;
|
String newRelativePath = firstLevelDestDir + File.separator + newFilePath;
|
||||||
newRelativePath = newRelativePath.replace("\\", "/").replace("ruoyi/uploadPath", "/profile");
|
newRelativePath = newRelativePath.replace("\\", "/").replace("ruoyi/uploadPath", "/profile");
|
||||||
|
|
||||||
String[] pathParts = relativePath.split(Pattern.quote(File.separator));
|
String[] pathParts = relativePath.split(Pattern.quote(File.separator));
|
||||||
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.fbs.domain.vo.FbsProjectSubcontractingDetailVO;
|
import com.ruoyi.fbs.domain.vo.FbsProjectSubcontractingDetailVO;
|
||||||
|
import com.ruoyi.zbf.domain.ZbfProject;
|
||||||
import com.ruoyi.zbf.domain.ZbfProjectSubcontracting;
|
import com.ruoyi.zbf.domain.ZbfProjectSubcontracting;
|
||||||
import com.ruoyi.zbf.domain.ZbfProjectSubcontractingApply;
|
import com.ruoyi.zbf.domain.ZbfProjectSubcontractingApply;
|
||||||
import com.ruoyi.zbf.service.IZbfProjectSectionService;
|
import com.ruoyi.zbf.service.IZbfProjectSectionService;
|
||||||
@ -62,7 +63,14 @@ public class AppFbsProjectSubcontractingController extends BaseController {
|
|||||||
ZbfProjectSubcontracting zbfProjectSubcontracting = iZbfProjectSubcontractingService.queryById(apply.getSubId());
|
ZbfProjectSubcontracting zbfProjectSubcontracting = iZbfProjectSubcontractingService.queryById(apply.getSubId());
|
||||||
FbsProjectSubcontractingDetailVO vo = BeanUtil.copyProperties(zbfProjectSubcontracting, FbsProjectSubcontractingDetailVO.class);
|
FbsProjectSubcontractingDetailVO vo = BeanUtil.copyProperties(zbfProjectSubcontracting, FbsProjectSubcontractingDetailVO.class);
|
||||||
vo.setSectionName(zbfProjectSectionService.getById(vo.getSectionId()).getSectionName());
|
vo.setSectionName(zbfProjectSectionService.getById(vo.getSectionId()).getSectionName());
|
||||||
vo.setProjectImg(zbfProjectService.getById(vo.getProjectId()).getProjectImg());
|
ZbfProject project = zbfProjectService.getById(vo.getProjectId());
|
||||||
|
vo.setProjectImg(project.getProjectImg());
|
||||||
|
vo.setProjectName(project.getProjectName());
|
||||||
|
vo.setProjectAddress(project.getProjectAddress());
|
||||||
|
vo.setContactPerson(project.getContactPerson());
|
||||||
|
vo.setContactPhone(project.getContactPhone());
|
||||||
|
vo.setUnitName(project.getUnitName());
|
||||||
|
vo.setCreditCode(project.getCreditCode());
|
||||||
vo.setApplyStatus(apply.getApplyStatus());
|
vo.setApplyStatus(apply.getApplyStatus());
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
}
|
}
|
||||||
|
@ -421,6 +421,17 @@
|
|||||||
return AjaxResult.success(iBgtProjectRecruitService.userProjectDetails(id));
|
return AjaxResult.success(iBgtProjectRecruitService.userProjectDetails(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【首页】【招工列表】 务工者是否进入工地
|
||||||
|
*/
|
||||||
|
@ApiOperation("【首页】【招工列表】 务工者是否进入工地")
|
||||||
|
@GetMapping("/userIsInTheSite")
|
||||||
|
public AjaxResult<Boolean> userIsInTheSite() {
|
||||||
|
return AjaxResult.success(iBgtProjectRecruitApplyService.userIsInTheSite(SecurityUtils.getAppUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【首页】【招工列表】【项目详情】 项目详情·申请报名(还未校验工种是否匹配工地岗位)
|
* 【首页】【招工列表】【项目详情】 项目详情·申请报名(还未校验工种是否匹配工地岗位)
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,7 @@ token:
|
|||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30000
|
expireTime: 10080
|
||||||
|
|
||||||
# MyBatisPlus配置
|
# MyBatisPlus配置
|
||||||
# https://baomidou.com/config/
|
# https://baomidou.com/config/
|
||||||
|
@ -8,6 +8,9 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMax;
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -84,6 +87,7 @@ public class BgtProjectRecruit implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "招工金额")
|
@Excel(name = "招工金额")
|
||||||
@ApiModelProperty("招工金额")
|
@ApiModelProperty("招工金额")
|
||||||
|
@DecimalMax(value = "99999999", message = "金额不能大于 99999999")
|
||||||
private BigDecimal recruitAmount;
|
private BigDecimal recruitAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,6 +151,8 @@ public class BgtProjectRecruit implements Serializable {
|
|||||||
private Double centralLatitude;
|
private Double centralLatitude;
|
||||||
|
|
||||||
@ApiModelProperty("'半径'")
|
@ApiModelProperty("'半径'")
|
||||||
|
@Min(value = 1, message = "半径不能小于 1")
|
||||||
|
@Max(value = 99999999, message = "半径不能大于 99999999")
|
||||||
private Double rangeRadius;
|
private Double rangeRadius;
|
||||||
|
|
||||||
@ApiModelProperty("工种")
|
@ApiModelProperty("工种")
|
||||||
|
@ -52,6 +52,9 @@ public class BgtProjectRecruitDetailVO implements Serializable {
|
|||||||
@ApiModelProperty("任务名")
|
@ApiModelProperty("任务名")
|
||||||
private String taskName;
|
private String taskName;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务状态(1进行中 2已完成)")
|
||||||
|
private String taskStatus;
|
||||||
|
|
||||||
@ApiModelProperty("招工名称")
|
@ApiModelProperty("招工名称")
|
||||||
private String recruitName;
|
private String recruitName;
|
||||||
|
|
||||||
|
@ -96,4 +96,9 @@ public interface IBgtMessageService extends IServicePlus<BgtMessage> {
|
|||||||
*/
|
*/
|
||||||
void operation(String senderType,Long senderId,String recipientType,Long recipientId,Long tableId,String tableName);
|
void operation(String senderType,Long senderId,String recipientType,Long recipientId,Long tableId,String tableName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量已操作
|
||||||
|
*/
|
||||||
|
void operationBatch(List<Long> tableId,String tableName,String messageLargeType,String messageSmallType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -121,6 +121,11 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR
|
|||||||
*/
|
*/
|
||||||
Boolean userApplyForRegistration(Long id);
|
Boolean userApplyForRegistration(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 务工者是否进入工地
|
||||||
|
*/
|
||||||
|
Boolean userIsInTheSite(Long wgzUserId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意申请
|
* 同意申请
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.bgt.service.impl;
|
package com.ruoyi.bgt.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@ -17,7 +18,9 @@ import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO;
|
|||||||
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
import com.ruoyi.bgt.domain.vo.BgtMessageVO;
|
||||||
import com.ruoyi.bgt.mapper.BgtMessageMapper;
|
import com.ruoyi.bgt.mapper.BgtMessageMapper;
|
||||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||||
|
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||||
import com.ruoyi.bgt.service.IBgtWageApplicationService;
|
import com.ruoyi.bgt.service.IBgtWageApplicationService;
|
||||||
|
import com.ruoyi.common.constants.BgtMessageConstant;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
@ -91,6 +94,10 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
@Lazy
|
@Lazy
|
||||||
private IBgtWageApplicationService wageApplicationService;
|
private IBgtWageApplicationService wageApplicationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private IBgtProjectRecruitService iBgtProjectRecruitService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BgtMessage queryById(Long id) {
|
public BgtMessage queryById(Long id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
@ -187,7 +194,7 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
|
.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId())
|
||||||
.eq(BgtMessage::getIsOperation, OPERATION_NEED));
|
.eq(BgtMessage::getIsOperation, OPERATION_NEED));
|
||||||
bgtMessageCountVO.setHandleMessageCount(handle);
|
bgtMessageCountVO.setHandleMessageCount(handle);
|
||||||
redisCache.setCacheObject(REDIS_KEY+SecurityUtils.getAppUserId(), bgtMessageCountVO);
|
redisCache.setCacheObject(BgtMessageConstant.REDIS_KEY+SecurityUtils.getAppUserId(), bgtMessageCountVO);
|
||||||
return bgtMessageCountVO;
|
return bgtMessageCountVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,6 +292,21 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt
|
|||||||
MessageUtil.operationMessagePush(recipientType, recipientId, 1);
|
MessageUtil.operationMessagePush(recipientType, recipientId, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void operationBatch(List<Long> tableId, String tableName, String messageLargeType, String messageSmallType) {
|
||||||
|
if(CollectionUtil.isEmpty(tableId)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LambdaUpdateWrapper<BgtMessage> wrapper = new LambdaUpdateWrapper<>();
|
||||||
|
wrapper.in(BgtMessage::getTableId, tableId);
|
||||||
|
wrapper.eq(BgtMessage::getTableName, tableName);
|
||||||
|
wrapper.eq(BgtMessage::getMessageLargeType, messageLargeType);
|
||||||
|
wrapper.eq(BgtMessage::getMessageSmallType, messageSmallType);
|
||||||
|
wrapper.eq(BgtMessage::getIsOperation, OPERATION_NEED);
|
||||||
|
wrapper.set(BgtMessage::getIsOperation, OPERATION_ALREADY);
|
||||||
|
update(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<BgtMessageDetailVO> unAuditList(BgtMessageUnAuditDetailDTO dto) {
|
public TableDataInfo<BgtMessageDetailVO> unAuditList(BgtMessageUnAuditDetailDTO dto) {
|
||||||
|
@ -419,12 +419,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
throw new RuntimeException("未查询到您的考试信息!");
|
throw new RuntimeException("未查询到您的考试信息!");
|
||||||
}
|
}
|
||||||
//3-2、是否已有工地
|
//3-2、是否已有工地
|
||||||
Integer i = baseMapper.selectCount(
|
|
||||||
new LambdaQueryWrapper<BgtProjectRecruitApply>().
|
if (userIsInTheSite(appUserId)) {
|
||||||
eq(BgtProjectRecruitApply::getUserId, appUserId).
|
|
||||||
in(BgtProjectRecruitApply::getStatus, "3", "5")
|
|
||||||
);
|
|
||||||
if (i > 0) {
|
|
||||||
throw new RuntimeException("已有工地!不可再次申请!");
|
throw new RuntimeException("已有工地!不可再次申请!");
|
||||||
}
|
}
|
||||||
//3-3、是否重复申请同一工地(先检查最后一次是否离场或取消,如果是就还能再次申请这个项目,否则无法申请)
|
//3-3、是否重复申请同一工地(先检查最后一次是否离场或取消,如果是就还能再次申请这个项目,否则无法申请)
|
||||||
@ -490,6 +486,16 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean userIsInTheSite(Long wgzUserId) {
|
||||||
|
Integer i = baseMapper.selectCount(
|
||||||
|
new LambdaQueryWrapper<BgtProjectRecruitApply>().
|
||||||
|
eq(BgtProjectRecruitApply::getUserId, wgzUserId).
|
||||||
|
in(BgtProjectRecruitApply::getStatus, "3", "5")
|
||||||
|
);
|
||||||
|
return i>0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<BgtProjectRecruitApplyVO> userList(BgtAttendanceDayDTO dto) {
|
public TableDataInfo<BgtProjectRecruitApplyVO> userList(BgtAttendanceDayDTO dto) {
|
||||||
Page<BgtAttendanceDayDTO> queryDTOPage = new Page<>();
|
Page<BgtAttendanceDayDTO> queryDTOPage = new Page<>();
|
||||||
|
@ -210,6 +210,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
|
|||||||
BgtProjectRecruitDetailVO vo = BeanUtil.toBean(recruit, BgtProjectRecruitDetailVO.class);
|
BgtProjectRecruitDetailVO vo = BeanUtil.toBean(recruit, BgtProjectRecruitDetailVO.class);
|
||||||
FbsProjectTask task = fbsProjectTaskService.getById(vo.getTaskId());
|
FbsProjectTask task = fbsProjectTaskService.getById(vo.getTaskId());
|
||||||
vo.setTaskName(task.getTaskName());
|
vo.setTaskName(task.getTaskName());
|
||||||
|
vo.setTaskStatus(task.getStatus());
|
||||||
|
|
||||||
// int count = bgtProjectRecruitApplyService.count(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
// int count = bgtProjectRecruitApplyService.count(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
// .eq(BgtProjectRecruitApply::getRecruitId, vo.getId())
|
// .eq(BgtProjectRecruitApply::getRecruitId, vo.getId())
|
||||||
|
@ -10,11 +10,9 @@ import com.ruoyi.bgt.bo.BgtUserQueryBo;
|
|||||||
import com.ruoyi.bgt.domain.dto.BgtUserRealNameAuthenticationDTO;
|
import com.ruoyi.bgt.domain.dto.BgtUserRealNameAuthenticationDTO;
|
||||||
import com.ruoyi.bgt.mapper.BgtUserMapper;
|
import com.ruoyi.bgt.mapper.BgtUserMapper;
|
||||||
import com.ruoyi.bgt.service.IBgtUserService;
|
import com.ruoyi.bgt.service.IBgtUserService;
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.core.domain.entity.BgtUser;
|
import com.ruoyi.common.core.domain.entity.BgtUser;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.domain.dto.AnnexDTO;
|
|
||||||
import com.ruoyi.common.exception.BaseException;
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.service.IAnnexService;
|
import com.ruoyi.common.service.IAnnexService;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
@ -146,12 +144,12 @@ public class BgtUserServiceImpl extends ServicePlusImpl<BgtUserMapper, BgtUser>
|
|||||||
throw new BaseException("银行卡号格式不正确");
|
throw new BaseException("银行卡号格式不正确");
|
||||||
}
|
}
|
||||||
BeanUtil.copyProperties(dto, bgtUser);
|
BeanUtil.copyProperties(dto, bgtUser);
|
||||||
for (AnnexDTO annexDTO:dto.getAnnexList()){
|
// for (AnnexDTO annexDTO:dto.getAnnexList()){
|
||||||
annexDTO.setUserId(dto.getUserId());
|
// annexDTO.setUserId(dto.getUserId());
|
||||||
annexDTO.setUserType(Constants.BGT);
|
// annexDTO.setUserType(Constants.BGT);
|
||||||
annexDTO.setAnnexType("1");
|
// annexDTO.setAnnexType("1");
|
||||||
}
|
// }
|
||||||
annexService.insertBatch(dto.getAnnexList());
|
// annexService.insertBatch(dto.getAnnexList());
|
||||||
return baseMapper.updateById(bgtUser)>0;
|
return baseMapper.updateById(bgtUser)>0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,3 +158,4 @@ public class BgtUserServiceImpl extends ServicePlusImpl<BgtUserMapper, BgtUser>
|
|||||||
return baseMapper.selectOne(new LambdaQueryWrapper<BgtUser>().eq(BgtUser::getUserId, userId));
|
return baseMapper.selectOne(new LambdaQueryWrapper<BgtUser>().eq(BgtUser::getUserId, userId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@ public class BgtMessageConstant {
|
|||||||
//主动结算工资
|
//主动结算工资
|
||||||
public static final String BGT_ACTIVE_PAY_HEADLINE = "您【%s】项目的工资已结算!";
|
public static final String BGT_ACTIVE_PAY_HEADLINE = "您【%s】项目的工资已结算!";
|
||||||
public static final String BGT_ACTIVE_PAY_SUBHEADING = "您【%s】项目的工资已由包工头【%s】主动结算!";
|
public static final String BGT_ACTIVE_PAY_SUBHEADING = "您【%s】项目的工资已由包工头【%s】主动结算!";
|
||||||
|
//过期拒绝
|
||||||
|
public static final String BGT_EXPIRED_REFUSE_HEADLINE = "您因【%s】项目过期而被系统自动拒绝!";
|
||||||
|
public static final String BGT_EXPIRED_REFUSE_SUBHEADING = "您因【%s】项目过期而被系统自动拒绝!";
|
||||||
|
|
||||||
//包工头->务工者 消息类型
|
//包工头->务工者 消息类型
|
||||||
public static final String BGT_TYPE_SIGN_UP = "1"; //务工者报名
|
public static final String BGT_TYPE_SIGN_UP = "1"; //务工者报名
|
||||||
@ -63,6 +66,7 @@ public class BgtMessageConstant {
|
|||||||
public static final String BGT_TYPE_CANSEL = "11"; //取消选择
|
public static final String BGT_TYPE_CANSEL = "11"; //取消选择
|
||||||
public static final String BGT_TYPE_REPORT_MAKE_UP = "12";
|
public static final String BGT_TYPE_REPORT_MAKE_UP = "12";
|
||||||
public static final String BGT_TYPE_ACTIVE_PAY = "14"; //主动结算工资
|
public static final String BGT_TYPE_ACTIVE_PAY = "14"; //主动结算工资
|
||||||
|
public static final String BGT_TYPE_EXPIRED_REFUSE= "15"; //过期拒绝
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,6 +189,10 @@ public class BgtMessageConstant {
|
|||||||
map.put(HEADLINE, String.format(BGT_ACTIVE_PAY_HEADLINE, projectName));
|
map.put(HEADLINE, String.format(BGT_ACTIVE_PAY_HEADLINE, projectName));
|
||||||
map.put(SUBHEADING, String.format(BGT_ACTIVE_PAY_SUBHEADING, projectName,auditor));
|
map.put(SUBHEADING, String.format(BGT_ACTIVE_PAY_SUBHEADING, projectName,auditor));
|
||||||
break;
|
break;
|
||||||
|
case "15":
|
||||||
|
map.put(HEADLINE, String.format(BGT_EXPIRED_REFUSE_HEADLINE, projectName));
|
||||||
|
map.put(SUBHEADING, String.format(BGT_EXPIRED_REFUSE_SUBHEADING, projectName));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public class SseUtil {
|
|||||||
public static final String ZBF_PREFIX = "zbf-";
|
public static final String ZBF_PREFIX = "zbf-";
|
||||||
public static SseEmitter subscribe(String userId,String prefix) {
|
public static SseEmitter subscribe(String userId,String prefix) {
|
||||||
// Spring Boot 2.4.7中SseEmitter构造函数支持超时时间(单位:毫秒) 30 * 60
|
// Spring Boot 2.4.7中SseEmitter构造函数支持超时时间(单位:毫秒) 30 * 60
|
||||||
SseEmitter emitter = new SseEmitter(30 * 60 * 1000L); // 30分钟超时
|
SseEmitter emitter = new SseEmitter(10080 * 60 * 1000L); // 7天过期 与token同步
|
||||||
|
|
||||||
// 存储emitter并设置回调(2.4.7中回调机制与主流版本一致)
|
// 存储emitter并设置回调(2.4.7中回调机制与主流版本一致)
|
||||||
String key = prefix + "-" +userId;
|
String key = prefix + "-" +userId;
|
||||||
|
@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMax;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -64,6 +65,7 @@ public class FbsProjectTask implements Serializable {
|
|||||||
/** 任务金额 */
|
/** 任务金额 */
|
||||||
@Excel(name = "任务金额")
|
@Excel(name = "任务金额")
|
||||||
@ApiModelProperty("任务金额")
|
@ApiModelProperty("任务金额")
|
||||||
|
@DecimalMax(value = "99999999", message = "金额不能大于 99999999")
|
||||||
private BigDecimal taskAmount;
|
private BigDecimal taskAmount;
|
||||||
|
|
||||||
/** 用工数量 */
|
/** 用工数量 */
|
||||||
|
@ -16,4 +16,7 @@ public class FbsTaskSwitchListDTO {
|
|||||||
@ApiModelProperty("任务名")
|
@ApiModelProperty("任务名")
|
||||||
private String taskName;
|
private String taskName;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务状态(1-已发布,2已完成)")
|
||||||
|
private String taskStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,24 @@ public class FbsProjectSubcontractingDetailVO {
|
|||||||
@ApiModelProperty("项目图片")
|
@ApiModelProperty("项目图片")
|
||||||
private String projectImg;
|
private String projectImg;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目地址")
|
||||||
|
private String projectAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
@ -417,7 +417,10 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
|||||||
BigDecimal taskAuditAmount = BigDecimal.ZERO;
|
BigDecimal taskAuditAmount = BigDecimal.ZERO;
|
||||||
BigDecimal taskApplyAmount= BigDecimal.ZERO;
|
BigDecimal taskApplyAmount= BigDecimal.ZERO;
|
||||||
for (BgtWageApplication wage : wageList) {
|
for (BgtWageApplication wage : wageList) {
|
||||||
taskApplyAmount = taskApplyAmount.add(wage.getApplicantAmount());
|
if(AuditStatus.AUDIT.getCode().equals(wage.getAuditStatus())){
|
||||||
|
taskApplyAmount = taskApplyAmount.add(wage.getApplicantAmount());
|
||||||
|
}
|
||||||
|
|
||||||
if(AuditStatus.PASS.getCode().equals(wage.getAuditStatus())){
|
if(AuditStatus.PASS.getCode().equals(wage.getAuditStatus())){
|
||||||
taskAuditAmount = taskAuditAmount.add(wage.getApplicantAmount());
|
taskAuditAmount = taskAuditAmount.add(wage.getApplicantAmount());
|
||||||
}
|
}
|
||||||
@ -451,7 +454,9 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
|||||||
BigDecimal taskAuditAmount = BigDecimal.ZERO;
|
BigDecimal taskAuditAmount = BigDecimal.ZERO;
|
||||||
BigDecimal taskApplyAmount= BigDecimal.ZERO;
|
BigDecimal taskApplyAmount= BigDecimal.ZERO;
|
||||||
for (BgtWageApplication wage : wageList) {
|
for (BgtWageApplication wage : wageList) {
|
||||||
taskApplyAmount = taskApplyAmount.add(wage.getApplicantAmount());
|
if(AuditStatus.AUDIT.getCode().equals(wage.getAuditStatus())){
|
||||||
|
taskApplyAmount = taskApplyAmount.add(wage.getApplicantAmount());
|
||||||
|
}
|
||||||
if(AuditStatus.PASS.getCode().equals(wage.getAuditStatus())){
|
if(AuditStatus.PASS.getCode().equals(wage.getAuditStatus())){
|
||||||
taskAuditAmount = taskAuditAmount.add(wage.getApplicantAmount());
|
taskAuditAmount = taskAuditAmount.add(wage.getApplicantAmount());
|
||||||
}
|
}
|
||||||
@ -466,6 +471,11 @@ public class FbsProjectTaskServiceImpl extends ServicePlusImpl<FbsProjectTaskMap
|
|||||||
|
|
||||||
LambdaQueryWrapper<FbsProjectTask> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<FbsProjectTask> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(FbsProjectTask::getCreateId,SecurityUtils.getAppUserId());
|
wrapper.eq(FbsProjectTask::getCreateId,SecurityUtils.getAppUserId());
|
||||||
|
if("1".equals(dto.getTaskStatus())){
|
||||||
|
wrapper.in(FbsProjectTask::getStatus,Arrays.asList(ProjectTaskStatus.APPLY.getCode(),ProjectTaskStatus.PROGRESS.getCode()));
|
||||||
|
}else if("2".equals(dto.getTaskStatus())){
|
||||||
|
wrapper.eq(FbsProjectTask::getStatus,ProjectTaskStatus.COMPLETE.getCode());
|
||||||
|
}
|
||||||
wrapper.like(StrUtil.isNotBlank(dto.getTaskName()),FbsProjectTask::getTaskName,dto.getTaskName());
|
wrapper.like(StrUtil.isNotBlank(dto.getTaskName()),FbsProjectTask::getTaskName,dto.getTaskName());
|
||||||
wrapper.orderByDesc(FbsProjectTask::getId);
|
wrapper.orderByDesc(FbsProjectTask::getId);
|
||||||
Page<FbsProjectTask> page = page(PageUtils.buildPage(), wrapper);
|
Page<FbsProjectTask> page = page(PageUtils.buildPage(), wrapper);
|
||||||
|
@ -10,6 +10,7 @@ import com.ruoyi.bgt.domain.dto.BgtScoreDTO;
|
|||||||
import com.ruoyi.bgt.service.IBgtMessageService;
|
import com.ruoyi.bgt.service.IBgtMessageService;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||||
|
import com.ruoyi.common.constants.BgtMessageConstant;
|
||||||
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
||||||
import com.ruoyi.common.enums.RecruitApplyStatus;
|
import com.ruoyi.common.enums.RecruitApplyStatus;
|
||||||
import com.ruoyi.common.enums.RecruitStatus;
|
import com.ruoyi.common.enums.RecruitStatus;
|
||||||
@ -94,13 +95,28 @@ public class BusinessTask
|
|||||||
.lt(BgtProjectRecruit::getRecruitEndTime, LocalDate.now()));
|
.lt(BgtProjectRecruit::getRecruitEndTime, LocalDate.now()));
|
||||||
if(CollectionUtil.isNotEmpty(recruitList)){
|
if(CollectionUtil.isNotEmpty(recruitList)){
|
||||||
List<Long> recruitIds = recruitList.stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
|
List<Long> recruitIds = recruitList.stream().map(BgtProjectRecruit::getId).collect(Collectors.toList());
|
||||||
recruitApplyService.lambdaUpdate()
|
|
||||||
.in(BgtProjectRecruitApply::getRecruitId, recruitIds)
|
|
||||||
.in(BgtProjectRecruitApply::getStatus,status)
|
|
||||||
.set(BgtProjectRecruitApply::getStatus,RecruitApplyStatus.BGT_REFUSE.getCode())
|
|
||||||
.update();
|
|
||||||
recruitService.lambdaUpdate().in(BgtProjectRecruit::getId, recruitIds)
|
recruitService.lambdaUpdate().in(BgtProjectRecruit::getId, recruitIds)
|
||||||
.set(BgtProjectRecruit::getStatus,RecruitStatus.OVERDUE.getCode()).update();
|
.set(BgtProjectRecruit::getStatus, RecruitStatus.OVERDUE.getCode()).update();
|
||||||
|
List<BgtProjectRecruitApply> list = recruitApplyService.list(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
|
.in(BgtProjectRecruitApply::getRecruitId, recruitIds)
|
||||||
|
.in(BgtProjectRecruitApply::getStatus, status)
|
||||||
|
);
|
||||||
|
if(CollectionUtil.isNotEmpty(list)){
|
||||||
|
List<Long> recruitApplyIds = list.stream().map(BgtProjectRecruitApply::getId).collect(Collectors.toList());
|
||||||
|
recruitApplyService.lambdaUpdate()
|
||||||
|
.in(BgtProjectRecruitApply::getId, recruitApplyIds)
|
||||||
|
.set(BgtProjectRecruitApply::getStatus,RecruitApplyStatus.BGT_REFUSE.getCode())
|
||||||
|
.update();
|
||||||
|
//处理消息操作状态
|
||||||
|
List<Long> bgtMessageHandleIds = list.stream().filter(vo->RecruitApplyStatus.SIGN_UP.getCode().equals(vo.getStatus())).map(BgtProjectRecruitApply::getId).collect(Collectors.toList());
|
||||||
|
iBgtMessageService.operationBatch(bgtMessageHandleIds,SqlHelper.table(BgtProjectRecruitApply.class).getTableName(), BgtMessageConstant.BGT_LARGE_OTHER, BgtMessageConstant.BGT_SMALL_SIGN_UP );
|
||||||
|
|
||||||
|
List<BgtProjectRecruitApply> wgzMessageList = list.stream().filter(vo->RecruitApplyStatus.BGT_PASS.getCode().equals(vo.getStatus())).collect(Collectors.toList());
|
||||||
|
iWgzMessageService.operationBatchSignUp(wgzMessageList);
|
||||||
|
//发送消息
|
||||||
|
iWgzMessageService.operationBatchReject(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Console.log("招工拒绝任务结束,此次拒绝任务个数:"+recruitList.size());
|
Console.log("招工拒绝任务结束,此次拒绝任务个数:"+recruitList.size());
|
||||||
}
|
}
|
||||||
@ -128,7 +144,8 @@ public class BusinessTask
|
|||||||
//搜索时间在两个月前的已完结的任务
|
//搜索时间在两个月前的已完结的任务
|
||||||
List<FbsProjectTask> taskList = iFbsProjectTaskService.list(Wrappers.<FbsProjectTask>lambdaQuery()
|
List<FbsProjectTask> taskList = iFbsProjectTaskService.list(Wrappers.<FbsProjectTask>lambdaQuery()
|
||||||
.eq(FbsProjectTask::getStatus, "2")
|
.eq(FbsProjectTask::getStatus, "2")
|
||||||
.lt(FbsProjectTask::getTaskBeginTime, LocalDate.now().plusMonths(-2)));
|
// .lt(FbsProjectTask::getTaskBeginTime, LocalDate.now().plusMonths(-2))
|
||||||
|
);
|
||||||
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
|
List<Long> taskIds = taskList.stream().map(FbsProjectTask::getId).collect(Collectors.toList());
|
||||||
if(CollectionUtil.isNotEmpty(taskIds)){
|
if(CollectionUtil.isNotEmpty(taskIds)){
|
||||||
//任务下的招工
|
//任务下的招工
|
||||||
@ -143,11 +160,12 @@ public class BusinessTask
|
|||||||
List<BgtProjectRecruitApply> applyList = recruitApplyService.list(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
List<BgtProjectRecruitApply> applyList = recruitApplyService.list(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
.in(BgtProjectRecruitApply::getRecruitId, recruitIds));
|
.in(BgtProjectRecruitApply::getRecruitId, recruitIds));
|
||||||
//筛选已离场的
|
//筛选已离场的
|
||||||
List<BgtProjectRecruitApply> outList = applyList.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.OUT_WORK.getCode())).collect(Collectors.toList());
|
List<BgtProjectRecruitApply> outList = applyList.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.OUT_WORK.getCode()) && apply.getLeaveTime() != null).collect(Collectors.toList());
|
||||||
|
|
||||||
for (BgtProjectRecruitApply bgtProjectRecruitApply : outList) {
|
for (BgtProjectRecruitApply bgtProjectRecruitApply : outList) {
|
||||||
WgzScoreRecord byUserIdAndRecruitApplyId = wgzScoreRecordService.getByUserIdAndRecruitApplyId(bgtProjectRecruitApply.getUserId(), bgtProjectRecruitApply.getId());
|
WgzScoreRecord byUserIdAndRecruitApplyId = wgzScoreRecordService.getByUserIdAndRecruitApplyId(bgtProjectRecruitApply.getUserId(), bgtProjectRecruitApply.getId());
|
||||||
if (byUserIdAndRecruitApplyId == null) {
|
//没有评分并且离场时间已经过了30天
|
||||||
|
if (byUserIdAndRecruitApplyId == null && bgtProjectRecruitApply.getLeaveTime().isBefore(LocalDate.now().plusDays(-30))) {
|
||||||
BgtScoreDTO bgtScoreDTO = new BgtScoreDTO();
|
BgtScoreDTO bgtScoreDTO = new BgtScoreDTO();
|
||||||
bgtScoreDTO.setScore(new BigDecimal(5));
|
bgtScoreDTO.setScore(new BigDecimal(5));
|
||||||
bgtScoreDTO.setRecruitId(bgtProjectRecruitApply.getRecruitId());
|
bgtScoreDTO.setRecruitId(bgtProjectRecruitApply.getRecruitId());
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.wgz.service;
|
package com.ruoyi.wgz.service;
|
||||||
|
|
||||||
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
|
||||||
@ -102,4 +103,14 @@ public interface IWgzMessageService extends IServicePlus<WgzMessage> {
|
|||||||
* 修改操作状态
|
* 修改操作状态
|
||||||
*/
|
*/
|
||||||
Boolean updateOperationStatus(Long id);
|
Boolean updateOperationStatus(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名批量修改操作状态
|
||||||
|
*/
|
||||||
|
void operationBatchSignUp(List<BgtProjectRecruitApply> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量发送报名拒绝消息
|
||||||
|
*/
|
||||||
|
void operationBatchReject(List<BgtProjectRecruitApply> list);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.ruoyi.wgz.service.impl;
|
package com.ruoyi.wgz.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||||
|
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService;
|
||||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||||
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
||||||
@ -40,8 +43,9 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.USERTYPE_BGT;
|
import static com.ruoyi.common.constants.BgtMessageConstant.*;
|
||||||
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.USERTYPE_WGZ;
|
import static com.ruoyi.common.constants.BgtMessageConstant.SUBHEADING;
|
||||||
|
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息Service业务层处理
|
* 消息Service业务层处理
|
||||||
@ -285,6 +289,56 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void operationBatchSignUp(List<BgtProjectRecruitApply> list) {
|
||||||
|
if(CollectionUtil.isEmpty(list)){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
List<WgzMessage> updateList = new ArrayList<>();
|
||||||
|
for (BgtProjectRecruitApply apply : list) {
|
||||||
|
List<WgzMessage> wgzMessages = baseMapper.selectList(Wrappers.<WgzMessage>lambdaQuery()
|
||||||
|
.eq(WgzMessage::getTableId, apply.getId())
|
||||||
|
.eq(WgzMessage::getMessageLargeType, LARGE_APPLY)
|
||||||
|
.eq(WgzMessage::getIsOperation, OPERATION_NEED)
|
||||||
|
.eq(WgzMessage::getRecipientId, apply.getUserId())
|
||||||
|
.eq(WgzMessage::getRecipientType, USERTYPE_WGZ)
|
||||||
|
);
|
||||||
|
updateList.addAll(wgzMessages);
|
||||||
|
}
|
||||||
|
if(CollectionUtil.isNotEmpty(updateList)){
|
||||||
|
for (WgzMessage wgzMessage : updateList) {
|
||||||
|
wgzMessage.setIsOperation(OPERATION_ALREADY);
|
||||||
|
}
|
||||||
|
updateBatchById(updateList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void operationBatchReject(List<BgtProjectRecruitApply> list) {
|
||||||
|
//发消息
|
||||||
|
ArrayList<WgzMessage> wgzMessages = new ArrayList<>();
|
||||||
|
for(BgtProjectRecruitApply recruitApply : list){
|
||||||
|
HashMap<String, String> mp = new HashMap<>();
|
||||||
|
mp.put("projectName", iBgtProjectRecruitService.getById(recruitApply.getRecruitId()).getRecruitName());
|
||||||
|
Map<String, String> map = bgtMessage(mp, BGT_TYPE_EXPIRED_REFUSE, true);
|
||||||
|
WgzMessage wgzMessage = new WgzMessage()
|
||||||
|
.setSenderType(USERTYPE_SYSTEM)
|
||||||
|
.setSenderId(SYSTEM_ID)
|
||||||
|
.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)
|
||||||
|
.setCreateBy("系统").setUpdateBy("系统");
|
||||||
|
wgzMessages.add(wgzMessage);
|
||||||
|
}
|
||||||
|
if(CollectionUtil.isNotEmpty(wgzMessages)){
|
||||||
|
saveBatch(wgzMessages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断招工是否已招满或已过期
|
* 判断招工是否已招满或已过期
|
||||||
* @param recruitId 招工ID
|
* @param recruitId 招工ID
|
||||||
|
@ -420,6 +420,11 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
WgzAppApplyForPayrollSettlementListRes res = BeanUtil.copyProperties(payCalculation, WgzAppApplyForPayrollSettlementListRes.class);
|
WgzAppApplyForPayrollSettlementListRes res = BeanUtil.copyProperties(payCalculation, WgzAppApplyForPayrollSettlementListRes.class);
|
||||||
List<WgzPayCalculationFiles> list = iWgzPayCalculationFilesService.list(Wrappers.<WgzPayCalculationFiles>lambdaQuery().eq(WgzPayCalculationFiles::getCalculationId, id));
|
List<WgzPayCalculationFiles> list = iWgzPayCalculationFilesService.list(Wrappers.<WgzPayCalculationFiles>lambdaQuery().eq(WgzPayCalculationFiles::getCalculationId, id));
|
||||||
res.setPayCalculation(list);
|
res.setPayCalculation(list);
|
||||||
|
//查询离场时间
|
||||||
|
if("2".equals(payCalculation.getWorkingState())){
|
||||||
|
BgtProjectRecruitApply byId = iBgtProjectRecruitApplyService.getById(payCalculation.getApplyKey());
|
||||||
|
res.setLeaveTime(byId.getLeaveTime());
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,6 +310,16 @@ public class WgzQuestionSaveServiceImpl extends ServicePlusImpl<WgzQuestionSaveM
|
|||||||
private String generateExamPaper(ExaminationPaper rs) throws IOException {
|
private String generateExamPaper(ExaminationPaper rs) throws IOException {
|
||||||
String fileName = DateUtils.datePath() + File.separator + rs.getUserId() + IdUtil.fastUUID() + ".pdf";
|
String fileName = DateUtils.datePath() + File.separator + rs.getUserId() + IdUtil.fastUUID() + ".pdf";
|
||||||
File desc = new File(RuoYiConfig.getUploadPath() + File.separator + fileName);
|
File desc = new File(RuoYiConfig.getUploadPath() + File.separator + fileName);
|
||||||
|
|
||||||
|
File parentDir = desc.getParentFile();
|
||||||
|
if (parentDir != null && !parentDir.exists()) {
|
||||||
|
// 创建所有父目录
|
||||||
|
boolean mkdirsSuccess = parentDir.mkdirs();
|
||||||
|
if (!mkdirsSuccess) {
|
||||||
|
throw new IOException("无法创建目录: " + parentDir.getAbsolutePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Path path = Paths.get(FileUploadUtils.callGetPathFileName(RuoYiConfig.getUploadPath(), fileName));
|
Path path = Paths.get(FileUploadUtils.callGetPathFileName(RuoYiConfig.getUploadPath(), fileName));
|
||||||
// 创建PDF文档
|
// 创建PDF文档
|
||||||
PdfWriter writer = new PdfWriter(desc);
|
PdfWriter writer = new PdfWriter(desc);
|
||||||
|
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMax;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,6 +29,7 @@ public class ZbfProjectSubcontractingAddDTO {
|
|||||||
private String subDescribe;
|
private String subDescribe;
|
||||||
|
|
||||||
@ApiModelProperty("分包金额")
|
@ApiModelProperty("分包金额")
|
||||||
|
@DecimalMax(value = "99999999", message = "金额不能大于 99999999")
|
||||||
private BigDecimal subAmount;
|
private BigDecimal subAmount;
|
||||||
|
|
||||||
@ApiModelProperty("资质要求")
|
@ApiModelProperty("资质要求")
|
||||||
|
@ -16,4 +16,7 @@ public class ZbfProjectSwitchListDTO {
|
|||||||
|
|
||||||
@ApiModelProperty("项目名称")
|
@ApiModelProperty("项目名称")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目状态,1-在建,2-完成")
|
||||||
|
private String projectStatus;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,9 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
|
|||||||
//查询项目下的所有申请
|
//查询项目下的所有申请
|
||||||
List<ZbfProjectSubcontractingApply> applyList = zbfProjectSubcontractingApplyService.list(Wrappers.<ZbfProjectSubcontractingApply>lambdaQuery()
|
List<ZbfProjectSubcontractingApply> applyList = zbfProjectSubcontractingApplyService.list(Wrappers.<ZbfProjectSubcontractingApply>lambdaQuery()
|
||||||
.eq(ZbfProjectSubcontractingApply::getProjectId, projectId)
|
.eq(ZbfProjectSubcontractingApply::getProjectId, projectId)
|
||||||
.eq(ZbfProjectSubcontractingApply::getFbsUserId, SecurityUtils.getAppUserId()));
|
.eq(ZbfProjectSubcontractingApply::getFbsUserId, SecurityUtils.getAppUserId())
|
||||||
|
.eq(ZbfProjectSubcontractingApply::getApplyStatus, SubcontractingApplyStatus.APPLY.getCode())
|
||||||
|
);
|
||||||
HashMap<Long, String> map = applyList.stream()
|
HashMap<Long, String> map = applyList.stream()
|
||||||
.collect(Collectors.toMap(
|
.collect(Collectors.toMap(
|
||||||
ZbfProjectSubcontractingApply::getSubId,
|
ZbfProjectSubcontractingApply::getSubId,
|
||||||
@ -188,22 +190,29 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
|
|||||||
for (ZbfProjectSection zbfProjectSection : sectionList) {
|
for (ZbfProjectSection zbfProjectSection : sectionList) {
|
||||||
//分包处理
|
//分包处理
|
||||||
List<FbsProjectSubcontractingListVO> subListVO = new ArrayList<>();
|
List<FbsProjectSubcontractingListVO> subListVO = new ArrayList<>();
|
||||||
//查询标段下的所有的分包
|
//查询标段下的所有选择的分包
|
||||||
List<ZbfProjectSubcontracting> subList = zbfProjectSubcontractingService.list(Wrappers.<ZbfProjectSubcontracting>lambdaQuery()
|
List<ZbfProjectSubcontracting> subList = zbfProjectSubcontractingService.list(Wrappers.<ZbfProjectSubcontracting>lambdaQuery()
|
||||||
.eq(ZbfProjectSubcontracting::getSectionId, zbfProjectSection.getId())
|
.eq(ZbfProjectSubcontracting::getSectionId, zbfProjectSection.getId())
|
||||||
//.isNull(ZbfProjectSubcontracting::getUserId)
|
.isNull(ZbfProjectSubcontracting::getUserId)
|
||||||
);
|
);
|
||||||
//排除掉已申请的分包
|
|
||||||
for (ZbfProjectSubcontracting sub : subList) {
|
for (ZbfProjectSubcontracting sub : subList) {
|
||||||
|
//排除掉已申请的分包
|
||||||
|
if( map.get(sub.getId()) != null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
FbsProjectSubcontractingListVO fbsProjectSubcontractingListVO = new FbsProjectSubcontractingListVO();
|
FbsProjectSubcontractingListVO fbsProjectSubcontractingListVO = new FbsProjectSubcontractingListVO();
|
||||||
BeanUtil.copyProperties(sub, fbsProjectSubcontractingListVO);
|
BeanUtil.copyProperties(sub, fbsProjectSubcontractingListVO);
|
||||||
String applyStatus = map.get(sub.getId());
|
// String applyStatus = map.get(sub.getId());
|
||||||
fbsProjectSubcontractingListVO.setApplyStatus(applyStatus);
|
// fbsProjectSubcontractingListVO.setApplyStatus(applyStatus);
|
||||||
if (sub.getUserId() != null && !sub.getUserId().equals(SecurityUtils.getAppUserId())) {
|
// if (sub.getUserId() != null && !sub.getUserId().equals(SecurityUtils.getAppUserId())) {
|
||||||
fbsProjectSubcontractingListVO.setApplyStatus(SubcontractingApplyStatus.CHOOSE.getCode());
|
// fbsProjectSubcontractingListVO.setApplyStatus(SubcontractingApplyStatus.CHOOSE.getCode());
|
||||||
}
|
// }
|
||||||
subListVO.add(fbsProjectSubcontractingListVO);
|
subListVO.add(fbsProjectSubcontractingListVO);
|
||||||
}
|
}
|
||||||
|
if(CollectionUtil.isEmpty(subListVO)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
|
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
|
||||||
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
|
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
|
||||||
fbsProjectSectionListVO.setSubList(subListVO);
|
fbsProjectSectionListVO.setSubList(subListVO);
|
||||||
@ -327,7 +336,9 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
|
|||||||
//查询项目下的所有申请
|
//查询项目下的所有申请
|
||||||
List<ZbfProjectSubcontractingApply> applyList = zbfProjectSubcontractingApplyService.list(Wrappers.<ZbfProjectSubcontractingApply>lambdaQuery()
|
List<ZbfProjectSubcontractingApply> applyList = zbfProjectSubcontractingApplyService.list(Wrappers.<ZbfProjectSubcontractingApply>lambdaQuery()
|
||||||
.eq(ZbfProjectSubcontractingApply::getProjectId, projectId)
|
.eq(ZbfProjectSubcontractingApply::getProjectId, projectId)
|
||||||
.eq(ZbfProjectSubcontractingApply::getFbsUserId, SecurityUtils.getAppUserId()));
|
.eq(ZbfProjectSubcontractingApply::getFbsUserId, SecurityUtils.getAppUserId())
|
||||||
|
.eq(ZbfProjectSubcontractingApply::getApplyStatus, SubcontractingApplyStatus.APPLY.getCode())
|
||||||
|
);
|
||||||
HashMap<Long, String> map = applyList.stream()
|
HashMap<Long, String> map = applyList.stream()
|
||||||
.collect(Collectors.toMap(
|
.collect(Collectors.toMap(
|
||||||
ZbfProjectSubcontractingApply::getSubId,
|
ZbfProjectSubcontractingApply::getSubId,
|
||||||
@ -346,20 +357,27 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
|
|||||||
//查询标段下的所有的分包
|
//查询标段下的所有的分包
|
||||||
List<ZbfProjectSubcontracting> subList = zbfProjectSubcontractingService.list(Wrappers.<ZbfProjectSubcontracting>lambdaQuery()
|
List<ZbfProjectSubcontracting> subList = zbfProjectSubcontractingService.list(Wrappers.<ZbfProjectSubcontracting>lambdaQuery()
|
||||||
.eq(ZbfProjectSubcontracting::getSectionId, zbfProjectSection.getId())
|
.eq(ZbfProjectSubcontracting::getSectionId, zbfProjectSection.getId())
|
||||||
//.isNull(ZbfProjectSubcontracting::getUserId)
|
.isNull(ZbfProjectSubcontracting::getUserId)
|
||||||
);
|
);
|
||||||
//排除掉已申请的分包
|
|
||||||
for (ZbfProjectSubcontracting sub : subList) {
|
|
||||||
|
|
||||||
|
for (ZbfProjectSubcontracting sub : subList) {
|
||||||
|
//排除掉已申请的分包
|
||||||
|
if (map.get(sub.getId()) != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
FbsProjectSubcontractingListVO fbsProjectSubcontractingListVO = new FbsProjectSubcontractingListVO();
|
FbsProjectSubcontractingListVO fbsProjectSubcontractingListVO = new FbsProjectSubcontractingListVO();
|
||||||
BeanUtil.copyProperties(sub, fbsProjectSubcontractingListVO);
|
BeanUtil.copyProperties(sub, fbsProjectSubcontractingListVO);
|
||||||
String applyStatus = map.get(sub.getId());
|
// String applyStatus = map.get(sub.getId());
|
||||||
fbsProjectSubcontractingListVO.setApplyStatus(applyStatus);
|
// fbsProjectSubcontractingListVO.setApplyStatus(applyStatus);
|
||||||
if (sub.getUserId() != null && !sub.getUserId().equals(SecurityUtils.getAppUserId())) {
|
// if (sub.getUserId() != null && !sub.getUserId().equals(SecurityUtils.getAppUserId())) {
|
||||||
fbsProjectSubcontractingListVO.setApplyStatus(SubcontractingApplyStatus.CHOOSE.getCode());
|
// fbsProjectSubcontractingListVO.setApplyStatus(SubcontractingApplyStatus.CHOOSE.getCode());
|
||||||
}
|
// }
|
||||||
subListVO.add(fbsProjectSubcontractingListVO);
|
subListVO.add(fbsProjectSubcontractingListVO);
|
||||||
}
|
}
|
||||||
|
if (CollectionUtil.isEmpty(subListVO)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
|
FbsProjectSectionListVO fbsProjectSectionListVO = new FbsProjectSectionListVO();
|
||||||
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
|
BeanUtil.copyProperties(zbfProjectSection, fbsProjectSectionListVO);
|
||||||
fbsProjectSectionListVO.setSubList(subListVO);
|
fbsProjectSectionListVO.setSubList(subListVO);
|
||||||
@ -994,6 +1012,12 @@ public class ZbfProjectServiceImpl extends ServicePlusImpl<ZbfProjectMapper, Zbf
|
|||||||
@Override
|
@Override
|
||||||
public TableDataInfo<ZbfProject> zbfSwitchList(ZbfProjectSwitchListDTO dto) {
|
public TableDataInfo<ZbfProject> zbfSwitchList(ZbfProjectSwitchListDTO dto) {
|
||||||
LambdaQueryWrapper<ZbfProject> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ZbfProject> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
if("1".equals(dto.getProjectStatus())){
|
||||||
|
wrapper.in(ZbfProject::getProjectStatus, Arrays.asList(ProjectStatus.NOT_START.getCode(), ProjectStatus.START.getCode()));
|
||||||
|
}else if("2".equals(dto.getProjectStatus())){
|
||||||
|
wrapper.eq(ZbfProject::getProjectStatus, ProjectStatus.COMPLETE.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
wrapper.eq(ZbfProject::getUserId, SecurityUtils.getAppUserId());
|
wrapper.eq(ZbfProject::getUserId, SecurityUtils.getAppUserId());
|
||||||
wrapper.like(StrUtil.isNotBlank(dto.getProjectName()), ZbfProject::getProjectName, dto.getProjectName());
|
wrapper.like(StrUtil.isNotBlank(dto.getProjectName()), ZbfProject::getProjectName, dto.getProjectName());
|
||||||
wrapper.orderByDesc(ZbfProject::getId);
|
wrapper.orderByDesc(ZbfProject::getId);
|
||||||
|
@ -30,11 +30,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
project_img,
|
project_img,
|
||||||
project_status
|
project_status
|
||||||
FROM zbf_project zp
|
FROM zbf_project zp
|
||||||
<where>
|
where EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM zbf_project_subcontracting zps
|
||||||
|
WHERE zps.project_id = zp.id
|
||||||
|
AND zps.user_id IS NULL
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM zbf_project_subcontracting_apply zpsa
|
||||||
|
WHERE zpsa.sub_id = zps.id
|
||||||
|
AND zpsa.fbs_user_id = #{dto.fbsUserId}
|
||||||
|
AND zpsa.apply_status = '0'
|
||||||
|
)
|
||||||
|
)
|
||||||
<if test="dto.projectName != null and dto.projectName != ''">
|
<if test="dto.projectName != null and dto.projectName != ''">
|
||||||
AND zp.project_name like concat('%', #{dto.projectName}, '%')
|
AND zp.project_name like concat('%', #{dto.projectName}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
|
||||||
order by zp.id desc
|
order by zp.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -96,10 +108,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
project_img,
|
project_img,
|
||||||
project_status
|
project_status
|
||||||
FROM zbf_project zp
|
FROM zbf_project zp
|
||||||
where zp.id in (select zpsa.project_id from zbf_project_subcontracting_apply zpsa
|
where zp.id in (select zpsa.project_id from zbf_project_subcontracting_apply zpsa
|
||||||
where zpsa.fbs_user_id = #{dto.fbsUserId}
|
where zpsa.fbs_user_id = #{dto.fbsUserId}
|
||||||
and zpsa.apply_status in ('0','1')
|
<if test="dto.type == 0 ">
|
||||||
)
|
and zpsa.apply_status = '0'
|
||||||
|
</if>
|
||||||
|
<if test="dto.type == 1 or dto.type == 2">
|
||||||
|
and zpsa.apply_status = '1'
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
<if test="dto.type == 1 ">
|
||||||
|
and zp.project_status = '1'
|
||||||
|
</if>
|
||||||
|
<if test="dto.type == 2 ">
|
||||||
|
and zp.project_status = '2'
|
||||||
|
</if>
|
||||||
order by zp.id desc
|
order by zp.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@
|
|||||||
const app = createApp({
|
const app = createApp({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
baseUrl: "http://192.168.110.3:9099",
|
baseUrl: "http://192.168.110.5:9097",
|
||||||
themeOptions: [],
|
themeOptions: [],
|
||||||
selectedTheme: "",
|
selectedTheme: "",
|
||||||
currentList: [],
|
currentList: [],
|
||||||
@ -277,7 +277,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
const protocol = window.location.protocol;
|
const protocol = window.location.protocol;
|
||||||
const host = window.location.host;
|
const host = window.location.host;
|
||||||
// this.baseUrl = `${protocol}//${host}/lhyg`; // 动态获取基础 URL
|
this.baseUrl = `${protocol}//${host}/lhyg`; // 动态获取基础 URL
|
||||||
// 获取 URL 中的 userId 参数
|
// 获取 URL 中的 userId 参数
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.userId = urlParams.get("userId");
|
this.userId = urlParams.get("userId");
|
||||||
|
Reference in New Issue
Block a user