From 915ab078c00ed39a61a0e453c0dcc38dd54d0e7a Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Tue, 12 Oct 2021 11:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9B=86=E5=AE=81=E7=8E=AF?= =?UTF-8?q?=E4=BF=9D=E5=8F=91=E7=8E=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 9 +- .../v2/IndustryCheckItemAppController.java | 97 +++++++++++++++++++ src/main/resources/application-test.yml | 10 +- src/main/resources/bpmn/check-self.bpmn | 2 + .../enterpriseofgridoperator-mapper.xml | 1 + 5 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/cm/inspection/controller/app/apis/industrycheckitem/v2/IndustryCheckItemAppController.java diff --git a/readme.md b/readme.md index 84d1568..cf12847 100644 --- a/readme.md +++ b/readme.md @@ -35,8 +35,13 @@ ## 集宁环保厅 -1. 案件上报与流转与包头一致 -2. 不一致的地方是,集宁环保的检查选项与企业行业有关,而不与网格长有关。 +1. 案件上报与流转与包头v1一致 +2. 不一致的地方是 + 1. 企业管理设置 **行业类型** + 2. 企业管理设置 **所属分类** + 3. 行业与检查项配置 + 4. 企业类型与检查项配置 + 5. 网格员管理 **是否为网格员** 设置为 **是** 3. 上报案件时,检查项由当前检查的企业中的行业(industryId)决定。 4. 上报时校对检查项也是由企业中的行业(industryId)决定。 diff --git a/src/main/java/com/cm/inspection/controller/app/apis/industrycheckitem/v2/IndustryCheckItemAppController.java b/src/main/java/com/cm/inspection/controller/app/apis/industrycheckitem/v2/IndustryCheckItemAppController.java new file mode 100644 index 0000000..2206ba6 --- /dev/null +++ b/src/main/java/com/cm/inspection/controller/app/apis/industrycheckitem/v2/IndustryCheckItemAppController.java @@ -0,0 +1,97 @@ +package com.cm.inspection.controller.app.apis.industrycheckitem.v2; + +import com.cm.common.annotation.CheckRequestBodyAnnotation; +import com.cm.common.base.AbstractController; +import com.cm.common.constants.ISystemConstant; +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.industrycheckitem.IndustryCheckItemDTO; +import com.cm.inspection.pojo.vos.industrycheckitem.IndustryCheckItemBindVO; +import com.cm.inspection.service.industrycheckitem.IIndustryCheckItemService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IndustryCheckItemAppController + * @Description: 行业检查项 + * @Author: WenG + * @Date: 2020-03-27 22:12 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "行业检查项接口") +@RestController("industryCheckItemV2AppController") +@RequestMapping(ISystemConstant.APP_PREFIX + "/industrycheckitem/v2") +public class IndustryCheckItemAppController extends AbstractController { + + @Autowired + private IIndustryCheckItemService industryCheckItemService; + + @ApiOperation(value = "新增行业检查项", notes = "新增行业检查项接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("saveindustrycheckitembynatureid/{natureId}") + @CheckRequestBodyAnnotation + public SuccessResult saveIndustryCheckItemByNatureId(@RequestHeader("token") String token, @PathVariable("natureId") String natureId, @RequestBody IndustryCheckItemBindVO industryCheckItemBindVO) throws Exception { + return industryCheckItemService.saveIndustryCheckItemByNatureIdAndToken(token, natureId, industryCheckItemBindVO); + } + + @ApiOperation(value = "行业检查项详情(通过ID)", notes = "行业检查项详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "industryCheckItemId", value = "行业检查项ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getindustrycheckitembyid/{industryCheckItemId}") + public IndustryCheckItemDTO getIndustryCheckItemById(@RequestHeader("token") String token, @PathVariable("industryCheckItemId") String industryCheckItemId) throws SearchException { + return industryCheckItemService.getIndustryCheckItemById(industryCheckItemId); + } + + @ApiOperation(value = "行业检查项列表", notes = "行业检查项列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listindustrycheckitem") + public List listIndustryCheckItem(@RequestHeader("token") String token) throws SearchException { + Map params = requestParams(); + return industryCheckItemService.listIndustryCheckItem(params); + } + + @ApiOperation(value = "我的检查项列表", notes = "我的检查项列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-of-mine") + public List listOfMine(@RequestHeader("token") String token) throws SearchException { + Map params = requestParams(); + return industryCheckItemService.listOfMine(token, params); + } + + @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("listpageindustrycheckitem") + public SuccessResultList> listPageIndustryCheckItem(@RequestHeader("token") String token, ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return industryCheckItemService.listPageIndustryCheckItem(page); + } + +} \ No newline at end of file diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 2ae3dc0..b1ae4e5 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -21,11 +21,11 @@ spring: datasource: druid: # url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false - url: jdbc:mysql://127.0.0.1:3306/db_btyjj_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false + url: jdbc:mysql://106.12.218.237:8668/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false db-type: mysql driver-class-name: com.mysql.jdbc.Driver - username: root - password: root + username: wanggeng + password: TSkj@0471.123 initial-size: 2 min-idle: 2 max-active: 5 @@ -86,8 +86,8 @@ security: oauth-server: http://192.168.0.103:7001/usercenter oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url} client: - client-id: 32ec344a5fd04fd9911586df5d1dc36b - client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== + client-id: 44a8dc867f7f4465b7ba6065d87e30d7 + client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token grant-type: authorization_code diff --git a/src/main/resources/bpmn/check-self.bpmn b/src/main/resources/bpmn/check-self.bpmn index 3b6eef3..553d255 100644 --- a/src/main/resources/bpmn/check-self.bpmn +++ b/src/main/resources/bpmn/check-self.bpmn @@ -17,9 +17,11 @@ +