增加接口和app初始头像

This commit is contained in:
2025-03-10 14:30:07 +08:00
parent 708458df71
commit 0dd222e9f3
8 changed files with 80 additions and 11 deletions

View File

@ -7,15 +7,18 @@
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
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.bgt.service.IBgtUserService;
import com.ruoyi.common.bo.AnnexQueryBo; import com.ruoyi.common.bo.AnnexQueryBo;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.BgtUser;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.domain.Annex; import com.ruoyi.common.domain.Annex;
import com.ruoyi.common.service.IAnnexService; import com.ruoyi.common.service.IAnnexService;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.web.controller.bgt.BgtUserController;
import com.ruoyi.wgz.bo.res.*; import com.ruoyi.wgz.bo.res.*;
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree; import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperThree;
import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperTwo; import com.ruoyi.wgz.bo.rests.WgzAppGetTestPaperTwo;
@ -101,6 +104,9 @@
@Autowired @Autowired
private IWgzMessageService iWgzMessageService; private IWgzMessageService iWgzMessageService;
@Autowired
private IBgtUserService bgtUserService;
/** /**
* 【注册】务工者注册 * 【注册】务工者注册
@ -594,6 +600,24 @@
return AjaxResult.success(iWgzMessageService.userReadUnread(req)); return AjaxResult.success(iWgzMessageService.userReadUnread(req));
} }
/**
* 【获取审批人】
*/
@ApiOperation("【通用】获取审批人")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetTheApprover')")
@GetMapping("/WgzAppUserGetTheApprover")
public AjaxResult<WgzAppUserGetTheApproverRes> userGetTheApprover() {
Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
BgtUser byId = bgtUserService.selectUserByUserId(appById.getUserId());
return AjaxResult.success(new WgzAppUserGetTheApproverRes().
setUserId(byId.getUserId()).
setUsername(byId.getUsername()).
setAvatarName(byId.getAvatarName())
);
}
/** /**
@ -619,9 +643,9 @@
return section; return section;
} }
/** // /**
* 【我的】【实名认证】实名认证·删除附件 // * 【我的】【实名认证】实名认证·删除附件
*/ // */
// @ApiOperation("APP务工者-实名认证·删除附件") // @ApiOperation("APP务工者-实名认证·删除附件")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')") // //@PreAuthorize("@ss.hasPermi('wgzApp:user:userDeleteAttachment')")
// @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}") // @DeleteMapping("/WgzUserDeleteAttachment/{attachmentId}")
@ -630,9 +654,9 @@
// } // }
/** // /**
* 【首页】【项目进行中】 项目进行中·申请工资结算(查询) // * 【首页】【项目进行中】 项目进行中·申请工资结算(查询)
*/ // */
// @ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(查询)") // @ApiOperation("【首页】【项目进行中】 项目进行中·申请工资结算(查询)")
// //@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')") // //@PreAuthorize("@ss.hasPermi('wgzApp:user:userApplyForPayrollSettlementFind')")
// @GetMapping("/WgzAppUserApplyForPayrollSettlementFind") // @GetMapping("/WgzAppUserApplyForPayrollSettlementFind")

View File

@ -585,7 +585,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
setSubheading(wgzMessage(mp, "108")). setSubheading(wgzMessage(mp, "108")).
setTableId(apply.getId()). setTableId(apply.getId()).
setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
setMessageLargeType(LARGE_APPLY); setMessageLargeType(SMALL_SYSTEM);
if (!iWgzMessageService.sendAMessage(wgzMessage)) { if (!iWgzMessageService.sendAMessage(wgzMessage)) {
throw new RuntimeException("系统消息报名同意发送失败!"); throw new RuntimeException("系统消息报名同意发送失败!");
} }

View File

@ -234,7 +234,9 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
WgzAppCancelRegistrationProjectDetailsRes res = new WgzAppCancelRegistrationProjectDetailsRes(); WgzAppCancelRegistrationProjectDetailsRes res = new WgzAppCancelRegistrationProjectDetailsRes();
BeanUtils.copyProperties(wgzAppProjectDetailsRes,res); BeanUtils.copyProperties(wgzAppProjectDetailsRes,res);
res.setNumberOfRegistered(wgzUser.size()); res.setNumberOfRegistered(wgzUser.size());
if (!wgzUser.isEmpty()){
res.setUserList(wgzUser); res.setUserList(wgzUser);
}
return res; return res;
} }

View File

