逻辑变更

This commit is contained in:
2025-03-25 17:54:48 +08:00
parent 8fe084ddb7
commit 1531913a43
75 changed files with 138 additions and 59 deletions

View File

@ -20,19 +20,17 @@
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.wgz.bo.req.*;
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;
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex; import com.ruoyi.wgz.bo.rests.WgzAutonymAnnex;
import com.ruoyi.wgz.bo.req.*;
import com.ruoyi.wgz.domain.WgzAttendance; import com.ruoyi.wgz.domain.WgzAttendance;
import com.ruoyi.wgz.domain.WgzMessage; import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.wgz.domain.WgzPayCalculation; import com.ruoyi.wgz.domain.WgzPayCalculation;
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration; import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
import com.ruoyi.wgz.service.*; import com.ruoyi.wgz.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -452,6 +450,7 @@
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
// BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); // BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.getById(recruitApplyId); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.getById(recruitApplyId);
res.setRecruitApplyId(by.getId());
// BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); // BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
//1、先获取项目详情基本信息 //1、先获取项目详情基本信息
WgzAppProjectDetailsRes appById = iBgtProjectRecruitService.userProjectDetails(by.getRecruitId()); WgzAppProjectDetailsRes appById = iBgtProjectRecruitService.userProjectDetails(by.getRecruitId());
@ -729,13 +728,19 @@
/** /**
* 【获取审批人】 * 【获取审批人】
*/ */
@ApiOperation("【通用】获取审批人") @ApiOperation("【通用】获取审批人(默认0获取当前项目)")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetTheApprover')") //@PreAuthorize("@ss.hasPermi('wgzApp:user:userGetTheApprover')")
@GetMapping("/WgzAppUserGetTheApprover") @GetMapping("/WgzAppUserGetTheApprover/{recruitApplyId}")
public AjaxResult<WgzAppUserGetTheApproverRes> userGetTheApprover() { public AjaxResult<WgzAppUserGetTheApproverRes> userGetTheApprover(@NotNull(message = "招工申请ID不能为空") @PathVariable("recruitApplyId") Long recruitApplyId) {
Long appUserId = SecurityUtils.getAppUserId(); Long id = 0L;
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); if (recruitApplyId == 0){
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(SecurityUtils.getAppUserId());
id = by.getRecruitId();
}else{
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.getById(recruitApplyId);
id = by.getRecruitId();
}
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(id);
BgtUser byId = bgtUserService.selectUserByUserId(appById.getUserId()); BgtUser byId = bgtUserService.selectUserByUserId(appById.getUserId());
return AjaxResult.success(new WgzAppUserGetTheApproverRes(). return AjaxResult.success(new WgzAppUserGetTheApproverRes().
setUserId(byId.getUserId()). setUserId(byId.getUserId()).

View File

@ -17,6 +17,8 @@
<dependencies> <dependencies>
<!-- Spring框架基本的核心工具 --> <!-- Spring框架基本的核心工具 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

View File

@ -22,6 +22,12 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.12</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>

View File

@ -2,13 +2,21 @@ package com.ruoyi.wgz.bo.req;
import com.ruoyi.common.bo.PageReq; import com.ruoyi.common.bo.PageReq;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
@ApiModel("补卡申请历史记录请求对象") @ApiModel("补卡申请历史记录请求对象")
public class WgzAppReplacementCardRecordReq extends PageReq { public class WgzAppReplacementCardRecordReq extends PageReq {
@ApiModelProperty("招工申请ID")
@NotNull(message = "招工申请ID")
private Long recruitApplyId;
} }

View File

@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
@ -17,4 +18,7 @@ public class WgzAppUserPunchTheCalendarRecordReq implements Serializable {
@ApiModelProperty("年月日期2025-02") @ApiModelProperty("年月日期2025-02")
@NotBlank(message = "年月不能为空") @NotBlank(message = "年月不能为空")
private String yearMonth; private String yearMonth;
@NotNull(message = "招工主键ID")
private Long recruitId;
} }

View File

@ -1,11 +1,6 @@
package com.ruoyi.wgz.bo.req; package com.ruoyi.wgz.bo.req;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.domain.Annex;
import com.ruoyi.wgz.domain.WgzPayCalculationFiles; import com.ruoyi.wgz.domain.WgzPayCalculationFiles;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -14,11 +9,9 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@Data @Data
@ -33,6 +26,9 @@ public class WgzApplyForPayrollSettlementAddReq implements Serializable {
@ApiModelProperty("招工ID") @ApiModelProperty("招工ID")
private Long recruitId; private Long recruitId;
@ApiModelProperty("招工申请ID")
private Long recruitApplyId;
@ApiModelProperty("任务名称") @ApiModelProperty("任务名称")
private String taskName; private String taskName;

View File

@ -23,6 +23,9 @@ public class WgzApplyForPayrollSettlementAddRes implements Serializable {
@ApiModelProperty("项目ID") @ApiModelProperty("项目ID")
private Long projectId; private Long projectId;
@ApiModelProperty("招工申请主键ID")
private Long recruitApplyId;
//============== //==============
@ApiModelProperty("封面图(多个逗号分隔)") @ApiModelProperty("封面图(多个逗号分隔)")
private String coverPlan; private String coverPlan;

View File

@ -27,5 +27,5 @@ public class ExaminationPaper implements Serializable {
private String sign; private String sign;
private String openid; private String userId;
} }

View File

@ -34,7 +34,7 @@ public interface WgzQuestionSaveMapper extends BaseMapperPlus<WgzQuestionSave> {
//获取生成pdf所需要的数据 //获取生成pdf所需要的数据
@Select("SELECT SUM(score) FROM wgz_question_save WHERE user_id=#{userId} AND correct=1") @Select("SELECT SUM(score) FROM wgz_question_save WHERE user_id=#{userId} AND correct=1")
double pdfSumScore (@Param("userId") Long userId); String pdfSumScore (@Param("userId") Long userId);
// //
@Select("SELECT c.question_type,c.question_text,c.OPTIONS,a.answer,c.correct_answer,a.correct,a.score,a.sign,a.id,a.pass,b.username FROM wgz_question_save AS a LEFT JOIN wgz_user AS b ON b.user_id=a.user_id LEFT JOIN wgz_question_bank AS c ON a.bank_id=c.id WHERE a.user_id=#{userId}") @Select("SELECT c.question_type,c.question_text,c.OPTIONS,a.answer,c.correct_answer,a.correct,a.score,a.sign,a.id,a.pass,b.username FROM wgz_question_save AS a LEFT JOIN wgz_user AS b ON b.user_id=a.user_id LEFT JOIN wgz_question_bank AS c ON a.bank_id=c.id WHERE a.user_id=#{userId}")

View File

@ -26,7 +26,11 @@ public interface WgzReissueacardMapper extends BaseMapperPlus<WgzReissueacard> {
* @param page 分页对象 * @param page 分页对象
* @return 分页查询结果 * @return 分页查询结果
*/ */
Page<WgzReplacementCardRecordRes> userReplacementCardRecordListPage(@Param("page") Page<WgzAppReplacementCardRecordReq> page,@Param("userId") Long userId); Page<WgzReplacementCardRecordRes> userReplacementCardRecordListPage(
@Param("page") Page<WgzAppReplacementCardRecordReq> page,
@Param("userId") Long userId,
@Param("recruitApplyId") Long recruitApplyId
);
Page<BgtAuditResultVO> appQueryPageList(@Param("page") Page<BgtAuditListDTO> page, @Param("dto") BgtAuditListDTO dto); Page<BgtAuditResultVO> appQueryPageList(@Param("page") Page<BgtAuditListDTO> page, @Param("dto") BgtAuditListDTO dto);

View File

@ -302,7 +302,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
@Override @Override
public WgzAppPunchTheCalendarRecordRes userPunchTheCalendarRecord(WgzAppUserPunchTheCalendarRecordReq req) { public WgzAppPunchTheCalendarRecordRes userPunchTheCalendarRecord(WgzAppUserPunchTheCalendarRecordReq req) {
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); // BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
//1、获取当月的所有日期 //1、获取当月的所有日期
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
YearMonth yearMonth = YearMonth.parse(req.getYearMonth(), formatter); YearMonth yearMonth = YearMonth.parse(req.getYearMonth(), formatter);
@ -318,7 +318,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.getRecruitId()). eq(WgzAttendance::getApplyKey, req.getRecruitId()).
apply("DATE_FORMAT(date, '%Y-%m') = {0}", req.getYearMonth()); apply("DATE_FORMAT(date, '%Y-%m') = {0}", req.getYearMonth());
List<WgzAttendance> wgzAttendances = baseMapper.selectList(apply); List<WgzAttendance> wgzAttendances = baseMapper.selectList(apply);
//3、组装返回数据 //3、组装返回数据
@ -357,12 +357,10 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
@Override @Override
public WgzAppCardReplacementApplicationRes userCardReplacementApplication() { public WgzAppCardReplacementApplicationRes userCardReplacementApplication() {
WgzAppCardReplacementApplicationRes wgzAppCardReplacementApplicationRes = new WgzAppCardReplacementApplicationRes(); WgzAppCardReplacementApplicationRes wgzAppCardReplacementApplicationRes = new WgzAppCardReplacementApplicationRes();
//1、获取当前用户信息
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
//2、获取当前用户所在的工地id
BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId);
//3、根据工地id得到完整的工地信息 Long id = by.getRecruitId();
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(id);
//4、查询所有缺卡、迟到、早退的打卡记录 //4、查询所有缺卡、迟到、早退的打卡记录
LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>(). LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>().
eq(WgzAttendance::getUserId, appUserId). eq(WgzAttendance::getUserId, appUserId).

View File

@ -2,46 +2,43 @@ package com.ruoyi.wgz.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
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.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.bgt.domain.BgtProjectRecruit; import com.ruoyi.bgt.domain.BgtProjectRecruit;
import com.ruoyi.bgt.domain.BgtProjectRecruitApply;
import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper;
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.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.domain.Annex; import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.service.IAnnexService; import com.ruoyi.common.service.IAnnexService;
import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.core.page.PagePlus;
import com.ruoyi.common.core.page.TableDataInfo;
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.wgz.bo.req.WgzAppConfirmRegistrationReq; import com.ruoyi.wgz.bo.WgzMessageQueryBo;
import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq; import com.ruoyi.wgz.bo.req.WgzAppGetMessageListReq;
import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq;
import com.ruoyi.wgz.bo.req.WgzAppReadUnreadReq; import com.ruoyi.wgz.bo.req.WgzAppReadUnreadReq;
import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes; import com.ruoyi.wgz.bo.res.WgzAppGetMessageListRes;
import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes; import com.ruoyi.wgz.bo.res.WgzAppMessageTypeStatisticsRes;
import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes; import com.ruoyi.wgz.bo.res.WgzAppRegistrationInformationRes;
import com.ruoyi.wgz.bo.rests.WgzAppMessageTypeStatisticsTwo;
import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo; import com.ruoyi.wgz.bo.rests.WgzAppUserAllRecruitmentTwo;
import com.ruoyi.wgz.domain.*; import com.ruoyi.wgz.domain.WgzLeave;
import com.ruoyi.wgz.domain.WgzMessage;
import com.ruoyi.wgz.domain.WgzReissueacard;
import com.ruoyi.wgz.domain.WgzUser;
import com.ruoyi.wgz.mapper.WgzMessageMapper;
import com.ruoyi.wgz.service.IWgzLeaveService; import com.ruoyi.wgz.service.IWgzLeaveService;
import com.ruoyi.wgz.service.IWgzMessageService;
import com.ruoyi.wgz.service.IWgzReissueacardService; import com.ruoyi.wgz.service.IWgzReissueacardService;
import com.ruoyi.wgz.service.IWgzUserService; import com.ruoyi.wgz.service.IWgzUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.wgz.bo.WgzMessageQueryBo;
import com.ruoyi.wgz.mapper.WgzMessageMapper;
import com.ruoyi.wgz.service.IWgzMessageService;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.*;
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.USERTYPE_BGT;
import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.USERTYPE_WGZ;
/** /**
* 消息Service业务层处理 * 消息Service业务层处理
@ -237,7 +234,6 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
//0、待办的查询(查出指定用戶所有的待办) //0、待办的查询(查出指定用戶所有的待办)
String largeType = req.getLargeType(); String largeType = req.getLargeType();
if (largeType!=null && largeType.equals("3")){ if (largeType!=null && largeType.equals("3")){
System.out.println("?????????? "+req.getLargeType());
Page<WgzAppGetMessageListRes> pe = baseMapper.pagingQueryTheMessageList(queryDTOPage, req); Page<WgzAppGetMessageListRes> pe = baseMapper.pagingQueryTheMessageList(queryDTOPage, req);
return PageUtils.buildDataInfo(pe); return PageUtils.buildDataInfo(pe);
} }

View File

@ -20,8 +20,10 @@ import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO;
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.bgt.service.IBgtUserService;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constants.WgzAndBgtMessageConstant; import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
import com.ruoyi.common.core.domain.entity.BgtUser;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
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;
@ -77,6 +79,9 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
@Autowired @Autowired
private IFbsProjectTaskService taskService; private IFbsProjectTaskService taskService;
@Autowired
private IBgtUserService bgtUserService;
@Autowired @Autowired
private IWgzAttendanceService attendanceService; private IWgzAttendanceService attendanceService;
@ -179,13 +184,21 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
//1、获取当前人 //1、获取当前人
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
WgzUser byUserId = wgzUserService.findByUserId(user.getUserId()); WgzUser byUserId = wgzUserService.findByUserId(user.getUserId());
BgtProjectRecruitApply recruitApply = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(user.getUserId()); Long id = 0L;
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId()); if (req.getRecruitApplyId() == 0){
BgtProjectRecruitApply byId = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(user.getUserId());
id = byId.getRecruitId();
}else{
BgtProjectRecruitApply byId = iBgtProjectRecruitApplyService.getById(req.getRecruitApplyId());
id = byId.getRecruitId();
}
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(id);
BgtUser byId1 = bgtUserService.getById(recruit.getUserId());
//2、查看当前申请结算的天数是否大于剩余天数 //2、查看当前申请结算的天数是否大于剩余天数
LambdaQueryWrapper<WgzAttendance> attWra = new LambdaQueryWrapper<WgzAttendance>(). LambdaQueryWrapper<WgzAttendance> attWra = new LambdaQueryWrapper<WgzAttendance>().
eq(WgzAttendance::getUserId, user.getUserId()). eq(WgzAttendance::getUserId, user.getUserId()).
eq(WgzAttendance::getSettlement, 0). //为0就表示当天工资还未结算 eq(WgzAttendance::getSettlement, 0). //为0就表示当天工资还未结算
eq(WgzAttendance::getRecruitId, recruitApply.getRecruitId()).and(wrapper -> wrapper eq(WgzAttendance::getRecruitId, id).and(wrapper -> wrapper
.isNotNull(WgzAttendance::getClockInTime) .isNotNull(WgzAttendance::getClockInTime)
.or() .or()
.isNotNull(WgzAttendance::getClockOutTime) .isNotNull(WgzAttendance::getClockOutTime)
@ -213,10 +226,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
WgzPayCalculation wgzPayCalculation = new WgzPayCalculation(); WgzPayCalculation wgzPayCalculation = new WgzPayCalculation();
BeanUtils.copyProperties(req,wgzPayCalculation); BeanUtils.copyProperties(req,wgzPayCalculation);
wgzPayCalculation. wgzPayCalculation.
setApplyKey(recruitApply.getId()). setApplyKey(req.getRecruitApplyId()).
setUserId(user.getUserId()). setUserId(user.getUserId()).
setUserName(byUserId.getUsername()). setUserName(byUserId.getUsername()).
setAuditorUserId(recruit.getUserId()); setAuditorUserId(recruit.getUserId()).setAuditorUserName(byId1.getUsername());
boolean save = save(wgzPayCalculation); boolean save = save(wgzPayCalculation);
if (!save) { if (!save) {
throw new RuntimeException("结算新增失败!"); throw new RuntimeException("结算新增失败!");

View File

@ -14,9 +14,7 @@ import com.ruoyi.wgz.bo.WgzQuestionSaveQueryBo;
import com.ruoyi.wgz.bo.req.WgzAppSubmitATestPaperReq; import com.ruoyi.wgz.bo.req.WgzAppSubmitATestPaperReq;
import com.ruoyi.wgz.bo.res.WgzAppSubmitATestPaperRes; import com.ruoyi.wgz.bo.res.WgzAppSubmitATestPaperRes;
import com.ruoyi.wgz.bo.res.WgzAppUserScoreQuery; import com.ruoyi.wgz.bo.res.WgzAppUserScoreQuery;
import com.ruoyi.wgz.bo.rests.ExaminationPaper; import com.ruoyi.wgz.bo.rests.*;
import com.ruoyi.wgz.bo.rests.PdfEntity;
import com.ruoyi.wgz.bo.rests.WgzAppSubmitATestPaperTwo;
import com.ruoyi.wgz.domain.WgzQuestionBank; import com.ruoyi.wgz.domain.WgzQuestionBank;
import com.ruoyi.wgz.domain.WgzQuestionSave; import com.ruoyi.wgz.domain.WgzQuestionSave;
import com.ruoyi.wgz.domain.WgzQuestionsConfiguration; import com.ruoyi.wgz.domain.WgzQuestionsConfiguration;
@ -26,11 +24,16 @@ import com.ruoyi.wgz.service.IWgzQuestionBankService;
import com.ruoyi.wgz.service.IWgzQuestionSaveService; import com.ruoyi.wgz.service.IWgzQuestionSaveService;
import com.ruoyi.wgz.service.IWgzQuestionsConfigurationService; import com.ruoyi.wgz.service.IWgzQuestionsConfigurationService;
import com.ruoyi.wgz.service.IWgzUserService; import com.ruoyi.wgz.service.IWgzUserService;
import com.sun.scenario.effect.ImageData;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.wp.usermodel.Paragraph;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -213,15 +216,54 @@ public class WgzQuestionSaveServiceImpl extends ServicePlusImpl<WgzQuestionSaveM
} }
// 分离试卷信息 // 分离试卷信息
public void two(Long userId,WgzQuestionsConfiguration configurationEntity) { public void two(Long userId,WgzQuestionsConfiguration configurationEntity) throws IOException {
//1、组装数据 //1、组装数据
List<PdfEntity> we = baseMapper.pdfSc(userId); List<PdfEntity> we = baseMapper.pdfSc(userId);
if (!we.isEmpty()) { if (!we.isEmpty()) {
double sumScore = baseMapper.pdfSumScore(userId); String sumScore = baseMapper.pdfSumScore(userId);
Integer s = configurationEntity.getSingleChoice(); Integer s = configurationEntity.getSingleChoice();
Integer m = configurationEntity.getMultipleChoice(); Integer m = configurationEntity.getMultipleChoice();
Integer e = configurationEntity.getEstimate(); Integer e = configurationEntity.getEstimate();
ExaminationPaper examinationPaper = new ExaminationPaper(); ExaminationPaper rs = new ExaminationPaper()
.setPass(we.get(0).getPass())
.setSumScore(sumScore)
.setSign(we.get(0).getSign())
.setUserId(userId.toString());
ExaminationPaperOne one = new ExaminationPaperOne();
ExaminationPaperOne two = new ExaminationPaperOne();
ExaminationPaperOne three = new ExaminationPaperOne();
one.setTopic("一、单选题,共" + s + "道题,每小题" + configurationEntity.getSingleScore() + "分,共计" + configurationEntity.getSingleScore() * s + "");
two.setTopic("二、多选题,共" + m + "道题,每小题" + configurationEntity.getMultipleScore() + "分,共计" + configurationEntity.getMultipleScore() * m + "");
three.setTopic("三、判断题,共" + e + "道题,每小题" + configurationEntity.getEstimateScore() + "分,共计" + configurationEntity.getEstimateScore() * e + "");
List<ExaminationPaperTwo> sEntity = new ArrayList<>();
List<ExaminationPaperTwo> mEntity = new ArrayList<>();
List<ExaminationPaperTwo> eEntity = new ArrayList<>();
for (PdfEntity data : we) {
ExaminationPaperTwo sy = new ExaminationPaperTwo();
sy.setQuestionText(data.getQuestionText());
sy.setOptions(data.getOptions());
sy.setAnswer(data.getAnswer());
sy.setCorrectAnswer(data.getCorrectAnswer());
sy.setCorrect(data.getCorrect());
sy.setScore(data.getScore());
if (data.getQuestionType().equals("1")) {
sEntity.add(sy);
}
if (data.getQuestionType().equals("2")) {
mEntity.add(sy);
}
if (data.getQuestionType().equals("3")) {
eEntity.add(sy);
}
}
one.setList(sEntity);
two.setList(mEntity);
three.setList(eEntity);
rs.setSingle(one);
rs.setMultiple(two);
rs.setEstimate(three);
//2、生成pdf
// generatePdf(rs);
} }
// if len(we) > 0 { // if len(we) > 0 {
// value, _ := dao.BusQuestionSave.Ctx(ctx).Where("openid", req.Openid).Where("correct", "1").Fields("sum(score)").Value() // value, _ := dao.BusQuestionSave.Ctx(ctx).Where("openid", req.Openid).Where("correct", "1").Fields("sum(score)").Value()

View File

@ -228,10 +228,11 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
@Override @Override
public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(WgzAppReplacementCardRecordReq req) { public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(WgzAppReplacementCardRecordReq req) {
Long userId = SecurityUtils.getAppUserId(); Long userId = SecurityUtils.getAppUserId();
Long recruitApplyId = req.getRecruitApplyId();
Page<WgzAppReplacementCardRecordReq> queryDTOPage = new Page<>(); Page<WgzAppReplacementCardRecordReq> queryDTOPage = new Page<>();
queryDTOPage.setCurrent(req.getPageNum()); queryDTOPage.setCurrent(req.getPageNum());
queryDTOPage.setSize(req.getPageSize()); queryDTOPage.setSize(req.getPageSize());
return PageUtils.buildDataInfo(baseMapper.userReplacementCardRecordListPage(queryDTOPage, userId)); return PageUtils.buildDataInfo(baseMapper.userReplacementCardRecordListPage(queryDTOPage, userId,recruitApplyId));
} }
@Override @Override

View File

@ -276,10 +276,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bgt_project_recruit as b on(b.id = a.recruit_id) LEFT JOIN bgt_project_recruit as b on(b.id = a.recruit_id)
WHERE WHERE
a.user_id = #{userId} a.user_id = #{userId}
<if test="type!=null and type!=1"> <if test="type!=null and type == 1 ">
and a.status in ("3","5","6") and a.status in ("3","5","6")
</if> </if>
<if test="type!=null and type!=2"> <if test="type!=null and type == 2 ">
and a.status in ("1","3","5","6") and a.status in ("1","3","5","6")
</if> </if>
and a.del_flag = "0" and a.del_flag = "0"

View File

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0) LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0) LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0)
WHERE WHERE
a.user_id = #{userId} and a.del_flag = 0 a.user_id = #{userId} and a.apply_key = #{recruitApplyId} and a.del_flag = 0
ORDER BY ORDER BY
a.id DESC a.id DESC
</select> </select>

View File

@ -5,7 +5,8 @@ VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.110.3:9099/ruoyi' VUE_APP_BASE_API = 'http://192.168.110.128:9099/ruoyi'
# VUE_APP_BASE_API = 'https://gx.jdfktech.com:18279/lhyg/ruoyi'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB