From 718bbd53ed86b17ea872a3e254f136b23c1f4250 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Mon, 20 Apr 2020 19:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=85=B1=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PublicAreaReportController.java | 128 +++++ .../PublicAreaReportAppController.java | 143 ++++++ .../PublicAreaReportResourceController.java | 127 +++++ .../IPublicAreaReportDao.java | 66 +++ .../publicareareport/PublicAreaReportDTO.java | 148 ++++++ .../pojo/dtos/taskcheck/TaskCheckDTO.java | 24 + .../publicareareport/PublicAreaReportVO.java | 142 ++++++ .../service/check/impl/CheckServiceImpl.java | 6 +- .../IPublicAreaReportService.java | 129 +++++ .../impl/PublicAreaReportServiceImpl.java | 168 +++++++ .../publicareareport-mapper.xml | 203 ++++++++ .../mapper/taskcheck/taskcheck-mapper.xml | 24 +- .../static/route/check/save-recheck-mine.html | 13 +- .../route/check/save-taskcheck-mine.html | 443 ++++++++++++++++++ .../list-publicareareport.html | 341 ++++++++++++++ .../save-publicareareport.html | 406 ++++++++++++++++ .../update-publicareareport.html | 415 ++++++++++++++++ .../route/taskcheck/list-taskcheck-mine.html | 43 +- 18 files changed, 2928 insertions(+), 41 deletions(-) create mode 100644 src/main/java/com/cm/inspection/controller/apis/publicareareport/PublicAreaReportController.java create mode 100644 src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java create mode 100644 src/main/java/com/cm/inspection/controller/resources/publicareareport/PublicAreaReportResourceController.java create mode 100644 src/main/java/com/cm/inspection/dao/publicareareport/IPublicAreaReportDao.java create mode 100644 src/main/java/com/cm/inspection/pojo/dtos/publicareareport/PublicAreaReportDTO.java create mode 100644 src/main/java/com/cm/inspection/pojo/vos/publicareareport/PublicAreaReportVO.java create mode 100644 src/main/java/com/cm/inspection/service/publicareareport/IPublicAreaReportService.java create mode 100644 src/main/java/com/cm/inspection/service/publicareareport/impl/PublicAreaReportServiceImpl.java create mode 100644 src/main/resources/mybatis/mapper/publicareareport/publicareareport-mapper.xml create mode 100644 src/main/resources/static/route/check/save-taskcheck-mine.html create mode 100644 src/main/resources/static/route/publicareareport/list-publicareareport.html create mode 100644 src/main/resources/static/route/publicareareport/save-publicareareport.html create mode 100644 src/main/resources/static/route/publicareareport/update-publicareareport.html diff --git a/src/main/java/com/cm/inspection/controller/apis/publicareareport/PublicAreaReportController.java b/src/main/java/com/cm/inspection/controller/apis/publicareareport/PublicAreaReportController.java new file mode 100644 index 0000000..c040db9 --- /dev/null +++ b/src/main/java/com/cm/inspection/controller/apis/publicareareport/PublicAreaReportController.java @@ -0,0 +1,128 @@ +package com.cm.inspection.controller.apis.publicareareport; + +import com.cm.common.annotation.CheckRequestBodyAnnotation; +import com.cm.common.base.AbstractController; +import com.cm.common.component.SecurityComponent; +import com.cm.common.constants.ISystemConstant; +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.dtos.CurrentUserIdInfoDTO; +import com.cm.common.result.ErrorResult; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; +import com.cm.inspection.service.publicareareport.IPublicAreaReportService; +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; + +/** + * @ClassName: PublicAreaReportController + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "公共区域上报接口") +@RestController +@RequestMapping(ISystemConstant.API_PREFIX + "/publicareareport") +public class PublicAreaReportController extends AbstractController { + + @Autowired + private IPublicAreaReportService publicAreaReportService; + @Autowired + private SecurityComponent securityComponent; + + @ApiOperation(value = "新增公共区域上报", notes = "新增公共区域上报接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("savepublicareareport") + @CheckRequestBodyAnnotation + public SuccessResult savePublicAreaReport(@RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + return publicAreaReportService.savePublicAreaReport(publicAreaReportVO); + } + + @ApiOperation(value = "删除公共区域上报(id列表)", notes = "删除公共区域上报(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("removepublicareareport/{ids}") + public SuccessResult removePublicAreaReport(@PathVariable("ids") String ids) throws RemoveException { + return publicAreaReportService.removePublicAreaReport(ids); + } + + @ApiOperation(value = "修改公共区域上报", notes = "修改公共区域上报接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatepublicareareport/{publicAreaReportId}") + @CheckRequestBodyAnnotation + public SuccessResult updatePublicAreaReport(@PathVariable("publicAreaReportId") String publicAreaReportId, @RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + return publicAreaReportService.updatePublicAreaReport(publicAreaReportId, publicAreaReportVO); + } + + @ApiOperation(value = "公共区域上报详情(通过ID)", notes = "公共区域上报详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getpublicareareportbyid/{publicAreaReportId}") + public PublicAreaReportDTO getPublicAreaReportById(@PathVariable("publicAreaReportId") String publicAreaReportId) throws SearchException { + return publicAreaReportService.getPublicAreaReportById(publicAreaReportId); + } + + @ApiOperation(value = "公共区域上报列表", notes = "公共区域上报列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpublicareareport") + public List listPublicAreaReport() throws SearchException { + Map params = requestParams(); + return publicAreaReportService.listPublicAreaReport(params); + } + + @ApiOperation(value = "公共区域上报分页列表", notes = "公共区域上报分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareport") + public SuccessResultList> listPagePublicAreaReport(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReport(page); + } + + @ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getcurrentuseridinfo") + public CurrentUserIdInfoDTO getCurrentUserIdInfo() { + return securityComponent.getCurrentUserIdInfo(); + } + + @ApiOperation(value = "公共区域上报分页(我的)列表", notes = "公共区域上报分页列表(我的)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareportofmine") + public SuccessResultList> listPagePublicAreaReportOfMine(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReportOfMine(page); + } + +} \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java b/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java new file mode 100644 index 0000000..0143fcf --- /dev/null +++ b/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java @@ -0,0 +1,143 @@ +package com.cm.inspection.controller.app.apis.publicareareport; + +import com.cm.common.annotation.CheckRequestBodyAnnotation; +import com.cm.common.base.AbstractController; +import com.cm.common.constants.ISystemConstant; +import com.cm.common.exception.ParamsException; +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.ErrorResult; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultList; +import com.cm.common.utils.RegexUtil; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; +import com.cm.inspection.service.publicareareport.IPublicAreaReportService; +import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +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; + +/** + * @ClassName: PublicAreaReportAppController + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "公共区域上报接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/publicareareport") +public class PublicAreaReportAppController extends AbstractController { + + @Autowired + private IPublicAreaReportService publicAreaReportService; + + @ApiOperation(value = "新增公共区域上报", notes = "新增公共区域上报接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("savepublicareareport") + @CheckRequestBodyAnnotation + public SuccessResult savePublicAreaReport(@RequestHeader("token") String token, @RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + if (publicAreaReportVO.getCheckType() != 1) { + throw new ParamsException("检查类型错误"); + } + if (!RegexUtil.isDate(publicAreaReportVO.getCheckDate())) { + throw new ParamsException("检查日期错误"); + } + return publicAreaReportService.savePublicAreaReportByToken(token, publicAreaReportVO); + } + + @ApiOperation(value = "删除公共区域上报(id列表)", notes = "删除公共区域上报(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("removepublicareareport/{ids}") + public SuccessResult removePublicAreaReport(@RequestHeader("token") String token, @PathVariable("ids") String ids) throws RemoveException { + return publicAreaReportService.removePublicAreaReportByToken(token, ids); + } + + @ApiOperation(value = "修改公共区域上报", notes = "修改公共区域上报接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatepublicareareport/{publicAreaReportId}") + @CheckRequestBodyAnnotation + public SuccessResult updatePublicAreaReport(@RequestHeader("token") String token, @PathVariable("publicAreaReportId") String publicAreaReportId, @RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + if (publicAreaReportVO.getCheckType() != 2 && publicAreaReportVO.getCheckType() != 3) { + throw new ParamsException("检查类型错误"); + } + if (!RegexUtil.isDate(publicAreaReportVO.getRecheckDate())) { + throw new ParamsException("检查日期错误"); + } + return publicAreaReportService.updatePublicAreaReportByToken(token, publicAreaReportId, publicAreaReportVO); + } + + @ApiOperation(value = "公共区域上报详情(通过ID)", notes = "公共区域上报详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getpublicareareportbyid/{publicAreaReportId}") + public PublicAreaReportDTO getPublicAreaReportById(@RequestHeader("token") String token, @PathVariable("publicAreaReportId") String publicAreaReportId) throws SearchException { + return publicAreaReportService.getPublicAreaReportById(publicAreaReportId); + } + + @ApiOperation(value = "公共区域上报列表", notes = "公共区域上报列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpublicareareport") + public List listPublicAreaReport(@RequestHeader("token") String token) throws SearchException { + Map params = requestParams(); + return publicAreaReportService.listPublicAreaReport(params); + } + + @ApiOperation(value = "公共区域上报分页列表", notes = "公共区域上报分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareport") + public SuccessResultList> listPagePublicAreaReport(@RequestHeader("token") String token, ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReport(page); + } + + @ApiOperation(value = "公共区域上报分页(我的)列表", notes = "公共区域上报分页列表(我的)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareportofmine") + public SuccessResultList> listPagePublicAreaReportOfMine(@RequestHeader("token") String token, ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReportOfMine(token, page); + } + +} \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/controller/resources/publicareareport/PublicAreaReportResourceController.java b/src/main/java/com/cm/inspection/controller/resources/publicareareport/PublicAreaReportResourceController.java new file mode 100644 index 0000000..ae84688 --- /dev/null +++ b/src/main/java/com/cm/inspection/controller/resources/publicareareport/PublicAreaReportResourceController.java @@ -0,0 +1,127 @@ +package com.cm.inspection.controller.resources.publicareareport; + +import com.cm.common.annotation.CheckRequestBodyAnnotation; +import com.cm.common.base.AbstractController; +import com.cm.common.constants.ISystemConstant; +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.ErrorResult; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; +import com.cm.inspection.service.publicareareport.IPublicAreaReportService; +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; + +/** + * @ClassName: PublicAreaReportResourceController + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "公共区域上报接口") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/publicareareport") +public class PublicAreaReportResourceController extends AbstractController { + + @Autowired + private IPublicAreaReportService publicAreaReportService; + + @ApiOperation(value = "新增公共区域上报", notes = "新增公共区域上报接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("savepublicareareport") + @CheckRequestBodyAnnotation + public SuccessResult savePublicAreaReport(@RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + return publicAreaReportService.savePublicAreaReport(publicAreaReportVO); + } + + @ApiOperation(value = "删除公共区域上报(id列表)", notes = "删除公共区域上报(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("removepublicareareport/{ids}") + public SuccessResult removePublicAreaReport(@PathVariable("ids") String ids) throws RemoveException { + return publicAreaReportService.removePublicAreaReport(ids); + } + + @ApiOperation(value = "修改公共区域上报", notes = "修改公共区域上报接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatepublicareareport/{publicAreaReportId}") + @CheckRequestBodyAnnotation + public SuccessResult updatePublicAreaReport(@PathVariable("publicAreaReportId") String publicAreaReportId, @RequestBody PublicAreaReportVO publicAreaReportVO) throws Exception { + return publicAreaReportService.updatePublicAreaReport(publicAreaReportId, publicAreaReportVO); + } + + @ApiOperation(value = "公共区域上报详情(通过ID)", notes = "公共区域上报详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "publicAreaReportId", value = "公共区域上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getpublicareareportbyid/{publicAreaReportId}") + public PublicAreaReportDTO getPublicAreaReportById(@PathVariable("publicAreaReportId") String publicAreaReportId) throws SearchException { + return publicAreaReportService.getPublicAreaReportById(publicAreaReportId); + } + + @ApiOperation(value = "公共区域上报列表", notes = "公共区域上报列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpublicareareport") + public List listPublicAreaReport() throws SearchException { + Map params = requestParams(); + return publicAreaReportService.listPublicAreaReport(params); + } + + @ApiOperation(value = "公共区域上报分页列表", notes = "公共区域上报分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareport") + public SuccessResultList> listPagePublicAreaReport(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReport(page); + } + + @ApiOperation(value = "公共区域上报分页(我的)列表", notes = "公共区域上报分页列表(我的)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagepublicareareportofmine") + public SuccessResultList> listPagePublicAreaReportOfMine(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return publicAreaReportService.listPagePublicAreaReportOfMine(page); + } + +} \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/dao/publicareareport/IPublicAreaReportDao.java b/src/main/java/com/cm/inspection/dao/publicareareport/IPublicAreaReportDao.java new file mode 100644 index 0000000..0758819 --- /dev/null +++ b/src/main/java/com/cm/inspection/dao/publicareareport/IPublicAreaReportDao.java @@ -0,0 +1,66 @@ +package com.cm.inspection.dao.publicareareport; + +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SaveException; +import com.cm.common.exception.SearchException; +import com.cm.common.exception.UpdateException; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IPublicAreaReportDao + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@Repository +public interface IPublicAreaReportDao { + + /** + * 新增公共区域上报 + * + * @param params + * @throws SaveException + */ + void savePublicAreaReport(Map params) throws SaveException; + + /** + * 删除公共区域上报 + * + * @param params + * @throws RemoveException + */ + void removePublicAreaReport(Map params) throws RemoveException; + + /** + * 修改公共区域上报 + * + * @param params + * @throws UpdateException + */ + void updatePublicAreaReport(Map params) throws UpdateException; + + /** + * 公共区域上报详情 + * + * @param params + * @return + * @throws SearchException + */ + PublicAreaReportDTO getPublicAreaReport(Map params) throws SearchException; + + /** + * 公共区域上报列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPublicAreaReport(Map params) throws SearchException; + +} diff --git a/src/main/java/com/cm/inspection/pojo/dtos/publicareareport/PublicAreaReportDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/publicareareport/PublicAreaReportDTO.java new file mode 100644 index 0000000..713361e --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/dtos/publicareareport/PublicAreaReportDTO.java @@ -0,0 +1,148 @@ +package com.cm.inspection.pojo.dtos.publicareareport; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: PublicAreaReportDTO + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@ApiModel +public class PublicAreaReportDTO { + + @ApiModelProperty(name = "publicAreaReportId", value = "主键") + private String publicAreaReportId; + @ApiModelProperty(name = "checkAddress", value = "检查地址") + private String checkAddress; + @ApiModelProperty(name = "checkDate", value = "检查时间") + private String checkDate; + @ApiModelProperty(name = "checkContent", value = "检查内容") + private String checkContent; + @ApiModelProperty(name = "checkPhotos", value = "检查图片") + private String checkPhotos; + @ApiModelProperty(name = "checkType", value = "检查类型") + private Integer checkType; + @ApiModelProperty(name = "checkLng", value = "检查经度") + private String checkLng; + @ApiModelProperty(name = "checkLat", value = "检查纬度") + private String checkLat; + @ApiModelProperty(name = "recheckContent", value = "复查描述") + private String recheckContent; + @ApiModelProperty(name = "recheckDate", value = "复查时间") + private String recheckDate; + @ApiModelProperty(name = "recheckPhotos", value = "复查图片") + private String recheckPhotos; + @ApiModelProperty(name = "recheckLng", value = "复查经度") + private String recheckLng; + @ApiModelProperty(name = "recheckLat", value = "复查纬度") + private String recheckLat; + + public String getPublicAreaReportId() { + return publicAreaReportId == null ? "" : publicAreaReportId; + } + + public void setPublicAreaReportId(String publicAreaReportId) { + this.publicAreaReportId = publicAreaReportId; + } + public String getCheckAddress() { + return checkAddress == null ? "" : checkAddress; + } + + public void setCheckAddress(String checkAddress) { + this.checkAddress = checkAddress; + } + + public String getCheckDate() { + return checkDate == null ? "" : checkDate; + } + + public void setCheckDate(String checkDate) { + this.checkDate = checkDate; + } + + public String getCheckContent() { + return checkContent == null ? "" : checkContent; + } + + public void setCheckContent(String checkContent) { + this.checkContent = checkContent; + } + + public String getCheckPhotos() { + return checkPhotos == null ? "" : checkPhotos; + } + + public void setCheckPhotos(String checkPhotos) { + this.checkPhotos = checkPhotos; + } + + public Integer getCheckType() { + return checkType == null ? 0 : checkType; + } + + public void setCheckType(Integer checkType) { + this.checkType = checkType; + } + + public String getCheckLng() { + return checkLng == null ? "" : checkLng; + } + + public void setCheckLng(String checkLng) { + this.checkLng = checkLng; + } + + public String getCheckLat() { + return checkLat == null ? "" : checkLat; + } + + public void setCheckLat(String checkLat) { + this.checkLat = checkLat; + } + + public String getRecheckContent() { + return recheckContent == null ? "" : recheckContent; + } + + public void setRecheckContent(String recheckContent) { + this.recheckContent = recheckContent; + } + + public String getRecheckDate() { + return recheckDate == null ? "" : recheckDate; + } + + public void setRecheckDate(String recheckDate) { + this.recheckDate = recheckDate; + } + + public String getRecheckPhotos() { + return recheckPhotos == null ? "" : recheckPhotos; + } + + public void setRecheckPhotos(String recheckPhotos) { + this.recheckPhotos = recheckPhotos; + } + + public String getRecheckLng() { + return recheckLng == null ? "" : recheckLng; + } + + public void setRecheckLng(String recheckLng) { + this.recheckLng = recheckLng; + } + + public String getRecheckLat() { + return recheckLat == null ? "" : recheckLat; + } + + public void setRecheckLat(String recheckLat) { + this.recheckLat = recheckLat; + } + + +} diff --git a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/TaskCheckDTO.java b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/TaskCheckDTO.java index f9e0b53..6a9f7ec 100644 --- a/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/TaskCheckDTO.java +++ b/src/main/java/com/cm/inspection/pojo/dtos/taskcheck/TaskCheckDTO.java @@ -25,6 +25,10 @@ public class TaskCheckDTO { private String enterpriseMaster; @ApiModelProperty(name = "enterprisePhone", value = "企业负责人电话") private String enterprisePhone; + @ApiModelProperty(name = "enterpriseNature", value = "企业场所性质") + private String enterpriseNature; + @ApiModelProperty(name = "enterpriseNatureDictionaryName", value = "企业场所性质名称") + private String enterpriseNatureDictionaryName; @ApiModelProperty(name = "gmtCreate", value = "发布时间") private String gmtCreate; @ApiModelProperty(name = "userId", value = "处理人") @@ -80,6 +84,22 @@ public class TaskCheckDTO { this.enterprisePhone = enterprisePhone; } + public String getEnterpriseNature() { + return enterpriseNature == null ? "" : enterpriseNature; + } + + public void setEnterpriseNature(String enterpriseNature) { + this.enterpriseNature = enterpriseNature; + } + + public String getEnterpriseNatureDictionaryName() { + return enterpriseNatureDictionaryName == null ? "" : enterpriseNatureDictionaryName; + } + + public void setEnterpriseNatureDictionaryName(String enterpriseNatureDictionaryName) { + this.enterpriseNatureDictionaryName = enterpriseNatureDictionaryName; + } + public String getUserId() { return userId == null ? "" : userId.trim(); } @@ -119,6 +139,10 @@ public class TaskCheckDTO { .append(enterpriseMaster).append('\"'); sb.append(",\"enterprisePhone\":\"") .append(enterprisePhone).append('\"'); + sb.append(",\"enterpriseNature\":\"") + .append(enterpriseNature).append('\"'); + sb.append(",\"enterpriseNatureDictionaryName\":\"") + .append(enterpriseNatureDictionaryName).append('\"'); sb.append(",\"gmtCreate\":\"") .append(gmtCreate).append('\"'); sb.append(",\"userId\":\"") diff --git a/src/main/java/com/cm/inspection/pojo/vos/publicareareport/PublicAreaReportVO.java b/src/main/java/com/cm/inspection/pojo/vos/publicareareport/PublicAreaReportVO.java new file mode 100644 index 0000000..3ab0949 --- /dev/null +++ b/src/main/java/com/cm/inspection/pojo/vos/publicareareport/PublicAreaReportVO.java @@ -0,0 +1,142 @@ +package com.cm.inspection.pojo.vos.publicareareport; + +import com.cm.common.annotation.CheckEmptyAnnotation; +import com.cm.common.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: PublicAreaReportVO + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@ApiModel +public class PublicAreaReportVO { + + @ApiModelProperty(name = "checkAddress", value = "检查地址") + private String checkAddress; + @ApiModelProperty(name = "checkDate", value = "检查时间") + private String checkDate; + @ApiModelProperty(name = "checkContent", value = "检查内容") + private String checkContent; + @ApiModelProperty(name = "checkPhotos", value = "检查图片") + private String checkPhotos; + @ApiModelProperty(name = "checkType", value = "检查类型") + @CheckNumberAnnotation(name = "检查类型", types = {"1", "2", "3"}) + private Integer checkType; + @ApiModelProperty(name = "checkLng", value = "检查经度") + private String checkLng; + @ApiModelProperty(name = "checkLat", value = "检查纬度") + private String checkLat; + @ApiModelProperty(name = "recheckContent", value = "复查描述") + private String recheckContent; + @ApiModelProperty(name = "recheckDate", value = "复查时间") + private String recheckDate; + @ApiModelProperty(name = "recheckPhotos", value = "复查图片") + private String recheckPhotos; + @ApiModelProperty(name = "recheckLng", value = "复查经度") + private String recheckLng; + @ApiModelProperty(name = "recheckLat", value = "复查纬度") + private String recheckLat; + + public String getCheckAddress() { + return checkAddress == null ? "" : checkAddress; + } + + public void setCheckAddress(String checkAddress) { + this.checkAddress = checkAddress; + } + + public String getCheckDate() { + return checkDate == null ? "" : checkDate; + } + + public void setCheckDate(String checkDate) { + this.checkDate = checkDate; + } + + public String getCheckContent() { + return checkContent == null ? "" : checkContent; + } + + public void setCheckContent(String checkContent) { + this.checkContent = checkContent; + } + + public String getCheckPhotos() { + return checkPhotos == null ? "" : checkPhotos; + } + + public void setCheckPhotos(String checkPhotos) { + this.checkPhotos = checkPhotos; + } + + public Integer getCheckType() { + return checkType == null ? 0 : checkType; + } + + public void setCheckType(Integer checkType) { + this.checkType = checkType; + } + + public String getCheckLng() { + return checkLng == null ? "" : checkLng; + } + + public void setCheckLng(String checkLng) { + this.checkLng = checkLng; + } + + public String getCheckLat() { + return checkLat == null ? "" : checkLat; + } + + public void setCheckLat(String checkLat) { + this.checkLat = checkLat; + } + + public String getRecheckContent() { + return recheckContent == null ? "" : recheckContent; + } + + public void setRecheckContent(String recheckContent) { + this.recheckContent = recheckContent; + } + + public String getRecheckDate() { + return recheckDate == null ? "" : recheckDate; + } + + public void setRecheckDate(String recheckDate) { + this.recheckDate = recheckDate; + } + + public String getRecheckPhotos() { + return recheckPhotos == null ? "" : recheckPhotos; + } + + public void setRecheckPhotos(String recheckPhotos) { + this.recheckPhotos = recheckPhotos; + } + + public String getRecheckLng() { + return recheckLng == null ? "" : recheckLng; + } + + public void setRecheckLng(String recheckLng) { + this.recheckLng = recheckLng; + } + + public String getRecheckLat() { + return recheckLat == null ? "" : recheckLat; + } + + public void setRecheckLat(String recheckLat) { + this.recheckLat = recheckLat; + } + + +} diff --git a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java index ecf02d2..e3ed762 100644 --- a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java @@ -462,8 +462,10 @@ public class CheckServiceImpl extends BaseService implements ICheckService { checkItemDTO.setHiddenDangerReports(hiddenDangerReportDTOs); } checkDTO.setCheckItems(checkItemDTOs); - params.put("checkItemIds", checkItemParentIds); - setCheckItemParent(params, checkItemDTOs); + if (!checkItemParentIds.isEmpty()) { + params.put("checkItemIds", checkItemParentIds); + setCheckItemParent(params, checkItemDTOs); + } } return checkDTO; } diff --git a/src/main/java/com/cm/inspection/service/publicareareport/IPublicAreaReportService.java b/src/main/java/com/cm/inspection/service/publicareareport/IPublicAreaReportService.java new file mode 100644 index 0000000..a266be6 --- /dev/null +++ b/src/main/java/com/cm/inspection/service/publicareareport/IPublicAreaReportService.java @@ -0,0 +1,129 @@ +package com.cm.inspection.service.publicareareport; + +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SaveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultData; +import com.cm.common.result.SuccessResultList; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IPublicAreaReportService + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +public interface IPublicAreaReportService { + + /** + * 新增公共区域上报 + * + * @param publicAreaReportVO + * @return + * @throws Exception + */ + SuccessResult savePublicAreaReport(PublicAreaReportVO publicAreaReportVO) throws Exception; + + /** + * 新增公共区域上报(APP) + * + * @param token + * @param publicAreaReportVO + * @return + * @throws Exception + */ + SuccessResult savePublicAreaReportByToken(String token, PublicAreaReportVO publicAreaReportVO) throws Exception; + + /** + * 删除公共区域上报 + * + * @param ids + * @return + * @throws RemoveException + */ + SuccessResult removePublicAreaReport(String ids) throws RemoveException; + + /** + * 删除公共区域上报(APP) + * + * @param token + * @param ids + * @return + * @throws RemoveException + */ + SuccessResult removePublicAreaReportByToken(String token, String ids) throws RemoveException; + + /** + * 修改公共区域上报 + * + * @param publicAreaReportId + * @param publicAreaReportVO + * @return + * @throws Exception + */ + SuccessResult updatePublicAreaReport(String publicAreaReportId, PublicAreaReportVO publicAreaReportVO) throws Exception; + + /** + * 修改公共区域上报(APP) + * + * @param token + * @param publicAreaReportId + * @param publicAreaReportVO + * @return + * @throws Exception + */ + SuccessResult updatePublicAreaReportByToken(String token, String publicAreaReportId, PublicAreaReportVO publicAreaReportVO) throws Exception; + + /** + * 公共区域上报详情(通过ID) + * + * @param publicAreaReportId + * @return + * @throws SearchException + */ + PublicAreaReportDTO getPublicAreaReportById(String publicAreaReportId) throws SearchException; + + /** + * 公共区域上报列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPublicAreaReport(Map params) throws SearchException; + + /** + * 公共区域上报分页列表 + * + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPagePublicAreaReport(ListPage page) throws SearchException; + + /** + * 公共区域上报分页列表(我的) + * + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPagePublicAreaReportOfMine(ListPage page) throws SearchException; + + /** + * 公共区域上报分页列表(我的) + * + * @param token + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listPagePublicAreaReportOfMine(String token, ListPage page) throws SearchException; +} diff --git a/src/main/java/com/cm/inspection/service/publicareareport/impl/PublicAreaReportServiceImpl.java b/src/main/java/com/cm/inspection/service/publicareareport/impl/PublicAreaReportServiceImpl.java new file mode 100644 index 0000000..e10ac1c --- /dev/null +++ b/src/main/java/com/cm/inspection/service/publicareareport/impl/PublicAreaReportServiceImpl.java @@ -0,0 +1,168 @@ +package com.cm.inspection.service.publicareareport.impl; + +import com.cm.common.exception.RemoveException; +import com.cm.common.exception.SaveException; +import com.cm.common.exception.SearchException; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResult; +import com.cm.common.result.SuccessResultList; +import com.cm.common.token.app.AppTokenManager; +import com.cm.common.utils.HashMapUtil; +import com.cm.common.utils.UUIDUtil; +import com.cm.inspection.dao.publicareareport.IPublicAreaReportDao; +import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; +import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; +import com.cm.inspection.service.BaseService; +import com.cm.inspection.service.publicareareport.IPublicAreaReportService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: PublicAreaReportServiceImpl + * @Description: 公共区域上报 + * @Author: WenG + * @Date: 2020-04-20 17:27 + * @Version: 1.0 + **/ +@Service +public class PublicAreaReportServiceImpl extends BaseService implements IPublicAreaReportService { + + @Autowired + private IPublicAreaReportDao publicAreaReportDao; + + @Override + public SuccessResult savePublicAreaReport(PublicAreaReportVO publicAreaReportVO) throws Exception { + savePublicAreaReportInfo(null, publicAreaReportVO); + return new SuccessResult(); + } + + @Override + public SuccessResult savePublicAreaReportByToken(String token, PublicAreaReportVO publicAreaReportVO) throws Exception { + savePublicAreaReportInfo(token, publicAreaReportVO); + return new SuccessResult(); + } + + /** + * 新增公共区域上报 + * + * @param token + * @param publicAreaReportVO + * @throws Exception + */ + private void savePublicAreaReportInfo(String token, PublicAreaReportVO publicAreaReportVO) throws Exception { + Map params = HashMapUtil.beanToMap(publicAreaReportVO); + params.put("publicAreaReportId", UUIDUtil.getUUID()); + if (token != null) { + setSaveInfo(token, params); + } else { + setSaveInfo(params); + } + publicAreaReportDao.savePublicAreaReport(params); + } + + @Override + public SuccessResult removePublicAreaReport(String ids) throws RemoveException { + removePublicAreaReportInfo(null, ids); + return new SuccessResult(); + } + + @Override + public SuccessResult removePublicAreaReportByToken(String token, String ids) throws RemoveException { + removePublicAreaReportInfo(token, ids); + return new SuccessResult(); + } + + /** + * 删除公共区域上报 + * + * @param token + * @param ids + */ + private void removePublicAreaReportInfo(String token, String ids) { + Map params = getHashMap(3); + params.put("publicAreaReportIds", Arrays.asList(ids.split("_"))); + if (token != null) { + setUpdateInfo(token, params); + } else { + setUpdateInfo(params); + } + publicAreaReportDao.removePublicAreaReport(params); + } + + @Override + public SuccessResult updatePublicAreaReport(String publicAreaReportId, PublicAreaReportVO publicAreaReportVO) throws Exception { + updatePublicAreaReportInfo(null, publicAreaReportId, publicAreaReportVO); + return new SuccessResult(); + } + + @Override + public SuccessResult updatePublicAreaReportByToken(String token, String publicAreaReportId, PublicAreaReportVO publicAreaReportVO) throws Exception { + updatePublicAreaReportInfo(token, publicAreaReportId, publicAreaReportVO); + return new SuccessResult(); + } + + /** + * 修改公共区域上报 + * + * @param token + * @param publicAreaReportId + * @param publicAreaReportVO + */ + private void updatePublicAreaReportInfo(String token, String publicAreaReportId, PublicAreaReportVO publicAreaReportVO) throws Exception { + publicAreaReportVO.setCheckAddress(null); + publicAreaReportVO.setCheckContent(null); + publicAreaReportVO.setCheckDate(null); + publicAreaReportVO.setCheckPhotos(null); + publicAreaReportVO.setCheckLat(null); + publicAreaReportVO.setCheckLng(null); + Map params = HashMapUtil.beanToMap(publicAreaReportVO); + params.put("publicAreaReportId", publicAreaReportId); + if (token != null) { + setUpdateInfo(token, params); + } else { + setUpdateInfo(params); + } + publicAreaReportDao.updatePublicAreaReport(params); + } + + @Override + public PublicAreaReportDTO getPublicAreaReportById(String publicAreaReportId) throws SearchException { + Map params = super.getHashMap(1); + params.put("publicAreaReportId", publicAreaReportId); + return publicAreaReportDao.getPublicAreaReport(params); + } + + @Override + public List listPublicAreaReport(Map params) throws SearchException { + return publicAreaReportDao.listPublicAreaReport(params); + } + + @Override + public SuccessResultList> listPagePublicAreaReport(ListPage page) throws SearchException { + PageHelper.startPage(page.getPage(), page.getRows()); + List publicAreaReportDTOs = publicAreaReportDao.listPublicAreaReport(page.getParams()); + PageInfo pageInfo = new PageInfo<>(publicAreaReportDTOs); + return new SuccessResultList<>(publicAreaReportDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public SuccessResultList> listPagePublicAreaReportOfMine(ListPage page) throws SearchException { + return listPagePublicAreaReportOfMine(null, page); + } + + @Override + public SuccessResultList> listPagePublicAreaReportOfMine(String token, ListPage page) throws SearchException { + if (StringUtils.isBlank(token)) { + page.getParams().put("creator", securityComponent.getCurrentUser().getUserId()); + } else { + page.getParams().put("creator", AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId()); + } + return listPagePublicAreaReport(page); + } + +} diff --git a/src/main/resources/mybatis/mapper/publicareareport/publicareareport-mapper.xml b/src/main/resources/mybatis/mapper/publicareareport/publicareareport-mapper.xml new file mode 100644 index 0000000..2f7ad0b --- /dev/null +++ b/src/main/resources/mybatis/mapper/publicareareport/publicareareport-mapper.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO gen_public_area_report( + public_area_report_id, + check_address, + check_date, + check_content, + check_photos, + check_type, + check_lng, + check_lat, + recheck_content, + recheck_date, + recheck_photos, + recheck_lng, + recheck_lat, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{publicAreaReportId}, + #{checkAddress}, + #{checkDate}, + #{checkContent}, + #{checkPhotos}, + #{checkType}, + #{checkLng}, + #{checkLat}, + #{recheckContent}, + #{recheckDate}, + #{recheckPhotos}, + #{recheckLng}, + #{recheckLat}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + + + + + UPDATE + gen_public_area_report + SET + is_delete = 1, + modifier = #{modifier}, + gmt_modified = #{gmtModified} + WHERE + public_area_report_id IN + + #{publicAreaReportIds[${index}]} + + + + + + UPDATE + gen_public_area_report + SET + + check_address = #{checkAddress}, + + + check_date = #{checkDate}, + + + check_content = #{checkContent}, + + + check_photos = #{checkPhotos}, + + + check_type = #{checkType}, + + + check_lng = #{checkLng}, + + + check_lat = #{checkLat}, + + + recheck_content = #{recheckContent}, + + + recheck_date = #{recheckDate}, + + + recheck_photos = #{recheckPhotos}, + + + recheck_lng = #{recheckLng}, + + + recheck_lat = #{recheckLat}, + + modifier = #{modifier}, + gmt_modified = #{gmtModified} + WHERE + public_area_report_id = #{publicAreaReportId} + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/taskcheck/taskcheck-mapper.xml b/src/main/resources/mybatis/mapper/taskcheck/taskcheck-mapper.xml index d3ea789..06579b6 100644 --- a/src/main/resources/mybatis/mapper/taskcheck/taskcheck-mapper.xml +++ b/src/main/resources/mybatis/mapper/taskcheck/taskcheck-mapper.xml @@ -9,6 +9,8 @@ + + @@ -78,11 +80,23 @@ diff --git a/src/main/resources/static/route/check/save-recheck-mine.html b/src/main/resources/static/route/check/save-recheck-mine.html index fae9ad8..0d46767 100644 --- a/src/main/resources/static/route/check/save-recheck-mine.html +++ b/src/main/resources/static/route/check/save-recheck-mine.html @@ -31,7 +31,7 @@
- +
@@ -116,17 +116,6 @@ - - - -
-
- - - -
- - diff --git a/src/main/resources/static/route/check/save-taskcheck-mine.html b/src/main/resources/static/route/check/save-taskcheck-mine.html new file mode 100644 index 0000000..4c12c14 --- /dev/null +++ b/src/main/resources/static/route/check/save-taskcheck-mine.html @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + +
+
+
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/static/route/publicareareport/list-publicareareport.html b/src/main/resources/static/route/publicareareport/list-publicareareport.html new file mode 100644 index 0000000..42750d9 --- /dev/null +++ b/src/main/resources/static/route/publicareareport/list-publicareareport.html @@ -0,0 +1,341 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/publicareareport/save-publicareareport.html b/src/main/resources/static/route/publicareareport/save-publicareareport.html new file mode 100644 index 0000000..0df1a86 --- /dev/null +++ b/src/main/resources/static/route/publicareareport/save-publicareareport.html @@ -0,0 +1,406 @@ + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/publicareareport/update-publicareareport.html b/src/main/resources/static/route/publicareareport/update-publicareareport.html new file mode 100644 index 0000000..1f0306b --- /dev/null +++ b/src/main/resources/static/route/publicareareport/update-publicareareport.html @@ -0,0 +1,415 @@ + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/taskcheck/list-taskcheck-mine.html b/src/main/resources/static/route/taskcheck/list-taskcheck-mine.html index 4301f93..2f7d749 100644 --- a/src/main/resources/static/route/taskcheck/list-taskcheck-mine.html +++ b/src/main/resources/static/route/taskcheck/list-taskcheck-mine.html @@ -124,6 +124,14 @@ return rowData; } }, + {field: 'option', width: 100, title: '操作', align:'center', + templet: function(row) { + if(row.isHandled == 0) { + return ''; + } + return '-'; + } + }, ]], page: true, parseData: function(data) { @@ -199,36 +207,19 @@ reloadTable(1); }); // 事件 - 增删改 - table.on('toolbar(dataTable)', function(obj) { + table.on('tool(dataTable)', function(obj) { + var data = obj.data; var layEvent = obj.event; - var checkStatus = table.checkStatus('dataTable'); - var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { - layer.open({ - type: 2, - title: false, - closeBtn: 0, - area: ['100%', '100%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/taskcheck/save-taskcheck.html', []), - end: function() { + if(layEvent === 'handledCheckEvent') { + top.dialog.open({ + url: top.restAjax.path('route/check/save-taskcheck-mine.html?taskCheckId={taskCheckId}', [data.taskCheckId]), + title: '任务检查', + width: '80%', + height: '80%', + onClose: function() { reloadTable(); } }); - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectDelete); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += '_'; - } - ids += item['taskCheckId']; - } - removeData(ids); - } } }); });