Forráskód Böngészése

支部成员管理 - 年度数据归档

Wang Zi Wen 2 éve
szülő
commit
616cbf49f1

+ 158 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchMemHisController.java

@@ -0,0 +1,158 @@
+package com.ruoyi.web.controller.branch;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.SysPost;
+import com.ruoyi.system.service.ISysDictTypeService;
+import com.ruoyi.system.service.ISysUserService;
+import org.apache.commons.collections4.CollectionUtils;
+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.branch.domain.TBranchMemHis;
+import com.ruoyi.branch.service.ITBranchMemHisService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 年度数据归档Controller
+ * 
+ * @author ruoyi
+ * @date 2023-09-14
+ */
+@RestController
+@RequestMapping("/branch/his")
+public class TBranchMemHisController extends BaseController
+{
+    @Autowired
+    private ITBranchMemHisService tBranchMemHisService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysDictTypeService sysDictTypeService;
+
+    /**
+     * 查询年度数据归档列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBranchMemHis tBranchMemHis)
+    {
+        startPage();
+        List<TBranchMemHis> list = tBranchMemHisService.selectTBranchMemHisList(tBranchMemHis);
+        TableDataInfo dataTable = getDataTable(list);
+        dataTable.setTotal(list.size());
+        return dataTable;
+    }
+
+    /**
+     * 导出年度数据归档列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:export')")
+    @Log(title = "年度数据归档", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBranchMemHis tBranchMemHis)
+    {
+        List<SysDictData> memberEducationLevel = sysDictTypeService.selectDictDataByType("member_education_level");
+        List<SysDictData> memberEthnic = sysDictTypeService.selectDictDataByType("member_ethnic");
+        List<TBranchMemHis> list = tBranchMemHisService.selectTBranchMemHisList(tBranchMemHis);
+        for (TBranchMemHis branchMemHis : list) {
+            for (SysDictData data : memberEducationLevel) {
+                if (data.getDictValue().equals(branchMemHis.getEducationLevel())) {
+                    branchMemHis.setEducationLevel(data.getDictLabel());
+                }
+            }
+            for (SysDictData data : memberEthnic) {
+                if (data.getDictValue().equals(branchMemHis.getEthnic())) {
+                    branchMemHis.setEthnic(data.getDictLabel());
+                }
+            }
+            if (StringUtils.isNotEmpty(branchMemHis.getCurrentMentor())) {
+                String name = "";
+                for (String s : branchMemHis.getCurrentMentor().split(",")) {
+                    SysUser sysUser = userService.selectUserById(Long.valueOf(s));
+                    name += sysUser.getNickName() + "、";
+                }
+                branchMemHis.setCurrentMentor(name.substring(0, name.length() - 1));
+            }
+            if (CollectionUtils.isNotEmpty(branchMemHis.getPosts())) {
+                String postName = "";
+                for (SysPost post : branchMemHis.getPosts()) {
+                    postName += post.getPostName() + "兼";
+                }
+                branchMemHis.setCurrentPost(postName.substring(0, postName.length() - 1));
+            }
+            if (CollectionUtils.isNotEmpty(branchMemHis.getRoles())) {
+                String roleName = "";
+                for (SysRole role : branchMemHis.getRoles()) {
+                    roleName += role.getRoleName() + "兼";
+                }
+                branchMemHis.setRoleString(roleName.substring(0, roleName.length() - 1));
+            }
+        }
+        ExcelUtil<TBranchMemHis> util = new ExcelUtil<TBranchMemHis>(TBranchMemHis.class);
+        util.exportExcel(response, list, "年度数据归档数据");
+    }
+
+    /**
+     * 获取年度数据归档详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:query')")
+    @GetMapping(value = "/{memHisId}")
+    public AjaxResult getInfo(@PathVariable("memHisId") Long memHisId)
+    {
+        return success(tBranchMemHisService.selectTBranchMemHisByMemHisId(memHisId));
+    }
+
+    /**
+     * 新增年度数据归档
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:add')")
+    @Log(title = "年度数据归档", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBranchMemHis tBranchMemHis)
+    {
+        return toAjax(tBranchMemHisService.insertTBranchMemHis(tBranchMemHis));
+    }
+
+    /**
+     * 修改年度数据归档
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:edit')")
+    @Log(title = "年度数据归档", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBranchMemHis tBranchMemHis)
+    {
+        return toAjax(tBranchMemHisService.updateTBranchMemHis(tBranchMemHis));
+    }
+
+    /**
+     * 删除年度数据归档
+     */
+    @PreAuthorize("@ss.hasPermi('branch:his:remove')")
+    @Log(title = "年度数据归档", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{memHisIds}")
+    public AjaxResult remove(@PathVariable Long[] memHisIds)
+    {
+        return toAjax(tBranchMemHisService.deleteTBranchMemHisByMemHisIds(memHisIds));
+    }
+}

+ 4 - 0
ruoyi-quartz/pom.xml

@@ -34,6 +34,10 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-system</artifactId>
+        </dependency>
 
     </dependencies>
 

+ 48 - 0
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/BranchMemHisTask.java

@@ -0,0 +1,48 @@
+package com.ruoyi.quartz.task;
+
+import com.ruoyi.branch.domain.TBranchMemHis;
+import com.ruoyi.branch.domain.TBranchMember;
+import com.ruoyi.branch.mapper.TBranchMemHisMapper;
+import com.ruoyi.branch.mapper.TBranchMemberMapper;
+import com.ruoyi.branch.service.ITBranchMemHisService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import com.ruoyi.branch.service.ITBranchMemberService;
+
+import java.util.Calendar;
+import java.util.List;
+
+/**
+ * 支部成员管理 定时任务
+ *
+ * @author Wang Zi Wen
+ * @email wangggziwen@163.com
+ * @date 2023/09/14 14:10:49
+ */
+@Component("branchMemHisTask")
+public class BranchMemHisTask {
+
+    @Autowired
+    private TBranchMemberMapper tBranchMemberMapper;
+
+    @Autowired
+    private TBranchMemHisMapper tBranchMemHisMapper;
+
+    /**
+     * 年度数据归档
+     */
+    public void addBranchMemHis()
+    {
+        List<TBranchMember> tBranchMembers = tBranchMemberMapper.selectTBranchMemberList(new TBranchMember());
+        Calendar calendar = Calendar.getInstance();
+        int year = calendar.get(Calendar.YEAR);
+        for (TBranchMember tBranchMember : tBranchMembers) {
+            TBranchMemHis tBranchMemHis = new TBranchMemHis();
+            BeanUtils.copyProperties(tBranchMember, tBranchMemHis);
+            tBranchMemHis.setMemHisYear(year + "");
+            tBranchMemHisMapper.insertTBranchMemHis(tBranchMemHis);
+        }
+    }
+
+}

+ 4 - 1
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml

@@ -69,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
  	
  	<insert id="insertJobLog" parameterType="SysJobLog">
+		<selectKey keyProperty="jobLogId" resultType="long" order="BEFORE">
+			SELECT seq_sys_job_log.NEXTVAL as jobLogId FROM DUAL
+		</selectKey>
  		insert into sys_job_log(
  			<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
  			<if test="jobName != null and jobName != ''">job_name,</if>
@@ -86,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
- 			sysdate()
+ 			sysdate
  		)
 	</insert>
 

+ 5 - 2
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml

@@ -75,12 +75,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status !=null">status = #{status},</if>
  			<if test="remark != null and remark != ''">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = sysdate
  		</set>
  		where job_id = #{jobId}
 	</update>
  	
  	<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
+		<selectKey keyProperty="jobId" resultType="long" order="BEFORE">
+			SELECT seq_sys_job.NEXTVAL as jobId FROM DUAL
+		</selectKey>
  		insert into sys_job(
  			<if test="jobId != null and jobId != 0">job_id,</if>
  			<if test="jobName != null and jobName != ''">job_name,</if>
@@ -104,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			sysdate
  		)
 	</insert>
 

+ 581 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchMemHis.java

@@ -0,0 +1,581 @@
+package com.ruoyi.branch.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.system.domain.SysPost;
+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;
+
+/**
+ * 年度数据归档对象 t_branch_mem_his
+ * 
+ * @author ruoyi
+ * @date 2023-09-14
+ */
+public class TBranchMemHis extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long memHisId;
+
+    /** 归档年份 */
+    @Excel(name = "归档年份")
+    private String memHisYear;
+
+    /** 部门id */
+    private Long deptId;
+
+    /** 党支部 */
+    @Excel(name = "党支部")
+    private String deptName;
+
+    /** 成员类型 */
+    private String memberType;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    private String nickName;
+
+    /** 工号 */
+    @Excel(name = "工号")
+    private String staffId;
+
+    /** 性别 */
+    @Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
+    private String sex;
+
+    /** 民族 */
+    @Excel(name = "民族")
+    private String ethnic;
+
+    /** 出生年月 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出生年月", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date birthday;
+
+    /** 学历 */
+    @Excel(name = "学历")
+    private String educationLevel;
+
+    /** 是否团员 */
+    @Excel(name = "是否团员", readConverterExp = "0=否,1=是")
+    private String isLeague;
+
+    /** 入职时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date workEntryTime;
+
+    /** 现岗位 */
+    @Excel(name = "现岗位")
+    private String currentPost;
+
+    /** 参加工作时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "参加工作时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date workJoinTime;
+
+    /** 入党时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入党时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date partyEntryTime;
+
+    /** 联系方式 */
+    @Excel(name = "联系方式")
+    private String phonenumber;
+
+    /** 委员分工 */
+    @Excel(name = "委员分工")
+    private String roleString;
+
+    /** 任职时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "任职时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date labourEntryTime;
+
+    /** 离任时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "离任时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date labourLeaveTime;
+
+    /** 调进时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "调进时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date entryTime;
+
+    /** 调出时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "调出时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date leaveTime;
+
+    /** 申请入党时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "申请入党时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyTime;
+
+    /** 建表考察时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "建表考察时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date formCreateTime;
+
+    /** 现培养人 */
+    @Excel(name = "现培养人")
+    private String currentMentor;
+
+    /** 计划发展时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划发展时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date planDevelopDuration;
+
+    /** 是否参加过入党前培训(2年有效) */
+    @Excel(name = "是否参加过入党前培训", readConverterExp = "0=否,1=是")
+    private String isTrained;
+
+    /** 备注(增减原因) */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 角色对象 */
+    private List<SysRole> roles;
+
+    /** 岗位对象 */
+    private List<SysPost> posts;
+
+    /** 主键id */
+    private Long memberId;
+
+    /** 用户id */
+    private Long userId;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 申请编号 */
+    private String apNo;
+
+    /** 流程编号 */
+    private String processId;
+
+    /** 申请状态(1已审核 0未审核) */
+    private String apStatus;
+
+    /** 转入支部id */
+    private Long newDeptId;
+
+    /** 原支部id */
+    private Long oldDeptId;
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public String getRoleString() {
+        return roleString;
+    }
+
+    public void setRoleString(String roleString) {
+        this.roleString = roleString;
+    }
+
+    public String getPhonenumber() {
+        return phonenumber;
+    }
+
+    public void setPhonenumber(String phonenumber) {
+        this.phonenumber = phonenumber;
+    }
+
+    public List<SysRole> getRoles() {
+        return roles;
+    }
+
+    public void setRoles(List<SysRole> roles) {
+        this.roles = roles;
+    }
+
+    public List<SysPost> getPosts() {
+        return posts;
+    }
+
+    public void setPosts(List<SysPost> posts) {
+        this.posts = posts;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getNickName() {
+        return nickName;
+    }
+
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+
+    public void setMemHisId(Long memHisId)
+    {
+        this.memHisId = memHisId;
+    }
+
+    public Long getMemHisId() 
+    {
+        return memHisId;
+    }
+
+    public void setMemHisYear(String memHisYear) 
+    {
+        this.memHisYear = memHisYear;
+    }
+
+    public String getMemHisYear() 
+    {
+        return memHisYear;
+    }
+
+    public void setMemberId(Long memberId) 
+    {
+        this.memberId = memberId;
+    }
+
+    public Long getMemberId() 
+    {
+        return memberId;
+    }
+
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+
+    public void setMemberType(String memberType) 
+    {
+        this.memberType = memberType;
+    }
+
+    public String getMemberType() 
+    {
+        return memberType;
+    }
+
+    public void setBirthday(Date birthday) 
+    {
+        this.birthday = birthday;
+    }
+
+    public Date getBirthday() 
+    {
+        return birthday;
+    }
+
+    public void setEducationLevel(String educationLevel) 
+    {
+        this.educationLevel = educationLevel;
+    }
+
+    public String getEducationLevel() 
+    {
+        return educationLevel;
+    }
+
+    public void setWorkJoinTime(Date workJoinTime) 
+    {
+        this.workJoinTime = workJoinTime;
+    }
+
+    public Date getWorkJoinTime() 
+    {
+        return workJoinTime;
+    }
+
+    public void setWorkEntryTime(Date workEntryTime) 
+    {
+        this.workEntryTime = workEntryTime;
+    }
+
+    public Date getWorkEntryTime() 
+    {
+        return workEntryTime;
+    }
+
+    public void setPartyEntryTime(Date partyEntryTime) 
+    {
+        this.partyEntryTime = partyEntryTime;
+    }
+
+    public Date getPartyEntryTime() 
+    {
+        return partyEntryTime;
+    }
+
+    public void setCurrentPost(String currentPost) 
+    {
+        this.currentPost = currentPost;
+    }
+
+    public String getCurrentPost() 
+    {
+        return currentPost;
+    }
+
+    public void setLabourEntryTime(Date labourEntryTime) 
+    {
+        this.labourEntryTime = labourEntryTime;
+    }
+
+    public Date getLabourEntryTime() 
+    {
+        return labourEntryTime;
+    }
+
+    public void setLabourLeaveTime(Date labourLeaveTime) 
+    {
+        this.labourLeaveTime = labourLeaveTime;
+    }
+
+    public Date getLabourLeaveTime() 
+    {
+        return labourLeaveTime;
+    }
+
+    public void setEntryTime(Date entryTime) 
+    {
+        this.entryTime = entryTime;
+    }
+
+    public Date getEntryTime() 
+    {
+        return entryTime;
+    }
+
+    public void setLeaveTime(Date leaveTime) 
+    {
+        this.leaveTime = leaveTime;
+    }
+
+    public Date getLeaveTime() 
+    {
+        return leaveTime;
+    }
+
+    public void setIsLeague(String isLeague) 
+    {
+        this.isLeague = isLeague;
+    }
+
+    public String getIsLeague() 
+    {
+        return isLeague;
+    }
+
+    public void setApplyTime(Date applyTime) 
+    {
+        this.applyTime = applyTime;
+    }
+
+    public Date getApplyTime() 
+    {
+        return applyTime;
+    }
+
+    public void setFormCreateTime(Date formCreateTime) 
+    {
+        this.formCreateTime = formCreateTime;
+    }
+
+    public Date getFormCreateTime() 
+    {
+        return formCreateTime;
+    }
+
+    public void setCurrentMentor(String currentMentor) 
+    {
+        this.currentMentor = currentMentor;
+    }
+
+    public String getCurrentMentor() 
+    {
+        return currentMentor;
+    }
+
+    public void setPlanDevelopDuration(Date planDevelopDuration) 
+    {
+        this.planDevelopDuration = planDevelopDuration;
+    }
+
+    public Date getPlanDevelopDuration() 
+    {
+        return planDevelopDuration;
+    }
+
+    public void setIsTrained(String isTrained) 
+    {
+        this.isTrained = isTrained;
+    }
+
+    public String getIsTrained() 
+    {
+        return isTrained;
+    }
+
+    public void setRemarks(String remarks) 
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() 
+    {
+        return remarks;
+    }
+
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+
+    public void setEthnic(String ethnic) 
+    {
+        this.ethnic = ethnic;
+    }
+
+    public String getEthnic() 
+    {
+        return ethnic;
+    }
+
+    public void setStaffId(String staffId) 
+    {
+        this.staffId = staffId;
+    }
+
+    public String getStaffId() 
+    {
+        return staffId;
+    }
+
+    public void setApNo(String apNo) 
+    {
+        this.apNo = apNo;
+    }
+
+    public String getApNo() 
+    {
+        return apNo;
+    }
+
+    public void setProcessId(String processId) 
+    {
+        this.processId = processId;
+    }
+
+    public String getProcessId() 
+    {
+        return processId;
+    }
+
+    public void setApStatus(String apStatus) 
+    {
+        this.apStatus = apStatus;
+    }
+
+    public String getApStatus() 
+    {
+        return apStatus;
+    }
+
+    public void setNewDeptId(Long newDeptId) 
+    {
+        this.newDeptId = newDeptId;
+    }
+
+    public Long getNewDeptId() 
+    {
+        return newDeptId;
+    }
+
+    public void setOldDeptId(Long oldDeptId) 
+    {
+        this.oldDeptId = oldDeptId;
+    }
+
+    public Long getOldDeptId() 
+    {
+        return oldDeptId;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("memHisId", getMemHisId())
+            .append("memHisYear", getMemHisYear())
+            .append("memberId", getMemberId())
+            .append("userId", getUserId())
+            .append("memberType", getMemberType())
+            .append("birthday", getBirthday())
+            .append("educationLevel", getEducationLevel())
+            .append("workJoinTime", getWorkJoinTime())
+            .append("workEntryTime", getWorkEntryTime())
+            .append("partyEntryTime", getPartyEntryTime())
+            .append("currentPost", getCurrentPost())
+            .append("labourEntryTime", getLabourEntryTime())
+            .append("labourLeaveTime", getLabourLeaveTime())
+            .append("entryTime", getEntryTime())
+            .append("leaveTime", getLeaveTime())
+            .append("isLeague", getIsLeague())
+            .append("applyTime", getApplyTime())
+            .append("formCreateTime", getFormCreateTime())
+            .append("currentMentor", getCurrentMentor())
+            .append("planDevelopDuration", getPlanDevelopDuration())
+            .append("isTrained", getIsTrained())
+            .append("remarks", getRemarks())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .append("ethnic", getEthnic())
+            .append("staffId", getStaffId())
+            .append("apNo", getApNo())
+            .append("processId", getProcessId())
+            .append("apStatus", getApStatus())
+            .append("newDeptId", getNewDeptId())
+            .append("oldDeptId", getOldDeptId())
+            .toString();
+    }
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.mapper;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchMemHis;
+
+/**
+ * 年度数据归档Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-14
+ */
+public interface TBranchMemHisMapper 
+{
+    /**
+     * 查询年度数据归档
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 年度数据归档
+     */
+    public TBranchMemHis selectTBranchMemHisByMemHisId(Long memHisId);
+
+    /**
+     * 查询年度数据归档列表
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 年度数据归档集合
+     */
+    public List<TBranchMemHis> selectTBranchMemHisList(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 新增年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    public int insertTBranchMemHis(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 修改年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    public int updateTBranchMemHis(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 删除年度数据归档
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 结果
+     */
+    public int deleteTBranchMemHisByMemHisId(Long memHisId);
+
+    /**
+     * 批量删除年度数据归档
+     * 
+     * @param memHisIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBranchMemHisByMemHisIds(Long[] memHisIds);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.service;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchMemHis;
+
+/**
+ * 年度数据归档Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-14
+ */
+public interface ITBranchMemHisService 
+{
+    /**
+     * 查询年度数据归档
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 年度数据归档
+     */
+    public TBranchMemHis selectTBranchMemHisByMemHisId(Long memHisId);
+
+    /**
+     * 查询年度数据归档列表
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 年度数据归档集合
+     */
+    public List<TBranchMemHis> selectTBranchMemHisList(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 新增年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    public int insertTBranchMemHis(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 修改年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    public int updateTBranchMemHis(TBranchMemHis tBranchMemHis);
+
+    /**
+     * 批量删除年度数据归档
+     * 
+     * @param memHisIds 需要删除的年度数据归档主键集合
+     * @return 结果
+     */
+    public int deleteTBranchMemHisByMemHisIds(Long[] memHisIds);
+
+    /**
+     * 删除年度数据归档信息
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 结果
+     */
+    public int deleteTBranchMemHisByMemHisId(Long memHisId);
+}

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchMemHisServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.branch.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.branch.mapper.TBranchMemHisMapper;
+import com.ruoyi.branch.domain.TBranchMemHis;
+import com.ruoyi.branch.service.ITBranchMemHisService;
+
+/**
+ * 年度数据归档Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-09-14
+ */
+@Service
+public class TBranchMemHisServiceImpl implements ITBranchMemHisService 
+{
+    @Autowired
+    private TBranchMemHisMapper tBranchMemHisMapper;
+
+    /**
+     * 查询年度数据归档
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 年度数据归档
+     */
+    @Override
+    public TBranchMemHis selectTBranchMemHisByMemHisId(Long memHisId)
+    {
+        return tBranchMemHisMapper.selectTBranchMemHisByMemHisId(memHisId);
+    }
+
+    /**
+     * 查询年度数据归档列表
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 年度数据归档
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchMemHis> selectTBranchMemHisList(TBranchMemHis tBranchMemHis)
+    {
+        return tBranchMemHisMapper.selectTBranchMemHisList(tBranchMemHis);
+    }
+
+    /**
+     * 新增年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    @Override
+    public int insertTBranchMemHis(TBranchMemHis tBranchMemHis)
+    {
+        tBranchMemHis.setCreateTime(DateUtils.getNowDate());
+        return tBranchMemHisMapper.insertTBranchMemHis(tBranchMemHis);
+    }
+
+    /**
+     * 修改年度数据归档
+     * 
+     * @param tBranchMemHis 年度数据归档
+     * @return 结果
+     */
+    @Override
+    public int updateTBranchMemHis(TBranchMemHis tBranchMemHis)
+    {
+        tBranchMemHis.setUpdateTime(DateUtils.getNowDate());
+        return tBranchMemHisMapper.updateTBranchMemHis(tBranchMemHis);
+    }
+
+    /**
+     * 批量删除年度数据归档
+     * 
+     * @param memHisIds 需要删除的年度数据归档主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchMemHisByMemHisIds(Long[] memHisIds)
+    {
+        return tBranchMemHisMapper.deleteTBranchMemHisByMemHisIds(memHisIds);
+    }
+
+    /**
+     * 删除年度数据归档信息
+     * 
+     * @param memHisId 年度数据归档主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchMemHisByMemHisId(Long memHisId)
+    {
+        return tBranchMemHisMapper.deleteTBranchMemHisByMemHisId(memHisId);
+    }
+}

+ 254 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchMemHisMapper.xml

@@ -0,0 +1,254 @@
+<?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.branch.mapper.TBranchMemHisMapper">
+    
+    <resultMap type="TBranchMemHis" id="TBranchMemHisResult">
+        <result property="memHisId"    column="mem_his_id"    />
+        <result property="memHisYear"    column="mem_his_year"    />
+        <result property="memberId"    column="member_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="memberType"    column="member_type"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="educationLevel"    column="education_level"    />
+        <result property="workJoinTime"    column="work_join_time"    />
+        <result property="workEntryTime"    column="work_entry_time"    />
+        <result property="partyEntryTime"    column="party_entry_time"    />
+        <result property="currentPost"    column="current_post"    />
+        <result property="labourEntryTime"    column="labour_entry_time"    />
+        <result property="labourLeaveTime"    column="labour_leave_time"    />
+        <result property="entryTime"    column="entry_time"    />
+        <result property="leaveTime"    column="leave_time"    />
+        <result property="isLeague"    column="is_league"    />
+        <result property="applyTime"    column="apply_time"    />
+        <result property="formCreateTime"    column="form_create_time"    />
+        <result property="currentMentor"    column="current_mentor"    />
+        <result property="planDevelopDuration"    column="plan_develop_duration"    />
+        <result property="isTrained"    column="is_trained"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="delFlag"    column="del_flag"    />
+        <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="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="nickName"    column="nick_name"    />
+        <result property="sex"    column="sex"    />
+        <result property="phonenumber"    column="phonenumber"    />
+        <result property="ethnic"    column="ethnic"    />
+        <result property="staffId"    column="staff_id"    />
+        <collection  property="roles"   javaType="java.util.List" resultMap="RoleResult" />
+        <collection  property="posts"   javaType="java.util.List" resultMap="PostResult" />
+    </resultMap>
+
+    <resultMap id="RoleResult" type="SysRole">
+        <id     property="roleId"       column="role_id"        />
+        <result property="roleName"     column="role_name"      />
+        <result property="roleKey"      column="role_key"       />
+        <result property="roleSort"     column="role_sort"      />
+        <result property="dataScope"     column="data_scope"    />
+        <result property="status"       column="role_status"    />
+    </resultMap>
+
+    <resultMap id="PostResult" type="SysPost">
+        <id     property="postId"       column="post_id"        />
+        <result property="postCode"     column="post_code"      />
+        <result property="postName"      column="post_name"       />
+        <result property="postSort"     column="post_sort"      />
+        <result property="status"    column="post_status"    />
+    </resultMap>
+
+    <sql id="selectTBranchMemHisVo">
+        select u.mem_his_id, u.mem_his_year, u.member_id, u.new_dept_id, u.old_dept_id, u.ap_no, u.process_id, u.ap_status, u.user_id, u.staff_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.labour_entry_time, u.labour_leave_time, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
+        us.NICK_NAME, us.SEX, us.PHONENUMBER, us.PHOTO,
+        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
+        p.post_id, p.post_code, p.post_name, p.post_sort, p.status as post_status,d.dept_name
+        from t_branch_mem_his u
+            left join sys_dept d on u.dept_id = d.dept_id
+            left join SYS_USER us on us.user_id = u.user_id
+            left join sys_user_role ur on us.user_id = ur.user_id
+            left join sys_role r on r.role_id = ur.role_id
+            left join sys_user_post up on us.user_id = up.user_id
+            left join sys_post p on p.post_id = up.post_id
+    </sql>
+
+    <select id="selectTBranchMemHisList" parameterType="TBranchMemHis" resultMap="TBranchMemHisResult">
+        <include refid="selectTBranchMemHisVo"/>
+        <where>  
+            <if test="memHisId != null "> and u.mem_his_id = #{memHisId}</if>
+            <if test="memHisYear != null  and memHisYear != ''"> and u.mem_his_year = #{memHisYear}</if>
+            <if test="memberId != null "> and u.member_id = #{memberId}</if>
+            <if test="userId != null "> and u.user_id = #{userId}</if>
+            <if test="memberType != null  and memberType != ''"> and u.member_type = #{memberType}</if>
+            <if test="birthday != null "> and u.birthday = #{birthday}</if>
+            <if test="educationLevel != null  and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
+            <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
+            <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
+            <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
+            <if test="currentPost != null  and currentPost != ''"> and u.current_post = #{currentPost}</if>
+            <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
+            <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
+            <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
+            <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
+            <if test="isLeague != null  and isLeague != ''"> and u.is_league = #{isLeague}</if>
+            <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
+            <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
+            <if test="currentMentor != null  and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
+            <if test="planDevelopDuration != null "> and u.plan_develop_duration = #{planDevelopDuration}</if>
+            <if test="isTrained != null  and isTrained != ''"> and u.is_trained = #{isTrained}</if>
+            <if test="remarks != null  and remarks != ''"> and u.remarks = #{remarks}</if>
+            <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            <if test="ethnic != null  and ethnic != ''"> and u.ethnic = #{ethnic}</if>
+            <if test="staffId != null  and staffId != ''"> and u.staff_id = #{staffId}</if>
+            <if test="apNo != null  and apNo != ''"> and u.ap_no = #{apNo}</if>
+            <if test="processId != null  and processId != ''"> and u.process_id = #{processId}</if>
+            <if test="apStatus != null  and apStatus != ''"> and u.ap_status = #{apStatus}</if>
+            <if test="newDeptId != null "> and u.new_dept_id = #{newDeptId}</if>
+            <if test="oldDeptId != null "> and u.old_dept_id = #{oldDeptId}</if>
+            and u.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTBranchMemHisByMemHisId" parameterType="Long" resultMap="TBranchMemHisResult">
+        <include refid="selectTBranchMemHisVo"/>
+        where u.mem_his_id = #{memHisId}
+        and u.del_flag = 0
+    </select>
+        
+    <insert id="insertTBranchMemHis" parameterType="TBranchMemHis">
+        <selectKey keyProperty="memHisId" resultType="long" order="BEFORE">
+            SELECT seq_t_branch_mem_his.NEXTVAL as memHisId FROM DUAL
+        </selectKey>
+        insert into t_branch_mem_his
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="memHisId != null">mem_his_id,</if>
+            <if test="memHisYear != null and memHisYear != ''">mem_his_year,</if>
+            <if test="memberId != null">member_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="memberType != null">member_type,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="educationLevel != null">education_level,</if>
+            <if test="workJoinTime != null">work_join_time,</if>
+            <if test="workEntryTime != null">work_entry_time,</if>
+            <if test="partyEntryTime != null">party_entry_time,</if>
+            <if test="currentPost != null">current_post,</if>
+            <if test="labourEntryTime != null">labour_entry_time,</if>
+            <if test="labourLeaveTime != null">labour_leave_time,</if>
+            <if test="entryTime != null">entry_time,</if>
+            <if test="leaveTime != null">leave_time,</if>
+            <if test="isLeague != null">is_league,</if>
+            <if test="applyTime != null">apply_time,</if>
+            <if test="formCreateTime != null">form_create_time,</if>
+            <if test="currentMentor != null">current_mentor,</if>
+            <if test="planDevelopDuration != null">plan_develop_duration,</if>
+            <if test="isTrained != null">is_trained,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="delFlag != null">del_flag,</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="deptId != null">dept_id,</if>
+            <if test="ethnic != null">ethnic,</if>
+            <if test="staffId != null">staff_id,</if>
+            <if test="apNo != null">ap_no,</if>
+            <if test="processId != null">process_id,</if>
+            <if test="apStatus != null">ap_status,</if>
+            <if test="newDeptId != null">new_dept_id,</if>
+            <if test="oldDeptId != null">old_dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="memHisId != null">#{memHisId},</if>
+            <if test="memHisYear != null and memHisYear != ''">#{memHisYear},</if>
+            <if test="memberId != null">#{memberId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="memberType != null">#{memberType},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="educationLevel != null">#{educationLevel},</if>
+            <if test="workJoinTime != null">#{workJoinTime},</if>
+            <if test="workEntryTime != null">#{workEntryTime},</if>
+            <if test="partyEntryTime != null">#{partyEntryTime},</if>
+            <if test="currentPost != null">#{currentPost},</if>
+            <if test="labourEntryTime != null">#{labourEntryTime},</if>
+            <if test="labourLeaveTime != null">#{labourLeaveTime},</if>
+            <if test="entryTime != null">#{entryTime},</if>
+            <if test="leaveTime != null">#{leaveTime},</if>
+            <if test="isLeague != null">#{isLeague},</if>
+            <if test="applyTime != null">#{applyTime},</if>
+            <if test="formCreateTime != null">#{formCreateTime},</if>
+            <if test="currentMentor != null">#{currentMentor},</if>
+            <if test="planDevelopDuration != null">#{planDevelopDuration},</if>
+            <if test="isTrained != null">#{isTrained},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="delFlag != null">#{delFlag},</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="deptId != null">#{deptId},</if>
+            <if test="ethnic != null">#{ethnic},</if>
+            <if test="staffId != null">#{staffId},</if>
+            <if test="apNo != null">#{apNo},</if>
+            <if test="processId != null">#{processId},</if>
+            <if test="apStatus != null">#{apStatus},</if>
+            <if test="newDeptId != null">#{newDeptId},</if>
+            <if test="oldDeptId != null">#{oldDeptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTBranchMemHis" parameterType="TBranchMemHis">
+        update t_branch_mem_his
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="memHisYear != null and memHisYear != ''">mem_his_year = #{memHisYear},</if>
+            <if test="memberId != null">member_id = #{memberId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="memberType != null">member_type = #{memberType},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="educationLevel != null">education_level = #{educationLevel},</if>
+            <if test="workJoinTime != null">work_join_time = #{workJoinTime},</if>
+            <if test="workEntryTime != null">work_entry_time = #{workEntryTime},</if>
+            <if test="partyEntryTime != null">party_entry_time = #{partyEntryTime},</if>
+            <if test="currentPost != null">current_post = #{currentPost},</if>
+            <if test="labourEntryTime != null">labour_entry_time = #{labourEntryTime},</if>
+            <if test="labourLeaveTime != null">labour_leave_time = #{labourLeaveTime},</if>
+            <if test="entryTime != null">entry_time = #{entryTime},</if>
+            <if test="leaveTime != null">leave_time = #{leaveTime},</if>
+            <if test="isLeague != null">is_league = #{isLeague},</if>
+            <if test="applyTime != null">apply_time = #{applyTime},</if>
+            <if test="formCreateTime != null">form_create_time = #{formCreateTime},</if>
+            <if test="currentMentor != null">current_mentor = #{currentMentor},</if>
+            <if test="planDevelopDuration != null">plan_develop_duration = #{planDevelopDuration},</if>
+            <if test="isTrained != null">is_trained = #{isTrained},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</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="deptId != null">dept_id = #{deptId},</if>
+            <if test="ethnic != null">ethnic = #{ethnic},</if>
+            <if test="staffId != null">staff_id = #{staffId},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="processId != null">process_id = #{processId},</if>
+            <if test="apStatus != null">ap_status = #{apStatus},</if>
+            <if test="newDeptId != null">new_dept_id = #{newDeptId},</if>
+            <if test="oldDeptId != null">old_dept_id = #{oldDeptId},</if>
+        </trim>
+        where mem_his_id = #{memHisId}
+    </update>
+
+    <update id="deleteTBranchMemHisByMemHisId" parameterType="Long">
+        update t_branch_mem_his set del_flag = 2 where mem_his_id = #{memHisId}
+    </update>
+
+    <update id="deleteTBranchMemHisByMemHisIds" parameterType="String">
+        update t_branch_mem_his set del_flag = 2 where mem_his_id in
+        <foreach item="memHisId" collection="array" open="(" separator="," close=")">
+            #{memHisId}
+        </foreach>
+    </update>
+</mapper>

+ 44 - 0
ruoyi-ui/src/api/branch/his.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询年度数据归档列表
+export function listHis(query) {
+  return request({
+    url: '/branch/his/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询年度数据归档详细
+export function getHis(memHisId) {
+  return request({
+    url: '/branch/his/' + memHisId,
+    method: 'get'
+  })
+}
+
+// 新增年度数据归档
+export function addHis(data) {
+  return request({
+    url: '/branch/his',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改年度数据归档
+export function updateHis(data) {
+  return request({
+    url: '/branch/his',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除年度数据归档
+export function delHis(memHisId) {
+  return request({
+    url: '/branch/his/' + memHisId,
+    method: 'delete'
+  })
+}

+ 340 - 0
ruoyi-ui/src/views/branch/zbjs/his/index.vue

@@ -0,0 +1,340 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" size="small" v-show="showSearch" label-width="68px">
+      <el-form-item label="归档年份" prop="memHisYear">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.memHisYear"
+                        type="year"
+                        placeholder="选择归档年份">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="名册类型" prop="memberType">
+        <el-select v-model="queryParams.memberType" placeholder="请选择成员类型">
+          <el-option
+            v-for="dict in memberTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="归属部门" prop="deptId" style="width: 268px;">
+        <treeselect style="width: 200px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['branch:his:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="hisList" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="归档年份" align="center" prop="memHisYear" />
+      <el-table-column label="党支部" align="center" prop="deptId" :formatter="deptListFormat" width="100"/>
+      <el-table-column label="成员类型" align="center" prop="memberType" :formatter="memberTypeFormat" width="100"/>
+      <el-table-column label="姓名" align="center" prop="nickName" />
+      <el-table-column label="工号" align="center" prop="staffId" />
+      <el-table-column label="性别" align="center" prop="sex">
+        <template slot-scope="scope">
+          <span>{{scope.row.sex == 0 ? "男" : "女"}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="民族" align="center" prop="ethnic" :formatter="memberEthnicFormat" />
+      <el-table-column label="出生年月" align="center" prop="birthday" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="学历" align="center" prop="educationLevel" :formatter="educationLevelFormat"/>
+      <el-table-column label="是否团员" align="center" prop="isLeague">
+        <template slot-scope="scope">
+          <span>{{scope.row.isLeague == 0 ? "否" : "是"}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="入职时间" align="center" prop="workEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.workEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="现岗位" align="center" prop="postString" width="100"/>
+      <el-table-column label="参加工作时间" align="center" prop="workJoinTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.workJoinTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="入党时间" align="center" prop="partyEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.partyEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="联系方式" align="center" prop="phonenumber" width="120"/>
+      <el-table-column label="委员分工" align="center" prop="roleString" width="100"/>
+      <el-table-column label="任职时间" align="center" prop="labourEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.labourEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="离任时间" align="center" prop="labourLeaveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.labourLeaveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="调进时间" align="center" prop="entryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.entryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="调出时间" align="center" prop="leaveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.leaveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申请入党时间" align="center" prop="applyTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="建表考察时间" align="center" prop="formCreateTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.formCreateTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="现培养人" align="center" prop="currentMentorString" width="100"/>
+      <el-table-column label="计划发展时间" align="center" prop="planDevelopDuration" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.planDevelopDuration, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否参加过入党前培训" align="center" prop="isTrained">
+        <template slot-scope="scope">
+          <span>{{scope.row.isTrained == 0 ? "否" : "是"}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listHis, getHis, delHis, addHis, updateHis, exportHis, importTemplate} from "@/api/branch/his";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listDept } from "@/api/system/dept";
+import { listUserNoPage } from "@/api/system/user";
+
+export default {
+  name: "His",
+  components: { Treeselect },
+  data() {
+    return {
+      // 用户列表
+      userList: [],
+      // 成员民族字典
+      memberEthnicOptions: [],
+      // 学历字典
+      educationLevelOptions: [],
+      // 部门树选项
+      deptOptions: [],
+      // 部门列表
+      deptList: [],
+      // 成员类型字典
+      memberTypeOptions: [],
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 年度数据归档表格数据
+      hisList: [],
+      clientHeight:300,
+      queryParams: {},
+    };
+  },
+  watch: {},
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight -250
+    })
+    this.getDeptList();
+    this.getTreeselect();
+    this.getDicts("member_ethnic").then(response => {
+      this.memberEthnicOptions = response.data;
+    });
+    this.getDicts("member_education_level").then(response => {
+      this.educationLevelOptions = response.data;
+    });
+    this.getDicts("member_type").then(response => {
+      this.memberTypeOptions = response.data;
+    });
+    this.queryParams.memHisYear = new Date();
+    this.queryParams.memberType = "2";
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    /** 查询部门列表 */
+    getDeptList() {
+      listDept().then(response => {
+        let data = response.data;
+        let deptList = [];
+        for(let i = 0; i < data.length; i++) {
+          let dept = { "dictValue" : data[i].deptId, "dictLabel" : data[i].deptName};
+          deptList.push(dept);
+        }
+        this.deptList = deptList;
+      });
+    },
+    // 成员类型字典翻译
+    memberTypeFormat(row, column) {
+      return this.selectDictLabel(this.memberTypeOptions, row.memberType);
+    },
+    // 部门列表字典翻译
+    deptListFormat(row, column) {
+      return this.selectDictLabel(this.deptList, row.deptId);
+    },
+    // 学历字典翻译
+    educationLevelFormat(row, column) {
+      return this.selectDictLabel(this.educationLevelOptions, row.educationLevel);
+    },
+    // 用户民族字典翻译
+    memberEthnicFormat(row, column) {
+      return this.selectDictLabel(this.memberEthnicOptions, row.ethnic);
+    },
+    getList() {
+      this.loading = true;
+      listUserNoPage().then(response => {
+        let rows = response.data;
+        let userList = [];
+        for (let i = 0; i < rows.length; i++) {
+          if (rows[i].userName != "admin") {
+            let user = {"dictValue": rows[i].userId, "dictLabel": rows[i].nickName};
+            userList.push(user);
+          }
+        }
+        this.userList = userList;
+        listHis({
+          "memHisYear": this.queryParams.memHisYear.getFullYear(),
+          "memberType": this.queryParams.memberType,
+          "deptId": this.queryParams.deptId,
+        }).then(response => {
+          this.hisList = response.rows;
+          for (let i = 0; i < this.hisList.length; i++) {
+            let posts = Array.from(this.hisList[i].posts);
+            let roles = Array.from(this.hisList[i].roles);
+            let roleString = "";
+            let postString = "";
+            for (let j = 0; j < roles.length; j++) {
+              if (j > 0) {
+                roleString += "\n兼" + roles[j].roleName;
+              } else {
+                roleString += roles[j].roleName;
+              }
+            }
+            for (let j = 0; j < posts.length; j++) {
+              if (j > 0) {
+                postString += "\n兼" + posts[j].postName;
+              } else {
+                postString += posts[j].postName;
+              }
+            }
+            this.hisList[i].roleString = roleString;
+            this.hisList[i].postString = postString;
+            if (this.hisList[i].currentMentor != null) {
+              let currentMentor = this.hisList[i].currentMentor.split(",");
+              let currentMentorString = "";
+              for (let j = 0; j < currentMentor.length; j++) {
+                if (j > 0) {
+                  currentMentorString += "、" + this.selectDictLabel(this.userList, currentMentor[j]);
+                } else {
+                  currentMentorString += this.selectDictLabel(this.userList, currentMentor[j]);
+                }
+              }
+              this.hisList[i].currentMentorString = currentMentorString;
+            }
+          }
+          this.total = response.total;
+          this.loading = false;
+        });
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      switch(this.queryParams.memberType) {
+        case "1":
+          this.download('branch/his/export', {
+            ...this.queryParams
+          }, this.queryParams.memHisYear.getFullYear() + `_积极分子名册_${new Date().getTime()}.xlsx`)
+          break;
+        case "2":
+          this.download('branch/his/export', {
+            ...this.queryParams
+          }, this.queryParams.memHisYear.getFullYear() + `_党员名册_${new Date().getTime()}.xlsx`)
+          break;
+        case "3":
+          this.download('branch/his/export', {
+            ...this.queryParams
+          }, this.queryParams.memHisYear.getFullYear() + `_党支部委员名册_${new Date().getTime()}.xlsx`)
+          break;
+        case "4":
+          this.download('branch/his/export', {
+            ...this.queryParams
+          }, this.queryParams.memHisYear.getFullYear() + `_发展对象名册_${new Date().getTime()}.xlsx`)
+          break;
+      }
+    },
+  }
+};
+</script>
+
+<style>
+    /** 文本换行符处理 */
+    .el-table .cell{
+        white-space: pre-wrap;
+    }
+    /** textarea字体 */
+    textarea {
+        font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
+    }
+</style>