Commit 039d7365 authored by huyuchen's avatar huyuchen

假勤管理修改

parent 776608d9
...@@ -177,7 +177,7 @@ public class EmployeeBusinessController { ...@@ -177,7 +177,7 @@ public class EmployeeBusinessController {
*/ */
@Inner @Inner
@PostMapping("/inner/updateEmployeeExtendRedundancy") @PostMapping("/inner/updateEmployeeExtendRedundancy")
public Boolean updateEmployeeExtendRedundancy(@RequestBody UpdateEmployeeExtendRedundancyDTO dtoList) { public Boolean updateEmployeeExtendRedundancy(@RequestBody List<UpdateEmployeeExtendRedundancyDTO> dtoList) {
return this.businessEmployeeExtendInfoService.updateEmployeeExtendRedundancy(dtoList); return this.businessEmployeeExtendInfoService.updateEmployeeExtendRedundancy(dtoList);
} }
...@@ -234,8 +234,8 @@ public class EmployeeBusinessController { ...@@ -234,8 +234,8 @@ public class EmployeeBusinessController {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
@Inner @Inner
@GetMapping("/inner/getInfoByLeaveMap") @PostMapping("/inner/getInfoByLeaveMap")
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() { public Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap() {
return this.businessEmployeeExtendInfoService.getInfoByLeaveMap(); return this.businessEmployeeExtendInfoService.getInfoByLeaveMap();
} }
......
...@@ -28,7 +28,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm ...@@ -28,7 +28,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @author: wangweiguo * @author: wangweiguo
* @date: 2021/8/12 * @date: 2021/8/12
*/ */
Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto); Boolean updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dto);
/** /**
* @description: 根据身份证号查询人员拓展表信息 * @description: 根据身份证号查询人员拓展表信息
* @param empIdcard 身份证号 * @param empIdcard 身份证号
...@@ -84,7 +84,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm ...@@ -84,7 +84,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @Date: 2021/8/18 16:45 * @Date: 2021/8/18 16:45
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap(); Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap();
/** /**
* b端人员信息编辑拓展信息 * b端人员信息编辑拓展信息
......
...@@ -70,16 +70,17 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -70,16 +70,17 @@ implements TBusinessEmployeeExtendInfoService {
/** /**
* 更新人员信息冗余字段 * 更新人员信息冗余字段
* @description: 更新人员信息冗余字段 * @description: 更新人员信息冗余字段
* @param v * @param dtoList
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.List<ErrorMessage>> * @return: com.yifu.cloud.v1.common.core.util.R<java.lang.List<ErrorMessage>>
* @author: wangweiguo * @author: wangweiguo
* @date: 2021/8/12 * @date: 2021/8/12
*/ */
@Override @Override
public Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO v) { public Boolean updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dtoList) {
if (Common.isEmpty(v)) { if (CollUtil.isEmpty(dtoList)) {
return false; return false;
} }
for (UpdateEmployeeExtendRedundancyDTO v : dtoList) {
// 根据部门id更新冗余的部门信息 // 根据部门id更新冗余的部门信息
if (null != v.getDepartId()) { if (null != v.getDepartId()) {
this.lambdaUpdate() this.lambdaUpdate()
...@@ -90,7 +91,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -90,7 +91,7 @@ implements TBusinessEmployeeExtendInfoService {
.update(); .update();
} else { } else {
if (StringUtils.isBlank(v.getEmpIdcard())) { if (StringUtils.isBlank(v.getEmpIdcard())) {
return false; continue;
} }
v.setEmployeeTags(formatLabelId(v.getEmployeeTags())); v.setEmployeeTags(formatLabelId(v.getEmployeeTags()));
// 身份证号更新冗余的离职,标签,证件相关信息 // 身份证号更新冗余的离职,标签,证件相关信息
...@@ -103,6 +104,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -103,6 +104,7 @@ implements TBusinessEmployeeExtendInfoService {
.set(null != v.getBusinessLeaveDate(), TBusinessEmployeeExtendInfo::getBusinessLeaveDate, v.getBusinessLeaveDate()) .set(null != v.getBusinessLeaveDate(), TBusinessEmployeeExtendInfo::getBusinessLeaveDate, v.getBusinessLeaveDate())
.update(); .update();
} }
}
return true; return true;
} }
/** /**
...@@ -369,7 +371,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -369,7 +371,7 @@ implements TBusinessEmployeeExtendInfoService {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
@Override @Override
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() { public Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap() {
List<BusinessEmployeeExtendByLeave> list = this.baseMapper.getInfoByLeaveList(); List<BusinessEmployeeExtendByLeave> list = this.baseMapper.getInfoByLeaveList();
Map<String, BusinessEmployeeExtendByLeave> leaveMap = new HashMap<>(); Map<String, BusinessEmployeeExtendByLeave> leaveMap = new HashMap<>();
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
...@@ -377,7 +379,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -377,7 +379,7 @@ implements TBusinessEmployeeExtendInfoService {
leaveMap.put(leave.getBusinessTelecomNumber(), leave); leaveMap.put(leave.getBusinessTelecomNumber(), leave);
} }
} }
return new R<>(leaveMap); return leaveMap;
} }
/** /**
......
package com.yifu.cloud.plus.v1.business.entity.vacation; package com.yifu.cloud.plus.v1.business.entity.vacation;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/** /**
* 假期监控清零日志表 * 假期监控清零日志表
* @TableName t_vacation_monitor_clear_log * @TableName t_vacation_monitor_clear_log
...@@ -19,7 +20,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> { ...@@ -19,7 +20,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> {
/** /**
* 主键 * 主键
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private String id; private String id;
/** /**
......
package com.yifu.cloud.plus.v1.business.controller.system; package com.yifu.cloud.plus.v1.business.controller.system;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.system.TBusDept; import com.yifu.cloud.plus.v1.business.entity.system.TBusDept;
...@@ -264,7 +265,7 @@ public class TBusDeptController { ...@@ -264,7 +265,7 @@ public class TBusDeptController {
dto.setDepartName(tBusDept.getName()); dto.setDepartName(tBusDept.getName());
dto.setTreeLogo(tBusDept.getTreeLogo()); dto.setTreeLogo(tBusDept.getTreeLogo());
dto.setDepartIdVal(tBusDept.getId()); dto.setDepartIdVal(tBusDept.getId());
archivesDaprUtil.updateEmployeeExtendRedundancy(dto); archivesDaprUtil.updateEmployeeExtendRedundancy(CollUtil.newArrayList(dto));
} }
return new R<>(isSuccess); return new R<>(isSuccess);
} }
...@@ -298,7 +299,7 @@ public class TBusDeptController { ...@@ -298,7 +299,7 @@ public class TBusDeptController {
dto.setDepartName(null); dto.setDepartName(null);
dto.setTreeLogo(null); dto.setTreeLogo(null);
dto.setDepartIdVal(null); dto.setDepartIdVal(null);
archivesDaprUtil.updateEmployeeExtendRedundancy(dto); archivesDaprUtil.updateEmployeeExtendRedundancy(CollUtil.newArrayList(dto));
} }
return new R<>(isSuccess); return new R<>(isSuccess);
} }
......
package com.yifu.cloud.plus.v1.business.controller.vacation;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* @description: 假期监控清零日志表 controller
* @author: wangweiguo
* @date: 2021-08-16
*/
@RestController
@AllArgsConstructor
@RequestMapping("/vacationMonitorClearLog")
@Tag(name = "假期监控清零日志表相关api")
public class TVacationMonitorClearLogController {
private final TVacationMonitorClearLogService tVacationMonitorClearLogService;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation(summary = "查询-列表: 查询当前年假所有清零记录", description = "查询-列表: 查询当前年假所有清零记录")
@GetMapping("/getList")
public R<List<TVacationMonitorClearLogVO>> getList(@RequestParam("vacationMonitorId") @Parameter(description = "年假监控id", required = true) Integer vacationMonitorId) {
return this.tVacationMonitorClearLogService.getList(vacationMonitorId);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation(summary = "清零说明: 记录年假清零说明", description = "清零说明: 记录年假清零说明")
@PostMapping("/clearNote")
public R<Boolean> clearNote(@RequestBody @Valid AddVacationMonitorClearLogDTO dto) {
return this.tVacationMonitorClearLogService.clearNote(dto);
}
}
package com.yifu.cloud.plus.v1.business.mapper.vacation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Mapper
public interface TBusLeaveMapper extends BaseMapper<TBusLeave> {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, @Param("tBusLeave") TBusLeave tBusLeave);
List<TBusLeave> getTBusLeaveList(@Param("tBusLeave") TBusLeave tBusLeave);
}
package com.yifu.cloud.plus.v1.business.mapper.vacation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import org.apache.ibatis.annotations.Mapper;
/**
* @description: 假期监控清零日志表 mapper
* @Entity com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitorClearLog
* @author: wangweiguo
* @date: 2021-08-16
*/
@Mapper
public interface TVacationMonitorClearLogMapper extends BaseMapper<TVacationMonitorClearLog> {
}
package com.yifu.cloud.plus.v1.business.service.vacation;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
public interface TBusLeaveService extends IService<TBusLeave> {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, TBusLeave tBusLeave);
/**
* @param tBusLeave
* @Description: 获取list
* @Author: hgw
* @Date: 2021/8/18 14:50
* @return: java.util.List<com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TBusLeave>
**/
List<TBusLeave> getTBusLeaveList(TBusLeave tBusLeave);
}
package com.yifu.cloud.plus.v1.business.service.vacation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* @description: 假期监控清零日志表 service层
* @author: wangweiguo
* @date: 2021-08-16
*/
public interface TVacationMonitorClearLogService extends IService<TVacationMonitorClearLog> {
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId);
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
R<Boolean> clearNote(AddVacationMonitorClearLogDTO dto);
}
package com.yifu.cloud.plus.v1.business.service.vacation.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import com.yifu.cloud.plus.v1.business.mapper.vacation.TBusLeaveMapper;
import com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Service("tBusLeaveService")
public class TBusLeaveServiceImpl extends ServiceImpl<TBusLeaveMapper, TBusLeave> implements TBusLeaveService {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
@Override
public IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, TBusLeave tBusLeave) {
return baseMapper.getTBusLeavePage(page, tBusLeave);
}
@Override
public List<TBusLeave> getTBusLeaveList(TBusLeave tBusLeave) {
return baseMapper.getTBusLeaveList(tBusLeave);
}
}
package com.yifu.cloud.plus.v1.business.service.vacation.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitor;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorClearLogMapper;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorService;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
import static com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg.*;
/**
* @description: 假期监控清零日志表 service实现层
* @author: wangweiguo
* @date: 2021-08-16
*/
@Service
@AllArgsConstructor
public class TVacationMonitorClearLogServiceImpl extends ServiceImpl<TVacationMonitorClearLogMapper, TVacationMonitorClearLog>
implements TVacationMonitorClearLogService {
private final TVacationMonitorService vacationMonitorService;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId) {
if (vacationMonitorId == null) {
return R.ok(null,VACATION_MONITOR_ID_IS_NOT_NULL);
}
List<TVacationMonitorClearLog> list = this.lambdaQuery()
.eq(TVacationMonitorClearLog::getVacationMonitorId, vacationMonitorId)
.orderByDesc(TVacationMonitorClearLog::getClearTime)
.list();
List<TVacationMonitorClearLogVO> voList = list.stream().map(v -> {
TVacationMonitorClearLogVO vo = new TVacationMonitorClearLogVO();
BeanUtil.copyProperties(v, vo, CopyOptions.create().setIgnoreCase(true));
return vo;
}).collect(Collectors.toList());
return R.ok(voList);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public R<Boolean> clearNote(AddVacationMonitorClearLogDTO dto) {
YifuUser user = SecurityUtils.getUser();
if (user == null) {
return R.failed(USER_NOT_LOGIN);
}
if (dto.getVacationMonitorId() == null) {
return R.ok(null,VACATION_MONITOR_ID_IS_NOT_NULL);
}
TVacationMonitor vacationMonitor = this.vacationMonitorService.getById(dto.getVacationMonitorId());
if (vacationMonitor == null) {
return R.failed(VACATION_MONITOR_DATA_IS_NOT_EXIST);
}
TVacationMonitorClearLog log = new TVacationMonitorClearLog();
log.setClearNote(dto.getClearNote());
log.setVacationMonitorId(dto.getVacationMonitorId());
log.setVacationYear(vacationMonitor.getVacationYear());
log.setClearDuration(vacationMonitor.getNotUsedVacationDuration());
log.setClearUser(user.getNickname());
log.setClearUserId(Integer.valueOf(user.getId()));
log.setClearTime(LocalDateTime.now());
boolean isSuccess = this.save(log);
return R.ok(isSuccess);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.business.mapper.vacation.TBusLeaveMapper">
<resultMap id="tBusLeaveMap" type="com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave">
<id property="id" column="id"/>
<result property="teleNo" column="tele_no"/>
<result property="name" column="name"/>
<result property="idCard" column="id_card"/>
<result property="post" column="post"/>
<result property="deptId" column="dept_id"/>
<result property="deptName" column="dept_name"/>
<result property="leaveDate" column="leave_date"/>
<result property="leavePostDate" column="leave_post_date"/>
<result property="leaveReason" column="leave_reason"/>
<result property="createUserId" column="create_user_id"/>
<result property="createUserName" column="create_user_name"/>
<result property="createTime" column="create_time"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="deptTreeLogo" column="dept_tree_logo"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.tele_no,
a.name,
a.id_card,
a.post,
a.dept_id,
a.dept_name,
a.leave_date,
a.leave_post_date,
a.leave_reason,
a.create_user_id,
a.create_user_name,
a.create_time,
a.delete_flag,
a.dept_tree_logo
</sql>
<sql id="tBusLeave_where">
<if test="tBusLeave != null">
<if test="tBusLeave.id != null and tBusLeave.id.trim() != ''">
AND a.id = #{tBusLeave.id}
</if>
<if test="tBusLeave.teleNo != null and tBusLeave.teleNo.trim() != ''">
AND a.tele_no like concat('%', #{tBusLeave.teleNo},'%')
</if>
<if test="tBusLeave.name != null and tBusLeave.name.trim() != ''">
AND a.name like concat('%', #{tBusLeave.name},'%')
</if>
<if test="tBusLeave.idCard != null and tBusLeave.idCard.trim() != ''">
AND a.id_card = #{tBusLeave.idCard}
</if>
<if test="tBusLeave.post != null and tBusLeave.post.trim() != ''">
AND a.post like concat('%', #{tBusLeave.post},'%')
</if>
/* 查找部门树以及底下的数据 */
<if test="tBusLeave.deptId != null and tBusLeave.deptId != 1">
AND (a.dept_id = #{tBusLeave.deptId} or a.dept_tree_logo like concat('%-', #{tBusLeave.deptId},'-%'))
</if>
<if test="tBusLeave.deptName != null and tBusLeave.deptName.trim() != ''">
AND a.dept_name = #{tBusLeave.deptName}
</if>
<if test="tBusLeave.leaveDate != null">
AND a.leave_date = #{tBusLeave.leaveDate}
</if>
<if test="tBusLeave.leavePostDate != null">
AND a.leave_post_date = #{tBusLeave.leavePostDate}
</if>
<if test="tBusLeave.leaveReason != null and tBusLeave.leaveReason.trim() != ''">
AND a.leave_reason = #{tBusLeave.leaveReason}
</if>
<if test="tBusLeave.createUserId != null and tBusLeave.createUserId.trim() != ''">
AND a.create_user_id = #{tBusLeave.createUserId}
</if>
<if test="tBusLeave.createUserName != null and tBusLeave.createUserName.trim() != ''">
AND a.create_user_name = #{tBusLeave.createUserName}
</if>
<if test="tBusLeave.createTime != null">
AND a.create_time = #{tBusLeave.createTime}
</if>
<if test="tBusLeave.deleteFlag != null">
AND a.delete_flag = #{tBusLeave.deleteFlag}
</if>
<if test="tBusLeave.leaveDateStart != null">
AND a.leave_date >= #{tBusLeave.leaveDateStart}
</if>
<if test="tBusLeave.leaveDateEnd != null">
AND a.leave_date <![CDATA[ <= ]]> #{tBusLeave.leaveDateEnd}
</if>
<if test="tBusLeave.leavePostStart != null">
AND a.leave_post_date >= #{tBusLeave.leavePostStart}
</if>
<if test="tBusLeave.leavePostEnd != null">
AND a.leave_post_date <![CDATA[ <= ]]> #{tBusLeave.leavePostEnd}
</if>
<if test="tBusLeave.deptTreeLogo != null and tBusLeave.deptTreeLogo.trim() != '' ">
AND a.dept_tree_logo like concat(#{tBusLeave.deptTreeLogo},'%')
</if>
</if>
</sql>
<!--tBusLeave简单分页查询-->
<select id="getTBusLeavePage" resultMap="tBusLeaveMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include refid="tBusLeave_where"/>
</where>
order by a.create_time desc
</select>
<!--获取list-->
<select id="getTBusLeaveList" resultMap="tBusLeaveMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include refid="tBusLeave_where"/>
</where>
order by a.create_time desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorClearLogMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="clearNote" column="CLEAR_NOTE" jdbcType="VARCHAR"/>
<result property="clearDuration" column="CLEAR_DURATION" jdbcType="DECIMAL"/>
<result property="vacationYear" column="VACATION_YEAR" jdbcType="CHAR"/>
<result property="clearUser" column="CLEAR_USER" jdbcType="VARCHAR"/>
<result property="clearUserId" column="CLEAR_USER_ID" jdbcType="INTEGER"/>
<result property="clearTime" column="CLEAR_TIME" jdbcType="TIMESTAMP"/>
<result property="vacationMonitorId" column="VACATION_MONITOR_ID" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,CLEAR_NOTE,CLEAR_DURATION,
VACATION_YEAR,CLEAR_USER,CLEAR_USER_ID,VACATION_MONITOR_ID
CLEAR_TIME
</sql>
</mapper>
...@@ -307,7 +307,7 @@ public class ArchivesDaprUtil { ...@@ -307,7 +307,7 @@ public class ArchivesDaprUtil {
* @Param * @Param
* @return * @return
**/ **/
public R<Boolean> updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto) { public R<Boolean> updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dto) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/updateEmployeeExtendRedundancy" , JSON.toJSONString(dto), Boolean.class, SecurityConstants.FROM_IN); R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/updateEmployeeExtendRedundancy" , JSON.toJSONString(dto), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("更新-对应身份证的冗余信息失败!"); return R.failed("更新-对应身份证的冗余信息失败!");
...@@ -345,6 +345,22 @@ public class ArchivesDaprUtil { ...@@ -345,6 +345,22 @@ public class ArchivesDaprUtil {
return res; return res;
} }
/**
* @Author huyc
* @Description 获取所有附属信息
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() {
R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/getInfoByLeaveMap" , "", Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有附属信息失败!");
}
Map<String,BusinessEmployeeExtendByLeave> map = JSON.parseObject(JSON.toJSONString(res.getData()),new TypeReference<HashMap<String,BusinessEmployeeExtendByLeave>>(){});
return R.ok(map);
}
/** /**
* @Author huyc * @Author huyc
* @Description 获取所有非离职员工拓展表信息 * @Description 获取所有非离职员工拓展表信息
......
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