소스 검색

支部年度工作计划

Wang Zi Wen 2 년 전
부모
커밋
e1bf166636

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchPlanController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.branch;
+
+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.branch.domain.TBranchPlan;
+import com.ruoyi.branch.service.ITBranchPlanService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 支部年度工作计划Controller
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+@RestController
+@RequestMapping("/branch/plan")
+public class TBranchPlanController extends BaseController
+{
+    @Autowired
+    private ITBranchPlanService tBranchPlanService;
+
+    /**
+     * 查询支部年度工作计划列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:list')")
+    @GetMapping("/list")
+    public AjaxResult list(TBranchPlan tBranchPlan)
+    {
+//        startPage();
+//        List<TBranchPlan> list = tBranchPlanService.selectTBranchPlanList(tBranchPlan);
+//        return getDataTable(list);
+        return AjaxResult.success(tBranchPlanService.selectTBranchPlanList(tBranchPlan));
+    }
+
+    /**
+     * 导出支部年度工作计划列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:export')")
+    @Log(title = "支部年度工作计划", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBranchPlan tBranchPlan)
+    {
+        List<TBranchPlan> list = tBranchPlanService.selectTBranchPlanList(tBranchPlan);
+        ExcelUtil<TBranchPlan> util = new ExcelUtil<TBranchPlan>(TBranchPlan.class);
+        util.exportExcel(response, list, "支部年度工作计划数据");
+    }
+
+    /**
+     * 获取支部年度工作计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:query')")
+    @GetMapping(value = "/{planId}")
+    public AjaxResult getInfo(@PathVariable("planId") Long planId)
+    {
+        return success(tBranchPlanService.selectTBranchPlanByPlanId(planId));
+    }
+
+    /**
+     * 新增支部年度工作计划
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:add')")
+    @Log(title = "支部年度工作计划", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBranchPlan tBranchPlan)
+    {
+        return toAjax(tBranchPlanService.insertTBranchPlan(tBranchPlan));
+    }
+
+    /**
+     * 修改支部年度工作计划
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:edit')")
+    @Log(title = "支部年度工作计划", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBranchPlan tBranchPlan)
+    {
+        return toAjax(tBranchPlanService.updateTBranchPlan(tBranchPlan));
+    }
+
+    /**
+     * 删除支部年度工作计划
+     */
+    @PreAuthorize("@ss.hasPermi('branch:plan:remove')")
+    @Log(title = "支部年度工作计划", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{planIds}")
+    public AjaxResult remove(@PathVariable Long[] planIds)
+    {
+        return toAjax(tBranchPlanService.deleteTBranchPlanByPlanIds(planIds));
+    }
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchPlanItemController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.branch;
+
+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.branch.domain.TBranchPlanItem;
+import com.ruoyi.branch.service.ITBranchPlanItemService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 支部年度工作计划条目Controller
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+@RestController
+@RequestMapping("/branch/planitem")
+public class TBranchPlanItemController extends BaseController
+{
+    @Autowired
+    private ITBranchPlanItemService tBranchPlanItemService;
+
+    /**
+     * 查询支部年度工作计划条目列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBranchPlanItem tBranchPlanItem)
+    {
+        startPage();
+        List<TBranchPlanItem> list = tBranchPlanItemService.selectTBranchPlanItemList(tBranchPlanItem);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出支部年度工作计划条目列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:export')")
+    @Log(title = "支部年度工作计划条目", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBranchPlanItem tBranchPlanItem)
+    {
+        List<TBranchPlanItem> list = tBranchPlanItemService.selectTBranchPlanItemList(tBranchPlanItem);
+        ExcelUtil<TBranchPlanItem> util = new ExcelUtil<TBranchPlanItem>(TBranchPlanItem.class);
+        util.exportExcel(response, list, "支部年度工作计划条目数据");
+    }
+
+    /**
+     * 获取支部年度工作计划条目详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:query')")
+    @GetMapping(value = "/{itemId}")
+    public AjaxResult getInfo(@PathVariable("itemId") Long itemId)
+    {
+        return success(tBranchPlanItemService.selectTBranchPlanItemByItemId(itemId));
+    }
+
+    /**
+     * 新增支部年度工作计划条目
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:add')")
+    @Log(title = "支部年度工作计划条目", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBranchPlanItem tBranchPlanItem)
+    {
+        return toAjax(tBranchPlanItemService.insertTBranchPlanItem(tBranchPlanItem));
+    }
+
+    /**
+     * 修改支部年度工作计划条目
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:edit')")
+    @Log(title = "支部年度工作计划条目", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBranchPlanItem tBranchPlanItem)
+    {
+        return toAjax(tBranchPlanItemService.updateTBranchPlanItem(tBranchPlanItem));
+    }
+
+    /**
+     * 删除支部年度工作计划条目
+     */
+    @PreAuthorize("@ss.hasPermi('branch:planitem:remove')")
+    @Log(title = "支部年度工作计划条目", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{itemIds}")
+    public AjaxResult remove(@PathVariable Long[] itemIds)
+    {
+        return toAjax(tBranchPlanItemService.deleteTBranchPlanItemByItemIds(itemIds));
+    }
+}

+ 1 - 1
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm

@@ -545,7 +545,7 @@ export default {
           return del${BusinessName}(${pkColumn.javaField}s);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.#[[$modal]]#.msgSuccess("删除成功");
         })
     },
     /** 导出按钮操作 */

+ 87 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchPlan.java

@@ -0,0 +1,87 @@
+package com.ruoyi.branch.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;
+
+/**
+ * 支部年度工作计划对象 t_branch_plan
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public class TBranchPlan extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    @Excel(name = "主键id")
+    private Long planId;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    private String planTitle;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    public void setPlanId(Long planId) 
+    {
+        this.planId = planId;
+    }
+
+    public Long getPlanId() 
+    {
+        return planId;
+    }
+
+    public void setPlanTitle(String planTitle) 
+    {
+        this.planTitle = planTitle;
+    }
+
+    public String getPlanTitle() 
+    {
+        return planTitle;
+    }
+
+    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;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("planId", getPlanId())
+            .append("planTitle", getPlanTitle())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 177 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchPlanItem.java

@@ -0,0 +1,177 @@
+package com.ruoyi.branch.domain;
+
+import java.util.Date;
+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;
+
+/**
+ * 支部年度工作计划条目对象 t_branch_plan_item
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public class TBranchPlanItem extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    @Excel(name = "主键id")
+    private Long itemId;
+
+    /** 年份 */
+    private String planYear;
+
+    /** 工作计划id */
+    @Excel(name = "工作计划id")
+    private Long planId;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    private String itemContent;
+
+    /** 计划实施时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划实施时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date planTime;
+
+    /** 当前状态 */
+    @Excel(name = "当前状态")
+    private String itemStatus;
+
+    /** 实际完成日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "实际完成日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date actualTime;
+
+    /** 负责人 */
+    @Excel(name = "负责人")
+    private String personInCharge;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    public String getPlanYear() {
+        return planYear;
+    }
+
+    public void setPlanYear(String planYear) {
+        this.planYear = planYear;
+    }
+
+    public void setItemId(Long itemId)
+    {
+        this.itemId = itemId;
+    }
+
+    public Long getItemId() 
+    {
+        return itemId;
+    }
+
+    public void setPlanId(Long planId) 
+    {
+        this.planId = planId;
+    }
+
+    public Long getPlanId() 
+    {
+        return planId;
+    }
+
+    public void setItemContent(String itemContent) 
+    {
+        this.itemContent = itemContent;
+    }
+
+    public String getItemContent() 
+    {
+        return itemContent;
+    }
+
+    public void setPlanTime(Date planTime) 
+    {
+        this.planTime = planTime;
+    }
+
+    public Date getPlanTime() 
+    {
+        return planTime;
+    }
+
+    public void setItemStatus(String itemStatus) 
+    {
+        this.itemStatus = itemStatus;
+    }
+
+    public String getItemStatus() 
+    {
+        return itemStatus;
+    }
+
+    public void setActualTime(Date actualTime) 
+    {
+        this.actualTime = actualTime;
+    }
+
+    public Date getActualTime() 
+    {
+        return actualTime;
+    }
+
+    public void setPersonInCharge(String personInCharge) 
+    {
+        this.personInCharge = personInCharge;
+    }
+
+    public String getPersonInCharge() 
+    {
+        return personInCharge;
+    }
+
+    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;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("itemId", getItemId())
+            .append("planId", getPlanId())
+            .append("itemContent", getItemContent())
+            .append("planTime", getPlanTime())
+            .append("itemStatus", getItemStatus())
+            .append("actualTime", getActualTime())
+            .append("personInCharge", getPersonInCharge())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.mapper;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchPlanItem;
+
+/**
+ * 支部年度工作计划条目Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public interface TBranchPlanItemMapper 
+{
+    /**
+     * 查询支部年度工作计划条目
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 支部年度工作计划条目
+     */
+    public TBranchPlanItem selectTBranchPlanItemByItemId(Long itemId);
+
+    /**
+     * 查询支部年度工作计划条目列表
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 支部年度工作计划条目集合
+     */
+    public List<TBranchPlanItem> selectTBranchPlanItemList(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 新增支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    public int insertTBranchPlanItem(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 修改支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    public int updateTBranchPlanItem(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 删除支部年度工作计划条目
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 结果
+     */
+    public int deleteTBranchPlanItemByItemId(Long itemId);
+
+    /**
+     * 批量删除支部年度工作计划条目
+     * 
+     * @param itemIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBranchPlanItemByItemIds(Long[] itemIds);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.mapper;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchPlan;
+
+/**
+ * 支部年度工作计划Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public interface TBranchPlanMapper 
+{
+    /**
+     * 查询支部年度工作计划
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 支部年度工作计划
+     */
+    public TBranchPlan selectTBranchPlanByPlanId(Long planId);
+
+    /**
+     * 查询支部年度工作计划列表
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 支部年度工作计划集合
+     */
+    public List<TBranchPlan> selectTBranchPlanList(TBranchPlan tBranchPlan);
+
+    /**
+     * 新增支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    public int insertTBranchPlan(TBranchPlan tBranchPlan);
+
+    /**
+     * 修改支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    public int updateTBranchPlan(TBranchPlan tBranchPlan);
+
+    /**
+     * 删除支部年度工作计划
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 结果
+     */
+    public int deleteTBranchPlanByPlanId(Long planId);
+
+    /**
+     * 批量删除支部年度工作计划
+     * 
+     * @param planIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBranchPlanByPlanIds(Long[] planIds);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.service;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchPlanItem;
+
+/**
+ * 支部年度工作计划条目Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public interface ITBranchPlanItemService 
+{
+    /**
+     * 查询支部年度工作计划条目
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 支部年度工作计划条目
+     */
+    public TBranchPlanItem selectTBranchPlanItemByItemId(Long itemId);
+
+    /**
+     * 查询支部年度工作计划条目列表
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 支部年度工作计划条目集合
+     */
+    public List<TBranchPlanItem> selectTBranchPlanItemList(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 新增支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    public int insertTBranchPlanItem(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 修改支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    public int updateTBranchPlanItem(TBranchPlanItem tBranchPlanItem);
+
+    /**
+     * 批量删除支部年度工作计划条目
+     * 
+     * @param itemIds 需要删除的支部年度工作计划条目主键集合
+     * @return 结果
+     */
+    public int deleteTBranchPlanItemByItemIds(Long[] itemIds);
+
+    /**
+     * 删除支部年度工作计划条目信息
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 结果
+     */
+    public int deleteTBranchPlanItemByItemId(Long itemId);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.service;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchPlan;
+
+/**
+ * 支部年度工作计划Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+public interface ITBranchPlanService 
+{
+    /**
+     * 查询支部年度工作计划
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 支部年度工作计划
+     */
+    public TBranchPlan selectTBranchPlanByPlanId(Long planId);
+
+    /**
+     * 查询支部年度工作计划列表
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 支部年度工作计划集合
+     */
+    public List<TBranchPlan> selectTBranchPlanList(TBranchPlan tBranchPlan);
+
+    /**
+     * 新增支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    public int insertTBranchPlan(TBranchPlan tBranchPlan);
+
+    /**
+     * 修改支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    public int updateTBranchPlan(TBranchPlan tBranchPlan);
+
+    /**
+     * 批量删除支部年度工作计划
+     * 
+     * @param planIds 需要删除的支部年度工作计划主键集合
+     * @return 结果
+     */
+    public int deleteTBranchPlanByPlanIds(Long[] planIds);
+
+    /**
+     * 删除支部年度工作计划信息
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 结果
+     */
+    public int deleteTBranchPlanByPlanId(Long planId);
+}

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchPlanItemServiceImpl.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.TBranchPlanItemMapper;
+import com.ruoyi.branch.domain.TBranchPlanItem;
+import com.ruoyi.branch.service.ITBranchPlanItemService;
+
+/**
+ * 支部年度工作计划条目Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+@Service
+public class TBranchPlanItemServiceImpl implements ITBranchPlanItemService 
+{
+    @Autowired
+    private TBranchPlanItemMapper tBranchPlanItemMapper;
+
+    /**
+     * 查询支部年度工作计划条目
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 支部年度工作计划条目
+     */
+    @Override
+    public TBranchPlanItem selectTBranchPlanItemByItemId(Long itemId)
+    {
+        return tBranchPlanItemMapper.selectTBranchPlanItemByItemId(itemId);
+    }
+
+    /**
+     * 查询支部年度工作计划条目列表
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 支部年度工作计划条目
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchPlanItem> selectTBranchPlanItemList(TBranchPlanItem tBranchPlanItem)
+    {
+        return tBranchPlanItemMapper.selectTBranchPlanItemList(tBranchPlanItem);
+    }
+
+    /**
+     * 新增支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    @Override
+    public int insertTBranchPlanItem(TBranchPlanItem tBranchPlanItem)
+    {
+        tBranchPlanItem.setCreateTime(DateUtils.getNowDate());
+        return tBranchPlanItemMapper.insertTBranchPlanItem(tBranchPlanItem);
+    }
+
+    /**
+     * 修改支部年度工作计划条目
+     * 
+     * @param tBranchPlanItem 支部年度工作计划条目
+     * @return 结果
+     */
+    @Override
+    public int updateTBranchPlanItem(TBranchPlanItem tBranchPlanItem)
+    {
+        tBranchPlanItem.setUpdateTime(DateUtils.getNowDate());
+        return tBranchPlanItemMapper.updateTBranchPlanItem(tBranchPlanItem);
+    }
+
+    /**
+     * 批量删除支部年度工作计划条目
+     * 
+     * @param itemIds 需要删除的支部年度工作计划条目主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchPlanItemByItemIds(Long[] itemIds)
+    {
+        return tBranchPlanItemMapper.deleteTBranchPlanItemByItemIds(itemIds);
+    }
+
+    /**
+     * 删除支部年度工作计划条目信息
+     * 
+     * @param itemId 支部年度工作计划条目主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchPlanItemByItemId(Long itemId)
+    {
+        return tBranchPlanItemMapper.deleteTBranchPlanItemByItemId(itemId);
+    }
+}

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchPlanServiceImpl.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.TBranchPlanMapper;
+import com.ruoyi.branch.domain.TBranchPlan;
+import com.ruoyi.branch.service.ITBranchPlanService;
+
+/**
+ * 支部年度工作计划Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-07-17
+ */
+@Service
+public class TBranchPlanServiceImpl implements ITBranchPlanService 
+{
+    @Autowired
+    private TBranchPlanMapper tBranchPlanMapper;
+
+    /**
+     * 查询支部年度工作计划
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 支部年度工作计划
+     */
+    @Override
+    public TBranchPlan selectTBranchPlanByPlanId(Long planId)
+    {
+        return tBranchPlanMapper.selectTBranchPlanByPlanId(planId);
+    }
+
+    /**
+     * 查询支部年度工作计划列表
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 支部年度工作计划
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchPlan> selectTBranchPlanList(TBranchPlan tBranchPlan)
+    {
+        return tBranchPlanMapper.selectTBranchPlanList(tBranchPlan);
+    }
+
+    /**
+     * 新增支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    @Override
+    public int insertTBranchPlan(TBranchPlan tBranchPlan)
+    {
+        tBranchPlan.setCreateTime(DateUtils.getNowDate());
+        return tBranchPlanMapper.insertTBranchPlan(tBranchPlan);
+    }
+
+    /**
+     * 修改支部年度工作计划
+     * 
+     * @param tBranchPlan 支部年度工作计划
+     * @return 结果
+     */
+    @Override
+    public int updateTBranchPlan(TBranchPlan tBranchPlan)
+    {
+        tBranchPlan.setUpdateTime(DateUtils.getNowDate());
+        return tBranchPlanMapper.updateTBranchPlan(tBranchPlan);
+    }
+
+    /**
+     * 批量删除支部年度工作计划
+     * 
+     * @param planIds 需要删除的支部年度工作计划主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchPlanByPlanIds(Long[] planIds)
+    {
+        return tBranchPlanMapper.deleteTBranchPlanByPlanIds(planIds);
+    }
+
+    /**
+     * 删除支部年度工作计划信息
+     * 
+     * @param planId 支部年度工作计划主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchPlanByPlanId(Long planId)
+    {
+        return tBranchPlanMapper.deleteTBranchPlanByPlanId(planId);
+    }
+}

+ 118 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchPlanItemMapper.xml

@@ -0,0 +1,118 @@
+<?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.TBranchPlanItemMapper">
+    
+    <resultMap type="TBranchPlanItem" id="TBranchPlanItemResult">
+        <result property="itemId"    column="item_id"    />
+        <result property="planId"    column="plan_id"    />
+        <result property="itemContent"    column="item_content"    />
+        <result property="planTime"    column="plan_time"    />
+        <result property="itemStatus"    column="item_status"    />
+        <result property="actualTime"    column="actual_time"    />
+        <result property="personInCharge"    column="person_in_charge"    />
+        <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"    />
+    </resultMap>
+
+    <sql id="selectTBranchPlanItemVo">
+        select u.item_id, u.plan_id, u.item_content, u.plan_time, u.item_status, u.actual_time, u.person_in_charge, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_plan_item u left join sys_dept d on u.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTBranchPlanItemList" parameterType="TBranchPlanItem" resultMap="TBranchPlanItemResult">
+        <include refid="selectTBranchPlanItemVo"/>
+        <where>  
+            <if test="itemId != null "> and u.item_id = #{itemId}</if>
+            <if test="planId != null "> and u.plan_id = #{planId}</if>
+            <if test="itemContent != null  and itemContent != ''"> and u.item_content like concat('%', #{itemContent}, '%')</if>
+            <if test="planTime != null "> and u.plan_time = #{planTime}</if>
+            <if test="planYear != null "> and extract(year from u.plan_time) = #{planYear}</if>
+            <if test="itemStatus != null  and itemStatus != ''"> and u.item_status = #{itemStatus}</if>
+            <if test="actualTime != null "> and u.actual_time = #{actualTime}</if>
+            <if test="personInCharge != null  and personInCharge != ''"> and u.person_in_charge = #{personInCharge}</if>
+            <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            and u.del_flag = 0
+        </where>
+        order by u.plan_id asc
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTBranchPlanItemByItemId" parameterType="Long" resultMap="TBranchPlanItemResult">
+        <include refid="selectTBranchPlanItemVo"/>
+        where u.item_id = #{itemId}
+        and u.del_flag = 0
+    </select>
+        
+    <insert id="insertTBranchPlanItem" parameterType="TBranchPlanItem">
+        <selectKey keyProperty="itemId" resultType="long" order="BEFORE">
+            SELECT seq_t_branch_plan_item.NEXTVAL as itemId FROM DUAL
+        </selectKey>
+        insert into t_branch_plan_item
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="itemId != null">item_id,</if>
+            <if test="planId != null">plan_id,</if>
+            <if test="itemContent != null">item_content,</if>
+            <if test="planTime != null">plan_time,</if>
+            <if test="itemStatus != null">item_status,</if>
+            <if test="actualTime != null">actual_time,</if>
+            <if test="personInCharge != null">person_in_charge,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="itemId != null">#{itemId},</if>
+            <if test="planId != null">#{planId},</if>
+            <if test="itemContent != null">#{itemContent},</if>
+            <if test="planTime != null">#{planTime},</if>
+            <if test="itemStatus != null">#{itemStatus},</if>
+            <if test="actualTime != null">#{actualTime},</if>
+            <if test="personInCharge != null">#{personInCharge},</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>
+         </trim>
+    </insert>
+
+    <update id="updateTBranchPlanItem" parameterType="TBranchPlanItem">
+        update t_branch_plan_item
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="itemContent != null">item_content = #{itemContent},</if>
+            <if test="planTime != null">plan_time = #{planTime},</if>
+            <if test="itemStatus != null">item_status = #{itemStatus},</if>
+            <if test="actualTime != null">actual_time = #{actualTime},</if>
+            <if test="personInCharge != null">person_in_charge = #{personInCharge},</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>
+        </trim>
+        where item_id = #{itemId}
+    </update>
+
+    <update id="deleteTBranchPlanItemByItemId" parameterType="Long">
+        update t_branch_plan_item set del_flag = 2 where item_id = #{itemId}
+    </update>
+
+    <update id="deleteTBranchPlanItemByItemIds" parameterType="String">
+        update t_branch_plan_item set del_flag = 2 where item_id in
+        <foreach item="itemId" collection="array" open="(" separator="," close=")">
+            #{itemId}
+        </foreach>
+    </update>
+</mapper>

+ 91 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchPlanMapper.xml

@@ -0,0 +1,91 @@
+<?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.TBranchPlanMapper">
+    
+    <resultMap type="TBranchPlan" id="TBranchPlanResult">
+        <result property="planId"    column="plan_id"    />
+        <result property="planTitle"    column="plan_title"    />
+        <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"    />
+    </resultMap>
+
+    <sql id="selectTBranchPlanVo">
+        select u.plan_id, u.plan_title, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_plan u left join sys_dept d on u.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTBranchPlanList" parameterType="TBranchPlan" resultMap="TBranchPlanResult">
+        <include refid="selectTBranchPlanVo"/>
+        <where>  
+            <if test="planId != null "> and u.plan_id = #{planId}</if>
+            <if test="planTitle != null  and planTitle != ''"> and u.plan_title like concat('%', #{planTitle}, '%')</if>
+            <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            and u.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTBranchPlanByPlanId" parameterType="Long" resultMap="TBranchPlanResult">
+        <include refid="selectTBranchPlanVo"/>
+        where u.plan_id = #{planId}
+        and u.del_flag = 0
+    </select>
+        
+    <insert id="insertTBranchPlan" parameterType="TBranchPlan">
+        <selectKey keyProperty="planId" resultType="long" order="BEFORE">
+            SELECT seq_t_branch_plan.NEXTVAL as planId FROM DUAL
+        </selectKey>
+        insert into t_branch_plan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planId != null">plan_id,</if>
+            <if test="planTitle != null">plan_title,</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>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planId != null">#{planId},</if>
+            <if test="planTitle != null">#{planTitle},</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>
+         </trim>
+    </insert>
+
+    <update id="updateTBranchPlan" parameterType="TBranchPlan">
+        update t_branch_plan
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planTitle != null">plan_title = #{planTitle},</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>
+        </trim>
+        where plan_id = #{planId}
+    </update>
+
+    <update id="deleteTBranchPlanByPlanId" parameterType="Long">
+        update t_branch_plan set del_flag = 2 where plan_id = #{planId}
+    </update>
+
+    <update id="deleteTBranchPlanByPlanIds" parameterType="String">
+        update t_branch_plan set del_flag = 2 where plan_id in
+        <foreach item="planId" collection="array" open="(" separator="," close=")">
+            #{planId}
+        </foreach>
+    </update>
+</mapper>

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

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询支部年度工作计划列表
+export function listPlan(query) {
+  return request({
+    url: '/branch/plan/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询支部年度工作计划详细
+export function getPlan(planId) {
+  return request({
+    url: '/branch/plan/' + planId,
+    method: 'get'
+  })
+}
+
+// 新增支部年度工作计划
+export function addPlan(data) {
+  return request({
+    url: '/branch/plan',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改支部年度工作计划
+export function updatePlan(data) {
+  return request({
+    url: '/branch/plan',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除支部年度工作计划
+export function delPlan(planId) {
+  return request({
+    url: '/branch/plan/' + planId,
+    method: 'delete'
+  })
+}

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

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询支部年度工作计划条目列表
+export function listPlanitem(query) {
+  return request({
+    url: '/branch/planitem/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询支部年度工作计划条目详细
+export function getPlanitem(itemId) {
+  return request({
+    url: '/branch/planitem/' + itemId,
+    method: 'get'
+  })
+}
+
+// 新增支部年度工作计划条目
+export function addPlanitem(data) {
+  return request({
+    url: '/branch/planitem',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改支部年度工作计划条目
+export function updatePlanitem(data) {
+  return request({
+    url: '/branch/planitem',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除支部年度工作计划条目
+export function delPlanitem(itemId) {
+  return request({
+    url: '/branch/planitem/' + itemId,
+    method: 'delete'
+  })
+}

+ 2 - 2
ruoyi-ui/src/views/branch/dues/index.vue

@@ -1,11 +1,11 @@
 <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="duesTime">
+      <el-form-item label="年份" prop="duesTime">
         <el-date-picker clearable size="small" style="width: 200px"
                         v-model="queryParams.duesYear"
                         type="year"
-                        placeholder="选择时间">
+                        placeholder="选择年份">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="归属部门" prop="deptId" style="width: 268px;">

+ 740 - 0
ruoyi-ui/src/views/branch/plan/index.vue

@@ -0,0 +1,740 @@
+<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="planYear">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.planYear"
+                        type="year"
+                        placeholder="选择年份">
+        </el-date-picker>
+      </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="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAddPlan"
+          v-hasPermi="['branch:plan:add']"
+        >新增标题</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['branch:planitem:add']"
+        >新增条目</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          @click="handleListPlan"
+          v-hasPermi="['branch:plan:edit']"
+        >编辑标题</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['branch:planitem:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['branch:planitem:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['branch:planitem:edit']"
+        >导入</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['branch:planitem:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="planitemList" @selection-change="handleSelectionChange" :height="clientHeight" border :span-method="objectSpanMethod">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="标题" align="center" prop="planId" :formatter="planListFormat" />
+      <el-table-column label="内容" align="center" prop="itemContent" />
+      <el-table-column label="计划实施时间" align="center" prop="planTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.planTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="当前状态" align="center" prop="itemStatus" :formatter="itemStatusFormat" />
+      <el-table-column label="实际完成日期" align="center" prop="actualTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.actualTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="负责人" align="center" prop="personInChargeString" />
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['branch:planitem:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['branch:planitem:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改支部年度工作计划条目对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="标题" prop="planId">
+          <el-select v-model="form.planId" placeholder="请选择标题">
+            <el-option
+              v-for="dict in planList"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="内容" prop="itemContent">
+          <el-input v-model="form.itemContent" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="计划实施时间" prop="planTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.planTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划实施时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="当前状态" prop="itemStatus">
+          <el-select v-model="form.itemStatus" placeholder="请选择当前状态">
+            <el-option
+              v-for="dict in itemStatusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="实际完成日期" prop="actualTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.actualTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择实际完成日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="负责人" prop="host">
+          <el-select v-model="form.personInCharge" multiple placeholder="请选择负责人">
+            <el-option
+              v-for="dict in userList"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="归属部门" prop="deptId">
+            <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加或修改支部年度工作计划对话框 -->
+    <el-dialog :title="titlePlan" :visible.sync="openPlan" width="500px" append-to-body>
+      <el-form ref="formPlan" :model="formPlan" :rules="rulesPlan" label-width="80px">
+        <el-form-item label="标题" prop="planTitle">
+          <el-input v-model="formPlan.planTitle" placeholder="请输入标题" />
+        </el-form-item>
+        <el-form-item label="归属部门" prop="deptId">
+          <treeselect v-model="formPlan.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormPlan">确 定</el-button>
+        <el-button @click="cancelPlan">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 编辑标题对话框 -->
+    <el-dialog :title="titleListPlan" :visible.sync="openListPlan" width="500px" append-to-body>
+      <el-table :data="planList" border>
+        <el-table-column label="编号" align="center" prop="dictValue" width="80px"/>
+        <el-table-column label="标题" align="center" prop="dictLabel">
+          <template slot-scope="scope">
+            <span v-if="!scope.row.isEdit">{{scope.row.dictLabel}}</span>
+            <span v-if="scope.row.isEdit"><el-input v-model="scope.row.dictLabel" /></span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdatePlan(scope.row)"
+              v-hasPermi="['branch:plan:edit']"
+              v-if="!scope.row.isEdit"
+            >编辑</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-check"
+              @click="handleConfirmPlan(scope.row)"
+              v-hasPermi="['branch:plan:edit']"
+              v-if="scope.row.isEdit"
+            >确定</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeletePlan(scope.row)"
+              v-hasPermi="['branch:plan:remove']"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+        <el-upload
+                ref="upload"
+                :limit="1"
+                accept=".xlsx, .xls"
+                :headers="upload.headers"
+                :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                :disabled="upload.isUploading"
+                :on-progress="handleFileUploadProgress"
+                :on-success="handleFileSuccess"
+                :auto-upload="false"
+                drag
+        >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">
+                将文件拖到此处,或
+                <em>点击上传</em>
+            </div>
+            <div class="el-upload__tip" slot="tip">
+                <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+                <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+            </div>
+            <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+        </el-upload>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitFileForm">确 定</el-button>
+            <el-button @click="upload.open = false">取 消</el-button>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPlanitem, getPlanitem, delPlanitem, addPlanitem, updatePlanitem, exportPlanitem, importTemplate} from "@/api/branch/planitem";
+import { listPlan, getPlan, delPlan, addPlan, updatePlan, exportPlan, importTemplatePlan} from "@/api/branch/plan";
+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 { listUser} from "@/api/system/user";
+
+export default {
+  name: "Planitem",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 支部年度工作计划条目表格数据
+      planitemList: [],
+      // 弹出层标题
+      title: "",
+      titlePlan: "",
+      titleListPlan: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      openPlan: false,
+      openListPlan: false,
+      // 当前状态字典
+      itemStatusOptions: [],
+      // 工作计划列表
+      planList: [],
+      // 用户列表
+      userList: [],
+      // 用户导入参数
+      upload: {
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/branch/planitem/importData"
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        itemId: null,
+        planId: null,
+        itemContent: null,
+        planTime: null,
+        itemStatus: null,
+        actualTime: null,
+        personInCharge: null,
+        deptId: null,
+      },
+      // 表单参数
+      form: {},
+      formPlan: {},
+      // 表单校验
+      rules: {
+        planId: [
+          { required: true, message: "标题不能为空", trigger: "blur" }
+        ],
+        itemContent: [
+          { required: true, message: "内容不能为空", trigger: "blur" }
+        ],
+        deptId: [
+          { required: true, message: "归属部门不能为空", trigger: "blur" }
+        ],
+      },
+      rulesPlan: {
+        planTitle: [
+          { required: true, message: "标题不能为空", trigger: "blur" }
+        ],
+        deptId: [
+          { required: true, message: "归属部门不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    // 设置搜索条件年份为当年
+    this.setYear();
+    this.getList();
+    this.getPlanList();
+    this.getTreeselect();
+    this.getDicts("plan_item_status").then(response => {
+      this.itemStatusOptions = response.data;
+    });
+  },
+  methods: {
+    /** 设置搜索条件年份 */
+    setYear() {
+      this.queryParams.planYear = new Date();
+    },
+    /** 查询用户列表 */
+    getUserList() {
+      listUser().then(response => {
+        let rows = response.rows;
+        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;
+      });
+    },
+    /** 查询工作计划列表 */
+    getPlanList() {
+      listPlan().then(response => {
+        let data = response.data;
+        let planList = [];
+        for(let i = 0; i < data.length; i++) {
+          let plan = { "dictValue" : data[i].planId, "dictLabel" : data[i].planTitle, "isEdit": false};
+          planList.push(plan);
+        }
+        this.planList = planList;
+      });
+    },
+    /** 计算单元格合并行数 */
+    getSpanArr(list) {
+      list.forEach(item => {
+        item.rowspan = 1;
+      });
+      for (let i = 0; i < list.length; i++) {
+        for (let j = i + 1; j < list.length; j++) {
+          //此处可根据相同字段进行合并
+          if (list[i].planId == list[j].planId) {
+            list[i].rowspan++;
+            list[j].rowspan--;
+          }
+        }
+        // 这里跳过已经重复的数据
+        i = i + list[i].rowspan - 1;
+      }
+      this.planitemList = list;
+    },
+    /** 单元格合并 */
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 1) {
+        return {
+          rowspan: row.rowspan,
+          colspan: 1,
+        };
+      }
+    },
+    /** 查询支部年度工作计划条目列表 */
+    getList() {
+      this.loading = true;
+      listUser().then(response => {
+        let rows = response.rows;
+        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;
+      }).then(() => {
+        return listPlanitem({
+          "planYear": this.queryParams.planYear.getFullYear(),
+          "deptId": this.queryParams.deptId
+        });
+      }).then(response => {
+        this.planitemList = response.rows;
+        for (let i = 0; i < this.planitemList.length; i++) {
+          if (this.planitemList[i].personInCharge != null) {
+            let personInCharge = this.planitemList[i].personInCharge.split(",");
+            let personInChargeString = "";
+            for (let j = 0; j < personInCharge.length; j++) {
+              if (j > 0) {
+                personInChargeString += "、" + this.selectDictLabel(this.userList, personInCharge[j]);
+              } else {
+                personInChargeString += this.selectDictLabel(this.userList, personInCharge[j]);
+              }
+            }
+            this.planitemList[i].personInChargeString = personInChargeString;
+          }
+        }
+        this.getSpanArr(this.planitemList);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 当前状态字典翻译
+    itemStatusFormat(row, column) {
+      return this.selectDictLabel(this.itemStatusOptions, row.itemStatus);
+    },
+    // 工作计划字典翻译
+    planListFormat(row, column) {
+      return this.selectDictLabel(this.planList, row.planId);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    cancelPlan() {
+      this.openPlan = false;
+      this.resetPlan();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        itemId: null,
+        planId: null,
+        itemContent: null,
+        planTime: null,
+        itemStatus: null,
+        actualTime: null,
+        personInCharge: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        deptId: null,
+      };
+      this.resetForm("form");
+    },
+    resetPlan() {
+      this.formPlan = {
+        planId: null,
+        planTitle: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        deptId: null,
+      };
+      this.resetForm("formPlan");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.itemId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加支部年度工作计划条目";
+    },
+    handleAddPlan() {
+      this.resetPlan();
+      this.openPlan = true;
+      this.titlePlan = "添加支部年度工作计划标题";
+    },
+    /** 编辑标题按钮操作 */
+    handleListPlan() {
+      this.openListPlan = true;
+      this.titleListPlan = "编辑标题";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const itemId = row.itemId || this.ids
+      getPlanitem(itemId).then(response => {
+        this.form = response.data;
+        if (this.form.personInCharge != null) {
+          this.form.personInCharge = this.form.personInCharge.split(",").map(Number);
+        }
+        this.open = true;
+        this.title = "修改支部年度工作计划条目";
+      });
+    },
+    handleUpdatePlan(row) {
+      row.isEdit = true;
+    },
+    handleConfirmPlan(row) {
+      updatePlan({
+        "planId": row.dictValue,
+        "planTitle": row.dictLabel
+      }).then(response => {
+        this.$modal.msgSuccess("修改成功");
+        row.isEdit = false;
+        this.getPlanList();
+        this.getList();
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      if (this.form.personInCharge != null) {
+        this.form.personInCharge = this.form.personInCharge.join();
+      }
+        this.$refs["form"].validate(valid => {
+            if (valid) {
+                if (this.form.itemId != null) {
+                    updatePlanitem(this.form).then(response => {
+                        this.$modal.msgSuccess("修改成功");
+                        this.open = false;
+                        this.getList();
+                    });
+                } else {
+                    addPlanitem(this.form).then(response => {
+                        this.$modal.msgSuccess("新增成功");
+                        this.open = false;
+                        this.getList();
+                    });
+                }
+            }
+        });
+    },
+    submitFormPlan() {
+      this.$refs["formPlan"].validate(valid => {
+        if (valid) {
+          if (this.formPlan.planId != null) {
+            updatePlan(this.formPlan).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.openPlan = false;
+              this.getList();
+            });
+          } else {
+            addPlan(this.formPlan).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.openPlan = false;
+              this.getList();
+              this.getPlanList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const itemIds = row.itemId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delPlanitem(itemIds);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+    },
+    handleDeletePlan(row) {
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return delPlan(row.dictValue);
+      }).then(() => {
+        this.getPlanList();
+        this.$modal.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有支部年度工作计划数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportPlanitem(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+          importTemplate().then(response => {
+              this.download(response.msg);
+          });
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</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>