Bläddra i källkod

补卡配置、补卡记录

LIVE_YE 2 år sedan
förälder
incheckning
549e4db8df

+ 126 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/CardReplacementRecordController.java

@@ -0,0 +1,126 @@
+package com.ruoyi.web.controller.kaoqin;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.CardReplacementRecord;
+import com.ruoyi.system.service.ICardReplacementRecordService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 补卡记录Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+@RestController
+@RequestMapping("/system/record")
+public class CardReplacementRecordController extends BaseController
+{
+    @Autowired
+    private ICardReplacementRecordService cardReplacementRecordService;
+
+    /**
+     * 查询补卡记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:record:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CardReplacementRecord cardReplacementRecord)
+    {
+        startPage();
+        List<CardReplacementRecord> list = cardReplacementRecordService.selectCardReplacementRecordList(cardReplacementRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出补卡记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:record:export')")
+    @Log(title = "补卡记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, CardReplacementRecord cardReplacementRecord)
+    {
+        List<CardReplacementRecord> list = cardReplacementRecordService.selectCardReplacementRecordList(cardReplacementRecord);
+        ExcelUtil<CardReplacementRecord> util = new ExcelUtil<CardReplacementRecord>(CardReplacementRecord.class);
+        util.exportExcel(response, list, "补卡记录数据");
+    }
+
+    /**
+     * 获取补卡记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:record:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(cardReplacementRecordService.selectCardReplacementRecordById(id));
+    }
+
+    /**
+     * 新增补卡记录
+     */
+    @Log(title = "补卡记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CardReplacementRecord cardReplacementRecord)
+    {
+        return toAjax(cardReplacementRecordService.insertCardReplacementRecord(cardReplacementRecord));
+    }
+
+    /**
+     * 修改补卡记录
+     */
+    @Log(title = "补卡记录", businessType = BusinessType.UPDATE)
+    @PostMapping("put")
+    public AjaxResult edit(@RequestBody CardReplacementRecord cardReplacementRecord)
+    {
+        return toAjax(cardReplacementRecordService.updateCardReplacementRecord(cardReplacementRecord));
+    }
+
+    /**
+     * 删除补卡记录
+     */
+    @PreAuthorize("@ss.hasPermi('system:record:remove')")
+    @Log(title = "补卡记录", businessType = BusinessType.DELETE)
+    @GetMapping(value = "/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(cardReplacementRecordService.deleteCardReplacementRecordByIds(ids));
+    }
+
+    /***
+     * 补卡审核
+     * @param id 数据id
+     * @param isPass 是否通过 1:不通过,2:通过'
+     * @return
+     */
+    @GetMapping(value = "/putPass")
+    public AjaxResult putPass(CardReplacementRecord cardReplacementRecord)
+    {
+        return toAjax(cardReplacementRecordService.putPass(cardReplacementRecord));
+    }
+
+    /**
+     * 获取当前账号下的补卡列表
+     */
+    @GetMapping("/presentList")
+    public TableDataInfo presentList(CardReplacementRecord cardReplacementRecord)
+    {
+        startPage();
+        List<CardReplacementRecord> list = cardReplacementRecordService.presentList(cardReplacementRecord);
+        return getDataTable(list);
+    }
+
+}

+ 102 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/ProcessConfigurationController.java

@@ -0,0 +1,102 @@
+package com.ruoyi.web.controller.kaoqin;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.ProcessConfiguration;
+import com.ruoyi.system.service.IProcessConfigurationService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 补卡、请假流程配置Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+@RestController
+@RequestMapping("/system/configuration")
+public class ProcessConfigurationController extends BaseController
+{
+    @Autowired
+    private IProcessConfigurationService processConfigurationService;
+
+    /**
+     * 查询补卡、请假流程配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ProcessConfiguration processConfiguration)
+    {
+        startPage();
+        List<ProcessConfiguration> list = processConfigurationService.selectProcessConfigurationList(processConfiguration);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出补卡、请假流程配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:export')")
+    @Log(title = "补卡、请假流程配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ProcessConfiguration processConfiguration)
+    {
+        List<ProcessConfiguration> list = processConfigurationService.selectProcessConfigurationList(processConfiguration);
+        ExcelUtil<ProcessConfiguration> util = new ExcelUtil<ProcessConfiguration>(ProcessConfiguration.class);
+        util.exportExcel(response, list, "补卡、请假流程配置数据");
+    }
+
+    /**
+     * 获取补卡、请假流程配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(processConfigurationService.selectProcessConfigurationById(id));
+    }
+
+    /**
+     * 新增补卡、请假流程配置
+     */
+    @Log(title = "补卡、请假流程配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ProcessConfiguration processConfiguration)
+    {
+        return toAjax(processConfigurationService.insertProcessConfiguration(processConfiguration));
+    }
+
+    /**
+     * 修改补卡、请假流程配置
+     */
+    @Log(title = "补卡、请假流程配置", businessType = BusinessType.UPDATE)
+    @PostMapping("put")
+    public AjaxResult edit(@RequestBody ProcessConfiguration processConfiguration)
+    {
+        return toAjax(processConfigurationService.updateProcessConfiguration(processConfiguration));
+    }
+
+    /**
+     * 删除补卡、请假流程配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:remove')")
+    @Log(title = "补卡、请假流程配置", businessType = BusinessType.DELETE)
+    @GetMapping(value = "/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(processConfigurationService.deleteProcessConfigurationByIds(ids));
+    }
+}

+ 31 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -77,7 +77,9 @@ public class SysUserController extends BaseController
     {
         startPage();
         SysUser users = SecurityUtils.getLoginUser().getUser();
-        user.setDeptId(users.getDeptId());
+        if(user.getDeptId()==null || user.getDeptId()==0l){
+            user.setDeptId(users.getDeptId());
+        }
         List<SysUser> list = userService.selectUserList(user);
         return getDataTable(list);
     }
@@ -218,7 +220,6 @@ public class SysUserController extends BaseController
     /**
      * 修改用户
      */
-    @PreAuthorize("@ss.hasPermi('system:user:edit')")
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
     public AjaxResult edit(@Validated @RequestBody SysUser user)
@@ -243,6 +244,34 @@ public class SysUserController extends BaseController
         return toAjax(userService.updateUser(user));
     }
 
+    /**
+     * 修改用户
+     */
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/app/put")
+    public AjaxResult put(@Validated @RequestBody SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUser(user));
+    }
+
+
     /**
      * 删除用户
      */

+ 2 - 2
ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java

@@ -153,7 +153,7 @@ public class EscapeUtil
         return tmp.toString();
     }
 