@ -72,6 +72,12 @@ public class WgzAppCancelRegistrationProjectDetailsRes implements Serializable {
@ApiModelProperty("招工要求") @ApiModelProperty("招工要求")
private String recruitRequirement; private String recruitRequirement;
@ApiModelProperty("工种")
private String typeOfWork;
@ApiModelProperty("工种名称")
private String typeOfWorkLabel;
@ApiModelProperty("已报名数量") @ApiModelProperty("已报名数量")
private Integer numberOfRegistered; private Integer numberOfRegistered;

View File

@ -0,0 +1,31 @@
package com.ruoyi.wgz.bo.res;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("通用审批人信息返回")
public class WgzAppUserGetTheApproverRes implements Serializable {
/** 唯一标识 */
@Excel(name = "唯一标识")
@ApiModelProperty("唯一标识")
private Long userId;
/** 姓名 */
@Excel(name = "姓名")
@ApiModelProperty("姓名")
private String username;
/** 头像地址 */
@Excel(name = "头像地址")
@ApiModelProperty("头像地址")
private String avatarName;
}

View File

@ -57,6 +57,11 @@ public class WgzApplyForPayrollSettlementAddRes implements Serializable {
@ApiModelProperty("开工日期") @ApiModelProperty("开工日期")
private String recruitWorkBeginTime; private String recruitWorkBeginTime;
@ApiModelProperty("工种")
private String typeOfWork;
@ApiModelProperty("工种名称")
private String typeOfWorkLabel;
@ApiModelProperty("联系人") @ApiModelProperty("联系人")
private String recruitContactPerson; private String recruitContactPerson;

View File

@ -298,7 +298,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
//2、获取当前人、当前工地、当前月的所有考勤记录 //2、获取当前人、当前工地、当前月的所有考勤记录
LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>(). LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>().
eq(WgzAttendance::getUserId, appUserId). eq(WgzAttendance::getUserId, appUserId).
eq(WgzAttendance::getRecruitId, by.getId()). eq(WgzAttendance::getRecruitId, by.getRecruitId()).
apply("DATE_FORMAT(date, '%Y-%m') = {0}", format); apply("DATE_FORMAT(date, '%Y-%m') = {0}", format);
List<WgzAttendance> wgzAttendances = baseMapper.selectList(apply); List<WgzAttendance> wgzAttendances = baseMapper.selectList(apply);
//3、组装返回数据 //3、组装返回数据
@ -317,7 +317,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
if (wa.getClockOutTime() != null) { if (wa.getClockOutTime() != null) {
two.setNum(2); two.setNum(2);
two.setManHour(calculateWorkingHours(wa.getClockInTime(), wa.getClockOutTime())); two.setManHour(calculateWorkingHours(wa.getClockInTime(), wa.getClockOutTime()));
two.setSb(sbOrXb(wa, 2)); two.setXb(sbOrXb(wa, 2));
} }
} }
mp.put(date, two); mp.put(date, two);
@ -545,7 +545,6 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
*/ */
public WgzAppPunchTheCalendarRecordThree sbOrXb(WgzAttendance wa, int num) { public WgzAppPunchTheCalendarRecordThree sbOrXb(WgzAttendance wa, int num) {
WgzAppPunchTheCalendarRecordThree sbb = new WgzAppPunchTheCalendarRecordThree(). WgzAppPunchTheCalendarRecordThree sbb = new WgzAppPunchTheCalendarRecordThree().
setClockingTime(wa.getClockInTime()).
setPnchOsition(wa.getPnchOsition()). setPnchOsition(wa.getPnchOsition()).
setPnchOsitionX(wa.getPnchOsitionX()). setPnchOsitionX(wa.getPnchOsitionX()).
setClockingCondition(0); //正常 setClockingCondition(0); //正常
@ -554,6 +553,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
sbb.setClockingCondition(7); sbb.setClockingCondition(7);
} }
if (num == 1) { if (num == 1) {
sbb.setClockingTime(wa.getClockInTime());
//判断上班迟到 //判断上班迟到
if (wa.getLate() == 1) { if (wa.getLate() == 1) {
sbb.setClockingCondition(1); sbb.setClockingCondition(1);
@ -564,6 +564,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
} }
} }
if (num == 2) { if (num == 2) {
sbb.setClockingTime(wa.getClockOutTime());
//判断下班早退 //判断下班早退
if (wa.getEarlyLeave() == 1) { if (wa.getEarlyLeave() == 1) {
sbb.setClockingCondition(2); sbb.setClockingCondition(2);