Просмотр исходного кода

fix 委员信息,会议通知

Administrator 1 год назад
Родитель
Сommit
50758bfdda

+ 97 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/speak/ZxSpeakController.java

@@ -0,0 +1,97 @@
+package com.ruoyi.web.controller.speak;
+
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.speak.ZxSpeak;
+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.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.service.IZxSpeakService;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+import java.util.List;
+
+/**
+ * 政协发言Controller
+ *
+ * @author boman
+ * @date 2024-03-07
+ */
+@RestController
+@RequestMapping("/zx/speak")
+public class ZxSpeakController extends BaseController {
+    @Autowired
+    private IZxSpeakService zxSpeakService;
+
+    /**
+     * 查询政协发言列表
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ZxSpeak zxSpeak) {
+        startPage();
+        List<ZxSpeak> list = zxSpeakService.selectZxSpeakList(zxSpeak);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出政协发言列表
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:export')")
+    @Log(title = "政协发言", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ZxSpeak zxSpeak) {
+        List<ZxSpeak> list = zxSpeakService.selectZxSpeakList(zxSpeak);
+        ExcelUtil<ZxSpeak> util = new ExcelUtil<ZxSpeak>(ZxSpeak.class);
+        util.exportExcel(response, list, "政协发言数据");
+    }
+
+    /**
+     * 获取政协发言详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:query')")
+    @GetMapping(value = "/{speakId}")
+    public AjaxResult getInfo(@PathVariable("speakId") Long speakId) {
+        return success(zxSpeakService.selectZxSpeakBySpeakId(speakId));
+    }
+
+    /**
+     * 新增政协发言
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:add')")
+    @Log(title = "政协发言", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ZxSpeak zxSpeak) {
+        return toAjax(zxSpeakService.insertZxSpeak(zxSpeak));
+    }
+
+    /**
+     * 修改政协发言
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:edit')")
+    @Log(title = "政协发言", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody ZxSpeak zxSpeak) {
+        return toAjax(zxSpeakService.updateZxSpeak(zxSpeak));
+    }
+
+    /**
+     * 删除政协发言
+     */
+    @PreAuthorize("@ss.hasPermi('zx:speak:remove')")
+    @Log(title = "政协发言", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{speakIds}")
+    public AjaxResult remove(@PathVariable Long[] speakIds) {
+        return toAjax(zxSpeakService.deleteZxSpeakBySpeakIds(speakIds));
+    }
+}

+ 172 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/speak/ZxSpeak.java

@@ -0,0 +1,172 @@
+package com.ruoyi.system.domain.speak;
+
+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;
+
+/**
+ * 政协发言对象 zx_speak
+ * 
+ * @author boman
+ * @date 2024-03-07
+ */
+public class ZxSpeak extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 我的发言id */
+    private Long speakId;
+
+    /** 发言标题 */
+    @Excel(name = "发言标题")
+    private String speakTitle;
+
+    /** 发言人 */
+    @Excel(name = "发言人")
+    private String speakName;
+
+    /** 录入人 */
+    @Excel(name = "录入人")
+    private String inputName;
+
+    /** 会议活动id */
+    @Excel(name = "会议活动id")
+    private Long conferenceId;
+
+    /** 发言单位 */
+    @Excel(name = "发言单位")
+    private String speakUnit;
+
+    /** 发言类型(字典值) */
+    @Excel(name = "发言类型(字典值)")
+    private String speakType;
+
+    /** 发言时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "发言时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date speakTime;
+
+    /** 录入时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date publishTime;
+
+    /** 状态 1:待审核 2:已审核 */
+    @Excel(name = "状态 1:待审核 2:已审核")
+    private String speakStatus;
+
+    public void setSpeakId(Long speakId) 
+    {
+        this.speakId = speakId;
+    }
+
+    public Long getSpeakId() 
+    {
+        return speakId;
+    }
+    public void setSpeakTitle(String speakTitle) 
+    {
+        this.speakTitle = speakTitle;
+    }
+
+    public String getSpeakTitle() 
+    {
+        return speakTitle;
+    }
+    public void setSpeakName(String speakName) 
+    {
+        this.speakName = speakName;
+    }
+
+    public String getSpeakName() 
+    {
+        return speakName;
+    }
+    public void setInputName(String inputName) 
+    {
+        this.inputName = inputName;
+    }
+
+    public String getInputName() 
+    {
+        return inputName;
+    }
+    public void setConferenceId(Long conferenceId) 
+    {
+        this.conferenceId = conferenceId;
+    }
+
+    public Long getConferenceId() 
+    {
+        return conferenceId;
+    }
+    public void setSpeakUnit(String speakUnit) 
+    {
+        this.speakUnit = speakUnit;
+    }
+
+    public String getSpeakUnit() 
+    {
+        return speakUnit;
+    }
+    public void setSpeakType(String speakType) 
+    {
+        this.speakType = speakType;
+    }
+
+    public String getSpeakType() 
+    {
+        return speakType;
+    }
+    public void setSpeakTime(Date speakTime) 
+    {
+        this.speakTime = speakTime;
+    }
+
+    public Date getSpeakTime() 
+    {
+        return speakTime;
+    }
+    public void setPublishTime(Date publishTime) 
+    {
+        this.publishTime = publishTime;
+    }
+
+    public Date getPublishTime() 
+    {
+        return publishTime;
+    }
+    public void setSpeakStatus(String speakStatus) 
+    {
+        this.speakStatus = speakStatus;
+    }
+
+    public String getSpeakStatus() 
+    {
+        return speakStatus;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("speakId", getSpeakId())
+            .append("speakTitle", getSpeakTitle())
+            .append("speakName", getSpeakName())
+            .append("inputName", getInputName())
+            .append("conferenceId", getConferenceId())
+            .append("speakUnit", getSpeakUnit())
+            .append("speakType", getSpeakType())
+            .append("speakTime", getSpeakTime())
+            .append("publishTime", getPublishTime())
+            .append("speakStatus", getSpeakStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZxSpeakMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+
+import com.ruoyi.system.domain.speak.ZxSpeak;
+
+import java.util.List;
+
+/**
+ * 政协发言Mapper接口
+ * 
+ * @author boman
+ * @date 2024-03-07
+ */
+public interface ZxSpeakMapper 
+{
+    /**
+     * 查询政协发言
+     * 
+     * @param speakId 政协发言主键
+     * @return 政协发言
+     */
+    public ZxSpeak selectZxSpeakBySpeakId(Long speakId);
+
+    /**
+     * 查询政协发言列表
+     * 
+     * @param zxSpeak 政协发言
+     * @return 政协发言集合
+     */
+    public List<ZxSpeak> selectZxSpeakList(ZxSpeak zxSpeak);
+
+    /**
+     * 新增政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    public int insertZxSpeak(ZxSpeak zxSpeak);
+
+    /**
+     * 修改政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    public int updateZxSpeak(ZxSpeak zxSpeak);
+
+    /**
+     * 删除政协发言
+     * 
+     * @param speakId 政协发言主键
+     * @return 结果
+     */
+    public int deleteZxSpeakBySpeakId(Long speakId);
+
+    /**
+     * 批量删除政协发言
+     * 
+     * @param speakIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteZxSpeakBySpeakIds(Long[] speakIds);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IZxSpeakService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+
+import com.ruoyi.system.domain.speak.ZxSpeak;
+
+import java.util.List;
+
+/**
+ * 政协发言Service接口
+ * 
+ * @author boman
+ * @date 2024-03-07
+ */
+public interface IZxSpeakService 
+{
+    /**
+     * 查询政协发言
+     * 
+     * @param speakId 政协发言主键
+     * @return 政协发言
+     */
+    public ZxSpeak selectZxSpeakBySpeakId(Long speakId);
+
+    /**
+     * 查询政协发言列表
+     * 
+     * @param zxSpeak 政协发言
+     * @return 政协发言集合
+     */
+    public List<ZxSpeak> selectZxSpeakList(ZxSpeak zxSpeak);
+
+    /**
+     * 新增政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    public int insertZxSpeak(ZxSpeak zxSpeak);
+
+    /**
+     * 修改政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    public int updateZxSpeak(ZxSpeak zxSpeak);
+
+    /**
+     * 批量删除政协发言
+     * 
+     * @param speakIds 需要删除的政协发言主键集合
+     * @return 结果
+     */
+    public int deleteZxSpeakBySpeakIds(Long[] speakIds);
+
+    /**
+     * 删除政协发言信息
+     * 
+     * @param speakId 政协发言主键
+     * @return 结果
+     */
+    public int deleteZxSpeakBySpeakId(Long speakId);
+}

+ 98 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxSpeakServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.system.service.impl;
+
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.speak.ZxSpeak;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.ZxSpeakMapper;
+import com.ruoyi.system.service.IZxSpeakService;
+
+import java.util.List;
+
+/**
+ * 政协发言Service业务层处理
+ * 
+ * @author boman
+ * @date 2024-03-07
+ */
+@Service
+public class ZxSpeakServiceImpl implements IZxSpeakService 
+{
+    @Autowired
+    private ZxSpeakMapper zxSpeakMapper;
+
+    /**
+     * 查询政协发言
+     * 
+     * @param speakId 政协发言主键
+     * @return 政协发言
+     */
+    @Override
+    public ZxSpeak selectZxSpeakBySpeakId(Long speakId)
+    {
+        return zxSpeakMapper.selectZxSpeakBySpeakId(speakId);
+    }
+
+    /**
+     * 查询政协发言列表
+     * 
+     * @param zxSpeak 政协发言
+     * @return 政协发言
+     */
+    @Override
+    public List<ZxSpeak> selectZxSpeakList(ZxSpeak zxSpeak)
+    {
+        return zxSpeakMapper.selectZxSpeakList(zxSpeak);
+    }
+
+    /**
+     * 新增政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    @Override
+    public int insertZxSpeak(ZxSpeak zxSpeak)
+    {
+        zxSpeak.setCreateTime(DateUtils.getNowDate());
+        return zxSpeakMapper.insertZxSpeak(zxSpeak);
+    }
+
+    /**
+     * 修改政协发言
+     * 
+     * @param zxSpeak 政协发言
+     * @return 结果
+     */
+    @Override
+    public int updateZxSpeak(ZxSpeak zxSpeak)
+    {
+        zxSpeak.setUpdateTime(DateUtils.getNowDate());
+        return zxSpeakMapper.updateZxSpeak(zxSpeak);
+    }
+
+    /**
+     * 批量删除政协发言
+     * 
+     * @param speakIds 需要删除的政协发言主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZxSpeakBySpeakIds(Long[] speakIds)
+    {
+        return zxSpeakMapper.deleteZxSpeakBySpeakIds(speakIds);
+    }
+
+    /**
+     * 删除政协发言信息
+     * 
+     * @param speakId 政协发言主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZxSpeakBySpeakId(Long speakId)
+    {
+        return zxSpeakMapper.deleteZxSpeakBySpeakId(speakId);
+    }
+}

+ 116 - 0
ruoyi-system/src/main/resources/mapper/system/ZxSpeakMapper.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.ZxSpeakMapper">
+    
+    <resultMap type="ZxSpeak" id="ZxSpeakResult">
+        <result property="speakId"    column="speak_id"    />
+        <result property="speakTitle"    column="speak_title"    />
+        <result property="speakName"    column="speak_name"    />
+        <result property="inputName"    column="input_name"    />
+        <result property="conferenceId"    column="conference_id"    />
+        <result property="speakUnit"    column="speak_unit"    />
+        <result property="speakType"    column="speak_type"    />
+        <result property="speakTime"    column="speak_time"    />
+        <result property="publishTime"    column="publish_time"    />
+        <result property="speakStatus"    column="speak_status"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectZxSpeakVo">
+        select speak_id, speak_title, speak_name, input_name, conference_id, speak_unit, speak_type, speak_time, publish_time, speak_status, create_by, create_time, update_by, update_time, remark from zx_speak
+    </sql>
+
+    <select id="selectZxSpeakList" parameterType="ZxSpeak" resultMap="ZxSpeakResult">
+        <include refid="selectZxSpeakVo"/>
+        <where>  
+            <if test="speakTitle != null  and speakTitle != ''"> and speak_title = #{speakTitle}</if>
+            <if test="speakName != null  and speakName != ''"> and speak_name like concat('%', #{speakName}, '%')</if>
+            <if test="inputName != null  and inputName != ''"> and input_name like concat('%', #{inputName}, '%')</if>
+            <if test="conferenceId != null "> and conference_id = #{conferenceId}</if>
+            <if test="speakUnit != null  and speakUnit != ''"> and speak_unit = #{speakUnit}</if>
+            <if test="speakType != null  and speakType != ''"> and speak_type = #{speakType}</if>
+            <if test="speakTime != null "> and speak_time = #{speakTime}</if>
+            <if test="publishTime != null "> and publish_time = #{publishTime}</if>
+            <if test="speakStatus != null  and speakStatus != ''"> and speak_status = #{speakStatus}</if>
+        </where>
+    </select>
+    
+    <select id="selectZxSpeakBySpeakId" parameterType="Long" resultMap="ZxSpeakResult">
+        <include refid="selectZxSpeakVo"/>
+        where speak_id = #{speakId}
+    </select>
+        
+    <insert id="insertZxSpeak" parameterType="ZxSpeak" useGeneratedKeys="true" keyProperty="speakId">
+        insert into zx_speak
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="speakTitle != null and speakTitle != ''">speak_title,</if>
+            <if test="speakName != null and speakName != ''">speak_name,</if>
+            <if test="inputName != null and inputName != ''">input_name,</if>
+            <if test="conferenceId != null">conference_id,</if>
+            <if test="speakUnit != null and speakUnit != ''">speak_unit,</if>
+            <if test="speakType != null and speakType != ''">speak_type,</if>
+            <if test="speakTime != null">speak_time,</if>
+            <if test="publishTime != null">publish_time,</if>
+            <if test="speakStatus != null">speak_status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="speakTitle != null and speakTitle != ''">#{speakTitle},</if>
+            <if test="speakName != null and speakName != ''">#{speakName},</if>
+            <if test="inputName != null and inputName != ''">#{inputName},</if>
+            <if test="conferenceId != null">#{conferenceId},</if>
+            <if test="speakUnit != null and speakUnit != ''">#{speakUnit},</if>
+            <if test="speakType != null and speakType != ''">#{speakType},</if>
+            <if test="speakTime != null">#{speakTime},</if>
+            <if test="publishTime != null">#{publishTime},</if>
+            <if test="speakStatus != null">#{speakStatus},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateZxSpeak" parameterType="ZxSpeak">
+        update zx_speak
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="speakTitle != null and speakTitle != ''">speak_title = #{speakTitle},</if>
+            <if test="speakName != null and speakName != ''">speak_name = #{speakName},</if>
+            <if test="inputName != null and inputName != ''">input_name = #{inputName},</if>
+            <if test="conferenceId != null">conference_id = #{conferenceId},</if>
+            <if test="speakUnit != null and speakUnit != ''">speak_unit = #{speakUnit},</if>
+            <if test="speakType != null and speakType != ''">speak_type = #{speakType},</if>
+            <if test="speakTime != null">speak_time = #{speakTime},</if>
+            <if test="publishTime != null">publish_time = #{publishTime},</if>
+            <if test="speakStatus != null">speak_status = #{speakStatus},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where speak_id = #{speakId}
+    </update>
+
+    <delete id="deleteZxSpeakBySpeakId" parameterType="Long">
+        delete from zx_speak where speak_id = #{speakId}
+    </delete>
+
+    <delete id="deleteZxSpeakBySpeakIds" parameterType="String">
+        delete from zx_speak where speak_id in 
+        <foreach item="speakId" collection="array" open="(" separator="," close=")">
+            #{speakId}
+        </foreach>
+    </delete>
+</mapper>