Commit 57f80b4c authored by gaoyingwei's avatar gaoyingwei

修改查询方舱隔离点

parent f8b778ea
...@@ -4,8 +4,11 @@ import java.util.ArrayList; ...@@ -4,8 +4,11 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.FcryDTO; import com.ruoyi.system.domain.FcryDTO;
import com.ruoyi.system.domain.Fkqk; import com.ruoyi.system.domain.Fkqk;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.impl.FkqkServiceImpl; import com.ruoyi.system.service.impl.FkqkServiceImpl;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -41,6 +44,8 @@ public class FcryController extends BaseController ...@@ -41,6 +44,8 @@ public class FcryController extends BaseController
private IFcryService fcryService; private IFcryService fcryService;
@Autowired @Autowired
private FkqkServiceImpl fkqkService; private FkqkServiceImpl fkqkService;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 查询方舱人员列表 * 查询方舱人员列表
...@@ -49,6 +54,12 @@ public class FcryController extends BaseController ...@@ -49,6 +54,12 @@ public class FcryController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(Fcry fcry) public TableDataInfo list(Fcry fcry)
{ {
String userType = sysUserMapper.selectUserTypeById(SecurityUtils.getUserId());
fcry.setUserType(userType);
if ("2".equals(userType))
fcry.setValue(DataUtils.getKey(null, String.valueOf(SecurityUtils.getUserId()),null,null,null));
else if ("3".equals(userType))
fcry.setValue(DataUtils.getKey(null,null, String.valueOf(SecurityUtils.getUserId()),null,null));
startPage(); startPage();
List<Fcry> list = fcryService.selectFcryList(fcry); List<Fcry> list = fcryService.selectFcryList(fcry);
return getDataTable(list); return getDataTable(list);
......
...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DataUtils; import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.Hscj; import com.ruoyi.system.domain.Hscj;
import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -31,6 +32,8 @@ public class GldryController extends BaseController ...@@ -31,6 +32,8 @@ public class GldryController extends BaseController
{ {
@Autowired @Autowired
private IGldryService gldryService; private IGldryService gldryService;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 查询隔离点人员列表 * 查询隔离点人员列表
...@@ -39,6 +42,13 @@ public class GldryController extends BaseController ...@@ -39,6 +42,13 @@ public class GldryController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(Gldry gldry) public TableDataInfo list(Gldry gldry)
{ {
String userType = sysUserMapper.selectUserTypeById(SecurityUtils.getUserId());
gldry.setUserType(userType);
if ("2".equals(userType))
gldry.setValue(DataUtils.getKey(null, String.valueOf(SecurityUtils.getUserId()),null,null,null));
else if ("3".equals(userType))
gldry.setValue(DataUtils.getKey(null,null, String.valueOf(SecurityUtils.getUserId()),null,null));
startPage(); startPage();
List<Gldry> list = gldryService.selectGldryList(gldry); List<Gldry> list = gldryService.selectGldryList(gldry);
return getDataTable(list); return getDataTable(list);
......
...@@ -62,12 +62,6 @@ public class FcryServiceImpl implements IFcryService ...@@ -62,12 +62,6 @@ public class FcryServiceImpl implements IFcryService
@DataScope(deptAlias = "d", userAlias = "u") @DataScope(deptAlias = "d", userAlias = "u")
public List<Fcry> selectFcryList(Fcry fcry) public List<Fcry> selectFcryList(Fcry fcry)
{ {
String userType = sysUserMapper.selectUserTypeById(SecurityUtils.getUserId());
fcry.setUserType(userType);
if ("2".equals(userType))
fcry.setValue(DataUtils.getKey(null, String.valueOf(SecurityUtils.getUserId()),null,null,null));
else if ("3".equals(userType))
fcry.setValue(DataUtils.getKey(null,null, String.valueOf(SecurityUtils.getUserId()),null,null));
return fcryMapper.selectFcryList(fcry); return fcryMapper.selectFcryList(fcry);
} }
......
...@@ -53,13 +53,6 @@ public class GldryServiceImpl implements IGldryService ...@@ -53,13 +53,6 @@ public class GldryServiceImpl implements IGldryService
@DataScope(deptAlias = "d", userAlias = "u") @DataScope(deptAlias = "d", userAlias = "u")
public List<Gldry> selectGldryList(Gldry gldry) public List<Gldry> selectGldryList(Gldry gldry)
{ {
String userType = sysUserMapper.selectUserTypeById(SecurityUtils.getUserId());
gldry.setUserType(userType);
if ("2".equals(userType))
gldry.setValue(DataUtils.getKey(null, String.valueOf(SecurityUtils.getUserId()),null,null,null));
else if ("3".equals(userType))
gldry.setValue(DataUtils.getKey(null,null, String.valueOf(SecurityUtils.getUserId()),null,null));
return gldryMapper.selectGldryList(gldry); return gldryMapper.selectGldryList(gldry);
} }
......
...@@ -61,9 +61,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -61,9 +61,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zcTime != null "> and a.zc_time = #{zcTime}</if> <if test="zcTime != null "> and a.zc_time = #{zcTime}</if>
<if test="glPlace != null and glPlace != ''"> and a.gl_place like concat('%', #{glPlace}, '%')</if> <if test="glPlace != null and glPlace != ''"> and a.gl_place like concat('%', #{glPlace}, '%')</if>
<if test="status != null and status != ''"> and a.status = #{status}</if> <if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="userType != null and status == '00'.toString()"> ${params.dataScope} </if> <if test="userType != null and userType == '00'.toString()"> ${params.dataScope} </if>
<if test="userType != null and status == '2'.toString()"> a.street = #{value} </if> <if test="userType != null and userType == '2'.toString()"> and a.street = #{value} </if>
<if test="userType != null and status == '3'.toString()"> a.committee = #{value} </if> <if test="userType != null and userType == '3'.toString()"> and a.committee = #{value} </if>
</select> </select>
<select id="selectFcryById" parameterType="Long" resultMap="FcryResult"> <select id="selectFcryById" parameterType="Long" resultMap="FcryResult">
......
...@@ -58,9 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -58,9 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zrTime != null "> and a.zr_time = #{zrTime}</if> <if test="zrTime != null "> and a.zr_time = #{zrTime}</if>
<if test="zcTime != null "> and a.zc_time = #{zcTime}</if> <if test="zcTime != null "> and a.zc_time = #{zcTime}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if> <if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="userType != null and status == '00'.toString()"> ${params.dataScope} </if> <if test="userType != null and userType == '00'.toString()"> ${params.dataScope} </if>
<if test="userType != null and status == '2'.toString()"> a.street = #{value} </if> <if test="userType != null and userType == '2'.toString()"> and a.street = #{value} </if>
<if test="userType != null and status == '3'.toString()"> a.committee = #{value} </if> <if test="userType != null and userType == '3'.toString()"> and a.committee = #{value} </if>
</select> </select>
<select id="selectGldryById" parameterType="Long" resultMap="GldryResult"> <select id="selectGldryById" parameterType="Long" resultMap="GldryResult">
......
...@@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectUserTypeById" parameterType="Long" resultType="java.lang.String"> <select id="selectUserTypeById" parameterType="Long" resultType="java.lang.String">
select user_type from sys_user where id = #{id} select user_type from sys_user where user_id = #{id}
</select> </select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
......
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