Compare commits
No commits in common. "cb1d56c751836f2a7830facd49ee68614178fd6c" and "2002d2a45b8b88c586b13eb4eb8800e29c05297d" have entirely different histories.
cb1d56c751
...
2002d2a45b
@ -51,7 +51,7 @@ public class RzAttendanceDetail extends BaseEntity
|
||||
/** 周六标识 */
|
||||
private String remark;
|
||||
|
||||
// private String photo;
|
||||
private String photo;
|
||||
|
||||
/** 删除标记 */
|
||||
private String delFlag;
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@ -27,8 +27,6 @@ public class RzAttendanceDetailTimeLineVO {
|
||||
|
||||
String size = "large";
|
||||
|
||||
String delFlag;
|
||||
|
||||
public RzAttendanceDetailTimeLineVO(String content, String photo, String timestamp, String delFlag) {
|
||||
this.content = content;
|
||||
this.photo = photo;
|
||||
@ -38,7 +36,7 @@ public class RzAttendanceDetailTimeLineVO {
|
||||
this.icon = timeLine.icon;
|
||||
}
|
||||
|
||||
public enum TimeLineEnum{
|
||||
enum TimeLineEnum{
|
||||
UP("上班", "primary","el-icon-caret-top"),
|
||||
OVERTIME("加班", "success","el-icon-plus"),
|
||||
DOWN("下班", "warning","el-icon-caret-bottom"),
|
||||
@ -48,8 +46,8 @@ public class RzAttendanceDetailTimeLineVO {
|
||||
;
|
||||
|
||||
String typeWork;
|
||||
public String type;
|
||||
public String icon;
|
||||
String type;
|
||||
String icon;
|
||||
|
||||
TimeLineEnum(String typeWork, String type, String icon) {
|
||||
this.typeWork = typeWork;
|
||||
|
||||
@ -2,7 +2,6 @@ package com.evo.attendance.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evo.attendance.domain.RzAttendanceDetail;
|
||||
import com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
@ -77,6 +76,4 @@ 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);
|
||||
|
||||
List<Map<String,Object>> getThreeDayNotCheck();
|
||||
|
||||
List<RzAttendanceDetailTimeLineVO> selectListByAttendanceId(@Param("attId")Long attId);
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
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> {
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
package com.evo.attendance.processor.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.evo.attendance.domain.RzAttendance;
|
||||
import com.evo.attendance.domain.RzAttendanceDetail;
|
||||
@ -175,7 +174,6 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
|
||||
//获取员工的工作时长
|
||||
RzAttendanceDetail attendanceDetail = rzAttendanceDetailService.addDetail(attendance, rules, sn, date, "", photo);
|
||||
if(attendanceDetail.getId() == null){
|
||||
log.info("[打卡失败]============> 因为没有打卡详情id{}", JSON.toJSONString(attendanceDetail));
|
||||
return initMessage(1, "打卡失败");
|
||||
}
|
||||
|
||||
@ -203,10 +201,10 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
|
||||
}
|
||||
//上班的下班卡
|
||||
if(rzAttendanceDetail.getButtonType().contains("上班")){
|
||||
|
||||
return KqUtils.workOffDutyCard( date, rzAttendanceDetail.getButtonType(), attendance) ? initMessage(0, "打卡成功") : initMessage(1,"打卡失败");
|
||||
}
|
||||
|
||||
log.info("[打卡失败]============> 走到最后了, 打卡人姓名{}", sysStaff.getName());
|
||||
return initMessage(1, "打卡失败");
|
||||
}
|
||||
|
||||
@ -235,8 +233,6 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
|
||||
attendance.setYcsFlag("1");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.info("[打卡失败]============> 出现异常了, 异常原因{}", e.getMessage());
|
||||
e.printStackTrace();
|
||||
return initMessage(1, "打卡失败,"+e.getMessage());
|
||||
}
|
||||
//查询昨天是否未打卡
|
||||
@ -252,7 +248,6 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
|
||||
e.printStackTrace();
|
||||
log.error("查询前一天的打卡情况报错了");
|
||||
}
|
||||
log.info("[打卡失败]============> 上班卡模块, 走到最后了, 不知道成功还是失败, 打卡人姓名{}", attendance.getName());
|
||||
return (rzAttendanceMapper.updateRzAttendance(attendance) > 0) ? initMessage(0, "打卡成功"+notBeforeEndTimeMessage) : initMessage(1, "打卡失败"+notBeforeEndTimeMessage);
|
||||
}
|
||||
//
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
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,12 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.evo.attendance.domain.RzAttendance;
|
||||
import com.evo.attendance.domain.RzAttendanceDetail;
|
||||
import com.evo.attendance.domain.RzAttendancePhoto;
|
||||
import com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO;
|
||||
import com.evo.attendance.mapper.RzAttendanceDetailMapper;
|
||||
import com.evo.attendance.mapper.RzAttendancePhotoMapper;
|
||||
import com.evo.attendance.service.RzAttendanceDetailService;
|
||||
import com.evo.attendance.service.RzAttendancePhotoService;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.utils.Collections;
|
||||
@ -58,8 +55,6 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
||||
RzLeaveDetailMapper rzLeaveDetailMapper;
|
||||
@Autowired
|
||||
private SysStaffMapper sysStaffMapper;
|
||||
@Autowired
|
||||
private RzAttendancePhotoMapper rzAttendancePhotoMapper;
|
||||
|
||||
@Override
|
||||
public RzAttendanceDetail addDetail(RzAttendance attendance, String rules, String sn, Date date, String remark, String photo) {
|
||||
@ -98,25 +93,17 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
||||
attendanceDetail.setEquipmentCode(sn);
|
||||
attendanceDetail.setCreateTime(new Date());
|
||||
attendanceDetail.setRemark(remark);
|
||||
|
||||
if(StringUtils.isNotEmpty(photo)){
|
||||
attendanceDetail.setPhoto(photo);
|
||||
}
|
||||
if(attendanceDetail.getId() == null){
|
||||
save(attendanceDetail);
|
||||
}else{
|
||||
updateById(attendanceDetail);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(photo)){
|
||||
addPhoto(attendanceDetail.getId(), photo);
|
||||
}
|
||||
return attendanceDetail;
|
||||
}
|
||||
|
||||
@Async
|
||||
public void addPhoto(Long detailId, String photo){
|
||||
RzAttendancePhoto rzAttendancePhoto = new RzAttendancePhoto();
|
||||
rzAttendancePhoto.setAttendanceDetailId(detailId);
|
||||
rzAttendancePhoto.setPhoto(photo);
|
||||
rzAttendancePhotoMapper.insert(rzAttendancePhoto);
|
||||
}
|
||||
@Override
|
||||
public RzAttendanceDetail selectLastRzAttendanceDetail(Long staffId) {
|
||||
return getBaseMapper().selectLastRzAttendanceDetail(staffId);
|
||||
@ -134,18 +121,9 @@ public class RzAttendanceDetailServiceImpl extends ServiceImpl<RzAttendanceDetai
|
||||
|
||||
@Override
|
||||
public List<RzAttendanceDetailTimeLineVO> selectListByAttendanceId(Long attId) {
|
||||
List<RzAttendanceDetailTimeLineVO> result = getBaseMapper().selectListByAttendanceId(attId);
|
||||
result.stream().forEach(data->{
|
||||
RzAttendanceDetailTimeLineVO.TimeLineEnum timeLine = RzAttendanceDetailTimeLineVO.TimeLineEnum.get(data.getContent(), data.getDelFlag());
|
||||
data.setType(timeLine.type);
|
||||
data.setIcon(timeLine.icon);
|
||||
});
|
||||
return result;
|
||||
//
|
||||
// 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());
|
||||
return list(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");
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
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 {
|
||||
}
|
||||
@ -116,20 +116,6 @@ public class DingUtils {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
//根据手机号获取用户id
|
||||
public static String getUserInfoByUserId(String userId){
|
||||
try {
|
||||
DingTalkClient client = new DefaultDingTalkClient(DingGlobalParams.getUrl()+"v2/user/get");
|
||||
OapiV2UserGetRequest req = new OapiV2UserGetRequest();
|
||||
req.setUserid(userId);
|
||||
OapiV2UserGetResponse rsp = client.execute(req, "");
|
||||
return rsp.getBody();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/***
|
||||
* 获取班次信息
|
||||
*
|
||||
|
||||
@ -12,14 +12,9 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
*/
|
||||
public interface DingCallBackExchangeProcessor {
|
||||
|
||||
//入职
|
||||
static final String EVENT_TYPE_USER_ADD_ORG = "user_add_org";
|
||||
//离职
|
||||
static final String EVENT_TYPE_USER_LEAVE_ORG = "user_leave_org";
|
||||
|
||||
//打卡
|
||||
static final String EVENT_TYPE_CHECK_RECORD = "attendance_check_record";
|
||||
//审批实例订阅-> 补卡
|
||||
//审批实例订阅
|
||||
static final String EVENT_TYPE_INSTANCE_CHANGE = "bpms_instance_change";
|
||||
//请假、加班、出差、外出状态变更事件
|
||||
static final String EVENT_TYPE_APPROVE_STATUS_CHANGE = "attendance_approve_status_change";
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
package com.evo.ding.processor.callback.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.evo.ding.processor.callback.DingCallBackExchangeProcessor;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 员工离职 DingCallBackUseLeaveOrgExchangeProcessor
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:DingCallBackUseLeaveOrgExchangeProcessor
|
||||
* @date: 2026年03月12日 9:02
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DingCallBackUseLeaveOrgExchangeProcessor implements DingCallBackExchangeProcessor {
|
||||
|
||||
@Autowired
|
||||
ISysStaffService sysStaffService;
|
||||
|
||||
@Override
|
||||
public boolean accept(String eventType) {
|
||||
return EVENT_TYPE_USER_LEAVE_ORG.equals(eventType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exchange(JSONObject json) {
|
||||
log.info("钉钉 员工离职========================>>>{}", json.toString());
|
||||
JSONArray dataList = json.getJSONArray("userId");
|
||||
if(dataList!= null && dataList.size() > 0){
|
||||
dataList.forEach(data->{
|
||||
sysStaffService.sysStaffLeaveByDingUserId(String.valueOf(data));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package com.evo.ding.processor.callback.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.evo.attendance.service.IRzAttendanceService;
|
||||
import com.evo.common.utils.StringUtils;
|
||||
import com.evo.ding.DingUtils;
|
||||
import com.evo.ding.processor.callback.DingCallBackExchangeProcessor;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 员工入职 DingCallBackUserAddOrgExchangeProcessor
|
||||
*
|
||||
* @author andy.shi
|
||||
* @ClassName:DingCallBackUserAddOrgExchangeProcessor
|
||||
* @date: 2026年03月12日 9:02
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DingCallBackUserAddOrgExchangeProcessor implements DingCallBackExchangeProcessor {
|
||||
|
||||
@Autowired
|
||||
ISysStaffService sysStaffService;
|
||||
|
||||
@Override
|
||||
public boolean accept(String eventType) {
|
||||
return EVENT_TYPE_USER_ADD_ORG.equals(eventType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exchange(JSONObject json) {
|
||||
log.info("钉钉 新增员工========================>>>{}", json.toString());
|
||||
JSONArray dataList = json.getJSONArray("userId");
|
||||
if(dataList!= null && dataList.size() > 0){
|
||||
dataList.forEach(data->{
|
||||
DingUtils.getUserInfoByUserId(String.valueOf(data));
|
||||
sysStaffService.sysStaffLeaveByDingUserId(String.valueOf(data));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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, Boolean> zsMap = sysStaffMapper.selectSysStaffListByRzRestaurantStatistics(rzRestaurantStatistics.getMonth()).stream().collect(Collectors.toMap(SysStaff::getUserId, d->"是".equals(d.getZsFlag())));
|
||||
Map<Long, Boolean> zsMap = sysStaffMapper.selectSysStaffListAll().stream().collect(Collectors.toMap(SysStaff::getUserId, d->"是".equals(d.getZsFlag())));
|
||||
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));
|
||||
|
||||
@ -51,12 +51,6 @@ public interface SysStaffMapper extends BaseMapper<SysStaff>
|
||||
* @return
|
||||
*/
|
||||
public List<SysStaff> selectSysStaffListAll();
|
||||
|
||||
/**
|
||||
* 查询所有的在职员工信息
|
||||
* @return
|
||||
*/
|
||||
public List<SysStaff> selectSysStaffListByRzRestaurantStatistics(Date date);
|
||||
/**
|
||||
* 根据身份证号查询员工信息
|
||||
* @param idCard
|
||||
|
||||
@ -39,13 +39,6 @@ public interface ISysStaffService extends IService<SysStaff>
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult insertSysStaff(SysStaff sysStaff);
|
||||
/**
|
||||
* 新增员工管理
|
||||
*
|
||||
* @param result 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
public void insertSysStaffByDingDing(String result);
|
||||
/**
|
||||
* 修改员工管理
|
||||
*
|
||||
@ -129,10 +122,4 @@ public interface ISysStaffService extends IService<SysStaff>
|
||||
* @return 员工管理
|
||||
*/
|
||||
public SysStaff selectSysStaffByDingUserId(String dingUserId);
|
||||
|
||||
/***
|
||||
* 根据钉钉的用户id做用户离职
|
||||
* @param dingUserId
|
||||
*/
|
||||
public void sysStaffLeaveByDingUserId(String dingUserId);
|
||||
}
|
||||
|
||||
@ -47,8 +47,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
@ -181,68 +179,6 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertSysStaffByDingDing(String result) {
|
||||
|
||||
JSONObject dingResult = JSONObject.parseObject(result);
|
||||
dingResult.getJSONObject("result");
|
||||
|
||||
// //根据省份证号查询是否已经录入
|
||||
// SysStaff p_staff = getBaseMapper().queryysStaffByIdCard(sysStaff.getIdCard());
|
||||
// if(StringUtils.isNotNull(p_staff)){
|
||||
// return AjaxResult.error("此人录入过!!");
|
||||
// }
|
||||
// //判断是否是领导,是反写部门信息
|
||||
// if("是".equals(sysStaff.getIsLeader())){
|
||||
// //根据ID查询部门信息
|
||||
// SysDept sysDept = deptMapper.selectDeptById(sysStaff.getDeptId());
|
||||
// sysDept.setPhone(sysStaff.getPhone());
|
||||
// sysDept.setLeader(sysStaff.getName());
|
||||
// int i = deptMapper.updateDept(sysDept);
|
||||
// if(i < 1){
|
||||
// return AjaxResult.error("更新部门负责人失败");
|
||||
// }
|
||||
// }
|
||||
// //根据省份证确定性别和年龄
|
||||
// sysStaff.setAge(Long.parseLong(new SimpleDateFormat("yyyy").format(new Date())) - Long.parseLong(sysStaff.getIdCard().substring(6,10)));
|
||||
// //性别
|
||||
// sysStaff.setSex((Integer.parseInt(sysStaff.getIdCard().substring(16,17)) % 2 == 0) ? "1" : "0");
|
||||
// //员工编码
|
||||
// sysStaff.setCode(getCodeByCompanyName());
|
||||
// sysStaff.setSeniority(0l);
|
||||
// sysStaff.setStatus(Constants.JOB_STATIS_0);
|
||||
// sysStaff.setCreateTime(DateUtils.getNowDate());
|
||||
// sysStaff.setCreateBy(SecurityUtils.getUsername());
|
||||
// sysStaff.setDelFlag(Constants.DELETE_FLAG_0);
|
||||
//
|
||||
// if(CollectionUtils.isNotEmpty(sysStaff.getSubsidyList())){
|
||||
// sysStaff.setSubsidys(sysStaff.getSubsidyList().stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
// }
|
||||
// //打卡位置改为多选
|
||||
// if(CollectionUtils.isNotEmpty(sysStaff.getTimeClockList())){
|
||||
// sysStaff.setTimeClock(sysStaff.getTimeClockList().stream().collect(Collectors.joining(",")));
|
||||
// }
|
||||
// //新增员工信息到金蝶
|
||||
// if(StringUtils.isNotEmpty(sysStaff.getJobCode())){
|
||||
// sysStaff.setExtended(KingdeeRequestUtils.employeeSave(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode(), "jobCode", sysStaff.getJobCode().split("_")[0],"deptCode", sysStaff.getJobCode().split("_")[1])));
|
||||
// }else if(StringUtils.isEmpty(sysStaff.getJobCode())){
|
||||
// sysStaff.setExtended(KingdeeRequestUtils.employeeSaveEmptyJob(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode())));
|
||||
// }
|
||||
//
|
||||
// int i = getBaseMapper().insertSysStaff(sysStaff);
|
||||
// if(i < 1){
|
||||
// return AjaxResult.error("员工添加失败");
|
||||
// }
|
||||
// //员工详情
|
||||
// createStaffDetail(sysStaff);
|
||||
// //打卡统计,打卡详情
|
||||
// rzAttendanceStatisticalService.createRzAttendance(sysStaff, Collections.emptyList(), null);
|
||||
// //处理餐饮信息
|
||||
// rzRestaurantStatisticsService.createRestaurantStatistics(sysStaff, DateUtils.getNowDate());
|
||||
// //处理考勤机相关信息
|
||||
// initCheckDevice(sysStaff);
|
||||
|
||||
}
|
||||
|
||||
private void initCheckDevice(SysStaff sysStaff){
|
||||
//如果文件Id不为空, 则需要更新打卡设备信息, 完成后, 同步更新图片的业务Id数据
|
||||
@ -907,12 +843,4 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
public SysStaff selectSysStaffByDingUserId(String dingUserId) {
|
||||
return getBaseMapper().selectSysStaffByDingUserId(dingUserId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sysStaffLeaveByDingUserId(String dingUserId) {
|
||||
SysStaff sysStaff = selectSysStaffByDingUserId(dingUserId);
|
||||
//减去一分钟, 防止离职失败
|
||||
sysStaff.setQuitDate(DateUtils.addMinutes(new Date(), -1));
|
||||
updateSysStaff(sysStaff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,14 +117,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectListByAttendanceId" resultType="com.evo.attendance.domain.vo.RzAttendanceDetailTimeLineVO">
|
||||
select ad.button_type as content, DATE_FORMAT(ad.date_time,"%Y-%m-%d %H:%i:%s") as `timestamp`, ad.del_flag as delFlag , 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>
|
||||
|
||||
@ -260,18 +260,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectSysStaffVo"/>
|
||||
where del_flag = '0' and status != '-1'
|
||||
</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">
|
||||
<include refid="selectSysStaffVo"/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user