-    public static void main(String[] args)
+    /*public static void main(String[] args)
     {
         String html = "<script>alert(1);</script>";
         String escape = EscapeUtil.escape(html);
@@ -163,5 +163,5 @@ public class EscapeUtil
         System.out.println("clean: " + EscapeUtil.clean(html));
         System.out.println("escape: " + escape);
         System.out.println("unescape: " + EscapeUtil.unescape(escape));
-    }
+    }*/
 }

+ 175 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/CardReplacementRecord.java

@@ -0,0 +1,175 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 补卡记录对象 card_replacement_record
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public class CardReplacementRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 人员id */
+    private Long userId;
+
+    /** 申请人姓名 */
+    @Excel(name = "申请人姓名")
+    private String userName;
+
+    /** 当前所属部门id */
+    private Long deptId;
+
+    /** 当前所属部门 */
+    private String deptName;
+
+
+    /** 申请时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applicationTime;
+
+    /** 补卡理由 */
+    @Excel(name = "补卡理由")
+    private String reason;
+
+    /** 审批人员id */
+    private Long examinersId;
+
+    /** 审批人员姓名 */
+    @Excel(name = "审批人员姓名")
+    private String examinersName;
+
+    /** 是否通过 0:未处理,1:不通过,2:通过 */
+    @Excel(name = "是否通过 0:未处理,1:不通过,2:通过")
+    private String isPass;
+
+    /** 当前所属部门id合集 */
+    private List<Long> deptIds;
+
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setUserName(String userName) 
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName() 
+    {
+        return userName;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setApplicationTime(Date applicationTime) 
+    {
+        this.applicationTime = applicationTime;
+    }
+
+    public Date getApplicationTime() 
+    {
+        return applicationTime;
+    }
+    public void setReason(String reason) 
+    {
+        this.reason = reason;
+    }
+
+    public String getReason() 
+    {
+        return reason;
+    }
+    public void setExaminersId(Long examinersId) 
+    {
+        this.examinersId = examinersId;
+    }
+
+    public Long getExaminersId() 
+    {
+        return examinersId;
+    }
+    public void setExaminersName(String examinersName) 
+    {
+        this.examinersName = examinersName;
+    }
+
+    public String getExaminersName() 
+    {
+        return examinersName;
+    }
+    public void setIsPass(String isPass) 
+    {
+        this.isPass = isPass;
+    }
+
+    public String getIsPass() 
+    {
+        return isPass;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public List<Long> getDeptIds() {
+        return deptIds;
+    }
+
+    public void setDeptIds(List<Long> deptIds) {
+        this.deptIds = deptIds;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("userId", getUserId())
+            .append("userName", getUserName())
+            .append("deptId", getDeptId())
+            .append("applicationTime", getApplicationTime())
+            .append("reason", getReason())
+            .append("examinersId", getExaminersId())
+            .append("examinersName", getExaminersName())
+            .append("isPass", getIsPass())
+            .toString();
+    }
+}

+ 124 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ProcessConfiguration.java

@@ -0,0 +1,124 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 补卡、请假流程配置对象 process_configuration
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public class ProcessConfiguration extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    private Long id;
+
+    /** 人员id */
+    private Long userId;
+
+    /** 人员姓名 */
+    @Excel(name = "人员姓名")
+    private String userName;
+
+    /** 审批管理部门id */
+    private Long deptId;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 配置类型 1:补卡,2:请假 */
+    @Excel(name = "配置类型 1:补卡,2:请假")
+    private String type;
+
+    /** 角色 1:审批员 ,2:抄送员 */
+    @Excel(name = "角色 1:审批员 ,2:抄送员")
+    private String role;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setUserName(String userName) 
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName() 
+    {
+        return userName;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setRole(String role) 
+    {
+        this.role = role;
+    }
+
+    public String getRole() 
+    {
+        return role;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("userId", getUserId())
+            .append("userName", getUserName())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("type", getType())
+            .append("role", getRole())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CardReplacementRecordMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.CardReplacementRecord;
+
+/**
+ * 补卡记录Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public interface CardReplacementRecordMapper 
+{
+    /**
+     * 查询补卡记录
+     * 
+     * @param id 补卡记录主键
+     * @return 补卡记录
+     */
+    public CardReplacementRecord selectCardReplacementRecordById(Long id);
+
+    /**
+     * 查询补卡记录列表
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 补卡记录集合
+     */
+    public List<CardReplacementRecord> selectCardReplacementRecordList(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 新增补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    public int insertCardReplacementRecord(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 修改补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    public int updateCardReplacementRecord(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 删除补卡记录
+     * 
+     * @param id 补卡记录主键
+     * @return 结果
+     */
+    public int deleteCardReplacementRecordById(Long id);
+
+    /**
+     * 批量删除补卡记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCardReplacementRecordByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProcessConfigurationMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.ProcessConfiguration;
+
+/**
+ * 补卡、请假流程配置Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public interface ProcessConfigurationMapper 
+{
+    /**
+     * 查询补卡、请假流程配置
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 补卡、请假流程配置
+     */
+    public ProcessConfiguration selectProcessConfigurationById(Long id);
+
+    /**
+     * 查询补卡、请假流程配置列表
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 补卡、请假流程配置集合
+     */
+    public List<ProcessConfiguration> selectProcessConfigurationList(ProcessConfiguration processConfiguration);
+
+    /**
+     * 新增补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    public int insertProcessConfiguration(ProcessConfiguration processConfiguration);
+
+    /**
+     * 修改补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    public int updateProcessConfiguration(ProcessConfiguration processConfiguration);
+
+    /**
+     * 删除补卡、请假流程配置
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 结果
+     */
+    public int deleteProcessConfigurationById(Long id);
+
+    /**
+     * 批量删除补卡、请假流程配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProcessConfigurationByIds(Long[] ids);
+}

+ 65 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ICardReplacementRecordService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.CardReplacementRecord;
+
+/**
+ * 补卡记录Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public interface ICardReplacementRecordService 
+{
+    /**
+     * 查询补卡记录
+     * 
+     * @param id 补卡记录主键
+     * @return 补卡记录
+     */
+    public CardReplacementRecord selectCardReplacementRecordById(Long id);
+
+    /**
+     * 查询补卡记录列表
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 补卡记录集合
+     */
+    public List<CardReplacementRecord> selectCardReplacementRecordList(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 新增补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    public int insertCardReplacementRecord(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 修改补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    public int updateCardReplacementRecord(CardReplacementRecord cardReplacementRecord);
+
+    /**
+     * 批量删除补卡记录
+     * 
+     * @param ids 需要删除的补卡记录主键集合
+     * @return 结果
+     */
+    public int deleteCardReplacementRecordByIds(Long[] ids);
+
+    /**
+     * 删除补卡记录信息
+     * 
+     * @param id 补卡记录主键
+     * @return 结果
+     */
+    public int deleteCardReplacementRecordById(Long id);
+
+    int putPass(CardReplacementRecord cardReplacementRecord);
+
+    List<CardReplacementRecord> presentList(CardReplacementRecord cardReplacementRecord);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IProcessConfigurationService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.ProcessConfiguration;
+
+/**
+ * 补卡、请假流程配置Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+public interface IProcessConfigurationService 
+{
+    /**
+     * 查询补卡、请假流程配置
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 补卡、请假流程配置
+     */
+    public ProcessConfiguration selectProcessConfigurationById(Long id);
+
+    /**
+     * 查询补卡、请假流程配置列表
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 补卡、请假流程配置集合
+     */
+    public List<ProcessConfiguration> selectProcessConfigurationList(ProcessConfiguration processConfiguration);
+
+    /**
+     * 新增补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    public int insertProcessConfiguration(ProcessConfiguration processConfiguration);
+
+    /**
+     * 修改补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    public int updateProcessConfiguration(ProcessConfiguration processConfiguration);
+
+    /**
+     * 批量删除补卡、请假流程配置
+     * 
+     * @param ids 需要删除的补卡、请假流程配置主键集合
+     * @return 结果
+     */
+    public int deleteProcessConfigurationByIds(Long[] ids);
+
+    /**
+     * 删除补卡、请假流程配置信息
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 结果
+     */
+    public int deleteProcessConfigurationById(Long id);
+}

+ 130 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CardReplacementRecordServiceImpl.java

@@ -0,0 +1,130 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.ProcessConfiguration;
+import com.ruoyi.system.mapper.ProcessConfigurationMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.CardReplacementRecordMapper;
+import com.ruoyi.system.domain.CardReplacementRecord;
+import com.ruoyi.system.service.ICardReplacementRecordService;
+
+/**
+ * 补卡记录Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+@Service
+public class CardReplacementRecordServiceImpl implements ICardReplacementRecordService 
+{
+    @Autowired
+    private CardReplacementRecordMapper cardReplacementRecordMapper;
+
+    @Autowired
+    private ProcessConfigurationMapper processConfigurationMapper;
+
+    /**
+     * 查询补卡记录
+     * 
+     * @param id 补卡记录主键
+     * @return 补卡记录
+     */
+    @Override
+    public CardReplacementRecord selectCardReplacementRecordById(Long id)
+    {
+        return cardReplacementRecordMapper.selectCardReplacementRecordById(id);
+    }
+
+    /**
+     * 查询补卡记录列表
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 补卡记录
+     */
+    @Override
+    public List<CardReplacementRecord> selectCardReplacementRecordList(CardReplacementRecord cardReplacementRecord)
+    {
+        return cardReplacementRecordMapper.selectCardReplacementRecordList(cardReplacementRecord);
+    }
+
+    /**
+     * 新增补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    @Override
+    public int insertCardReplacementRecord(CardReplacementRecord cardReplacementRecord)
+    {
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        cardReplacementRecord.setUserId(user.getUserId());
+        cardReplacementRecord.setUserName(user.getNickName());
+        cardReplacementRecord.setDeptId(user.getDeptId());
+        cardReplacementRecord.setDeptName(user.getDept().getDeptName());
+        return cardReplacementRecordMapper.insertCardReplacementRecord(cardReplacementRecord);
+    }
+
+    /**
+     * 修改补卡记录
+     * 
+     * @param cardReplacementRecord 补卡记录
+     * @return 结果
+     */
+    @Override
+    public int updateCardReplacementRecord(CardReplacementRecord cardReplacementRecord)
+    {
+        return cardReplacementRecordMapper.updateCardReplacementRecord(cardReplacementRecord);
+    }
+
+    /**
+     * 批量删除补卡记录
+     * 
+     * @param ids 需要删除的补卡记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCardReplacementRecordByIds(Long[] ids)
+    {
+        return cardReplacementRecordMapper.deleteCardReplacementRecordByIds(ids);
+    }
+
+    /**
+     * 删除补卡记录信息
+     * 
+     * @param id 补卡记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCardReplacementRecordById(Long id)
+    {
+        return cardReplacementRecordMapper.deleteCardReplacementRecordById(id);
+    }
+
+    @Override
+    public int putPass(CardReplacementRecord cardReplacementRecord) {
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        cardReplacementRecord.setExaminersId(user.getUserId());
+        cardReplacementRecord.setExaminersName(user.getNickName());
+        return cardReplacementRecordMapper.updateCardReplacementRecord(cardReplacementRecord);
+    }
+
+    @Override
+    public List<CardReplacementRecord> presentList(CardReplacementRecord cardReplacementRecord) {
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        //获取当前人员补卡配置所在的部门id
+        ProcessConfiguration processConfiguration = new ProcessConfiguration();
+        processConfiguration.setUserId(user.getUserId());
+        List<ProcessConfiguration> list = processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
+        List<Long> deptIds = list.stream().map(ProcessConfiguration::getDeptId).collect(Collectors.toList());
+        cardReplacementRecord.setDeptIds(deptIds);
+        return cardReplacementRecordMapper.selectCardReplacementRecordList(cardReplacementRecord);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProcessConfigurationServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.ProcessConfigurationMapper;
+import com.ruoyi.system.domain.ProcessConfiguration;
+import com.ruoyi.system.service.IProcessConfigurationService;
+
+/**
+ * 补卡、请假流程配置Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-08
+ */
+@Service
+public class ProcessConfigurationServiceImpl implements IProcessConfigurationService 
+{
+    @Autowired
+    private ProcessConfigurationMapper processConfigurationMapper;
+
+    /**
+     * 查询补卡、请假流程配置
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 补卡、请假流程配置
+     */
+    @Override
+    public ProcessConfiguration selectProcessConfigurationById(Long id)
+    {
+        return processConfigurationMapper.selectProcessConfigurationById(id);
+    }
+
+    /**
+     * 查询补卡、请假流程配置列表
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 补卡、请假流程配置
+     */
+    @Override
+    public List<ProcessConfiguration> selectProcessConfigurationList(ProcessConfiguration processConfiguration)
+    {
+        return processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
+    }
+
+    /**
+     * 新增补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    @Override
+    public int insertProcessConfiguration(ProcessConfiguration processConfiguration)
+    {
+        processConfiguration.setCreateTime(DateUtils.getNowDate());
+        return processConfigurationMapper.insertProcessConfiguration(processConfiguration);
+    }
+
+    /**
+     * 修改补卡、请假流程配置
+     * 
+     * @param processConfiguration 补卡、请假流程配置
+     * @return 结果
+     */
+    @Override
+    public int updateProcessConfiguration(ProcessConfiguration processConfiguration)
+    {
+        processConfiguration.setUpdateTime(DateUtils.getNowDate());
+        return processConfigurationMapper.updateProcessConfiguration(processConfiguration);
+    }
+
+    /**
+     * 批量删除补卡、请假流程配置
+     * 
+     * @param ids 需要删除的补卡、请假流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProcessConfigurationByIds(Long[] ids)
+    {
+        return processConfigurationMapper.deleteProcessConfigurationByIds(ids);
+    }
+
+    /**
+     * 删除补卡、请假流程配置信息
+     * 
+     * @param id 补卡、请假流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProcessConfigurationById(Long id)
+    {
+        return processConfigurationMapper.deleteProcessConfigurationById(id);
+    }
+}

+ 101 - 0
ruoyi-system/src/main/resources/mapper/system/CardReplacementRecordMapper.xml

@@ -0,0 +1,101 @@
+<?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.ruoyi.system.mapper.CardReplacementRecordMapper">
+    
+    <resultMap type="CardReplacementRecord" id="CardReplacementRecordResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="applicationTime"    column="application_time"    />
+        <result property="reason"    column="reason"    />
+        <result property="examinersId"    column="examiners_id"    />
+        <result property="examinersName"    column="examiners_name"    />
+        <result property="isPass"    column="is_pass"    />
+    </resultMap>
+
+    <sql id="selectCardReplacementRecordVo">
+        select id, user_id, user_name, dept_id,dept_name, application_time, reason, examiners_id, examiners_name, is_pass from card_replacement_record
+    </sql>
+
+    <select id="selectCardReplacementRecordList" parameterType="CardReplacementRecord" resultMap="CardReplacementRecordResult">
+        <include refid="selectCardReplacementRecordVo"/>
+        <where>
+            <if test="userId != null  and userId != 0"> and user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="deptId != null  and deptId != 0"> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="applicationTime != null "> and application_time = #{applicationTime}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+            <if test="examinersName != null  and examinersName != ''"> and examiners_name like concat('%', #{examinersName}, '%')</if>
+            <if test="isPass != null  and isPass != ''"> and is_pass = #{isPass}</if>
+            <if test="deptIds!=null and deptIds.size() >0">
+                and dept_id in
+                <foreach item="deptId" collection="deptIds" open="(" separator="," close=")">
+                    #{deptId}
+                </foreach>
+            </if>
+        </where>
+    </select>
+    
+    <select id="selectCardReplacementRecordById" parameterType="Long" resultMap="CardReplacementRecordResult">
+        <include refid="selectCardReplacementRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCardReplacementRecord" parameterType="CardReplacementRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into card_replacement_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="applicationTime != null">application_time,</if>
+            <if test="reason != null">reason,</if>
+            <if test="examinersId != null">examiners_id,</if>
+            <if test="examinersName != null">examiners_name,</if>
+            <if test="isPass != null">is_pass,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="applicationTime != null">#{applicationTime},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="examinersId != null">#{examinersId},</if>
+            <if test="examinersName != null">#{examinersName},</if>
+            <if test="isPass != null">#{isPass},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCardReplacementRecord" parameterType="CardReplacementRecord">
+        update card_replacement_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="applicationTime != null">application_time = #{applicationTime},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="examinersId != null">examiners_id = #{examinersId},</if>
+            <if test="examinersName != null">examiners_name = #{examinersName},</if>
+            <if test="isPass != null">is_pass = #{isPass},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCardReplacementRecordById" parameterType="Long">
+        delete from card_replacement_record where id = #{id}
+    </delete>
+
+    <delete id="deleteCardReplacementRecordByIds" parameterType="String">
+        delete from card_replacement_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 99 - 0
ruoyi-system/src/main/resources/mapper/system/ProcessConfigurationMapper.xml

@@ -0,0 +1,99 @@
+<?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.ruoyi.system.mapper.ProcessConfigurationMapper">
+    
+    <resultMap type="ProcessConfiguration" id="ProcessConfigurationResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="type"    column="type"    />
+        <result property="role"    column="role"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectProcessConfigurationVo">
+        select id, user_id, user_name, dept_id, dept_name, type, role, create_by, create_time, update_by, update_time, remark from process_configuration
+    </sql>
+
+    <select id="selectProcessConfigurationList" parameterType="ProcessConfiguration" resultMap="ProcessConfigurationResult">
+        <include refid="selectProcessConfigurationVo"/>
+        <where>  
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="role != null  and role != ''"> and role = #{role}</if>
+        </where>
+    </select>
+    
+    <select id="selectProcessConfigurationById" parameterType="Long" resultMap="ProcessConfigurationResult">
+        <include refid="selectProcessConfigurationVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertProcessConfiguration" parameterType="ProcessConfiguration" useGeneratedKeys="true" keyProperty="id">
+        insert into process_configuration
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="type != null">type,</if>
+            <if test="role != null">role,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="type != null">#{type},</if>
+            <if test="role != null">#{role},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateProcessConfiguration" parameterType="ProcessConfiguration">
+        update process_configuration
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="role != null">role = #{role},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProcessConfigurationById" parameterType="Long">
+        delete from process_configuration where id = #{id}
+    </delete>
+
+    <delete id="deleteProcessConfigurationByIds" parameterType="String">
+        delete from process_configuration where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 1 - 1
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -259,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		${params.dataScope}
 	</select>
 
-	<select id="selectUserByPhonenumber" parameterType="Long" resultMap="SysUserResult">
+	<select id="selectUserByPhonenumber" parameterType="String" resultMap="SysUserResult">
 		<include refid="selectUserVo"/>
 		where u.phonenumber = #{phonenumber}
 		and u.del_flag = '0'