This commit is contained in:
2025-03-03 13:54:27 +08:00
parent 7d11552c32
commit a96327c890
7 changed files with 27 additions and 13 deletions

View File

@ -406,8 +406,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
bgtProjectRecruitApply.setStatus("7");
if (baseMapper.updateById(bgtProjectRecruitApply) > 0) {
Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getUserId());
// BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId);
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
Map<String, String> mp = new HashMap<>();
mp.put("projectName", appById.getRecruitName());
//发送取消报名的系统消息
@ -444,15 +445,16 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
WgzUser byUserId = wgzUserService.findByUserId(SecurityUtils.getAppUserId());
//2、当前申请报名的工地信息
BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId());
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId());
//3、更新报名状态
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
//3、更新报名状态、及更新消息的操作状态
BgtProjectRecruitApply apply = new BgtProjectRecruitApply();
apply.setId(req.getRecruitApplyId());
apply.setStatus(req.getStatus());
int insert = baseMapper.insert(apply);
if (insert == 0) {
int up = baseMapper.updateById(apply);
if (up == 0) {
throw new RuntimeException("插入数据失败!");
}
iWgzMessageService.updateById(new WgzMessage().setId(req.getMessageId()).setIsOperation("2"));
//4系统拒绝消息
SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", recruit.getTypeOfWork());
Map<String, String> mp = new HashMap<>();
@ -476,7 +478,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
setSenderType(USERTYPE_WGZ).
setSenderId(byUserId.getUserId()).
setRecipientType(USERTYPE_BGT).
setRecipientId(apply.getUserId()).
setRecipientId(recruit.getUserId()).
setHeadline(wgzMessage(mp, "203")).
setSubheading(wgzMessage(mp, "204")).
setTableId(apply.getId()).

View File

@ -17,6 +17,9 @@ public class WgzAppConfirmRegistrationReq implements Serializable {
@ApiModelProperty("招工ID")
private Long recruitApplyId;
@ApiModelProperty("消息ID")
private Long messageId;
@ApiModelProperty("3务工者同意 4务工者拒绝 ")
@Pattern(regexp = "^(3|4)$", message = "status 只能是 3 或 4")
private String status;

View File

@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
@Data
@ -43,7 +44,7 @@ public class WgzAppRealNameAuthenticationReq implements Serializable {
@ApiModelProperty("出生日期")
@NotBlank(message = "出生日期不能为空")
private String birthdate;
private LocalDate birthdate;
@ApiModelProperty("身份证号码")
@NotBlank(message = "身份证号码不能为空")

View File

@ -26,6 +26,10 @@ public class WgzAppRegistrationInformationRes implements Serializable {
@ApiModelProperty("招工申请ID")
private Long recruitApplyId;
@ApiModelProperty("消息ID")
private Long messageId;
//==============
@ApiModelProperty("封面图(多个逗号分隔)")
private String coverPlan;
@ -37,10 +41,10 @@ public class WgzAppRegistrationInformationRes implements Serializable {
private String recruitName;
@ApiModelProperty("招工金额")
private BigDecimal recruitAmount;
private String recruitAmount;
@ApiModelProperty("招工数量")
private Integer recruitStaffNum;
private String recruitStaffNum;
@ApiModelProperty("任务名称")
private String taskName;
@ -66,6 +70,9 @@ public class WgzAppRegistrationInformationRes implements Serializable {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否需要操作0不需要 1需要 2已操作")
private String isOperation;
// @ApiModelProperty("附件实体数据")
// private List<Annex> annex;

View File

@ -206,10 +206,10 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
//1、获取当前消息的招工ID
WgzMessage byId = this.getById(messageId);
//2、根据招工ID得到招工信息及附件
WgzAppRegistrationInformationRes byRecruitIdData = baseMapper.findByRecruitIdData(byId.getId());
WgzAppRegistrationInformationRes byRecruitIdData = baseMapper.findByRecruitIdData(byId.getTableId());
// List<Annex> byUserIdAndRecruitId = annexService.findByUserIdAndRecruitId(appUserId, byId.getId(), new String[]{"1"});
// byRecruitIdData.setAnnex(null);
return byRecruitIdData;
return byRecruitIdData.setMessageId(byId.getId()).setIsOperation(byId.getIsOperation());
}
@Override

View File

@ -125,12 +125,13 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
//1、查询手机号是否存在
Integer count = baseMapper.selectCount(
new LambdaQueryWrapper<WgzUser>().
eq(WgzUser::getPhone, wgzUser.getPhone())
eq(WgzUser::getPhone, bo.getPhone())
);
if (count>0){
throw new RuntimeException("当前手机号已存在!");
}
//2、组装数据 BeanUtils.copyProperties(bo,wgzUser);
wgzUser.setUsername(bo.getPhone());
wgzUser.setPhone(bo.getPhone());
wgzUser.setUserId(SnowflakeIdUtil.generateId());
wgzUser.setCreateBy("admin").