Commit 7c56de7f authored by 姬鋆屾's avatar 姬鋆屾
No related merge requests found
......@@ -34,6 +34,15 @@ public class AttendanceRecordEntity extends AttendanceRecordVo {
*/
@Excel(name = "工号")
private String workNum;
/**
* 所属大厅
*/
private Long salaId;
/**
* 所属大厅名称
*/
@Excel(name = "所属大厅")
private String salaName;
/**
* 所属部门
*/
......@@ -50,7 +59,6 @@ public class AttendanceRecordEntity extends AttendanceRecordVo {
/**
* 职位名称
*/
@Excel(name = "职位名称")
private String positionName;
/**
* 所属考勤组ID
......@@ -97,14 +105,7 @@ public class AttendanceRecordEntity extends AttendanceRecordVo {
* 班次名称
*/
private String className;
/**
* 所属大厅
*/
private Long salaId;
/**
* 所属大厅名称
*/
private String salaName;
@Override
public int hashCode() {
return this.getId().hashCode();
......
package com.mortals.xhx.module.attendance.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity;
/**
......@@ -9,6 +10,6 @@ import com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity;
* @author zxfei
* @date 2023-04-08
*/
public interface AttendanceClassDetailService extends ICRUDService<AttendanceClassDetailEntity,Long>{
public interface AttendanceClassDetailService extends ICRUDCacheService<AttendanceClassDetailEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.service.impl;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -14,6 +15,6 @@ import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService;
* @date 2023-04-08
*/
@Service("attendanceClassDetailService")
public class AttendanceClassDetailServiceImpl extends AbstractCRUDServiceImpl<AttendanceClassDetailDao, AttendanceClassDetailEntity, Long> implements AttendanceClassDetailService {
public class AttendanceClassDetailServiceImpl extends AbstractCRUDCacheServiceImpl<AttendanceClassDetailDao, AttendanceClassDetailEntity, Long> implements AttendanceClassDetailService {
}
\ No newline at end of file
......@@ -25,9 +25,7 @@ import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.common.pdu.HomeStatInfo;
import com.mortals.xhx.module.attendance.model.*;
import com.mortals.xhx.module.attendance.model.vo.AttendStatInfo;
import com.mortals.xhx.module.attendance.service.AttendanceClassService;
import com.mortals.xhx.module.attendance.service.AttendanceExportRecordService;
import com.mortals.xhx.module.attendance.service.AttendanceGroupService;
import com.mortals.xhx.module.attendance.service.*;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
......@@ -46,7 +44,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.attendance.service.AttendanceRecordService;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
......@@ -90,6 +87,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
private AttendanceGroupService groupService;
@Autowired
private AttendanceClassService classService;
@Autowired
private AttendanceClassDetailService classDetailService;
@Autowired
private ICacheService cacheService;
......@@ -130,8 +130,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
throw new AppException(e.getMessage());
}
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("attendanceDate", OrderCol.DESCENDING), new OrderCol("staffName", OrderCol.DESCENDING)));
query.setOrderColList(Arrays.asList(new OrderCol("salaId"),new OrderCol("attendanceDate", OrderCol.DESCENDING), new OrderCol("staffName", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("salaId"));
query.getOrderColList().add(new OrderCol("attendanceDate", OrderCol.DESCENDING));
// query.getOrderColList().add(new OrderCol("staffName", OrderCol.DESCENDING));
}
......@@ -210,30 +211,36 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
List<List<Map<String, Object>>> lists = list.stream().map(item -> {
List<AttendanceRecordDetailEntity> attendanceRecordDetailList = item.getAttendanceRecordDetailList();
List<Map<String, Object>> mapList = new ArrayList<>();
for (int i = 0; i < colSize; i++) {
if (attendanceRecordDetailList.size() > i) {
AttendanceRecordDetailEntity detailEntity = attendanceRecordDetailList.get(i);
AttendanceClassDetailEntity cacheDetail = classDetailService.getCache(detailEntity.getShiftsId().toString());
StringBuilder preStr=new StringBuilder();
if(!ObjectUtils.isEmpty(cacheDetail)&&!ObjectUtils.isEmpty(cacheDetail.getRemark())){
preStr.append(cacheDetail.getRemark());
preStr.append("/");
}
//生成上班 结果 下班 结果 4个map
Map<String, Object> map = new HashMap<>();
map.put("name", String.format("上班打卡时间%d", i + 1));
map.put("value", detailEntity.getGoWorkDate()==null?"--":DateUtil.formatDateTime(detailEntity.getGoWorkDate()));
map.put("value", detailEntity.getGoWorkDate()==null?"--":preStr.toString()+DateUtil.formatDateTime(detailEntity.getGoWorkDate()));
mapList.add(map);
map = new HashMap<>();
map.put("name", String.format("上班打卡结果%d", i + 1));
map.put("value", detailEntity.getGoWorkResult()==null?"--":GoWorkResultEnum.getByValue(detailEntity.getGoWorkResult()).getDesc());
map.put("value", detailEntity.getGoWorkResult()==null?"--":preStr.toString()+GoWorkResultEnum.getByValue(detailEntity.getGoWorkResult()).getDesc());
mapList.add(map);
map = new HashMap<>();
map.put("name", String.format("下班打卡时间%d", i + 1));
map.put("value", detailEntity.getOffWorkDate()==null?"--":DateUtil.formatDateTime(detailEntity.getOffWorkDate()));
map.put("value", detailEntity.getOffWorkDate()==null?"--":preStr.toString()+DateUtil.formatDateTime(detailEntity.getOffWorkDate()));
mapList.add(map);
map = new HashMap<>();
map.put("name", String.format("下班打卡结果%d", i + 1));
map.put("value",detailEntity.getOffWorkResult()==null?"--":OffWorkResultEnum.getByValue(detailEntity.getOffWorkResult()).getDesc());
map.put("value",detailEntity.getOffWorkResult()==null?"--":preStr.toString()+OffWorkResultEnum.getByValue(detailEntity.getOffWorkResult()).getDesc());
mapList.add(map);
} else {
Map<String, Object> map = new HashMap<>();
......
......@@ -111,7 +111,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
//summaryCheck(query);
summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
}
......@@ -183,7 +183,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
sendCheckDingTalk(temp);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
//summaryCheck(query);
summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
......
......@@ -25,10 +25,12 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
private String workNum;
/**
* 所属部门
......@@ -37,6 +39,7 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 所属部门名称
*/
@Excel(name = "所属部门")
private String deptName;
/**
* 所属考勤组ID
......@@ -45,6 +48,7 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 所属考勤组名称
*/
@Excel(name = "考勤组")
private String attendanceGroupName;
/**
* 考勤时间
......@@ -57,18 +61,22 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 异常时间
*/
@Excel(name = "异常时间", width = 80, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date errorTime;
/**
* 上下班时间
*/
@Excel(name = "上下班时间")
private String goOffTimeStr;
/**
* 实际打卡时间
*/
@Excel(name = "实际打卡时间", width = 80, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualAttendTime;
/**
* 异常处理结果
*/
@Excel(name = "异常处理结果")
private String errorResult;
/**
* 扣分方式(1.系统自动,2.人工添加)
......@@ -102,12 +110,11 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
private String filePaths;
/**
* 绩效规则分类id
......@@ -124,7 +131,6 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
/**
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
@Override
public int hashCode() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment