牧羊人 пре 4 година
родитељ
комит
fcd05e3170
31 измењених фајлова са 643 додато и 69 уклоњено
  1. +86
    -0
      src/main/java/com/taauav/admin/controller/FrontUserAdminController.java
  2. +5
    -5
      src/main/java/com/taauav/admin/controller/TauvInspectPhotoController.java
  3. +5
    -5
      src/main/java/com/taauav/admin/controller/TauvInspectQuestionController.java
  4. +5
    -5
      src/main/java/com/taauav/admin/controller/TauvInspectTrackController.java
  5. +1
    -1
      src/main/java/com/taauav/admin/controller/TauvWaterAlarmController.java
  6. +1
    -1
      src/main/java/com/taauav/admin/controller/TauvWaterDataController.java
  7. +5
    -5
      src/main/java/com/taauav/admin/controller/TauvWaterSpectrumController.java
  8. +1
    -1
      src/main/java/com/taauav/admin/controller/TauvWaterStandardController.java
  9. +5
    -5
      src/main/java/com/taauav/admin/controller/TauvWaterTrendController.java
  10. +6
    -6
      src/main/java/com/taauav/admin/controller/TauvWaterWarnController.java
  11. +21
    -8
      src/main/java/com/taauav/admin/entity/TauvInspectQuestion.java
  12. +94
    -0
      src/main/java/com/taauav/admin/entity/UserAdmin.java
  13. +15
    -0
      src/main/java/com/taauav/admin/mapper/FrontUserAdminMapper.java
  14. +7
    -0
      src/main/java/com/taauav/admin/mapper/FrontUserAdminMapper.xml
  15. +27
    -10
      src/main/java/com/taauav/admin/mapper/TauvInspectQuestionMapper.xml
  16. +21
    -0
      src/main/java/com/taauav/admin/service/IFrontUserAdminService.java
  17. +55
    -0
      src/main/java/com/taauav/admin/service/impl/FrontFrontUserAdminServiceImpl.java
  18. +1
    -2
      src/main/java/com/taauav/admin/service/impl/TauvInspectFileServiceImpl.java
  19. +6
    -0
      src/main/java/com/taauav/admin/service/impl/TauvInspectQuestionServiceImpl.java
  20. +2
    -0
      src/main/java/com/taauav/admin/vo/LsDriverManagerListVo.java
  21. +45
    -0
      src/main/java/com/taauav/admin/vo/TauvInspectQuestionVo.java
  22. +35
    -0
      src/main/java/com/taauav/front/controller/IndexQuestionController.java
  23. +3
    -3
      src/main/java/com/taauav/front/controller/UserInspectQuestionController.java
  24. +44
    -0
      src/main/java/com/taauav/front/dto/IndexQuestionDto.java
  25. +10
    -2
      src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.java
  26. +11
    -5
      src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.xml
  27. +10
    -1
      src/main/java/com/taauav/front/service/IUserInspectQuestionService.java
  28. +0
    -1
      src/main/java/com/taauav/front/service/impl/UserAdminServiceImpl.java
  29. +17
    -1
      src/main/java/com/taauav/front/service/impl/UserInspectQuestionServiceImpl.java
  30. +97
    -0
      src/main/java/com/taauav/front/vo/IndexQuestionListVo.java
  31. +2
    -2
      src/main/java/com/taauav/tool/service/GenTableServiceImpl.java

+ 86
- 0
src/main/java/com/taauav/admin/controller/FrontUserAdminController.java Прегледај датотеку

@@ -0,0 +1,86 @@
package com.taauav.admin.controller;

import com.taauav.common.bean.Response;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.taauav.common.core.mps.BaseQuery;
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.taauav.admin.entity.UserAdmin;
import com.taauav.admin.service.IFrontUserAdminService;

/**
* 外包人员Controller
*
* @author daixiantong
* @date 20200521
*/
@RestController
@RequestMapping("/admin/userAdmin")
public class FrontUserAdminController extends BaseController {
@Autowired
private IFrontUserAdminService userAdminService;

@Autowired
private Response response;

/**
* 查询外包人员列表
*/
@RequiresPermissions("admin:admin:list")
@GetMapping("/list")
public Response list(UserAdmin userAdmin, BaseQuery query) {
return userAdminService.pageData(query, userAdmin);
}


/**
* 获取外包人员详细信息
*/
@RequiresPermissions("admin:admin:query")
@GetMapping(value = "/{id}")
public Response getInfo(@PathVariable("id") Integer id) {
return response.success(userAdminService.getInfo(id));
}

/**
* 新增外包人员
*/
@RequiresPermissions("admin:admin:add")
@PostMapping
public Response add(@RequestBody UserAdmin userAdmin) {
return response.success(userAdminService.save(userAdmin));
}

/**
* 修改外包人员
*/
@RequiresPermissions("admin:admin:edit")
@PutMapping
public Response edit(@RequestBody UserAdmin userAdmin) {
return response.success(userAdminService.updateById(userAdmin));
}

/**
* 删除外包人员
*/
@RequiresPermissions("admin:admin:remove")
@DeleteMapping("/{ids}")
public Response remove(@PathVariable Integer[] ids) {
return response.success(userAdminService.deleteByIds(ids, new UserAdmin()));
}

/**
* 获取河长列表
*/
@PostMapping("/getDriverManagerList")
public Response getDriverManagerList() {
return userAdminService.getDriverManagerList();
}
}

