Browse Source

'报告数据状态限制'

master
daixiantong 4 years ago
parent
commit
ae3b56f4e8
3 changed files with 8 additions and 9 deletions
  1. +2
    -1
      src/main/java/com/taauav/admin/mapper/TauvInspectFileMapper.xml
  2. +5
    -8
      src/main/java/com/taauav/front/controller/LSAdminController.java
  3. +1
    -0
      src/main/java/com/taauav/front/service/impl/LSReportServiceImpl.java

+ 2
- 1
src/main/java/com/taauav/admin/mapper/TauvInspectFileMapper.xml View File

left join tauv_question_options as q on f.question_id = q.id left join tauv_question_options as q on f.question_id = q.id
left join sys_city as c on d.driver_area = c.id left join sys_city as c on d.driver_area = c.id
where f.mark = 1 and d.mark = 1 and q.mark = 1 and f.is_review = 1 and f.is_effective = 1 and f.status = 1 where f.mark = 1 and d.mark = 1 and q.mark = 1 and f.is_review = 1 and f.is_effective = 1 and f.status = 1
and d.status = 4
<if test="areaId != null and areaId > 0"> <if test="areaId != null and areaId > 0">
and d.driver_area = #{areaId} and d.driver_area = #{areaId}
</if> </if>
left join tauv_driver as d on i.driver_id = d.id left join tauv_driver as d on i.driver_id = d.id
left join ls_admin as a on d.driver_manager = a.id left join ls_admin as a on d.driver_manager = a.id
where f.mark = 1 and d.mark = 1 and i.mark = 1 and f.is_review = 1 and f.is_effective = 1 and f.status = 1 where f.mark = 1 and d.mark = 1 and i.mark = 1 and f.is_review = 1 and f.is_effective = 1 and f.status = 1
and q.mark = 1
and q.mark = 1 and i.status = 4
<if test="param != null and param.cityId != null and param.cityId > 0"> <if test="param != null and param.cityId != null and param.cityId > 0">
and d.driver_area = #{param.cityId} and d.driver_area = #{param.cityId}
</if> </if>

+ 5
- 8
src/main/java/com/taauav/front/controller/LSAdminController.java View File

package com.taauav.front.controller; package com.taauav.front.controller;


import com.taauav.admin.entity.SysCity;
import com.taauav.admin.entity.TauvInspectFile;
import com.taauav.admin.service.ILsAdminService; import com.taauav.admin.service.ILsAdminService;
import com.taauav.admin.service.ILsAuthGroupService;
import com.taauav.admin.service.ILsCityService;
import com.taauav.admin.service.ITauvInspectFileService; import com.taauav.admin.service.ITauvInspectFileService;
import com.taauav.common.bean.Response; import com.taauav.common.bean.Response;
import com.taauav.common.util.StringUtils;
import com.taauav.front.dto.LsInspectFileDTO; import com.taauav.front.dto.LsInspectFileDTO;
import com.taauav.front.utils.LoginUtils;
import com.taauav.front.vo.LSAdminVo; import com.taauav.front.vo.LSAdminVo;
import com.taauav.front.vo.LSVillageVo; import com.taauav.front.vo.LSVillageVo;
import com.taauav.front.vo.SysCityVo; import com.taauav.front.vo.SysCityVo;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


import java.math.BigInteger; import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;


* @return * @return
*/ */
@GetMapping("/info") @GetMapping("/info")
public Response info(@RequestParam("userId") Integer userId, @RequestParam Map<String, String> map) {
public Response info(@RequestParam Map<String, String> map) {
Integer userId = LoginUtils.getAdminId();
LSAdminVo info = lsAdminService.getAdminInfo(userId); LSAdminVo info = lsAdminService.getAdminInfo(userId);


//数据权限处理 //数据权限处理
* @return * @return
*/ */
@GetMapping("/village") @GetMapping("/village")
public Response getVillageData(@RequestParam("userId")Integer userId, @RequestParam("townId") BigInteger townId, @RequestParam Map<String, String> map) {
public Response getVillageData(@RequestParam("townId") BigInteger townId, @RequestParam Map<String, String> map) {
Integer userId = LoginUtils.getAdminId();
LSVillageVo village = lsAdminService.getVillageList(userId, townId, map); LSVillageVo village = lsAdminService.getVillageList(userId, townId, map);
return response.success(village); return response.success(village);
} }

+ 1
- 0
src/main/java/com/taauav/front/service/impl/LSReportServiceImpl.java View File

} }
queryWrapper.in("driver_area", driverAreaList); queryWrapper.in("driver_area", driverAreaList);
} }
queryWrapper.eq("status", 3);
queryWrapper.eq("mark", 1); queryWrapper.eq("mark", 1);


// 数据权限 // 数据权限

Loading…
Cancel
Save