Commit b7c18cd2 by MMF

MMF 2026-04-15 帮扶反馈

parent 98f403cd
......@@ -117,6 +117,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="nickName != null and nickName != ''">
AND u.nick_name like concat('%', #{nickName}, '%')
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
......
......@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 最强帮扶 帮扶计划 Model
......@@ -39,6 +40,7 @@ public class ZqbfXmzBfxqQuery extends BaseEntity {
* 当前状态,字典
*/
private String dqzt;
private List<String> dqztList;
/**
* 开始时间
*/
......
......@@ -92,4 +92,16 @@ public class ZqbfXmzBfzjVo implements Serializable {
* 预留5
*/
private String yl5;
/**
* 用户ID
*/
private Long user_id;
/**
* 用户名
*/
private String user_name;
/**
* 昵称
*/
private String nick_name;
}
......@@ -41,10 +41,10 @@ public class ZqbfXmzBfxqServiceImpl implements ZqbfXmzBfxqService {
* 基层单位(查询本部门以及一下数据)
*/
@Override
@DataScope(deptAlias = "dept", userAlias = "bfzj")
@DataScope(deptAlias = "dept")
public List<ZqbfXmzBfxqVo> list(ZqbfXmzBfxqQuery zqbfXmzBfxqQuery) {
if (SecurityUtils.hasPermi(MtConstant.SGZQ_XMZ) || SecurityUtils.hasPermi(MtConstant.SGZQ_XMZ_LD)) {
zqbfXmzBfxqQuery.setDqzt("3");
if (SecurityUtils.hasPermi(MtConstant.SGZQ_XMZ_ZJ)) {
zqbfXmzBfxqQuery.setUser_id(SecurityUtils.getUserId());
}
List<ZqbfXmzBfxqVo> dataList = zqbfXmzBfxqMapper.list(zqbfXmzBfxqQuery);
return dataList;
......
......@@ -125,7 +125,7 @@
</update>
<!-- 删除 -->
<delete id="delete" parameterType="long">
DELETE FROM zqbf_xmz_bfxm WHERE BBM IN
DELETE FROM zqbf_xmz_bfxm WHERE xmid IN
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......
......@@ -43,20 +43,10 @@
zqbf_xmz_bfxq bfxq
LEFT JOIN sys_dept dept ON bfxq.dwid = dept.dept_id
LEFT JOIN zqbf_xmz_bfxm bfxm ON bfxq.xmid = bfxm.xmid
LEFT JOIN zqcz_xmz_ddzj ddzj ON bfxq.xqid = ddzj.xqid
LEFT JOIN zqbf_xmz_bfzj bfzj ON ddzj.ddzj = bfzj.zjid
</sql>
<!-- 条件查询 -->
<select id="list" parameterType="ZqbfXmzBfxqQuery" resultMap="ZqbfXmzBfxqResult">
<include refid="selectCommon"></include>
<where>
<if test="xqid != null ">AND bfxq.xqid = #{xqid}</if>
<if test="user_id != null ">AND ddzj.ddzj = #{user_id}</if>
<if test="dwid != null ">AND (dept.dept_id = #{dwid} OR FIND_IN_SET(#{dwid}, dept.ancestors))</if>
<if test="xmmc != null and xmmc != ''">AND bfxm.xmmc like concat('%', #{xmmc}, '%')</if>
<if test="dqzt != null and dqzt != ''">AND bfxq.dqzt &gt;= #{dqzt}</if>
<if test="kssj != null">AND bfxq.bfkssj &gt;= #{kssj}</if>
<if test="jssj != null">AND bfxq.bfjssj &lt;= #{jssj}</if>
${params.dataScope}
</where>
<sql id="selectGroup">
GROUP BY
bfxq.xqid,
bfxq.dwid,
......@@ -70,13 +60,35 @@
bfxq.bfjssj,
bfxq.lxr,
bfxq.lxdh,
bfxq.gxsj,
bfxq.wcsj,
bfxq.bfms
</sql>
<!-- 条件查询 -->
<select id="list" parameterType="ZqbfXmzBfxqQuery" resultMap="ZqbfXmzBfxqResult">
<include refid="selectCommon"></include>
<where>
<if test="xqid != null ">AND bfxq.xqid = #{xqid}</if>
<if test="user_id != null ">AND bfzj.user_id = #{user_id}</if>
<if test="dwid != null ">AND (dept.dept_id = #{dwid} OR FIND_IN_SET(#{dwid}, dept.ancestors))</if>
<if test="xmmc != null and xmmc != ''">AND bfxm.xmmc like concat('%', #{xmmc}, '%')</if>
<if test="dqzt != null and dqzt != ''">AND bfxq.dqzt = #{dqzt}</if>
<if test="dqztList != null and not dqztList.isEmpty()">
AND (bfxq.dqzt IN
<foreach collection="dqztList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>)
</if>
<if test="kssj != null">AND bfxq.bfkssj &gt;= #{kssj}</if>
<if test="jssj != null">AND bfxq.bfjssj &lt;= #{jssj}</if>
${params.dataScope}
</where>
<include refid="selectGroup"></include>
ORDER BY bfxq.gxsj DESC
</select>
<!-- 查询详情 -->
<select id="info" parameterType="long" resultMap="ZqbfXmzBfxqResult">
<include refid="selectCommon"></include> WHERE bfxq.xqid = #{id}
<include refid="selectCommon"></include> WHERE bfxq.xqid = #{id} <include refid="selectGroup"></include>
</select>
<!-- 新增 -->
<insert id="add" parameterType="ZqbfXmzBfxq" useGeneratedKeys="true" keyProperty="xqid">
......
......@@ -22,13 +22,16 @@
<result property="yl3" column="yl3"/>
<result property="yl4" column="yl4"/>
<result property="yl5" column="yl5"/>
<result property="user_id" column="user_id"/>
<result property="user_name" column="user_name"/>
<result property="nick_name" column="nick_name"/>
</resultMap>
<!-- 通用查询 -->
<sql id="selectCommon">
SELECT
bfzj.zjid,
bfzj.dwid,
CONCAT(dept.dept_name, dept.create_by) AS dwmc,
CONCAT( dept.dept_name, dept.create_by ) AS dwmc,
bfzj.zjmc,
bfzj.zjzw,
bfzj.zjzj,
......@@ -42,10 +45,14 @@
bfzj.yl2,
bfzj.yl3,
bfzj.yl4,
bfzj.yl5
bfzj.yl5,
user.user_id,
user.user_name,
user.nick_name
FROM
zqbf_xmz_bfzj bfzj
LEFT JOIN sys_dept dept ON bfzj.dwid = dept.dept_id
LEFT JOIN sys_user user ON bfzj.user_id=user.user_id
</sql>
<!-- 条件查询 -->
<select id="list" parameterType="ZqbfXmzBfzjQuery" resultMap="ZqbfXmzBfzjResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment