diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEmployeesController.java b/zc-business/src/main/java/com/zc/business/controller/DcEmployeesController.java index 20159da9..96a64f6f 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEmployeesController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEmployeesController.java @@ -1,28 +1,28 @@ package com.zc.business.controller; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.zc.business.domain.DcEmployees; +import com.zc.business.service.IDcEmployeesService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.zc.business.domain.DcEmployees; -import com.zc.business.service.IDcEmployeesService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 值班人员信息Controller @@ -30,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2024-01-04 */ +@Api(tags = "人员管理") @RestController @RequestMapping("/business/employees") @@ -41,7 +42,7 @@ public class DcEmployeesController extends BaseController /** * 查询值班人员信息列表 */ - //@ApiOperation("获取人员信息列表") + @ApiOperation("获取人员信息列表") @PreAuthorize("@ss.hasPermi('business:employees:list')") @GetMapping("/list") public TableDataInfo list(DcEmployees dcEmployees) @@ -53,7 +54,7 @@ public class DcEmployeesController extends BaseController /** * 导出值班人员信息列表 */ - + @ApiOperation("导出值班人员信息列表") //@PreAuthorize("@ss.hasPermi('business:employees:export')") @Log(title = "值班人员信息", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -66,7 +67,7 @@ public class DcEmployeesController extends BaseController /** * 获取值班人员信息详细信息 */ - //@ApiOperation(value = "获取人员信息详细信息", notes = "获取人员信息详细信息") + @ApiOperation("获取人员信息详细信息") @PreAuthorize("@ss.hasPermi('business:employees:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) @@ -77,7 +78,7 @@ public class DcEmployeesController extends BaseController /** * 新增值班人员信息 */ - //@ApiOperation(value = "新增人员信息", notes = "新增人员信息") + @ApiOperation("新增人员信息") @PreAuthorize("@ss.hasPermi('business:employees:add')") @Log(title = "值班人员信息", businessType = BusinessType.INSERT) @PostMapping @@ -89,7 +90,7 @@ public class DcEmployeesController extends BaseController /** * 修改值班人员信息 */ - //@ApiOperation(value = "修改人员信息", notes = "修改人员信息") + @ApiOperation("修改人员信息") @PreAuthorize("@ss.hasPermi('business:employees:edit')") @Log(title = "值班人员信息", businessType = BusinessType.UPDATE) @PutMapping @@ -101,7 +102,7 @@ public class DcEmployeesController extends BaseController /** * 删除值班人员信息 */ - //@ApiOperation(value = "删除人员信息", notes = "删除人员信息") + @ApiOperation("删除人员信息") @PreAuthorize("@ss.hasPermi('business:employees:remove')") @Log(title = "值班人员信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @@ -111,23 +112,25 @@ public class DcEmployeesController extends BaseController } //查询全部机构id与名称信息 - //@ApiOperation(value = "查询全部机构id与名称信息", notes = "查询全部机构id与名称信息") + @ApiOperation(value = "查询全部机构id与名称信息") @PostMapping("/organization") public AjaxResult selectOrganizationAll(){ return AjaxResult.success(dcEmployeesService.selectOrganizationAll()); } //查询全部岗位id与名称信息 - //@ApiOperation(value = "查询全部岗位id与名称信息", notes = "查询全部岗位id与名称信息") + @ApiOperation(value = "查询全部岗位id与名称信息") @PostMapping("/sysPost") public AjaxResult selectSysPostAll(){ return AjaxResult.success(dcEmployeesService.selectSysPostAll()); } //获取用户信息,按照岗位分组 - //@ApiOperation(value = "获取用户信息,按照岗位分组", notes = "获取用户信息,按照岗位分组") + @ApiOperation(value = "获取用户信息,按照岗位分组") @PostMapping("/employeesPostGroup") public AjaxResult employeesPostGroup(){ return AjaxResult.success(dcEmployeesService.selectEmployeesPost()); } + + //获取全部用户信息,以及所在岗位信息 @PostMapping("/employeesPostAll") public AjaxResult selectEmployeesPostAll(){ diff --git a/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java b/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java index e99472fc..ecafb100 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java @@ -2,6 +2,9 @@ package com.zc.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -26,6 +29,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; * @author ruoyi * @date 2024-01-04 */ +@Api(tags = "机构管理") @RestController @RequestMapping("/business/organization") public class DcOrganizationController extends BaseController @@ -36,6 +40,7 @@ public class DcOrganizationController extends BaseController /** * 查询机构管理列表 */ + @ApiOperation("查询机构管理列表") @PreAuthorize("@ss.hasPermi('business:organization:list')") @GetMapping("/list") @@ -48,6 +53,7 @@ public class DcOrganizationController extends BaseController /** * 导出机构管理列表 */ + @ApiOperation("导出机构管理列表") @PreAuthorize("@ss.hasPermi('business:organization:export')") @Log(title = "机构管理", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -61,6 +67,7 @@ public class DcOrganizationController extends BaseController /** * 获取机构管理详细信息 */ + @ApiOperation("获取机构管理详细信息") @PreAuthorize("@ss.hasPermi('business:organization:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) @@ -71,6 +78,7 @@ public class DcOrganizationController extends BaseController /** * 新增机构管理 */ + @ApiOperation("新增机构管理") @PreAuthorize("@ss.hasPermi('business:organization:add')") @Log(title = "机构管理", businessType = BusinessType.INSERT) @PostMapping @@ -82,6 +90,7 @@ public class DcOrganizationController extends BaseController /** * 修改机构管理 */ + @ApiOperation("修改机构管理") @PreAuthorize("@ss.hasPermi('business:organization:edit')") @Log(title = "机构管理", businessType = BusinessType.UPDATE) @PutMapping @@ -93,6 +102,7 @@ public class DcOrganizationController extends BaseController /** * 删除机构管理 */ + @ApiOperation("删除机构管理") @PreAuthorize("@ss.hasPermi('business:organization:remove')") @Log(title = "机构管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") diff --git a/zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java b/zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java index 2f7f759d..247d9a22 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcRoadSectionController.java @@ -2,6 +2,9 @@ package com.zc.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2024-01-11 */ +@Api(tags = "辖区路段") @RestController @RequestMapping("/business/roadSection") public class DcRoadSectionController extends BaseController @@ -37,6 +41,7 @@ public class DcRoadSectionController extends BaseController /** * 查询辖区路段列表 */ + @ApiOperation("查询辖区路段列表") @PreAuthorize("@ss.hasPermi('business:roadSection:list')") @GetMapping("/list") public TableDataInfo list(DcRoadSection dcRoadSection) @@ -49,6 +54,7 @@ public class DcRoadSectionController extends BaseController /** * 导出辖区路段列表 */ + @ApiOperation("导出辖区路段列表") @PreAuthorize("@ss.hasPermi('business:roadSection:export')") @Log(title = "辖区路段", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -62,6 +68,7 @@ public class DcRoadSectionController extends BaseController /** * 获取辖区路段详细信息 */ + @ApiOperation("获取辖区路段详细信息") @PreAuthorize("@ss.hasPermi('business:roadSection:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) @@ -72,6 +79,7 @@ public class DcRoadSectionController extends BaseController /** * 新增辖区路段 */ + @ApiOperation("新增辖区路段") @PreAuthorize("@ss.hasPermi('business:roadSection:add')") @Log(title = "辖区路段", businessType = BusinessType.INSERT) @PostMapping @@ -83,6 +91,7 @@ public class DcRoadSectionController extends BaseController /** * 修改辖区路段 */ + @ApiOperation("修改辖区路段") @PreAuthorize("@ss.hasPermi('business:roadSection:edit')") @Log(title = "辖区路段", businessType = BusinessType.UPDATE) @PutMapping @@ -94,6 +103,7 @@ public class DcRoadSectionController extends BaseController /** * 删除辖区路段 */ + @ApiOperation("删除辖区路段") @PreAuthorize("@ss.hasPermi('business:roadSection:remove')") @Log(title = "辖区路段", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @@ -102,6 +112,7 @@ public class DcRoadSectionController extends BaseController return toAjax(dcRoadSectionService.deleteDcRoadSectionByIds(ids)); } //查询路线id与名称 + @ApiOperation("查询路线id与名称") @PostMapping("/roadList") public AjaxResult roadList(){ return AjaxResult.success(dcRoadSectionService.selectRoadList()); diff --git a/zc-business/src/main/java/com/zc/business/controller/DcShiftsController.java b/zc-business/src/main/java/com/zc/business/controller/DcShiftsController.java index 8992efdd..9b675956 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcShiftsController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcShiftsController.java @@ -5,6 +5,8 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.zc.business.domain.DcShiftsRecord; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -32,6 +34,7 @@ import org.springframework.web.multipart.MultipartFile; * @author ruoyi * @date 2024-01-04 */ +@Api(tags = "值班管理") @RestController @RequestMapping("/business/shifts") public class DcShiftsController extends BaseController @@ -42,6 +45,7 @@ public class DcShiftsController extends BaseController /** * 查询值班列表 */ + @ApiOperation("查询值班列表") @PreAuthorize("@ss.hasPermi('business:shifts:list')") @GetMapping("/list") public TableDataInfo list(DcShifts dcShifts) @@ -54,6 +58,7 @@ public class DcShiftsController extends BaseController /** * 导出值班列表 */ + @ApiOperation("导出值班列表") @PreAuthorize("@ss.hasPermi('business:shifts:export')") @Log(title = "值班", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -67,6 +72,7 @@ public class DcShiftsController extends BaseController /** * 获取值班详细信息 */ + @ApiOperation("获取值班详细信息") @PreAuthorize("@ss.hasPermi('business:shifts:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) @@ -77,6 +83,7 @@ public class DcShiftsController extends BaseController /** * 新增值班 */ + @ApiOperation("新增值班") @PreAuthorize("@ss.hasPermi('business:shifts:add')") @Log(title = "值班", businessType = BusinessType.INSERT) @PostMapping @@ -87,6 +94,7 @@ public class DcShiftsController extends BaseController /** * 修改值班 */ + @ApiOperation("修改值班") @PreAuthorize("@ss.hasPermi('business:shifts:edit')") @Log(title = "值班", businessType = BusinessType.UPDATE) @PutMapping @@ -97,6 +105,7 @@ public class DcShiftsController extends BaseController /** * 删除值班 */ + @ApiOperation("删除值班") @PreAuthorize("@ss.hasPermi('business:shifts:remove')") @Log(title = "值班", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @@ -105,6 +114,7 @@ public class DcShiftsController extends BaseController } //导出模板 + @ApiOperation("导出模板") @PreAuthorize("@ss.hasPermi('baseData:equipment:export')") @Log(title = "值班模板", businessType = BusinessType.EXPORT) @PostMapping("/exportModel") @@ -123,6 +133,7 @@ public class DcShiftsController extends BaseController /** * 导入值班列表 */ + @ApiOperation("导入值班列表") @PostMapping("/importEquipment") public AjaxResult importEquipment(MultipartFile file) throws Exception{ return dcShiftsService.importEquipment(file); @@ -132,6 +143,7 @@ public class DcShiftsController extends BaseController /** * 查询操作记录 */ + @ApiOperation("查询操作记录") @GetMapping("/recordList") public TableDataInfo recordList() { diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java b/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java index 749d5144..b28b3290 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEmployees.java @@ -1,5 +1,6 @@ package com.zc.business.domain; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -19,24 +20,31 @@ public class DcEmployees extends BaseEntity private Long id; /** $column.columnComment */ - - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + @ApiModelProperty("所属岗位") + @Excel(name = "所属岗位") private String postId; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + @ApiModelProperty("所属机构") + @Excel(name = "所属机构") private Long organizationId; /** */ - @Excel(name = "") + @ApiModelProperty(value = "名称", required = true) + @Excel(name = "名称") private String name; /** */ - @Excel(name = "") + @ApiModelProperty(value = "联系电话", required = true) + @Excel(name = "联系电话") private String contactNumber; /** */ + + @ApiModelProperty("岗位") @Excel(name = "岗位") private String postName; + + @ApiModelProperty("机构") @Excel(name = "机构") private String organizationName; diff --git a/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java b/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java index fa621c9b..b127012f 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcOrganization.java @@ -1,5 +1,7 @@ package com.zc.business.domain; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -11,6 +13,7 @@ import com.ruoyi.common.core.domain.TreeEntity; * @author ruoyi * @date 2024-01-04 */ +@ApiModel("机构管理对象") public class DcOrganization extends TreeEntity { private static final long serialVersionUID = 1L; @@ -19,29 +22,36 @@ public class DcOrganization extends TreeEntity private Long id; /** 1-运管中心2-驻点 */ + @ApiModelProperty(value = "类型1-运管中心 2-驻点", required = true) @Excel(name = "1-运管中心 2-驻点") private Integer organizationType; /** 名称 */ + @ApiModelProperty(value = "名称", required = true) @Excel(name = "名称") private String organizationName; /** 地址 */ + @ApiModelProperty("地址") @Excel(name = "地址") private String organizationAddress; /** 桩号 */ + @ApiModelProperty("桩号") @Excel(name = "桩号") private String stakeMarkId; /** 救援单位 */ + @ApiModelProperty("救援单位") @Excel(name = "救援单位") private String rescueUnit; /** 描述 */ + @ApiModelProperty("描述") @Excel(name = "描述") private String description; /** 方向 */ + @ApiModelProperty(value = "方向", required = true) @Excel(name = "方向") private String direction; diff --git a/zc-business/src/main/java/com/zc/business/domain/DcRoadSection.java b/zc-business/src/main/java/com/zc/business/domain/DcRoadSection.java index 50077904..a8ceb274 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcRoadSection.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcRoadSection.java @@ -1,5 +1,6 @@ package com.zc.business.domain; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -19,36 +20,45 @@ public class DcRoadSection extends BaseEntity private Long id; /** 所属部门 */ + @ApiModelProperty(value = "所属部门", required = true) @Excel(name = "所属部门") private Long deptId; /** 所属路线 */ + @ApiModelProperty(value = "所属路线", required = true) @Excel(name = "所属路线") private Long roadId; /** 开始桩号 */ + @ApiModelProperty("开始桩号") @Excel(name = "开始桩号") private String startStakeMark; /** 结束桩号 */ + @ApiModelProperty("结束桩号") @Excel(name = "结束桩号") private String endStakeMark; /** 辖区路线名称 */ + @ApiModelProperty(value = "辖区路线名称", required = true) @Excel(name = "辖区路线名称") private String sectionName; /** 辖区路线编号 */ + @ApiModelProperty("辖区路线编号") @Excel(name = "辖区路线编号") private String roadCode; /** 里程 */ + @ApiModelProperty("里程") @Excel(name = "里程") private String mileage; /** 部门名称 */ + @ApiModelProperty("部门名称") @Excel(name = "部门名称") private String deptName; /** 道路名称 */ + @ApiModelProperty("道路名称") @Excel(name = "道路名称") private String roadName; diff --git a/zc-business/src/main/java/com/zc/business/domain/DcShifts.java b/zc-business/src/main/java/com/zc/business/domain/DcShifts.java index 7f82bead..35a317c0 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcShifts.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcShifts.java @@ -2,6 +2,7 @@ package com.zc.business.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -27,33 +28,41 @@ public class DcShifts extends BaseEntity private Long stationId; /** 当值人员ID */ + @ApiModelProperty(value = "当值人员ID", required = true) @Excel(name = "当值人员ID") private Long employeesId; /** 值班日期 */ + @ApiModelProperty(value = "值班日期", required = true) @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "值班日期", width = 30, dateFormat = "yyyy-MM-dd") private Date date; /** 开始时间 */ + @ApiModelProperty("开始时间") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") private Date startTime; /** 结束时间 */ + @ApiModelProperty("结束时间") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") private Date endTime; + @ApiModelProperty("姓名") @Excel(name = "姓名") private String name; - + @ApiModelProperty("手机号") @Excel(name = "手机号") private String contactNumber; + @ApiModelProperty("岗位") private String postName; + @ApiModelProperty("备注") @Excel(name = "备注") private String remark; + @ApiModelProperty("所属路管驻点名称") @Excel(name = "所属路管驻点名称") private String stationName;