New file |
| | |
| | | package com.ruoyi.web.controller.oa; |
| | | |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.*; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | 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.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import com.ruoyi.common.core.validate.QueryGroup; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.oa.domain.vo.BsBuildingVo; |
| | | import com.ruoyi.oa.domain.bo.BsBuildingBo; |
| | | import com.ruoyi.oa.service.IBsBuildingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * 建筑单元Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Validated |
| | | @Api(value = "建筑单元控制器", tags = {"建筑单元管理"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RestController |
| | | @RequestMapping("/oa/building") |
| | | public class BsBuildingController extends BaseController { |
| | | |
| | | private final IBsBuildingService iBsBuildingService; |
| | | |
| | | /** |
| | | * 查询建筑单元列表 |
| | | */ |
| | | @ApiOperation("查询建筑单元列表") |
| | | // @PreAuthorize("@ss.hasPermi('oa:building:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult<List<BsBuildingVo>> list(@Validated(QueryGroup.class) BsBuildingBo bo) { |
| | | List<BsBuildingVo> list = iBsBuildingService.queryList(bo); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出建筑单元列表 |
| | | */ |
| | | @ApiOperation("导出建筑单元列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:building:export')") |
| | | @Log(title = "建筑单元", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated BsBuildingBo bo, HttpServletResponse response) { |
| | | List<BsBuildingVo> list = iBsBuildingService.queryList(bo); |
| | | ExcelUtil.exportExcel(list, "建筑单元", BsBuildingVo.class, response); |
| | | } |
| | | |
| | | /** |
| | | * 获取建筑单元详细信息 |
| | | */ |
| | | @ApiOperation("获取建筑单元详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:building:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<BsBuildingVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iBsBuildingService.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增建筑单元 |
| | | */ |
| | | @ApiOperation("新增建筑单元") |
| | | @PreAuthorize("@ss.hasPermi('oa:building:add')") |
| | | @Log(title = "建筑单元", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | | public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody BsBuildingBo bo) { |
| | | return toAjax(iBsBuildingService.insertByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 修改建筑单元 |
| | | */ |
| | | @ApiOperation("修改建筑单元") |
| | | @PreAuthorize("@ss.hasPermi('oa:building:edit')") |
| | | @Log(title = "建筑单元", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | | public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody BsBuildingBo bo) { |
| | | return toAjax(iBsBuildingService.updateByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 删除建筑单元 |
| | | */ |
| | | @ApiOperation("删除建筑单元") |
| | | @PreAuthorize("@ss.hasPermi('oa:building:remove')") |
| | | @Log(title = "建筑单元" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(iBsBuildingService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.web.controller.oa; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.annotation.DataDictClass; |
| | | import com.ruoyi.common.annotation.Log; |
| | |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import com.ruoyi.common.core.validate.QueryGroup; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.oa.domain.BsSchool; |
| | | import com.ruoyi.oa.domain.bo.BsSchoolBo; |
| | | import com.ruoyi.oa.domain.vo.BsSchoolVo; |
| | | import com.ruoyi.oa.service.IBsSchoolService; |
| | |
| | | */ |
| | | @ApiOperation("学校下拉列表") |
| | | @GetMapping("/select") |
| | | public AjaxResult selectList() { |
| | | return AjaxResult.success(iBsSchoolService.list(new QueryWrapper<>())); |
| | | public AjaxResult selectList(BsSchoolBo bo) { |
| | | return AjaxResult.success(iBsSchoolService.list(new LambdaQueryWrapper<BsSchool>() |
| | | .like(StringUtils.isNotBlank(bo.getName()), BsSchool::getName, bo.getName()))); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.ruoyi.web.controller.oa; |
| | | |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import com.ruoyi.common.annotation.DataDictClass; |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.*; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | 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.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import com.ruoyi.common.core.validate.QueryGroup; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.oa.domain.vo.SgConstructionBatchVo; |
| | | import com.ruoyi.oa.domain.bo.SgConstructionBatchBo; |
| | | import com.ruoyi.oa.service.ISgConstructionBatchService; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * 施工批次Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | @Validated |
| | | @Api(value = "施工批次控制器", tags = {"施工批次管理"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RestController |
| | | @RequestMapping("/oa/constructionBatch") |
| | | public class SgConstructionBatchController extends BaseController { |
| | | |
| | | private final ISgConstructionBatchService iSgConstructionBatchService; |
| | | |
| | | /** |
| | | * 查询施工批次列表 |
| | | */ |
| | | @DataDictClass |
| | | @ApiOperation("查询施工批次列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SgConstructionBatchVo> list(@Validated(QueryGroup.class) SgConstructionBatchBo bo) { |
| | | return iSgConstructionBatchService.queryPageList(bo); |
| | | } |
| | | |
| | | /** |
| | | * 导出施工批次列表 |
| | | */ |
| | | @ApiOperation("导出施工批次列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:export')") |
| | | @Log(title = "施工批次", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated SgConstructionBatchBo bo, HttpServletResponse response) { |
| | | List<SgConstructionBatchVo> list = iSgConstructionBatchService.queryList(bo); |
| | | ExcelUtil.exportExcel(list, "施工批次", SgConstructionBatchVo.class, response); |
| | | } |
| | | |
| | | /** |
| | | * 获取施工批次详细信息 |
| | | */ |
| | | @ApiOperation("获取施工批次详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<SgConstructionBatchVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iSgConstructionBatchService.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增施工批次 |
| | | */ |
| | | @ApiOperation("新增施工批次") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:add')") |
| | | @Log(title = "施工批次", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | | public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgConstructionBatchBo bo) { |
| | | return toAjax(iSgConstructionBatchService.insertByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 修改施工批次 |
| | | */ |
| | | @ApiOperation("修改施工批次") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:edit')") |
| | | @Log(title = "施工批次", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | | public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgConstructionBatchBo bo) { |
| | | return toAjax(iSgConstructionBatchService.updateByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 删除施工批次 |
| | | */ |
| | | @ApiOperation("删除施工批次") |
| | | @PreAuthorize("@ss.hasPermi('oa:constructionBatch:remove')") |
| | | @Log(title = "施工批次" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(iSgConstructionBatchService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.oa; |
| | | |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import com.ruoyi.common.annotation.DataDictClass; |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.*; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | 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.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import com.ruoyi.common.core.validate.QueryGroup; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.oa.domain.vo.SgReserveIpVo; |
| | | import com.ruoyi.oa.domain.bo.SgReserveIpBo; |
| | | import com.ruoyi.oa.service.ISgReserveIpService; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * 预留IPController |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Validated |
| | | @Api(value = "预留IP控制器", tags = {"预留IP管理"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RestController |
| | | @RequestMapping("/oa/reserveIp") |
| | | public class SgReserveIpController extends BaseController { |
| | | |
| | | private final ISgReserveIpService iSgReserveIpService; |
| | | |
| | | /** |
| | | * 查询预留IP列表 |
| | | */ |
| | | @DataDictClass |
| | | @ApiOperation("查询预留IP列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SgReserveIpVo> list(@Validated(QueryGroup.class) SgReserveIpBo bo) { |
| | | return iSgReserveIpService.queryPageList(bo); |
| | | } |
| | | |
| | | /** |
| | | * 导出预留IP列表 |
| | | */ |
| | | @ApiOperation("导出预留IP列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:export')") |
| | | @Log(title = "预留IP", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated SgReserveIpBo bo, HttpServletResponse response) { |
| | | List<SgReserveIpVo> list = iSgReserveIpService.queryList(bo); |
| | | ExcelUtil.exportExcel(list, "预留IP", SgReserveIpVo.class, response); |
| | | } |
| | | |
| | | /** |
| | | * 获取预留IP详细信息 |
| | | */ |
| | | @ApiOperation("获取预留IP详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<SgReserveIpVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iSgReserveIpService.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增预留IP |
| | | */ |
| | | @ApiOperation("新增预留IP") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:add')") |
| | | @Log(title = "预留IP", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | | public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgReserveIpBo bo) { |
| | | return toAjax(iSgReserveIpService.insertByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 修改预留IP |
| | | */ |
| | | @ApiOperation("修改预留IP") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:edit')") |
| | | @Log(title = "预留IP", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | | public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgReserveIpBo bo) { |
| | | return toAjax(iSgReserveIpService.updateByBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | | /** |
| | | * 删除预留IP |
| | | */ |
| | | @ApiOperation("删除预留IP") |
| | | @PreAuthorize("@ss.hasPermi('oa:reserveIp:remove')") |
| | | @Log(title = "预留IP" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(iSgReserveIpService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |
| | | } |
| | |
| | | # Spring Boot Admin Client 客户端的相关配置 |
| | | client: |
| | | # 增加客户端开关 |
| | | enabled: true |
| | | enabled: false |
| | | # 设置 Spring Boot Admin Server 地址 |
| | | url: http://localhost:9090/admin |
| | | instance: |
| | |
| | | xxl: |
| | | job: |
| | | # 执行器开关 |
| | | enabled: true |
| | | enabled: false |
| | | # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。 |
| | | admin-addresses: http://localhost:9100/xxl-job-admin |
| | | # 执行器通讯TOKEN:非空时启用 |
New file |
| | |
| | | package com.ruoyi.oa.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | import com.ruoyi.common.core.domain.TreeEntity; |
| | | |
| | | /** |
| | | * 建筑单元对象 bs_building |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("bs_building") |
| | | public class BsBuilding extends TreeEntity { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id") |
| | | private Long id; |
| | | /** |
| | | * 单元编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 单元名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 详细名称 |
| | | */ |
| | | private String detailedName; |
| | | /** |
| | | * 高校 |
| | | */ |
| | | private Long schoolId; |
| | | /** |
| | | * 祖级列表 |
| | | */ |
| | | private String ancestors; |
| | | /** |
| | | * 显示顺序 |
| | | */ |
| | | private Integer orderNum; |
| | | /** |
| | | * |
| | | */ |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 施工批次对象 sg_construction_batch |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("sg_construction_batch") |
| | | public class SgConstructionBatch extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id") |
| | | private Long id; |
| | | /** |
| | | * 施工批次 |
| | | */ |
| | | private String batch; |
| | | /** |
| | | * 开始日期 |
| | | */ |
| | | private Date startDate; |
| | | /** |
| | | * 结束日期 |
| | | */ |
| | | private Date endDate; |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 团队成员 |
| | | */ |
| | | private String teamMembers; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks; |
| | | /** |
| | | * |
| | | */ |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 预留IP对象 sg_reserve_ip |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("sg_reserve_ip") |
| | | public class SgReserveIp extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id") |
| | | private Long id; |
| | | /** |
| | | * ip地址 |
| | | */ |
| | | private String ip; |
| | | /** |
| | | * MAC地址 |
| | | */ |
| | | private String mac; |
| | | /** |
| | | * 建筑单元 |
| | | */ |
| | | private Long buildingId; |
| | | /** |
| | | * 申请日期 |
| | | */ |
| | | private Date applicationDate; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks; |
| | | /** |
| | | * |
| | | */ |
| | | @TableLogic |
| | | private String delFlag; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.bo; |
| | | |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import javax.validation.constraints.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.ruoyi.common.core.domain.TreeEntity; |
| | | |
| | | /** |
| | | * 建筑单元业务对象 bs_building |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("建筑单元业务对象") |
| | | public class BsBuildingBo extends TreeEntity { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "", required = true) |
| | | @NotNull(message = "不能为空", groups = { EditGroup.class }) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 单元编号 |
| | | */ |
| | | @ApiModelProperty(value = "单元编号", required = true) |
| | | @NotBlank(message = "单元编号不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private String code; |
| | | |
| | | /** |
| | | * 单元名称 |
| | | */ |
| | | @ApiModelProperty(value = "单元名称", required = true) |
| | | @NotBlank(message = "单元名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private String name; |
| | | |
| | | /** |
| | | * 高校 |
| | | */ |
| | | @ApiModelProperty(value = "高校", required = true) |
| | | @NotNull(message = "高校不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private Long schoolId; |
| | | |
| | | /** |
| | | * 祖级列表 |
| | | */ |
| | | @ApiModelProperty(value = "祖级列表") |
| | | private String ancestors; |
| | | |
| | | /** |
| | | * 显示顺序 |
| | | */ |
| | | @ApiModelProperty(value = "显示顺序") |
| | | private Integer orderNum; |
| | | |
| | | |
| | | /** |
| | | * 分页大小 |
| | | */ |
| | | @ApiModelProperty("分页大小") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * 当前页数 |
| | | */ |
| | | @ApiModelProperty("当前页数") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * 排序列 |
| | | */ |
| | | @ApiModelProperty("排序列") |
| | | private String orderByColumn; |
| | | |
| | | /** |
| | | * 排序的方向desc或者asc |
| | | */ |
| | | @ApiModelProperty(value = "排序的方向", example = "asc,desc") |
| | | private String isAsc; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.bo; |
| | | |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import javax.validation.constraints.*; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 施工批次业务对象 sg_construction_batch |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("施工批次业务对象") |
| | | public class SgConstructionBatchBo extends BaseEntity { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "", required = true) |
| | | @NotNull(message = "不能为空", groups = { EditGroup.class }) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 施工批次 |
| | | */ |
| | | @ApiModelProperty(value = "施工批次", required = true) |
| | | @NotBlank(message = "施工批次不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private String batch; |
| | | |
| | | /** |
| | | * 开始日期 |
| | | */ |
| | | @ApiModelProperty(value = "开始日期") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd") |
| | | private Date startDate; |
| | | |
| | | /** |
| | | * 结束日期 |
| | | */ |
| | | @ApiModelProperty(value = "结束日期") |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | @ApiModelProperty(value = "负责人") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 团队成员 |
| | | */ |
| | | @ApiModelProperty(value = "团队成员") |
| | | private String teamMembers; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remarks; |
| | | |
| | | |
| | | /** |
| | | * 分页大小 |
| | | */ |
| | | @ApiModelProperty("分页大小") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * 当前页数 |
| | | */ |
| | | @ApiModelProperty("当前页数") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * 排序列 |
| | | */ |
| | | @ApiModelProperty("排序列") |
| | | private String orderByColumn; |
| | | |
| | | /** |
| | | * 排序的方向desc或者asc |
| | | */ |
| | | @ApiModelProperty(value = "排序的方向", example = "asc,desc") |
| | | private String isAsc; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.bo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.validate.AddGroup; |
| | | import com.ruoyi.common.core.validate.EditGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import javax.validation.constraints.*; |
| | | |
| | | import java.util.Date; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 预留IP业务对象 sg_reserve_ip |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("预留IP业务对象") |
| | | public class SgReserveIpBo extends BaseEntity { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "", required = true) |
| | | @NotNull(message = "不能为空", groups = { EditGroup.class }) |
| | | private Long id; |
| | | |
| | | /** |
| | | * ip地址 |
| | | */ |
| | | @ApiModelProperty(value = "ip地址", required = true) |
| | | @NotBlank(message = "ip地址不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private String ip; |
| | | |
| | | /** |
| | | * MAC地址 |
| | | */ |
| | | @ApiModelProperty(value = "MAC地址", required = true) |
| | | @NotBlank(message = "MAC地址不能为空", groups = { AddGroup.class, EditGroup.class }) |
| | | private String mac; |
| | | |
| | | /** |
| | | * 建筑单元 |
| | | */ |
| | | @ApiModelProperty(value = "建筑单元", required = true) |
| | | private Long buildingId; |
| | | |
| | | /** |
| | | * 申请日期 |
| | | */ |
| | | @ApiModelProperty(value = "申请日期") |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd") |
| | | private Date applicationDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remarks; |
| | | |
| | | |
| | | /** |
| | | * 分页大小 |
| | | */ |
| | | @ApiModelProperty("分页大小") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * 当前页数 |
| | | */ |
| | | @ApiModelProperty("当前页数") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * 排序列 |
| | | */ |
| | | @ApiModelProperty("排序列") |
| | | private String orderByColumn; |
| | | |
| | | /** |
| | | * 排序的方向desc或者asc |
| | | */ |
| | | @ApiModelProperty(value = "排序的方向", example = "asc,desc") |
| | | private String isAsc; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 建筑单元视图对象 bs_building |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Data |
| | | @ApiModel("建筑单元视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class BsBuildingVo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ExcelProperty(value = "") |
| | | @ApiModelProperty("") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 单元编号 |
| | | */ |
| | | @ExcelProperty(value = "单元编号") |
| | | @ApiModelProperty("单元编号") |
| | | private String code; |
| | | |
| | | /** |
| | | * 单元名称 |
| | | */ |
| | | @ExcelProperty(value = "单元名称") |
| | | @ApiModelProperty("单元名称") |
| | | private String name; |
| | | /** |
| | | * 详细名称 |
| | | */ |
| | | private String detailedName; |
| | | /** |
| | | * 高校 |
| | | */ |
| | | @ExcelProperty(value = "高校") |
| | | @ApiModelProperty("高校") |
| | | private Long schoolId; |
| | | |
| | | /** |
| | | * 父级id |
| | | */ |
| | | @ExcelProperty(value = "父级id") |
| | | @ApiModelProperty("父级id") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 祖级列表 |
| | | */ |
| | | @ExcelProperty(value = "祖级列表") |
| | | @ApiModelProperty("祖级列表") |
| | | private String ancestors; |
| | | |
| | | /** |
| | | * 显示顺序 |
| | | */ |
| | | @ExcelProperty(value = "显示顺序") |
| | | @ApiModelProperty("显示顺序") |
| | | private Integer orderNum; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.vo; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.ruoyi.common.annotation.Dict; |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 施工批次视图对象 sg_construction_batch |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | @Data |
| | | @ApiModel("施工批次视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class SgConstructionBatchVo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 施工批次 |
| | | */ |
| | | @ExcelProperty(value = "施工批次") |
| | | @ApiModelProperty("施工批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 开始日期 |
| | | */ |
| | | @ExcelProperty(value = "开始日期") |
| | | @ApiModelProperty("开始日期") |
| | | private Date startDate; |
| | | |
| | | /** |
| | | * 结束日期 |
| | | */ |
| | | @ExcelProperty(value = "结束日期") |
| | | @ApiModelProperty("结束日期") |
| | | private Date endDate; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | @ExcelProperty(value = "负责人") |
| | | @ApiModelProperty("负责人") |
| | | @Dict(dictTable = "sys_user", dicCode = "user_id", dicText = "nick_name") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 团队成员 |
| | | */ |
| | | @ExcelProperty(value = "团队成员") |
| | | @ApiModelProperty("团队成员") |
| | | private String teamMembers; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ExcelProperty(value = "备注") |
| | | @ApiModelProperty("备注") |
| | | private String remarks; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.domain.vo; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.ruoyi.common.annotation.Dict; |
| | | import com.ruoyi.common.annotation.ExcelDictFormat; |
| | | import com.ruoyi.common.convert.ExcelDictConvert; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 预留IP视图对象 sg_reserve_ip |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Data |
| | | @ApiModel("预留IP视图对象") |
| | | @ExcelIgnoreUnannotated |
| | | public class SgReserveIpVo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ExcelProperty(value = "") |
| | | @ApiModelProperty("") |
| | | private Long id; |
| | | |
| | | /** |
| | | * ip地址 |
| | | */ |
| | | @ExcelProperty(value = "ip地址") |
| | | @ApiModelProperty("ip地址") |
| | | private String ip; |
| | | |
| | | /** |
| | | * MAC地址 |
| | | */ |
| | | @ExcelProperty(value = "MAC地址") |
| | | @ApiModelProperty("MAC地址") |
| | | private String mac; |
| | | |
| | | /** |
| | | * 建筑单元 |
| | | */ |
| | | @ExcelProperty(value = "建筑单元") |
| | | @ApiModelProperty("建筑单元") |
| | | @Dict(dictTable = "bs_building", dicCode = "id", dicText = "detailed_name") |
| | | private Long buildingId; |
| | | |
| | | /** |
| | | * 申请日期 |
| | | */ |
| | | @ExcelProperty(value = "申请日期") |
| | | @ApiModelProperty("申请日期") |
| | | private Date applicationDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ExcelProperty(value = "备注") |
| | | @ApiModelProperty("备注") |
| | | private String remarks; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.mapper; |
| | | |
| | | import com.ruoyi.oa.domain.BsBuilding; |
| | | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; |
| | | |
| | | /** |
| | | * 建筑单元Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | public interface BsBuildingMapper extends BaseMapperPlus<BsBuilding> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.mapper; |
| | | |
| | | import com.ruoyi.oa.domain.SgConstructionBatch; |
| | | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; |
| | | |
| | | /** |
| | | * 施工批次Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | public interface SgConstructionBatchMapper extends BaseMapperPlus<SgConstructionBatch> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.mapper; |
| | | |
| | | import com.ruoyi.oa.domain.SgReserveIp; |
| | | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; |
| | | |
| | | /** |
| | | * 预留IPMapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | public interface SgReserveIpMapper extends BaseMapperPlus<SgReserveIp> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service; |
| | | |
| | | import com.ruoyi.oa.domain.BsBuilding; |
| | | import com.ruoyi.oa.domain.vo.BsBuildingVo; |
| | | import com.ruoyi.oa.domain.bo.BsBuildingBo; |
| | | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 建筑单元Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | public interface IBsBuildingService extends IServicePlus<BsBuilding, BsBuildingVo> { |
| | | /** |
| | | * 查询单个 |
| | | * @return |
| | | */ |
| | | BsBuildingVo queryById(Long id); |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | List<BsBuildingVo> queryList(BsBuildingBo bo); |
| | | |
| | | /** |
| | | * 根据新增业务对象插入建筑单元 |
| | | * @param bo 建筑单元新增业务对象 |
| | | * @return |
| | | */ |
| | | Boolean insertByBo(BsBuildingBo bo); |
| | | |
| | | /** |
| | | * 根据编辑业务对象修改建筑单元 |
| | | * @param bo 建筑单元编辑业务对象 |
| | | * @return |
| | | */ |
| | | Boolean updateByBo(BsBuildingBo bo); |
| | | |
| | | /** |
| | | * 校验并删除数据 |
| | | * @param ids 主键集合 |
| | | * @param isValid 是否校验,true-删除前校验,false-不校验 |
| | | * @return |
| | | */ |
| | | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service; |
| | | |
| | | import com.ruoyi.oa.domain.SgConstructionBatch; |
| | | import com.ruoyi.oa.domain.vo.SgConstructionBatchVo; |
| | | import com.ruoyi.oa.domain.bo.SgConstructionBatchBo; |
| | | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 施工批次Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | public interface ISgConstructionBatchService extends IServicePlus<SgConstructionBatch, SgConstructionBatchVo> { |
| | | /** |
| | | * 查询单个 |
| | | * @return |
| | | */ |
| | | SgConstructionBatchVo queryById(Long id); |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TableDataInfo<SgConstructionBatchVo> queryPageList(SgConstructionBatchBo bo); |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | List<SgConstructionBatchVo> queryList(SgConstructionBatchBo bo); |
| | | |
| | | /** |
| | | * 根据新增业务对象插入施工批次 |
| | | * @param bo 施工批次新增业务对象 |
| | | * @return |
| | | */ |
| | | Boolean insertByBo(SgConstructionBatchBo bo); |
| | | |
| | | /** |
| | | * 根据编辑业务对象修改施工批次 |
| | | * @param bo 施工批次编辑业务对象 |
| | | * @return |
| | | */ |
| | | Boolean updateByBo(SgConstructionBatchBo bo); |
| | | |
| | | /** |
| | | * 校验并删除数据 |
| | | * @param ids 主键集合 |
| | | * @param isValid 是否校验,true-删除前校验,false-不校验 |
| | | * @return |
| | | */ |
| | | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service; |
| | | |
| | | import com.ruoyi.oa.domain.SgReserveIp; |
| | | import com.ruoyi.oa.domain.vo.SgReserveIpVo; |
| | | import com.ruoyi.oa.domain.bo.SgReserveIpBo; |
| | | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 预留IPService接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | public interface ISgReserveIpService extends IServicePlus<SgReserveIp, SgReserveIpVo> { |
| | | /** |
| | | * 查询单个 |
| | | * @return |
| | | */ |
| | | SgReserveIpVo queryById(Long id); |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TableDataInfo<SgReserveIpVo> queryPageList(SgReserveIpBo bo); |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | List<SgReserveIpVo> queryList(SgReserveIpBo bo); |
| | | |
| | | /** |
| | | * 根据新增业务对象插入预留IP |
| | | * @param bo 预留IP新增业务对象 |
| | | * @return |
| | | */ |
| | | Boolean insertByBo(SgReserveIpBo bo); |
| | | |
| | | /** |
| | | * 根据编辑业务对象修改预留IP |
| | | * @param bo 预留IP编辑业务对象 |
| | | * @return |
| | | */ |
| | | Boolean updateByBo(SgReserveIpBo bo); |
| | | |
| | | /** |
| | | * 校验并删除数据 |
| | | * @param ids 主键集合 |
| | | * @param isValid 是否校验,true-删除前校验,false-不校验 |
| | | * @return |
| | | */ |
| | | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.oa.domain.BsSchool; |
| | | import com.ruoyi.oa.domain.SgReserveIp; |
| | | import com.ruoyi.oa.mapper.BsSchoolMapper; |
| | | import com.ruoyi.oa.mapper.SgReserveIpMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.oa.domain.bo.BsBuildingBo; |
| | | import com.ruoyi.oa.domain.vo.BsBuildingVo; |
| | | import com.ruoyi.oa.domain.BsBuilding; |
| | | import com.ruoyi.oa.mapper.BsBuildingMapper; |
| | | import com.ruoyi.oa.service.IBsBuildingService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * 建筑单元Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Service |
| | | public class BsBuildingServiceImpl extends ServicePlusImpl<BsBuildingMapper, BsBuilding, BsBuildingVo> implements IBsBuildingService { |
| | | |
| | | @Autowired |
| | | private BsSchoolMapper schoolMapper; |
| | | |
| | | @Autowired |
| | | private SgReserveIpMapper reserveIpMapper; |
| | | |
| | | @Override |
| | | public BsBuildingVo queryById(Long id) { |
| | | return getVoById(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<BsBuildingVo> queryList(BsBuildingBo bo) { |
| | | return listVo(buildQueryWrapper(bo)); |
| | | } |
| | | |
| | | private LambdaQueryWrapper<BsBuilding> buildQueryWrapper(BsBuildingBo bo) { |
| | | Map<String, Object> params = bo.getParams(); |
| | | LambdaQueryWrapper<BsBuilding> lqw = Wrappers.lambdaQuery(); |
| | | lqw.like(StringUtils.isNotBlank(bo.getCode()), BsBuilding::getCode, bo.getCode()); |
| | | lqw.like(StringUtils.isNotBlank(bo.getName()), BsBuilding::getName, bo.getName()); |
| | | lqw.eq(BsBuilding::getSchoolId, bo.getSchoolId()); |
| | | lqw.orderByAsc(BsBuilding::getOrderNum); |
| | | return lqw; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean insertByBo(BsBuildingBo bo) { |
| | | BsBuilding add = BeanUtil.toBean(bo, BsBuilding.class); |
| | | if (bo.getParentId() == Long.valueOf(0)) { |
| | | BsSchool school = schoolMapper.selectById(bo.getSchoolId()); |
| | | add.setAncestors("0"); |
| | | add.setDetailedName(school.getName() + "-" + bo.getName()); |
| | | } else { |
| | | BsBuilding info = baseMapper.selectById(bo.getParentId()); |
| | | add.setAncestors(info.getAncestors() + "," + bo.getParentId()); |
| | | add.setDetailedName(info.getDetailedName() + "-" + bo.getName()); |
| | | } |
| | | boolean flag = save(add); |
| | | if (flag) { |
| | | bo.setId(add.getId()); |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateByBo(BsBuildingBo bo) { |
| | | BsBuilding update = BeanUtil.toBean(bo, BsBuilding.class); |
| | | if (bo.getParentId() == Long.valueOf(0)) { |
| | | BsSchool school = schoolMapper.selectById(bo.getSchoolId()); |
| | | update.setAncestors("0"); |
| | | update.setDetailedName(school.getName() + "-" + bo.getName()); |
| | | } else { |
| | | BsBuilding info = baseMapper.selectById(bo.getParentId()); |
| | | update.setAncestors(info.getAncestors() + "," + bo.getParentId()); |
| | | update.setDetailedName(info.getDetailedName() + "-" + bo.getName()); |
| | | } |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |
| | | } |
| | | |
| | | /** |
| | | * 保存前的数据校验 |
| | | * |
| | | * @param entity 实体类数据 |
| | | */ |
| | | private void validEntityBeforeSave(BsBuilding entity) { |
| | | //TODO 做一些数据校验,如唯一约束 |
| | | } |
| | | |
| | | @Override |
| | | public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |
| | | List<BsBuilding> list = baseMapper.selectList(new LambdaQueryWrapper<BsBuilding>() |
| | | .in(BsBuilding::getParentId, ids)); |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("存在子建筑单元,不允许删除", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<SgReserveIp> ipList = reserveIpMapper.selectList(new LambdaQueryWrapper<SgReserveIp>() |
| | | .in(SgReserveIp::getBuildingId, ids)); |
| | | if (ipList.size() > 0) { |
| | | throw new ServiceException("建筑单元已被[预留IP模块]使用,不允许删除", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | return removeByIds(ids); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.oa.domain.bo.SgConstructionBatchBo; |
| | | import com.ruoyi.oa.domain.vo.SgConstructionBatchVo; |
| | | import com.ruoyi.oa.domain.SgConstructionBatch; |
| | | import com.ruoyi.oa.mapper.SgConstructionBatchMapper; |
| | | import com.ruoyi.oa.service.ISgConstructionBatchService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * 施工批次Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-09 |
| | | */ |
| | | @Service |
| | | public class SgConstructionBatchServiceImpl extends ServicePlusImpl<SgConstructionBatchMapper, SgConstructionBatch, SgConstructionBatchVo> implements ISgConstructionBatchService { |
| | | |
| | | @Override |
| | | public SgConstructionBatchVo queryById(Long id){ |
| | | return getVoById(id); |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SgConstructionBatchVo> queryPageList(SgConstructionBatchBo bo) { |
| | | PagePlus<SgConstructionBatch, SgConstructionBatchVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo)); |
| | | return PageUtils.buildDataInfo(result); |
| | | } |
| | | |
| | | @Override |
| | | public List<SgConstructionBatchVo> queryList(SgConstructionBatchBo bo) { |
| | | return listVo(buildQueryWrapper(bo)); |
| | | } |
| | | |
| | | private LambdaQueryWrapper<SgConstructionBatch> buildQueryWrapper(SgConstructionBatchBo bo) { |
| | | Map<String, Object> params = bo.getParams(); |
| | | LambdaQueryWrapper<SgConstructionBatch> lqw = Wrappers.lambdaQuery(); |
| | | lqw.like(StringUtils.isNotBlank(bo.getBatch()), SgConstructionBatch::getBatch, bo.getBatch()); |
| | | lqw.eq(bo.getStartDate() != null, SgConstructionBatch::getStartDate, bo.getStartDate()); |
| | | lqw.eq(bo.getEndDate() != null, SgConstructionBatch::getEndDate, bo.getEndDate()); |
| | | lqw.eq(bo.getUserId() != null, SgConstructionBatch::getUserId, bo.getUserId()); |
| | | return lqw; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean insertByBo(SgConstructionBatchBo bo) { |
| | | List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>() |
| | | .eq(SgConstructionBatch::getBatch, bo.getBatch())); |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("施工批次重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | SgConstructionBatch add = BeanUtil.toBean(bo, SgConstructionBatch.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | | if (flag) { |
| | | bo.setId(add.getId()); |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateByBo(SgConstructionBatchBo bo) { |
| | | List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>() |
| | | .eq(SgConstructionBatch::getBatch, bo.getBatch()).ne(SgConstructionBatch::getId, bo.getId())); |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("施工批次重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | SgConstructionBatch update = BeanUtil.toBean(bo, SgConstructionBatch.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |
| | | } |
| | | |
| | | /** |
| | | * 保存前的数据校验 |
| | | * |
| | | * @param entity 实体类数据 |
| | | */ |
| | | private void validEntityBeforeSave(SgConstructionBatch entity){ |
| | | //TODO 做一些数据校验,如唯一约束 |
| | | } |
| | | |
| | | @Override |
| | | public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |
| | | if(isValid){ |
| | | //TODO 做一些业务上的校验,判断是否需要校验 |
| | | } |
| | | return removeByIds(ids); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.oa.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.oa.domain.bo.SgReserveIpBo; |
| | | import com.ruoyi.oa.domain.vo.SgReserveIpVo; |
| | | import com.ruoyi.oa.domain.SgReserveIp; |
| | | import com.ruoyi.oa.mapper.SgReserveIpMapper; |
| | | import com.ruoyi.oa.service.ISgReserveIpService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * 预留IPService业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-05-10 |
| | | */ |
| | | @Service |
| | | public class SgReserveIpServiceImpl extends ServicePlusImpl<SgReserveIpMapper, SgReserveIp, SgReserveIpVo> implements ISgReserveIpService { |
| | | |
| | | @Override |
| | | public SgReserveIpVo queryById(Long id){ |
| | | return getVoById(id); |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SgReserveIpVo> queryPageList(SgReserveIpBo bo) { |
| | | PagePlus<SgReserveIp, SgReserveIpVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo)); |
| | | return PageUtils.buildDataInfo(result); |
| | | } |
| | | |
| | | @Override |
| | | public List<SgReserveIpVo> queryList(SgReserveIpBo bo) { |
| | | return listVo(buildQueryWrapper(bo)); |
| | | } |
| | | |
| | | private LambdaQueryWrapper<SgReserveIp> buildQueryWrapper(SgReserveIpBo bo) { |
| | | Map<String, Object> params = bo.getParams(); |
| | | LambdaQueryWrapper<SgReserveIp> lqw = Wrappers.lambdaQuery(); |
| | | lqw.like(StringUtils.isNotBlank(bo.getIp()), SgReserveIp::getIp, bo.getIp()); |
| | | lqw.eq(bo.getBuildingId() != null, SgReserveIp::getBuildingId, bo.getBuildingId()); |
| | | return lqw; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean insertByBo(SgReserveIpBo bo) { |
| | | SgReserveIp add = BeanUtil.toBean(bo, SgReserveIp.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | | if (flag) { |
| | | bo.setId(add.getId()); |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateByBo(SgReserveIpBo bo) { |
| | | SgReserveIp update = BeanUtil.toBean(bo, SgReserveIp.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |
| | | } |
| | | |
| | | /** |
| | | * 保存前的数据校验 |
| | | * |
| | | * @param entity 实体类数据 |
| | | */ |
| | | private void validEntityBeforeSave(SgReserveIp entity){ |
| | | //TODO 做一些数据校验,如唯一约束 |
| | | } |
| | | |
| | | @Override |
| | | public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |
| | | if(isValid){ |
| | | //TODO 做一些业务上的校验,判断是否需要校验 |
| | | } |
| | | return removeByIds(ids); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.oa.mapper.BsBuildingMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.oa.domain.BsBuilding" id="BsBuildingResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="code" column="code"/> |
| | | <result property="name" column="name"/> |
| | | <result property="schoolId" column="school_id"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="ancestors" column="ancestors"/> |
| | | <result property="orderNum" column="order_num"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.oa.mapper.SgConstructionBatchMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.oa.domain.SgConstructionBatch" id="SgConstructionBatchResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="batch" column="batch"/> |
| | | <result property="startDate" column="start_date"/> |
| | | <result property="endDate" column="end_date"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="teamMembers" column="team_members"/> |
| | | <result property="remarks" column="remarks"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.oa.mapper.SgReserveIpMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.oa.domain.SgReserveIp" id="SgReserveIpResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="ip" column="ip"/> |
| | | <result property="mac" column="mac"/> |
| | | <result property="buildingId" column="building_id"/> |
| | | <result property="applicationDate" column="application_date"/> |
| | | <result property="remarks" column="remarks"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | |
| | | |
| | | </mapper> |