修改bug
This commit is contained in:
parent
1d95ec95a9
commit
7a760b4293
@ -21,10 +21,10 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class LicenseServiceImpl implements LicenseService {
|
||||
@Value("${license.publicKeysStorePath}")
|
||||
@Value("${license.publicKeysStorePath:}")
|
||||
String publicKeysStorePath;
|
||||
|
||||
@Value("${license.licensePath}")
|
||||
@Value("${license.licensePath:}")
|
||||
String licensePath;
|
||||
/**
|
||||
* 证书subject
|
||||
|
||||
@ -18,10 +18,10 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AsyncDoubleCarbon {
|
||||
@Value("${double-carbon.water-data-url}")
|
||||
@Value("${double-carbon.water-data-url:}")
|
||||
private String waterDataUrl;
|
||||
|
||||
@Value("${double-carbon.ammeter-data-url}")
|
||||
@Value("${double-carbon.ammeter-data-url:}")
|
||||
private String ammeterDataUrl;
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.realnamestatistics.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ -8,5 +9,14 @@ public class TodayAttendance {
|
||||
private String personSn;
|
||||
private String workerName;
|
||||
private String idCard;
|
||||
@ApiModelProperty(value = "工种名称")
|
||||
private String typeName;
|
||||
@ApiModelProperty(value = "班组名称")
|
||||
private String teamName;
|
||||
@ApiModelProperty(value = " 1.正常打卡 2.补卡操作")
|
||||
private java.lang.Integer attendanceType;
|
||||
@ApiModelProperty(value = "出入时间")
|
||||
private java.lang.String createTime;
|
||||
@ApiModelProperty(value = "考勤类型 1:进 2出")
|
||||
private java.lang.Integer passType;
|
||||
}
|
||||
|
||||
@ -152,4 +152,17 @@ public class WorkerMonthAttendanceStatisticsVo {
|
||||
private String idCardBigPhotoUrl;
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String enterpriseName;
|
||||
|
||||
@ApiModelProperty(value = "0、无考勤数量")
|
||||
private Integer noAttendanceNum;
|
||||
@ApiModelProperty(value = "1、正常数量")
|
||||
private Integer normalNum;
|
||||
@ApiModelProperty(value = "2、迟到数量")
|
||||
private Integer beLateNum;
|
||||
@ApiModelProperty(value = "3、早退数量")
|
||||
private Integer leaveEarlyNum;
|
||||
@ApiModelProperty(value = "4、加班数量")
|
||||
private Integer workOvertimeNum;
|
||||
@ApiModelProperty(value = "5、缺卡数量")
|
||||
private Integer missingCardNum;
|
||||
}
|
||||
|
||||
@ -91,15 +91,16 @@
|
||||
</select>
|
||||
<select id="selectWorkerTodayAttendancePageList"
|
||||
resultType="com.zhgd.xmgl.modules.realnamestatistics.entity.vo.TodayAttendance">
|
||||
SELECT i.worker_name, i.id_card, p.project_name, t.type_name, i.person_sn
|
||||
SELECT i.worker_name, i.id_card, p.project_name, t.type_name, i.person_sn,
|
||||
ti.team_name,a.attendance_type,a.create_time,a.pass_type
|
||||
from worker_info i
|
||||
INNER JOIN worker_attendance a on i.person_sn = a.person_sn
|
||||
INNER JOIN project p on p.project_sn = i.project_sn
|
||||
INNER JOIN team_info ti on i.team_id = ti.id
|
||||
INNER JOIN worker_type t on ti.worker_type_id = t.id
|
||||
INNER JOIN worker_attendance a on i.person_sn = a.person_sn
|
||||
INNER JOIN project p on p.project_sn = i.project_sn
|
||||
INNER JOIN team_info ti on i.team_id = ti.id
|
||||
INNER JOIN worker_type t on ti.worker_type_id = t.id
|
||||
where date(a.create_time) = CURDATE()
|
||||
and i.project_sn = #{projectSn}
|
||||
and i.person_type = 1
|
||||
and i.project_sn = #{projectSn}
|
||||
and i.person_type = 1
|
||||
</select>
|
||||
<select id="getWorkerAttendanceDetail"
|
||||
resultType="com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerAttendanceVo">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.realnamestatistics.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -142,10 +144,65 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
|
||||
@Override
|
||||
public Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(HashMap<String, Object> map, String workerName, String projectSn, Long groupId, Long workerTypeId, String time, String queryTime, String personSn, Integer pageNo, Integer pageSize, String personType) {
|
||||
Page<WorkerMonthAttendanceStatisticsVo> page = new Page<>(pageNo, pageSize);
|
||||
return baseMapper.selectAttendanceDetailByPage(page, map, workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, personType);
|
||||
Page<WorkerMonthAttendanceStatisticsVo> rPage = baseMapper.selectAttendanceDetailByPage(page, map, workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, personType);
|
||||
try {
|
||||
Integer noAttendanceType = 0;
|
||||
Integer normalType = 1;
|
||||
Integer beLateType = 2;
|
||||
Integer leaveEarlyType = 3;
|
||||
Integer workOvertimeType = 4;
|
||||
Integer missingCardType = 5;
|
||||
rPage.getRecords().forEach(e -> {
|
||||
e.setNoAttendanceNum(calculateNum(noAttendanceType, e));
|
||||
e.setNormalNum(calculateNum(normalType, e));
|
||||
e.setBeLateNum(calculateNum(beLateType, e));
|
||||
e.setLeaveEarlyNum(calculateNum(leaveEarlyType, e));
|
||||
e.setWorkOvertimeNum(calculateNum(workOvertimeType, e));
|
||||
e.setMissingCardNum(calculateNum(missingCardType, e));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return rPage;
|
||||
|
||||
}
|
||||
|
||||
private int calculateNum(Integer type, WorkerMonthAttendanceStatisticsVo e) {
|
||||
return NumberUtil.add(
|
||||
type.equals(e.getDay1()) ? 1 : 0,
|
||||
type.equals(e.getDay2()) ? 1 : 0,
|
||||
type.equals(e.getDay3()) ? 1 : 0,
|
||||
type.equals(e.getDay4()) ? 1 : 0,
|
||||
type.equals(e.getDay5()) ? 1 : 0,
|
||||
type.equals(e.getDay6()) ? 1 : 0,
|
||||
type.equals(e.getDay7()) ? 1 : 0,
|
||||
type.equals(e.getDay8()) ? 1 : 0,
|
||||
type.equals(e.getDay9()) ? 1 : 0,
|
||||
type.equals(e.getDay10()) ? 1 : 0,
|
||||
type.equals(e.getDay11()) ? 1 : 0,
|
||||
type.equals(e.getDay12()) ? 1 : 0,
|
||||
type.equals(e.getDay13()) ? 1 : 0,
|
||||
type.equals(e.getDay14()) ? 1 : 0,
|
||||
type.equals(e.getDay15()) ? 1 : 0,
|
||||
type.equals(e.getDay16()) ? 1 : 0,
|
||||
type.equals(e.getDay17()) ? 1 : 0,
|
||||
type.equals(e.getDay18()) ? 1 : 0,
|
||||
type.equals(e.getDay19()) ? 1 : 0,
|
||||
type.equals(e.getDay20()) ? 1 : 0,
|
||||
type.equals(e.getDay21()) ? 1 : 0,
|
||||
type.equals(e.getDay22()) ? 1 : 0,
|
||||
type.equals(e.getDay23()) ? 1 : 0,
|
||||
type.equals(e.getDay24()) ? 1 : 0,
|
||||
type.equals(e.getDay25()) ? 1 : 0,
|
||||
type.equals(e.getDay26()) ? 1 : 0,
|
||||
type.equals(e.getDay27()) ? 1 : 0,
|
||||
type.equals(e.getDay28()) ? 1 : 0,
|
||||
type.equals(e.getDay29()) ? 1 : 0,
|
||||
type.equals(e.getDay30()) ? 1 : 0,
|
||||
type.equals(e.getDay31()) ? 1 : 0
|
||||
).intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<TodayAttendance> selectWorkerTodayAttendancePageList(String projectSn, Integer pageNo, Integer pageSize, String personType) {
|
||||
Page<TodayAttendance> page = new Page<>(pageNo, pageSize);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user