+ 5
- 5
src/main/java/com/taauav/admin/controller/TauvInspectPhotoController.java Прегледај датотеку

@@ -35,7 +35,7 @@ public class TauvInspectPhotoController extends BaseController {
/**
* 查询巡检正摄图列表
*/
@RequiresPermissions("admin:photo:list")
@RequiresPermissions("photo:list")
@GetMapping("/list")
public Response list(TauvInspectPhotoDTO inspectPhotoDTO, BaseQuery query) {
return tauvInspectPhotoService.selectPhotoPage(inspectPhotoDTO, query);
@@ -44,7 +44,7 @@ public class TauvInspectPhotoController extends BaseController {
/**
* 获取巡检正摄图详细信息
*/
@RequiresPermissions("admin:photo:query")
@RequiresPermissions("photo:query")
@GetMapping(value = "/{id}")
public Response getInfo(@PathVariable("id") Integer id) {
return response.success(tauvInspectPhotoService.getInfo(id));
@@ -53,7 +53,7 @@ public class TauvInspectPhotoController extends BaseController {
/**
* 新增巡检正摄图
*/
@RequiresPermissions("admin:photo:add")
@RequiresPermissions("photo:add")
@PostMapping
public Response add(@RequestBody TauvInspectPhoto tauvInspectPhoto) {
return response.success(tauvInspectPhotoService.save(tauvInspectPhoto));
@@ -62,7 +62,7 @@ public class TauvInspectPhotoController extends BaseController {
/**
* 修改巡检正摄图
*/
@RequiresPermissions("admin:photo:edit")
@RequiresPermissions("photo:edit")
@PostMapping("/edit")
public Response edit(@RequestBody TauvInspectPhoto tauvInspectPhoto) {
return tauvInspectPhotoService.editPhoto(tauvInspectPhoto);
@@ -71,7 +71,7 @@ public class TauvInspectPhotoController extends BaseController {
/**
* 删除巡检正摄图
*/
@RequiresPermissions("admin:photo:remove")
@RequiresPermissions("photo:remove")
@DeleteMapping("/{ids}")
public Response remove(@PathVariable Integer[] ids) {
return response.success(tauvInspectPhotoService.deleteByIds(ids, new TauvInspectPhoto()));

+ 5
- 5
src/main/java/com/taauav/admin/controller/TauvInspectQuestionController.java Прегледај датотеку

@@ -29,7 +29,7 @@ public class TauvInspectQuestionController extends BaseController
/**
* 查询问题管理列表
*/
@RequiresPermissions("admin:question:list")
@RequiresPermissions("problem:list")
@GetMapping("/list")
public Response list(TauvInspectQuestionDTO inspectQuestionDTO, BaseQuery query)
{
@@ -39,7 +39,7 @@ public class TauvInspectQuestionController extends BaseController
/**
* 获取问题管理详细信息
*/
@RequiresPermissions("admin:question:query")
@RequiresPermissions("problem:query")
@GetMapping("/detail")
public Response getInfo(@RequestParam("id") Integer id)
{
@@ -49,7 +49,7 @@ public class TauvInspectQuestionController extends BaseController
/**
* 新增问题管理
*/
@RequiresPermissions("admin:question:add")
@RequiresPermissions("problem:add")
@PostMapping
public Response add(@RequestBody TauvInspectQuestion tauvInspectQuestion)
{
@@ -59,7 +59,7 @@ public class TauvInspectQuestionController extends BaseController
/**
* 修改问题管理
*/
@RequiresPermissions("admin:question:edit")
@RequiresPermissions("problem:edit")
@PutMapping
public Response edit(@RequestBody TauvInspectQuestion tauvInspectQuestion)
{
@@ -69,7 +69,7 @@ public class TauvInspectQuestionController extends BaseController
/**
* 删除问题管理
*/
@RequiresPermissions("admin:question:remove")
@RequiresPermissions("problem:remove")
@DeleteMapping("/{ids}")
public Response remove(@PathVariable Integer[] ids)
{

+ 5
- 5
src/main/java/com/taauav/admin/controller/TauvInspectTrackController.java Прегледај датотеку

@@ -35,7 +35,7 @@ public class TauvInspectTrackController extends BaseController {
/**
* 查询巡检飞行轨迹列表
*/
@RequiresPermissions("admin:track:list")
@RequiresPermissions("track:list")
@GetMapping("/list")
public Response list(TauvInspectTrack tauvInspectTrack, BaseQuery query) {
return tauvInspectTrackService.pageData(query, tauvInspectTrack);
@@ -44,7 +44,7 @@ public class TauvInspectTrackController extends BaseController {
/**
* 获取巡检飞行轨迹详细信息
*/
@RequiresPermissions("admin:track:query")
@RequiresPermissions("track:query")
@GetMapping(value = "/{id}")
public Response getInfo(@PathVariable("id") Integer id) {
return response.success(tauvInspectTrackService.getInfo(id));
@@ -53,7 +53,7 @@ public class TauvInspectTrackController extends BaseController {
/**
* 新增巡检飞行轨迹
*/
@RequiresPermissions("admin:track:add")
@RequiresPermissions("track:add")
@PostMapping
public Response add(@RequestBody TauvInspectTrack tauvInspectTrack) {
return response.success(tauvInspectTrackService.save(tauvInspectTrack));
@@ -62,7 +62,7 @@ public class TauvInspectTrackController extends BaseController {
/**
* 修改巡检飞行轨迹
*/
@RequiresPermissions("admin:track:edit")
@RequiresPermissions("track:edit")
@PutMapping
public Response edit(@RequestBody TauvInspectTrack tauvInspectTrack) {
return response.success(tauvInspectTrackService.updateById(tauvInspectTrack));
@@ -71,7 +71,7 @@ public class TauvInspectTrackController extends BaseController {
/**
* 删除巡检飞行轨迹
*/
@RequiresPermissions("admin:track:remove")
@RequiresPermissions("track:remove")
@DeleteMapping("/{ids}")
public Response remove(@PathVariable Integer[] ids) {
return response.success(tauvInspectTrackService.deleteByIds(ids, new TauvInspectTrack()));

+ 1
- 1
src/main/java/com/taauav/admin/controller/TauvWaterAlarmController.java Прегледај датотеку

@@ -25,7 +25,7 @@ import javax.annotation.Resource;
@RestController
@RequestMapping("/admin/waterAlarm")
public class TauvWaterAlarmController extends BaseController {
private static final String controllerName = "admin:waterAlarm";
private static final String controllerName = "waterAlarm";
@Autowired
private ITauvWaterAlarmService waterAlarmService;
@Resource

+ 1
- 1
src/main/java/com/taauav/admin/controller/TauvWaterDataController.java Прегледај датотеку

@@ -21,7 +21,7 @@ import javax.annotation.Resource;
@RestController
@RequestMapping("/admin/waterData")
public class TauvWaterDataController extends BaseController {
private static final String controllerName = "admin:waterData";
private static final String controllerName = "waterData";
@Autowired
private ITauvWaterDataService waterDataService;
@Resource

+ 5
- 5
src/main/java/com/taauav/admin/controller/TauvWaterSpectrumController.java Прегледај датотеку

@@ -30,7 +30,7 @@ public class TauvWaterSpectrumController extends BaseController {
/**
* 查询多光谱图列表
*/
@RequiresPermissions("admin:spectrum:list")
@RequiresPermissions("spectrum:list")
@GetMapping("/list")
public Response list(TauvWaterSpectrumDTO waterSpectrumDTO, BaseQuery query) {
return tauvWaterSpectrumService.selectSpectrumPage(waterSpectrumDTO, query);
@@ -39,7 +39,7 @@ public class TauvWaterSpectrumController extends BaseController {
/**
* 获取多光谱图详细信息
*/
@RequiresPermissions("admin:spectrum:query")
@RequiresPermissions("spectrum:query")
@GetMapping("/detail")
public Response getInfo(@RequestParam("id") Integer id) {
return response.success(tauvWaterSpectrumService.getInfo(id));
@@ -48,7 +48,7 @@ public class TauvWaterSpectrumController extends BaseController {
/**
* 新增多光谱图
*/
@RequiresPermissions("admin:spectrum:add")
@RequiresPermissions("spectrum:add")
@PostMapping
public Response add(@RequestBody TauvWaterSpectrum tauvWaterSpectrum) {
return response.success(tauvWaterSpectrumService.save(tauvWaterSpectrum));
@@ -57,7 +57,7 @@ public class TauvWaterSpectrumController extends BaseController {
/**
* 修改多光谱图
*/
@RequiresPermissions("admin:spectrum:edit")
@RequiresPermissions("spectrum:edit")
@PostMapping("/edit")
public Response edit(@RequestBody TauvWaterSpectrum tauvWaterSpectrum) {
return tauvWaterSpectrumService.editSpectrum(tauvWaterSpectrum);
@@ -66,7 +66,7 @@ public class TauvWaterSpectrumController extends BaseController {
/**
* 删除多光谱图
*/
@RequiresPermissions("admin:spectrum:remove")
@RequiresPermissions("spectrum:remove")
@PostMapping("/remove")
public Response remove(String ids) {
return tauvWaterSpectrumService.dropSpectrum(ids);

+ 1
- 1
src/main/java/com/taauav/admin/controller/TauvWaterStandardController.java Прегледај датотеку

@@ -25,7 +25,7 @@ public class TauvWaterStandardController {
private ITauvWaterStandardService waterStandardService;
@Autowired
private Response response;
private static final String controllerName = "admin:standard";
private static final String controllerName = "standard";

/**
* 标准列表

+ 5
- 5
src/main/java/com/taauav/admin/controller/TauvWaterTrendController.java Прегледај датотеку

@@ -31,7 +31,7 @@ public class TauvWaterTrendController extends BaseController {
/**
* 查询水环境趋势模拟列表
*/
// @RequiresPermissions("admin:trend:list")
@RequiresPermissions("trend:list")
@GetMapping("/list")
public Response list(TauvWaterTrendDTO tauvWaterTrendDTO, BaseQuery query) {
return tauvWaterTrendService.selectTrendPage(query, tauvWaterTrendDTO);
@@ -40,7 +40,7 @@ public class TauvWaterTrendController extends BaseController {
/**
* 获取水环境趋势模拟详细信息
*/
@RequiresPermissions("admin:trend:query")
@RequiresPermissions("trend:query")
@GetMapping("/detail")
public Response getInfo(@RequestParam("id") Integer id) {
return tauvWaterTrendService.getTrendList(id);
@@ -49,7 +49,7 @@ public class TauvWaterTrendController extends BaseController {
/**
* 新增水环境趋势模拟
*/
@RequiresPermissions("admin:trend:add")
@RequiresPermissions("trend:add")
@PostMapping
public Response add(@RequestBody TauvWaterTrend tauvWaterTrend) {
return response.success(tauvWaterTrendService.save(tauvWaterTrend));
@@ -58,7 +58,7 @@ public class TauvWaterTrendController extends BaseController {
/**
* 修改水环境趋势模拟
*/
@RequiresPermissions("admin:trend:edit")
@RequiresPermissions("trend:edit")
@PostMapping("/edit")
public Response edit(@RequestBody TauvWaterTrend tauvWaterTrend) {
tauvWaterTrend.setUpdateTime(DateUtil.now());
@@ -69,7 +69,7 @@ public class TauvWaterTrendController extends BaseController {
/**
* 删除水环境趋势模拟
*/
@RequiresPermissions("admin:trend:remove")
@RequiresPermissions("trend:remove")
@DeleteMapping("/{ids}")
public Response remove(@PathVariable Integer[] ids) {
return response.success(tauvWaterTrendService.deleteByIds(ids, new TauvWaterTrend()));

+ 6
- 6
src/main/java/com/taauav/admin/controller/TauvWaterWarnController.java Прегледај датотеку

@@ -35,7 +35,7 @@ public class TauvWaterWarnController extends BaseController {
/**
* 查询水质预警列表
*/
@RequiresPermissions("admin:warn:list")
@RequiresPermissions("warn:list")
@GetMapping("/list")
public Response list(TauvWaterWarn tauvWaterWarn, BaseQuery query) {
IPage<TauvWaterWarn> list = tauvWaterWarnService.pageData(query, tauvWaterWarn);
@@ -52,7 +52,7 @@ public class TauvWaterWarnController extends BaseController {
/**
* 获取水质预警详细信息
*/
@RequiresPermissions("admin:warn:query")
@RequiresPermissions("warn:query")
@GetMapping("detail")
public Response getInfo(@RequestParam("id") Integer id) {
TauvWaterWarn waterWarn = tauvWaterWarnService.getInfo(id);
@@ -68,7 +68,7 @@ public class TauvWaterWarnController extends BaseController {
/**
* 新增水质预警
*/
@RequiresPermissions("admin:warn:add")
@RequiresPermissions("warn:add")
@PostMapping("/add")
public Response add(@RequestBody TauvWaterWarn tauvWaterWarn) {
return response.success(tauvWaterWarnService.save(tauvWaterWarn));
@@ -77,7 +77,7 @@ public class TauvWaterWarnController extends BaseController {
/**
* 修改水质预警
*/
@RequiresPermissions("admin:warn:edit")
@RequiresPermissions("warn:edit")
@PostMapping("/edit")
public Response edit(@RequestBody TauvWaterWarn tauvWaterWarn) {
tauvWaterWarn.setWarnTime(DateUtil.now());
@@ -88,7 +88,7 @@ public class TauvWaterWarnController extends BaseController {
/**
* 删除水质预警
*/
@RequiresPermissions("admin:warn:remove")
@RequiresPermissions("warn:remove")
@PostMapping("/remove")
public Response remove(String ids) {
return tauvWaterWarnService.dropWarn(ids);
@@ -101,7 +101,7 @@ public class TauvWaterWarnController extends BaseController {
* @return
*/
@PostMapping("/cancel")
@RequiresPermissions("admin:warn:cancel")
@RequiresPermissions("warn:cancel")
public Response cancelWarn(String ids) {
return tauvWaterWarnService.cancelWarn(ids);
}

+ 21
- 8
src/main/java/com/taauav/admin/entity/TauvInspectQuestion.java Прегледај датотеку

@@ -1,10 +1,13 @@
package com.taauav.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.taauav.common.domain.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
* 问题管理对象 tauv_inspect_question
*
@@ -31,21 +34,26 @@ public class TauvInspectQuestion extends Entity {
*/
private String questionNo;
/**
* 问题类型ID
* 指派负责人
*/
private Integer questionId;
private Integer assignUser;
/**
* 处理人
* 指派负责人联系方式
*/
private Integer handlerUser;
private String assignContact;
/**
* 处理人联系方式
* 指派备注
*/
private String handlerContact;
private String assignNote;
/**
* 处理备注
* 指派时间
*/
private String handlerNote;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date assignTime;
/**
* 处理人
*/
private Integer handlerUser;
/**
* 处理反馈图片
*/
@@ -54,4 +62,9 @@ public class TauvInspectQuestion extends Entity {
* 处理结果
*/
private String handlerResult;
/**
* 处理完成时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date handlerTime;
}

+ 94
- 0
src/main/java/com/taauav/admin/entity/UserAdmin.java Прегледај датотеку

@@ -0,0 +1,94 @@
package com.taauav.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.taauav.common.domain.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigInteger;
import java.util.Date;

/**
* 外包人员对象 user_admin
*
* @author daixiantong
* @date 20200521
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserAdmin extends Entity {

private static final long serialVersionUID = 1L;

/**
* 姓名
*/
private String realname;
/**
* 用户名
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 头像
*/
private String avatar;
/**
* 性别:1男 2女 3保密
*/
private Integer gender;
/**
* 联系方式(手机号码)
*/
private String mobile;
/**
* 邮箱
*/
private String email;
/**
* 河长等级:1一级 2二级 3三级
*/
private Integer level;
/**
* 区划ID
*/
private BigInteger driverArea;
/**
* 职务
*/
private String duty;
/**
* 角色编号
*/
private String authGroup;
/**
* Session标识
*/
private String token;
/**
* 备注
*/
private String note;
/**
* 最近登录时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date lastTime;
/**
* 登录次数
*/
private Integer loginNum;
/**
* 上次登录IP
*/
private String lastIp;
/**
* 排序
*/
private Integer sort;
}

+ 15
- 0
src/main/java/com/taauav/admin/mapper/FrontUserAdminMapper.java Прегледај датотеку

@@ -0,0 +1,15 @@
package com.taauav.admin.mapper;

import com.taauav.admin.entity.UserAdmin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* 外包人员Mapper接口
*
* @author daixiantong
* @date 20200521
*/
public interface FrontUserAdminMapper extends BaseMapper<UserAdmin>
{

}

+ 7
- 0
src/main/java/com/taauav/admin/mapper/FrontUserAdminMapper.xml Прегледај датотеку

@@ -0,0 +1,7 @@
<?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.taauav.admin.mapper.FrontUserAdminMapper">

</mapper>

+ 27
- 10
src/main/java/com/taauav/admin/mapper/TauvInspectQuestionMapper.xml Прегледај датотеку

@@ -4,11 +4,21 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.taauav.admin.mapper.TauvInspectQuestionMapper">
<select id="selectQuestionList" resultType="com.taauav.admin.vo.TauvInspectQuestionVo">
select q.*, d.inspect_no as `inspectNo`, f.thumb_img as `imgUrl`, d.driver_area as `driverArea`,
d.driver_name as `driverName`, d.execution_time as `inspectTime`, o.content as `questionType`, f.location
from tauv_inspect_question as q left join tauv_inspect_driver as d on q.inspect_driver_id = d.id
select q.*, d.inspect_no as `inspectNo`, f.thumb_img as `imgUrl`, d.driver_area as `driverArea`, t.name as `areaName`,
d.driver_name as `driverName`, d.execution_time as `inspectTime`, o.content as `questionType`, f.location,
f.latitude, f.longitude,a.realname as `createUserName`, b.realname as `assignUserName`, c.realname as `handlerUserName`,
a1.name as `createUserDept`,b1.name as `assignUserDept`,c1.name as `handlerUserDept`, f.original_img as `originUrl`
from tauv_inspect_question as q
left join tauv_inspect_driver as d on q.inspect_driver_id = d.id
left join tauv_inspect_file as f on q.inspect_file_id = f.id
left join tauv_question_options as o on q.question_id = o.id
left join tauv_question_options as o on f.question_id = o.id
left join sys_city as t on d.driver_area = t.id
left join user_admin as a on q.create_user = a.id
left join sys_city as a1 on a.driver_area = a1.id
left join user_admin as b on q.assign_user = b.id
left join sys_city as b1 on b.driver_area = b1.id
left join user_admin as c on q.handler_user = c.id
left join sys_city as c1 on c.driver_area = c1.id
where q.mark = 1 and d.mark = 1 and f.mark = 1 and o.mark = 1
<if test="param != null and param.questionNo != null and param.questionNo != ''">
and q.question_no like concat('%', #{param.questionNo}, '%')
@@ -29,14 +39,21 @@
</select>

<select id="getQuestionDetailInfo" resultType="com.taauav.admin.vo.TauvInspectQuestionVo">
select q.*, d.inspect_no as `inspectNo`, f.thumb_img as `imgUrl`, d.driver_area as `driverArea`,
d.driver_name as `driverName`, d.execution_time as `inspectTime`, o.content as `questionType`,
c.name as `areaName`, f.location
select q.*, d.inspect_no as `inspectNo`, f.thumb_img as `imgUrl`, d.driver_area as `driverArea`, t.name as `areaName`,
d.driver_name as `driverName`, d.execution_time as `inspectTime`, o.content as `questionType`, f.location,
f.latitude, f.longitude,a.realname as `createUserName`, b.realname as `assignUserName`, c.realname as `handlerUserName`,
a1.name as `createUserDept`,b1.name as `assignUserDept`,c1.name as `handlerUserDept`, f.original_img as `originUrl`
from tauv_inspect_question as q
left join tauv_inspect_driver as d on q.inspect_driver_id = d.id
left join tauv_inspect_file as f on q.inspect_file_id = f.id
left join tauv_question_options as o on q.question_id = o.id
left join sys_city as c on d.driver_area = c.id
where q.mark = 1 and d.mark = 1 and f.mark = 1 and o.mark = 1 and c.mark = 1 and q.id = #{id}
left join tauv_question_options as o on f.question_id = o.id
left join user_admin as a on q.create_user = a.id
left join sys_city as a1 on a.driver_area = a1.id
left join user_admin as b on q.assign_user = b.id
left join sys_city as b1 on b.driver_area = b1.id
left join user_admin as c on q.handler_user = c.id
left join sys_city as c1 on c.driver_area = c1.id
left join sys_city as t on d.driver_area = t.id
where q.mark = 1 and d.mark = 1 and f.mark = 1 and o.mark = 1 and t.mark = 1 and q.id = #{id}
</select>
</mapper>

+ 21
- 0
src/main/java/com/taauav/admin/service/IFrontUserAdminService.java Прегледај датотеку

@@ -0,0 +1,21 @@
package com.taauav.admin.service;

import com.taauav.admin.entity.UserAdmin;
import com.taauav.common.bean.Response;
import com.taauav.common.service.IBaseService;

/**
* 外包人员Service接口
*
* @author daixiantong
* @date 20200521
*/
public interface IFrontUserAdminService extends IBaseService<UserAdmin>
{
/**
* 获取河长列表
*
* @return
*/
Response getDriverManagerList();
}

+ 55
- 0
src/main/java/com/taauav/admin/service/impl/FrontFrontUserAdminServiceImpl.java Прегледај датотеку

@@ -0,0 +1,55 @@
package com.taauav.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.taauav.admin.vo.LsDriverManagerListVo;
import com.taauav.common.bean.Response;
import com.taauav.common.service.impl.BaseServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.taauav.admin.mapper.FrontUserAdminMapper;
import com.taauav.admin.entity.UserAdmin;
import com.taauav.admin.service.IFrontUserAdminService;

import java.util.ArrayList;
import java.util.List;

/**
* 外包人员Service业务层处理
*
* @author daixiantong
* @date 20200521
*/
@Service
public class FrontFrontUserAdminServiceImpl extends BaseServiceImpl<FrontUserAdminMapper, UserAdmin> implements IFrontUserAdminService {
@Autowired
private Response response;

/**
* 获取河长列表
*
* @return
*/
@Override
public Response getDriverManagerList() {
// 查询条件
QueryWrapper<UserAdmin> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("status", 1);
queryWrapper.eq("mark", 1);
queryWrapper.orderByAsc("sort");
queryWrapper.select("id", "realname");

// 查询数据
List<UserAdmin> lsAdminList = baseMapper.selectList(queryWrapper);
List<LsDriverManagerListVo> driverManagerListVoList = new ArrayList<>();
if (!lsAdminList.isEmpty()) {
lsAdminList.forEach(item -> {
LsDriverManagerListVo driverManagerListVo = new LsDriverManagerListVo();
// 拷贝属性
BeanUtils.copyProperties(item, driverManagerListVo);
driverManagerListVoList.add(driverManagerListVo);
});
}
return response.success(driverManagerListVoList);
}
}

+ 1
- 2
src/main/java/com/taauav/admin/service/impl/TauvInspectFileServiceImpl.java Прегледај датотеку

@@ -1191,8 +1191,7 @@ public class TauvInspectFileServiceImpl extends BaseServiceImpl<TauvInspectFileM
question.setInspectDriverId(inspectDriver.getId());
question.setInspectFileId(item.getId());
question.setQuestionNo(createQuestionNo());
question.setQuestionId(item.getQuestionId());
question.setCreateUser(ShiroUtils.getAdminId());
question.setCreateUser(1);
question.setCreateTime(DateUtil.now());
inspectQuestionMapper.insert(question);
}

+ 6
- 0
src/main/java/com/taauav/admin/service/impl/TauvInspectQuestionServiceImpl.java Прегледај датотеку

@@ -61,6 +61,9 @@ public class TauvInspectQuestionServiceImpl extends BaseServiceImpl<TauvInspectQ
if (StringUtils.isNotEmpty(item.getImgUrl()) && !item.getImgUrl().contains("http")) {
item.setImgUrl(imageUrl + item.getImgUrl());
}
if (StringUtils.isNotEmpty(item.getOriginUrl()) && !item.getOriginUrl().contains("http")) {
item.setOriginUrl(imageUrl + item.getOriginUrl());
}
}
}
return response.success(list);
@@ -80,6 +83,9 @@ public class TauvInspectQuestionServiceImpl extends BaseServiceImpl<TauvInspectQ
if (StringUtils.isNotEmpty(detail.getHandlerImage()) && !detail.getHandlerImage().contains("http")) {
detail.setHandlerImage(imageUrl + detail.getHandlerImage());
}
if (StringUtils.isNotEmpty(detail.getOriginUrl()) && !detail.getOriginUrl().contains("http")) {
detail.setOriginUrl(imageUrl + detail.getOriginUrl());
}
}
return response.success(detail);
}

+ 2
- 0
src/main/java/com/taauav/admin/vo/LsDriverManagerListVo.java Прегледај датотеку

@@ -4,6 +4,8 @@ import lombok.Data;

/**
* 河长列表Vo
* @author daixiantong
* @date 2020-05-21
*/
@Data
public class LsDriverManagerListVo {

+ 45
- 0
src/main/java/com/taauav/admin/vo/TauvInspectQuestionVo.java Прегледај датотеку

@@ -39,6 +39,11 @@ public class TauvInspectQuestionVo extends TauvInspectQuestion {
*/
private String imgUrl;

/**
* 问题原图地址
*/
private String originUrl;

/**
* 巡检时间
*/
@@ -61,6 +66,46 @@ public class TauvInspectQuestionVo extends TauvInspectQuestion {
*/
private String location;

/**
* 纬度
*/
private String latitude;

/**
* 经度
*/
private String longitude;

/**
* 创建人姓名
*/
private String createUserName;

/**
* 创建人部门
*/
private String createUserDept;

/**
* 分配责任人姓名
*/
private String assignUserName;

/**
* 分配责任人部门
*/
private String assignUserDept;

/**
* 处理人姓名
*/
private String handlerUserName;

/**
* 处理人部门
*/
private String handlerUserDept;

/**
* 状态数组
* @return

+ 35
- 0
src/main/java/com/taauav/front/controller/IndexQuestionController.java Прегледај датотеку

@@ -0,0 +1,35 @@
package com.taauav.front.controller;

import com.taauav.common.bean.Response;
import com.taauav.common.core.mps.BaseQuery;
import com.taauav.front.dto.IndexQuestionDto;
import com.taauav.front.service.IUserInspectQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 指挥大屏-问题清单 控制器
*
* @author daixiantong
* @date 2020-05-20
*/
@RestController
@RequestMapping("/front/question")
public class IndexQuestionController extends FrontBaseController {

@Autowired
private IUserInspectQuestionService questionService;

/**
* 问题管理列表
* @param indexQuestionDto
* @param query
* @return
*/
@GetMapping("/index")
public Response questionList(IndexQuestionDto indexQuestionDto, BaseQuery query) {
return questionService.selectIndexPage(indexQuestionDto, query);
}
}

+ 3
- 3
src/main/java/com/taauav/front/controller/UserInspectQuestionController.java Прегледај датотеку

@@ -74,9 +74,9 @@ public class UserInspectQuestionController extends FrontBaseController {
* @param id 问题ID
* @return
*/
@PostMapping("/funished")
public Response funished(Integer id) {
return inspectQuestionService.funished(id);
@PostMapping("/finished")
public Response finished(Integer id) {
return inspectQuestionService.finished(id);
}

}

+ 44
- 0
src/main/java/com/taauav/front/dto/IndexQuestionDto.java Прегледај датотеку

@@ -0,0 +1,44 @@
package com.taauav.front.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigInteger;
import java.util.Date;

/**
* 指挥大屏 - 问题清单 请求实体类
*
* @author daixiantong
* @date 2020-05-20
*/
@Data
public class IndexQuestionDto {

/**
* 巡检时间(开始)
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startTime;

/**
* 巡检时间(结束)
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endTime;

/**
* 区属id
*/
private BigInteger driverArea;

/**
* 河湖id
*/
private Integer driverId;

/**
* 处理状态值
*/
private Integer status;
}

+ 10
- 2
src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.java Прегледај датотеку

@@ -1,16 +1,17 @@
package com.taauav.front.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.taauav.front.dto.IndexQuestionDto;
import com.taauav.front.entity.UserInspectQuestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.taauav.front.query.UserInspectQuestionQuery;
import com.taauav.front.vo.IndexQuestionListVo;
import com.taauav.front.vo.inspectquestion.InspectQuestionCategoryVo;
import com.taauav.front.vo.inspectquestion.UserInspectQuestionInfoVo;
import com.taauav.front.vo.inspectquestion.UserInspectQuestionListVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

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

@@ -65,9 +66,16 @@ public interface UserInspectQuestionMapper extends BaseMapper<UserInspectQuestio
/**
* 大屏区属问题河湖统计
*
* @param driverArea 区划ID集合
* @return
*/
List<Map<String, Object>> getQuestionDriverAreaList();

/**
* 指挥大屏问题清单 - 问题列表分页数据
*
* @param page
* @param indexQuestionDto
* @return
*/
IPage<IndexQuestionListVo> selectIndexPageList(IPage page, @Param("param") IndexQuestionDto indexQuestionDto);
}

+ 11
- 5
src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.xml Прегледај датотеку

@@ -75,10 +75,16 @@

<!-- 大屏区属问题河湖统计 -->
<select id="getQuestionDriverAreaList" resultType="java.util.Map">
SELECT c.id,c.`name`,count(d.driver_area) as num FROM tauv_inspect_question AS q
INNER JOIN tauv_inspect_driver AS d ON d.id=q.inspect_driver_id
INNER JOIN sys_city AS c ON c.id=d.driver_area
WHERE q.mark=1 AND d.mark=1
GROUP BY d.driver_area
SELECT c.id,c.`name`,count(d.driver_area) as num FROM tauv_inspect_question AS q
INNER JOIN tauv_inspect_driver AS d ON d.id=q.inspect_driver_id
INNER JOIN sys_city AS c ON c.id=d.driver_area
WHERE q.mark=1 AND d.mark=1
GROUP BY d.driver_area
</select>

<!-- 获取指挥大屏问题清单-问题分页列表数据 -->
<select id="selectIndexPageList" resultType="com.taauav.front.vo.IndexQuestionListVo">

</select>

</mapper>

+ 10
- 1
src/main/java/com/taauav/front/service/IUserInspectQuestionService.java Прегледај датотеку

@@ -1,7 +1,9 @@
package com.taauav.front.service;

import com.taauav.common.bean.Response;
import com.taauav.common.core.mps.BaseQuery;
import com.taauav.common.service.IBaseService;
import com.taauav.front.dto.IndexQuestionDto;
import com.taauav.front.dto.inspectquestion.InspectQuestionDealwithDto;
import com.taauav.front.dto.inspectquestion.InspectQuestionDto;
import com.taauav.front.entity.UserInspectQuestion;
@@ -55,6 +57,13 @@ public interface IUserInspectQuestionService extends IBaseService<UserInspectQue
* @param id 问题ID
* @return
*/
Response funished(Integer id);
Response finished(Integer id);

/**
* 获取指挥大屏问题清单分页列表数据
* @param indexQuestionDto
* @param query
* @return
*/
Response selectIndexPage(IndexQuestionDto indexQuestionDto, BaseQuery query);
}

+ 0
- 1
src/main/java/com/taauav/front/service/impl/UserAdminServiceImpl.java Прегледај датотеку

@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.taauav.admin.constant.CommonConstant;
import com.taauav.admin.dto.TauvDriverDTO;
import com.taauav.admin.entity.SysAdmin;
import com.taauav.admin.entity.SysCity;
import com.taauav.admin.mapper.TauvInspectFileMapper;
import com.taauav.admin.service.ISysCityService;

+ 17
- 1
src/main/java/com/taauav/front/service/impl/UserInspectQuestionServiceImpl.java Прегледај датотеку

@@ -4,18 +4,21 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.taauav.admin.service.ISysCityService;
import com.taauav.common.bean.Response;
import com.taauav.common.core.mps.BaseQuery;
import com.taauav.common.service.impl.BaseServiceImpl;
import com.taauav.common.util.DateUtil;
import com.taauav.common.util.FileUtil;
import com.taauav.common.util.FunctionUtils;
import com.taauav.common.util.ShiroUtils;
import com.taauav.front.constant.UserInspectQuestionConstant;
import com.taauav.front.dto.IndexQuestionDto;
import com.taauav.front.dto.inspectquestion.InspectQuestionDealwithDto;
import com.taauav.front.dto.inspectquestion.InspectQuestionDto;
import com.taauav.front.entity.UserInspectQuestion;
import com.taauav.front.mapper.UserInspectQuestionMapper;
import com.taauav.front.query.UserInspectQuestionQuery;
import com.taauav.front.service.IUserInspectQuestionService;
import com.taauav.front.vo.IndexQuestionListVo;
import com.taauav.front.vo.inspectquestion.UserInspectQuestionInfoVo;
import com.taauav.front.vo.inspectquestion.UserInspectQuestionListVo;
import org.springframework.beans.factory.annotation.Autowired;
@@ -219,7 +222,7 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ
* @return
*/
@Override
public Response funished(Integer id) {
public Response finished(Integer id) {
if (id == null || id <= 0) {
return response.failure("问题ID不能为空");
}
@@ -234,4 +237,17 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ
}
return response.success("操作成功");
}

/**
* 获取指挥大屏问题清单分页列表数据
* @param indexQuestionDto
* @param query
* @return
*/
@Override
public Response selectIndexPage(IndexQuestionDto indexQuestionDto, BaseQuery query) {
IPage page = new Page(query.getPage(), query.getPageSize());
IPage<IndexQuestionListVo> list = baseMapper.selectIndexPageList(page, indexQuestionDto);
return null;
}
}

+ 97
- 0
src/main/java/com/taauav/front/vo/IndexQuestionListVo.java Прегледај датотеку

@@ -0,0 +1,97 @@
package com.taauav.front.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.taauav.front.entity.UserInspectQuestion;
import lombok.Data;

import java.util.Date;

/**
* 指挥大屏-问题清单 返回结果实体类
*
* @author daixiantong
* @date 2020-05-20
*/
@Data
public class IndexQuestionListVo extends UserInspectQuestion {

/**
* 问题类型
*/
private String questionType;

/**
* 问题分类
*/
private Integer category;

/**
* 位置
*/
private String location;

/**
* 纬度
*/
private String latitude;

/**
* 经度
*/
private String longitude;

/**
* 区属名称
*/
private String areaName;

/**
* 河湖名称
*/
private String driverName;

/**
* 状态描述
*/
private String statusText;

/**
* 问题缩略图地址
*/
private String imgUrl;

/**
* 问题原图地址
*/
private String originUrl;

/**
* 创建人姓名
*/
private String createUserName;

/**
* 创建人部门
*/
private String createUserDept;

/**
* 分配责任人姓名
*/
private String assignUserName;

/**
* 分配责任人部门
*/
private String assignUserDept;

/**
* 处理人姓名
*/
private String handlerUserName;

/**
* 处理人部门
*/
private String handlerUserDept;
}

+ 2
- 2
src/main/java/com/taauav/tool/service/GenTableServiceImpl.java Прегледај датотеку

@@ -37,8 +37,8 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
public void generatorCode(String tableName) {
GenTable table = getBaseMapper().selectGenTableByName(tableName);
//查询列信息
List<GenTableColumn> colums = table.getColumns();
setPkColumn(table, colums);
List<GenTableColumn> columns = table.getColumns();
setPkColumn(table, columns);

VelocityInitializer.initVelocity();
VelocityContext context = VelocityUtils.prepareContext(table);

Loading…
Откажи
Сачувај