This commit is contained in:
wanggeng 2022-12-29 17:08:44 +08:00
commit 9dca584682
1314 changed files with 492807 additions and 0 deletions

36
.gitignore vendored Normal file
View File

@ -0,0 +1,36 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
mvnw*
.mvn/

105
pom.xml Normal file
View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/>
</parent>
<groupId>cn.com.tenlion</groupId>
<artifactId>supervise-QRcode</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<java.version>1.8</java.version>
<spring-mybatis.version>2.1.4</spring-mybatis.version>
<mysql.version>8.0.22</mysql.version>
<freemarker.version>2.3.28</freemarker.version>
<druid.version>1.1.9</druid.version>
<cm-cloud.version>1.0.1-SNAPSHOT</cm-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${spring-mybatis.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- 角色模块,该模块包含权限模块、菜单模块、组织机构模块、用户模块、文件模块 -->
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>service-role</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- 登录模块,引入该模块后,访问系统需要登录 -->
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>login-base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>module-dictionary</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,23 @@
package cn.com.tenlion.superviseqrcode;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.oas.annotations.EnableOpenApi;
/**
* 码上监督平台
*
* @author wans
* @date 2022年4月27日10:12:28
*/
@EnableOpenApi
@SpringBootApplication(scanBasePackages = {"cn.com.tenlion", "ink.wgink"})
@MapperScan(basePackages = {"cn.com.tenlion.**.dao", "ink.wgink.**.dao"})
public class ApplicationStart {
public static void main(String[] args) {
SpringApplication.run(ApplicationStart.class, args);
}
}

View File

@ -0,0 +1,165 @@
package cn.com.tenlion.superviseqrcode.controller;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import cn.com.tenlion.superviseqrcode.service.supervise.ISuperviseService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteReplyService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.util.date.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-05-09 4:06
* @description
*/
@Controller
@RequestMapping("qrscan")
public class QRScanController extends DefaultBaseController {
@Autowired
private IQRCodeMngService qrCodeMngService;
@Autowired
private IWebSiteMngService webSiteMngService;
@Autowired
private IWebSiteReplyService webSiteReplyService;
@Autowired
private IProblemMngService problemMngService;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IReportCaseService reportCaseService;
@Autowired
private ISuperviseService superviseService;
/**
* 扫描二维码
* @return
*/
@RequestMapping("scan")
public ModelAndView scan(){
ModelAndView mv = new ModelAndView();
Map<String, Object> params = requestParams();
String id = params.get("id").toString();
params.put("id", id);
QRCodeMngDTO qrCodeMngDTO = qrCodeMngService.get(params);
String qrCodeType = qrCodeMngDTO.getQrCodeType();
switch (qrCodeType){
// 平台
case "a1f3b7d7-7dea-4ff1-a1f0-a8d9d541d43a" :
params.clear();
params.put("id", qrCodeMngDTO.getWebSiteId());
WebSiteMngDTO webSiteMngDTO = webSiteMngService.get(params);
mv.addObject("id", webSiteMngDTO.getId());
mv.addObject("webSiteName", webSiteMngDTO.getWebSiteName());
mv.setViewName("web-site");
break;
// 大厅
case "239ffa31-3c86-418f-a6ac-0fd8d14f9b53" :
params.clear();
params.put("id", qrCodeMngDTO.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
mv.addObject("hallId", hallMngDTO.getId());
mv.addObject("hallName", hallMngDTO.getHallName());
mv.setViewName("hall");
break;
// 窗口
case "af02c8ca-d122-4345-a271-e0dcb61c54c4" :
params.clear();
params.put("id", qrCodeMngDTO.getHallWindowId());
HallWindowDTO hallWindow = hallWindowService.get(params);
mv.addObject("hallWindowId", hallWindow.getId());
mv.addObject("hallWindowName", hallWindow.getWindowName() + hallWindow.getWindowNum());
params.clear();
params.put("id", hallWindow.getBelongHallId());
HallMngDTO hall = hallMngService.get(params);
mv.addObject("hallId", hall.getId());
mv.addObject("hallName", hall.getHallName());
mv.setViewName("hall-window");
break;
default:
break;
}
return mv;
}
@GetMapping("list-problem")
@ResponseBody
public List<ProblemMngDTO> listProblem(){
Map<String, Object> params = requestParams();
List<ProblemMngDTO> list = problemMngService.list(params);
return list;
}
@GetMapping("list-case")
@ResponseBody
public List<CaseMngDTO> listCase(){
Map<String, Object> params = requestParams();
List<CaseMngDTO> list = caseMngService.list(params);
return list;
}
@GetMapping("list-window-by-case")
@ResponseBody
public List<HallWindowDTO> listWindowByCase(){
Map<String, Object> params = requestParams();
params.put("id", params.get("caseId").toString());
List<HallWindowDTO> list = hallWindowService.listWindowByCase(params);
return list;
}
@PostMapping("save-web-site")
@ResponseBody
public SuccessResult saveWebSite(@RequestBody Map<String, Object> params){
return webSiteReplyService.saveFromQRCode(params);
}
@PostMapping("save-hall")
@ResponseBody
public SuccessResult saveHall(@RequestBody Map<String, Object> params){
params.put("reportSource","大厅");
return reportCaseService.saveFromQRCode(params);
}
@PostMapping("save-hall-window")
@ResponseBody
public SuccessResult saveHallWindow(@RequestBody Map<String, Object> params){
params.put("reportSource","窗口");
return reportCaseService.saveFromQRCode(params);
}
@GetMapping("get-supervise-tips")
@ResponseBody
public Map<String, Object> getSuperviseTips(){
Map<String, Object> params = requestParams();
params.put("tipsId", params.get("tipsId").toString());
List<Map<String, Object>> list = superviseService.getSuperviseTips(params);
if(list != null && list.size() > 0){
return list.get(0);
}
return new HashMap<>(2);
}
}

View File

@ -0,0 +1,84 @@
package cn.com.tenlion.superviseqrcode.controller.apis.casemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 事项管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/case-mng")
public class CaseMngController extends DefaultBaseController {
@Autowired
private ICaseMngService caseMngService;
@ApiOperation(value = "事项分页列表", notes = "事项分页列表")
@GetMapping("list-page")
public SuccessResultList<List<CaseMngDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return caseMngService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<CaseMngDTO> listPage() {
Map<String, Object> params = requestParams();
return caseMngService.list(params);
}
@ApiOperation(value = "事项详情", notes = "事项详情")
@GetMapping("get/{id}")
public CaseMngDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return caseMngService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody CaseMngDTO dto) {
caseMngService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody CaseMngDTO dto) {
dto.setId(id);
caseMngService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
caseMngService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,120 @@
package cn.com.tenlion.superviseqrcode.controller.apis.hallcamera;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraSuperviseDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallcamera.IHallCameraService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 现场监督
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/hall-camera")
public class HallCameraController extends DefaultBaseController {
@Autowired
private IHallCameraService cameraService;
@PutMapping("update-supervise-pass/{id}")
public SuccessResult updateSupervisePass(@PathVariable("id") Integer id,
@RequestBody HallCameraSuperviseDTO dto) {
dto.setId(id);
cameraService.updateSupervisePass(dto);
return new SuccessResult();
}
@GetMapping("get-supervise/{id}")
public HallCameraSuperviseDTO getSupervise(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return cameraService.getSupervise(params);
}
@PutMapping("update-supervise/{id}")
public SuccessResult updateSupervise(@PathVariable("id") Integer id,
@RequestBody HallCameraSuperviseDTO dto) {
dto.setId(id);
cameraService.updateSupervise(dto);
return new SuccessResult();
}
@GetMapping("list-page-supervise")
public SuccessResultList<List<HallCameraSuperviseDTO>> listPageSupervise(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return cameraService.listPageSupervise(page);
}
@PostMapping("save-supervise")
public SuccessResult save(@RequestBody HallCameraSuperviseDTO dto) {
cameraService.saveSupervise(dto);
return new SuccessResult();
}
@GetMapping("list-page")
public SuccessResultList<List<HallCameraDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return cameraService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<HallCameraDTO> listPage() {
Map<String, Object> params = requestParams();
return cameraService.list(params);
}
@ApiOperation(value = "事项详情", notes = "事项详情")
@GetMapping("get/{id}")
public HallCameraDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return cameraService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody HallCameraDTO dto) {
cameraService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody HallCameraDTO dto) {
dto.setId(id);
cameraService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
cameraService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,84 @@
package cn.com.tenlion.superviseqrcode.controller.apis.hallmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 大厅管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/hall-mng")
public class HallMngController extends DefaultBaseController {
@Autowired
private IHallMngService hallMngService;
@ApiOperation(value = "大厅分页列表", notes = "大厅分页列表")
@GetMapping("list-page")
public SuccessResultList<List<HallMngDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return hallMngService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<HallMngDTO> listPage() {
Map<String, Object> params = requestParams();
return hallMngService.list(params);
}
@ApiOperation(value = "大厅详情", notes = "大厅详情")
@GetMapping("get/{id}")
public HallMngDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return hallMngService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody HallMngDTO dto) {
hallMngService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody HallMngDTO dto) {
dto.setId(id);
hallMngService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
hallMngService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,90 @@
package cn.com.tenlion.superviseqrcode.controller.apis.hallwindow;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.ZTreeDTO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 窗口管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/hall-window")
public class HallWindowController extends DefaultBaseController {
@Autowired
private IHallWindowService hallWindowService;
@ApiOperation(value = "大厅树形列表", notes = "大厅树形列表")
@GetMapping("list-hall-tree")
public List<ZTreeDTO> listHallTree() {
Map<String, Object> params = requestParams();
return hallWindowService.listHallTree(params);
}
@ApiOperation(value = "窗口分页列表", notes = "窗口分页列表")
@GetMapping("list-page")
public SuccessResultList<List<HallWindowDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return hallWindowService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<HallWindowDTO> listPage() {
Map<String, Object> params = requestParams();
return hallWindowService.list(params);
}
@ApiOperation(value = "窗口详情", notes = "窗口详情")
@GetMapping("get/{id}")
public HallWindowDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return hallWindowService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody HallWindowDTO dto) {
hallWindowService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody HallWindowDTO dto) {
dto.setId(id);
hallWindowService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
hallWindowService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,84 @@
package cn.com.tenlion.superviseqrcode.controller.apis.problemmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 问题管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/problem-mng")
public class ProblemMngController extends DefaultBaseController {
@Autowired
private IProblemMngService problemMngService;
@ApiOperation(value = "问题分页列表", notes = "问题分页列表")
@GetMapping("list-page")
public SuccessResultList<List<ProblemMngDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return problemMngService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<ProblemMngDTO> listPage() {
Map<String, Object> params = requestParams();
return problemMngService.list(params);
}
@ApiOperation(value = "问题详情", notes = "问题详情")
@GetMapping("get/{id}")
public ProblemMngDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return problemMngService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody ProblemMngDTO dto) {
problemMngService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody ProblemMngDTO dto) {
dto.setId(id);
problemMngService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
problemMngService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,91 @@
package cn.com.tenlion.superviseqrcode.controller.apis.qrcodemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 二维码管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/qr-code-mng")
public class QRCodeMngController extends DefaultBaseController {
@Autowired
private IQRCodeMngService qrCodeMngService;
@ApiOperation(value = "二维码分页列表", notes = "二维码分页列表")
@GetMapping("list-page")
public SuccessResultList<List<QRCodeMngDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return qrCodeMngService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<QRCodeMngDTO> listPage() {
Map<String, Object> params = requestParams();
return qrCodeMngService.list(params);
}
@ApiOperation(value = "二维码详情", notes = "二维码详情")
@GetMapping("get/{id}")
public QRCodeMngDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return qrCodeMngService.get(params);
}
@ApiOperation(value = "二维码详情", notes = "二维码详情")
@GetMapping("get-by-query")
public QRCodeMngDTO getByQuery() {
Map<String, Object> params = requestParams();
return qrCodeMngService.getByQuery(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody QRCodeMngDTO dto) {
qrCodeMngService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody QRCodeMngDTO dto) {
dto.setId(id);
qrCodeMngService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
qrCodeMngService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,126 @@
package cn.com.tenlion.superviseqrcode.controller.apis.reportcase;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 业务处理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/report-case")
public class ReportCaseController extends DefaultBaseController {
@Autowired
private IReportCaseService reportCaseService;
@PostMapping("save-report-case-accept")
public SuccessResult saveReportCaseAccept(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseAccept(params);
return new SuccessResult();
}
@PostMapping("save-report-case-un-accept")
public SuccessResult saveReportCaseUnAccept(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseUnAccept(params);
return new SuccessResult();
}
@PostMapping("save-report-case-reply")
public SuccessResult saveReportCaseReply(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseReply(params);
return new SuccessResult();
}
@PostMapping("save-report-case-visit")
public SuccessResult saveReportCaseVisit(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseVisit(params);
return new SuccessResult();
}
@PostMapping("save-report-case-finish")
public SuccessResult saveReportCaseFinish(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseFinish(params);
return new SuccessResult();
}
@PostMapping("save-report-case-forward")
public SuccessResult saveReportCaseForward(@RequestBody Map<String, Object> params) {
reportCaseService.saveReportCaseForward(params);
return new SuccessResult();
}
@ApiOperation(value = "业务分页列表", notes = "业务分页列表")
@GetMapping("list-page-un-accept")
public SuccessResultList<List<ReportCaseDTO>> listPageUnAccept(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return reportCaseService.listPageUnAccept(page);
}
@ApiOperation(value = "业务分页列表", notes = "业务分页列表")
@GetMapping("list-page")
public SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return reportCaseService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<ReportCaseDTO> listPage() {
Map<String, Object> params = requestParams();
return reportCaseService.list(params);
}
@ApiOperation(value = "业务详情", notes = "问题详情")
@GetMapping("get/{id}")
public ReportCaseDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return reportCaseService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody ReportCaseDTO dto) {
reportCaseService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody ReportCaseDTO dto) {
dto.setId(id);
reportCaseService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
reportCaseService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,89 @@
package cn.com.tenlion.superviseqrcode.controller.apis.reportcaseforward;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import cn.com.tenlion.superviseqrcode.service.reportcaseforward.IReportCaseForwardService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 业务转派
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/report-case-forward")
public class ReportCaseForwardController extends DefaultBaseController {
@Autowired
private IReportCaseForwardService reportCaseForwardService;
@PostMapping("save-report-case-re-forward")
public SuccessResult saveReportCaseReForward(@RequestBody Map<String, Object> params) {
reportCaseForwardService.saveReportCaseReForward(params);
return new SuccessResult();
}
@ApiOperation(value = "业务转派分页列表", notes = "业务转派分页列表")
@GetMapping("list-page")
public SuccessResultList<List<ReportCaseForwardDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return reportCaseForwardService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<ReportCaseForwardDTO> listPage() {
Map<String, Object> params = requestParams();
return reportCaseForwardService.list(params);
}
@ApiOperation(value = "业务详情", notes = "问题详情")
@GetMapping("get/{id}")
public ReportCaseForwardDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return reportCaseForwardService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody ReportCaseForwardDTO dto) {
reportCaseForwardService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody ReportCaseForwardDTO dto) {
dto.setId(id);
reportCaseForwardService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
reportCaseForwardService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,43 @@
package cn.com.tenlion.superviseqrcode.controller.apis.reportcaselog;
import cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 日志
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/report-case-log")
public class ReportCaseLogController extends DefaultBaseController {
@Autowired
private IReportCaseLogDao logDao;
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<ReportCaseLogDTO> listPage() {
Map<String, Object> params = requestParams();
return logDao.list(params);
}
}

View File

@ -0,0 +1,62 @@
package cn.com.tenlion.superviseqrcode.controller.apis.reportcasepass;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.service.reportcaseforward.IReportCaseForwardService;
import cn.com.tenlion.superviseqrcode.service.reportcasepass.IReportCasePassService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 业务审核
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/report-case-pass")
public class ReportCasePassController extends DefaultBaseController {
@Autowired
private IReportCasePassService passService;
@PostMapping("save-report-case-pass")
public SuccessResult saveReportCasePass(@RequestBody Map<String, Object> params) {
passService.saveReportCasePass(params);
return new SuccessResult();
}
@GetMapping("get-next-dept")
public Map<String, Object> getNextDept() {
Map<String, Object> params = requestParams();
return passService.getNextDept(params);
}
@ApiOperation(value = "业务审核分页列表", notes = "业务审核分页列表")
@GetMapping("list-page")
public SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return passService.listPage(page);
}
@ApiOperation(value = "列表", notes = "列表")
@GetMapping("list")
public List<ReportCaseDTO> list() {
Map<String, Object> params = requestParams();
return passService.list(params);
}
}

View File

@ -0,0 +1,69 @@
package cn.com.tenlion.superviseqrcode.controller.apis.reportletterromm;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm.ReportLetterRoomDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.reportletterroom.IReportLetterRoomService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 平台管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/report-letter-room")
public class ReportLetterRoomController extends DefaultBaseController {
@Autowired
private IReportLetterRoomService letterRoomService;
@GetMapping("list-page")
public SuccessResultList<List<ReportLetterRoomDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return letterRoomService.listPage(page);
}
@GetMapping("get/{id}")
public ReportLetterRoomDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return letterRoomService.get(params);
}
@PostMapping("save-from-forward")
public SuccessResult saveFromForWard(@RequestBody Map<String, Object> params) {
letterRoomService.saveFromForWard(params);
return new SuccessResult();
}
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody ReportLetterRoomDTO dto) {
dto.setId(id);
letterRoomService.update(dto);
return new SuccessResult();
}
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
letterRoomService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,104 @@
package cn.com.tenlion.superviseqrcode.controller.apis.supervise;
import cn.com.tenlion.superviseqrcode.pojo.dtos.supervise.SuperviseDTO;
import cn.com.tenlion.superviseqrcode.service.supervise.ISuperviseService;
import com.alibaba.fastjson.JSONArray;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 监督管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/supervise")
public class SuperviseController extends DefaultBaseController {
@Autowired
private ISuperviseService superviseService;
@GetMapping("get-supervise-tips")
public List<Map<String, Object>> getSuperviseTips() {
Map<String, Object> params = requestParams();
return superviseService.getSuperviseTips(params);
}
@PostMapping("update-supervise-tips")
public SuccessResult updateSuperviseTips(@RequestBody Map<String, Object> params) {
superviseService.updateSuperviseTips(params);
return new SuccessResult();
}
@PostMapping("update-supervise-pass")
public SuccessResult updateSupervisePass(@RequestBody Map<String, Object> params) {
superviseService.updateSupervisePass(params);
return new SuccessResult();
}
@PostMapping("save-supervise-reply")
public SuccessResult saveSuperviseReply(@RequestBody Map<String, Object> params) {
superviseService.saveSuperviseReply(params);
return new SuccessResult();
}
@GetMapping("list-page")
public SuccessResultList<List<SuperviseDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return superviseService.listPage(page);
}
@GetMapping("list")
public List<SuperviseDTO> listPage() {
Map<String, Object> params = requestParams();
return superviseService.list(params);
}
@GetMapping("get/{id}")
public SuperviseDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return superviseService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody SuperviseDTO dto) {
superviseService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody SuperviseDTO dto) {
dto.setId(id);
superviseService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
superviseService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,73 @@
package cn.com.tenlion.superviseqrcode.controller.apis.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 平台管理
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/web-site-mng")
public class WebSiteMngController extends DefaultBaseController {
@Autowired
private IWebSiteMngService webSiteMngService;
@ApiOperation(value = "平台分页列表", notes = "平台分页列表")
@GetMapping("list-page")
public SuccessResultList<List<WebSiteMngDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return webSiteMngService.listPage(page);
}
@ApiOperation(value = "平台详情", notes = "平台详情")
@GetMapping("get/{id}")
public WebSiteMngDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return webSiteMngService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody WebSiteMngDTO webSiteMngDto) {
webSiteMngService.save(webSiteMngDto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody WebSiteMngDTO webSiteMngDto) {
webSiteMngDto.setId(id);
webSiteMngService.update(webSiteMngDto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
webSiteMngService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,75 @@
package cn.com.tenlion.superviseqrcode.controller.apis.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteReplyService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 平台回复
* @author xwangs
* @create 2022-04-28 15:30
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/web-site-reply")
public class WebSiteReplyController extends DefaultBaseController {
@Autowired
private IWebSiteReplyService webSiteReplyService;
@ApiOperation(value = "平台回复分页列表", notes = "平台回复分页列表")
@GetMapping("list-page")
public SuccessResultList<List<WebSiteReplyDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return webSiteReplyService.listPage(page);
}
@ApiOperation(value = "平台回复详情", notes = "平台回复详情")
@GetMapping("get/{id}")
public WebSiteReplyDTO get(@PathVariable("id") String id) {
Map<String, Object> params = requestParams();
params.put("id", id);
return webSiteReplyService.get(params);
}
@ApiOperation(value = "新增", notes = "新增")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
public SuccessResult save(@RequestBody WebSiteReplyDTO dto) {
webSiteReplyService.save(dto);
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{id}")
public SuccessResult update(@PathVariable("id") Integer id,
@RequestBody WebSiteReplyDTO dto) {
dto.setId(id);
webSiteReplyService.update(dto);
return new SuccessResult();
}
@ApiOperation(value = "删除", notes = "删除")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
webSiteReplyService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
}

View File

@ -0,0 +1,193 @@
package cn.com.tenlion.superviseqrcode.controller.app.datastatus;
import cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaseforward.IReportCaseForwardDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteReplyService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.SuccessResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 数据统计对外接口
* @author xwangs
* @create 2022-05-23 10:51
* @description
*/
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/release/data-status")
public class DataStatusAppController extends DefaultBaseController {
@Autowired
private IProblemMngService problemMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private IWebSiteReplyService webSiteReplyService;
@Autowired
private IReportCaseDao reportCaseDao;
@Autowired
private IReportCaseForwardDao forwardDao;
/**
* default页面-各类数据量统计
* @return
*/
@RequestMapping("get-all-category-count")
public SuccessResultData getOne(){
Map<String, Object> result = new HashMap<>(8);
// 问题类别
List<ProblemMngDTO> problemList = problemMngService.list(new HashMap<>(4));
// 接入事项
List<CaseMngDTO> caseList = caseMngService.list(new HashMap<>(4));
// 办事窗口
List<HallWindowDTO> windowList = hallWindowService.list(new HashMap<>(4));
// 投诉件
List<WebSiteReplyDTO> webSiteList = webSiteReplyService.list(new HashMap<>(4));
List<ReportCaseDTO> reportCaseList = reportCaseDao.list(new HashMap<>(4));
// 待受理
int waitAccept = 0;
int waitReply = 0;
int waitPass = 0;
for (ReportCaseDTO item : reportCaseList){
if("0".equals(item.getWorkFlowType())){
waitAccept++;
}
if("1".equals(item.getWorkFlowType())){
waitReply++;
}
if("2".equals(item.getWorkFlowType())){
waitPass++;
}
}
// 待转派
List<ReportCaseForwardDTO> forwardList = forwardDao.list(new HashMap<>(4));
result.put("problemNum", problemList.size());
result.put("caseNum", caseList.size());
result.put("caseRatio", "80.00");
result.put("windowNum", windowList.size());
result.put("reportNum", webSiteList.size() + reportCaseList.size());
result.put("waitAcceptNum", waitAccept);
result.put("waitReplyNum", waitReply);
result.put("waitAcceptRatio", "0.00");
result.put("waitReplyRatio", "0.00");
if(reportCaseList.size() > 0){
BigDecimal bigDecimal = new BigDecimal(waitAccept / reportCaseList.size());
double waitAcceptRatio = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
result.put("waitAcceptRatio", waitAcceptRatio + "");
bigDecimal = new BigDecimal(waitReply / reportCaseList.size());
double waitReplyRatio = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
result.put("waitReplyRatio", waitReplyRatio + "");
}
result.put("waitPassNum", waitPass);
result.put("forwardNum", forwardList.size());
return new SuccessResultData(result);
}
/**
* default页面-投诉件数量
* @return
*/
@RequestMapping("get-report-case-count")
public SuccessResultData getTwo(){
// 平台
List<WebSiteReplyDTO> webSite = webSiteReplyService.list(new HashMap<>(2));
List<ReportCaseDTO> reportCase = reportCaseDao.list(new HashMap<>(2));
// 大厅
int hall = 0;
// 窗口
int window = 0;
for (ReportCaseDTO item : reportCase){
if(item.getReportSource() != null && !"窗口".equals(item.getReportSource())){
window++;
continue;
}
if(item.getReportSource() != null && !"大厅".equals(item.getReportSource())){
hall++;
}
}
Map<String, Object> result = new HashMap<>(8);
List<String> names = new ArrayList<>();
names.add("总体");
names.add("平台");
names.add("大厅");
names.add("窗口");
result.put("names", names);
List<String> value = new ArrayList<>();
value.add(webSite.size() + reportCase.size() + "");
value.add(webSite.size() + "");
value.add(hall + "");
value.add(window + "");
result.put("value", value);
return new SuccessResultData(result);
}
/**
* default页面-案件状态数量
* @return
*/
@RequestMapping("get-work-flow-count")
public SuccessResultData getThree(){
List<ReportCaseDTO> list = reportCaseDao.list(new HashMap<>(4));
int waitNum = 0;
int waitReplyNum = 0;
int waitPassNum = 0;
int finishiNum = 0;
int forwardNum = 0;
for(ReportCaseDTO item : list){
if(item.getWorkFlowType() != null && "0".equals(item.getWorkFlowType())){
waitNum++;
continue;
}
if(item.getWorkFlowType() != null && "1".equals(item.getWorkFlowType())){
waitReplyNum++;
continue;
}
if(item.getWorkFlowType() != null && "2".equals(item.getWorkFlowType())){
waitPassNum++;
continue;
}
if(item.getWorkFlowType() != null && "2".equals(item.getWorkFlowType())){
finishiNum++;
continue;
}
}
List<ReportCaseForwardDTO> list1 = forwardDao.list(new HashMap<>(0));
forwardNum = list1 != null ? list1.size() : 0;
List<String> names = new ArrayList<>();
names.add("待受理");
names.add("待回复");
names.add("审核中");
names.add("已完成");
names.add("已转派");
List<String> value = new ArrayList<>();
value.add(waitNum + "");
value.add(waitReplyNum + "");
value.add(waitPassNum + "");
value.add(finishiNum + "");
value.add(forwardNum + "");
Map<String, Object> result = new HashMap<>(8);
result.put("names", names);
result.put("value", value);
return new SuccessResultData(result);
}
}

View File

@ -0,0 +1,50 @@
package cn.com.tenlion.superviseqrcode.controller.route;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.dtos.role.RoleSimpleDTO;
import ink.wgink.properties.ServerProperties;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
/**
* TODO
* @version 1.0
* @author LY
* @date 2021/4/13 15:40
*/
@RestController
@RequestMapping()
public class IndexWebController extends DefaultBaseController {
@GetMapping("index-main")
public ModelAndView indexWeb(){
ModelAndView mv = new ModelAndView();
mv.setViewName("index-main-page");
// mv.setViewName("default-home");
return mv;
}
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.casemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 事项管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface ICaseMngDao {
List<CaseMngDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
CaseMngDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,36 @@
package cn.com.tenlion.superviseqrcode.dao.hallcamera;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraSuperviseDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 现场监控
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IHallCameraDao {
List<HallCameraDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
HallCameraDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
List<HallCameraSuperviseDTO> listSupervise(Map<String, Object> params);
void saveSupervise(Map<String, Object> saveMap);
void updateSupervise(Map<String, Object> params);
HallCameraSuperviseDTO getSupervise(Map<String, Object> params);
}

View File

@ -0,0 +1,28 @@
package cn.com.tenlion.superviseqrcode.dao.hallmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 大厅管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IHallMngDao {
List<HallMngDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
HallMngDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.hallwindow;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 窗口管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IHallWindowDao {
List<HallWindowDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
HallWindowDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.problemmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 问题管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IProblemMngDao {
List<ProblemMngDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
ProblemMngDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,30 @@
package cn.com.tenlion.superviseqrcode.dao.qrcodemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 二维码管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IQRCodeMngDao {
List<QRCodeMngDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
QRCodeMngDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
QRCodeMngDTO getByQuery(Map<String, Object> params);
}

View File

@ -0,0 +1,35 @@
package cn.com.tenlion.superviseqrcode.dao.reportcase;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 业务办理管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCaseDao {
List<ReportCaseDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
ReportCaseDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
void delete(Map<String, Object> params);
void saveVisit(Map<String, Object> visitMap);
Map<String, Object> getVisit(Map<String, Object> params);
List<ReportCaseDTO> listUnAccept(Map<String, Object> params);
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.superviseqrcode.dao.reportcasefinish;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasefinish.ReportCaseFinishDTO;
import org.springframework.stereotype.Repository;
import java.util.Map;
/**
* 业务办结
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCaseFinishDao {
void save(Map<String, Object> params);
ReportCaseFinishDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void delete(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.reportcaseforward;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 业务转派
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCaseForwardDao {
List<ReportCaseForwardDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
ReportCaseForwardDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.reportcaselog;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 业务日志
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCaseLogDao {
List<ReportCaseLogDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
ReportCaseLogDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.superviseqrcode.dao.reportcasepass;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasepass.ReportCasePassDTO;
import ink.wgink.pojo.result.SuccessResult;
import org.springframework.stereotype.Repository;
import java.util.Map;
/**
* 业务转派
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCasePassDao {
void save(Map<String, Object> params);
ReportCasePassDTO get(Map<String, Object> params);
void delete(Map<String, Object> params);
void update(Map<String, Object> passMap);
Map<String, Object> getParentDept(Map<String, Object> params);
Map<String, Object> getMaxStep(Map<String, Object> passMap);
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.superviseqrcode.dao.reportcasereply;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply.ReportCaseReplyDTO;
import org.springframework.stereotype.Repository;
import java.util.Map;
/**
* 业务回复
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportCaseReplyDao {
void save(Map<String, Object> params);
ReportCaseReplyDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void delete(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.reportletterromm;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm.ReportLetterRoomDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 信访室
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IReportLetterRoomDao {
List<ReportLetterRoomDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
ReportLetterRoomDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,39 @@
package cn.com.tenlion.superviseqrcode.dao.supervise;
import cn.com.tenlion.superviseqrcode.pojo.dtos.supervise.SuperviseDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 监督管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface ISuperviseDao {
List<SuperviseDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
SuperviseDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
void saveSuperviseReply(Map<String, Object> saveMap);
Map<String, Object> getSuperviseReply(Map<String, Object> params);
void deleteReply(Map<String, Object> params);
void updateSuperviseTips(Map<String, Object> params);
List<Map<String, Object>> getSuperviseTips(Map<String, Object> params);
void saveSuperviseTips(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.dao.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 平台管理
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IWebSiteMngDao {
List<WebSiteMngDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
WebSiteMngDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,28 @@
package cn.com.tenlion.superviseqrcode.dao.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 平台回复
* @author xwangs
* @create 2022-04-28 16:16
* @description
*/
@Repository
public interface IWebSiteReplyDao {
List<WebSiteReplyDTO> list(Map<String, Object> params);
void save(Map<String, Object> params);
WebSiteReplyDTO get(Map<String, Object> params);
void update(Map<String, Object> params);
void remove(Map<String, Object> params);
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.casemng;
import lombok.Data;
/**
* 事项实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class CaseMngDTO {
private Integer id;
private String caseName;
private String caseDescribe;
private String manageOrgId;
private String manageOrgName;
private String belongHallId;
private String belongHallName;
private String hallWindowIds;
private String hallWindowNames;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera;
import lombok.Data;
/**
* 实时监控实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class HallCameraDTO {
private Integer id;
private String cameraName;
private String cameraAddr;
private String belongHallId;
private String hallName;
private String cameraDescribe;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,31 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera;
import lombok.Data;
/**
* 现场监督下派实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class HallCameraSuperviseDTO {
private Integer id;
private String caseCode;
private String title;
private String problemType;
private String problemTypeName;
private String content;
private String withFiles;
private String hallId;
private String hallName;
private String creator;
private String gmtCreate;
private String limitDate;
private String workFlowType;
private String manageOrgName;
private String replyContent;
private String replyFiles;
private String replyTime;
}

View File

@ -0,0 +1,27 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng;
import lombok.Data;
/**
* 大厅实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class HallMngDTO {
private Integer id;
private String hallName;
private String manageOrgId;
private String manageOrgName;
private String hallPosition;
private String hallDiscription;
private String servicePhone;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
private String lat;
private String lng;
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow;
import lombok.Data;
/**
* 窗口实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class HallWindowDTO {
private Integer id;
private String windowName;
private String windowNum;
private String belongHallId;
private String hallName;
private String windowPosition;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,23 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.problemng;
import lombok.Data;
/**
* 问题实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ProblemMngDTO {
private Integer id;
private String problemType;
private String problemTypeName;
private String problemName;
private String problemDescribe;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,26 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng;
import lombok.Data;
/**
* 二维码实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class QRCodeMngDTO {
private Integer id;
private String qrCodeType;
private String qrCodeTypeName;
private String webSiteId;
private String hallId;
private String hallWindowId;
private String qrCodeAddr;
private String qrCodeContent;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,54 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase;
import lombok.Data;
/**
* 业务办理实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCaseDTO {
private Integer id;
private String caseCode;
private String title;
private String reportContent;
private String problemType;
private String problemTypeName;
private String problemId;
private String problemName;
private String reportSource;
private String caseId;
private String caseName;
private String hallId;
private String hallName;
private String hallWindowId;
private String hallWindowName;
private String manageOrgId;
private String manageOrgName;
private String acceptOrgId;
private String acceptOrgName;
private String beReportedUser;
private String reportTime;
private String reportUserName;
private String reportUserPhone;
private String reportFile;
private String workFlowType;
/**
* 回复情况
*/
private String replyContent;
private String replyTime;
/**
* 标记是否审核完成
*/
private String passType;
private String currentPassDeptName;
/**
* 回访情况
*/
private String visitContent;
private String visitTime;
}

View File

@ -0,0 +1,20 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasefinish;
import lombok.Data;
/**
* 业务办结实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCaseFinishDTO {
private Integer id;
private String caseCode;
private String finishWay;
private String finishWayName;
private String finishTime;
private String creator;
}

View File

@ -0,0 +1,42 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward;
import lombok.Data;
/**
* 业务办理实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCaseForwardDTO {
private Integer id;
private String caseCode;
private String title;
private String reportContent;
private String problemType;
private String problemTypeName;
private String problemId;
private String problemName;
private String reportSource;
private String caseId;
private String hallId;
private String hallName;
private String hallWindowId;
private String hallWindowName;
private String caseName;
private String manageOrgId;
private String manageOrgName;
private String acceptOrgId;
private String acceptOrgName;
private String beReportedUser;
private String reportTime;
private String reportUserName;
private String reportUserPhone;
private String reportFile;
private String workFlowType;
private String passType;
private String passOrgId;
private String passOrgUser;
}

View File

@ -0,0 +1,22 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog;
import lombok.Data;
/**
* 业务日志实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCaseLogDTO {
private Integer id;
private String caseCode;
private String logContent;
private String creator;
private String creatorName;
private String createOrgId;
private String createOrgName;
private String gmtCreate;
}

View File

@ -0,0 +1,21 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasepass;
import lombok.Data;
/**
* 业务审核实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCasePassDTO {
private Integer id;
private String caseCode;
private String passCurrentOrg;
private String passOver;
private String passStep;
private String passTime;
private String creator;
}

View File

@ -0,0 +1,20 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply;
import lombok.Data;
/**
* 业务回复实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportCaseReplyDTO {
private Integer id;
private String caseCode;
private String replyContent;
private String replyFiles;
private String replyTime;
private String creator;
}

View File

@ -0,0 +1,50 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm;
import lombok.Data;
/**
* 信访室实体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class ReportLetterRoomDTO {
private Integer id;
private String caseCode;
private String title;
private String reportContent;
private String problemType;
private String problemTypeName;
private String problemId;
private String problemName;
private String reportSource;
private String caseId;
private String caseName;
private String hallId;
private String hallName;
private String hallWindowId;
private String hallWindowName;
private String manageOrgId;
private String manageOrgName;
private String acceptOrgId;
private String acceptOrgName;
private String beReportedUser;
private String reportTime;
private String reportUserName;
private String reportUserPhone;
private String reportFile;
private String workFlowType;
private String passType;
/**
* 回复情况
*/
private String replyContent;
private String replyTime;
/**
* 回访情况
*/
private String visitContent;
private String visitTime;
}

View File

@ -0,0 +1,34 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.supervise;
import lombok.Data;
/**
* 监督体类
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class SuperviseDTO {
private Integer id;
private String caseCode;
private String title;
private String superviseType;
private String superviseTypeName;
private String content;
private String withFiles;
private String handleOrgId;
private String handleOrgName;
private String limitDate;
private String replyType;
private String creator;
private String createTime;
private String isDelete;
/**
* 回复情况
*/
private String replyContent;
private String replyFiles;
private String replyTime;
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.website;
import lombok.Data;
/**
* 平台管理
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class WebSiteMngDTO {
private Integer id;
private String webSiteName;
private String webSiteDiscription;
private String webSiteUrl;
private String manageOrgId;
private String manageOrgName;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
}

View File

@ -0,0 +1,28 @@
package cn.com.tenlion.superviseqrcode.pojo.dtos.website;
import lombok.Data;
/**
* 平台回复
* @author xwangs
* @create 2022-04-28 16:21
* @description
*/
@Data
public class WebSiteReplyDTO {
private Integer id;
private String webSiteId;
private String webSiteName;
private String manageOrgId;
private String manageOrgName;
private String matterCode;
private String phoneNumber;
private String opinionContent;
private String creatorName;
private String gmtCreate;
private String replyType;
private String replyContent;
private String replyUserName;
private String replyOrgName;
}

View File

@ -0,0 +1,129 @@
package cn.com.tenlion.superviseqrcode.service.casemng;
import cn.com.tenlion.superviseqrcode.dao.casemng.ICaseMngDao;
import cn.com.tenlion.superviseqrcode.dao.hallmng.IHallMngDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.common.manager.env.EnvManager;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class CaseMngServiceImpl extends DefaultBaseService implements ICaseMngService {
@Autowired
private ICaseMngDao caseMngDao;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private IDepartmentService departmentService;
@Override
public SuccessResultList<List<CaseMngDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<CaseMngDTO> caseList = list(page.getParams());
PageInfo<CaseMngDTO> pageInfo = new PageInfo<>(caseList);
return new SuccessResultList<>(caseList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<CaseMngDTO> list(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if(!"1".equals(currentUser.getUserId())){
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments){
if("".equals(manageOrgIds)){
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("manageOrgId", manageOrgIds);
}
List<CaseMngDTO> list = caseMngDao.list(params);
for(CaseMngDTO item : list){
// 大厅
params.clear();
params.put("id", item.getBelongHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
item.setBelongHallName(hallMngDTO.getHallName());
// 窗口
String[] hallWindowIds = item.getHallWindowIds().split(",");
String hallWindowNames = "";
for(String windowId : hallWindowIds){
params.clear();
params.put("id", windowId);
HallWindowDTO hallWindowDTO = hallWindowService.get(params);
if(!"".equals(hallWindowNames)){
hallWindowNames += "," + hallWindowDTO.getWindowName() + "-" + hallWindowDTO.getWindowNum();
} else {
hallWindowNames += hallWindowDTO.getWindowName() + "-" + hallWindowDTO.getWindowNum();
}
}
item.setHallWindowNames(hallWindowNames);
// 主体单位
DepartmentDTO departmentDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(departmentDTO.getDepartmentName());
}
return list;
}
@Override
public CaseMngDTO get(Map<String, Object> params) {
CaseMngDTO dto = caseMngDao.get(params);
// 主体单位
DepartmentDTO departmentDTO = departmentService.get(dto.getManageOrgId());
dto.setManageOrgName(departmentDTO.getDepartmentName());
return dto;
}
@Override
public SuccessResult save(CaseMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
caseMngDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(CaseMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
caseMngDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
caseMngDao.remove(params);
}
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.superviseqrcode.service.casemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface ICaseMngService {
SuccessResultList<List<CaseMngDTO>> listPage(ListPage page);
List<CaseMngDTO> list(Map<String, Object> params);
SuccessResult save(CaseMngDTO dto);
CaseMngDTO get(Map<String, Object> params);
SuccessResult update(CaseMngDTO dto);
void remove(List<String> asList);
}

View File

@ -0,0 +1,179 @@
package cn.com.tenlion.superviseqrcode.service.hallcamera;
import cn.com.tenlion.superviseqrcode.dao.casemng.ICaseMngDao;
import cn.com.tenlion.superviseqrcode.dao.hallcamera.IHallCameraDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraSuperviseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class HallCameraServiceImpl extends DefaultBaseService implements IHallCameraService {
@Autowired
private IHallCameraDao cameraDao;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IDataService dataService;
@Override
public SuccessResult updateSupervisePass(HallCameraSuperviseDTO dto) {
if ("2".equals(dto.getWorkFlowType())) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
cameraDao.updateSupervise(params);
}
if ("-1".equals(dto.getWorkFlowType())) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
cameraDao.updateSupervise(params);
}
return new SuccessResult();
}
@Override
public HallCameraSuperviseDTO getSupervise(Map<String, Object> params) {
HallCameraSuperviseDTO dto = cameraDao.getSupervise(params);
return dto;
}
@Override
public SuccessResult updateSupervise(HallCameraSuperviseDTO dto) {
dto.setWorkFlowType("1");
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
cameraDao.updateSupervise(params);
return new SuccessResult();
}
@Override
public SuccessResult saveSupervise(HallCameraSuperviseDTO dto) {
String currentTimeMillis = System.currentTimeMillis() + "";
currentTimeMillis = currentTimeMillis.substring(4);
String caseCode = "XCJD" + DateUtil.getDays() + currentTimeMillis;
dto.setCaseCode(caseCode);
dto.setWorkFlowType("0");
Map<String, Object> saveMap = HashMapUtil.beanToMap(dto);
setSaveInfo(saveMap);
cameraDao.saveSupervise(saveMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<HallCameraSuperviseDTO>> listPageSupervise(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<HallCameraSuperviseDTO> list = listSupervise(page.getParams());
PageInfo<HallCameraSuperviseDTO> pageInfo = new PageInfo<>(list);
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<HallCameraSuperviseDTO> listSupervise(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if (!"1".equals(currentUser.getUserId())) {
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments) {
if ("".equals(manageOrgIds)) {
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("manageOrgId", manageOrgIds);
}
List<HallCameraSuperviseDTO> list = cameraDao.listSupervise(params);
Map<String, Object> query = new HashMap<>(8);
for (HallCameraSuperviseDTO item : list) {
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
query.put("id", item.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(query);
item.setHallName(hallMngDTO.getHallName());
item.setManageOrgName(hallMngDTO.getManageOrgName());
}
return list;
}
@Override
public SuccessResultList<List<HallCameraDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<HallCameraDTO> list = list(page.getParams());
PageInfo<HallCameraDTO> pageInfo = new PageInfo<>(list);
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<HallCameraDTO> list(Map<String, Object> params) {
List<HallCameraDTO> list = cameraDao.list(params);
for (HallCameraDTO item : list) {
// 大厅
params.clear();
params.put("id", item.getBelongHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
item.setHallName(hallMngDTO.getHallName());
}
return list;
}
@Override
public HallCameraDTO get(Map<String, Object> params) {
HallCameraDTO dto = cameraDao.get(params);
return dto;
}
@Override
public SuccessResult save(HallCameraDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
cameraDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(HallCameraDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
cameraDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
cameraDao.remove(params);
}
}

View File

@ -0,0 +1,42 @@
package cn.com.tenlion.superviseqrcode.service.hallcamera;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraSuperviseDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IHallCameraService {
SuccessResultList<List<HallCameraDTO>> listPage(ListPage page);
List<HallCameraDTO> list(Map<String, Object> params);
SuccessResult save(HallCameraDTO dto);
HallCameraDTO get(Map<String, Object> params);
SuccessResult update(HallCameraDTO dto);
void remove(List<String> asList);
SuccessResultList<List<HallCameraSuperviseDTO>> listPageSupervise(ListPage page);
List<HallCameraSuperviseDTO> listSupervise(Map<String, Object> params);
SuccessResult saveSupervise(HallCameraSuperviseDTO dto);
SuccessResult updateSupervise(HallCameraSuperviseDTO dto);
HallCameraSuperviseDTO getSupervise(Map<String, Object> params);
SuccessResult updateSupervisePass(HallCameraSuperviseDTO dto);
}

View File

@ -0,0 +1,101 @@
package cn.com.tenlion.superviseqrcode.service.hallmng;
import cn.com.tenlion.superviseqrcode.dao.hallmng.IHallMngDao;
import cn.com.tenlion.superviseqrcode.dao.website.IWebSiteMngDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class HallMngServiceImpl extends DefaultBaseService implements IHallMngService {
@Autowired
private IHallMngDao hallMngDao;
@Autowired
private IQRCodeMngService qrCodeMngService;
@Override
public SuccessResultList<List<HallMngDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<HallMngDTO> hallList = list(page.getParams());
PageInfo<HallMngDTO> pageInfo = new PageInfo<>(hallList);
return new SuccessResultList<>(hallList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<HallMngDTO> list(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if(!"1".equals(currentUser.getUserId())){
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments){
if("".equals(manageOrgIds)){
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("manageOrgId", manageOrgIds);
}
List<HallMngDTO> list = hallMngDao.list(params);
return list;
}
@Override
public HallMngDTO get(Map<String, Object> params) {
HallMngDTO dto = hallMngDao.get(params);
return dto;
}
@Override
public SuccessResult save(HallMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
hallMngDao.save(params);
// 新增二维码表记录
String id = params.get("id").toString();
QRCodeMngDTO qrCodeMngDTO = new QRCodeMngDTO();
qrCodeMngDTO.setQrCodeType("239ffa31-3c86-418f-a6ac-0fd8d14f9b53");
qrCodeMngDTO.setHallId(id);
qrCodeMngService.save(qrCodeMngDTO);
return new SuccessResult();
}
@Override
public SuccessResult update(HallMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
hallMngDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
hallMngDao.remove(params);
}
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.superviseqrcode.service.hallmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IHallMngService {
SuccessResultList<List<HallMngDTO>> listPage(ListPage page);
List<HallMngDTO> list(Map<String, Object> params);
SuccessResult save(HallMngDTO dto);
HallMngDTO get(Map<String, Object> params);
SuccessResult update(HallMngDTO dto);
void remove(List<String> asList);
}

View File

@ -0,0 +1,130 @@
package cn.com.tenlion.superviseqrcode.service.hallwindow;
import cn.com.tenlion.superviseqrcode.dao.hallwindow.IHallWindowDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.ZTreeDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class HallWindowServiceImpl extends DefaultBaseService implements IHallWindowService {
@Autowired
private IHallWindowDao hallWindowDao;
@Autowired
private IHallMngService hallMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IQRCodeMngService qrCodeMngService;
@Override
public List<ZTreeDTO> listHallTree(Map<String, Object> params) {
List<HallMngDTO> hallList = hallMngService.list(params);
List<ZTreeDTO> treeList = new ArrayList<>();
for (HallMngDTO item : hallList){
ZTreeDTO node = new ZTreeDTO();
node.setpId("0");
node.setId(item.getId() + "");
node.setIsParent(false);
node.setName(item.getHallName());
node.setTitle(item.getHallName());
treeList.add(node);
}
return treeList;
}
@Override
public SuccessResultList<List<HallWindowDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<HallWindowDTO> hallWindowList = list(page.getParams());
PageInfo<HallWindowDTO> pageInfo = new PageInfo<>(hallWindowList);
return new SuccessResultList<>(hallWindowList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<HallWindowDTO> list(Map<String, Object> params) {
List<HallWindowDTO> list = hallWindowDao.list(params);
for (HallWindowDTO item : list){
params.clear();
params.put("id", item.getBelongHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
item.setHallName(hallMngDTO.getHallName());
}
return list;
}
@Override
public List<HallWindowDTO> listWindowByCase(Map<String, Object> params) {
CaseMngDTO caseMngDTO = caseMngService.get(params);
String hallWindowIds = caseMngDTO.getHallWindowIds();
params.clear();
params.put("hallWindowIds", hallWindowIds);
List<HallWindowDTO> list = hallWindowDao.list(params);
return list;
}
@Override
public HallWindowDTO get(Map<String, Object> params) {
HallWindowDTO dto = hallWindowDao.get(params);
params.clear();
params.put("id", dto.getBelongHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
dto.setHallName(hallMngDTO.getHallName());
return dto;
}
@Override
public SuccessResult save(HallWindowDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
hallWindowDao.save(params);
// 新增二维码表记录
String id = params.get("id").toString();
QRCodeMngDTO qrCodeMngDTO = new QRCodeMngDTO();
qrCodeMngDTO.setQrCodeType("af02c8ca-d122-4345-a271-e0dcb61c54c4");
qrCodeMngDTO.setHallWindowId(id);
qrCodeMngService.save(qrCodeMngDTO);
return new SuccessResult();
}
@Override
public SuccessResult update(HallWindowDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
hallWindowDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
hallWindowDao.remove(params);
}
}

View File

@ -0,0 +1,34 @@
package cn.com.tenlion.superviseqrcode.service.hallwindow;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.ZTreeDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IHallWindowService {
SuccessResultList<List<HallWindowDTO>> listPage(ListPage page);
List<HallWindowDTO> list(Map<String, Object> params);
SuccessResult save(HallWindowDTO dto);
HallWindowDTO get(Map<String, Object> params);
SuccessResult update(HallWindowDTO dto);
void remove(List<String> asList);
List<ZTreeDTO> listHallTree(Map<String, Object> params);
List<HallWindowDTO> listWindowByCase(Map<String, Object> params);
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.superviseqrcode.service.problemmng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IProblemMngService {
SuccessResultList<List<ProblemMngDTO>> listPage(ListPage page);
List<ProblemMngDTO> list(Map<String, Object> params);
SuccessResult save(ProblemMngDTO dto);
ProblemMngDTO get(Map<String, Object> params);
SuccessResult update(ProblemMngDTO dto);
void remove(List<String> asList);
}

View File

@ -0,0 +1,83 @@
package cn.com.tenlion.superviseqrcode.service.problemmng;
import cn.com.tenlion.superviseqrcode.dao.problemmng.IProblemMngDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class ProblemMngServiceImpl extends DefaultBaseService implements IProblemMngService {
@Autowired
private IProblemMngDao problemMngDao;
@Autowired
private IDataService dataService;
@Override
public SuccessResultList<List<ProblemMngDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ProblemMngDTO> problemList = list(page.getParams());
PageInfo<ProblemMngDTO> pageInfo = new PageInfo<>(problemList);
return new SuccessResultList<>(problemList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<ProblemMngDTO> list(Map<String, Object> params) {
List<ProblemMngDTO> list = problemMngDao.list(params);
for(ProblemMngDTO item : list){
params.clear();
DataDTO dataDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(dataDTO.getDataName());
}
return list;
}
@Override
public ProblemMngDTO get(Map<String, Object> params) {
ProblemMngDTO dto = problemMngDao.get(params);
DataDTO dataDTO = dataService.get(dto.getProblemType());
dto.setProblemTypeName(dataDTO.getDataName());
return dto;
}
@Override
public SuccessResult save(ProblemMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
problemMngDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(ProblemMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
problemMngDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
problemMngDao.remove(params);
}
}

View File

@ -0,0 +1,31 @@
package cn.com.tenlion.superviseqrcode.service.qrcodemng;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IQRCodeMngService {
SuccessResultList<List<QRCodeMngDTO>> listPage(ListPage page);
List<QRCodeMngDTO> list(Map<String, Object> params);
SuccessResult save(QRCodeMngDTO dto);
QRCodeMngDTO get(Map<String, Object> params);
SuccessResult update(QRCodeMngDTO dto);
void remove(List<String> asList);
QRCodeMngDTO getByQuery(Map<String, Object> params);
}

View File

@ -0,0 +1,157 @@
package cn.com.tenlion.superviseqrcode.service.qrcodemng;
import cn.com.tenlion.superviseqrcode.dao.qrcodemng.IQRCodeMngDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.website.IWebSiteMngService;
import cn.com.tenlion.superviseqrcode.systemproperties.LocalServerProperties;
import cn.com.tenlion.superviseqrcode.utils.QRCodeUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class QRCodeMngServiceImpl extends DefaultBaseService implements IQRCodeMngService {
@Autowired
private IQRCodeMngDao qrCodeMngDao;
@Autowired
private IDataService dataService;
@Autowired
private IWebSiteMngService webSiteMngService;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private LocalServerProperties serverProperties;
@Override
public SuccessResultList<List<QRCodeMngDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<QRCodeMngDTO> qrCodeList = list(page.getParams());
PageInfo<QRCodeMngDTO> pageInfo = new PageInfo<>(qrCodeList);
return new SuccessResultList<>(qrCodeList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<QRCodeMngDTO> list(Map<String, Object> params) {
Map<String, Object> query = new HashMap<>(8);
List<QRCodeMngDTO> list = qrCodeMngDao.list(params);
for(QRCodeMngDTO item : list){
DataDTO QrCodeTypeData = dataService.get(item.getQrCodeType());
item.setQrCodeTypeName(QrCodeTypeData.getDataName());
// 处理二维码
try {
String contentUri = serverProperties.getUrl() + "/qrscan/scan?";
contentUri += "id=" + item.getId();
String b64Path = QRCodeUtil.b64QRCode(contentUri, "", false, "");
item.setQrCodeAddr(b64Path);
} catch (Exception e) {
e.printStackTrace();
}
// 处理二维码内容
if("a1f3b7d7-7dea-4ff1-a1f0-a8d9d541d43a".equals(item.getQrCodeType())){
query.clear();
query.put("id", item.getWebSiteId());
WebSiteMngDTO webSiteMngDTO = webSiteMngService.get(query);
item.setQrCodeContent(" 平台名称: " + webSiteMngDTO.getWebSiteName() + ","
+ " 责任单位: " + webSiteMngDTO.getManageOrgName() + ","
+ " 平台地址: " + webSiteMngDTO.getWebSiteUrl());
}
if("239ffa31-3c86-418f-a6ac-0fd8d14f9b53".equals(item.getQrCodeType())){
query.clear();
query.put("id", item.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(query);
item.setQrCodeContent(" 大厅名称: " + hallMngDTO.getHallName() + ","
+ " 责任单位: " + hallMngDTO.getManageOrgName());
}
if("af02c8ca-d122-4345-a271-e0dcb61c54c4".equals(item.getQrCodeType())){
query.clear();
query.put("id", item.getHallWindowId());
HallWindowDTO hallWindowDTO = hallWindowService.get(query);
query.put("id", hallWindowDTO.getBelongHallId());
HallMngDTO hallMngDTO = hallMngService.get(query);
item.setQrCodeContent(" 大厅名称: " + hallMngDTO.getHallName() + ","
+ " 责任单位: " + hallMngDTO.getManageOrgName() + ","
+ " 窗口名称: " + hallWindowDTO.getWindowName() + hallWindowDTO.getWindowNum());
}
}
return list;
}
@Override
public QRCodeMngDTO get(Map<String, Object> params) {
QRCodeMngDTO dto = qrCodeMngDao.get(params);
// 处理二维码
try {
String contentUri = serverProperties.getUrl() + "/qrscan/scan?";
contentUri += "id=" + dto.getId();
String b64Path = QRCodeUtil.b64QRCode(contentUri, "", false, "");
dto.setQrCodeAddr(b64Path);
} catch (Exception e) {
e.printStackTrace();
}
return dto;
}
@Override
public QRCodeMngDTO getByQuery(Map<String, Object> params) {
QRCodeMngDTO dto = qrCodeMngDao.getByQuery(params);
// 处理二维码
try {
String contentUri = serverProperties.getUrl() + "/qrscan/scan?";
contentUri += "id=" + dto.getId();
String b64Path = QRCodeUtil.b64QRCode(contentUri, "", false, "");
dto.setQrCodeAddr(b64Path);
} catch (Exception e) {
e.printStackTrace();
}
return dto;
}
@Override
public SuccessResult save(QRCodeMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
qrCodeMngDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(QRCodeMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
qrCodeMngDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
qrCodeMngDao.remove(params);
}
}

View File

@ -0,0 +1,45 @@
package cn.com.tenlion.superviseqrcode.service.reportcase;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IReportCaseService {
SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page);
List<ReportCaseDTO> list(Map<String, Object> params);
SuccessResult save(ReportCaseDTO dto);
ReportCaseDTO get(Map<String, Object> params);
SuccessResult update(ReportCaseDTO dto);
void remove(List<String> asList);
SuccessResult saveFromQRCode(Map<String, Object> params);
SuccessResult saveReportCaseForward(Map<String, Object> params);
SuccessResult saveReportCaseAccept(Map<String, Object> params);
SuccessResult saveReportCaseReply(Map<String, Object> params);
SuccessResult saveReportCaseFinish(Map<String, Object> params);
SuccessResult saveReportCaseUnAccept(Map<String, Object> params);
SuccessResult saveReportCaseVisit(Map<String, Object> params);
SuccessResultList<List<ReportCaseDTO>> listPageUnAccept(ListPage page);
}

View File

@ -0,0 +1,409 @@
package cn.com.tenlion.superviseqrcode.service.reportcase;
import cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasefinish.IReportCaseFinishDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasepass.IReportCasePassDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasereply.IReportCaseReplyDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply.ReportCaseReplyDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.reportcaseforward.IReportCaseForwardService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class ReportCaseServiceImpl extends DefaultBaseService implements IReportCaseService {
@Autowired
private IReportCaseDao reportCaseDao;
@Autowired
private IDataService dataService;
@Autowired
private IProblemMngService problemMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IDepartmentService departmentService;
@Autowired
private IReportCaseForwardService forwardService;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private IReportCaseReplyDao reportCaseReplyDao;
@Autowired
private IReportCaseReplyDao replyDao;
@Autowired
private IReportCaseFinishDao finishDao;
@Autowired
private IReportCasePassDao passDao;
@Autowired
private IReportCaseLogDao logDao;
@Override
public SuccessResult saveReportCaseVisit(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
Map<String, Object> visitMap = new HashMap<>(8);
visitMap.put("caseCode", reportCaseDTO.getCaseCode());
visitMap.put("visitContent", params.get("visitContent") == null ? "" : params.get("visitContent").toString());
visitMap.put("visitTime", DateUtil.getTime());
setSaveInfo(visitMap);
reportCaseDao.saveVisit(visitMap);
DepartmentDTO accept = departmentService.get(reportCaseDTO.getAcceptOrgId());
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(accept.getDepartmentName() + " 进行了回访,回访内容:" + visitMap.get("visitContent").toString());
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseFinish(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
// 办结时需要修改原业务状态为已完成
// 修改原审核状态为已审核
reportCaseDTO.setPassType("1");
reportCaseDTO.setWorkFlowType("3");
Map<String, Object> reportCaseMap = HashMapUtil.beanToMap(reportCaseDTO);
reportCaseDao.update(reportCaseMap);
Map<String, Object> finishMap = new HashMap<>(8);
finishMap.put("caseCode", reportCaseDTO.getCaseCode());
finishMap.put("finishWay", params.get("finishWay") == null ? "" : params.get("finishWay").toString());
finishMap.put("finishTime", DateUtil.getTime());
setSaveInfo(finishMap);
// 先删再办结
finishDao.delete(finishMap);
finishDao.save(finishMap);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseReply(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
reportCaseDTO.setWorkFlowType("2");
Map<String, Object> reportCaseMap = HashMapUtil.beanToMap(reportCaseDTO);
reportCaseDao.update(reportCaseMap);
Map<String, Object> replyMap = new HashMap<>(8);
replyMap.put("caseCode",reportCaseDTO.getCaseCode());
replyMap.put("replyContent",params.get("replyContent") == null ? "" : params.get("replyContent").toString());
replyMap.put("replyFiles", params.get("replyFiles") == null ? "" : params.get("replyFiles").toString());
replyMap.put("replyTime", DateUtil.getTime());
setSaveInfo(replyMap);
// 回复前先删除原有回复
reportCaseReplyDao.delete(replyMap);
reportCaseReplyDao.save(replyMap);
Map<String, Object> passMap = new HashMap<>(8);
passMap.put("caseCode", reportCaseDTO.getCaseCode());
// 修改回复后需要将原所有审核节点删除
passDao.delete(passMap);
// 向审核表中添加审核节点
passMap.put("passCurrentOrg", reportCaseDTO.getAcceptOrgId());
passMap.put("passOver", "0");
passMap.put("passStep", "1");
passMap.put("passTime", DateUtil.getTime());
setSaveInfo(passMap);
passDao.save(passMap);
// 回复日志
DepartmentDTO accept = departmentService.get(reportCaseDTO.getAcceptOrgId());
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(accept.getDepartmentName() + " 进行回复,回复内容:" + replyMap.get("replyContent").toString());
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseAccept(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
reportCaseDTO.setWorkFlowType("1");
Map<String, Object> updateMap = HashMapUtil.beanToMap(reportCaseDTO);
reportCaseDao.update(updateMap);
// 保存受理日志
DepartmentDTO accept = departmentService.get(reportCaseDTO.getAcceptOrgId());
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(accept.getDepartmentName() + " 进行受理");
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseUnAccept(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
reportCaseDTO.setWorkFlowType("-1");
Map<String, Object> updateMap = HashMapUtil.beanToMap(reportCaseDTO);
reportCaseDao.update(updateMap);
DepartmentDTO accept = departmentService.get(reportCaseDTO.getAcceptOrgId());
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(accept.getDepartmentName() + " 不予受理");
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseForward(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseDao.get(params);
forwardService.saveReportCaseForward(reportCaseDTO);
// 物理删除
List<String> removeIds = new ArrayList<>();
removeIds.add(reportCaseDTO.getId() + "");
params.put("ids", removeIds);
reportCaseDao.delete(params);
// 存日志
DepartmentDTO acceptDept = departmentService.get(reportCaseDTO.getAcceptOrgId());
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(acceptDept.getDepartmentName() + " 申请业务转派,转派原因:" + params.get("forwardReason").toString());
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
List<DepartmentSimpleDTO> departments = userInfoBO.getDepartments();
log.setCreateOrgId(departments.size() > 0 ? departments.get(0).getDepartmentId() : "");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportCaseDTO> reportcaseList = list(page.getParams());
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(reportcaseList);
return new SuccessResultList<>(reportcaseList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public SuccessResultList<List<ReportCaseDTO>> listPageUnAccept(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportCaseDTO> reportcaseList = listUnAccept(page.getParams());
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(reportcaseList);
return new SuccessResultList<>(reportcaseList, pageInfo.getPageNum(), pageInfo.getTotal());
}
public List<ReportCaseDTO> listUnAccept(Map<String, Object> params) {
List<ReportCaseDTO> list = reportCaseDao.listUnAccept(params);
for(ReportCaseDTO item : list){
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", item.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
item.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(manageOrgDTO.getDepartmentName());
DepartmentDTO acceptOrgDTO = departmentService.get(item.getAcceptOrgId());
item.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
params.clear();
params.put("id", item.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
item.setCaseName(caseMngDTO.getCaseName());
}
return list;
}
@Override
public List<ReportCaseDTO> list(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if(!"1".equals(currentUser.getUserId())){
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments){
if("".equals(manageOrgIds)){
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("acceptOrgId", manageOrgIds);
}
List<ReportCaseDTO> list = reportCaseDao.list(params);
for(ReportCaseDTO item : list){
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", item.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
item.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(manageOrgDTO.getDepartmentName());
DepartmentDTO acceptOrgDTO = departmentService.get(item.getAcceptOrgId());
item.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
params.clear();
params.put("id", item.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
item.setCaseName(caseMngDTO.getCaseName());
// 回访情况
params.clear();
params.put("caseCode", item.getCaseCode());
Map<String, Object> visit = reportCaseDao.getVisit(params);
if(visit != null){
item.setVisitContent(visit.get("visit_content") == null ? "" : visit.get("visit_content").toString());
item.setVisitTime(visit.get("visit_time") == null ? "" : visit.get("visit_time").toString());
}
}
return list;
}
@Override
public ReportCaseDTO get(Map<String, Object> params) {
ReportCaseDTO dto = reportCaseDao.get(params);
// 举报事项
params.clear();
params.put("id", dto.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
dto.setCaseName(caseMngDTO.getCaseName());
// 问题类别
params.clear();
params.put("id", dto.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
dto.setProblemName(problemMngDTO.getProblemName());
// 大厅
params.clear();
params.put("id", dto.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
dto.setHallName(hallMngDTO.getHallName());
// 窗口
params.clear();
params.put("id", dto.getHallWindowId());
HallWindowDTO hallWindowDTO = hallWindowService.get(params);
dto.setHallWindowName(hallWindowDTO.getWindowName() + "-" + hallWindowDTO.getWindowNum());
// 主体单位
DepartmentDTO manageOrgDTO = departmentService.get(dto.getManageOrgId());
dto.setManageOrgName(manageOrgDTO.getDepartmentName());
// 受理单位
DepartmentDTO acceptOrgDTO = departmentService.get(dto.getAcceptOrgId());
dto.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
// 回复情况
params.clear();
params.put("caseCode", dto.getCaseCode());
ReportCaseReplyDTO reportCaseReplyDTO = replyDao.get(params);
if(reportCaseReplyDTO != null){
dto.setReplyContent(reportCaseReplyDTO.getReplyContent());
dto.setReplyTime(reportCaseReplyDTO.getReplyTime());
}
// 回访情况
Map<String, Object> visit = reportCaseDao.getVisit(params);
if(visit != null){
dto.setVisitContent(visit.get("visit_content") == null ? "" : visit.get("visit_content").toString());
dto.setVisitTime(visit.get("visit_time") == null ? "" : visit.get("visit_time").toString());
}
return dto;
}
@Override
public SuccessResult save(ReportCaseDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
reportCaseDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult saveFromQRCode(Map<String, Object> params) {
Map<String, Object> query = new HashMap<>();
ReportCaseDTO dto = new ReportCaseDTO();
String currentTimeMillis = System.currentTimeMillis() + "";
currentTimeMillis = currentTimeMillis.substring(4);
String caseCode = "MSJD" + DateUtil.getDays() + currentTimeMillis;
dto.setCaseCode(caseCode);
dto.setTitle(params.get("title") == null ? "" : params.get("title").toString());
dto.setReportContent(params.get("reportContent") == null ? "" : params.get("reportContent").toString());
query.put("id", params.get("problemId").toString());
ProblemMngDTO problemMngDTO = problemMngService.get(query);
dto.setProblemType(problemMngDTO.getProblemType());
dto.setProblemId(params.get("problemId") == null ? "" : params.get("problemId").toString());
dto.setReportSource(params.get("reportSource") == null ? "" : params.get("reportSource").toString());
dto.setCaseId(params.get("caseId") == null ? "" : params.get("caseId").toString());
dto.setHallId(params.get("hallId") == null ? "" : params.get("hallId").toString());
dto.setHallWindowId(params.get("hallWindowId") == null ? "" : params.get("hallWindowId").toString());
query.clear();
query.put("id", dto.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(query);
dto.setManageOrgId(caseMngDTO.getManageOrgId());
dto.setAcceptOrgId(caseMngDTO.getManageOrgId());
dto.setBeReportedUser(params.get("beReportedUser") == null ? "" : params.get("beReportedUser").toString());
dto.setReportTime(DateUtil.getTime());
dto.setReportUserName(params.get("reportUserName") == null ? "" : params.get("reportUserName").toString());
dto.setReportUserPhone(params.get("reportUserPhone") == null ? "" : params.get("reportUserPhone").toString());
dto.setReportFile("");
dto.setWorkFlowType("0");
dto.setPassType("0");
Map<String, Object> saveMap = HashMapUtil.beanToMap(dto);
reportCaseDao.save(saveMap);
return new SuccessResult();
}
@Override
public SuccessResult update(ReportCaseDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
reportCaseDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
reportCaseDao.remove(params);
}
}

View File

@ -0,0 +1,34 @@
package cn.com.tenlion.superviseqrcode.service.reportcaseforward;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IReportCaseForwardService {
SuccessResultList<List<ReportCaseForwardDTO>> listPage(ListPage page);
List<ReportCaseForwardDTO> list(Map<String, Object> params);
SuccessResult save(ReportCaseForwardDTO dto);
ReportCaseForwardDTO get(Map<String, Object> params);
SuccessResult update(ReportCaseForwardDTO dto);
void remove(List<String> asList);
SuccessResult saveReportCaseForward(ReportCaseDTO reportCaseDTO);
SuccessResult saveReportCaseReForward(Map<String, Object> params);
}

View File

@ -0,0 +1,189 @@
package cn.com.tenlion.superviseqrcode.service.reportcaseforward;
import cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaseforward.IReportCaseForwardDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class ReportCaseForwardServiceImpl extends DefaultBaseService implements IReportCaseForwardService {
@Autowired
private IReportCaseForwardDao reportCaseForwardDao;
@Autowired
private IDataService dataService;
@Autowired
private IProblemMngService problemMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IDepartmentService departmentService;
@Autowired
private IReportCaseService reportCaseService;
@Autowired
private IReportCaseDao reportCaseDao;
@Autowired
private IReportCaseLogDao logDao;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Override
public SuccessResult saveReportCaseReForward(Map<String, Object> params) {
ReportCaseForwardDTO reportCaseForwardDTO = reportCaseForwardDao.get(params);
// 重新分配受理单位
reportCaseForwardDTO.setAcceptOrgId(params.get("acceptOrgId") == null ? "" : params.get("acceptOrgId").toString());
Map<String, Object> saveMap = HashMapUtil.beanToMap(reportCaseForwardDTO);
saveMap.put("workFlowType", "0");
reportCaseDao.save(saveMap);
// 重新分配完成后删除数据
List<Integer> ids = new ArrayList<>();
ids.add(reportCaseForwardDTO.getId());
params.put("ids", ids);
reportCaseForwardDao.remove(params);
// 保存分派日志
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseForwardDTO.getCaseCode());
DepartmentDTO accept = departmentService.get(reportCaseForwardDTO.getAcceptOrgId());
log.setLogContent("重新分派至" + accept.getDepartmentName() + "进行处理,分派说明:" + params.get("content").toString());
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<ReportCaseForwardDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportCaseForwardDTO> reportCaseForwardList = list(page.getParams());
PageInfo<ReportCaseForwardDTO> pageInfo = new PageInfo<>(reportCaseForwardList);
return new SuccessResultList<>(reportCaseForwardList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<ReportCaseForwardDTO> list(Map<String, Object> params) {
List<ReportCaseForwardDTO> list = reportCaseForwardDao.list(params);
for(ReportCaseForwardDTO item : list){
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", item.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
item.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(manageOrgDTO.getDepartmentName());
if(item.getAcceptOrgId() != null || !"".equals(item.getAcceptOrgId())){
DepartmentDTO acceptOrgDTO = departmentService.get(item.getAcceptOrgId());
item.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
}
params.clear();
params.put("id", item.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
item.setCaseName(caseMngDTO.getCaseName());
}
return list;
}
@Override
public ReportCaseForwardDTO get(Map<String, Object> params) {
ReportCaseForwardDTO dto = reportCaseForwardDao.get(params);
// 大厅
params.clear();
params.put("id", dto.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
dto.setHallName(hallMngDTO.getHallName());
// 窗口
params.clear();
params.put("id", dto.getHallWindowId());
HallWindowDTO hallWindowDTO = hallWindowService.get(params);
dto.setHallWindowName(hallWindowDTO.getWindowName() + "-" + hallWindowDTO.getWindowNum());
DataDTO problemTypeDTO = dataService.get(dto.getProblemType());
dto.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", dto.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
dto.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(dto.getManageOrgId());
dto.setManageOrgName(manageOrgDTO.getDepartmentName());
if(dto.getAcceptOrgId() != null || !"".equals(dto.getAcceptOrgId())){
DepartmentDTO acceptOrgDTO = departmentService.get(dto.getAcceptOrgId());
dto.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
}
params.clear();
params.put("id", dto.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
dto.setCaseName(caseMngDTO.getCaseName());
return dto;
}
@Override
public SuccessResult save(ReportCaseForwardDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
reportCaseForwardDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult saveReportCaseForward(ReportCaseDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
reportCaseForwardDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(ReportCaseForwardDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
reportCaseForwardDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
reportCaseForwardDao.remove(params);
}
}

View File

@ -0,0 +1,25 @@
package cn.com.tenlion.superviseqrcode.service.reportcasepass;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IReportCasePassService {
SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page);
List<ReportCaseDTO> list(Map<String, Object> params);
SuccessResult saveReportCasePass(Map<String, Object> params);
Map<String, Object> getNextDept(Map<String, Object> params);
}

View File

@ -0,0 +1,213 @@
package cn.com.tenlion.superviseqrcode.service.reportcasepass;
import cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaseforward.IReportCaseForwardDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasepass.IReportCasePassDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasereply.IReportCaseReplyDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasepass.ReportCasePassDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply.ReportCaseReplyDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import cn.com.tenlion.superviseqrcode.service.reportcaseforward.IReportCaseForwardService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class ReportCasePassServiceImpl extends DefaultBaseService implements IReportCasePassService {
@Autowired
private IReportCasePassDao reportCasePassDao;
@Autowired
private IDataService dataService;
@Autowired
private IProblemMngService problemMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IDepartmentService departmentService;
@Autowired
private IReportCaseService reportCaseService;
@Autowired
private IReportCaseLogDao logDao;
@Override
public SuccessResult saveReportCasePass(Map<String, Object> params) {
Map<String, Object> passMap = new HashMap<>(8);
ReportCaseLogDTO log = new ReportCaseLogDTO();
UserInfoBO userInfoBO = null;
Map<String, Object> logMap = new HashMap<>();
passMap.put("id", params.get("id").toString());
ReportCaseDTO reportCaseDTO = reportCaseService.get(passMap);
int passCode = Integer.parseInt(params.get("passCode").toString());
switch (passCode) {
case 0:
// 继续审核
passMap.put("caseCode", reportCaseDTO.getCaseCode());
Map<String, Object> maxStep = reportCasePassDao.getMaxStep(passMap);
passMap.put("departmentId", maxStep.get("pass_current_org").toString());
Map<String, Object> deptMap = reportCasePassDao.getParentDept(passMap);
if (deptMap == null
|| deptMap.get("department_parent_id") == null
|| "0".equals(deptMap.get("department_parent_id").toString())) {
break;
}
passMap.put("passCurrentOrg", deptMap.get("department_parent_id").toString());
passMap.put("passOver", "0");
passMap.put("passStep", Integer.parseInt(maxStep.get("pass_step").toString()) + 1);
passMap.put("passTime", DateUtil.getTime());
passMap.put("creator", "1");
reportCasePassDao.save(passMap);
// 添加日志
passMap.put("departmentId", deptMap.get("department_parent_id").toString());
Map<String, Object> parentDeptMap = reportCasePassDao.getParentDept(passMap);
log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(deptMap.get("department_name").toString() +
" 递交至 " +
parentDeptMap.get("department_name").toString() +
"继续审核");
userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
break;
case 1:
// 审核完毕
// 将所有审核节点更新为审核完成
passMap.put("caseCode", reportCaseDTO.getCaseCode());
passMap.put("passOver", "1");
reportCasePassDao.update(passMap);
// 将流程修改为审核完毕
reportCaseDTO.setWorkFlowType("3");
reportCaseService.update(reportCaseDTO);
// 添加日志
Map<String, Object> nowStep = reportCasePassDao.getMaxStep(passMap);
passMap.put("departmentId", nowStep.get("pass_current_org").toString());
Map<String, Object> nowStepDept = reportCasePassDao.getParentDept(passMap);
log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(nowStepDept.get("department_name").toString() + " 审核通过");
userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
break;
case -1:
// 驳回
// 删除所有审核节点
Map<String, Object> backStep = reportCasePassDao.getMaxStep(passMap);
passMap.put("caseCode", reportCaseDTO.getCaseCode());
reportCasePassDao.delete(passMap);
// 将流程更改为审核驳回状态
reportCaseDTO.setWorkFlowType("-2");
reportCaseService.update(reportCaseDTO);
passMap.put("departmentId", backStep.get("pass_current_org").toString());
Map<String, Object> backStepDept = reportCasePassDao.getParentDept(passMap);
log = new ReportCaseLogDTO();
log.setCaseCode(reportCaseDTO.getCaseCode());
log.setLogContent(backStepDept.get("department_name").toString() + " 驳回了回复的内容,重新回复后将继续审核");
userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
break;
default:
break;
}
return new SuccessResult();
}
@Override
public Map<String, Object> getNextDept(Map<String, Object> params) {
ReportCaseDTO reportCaseDTO = reportCaseService.get(params);
params.clear();
params.put("caseCode", reportCaseDTO.getCaseCode());
Map<String, Object> maxStep = reportCasePassDao.getMaxStep(params);
params.put("departmentId", maxStep.get("pass_current_org").toString());
Map<String, Object> deptMap = reportCasePassDao.getParentDept(params);
if (deptMap != null
&& deptMap.get("department_parent_id") != null
&& !"0".equals(deptMap.get("department_parent_id").toString())) {
params.clear();
params.put("hasNextDept", "1");
}
return params;
}
@Override
public SuccessResultList<List<ReportCaseDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportCaseDTO> reportCaseList = list(page.getParams());
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(reportCaseList);
return new SuccessResultList<>(reportCaseList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<ReportCaseDTO> list(Map<String, Object> params) {
// 只查询已回复但未审核完成的记录
params.put("workFlowType", "2");
params.put("passType", "0");
List<ReportCaseDTO> list = reportCaseService.list(params);
for (ReportCaseDTO item : list) {
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", item.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
item.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(manageOrgDTO.getDepartmentName());
if (item.getAcceptOrgId() != null || !"".equals(item.getAcceptOrgId())) {
DepartmentDTO acceptOrgDTO = departmentService.get(item.getAcceptOrgId());
item.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
}
params.clear();
params.put("id", item.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
item.setCaseName(caseMngDTO.getCaseName());
// 查询当前审核部门节点
params.clear();
params.put("caseCode", item.getCaseCode());
Map<String, Object> currentStep = reportCasePassDao.getMaxStep(params);
params.put("departmentId", currentStep.get("pass_current_org").toString());
Map<String, Object> currentStepDept = reportCasePassDao.getParentDept(params);
item.setCurrentPassDeptName(currentStepDept.get("department_name").toString());
}
return list;
}
}

View File

@ -0,0 +1,31 @@
package cn.com.tenlion.superviseqrcode.service.reportletterroom;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm.ReportLetterRoomDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IReportLetterRoomService {
SuccessResultList<List<ReportLetterRoomDTO>> listPage(ListPage page);
List<ReportLetterRoomDTO> list(Map<String, Object> params);
SuccessResult save(ReportLetterRoomDTO dto);
ReportLetterRoomDTO get(Map<String, Object> params);
SuccessResult update(ReportLetterRoomDTO dto);
void remove(List<String> asList);
SuccessResult saveFromForWard(Map<String, Object> params);
}

View File

@ -0,0 +1,201 @@
package cn.com.tenlion.superviseqrcode.service.reportletterroom;
import cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasefinish.IReportCaseFinishDao;
import cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasepass.IReportCasePassDao;
import cn.com.tenlion.superviseqrcode.dao.reportcasereply.IReportCaseReplyDao;
import cn.com.tenlion.superviseqrcode.dao.reportletterromm.IReportLetterRoomDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply.ReportCaseReplyDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm.ReportLetterRoomDTO;
import cn.com.tenlion.superviseqrcode.service.casemng.ICaseMngService;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.hallwindow.IHallWindowService;
import cn.com.tenlion.superviseqrcode.service.problemmng.IProblemMngService;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import cn.com.tenlion.superviseqrcode.service.reportcaseforward.IReportCaseForwardService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class ReportLetterRoomServiceImpl extends DefaultBaseService implements IReportLetterRoomService {
@Autowired
private IReportLetterRoomDao letterRoomDao;
@Autowired
private IDataService dataService;
@Autowired
private IProblemMngService problemMngService;
@Autowired
private ICaseMngService caseMngService;
@Autowired
private IDepartmentService departmentService;
@Autowired
private IHallMngService hallMngService;
@Autowired
private IHallWindowService hallWindowService;
@Autowired
private IReportCaseForwardService forwardService;
@Autowired
private IReportCaseLogDao logDao;
@Override
public SuccessResult saveFromForWard(Map<String, Object> params) {
ReportCaseForwardDTO forwardDTO = forwardService.get(params);
ReportLetterRoomDTO dto = new ReportLetterRoomDTO();
dto.setCaseCode(forwardDTO.getCaseCode());
dto.setTitle(forwardDTO.getTitle());
dto.setReportContent(forwardDTO.getReportContent());
dto.setProblemType(forwardDTO.getProblemType());
dto.setProblemId(forwardDTO.getProblemId());
dto.setReportSource(forwardDTO.getReportSource());
dto.setCaseId(forwardDTO.getCaseId());
dto.setHallId(forwardDTO.getHallId());
dto.setHallWindowId(forwardDTO.getHallWindowId());
dto.setManageOrgId(forwardDTO.getManageOrgId());
dto.setAcceptOrgId(forwardDTO.getAcceptOrgId());
dto.setBeReportedUser(forwardDTO.getBeReportedUser());
dto.setReportTime(forwardDTO.getReportTime());
dto.setReportUserName(forwardDTO.getReportUserName());
dto.setReportUserPhone(forwardDTO.getReportUserPhone());
dto.setReportFile(forwardDTO.getReportFile());
dto.setWorkFlowType("0");
dto.setPassType("0");
Map<String, Object> saveMap = HashMapUtil.beanToMap(dto);
letterRoomDao.save(saveMap);
// 保存成功后删除转派申请
List<String> ids = new ArrayList<>();
ids.add(forwardDTO.getId() + "");
forwardService.remove(ids);
// 保存日志
ReportCaseLogDTO log = new ReportCaseLogDTO();
log.setCaseCode(dto.getCaseCode());
log.setLogContent("移交至信访室");
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
log.setCreator(userInfoBO.getUserId());
log.setCreateOrgId("");
log.setGmtCreate(DateUtil.getTime());
Map<String, Object> logMap = HashMapUtil.beanToMap(log);
logDao.save(logMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<ReportLetterRoomDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportLetterRoomDTO> list = list(page.getParams());
PageInfo<ReportLetterRoomDTO> pageInfo = new PageInfo<>(list);
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<ReportLetterRoomDTO> list(Map<String, Object> params) {
List<ReportLetterRoomDTO> list = letterRoomDao.list(params);
for(ReportLetterRoomDTO item : list){
DataDTO problemTypeDTO = dataService.get(item.getProblemType());
item.setProblemTypeName(problemTypeDTO.getDataName());
params.clear();
params.put("id", item.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
item.setProblemName(problemMngDTO.getProblemName());
DepartmentDTO manageOrgDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(manageOrgDTO.getDepartmentName());
DepartmentDTO acceptOrgDTO = departmentService.get(item.getAcceptOrgId());
item.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
params.clear();
params.put("id", item.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
item.setCaseName(caseMngDTO.getCaseName());
}
return list;
}
@Override
public ReportLetterRoomDTO get(Map<String, Object> params) {
ReportLetterRoomDTO dto = letterRoomDao.get(params);
// 举报事项
params.clear();
params.put("id", dto.getCaseId());
CaseMngDTO caseMngDTO = caseMngService.get(params);
dto.setCaseName(caseMngDTO.getCaseName());
// 问题类别
params.clear();
params.put("id", dto.getProblemId());
ProblemMngDTO problemMngDTO = problemMngService.get(params);
dto.setProblemName(problemMngDTO.getProblemName());
// 大厅
if(dto.getHallId() !=null){
params.clear();
params.put("id", dto.getHallId());
HallMngDTO hallMngDTO = hallMngService.get(params);
dto.setHallName(hallMngDTO.getHallName());
}
// 窗口
params.clear();
params.put("id", dto.getHallWindowId());
HallWindowDTO hallWindowDTO = hallWindowService.get(params);
dto.setHallWindowName(hallWindowDTO.getWindowName() + "-" + hallWindowDTO.getWindowNum());
// 主体单位
DepartmentDTO manageOrgDTO = departmentService.get(dto.getManageOrgId());
dto.setManageOrgName(manageOrgDTO.getDepartmentName());
// 受理单位
DepartmentDTO acceptOrgDTO = departmentService.get(dto.getAcceptOrgId());
dto.setAcceptOrgName(acceptOrgDTO.getDepartmentName());
return dto;
}
@Override
public SuccessResult save(ReportLetterRoomDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
letterRoomDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(ReportLetterRoomDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
letterRoomDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
letterRoomDao.remove(params);
}
}

View File

@ -0,0 +1,37 @@
package cn.com.tenlion.superviseqrcode.service.supervise;
import cn.com.tenlion.superviseqrcode.pojo.dtos.supervise.SuperviseDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface ISuperviseService {
SuccessResultList<List<SuperviseDTO>> listPage(ListPage page);
List<SuperviseDTO> list(Map<String, Object> params);
SuccessResult save(SuperviseDTO dto);
SuperviseDTO get(Map<String, Object> params);
SuccessResult update(SuperviseDTO dto);
void remove(List<String> asList);
SuccessResult saveSuperviseReply(Map<String, Object> params);
SuccessResult updateSupervisePass(Map<String, Object> params);
SuccessResult updateSuperviseTips(Map<String, Object> params);
List<Map<String, Object>> getSuperviseTips(Map<String, Object> params);
}

View File

@ -0,0 +1,197 @@
package cn.com.tenlion.superviseqrcode.service.supervise;
import cn.com.tenlion.superviseqrcode.dao.hallmng.IHallMngDao;
import cn.com.tenlion.superviseqrcode.dao.supervise.ISuperviseDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.supervise.SuperviseDTO;
import cn.com.tenlion.superviseqrcode.service.hallmng.IHallMngService;
import cn.com.tenlion.superviseqrcode.service.reportcase.IReportCaseService;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import jdk.nashorn.internal.scripts.JS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class SuperviseServiceImpl extends DefaultBaseService implements ISuperviseService {
@Autowired
private ISuperviseDao superviseDao;
@Autowired
private IReportCaseService reportCaseService;
@Autowired
private IDataService dataService;
@Autowired
private IDepartmentService departmentService;
@Override
public List<Map<String, Object>> getSuperviseTips(Map<String, Object> params) {
return superviseDao.getSuperviseTips(params);
}
@Override
public SuccessResult updateSuperviseTips(Map<String, Object> params) {
Map<String, Object> query = new HashMap<>(8);
JSONArray array = (JSONArray) params.get("wangEditorObj");
for (int i = 0; i < array.size(); i++) {
JSONObject obj = array.getJSONObject(i);
String id = obj.getString("id");
query.put("tipsId", id);
List<Map<String, Object>> superviseTips = superviseDao.getSuperviseTips(query);
if (superviseTips == null && superviseTips.size() == 0) {
query.put("content", obj.getString("content"));
superviseDao.saveSuperviseTips(query);
continue;
} else {
query.put("content", obj.getString("content"));
superviseDao.updateSuperviseTips(query);
continue;
}
}
return new SuccessResult();
}
@Override
public SuccessResult updateSupervisePass(Map<String, Object> params) {
String replyType = params.get("replyType").toString();
Map<String, Object> saveMap = new HashMap<>(8);
if ("-1".equals(replyType)) {
saveMap.put("id", params.get("id").toString());
saveMap.put("replyType", params.get("replyType").toString());
superviseDao.update(saveMap);
}
if ("2".equals(replyType)) {
saveMap.put("id", params.get("id").toString());
saveMap.put("replyType", params.get("replyType").toString());
superviseDao.update(saveMap);
}
return new SuccessResult();
}
@Override
public SuccessResult saveSuperviseReply(Map<String, Object> params) {
SuperviseDTO superviseDTO = superviseDao.get(params);
params.put("caseCode", superviseDTO.getCaseCode());
superviseDao.deleteReply(params);
Map<String, Object> saveMap = new HashMap<>(8);
saveMap.put("caseCode", superviseDTO.getCaseCode());
saveMap.put("replyContent", params.get("replyContent") == null ? "" : params.get("replyContent").toString());
saveMap.put("replyFiles", params.get("replyFiles") == null ? "" : params.get("replyFiles").toString());
saveMap.put("replyTime", DateUtil.getTime());
setSaveInfo(saveMap);
superviseDao.saveSuperviseReply(saveMap);
// 回复完成后修改整改状态
superviseDTO.setReplyType("1");
saveMap.clear();
saveMap = HashMapUtil.beanToMap(superviseDTO);
superviseDao.update(saveMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<SuperviseDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<SuperviseDTO> hallList = list(page.getParams());
PageInfo<SuperviseDTO> pageInfo = new PageInfo<>(hallList);
return new SuccessResultList<>(hallList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<SuperviseDTO> list(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if (!"1".equals(currentUser.getUserId())) {
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments) {
if ("".equals(manageOrgIds)) {
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("handleOrgId", manageOrgIds);
}
List<SuperviseDTO> list = superviseDao.list(params);
for (SuperviseDTO item : list) {
// 整改类型
DataDTO superviseType = dataService.get(item.getSuperviseType());
item.setSuperviseTypeName(superviseType.getDataName());
// 执行单位
DepartmentDTO handleOrg = departmentService.get(item.getHandleOrgId());
item.setHandleOrgName(handleOrg.getDepartmentName());
}
return list;
}
@Override
public SuperviseDTO get(Map<String, Object> params) {
SuperviseDTO dto = superviseDao.get(params);
// 整改类型
DataDTO superviseType = dataService.get(dto.getSuperviseType());
dto.setSuperviseTypeName(superviseType.getDataName());
// 执行单位
DepartmentDTO handleOrg = departmentService.get(dto.getHandleOrgId());
dto.setHandleOrgName(handleOrg.getDepartmentName());
// 回复情况
params.clear();
params.put("caseCode", dto.getCaseCode());
Map<String, Object> superviseReply = superviseDao.getSuperviseReply(params);
if (superviseReply != null) {
dto.setReplyContent(superviseReply.get("reply_content") == null ? "" : superviseReply.get("reply_content").toString());
dto.setReplyFiles(superviseReply.get("reply_files") == null ? "" : superviseReply.get("reply_files").toString());
dto.setReplyTime(superviseReply.get("reply_time") == null ? "" : superviseReply.get("reply_time").toString());
}
return dto;
}
@Override
public SuccessResult save(SuperviseDTO dto) {
dto.setCaseCode(dto.getCaseCode());
dto.setCreateTime(DateUtil.getTime());
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
superviseDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(SuperviseDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
superviseDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
superviseDao.remove(params);
}
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.superviseqrcode.service.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IWebSiteMngService {
SuccessResultList<List<WebSiteMngDTO>> listPage(ListPage page);
List<WebSiteMngDTO> list(Map<String, Object> params);
SuccessResult save(WebSiteMngDTO webSiteMngDto);
WebSiteMngDTO get(Map<String, Object> params);
SuccessResult update(WebSiteMngDTO webSiteMngDto);
void remove(List<String> asList);
}

View File

@ -0,0 +1,31 @@
package cn.com.tenlion.superviseqrcode.service.website;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
public interface IWebSiteReplyService {
SuccessResultList<List<WebSiteReplyDTO>> listPage(ListPage page);
List<WebSiteReplyDTO> list(Map<String, Object> params);
SuccessResult save(WebSiteReplyDTO dto);
WebSiteReplyDTO get(Map<String, Object> params);
SuccessResult update(WebSiteReplyDTO dto);
void remove(List<String> asList);
SuccessResult saveFromQRCode(Map<String, Object> params);
}

View File

@ -0,0 +1,111 @@
package cn.com.tenlion.superviseqrcode.service.website;
import cn.com.tenlion.superviseqrcode.dao.website.IWebSiteMngDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import cn.com.tenlion.superviseqrcode.service.qrcodemng.IQRCodeMngService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.util.map.HashMapUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class WebSiteMngServiceImpl extends DefaultBaseService implements IWebSiteMngService {
@Autowired
private IWebSiteMngDao webSiteMngDao;
@Autowired
private IDepartmentService departmentService;
@Autowired
private IQRCodeMngService qrCodeMngService;
@Override
public SuccessResultList<List<WebSiteMngDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<WebSiteMngDTO> webSiteMngList = list(page.getParams());
PageInfo<WebSiteMngDTO> pageInfo = new PageInfo<>(webSiteMngList);
return new SuccessResultList<>(webSiteMngList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<WebSiteMngDTO> list(Map<String, Object> params) {
// 数据权限处理
UserInfoBO currentUser = securityComponent.getCurrentUser();
if(!"1".equals(currentUser.getUserId())){
List<DepartmentSimpleDTO> departments = currentUser.getDepartments();
String manageOrgIds = "";
for (DepartmentSimpleDTO item : departments){
if("".equals(manageOrgIds)){
manageOrgIds += item.getDepartmentId();
} else {
manageOrgIds += "," + item.getDepartmentId();
}
}
params.put("manageOrgId", manageOrgIds);
}
List<WebSiteMngDTO> list = webSiteMngDao.list(params);
for(WebSiteMngDTO item : list){
DepartmentDTO departmentDTO = departmentService.get(item.getManageOrgId());
item.setManageOrgName(departmentDTO.getDepartmentName());
}
return list;
}
@Override
public WebSiteMngDTO get(Map<String, Object> params) {
WebSiteMngDTO dto = webSiteMngDao.get(params);
DepartmentDTO departmentDTO = departmentService.get(dto.getManageOrgId());
dto.setManageOrgName(departmentDTO.getDepartmentName());
return dto;
}
@Override
public SuccessResult save(WebSiteMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
webSiteMngDao.save(params);
// 新增二维码表记录
String id = params.get("id").toString();
QRCodeMngDTO qrCodeMngDTO = new QRCodeMngDTO();
qrCodeMngDTO.setQrCodeType("a1f3b7d7-7dea-4ff1-a1f0-a8d9d541d43a");
qrCodeMngDTO.setWebSiteId(id);
qrCodeMngService.save(qrCodeMngDTO);
return new SuccessResult();
}
@Override
public SuccessResult update(WebSiteMngDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
webSiteMngDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
webSiteMngDao.remove(params);
}
}

View File

@ -0,0 +1,110 @@
package cn.com.tenlion.superviseqrcode.service.website;
import cn.com.tenlion.superviseqrcode.dao.website.IWebSiteMngDao;
import cn.com.tenlion.superviseqrcode.dao.website.IWebSiteReplyDao;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO;
import cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.UUIDUtil;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-04-28 16:17
* @description
*/
@Service
public class WebSiteReplyServiceImpl extends DefaultBaseService implements IWebSiteReplyService {
@Autowired
private IWebSiteReplyDao webSiteReplyDao;
@Autowired
private IWebSiteMngService webSiteMngService;
@Override
public SuccessResult saveFromQRCode(Map<String, Object> params) {
WebSiteReplyDTO dto = new WebSiteReplyDTO();
dto.setWebSiteId(params.get("webSiteId").toString());
String currentTimeMillis = System.currentTimeMillis() + "";
currentTimeMillis = currentTimeMillis.substring(4);
String matterCode = "MSJD" + DateUtil.getDays() + currentTimeMillis;
dto.setMatterCode(matterCode);
dto.setPhoneNumber(params.get("phoneNumber").toString());
dto.setOpinionContent(params.get("opinionContent").toString());
dto.setCreatorName(params.get("creatorName").toString());
dto.setGmtCreate(DateUtil.getTime());
dto.setReplyType("0");
Map<String, Object> saveMap = HashMapUtil.beanToMap(dto);
webSiteReplyDao.save(saveMap);
return new SuccessResult();
}
@Override
public SuccessResultList<List<WebSiteReplyDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<WebSiteReplyDTO> webSiteReplyList = list(page.getParams());
PageInfo<WebSiteReplyDTO> pageInfo = new PageInfo<>(webSiteReplyList);
return new SuccessResultList<>(webSiteReplyList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<WebSiteReplyDTO> list(Map<String, Object> params) {
List<WebSiteReplyDTO> list = webSiteReplyDao.list(params);
for(WebSiteReplyDTO item : list){
params.clear();
params.put("id", item.getWebSiteId());
WebSiteMngDTO webSiteMngDTO = webSiteMngService.get(params);
item.setWebSiteName(webSiteMngDTO.getWebSiteName());
item.setManageOrgId(webSiteMngDTO.getManageOrgId());
item.setManageOrgName(webSiteMngDTO.getManageOrgName());
}
return list;
}
@Override
public WebSiteReplyDTO get(Map<String, Object> params) {
WebSiteReplyDTO dto = webSiteReplyDao.get(params);
params.clear();
params.put("id", dto.getWebSiteId());
WebSiteMngDTO webSiteMngDTO = webSiteMngService.get(params);
dto.setWebSiteName(webSiteMngDTO.getWebSiteName());
dto.setManageOrgId(webSiteMngDTO.getManageOrgId());
dto.setWebSiteName(webSiteMngDTO.getManageOrgName());
return dto;
}
@Override
public SuccessResult save(WebSiteReplyDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setSaveInfo(params);
webSiteReplyDao.save(params);
return new SuccessResult();
}
@Override
public SuccessResult update(WebSiteReplyDTO dto) {
Map<String, Object> params = HashMapUtil.beanToMap(dto);
setUpdateInfo(params);
webSiteReplyDao.update(params);
return new SuccessResult();
}
@Override
public void remove(List<String> idsList) {
Map<String, Object> params = getHashMap(2);
params.put("ids", idsList);
setUpdateInfo(params);
webSiteReplyDao.remove(params);
}
}

View File

@ -0,0 +1,18 @@
package cn.com.tenlion.superviseqrcode.systemproperties;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* @author xwangs
* @create 2022-05-16 16:33
* @description
*/
@Data
@Component
public class LocalServerProperties {
@Value("${server.url}")
private String url;
}

View File

@ -0,0 +1,145 @@
package cn.com.tenlion.superviseqrcode.utils;
import com.github.pagehelper.util.StringUtil;
import ink.wgink.exceptions.SaveException;
import ink.wgink.properties.FileProperties;
import ink.wgink.util.UUIDUtil;
import ink.wgink.util.date.DateUtil;
import net.coobird.thumbnailator.Thumbnails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import sun.misc.BASE64Decoder;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import org.apache.commons.codec.binary.*;
@Component
public class ImageUtils {
@Autowired
private FileProperties fileProperties;
public String ThumbnailsFile(File sourceFile) throws Exception {
if (sourceFile == null) {
throw new SaveException("图片不能为空");
}
String fileName = UUIDUtil.get32UUID() + ".jpg";
String baseUploadPath = fileProperties.getUploadPath();
if (StringUtil.isEmpty(baseUploadPath)) {
throw new SaveException("上传路径未配置");
}
StringBuilder filePath = new StringBuilder();
if (!baseUploadPath.endsWith(File.separator)) {
filePath.append(baseUploadPath).append(File.separator);
} else {
filePath.append(baseUploadPath);
}
filePath.append("images");
String days = DateUtil.getDays();
filePath.append(File.separator).append(days).append(File.separator);
File file = new File(filePath.toString());
if (!file.exists()) {
file.mkdirs();
}
String fileFilePath = filePath.toString() + fileName;
try {
Thumbnails.of(new File[]{sourceFile}).scale(0.5).outputQuality(0.2).toFile(fileFilePath);
} catch (IOException e) {
e.printStackTrace();
}
// 将文件转base64
String base64 = fileToBase64(new File(fileFilePath));
return base64;
}
public String ThumbnailsFile(BufferedImage buffer) throws Exception {
String Base64 = saveBufferImageToFile(buffer, 0.2);
return Base64;
}
public String ThumbnailsFile(String base64) throws Exception {
BASE64Decoder decoder = new BASE64Decoder();
byte[] bytes = decoder.decodeBuffer(base64.replaceAll("data:image/png;base64,", ""));
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
BufferedImage buffer = ImageIO.read(bais);
String Base64 = saveBufferImageToFile(buffer, 0.2);
return Base64;
}
private String saveBufferImageToFile(BufferedImage bufferedImage, Double picturesThumbnails) {
if (bufferedImage == null) {
throw new SaveException("图片不能为空");
}
String fileName = UUIDUtil.get32UUID() + ".jpg";
String baseUploadPath = fileProperties.getUploadPath();
if (StringUtil.isEmpty(baseUploadPath)) {
throw new SaveException("上传路径未配置");
}
StringBuilder filePath = new StringBuilder();
if (!baseUploadPath.endsWith(File.separator)) {
filePath.append(baseUploadPath).append(File.separator);
} else {
filePath.append(baseUploadPath);
}
filePath.append("images");
String days = DateUtil.getDays();
filePath.append(File.separator).append(days).append(File.separator);
File file = new File(filePath.toString());
if (!file.exists()) {
file.mkdirs();
}
String fileFilePath = filePath.toString() + fileName;
createImage(fileFilePath, bufferedImage);
try {
Thumbnails.of(new BufferedImage[]{bufferedImage}).scale(0.5).outputQuality(picturesThumbnails).toFile(fileFilePath);
} catch (IOException e) {
e.printStackTrace();
}
// 将文件转base64
String base64 = fileToBase64(new File(fileFilePath));
return base64;
}
private static void createImage(String fileLocation, BufferedImage image) {
try {
String formatName = fileLocation.substring(fileLocation.lastIndexOf(".") + 1);
ImageIO.write(image, formatName , new File(fileLocation));
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 文件File类型转BASE64
*
* @param file
* @return
*/
public static String fileToBase64(File file) {
return "data:image/png;base64," + Base64.encodeBase64String(fileToByte(file));
}
/**
* 文件File类型转byte[]
*
* @param file
* @return
*/
private static byte[] fileToByte(File file) {
byte[] fileBytes = null;
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
fileBytes = new byte[(int) file.length()];
fis.read(fileBytes);
fis.close();
} catch (Exception e) {
e.printStackTrace();
}
return fileBytes;
}
}

View File

@ -0,0 +1,274 @@
package cn.com.tenlion.superviseqrcode.utils;
import com.github.pagehelper.util.StringUtil;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.StringUtils;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.OutputStream;
import java.util.Base64;
import java.util.Hashtable;
/**
* QRCodeUtil 生成二维码工具类
*/
public class QRCodeUtil {
// 二维码 编码格式
private static final String CHARSET = "utf-8";
// 二维码尺寸 类型
private static final String FORMAT_NAME = "JPG";
// 二维码尺寸
private static final int QRCODE_SIZE = 300;
// LOGO宽度
private static final int WIDTH = 60;
// LOGO高度
private static final int HEIGHT = 60;
public static void main(String[] args) {
try {
String s = QRCodeUtil.b64QRCode("http://wans.ink", "", false, "");
System.out.println(s);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* <p>
* <code>createImage</code>B64 二维码生成
* </p>
*
* @param content 二维码原文
* @param imgPath logo图片路径
* @param needCompress 是否压缩logo图片
* @param title 标题
* @return
*/
public static String b64QRCode(String content, String imgPath, boolean needCompress, String title) throws Exception {
Hashtable hints = new Hashtable();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);//ErrorCorrectionLevel 二维码修正
hints.put(EncodeHintType.CHARACTER_SET, CHARSET);
hints.put(EncodeHintType.MARGIN, 1);//二维码图片内边距
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE, hints);
int width = bitMatrix.getWidth();
int height = bitMatrix.getHeight();
BufferedImage image = new BufferedImage(width, StringUtil.isEmpty(title) ? height : height + 50, BufferedImage.TYPE_INT_RGB);
if(!StringUtil.isEmpty(title)) {
// 获取Graphics2D
Graphics2D g2d = image.createGraphics();
g2d.setBackground(new Color(255,255,255));
g2d.setColor(Color.black);
g2d.clearRect(0, 0, width, height + 50);
Font font=new Font("宋体",Font.PLAIN,35);
g2d.setFont(font);
// 抗锯齿
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
// 计算文字长度计算居中的x点坐标
FontMetrics fm = g2d.getFontMetrics(font);
int textWidth = fm.stringWidth(title);
int widthX = (width - textWidth) / 2;
// 表示这段文字在图片上的位置(x,y) .第一个是你设置的内容
g2d.drawString(title, widthX, height + 25);
// 释放对象
g2d.dispose();
}
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
}
}
if (imgPath == null || "".equals(imgPath)) {
ImageIO.write(image, FORMAT_NAME, stream);
String s = Base64.getEncoder().encodeToString(stream.toByteArray());
return s;
}
// 插入图片
QRCodeUtil.insertImage(image, imgPath, needCompress);
ImageIO.write(image, FORMAT_NAME, stream);
String s = Base64.getEncoder().encodeToString(stream.toByteArray());
return s;
}
/**
* <p>
* <code>createImage</code>创建 图片缓冲
* </p>
*
* @param content 二维码原文
* @param imgPath logo图片路径
* @param needCompress 是否压缩logo图片
* @param title 标题
* @return
*/
private static BufferedImage createImage(String content, String imgPath, boolean needCompress, String title) throws Exception {
Hashtable hints = new Hashtable();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);//ErrorCorrectionLevel 二维码修正
hints.put(EncodeHintType.CHARACTER_SET, CHARSET);
hints.put(EncodeHintType.MARGIN, 1);//二维码图片内边距
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE, hints);
int width = bitMatrix.getWidth();
int height = bitMatrix.getHeight();
BufferedImage image = new BufferedImage(width, StringUtil.isEmpty(title) ? height : height + 50, BufferedImage.TYPE_INT_RGB);
if(!StringUtil.isEmpty(title)) {
// 获取Graphics2D
Graphics2D g2d = image.createGraphics();
g2d.setBackground(new Color(255,255,255));
g2d.setColor(Color.black);
g2d.clearRect(0, 0, width, height + 50);
Font font=new Font("宋体",Font.PLAIN,35);
g2d.setFont(font);
// 抗锯齿
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
// 计算文字长度计算居中的x点坐标
FontMetrics fm = g2d.getFontMetrics(font);
int textWidth = fm.stringWidth(title);
int widthX = (width - textWidth) / 2;
// 表示这段文字在图片上的位置(x,y) .第一个是你设置的内容
g2d.drawString(title, widthX, height + 25);
// 释放对象
g2d.dispose();
}
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
}
}
if (imgPath == null || "".equals(imgPath)) {
return image;
}
// 插入图片
QRCodeUtil.insertImage(image, imgPath, needCompress);
return image;
}
/**
* <p>
* <code>insertImage</code> 插入logo图片
* </p>
*
* @param source 图片缓冲
* @param imgPath logo图片路径
* @param needCompress 是否压缩logo图片
* @return
*/
private static void insertImage(BufferedImage source, String imgPath, boolean needCompress) throws Exception {
File file = new File(imgPath);
if (!file.exists()) {
System.err.println("" + imgPath + " 该文件不存在!");
return;
}
Image src = ImageIO.read(new File(imgPath));
int width = src.getWidth(null);
int height = src.getHeight(null);
if (needCompress) { // 压缩LOGO
if (width > WIDTH) {
width = WIDTH;
}
if (height > HEIGHT) {
height = HEIGHT;
}
Image image = src.getScaledInstance(width, height, Image.SCALE_SMOOTH);
BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Graphics g = tag.getGraphics();
g.drawImage(image, 0, 0, null); // 绘制缩小后的图
g.dispose();
src = image;
}
// 插入LOGO
Graphics2D graph = source.createGraphics();
int x = (QRCODE_SIZE - width) / 2;
int y = (QRCODE_SIZE - height) / 2;
graph.drawImage(src, x, y, width, height, null);
Shape shape = new RoundRectangle2D.Float(x, y, width, width, 6, 6);
graph.setStroke(new BasicStroke(3f));
graph.draw(shape);
graph.dispose();
}
/**
* <p>
* <code>encode</code> 生成二维码
* </p>
*
* @param content 二维码原文
* @param imgPath logo图片路径
* @param destPath 生成二维码路径
* @param needCompress 是否压缩logo图片
* @return
*/
public static void encode(String content, String imgPath, String destPath, boolean needCompress) throws Exception {
BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress, "");
mkdirs(destPath);
ImageIO.write(image, FORMAT_NAME, new File(destPath));
}
/**
* <p>
* <code>encode</code>生成 图片缓冲
* </p>
*
* @param content 二维码原文
* @param imgPath logo图片路径
* @param needCompress 是否压缩logo图片
* @param title 二维码标题
* @return
*/
public static BufferedImage encode(String content, String imgPath, boolean needCompress, String title) throws Exception {
BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress, title);
return image;
}
/**
* <p>
* <code>mkdirs</code>创建文件
* </p>
*
* @param destPath 目标文件路径
* @return
*/
public static void mkdirs(String destPath) {
File file = new File(destPath);
// 当文件夹不存在时mkdirs会自动创建多层目录区别于mkdir(mkdir如果父目录不存在则会抛出异常)
if (!file.exists() && !file.isDirectory()) {
file.mkdirs();
}
}
/**
* <p>
* <code>encode</code>生成 带有logo二维码
* </p>
*
* @param content 二维码原文
* @param imgPath logo图片路径
* @param output 输出流
* @param needCompress 是否压缩logo图片
* @return
*/
public static void encode(String content, String imgPath, OutputStream output, boolean needCompress) throws Exception {
BufferedImage image = QRCodeUtil.createImage(content, imgPath, needCompress, "");
ImageIO.write(image, FORMAT_NAME, output);
}
/**
* <p>
* <code>encode</code>生成 普通二维码
* </p>
*
* @param content 二维码原文
* @param output 输出流
* @return
*/
public static void encode(String content, OutputStream output) throws Exception {
QRCodeUtil.encode(content, null, output, false);
}
}

View File

@ -0,0 +1,102 @@
server:
port: 8084
url: http://192.168.0.109:8084/supervise-qrcode
system-title: 码上监督平台
system-sub-title: 码上监督平台
default-home-page: index-main
servlet:
context-path: /supervise-qrcode
spring:
login-url: /oauth/login
login-failure: /oauth/login?error
login-process: /userlogin
assets-matchers: /assets/**,/qrscan/**
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML5
encoding: UTF-8
cache: false
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 1GB
max-request-size: 1GB
datasource:
druid:
url: jdbc:mysql://127.0.0.1:3306/db_supervise_qrcode?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC
db-type: mysql
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
initial-size: 2
min-idle: 2
max-active: 5
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 10
filter:
commons-log:
connection-logger-name: stat,wall,log4j
stat:
log-slow-sql: true
slow-sql-millis: 2000
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
use-global-data-source-stat: true
# 数据库
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mybatis/mapper/**/*.xml
# 文档
swagger:
base-package-list: ink.wgink,cn.com.tenlion
# 文件
file:
# 文件的保存路径
upload-path: /Users/wanggeng/Desktop/UploadFiles/
# 图片类型
image-types: png,jpg,jpeg,gif,blob
# 视频类型
video-types: mp4,rmvb
# 音频类型
audio-types: mp3,wmv,amr
# 文件类型
file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf
# 同时上传最大支持数
max-file-count: 6
# 图片输出压缩质量大于0默认0.4
image-output-quality: 0.4
# 媒体最大时长(单位:秒)
media-max-duration:
# 后台
backend:
video: 10
audio: 60
# 微信
wechat:
video: 10
audio: 60
# app
app:
video: 10
audio: 60
# 日志
logging:
file:
name: /Users/wanggeng/Desktop/UploadFiles/examination-signup-logs.log
level:
root: error
ink.wgink: debug
cn.com.tenlion: debug

View File

@ -0,0 +1,102 @@
server:
port: 9100
url: http://175.24.42.217:9100/supervise-qrcode
system-title: 码上监督平台
system-sub-title: 码上监督平台
default-home-page: index-main
servlet:
context-path: /supervise-qrcode
spring:
login-url: /oauth/login
login-failure: /oauth/login?error
login-process: /userlogin
assets-matchers: /assets/**,/qrscan/**
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML5
encoding: UTF-8
cache: false
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 1GB
max-request-size: 1GB
datasource:
druid:
url: jdbc:mysql://127.0.0.1:3306/db_supervise_qrcode?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC
db-type: mysql
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123456
initial-size: 2
min-idle: 2
max-active: 5
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 10
filter:
commons-log:
connection-logger-name: stat,wall,log4j
stat:
log-slow-sql: true
slow-sql-millis: 2000
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
use-global-data-source-stat: true
# 数据库
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mybatis/mapper/**/*.xml
# 文档
swagger:
base-package-list: ink.wgink,cn.com.tenlion
# 文件
file:
# 文件的保存路径
upload-path: E:/project/uploadfiles/supervise-qrcode
# 图片类型
image-types: png,jpg,jpeg,gif,blob
# 视频类型
video-types: mp4,rmvb
# 音频类型
audio-types: mp3,wmv,amr
# 文件类型
file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf
# 同时上传最大支持数
max-file-count: 6
# 图片输出压缩质量大于0默认0.4
image-output-quality: 0.4
# 媒体最大时长(单位:秒)
media-max-duration:
# 后台
backend:
video: 10
audio: 60
# 微信
wechat:
video: 10
audio: 60
# app
app:
video: 10
audio: 60
# 日志
logging:
# file:
# name: D:/ideaWorkspace/logs/examination-signup/examination-signup-logs.log
level:
root: error
ink.wgink: debug
cn.com.tenlion: debug

View File

@ -0,0 +1,99 @@
<?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="cn.com.tenlion.superviseqrcode.dao.casemng.ICaseMngDao">
<resultMap id="caseMngDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.casemng.CaseMngDTO">
<result column="id" property="id"/>
<result column="case_name" property="caseName"/>
<result column="case_describe" property="caseDescribe"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="belong_hall_id" property="belongHallId"/>
<result column="hall_window_ids" property="hallWindowIds"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<select id="list" parameterType="map" resultMap="caseMngDTO">
SELECT
t1.*
FROM
msjd_case_mng t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.case_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="belongHallId != null and belongHallId != ''">
AND t1.belong_hall_id = #{belongHallId}
</if>
<if test="hallWindowIds != null and belongHallId != ''">
AND FIND_IN_SET(#{hallWindowIds}, t1.hall_window_ids)
</if>
<if test="manageOrgId != null and manageOrgId !=''">
AND FIND_IN_SET(t1.manage_org_id, #{manageOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="caseMngDTO">
SELECT
t1.*
FROM
msjd_case_mng t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_case_mng (
case_name, case_describe, manage_org_id, belong_hall_id, hall_window_ids, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{caseName}, #{caseDescribe}, #{manageOrgId}, #{belongHallId}, #{hallWindowIds}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_case_mng SET
id = #{id}
<if test="caseName!= null">
,case_name = #{caseName}
</if>
<if test="caseDescribe!= null">
,case_describe = #{caseDescribe}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
<if test="belongHallId!= null">
,belong_hall_id = #{belongHallId}
</if>
<if test="hallWindowIds!= null">
,hall_window_ids = #{hallWindowIds}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_case_mng
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,172 @@
<?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="cn.com.tenlion.superviseqrcode.dao.hallcamera.IHallCameraDao">
<resultMap id="hallCameraDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraDTO">
<result column="id" property="id"/>
<result column="camera_name" property="cameraName"/>
<result column="camera_addr" property="cameraAddr"/>
<result column="belong_hall_id" property="belongHallId"/>
<result column="camera_describe" property="cameraDescribe"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<resultMap id="hallCameraSuperviseDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.hallcamera.HallCameraSuperviseDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="title" property="title"/>
<result column="problem_type" property="problemType"/>
<result column="content" property="content"/>
<result column="with_files" property="withFiles"/>
<result column="hall_id" property="hallId"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="limit_date" property="limitDate"/>
<result column="work_flow_type" property="workFlowType"/>
<result column="creator" property="creator"/>
<result column="reply_content" property="replyContent"/>
<result column="reply_files" property="replyFiles"/>
<result column="reply_time" property="replyTime"/>
</resultMap>
<select id="getSupervise" parameterType="map" resultMap="hallCameraSuperviseDTO">
SELECT
t1.*
FROM
msjd_hall_camera_supervise t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<update id="updateSupervise" parameterType="map">
UPDATE msjd_hall_camera_supervise SET
id = #{id}
<if test="workFlowType!= null">
,work_flow_type = #{workFlowType}
</if>
<if test="replyContent!= null">
,reply_content = #{replyContent}
</if>
<if test="replyFiles!= null">
,reply_files = #{replyFiles}
</if>
<if test="replyTime!= null">
,reply_time = #{replyTime}
</if>
WHERE
id = #{id}
</update>
<insert id="saveSupervise" parameterType="map">
INSERT INTO msjd_hall_camera_supervise (
case_code, title, problem_type, content, with_files, hall_id, gmt_create, limit_date, creator, work_flow_type, is_delete
) VALUES (
#{caseCode}, #{title}, #{problemType}, #{content}, #{withFiles}, #{hallId}, #{gmtCreate}, #{limitDate}, #{creator}, #{workFlowType}, '0'
)
</insert>
<select id="listSupervise" parameterType="map" resultMap="hallCameraSuperviseDTO">
SELECT
t1.*
FROM
msjd_hall_camera_supervise t1
LEFT JOIN msjd_hall_mng t2 ON t1.hall_id = t2.id
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.case_code LIKE CONCAT('%', #{keywords}, '%')
OR
t1.title LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="workFlowType != null and workFlowType != ''">
AND t1.work_flow_type = #{workFlowType}
</if>
<if test="manageOrgId != null and manageOrgId != ''">
AND FIND_IN_SET(t2.manage_org_id, #{manageOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="list" parameterType="map" resultMap="hallCameraDTO">
SELECT
t1.*
FROM
msjd_hall_camera t1
WHERE
t1.is_delete = '0'
<if test="belongHallId != null and belongHallId !=''">
AND t1.belong_hall_id = #{belongHallId}
</if>
<if test="keywords != null and keywords != ''">
AND (
t1.camera_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="hallCameraIds != null and hallCameraIds !=''">
AND FIND_IN_SET(t1.id, #{hallCameraIds})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="hallCameraDTO">
SELECT
t1.*
FROM
msjd_hall_camera t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO msjd_hall_camera (
camera_name, camera_addr, belong_hall_id, camera_describe, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{cameraName}, #{cameraAddr}, #{belongHallId}, #{cameraDescribe}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_hall_camera SET
id = #{id}
<if test="cameraName!= null">
,camera_name = #{cameraName}
</if>
<if test="cameraAddr!= null">
,camera_addr = #{cameraAddr}
</if>
<if test="belongHallId!= null">
,belong_hall_id = #{belongHallId}
</if>
<if test="cameraDescribe!= null">
,camera_describe = #{cameraDescribe}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_hall_camera
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,105 @@
<?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="cn.com.tenlion.superviseqrcode.dao.hallmng.IHallMngDao">
<resultMap id="hallMngDto" type="cn.com.tenlion.superviseqrcode.pojo.dtos.hallmng.HallMngDTO">
<result column="id" property="id"/>
<result column="hall_name" property="hallName"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="manage_org_name" property="manageOrgName"/>
<result column="hall_position" property="hallPosition"/>
<result column="hall_discription" property="hallDiscription"/>
<result column="service_phone" property="servicePhone"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="lng" property="lng"/>
<result column="lat" property="lat"/>
</resultMap>
<select id="list" parameterType="map" resultMap="hallMngDto">
SELECT
t1.*
FROM
msjd_hall_mng t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.hall_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="manageOrgId != null and manageOrgId !=''">
AND FIND_IN_SET(t1.manage_org_id, #{manageOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="hallMngDto">
SELECT
t1.*
FROM
msjd_hall_mng t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO msjd_hall_mng (
hall_name, manage_org_id, manage_org_name, hall_position, hall_discription, service_phone, lng, lat, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{hallName}, #{manageOrgId}, #{manageOrgName}, #{hallPosition}, #{hallDiscription}, #{servicePhone}, #{lng}, #{lat}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_hall_mng SET
id = #{id}
<if test="hallName!= null">
,hall_name = #{hallName}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
<if test="manageOrgName!= null">
,manage_org_name = #{manageOrgName}
</if>
<if test="hallPosition!= null">
,hall_position = #{hallPosition}
</if>
<if test="hallDiscription!= null">
,hall_discription = #{hallDiscription}
</if>
<if test="servicePhone!= null">
,service_phone = #{servicePhone}
</if>
<if test="lng!= null">
,lng = #{lng}
</if>
<if test="lat!= null">
,lat = #{lat}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_hall_mng
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,92 @@
<?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="cn.com.tenlion.superviseqrcode.dao.hallwindow.IHallWindowDao">
<resultMap id="hallWindowDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.hallwindow.HallWindowDTO">
<result column="id" property="id"/>
<result column="window_name" property="windowName"/>
<result column="window_num" property="windowNum"/>
<result column="belong_hall_id" property="belongHallId"/>
<result column="window_position" property="windowPosition"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<select id="list" parameterType="map" resultMap="hallWindowDTO">
SELECT
t1.*
FROM
msjd_hall_window t1
WHERE
t1.is_delete = '0'
<if test="belongHallId != null and belongHallId !=''">
AND t1.belong_hall_id = #{belongHallId}
</if>
<if test="keywords != null and keywords != ''">
AND (
t1.window_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="hallWindowIds != null and hallWindowIds !=''">
AND FIND_IN_SET(t1.id, #{hallWindowIds})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="hallWindowDTO">
SELECT
t1.*
FROM
msjd_hall_window t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO msjd_hall_window (
window_name, window_num, belong_hall_id, window_position, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{windowName}, #{windowNum}, #{belongHallId}, #{windowPosition}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_hall_window SET
id = #{id}
<if test="windowName!= null">
,window_name = #{windowName}
</if>
<if test="windowNum!= null">
,window_num = #{windowNum}
</if>
<if test="belongHallId!= null">
,belong_hall_id = #{belongHallId}
</if>
<if test="windowPosition!= null">
,window_position = #{windowPosition}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_hall_window
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,85 @@
<?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="cn.com.tenlion.superviseqrcode.dao.problemmng.IProblemMngDao">
<resultMap id="problemMngDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.problemng.ProblemMngDTO">
<result column="id" property="id"/>
<result column="problem_type" property="problemType"/>
<result column="problem_name" property="problemName"/>
<result column="problem_describe" property="problemDescribe"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<select id="list" parameterType="map" resultMap="problemMngDTO">
SELECT
t1.*
FROM
msjd_problem_mng t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.problem_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="problemType != null and problemType != ''">
AND t1.problem_type = #{problemType}
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="problemMngDTO">
SELECT
t1.*
FROM
msjd_problem_mng t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_problem_mng (
problem_type, problem_name, problem_describe, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{problemType}, #{problemName}, #{problemDescribe}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_problem_mng SET
id = #{id}
<if test="problemType != null">
,problem_type = #{problemType}
</if>
<if test="problemName != null">
,problem_name = #{problemName}
</if>
<if test="problemDescribe!= null">
,problem_describe = #{problemDescribe}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_problem_mng
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,94 @@
<?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="cn.com.tenlion.superviseqrcode.dao.qrcodemng.IQRCodeMngDao">
<resultMap id="qrCodeMngDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.qrcodemng.QRCodeMngDTO">
<result column="id" property="id"/>
<result column="qr_code_type" property="qrCodeType"/>
<result column="web_site_id" property="webSiteId"/>
<result column="hall_id" property="hallId"/>
<result column="hall_window_id" property="hallWindowId"/>
<result column="qr_code_addr" property="qrCodeAddr"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<select id="list" parameterType="map" resultMap="qrCodeMngDTO">
SELECT
t1.*
FROM
msjd_qrcode_mng t1
WHERE
t1.is_delete = '0'
<if test="qrCodeType != null and qrCodeType !=''">
AND t1.qr_code_type = #{qrCodeType}
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="qrCodeMngDTO">
SELECT
t1.*
FROM
msjd_qrcode_mng t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<select id="getByQuery" parameterType="map" resultMap="qrCodeMngDTO">
SELECT
t1.*
FROM
msjd_qrcode_mng t1
WHERE
t1.is_delete = '0'
<if test="id != null">
AND t1.id = #{id}
</if>
<if test="wevSiteId != null">
AND t1.wev_site_id = #{wevSiteId}
</if>
<if test="hallId != null">
AND t1.hall_id = #{hallId}
</if><if test="hallWindowId != null">
AND t1.hall_window_id = #{hallWindowId}
</if>
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_qrcode_mng (
qr_code_type, web_site_id, hall_id, hall_window_id, qr_code_addr, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{qrCodeType}, #{webSiteId}, #{hallId}, #{hallWindowId}, #{qrCodeAddr}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_qrcode_mng SET
id = #{id}
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_qrcode_mng
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,201 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcase.IReportCaseDao">
<resultMap id="reportCaseDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reortcase.ReportCaseDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="title" property="title"/>
<result column="report_content" property="reportContent"/>
<result column="problem_type" property="problemType"/>
<result column="problem_id" property="problemId"/>
<result column="report_source" property="reportSource"/>
<result column="case_id" property="caseId"/>
<result column="hall_id" property="hallId"/>
<result column="hall_window_id" property="hallWindowId"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="accept_org_id" property="acceptOrgId"/>
<result column="be_reported_user" property="beReportedUser"/>
<result column="report_time" property="reportTime"/>
<result column="report_user_name" property="reportUserName"/>
<result column="report_user_phone" property="reportUserPhone"/>
<result column="report_file" property="reportFile"/>
<result column="work_flow_type" property="workFlowType"/>
<result column="pass_type" property="passType"/>
</resultMap>
<select id="list" parameterType="map" resultMap="reportCaseDTO">
SELECT
t1.*
FROM
msjd_report_case t1
WHERE
t1.is_delete = '0'
AND t1.work_flow_type <![CDATA[ <> ]]> '-1'
<if test="keywords != null and keywords != ''">
AND (
t1.case_code LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="problemType != null and problemType != ''">
AND t1.problem_type = #{problemType}
</if>
<if test="workFlowType != null and workFlowType != ''">
AND t1.work_flow_type = #{workFlowType}
</if>
<if test="passType != null and passType != ''">
AND t1.pass_type = #{passType}
</if>
<if test="acceptOrgId != null and acceptOrgId !=''">
AND FIND_IN_SET(t1.accept_org_id, #{acceptOrgId})
</if>
<if test="reportSource != null and reportSource !=''">
AND t1.report_source = #{reportSource}
</if>
ORDER BY t1.id DESC
</select>
<select id="listUnAccept" parameterType="map" resultMap="reportCaseDTO">
SELECT
t1.*
FROM
msjd_report_case t1
WHERE
t1.is_delete = '0'
<if test="workFlowType != null and workFlowType != ''">
AND t1.work_flow_type = #{workFlowType}
</if>
<if test="acceptOrgId != null and acceptOrgId !=''">
AND FIND_IN_SET(t1.accept_org_id, #{acceptOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="reportCaseDTO">
SELECT
t1.*
FROM
msjd_report_case t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case (
case_code, title, report_content, problem_type, problem_id, report_source, case_id, hall_id, hall_window_id, manage_org_id,
accept_org_id, be_reported_user, report_time, report_user_name, report_user_phone, report_file,
work_flow_type, pass_type, pass_org_id, pass_org_user, is_delete
) VALUES (
#{caseCode}, #{title}, #{reportContent}, #{problemType}, #{problemId}, #{reportSource}, #{caseId}, #{hallId}, #{hallWindowId}, #{manageOrgId},
#{acceptOrgId}, #{beReportedUser}, #{reportTime}, #{reportUserName}, #{reportUserPhone}, #{reportFile},
#{workFlowType}, #{passType}, #{passOrgId}, #{passOrgUser}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case SET
id = #{id}
<if test="caseCode!= null">
,case_code = #{caseCode}
</if>
<if test="title!= null">
,title = #{title}
</if>
<if test="reportContent!= null">
,report_content = #{reportContent}
</if>
<if test="problemType!= null">
,problem_type = #{problemType}
</if>
<if test="problemId!= null">
,problem_id = #{problemId}
</if>
<if test="reportSource!= null">
,report_source = #{reportSource}
</if>
<if test="caseId!= null">
,case_id = #{caseId}
</if>
<if test="hallId!= null">
,hall_id = #{hallId}
</if>
<if test="hallWindowId!= null">
,hall_window_id = #{hallWindowId}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
<if test="acceptOrgId!= null">
,accept_org_id = #{acceptOrgId}
</if>
<if test="beReportedUser!= null">
,be_reported_user = #{beReportedUser}
</if>
<if test="reportTime!= null">
,report_time = #{reportTime}
</if>
<if test="reportUserName!= null">
,report_user_name = #{reportUserName}
</if>
<if test="reportUserPhone!= null">
,report_user_phone = #{reportUserPhone}
</if>
<if test="reportFile!= null">
,report_file = #{reportFile}
</if>
<if test="workFlowType!= null">
,work_flow_type = #{workFlowType}
</if>
<if test="passType!= null">
,pass_type = #{passType}
</if>
<if test="passOrgId!= null">
,pass_org_id = #{passOrgId}
</if>
<if test="passOrgUser!= null">
,pass_org_user = #{passOrgUser}
</if>
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_report_case
SET
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
<delete id="delete" parameterType="map">
DELETE FROM msjd_report_case
WHERE id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</delete>
<insert id="saveVisit" parameterType="map">
INSERT INTO msjd_report_case_visit (
case_code, visit_content, visit_time, creator
) VALUES (
#{caseCode}, #{visitContent}, #{visitTime}, #{creator}
)
</insert>
<select id="getVisit" parameterType="map" resultType="map">
SELECT
*
FROM
msjd_report_case_visit
WHERE
case_code = #{caseCode}
LIMIT 1
</select>
</mapper>

View File

@ -0,0 +1,51 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcasefinish.IReportCaseFinishDao">
<resultMap id="reportCaseFinishDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasefinish.ReportCaseFinishDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="finish_way" property="finishWay"/>
<result column="finish_time" property="finishTime"/>
<result column="creator" property="creator"/>
</resultMap>
<select id="get" parameterType="map" resultMap="reportCaseFinishDTO">
SELECT
t1.*
FROM
msjd_report_case_finish t1
WHERE
AND t1.case_code = #{caseCode}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case_finish (
case_code, finish_way, finish_time, creator
) VALUES (
#{caseCode}, #{finishWay}, #{finishTime}, #{creator}
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case_finish SET
case_code = #{caseCode}
<if test="finishWay != null">
,finish_way = #{finishWay}
</if>
<if test="finishTime != null">
,finish_time = #{finishTime}
</if>
WHERE
case_code = #{caseCode}
</update>
<update id="delete" parameterType="map">
DELETE FROM
msjd_report_case_finish
WHERE
case_code = #{caseCode}
</update>
</mapper>

View File

@ -0,0 +1,146 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcaseforward.IReportCaseForwardDao">
<resultMap id="reportCaseForwardDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaseforward.ReportCaseForwardDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="title" property="title"/>
<result column="report_content" property="reportContent"/>
<result column="problem_type" property="problemType"/>
<result column="problem_id" property="problemId"/>
<result column="report_source" property="reportSource"/>
<result column="case_id" property="caseId"/>
<result column="hall_id" property="hallId"/>
<result column="hall_window_id" property="hallWindowId"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="accept_org_id" property="acceptOrgId"/>
<result column="be_reported_user" property="beReportedUser"/>
<result column="report_time" property="reportTime"/>
<result column="report_user_name" property="reportUserName"/>
<result column="report_user_phone" property="reportUserPhone"/>
<result column="report_file" property="reportFile"/>
<result column="work_flow_type" property="workFlowType"/>
<result column="pass_type" property="passType"/>
<result column="pass_org_id" property="passOrgId"/>
<result column="pass_org_user" property="passOrgUser"/>
</resultMap>
<select id="list" parameterType="map" resultMap="reportCaseForwardDTO">
SELECT
t1.*
FROM
msjd_report_case_forward t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.case_code LIKE CONCAT('%', #{keywords}, '%')
)
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="reportCaseForwardDTO">
SELECT
t1.*
FROM
msjd_report_case_forward t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case_forward (
case_code, title, report_content, problem_type, problem_id, report_source, case_id, hall_id, hall_window_id, manage_org_id,
accept_org_id, be_reported_user, report_time, report_user_name, report_user_phone, report_file,
work_flow_type, pass_type, pass_org_id, pass_org_user, is_delete
) VALUES (
#{caseCode}, #{title}, #{reportContent}, #{problemType}, #{problemId}, #{reportSource}, #{caseId}, #{hallId}, #{hallWindowId}, #{manageOrgId},
#{acceptOrgId}, #{beReportedUser}, #{reportTime}, #{reportUserName}, #{reportUserPhone}, #{reportFile},
#{workFlowType}, #{passType}, #{passOrgId}, #{passOrgUser}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case_forward SET
id = #{id}
<if test="caseCode!= null">
,case_code = #{caseCode}
</if>
<if test="title!= null">
,title = #{title}
</if>
<if test="reportContent!= null">
,report_content = #{reportContent}
</if>
<if test="problemType!= null">
,problem_type = #{problemType}
</if>
<if test="problemId!= null">
,problem_id = #{problemId}
</if>
<if test="reportSource!= null">
,report_source = #{reportSource}
</if>
<if test="caseId!= null">
,case_id = #{caseId}
</if>
<if test="hallId!= null">
,hall_id = #{hallId}
</if>
<if test="hallWindowId!= null">
,hall_window_id = #{hallWindowId}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
<if test="acceptOrgId!= null">
,accept_org_id = #{acceptOrgId}
</if>
<if test="beReportedUser!= null">
,be_reported_user = #{beReportedUser}
</if>
<if test="reportTime!= null">
,report_time = #{reportTime}
</if>
<if test="reportUserName!= null">
,report_user_name = #{reportUserName}
</if>
<if test="reportUserPhone!= null">
,report_user_phone = #{reportUserPhone}
</if>
<if test="reportFile!= null">
,report_file = #{reportFile}
</if>
<if test="workFlowType!= null">
,work_flow_type = #{workFlowType}
</if>
<if test="passType!= null">
,pass_type = #{passType}
</if>
<if test="passOrgId!= null">
,pass_org_id = #{passOrgId}
</if>
<if test="passOrgUser!= null">
,pass_org_user = #{passOrgUser}
</if>
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_report_case_forward
SET
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,57 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcaselog.IReportCaseLogDao">
<resultMap id="reportCaseLogDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportcaselog.ReportCaseLogDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="log_content" property="logContent"/>
<result column="creator" property="creator"/>
<result column="create_org_id" property="createOrgId"/>
<result column="gmt_create" property="gmtCreate"/>
</resultMap>
<select id="list" parameterType="map" resultMap="reportCaseLogDTO">
SELECT
t1.*
FROM
msjd_report_case_log t1
WHERE
t1.case_code = #{caseCode}
ORDER BY t1.gmt_create DESC
</select>
<select id="get" parameterType="map" resultMap="reportCaseLogDTO">
SELECT
t1.*
FROM
msjd_report_case_log t1
WHERE
t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case_log (
case_code, log_content, creator, create_org_id, gmt_create
) VALUES (
#{caseCode}, #{logContent}, #{creator}, #{createOrgId}, #{gmtCreate}
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case_log SET
id = #{id}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
DELETE FROM
msjd_report_case_log
WHERE
id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,67 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcasepass.IReportCasePassDao">
<resultMap id="reportCasePassDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasepass.ReportCasePassDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="pass_current_org" property="passCurrentOrg"/>
<result column="pass_over" property="passOver"/>
<result column="pass_step" property="passStep"/>
<result column="pass_time" property="passTime"/>
<result column="creator" property="creator"/>
</resultMap>
<select id="get" parameterType="map" resultMap="reportCasePassDTO">
SELECT
t1.*
FROM
msjd_report_case_pass t1
WHERE
AND t1.case_code = #{caseCode}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case_pass (
case_code, pass_current_org, pass_over, pass_step, pass_time, creator
) VALUES (
#{caseCode}, #{passCurrentOrg}, #{passOver}, #{passStep}, #{passTime}, #{creator}
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case_pass SET
case_code = #{case_code}
<if test="passOver != null">
,pass_over = #{passOver}
</if>
WHERE
case_code = #{case_code}
</update>
<update id="delete" parameterType="map">
DELETE FROM
msjd_report_case_pass
WHERE
case_code = #{caseCode}
</update>
<select id="getParentDept" parameterType="map" resultType="map">
SELECT * FROM sys_department
WHERE is_delete = '0'
AND department_id = #{departmentId}
</select>
<select id="getMaxStep" parameterType="map" resultType="map">
SELECT
*
FROM
msjd_report_case_pass
WHERE
case_code = #{caseCode}
ORDER BY pass_step desc
LIMIT 1
</select>
</mapper>

View File

@ -0,0 +1,55 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportcasereply.IReportCaseReplyDao">
<resultMap id="reportCaseReplyDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportcasereply.ReportCaseReplyDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="reply_content" property="replyContent"/>
<result column="reply_files" property="replyFiles"/>
<result column="reply_time" property="replyTime"/>
<result column="creator" property="creator"/>
</resultMap>
<select id="get" parameterType="map" resultMap="reportCaseReplyDTO">
SELECT
t1.*
FROM
msjd_report_case_reply t1
WHERE
t1.case_code = #{caseCode}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_case_reply (
case_code, reply_content, reply_files, reply_time, creator
) VALUES (
#{caseCode}, #{replyContent}, #{replyFiles}, #{replyTime}, #{creator}
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_case_reply SET
case_code = #{caseCode}
<if test="replyContent != null">
,reply_content = #{replyContent}
</if>
<if test="replyFiles != null">
,reply_files = #{replyFiles}
</if>
<if test="replyTime != null">
,reply_time = #{replyTime}
</if>
WHERE
case_code = #{caseCode}
</update>
<update id="delete" parameterType="map">
DELETE FROM
msjd_report_case_reply
WHERE
case_code = #{caseCode}
</update>
</mapper>

View File

@ -0,0 +1,149 @@
<?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="cn.com.tenlion.superviseqrcode.dao.reportletterromm.IReportLetterRoomDao">
<resultMap id="reportLetterRoomDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.reportletterromm.ReportLetterRoomDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="title" property="title"/>
<result column="report_content" property="reportContent"/>
<result column="problem_type" property="problemType"/>
<result column="problem_id" property="problemId"/>
<result column="report_source" property="reportSource"/>
<result column="case_id" property="caseId"/>
<result column="hall_id" property="hallId"/>
<result column="hall_window_id" property="hallWindowId"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="accept_org_id" property="acceptOrgId"/>
<result column="be_reported_user" property="beReportedUser"/>
<result column="report_time" property="reportTime"/>
<result column="report_user_name" property="reportUserName"/>
<result column="report_user_phone" property="reportUserPhone"/>
<result column="report_file" property="reportFile"/>
<result column="work_flow_type" property="workFlowType"/>
<result column="pass_type" property="passType"/>
</resultMap>
<select id="list" parameterType="map" resultMap="reportLetterRoomDTO">
SELECT
t1.*
FROM
msjd_report_letter_room t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.case_code LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="workFlowType != null and workFlowType != ''">
AND t1.work_flow_type = #{workFlowType}
</if>
<if test="passType != null and passType != ''">
AND t1.pass_type = #{passType}
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="reportLetterRoomDTO">
SELECT
t1.*
FROM
msjd_report_letter_room t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_report_letter_room (
case_code, title, report_content, problem_type, problem_id, report_source, case_id, hall_id, hall_window_id, manage_org_id,
accept_org_id, be_reported_user, report_time, report_user_name, report_user_phone, report_file,
work_flow_type, pass_type, pass_org_id, pass_org_user, is_delete
) VALUES (
#{caseCode}, #{title}, #{reportContent}, #{problemType}, #{problemId}, #{reportSource}, #{caseId}, #{hallId}, #{hallWindowId}, #{manageOrgId},
#{acceptOrgId}, #{beReportedUser}, #{reportTime}, #{reportUserName}, #{reportUserPhone}, #{reportFile},
#{workFlowType}, #{passType}, #{passOrgId}, #{passOrgUser}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_report_letter_room SET
id = #{id}
<if test="caseCode!= null">
,case_code = #{caseCode}
</if>
<if test="title!= null">
,title = #{title}
</if>
<if test="reportContent!= null">
,report_content = #{reportContent}
</if>
<if test="problemType!= null">
,problem_type = #{problemType}
</if>
<if test="problemId!= null">
,problem_id = #{problemId}
</if>
<if test="reportSource!= null">
,report_source = #{reportSource}
</if>
<if test="caseId!= null">
,case_id = #{caseId}
</if>
<if test="hallId!= null">
,hall_id = #{hallId}
</if>
<if test="hallWindowId!= null">
,hall_window_id = #{hallWindowId}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
<if test="acceptOrgId!= null">
,accept_org_id = #{acceptOrgId}
</if>
<if test="beReportedUser!= null">
,be_reported_user = #{beReportedUser}
</if>
<if test="reportTime!= null">
,report_time = #{reportTime}
</if>
<if test="reportUserName!= null">
,report_user_name = #{reportUserName}
</if>
<if test="reportUserPhone!= null">
,report_user_phone = #{reportUserPhone}
</if>
<if test="reportFile!= null">
,report_file = #{reportFile}
</if>
<if test="workFlowType!= null">
,work_flow_type = #{workFlowType}
</if>
<if test="passType!= null">
,pass_type = #{passType}
</if>
<if test="passOrgId!= null">
,pass_org_id = #{passOrgId}
</if>
<if test="passOrgUser!= null">
,pass_org_user = #{passOrgUser}
</if>
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_report_letter_room
SET
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,157 @@
<?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="cn.com.tenlion.superviseqrcode.dao.supervise.ISuperviseDao">
<resultMap id="superviseDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.supervise.SuperviseDTO">
<result column="id" property="id"/>
<result column="case_code" property="caseCode"/>
<result column="title" property="title"/>
<result column="supervise_type" property="superviseType"/>
<result column="content" property="content"/>
<result column="with_files" property="withFiles"/>
<result column="handle_org_id" property="handleOrgId"/>
<result column="limit_date" property="limitDate"/>
<result column="reply_type" property="replyType"/>
<result column="creator" property="creator"/>
<result column="create_time" property="createTime"/>
</resultMap>
<select id="list" parameterType="map" resultMap="superviseDTO">
SELECT
t1.*
FROM
msjd_supervise t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.title LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="replyType != null and replyType != ''">
AND FIND_IN_SET(t1.reply_type, #{replyType})
</if>
<if test="handleOrgId != null and handleOrgId != ''">
AND FIND_IN_SET(t1.handle_org_id, #{handleOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="superviseDTO">
SELECT
t1.*
FROM
msjd_supervise t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_supervise (
case_code, title, supervise_type, content, with_files, handle_org_id, limit_date, reply_type, creator, create_time, is_delete
) VALUES (
#{caseCode}, #{title}, #{superviseType}, #{content}, #{withFiles}, #{handleOrgId}, #{limitDate}, '0', #{creator}, #{createTime}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_supervise SET
id = #{id}
<if test="caseCode!= null">
,case_code = #{caseCode}
</if>
<if test="title!= null">
,title = #{title}
</if>
<if test="superviseType!= null">
,supervise_type = #{superviseType}
</if>
<if test="content!= null">
,content = #{content}
</if>
<if test="withFiles!= null">
,with_files = #{withFiles}
</if>
<if test="handleOrgId!= null">
,handle_org_id = #{handleOrgId}
</if>
<if test="limitDate!= null">
,limit_date = #{limitDate}
</if>
<if test="replyType!= null">
,reply_type = #{replyType}
</if>
<if test="creator!= null">
,creator = #{creator}
</if>
<if test="createTime!= null">
,create_time = #{createTime}
</if>
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_supervise
SET
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
<insert id="saveSuperviseReply" parameterType="map">
INSERT INTO msjd_supervise_reply (
case_code, reply_content, reply_files, reply_time, creator
) VALUES (
#{caseCode}, #{replyContent}, #{replyFiles}, #{replyTime}, #{creator}
)
</insert>
<select id="getSuperviseReply" parameterType="map" resultType="map">
SELECT
t1.*
FROM
msjd_supervise_reply t1
WHERE
t1.case_code = #{caseCode}
LIMIT 1
</select>
<delete id="deleteReply" parameterType="map">
DELETE FROM msjd_supervise_reply WHERE case_code = #{caseCode}
</delete>
<insert id="saveSuperviseTips" parameterType="map">
INSERT INTO msjd_supervise_tips (
tips_id, content
) VALUES (
#{tipsId}, #{content}
)
</insert>
<update id="updateSuperviseTips" parameterType="map">
UPDATE msjd_supervise_tips SET
content = #{content}
WHERE
tips_id = #{tipsId}
</update>
<select id="getSuperviseTips" parameterType="map" resultType="map">
SELECT
tips_id tipsId,
content
FROM
msjd_supervise_tips
WHERE 1 = 1
<if test="tipsId != null and tipsId != ''">
AND tips_id = #{tipsId}
</if>
</select>
</mapper>

View File

@ -0,0 +1,91 @@
<?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="cn.com.tenlion.superviseqrcode.dao.website.IWebSiteMngDao">
<resultMap id="webSiteMngDto" type="cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteMngDTO">
<result column="id" property="id"/>
<result column="web_site_name" property="webSiteName"/>
<result column="web_site_url" property="webSiteUrl"/>
<result column="web_site_discription" property="webSiteDiscription"/>
<result column="manage_org_id" property="manageOrgId"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<select id="list" parameterType="map" resultMap="webSiteMngDto">
SELECT
t1.*
FROM
msjd_web_site_mng t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.web_site_name LIKE CONCAT('%', #{keywords}, '%')
OR
t1.web_site_url LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="manageOrgId != null and manageOrgId !=''">
AND FIND_IN_SET(t1.manage_org_id, #{manageOrgId})
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="webSiteMngDto">
SELECT
t1.*
FROM
msjd_web_site_mng t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO msjd_web_site_mng (
web_site_name, web_site_url, web_site_discription, manage_org_id, creator, gmt_create, modifier, gmt_modified, is_delete
) VALUES (
#{webSiteName}, #{webSiteUrl}, #{webSiteDiscription}, #{manageOrgId}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_web_site_mng SET
id = #{id}
<if test="webSiteName!= null">
,web_site_name = #{webSiteName}
</if>
<if test="webSiteUrl!= null">
,web_site_url = #{webSiteUrl}
</if>
<if test="webSiteDiscription!= null">
,web_site_discription = #{webSiteDiscription}
</if>
<if test="manageOrgId!= null">
,manage_org_id = #{manageOrgId}
</if>
,modifier = #{modifier}
,gmt_modified = #{gmtModified}
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_web_site_mng
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

View File

@ -0,0 +1,104 @@
<?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="cn.com.tenlion.superviseqrcode.dao.website.IWebSiteReplyDao">
<resultMap id="webSiteReplyDTO" type="cn.com.tenlion.superviseqrcode.pojo.dtos.website.WebSiteReplyDTO">
<result column="id" property="id"/>
<result column="web_site_id" property="webSiteId"/>
<result column="matter_code" property="matterCode"/>
<result column="phone_number" property="phoneNumber"/>
<result column="opinion_content" property="opinionContent"/>
<result column="creator_name" property="creatorName"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="reply_type" property="replyType"/>
<result column="reply_content" property="replyContent"/>
<result column="reply_user_name" property="replyUserName"/>
<result column="reply_org_name" property="replyOrgName"/>
</resultMap>
<select id="list" parameterType="map" resultMap="webSiteReplyDTO">
SELECT
t1.*
FROM
msjd_web_site_reply t1
WHERE
t1.is_delete = '0'
<if test="keywords != null and keywords != ''">
AND (
t1.matter_code LIKE CONCAT('%', #{keywords}, '%')
OR
t1.creator_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
ORDER BY t1.id DESC
</select>
<select id="get" parameterType="map" resultMap="webSiteReplyDTO">
SELECT
t1.*
FROM
msjd_web_site_reply t1
WHERE
t1.is_delete = '0'
AND t1.id = #{id}
LIMIT 1
</select>
<insert id="save" parameterType="map">
INSERT INTO msjd_web_site_reply (
web_site_id, matter_code, phone_number, opinion_content, creator_name, gmt_create, reply_type, reply_content, reply_user_name, reply_org_name, is_delete
) VALUES (
#{webSiteId}, #{matterCode}, #{phoneNumber}, #{opinionContent}, #{creatorName}, #{gmtCreate}, #{replyType}, #{replyContent}, #{replyUserName}, #{replyOrgName}, '0'
)
</insert>
<update id="update" parameterType="map">
UPDATE msjd_web_site_reply SET
id = #{id}
<if test="webSiteId!= null">
,web_site_id = #{webSiteId}
</if>
<if test="matterCode!= null">
,matter_code = #{matterCode}
</if>
<if test="phoneNumber!= null">
,phone_number = #{phoneNumber}
</if>
<if test="opinionContent!= null">
,opinion_content = #{opinionContent}
</if>
<if test="creatorName!= null">
,creator_name = #{creatorName}
</if>
<if test="gmtCreate!= null">
,gmt_create = #{gmtCreate}
</if>
<if test="replyType!= null">
,reply_type = #{replyType}
</if>
<if test="replyContent!= null">
,reply_content = #{replyContent}
</if>
<if test="replyUserName!= null">
,reply_user_name = #{replyUserName}
</if>
<if test="replyOrgName!= null">
,reply_org_name = #{replyOrgName}
</if>
WHERE
id = #{id}
</update>
<update id="remove" parameterType="map">
UPDATE
msjd_web_site_reply
SET
is_delete = 1
WHERE
id IN
<foreach collection="ids" index="index" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</update>
</mapper>

Some files were not shown because too many files have changed in this diff Show More