| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.annotation.SysLog; |
| | | 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; |
| | | import com.terra.system.entity.data.DirEntity; |
| | | import com.terra.system.entity.sys.DepEntity; |
| | | import com.terra.system.entity.sys.UserEntity; |
| | | import com.terra.system.helper.StringHelper; |
| | | import com.terra.system.helper.WebHelper; |
| | | import com.terra.common.helper.StringHelper; |
| | | import com.terra.common.helper.WebHelper; |
| | | import com.terra.system.mapper.bs.BsprojectMapper; |
| | | import com.terra.system.service.all.BaseQueryService; |
| | | 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; |
| | |
| | | * 项目管理 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "数据管理\\项目管理") |
| | | @Tag(name = "数据管理\\项目管理") |
| | | @RestController |
| | | @RequestMapping("/project") |
| | | public class ProjectController extends BaseController { |
| | |
| | | BaseQueryService baseQueryService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询所有单位数据") |
| | | @Operation(summary = "查询所有单位数据") |
| | | @GetMapping(value = "/selectDepAll") |
| | | public ResponseMsg<List<DepEntity>> selectDepAll() { |
| | | try { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询字段信息") |
| | | @Operation(summary = "查询字段信息") |
| | | @GetMapping(value = "/selectFields") |
| | | public ResponseMsg<List<DictEntity>> selectFields() { |
| | | try { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @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") |