This commit is contained in:
zt
2025-03-05 16:08:51 +08:00
parent e1ced7e274
commit f12f252904
9 changed files with 46 additions and 16 deletions

View File

@ -12,9 +12,9 @@ spring:
# 主库数据源
master:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
username: root
password: root
url: jdbc:mysql://localhost:3306/work_platform?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
username: work_platform
password: work_platform
# 从库数据源
# slave:
# driverClassName: com.mysql.cj.jdbc.Driver
@ -70,9 +70,9 @@ spring:
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
database: 15
# 密码
password:
password: 123456
# 连接超时时间
timeout: 10s
# 是否开启ssl

View File

@ -288,10 +288,10 @@ spring:
# JobStore 集群配置
jobStore:
class: org.quartz.impl.jdbcjobstore.JobStoreTX
isClustered: true
clusterCheckinInterval: 15000
txIsolationLevelSerializable: true
misfireThreshold: 60000
isClustered: false
#clusterCheckinInterval: 15000
#txIsolationLevelSerializable: true
#misfireThreshold: 60000
tablePrefix: QRTZ_
# sqlserver 启用
# selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?

View File

@ -6,7 +6,7 @@ import org.springframework.stereotype.Component;
/**
* 定时任务调度测试
*
*
* @author ruoyi
*/
@Component("ryTask")
@ -24,6 +24,7 @@ public class RyTask
public void ryNoParams()
{
Console.log("执行无参方法");
Console.log("---------------------------------------------------------------------------");
Console.log("执行无参方法");
}
}

View File

@ -144,6 +144,9 @@ public class BgtProjectRecruit implements Serializable {
@ApiModelProperty("创建者ID")
private Long userId;
@ApiModelProperty("招工状态(1-进行中2-已招满3-已过期)")
private String status;
/**
* 删除标志0代表存在 2代表删除
*/

View File

@ -48,4 +48,6 @@ public class BgtAttendanceVO {
@ApiModelProperty("申请者列表")
List<BgtProjectRecruitApplyVO> applyList;
@ApiModelProperty("到岗率")
private Integer reportToDutyRate= 0;
}

View File

@ -31,6 +31,10 @@ public class BgtProjectRecruitApplyVO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate entryTime;
@ApiModelProperty("离场时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate leaveTime;
@ApiModelProperty("务工者用户ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long userId;
@ -65,4 +69,7 @@ public class BgtProjectRecruitApplyVO implements Serializable {
@ApiModelProperty("打卡状态")
private String attendanceStatus;
@ApiModelProperty("已打分数")
private Double hasScore;
}

View File

@ -59,6 +59,13 @@ public class BusinessTask
@Autowired
private IWgzLeaveService iWgzLeaveService;
public void ryNoParams()
{
Console.log("-------------------------------------------------------------------------");
Console.log("测试任务执行了");
Console.log("-------------------------------------------------------------------------");
}
/**
* 招工任务招工时间结束自动拒绝未选择的务工者
*/
@ -143,7 +150,7 @@ public class BusinessTask
//添加消息提醒
WgzMessage wgzMessage = new WgzMessage().
setSenderType(USERTYPE_SYSTEM).
setRecipientType(USERTYPE_WGZ).
setRecipientType(WgzAndBgtMessageConstant.USERTYPE_WGZ).
setRecipientId(by.getUserId()).
setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"113")).
setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"114")).
@ -267,7 +274,7 @@ public class BusinessTask
//组装请假超时的消息
WgzMessage wgzMessage = new WgzMessage().
setSenderType(USERTYPE_SYSTEM).
setRecipientType(USERTYPE_WGZ).
setRecipientType(WgzAndBgtMessageConstant.USERTYPE_WGZ).
setRecipientId(wgzLeave.getUserId()).
setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"117")).
setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"118")).

View File

@ -42,6 +42,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.*;
@ -425,6 +427,11 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
bgtAttendanceVO.setReportToDutyNum(countVO.getReportToDutyNum());
bgtAttendanceVO.setTotalNum(countVO.getTotalNum());
bgtAttendanceVO.setAbsenceDutyNum(countVO.getTotalNum()-countVO.getReportToDutyNum());
if(bgtAttendanceVO.getTotalNum()!=0){
int rate = new BigDecimal(bgtAttendanceVO.getReportToDutyNum()).divide(new BigDecimal(bgtAttendanceVO.getTotalNum()), 2, RoundingMode.HALF_UP)
.multiply(new BigDecimal(100)).intValue();
bgtAttendanceVO.setReportToDutyRate(rate);
}
}
}

View File

@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="appQueryList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO">
select bpra.id,
bpra.entry_time,
bpra.leave_time,
bpra.recruit_id,
wu.user_id,
wu.phone,
@ -28,11 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bpra.status,
wu.type_of_work,
bpr.recruit_name,
fpt.task_name
fpt.task_name,
wsr.score as hasScore
from bgt_project_recruit_apply bpra
left join wgz_user wu on bpra.user_id = wu.user_id
left join bgt_project_recruit bpr on bpr.id = bpra.recruit_id
left join fbs_project_task fpt on fpt.id = bpr.task_id
left join wgz_score_record wsr on bpra.user_id = wsr.user_id and bpra.id = wsr.recruit_id
<where>
<if test="dto.username !=null and dto.username !='' ">
and wu.username like concat('%', #{dto.username}, '%')
@ -112,9 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN wgz_attendance wa ON wa.user_id = wu.user_id AND wa.recruit_id = bpra.recruit_id AND wa.date = #{dto.date}
LEFT JOIN bgt_project_recruit bpr ON bpr.id = bpra.recruit_id
LEFT JOIN fbs_project_task fpt ON fpt.id = bpr.task_id
WHERE bpra.recruit_id IN (SELECT id
WHERE bpra.status = '5' and bpra.recruit_id IN (SELECT id
FROM bgt_project_recruit
WHERE task_id = #{dto.taskId});
WHERE task_id = #{dto.taskId})
</select>
<select id="underwayPage" resultType="com.ruoyi.wgz.bo.res.WgzAppUnderwayRes">