diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application-dev.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application-dev.yml index 953e8f06..fc9bc65c 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application-dev.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application-dev.yml @@ -379,3 +379,5 @@ rabbitmq: dead-letter-exchange: dev-dlx-exchange dead-letter-queue: dev-dlx-queue dead-letter-routing-key: dev.dlx.routing.key +cad: + url: http://192.168.110.186:8911 diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml index 38eebf83..9c49d37f 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application-local.yml @@ -354,3 +354,5 @@ rabbitmq: dead-letter-exchange: local-dlx-exchange dead-letter-queue: local-dlx-queue dead-letter-routing-key: local.dlx.routing.key +cad: + url: http://192.168.110.186:8911 diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml index 68773c98..8eda1882 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application-menu.yml @@ -354,3 +354,5 @@ rabbitmq: dead-letter-exchange: local-dlx-exchange dead-letter-queue: local-dlx-queue dead-letter-routing-key: local.dlx.routing.key +cad: + url: http://192.168.110.186:8911 diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application-prod.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application-prod.yml index 5b6e6e05..95d8d043 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application-prod.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application-prod.yml @@ -369,3 +369,5 @@ rabbitmq: dead-letter-exchange: prod-dlx-exchange dead-letter-queue: prod-dlx-queue dead-letter-routing-key: prod.dlx.routing.key +cad: + url: http://192.168.110.186:8911 diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml index 6cf84cfe..8aba2456 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml @@ -317,6 +317,8 @@ springdoc: packages-to-scan: org.dromara.other - group: 34.机械模块 packages-to-scan: org.dromara.mechanical + - group: 35.施工模块 + packages-to-scan: org.dromara.build # knife4j的增强配置,不需要增强可以不配 knife4j: enable: true diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/core/domain/BaseEntity.java b/xinnengyuan/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/core/domain/BaseEntity.java index 556e0f2b..13a79416 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/core/domain/BaseEntity.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/core/domain/BaseEntity.java @@ -8,7 +8,6 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; -import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.Map; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java index 14cd9a39..cfde915a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java @@ -12,13 +12,10 @@ import org.dromara.common.core.service.UserService; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.domain.GeoPoint; import org.dromara.common.mybatis.core.page.PageQuery; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.gps.domain.GpsEquipmentSon; import org.dromara.gps.mapper.GpsEquipmentSonMapper; -import org.dromara.gps.service.IGpsEquipmentSonService; import org.dromara.project.domain.BusProjectPunchrange; -import org.dromara.project.domain.BusUserProjectRelevancy; import org.dromara.project.mapper.BusUserProjectRelevancyMapper; import org.dromara.project.service.IBusProjectPunchrangeService; import org.dromara.quality.domain.QltQualityInspection; @@ -37,8 +34,6 @@ import org.dromara.system.domain.SysRole; import org.dromara.system.domain.SysUserRole; import org.dromara.system.mapper.SysRoleMapper; import org.dromara.system.mapper.SysUserRoleMapper; -import org.dromara.system.service.ISysRoleService; -import org.dromara.system.service.ISysUserService; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -153,7 +148,7 @@ public class DpzaglServiceImpl implements DpzaglService { dpznglAqyVo.setUserName(userService.selectNicknameByIds(dpznglAqyVo.getUserId().toString())); for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) { List coordinates = List.of(busProjectPunchrange.getPunchRange()); - List matchingRange = JSTUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates); + List matchingRange = JtsUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates); if (matchingRange != null && matchingRange.size() > 0){ dpznglAqyVo.setSfzg(DpEnum.RYZT_ZG.getTypeValue()); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudBoxChangeController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudBoxChangeController.java new file mode 100644 index 00000000..73421c1d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudBoxChangeController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudBoxChangeBo; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.vo.BudBoxChangeVo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.service.IBudBoxChangeService; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 箱变 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/boxChange") +public class BudBoxChangeController extends BaseController { + + private final IBudBoxChangeService budBoxChangeService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:boxChange:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询箱变列表 + */ + @SaCheckPermission("build:boxChange:list") + @GetMapping("/list") + public TableDataInfo list(BudBoxChangeBo bo, PageQuery pageQuery) { + return budBoxChangeService.queryPageList(bo, pageQuery); + } + + /** + * 导出箱变列表 + */ + @SaCheckPermission("build:boxChange:export") + @Log(title = "箱变", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudBoxChangeBo bo, HttpServletResponse response) { + List list = budBoxChangeService.queryList(bo); + ExcelUtil.exportExcel(list, "箱变", BudBoxChangeVo.class, response); + } + + /** + * 获取箱变详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:boxChange:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budBoxChangeService.queryById(id)); + } + + /** + * 新增箱变 + */ + @SaCheckPermission("build:boxChange:add") + @Log(title = "箱变", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudBoxChangeBo bo) { + return toAjax(budBoxChangeService.insertByBo(bo)); + } + + /** + * 修改箱变 + */ + @SaCheckPermission("build:boxChange:edit") + @Log(title = "箱变", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudBoxChangeBo bo) { + return toAjax(budBoxChangeService.updateByBo(bo)); + } + + /** + * 删除箱变 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:boxChange:remove") + @Log(title = "箱变", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budBoxChangeService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudDesignDrawingController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudDesignDrawingController.java new file mode 100644 index 00000000..a2543a88 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudDesignDrawingController.java @@ -0,0 +1,141 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudDesignDrawingBo; +import org.dromara.build.domain.dto.BudCreateByLayerReq; +import org.dromara.build.domain.dto.BudDesignDrawingQueryBuildReq; +import org.dromara.build.domain.dto.BudDesignDrawingUploadReq; +import org.dromara.build.domain.vo.BudDesignDrawingByBuildVo; +import org.dromara.build.domain.vo.BudDesignDrawingVo; +import org.dromara.build.service.IBudDesignDrawingService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.dromara.manager.cadmanager.vo.CadLayerListVo; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 施工设计图 + * + * @author lilemy + * @date 2025-12-18 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/designDrawing") +public class BudDesignDrawingController extends BaseController { + + private final IBudDesignDrawingService budDesignDrawingService; + + /** + * 查询施工设计图列表 + */ + @SaCheckPermission("build:designDrawing:list") + @GetMapping("/list") + public TableDataInfo list(BudDesignDrawingBo bo, PageQuery pageQuery) { + return budDesignDrawingService.queryPageList(bo, pageQuery); + } + + /** + * 获取施工设计图详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:designDrawing:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budDesignDrawingService.queryById(id)); + } + + /** + * 获取图层列表 + * + * @param id 主键 + */ + @SaCheckPermission("build:designDrawing:query") + @GetMapping("/getLayerList/{id}") + public R> getLayerList(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budDesignDrawingService.getLayerList(id)); + } + + /** + * 获取 CAD 图层信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:designDrawing:query") + @GetMapping("/getCadInfo") + public R getCadInfo(Long id, String layerName) { + return R.ok("操作成功", budDesignDrawingService.getDateByLayerName(id, layerName)); + } + + /** + * 获取项目下的建筑列表 + */ + @SaCheckPermission("build:designDrawing:list") + @GetMapping("/buildList") + public R> queryBuildList(BudDesignDrawingQueryBuildReq req) { + return R.ok(budDesignDrawingService.queryBuildList(req)); + } + + /** + * 新增施工设计图 + */ + @SaCheckPermission("build:designDrawing:add") + @Log(title = "施工设计图", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@RequestParam("file") MultipartFile file, @Validated BudDesignDrawingUploadReq req) { + return toAjax(budDesignDrawingService.insertByCadFile(file, req)); + } + + /** + * 批量创建 + */ + @SaCheckPermission("build:designDrawing:add") + @Log(title = "施工设计图", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping("/layer") + public R addBuildByLayer(@RequestBody @Validated BudCreateByLayerReq req) { + return toAjax(budDesignDrawingService.insertByLayers(req)); + } + + /** + * 修改施工设计图 + */ + @SaCheckPermission("build:designDrawing:edit") + @Log(title = "施工设计图", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudDesignDrawingBo bo) { + return toAjax(budDesignDrawingService.updateByBo(bo)); + } + + /** + * 删除施工设计图 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:designDrawing:remove") + @Log(title = "施工设计图", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budDesignDrawingService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudInverterController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudInverterController.java new file mode 100644 index 00000000..7f50699d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudInverterController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudInverterBo; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.vo.BudInverterVo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.service.IBudInverterService; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 逆变器 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/inverter") +public class BudInverterController extends BaseController { + + private final IBudInverterService budInverterService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:inverter:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询逆变器列表 + */ + @SaCheckPermission("build:inverter:list") + @GetMapping("/list") + public TableDataInfo list(BudInverterBo bo, PageQuery pageQuery) { + return budInverterService.queryPageList(bo, pageQuery); + } + + /** + * 导出逆变器列表 + */ + @SaCheckPermission("build:inverter:export") + @Log(title = "逆变器", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudInverterBo bo, HttpServletResponse response) { + List list = budInverterService.queryList(bo); + ExcelUtil.exportExcel(list, "逆变器", BudInverterVo.class, response); + } + + /** + * 获取逆变器详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:inverter:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budInverterService.queryById(id)); + } + + /** + * 新增逆变器 + */ + @SaCheckPermission("build:inverter:add") + @Log(title = "逆变器", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudInverterBo bo) { + return toAjax(budInverterService.insertByBo(bo)); + } + + /** + * 修改逆变器 + */ + @SaCheckPermission("build:inverter:edit") + @Log(title = "逆变器", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudInverterBo bo) { + return toAjax(budInverterService.updateByBo(bo)); + } + + /** + * 删除逆变器 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:inverter:remove") + @Log(title = "逆变器", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budInverterService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudMatrixController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudMatrixController.java new file mode 100644 index 00000000..daf935a9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudMatrixController.java @@ -0,0 +1,106 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 方阵 + * + * @author lilemy + * @date 2025-12-18 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/matrix") +public class BudMatrixController extends BaseController { + + private final IBudMatrixService budMatrixService; + + /** + * 查询方阵列表 + */ + @SaCheckPermission("build:matrix:list") + @GetMapping("/list") + public TableDataInfo list(BudMatrixBo bo, PageQuery pageQuery) { + return budMatrixService.queryPageList(bo, pageQuery); + } + + /** + * 导出方阵列表 + */ + @SaCheckPermission("build:matrix:export") + @Log(title = "方阵", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudMatrixBo bo, HttpServletResponse response) { + List list = budMatrixService.queryList(bo); + ExcelUtil.exportExcel(list, "方阵", BudMatrixVo.class, response); + } + + /** + * 获取方阵详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:matrix:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budMatrixService.queryById(id)); + } + + /** + * 新增方阵 + */ + @SaCheckPermission("build:matrix:add") + @Log(title = "方阵", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudMatrixBo bo) { + return toAjax(budMatrixService.insertByBo(bo)); + } + + /** + * 修改方阵 + */ + @SaCheckPermission("build:matrix:edit") + @Log(title = "方阵", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudMatrixBo bo) { + return toAjax(budMatrixService.updateByBo(bo)); + } + + /** + * 删除方阵 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:matrix:remove") + @Log(title = "方阵", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budMatrixService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudPillarPointController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudPillarPointController.java new file mode 100644 index 00000000..c30b4a08 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudPillarPointController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.bo.BudPillarPointBo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.domain.vo.BudPillarPointVo; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.build.service.IBudPillarPointService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 光伏板桩点 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/pillarPoint") +public class BudPillarPointController extends BaseController { + + private final IBudPillarPointService budPillarPointService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:pillarPoint:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询光伏板桩点列表 + */ + @SaCheckPermission("build:pillarPoint:list") + @GetMapping("/list") + public TableDataInfo list(BudPillarPointBo bo, PageQuery pageQuery) { + return budPillarPointService.queryPageList(bo, pageQuery); + } + + /** + * 导出光伏板桩点列表 + */ + @SaCheckPermission("build:pillarPoint:export") + @Log(title = "光伏板桩点", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudPillarPointBo bo, HttpServletResponse response) { + List list = budPillarPointService.queryList(bo); + ExcelUtil.exportExcel(list, "光伏板桩点", BudPillarPointVo.class, response); + } + + /** + * 获取光伏板桩点详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:pillarPoint:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budPillarPointService.queryById(id)); + } + + /** + * 新增光伏板桩点 + */ + @SaCheckPermission("build:pillarPoint:add") + @Log(title = "光伏板桩点", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudPillarPointBo bo) { + return toAjax(budPillarPointService.insertByBo(bo)); + } + + /** + * 修改光伏板桩点 + */ + @SaCheckPermission("build:pillarPoint:edit") + @Log(title = "光伏板桩点", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudPillarPointBo bo) { + return toAjax(budPillarPointService.updateByBo(bo)); + } + + /** + * 删除光伏板桩点 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:pillarPoint:remove") + @Log(title = "光伏板桩点", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budPillarPointService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudRedLineController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudRedLineController.java new file mode 100644 index 00000000..ec841765 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudRedLineController.java @@ -0,0 +1,105 @@ +package org.dromara.build.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.build.domain.vo.BudRedLineVo; +import org.dromara.build.domain.bo.BudRedLineBo; +import org.dromara.build.service.IBudRedLineService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 红线 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/redLine") +public class BudRedLineController extends BaseController { + + private final IBudRedLineService budRedLineService; + + /** + * 查询红线列表 + */ + @SaCheckPermission("build:redLine:list") + @GetMapping("/list") + public TableDataInfo list(BudRedLineBo bo, PageQuery pageQuery) { + return budRedLineService.queryPageList(bo, pageQuery); + } + + /** + * 导出红线列表 + */ + @SaCheckPermission("build:redLine:export") + @Log(title = "红线", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudRedLineBo bo, HttpServletResponse response) { + List list = budRedLineService.queryList(bo); + ExcelUtil.exportExcel(list, "红线", BudRedLineVo.class, response); + } + + /** + * 获取红线详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:redLine:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budRedLineService.queryById(id)); + } + + /** + * 新增红线 + */ + @SaCheckPermission("build:redLine:add") + @Log(title = "红线", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudRedLineBo bo) { + return toAjax(budRedLineService.insertByBo(bo)); + } + + /** + * 修改红线 + */ + @SaCheckPermission("build:redLine:edit") + @Log(title = "红线", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudRedLineBo bo) { + return toAjax(budRedLineService.updateByBo(bo)); + } + + /** + * 删除红线 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:redLine:remove") + @Log(title = "红线", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budRedLineService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSolarPanelController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSolarPanelController.java new file mode 100644 index 00000000..2c76cf2b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSolarPanelController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.bo.BudSolarPanelBo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.domain.vo.BudSolarPanelVo; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.build.service.IBudSolarPanelService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 光伏板 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/solarPanel") +public class BudSolarPanelController extends BaseController { + + private final IBudSolarPanelService budSolarPanelService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:solarPanel:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询光伏板列表 + */ + @SaCheckPermission("build:solarPanel:list") + @GetMapping("/list") + public TableDataInfo list(BudSolarPanelBo bo, PageQuery pageQuery) { + return budSolarPanelService.queryPageList(bo, pageQuery); + } + + /** + * 导出光伏板列表 + */ + @SaCheckPermission("build:solarPanel:export") + @Log(title = "光伏板", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudSolarPanelBo bo, HttpServletResponse response) { + List list = budSolarPanelService.queryList(bo); + ExcelUtil.exportExcel(list, "光伏板", BudSolarPanelVo.class, response); + } + + /** + * 获取光伏板详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:solarPanel:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budSolarPanelService.queryById(id)); + } + + /** + * 新增光伏板 + */ + @SaCheckPermission("build:solarPanel:add") + @Log(title = "光伏板", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudSolarPanelBo bo) { + return toAjax(budSolarPanelService.insertByBo(bo)); + } + + /** + * 修改光伏板 + */ + @SaCheckPermission("build:solarPanel:edit") + @Log(title = "光伏板", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudSolarPanelBo bo) { + return toAjax(budSolarPanelService.updateByBo(bo)); + } + + /** + * 删除光伏板 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:solarPanel:remove") + @Log(title = "光伏板", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budSolarPanelService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudStandColumnController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudStandColumnController.java new file mode 100644 index 00000000..14ab7ca5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudStandColumnController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.bo.BudStandColumnBo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.domain.vo.BudStandColumnVo; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.build.service.IBudStandColumnService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 光伏板立柱 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/standColumn") +public class BudStandColumnController extends BaseController { + + private final IBudStandColumnService budStandColumnService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:standColumn:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询光伏板立柱列表 + */ + @SaCheckPermission("build:standColumn:list") + @GetMapping("/list") + public TableDataInfo list(BudStandColumnBo bo, PageQuery pageQuery) { + return budStandColumnService.queryPageList(bo, pageQuery); + } + + /** + * 导出光伏板立柱列表 + */ + @SaCheckPermission("build:standColumn:export") + @Log(title = "光伏板立柱", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudStandColumnBo bo, HttpServletResponse response) { + List list = budStandColumnService.queryList(bo); + ExcelUtil.exportExcel(list, "光伏板立柱", BudStandColumnVo.class, response); + } + + /** + * 获取光伏板立柱详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:standColumn:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budStandColumnService.queryById(id)); + } + + /** + * 新增光伏板立柱 + */ + @SaCheckPermission("build:standColumn:add") + @Log(title = "光伏板立柱", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudStandColumnBo bo) { + return toAjax(budStandColumnService.insertByBo(bo)); + } + + /** + * 修改光伏板立柱 + */ + @SaCheckPermission("build:standColumn:edit") + @Log(title = "光伏板立柱", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudStandColumnBo bo) { + return toAjax(budStandColumnService.updateByBo(bo)); + } + + /** + * 删除光伏板立柱 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:standColumn:remove") + @Log(title = "光伏板立柱", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budStandColumnService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSupportFrameController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSupportFrameController.java new file mode 100644 index 00000000..5a81ab10 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/controller/BudSupportFrameController.java @@ -0,0 +1,120 @@ +package org.dromara.build.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.bo.BudSupportFrameBo; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.domain.vo.BudSupportFrameVo; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.build.service.IBudSupportFrameService; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.web.core.BaseController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 光伏板支架 + * + * @author lilemy + * @date 2025-12-19 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/build/supportFrame") +public class BudSupportFrameController extends BaseController { + + private final IBudSupportFrameService budSupportFrameService; + + private final IBudMatrixService budMatrixService; + + /** + * 获取当前项目的方阵列表 + */ + @SaCheckPermission("build:supportFrame:list") + @GetMapping("/list/matrix") + public R> listMatrixByProjectId(BudMatrixBo bo) { + return R.ok(budMatrixService.queryList(bo)); + } + + /** + * 查询光伏板支架列表 + */ + @SaCheckPermission("build:supportFrame:list") + @GetMapping("/list") + public TableDataInfo list(BudSupportFrameBo bo, PageQuery pageQuery) { + return budSupportFrameService.queryPageList(bo, pageQuery); + } + + /** + * 导出光伏板支架列表 + */ + @SaCheckPermission("build:supportFrame:export") + @Log(title = "光伏板支架", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(BudSupportFrameBo bo, HttpServletResponse response) { + List list = budSupportFrameService.queryList(bo); + ExcelUtil.exportExcel(list, "光伏板支架", BudSupportFrameVo.class, response); + } + + /** + * 获取光伏板支架详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("build:supportFrame:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(budSupportFrameService.queryById(id)); + } + + /** + * 新增光伏板支架 + */ + @SaCheckPermission("build:supportFrame:add") + @Log(title = "光伏板支架", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody BudSupportFrameBo bo) { + return toAjax(budSupportFrameService.insertByBo(bo)); + } + + /** + * 修改光伏板支架 + */ + @SaCheckPermission("build:supportFrame:edit") + @Log(title = "光伏板支架", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody BudSupportFrameBo bo) { + return toAjax(budSupportFrameService.updateByBo(bo)); + } + + /** + * 删除光伏板支架 + * + * @param ids 主键串 + */ + @SaCheckPermission("build:supportFrame:remove") + @Log(title = "光伏板支架", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(budSupportFrameService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudBoxChange.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudBoxChange.java new file mode 100644 index 00000000..37bab6b5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudBoxChange.java @@ -0,0 +1,83 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 箱变对象 bud_box_change + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_box_change") +public class BudBoxChange extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 箱变名称 + */ + private String name; + + /** + * 箱变位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudDesignDrawing.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudDesignDrawing.java new file mode 100644 index 00000000..8ec6a22a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudDesignDrawing.java @@ -0,0 +1,71 @@ +package org.dromara.build.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 施工设计图对象 bud_design_drawing + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_design_drawing") +public class BudDesignDrawing extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 文件类型 + */ + private String fileType; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件路径 + */ + private String filePath; + + /** + * 原始坐标 + */ + private String originalCoordinate; + + /** + * 目标坐标 + */ + private String targetCoordinate; + + /** + * 图纸内容id + */ + private Long contentId; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudInverter.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudInverter.java new file mode 100644 index 00000000..6b6e181e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudInverter.java @@ -0,0 +1,83 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 逆变器对象 bud_inverter + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_inverter") +public class BudInverter extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 逆变器名称 + */ + private String name; + + /** + * 逆变器位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudMatrix.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudMatrix.java new file mode 100644 index 00000000..9a304ec4 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudMatrix.java @@ -0,0 +1,52 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 方阵对象 bud_matrix + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_matrix") +public class BudMatrix extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵名称 + */ + private String name; + + /** + * 方阵位置 + */ + private String positions; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudPillarPoint.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudPillarPoint.java new file mode 100644 index 00000000..e62b5294 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudPillarPoint.java @@ -0,0 +1,81 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板桩点对象 bud_pillar_point + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_pillar_point") +public class BudPillarPoint extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 光伏板桩点名称 + */ + private String name; + + /** + * 光伏板桩点位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudRedLine.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudRedLine.java new file mode 100644 index 00000000..a9f5379e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudRedLine.java @@ -0,0 +1,52 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 红线对象 bud_red_line + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_red_line") +public class BudRedLine extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 红线名称 + */ + private String name; + + /** + * 红线位置 + */ + private String positions; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSolarPanel.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSolarPanel.java new file mode 100644 index 00000000..ebfe3e40 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSolarPanel.java @@ -0,0 +1,83 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板对象 bud_solar_panel + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_solar_panel") +public class BudSolarPanel extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 光伏板名称 + */ + private String name; + + /** + * 光伏板位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudStandColumn.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudStandColumn.java new file mode 100644 index 00000000..1c727269 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudStandColumn.java @@ -0,0 +1,81 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板立柱对象 bud_stand_column + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_stand_column") +public class BudStandColumn extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 光伏板立柱名称 + */ + private String name; + + /** + * 光伏板立柱位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSupportFrame.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSupportFrame.java new file mode 100644 index 00000000..64233dae --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/BudSupportFrame.java @@ -0,0 +1,81 @@ +package org.dromara.build.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板支架对象 bud_support_frame + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("bud_support_frame") +public class BudSupportFrame extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 光伏板支架名称 + */ + private String name; + + /** + * 光伏板支架位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudBoxChangeBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudBoxChangeBo.java new file mode 100644 index 00000000..684222b5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudBoxChangeBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudBoxChange; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 箱变业务对象 bud_box_change + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudBoxChange.class, reverseConvertGenerate = false) +public class BudBoxChangeBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -4940923241574282402L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 箱变名称 + */ + @NotBlank(message = "箱变名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 箱变位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudDesignDrawingBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudDesignDrawingBo.java new file mode 100644 index 00000000..828a3c0f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudDesignDrawingBo.java @@ -0,0 +1,79 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 施工设计图业务对象 bud_design_drawing + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudDesignDrawing.class, reverseConvertGenerate = false) +public class BudDesignDrawingBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 6136425836411124454L; + + /** + * 主键id + */ + @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 文件类型 + */ + private String fileType; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件路径 + */ + private String filePath; + + /** + * 原始坐标 + */ + @NotBlank(message = "原始坐标不能为空", groups = {AddGroup.class, EditGroup.class}) + private String originalCoordinate; + + /** + * 目标坐标 + */ + @NotBlank(message = "目标坐标不能为空", groups = {AddGroup.class, EditGroup.class}) + private String targetCoordinate; + + /** + * 图纸内容id + */ + private Long contentId; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudInverterBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudInverterBo.java new file mode 100644 index 00000000..68644895 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudInverterBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudInverter; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 逆变器业务对象 bud_inverter + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudInverter.class, reverseConvertGenerate = false) +public class BudInverterBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -1438440436310354057L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 逆变器名称 + */ + @NotBlank(message = "逆变器名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 逆变器位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudMatrixBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudMatrixBo.java new file mode 100644 index 00000000..f0e1184b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudMatrixBo.java @@ -0,0 +1,58 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudMatrix; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 方阵业务对象 bud_matrix + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudMatrix.class, reverseConvertGenerate = false) +public class BudMatrixBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 6181989661041512249L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵名称 + */ + @NotBlank(message = "方阵名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 方阵位置 + */ + private String positions; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudPillarPointBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudPillarPointBo.java new file mode 100644 index 00000000..6a363d0c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudPillarPointBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudPillarPoint; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板桩点业务对象 bud_pillar_point + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudPillarPoint.class, reverseConvertGenerate = false) +public class BudPillarPointBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -5975142661197342615L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 光伏板桩点名称 + */ + @NotBlank(message = "光伏板桩点名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 光伏板桩点位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudRedLineBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudRedLineBo.java new file mode 100644 index 00000000..e0d92fd5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudRedLineBo.java @@ -0,0 +1,58 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudRedLine; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 红线业务对象 bud_red_line + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudRedLine.class, reverseConvertGenerate = false) +public class BudRedLineBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -3256147550957831683L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 红线名称 + */ + @NotBlank(message = "红线名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 红线位置 + */ + private String positions; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSolarPanelBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSolarPanelBo.java new file mode 100644 index 00000000..0dd161f8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSolarPanelBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudSolarPanel; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.util.Date; + +/** + * 光伏板业务对象 bud_solar_panel + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudSolarPanel.class, reverseConvertGenerate = false) +public class BudSolarPanelBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -9153701188407485879L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 光伏板名称 + */ + @NotBlank(message = "光伏板名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 光伏板位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private Date finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudStandColumnBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudStandColumnBo.java new file mode 100644 index 00000000..da4f2300 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudStandColumnBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudStandColumn; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板立柱业务对象 bud_stand_column + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudStandColumn.class, reverseConvertGenerate = false) +public class BudStandColumnBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 7837368925016777082L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 光伏板立柱名称 + */ + @NotBlank(message = "光伏板立柱名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 光伏板立柱位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSupportFrameBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSupportFrameBo.java new file mode 100644 index 00000000..43f74b22 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/bo/BudSupportFrameBo.java @@ -0,0 +1,91 @@ +package org.dromara.build.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.build.domain.BudSupportFrame; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; +import java.time.LocalDate; + +/** + * 光伏板支架业务对象 bud_support_frame + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = BudSupportFrame.class, reverseConvertGenerate = false) +public class BudSupportFrameBo extends BaseEntity { + + @Serial + private static final long serialVersionUID = -8643204138200023768L; + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = {EditGroup.class}) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long projectId; + + /** + * 方阵id + */ + @NotNull(message = "方阵id不能为空", groups = {AddGroup.class, EditGroup.class}) + private Long matrixId; + + /** + * 光伏板支架名称 + */ + @NotBlank(message = "光伏板支架名称不能为空", groups = {AddGroup.class, EditGroup.class}) + private String name; + + /** + * 光伏板支架位置 + */ + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @NotBlank(message = "完成状态(0未开始 1进行中 2完成)不能为空", groups = {AddGroup.class, EditGroup.class}) + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudCreateByLayerReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudCreateByLayerReq.java new file mode 100644 index 00000000..0a23c4d7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudCreateByLayerReq.java @@ -0,0 +1,49 @@ +package org.dromara.build.domain.dto; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +/** + * @author lilemy + * @date 2025-12-18 16:24 + */ +@Data +public class BudCreateByLayerReq implements Serializable { + + @Serial + private static final long serialVersionUID = 4077800961049334482L; + + /** + * 项目 id + */ + @NotNull(message = "项目 id 不能为空") + private Long projectId; + + /** + * 位置 + */ + @NotNull(message = "位置不能为空") + private List locationLayers; + + /** + * 名称 + */ + private List nameLayers; + + /** + * 设计图 id + */ + @NotNull(message = "设计图 id 不能为空") + private Long designDrawingId; + + /** + * 类型 + */ + @NotBlank(message = "类型不能为空") + private String type; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingQueryBuildReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingQueryBuildReq.java new file mode 100644 index 00000000..2380c0d5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingQueryBuildReq.java @@ -0,0 +1,37 @@ +package org.dromara.build.domain.dto; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-12-20 15:50 + */ +@Data +public class BudDesignDrawingQueryBuildReq implements Serializable { + + @Serial + private static final long serialVersionUID = 1193895566884510811L; + + /** + * 项目 id + */ + @NotNull(message = "项目不能为空") + private Long projectId; + + /** + * 构建类型 + */ + @NotBlank(message = "类型不能为空") + private String buildType; + + /** + * 方阵 id + */ + private Long matrixId; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingUploadReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingUploadReq.java new file mode 100644 index 00000000..cfb05e58 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/dto/BudDesignDrawingUploadReq.java @@ -0,0 +1,41 @@ +package org.dromara.build.domain.dto; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-12-18 14:20 + */ +@Data +public class BudDesignDrawingUploadReq implements Serializable { + + @Serial + private static final long serialVersionUID = 1104479933568403891L; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空") + private Long projectId; + + /** + * 原始坐标 + */ + @NotBlank(message = "原始坐标不能为空") + private String originalCoordinate; + + /** + * 目标坐标 + */ + private String targetCoordinate; + + /** + * 备注 + */ + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudCoordinateTypeEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudCoordinateTypeEnum.java new file mode 100644 index 00000000..5d1b5f6b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudCoordinateTypeEnum.java @@ -0,0 +1,34 @@ +package org.dromara.build.domain.enums; + +import lombok.Getter; + +/** + * @author lilemy + * @date 2025-12-19 19:11 + */ +@Getter +public enum BudCoordinateTypeEnum { + + POINT("Point", 1), + LINE_STRING("LineString", 2), + POLYGON("Polygon", 3); + + private final String text; + + private final int value; + + BudCoordinateTypeEnum(String text, int value) { + this.text = text; + this.value = value; + } + + // 根据 value 获取对应的 text + public static String getTextByValue(int value) { + for (BudCoordinateTypeEnum type : values()) { + if (type.getValue() == value) { + return type.getText(); + } + } + return null; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudDesignType.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudDesignType.java new file mode 100644 index 00000000..e3b6c3b7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/enums/BudDesignType.java @@ -0,0 +1,74 @@ +package org.dromara.build.domain.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Objects; + +/** + * @author lilemy + * @date 2025-12-19 09:23 + */ +@Getter +@AllArgsConstructor +public enum BudDesignType { + + /** + * 方阵 + */ + SQUARE_MATRIX("方阵", "1"), + + /** + * 光伏板 + */ + SOLAR_PANEL("光伏板", "2"), + + /** + * 逆变器 + */ + INVERTER("逆变器", "3"), + + /** + * 箱变 + */ + BOX_CHANGE("箱变", "4"), + + /** + * 红线 + */ + RED_LINE("红线", "5"), + + /** + * 桩点 + */ + PILLAR_POINT("桩点", "6"), + + /** + * 立柱 + */ + STAND_COLUMN("立柱", "7"), + + /** + * 支架 + */ + SUPPORT_FRAME("支架", "8"); + + private final String text; + + private final String value; + + /** + * 根据 value 获取对应的枚举 + * + * @param value 枚举值 + * @return 枚举 + */ + public static BudDesignType getEnumByValue(String value) { + for (BudDesignType type : values()) { + if (Objects.equals(type.getValue(), value)) { + return type; + } + } + return null; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudFeature.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudFeature.java new file mode 100644 index 00000000..90039c74 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudFeature.java @@ -0,0 +1,28 @@ +package org.dromara.build.domain.geojson; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025/4/24 17:38 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BudFeature implements Serializable { + + @Serial + private static final long serialVersionUID = -6103275857879306244L; + + private String type; + + private BudGeometry geometry; + + private BudProperties properties; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeoJson.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeoJson.java new file mode 100644 index 00000000..ec2b60be --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeoJson.java @@ -0,0 +1,24 @@ +package org.dromara.build.domain.geojson; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author lilemy + * @date 2025/4/24 17:37 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BudGeoJson { + + private String name; + + private String type; + + private List features; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeometry.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeometry.java new file mode 100644 index 00000000..b104f15e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudGeometry.java @@ -0,0 +1,29 @@ +package org.dromara.build.domain.geojson; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +/** + * @author lilemy + * @date 2025/4/24 17:38 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BudGeometry implements Serializable { + + @Serial + private static final long serialVersionUID = -2582318447932685848L; + + private String type; + + private List coordinates; + + private Long id; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudProperties.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudProperties.java new file mode 100644 index 00000000..819f0550 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/geojson/BudProperties.java @@ -0,0 +1,26 @@ +package org.dromara.build.domain.geojson; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025/4/24 10:53 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BudProperties implements Serializable { + + @Serial + private static final long serialVersionUID = -2997401596985220109L; + + private String layer_name; + + private String text_value; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudBoxChangeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudBoxChangeVo.java new file mode 100644 index 00000000..6facd4a2 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudBoxChangeVo.java @@ -0,0 +1,99 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudBoxChange; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 箱变视图对象 bud_box_change + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudBoxChange.class) +public class BudBoxChangeVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 箱变名称 + */ + @ExcelProperty(value = "箱变名称") + private String name; + + /** + * 箱变位置 + */ + @ExcelProperty(value = "箱变位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingByBuildVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingByBuildVo.java new file mode 100644 index 00000000..7639adc8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingByBuildVo.java @@ -0,0 +1,105 @@ +package org.dromara.build.domain.vo; + +import cn.hutool.json.JSONArray; +import cn.hutool.json.JSONUtil; +import lombok.Data; +import org.dromara.build.domain.enums.BudCoordinateTypeEnum; +import org.dromara.common.utils.JsonDimensionUtil; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Objects; + +/** + * @author lilemy + * @date 2025-12-19 10:23 + */ +@Data +public class BudDesignDrawingByBuildVo implements Serializable { + + @Serial + private static final long serialVersionUID = -6627665214684476187L; + + /** + * 主键 + */ + private Long id; + + /** + * 名称 + */ + private String name; + + /** + * 位置 + */ + private JSONArray positionList; + + /** + * 坐标类型 + */ + private String type; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + private String finishType; + + /** + * 完成时间 + */ + private LocalDate finishDate; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + private String progressCategoryName; + + /** + * 对象转vo + * + * @param id 主键 + * @param name 名称 + * @param positions 位置字符串 + * @param status 完成状态(0未开始 1进行中 2完成) + * @return BudDesignDrawingByBuildVo + */ + public static BudDesignDrawingByBuildVo obj2vo(Long id, String name, String positions, String finishType, LocalDate finishDate, + String status, Long progressCategoryId, String progressCategoryName) { + BudDesignDrawingByBuildVo vo = new BudDesignDrawingByBuildVo(); + vo.setId(id); + vo.setName(name); + vo.setFinishType(finishType); + vo.setFinishDate(finishDate); + vo.setProgressCategoryId(progressCategoryId); + vo.setProgressCategoryName(progressCategoryName); + JSONArray positionList = JSONUtil.parseArray(positions); + vo.setPositionList(positionList); + vo.setStatus(status); + int depth = JsonDimensionUtil.getJsonArrayDepth(positionList); + if (depth == 2) { + // 第一个坐标 + JSONArray first = positionList.getJSONArray(0); + // 最后一个坐标 + JSONArray last = positionList.getJSONArray(positionList.size() - 1); + // 判断是否相同(按坐标值) + boolean same = first.size() == last.size() + && Objects.equals(first.get(0), last.get(0)) + && Objects.equals(first.get(1), last.get(1)); + depth = same ? 3 : 2; + } + vo.setType(BudCoordinateTypeEnum.getTextByValue(depth)); + return vo; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingVo.java new file mode 100644 index 00000000..ec0a9921 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudDesignDrawingVo.java @@ -0,0 +1,86 @@ +package org.dromara.build.domain.vo; + +import org.dromara.build.domain.BudDesignDrawing; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 施工设计图视图对象 bud_design_drawing + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudDesignDrawing.class) +public class BudDesignDrawingVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @ExcelProperty(value = "主键id") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 文件类型 + */ + @ExcelProperty(value = "文件类型") + private String fileType; + + /** + * 文件名称 + */ + @ExcelProperty(value = "文件名称") + private String fileName; + + /** + * 文件路径 + */ + @ExcelProperty(value = "文件路径") + private String filePath; + + /** + * 原始坐标 + */ + @ExcelProperty(value = "原始坐标") + private String originalCoordinate; + + /** + * 目标坐标 + */ + @ExcelProperty(value = "目标坐标") + private String targetCoordinate; + + /** + * 图纸内容id + */ + @ExcelProperty(value = "图纸内容id") + private Long contentId; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudInverterVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudInverterVo.java new file mode 100644 index 00000000..fb9e655a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudInverterVo.java @@ -0,0 +1,99 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudInverter; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 逆变器视图对象 bud_inverter + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudInverter.class) +public class BudInverterVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 逆变器名称 + */ + @ExcelProperty(value = "逆变器名称") + private String name; + + /** + * 逆变器位置 + */ + @ExcelProperty(value = "逆变器位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudMatrixVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudMatrixVo.java new file mode 100644 index 00000000..ee066d9b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudMatrixVo.java @@ -0,0 +1,58 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudMatrix; + +import java.io.Serial; +import java.io.Serializable; + + +/** + * 方阵视图对象 bud_matrix + * + * @author lilemy + * @date 2025-12-18 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudMatrix.class) +public class BudMatrixVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵名称 + */ + @ExcelProperty(value = "方阵名称") + private String name; + + /** + * 方阵位置 + */ + @ExcelProperty(value = "方阵位置") + private String positions; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudPillarPointVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudPillarPointVo.java new file mode 100644 index 00000000..5a8e865a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudPillarPointVo.java @@ -0,0 +1,97 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudPillarPoint; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 光伏板桩点视图对象 bud_pillar_point + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudPillarPoint.class) +public class BudPillarPointVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 光伏板桩点名称 + */ + @ExcelProperty(value = "光伏板桩点名称") + private String name; + + /** + * 光伏板桩点位置 + */ + @ExcelProperty(value = "光伏板桩点位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudRedLineVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudRedLineVo.java new file mode 100644 index 00000000..9c001705 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudRedLineVo.java @@ -0,0 +1,58 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudRedLine; + +import java.io.Serial; +import java.io.Serializable; + + +/** + * 红线视图对象 bud_red_line + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudRedLine.class) +public class BudRedLineVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 红线名称 + */ + @ExcelProperty(value = "红线名称") + private String name; + + /** + * 红线位置 + */ + @ExcelProperty(value = "红线位置") + private String positions; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSolarPanelVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSolarPanelVo.java new file mode 100644 index 00000000..1f4c01bb --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSolarPanelVo.java @@ -0,0 +1,99 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudSolarPanel; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 光伏板视图对象 bud_solar_panel + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudSolarPanel.class) +public class BudSolarPanelVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 光伏板名称 + */ + @ExcelProperty(value = "光伏板名称") + private String name; + + /** + * 光伏板位置 + */ + @ExcelProperty(value = "光伏板位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudStandColumnVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudStandColumnVo.java new file mode 100644 index 00000000..c11791e1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudStandColumnVo.java @@ -0,0 +1,97 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudStandColumn; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 光伏板立柱视图对象 bud_stand_column + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudStandColumn.class) +public class BudStandColumnVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 光伏板立柱名称 + */ + @ExcelProperty(value = "光伏板立柱名称") + private String name; + + /** + * 光伏板立柱位置 + */ + @ExcelProperty(value = "光伏板立柱位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSupportFrameVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSupportFrameVo.java new file mode 100644 index 00000000..6debb880 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/domain/vo/BudSupportFrameVo.java @@ -0,0 +1,97 @@ +package org.dromara.build.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.build.domain.BudSupportFrame; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDate; + + +/** + * 光伏板支架视图对象 bud_support_frame + * + * @author lilemy + * @date 2025-12-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BudSupportFrame.class) +public class BudSupportFrameVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 方阵id + */ + @ExcelProperty(value = "方阵id") + private Long matrixId; + + /** + * 光伏板支架名称 + */ + @ExcelProperty(value = "光伏板支架名称") + private String name; + + /** + * 光伏板支架位置 + */ + @ExcelProperty(value = "光伏板支架位置") + private String positions; + + /** + * 完成状态(0未开始 1进行中 2完成) + */ + @ExcelProperty(value = "完成状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=未开始,1=进行中,2=完成") + private String status; + + /** + * 完成类型(1手动填报 2AI填报) + */ + @ExcelProperty(value = "完成类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=手动填报,2=AI填报") + private String finishType; + + /** + * 完成时间 + */ + @ExcelProperty(value = "完成时间") + private LocalDate finishDate; + + /** + * 进度类型id + */ + @ExcelProperty(value = "进度类型id") + private Long progressCategoryId; + + /** + * 进度类别名称 + */ + @ExcelProperty(value = "进度类别名称") + private String progressCategoryName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudBoxChangeMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudBoxChangeMapper.java new file mode 100644 index 00000000..40f765aa --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudBoxChangeMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudBoxChange; +import org.dromara.build.domain.vo.BudBoxChangeVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 箱变Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudBoxChangeMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudDesignDrawingMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudDesignDrawingMapper.java new file mode 100644 index 00000000..aea81393 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudDesignDrawingMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.vo.BudDesignDrawingVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 施工设计图Mapper接口 + * + * @author lilemy + * @date 2025-12-18 + */ +public interface BudDesignDrawingMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudInverterMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudInverterMapper.java new file mode 100644 index 00000000..d76b8d5e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudInverterMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudInverter; +import org.dromara.build.domain.vo.BudInverterVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 逆变器Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudInverterMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudMatrixMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudMatrixMapper.java new file mode 100644 index 00000000..173ec74c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudMatrixMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 方阵Mapper接口 + * + * @author lilemy + * @date 2025-12-18 + */ +public interface BudMatrixMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudPillarPointMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudPillarPointMapper.java new file mode 100644 index 00000000..ba2412da --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudPillarPointMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudPillarPoint; +import org.dromara.build.domain.vo.BudPillarPointVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 光伏板桩点Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudPillarPointMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudRedLineMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudRedLineMapper.java new file mode 100644 index 00000000..061183c5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudRedLineMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudRedLine; +import org.dromara.build.domain.vo.BudRedLineVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 红线Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudRedLineMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSolarPanelMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSolarPanelMapper.java new file mode 100644 index 00000000..65adeb54 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSolarPanelMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudSolarPanel; +import org.dromara.build.domain.vo.BudSolarPanelVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 光伏板Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudSolarPanelMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudStandColumnMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudStandColumnMapper.java new file mode 100644 index 00000000..5aaa8c40 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudStandColumnMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudStandColumn; +import org.dromara.build.domain.vo.BudStandColumnVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 光伏板立柱Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudStandColumnMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSupportFrameMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSupportFrameMapper.java new file mode 100644 index 00000000..1538df0e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/mapper/BudSupportFrameMapper.java @@ -0,0 +1,15 @@ +package org.dromara.build.mapper; + +import org.dromara.build.domain.BudSupportFrame; +import org.dromara.build.domain.vo.BudSupportFrameVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 光伏板支架Mapper接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface BudSupportFrameMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudBoxChangeService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudBoxChangeService.java new file mode 100644 index 00000000..52d254d8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudBoxChangeService.java @@ -0,0 +1,84 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudBoxChange; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.bo.BudBoxChangeBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudBoxChangeVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 箱变Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudBoxChangeService extends IService { + + /** + * 查询箱变 + * + * @param id 主键 + * @return 箱变 + */ + BudBoxChangeVo queryById(Long id); + + /** + * 分页查询箱变列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 箱变分页列表 + */ + TableDataInfo queryPageList(BudBoxChangeBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的箱变列表 + * + * @param bo 查询条件 + * @return 箱变列表 + */ + List queryList(BudBoxChangeBo bo); + + /** + * 新增箱变 + * + * @param bo 箱变 + * @return 是否新增成功 + */ + Boolean insertByBo(BudBoxChangeBo bo); + + /** + * 根据图层批量生成箱变 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures); + + /** + * 修改箱变 + * + * @param bo 箱变 + * @return 是否修改成功 + */ + Boolean updateByBo(BudBoxChangeBo bo); + + /** + * 校验并批量删除箱变信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudDesignDrawingService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudDesignDrawingService.java new file mode 100644 index 00000000..08e79725 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudDesignDrawingService.java @@ -0,0 +1,118 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.bo.BudDesignDrawingBo; +import org.dromara.build.domain.dto.BudCreateByLayerReq; +import org.dromara.build.domain.dto.BudDesignDrawingQueryBuildReq; +import org.dromara.build.domain.dto.BudDesignDrawingUploadReq; +import org.dromara.build.domain.vo.BudDesignDrawingByBuildVo; +import org.dromara.build.domain.vo.BudDesignDrawingVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.manager.cadmanager.vo.CadLayerListVo; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Collection; +import java.util.List; + +/** + * 施工设计图Service接口 + * + * @author lilemy + * @date 2025-12-18 + */ +public interface IBudDesignDrawingService extends IService { + + /** + * 查询施工设计图 + * + * @param id 主键 + * @return 施工设计图 + */ + BudDesignDrawingVo queryById(Long id); + + /** + * 分页查询施工设计图列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 施工设计图分页列表 + */ + TableDataInfo queryPageList(BudDesignDrawingBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的施工设计图列表 + * + * @param bo 查询条件 + * @return 施工设计图列表 + */ + List queryList(BudDesignDrawingBo bo); + + /** + * 获取 cad 文件图层列表 + * + * @param id 主键 id + * @return cad 文件图层列表 + */ + List getLayerList(Long id); + + /** + * 根据图层名称导出数据 + * + * @param id 主键 id + * @param layerName cad 文件图层名称 + * @return 数据地址 + */ + String getDateByLayerName(Long id, String layerName); + + /** + * 查询施工设计图列表 + * + * @param req 查询条件 + * @return 施工设计图列表 + */ + List queryBuildList(BudDesignDrawingQueryBuildReq req); + + /** + * 上传 cad 文件保存 + * + * @param file 文件 + * @param req 参数 + * @return 是否成功 + */ + Boolean insertByCadFile(MultipartFile file, BudDesignDrawingUploadReq req); + + /** + * 新增施工设计图 + * + * @param bo 施工设计图 + * @return 是否新增成功 + */ + Boolean insertByBo(BudDesignDrawingBo bo); + + /** + * 新增施工设施 + * + * @param req 参数 + * @return 是否新增成功 + */ + Boolean insertByLayers(BudCreateByLayerReq req); + + /** + * 修改施工设计图 + * + * @param bo 施工设计图 + * @return 是否修改成功 + */ + Boolean updateByBo(BudDesignDrawingBo bo); + + /** + * 校验并批量删除施工设计图信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudInverterService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudInverterService.java new file mode 100644 index 00000000..4cf482ed --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudInverterService.java @@ -0,0 +1,84 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudInverter; +import org.dromara.build.domain.bo.BudInverterBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudInverterVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 逆变器Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudInverterService extends IService { + + /** + * 查询逆变器 + * + * @param id 主键 + * @return 逆变器 + */ + BudInverterVo queryById(Long id); + + /** + * 分页查询逆变器列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 逆变器分页列表 + */ + TableDataInfo queryPageList(BudInverterBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的逆变器列表 + * + * @param bo 查询条件 + * @return 逆变器列表 + */ + List queryList(BudInverterBo bo); + + /** + * 新增逆变器 + * + * @param bo 逆变器 + * @return 是否新增成功 + */ + Boolean insertByBo(BudInverterBo bo); + + /** + * 根据图层批量生成逆变器 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures); + + /** + * 修改逆变器 + * + * @param bo 逆变器 + * @return 是否修改成功 + */ + Boolean updateByBo(BudInverterBo bo); + + /** + * 校验并批量删除逆变器信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudMatrixService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudMatrixService.java new file mode 100644 index 00000000..eacf92d0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudMatrixService.java @@ -0,0 +1,110 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 方阵Service接口 + * + * @author lilemy + * @date 2025-12-18 + */ +public interface IBudMatrixService extends IService { + + /** + * 查询方阵 + * + * @param id 主键 + * @return 方阵 + */ + BudMatrixVo queryById(Long id); + + /** + * 分页查询方阵列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 方阵分页列表 + */ + TableDataInfo queryPageList(BudMatrixBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的方阵列表 + * + * @param bo 查询条件 + * @return 方阵列表 + */ + List queryList(BudMatrixBo bo); + + /** + * 根据项目 ID 查询方阵列表 + * + * @param projectId 项目 ID + * @return 方阵列表 + */ + List queryListByProjectId(Long projectId); + + /** + * 新增方阵 + * + * @param bo 方阵 + * @return 是否新增成功 + */ + Boolean insertByBo(BudMatrixBo bo); + + /** + * 修改方阵 + * + * @param bo 方阵 + * @return 是否修改成功 + */ + Boolean updateByBo(BudMatrixBo bo); + + /** + * 根据图层批量生成方阵 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures); + + /** + * 校验并批量删除方阵信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 根据坐标获取符合的方阵 + * + * @param matrixList 方阵集合 + * @param coordinates 坐标 + * @return 符合的方阵 + */ + BudMatrix getMatrixIdByCoordinates(List matrixList, List coordinates); + + /** + * 根据二维坐标获取符合的方阵 + * + * @param matrixList 方阵集合 + * @param coordinates 坐标 + * @return 符合的方阵 + */ + BudMatrix getMatrixIdBy2Coordinates(List matrixList, List> coordinates); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudPillarPointService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudPillarPointService.java new file mode 100644 index 00000000..ee8a872a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudPillarPointService.java @@ -0,0 +1,70 @@ +package org.dromara.build.service; + +import org.dromara.build.domain.vo.BudPillarPointVo; +import org.dromara.build.domain.bo.BudPillarPointBo; +import org.dromara.build.domain.BudPillarPoint; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 光伏板桩点Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudPillarPointService extends IService{ + + /** + * 查询光伏板桩点 + * + * @param id 主键 + * @return 光伏板桩点 + */ + BudPillarPointVo queryById(Long id); + + /** + * 分页查询光伏板桩点列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板桩点分页列表 + */ + TableDataInfo queryPageList(BudPillarPointBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的光伏板桩点列表 + * + * @param bo 查询条件 + * @return 光伏板桩点列表 + */ + List queryList(BudPillarPointBo bo); + + /** + * 新增光伏板桩点 + * + * @param bo 光伏板桩点 + * @return 是否新增成功 + */ + Boolean insertByBo(BudPillarPointBo bo); + + /** + * 修改光伏板桩点 + * + * @param bo 光伏板桩点 + * @return 是否修改成功 + */ + Boolean updateByBo(BudPillarPointBo bo); + + /** + * 校验并批量删除光伏板桩点信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudRedLineService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudRedLineService.java new file mode 100644 index 00000000..7b0a57f1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudRedLineService.java @@ -0,0 +1,82 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudRedLine; +import org.dromara.build.domain.bo.BudRedLineBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudRedLineVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 红线Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudRedLineService extends IService { + + /** + * 查询红线 + * + * @param id 主键 + * @return 红线 + */ + BudRedLineVo queryById(Long id); + + /** + * 分页查询红线列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 红线分页列表 + */ + TableDataInfo queryPageList(BudRedLineBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的红线列表 + * + * @param bo 查询条件 + * @return 红线列表 + */ + List queryList(BudRedLineBo bo); + + /** + * 新增红线 + * + * @param bo 红线 + * @return 是否新增成功 + */ + Boolean insertByBo(BudRedLineBo bo); + + /** + * 根据图层批量生成红线 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, List locationFeatures); + + /** + * 修改红线 + * + * @param bo 红线 + * @return 是否修改成功 + */ + Boolean updateByBo(BudRedLineBo bo); + + /** + * 校验并批量删除红线信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelBaseService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelBaseService.java new file mode 100644 index 00000000..3058e885 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelBaseService.java @@ -0,0 +1,23 @@ +package org.dromara.build.service; + +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.geojson.BudFeature; + +import java.util.List; + +/** + * @author lilemy + * @date 2025-12-19 14:52 + */ +public interface IBudSolarPanelBaseService { + + /** + * 根据图层批量生成桩点 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, List locationFeatures); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelService.java new file mode 100644 index 00000000..8b627bdf --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSolarPanelService.java @@ -0,0 +1,84 @@ +package org.dromara.build.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudSolarPanel; +import org.dromara.build.domain.bo.BudSolarPanelBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudSolarPanelVo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +import java.util.Collection; +import java.util.List; + +/** + * 光伏板Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudSolarPanelService extends IService { + + /** + * 查询光伏板 + * + * @param id 主键 + * @return 光伏板 + */ + BudSolarPanelVo queryById(Long id); + + /** + * 分页查询光伏板列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板分页列表 + */ + TableDataInfo queryPageList(BudSolarPanelBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的光伏板列表 + * + * @param bo 查询条件 + * @return 光伏板列表 + */ + List queryList(BudSolarPanelBo bo); + + /** + * 新增光伏板 + * + * @param bo 光伏板 + * @return 是否新增成功 + */ + Boolean insertByBo(BudSolarPanelBo bo); + + /** + * 根据图层批量生成光伏板 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures); + + /** + * 修改光伏板 + * + * @param bo 光伏板 + * @return 是否修改成功 + */ + Boolean updateByBo(BudSolarPanelBo bo); + + /** + * 校验并批量删除光伏板信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudStandColumnService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudStandColumnService.java new file mode 100644 index 00000000..58dea5ba --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudStandColumnService.java @@ -0,0 +1,70 @@ +package org.dromara.build.service; + +import org.dromara.build.domain.vo.BudStandColumnVo; +import org.dromara.build.domain.bo.BudStandColumnBo; +import org.dromara.build.domain.BudStandColumn; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 光伏板立柱Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudStandColumnService extends IService{ + + /** + * 查询光伏板立柱 + * + * @param id 主键 + * @return 光伏板立柱 + */ + BudStandColumnVo queryById(Long id); + + /** + * 分页查询光伏板立柱列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板立柱分页列表 + */ + TableDataInfo queryPageList(BudStandColumnBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的光伏板立柱列表 + * + * @param bo 查询条件 + * @return 光伏板立柱列表 + */ + List queryList(BudStandColumnBo bo); + + /** + * 新增光伏板立柱 + * + * @param bo 光伏板立柱 + * @return 是否新增成功 + */ + Boolean insertByBo(BudStandColumnBo bo); + + /** + * 修改光伏板立柱 + * + * @param bo 光伏板立柱 + * @return 是否修改成功 + */ + Boolean updateByBo(BudStandColumnBo bo); + + /** + * 校验并批量删除光伏板立柱信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSupportFrameService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSupportFrameService.java new file mode 100644 index 00000000..13298500 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/IBudSupportFrameService.java @@ -0,0 +1,70 @@ +package org.dromara.build.service; + +import org.dromara.build.domain.vo.BudSupportFrameVo; +import org.dromara.build.domain.bo.BudSupportFrameBo; +import org.dromara.build.domain.BudSupportFrame; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 光伏板支架Service接口 + * + * @author lilemy + * @date 2025-12-19 + */ +public interface IBudSupportFrameService extends IService{ + + /** + * 查询光伏板支架 + * + * @param id 主键 + * @return 光伏板支架 + */ + BudSupportFrameVo queryById(Long id); + + /** + * 分页查询光伏板支架列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板支架分页列表 + */ + TableDataInfo queryPageList(BudSupportFrameBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的光伏板支架列表 + * + * @param bo 查询条件 + * @return 光伏板支架列表 + */ + List queryList(BudSupportFrameBo bo); + + /** + * 新增光伏板支架 + * + * @param bo 光伏板支架 + * @return 是否新增成功 + */ + Boolean insertByBo(BudSupportFrameBo bo); + + /** + * 修改光伏板支架 + * + * @param bo 光伏板支架 + * @return 是否修改成功 + */ + Boolean updateByBo(BudSupportFrameBo bo); + + /** + * 校验并批量删除光伏板支架信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudBoxChangeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudBoxChangeServiceImpl.java new file mode 100644 index 00000000..76d34df0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudBoxChangeServiceImpl.java @@ -0,0 +1,221 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.build.domain.BudBoxChange; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.bo.BudBoxChangeBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudGeometry; +import org.dromara.build.domain.vo.BudBoxChangeVo; +import org.dromara.build.mapper.BudBoxChangeMapper; +import org.dromara.build.service.IBudBoxChangeService; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.utils.JtsPointMatcher; +import org.dromara.common.utils.JtsUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 箱变Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class BudBoxChangeServiceImpl extends ServiceImpl + implements IBudBoxChangeService { + + @Resource + private IBudMatrixService budMatrixService; + + /** + * 查询箱变 + * + * @param id 主键 + * @return 箱变 + */ + @Override + public BudBoxChangeVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询箱变列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 箱变分页列表 + */ + @Override + public TableDataInfo queryPageList(BudBoxChangeBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的箱变列表 + * + * @param bo 查询条件 + * @return 箱变列表 + */ + @Override + public List queryList(BudBoxChangeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudBoxChangeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudBoxChange::getId); + lqw.eq(bo.getProjectId() != null, BudBoxChange::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudBoxChange::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudBoxChange::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudBoxChange::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudBoxChange::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudBoxChange::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudBoxChange::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudBoxChange::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudBoxChange::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增箱变 + * + * @param bo 箱变 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudBoxChangeBo bo) { + BudBoxChange add = MapstructUtils.convert(bo, BudBoxChange.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 根据图层批量生成箱变 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures) { + if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) { + throw new ServiceException("请选择名称图层和位置图层"); + } + // 获取当前项目的方阵 + List matrixList = budMatrixService.queryListByProjectId(projectId); + if (CollUtil.isEmpty(matrixList)) { + throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息"); + } + List boxChangeList = new ArrayList<>(); + for (BudFeature locationFeature : locationFeatures) { + BudGeometry geometry = locationFeature.getGeometry(); + List coordinatesObj = geometry.getCoordinates(); + if (CollUtil.isEmpty(coordinatesObj)) { + log.warn("坐标数据为空"); + continue; + } + // 处理所有点位置数据 + List coordinates; + String type = locationFeature.getGeometry().getType(); + if (type.equalsIgnoreCase("Point")) { + coordinates = JtsUtil.toDoubleList(coordinatesObj); + } else { + coordinates = JtsPointMatcher.polygonCentroid(JtsUtil.castToDoubleList(coordinatesObj)); + } + // 判断箱变在哪个方阵里 + BudMatrix matrix = budMatrixService.getMatrixIdByCoordinates(matrixList, coordinates); + if (matrix == null) { + log.warn("箱变坐标不在方阵内"); + continue; + } + // 获取箱变名称 + String name = JtsUtil.findNearestTextByPoint(coordinates, nameFeatures); + if (name == null) { + log.warn("箱变名称为空"); + continue; + } + // 创建箱变 + BudBoxChange boxChange = new BudBoxChange(); + boxChange.setProjectId(matrix.getProjectId()); + boxChange.setMatrixId(matrix.getId()); + boxChange.setName(name); + boxChange.setPositions(JSONUtil.toJsonStr(coordinates)); + boxChange.setStatus("0"); + boxChangeList.add(boxChange); + } + if (CollUtil.isNotEmpty(boxChangeList)) { + return this.saveBatch(boxChangeList); + } else { + throw new ServiceException("未找到有效数据"); + } + } + + /** + * 修改箱变 + * + * @param bo 箱变 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudBoxChangeBo bo) { + BudBoxChange update = MapstructUtils.convert(bo, BudBoxChange.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudBoxChange entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除箱变信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudDesignDrawingServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudDesignDrawingServiceImpl.java new file mode 100644 index 00000000..0d4512be --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudDesignDrawingServiceImpl.java @@ -0,0 +1,442 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.build.domain.*; +import org.dromara.build.domain.bo.BudDesignDrawingBo; +import org.dromara.build.domain.dto.BudCreateByLayerReq; +import org.dromara.build.domain.dto.BudDesignDrawingQueryBuildReq; +import org.dromara.build.domain.dto.BudDesignDrawingUploadReq; +import org.dromara.build.domain.enums.BudDesignType; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.vo.BudDesignDrawingByBuildVo; +import org.dromara.build.domain.vo.BudDesignDrawingVo; +import org.dromara.build.mapper.BudDesignDrawingMapper; +import org.dromara.build.service.*; +import org.dromara.common.constant.DesignMapFileConstant; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.manager.cadmanager.CadManager; +import org.dromara.manager.cadmanager.vo.CadLayerListVo; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 施工设计图Service业务层处理 + * + * @author lilemy + * @date 2025-12-18 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class BudDesignDrawingServiceImpl extends ServiceImpl + implements IBudDesignDrawingService { + + @Resource + private CadManager cadManager; + + @Resource + private IBudMatrixService budMatrixService; + + @Resource + private IBudSolarPanelService budSolarPanelService; + + @Resource + private IBudBoxChangeService budBoxChangeService; + + @Resource + private IBudInverterService budInverterService; + + @Resource + private IBudRedLineService budRedLineService; + + @Resource + private IBudSolarPanelBaseService budSolarPanelBaseService; + + @Resource + private IBudPillarPointService budPillarPointService; + + @Resource + private IBudStandColumnService budStandColumnService; + + @Resource + private IBudSupportFrameService budSupportFrameService; + + /** + * 查询施工设计图 + * + * @param id 主键 + * @return 施工设计图 + */ + @Override + public BudDesignDrawingVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询施工设计图列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 施工设计图分页列表 + */ + @Override + public TableDataInfo queryPageList(BudDesignDrawingBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的施工设计图列表 + * + * @param bo 查询条件 + * @return 施工设计图列表 + */ + @Override + public List queryList(BudDesignDrawingBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + /** + * 获取 cad 文件图层列表 + * + * @param id 主键 id + * @return cad 文件图层列表 + */ + @Override + public List getLayerList(Long id) { + BudDesignDrawing designDrawing = this.getById(id); + if (designDrawing == null) { + throw new ServiceException("数据不存在"); + } + return cadManager.getLayerList(designDrawing.getContentId()); + } + + /** + * 根据图层名称导出数据 + * + * @param id 主键 id + * @param layerName cad 文件图层名称 + * @return 数据地址 + */ + @Override + public String getDateByLayerName(Long id, String layerName) { + if (StringUtils.isBlank(layerName) || id == null) { + throw new ServiceException("参数错误"); + } + BudDesignDrawing designDrawing = this.getById(id); + if (designDrawing == null) { + throw new ServiceException("数据不存在"); + } + return cadManager.getDateByLayerName(designDrawing.getContentId(), List.of(layerName)); + } + + /** + * 查询施工设计图列表 + * + * @param req 查询条件 + * @return 施工设计图列表 + */ + @Override + public List queryBuildList(BudDesignDrawingQueryBuildReq req) { + String buildType = req.getBuildType(); + Long projectId = req.getProjectId(); + Long matrixId = req.getMatrixId(); + BudDesignType value = BudDesignType.getEnumByValue(buildType); + List list; + switch (value) { + // 方阵 + case SQUARE_MATRIX -> { + List matrixList = budMatrixService.lambdaQuery() + .eq(BudMatrix::getProjectId, projectId) + .eq(matrixId != null, BudMatrix::getId, matrixId) + .list(); + list = matrixList.stream().map(matrix -> BudDesignDrawingByBuildVo.obj2vo( + matrix.getId(), matrix.getName(), matrix.getPositions(), null, null, + null, null, null)).toList(); + } + // 光伏板 + case SOLAR_PANEL -> { + List photovoltaicPanelList = budSolarPanelService.lambdaQuery() + .eq(BudSolarPanel::getProjectId, projectId) + .eq(matrixId != null, BudSolarPanel::getMatrixId, matrixId) + .list(); + list = photovoltaicPanelList.stream().map(panel -> BudDesignDrawingByBuildVo.obj2vo( + panel.getId(), panel.getName(), panel.getPositions(), panel.getFinishType(), panel.getFinishDate(), + panel.getStatus(), panel.getProgressCategoryId(), panel.getProgressCategoryName())).toList(); + } + // 逆变器 + case INVERTER -> { + List inverterList = budInverterService.lambdaQuery() + .eq(BudInverter::getProjectId, projectId) + .eq(matrixId != null, BudInverter::getMatrixId, matrixId) + .list(); + list = inverterList.stream().map(inverter -> BudDesignDrawingByBuildVo.obj2vo( + inverter.getId(), inverter.getName(), inverter.getPositions(), inverter.getFinishType(), inverter.getFinishDate(), + inverter.getStatus(), inverter.getProgressCategoryId(), inverter.getProgressCategoryName())).toList(); + } + // 箱变 + case BOX_CHANGE -> { + List boxChangeList = budBoxChangeService.lambdaQuery() + .eq(BudBoxChange::getProjectId, projectId) + .eq(matrixId != null, BudBoxChange::getMatrixId, matrixId) + .list(); + list = boxChangeList.stream().map(boxChange -> BudDesignDrawingByBuildVo.obj2vo( + boxChange.getId(), boxChange.getName(), boxChange.getPositions(), boxChange.getFinishType(), boxChange.getFinishDate(), + boxChange.getStatus(), boxChange.getProgressCategoryId(), boxChange.getProgressCategoryName())).toList(); + } + // 红线 + case RED_LINE -> { + List redLineList = budRedLineService.lambdaQuery() + .eq(BudRedLine::getProjectId, projectId) + .list(); + list = redLineList.stream().map(redLine -> BudDesignDrawingByBuildVo.obj2vo( + redLine.getId(), redLine.getName(), redLine.getPositions(), null, null, + null, null, null)).toList(); + } + // 桩点 + case PILLAR_POINT -> { + List pillarPointList = budPillarPointService.lambdaQuery() + .eq(BudPillarPoint::getProjectId, projectId) + .eq(matrixId != null, BudPillarPoint::getMatrixId, matrixId) + .list(); + list = pillarPointList.stream().map(pillarPoint -> BudDesignDrawingByBuildVo.obj2vo( + pillarPoint.getId(), pillarPoint.getName(), pillarPoint.getPositions(), + pillarPoint.getFinishType(), pillarPoint.getFinishDate(), + pillarPoint.getStatus(), pillarPoint.getProgressCategoryId(), pillarPoint.getProgressCategoryName()) + ).toList(); + } + // 立柱 + case STAND_COLUMN -> { + List standColumnList = budStandColumnService.lambdaQuery() + .eq(BudStandColumn::getProjectId, projectId) + .eq(matrixId != null, BudStandColumn::getMatrixId, matrixId) + .list(); + list = standColumnList.stream().map(standColumn -> BudDesignDrawingByBuildVo.obj2vo( + standColumn.getId(), standColumn.getName(), standColumn.getPositions(), + standColumn.getFinishType(), standColumn.getFinishDate(), + standColumn.getStatus(), standColumn.getProgressCategoryId(), standColumn.getProgressCategoryName()) + ).toList(); + } + // 支架 + case SUPPORT_FRAME -> { + List supportFrameList = budSupportFrameService.lambdaQuery() + .eq(BudSupportFrame::getProjectId, projectId) + .eq(matrixId != null, BudSupportFrame::getMatrixId, matrixId) + .list(); + list = supportFrameList.stream().map(supportFrame -> BudDesignDrawingByBuildVo.obj2vo( + supportFrame.getId(), supportFrame.getName(), supportFrame.getPositions(), + supportFrame.getFinishType(), supportFrame.getFinishDate(), + supportFrame.getStatus(), supportFrame.getProgressCategoryId(), supportFrame.getProgressCategoryName()) + ).toList(); + } + case null -> throw new ServiceException("参数错误"); + } + return list; + } + + /** + * 上传 cad 文件保存 + * + * @param file 文件 + * @param req 参数 + * @return 是否成功 + */ + @Override + public Boolean insertByCadFile(MultipartFile file, BudDesignDrawingUploadReq req) { + String originalCoordinate = req.getOriginalCoordinate(); + String targetCoordinate = req.getTargetCoordinate(); + Long projectId = req.getProjectId(); + String fileName = file.getOriginalFilename(); + String suffix = FileUtil.getSuffix(fileName); + // 获取当前项目根目录 + String projectRoot = System.getProperty("user.dir"); + String bashPath = DesignMapFileConstant.getDxfProjectPath(projectId); + String filePath = projectRoot + File.separator + bashPath; + String uuid = IdUtil.fastSimpleUUID(); + if (!FileUtil.exist(filePath)) { + FileUtil.mkdir(filePath); + } + String inputCADPath = filePath + File.separator + uuid + "." + suffix; + File savedFile; + try { + // 保存文件 + savedFile = new File(inputCADPath); + file.transferTo(savedFile); + } catch (IOException e) { + throw new ServiceException("CAD 文件保存失败"); + } + if (StringUtils.isBlank(targetCoordinate)) { + targetCoordinate = "EPSG:4326"; + } + Long fileId = cadManager.importCadFile(savedFile, null, originalCoordinate, targetCoordinate); + // 保存数据 + BudDesignDrawing designDrawing = new BudDesignDrawing(); + designDrawing.setProjectId(projectId); + designDrawing.setFileType(suffix); + designDrawing.setFileName(fileName); + designDrawing.setFilePath(bashPath + File.separator + uuid + "." + suffix); + designDrawing.setOriginalCoordinate(originalCoordinate); + designDrawing.setTargetCoordinate(targetCoordinate); + designDrawing.setContentId(fileId); + designDrawing.setRemark(req.getRemark()); + return this.save(designDrawing); + } + + private LambdaQueryWrapper buildQueryWrapper(BudDesignDrawingBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudDesignDrawing::getId); + lqw.eq(bo.getProjectId() != null, BudDesignDrawing::getProjectId, bo.getProjectId()); + lqw.eq(StringUtils.isNotBlank(bo.getFileType()), BudDesignDrawing::getFileType, bo.getFileType()); + lqw.like(StringUtils.isNotBlank(bo.getFileName()), BudDesignDrawing::getFileName, bo.getFileName()); + lqw.eq(StringUtils.isNotBlank(bo.getFilePath()), BudDesignDrawing::getFilePath, bo.getFilePath()); + lqw.eq(StringUtils.isNotBlank(bo.getOriginalCoordinate()), BudDesignDrawing::getOriginalCoordinate, bo.getOriginalCoordinate()); + lqw.eq(StringUtils.isNotBlank(bo.getTargetCoordinate()), BudDesignDrawing::getTargetCoordinate, bo.getTargetCoordinate()); + lqw.eq(bo.getContentId() != null, BudDesignDrawing::getContentId, bo.getContentId()); + return lqw; + } + + /** + * 新增施工设计图 + * + * @param bo 施工设计图 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudDesignDrawingBo bo) { + BudDesignDrawing add = MapstructUtils.convert(bo, BudDesignDrawing.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 新增施工设施 + * + * @param req 参数 + * @return 是否新增成功 + */ + @Override + public Boolean insertByLayers(BudCreateByLayerReq req) { + Long projectId = req.getProjectId(); + List locationLayers = req.getLocationLayers(); + List nameLayers = req.getNameLayers(); + List allLayers = new ArrayList<>(); + allLayers.addAll(locationLayers); + allLayers.addAll(nameLayers); + Long designDrawingId = req.getDesignDrawingId(); + String type = req.getType(); + BudDesignDrawing designDrawing = this.getById(designDrawingId); + // 获取图层坐标信息 + String allDate = cadManager.getDateByLayerName(designDrawing.getContentId(), allLayers); + String dateStr = HttpUtil.get(allDate); + if (StringUtils.isBlank(dateStr)) { + throw new ServiceException("获取坐标失败"); + } + List allFeatures; + // 解析坐标信息 + try { + String allFeaturesStr = JSONUtil.parseObj(dateStr).getStr("features"); + allFeatures = JSONUtil.toList(allFeaturesStr, BudFeature.class); + } catch (Exception e) { + log.error("解析坐标信息失败", e); + throw new ServiceException("解析坐标信息失败"); + } + // 获取位置信息 + List locationFeatures = allFeatures.stream() + .filter(item -> locationLayers.contains(item.getProperties().getLayer_name())) + .toList(); + // 获取名称信息 + List nameFeatures = new ArrayList<>(); + if (CollUtil.isNotEmpty(nameLayers)) { + nameFeatures = allFeatures.stream() + .filter(item -> nameLayers.contains(item.getProperties().getLayer_name())) + .toList(); + } + BudDesignType value = BudDesignType.getEnumByValue(type); + Boolean save; + switch (value) { + // 方阵 + case SQUARE_MATRIX -> save = budMatrixService.insertByLayers(designDrawing, projectId, + nameFeatures, locationFeatures); + // 光伏板 + case SOLAR_PANEL -> save = budSolarPanelService.insertByLayers(designDrawing, projectId, + nameFeatures, locationFeatures); + // 逆变器 + case INVERTER -> save = budInverterService.insertByLayers(designDrawing, projectId, + nameFeatures, locationFeatures); + // 箱变 + case BOX_CHANGE -> save = budBoxChangeService.insertByLayers(designDrawing, projectId, + nameFeatures, locationFeatures); + // 红线 + case RED_LINE -> save = budRedLineService.insertByLayers(designDrawing, projectId, locationFeatures); + // 桩点、立柱、支架 + case PILLAR_POINT, STAND_COLUMN, SUPPORT_FRAME -> save = budSolarPanelBaseService + .insertByLayers(designDrawing, projectId, locationFeatures); + case null -> throw new ServiceException("参数错误"); + } + return save; + } + + /** + * 修改施工设计图 + * + * @param bo 施工设计图 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudDesignDrawingBo bo) { + BudDesignDrawing update = MapstructUtils.convert(bo, BudDesignDrawing.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudDesignDrawing entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除施工设计图信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudInverterServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudInverterServiceImpl.java new file mode 100644 index 00000000..ddaed1c5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudInverterServiceImpl.java @@ -0,0 +1,221 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudInverter; +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.bo.BudInverterBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudGeometry; +import org.dromara.build.domain.vo.BudInverterVo; +import org.dromara.build.mapper.BudInverterMapper; +import org.dromara.build.service.IBudInverterService; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.utils.JtsPointMatcher; +import org.dromara.common.utils.JtsUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 逆变器Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class BudInverterServiceImpl extends ServiceImpl + implements IBudInverterService { + + @Resource + private IBudMatrixService budMatrixService; + + /** + * 查询逆变器 + * + * @param id 主键 + * @return 逆变器 + */ + @Override + public BudInverterVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询逆变器列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 逆变器分页列表 + */ + @Override + public TableDataInfo queryPageList(BudInverterBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的逆变器列表 + * + * @param bo 查询条件 + * @return 逆变器列表 + */ + @Override + public List queryList(BudInverterBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudInverterBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudInverter::getId); + lqw.eq(bo.getProjectId() != null, BudInverter::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudInverter::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudInverter::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudInverter::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudInverter::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudInverter::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudInverter::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudInverter::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudInverter::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增逆变器 + * + * @param bo 逆变器 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudInverterBo bo) { + BudInverter add = MapstructUtils.convert(bo, BudInverter.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 根据图层批量生成逆变器 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures) { + if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) { + throw new ServiceException("请选择名称图层和位置图层"); + } + // 获取当前项目的方阵 + List matrixList = budMatrixService.queryListByProjectId(projectId); + if (CollUtil.isEmpty(matrixList)) { + throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息"); + } + List inverterList = new ArrayList<>(); + for (BudFeature locationFeature : locationFeatures) { + BudGeometry geometry = locationFeature.getGeometry(); + List coordinatesObj = geometry.getCoordinates(); + if (CollUtil.isEmpty(coordinatesObj)) { + log.warn("坐标数据为空"); + continue; + } + // 处理所有点位置数据 + List coordinates; + String type = locationFeature.getGeometry().getType(); + if (type.equalsIgnoreCase("Point")) { + coordinates = JtsUtil.toDoubleList(coordinatesObj); + } else { + coordinates = JtsPointMatcher.polygonCentroid(JtsUtil.castToDoubleList(coordinatesObj)); + } + // 判断逆变器在哪个方阵里 + BudMatrix matrix = budMatrixService.getMatrixIdByCoordinates(matrixList, coordinates); + if (matrix == null) { + log.warn("逆变器坐标不在方阵内"); + continue; + } + // 获取逆变器名称 + String name = JtsUtil.findNearestTextByPoint(coordinates, nameFeatures); + if (name == null) { + log.warn("逆变器名称为空"); + continue; + } + // 创建逆变器 + BudInverter inverter = new BudInverter(); + inverter.setProjectId(matrix.getProjectId()); + inverter.setMatrixId(matrix.getId()); + inverter.setName(name); + inverter.setPositions(JSONUtil.toJsonStr(coordinates)); + inverter.setStatus("0"); + inverterList.add(inverter); + } + if (CollUtil.isNotEmpty(inverterList)) { + return this.saveBatch(inverterList); + } else { + throw new ServiceException("未找到有效数据"); + } + } + + /** + * 修改逆变器 + * + * @param bo 逆变器 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudInverterBo bo) { + BudInverter update = MapstructUtils.convert(bo, BudInverter.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudInverter entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除逆变器信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudMatrixServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudMatrixServiceImpl.java new file mode 100644 index 00000000..a9bc9d71 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudMatrixServiceImpl.java @@ -0,0 +1,257 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.bo.BudMatrixBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudGeometry; +import org.dromara.build.domain.vo.BudMatrixVo; +import org.dromara.build.mapper.BudMatrixMapper; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.utils.JtsUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 方阵Service业务层处理 + * + * @author lilemy + * @date 2025-12-18 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class BudMatrixServiceImpl extends ServiceImpl + implements IBudMatrixService { + + /** + * 查询方阵 + * + * @param id 主键 + * @return 方阵 + */ + @Override + public BudMatrixVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询方阵列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 方阵分页列表 + */ + @Override + public TableDataInfo queryPageList(BudMatrixBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的方阵列表 + * + * @param bo 查询条件 + * @return 方阵列表 + */ + @Override + public List queryList(BudMatrixBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + /** + * 根据项目 ID 查询方阵列表 + * + * @param projectId 项目 ID + * @return 方阵列表 + */ + @Override + public List queryListByProjectId(Long projectId) { + return this.lambdaQuery() + .eq(BudMatrix::getProjectId, projectId) + .list(); + } + + private LambdaQueryWrapper buildQueryWrapper(BudMatrixBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudMatrix::getId); + lqw.eq(bo.getProjectId() != null, BudMatrix::getProjectId, bo.getProjectId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudMatrix::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudMatrix::getPositions, bo.getPositions()); + return lqw; + } + + /** + * 新增方阵 + * + * @param bo 方阵 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudMatrixBo bo) { + BudMatrix add = MapstructUtils.convert(bo, BudMatrix.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改方阵 + * + * @param bo 方阵 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudMatrixBo bo) { + BudMatrix update = MapstructUtils.convert(bo, BudMatrix.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 根据图层批量生成方阵 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures) { + if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) { + throw new RuntimeException("请选择名称图层和位置图层"); + } + List matrixList = new ArrayList<>(); + // 遍历位置信息 + for (BudFeature feature : locationFeatures) { + BudMatrix matrix = new BudMatrix(); + matrix.setProjectId(projectId); + BudGeometry geometry = feature.getGeometry(); + // 获取坐标信息 + List> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates()); + // 获取方阵名称 + String str = JtsUtil.findNearestPointName(coordinatesList, nameFeatures); + if (StringUtils.isBlank(str)) { + continue; + } + String name = str.split(" ")[0]; + if (StringUtils.isBlank(name)) { + continue; + } + // 将位置信息转换为 JSON 字符串 + String positionStr = JSONUtil.toJsonStr(coordinatesList); + matrix.setPositions(positionStr); + matrix.setName(name); + matrixList.add(matrix); + } + return this.saveBatch(matrixList); + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudMatrix entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除方阵信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + /** + * 根据坐标获取符合的方阵 + * + * @param matrixList 方阵集合 + * @param coordinates 坐标 + * @return 符合的方阵 + */ + @Override + public BudMatrix getMatrixIdByCoordinates(List matrixList, List coordinates) { + // 判断在哪个方阵里 + BudMatrix matchMatrix = null; + for (BudMatrix matrix : matrixList) { + String positions = matrix.getPositions(); + List> positionList = new ArrayList<>(); + List arr = JSONUtil.toList(positions, String.class); + for (String s : arr) { + positionList.add(JSONUtil.toList(s, Double.class)); + } + Boolean result = JtsUtil.pointIsWithInPlane(positionList, coordinates); + if (result) { + matchMatrix = matrix; + break; + } + } + return matchMatrix; + } + + /** + * 根据二维坐标获取符合的方阵 + * + * @param matrixList 方阵集合 + * @param coordinates 坐标 + * @return 符合的方阵 + */ + @Override + public BudMatrix getMatrixIdBy2Coordinates(List matrixList, List> coordinates) { + BudMatrix matchMatrix = null; + for (BudMatrix matrix : matrixList) { + String positions = matrix.getPositions(); + List> positionList = new ArrayList<>(); + List arr = JSONUtil.toList(positions, String.class); + for (String s : arr) { + positionList.add(JSONUtil.toList(s, Double.class)); + } + Boolean result = JtsUtil.planeIsWithInPlane(positionList, coordinates); + if (result) { + // 找到在方阵内的面,直接返回 + return matrix; + } else { + // 判断面与方阵是否相交 + Boolean areResult = JtsUtil.arePolygonsIntersecting(positionList, coordinates); + if (areResult) { + matchMatrix = matrix; + break; + } + } + } + return matchMatrix; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudPillarPointServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudPillarPointServiceImpl.java new file mode 100644 index 00000000..f2749188 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudPillarPointServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.build.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.BudPillarPoint; +import org.dromara.build.domain.bo.BudPillarPointBo; +import org.dromara.build.domain.vo.BudPillarPointVo; +import org.dromara.build.mapper.BudPillarPointMapper; +import org.dromara.build.service.IBudPillarPointService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 光伏板桩点Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@RequiredArgsConstructor +@Service +public class BudPillarPointServiceImpl extends ServiceImpl + implements IBudPillarPointService { + + /** + * 查询光伏板桩点 + * + * @param id 主键 + * @return 光伏板桩点 + */ + @Override + public BudPillarPointVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询光伏板桩点列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板桩点分页列表 + */ + @Override + public TableDataInfo queryPageList(BudPillarPointBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的光伏板桩点列表 + * + * @param bo 查询条件 + * @return 光伏板桩点列表 + */ + @Override + public List queryList(BudPillarPointBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudPillarPointBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudPillarPoint::getId); + lqw.eq(bo.getProjectId() != null, BudPillarPoint::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudPillarPoint::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudPillarPoint::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudPillarPoint::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudPillarPoint::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudPillarPoint::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudPillarPoint::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudPillarPoint::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudPillarPoint::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增光伏板桩点 + * + * @param bo 光伏板桩点 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudPillarPointBo bo) { + BudPillarPoint add = MapstructUtils.convert(bo, BudPillarPoint.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改光伏板桩点 + * + * @param bo 光伏板桩点 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudPillarPointBo bo) { + BudPillarPoint update = MapstructUtils.convert(bo, BudPillarPoint.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudPillarPoint entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除光伏板桩点信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudRedLineServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudRedLineServiceImpl.java new file mode 100644 index 00000000..cea74228 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudRedLineServiceImpl.java @@ -0,0 +1,185 @@ +package org.dromara.build.service.impl; + +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudRedLine; +import org.dromara.build.domain.bo.BudRedLineBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudGeometry; +import org.dromara.build.domain.vo.BudRedLineVo; +import org.dromara.build.mapper.BudRedLineMapper; +import org.dromara.build.service.IBudRedLineService; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.utils.JtsUtil; +import org.dromara.project.domain.BusProject; +import org.dromara.project.service.IBusProjectService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 红线Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@RequiredArgsConstructor +@Service +public class BudRedLineServiceImpl extends ServiceImpl + implements IBudRedLineService { + + @Resource + private IBusProjectService projectService; + + /** + * 查询红线 + * + * @param id 主键 + * @return 红线 + */ + @Override + public BudRedLineVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询红线列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 红线分页列表 + */ + @Override + public TableDataInfo queryPageList(BudRedLineBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的红线列表 + * + * @param bo 查询条件 + * @return 红线列表 + */ + @Override + public List queryList(BudRedLineBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudRedLineBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudRedLine::getId); + lqw.eq(bo.getProjectId() != null, BudRedLine::getProjectId, bo.getProjectId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudRedLine::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudRedLine::getPositions, bo.getPositions()); + return lqw; + } + + /** + * 新增红线 + * + * @param bo 红线 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudRedLineBo bo) { + BudRedLine add = MapstructUtils.convert(bo, BudRedLine.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 根据图层批量生成红线 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, List locationFeatures) { + // 获取项目信息 + BusProject project = projectService.getById(projectId); + if (project == null) { + throw new ServiceException("所选项目不存在"); + } + List redLineList = new ArrayList<>(); + // 获取当前项目有的红线 + Long count = this.lambdaQuery() + .eq(BudRedLine::getProjectId, projectId) + .count(); + // 遍历位置信息 + long i = count + 1; + for (BudFeature feature : locationFeatures) { + BudRedLine redLine = new BudRedLine(); + redLine.setProjectId(projectId); + BudGeometry geometry = feature.getGeometry(); + // 获取坐标信息 + List> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates()); + // 将位置信息转换为 JSON 字符串 + String positionStr = JSONUtil.toJsonStr(coordinatesList); + redLine.setPositions(positionStr); + redLine.setName(project.getProjectName() + "红线-" + i); + redLineList.add(redLine); + i++; + } + return this.saveBatch(redLineList); + } + + /** + * 修改红线 + * + * @param bo 红线 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudRedLineBo bo) { + BudRedLine update = MapstructUtils.convert(bo, BudRedLine.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudRedLine entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除红线信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelBaseServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelBaseServiceImpl.java new file mode 100644 index 00000000..cf43b52b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelBaseServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.json.JSONUtil; +import jakarta.annotation.Resource; +import org.dromara.build.domain.*; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.service.*; +import org.dromara.common.core.constant.HttpStatus; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.utils.JtsPointMatcher; +import org.dromara.common.utils.JtsUtil; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * @author lilemy + * @date 2025-12-19 14:54 + */ +@Service +public class BudSolarPanelBaseServiceImpl implements IBudSolarPanelBaseService { + + @Resource + private IBudSolarPanelService budSolarPanelService; + + @Resource + private IBudPillarPointService budPillarPointService; + + @Resource + private IBudStandColumnService budStandColumnService; + + @Resource + private IBudSupportFrameService budSupportFrameService; + + /** + * 根据图层批量生成桩点 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, List locationFeatures) { + // 查询项目下光伏板 + List solarPanelList = budSolarPanelService.lambdaQuery() + .eq(BudSolarPanel::getProjectId, projectId) + .list(); + if (CollUtil.isEmpty(solarPanelList)) { + throw new ServiceException("项目下无光伏板信息,请先创建光伏板信息后再添加桩点、立柱、支架信息"); + } + Map solarPanelNameMap = solarPanelList.stream() + .collect(Collectors.toMap( + BudSolarPanel::getName, + Function.identity(), + (existing, replacement) -> existing // 如果有重复,保留第一个 + )); + // 处理所有点位置数据 + List> pointPositionList = locationFeatures.stream() + .map(feature -> { + String type = feature.getGeometry().getType(); + List coordinates = feature.getGeometry().getCoordinates(); + if (type.equalsIgnoreCase("Point")) { + return JtsUtil.toDoubleList(coordinates); + } else { + return JtsPointMatcher.polygonCentroid(JtsUtil.castToDoubleList(coordinates)); + } + }).toList(); + // 桩点 + List pillarPointList = new ArrayList<>(); + // 立柱 + List standColumnList = new ArrayList<>(); + // 支架 + List supportFrameList = new ArrayList<>(); + // 批量处理所有点位置数据 + for (Map.Entry entry : solarPanelNameMap.entrySet()) { + BudSolarPanel value = entry.getValue(); + List> positionList = JSONUtil.toList(value.getPositions(), String.class) + .stream().map(s -> JSONUtil.toList(s, Double.class)).collect(Collectors.toList()); + List> pointInPlaneList = JtsUtil.getPointInPlaneList(positionList, pointPositionList); + if (CollUtil.isNotEmpty(pointInPlaneList)) { + int i = 1; + for (List point : pointInPlaneList) { + String str = String.format("%02d", i++); + String name = value.getName() + "." + str; + Long matrixId = value.getMatrixId(); + Long subProjectId = value.getProjectId(); + String pointStr = JSONUtil.toJsonStr(point); + // 桩点 + BudPillarPoint pillarPoint = new BudPillarPoint(); + pillarPoint.setProjectId(subProjectId); + pillarPoint.setMatrixId(matrixId); + pillarPoint.setName(name); + pillarPoint.setPositions(pointStr); + pillarPointList.add(pillarPoint); + // 立柱 + BudStandColumn standColumn = new BudStandColumn(); + standColumn.setProjectId(subProjectId); + standColumn.setMatrixId(matrixId); + standColumn.setName(name); + standColumn.setPositions(pointStr); + standColumnList.add(standColumn); + // 支架 + BudSupportFrame supportFrame = new BudSupportFrame(); + supportFrame.setProjectId(subProjectId); + supportFrame.setMatrixId(matrixId); + supportFrame.setName(name); + supportFrame.setPositions(pointStr); + supportFrameList.add(supportFrame); + } + } + } + if (CollUtil.isNotEmpty(pillarPointList)) { + boolean result = budPillarPointService.saveBatch(pillarPointList); + if (!result) { + throw new ServiceException("批量新增光伏板桩点失败,数据库异常", HttpStatus.ERROR); + } + } + if (CollUtil.isNotEmpty(standColumnList)) { + boolean result = budStandColumnService.saveBatch(standColumnList); + if (!result) { + throw new ServiceException("批量新增光伏板立柱失败,数据库异常", HttpStatus.ERROR); + } + } + if (CollUtil.isNotEmpty(supportFrameList)) { + boolean result = budSupportFrameService.saveBatch(supportFrameList); + if (!result) { + throw new ServiceException("批量新增光伏板支架失败,数据库异常", HttpStatus.ERROR); + } + } + return true; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelServiceImpl.java new file mode 100644 index 00000000..049a00d9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSolarPanelServiceImpl.java @@ -0,0 +1,216 @@ +package org.dromara.build.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.dromara.build.domain.BudDesignDrawing; +import org.dromara.build.domain.BudMatrix; +import org.dromara.build.domain.BudSolarPanel; +import org.dromara.build.domain.bo.BudSolarPanelBo; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudProperties; +import org.dromara.build.domain.vo.BudSolarPanelVo; +import org.dromara.build.mapper.BudSolarPanelMapper; +import org.dromara.build.service.IBudMatrixService; +import org.dromara.build.service.IBudSolarPanelService; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.utils.JtsUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 光伏板Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@Slf4j +@RequiredArgsConstructor +@Service +public class BudSolarPanelServiceImpl extends ServiceImpl + implements IBudSolarPanelService { + + @Resource + private IBudMatrixService budMatrixService; + + /** + * 查询光伏板 + * + * @param id 主键 + * @return 光伏板 + */ + @Override + public BudSolarPanelVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询光伏板列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板分页列表 + */ + @Override + public TableDataInfo queryPageList(BudSolarPanelBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的光伏板列表 + * + * @param bo 查询条件 + * @return 光伏板列表 + */ + @Override + public List queryList(BudSolarPanelBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudSolarPanelBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudSolarPanel::getId); + lqw.eq(bo.getProjectId() != null, BudSolarPanel::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudSolarPanel::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudSolarPanel::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudSolarPanel::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudSolarPanel::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudSolarPanel::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudSolarPanel::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudSolarPanel::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudSolarPanel::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增光伏板 + * + * @param bo 光伏板 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudSolarPanelBo bo) { + BudSolarPanel add = MapstructUtils.convert(bo, BudSolarPanel.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 根据图层批量生成光伏板 + * + * @param drawing 设计图 + * @param projectId 项目ID + * @param nameFeatures 名称信息 + * @param locationFeatures 位置信息 + * @return 是否成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByLayers(BudDesignDrawing drawing, Long projectId, + List nameFeatures, List locationFeatures) { + if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) { + throw new ServiceException("请选择名称图层和位置图层"); + } + List solarPanelList = new ArrayList<>(); + // 获取当前项目的方阵 + List matrixList = budMatrixService.queryListByProjectId(projectId); + if (CollUtil.isEmpty(matrixList)) { + throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息"); + } + // 遍历名称信息 + for (BudFeature nameFeature : nameFeatures) { + BudProperties nameProperties = nameFeature.getProperties(); + String name = nameProperties.getText_value(); + // 获取名称 + if (StringUtils.isBlank(name)) { + log.warn("名称为空,跳过"); + continue; + } + // 获取名称对应的位置信息 + BudFeature matchedPolygon = JtsUtil.findNearestOrContainingPolygon(nameFeature, locationFeatures); + if (matchedPolygon == null) { + log.warn("未匹配到位置信息,跳过"); + continue; + } + // 获取坐标 + List> coordinates = JtsUtil.castToDoubleList(matchedPolygon.getGeometry().getCoordinates()); + // 判断所属方阵 + BudMatrix matrix = budMatrixService.getMatrixIdBy2Coordinates(matrixList, coordinates); + if (matrix == null) { + log.warn("所属方阵为空,跳过"); + continue; + } + // 构建光伏板实体 + BudSolarPanel solarPanel = new BudSolarPanel(); + solarPanel.setProjectId(matrix.getProjectId()); + solarPanel.setMatrixId(matrix.getId()); + solarPanel.setName(name); + solarPanel.setPositions(JSONUtil.toJsonStr(coordinates)); + solarPanel.setStatus("0"); + solarPanelList.add(solarPanel); + } + if (CollUtil.isNotEmpty(solarPanelList)) { + return this.saveBatch(solarPanelList); + } else { + throw new ServiceException("未找到有效数据"); + } + } + + /** + * 修改光伏板 + * + * @param bo 光伏板 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudSolarPanelBo bo) { + BudSolarPanel update = MapstructUtils.convert(bo, BudSolarPanel.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudSolarPanel entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除光伏板信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudStandColumnServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudStandColumnServiceImpl.java new file mode 100644 index 00000000..f4c1f606 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudStandColumnServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.build.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.BudStandColumn; +import org.dromara.build.domain.bo.BudStandColumnBo; +import org.dromara.build.domain.vo.BudStandColumnVo; +import org.dromara.build.mapper.BudStandColumnMapper; +import org.dromara.build.service.IBudStandColumnService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 光伏板立柱Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@RequiredArgsConstructor +@Service +public class BudStandColumnServiceImpl extends ServiceImpl + implements IBudStandColumnService { + + /** + * 查询光伏板立柱 + * + * @param id 主键 + * @return 光伏板立柱 + */ + @Override + public BudStandColumnVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询光伏板立柱列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板立柱分页列表 + */ + @Override + public TableDataInfo queryPageList(BudStandColumnBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的光伏板立柱列表 + * + * @param bo 查询条件 + * @return 光伏板立柱列表 + */ + @Override + public List queryList(BudStandColumnBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudStandColumnBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudStandColumn::getId); + lqw.eq(bo.getProjectId() != null, BudStandColumn::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudStandColumn::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudStandColumn::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudStandColumn::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudStandColumn::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudStandColumn::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudStandColumn::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudStandColumn::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudStandColumn::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增光伏板立柱 + * + * @param bo 光伏板立柱 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudStandColumnBo bo) { + BudStandColumn add = MapstructUtils.convert(bo, BudStandColumn.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改光伏板立柱 + * + * @param bo 光伏板立柱 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudStandColumnBo bo) { + BudStandColumn update = MapstructUtils.convert(bo, BudStandColumn.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudStandColumn entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除光伏板立柱信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSupportFrameServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSupportFrameServiceImpl.java new file mode 100644 index 00000000..faaa5f32 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/build/service/impl/BudSupportFrameServiceImpl.java @@ -0,0 +1,138 @@ +package org.dromara.build.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import org.dromara.build.domain.BudSupportFrame; +import org.dromara.build.domain.bo.BudSupportFrameBo; +import org.dromara.build.domain.vo.BudSupportFrameVo; +import org.dromara.build.mapper.BudSupportFrameMapper; +import org.dromara.build.service.IBudSupportFrameService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * 光伏板支架Service业务层处理 + * + * @author lilemy + * @date 2025-12-19 + */ +@RequiredArgsConstructor +@Service +public class BudSupportFrameServiceImpl extends ServiceImpl + implements IBudSupportFrameService { + + /** + * 查询光伏板支架 + * + * @param id 主键 + * @return 光伏板支架 + */ + @Override + public BudSupportFrameVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询光伏板支架列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 光伏板支架分页列表 + */ + @Override + public TableDataInfo queryPageList(BudSupportFrameBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的光伏板支架列表 + * + * @param bo 查询条件 + * @return 光伏板支架列表 + */ + @Override + public List queryList(BudSupportFrameBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(BudSupportFrameBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(BudSupportFrame::getId); + lqw.eq(bo.getProjectId() != null, BudSupportFrame::getProjectId, bo.getProjectId()); + lqw.eq(bo.getMatrixId() != null, BudSupportFrame::getMatrixId, bo.getMatrixId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), BudSupportFrame::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getPositions()), BudSupportFrame::getPositions, bo.getPositions()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BudSupportFrame::getStatus, bo.getStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getFinishType()), BudSupportFrame::getFinishType, bo.getFinishType()); + lqw.eq(bo.getFinishDate() != null, BudSupportFrame::getFinishDate, bo.getFinishDate()); + lqw.eq(bo.getProgressCategoryId() != null, BudSupportFrame::getProgressCategoryId, bo.getProgressCategoryId()); + lqw.like(StringUtils.isNotBlank(bo.getProgressCategoryName()), BudSupportFrame::getProgressCategoryName, bo.getProgressCategoryName()); + return lqw; + } + + /** + * 新增光伏板支架 + * + * @param bo 光伏板支架 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(BudSupportFrameBo bo) { + BudSupportFrame add = MapstructUtils.convert(bo, BudSupportFrame.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改光伏板支架 + * + * @param bo 光伏板支架 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(BudSupportFrameBo bo) { + BudSupportFrame update = MapstructUtils.convert(bo, BudSupportFrame.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(BudSupportFrame entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除光伏板支架信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsUtil.java similarity index 67% rename from xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java rename to xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsUtil.java index d47abcb0..73cdce20 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsUtil.java @@ -1,9 +1,12 @@ package org.dromara.common.utils; +import cn.hutool.core.collection.CollUtil; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; +import org.dromara.build.domain.geojson.BudFeature; +import org.dromara.build.domain.geojson.BudGeometry; import org.dromara.common.constant.GeoJsonConstant; import org.dromara.common.core.constant.HttpStatus; import org.dromara.common.core.exception.ServiceException; @@ -12,23 +15,19 @@ import org.dromara.facility.domain.FacMatrix; import org.dromara.facility.domain.FacPhotovoltaicPanel; import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane; import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint; -import org.dromara.facility.domain.dto.geojson.FacGeometry; import org.dromara.facility.domain.dto.geojson.FacGeometryByPoint; import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; import org.locationtech.jts.geom.*; import org.locationtech.jts.index.strtree.STRtree; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** * @author lilemy * @date 2025/4/24 11:48 */ -public class JSTUtil { +public class JtsUtil { private static final GeometryFactory geometryFactory = new GeometryFactory(); @@ -61,6 +60,41 @@ public class JSTUtil { return null; // 如果没找到合适的点 } + /** + * 获取最近点的名称 + * + * @param target 目标点 + * @param nameGeoJson 点对象列表 + * @return 最近点的名称 + */ + public static String findNearestTextByPoint(List target, List nameGeoJson) { + Point targetPoint = geometryFactory.createPoint(new Coordinate(target.get(0), target.get(1))); + BudFeature nearestFeature = null; + double minDistance = Double.MAX_VALUE; + for (BudFeature feature : nameGeoJson) { + BudGeometry geometry = feature.getGeometry(); + List coordsObj = geometry.getCoordinates(); + if (CollUtil.isEmpty(coordsObj)) { + continue; + } + List coords = coordsObj.stream() + .map(o -> ((Number) o).doubleValue()) + .toList(); + if (coords.size() == 2) { + Point currentPoint = geometryFactory.createPoint(new Coordinate(coords.get(0), coords.get(1))); + double distance = targetPoint.distance(currentPoint); + if (distance < minDistance) { + minDistance = distance; + nearestFeature = feature; + } + } + } + if (nearestFeature != null && nearestFeature.getProperties() != null) { + return nearestFeature.getProperties().getText_value(); + } + return null; // 如果没找到合适的点 + } + /** * 点是否在平面内 * @@ -154,12 +188,11 @@ public class JSTUtil { /** * 获取二维坐标 * - * @param geometry 几何对象 + * @param type 类型 + * @param coordinates 坐标 * @return 二维坐标 */ - public static List> getTwoDimensionalCoordinates(FacGeometry geometry) { - String type = geometry.getType(); - List coordinates = geometry.getCoordinates(); + public static List> getTwoDimensionalCoordinates(String type, List coordinates) { return switch (type) { case GeoJsonConstant.POINT -> throw new ServiceException("点位无法创建方阵", HttpStatus.BAD_REQUEST); case GeoJsonConstant.LINE -> coordinates.stream() @@ -234,6 +267,73 @@ public class JSTUtil { return null; } + /** + * 匹配最近的点,获取该点的名称 + * + * @param polygon 平面 + * @param points 点列表集合 + * @return 最近点的名称 + */ + public static String findNearestPointName(List> polygon, List points) { + if (CollUtil.isEmpty(polygon) || polygon.size() < 3 || CollUtil.isEmpty(points)) { + return null; + } + // 1. 构建 Polygon + List coordinate = polygon.stream() + .map(c -> new Coordinate(c.getFirst(), c.get(1))) + .collect(Collectors.toList()); + // 如果首尾不一致,补一个 + if (!coordinate.getFirst().equals2D(coordinate.getLast())) { + coordinate.add(coordinate.getFirst()); + polygon.add(polygon.getFirst()); + } + Coordinate[] polygonCoords = coordinate.toArray(new Coordinate[0]); + Polygon jtsPolygon = geometryFactory.createPolygon(polygonCoords); + + // 2. 构建空间索引(JTS STRtree) + STRtree spatialIndex = new STRtree(); + Map coordToFeatureMap = new HashMap<>(); + for (BudFeature feature : points) { + List pointList; + List coords = feature.getGeometry().getCoordinates(); + if (CollUtil.isEmpty(coords)) continue; + if (coords.size() != 2) { + pointList = JtsPointMatcher.polygonCentroid(castToDoubleList(coords)); + } else { + pointList = coords.stream() + .map(o -> ((Number) o).doubleValue()) + .toList(); + } + Coordinate coord = new Coordinate(pointList.get(0), pointList.get(1)); + Point point = geometryFactory.createPoint(coord); + // 用点的 Envelope 加入索引 + spatialIndex.insert(point.getEnvelopeInternal(), point); + coordToFeatureMap.put(coord, feature); + } + // 3. 查询距离 polygon 最近的点 + // 用 polygon 中心点附近构造 Envelope(扩大一些范围) + Envelope searchEnv = jtsPolygon.getEnvelopeInternal(); + searchEnv.expandBy(10); // 扩大搜索半径 + @SuppressWarnings("unchecked") + List candidatePoints = spatialIndex.query(searchEnv); + double minDistance = Double.MAX_VALUE; + Coordinate nearestCoord = null; + for (Point point : candidatePoints) { + double distance = point.distance(jtsPolygon); + if (distance < minDistance) { + minDistance = distance; + nearestCoord = point.getCoordinate(); + } + } + if (nearestCoord != null) { + BudFeature nearestFeature = coordToFeatureMap.get(nearestCoord); + if (nearestFeature != null && nearestFeature.getProperties() != null) { + return nearestFeature.getProperties().getText_value(); + } + } + return null; + } + /** * 匹配最近的面,获取该面的信息 * @@ -276,6 +376,54 @@ public class JSTUtil { return nearestPolygon; } + /** + * 匹配最近的面,获取该面的信息 + * + * @param pointFeature 点位 + * @param polygons 平面列表 + * @return 最近面的信息 + */ + public static BudFeature findNearestOrContainingPolygon( + BudFeature pointFeature, + List polygons + ) { + if (pointFeature == null || polygons == null || polygons.isEmpty()) { + return null; + } + List coordsObj = pointFeature.getGeometry().getCoordinates(); + if (CollUtil.isEmpty(coordsObj) || coordsObj.size() != 2) { + return null; + } + List coords = coordsObj.stream() + .map(o -> ((Number) o).doubleValue()) + .toList(); + Coordinate pointCoord = new Coordinate(coords.get(0), coords.get(1)); + Point point = geometryFactory.createPoint(pointCoord); + BudFeature nearestPolygon = null; + double minDistance = Double.MAX_VALUE; + for (BudFeature polygonFeature : polygons) { + if (polygonFeature == null || polygonFeature.getGeometry() == null) { + continue; // 跳过空对象 + } + List polyCoordsObj = polygonFeature.getGeometry().getCoordinates(); + List> polyCoords = castToDoubleList(polyCoordsObj); + Coordinate[] polygonCoords = polyCoords.stream() + .map(c -> new Coordinate(c.getFirst(), c.get(1))) + .toArray(Coordinate[]::new); + Polygon polygon = geometryFactory.createPolygon(polygonCoords); + // 优先使用包含点的 polygon + if (polygon.contains(point)) { + return polygonFeature; + } + double distance = polygon.distance(point); + if (distance < minDistance) { + minDistance = distance; + nearestPolygon = polygonFeature; + } + } + return nearestPolygon; + } + /** * 判断一个点是否在多个区域中,返回第一个匹配区域的点集合(否则 null) * @@ -394,6 +542,47 @@ public class JSTUtil { return address; } + /** + * 将原始数据转换为List> + * + * @param rawList 原始数据 + * @return 转换后的数据 + */ + public static List> castToDoubleList(List rawList) { + List> result = new ArrayList<>(); + + for (Object item : rawList) { + if (item instanceof List innerList) { + List point = new ArrayList<>(); + for (Object value : innerList) { + if (value instanceof Number num) { + point.add(num.doubleValue()); + } + } + result.add(point); + } + } + return result; + } + + /** + * 将原始数据转换为 List + * + * @param list 原始数据 + * @return 转换后的数据 + */ + public static List toDoubleList(List list) { + return list.stream() + .filter(Objects::nonNull) + .map(o -> { + if (o instanceof Number n) { + return n.doubleValue(); + } + throw new IllegalArgumentException("非数字类型:" + o); + }) + .toList(); + } + public static void main(String[] args) { String s = "[{\"lng\":108.27080423,\"lat\":30.78111723,\"alt\":0},{\"lng\":108.1121822,\"lat\":28.29520706,\"alt\":0},{\"lng\":104.14552241,\"lat\":25.30970518,\"alt\":0},{\"lng\":109.08566373,\"lat\":22.16157883,\"alt\":0},{\"lng\":113.65236101,\"lat\":23.77537016,\"alt\":0},{\"lng\":114.7759412,\"lat\":27.54339559,\"alt\":0},{\"lng\":112.75195929,\"lat\":30.44798186,\"alt\":0},{\"lng\":109.80548867,\"lat\":31.34953868,\"alt\":0}]"; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacBoxTransformerServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacBoxTransformerServiceImpl.java index 95401010..2e2d32c9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacBoxTransformerServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacBoxTransformerServiceImpl.java @@ -12,8 +12,7 @@ import org.dromara.common.core.utils.ObjectUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.satoken.utils.LoginHelper; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.facility.domain.FacBoxTransformer; import org.dromara.facility.domain.FacMatrix; import org.dromara.facility.domain.dto.boxtransformer.FacBoxTransformerCreateByGeoJsonReq; @@ -192,7 +191,7 @@ public class FacBoxTransformerServiceImpl extends ServiceImpl> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry); + List> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates()); // 获取方阵名称 - String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures); + String nameStr = JtsUtil.findNearestPointText(coordinatesList, nameFeatures); if (StringUtils.isBlank(nameStr)) { continue; } @@ -514,7 +514,7 @@ public class FacMatrixServiceImpl extends ServiceImpl future = executor.submit(() -> { List> positionList = JSONUtil.toList(photovoltaicPanel.getPositions(), String.class) .stream().map(s -> JSONUtil.toList(s, Double.class)).collect(Collectors.toList()); - List> pointInPlaneList = JSTUtil.getPointInPlaneList(positionList, sharedPointList); + List> pointInPlaneList = JtsUtil.getPointInPlaneList(positionList, sharedPointList); if (CollUtil.isNotEmpty(pointInPlaneList)) { int i = 1; for (List list : pointInPlaneList) { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java index f5e201b0..a5d26b12 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java @@ -18,7 +18,7 @@ import org.dromara.common.sse.config.SseProperties; import org.dromara.common.sse.dto.SeeMessageContentDto; import org.dromara.common.sse.dto.SseMessageDto; import org.dromara.common.sse.utils.SseMessageUtils; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.facility.constant.FacRedisKeyConstant; import org.dromara.facility.domain.FacMatrix; import org.dromara.facility.domain.FacPhotovoltaicPanel; @@ -322,7 +322,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl panelList = new ArrayList<>(); // ② 找到该点对应的 polygon(优先包含,否则最近) - FacFeatureByPlane matchedPolygon = JSTUtil.findNearestOrContainingPolygon(nameFeature, locationFeatures); + FacFeatureByPlane matchedPolygon = JtsUtil.findNearestOrContainingPolygon(nameFeature, locationFeatures); if (matchedPolygon == null) return Collections.emptyList(); // ③ 获取 geometry 坐标 List> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst(); @@ -784,7 +784,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl finishPanelList = new HashSet<>(); for (RecognizeConvertCoordinateResult result : coordinateList) { // 获取包含该坐标的面 - FacPhotovoltaicPanel containingPanel = JSTUtil.findContainingPanel(result, panelList); + FacPhotovoltaicPanel containingPanel = JtsUtil.findContainingPanel(result, panelList); if (containingPanel != null) { log.info("识别到的光伏板:{}", containingPanel.getName()); PgsProgressPlanDetailRecognizerVo vo = new PgsProgressPlanDetailRecognizerVo(); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacRedLineServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacRedLineServiceImpl.java index 6bb12489..47427bac 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacRedLineServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacRedLineServiceImpl.java @@ -13,7 +13,7 @@ import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.facility.domain.FacRedLine; import org.dromara.facility.domain.bo.FacRedLineBo; import org.dromara.facility.domain.dto.geojson.FacFeature; @@ -178,7 +178,7 @@ public class FacRedLineServiceImpl extends ServiceImpl features = locationGeoJson.getFeatures(); FacGeometry geometry = features.getFirst().getGeometry(); // 获取坐标信息 - List> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry); + List> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates()); // 将位置信息转换为 JSON 字符串 String positionStr = JSONUtil.toJsonStr(coordinatesList); redLine.setPositions(positionStr); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/GpsSafetyUserRecordServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/GpsSafetyUserRecordServiceImpl.java index 3bae7b17..629393a4 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/GpsSafetyUserRecordServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/GpsSafetyUserRecordServiceImpl.java @@ -12,7 +12,7 @@ import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.facility.domain.FacMatrix; import org.dromara.facility.service.IFacMatrixService; import org.dromara.gps.domain.GpsSafetyUserRecord; @@ -190,7 +190,7 @@ public class GpsSafetyUserRecordServiceImpl extends ServiceImpl getLayerList(Long cadFileId) { + return CadRequestUtils.getLayerList(cadProperties.getUrl(), cadFileId); + } + + /** + * 根据图层名称导出数据 + * + * @param cadFileId cad 文件 id + * @return 数据 + */ + public String getDateByLayerName(Long cadFileId, List layerNames) { + return CadRequestUtils.getDateByLayerName(cadProperties.getUrl(), cadFileId, layerNames); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadProperties.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadProperties.java new file mode 100644 index 00000000..4c01b98a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadProperties.java @@ -0,0 +1,20 @@ +package org.dromara.manager.cadmanager; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * @author lilemy + * @date 2025-12-18 14:15 + */ +@Data +@Configuration +@ConfigurationProperties(prefix = "cad") +public class CadProperties { + + /** + * cad 服务请求地址 + */ + private String url; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadRequestUtils.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadRequestUtils.java new file mode 100644 index 00000000..d09d19c7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/CadRequestUtils.java @@ -0,0 +1,117 @@ +package org.dromara.manager.cadmanager; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.manager.cadmanager.vo.CadLayerListVo; + +import java.io.File; +import java.util.List; + +/** + * @author lilemy + * @date 2025-12-18 14:04 + */ +@Slf4j +public class CadRequestUtils { + + /** + * cad 文件导入 + * + * @param file cad 文件 + * @param path cad 文件路径 + * @param srcEPSG cad 文件源坐标系 + * @param dstEPSG cad 文件目标坐标系 + * @return cad 文件 id + */ + public static Long importCadFile(String url, File file, String path, String srcEPSG, String dstEPSG) { + String errorMsg = "cad 文件导入请求失败"; + try (HttpResponse response = HttpRequest.post(url + CadConstant.IMPORT_CAD_FILE) + .form("file", file) + .form("path", path) // 普通参数 + .form("src_epsg", srcEPSG) + .form("dst_epsg", dstEPSG) + .execute()) { + if (!response.isOk()) { + log.error("{}:{}", errorMsg, response.getStatus()); + throw new ServiceException(errorMsg + response.getStatus()); + } + String body = response.body(); + JSONObject obj = JSONUtil.parseObj(body); + if (obj.getInt("code") != 0) { + log.error("{},状态码:{},错误信息:{}", errorMsg, obj.get("code"), obj.get("message")); + throw new ServiceException(errorMsg + obj.get("message")); + } + log.info("cad 文件导入请求成功:{}", obj); + return obj.getJSONObject("data").getLong("ID"); + } + } + + /** + * 获取 cad 文件图层列表 + * + * @param cadFileId cad 文件 id + * @return cad 文件图层列表 + */ + public static List getLayerList(String url, Long cadFileId) { + String errorMsg = "获取 cad 文件图层列表请求失败"; + String fullUrl = url + CadConstant.GET_LAYER_LIST + "?id=" + cadFileId; + try (HttpResponse response = HttpRequest.get(fullUrl) + .execute()) { + if (!response.isOk()) { + log.error("{}:{}", errorMsg, response.getStatus()); + throw new ServiceException(errorMsg + response.getStatus()); + } + String body = response.body(); + JSONObject obj = JSONUtil.parseObj(body); + if (obj.getInt("code") != 0) { + log.error("{},状态码:{},错误信息:{}", errorMsg, obj.get("code"), obj.get("message")); + throw new ServiceException(errorMsg + obj.get("message")); + } + log.info("获取 cad 文件图层列表:{}", obj); + String jsonArray = obj.getJSONObject("data").getStr("list"); + return JSONUtil.toList(jsonArray, CadLayerListVo.class); + } + } + + /** + * 根据图层名称导出数据 + * + * @param cadFileId cad 文件 id + * @param layerNames cad 文件图层名称 + * @return 数据地址 + */ + public static String getDateByLayerName(String url, Long cadFileId, List layerNames) { + if (CollUtil.isEmpty(layerNames)) { + throw new ServiceException("请选择图层"); + } + if (cadFileId == null) { + throw new ServiceException("请选择 cad 文件"); + } + String errorMsg = "根据图层名称导出数据请求失败"; + // 构造请求体 JSON + JSONObject reqBody = new JSONObject(); + reqBody.set("id", cadFileId); + reqBody.set("layer_names", layerNames); + try (HttpResponse response = HttpRequest.post(url + CadConstant.EXPORT_DATA_BY_LAYER_NAME) + .body(reqBody.toString()) + .execute()) { + if (!response.isOk()) { + log.error("{}:{}", errorMsg, response.getStatus()); + throw new ServiceException(errorMsg + response.getStatus()); + } + String body = response.body(); + JSONObject obj = JSONUtil.parseObj(body); + if (obj.getInt("code") != 0) { + log.error("{},状态码:{},错误信息:{}", errorMsg, obj.get("code"), obj.get("message")); + throw new ServiceException(errorMsg + obj.get("message")); + } + log.info("获取 cad 文件图层列表:{}", obj); + return url + "/" + obj.getJSONObject("data").getStr("url"); + } + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/vo/CadLayerListVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/vo/CadLayerListVo.java new file mode 100644 index 00000000..82238de3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/cadmanager/vo/CadLayerListVo.java @@ -0,0 +1,22 @@ +package org.dromara.manager.cadmanager.vo; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-12-18 15:29 + */ +@Data +public class CadLayerListVo implements Serializable { + + @Serial + private static final long serialVersionUID = -1164693724179945217L; + + /** + * 图层名称 + */ + private String name; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java index 644c01a7..94589068 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java @@ -1120,15 +1120,17 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl facilityList; PgsProgressCategoryCoordinateVo coordinateVo = new PgsProgressCategoryCoordinateVo(); String type = workType.split("_")[0]; switch (type) { case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_WORK_TYPE -> { List list = photovoltaicPanelService.lambdaQuery() - .eq(FacPhotovoltaicPanel::getProjectId, progressCategory.getProjectId()) .eq(FacPhotovoltaicPanel::getMatrixId, progressCategory.getMatrixId()) - .eq(FacPhotovoltaicPanel::getProgressCategoryId, progressCategory.getId()) + .eq(FacPhotovoltaicPanel::getProgressCategoryId, id) .list(); facilityList = list.stream().map(fac -> { JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); @@ -1145,9 +1147,8 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl { List list = inverterService.lambdaQuery() - .eq(FacInverter::getProjectId, progressCategory.getProjectId()) .eq(FacInverter::getMatrixId, progressCategory.getMatrixId()) - .eq(FacInverter::getProgressCategoryId, progressCategory.getId()) + .eq(FacInverter::getProgressCategoryId, id) .list(); facilityList = list.stream().map(fac -> { JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); @@ -1164,9 +1165,62 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl { List list = boxTransformerService.lambdaQuery() - .eq(FacBoxTransformer::getProjectId, progressCategory.getProjectId()) .eq(FacBoxTransformer::getMatrixId, progressCategory.getMatrixId()) - .eq(FacBoxTransformer::getProgressCategoryId, progressCategory.getId()) + .eq(FacBoxTransformer::getProgressCategoryId, id) + .list(); + facilityList = list.stream().map(fac -> { + JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); + int depth = JsonDimensionUtil.getJsonArrayDepth(jsonArray); + return new PgsProgressCategoryFacilityVo( + fac.getId(), + fac.getName(), + jsonArray, + PgsCoordinateTypeEnum.getTextByValue(depth), + fac.getStatus(), + fac.getFinishDate() + ); + }).toList(); + } + case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_COLUMN_WORK_TYPE -> { + List list = photovoltaicPanelColumnService.lambdaQuery() + .eq(FacPhotovoltaicPanelColumn::getMatrixId, progressCategory.getMatrixId()) + .eq(FacPhotovoltaicPanelColumn::getProgressCategoryId, id) + .list(); + facilityList = list.stream().map(fac -> { + JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); + int depth = JsonDimensionUtil.getJsonArrayDepth(jsonArray); + return new PgsProgressCategoryFacilityVo( + fac.getId(), + fac.getName(), + jsonArray, + PgsCoordinateTypeEnum.getTextByValue(depth), + fac.getStatus(), + fac.getFinishDate() + ); + }).toList(); + } + case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_SUPPORT_WORK_TYPE -> { + List list = photovoltaicPanelSupportService.lambdaQuery() + .eq(FacPhotovoltaicPanelSupport::getMatrixId, progressCategory.getMatrixId()) + .eq(FacPhotovoltaicPanelSupport::getProgressCategoryId, id) + .list(); + facilityList = list.stream().map(fac -> { + JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); + int depth = JsonDimensionUtil.getJsonArrayDepth(jsonArray); + return new PgsProgressCategoryFacilityVo( + fac.getId(), + fac.getName(), + jsonArray, + PgsCoordinateTypeEnum.getTextByValue(depth), + fac.getStatus(), + fac.getFinishDate() + ); + }).toList(); + } + case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_POINT_WORK_TYPE -> { + List list = photovoltaicPanelPointService.lambdaQuery() + .eq(FacPhotovoltaicPanelPoint::getMatrixId, progressCategory.getMatrixId()) + .eq(FacPhotovoltaicPanelPoint::getProgressCategoryId, id) .list(); facilityList = list.stream().map(fac -> { JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions()); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java index 031d65fb..dfcefec2 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java @@ -31,7 +31,7 @@ import org.dromara.common.redis.utils.RedisUtils; import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.common.utils.BigDecimalUtil; import org.dromara.common.utils.IdCardEncryptorUtil; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.domain.SubContractor; import org.dromara.contractor.service.ISubConstructionUserService; @@ -579,7 +579,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl matchingRange = JSTUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList); + List matchingRange = JtsUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList); return matchingRange != null; } @@ -1196,7 +1196,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl matchingRange = JSTUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList); + List matchingRange = JtsUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList); return matchingRange != null; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/RydwWebSocketServer.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/RydwWebSocketServer.java index 635b0ad3..2fd44555 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/RydwWebSocketServer.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/RydwWebSocketServer.java @@ -10,7 +10,7 @@ import org.dromara.common.core.utils.SpringUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.domain.GeoPoint; import org.dromara.common.redis.utils.RedisUtils; -import org.dromara.common.utils.JSTUtil; +import org.dromara.common.utils.JtsUtil; import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.service.impl.SubConstructionUserServiceImpl; import org.dromara.gps.domain.bo.GpsEquipmentSonBo; @@ -270,7 +270,7 @@ public class RydwWebSocketServer { for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) { //转换范围 List coordinates = List.of(busProjectPunchrange.getPunchRange()); - List matchingRange = JSTUtil.findMatchingRange(one.getLocLatitude().toString(), one.getLocLongitude().toString(), coordinates); + List matchingRange = JtsUtil.findMatchingRange(one.getLocLatitude().toString(), one.getLocLongitude().toString(), coordinates); //如果范围外为 空 if (matchingRange != null && !matchingRange.isEmpty() && !isFind) { sysUserVo.setQy(busProjectPunchrange.getPunchName()); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudBoxChangeMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudBoxChangeMapper.xml new file mode 100644 index 00000000..c49d7ead --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudBoxChangeMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudDesignDrawingMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudDesignDrawingMapper.xml new file mode 100644 index 00000000..c217f383 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudDesignDrawingMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudInverterMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudInverterMapper.xml new file mode 100644 index 00000000..2a83123d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudInverterMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudMatrixMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudMatrixMapper.xml new file mode 100644 index 00000000..976cf9fd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudMatrixMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudPillarPointMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudPillarPointMapper.xml new file mode 100644 index 00000000..6cdbe9ce --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudPillarPointMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudRedLineMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudRedLineMapper.xml new file mode 100644 index 00000000..6b46bbf6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudRedLineMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSolarPanelMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSolarPanelMapper.xml new file mode 100644 index 00000000..20ce20bd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSolarPanelMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudStandColumnMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudStandColumnMapper.xml new file mode 100644 index 00000000..3260cd51 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudStandColumnMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSupportFrameMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSupportFrameMapper.xml new file mode 100644 index 00000000..109db15c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/build/BudSupportFrameMapper.xml @@ -0,0 +1,7 @@ + + + + +