From 85e6498e0125ea32c9c743faad0ee0863c4b278a Mon Sep 17 00:00:00 2001 From: 唐耀东 <18861537@qq.com> Date: 星期五, 13 五月 2022 17:20:58 +0800 Subject: [PATCH] 提交代码 --- ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgSystemService.java | 56 + ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgSystemBo.java | 133 +++ ruoyi-oa/src/main/resources/mapper/oa/SgExchangeMapper.xml | 29 ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgExchangeService.java | 56 + ruoyi-oa/src/main/resources/mapper/oa/SgServerMapper.xml | 34 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgServer.java | 105 ++ ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgServerMapper.java | 14 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgExchange.java | 89 ++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgServerVo.java | 160 ++++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgExchangeVo.java | 132 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgExchangeController.java | 118 +++ ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgServerController.java | 118 +++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgExchangeBo.java | 143 +++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgServerBo.java | 170 ++++ ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgExchangeMapper.java | 14 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgSystemServiceImpl.java | 93 ++ ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgExchangeServiceImpl.java | 102 ++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgSystemVo.java | 117 +++ ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgSystemMapper.java | 14 ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgSystemController.java | 118 +++ ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgSystem.java | 81 ++ ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgServerServiceImpl.java | 127 +++ ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgServerService.java | 56 + ruoyi-oa/src/main/resources/mapper/oa/SgSystemMapper.xml | 28 24 files changed, 2,107 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgExchangeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgExchangeController.java new file mode 100644 index 0000000..934e7e4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgExchangeController.java @@ -0,0 +1,118 @@ +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.SgExchangeVo; +import com.ruoyi.oa.domain.bo.SgExchangeBo; +import com.ruoyi.oa.service.ISgExchangeService; +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-13 + */ +@Validated +@Api(value = "浜ゆ崲璁惧鎺у埗鍣�", tags = {"浜ゆ崲璁惧绠$悊"}) +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/oa/exchange") +public class SgExchangeController extends BaseController { + + private final ISgExchangeService iSgExchangeService; + + /** + * 鏌ヨ浜ゆ崲璁惧鍒楄〃 + */ + @DataDictClass + @ApiOperation("鏌ヨ浜ゆ崲璁惧鍒楄〃") + @PreAuthorize("@ss.hasPermi('oa:exchange:list')") + @GetMapping("/list") + public TableDataInfo<SgExchangeVo> list(@Validated(QueryGroup.class) SgExchangeBo bo) { + return iSgExchangeService.queryPageList(bo); + } + + /** + * 瀵煎嚭浜ゆ崲璁惧鍒楄〃 + */ + @ApiOperation("瀵煎嚭浜ゆ崲璁惧鍒楄〃") + @PreAuthorize("@ss.hasPermi('oa:exchange:export')") + @Log(title = "浜ゆ崲璁惧", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public void export(@Validated SgExchangeBo bo, HttpServletResponse response) { + List<SgExchangeVo> list = iSgExchangeService.queryList(bo); + ExcelUtil.exportExcel(list, "浜ゆ崲璁惧", SgExchangeVo.class, response); + } + + /** + * 鑾峰彇浜ゆ崲璁惧璇︾粏淇℃伅 + */ + @ApiOperation("鑾峰彇浜ゆ崲璁惧璇︾粏淇℃伅") + @PreAuthorize("@ss.hasPermi('oa:exchange:query')") + @GetMapping("/{id}") + public AjaxResult<SgExchangeVo> getInfo(@ApiParam("涓婚敭") + @NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable("id") Long id) { + return AjaxResult.success(iSgExchangeService.queryById(id)); + } + + /** + * 鏂板浜ゆ崲璁惧 + */ + @ApiOperation("鏂板浜ゆ崲璁惧") + @PreAuthorize("@ss.hasPermi('oa:exchange:add')") + @Log(title = "浜ゆ崲璁惧", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgExchangeBo bo) { + return toAjax(iSgExchangeService.insertByBo(bo) ? 1 : 0); + } + + /** + * 淇敼浜ゆ崲璁惧 + */ + @ApiOperation("淇敼浜ゆ崲璁惧") + @PreAuthorize("@ss.hasPermi('oa:exchange:edit')") + @Log(title = "浜ゆ崲璁惧", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgExchangeBo bo) { + return toAjax(iSgExchangeService.updateByBo(bo) ? 1 : 0); + } + + /** + * 鍒犻櫎浜ゆ崲璁惧 + */ + @ApiOperation("鍒犻櫎浜ゆ崲璁惧") + @PreAuthorize("@ss.hasPermi('oa:exchange:remove')") + @Log(title = "浜ゆ崲璁惧" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�") + @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long[] ids) { + return toAjax(iSgExchangeService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgServerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgServerController.java new file mode 100644 index 0000000..123b416 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgServerController.java @@ -0,0 +1,118 @@ +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.SgServerVo; +import com.ruoyi.oa.domain.bo.SgServerBo; +import com.ruoyi.oa.service.ISgServerService; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiOperation; + +/** + * 鏈嶅姟鍣–ontroller + * + * @author ruoyi + * @date 2022-05-13 + */ +@Validated +@Api(value = "鏈嶅姟鍣ㄦ帶鍒跺櫒", tags = {"鏈嶅姟鍣ㄧ鐞�"}) +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/oa/server") +public class SgServerController extends BaseController { + + private final ISgServerService iSgServerService; + + /** + * 鏌ヨ鏈嶅姟鍣ㄥ垪琛� + */ + @DataDictClass + @ApiOperation("鏌ヨ鏈嶅姟鍣ㄥ垪琛�") + @PreAuthorize("@ss.hasPermi('oa:server:list')") + @GetMapping("/list") + public TableDataInfo<SgServerVo> list(@Validated(QueryGroup.class) SgServerBo bo) { + return iSgServerService.queryPageList(bo); + } + + /** + * 瀵煎嚭鏈嶅姟鍣ㄥ垪琛� + */ + @ApiOperation("瀵煎嚭鏈嶅姟鍣ㄥ垪琛�") + @PreAuthorize("@ss.hasPermi('oa:server:export')") + @Log(title = "鏈嶅姟鍣�", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public void export(@Validated SgServerBo bo, HttpServletResponse response) { + List<SgServerVo> list = iSgServerService.queryList(bo); + ExcelUtil.exportExcel(list, "鏈嶅姟鍣�", SgServerVo.class, response); + } + + /** + * 鑾峰彇鏈嶅姟鍣ㄨ缁嗕俊鎭� + */ + @ApiOperation("鑾峰彇鏈嶅姟鍣ㄨ缁嗕俊鎭�") + @PreAuthorize("@ss.hasPermi('oa:server:query')") + @GetMapping("/{id}") + public AjaxResult<SgServerVo> getInfo(@ApiParam("涓婚敭") + @NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable("id") Long id) { + return AjaxResult.success(iSgServerService.queryById(id)); + } + + /** + * 鏂板鏈嶅姟鍣� + */ + @ApiOperation("鏂板鏈嶅姟鍣�") + @PreAuthorize("@ss.hasPermi('oa:server:add')") + @Log(title = "鏈嶅姟鍣�", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgServerBo bo) { + return toAjax(iSgServerService.insertByBo(bo) ? 1 : 0); + } + + /** + * 淇敼鏈嶅姟鍣� + */ + @ApiOperation("淇敼鏈嶅姟鍣�") + @PreAuthorize("@ss.hasPermi('oa:server:edit')") + @Log(title = "鏈嶅姟鍣�", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgServerBo bo) { + return toAjax(iSgServerService.updateByBo(bo) ? 1 : 0); + } + + /** + * 鍒犻櫎鏈嶅姟鍣� + */ + @ApiOperation("鍒犻櫎鏈嶅姟鍣�") + @PreAuthorize("@ss.hasPermi('oa:server:remove')") + @Log(title = "鏈嶅姟鍣�" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�") + @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long[] ids) { + return toAjax(iSgServerService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgSystemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgSystemController.java new file mode 100644 index 0000000..d714e15 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgSystemController.java @@ -0,0 +1,118 @@ +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.SgSystemVo; +import com.ruoyi.oa.domain.bo.SgSystemBo; +import com.ruoyi.oa.service.ISgSystemService; +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-13 + */ +@Validated +@Api(value = "杞欢绯荤粺鎺у埗鍣�", tags = {"杞欢绯荤粺绠$悊"}) +@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RestController +@RequestMapping("/oa/system") +public class SgSystemController extends BaseController { + + private final ISgSystemService iSgSystemService; + + /** + * 鏌ヨ杞欢绯荤粺鍒楄〃 + */ + @DataDictClass + @ApiOperation("鏌ヨ杞欢绯荤粺鍒楄〃") + @PreAuthorize("@ss.hasPermi('oa:system:list')") + @GetMapping("/list") + public TableDataInfo<SgSystemVo> list(@Validated(QueryGroup.class) SgSystemBo bo) { + return iSgSystemService.queryPageList(bo); + } + + /** + * 瀵煎嚭杞欢绯荤粺鍒楄〃 + */ + @ApiOperation("瀵煎嚭杞欢绯荤粺鍒楄〃") + @PreAuthorize("@ss.hasPermi('oa:system:export')") + @Log(title = "杞欢绯荤粺", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public void export(@Validated SgSystemBo bo, HttpServletResponse response) { + List<SgSystemVo> list = iSgSystemService.queryList(bo); + ExcelUtil.exportExcel(list, "杞欢绯荤粺", SgSystemVo.class, response); + } + + /** + * 鑾峰彇杞欢绯荤粺璇︾粏淇℃伅 + */ + @ApiOperation("鑾峰彇杞欢绯荤粺璇︾粏淇℃伅") + @PreAuthorize("@ss.hasPermi('oa:system:query')") + @GetMapping("/{id}") + public AjaxResult<SgSystemVo> getInfo(@ApiParam("涓婚敭") + @NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable("id") Long id) { + return AjaxResult.success(iSgSystemService.queryById(id)); + } + + /** + * 鏂板杞欢绯荤粺 + */ + @ApiOperation("鏂板杞欢绯荤粺") + @PreAuthorize("@ss.hasPermi('oa:system:add')") + @Log(title = "杞欢绯荤粺", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgSystemBo bo) { + return toAjax(iSgSystemService.insertByBo(bo) ? 1 : 0); + } + + /** + * 淇敼杞欢绯荤粺 + */ + @ApiOperation("淇敼杞欢绯荤粺") + @PreAuthorize("@ss.hasPermi('oa:system:edit')") + @Log(title = "杞欢绯荤粺", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgSystemBo bo) { + return toAjax(iSgSystemService.updateByBo(bo) ? 1 : 0); + } + + /** + * 鍒犻櫎杞欢绯荤粺 + */ + @ApiOperation("鍒犻櫎杞欢绯荤粺") + @PreAuthorize("@ss.hasPermi('oa:system:remove')") + @Log(title = "杞欢绯荤粺" , businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�") + @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long[] ids) { + return toAjax(iSgSystemService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); + } +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgExchange.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgExchange.java new file mode 100644 index 0000000..401ef9c --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgExchange.java @@ -0,0 +1,89 @@ +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.BaseEntity; + +/** + * 浜ゆ崲璁惧瀵硅薄 sg_exchange + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@Accessors(chain = true) +@TableName("sg_exchange") +public class SgExchange extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + /** + * 楂樻牎 + */ + private Long schoolId; + /** + * 缃戠粶绔彛 + */ + private String networkPort; + /** + * 鎸囨爣A + */ + private String idnexA; + /** + * 绾ц仈绔彛 + */ + private String cascadePort; + /** + * 鎸囨爣B + */ + private String indexB; + /** + * 瀹夎浣嶇疆 + */ + private Long buildingId; + /** + * 璇︾粏鍦板潃 + */ + private String address; + /** + * 鎵�灞炲崟浣� + */ + private Long organizationId; + /** + * 鏂藉伐鎵规 + */ + private Long constructionBatchId; + /** + * 搴忓垪鍙� + */ + private String serialNumber; + /** + * 鍨嬪彿 + */ + private String model; + /** + * 鐢熶骇鍘傚晢 + */ + private Long manufacturerId; + /** + * 闄勪欢 + */ + private String filePath; + /** + * + */ + @TableLogic + private String delFlag; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgServer.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgServer.java new file mode 100644 index 0000000..b2d8264 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgServer.java @@ -0,0 +1,105 @@ +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.BaseEntity; + +/** + * 鏈嶅姟鍣ㄥ璞� sg_server + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@Accessors(chain = true) +@TableName("sg_server") +public class SgServer extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + /** + * 楂樻牎 + */ + private Long schoolId; + /** + * 閮ㄧ讲鍚嶇О + */ + private String deploymentName; + /** + * LAN + */ + private String lan; + /** + * IP + */ + private String ip; + /** + * 鎿嶄綔绯荤粺 + */ + private String operatingSystem; + /** + * 璐︽埛 + */ + private String account; + /** + * 閮ㄧ讲浣嶇疆 + */ + private Long buildingId; + /** + * 鏈烘煖鍙� + */ + private String cabinetNumber; + /** + * 鏈烘灦鍙� + */ + private String rackNumber; + /** + * 鎵�灞炲崟浣� + */ + private Long organizationId; + /** + * 鏂藉伐鎵规 + */ + private Long constructionBatchId; + /** + * 搴忓垪鍙� + */ + private String serialNumber; + /** + * 鍨嬪彿 + */ + private String model; + /** + * 鐢熶骇鍘傚晢 + */ + private Long manufacturerId; + /** + * 鎬ц兘鎸囨爣 + */ + private String performanceIndex; + /** + * 澶囨敞 + */ + private String remarks; + /** + * 闄勪欢 + */ + private String filePath; + /** + * + */ + @TableLogic + private String delFlag; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgSystem.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgSystem.java new file mode 100644 index 0000000..a7ff012 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgSystem.java @@ -0,0 +1,81 @@ +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.BaseEntity; + +/** + * 杞欢绯荤粺瀵硅薄 sg_system + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@Accessors(chain = true) +@TableName("sg_system") +public class SgSystem extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + /** + * 楂樻牎 + */ + private Long schoolId; + /** + * 杞欢鍚嶇О + */ + private String name; + /** + * 鐗堟湰 + */ + private String edition; + /** + * 鍔熻兘鎻忚堪 + */ + private String functionDescription; + /** + * 鎺堟潈鏂瑰紡 + */ + private String authorizationMethod; + /** + * 鎺堟潈鏁伴噺 + */ + private String authorizedQuantity; + /** + * 杞戒綋鏈嶅姟鍣� + */ + private Long serverId; + /** + * 鏂藉伐鎵规 + */ + private Long constructionBatchId; + /** + * 鐢熶骇鍘傚晢 + */ + private Long manufacturerId; + /** + * 澶囨敞 + */ + private String remarks; + /** + * 闄勪欢 + */ + private String filePath; + /** + * + */ + @TableLogic + private String delFlag; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgExchangeBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgExchangeBo.java new file mode 100644 index 0000000..340d022 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgExchangeBo.java @@ -0,0 +1,143 @@ +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.BaseEntity; + +/** + * 浜ゆ崲璁惧涓氬姟瀵硅薄 sg_exchange + * + * @author ruoyi + * @date 2022-05-13 + */ + +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel("浜ゆ崲璁惧涓氬姟瀵硅薄") +public class SgExchangeBo extends BaseEntity { + + /** + * + */ + @ApiModelProperty(value = "", required = true) + @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class }) + private Long id; + + /** + * 楂樻牎 + */ + @ApiModelProperty(value = "楂樻牎", required = true) + @NotNull(message = "楂樻牎涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long schoolId; + + /** + * 缃戠粶绔彛 + */ + @ApiModelProperty(value = "缃戠粶绔彛", required = true) + @NotBlank(message = "缃戠粶绔彛涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String networkPort; + + /** + * 鎸囨爣A + */ + @ApiModelProperty(value = "鎸囨爣A", required = true) + @NotBlank(message = "鎸囨爣A涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String idnexA; + + /** + * 绾ц仈绔彛 + */ + @ApiModelProperty(value = "绾ц仈绔彛", required = true) + @NotBlank(message = "绾ц仈绔彛涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String cascadePort; + + /** + * 鎸囨爣B + */ + @ApiModelProperty(value = "鎸囨爣B", required = true) + @NotBlank(message = "鎸囨爣B涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String indexB; + + /** + * 瀹夎浣嶇疆 + */ + @ApiModelProperty(value = "瀹夎浣嶇疆", required = true) + @NotNull(message = "瀹夎浣嶇疆涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long buildingId; + + /** + * 璇︾粏鍦板潃 + */ + @ApiModelProperty(value = "璇︾粏鍦板潃") + private String address; + + /** + * 鎵�灞炲崟浣� + */ + @ApiModelProperty(value = "鎵�灞炲崟浣�", required = true) + @NotNull(message = "鎵�灞炲崟浣嶄笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) + private Long organizationId; + + /** + * 鏂藉伐鎵规 + */ + @ApiModelProperty(value = "鏂藉伐鎵规", required = true) + @NotNull(message = "鏂藉伐鎵规涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long constructionBatchId; + + /** + * 搴忓垪鍙� + */ + @ApiModelProperty(value = "搴忓垪鍙�") + private String serialNumber; + + /** + * 鍨嬪彿 + */ + @ApiModelProperty(value = "鍨嬪彿") + private String model; + + /** + * 鐢熶骇鍘傚晢 + */ + @ApiModelProperty(value = "鐢熶骇鍘傚晢") + private Long manufacturerId; + + /** + * 闄勪欢 + */ + private String filePath; + + /** + * 鍒嗛〉澶у皬 + */ + @ApiModelProperty("鍒嗛〉澶у皬") + private Integer pageSize; + + /** + * 褰撳墠椤垫暟 + */ + @ApiModelProperty("褰撳墠椤垫暟") + private Integer pageNum; + + /** + * 鎺掑簭鍒� + */ + @ApiModelProperty("鎺掑簭鍒�") + private String orderByColumn; + + /** + * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc + */ + @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc") + private String isAsc; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgServerBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgServerBo.java new file mode 100644 index 0000000..4927da9 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgServerBo.java @@ -0,0 +1,170 @@ +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.BaseEntity; + +/** + * 鏈嶅姟鍣ㄤ笟鍔″璞� sg_server + * + * @author ruoyi + * @date 2022-05-13 + */ + +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel("鏈嶅姟鍣ㄤ笟鍔″璞�") +public class SgServerBo extends BaseEntity { + + /** + * + */ + @ApiModelProperty(value = "", required = true) + @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class }) + private Long id; + + /** + * 楂樻牎 + */ + @ApiModelProperty(value = "楂樻牎", required = true) + @NotNull(message = "楂樻牎涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long schoolId; + + /** + * 閮ㄧ讲鍚嶇О + */ + @ApiModelProperty(value = "閮ㄧ讲鍚嶇О", required = true) + @NotBlank(message = "閮ㄧ讲鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String deploymentName; + + /** + * LAN + */ + @ApiModelProperty(value = "LAN", required = true) + @NotBlank(message = "LAN涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String lan; + + /** + * IP + */ + @ApiModelProperty(value = "IP", required = true) + @NotBlank(message = "IP涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String ip; + + /** + * 鎿嶄綔绯荤粺 + */ + @ApiModelProperty(value = "鎿嶄綔绯荤粺", required = true) + @NotBlank(message = "鎿嶄綔绯荤粺涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String operatingSystem; + + /** + * 璐︽埛 + */ + @ApiModelProperty(value = "璐︽埛", required = true) + @NotBlank(message = "璐︽埛涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String account; + + /** + * 閮ㄧ讲浣嶇疆 + */ + @ApiModelProperty(value = "閮ㄧ讲浣嶇疆", required = true) + @NotNull(message = "閮ㄧ讲浣嶇疆涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long buildingId; + + /** + * 鏈烘煖鍙� + */ + @ApiModelProperty(value = "鏈烘煖鍙�") + private String cabinetNumber; + + /** + * 鏈烘灦鍙� + */ + @ApiModelProperty(value = "鏈烘灦鍙�") + private String rackNumber; + + /** + * 鎵�灞炲崟浣� + */ + @ApiModelProperty(value = "鎵�灞炲崟浣�", required = true) + @NotNull(message = "鎵�灞炲崟浣嶄笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) + private Long organizationId; + + /** + * 鏂藉伐鎵规 + */ + @ApiModelProperty(value = "鏂藉伐鎵规", required = true) + @NotNull(message = "鏂藉伐鎵规涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long constructionBatchId; + + /** + * 搴忓垪鍙� + */ + @ApiModelProperty(value = "搴忓垪鍙�") + private String serialNumber; + + /** + * 鍨嬪彿 + */ + @ApiModelProperty(value = "鍨嬪彿") + private String model; + + /** + * 鐢熶骇鍘傚晢 + */ + @ApiModelProperty(value = "鐢熶骇鍘傚晢") + private Long manufacturerId; + + /** + * 鎬ц兘鎸囨爣 + */ + @ApiModelProperty(value = "鎬ц兘鎸囨爣") + private String performanceIndex; + + /** + * 澶囨敞 + */ + @ApiModelProperty(value = "澶囨敞") + private String remarks; + + /** + * 闄勪欢 + */ + @ApiModelProperty(value = "闄勪欢") + private String filePath; + + + /** + * 鍒嗛〉澶у皬 + */ + @ApiModelProperty("鍒嗛〉澶у皬") + private Integer pageSize; + + /** + * 褰撳墠椤垫暟 + */ + @ApiModelProperty("褰撳墠椤垫暟") + private Integer pageNum; + + /** + * 鎺掑簭鍒� + */ + @ApiModelProperty("鎺掑簭鍒�") + private String orderByColumn; + + /** + * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc + */ + @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc") + private String isAsc; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgSystemBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgSystemBo.java new file mode 100644 index 0000000..38d28b9 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgSystemBo.java @@ -0,0 +1,133 @@ +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.BaseEntity; + +/** + * 杞欢绯荤粺涓氬姟瀵硅薄 sg_system + * + * @author ruoyi + * @date 2022-05-13 + */ + +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel("杞欢绯荤粺涓氬姟瀵硅薄") +public class SgSystemBo extends BaseEntity { + + /** + * + */ + @ApiModelProperty(value = "", required = true) + @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class }) + private Long id; + + /** + * 楂樻牎 + */ + @ApiModelProperty(value = "楂樻牎", required = true) + @NotNull(message = "楂樻牎涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long schoolId; + + /** + * 杞欢鍚嶇О + */ + @ApiModelProperty(value = "杞欢鍚嶇О", required = true) + @NotBlank(message = "杞欢鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String name; + + /** + * 鐗堟湰 + */ + @ApiModelProperty(value = "鐗堟湰", required = true) + @NotBlank(message = "鐗堟湰涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String edition; + + /** + * 鍔熻兘鎻忚堪 + */ + @ApiModelProperty(value = "鍔熻兘鎻忚堪", required = true) + @NotBlank(message = "鍔熻兘鎻忚堪涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String functionDescription; + + /** + * 鎺堟潈鏂瑰紡 + */ + @ApiModelProperty(value = "鎺堟潈鏂瑰紡", required = true) + @NotBlank(message = "鎺堟潈鏂瑰紡涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String authorizationMethod; + + /** + * 鎺堟潈鏁伴噺 + */ + @ApiModelProperty(value = "鎺堟潈鏁伴噺", required = true) + @NotBlank(message = "鎺堟潈鏁伴噺涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private String authorizedQuantity; + + /** + * 杞戒綋鏈嶅姟鍣� + */ + @ApiModelProperty(value = "杞戒綋鏈嶅姟鍣�", required = true) + @NotNull(message = "杞戒綋鏈嶅姟鍣ㄤ笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) + private Long serverId; + + /** + * 鏂藉伐鎵规 + */ + @ApiModelProperty(value = "鏂藉伐鎵规", required = true) + @NotNull(message = "鏂藉伐鎵规涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) + private Long constructionBatchId; + + /** + * 鐢熶骇鍘傚晢 + */ + @ApiModelProperty(value = "鐢熶骇鍘傚晢") + private Long manufacturerId; + + /** + * 澶囨敞 + */ + @ApiModelProperty(value = "澶囨敞") + private String remarks; + + /** + * 闄勪欢 + */ + @ApiModelProperty(value = "闄勪欢") + private String filePath; + + + /** + * 鍒嗛〉澶у皬 + */ + @ApiModelProperty("鍒嗛〉澶у皬") + private Integer pageSize; + + /** + * 褰撳墠椤垫暟 + */ + @ApiModelProperty("褰撳墠椤垫暟") + private Integer pageNum; + + /** + * 鎺掑簭鍒� + */ + @ApiModelProperty("鎺掑簭鍒�") + private String orderByColumn; + + /** + * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc + */ + @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc") + private String isAsc; + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgExchangeVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgExchangeVo.java new file mode 100644 index 0000000..045f0e8 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgExchangeVo.java @@ -0,0 +1,132 @@ +package com.ruoyi.oa.domain.vo; + +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_exchange + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@ApiModel("浜ゆ崲璁惧瑙嗗浘瀵硅薄") +@ExcelIgnoreUnannotated +public class SgExchangeVo { + + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + @ApiModelProperty("") + private Long id; + + /** + * 楂樻牎 + */ + @ExcelProperty(value = "楂樻牎") + @ApiModelProperty("楂樻牎") + private Long schoolId; + + /** + * 缃戠粶绔彛 + */ + @ExcelProperty(value = "缃戠粶绔彛", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "DICT113") + @ApiModelProperty("缃戠粶绔彛") + private String networkPort; + + /** + * 鎸囨爣A + */ + @ExcelProperty(value = "鎸囨爣A", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "DICT114") + @ApiModelProperty("鎸囨爣A") + private String idnexA; + + /** + * 绾ц仈绔彛 + */ + @ExcelProperty(value = "绾ц仈绔彛", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "DICT113") + @ApiModelProperty("绾ц仈绔彛") + private String cascadePort; + + /** + * 鎸囨爣B + */ + @ExcelProperty(value = "鎸囨爣B", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "DICT114") + @ApiModelProperty("鎸囨爣B") + private String indexB; + + /** + * 瀹夎浣嶇疆 + */ + @ExcelProperty(value = "瀹夎浣嶇疆") + @ApiModelProperty("瀹夎浣嶇疆") + @Dict(dictTable = "bs_building", dicCode = "id", dicText = "detailed_name") + private Long buildingId; + + /** + * 璇︾粏鍦板潃 + */ + @ExcelProperty(value = "璇︾粏鍦板潃") + @ApiModelProperty("璇︾粏鍦板潃") + private String address; + + /** + * 鎵�灞炲崟浣� + */ + @ExcelProperty(value = "鎵�灞炲崟浣�") + @ApiModelProperty("鎵�灞炲崟浣�") + @Dict(dictTable = "bs_organization", dicCode = "id", dicText = "detailed_name") + private Long organizationId; + + /** + * 鏂藉伐鎵规 + */ + @ExcelProperty(value = "鏂藉伐鎵规") + @ApiModelProperty("鏂藉伐鎵规") + @Dict(dictTable = "sg_construction_batch", dicCode = "id", dicText = "batch") + private Long constructionBatchId; + + /** + * 搴忓垪鍙� + */ + @ExcelProperty(value = "搴忓垪鍙�") + @ApiModelProperty("搴忓垪鍙�") + private String serialNumber; + + /** + * 鍨嬪彿 + */ + @ExcelProperty(value = "鍨嬪彿") + @ApiModelProperty("鍨嬪彿") + private String model; + + /** + * 鐢熶骇鍘傚晢 + */ + @ExcelProperty(value = "鐢熶骇鍘傚晢") + @ApiModelProperty("鐢熶骇鍘傚晢") + @Dict(dictTable = "dev_manufacturer", dicCode = "id", dicText = "name") + private Long manufacturerId; + /** + * 闄勪欢 + */ + private String filePath; + + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgServerVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgServerVo.java new file mode 100644 index 0000000..6dc231a --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgServerVo.java @@ -0,0 +1,160 @@ +package com.ruoyi.oa.domain.vo; + +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_server + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@ApiModel("鏈嶅姟鍣ㄨ鍥惧璞�") +@ExcelIgnoreUnannotated +public class SgServerVo { + + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + @ApiModelProperty("") + private Long id; + + /** + * 楂樻牎 + */ + @ExcelProperty(value = "楂樻牎") + @ApiModelProperty("楂樻牎") + private Long schoolId; + + /** + * 閮ㄧ讲鍚嶇О + */ + @ExcelProperty(value = "閮ㄧ讲鍚嶇О") + @ApiModelProperty("閮ㄧ讲鍚嶇О") + private String deploymentName; + + /** + * LAN + */ + @ExcelProperty(value = "LAN") + @ApiModelProperty("LAN") + private String lan; + + /** + * IP + */ + @ExcelProperty(value = "IP") + @ApiModelProperty("IP") + private String ip; + + /** + * 鎿嶄綔绯荤粺 + */ + @ExcelProperty(value = "鎿嶄綔绯荤粺", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "DICT115") + @ApiModelProperty("鎿嶄綔绯荤粺") + private String operatingSystem; + + /** + * 璐︽埛 + */ + @ExcelProperty(value = "璐︽埛") + @ApiModelProperty("璐︽埛") + private String account; + + /** + * 閮ㄧ讲浣嶇疆 + */ + @ExcelProperty(value = "閮ㄧ讲浣嶇疆") + @ApiModelProperty("閮ㄧ讲浣嶇疆") + @Dict(dictTable = "bs_building", dicCode = "id", dicText = "detailed_name") + private Long buildingId; + + /** + * 鏈烘煖鍙� + */ + @ExcelProperty(value = "鏈烘煖鍙�") + @ApiModelProperty("鏈烘煖鍙�") + private String cabinetNumber; + + /** + * 鏈烘灦鍙� + */ + @ExcelProperty(value = "鏈烘灦鍙�") + @ApiModelProperty("鏈烘灦鍙�") + private String rackNumber; + + /** + * 鎵�灞炲崟浣� + */ + @ExcelProperty(value = "鎵�灞炲崟浣�") + @ApiModelProperty("鎵�灞炲崟浣�") + @Dict(dictTable = "bs_organization", dicCode = "id", dicText = "detailed_name") + private Long organizationId; + + /** + * 鏂藉伐鎵规 + */ + @ExcelProperty(value = "鏂藉伐鎵规") + @ApiModelProperty("鏂藉伐鎵规") + @Dict(dictTable = "sg_construction_batch", dicCode = "id", dicText = "batch") + private Long constructionBatchId; + + /** + * 搴忓垪鍙� + */ + @ExcelProperty(value = "搴忓垪鍙�") + @ApiModelProperty("搴忓垪鍙�") + private String serialNumber; + + /** + * 鍨嬪彿 + */ + @ExcelProperty(value = "鍨嬪彿") + @ApiModelProperty("鍨嬪彿") + private String model; + + /** + * 鐢熶骇鍘傚晢 + */ + @ExcelProperty(value = "鐢熶骇鍘傚晢") + @ApiModelProperty("鐢熶骇鍘傚晢") + @Dict(dictTable = "dev_manufacturer", dicCode = "id", dicText = "name") + private Long manufacturerId; + + /** + * 鎬ц兘鎸囨爣 + */ + @ExcelProperty(value = "鎬ц兘鎸囨爣") + @ApiModelProperty("鎬ц兘鎸囨爣") + private String performanceIndex; + + /** + * 澶囨敞 + */ + @ExcelProperty(value = "澶囨敞") + @ApiModelProperty("澶囨敞") + private String remarks; + + /** + * 闄勪欢 + */ + @ExcelProperty(value = "闄勪欢") + @ApiModelProperty("闄勪欢") + private String filePath; + + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgSystemVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgSystemVo.java new file mode 100644 index 0000000..fc966d9 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgSystemVo.java @@ -0,0 +1,117 @@ +package com.ruoyi.oa.domain.vo; + +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_system + * + * @author ruoyi + * @date 2022-05-13 + */ +@Data +@ApiModel("杞欢绯荤粺瑙嗗浘瀵硅薄") +@ExcelIgnoreUnannotated +public class SgSystemVo { + + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + @ApiModelProperty("") + private Long id; + + /** + * 楂樻牎 + */ + @ExcelProperty(value = "楂樻牎") + @ApiModelProperty("楂樻牎") + private Long schoolId; + + /** + * 杞欢鍚嶇О + */ + @ExcelProperty(value = "杞欢鍚嶇О") + @ApiModelProperty("杞欢鍚嶇О") + private String name; + + /** + * 鐗堟湰 + */ + @ExcelProperty(value = "鐗堟湰") + @ApiModelProperty("鐗堟湰") + private String edition; + + /** + * 鍔熻兘鎻忚堪 + */ + @ExcelProperty(value = "鍔熻兘鎻忚堪") + @ApiModelProperty("鍔熻兘鎻忚堪") + private String functionDescription; + + /** + * 鎺堟潈鏂瑰紡 + */ + @ExcelProperty(value = "鎺堟潈鏂瑰紡") + @ApiModelProperty("鎺堟潈鏂瑰紡") + @Dict(dicCode = "DICT116") + private String authorizationMethod; + + /** + * 鎺堟潈鏁伴噺 + */ + @ExcelProperty(value = "鎺堟潈鏁伴噺") + @ApiModelProperty("鎺堟潈鏁伴噺") + private String authorizedQuantity; + + /** + * 杞戒綋鏈嶅姟鍣� + */ + @ExcelProperty(value = "杞戒綋鏈嶅姟鍣�") + @ApiModelProperty("杞戒綋鏈嶅姟鍣�") + @Dict(dictTable = "sg_server", dicCode = "id", dicText = "deployment_name") + private Long serverId; + + /** + * 鏂藉伐鎵规 + */ + @ExcelProperty(value = "鏂藉伐鎵规") + @ApiModelProperty("鏂藉伐鎵规") + @Dict(dictTable = "sg_construction_batch", dicCode = "id", dicText = "batch") + private Long constructionBatchId; + + /** + * 鐢熶骇鍘傚晢 + */ + @ExcelProperty(value = "鐢熶骇鍘傚晢") + @ApiModelProperty("鐢熶骇鍘傚晢") + @Dict(dictTable = "dev_manufacturer", dicCode = "id", dicText = "name") + private Long manufacturerId; + + /** + * 澶囨敞 + */ + @ExcelProperty(value = "澶囨敞") + @ApiModelProperty("澶囨敞") + private String remarks; + + /** + * 闄勪欢 + */ + @ExcelProperty(value = "闄勪欢") + @ApiModelProperty("闄勪欢") + private String filePath; + + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgExchangeMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgExchangeMapper.java new file mode 100644 index 0000000..fc1259c --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgExchangeMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.oa.mapper; + +import com.ruoyi.oa.domain.SgExchange; +import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; + +/** + * 浜ゆ崲璁惧Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2022-05-13 + */ +public interface SgExchangeMapper extends BaseMapperPlus<SgExchange> { + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgServerMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgServerMapper.java new file mode 100644 index 0000000..08a0a58 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgServerMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.oa.mapper; + +import com.ruoyi.oa.domain.SgServer; +import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; + +/** + * 鏈嶅姟鍣∕apper鎺ュ彛 + * + * @author ruoyi + * @date 2022-05-13 + */ +public interface SgServerMapper extends BaseMapperPlus<SgServer> { + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgSystemMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgSystemMapper.java new file mode 100644 index 0000000..7e28671 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgSystemMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.oa.mapper; + +import com.ruoyi.oa.domain.SgSystem; +import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; + +/** + * 杞欢绯荤粺Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2022-05-13 + */ +public interface SgSystemMapper extends BaseMapperPlus<SgSystem> { + +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgExchangeService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgExchangeService.java new file mode 100644 index 0000000..3c57cce --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgExchangeService.java @@ -0,0 +1,56 @@ +package com.ruoyi.oa.service; + +import com.ruoyi.oa.domain.SgExchange; +import com.ruoyi.oa.domain.vo.SgExchangeVo; +import com.ruoyi.oa.domain.bo.SgExchangeBo; +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-13 + */ +public interface ISgExchangeService extends IServicePlus<SgExchange, SgExchangeVo> { + /** + * 鏌ヨ鍗曚釜 + * @return + */ + SgExchangeVo queryById(Long id); + + /** + * 鏌ヨ鍒楄〃 + */ + TableDataInfo<SgExchangeVo> queryPageList(SgExchangeBo bo); + + /** + * 鏌ヨ鍒楄〃 + */ + List<SgExchangeVo> queryList(SgExchangeBo bo); + + /** + * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆浜ゆ崲璁惧 + * @param bo 浜ゆ崲璁惧鏂板涓氬姟瀵硅薄 + * @return + */ + Boolean insertByBo(SgExchangeBo bo); + + /** + * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼浜ゆ崲璁惧 + * @param bo 浜ゆ崲璁惧缂栬緫涓氬姟瀵硅薄 + * @return + */ + Boolean updateByBo(SgExchangeBo bo); + + /** + * 鏍¢獙骞跺垹闄ゆ暟鎹� + * @param ids 涓婚敭闆嗗悎 + * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� + * @return + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgServerService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgServerService.java new file mode 100644 index 0000000..8ecd499 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgServerService.java @@ -0,0 +1,56 @@ +package com.ruoyi.oa.service; + +import com.ruoyi.oa.domain.SgServer; +import com.ruoyi.oa.domain.vo.SgServerVo; +import com.ruoyi.oa.domain.bo.SgServerBo; +import com.ruoyi.common.core.mybatisplus.core.IServicePlus; +import com.ruoyi.common.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 鏈嶅姟鍣⊿ervice鎺ュ彛 + * + * @author ruoyi + * @date 2022-05-13 + */ +public interface ISgServerService extends IServicePlus<SgServer, SgServerVo> { + /** + * 鏌ヨ鍗曚釜 + * @return + */ + SgServerVo queryById(Long id); + + /** + * 鏌ヨ鍒楄〃 + */ + TableDataInfo<SgServerVo> queryPageList(SgServerBo bo); + + /** + * 鏌ヨ鍒楄〃 + */ + List<SgServerVo> queryList(SgServerBo bo); + + /** + * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆鏈嶅姟鍣� + * @param bo 鏈嶅姟鍣ㄦ柊澧炰笟鍔″璞� + * @return + */ + Boolean insertByBo(SgServerBo bo); + + /** + * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼鏈嶅姟鍣� + * @param bo 鏈嶅姟鍣ㄧ紪杈戜笟鍔″璞� + * @return + */ + Boolean updateByBo(SgServerBo bo); + + /** + * 鏍¢獙骞跺垹闄ゆ暟鎹� + * @param ids 涓婚敭闆嗗悎 + * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� + * @return + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgSystemService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgSystemService.java new file mode 100644 index 0000000..36d34ec --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgSystemService.java @@ -0,0 +1,56 @@ +package com.ruoyi.oa.service; + +import com.ruoyi.oa.domain.SgSystem; +import com.ruoyi.oa.domain.vo.SgSystemVo; +import com.ruoyi.oa.domain.bo.SgSystemBo; +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-13 + */ +public interface ISgSystemService extends IServicePlus<SgSystem, SgSystemVo> { + /** + * 鏌ヨ鍗曚釜 + * @return + */ + SgSystemVo queryById(Long id); + + /** + * 鏌ヨ鍒楄〃 + */ + TableDataInfo<SgSystemVo> queryPageList(SgSystemBo bo); + + /** + * 鏌ヨ鍒楄〃 + */ + List<SgSystemVo> queryList(SgSystemBo bo); + + /** + * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆杞欢绯荤粺 + * @param bo 杞欢绯荤粺鏂板涓氬姟瀵硅薄 + * @return + */ + Boolean insertByBo(SgSystemBo bo); + + /** + * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼杞欢绯荤粺 + * @param bo 杞欢绯荤粺缂栬緫涓氬姟瀵硅薄 + * @return + */ + Boolean updateByBo(SgSystemBo bo); + + /** + * 鏍¢獙骞跺垹闄ゆ暟鎹� + * @param ids 涓婚敭闆嗗悎 + * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� + * @return + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgExchangeServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgExchangeServiceImpl.java new file mode 100644 index 0000000..7dfbf6b --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgExchangeServiceImpl.java @@ -0,0 +1,102 @@ +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.SgExchangeBo; +import com.ruoyi.oa.domain.vo.SgExchangeVo; +import com.ruoyi.oa.domain.SgExchange; +import com.ruoyi.oa.mapper.SgExchangeMapper; +import com.ruoyi.oa.service.ISgExchangeService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 浜ゆ崲璁惧Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2022-05-13 + */ +@Service +public class SgExchangeServiceImpl extends ServicePlusImpl<SgExchangeMapper, SgExchange, SgExchangeVo> implements ISgExchangeService { + + @Override + public SgExchangeVo queryById(Long id){ + return getVoById(id); + } + + @Override + public TableDataInfo<SgExchangeVo> queryPageList(SgExchangeBo bo) { + PagePlus<SgExchange, SgExchangeVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo)); + return PageUtils.buildDataInfo(result); + } + + @Override + public List<SgExchangeVo> queryList(SgExchangeBo bo) { + return listVo(buildQueryWrapper(bo)); + } + + private LambdaQueryWrapper<SgExchange> buildQueryWrapper(SgExchangeBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<SgExchange> lqw = Wrappers.lambdaQuery(); + lqw.eq(SgExchange::getSchoolId, bo.getSchoolId()); + lqw.eq(StringUtils.isNotBlank(bo.getNetworkPort()), SgExchange::getNetworkPort, bo.getNetworkPort()); + lqw.eq(StringUtils.isNotBlank(bo.getIdnexA()), SgExchange::getIdnexA, bo.getIdnexA()); + lqw.eq(StringUtils.isNotBlank(bo.getCascadePort()), SgExchange::getCascadePort, bo.getCascadePort()); + lqw.eq(StringUtils.isNotBlank(bo.getIndexB()), SgExchange::getIndexB, bo.getIndexB()); + lqw.eq(bo.getBuildingId() != null, SgExchange::getBuildingId, bo.getBuildingId()); + lqw.eq(bo.getOrganizationId() != null, SgExchange::getOrganizationId, bo.getOrganizationId()); + lqw.eq(bo.getConstructionBatchId() != null, SgExchange::getConstructionBatchId, bo.getConstructionBatchId()); + lqw.eq(bo.getManufacturerId() != null, SgExchange::getManufacturerId, bo.getManufacturerId()); + lqw.like(bo.getModel() != null, SgExchange::getModel, bo.getModel()); + lqw.orderByDesc(SgExchange::getUpdateTime); + return lqw; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(SgExchangeBo bo) { + SgExchange add = BeanUtil.toBean(bo, SgExchange.class); + validEntityBeforeSave(add); + boolean flag = save(add); + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(SgExchangeBo bo) { + SgExchange update = BeanUtil.toBean(bo, SgExchange.class); + validEntityBeforeSave(update); + return updateById(update); + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + * + * @param entity 瀹炰綋绫绘暟鎹� + */ + private void validEntityBeforeSave(SgExchange entity){ + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if(isValid){ + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return removeByIds(ids); + } +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgServerServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgServerServiceImpl.java new file mode 100644 index 0000000..719d024 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgServerServiceImpl.java @@ -0,0 +1,127 @@ +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.SgServerBo; +import com.ruoyi.oa.domain.vo.SgServerVo; +import com.ruoyi.oa.domain.SgServer; +import com.ruoyi.oa.mapper.SgServerMapper; +import com.ruoyi.oa.service.ISgServerService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 鏈嶅姟鍣⊿ervice涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2022-05-13 + */ +@Service +public class SgServerServiceImpl extends ServicePlusImpl<SgServerMapper, SgServer, SgServerVo> implements ISgServerService { + + @Override + public SgServerVo queryById(Long id) { + return getVoById(id); + } + + @Override + public TableDataInfo<SgServerVo> queryPageList(SgServerBo bo) { + PagePlus<SgServer, SgServerVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo)); + return PageUtils.buildDataInfo(result); + } + + @Override + public List<SgServerVo> queryList(SgServerBo bo) { + return listVo(buildQueryWrapper(bo)); + } + + private LambdaQueryWrapper<SgServer> buildQueryWrapper(SgServerBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<SgServer> lqw = Wrappers.lambdaQuery(); + lqw.eq(bo.getBuildingId() != null, SgServer::getBuildingId, bo.getBuildingId()); + lqw.eq(bo.getOrganizationId() != null, SgServer::getOrganizationId, bo.getOrganizationId()); + lqw.eq(bo.getConstructionBatchId() != null, SgServer::getConstructionBatchId, bo.getConstructionBatchId()); + lqw.eq(StringUtils.isNotBlank(bo.getModel()), SgServer::getModel, bo.getModel()); + lqw.eq(bo.getManufacturerId() != null, SgServer::getManufacturerId, bo.getManufacturerId()); + lqw.eq(SgServer::getSchoolId, bo.getSchoolId()); + lqw.like(StringUtils.isNotBlank(bo.getDeploymentName()), SgServer::getDeploymentName, bo.getDeploymentName()); + lqw.orderByDesc(SgServer::getUpdateTime); + return lqw; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(SgServerBo bo) { + List<SgServer> list = baseMapper.selectList(new LambdaQueryWrapper<SgServer>() + .eq(SgServer::getDeploymentName, bo.getDeploymentName()) + .eq(SgServer::getSchoolId, bo.getSchoolId())); + if (list.size() > 0) { + throw new ServiceException("閮ㄧ讲鍚嶇О閲嶅", HttpStatus.HTTP_PARTIAL); + } + List<SgServer> lanList = baseMapper.selectList(new LambdaQueryWrapper<SgServer>() + .eq(SgServer::getLan, bo.getLan()) + .eq(SgServer::getSchoolId, bo.getSchoolId())); + if (lanList.size() > 0) { + throw new ServiceException("LAN閲嶅", HttpStatus.HTTP_PARTIAL); + } + SgServer add = BeanUtil.toBean(bo, SgServer.class); + validEntityBeforeSave(add); + boolean flag = save(add); + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean updateByBo(SgServerBo bo) { + List<SgServer> list = baseMapper.selectList(new LambdaQueryWrapper<SgServer>() + .eq(SgServer::getDeploymentName, bo.getDeploymentName()) + .eq(SgServer::getSchoolId, bo.getSchoolId()) + .ne(SgServer::getId, bo.getId())); + if (list.size() > 0) { + throw new ServiceException("閮ㄧ讲鍚嶇О閲嶅", HttpStatus.HTTP_PARTIAL); + } + List<SgServer> lanList = baseMapper.selectList(new LambdaQueryWrapper<SgServer>() + .eq(SgServer::getLan, bo.getLan()) + .eq(SgServer::getSchoolId, bo.getSchoolId()) + .ne(SgServer::getId, bo.getId())); + if (lanList.size() > 0) { + throw new ServiceException("LAN閲嶅", HttpStatus.HTTP_PARTIAL); + } + SgServer update = BeanUtil.toBean(bo, SgServer.class); + validEntityBeforeSave(update); + return updateById(update); + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + * + * @param entity 瀹炰綋绫绘暟鎹� + */ + private void validEntityBeforeSave(SgServer entity) { + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if (isValid) { + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return removeByIds(ids); + } +} diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgSystemServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgSystemServiceImpl.java new file mode 100644 index 0000000..d332049 --- /dev/null +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgSystemServiceImpl.java @@ -0,0 +1,93 @@ +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.SgSystemBo; +import com.ruoyi.oa.domain.vo.SgSystemVo; +import com.ruoyi.oa.domain.SgSystem; +import com.ruoyi.oa.mapper.SgSystemMapper; +import com.ruoyi.oa.service.ISgSystemService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 杞欢绯荤粺Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2022-05-13 + */ +@Service +public class SgSystemServiceImpl extends ServicePlusImpl<SgSystemMapper, SgSystem, SgSystemVo> implements ISgSystemService { + + @Override + public SgSystemVo queryById(Long id){ + return getVoById(id); + } + + @Override + public TableDataInfo<SgSystemVo> queryPageList(SgSystemBo bo) { + PagePlus<SgSystem, SgSystemVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo)); + return PageUtils.buildDataInfo(result); + } + + @Override + public List<SgSystemVo> queryList(SgSystemBo bo) { + return listVo(buildQueryWrapper(bo)); + } + + private LambdaQueryWrapper<SgSystem> buildQueryWrapper(SgSystemBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<SgSystem> lqw = Wrappers.lambdaQuery(); + lqw.eq(SgSystem::getSchoolId, bo.getSchoolId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), SgSystem::getName, bo.getName()); + lqw.eq(bo.getServerId() != null, SgSystem::getServerId, bo.getServerId()); + lqw.eq(bo.getConstructionBatchId() != null, SgSystem::getConstructionBatchId, bo.getConstructionBatchId()); + lqw.eq(bo.getManufacturerId() != null, SgSystem::getManufacturerId, bo.getManufacturerId()); + lqw.orderByDesc(SgSystem::getUpdateTime); + return lqw; + } + + @Override + public Boolean insertByBo(SgSystemBo bo) { + SgSystem add = BeanUtil.toBean(bo, SgSystem.class); + validEntityBeforeSave(add); + boolean flag = save(add); + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + @Override + public Boolean updateByBo(SgSystemBo bo) { + SgSystem update = BeanUtil.toBean(bo, SgSystem.class); + validEntityBeforeSave(update); + return updateById(update); + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + * + * @param entity 瀹炰綋绫绘暟鎹� + */ + private void validEntityBeforeSave(SgSystem entity){ + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + @Override + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if(isValid){ + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return removeByIds(ids); + } +} diff --git a/ruoyi-oa/src/main/resources/mapper/oa/SgExchangeMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/SgExchangeMapper.xml new file mode 100644 index 0000000..f309126 --- /dev/null +++ b/ruoyi-oa/src/main/resources/mapper/oa/SgExchangeMapper.xml @@ -0,0 +1,29 @@ +<?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.SgExchangeMapper"> + + <resultMap type="com.ruoyi.oa.domain.SgExchange" id="SgExchangeResult"> + <result property="id" column="id"/> + <result property="schoolId" column="school_id"/> + <result property="networkPort" column="network_port"/> + <result property="idnexA" column="idnex_a"/> + <result property="cascadePort" column="cascade_port"/> + <result property="indexB" column="index_b"/> + <result property="buildingId" column="building_id"/> + <result property="address" column="address"/> + <result property="organizationId" column="organization_id"/> + <result property="constructionBatchId" column="construction_batch_id"/> + <result property="serialNumber" column="serial_number"/> + <result property="model" column="model"/> + <result property="manufacturerId" column="manufacturer_id"/> + <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> diff --git a/ruoyi-oa/src/main/resources/mapper/oa/SgServerMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/SgServerMapper.xml new file mode 100644 index 0000000..d6902a1 --- /dev/null +++ b/ruoyi-oa/src/main/resources/mapper/oa/SgServerMapper.xml @@ -0,0 +1,34 @@ +<?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.SgServerMapper"> + + <resultMap type="com.ruoyi.oa.domain.SgServer" id="SgServerResult"> + <result property="id" column="id"/> + <result property="schoolId" column="school_id"/> + <result property="deploymentName" column="deployment_name"/> + <result property="lan" column="lan"/> + <result property="ip" column="ip"/> + <result property="operatingSystem" column="operating_system"/> + <result property="account" column="account"/> + <result property="buildingId" column="building_id"/> + <result property="cabinetNumber" column="cabinet_number"/> + <result property="rackNumber" column="rack_number"/> + <result property="organizationId" column="organization_id"/> + <result property="constructionBatchId" column="construction_batch_id"/> + <result property="serialNumber" column="serial_number"/> + <result property="model" column="model"/> + <result property="manufacturerId" column="manufacturer_id"/> + <result property="performanceIndex" column="performance_index"/> + <result property="remarks" column="remarks"/> + <result property="filePath" column="file_path"/> + <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> diff --git a/ruoyi-oa/src/main/resources/mapper/oa/SgSystemMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/SgSystemMapper.xml new file mode 100644 index 0000000..462f2d2 --- /dev/null +++ b/ruoyi-oa/src/main/resources/mapper/oa/SgSystemMapper.xml @@ -0,0 +1,28 @@ +<?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.SgSystemMapper"> + + <resultMap type="com.ruoyi.oa.domain.SgSystem" id="SgSystemResult"> + <result property="id" column="id"/> + <result property="schoolId" column="school_id"/> + <result property="name" column="name"/> + <result property="edition" column="edition"/> + <result property="functionDescription" column="function_description"/> + <result property="authorizationMethod" column="authorization_method"/> + <result property="authorizedQuantity" column="authorized_quantity"/> + <result property="serverId" column="server_id"/> + <result property="constructionBatchId" column="construction_batch_id"/> + <result property="manufacturerId" column="manufacturer_id"/> + <result property="remarks" column="remarks"/> + <result property="filePath" column="file_path"/> + <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> -- Gitblit v1.9.1