处理问题
This commit is contained in:
parent
0fc503de8c
commit
2d1470f505
@ -0,0 +1,108 @@
|
|||||||
|
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.component.SecurityComponent;
|
||||||
|
import com.cm.common.constants.ISystemConstant;
|
||||||
|
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.industrycheckitem.v2.IndustryCheckItemDTO;
|
||||||
|
import com.cm.inspection.pojo.vos.industrycheckitem.v2.IndustryCheckItemBindVO;
|
||||||
|
import com.cm.inspection.service.industrycheckitem.v2.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: IndustryCheckItemController
|
||||||
|
* @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;
|
||||||
|
@Autowired
|
||||||
|
private SecurityComponent securityComponent;
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增行业检查项", notes = "新增行业检查项接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PostMapping("saveindustrycheckitembyindustryid/{industryId}")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult saveIndustryCheckItemByNatureId(@PathVariable("industryId") String industryId, @RequestBody IndustryCheckItemBindVO industryCheckItemBindVO) throws Exception {
|
||||||
|
return industryCheckItemService.saveIndustryCheckItemByNatureId(industryId, industryCheckItemBindVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "行业检查项详情(通过ID)", notes = "行业检查项详情(通过ID)接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "industryCheckItemId", value = "行业检查项ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("getindustrycheckitembyid/{industryCheckItemId}")
|
||||||
|
public IndustryCheckItemDTO getIndustryCheckItemById(@PathVariable("industryCheckItemId") String industryCheckItemId) throws SearchException {
|
||||||
|
return industryCheckItemService.getIndustryCheckItemById(industryCheckItemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "行业检查项列表", notes = "行业检查项列表接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listindustrycheckitem")
|
||||||
|
public List<IndustryCheckItemDTO> listIndustryCheckItem() throws SearchException {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return industryCheckItemService.listIndustryCheckItem(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "行业检查项列表(通过场所性质)", notes = "行业检查项列表(通过行业类型)接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listindustrycheckitembyindustryid/{industryId}")
|
||||||
|
public List<IndustryCheckItemDTO> listIndustryCheckItemByNatureId(@PathVariable("industryId") String industryId) throws SearchException {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
params.put("industryId", industryId);
|
||||||
|
return industryCheckItemService.listIndustryCheckItem(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "行业检查项列表(通过行业)", notes = "行业检查项列表(通过行业)接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "industryId", value = "行业ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listbyindustryid/{industryId}")
|
||||||
|
public List<IndustryCheckItemDTO> listByIndustryId(@PathVariable("industryId") String industryId) {
|
||||||
|
return industryCheckItemService.listByIndustryId(industryId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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("listpageindustrycheckitem")
|
||||||
|
public SuccessResultList<List<IndustryCheckItemDTO>> listPageIndustryCheckItem(ListPage page) throws SearchException {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
return industryCheckItemService.listPageIndustryCheckItem(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("getcurrentuseridinfo")
|
||||||
|
public CurrentUserIdInfoDTO getCurrentUserIdInfo() {
|
||||||
|
return securityComponent.getCurrentUserIdInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -20,14 +20,14 @@ spring:
|
|||||||
max-request-size: 1GB
|
max-request-size: 1GB
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
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://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_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
# url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||||
db-type: mysql
|
db-type: mysql
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
# username: wanggeng
|
username: wanggeng
|
||||||
username: root
|
# username: root
|
||||||
# password: WenG>2132997
|
password: WenG>2132997
|
||||||
password: root
|
# password: root
|
||||||
initial-size: 2
|
initial-size: 2
|
||||||
min-idle: 2
|
min-idle: 2
|
||||||
max-active: 5
|
max-active: 5
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
t1.check_item_id,
|
t1.check_item_id,
|
||||||
t1.check_item_option_id
|
t1.check_item_option_id
|
||||||
FROM
|
FROM
|
||||||
gen_check_item_option t1
|
gen_enterprise_check_item_option_v2 t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
|
@ -181,6 +181,8 @@
|
|||||||
jt1.nature_dictionary_name,
|
jt1.nature_dictionary_name,
|
||||||
jt1.is_log_off is_log_off_by_enterprise_id,
|
jt1.is_log_off is_log_off_by_enterprise_id,
|
||||||
jt1.legal_person,
|
jt1.legal_person,
|
||||||
|
jt1.industry_type industry_type_join_by_enterprise_id,
|
||||||
|
jt2.dictionary_name industry_type_dictionary_name,
|
||||||
t1.enterprise_of_grid_operator_id
|
t1.enterprise_of_grid_operator_id
|
||||||
FROM
|
FROM
|
||||||
gen_enterprise_of_grid_operator t1
|
gen_enterprise_of_grid_operator t1
|
||||||
@ -190,6 +192,12 @@
|
|||||||
t1.enterprise_id = jt1.enterprise_id
|
t1.enterprise_id = jt1.enterprise_id
|
||||||
AND
|
AND
|
||||||
jt1.is_delete = 0
|
jt1.is_delete = 0
|
||||||
|
LEFT JOIN
|
||||||
|
data_dictionary jt2
|
||||||
|
ON
|
||||||
|
jt1.industry_type = jt2.dictionary_id
|
||||||
|
AND
|
||||||
|
jt2.is_delete = 0
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
|
@ -393,10 +393,10 @@
|
|||||||
gen_check_item jt1
|
gen_check_item jt1
|
||||||
ON
|
ON
|
||||||
t1.check_item_id = jt1.check_item_id
|
t1.check_item_id = jt1.check_item_id
|
||||||
INNER JOIN
|
-- INNER JOIN
|
||||||
gen_industry_check_item_v2 jt2
|
-- gen_industry_check_item_v2 jt2
|
||||||
ON
|
-- ON
|
||||||
t1.check_item_id = jt2.check_item_id
|
-- t1.check_item_id = jt2.check_item_id
|
||||||
WHERE
|
WHERE
|
||||||
jt1.is_delete = 0
|
jt1.is_delete = 0
|
||||||
<if test="taskEnterpriseId != null and taskEnterpriseId != ''">
|
<if test="taskEnterpriseId != null and taskEnterpriseId != ''">
|
||||||
|
Loading…
Reference in New Issue
Block a user