处理打开失败情况
This commit is contained in:
parent
ae49e240c7
commit
3e70da9fd9
@ -51,7 +51,7 @@ public class RzAttendanceDetail extends BaseEntity
|
|||||||
/** 周六标识 */
|
/** 周六标识 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
private String photo;
|
// private String photo;
|
||||||
|
|
||||||
/** 删除标记 */
|
/** 删除标记 */
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.evo.attendance.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RzAttendancePhoto
|
||||||
|
*
|
||||||
|
* @author andy.shi
|
||||||
|
* @ClassName:RzAttendancePhoto
|
||||||
|
* @date: 2026年03月17日 8:52
|
||||||
|
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RzAttendancePhoto {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long attendanceDetailId;
|
||||||
|
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ package com.evo.attendance.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.evo.attendance.domain.RzAttendanceDetail;
|
import com.evo.attendance.domain.RzAttendanceDetail;
|
||||||
|
import com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -76,4 +77,6 @@ public interface RzAttendanceDetailMapper extends BaseMapper<RzAttendanceDetail>
|
|||||||
public RzAttendanceDetail selectLastRzAttendanceDetailByBk(@Param("staffId") Long staffId, @Param("buttonType") String buttonType, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime);
|
public RzAttendanceDetail selectLastRzAttendanceDetailByBk(@Param("staffId") Long staffId, @Param("buttonType") String buttonType, @Param("startDateTime") Date startDateTime, @Param("endDateTime") Date endDateTime);
|
||||||
|
|
||||||
List<Map<String,Object>> getThreeDayNotCheck();
|
List<Map<String,Object>> getThreeDayNotCheck();
|
||||||
|
|
||||||
|
List<RzAttendanceDetailTimeLineVO> selectListByAttendanceId(@Param("attId")Long attId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.evo.attendance.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.evo.attendance.domain.RzAttendancePhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RzAttendancePhotoMapper
|
||||||
|
*
|
||||||
|
* @author andy.shi
|
||||||
|
* @ClassName:RzAttendancePhotoMapper
|
||||||
|
* @date: 2026年03月17日 8:58
|
||||||
|
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||||
|
*/
|
||||||
|
public interface RzAttendancePhotoMapper extends BaseMapper<RzAttendancePhoto> {
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.evo.attendance.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.evo.attendance.domain.RzAttendancePhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口
|
||||||
|
*
|
||||||
|
* @ClassName:RzAttendanceDetailService
|
||||||
|
* @date: 2025年07月07日 13:32
|
||||||
|
* @author: andy.shi
|
||||||
|
* @contact: 17330188597
|
||||||
|
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||||
|
*/
|
||||||
|
public interface RzAttendancePhotoService extends IService<RzAttendancePhoto> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.evo.attendance.domain.RzAttendance;
|
import com.evo.attendance.domain.RzAttendance;
|
||||||
import com.evo.attendance.domain.RzAttendanceDetail;
|
import com.evo.attendance.domain.RzAttendanceDetail;
|
||||||
|
import com.evo.attendance.domain.RzAttendancePhoto;
|
||||||
import com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO;
|
import com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO;
|
||||||
import com.evo.attendance.mapper.RzAttendanceDetailMapper;
|
import com.evo.attendance.mapper.RzAttendanceDetailMapper;
|
||||||
|
import com.evo.attendance.mapper.RzAttendancePhotoMapper;
|
||||||
import com.evo.attendance.service.RzAttendanceDetailService;
|
import com.evo.attendance.service.RzAttendanceDetailService;
|
||||||
|
import com.evo.attendance.service.RzAttendancePhotoService;
|
||||||
import com.evo.common.constant.Constants;
|
import com.evo.common.constant.Constants;
|
||||||
import com.evo.common.core.domain.entity.SysDept;
|
import com.evo.common.core.domain.entity.SysDept;
|
||||||
import com.evo.common.utils.Collections;
|
import com.evo.common.utils.Collections;
|
||||||
@ -55,6 +58,8 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
|||||||
RzLeaveDetailMapper rzLeaveDetailMapper;
|
RzLeaveDetailMapper rzLeaveDetailMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysStaffMapper sysStaffMapper;
|
private SysStaffMapper sysStaffMapper;
|
||||||
|
@Autowired
|
||||||
|
private RzAttendancePhotoMapper rzAttendancePhotoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RzAttendanceDetail addDetail(RzAttendance attendance, String rules, String sn, Date date, String remark, String photo) {
|
public RzAttendanceDetail addDetail(RzAttendance attendance, String rules, String sn, Date date, String remark, String photo) {
|
||||||
@ -93,17 +98,25 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
|||||||
attendanceDetail.setEquipmentCode(sn);
|
attendanceDetail.setEquipmentCode(sn);
|
||||||
attendanceDetail.setCreateTime(new Date());
|
attendanceDetail.setCreateTime(new Date());
|
||||||
attendanceDetail.setRemark(remark);
|
attendanceDetail.setRemark(remark);
|
||||||
if(StringUtils.isNotEmpty(photo)){
|
|
||||||
attendanceDetail.setPhoto(photo);
|
|
||||||
}
|
|
||||||
if(attendanceDetail.getId() == null){
|
if(attendanceDetail.getId() == null){
|
||||||
save(attendanceDetail);
|
save(attendanceDetail);
|
||||||
}else{
|
}else{
|
||||||
updateById(attendanceDetail);
|
updateById(attendanceDetail);
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotEmpty(photo)){
|
||||||
|
addPhoto(attendanceDetail.getId(), photo);
|
||||||
|
}
|
||||||
return attendanceDetail;
|
return attendanceDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Async
|
||||||
|
public void addPhoto(Long detailId, String photo){
|
||||||
|
RzAttendancePhoto rzAttendancePhoto = new RzAttendancePhoto();
|
||||||
|
rzAttendancePhoto.setAttendanceDetailId(detailId);
|
||||||
|
rzAttendancePhoto.setPhoto(photo);
|
||||||
|
rzAttendancePhotoMapper.insert(rzAttendancePhoto);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public RzAttendanceDetail selectLastRzAttendanceDetail(Long staffId) {
|
public RzAttendanceDetail selectLastRzAttendanceDetail(Long staffId) {
|
||||||
return getBaseMapper().selectLastRzAttendanceDetail(staffId);
|
return getBaseMapper().selectLastRzAttendanceDetail(staffId);
|
||||||
@ -121,9 +134,12 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RzAttendanceDetailTimeLineVO> selectListByAttendanceId(Long attId) {
|
public List<RzAttendanceDetailTimeLineVO> selectListByAttendanceId(Long attId) {
|
||||||
return list(new LambdaQueryWrapper<RzAttendanceDetail>().eq(RzAttendanceDetail::getAttendanceId, attId).select(RzAttendanceDetail::getButtonType, RzAttendanceDetail::getPhoto, RzAttendanceDetail::getDateTime,RzAttendanceDetail::getDelFlag)).stream().map(data ->{
|
return getBaseMapper().selectListByAttendanceId(attId);
|
||||||
return new RzAttendanceDetailTimeLineVO(data.getButtonType(), data.getPhoto(), DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",data.getDateTime()), data.getDelFlag());
|
//
|
||||||
}).collect(Collectors.toList());
|
// return getBaseMapper().selectListByAttendanceId(new LambdaQueryWrapper<RzAttendanceDetail>().eq(RzAttendanceDetail::getAttendanceId, attId)
|
||||||
|
// .select(RzAttendanceDetail::getButtonType, RzAttendanceDetail::getPhoto, RzAttendanceDetail::getDateTime,RzAttendanceDetail::getDelFlag)).stream().map(data ->{
|
||||||
|
// return new RzAttendanceDetailTimeLineVO(data.getButtonType(), data.getPhoto(), DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",data.getDateTime()), data.getDelFlag());
|
||||||
|
// }).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.evo.attendance.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.evo.attendance.domain.RzAttendancePhoto;
|
||||||
|
import com.evo.attendance.mapper.RzAttendancePhotoMapper;
|
||||||
|
import com.evo.attendance.service.RzAttendancePhotoService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类
|
||||||
|
*
|
||||||
|
* @ClassName:RzAttendanceDetailServiceimpl
|
||||||
|
* @date: 2025年07月07日 13:33
|
||||||
|
* @author: andy.shi
|
||||||
|
* @contact: 17330188597
|
||||||
|
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class RzAttendancePhotoServiceImpl extends ServiceImpl<RzAttendancePhotoMapper, RzAttendancePhoto> implements RzAttendancePhotoService {
|
||||||
|
}
|
||||||
@ -110,7 +110,7 @@ public class RzRestaurantStatisticsServiceImpl extends ServiceImpl<RzRestaurantS
|
|||||||
//查询消费情况
|
//查询消费情况
|
||||||
Map<Long,String> dicMap = sysDictDataMapper.selectDictDataByType(Constants.SYS_RESTAUTANT).stream().collect(Collectors.toMap(SysDictData::getDictCode, SysDictData::getDictValue));
|
Map<Long,String> dicMap = sysDictDataMapper.selectDictDataByType(Constants.SYS_RESTAUTANT).stream().collect(Collectors.toMap(SysDictData::getDictCode, SysDictData::getDictValue));
|
||||||
//优先检查是否为住宿
|
//优先检查是否为住宿
|
||||||
Map<Long, Boolean> zsMap = sysStaffMapper.selectSysStaffListAll().stream().collect(Collectors.toMap(SysStaff::getUserId, d->"是".equals(d.getZsFlag())));
|
Map<Long, Boolean> zsMap = sysStaffMapper.selectSysStaffListByRzRestaurantStatistics(rzRestaurantStatistics.getMonth()).stream().collect(Collectors.toMap(SysStaff::getUserId, d->"是".equals(d.getZsFlag())));
|
||||||
List<String> notAccommodationNames = ParamUtils.getInternNotAccommodation();
|
List<String> notAccommodationNames = ParamUtils.getInternNotAccommodation();
|
||||||
//然后在检查是否为日薪
|
//然后在检查是否为日薪
|
||||||
Map<Long, Boolean> rxMap = sysStaffDetailMapper.selectList(new LambdaQueryWrapper<SysStaffDetail>().in(SysStaffDetail::getStaffId, zsMap.keySet().toArray())).stream().collect(Collectors.toMap(SysStaffDetail::getStaffId, d->d.getDailyWage() != null && d.getDailyWage().intValue() > 0));
|
Map<Long, Boolean> rxMap = sysStaffDetailMapper.selectList(new LambdaQueryWrapper<SysStaffDetail>().in(SysStaffDetail::getStaffId, zsMap.keySet().toArray())).stream().collect(Collectors.toMap(SysStaffDetail::getStaffId, d->d.getDailyWage() != null && d.getDailyWage().intValue() > 0));
|
||||||
|
|||||||
@ -51,6 +51,12 @@ public interface SysStaffMapper extends BaseMapper<SysStaff>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SysStaff> selectSysStaffListAll();
|
public List<SysStaff> selectSysStaffListAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有的在职员工信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SysStaff> selectSysStaffListByRzRestaurantStatistics(Date date);
|
||||||
/**
|
/**
|
||||||
* 根据身份证号查询员工信息
|
* 根据身份证号查询员工信息
|
||||||
* @param idCard
|
* @param idCard
|
||||||
|
|||||||
@ -117,4 +117,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectListByAttendanceId" resultType="com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO">
|
||||||
|
select ad.button_type, ad.date_time, ad.del_flag,ap.photo
|
||||||
|
from rz_attendance_detail ad
|
||||||
|
left join rz_attendance_photo ap on ap.attendance_detail_id = ad.id
|
||||||
|
where ad.attendance_id = #{attId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -254,6 +254,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectSysStaffVo"/>
|
<include refid="selectSysStaffVo"/>
|
||||||
where del_flag = '0' and status != '-1'
|
where del_flag = '0' and status != '-1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectSysStaffListByRzRestaurantStatistics" resultMap="SysStaffResult">
|
||||||
|
select ss.user_id, ss.zs_flag
|
||||||
|
from sys_staff ss
|
||||||
|
left join rz_restaurant_statistics rrs on rrs.staff_id = ss.user_id
|
||||||
|
where DATE_FORMAT(rrs.month, '%Y%m' ) = DATE_FORMAT( #{date} , '%Y%m' )
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 根据身份证号查询员工 -->
|
<!-- 根据身份证号查询员工 -->
|
||||||
<select id="queryysStaffByIdCard" parameterType="String" resultMap="SysStaffResult">
|
<select id="queryysStaffByIdCard" parameterType="String" resultMap="SysStaffResult">
|
||||||
<include refid="selectSysStaffVo"/>
|
<include refid="selectSysStaffVo"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user