添加联系方式及议事投票数量接口

main 7
hansha 2 years ago
parent ac164b3bab
commit 9c17766aa2

@ -1,25 +1,21 @@
package com.ruoyi.szxc.controller; package com.ruoyi.szxc.controller;
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.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.szxc.domain.SzxcVoteResult; import com.ruoyi.szxc.domain.SzxcVoteResult;
import com.ruoyi.szxc.service.ISzxcVoteResultService; import com.ruoyi.szxc.service.ISzxcVoteResultService;
import com.ruoyi.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.core.page.TableDataInfo; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* Controller * Controller
@ -46,6 +42,21 @@ public class SzxcVoteResultController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@PreAuthorize("@ss.hasPermi('szxc:voteresut:count')")
@GetMapping("/count")
public Map<String,Object> ResultCount(SzxcVoteResult szxcVoteResult)
{
startPage();
List<SzxcVoteResult> list = szxcVoteResultService.selectSzxcVoteResultList(szxcVoteResult);
Map<String,Object> result = new HashMap<String,Object>();
result.put("data",getDataTable(list));
result.put("result",szxcVoteResultService.selectSzxcVoteResultByDiscussId(szxcVoteResult.getYsId()));
return result;
}
/** /**
* *
*/ */

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_gy_apply * szxc_gy_apply
* *
* @author hs * @author hs
* @date 2024-03-20 * @date 2024-04-07
*/ */
public class SzxcGyApply extends BaseEntity public class SzxcGyApply extends BaseEntity
{ {
@ -18,14 +18,14 @@ public class SzxcGyApply extends BaseEntity
/** id */ /** id */
private Long id; private Long id;
/** 居民id */
@Excel(name = "居民id")
private Long jmId;
/** 公益id */ /** 公益id */
@Excel(name = "公益id") @Excel(name = "公益id")
private Long gyId; private Long gyId;
/** 居民id */
@Excel(name = "居民id")
private Long jmId;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String cardId; private String cardId;
@ -34,6 +34,10 @@ public class SzxcGyApply extends BaseEntity
@Excel(name = "报名人") @Excel(name = "报名人")
private String name; private String name;
/** 手机号 */
@Excel(name = "手机号")
private String phone;
/** 创建者ID */ /** 创建者ID */
@Excel(name = "创建者ID") @Excel(name = "创建者ID")
private Long userId; private Long userId;
@ -47,23 +51,23 @@ public class SzxcGyApply extends BaseEntity
{ {
return id; return id;
} }
public void setJmId(Long jmId) public void setGyId(Long gyId)
{ {
this.jmId = jmId; this.gyId = gyId;
} }
public Long getJmId() public Long getGyId()
{ {
return jmId; return gyId;
} }
public void setGyId(Long gyId) public void setJmId(Long jmId)
{ {
this.gyId = gyId; this.jmId = jmId;
} }
public Long getGyId() public Long getJmId()
{ {
return gyId; return jmId;
} }
public void setCardId(String cardId) public void setCardId(String cardId)
{ {
@ -83,6 +87,15 @@ public class SzxcGyApply extends BaseEntity
{ {
return name; return name;
} }
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setUserId(Long userId) public void setUserId(Long userId)
{ {
this.userId = userId; this.userId = userId;
@ -97,10 +110,11 @@ public class SzxcGyApply extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("jmId", getJmId())
.append("gyId", getGyId()) .append("gyId", getGyId())
.append("jmId", getJmId())
.append("cardId", getCardId()) .append("cardId", getCardId())
.append("name", getName()) .append("name", getName())
.append("phone", getPhone())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_vote_result * szxc_vote_result
* *
* @author hs * @author hs
* @date 2024-03-20 * @date 2024-04-07
*/ */
public class SzxcVoteResult extends BaseEntity public class SzxcVoteResult extends BaseEntity
{ {
@ -18,6 +18,10 @@ public class SzxcVoteResult extends BaseEntity
/** id */ /** id */
private Long id; private Long id;
/** 议事id */
@Excel(name = "议事id")
private Long ysId;
/** 居民id */ /** 居民id */
@Excel(name = "居民id") @Excel(name = "居民id")
private Long jmId; private Long jmId;
@ -30,9 +34,9 @@ public class SzxcVoteResult extends BaseEntity
@Excel(name = "投票人") @Excel(name = "投票人")
private String voteName; private String voteName;
/** 议事id */ /** 手机号 */
@Excel(name = "议事id") @Excel(name = "手机号")
private Long ysId; private String phone;
/** 同意、反对、弃权 */ /** 同意、反对、弃权 */
@Excel(name = "同意、反对、弃权") @Excel(name = "同意、反对、弃权")
@ -55,6 +59,15 @@ public class SzxcVoteResult extends BaseEntity
{ {
return id; return id;
} }
public void setYsId(Long ysId)
{
this.ysId = ysId;
}
public Long getYsId()
{
return ysId;
}
public void setJmId(Long jmId) public void setJmId(Long jmId)
{ {
this.jmId = jmId; this.jmId = jmId;
@ -82,14 +95,14 @@ public class SzxcVoteResult extends BaseEntity
{ {
return voteName; return voteName;
} }
public void setYsId(Long ysId) public void setPhone(String phone)
{ {
this.ysId = ysId; this.phone = phone;
} }
public Long getYsId() public String getPhone()
{ {
return ysId; return phone;
} }
public void setVote(String vote) public void setVote(String vote)
{ {
@ -123,10 +136,11 @@ public class SzxcVoteResult extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("ysId", getYsId())
.append("jmId", getJmId()) .append("jmId", getJmId())
.append("cardId", getCardId()) .append("cardId", getCardId())
.append("voteName", getVoteName()) .append("voteName", getVoteName())
.append("ysId", getYsId()) .append("phone", getPhone())
.append("vote", getVote()) .append("vote", getVote())
.append("opinion", getOpinion()) .append("opinion", getOpinion())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())

@ -0,0 +1,48 @@
package com.ruoyi.szxc.domain;
public class YsResult {
/** 议事id */
private Long ysId;
/** 同意票数 */
private Integer tyCount;
/** 反对票数 */
private Integer fdCount;
/** 弃权票数 */
private Integer qqCount;
public Long getYsId() {
return ysId;
}
public void setYsId(Long ysId) {
this.ysId = ysId;
}
public Integer getTyCount() {
return tyCount;
}
public void setTyCount(Integer tyCount) {
this.tyCount = tyCount;
}
public Integer getFdCount() {
return fdCount;
}
public void setFdCount(Integer fdCount) {
this.fdCount = fdCount;
}
public Integer getQqCount() {
return qqCount;
}
public void setQqCount(Integer qqCount) {
this.qqCount = qqCount;
}
}

@ -1,7 +1,9 @@
package com.ruoyi.szxc.mapper; package com.ruoyi.szxc.mapper;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcVoteResult; import com.ruoyi.szxc.domain.SzxcVoteResult;
import com.ruoyi.szxc.domain.YsResult;
import java.util.List;
/** /**
* Mapper * Mapper
@ -58,4 +60,6 @@ public interface SzxcVoteResultMapper
* @return * @return
*/ */
public int deleteSzxcVoteResultByIds(Long[] ids); public int deleteSzxcVoteResultByIds(Long[] ids);
YsResult selectSzxcVoteResultByDiscussId(Long ysId);
} }

@ -1,7 +1,9 @@
package com.ruoyi.szxc.service; package com.ruoyi.szxc.service;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcVoteResult; import com.ruoyi.szxc.domain.SzxcVoteResult;
import com.ruoyi.szxc.domain.YsResult;
import java.util.List;
/** /**
* Service * Service
@ -58,4 +60,6 @@ public interface ISzxcVoteResultService
* @return * @return
*/ */
public int deleteSzxcVoteResultById(Long id); public int deleteSzxcVoteResultById(Long id);
YsResult selectSzxcVoteResultByDiscussId(Long ysId);
} }

@ -1,12 +1,14 @@
package com.ruoyi.szxc.service.impl; package com.ruoyi.szxc.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcVoteResultMapper;
import com.ruoyi.szxc.domain.SzxcVoteResult; import com.ruoyi.szxc.domain.SzxcVoteResult;
import com.ruoyi.szxc.domain.YsResult;
import com.ruoyi.szxc.mapper.SzxcVoteResultMapper;
import com.ruoyi.szxc.service.ISzxcVoteResultService; import com.ruoyi.szxc.service.ISzxcVoteResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* Service * Service
@ -93,4 +95,9 @@ public class SzxcVoteResultServiceImpl implements ISzxcVoteResultService
{ {
return szxcVoteResultMapper.deleteSzxcVoteResultById(id); return szxcVoteResultMapper.deleteSzxcVoteResultById(id);
} }
@Override
public YsResult selectSzxcVoteResultByDiscussId(Long ysId) {
return szxcVoteResultMapper.selectSzxcVoteResultByDiscussId(ysId);
}
} }

@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcGyApplyMapper"> <mapper namespace="com.ruoyi.szxc.mapper.SzxcGyApplyMapper">
<resultMap type="SzxcGyApply" id="SzxcGyApplyResult"> <resultMap type="SzxcGyApply" id="SzxcGyApplyResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="jmId" column="jm_id" />
<result property="gyId" column="gy_id" /> <result property="gyId" column="gy_id" />
<result property="jmId" column="jm_id" />
<result property="cardId" column="card_id" /> <result property="cardId" column="card_id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="phone" column="phone" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
@ -18,16 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectSzxcGyApplyVo"> <sql id="selectSzxcGyApplyVo">
select id, jm_id, gy_id, card_id, name, create_by, create_time, update_by, update_time, user_id from szxc_gy_apply select id, gy_id, jm_id, card_id, name, phone, create_by, create_time, update_by, update_time, user_id from szxc_gy_apply
</sql> </sql>
<select id="selectSzxcGyApplyList" parameterType="SzxcGyApply" resultMap="SzxcGyApplyResult"> <select id="selectSzxcGyApplyList" parameterType="SzxcGyApply" resultMap="SzxcGyApplyResult">
<include refid="selectSzxcGyApplyVo"/> <include refid="selectSzxcGyApplyVo"/>
<where> <where>
<if test="jmId != null "> and jm_id = #{jmId}</if>
<if test="gyId != null "> and gy_id = #{gyId}</if> <if test="gyId != null "> and gy_id = #{gyId}</if>
<if test="jmId != null "> and jm_id = #{jmId}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if> <if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
</where> </where>
</select> </select>
@ -40,10 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertSzxcGyApply" parameterType="SzxcGyApply" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSzxcGyApply" parameterType="SzxcGyApply" useGeneratedKeys="true" keyProperty="id">
insert into szxc_gy_apply insert into szxc_gy_apply
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jmId != null">jm_id,</if>
<if test="gyId != null">gy_id,</if> <if test="gyId != null">gy_id,</if>
<if test="jmId != null">jm_id,</if>
<if test="cardId != null">card_id,</if> <if test="cardId != null">card_id,</if>
<if test="name != null and name != ''">name,</if> <if test="name != null and name != ''">name,</if>
<if test="phone != null">phone,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
@ -51,10 +54,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jmId != null">#{jmId},</if>
<if test="gyId != null">#{gyId},</if> <if test="gyId != null">#{gyId},</if>
<if test="jmId != null">#{jmId},</if>
<if test="cardId != null">#{cardId},</if> <if test="cardId != null">#{cardId},</if>
<if test="name != null and name != ''">#{name},</if> <if test="name != null and name != ''">#{name},</if>
<if test="phone != null">#{phone},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
@ -66,10 +70,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateSzxcGyApply" parameterType="SzxcGyApply"> <update id="updateSzxcGyApply" parameterType="SzxcGyApply">
update szxc_gy_apply update szxc_gy_apply
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="jmId != null">jm_id = #{jmId},</if>
<if test="gyId != null">gy_id = #{gyId},</if> <if test="gyId != null">gy_id = #{gyId},</if>
<if test="jmId != null">jm_id = #{jmId},</if>
<if test="cardId != null">card_id = #{cardId},</if> <if test="cardId != null">card_id = #{cardId},</if>
<if test="name != null and name != ''">name = #{name},</if> <if test="name != null and name != ''">name = #{name},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>

@ -6,10 +6,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="SzxcVoteResult" id="SzxcVoteResultResult"> <resultMap type="SzxcVoteResult" id="SzxcVoteResultResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="ysId" column="ys_id" />
<result property="jmId" column="jm_id" /> <result property="jmId" column="jm_id" />
<result property="cardId" column="card_id" /> <result property="cardId" column="card_id" />
<result property="voteName" column="vote_name" /> <result property="voteName" column="vote_name" />
<result property="ysId" column="ys_id" /> <result property="phone" column="phone" />
<result property="vote" column="vote" /> <result property="vote" column="vote" />
<result property="opinion" column="opinion" /> <result property="opinion" column="opinion" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
@ -18,18 +19,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
</resultMap> </resultMap>
<resultMap type="YsResult" id="YsResult">
<result property="ysId" column="ys_id" />
<result property="tyCount" column="ty" />
<result property="fdCount" column="fd" />
<result property="qqCount" column="qq" />
</resultMap>
<sql id="selectSzxcVoteResultVo"> <sql id="selectSzxcVoteResultVo">
select id, jm_id, card_id, vote_name, ys_id, vote, opinion, create_by, create_time, update_by, update_time, user_id from szxc_vote_result select id, jm_id, card_id, vote_name, ys_id, vote, opinion, create_by, create_time, update_by, update_time, user_id from szxc_vote_result
</sql> </sql>
<sql id="selectSzxcVoteResultVo">
select id, ys_id, jm_id, card_id, vote_name, phone, vote, opinion, create_by, create_time, update_by, update_time, user_id from szxc_vote_result
</sql>
<select id="selectSzxcVoteResultList" parameterType="SzxcVoteResult" resultMap="SzxcVoteResultResult"> <select id="selectSzxcVoteResultList" parameterType="SzxcVoteResult" resultMap="SzxcVoteResultResult">
<include refid="selectSzxcVoteResultVo"/> <include refid="selectSzxcVoteResultVo"/>
<where> <where>
<if test="ysId != null "> and ys_id = #{ysId}</if>
<if test="jmId != null "> and jm_id = #{jmId}</if> <if test="jmId != null "> and jm_id = #{jmId}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if> <if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="voteName != null and voteName != ''"> and vote_name like concat('%', #{voteName}, '%')</if> <if test="voteName != null and voteName != ''"> and vote_name like concat('%', #{voteName}, '%')</if>
<if test="ysId != null "> and ys_id = #{ysId}</if> <if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="vote != null and vote != ''"> and vote = #{vote}</if> <if test="vote != null and vote != ''"> and vote = #{vote}</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if> <if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
@ -41,62 +53,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertSzxcVoteResult" parameterType="SzxcVoteResult" useGeneratedKeys="true" keyProperty="id"> <!--通过议事id获取投票情况-->
insert into szxc_vote_result <select id="selectSzxcVoteResultByDiscussId" parameterType="Long" resultMap="YsResult">
<trim prefix="(" suffix=")" suffixOverrides=","> SELECT ys_Id, COUNT(vote = "0" or null) ty,COUNT(vote = "1" or null) fd,COUNT(vote = "2" or null) qq
<if test="jmId != null">jm_id,</if> FROM `szxc_vote_result`
<if test="cardId != null">card_id,</if> <where>
<if test="voteName != null and voteName != ''">vote_name,</if> <if test="ysId != null "> ys_id = #{ysId}</if>
<if test="ysId != null">ys_id,</if> </where>
<if test="vote != null">vote,</if> </select>
<if test="opinion != null">opinion,</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="userId != null">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jmId != null">#{jmId},</if>
<if test="cardId != null">#{cardId},</if>
<if test="voteName != null and voteName != ''">#{voteName},</if>
<if test="ysId != null">#{ysId},</if>
<if test="vote != null">#{vote},</if>
<if test="opinion != null">#{opinion},</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="userId != null">#{userId},</if>
</trim>
</insert>
<update id="updateSzxcVoteResult" parameterType="SzxcVoteResult"> <sql id="selectSzxcVoteResultVo">
update szxc_vote_result select id, ys_id, jm_id, card_id, vote_name, phone, vote, opinion, create_by, create_time, update_by, update_time, user_id from szxc_vote_result
<trim prefix="SET" suffixOverrides=","> </sql>
<if test="jmId != null">jm_id = #{jmId},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="voteName != null and voteName != ''">vote_name = #{voteName},</if>
<if test="ysId != null">ys_id = #{ysId},</if>
<if test="vote != null">vote = #{vote},</if>
<if test="opinion != null">opinion = #{opinion},</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="userId != null">user_id = #{userId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSzxcVoteResultById" parameterType="Long"> <select id="selectSzxcVoteResultList" parameterType="SzxcVoteResult" resultMap="SzxcVoteResultResult">
delete from szxc_vote_result where id = #{id} <include refid="selectSzxcVoteResultVo"/>
</delete> <where>
<if test="ysId != null "> and ys_id = #{ysId}</if>
<if test="jmId != null "> and jm_id = #{jmId}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="voteName != null and voteName != ''"> and vote_name like concat('%', #{voteName}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="vote != null and vote != ''"> and vote = #{vote}</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where>
</select>
<delete id="deleteSzxcVoteResultByIds" parameterType="String"> <select id="selectSzxcVoteResultById" parameterType="Long" resultMap="SzxcVoteResultResult">
delete from szxc_vote_result where id in <include refid="selectSzxcVoteResultVo"/>
<foreach item="id" collection="array" open="(" separator="," close=")"> where id = #{id}
#{id} </select>
</foreach>
</delete>
</mapper> </mapper>

@ -1,18 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="居民id" prop="jmId"> <el-form-item label="公益id" prop="gyId">
<el-input <el-input
v-model="queryParams.jmId" v-model="queryParams.gyId"
placeholder="请输入居民id" placeholder="请输入公益id"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="公益id" prop="gyId"> <el-form-item label="居民id" prop="jmId">
<el-input <el-input
v-model="queryParams.gyId" v-model="queryParams.jmId"
placeholder="请输入公益id" placeholder="请输入居民id"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -33,6 +33,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建者ID" prop="userId"> <el-form-item label="创建者ID" prop="userId">
<el-input <el-input
v-model="queryParams.userId" v-model="queryParams.userId"
@ -96,10 +104,11 @@
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" /> <el-table-column label="id" align="center" prop="id" />
<el-table-column label="居民id" align="center" prop="jmId" />
<el-table-column label="公益id" align="center" prop="gyId" /> <el-table-column label="公益id" align="center" prop="gyId" />
<el-table-column label="居民id" align="center" prop="jmId" />
<el-table-column label="身份证号" align="center" prop="cardId" /> <el-table-column label="身份证号" align="center" prop="cardId" />
<el-table-column label="报名人" align="center" prop="name" /> <el-table-column label="报名人" align="center" prop="name" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="创建者ID" align="center" prop="userId" /> <el-table-column label="创建者ID" align="center" prop="userId" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -132,18 +141,21 @@
<!-- 添加或修改公益报名情况对话框 --> <!-- 添加或修改公益报名情况对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="居民id" prop="jmId">
<el-input v-model="form.jmId" placeholder="请输入居民id" />
</el-form-item>
<el-form-item label="公益id" prop="gyId"> <el-form-item label="公益id" prop="gyId">
<el-input v-model="form.gyId" placeholder="请输入公益id" /> <el-input v-model="form.gyId" placeholder="请输入公益id" />
</el-form-item> </el-form-item>
<el-form-item label="居民id" prop="jmId">
<el-input v-model="form.jmId" placeholder="请输入居民id" />
</el-form-item>
<el-form-item label="身份证号" prop="cardId"> <el-form-item label="身份证号" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入身份证号" /> <el-input v-model="form.cardId" placeholder="请输入身份证号" />
</el-form-item> </el-form-item>
<el-form-item label="报名人" prop="name"> <el-form-item label="报名人" prop="name">
<el-input v-model="form.name" placeholder="请输入报名人" /> <el-input v-model="form.name" placeholder="请输入报名人" />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="创建者ID" prop="userId"> <el-form-item label="创建者ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入创建者ID" /> <el-input v-model="form.userId" placeholder="请输入创建者ID" />
</el-form-item> </el-form-item>
@ -157,9 +169,9 @@
</template> </template>
<script> <script>
import { listApply, getApply, delApply, addApply, updateApply } from "@/api/szxc/apply"; import { listApply, getApply, delApply, addApply, updateApply } from "@/api/szxc/apply";
export default { export default {
name: "Apply", name: "Apply",
data() { data() {
return { return {
@ -185,10 +197,11 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
jmId: null,
gyId: null, gyId: null,
jmId: null,
cardId: null, cardId: null,
name: null, name: null,
phone: null,
userId: null userId: null
}, },
// //
@ -223,10 +236,11 @@ export default {
reset() { reset() {
this.form = { this.form = {
id: null, id: null,
jmId: null,
gyId: null, gyId: null,
jmId: null,
cardId: null, cardId: null,
name: null, name: null,
phone: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
@ -304,5 +318,5 @@ export default {
}, `apply_${new Date().getTime()}.xlsx`) }, `apply_${new Date().getTime()}.xlsx`)
} }
} }
}; };
</script> </script>

Loading…
Cancel
Save