13693261870
7 天以前 73e913fb24bf163ab9c5332ab960b1eb56a6402b
se-system/src/main/java/com/terra/system/controller/data/ProjectController.java
@@ -4,8 +4,8 @@
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.terra.system.annotation.SysLog;
import com.terra.system.controller.all.BaseController;
import com.terra.system.entity.all.ResponseMsg;
import com.terra.common.controller.all.BaseController;
import com.terra.common.entity.all.ResponseMsg;
import com.terra.system.entity.bs.BsprojectEntity;
import com.terra.system.entity.ctrl.KeyValueEntity;
import com.terra.system.entity.data.DictEntity;
@@ -19,12 +19,13 @@
import com.terra.system.service.data.DirService;
import com.terra.system.service.sys.DepService;
import com.terra.system.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import javax.annotation.Resource;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
@@ -34,7 +35,7 @@
 * 项目管理
 * @author WWW
 */
@Api(tags = "数据管理\\项目管理")
@Tag(name = "数据管理\\项目管理")
@RestController
@RequestMapping("/project")
public class ProjectController extends BaseController {
@@ -54,7 +55,7 @@
    BaseQueryService baseQueryService;
    @SysLog()
    @ApiOperation(value = "查询所有单位数据")
    @Operation(summary = "查询所有单位数据")
    @GetMapping(value = "/selectDepAll")
    public ResponseMsg<List<DepEntity>> selectDepAll() {
        try {
@@ -66,9 +67,9 @@
    }
    @SysLog()
    @ApiOperation(value = "查询项目")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "西")
    @Operation(summary = "查询项目")
    @Parameters({
            @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = "西")
    })
    @GetMapping(value = "/selectProject")
    public ResponseMsg<List<DirEntity>> selectProject(String name) {
@@ -82,11 +83,11 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "String", paramType = "query", example = "1"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询并返回记录数")
    @Parameters({
            @Parameter(name = "dirid", description = "目录ID", in = ParameterIn.QUERY, example = "1"),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectByPageAndCount")
    public ResponseMsg<Object> selectByPageAndCount(String dirid, Integer pageSize, Integer pageIndex) {
@@ -108,7 +109,7 @@
    }
    @SysLog()
    @ApiOperation(value = "查询字段信息")
    @Operation(summary = "查询字段信息")
    @GetMapping(value = "/selectFields")
    public ResponseMsg<List<DictEntity>> selectFields() {
        try {
@@ -127,10 +128,10 @@
    }
    @SysLog()
    @ApiOperation(value = "查询位置")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "x", value = "X", dataType = "Double", paramType = "query", example = "114.178955"),
            @ApiImplicitParam(name = "y", value = "Y", dataType = "Double", paramType = "query", example = "38.991743")
    @Operation(summary = "查询位置")
    @Parameters({
            @Parameter(name = "x", description = "X", in = ParameterIn.QUERY, example = "114.178955"),
            @Parameter(name = "y", description = "Y", in = ParameterIn.QUERY, example = "38.991743")
    })
    @GetMapping(value = "/selectLocation")
    public ResponseMsg<Object> selectLocation(double x, double y) {
@@ -145,9 +146,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gid", value = "ID", dataType = "int", paramType = "query", example = "1")
    @Operation(summary = "删除一条")
    @Parameters({
            @Parameter(name = "gid", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/delete")
    public ResponseMsg<Integer> delete(int gid) {
@@ -161,9 +162,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "插入一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insert(@RequestBody BsprojectEntity entity, HttpServletRequest req) {
@@ -190,9 +191,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "更新一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @ResponseBody
    @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")