mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-09-20 06:55:59 +08:00
feat: 员工离职代码修改
This commit is contained in:
parent
5fbecb27e1
commit
4fbaa816e5
|
@ -80,7 +80,7 @@ public class SysEveUserStaffController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(id = "staff006", value = "员工离职", method = "POST", allUse = "2")
|
@ApiOperation(id = "staff006", value = "员工离职", method = "POST", allUse = "2")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(id = "rowId", name = "id", value = "员工id", required = "required"),
|
@ApiImplicitParam(id = "id", name = "id", value = "员工id", required = "required"),
|
||||||
@ApiImplicitParam(id = "quitTime", name = "quitTime", value = "离职时间"),
|
@ApiImplicitParam(id = "quitTime", name = "quitTime", value = "离职时间"),
|
||||||
@ApiImplicitParam(id = "quitReason", name = "quitReason", value = "离职原因")})
|
@ApiImplicitParam(id = "quitReason", name = "quitReason", value = "离职原因")})
|
||||||
@RequestMapping("/post/SysEveUserStaffController/editSysUserStaffState")
|
@RequestMapping("/post/SysEveUserStaffController/editSysUserStaffState")
|
||||||
|
|
|
@ -21,8 +21,6 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface SysEveUserStaffDao extends SkyeyeBaseMapper<SysEveUserStaff> {
|
public interface SysEveUserStaffDao extends SkyeyeBaseMapper<SysEveUserStaff> {
|
||||||
|
|
||||||
int editSysUserStaffState(Map<String, Object> map);
|
|
||||||
|
|
||||||
List<Map<String, Object>> queryUserMationList(@Param("userIds") String userIds, @Param("staffIds") String staffIds);
|
List<Map<String, Object>> queryUserMationList(@Param("userIds") String userIds, @Param("staffIds") String staffIds);
|
||||||
|
|
||||||
int insertStaffCheckWorkTimeRelation(List<Map<String, Object>> staffTimeMation);
|
int insertStaffCheckWorkTimeRelation(List<Map<String, Object>> staffTimeMation);
|
||||||
|
|
|
@ -281,9 +281,15 @@ public class SysEveUserStaffServiceImpl extends SkyeyeBusinessServiceImpl<SysEve
|
||||||
@Transactional(value = TRANSACTION_MANAGER_VALUE, rollbackFor = Exception.class)
|
@Transactional(value = TRANSACTION_MANAGER_VALUE, rollbackFor = Exception.class)
|
||||||
public void editSysUserStaffState(InputObject inputObject, OutputObject outputObject) {
|
public void editSysUserStaffState(InputObject inputObject, OutputObject outputObject) {
|
||||||
Map<String, Object> map = inputObject.getParams();
|
Map<String, Object> map = inputObject.getParams();
|
||||||
map.put("state", UserStaffState.QUIT.getKey());
|
|
||||||
sysEveUserStaffDao.editSysUserStaffState(map);
|
|
||||||
String staffId = map.get("id").toString();
|
String staffId = map.get("id").toString();
|
||||||
|
// 设置离职信息
|
||||||
|
UpdateWrapper<SysEveUserStaff> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq(CommonConstants.ID, staffId);
|
||||||
|
updateWrapper.set(MybatisPlusUtil.toColumns(SysEveUserStaff::getState), UserStaffState.QUIT.getKey());
|
||||||
|
updateWrapper.set(MybatisPlusUtil.toColumns(SysEveUserStaff::getQuitTime), map.get("quitTime").toString());
|
||||||
|
updateWrapper.set(MybatisPlusUtil.toColumns(SysEveUserStaff::getQuitReason), map.get("quitReason").toString());
|
||||||
|
update(updateWrapper);
|
||||||
|
|
||||||
SysEveUserStaff staffMation = selectById(staffId);
|
SysEveUserStaff staffMation = selectById(staffId);
|
||||||
if (!ToolUtil.isBlank(staffMation.getUserId())) {
|
if (!ToolUtil.isBlank(staffMation.getUserId())) {
|
||||||
// 删除redis中缓存的单位下的用户
|
// 删除redis中缓存的单位下的用户
|
||||||
|
|
|
@ -2,16 +2,6 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.skyeye.personnel.dao.SysEveUserStaffDao">
|
<mapper namespace="com.skyeye.personnel.dao.SysEveUserStaffDao">
|
||||||
|
|
||||||
<update id="editSysUserStaffState" parameterType="java.util.Map">
|
|
||||||
UPDATE sys_eve_user_staff a
|
|
||||||
<set>
|
|
||||||
a.state = #{state},
|
|
||||||
a.quit_time = #{quitTime},
|
|
||||||
a.quit_reason = #{quitReason}
|
|
||||||
</set>
|
|
||||||
WHERE a.id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="queryUserMationList" resultType="java.util.Map">
|
<select id="queryUserMationList" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
a.user_id id,
|
a.user_id id,
|
||||||
|
|
Loading…
Reference in a new issue