重构进度计划(CAD 读取导入)
This commit is contained in:
@ -379,3 +379,5 @@ rabbitmq:
|
|||||||
dead-letter-exchange: dev-dlx-exchange
|
dead-letter-exchange: dev-dlx-exchange
|
||||||
dead-letter-queue: dev-dlx-queue
|
dead-letter-queue: dev-dlx-queue
|
||||||
dead-letter-routing-key: dev.dlx.routing.key
|
dead-letter-routing-key: dev.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -354,3 +354,5 @@ rabbitmq:
|
|||||||
dead-letter-exchange: local-dlx-exchange
|
dead-letter-exchange: local-dlx-exchange
|
||||||
dead-letter-queue: local-dlx-queue
|
dead-letter-queue: local-dlx-queue
|
||||||
dead-letter-routing-key: local.dlx.routing.key
|
dead-letter-routing-key: local.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -354,3 +354,5 @@ rabbitmq:
|
|||||||
dead-letter-exchange: local-dlx-exchange
|
dead-letter-exchange: local-dlx-exchange
|
||||||
dead-letter-queue: local-dlx-queue
|
dead-letter-queue: local-dlx-queue
|
||||||
dead-letter-routing-key: local.dlx.routing.key
|
dead-letter-routing-key: local.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -369,3 +369,5 @@ rabbitmq:
|
|||||||
dead-letter-exchange: prod-dlx-exchange
|
dead-letter-exchange: prod-dlx-exchange
|
||||||
dead-letter-queue: prod-dlx-queue
|
dead-letter-queue: prod-dlx-queue
|
||||||
dead-letter-routing-key: prod.dlx.routing.key
|
dead-letter-routing-key: prod.dlx.routing.key
|
||||||
|
cad:
|
||||||
|
url: http://192.168.110.186:8911
|
||||||
|
|||||||
@ -317,6 +317,8 @@ springdoc:
|
|||||||
packages-to-scan: org.dromara.other
|
packages-to-scan: org.dromara.other
|
||||||
- group: 34.机械模块
|
- group: 34.机械模块
|
||||||
packages-to-scan: org.dromara.mechanical
|
packages-to-scan: org.dromara.mechanical
|
||||||
|
- group: 35.施工模块
|
||||||
|
packages-to-scan: org.dromara.build
|
||||||
# knife4j的增强配置,不需要增强可以不配
|
# knife4j的增强配置,不需要增强可以不配
|
||||||
knife4j:
|
knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -12,13 +12,10 @@ import org.dromara.common.core.service.UserService;
|
|||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.domain.GeoPoint;
|
import org.dromara.common.domain.GeoPoint;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
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.common.utils.JSTUtil;
|
|
||||||
import org.dromara.gps.domain.GpsEquipmentSon;
|
import org.dromara.gps.domain.GpsEquipmentSon;
|
||||||
import org.dromara.gps.mapper.GpsEquipmentSonMapper;
|
import org.dromara.gps.mapper.GpsEquipmentSonMapper;
|
||||||
import org.dromara.gps.service.IGpsEquipmentSonService;
|
|
||||||
import org.dromara.project.domain.BusProjectPunchrange;
|
import org.dromara.project.domain.BusProjectPunchrange;
|
||||||
import org.dromara.project.domain.BusUserProjectRelevancy;
|
|
||||||
import org.dromara.project.mapper.BusUserProjectRelevancyMapper;
|
import org.dromara.project.mapper.BusUserProjectRelevancyMapper;
|
||||||
import org.dromara.project.service.IBusProjectPunchrangeService;
|
import org.dromara.project.service.IBusProjectPunchrangeService;
|
||||||
import org.dromara.quality.domain.QltQualityInspection;
|
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.domain.SysUserRole;
|
||||||
import org.dromara.system.mapper.SysRoleMapper;
|
import org.dromara.system.mapper.SysRoleMapper;
|
||||||
import org.dromara.system.mapper.SysUserRoleMapper;
|
import org.dromara.system.mapper.SysUserRoleMapper;
|
||||||
import org.dromara.system.service.ISysRoleService;
|
|
||||||
import org.dromara.system.service.ISysUserService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -153,7 +148,7 @@ public class DpzaglServiceImpl implements DpzaglService {
|
|||||||
dpznglAqyVo.setUserName(userService.selectNicknameByIds(dpznglAqyVo.getUserId().toString()));
|
dpznglAqyVo.setUserName(userService.selectNicknameByIds(dpznglAqyVo.getUserId().toString()));
|
||||||
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
||||||
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
||||||
List<GeoPoint> matchingRange = JSTUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates);
|
List<GeoPoint> matchingRange = JtsUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates);
|
||||||
if (matchingRange != null && matchingRange.size() > 0){
|
if (matchingRange != null && matchingRange.size() > 0){
|
||||||
dpznglAqyVo.setSfzg(DpEnum.RYZT_ZG.getTypeValue());
|
dpznglAqyVo.setSfzg(DpEnum.RYZT_ZG.getTypeValue());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询箱变列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudBoxChangeVo> 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<BudBoxChangeVo> list = budBoxChangeService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "箱变", BudBoxChangeVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取箱变详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:boxChange:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudBoxChangeVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budBoxChangeService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudDesignDrawingVo> list(BudDesignDrawingBo bo, PageQuery pageQuery) {
|
||||||
|
return budDesignDrawingService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工设计图详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudDesignDrawingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budDesignDrawingService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图层列表
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/getLayerList/{id}")
|
||||||
|
public R<List<CadLayerListVo>> getLayerList(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(budDesignDrawingService.getLayerList(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 CAD 图层信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:query")
|
||||||
|
@GetMapping("/getCadInfo")
|
||||||
|
public R<String> getCadInfo(Long id, String layerName) {
|
||||||
|
return R.ok("操作成功", budDesignDrawingService.getDateByLayerName(id, layerName));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的建筑列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:list")
|
||||||
|
@GetMapping("/buildList")
|
||||||
|
public R<List<BudDesignDrawingByBuildVo>> queryBuildList(BudDesignDrawingQueryBuildReq req) {
|
||||||
|
return R.ok(budDesignDrawingService.queryBuildList(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增施工设计图
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:add")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> 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<Void> addBuildByLayer(@RequestBody @Validated BudCreateByLayerReq req) {
|
||||||
|
return toAjax(budDesignDrawingService.insertByLayers(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改施工设计图
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:designDrawing:edit")
|
||||||
|
@Log(title = "施工设计图", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budDesignDrawingService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询逆变器列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudInverterVo> 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<BudInverterVo> list = budInverterService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "逆变器", BudInverterVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取逆变器详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:inverter:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudInverterVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budInverterService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudMatrixVo> 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<BudMatrixVo> list = budMatrixService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "方阵", BudMatrixVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取方阵详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:matrix:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudMatrixVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budMatrixService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板桩点列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudPillarPointVo> 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<BudPillarPointVo> list = budPillarPointService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板桩点", BudPillarPointVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板桩点详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:pillarPoint:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudPillarPointVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budPillarPointService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudRedLineVo> 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<BudRedLineVo> list = budRedLineService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "红线", BudRedLineVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取红线详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:redLine:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudRedLineVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budRedLineService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudSolarPanelVo> 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<BudSolarPanelVo> list = budSolarPanelService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板", BudSolarPanelVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:solarPanel:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudSolarPanelVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budSolarPanelService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板立柱列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudStandColumnVo> 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<BudStandColumnVo> list = budStandColumnService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板立柱", BudStandColumnVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板立柱详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:standColumn:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudStandColumnVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budStandColumnService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<List<BudMatrixVo>> listMatrixByProjectId(BudMatrixBo bo) {
|
||||||
|
return R.ok(budMatrixService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板支架列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BudSupportFrameVo> 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<BudSupportFrameVo> list = budSupportFrameService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "光伏板支架", BudSupportFrameVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取光伏板支架详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("build:supportFrame:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BudSupportFrameVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(budSupportFrameService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<String> locationLayers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private List<String> nameLayers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计图 id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "设计图 id 不能为空")
|
||||||
|
private Long designDrawingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类型不能为空")
|
||||||
|
private String type;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudFeature> features;
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<Object> coordinates;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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<BudBoxChange, BudBoxChangeVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudDesignDrawing, BudDesignDrawingVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudInverter, BudInverterVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudMatrix, BudMatrixVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudPillarPoint, BudPillarPointVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudRedLine, BudRedLineVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudSolarPanel, BudSolarPanelVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudStandColumn, BudStandColumnVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudSupportFrame, BudSupportFrameVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<BudBoxChange> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询箱变
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 箱变
|
||||||
|
*/
|
||||||
|
BudBoxChangeVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询箱变列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 箱变分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudBoxChangeVo> queryPageList(BudBoxChangeBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的箱变列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 箱变列表
|
||||||
|
*/
|
||||||
|
List<BudBoxChangeVo> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改箱变
|
||||||
|
*
|
||||||
|
* @param bo 箱变
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BudBoxChangeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除箱变信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudDesignDrawing> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工设计图
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 施工设计图
|
||||||
|
*/
|
||||||
|
BudDesignDrawingVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询施工设计图列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 施工设计图分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudDesignDrawingVo> queryPageList(BudDesignDrawingBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工设计图列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 施工设计图列表
|
||||||
|
*/
|
||||||
|
List<BudDesignDrawingVo> queryList(BudDesignDrawingBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 cad 文件图层列表
|
||||||
|
*
|
||||||
|
* @param id 主键 id
|
||||||
|
* @return cad 文件图层列表
|
||||||
|
*/
|
||||||
|
List<CadLayerListVo> getLayerList(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据图层名称导出数据
|
||||||
|
*
|
||||||
|
* @param id 主键 id
|
||||||
|
* @param layerName cad 文件图层名称
|
||||||
|
* @return 数据地址
|
||||||
|
*/
|
||||||
|
String getDateByLayerName(Long id, String layerName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询施工设计图列表
|
||||||
|
*
|
||||||
|
* @param req 查询条件
|
||||||
|
* @return 施工设计图列表
|
||||||
|
*/
|
||||||
|
List<BudDesignDrawingByBuildVo> 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<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudInverter> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询逆变器
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 逆变器
|
||||||
|
*/
|
||||||
|
BudInverterVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询逆变器列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 逆变器分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudInverterVo> queryPageList(BudInverterBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的逆变器列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 逆变器列表
|
||||||
|
*/
|
||||||
|
List<BudInverterVo> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改逆变器
|
||||||
|
*
|
||||||
|
* @param bo 逆变器
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BudInverterBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除逆变器信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudMatrix> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询方阵
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 方阵
|
||||||
|
*/
|
||||||
|
BudMatrixVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询方阵列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 方阵分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudMatrixVo> queryPageList(BudMatrixBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的方阵列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 方阵列表
|
||||||
|
*/
|
||||||
|
List<BudMatrixVo> queryList(BudMatrixBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目 ID 查询方阵列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目 ID
|
||||||
|
* @return 方阵列表
|
||||||
|
*/
|
||||||
|
List<BudMatrix> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除方阵信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据坐标获取符合的方阵
|
||||||
|
*
|
||||||
|
* @param matrixList 方阵集合
|
||||||
|
* @param coordinates 坐标
|
||||||
|
* @return 符合的方阵
|
||||||
|
*/
|
||||||
|
BudMatrix getMatrixIdByCoordinates(List<BudMatrix> matrixList, List<Double> coordinates);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据二维坐标获取符合的方阵
|
||||||
|
*
|
||||||
|
* @param matrixList 方阵集合
|
||||||
|
* @param coordinates 坐标
|
||||||
|
* @return 符合的方阵
|
||||||
|
*/
|
||||||
|
BudMatrix getMatrixIdBy2Coordinates(List<BudMatrix> matrixList, List<List<Double>> coordinates);
|
||||||
|
}
|
||||||
@ -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<BudPillarPoint>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板桩点
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板桩点
|
||||||
|
*/
|
||||||
|
BudPillarPointVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板桩点列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板桩点分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudPillarPointVo> queryPageList(BudPillarPointBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板桩点列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板桩点列表
|
||||||
|
*/
|
||||||
|
List<BudPillarPointVo> 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<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudRedLine> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询红线
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 红线
|
||||||
|
*/
|
||||||
|
BudRedLineVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询红线列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 红线分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudRedLineVo> queryPageList(BudRedLineBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的红线列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 红线列表
|
||||||
|
*/
|
||||||
|
List<BudRedLineVo> 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<BudFeature> locationFeatures);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改红线
|
||||||
|
*
|
||||||
|
* @param bo 红线
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BudRedLineBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除红线信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudFeature> locationFeatures);
|
||||||
|
}
|
||||||
@ -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<BudSolarPanel> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板
|
||||||
|
*/
|
||||||
|
BudSolarPanelVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudSolarPanelVo> queryPageList(BudSolarPanelBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板列表
|
||||||
|
*/
|
||||||
|
List<BudSolarPanelVo> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改光伏板
|
||||||
|
*
|
||||||
|
* @param bo 光伏板
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BudSolarPanelBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除光伏板信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudStandColumn>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板立柱
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板立柱
|
||||||
|
*/
|
||||||
|
BudStandColumnVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板立柱列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板立柱分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudStandColumnVo> queryPageList(BudStandColumnBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板立柱列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板立柱列表
|
||||||
|
*/
|
||||||
|
List<BudStandColumnVo> 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<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudSupportFrame>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板支架
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板支架
|
||||||
|
*/
|
||||||
|
BudSupportFrameVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板支架列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板支架分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BudSupportFrameVo> queryPageList(BudSupportFrameBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板支架列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板支架列表
|
||||||
|
*/
|
||||||
|
List<BudSupportFrameVo> 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<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -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<BudBoxChangeMapper, BudBoxChange>
|
||||||
|
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<BudBoxChangeVo> queryPageList(BudBoxChangeBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudBoxChange> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudBoxChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的箱变列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 箱变列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudBoxChangeVo> queryList(BudBoxChangeBo bo) {
|
||||||
|
LambdaQueryWrapper<BudBoxChange> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudBoxChange> buildQueryWrapper(BudBoxChangeBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudBoxChange> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures) {
|
||||||
|
if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) {
|
||||||
|
throw new ServiceException("请选择名称图层和位置图层");
|
||||||
|
}
|
||||||
|
// 获取当前项目的方阵
|
||||||
|
List<BudMatrix> matrixList = budMatrixService.queryListByProjectId(projectId);
|
||||||
|
if (CollUtil.isEmpty(matrixList)) {
|
||||||
|
throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息");
|
||||||
|
}
|
||||||
|
List<BudBoxChange> boxChangeList = new ArrayList<>();
|
||||||
|
for (BudFeature locationFeature : locationFeatures) {
|
||||||
|
BudGeometry geometry = locationFeature.getGeometry();
|
||||||
|
List<Object> coordinatesObj = geometry.getCoordinates();
|
||||||
|
if (CollUtil.isEmpty(coordinatesObj)) {
|
||||||
|
log.warn("坐标数据为空");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 处理所有点位置数据
|
||||||
|
List<Double> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudDesignDrawingMapper, BudDesignDrawing>
|
||||||
|
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<BudDesignDrawingVo> queryPageList(BudDesignDrawingBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudDesignDrawing> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudDesignDrawingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的施工设计图列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 施工设计图列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudDesignDrawingVo> queryList(BudDesignDrawingBo bo) {
|
||||||
|
LambdaQueryWrapper<BudDesignDrawing> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 cad 文件图层列表
|
||||||
|
*
|
||||||
|
* @param id 主键 id
|
||||||
|
* @return cad 文件图层列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CadLayerListVo> 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<BudDesignDrawingByBuildVo> queryBuildList(BudDesignDrawingQueryBuildReq req) {
|
||||||
|
String buildType = req.getBuildType();
|
||||||
|
Long projectId = req.getProjectId();
|
||||||
|
Long matrixId = req.getMatrixId();
|
||||||
|
BudDesignType value = BudDesignType.getEnumByValue(buildType);
|
||||||
|
List<BudDesignDrawingByBuildVo> list;
|
||||||
|
switch (value) {
|
||||||
|
// 方阵
|
||||||
|
case SQUARE_MATRIX -> {
|
||||||
|
List<BudMatrix> 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<BudSolarPanel> 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<BudInverter> 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<BudBoxChange> 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<BudRedLine> 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<BudPillarPoint> 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<BudStandColumn> 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<BudSupportFrame> 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<BudDesignDrawing> buildQueryWrapper(BudDesignDrawingBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudDesignDrawing> 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<String> locationLayers = req.getLocationLayers();
|
||||||
|
List<String> nameLayers = req.getNameLayers();
|
||||||
|
List<String> 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<BudFeature> 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<BudFeature> locationFeatures = allFeatures.stream()
|
||||||
|
.filter(item -> locationLayers.contains(item.getProperties().getLayer_name()))
|
||||||
|
.toList();
|
||||||
|
// 获取名称信息
|
||||||
|
List<BudFeature> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudInverterMapper, BudInverter>
|
||||||
|
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<BudInverterVo> queryPageList(BudInverterBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudInverter> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudInverterVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的逆变器列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 逆变器列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudInverterVo> queryList(BudInverterBo bo) {
|
||||||
|
LambdaQueryWrapper<BudInverter> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudInverter> buildQueryWrapper(BudInverterBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudInverter> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures) {
|
||||||
|
if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) {
|
||||||
|
throw new ServiceException("请选择名称图层和位置图层");
|
||||||
|
}
|
||||||
|
// 获取当前项目的方阵
|
||||||
|
List<BudMatrix> matrixList = budMatrixService.queryListByProjectId(projectId);
|
||||||
|
if (CollUtil.isEmpty(matrixList)) {
|
||||||
|
throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息");
|
||||||
|
}
|
||||||
|
List<BudInverter> inverterList = new ArrayList<>();
|
||||||
|
for (BudFeature locationFeature : locationFeatures) {
|
||||||
|
BudGeometry geometry = locationFeature.getGeometry();
|
||||||
|
List<Object> coordinatesObj = geometry.getCoordinates();
|
||||||
|
if (CollUtil.isEmpty(coordinatesObj)) {
|
||||||
|
log.warn("坐标数据为空");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 处理所有点位置数据
|
||||||
|
List<Double> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudMatrixMapper, BudMatrix>
|
||||||
|
implements IBudMatrixService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询方阵
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 方阵
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BudMatrixVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询方阵列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 方阵分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BudMatrixVo> queryPageList(BudMatrixBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudMatrix> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudMatrixVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的方阵列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 方阵列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudMatrixVo> queryList(BudMatrixBo bo) {
|
||||||
|
LambdaQueryWrapper<BudMatrix> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据项目 ID 查询方阵列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目 ID
|
||||||
|
* @return 方阵列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudMatrix> queryListByProjectId(Long projectId) {
|
||||||
|
return this.lambdaQuery()
|
||||||
|
.eq(BudMatrix::getProjectId, projectId)
|
||||||
|
.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudMatrix> buildQueryWrapper(BudMatrixBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudMatrix> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures) {
|
||||||
|
if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) {
|
||||||
|
throw new RuntimeException("请选择名称图层和位置图层");
|
||||||
|
}
|
||||||
|
List<BudMatrix> matrixList = new ArrayList<>();
|
||||||
|
// 遍历位置信息
|
||||||
|
for (BudFeature feature : locationFeatures) {
|
||||||
|
BudMatrix matrix = new BudMatrix();
|
||||||
|
matrix.setProjectId(projectId);
|
||||||
|
BudGeometry geometry = feature.getGeometry();
|
||||||
|
// 获取坐标信息
|
||||||
|
List<List<Double>> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据坐标获取符合的方阵
|
||||||
|
*
|
||||||
|
* @param matrixList 方阵集合
|
||||||
|
* @param coordinates 坐标
|
||||||
|
* @return 符合的方阵
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BudMatrix getMatrixIdByCoordinates(List<BudMatrix> matrixList, List<Double> coordinates) {
|
||||||
|
// 判断在哪个方阵里
|
||||||
|
BudMatrix matchMatrix = null;
|
||||||
|
for (BudMatrix matrix : matrixList) {
|
||||||
|
String positions = matrix.getPositions();
|
||||||
|
List<List<Double>> positionList = new ArrayList<>();
|
||||||
|
List<String> 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<BudMatrix> matrixList, List<List<Double>> coordinates) {
|
||||||
|
BudMatrix matchMatrix = null;
|
||||||
|
for (BudMatrix matrix : matrixList) {
|
||||||
|
String positions = matrix.getPositions();
|
||||||
|
List<List<Double>> positionList = new ArrayList<>();
|
||||||
|
List<String> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudPillarPointMapper, BudPillarPoint>
|
||||||
|
implements IBudPillarPointService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板桩点
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板桩点
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BudPillarPointVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板桩点列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板桩点分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BudPillarPointVo> queryPageList(BudPillarPointBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudPillarPoint> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudPillarPointVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板桩点列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板桩点列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudPillarPointVo> queryList(BudPillarPointBo bo) {
|
||||||
|
LambdaQueryWrapper<BudPillarPoint> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudPillarPoint> buildQueryWrapper(BudPillarPointBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudPillarPoint> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudRedLineMapper, BudRedLine>
|
||||||
|
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<BudRedLineVo> queryPageList(BudRedLineBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudRedLine> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudRedLineVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的红线列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 红线列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudRedLineVo> queryList(BudRedLineBo bo) {
|
||||||
|
LambdaQueryWrapper<BudRedLine> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudRedLine> buildQueryWrapper(BudRedLineBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudRedLine> 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<BudFeature> locationFeatures) {
|
||||||
|
// 获取项目信息
|
||||||
|
BusProject project = projectService.getById(projectId);
|
||||||
|
if (project == null) {
|
||||||
|
throw new ServiceException("所选项目不存在");
|
||||||
|
}
|
||||||
|
List<BudRedLine> 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<List<Double>> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudFeature> locationFeatures) {
|
||||||
|
// 查询项目下光伏板
|
||||||
|
List<BudSolarPanel> solarPanelList = budSolarPanelService.lambdaQuery()
|
||||||
|
.eq(BudSolarPanel::getProjectId, projectId)
|
||||||
|
.list();
|
||||||
|
if (CollUtil.isEmpty(solarPanelList)) {
|
||||||
|
throw new ServiceException("项目下无光伏板信息,请先创建光伏板信息后再添加桩点、立柱、支架信息");
|
||||||
|
}
|
||||||
|
Map<String, BudSolarPanel> solarPanelNameMap = solarPanelList.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
BudSolarPanel::getName,
|
||||||
|
Function.identity(),
|
||||||
|
(existing, replacement) -> existing // 如果有重复,保留第一个
|
||||||
|
));
|
||||||
|
// 处理所有点位置数据
|
||||||
|
List<List<Double>> pointPositionList = locationFeatures.stream()
|
||||||
|
.map(feature -> {
|
||||||
|
String type = feature.getGeometry().getType();
|
||||||
|
List<Object> coordinates = feature.getGeometry().getCoordinates();
|
||||||
|
if (type.equalsIgnoreCase("Point")) {
|
||||||
|
return JtsUtil.toDoubleList(coordinates);
|
||||||
|
} else {
|
||||||
|
return JtsPointMatcher.polygonCentroid(JtsUtil.castToDoubleList(coordinates));
|
||||||
|
}
|
||||||
|
}).toList();
|
||||||
|
// 桩点
|
||||||
|
List<BudPillarPoint> pillarPointList = new ArrayList<>();
|
||||||
|
// 立柱
|
||||||
|
List<BudStandColumn> standColumnList = new ArrayList<>();
|
||||||
|
// 支架
|
||||||
|
List<BudSupportFrame> supportFrameList = new ArrayList<>();
|
||||||
|
// 批量处理所有点位置数据
|
||||||
|
for (Map.Entry<String, BudSolarPanel> entry : solarPanelNameMap.entrySet()) {
|
||||||
|
BudSolarPanel value = entry.getValue();
|
||||||
|
List<List<Double>> positionList = JSONUtil.toList(value.getPositions(), String.class)
|
||||||
|
.stream().map(s -> JSONUtil.toList(s, Double.class)).collect(Collectors.toList());
|
||||||
|
List<List<Double>> pointInPlaneList = JtsUtil.getPointInPlaneList(positionList, pointPositionList);
|
||||||
|
if (CollUtil.isNotEmpty(pointInPlaneList)) {
|
||||||
|
int i = 1;
|
||||||
|
for (List<Double> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudSolarPanelMapper, BudSolarPanel>
|
||||||
|
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<BudSolarPanelVo> queryPageList(BudSolarPanelBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudSolarPanel> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudSolarPanelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudSolarPanelVo> queryList(BudSolarPanelBo bo) {
|
||||||
|
LambdaQueryWrapper<BudSolarPanel> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudSolarPanel> buildQueryWrapper(BudSolarPanelBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudSolarPanel> 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<BudFeature> nameFeatures, List<BudFeature> locationFeatures) {
|
||||||
|
if (CollUtil.isEmpty(nameFeatures) || CollUtil.isEmpty(locationFeatures)) {
|
||||||
|
throw new ServiceException("请选择名称图层和位置图层");
|
||||||
|
}
|
||||||
|
List<BudSolarPanel> solarPanelList = new ArrayList<>();
|
||||||
|
// 获取当前项目的方阵
|
||||||
|
List<BudMatrix> 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<List<Double>> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudStandColumnMapper, BudStandColumn>
|
||||||
|
implements IBudStandColumnService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板立柱
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板立柱
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BudStandColumnVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板立柱列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板立柱分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BudStandColumnVo> queryPageList(BudStandColumnBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudStandColumn> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudStandColumnVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板立柱列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板立柱列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudStandColumnVo> queryList(BudStandColumnBo bo) {
|
||||||
|
LambdaQueryWrapper<BudStandColumn> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudStandColumn> buildQueryWrapper(BudStandColumnBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudStandColumn> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BudSupportFrameMapper, BudSupportFrame>
|
||||||
|
implements IBudSupportFrameService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询光伏板支架
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 光伏板支架
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BudSupportFrameVo queryById(Long id) {
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询光伏板支架列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 光伏板支架分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BudSupportFrameVo> queryPageList(BudSupportFrameBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BudSupportFrame> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BudSupportFrameVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的光伏板支架列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 光伏板支架列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BudSupportFrameVo> queryList(BudSupportFrameBo bo) {
|
||||||
|
LambdaQueryWrapper<BudSupportFrame> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BudSupportFrame> buildQueryWrapper(BudSupportFrameBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BudSupportFrame> 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<Long> ids, Boolean isValid) {
|
||||||
|
if (isValid) {
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +1,12 @@
|
|||||||
package org.dromara.common.utils;
|
package org.dromara.common.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
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.constant.GeoJsonConstant;
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
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.FacPhotovoltaicPanel;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane;
|
import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
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.facility.domain.dto.geojson.FacGeometryByPoint;
|
||||||
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
||||||
import org.locationtech.jts.geom.*;
|
import org.locationtech.jts.geom.*;
|
||||||
import org.locationtech.jts.index.strtree.STRtree;
|
import org.locationtech.jts.index.strtree.STRtree;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025/4/24 11:48
|
* @date 2025/4/24 11:48
|
||||||
*/
|
*/
|
||||||
public class JSTUtil {
|
public class JtsUtil {
|
||||||
|
|
||||||
private static final GeometryFactory geometryFactory = new GeometryFactory();
|
private static final GeometryFactory geometryFactory = new GeometryFactory();
|
||||||
|
|
||||||
@ -61,6 +60,41 @@ public class JSTUtil {
|
|||||||
return null; // 如果没找到合适的点
|
return null; // 如果没找到合适的点
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最近点的名称
|
||||||
|
*
|
||||||
|
* @param target 目标点
|
||||||
|
* @param nameGeoJson 点对象列表
|
||||||
|
* @return 最近点的名称
|
||||||
|
*/
|
||||||
|
public static String findNearestTextByPoint(List<Double> target, List<BudFeature> 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<Object> coordsObj = geometry.getCoordinates();
|
||||||
|
if (CollUtil.isEmpty(coordsObj)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Double> 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 二维坐标
|
* @return 二维坐标
|
||||||
*/
|
*/
|
||||||
public static List<List<Double>> getTwoDimensionalCoordinates(FacGeometry geometry) {
|
public static List<List<Double>> getTwoDimensionalCoordinates(String type, List<Object> coordinates) {
|
||||||
String type = geometry.getType();
|
|
||||||
List<Object> coordinates = geometry.getCoordinates();
|
|
||||||
return switch (type) {
|
return switch (type) {
|
||||||
case GeoJsonConstant.POINT -> throw new ServiceException("点位无法创建方阵", HttpStatus.BAD_REQUEST);
|
case GeoJsonConstant.POINT -> throw new ServiceException("点位无法创建方阵", HttpStatus.BAD_REQUEST);
|
||||||
case GeoJsonConstant.LINE -> coordinates.stream()
|
case GeoJsonConstant.LINE -> coordinates.stream()
|
||||||
@ -234,6 +267,73 @@ public class JSTUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 匹配最近的点,获取该点的名称
|
||||||
|
*
|
||||||
|
* @param polygon 平面
|
||||||
|
* @param points 点列表集合
|
||||||
|
* @return 最近点的名称
|
||||||
|
*/
|
||||||
|
public static String findNearestPointName(List<List<Double>> polygon, List<BudFeature> points) {
|
||||||
|
if (CollUtil.isEmpty(polygon) || polygon.size() < 3 || CollUtil.isEmpty(points)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 1. 构建 Polygon
|
||||||
|
List<Coordinate> 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<Coordinate, BudFeature> coordToFeatureMap = new HashMap<>();
|
||||||
|
for (BudFeature feature : points) {
|
||||||
|
List<Double> pointList;
|
||||||
|
List<Object> 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<Point> 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;
|
return nearestPolygon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 匹配最近的面,获取该面的信息
|
||||||
|
*
|
||||||
|
* @param pointFeature 点位
|
||||||
|
* @param polygons 平面列表
|
||||||
|
* @return 最近面的信息
|
||||||
|
*/
|
||||||
|
public static BudFeature findNearestOrContainingPolygon(
|
||||||
|
BudFeature pointFeature,
|
||||||
|
List<BudFeature> polygons
|
||||||
|
) {
|
||||||
|
if (pointFeature == null || polygons == null || polygons.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<Object> coordsObj = pointFeature.getGeometry().getCoordinates();
|
||||||
|
if (CollUtil.isEmpty(coordsObj) || coordsObj.size() != 2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<Double> 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<Object> polyCoordsObj = polygonFeature.getGeometry().getCoordinates();
|
||||||
|
List<List<Double>> 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)
|
* 判断一个点是否在多个区域中,返回第一个匹配区域的点集合(否则 null)
|
||||||
*
|
*
|
||||||
@ -394,6 +542,47 @@ public class JSTUtil {
|
|||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将原始数据转换为List<List<Double>>
|
||||||
|
*
|
||||||
|
* @param rawList 原始数据
|
||||||
|
* @return 转换后的数据
|
||||||
|
*/
|
||||||
|
public static List<List<Double>> castToDoubleList(List<?> rawList) {
|
||||||
|
List<List<Double>> result = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Object item : rawList) {
|
||||||
|
if (item instanceof List<?> innerList) {
|
||||||
|
List<Double> point = new ArrayList<>();
|
||||||
|
for (Object value : innerList) {
|
||||||
|
if (value instanceof Number num) {
|
||||||
|
point.add(num.doubleValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.add(point);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将原始数据转换为 List<Double>
|
||||||
|
*
|
||||||
|
* @param list 原始数据
|
||||||
|
* @return 转换后的数据
|
||||||
|
*/
|
||||||
|
public static List<Double> toDoubleList(List<Object> 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) {
|
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}]";
|
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}]";
|
||||||
|
|
||||||
@ -12,8 +12,7 @@ import org.dromara.common.core.utils.ObjectUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.utils.JtsUtil;
|
||||||
import org.dromara.common.utils.JSTUtil;
|
|
||||||
import org.dromara.facility.domain.FacBoxTransformer;
|
import org.dromara.facility.domain.FacBoxTransformer;
|
||||||
import org.dromara.facility.domain.FacMatrix;
|
import org.dromara.facility.domain.FacMatrix;
|
||||||
import org.dromara.facility.domain.dto.boxtransformer.FacBoxTransformerCreateByGeoJsonReq;
|
import org.dromara.facility.domain.dto.boxtransformer.FacBoxTransformerCreateByGeoJsonReq;
|
||||||
@ -192,7 +191,7 @@ public class FacBoxTransformerServiceImpl extends ServiceImpl<FacBoxTransformerM
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 获取箱变名称
|
// 获取箱变名称
|
||||||
String name = JSTUtil.findNearestText(coordinates, nameGeoJson);
|
String name = JtsUtil.findNearestText(coordinates, nameGeoJson);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,7 @@ import org.dromara.common.core.utils.ObjectUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.utils.JtsUtil;
|
||||||
import org.dromara.common.utils.JSTUtil;
|
|
||||||
import org.dromara.facility.domain.FacInverter;
|
import org.dromara.facility.domain.FacInverter;
|
||||||
import org.dromara.facility.domain.FacMatrix;
|
import org.dromara.facility.domain.FacMatrix;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
||||||
@ -192,7 +191,7 @@ public class FacInverterServiceImpl extends ServiceImpl<FacInverterMapper, FacIn
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 获取逆变器名称
|
// 获取逆变器名称
|
||||||
String name = JSTUtil.findNearestText(coordinates, nameGeoJson);
|
String name = JtsUtil.findNearestText(coordinates, nameGeoJson);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.dromara.common.core.utils.ObjectUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.utils.JSTUtil;
|
import org.dromara.common.utils.JtsUtil;
|
||||||
import org.dromara.facility.constant.FacRedisKeyConstant;
|
import org.dromara.facility.constant.FacRedisKeyConstant;
|
||||||
import org.dromara.facility.domain.*;
|
import org.dromara.facility.domain.*;
|
||||||
import org.dromara.facility.domain.dto.geojson.*;
|
import org.dromara.facility.domain.dto.geojson.*;
|
||||||
@ -292,9 +292,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
matrix.setProjectId(projectId);
|
matrix.setProjectId(projectId);
|
||||||
FacGeometry geometry = feature.getGeometry();
|
FacGeometry geometry = feature.getGeometry();
|
||||||
// 获取坐标信息
|
// 获取坐标信息
|
||||||
List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry);
|
List<List<Double>> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates());
|
||||||
// 获取方阵名称
|
// 获取方阵名称
|
||||||
String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures);
|
String nameStr = JtsUtil.findNearestPointText(coordinatesList, nameFeatures);
|
||||||
if (StringUtils.isBlank(nameStr)) {
|
if (StringUtils.isBlank(nameStr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -514,7 +514,7 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
for (String s : arr) {
|
for (String s : arr) {
|
||||||
positionList.add(JSONUtil.toList(s, Double.class));
|
positionList.add(JSONUtil.toList(s, Double.class));
|
||||||
}
|
}
|
||||||
Boolean result = JSTUtil.pointIsWithInPlane(positionList, coordinates);
|
Boolean result = JtsUtil.pointIsWithInPlane(positionList, coordinates);
|
||||||
if (result) {
|
if (result) {
|
||||||
matchMatrix = matrix;
|
matchMatrix = matrix;
|
||||||
break;
|
break;
|
||||||
@ -540,12 +540,12 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
for (String s : arr) {
|
for (String s : arr) {
|
||||||
positionList.add(JSONUtil.toList(s, Double.class));
|
positionList.add(JSONUtil.toList(s, Double.class));
|
||||||
}
|
}
|
||||||
Boolean result = JSTUtil.planeIsWithInPlane(positionList, coordinates);
|
Boolean result = JtsUtil.planeIsWithInPlane(positionList, coordinates);
|
||||||
if (result) {
|
if (result) {
|
||||||
matchMatrix = matrix;
|
matchMatrix = matrix;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
Boolean areResult = JSTUtil.arePolygonsIntersecting(positionList, coordinates);
|
Boolean areResult = JtsUtil.arePolygonsIntersecting(positionList, coordinates);
|
||||||
if (areResult) {
|
if (areResult) {
|
||||||
matchMatrix = matrix;
|
matchMatrix = matrix;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import org.dromara.common.sse.config.SseProperties;
|
|||||||
import org.dromara.common.sse.dto.SeeMessageContentDto;
|
import org.dromara.common.sse.dto.SeeMessageContentDto;
|
||||||
import org.dromara.common.sse.dto.SseMessageDto;
|
import org.dromara.common.sse.dto.SseMessageDto;
|
||||||
import org.dromara.common.sse.utils.SseMessageUtils;
|
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||||
import org.dromara.common.utils.JSTUtil;
|
import org.dromara.common.utils.JtsUtil;
|
||||||
import org.dromara.common.utils.JtsPointMatcher;
|
import org.dromara.common.utils.JtsPointMatcher;
|
||||||
import org.dromara.facility.constant.FacRedisKeyConstant;
|
import org.dromara.facility.constant.FacRedisKeyConstant;
|
||||||
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
||||||
@ -333,7 +333,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
Future<?> future = executor.submit(() -> {
|
Future<?> future = executor.submit(() -> {
|
||||||
List<List<Double>> positionList = JSONUtil.toList(photovoltaicPanel.getPositions(), String.class)
|
List<List<Double>> positionList = JSONUtil.toList(photovoltaicPanel.getPositions(), String.class)
|
||||||
.stream().map(s -> JSONUtil.toList(s, Double.class)).collect(Collectors.toList());
|
.stream().map(s -> JSONUtil.toList(s, Double.class)).collect(Collectors.toList());
|
||||||
List<List<Double>> pointInPlaneList = JSTUtil.getPointInPlaneList(positionList, sharedPointList);
|
List<List<Double>> pointInPlaneList = JtsUtil.getPointInPlaneList(positionList, sharedPointList);
|
||||||
if (CollUtil.isNotEmpty(pointInPlaneList)) {
|
if (CollUtil.isNotEmpty(pointInPlaneList)) {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (List<Double> list : pointInPlaneList) {
|
for (List<Double> list : pointInPlaneList) {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.dromara.common.sse.config.SseProperties;
|
|||||||
import org.dromara.common.sse.dto.SeeMessageContentDto;
|
import org.dromara.common.sse.dto.SeeMessageContentDto;
|
||||||
import org.dromara.common.sse.dto.SseMessageDto;
|
import org.dromara.common.sse.dto.SseMessageDto;
|
||||||
import org.dromara.common.sse.utils.SseMessageUtils;
|
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.constant.FacRedisKeyConstant;
|
||||||
import org.dromara.facility.domain.FacMatrix;
|
import org.dromara.facility.domain.FacMatrix;
|
||||||
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
import org.dromara.facility.domain.FacPhotovoltaicPanel;
|
||||||
@ -322,7 +322,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
// if (!name.startsWith("G")) return Collections.emptyList();
|
// if (!name.startsWith("G")) return Collections.emptyList();
|
||||||
List<FacPhotovoltaicPanel> panelList = new ArrayList<>();
|
List<FacPhotovoltaicPanel> panelList = new ArrayList<>();
|
||||||
// ② 找到该点对应的 polygon(优先包含,否则最近)
|
// ② 找到该点对应的 polygon(优先包含,否则最近)
|
||||||
FacFeatureByPlane matchedPolygon = JSTUtil.findNearestOrContainingPolygon(nameFeature, locationFeatures);
|
FacFeatureByPlane matchedPolygon = JtsUtil.findNearestOrContainingPolygon(nameFeature, locationFeatures);
|
||||||
if (matchedPolygon == null) return Collections.emptyList();
|
if (matchedPolygon == null) return Collections.emptyList();
|
||||||
// ③ 获取 geometry 坐标
|
// ③ 获取 geometry 坐标
|
||||||
List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst();
|
List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst();
|
||||||
@ -784,7 +784,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
Set<FacPhotovoltaicPanel> finishPanelList = new HashSet<>();
|
Set<FacPhotovoltaicPanel> finishPanelList = new HashSet<>();
|
||||||
for (RecognizeConvertCoordinateResult result : coordinateList) {
|
for (RecognizeConvertCoordinateResult result : coordinateList) {
|
||||||
// 获取包含该坐标的面
|
// 获取包含该坐标的面
|
||||||
FacPhotovoltaicPanel containingPanel = JSTUtil.findContainingPanel(result, panelList);
|
FacPhotovoltaicPanel containingPanel = JtsUtil.findContainingPanel(result, panelList);
|
||||||
if (containingPanel != null) {
|
if (containingPanel != null) {
|
||||||
log.info("识别到的光伏板:{}", containingPanel.getName());
|
log.info("识别到的光伏板:{}", containingPanel.getName());
|
||||||
PgsProgressPlanDetailRecognizerVo vo = new PgsProgressPlanDetailRecognizerVo();
|
PgsProgressPlanDetailRecognizerVo vo = new PgsProgressPlanDetailRecognizerVo();
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import org.dromara.common.core.utils.MapstructUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
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.FacRedLine;
|
||||||
import org.dromara.facility.domain.bo.FacRedLineBo;
|
import org.dromara.facility.domain.bo.FacRedLineBo;
|
||||||
import org.dromara.facility.domain.dto.geojson.FacFeature;
|
import org.dromara.facility.domain.dto.geojson.FacFeature;
|
||||||
@ -178,7 +178,7 @@ public class FacRedLineServiceImpl extends ServiceImpl<FacRedLineMapper, FacRedL
|
|||||||
List<FacFeature> features = locationGeoJson.getFeatures();
|
List<FacFeature> features = locationGeoJson.getFeatures();
|
||||||
FacGeometry geometry = features.getFirst().getGeometry();
|
FacGeometry geometry = features.getFirst().getGeometry();
|
||||||
// 获取坐标信息
|
// 获取坐标信息
|
||||||
List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry);
|
List<List<Double>> coordinatesList = JtsUtil.getTwoDimensionalCoordinates(geometry.getType(), geometry.getCoordinates());
|
||||||
// 将位置信息转换为 JSON 字符串
|
// 将位置信息转换为 JSON 字符串
|
||||||
String positionStr = JSONUtil.toJsonStr(coordinatesList);
|
String positionStr = JSONUtil.toJsonStr(coordinatesList);
|
||||||
redLine.setPositions(positionStr);
|
redLine.setPositions(positionStr);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.dromara.common.core.utils.MapstructUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
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.domain.FacMatrix;
|
||||||
import org.dromara.facility.service.IFacMatrixService;
|
import org.dromara.facility.service.IFacMatrixService;
|
||||||
import org.dromara.gps.domain.GpsSafetyUserRecord;
|
import org.dromara.gps.domain.GpsSafetyUserRecord;
|
||||||
@ -190,7 +190,7 @@ public class GpsSafetyUserRecordServiceImpl extends ServiceImpl<GpsSafetyUserRec
|
|||||||
RecognizeConvertCoordinateResult coordinateResult = new RecognizeConvertCoordinateResult();
|
RecognizeConvertCoordinateResult coordinateResult = new RecognizeConvertCoordinateResult();
|
||||||
coordinateResult.setLng(longitude);
|
coordinateResult.setLng(longitude);
|
||||||
coordinateResult.setLat(latitude);
|
coordinateResult.setLat(latitude);
|
||||||
FacMatrix currentMatrix = JSTUtil.findContainingMatrix(coordinateResult, matrixList); // 命中的地理范围
|
FacMatrix currentMatrix = JtsUtil.findContainingMatrix(coordinateResult, matrixList); // 命中的地理范围
|
||||||
|
|
||||||
// 4. 查询用户当天最新轨迹记录
|
// 4. 查询用户当天最新轨迹记录
|
||||||
GpsSafetyUserRecord latestRecord = lambdaQuery()
|
GpsSafetyUserRecord latestRecord = lambdaQuery()
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
package org.dromara.manager.cadmanager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18 14:06
|
||||||
|
*/
|
||||||
|
public interface CadConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cad 文件导入 POST
|
||||||
|
*/
|
||||||
|
String IMPORT_CAD_FILE = "/api/v1/cad/import";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cad 文件列表 GET
|
||||||
|
*/
|
||||||
|
String GET_CAD_FILE_LIST = "/api/v1/cad/list";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 cad 文件图层列表 GET
|
||||||
|
*/
|
||||||
|
String GET_LAYER_LIST = "/api/v1/cad/all_layers";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据图层名称导出数据 POST
|
||||||
|
*/
|
||||||
|
String EXPORT_DATA_BY_LAYER_NAME = "/api/v1/cad/export_data_by_layername";
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package org.dromara.manager.cadmanager;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.manager.cadmanager.vo.CadLayerListVo;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-12-18 14:15
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class CadManager {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CadProperties cadProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cad 文件导入
|
||||||
|
*
|
||||||
|
* @param file cad 文件
|
||||||
|
* @param path cad 文件路径
|
||||||
|
* @param srcEPSG cad 文件源坐标系
|
||||||
|
* @param dstEPSG cad 文件目标坐标系
|
||||||
|
* @return cad 文件 id
|
||||||
|
*/
|
||||||
|
public Long importCadFile(File file, String path, String srcEPSG, String dstEPSG) {
|
||||||
|
return CadRequestUtils.importCadFile(cadProperties.getUrl(), file, path, srcEPSG, dstEPSG);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 cad 文件图层列表
|
||||||
|
*
|
||||||
|
* @param cadFileId cad 文件 id
|
||||||
|
* @return cad 文件图层列表
|
||||||
|
*/
|
||||||
|
public List<CadLayerListVo> getLayerList(Long cadFileId) {
|
||||||
|
return CadRequestUtils.getLayerList(cadProperties.getUrl(), cadFileId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据图层名称导出数据
|
||||||
|
*
|
||||||
|
* @param cadFileId cad 文件 id
|
||||||
|
* @return 数据
|
||||||
|
*/
|
||||||
|
public String getDateByLayerName(Long cadFileId, List<String> layerNames) {
|
||||||
|
return CadRequestUtils.getDateByLayerName(cadProperties.getUrl(), cadFileId, layerNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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<CadLayerListVo> 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<String> 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -1120,15 +1120,17 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
throw new ServiceException("进度类别信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("进度类别信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
String workType = progressCategory.getWorkType();
|
String workType = progressCategory.getWorkType();
|
||||||
|
if (StringUtils.isBlank(workType)) {
|
||||||
|
throw new ServiceException("当前分项工程不支持");
|
||||||
|
}
|
||||||
List<PgsProgressCategoryFacilityVo> facilityList;
|
List<PgsProgressCategoryFacilityVo> facilityList;
|
||||||
PgsProgressCategoryCoordinateVo coordinateVo = new PgsProgressCategoryCoordinateVo();
|
PgsProgressCategoryCoordinateVo coordinateVo = new PgsProgressCategoryCoordinateVo();
|
||||||
String type = workType.split("_")[0];
|
String type = workType.split("_")[0];
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_WORK_TYPE -> {
|
case PgsProgressCategoryConstant.PHOTOVOLTAIC_PANEL_WORK_TYPE -> {
|
||||||
List<FacPhotovoltaicPanel> list = photovoltaicPanelService.lambdaQuery()
|
List<FacPhotovoltaicPanel> list = photovoltaicPanelService.lambdaQuery()
|
||||||
.eq(FacPhotovoltaicPanel::getProjectId, progressCategory.getProjectId())
|
|
||||||
.eq(FacPhotovoltaicPanel::getMatrixId, progressCategory.getMatrixId())
|
.eq(FacPhotovoltaicPanel::getMatrixId, progressCategory.getMatrixId())
|
||||||
.eq(FacPhotovoltaicPanel::getProgressCategoryId, progressCategory.getId())
|
.eq(FacPhotovoltaicPanel::getProgressCategoryId, id)
|
||||||
.list();
|
.list();
|
||||||
facilityList = list.stream().map(fac -> {
|
facilityList = list.stream().map(fac -> {
|
||||||
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
||||||
@ -1145,9 +1147,8 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
}
|
}
|
||||||
case PgsProgressCategoryConstant.INVERTER_WORK_TYPE -> {
|
case PgsProgressCategoryConstant.INVERTER_WORK_TYPE -> {
|
||||||
List<FacInverter> list = inverterService.lambdaQuery()
|
List<FacInverter> list = inverterService.lambdaQuery()
|
||||||
.eq(FacInverter::getProjectId, progressCategory.getProjectId())
|
|
||||||
.eq(FacInverter::getMatrixId, progressCategory.getMatrixId())
|
.eq(FacInverter::getMatrixId, progressCategory.getMatrixId())
|
||||||
.eq(FacInverter::getProgressCategoryId, progressCategory.getId())
|
.eq(FacInverter::getProgressCategoryId, id)
|
||||||
.list();
|
.list();
|
||||||
facilityList = list.stream().map(fac -> {
|
facilityList = list.stream().map(fac -> {
|
||||||
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
||||||
@ -1164,9 +1165,62 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
|||||||
}
|
}
|
||||||
case PgsProgressCategoryConstant.BOX_TRANSFORMER_WORK_TYPE -> {
|
case PgsProgressCategoryConstant.BOX_TRANSFORMER_WORK_TYPE -> {
|
||||||
List<FacBoxTransformer> list = boxTransformerService.lambdaQuery()
|
List<FacBoxTransformer> list = boxTransformerService.lambdaQuery()
|
||||||
.eq(FacBoxTransformer::getProjectId, progressCategory.getProjectId())
|
|
||||||
.eq(FacBoxTransformer::getMatrixId, progressCategory.getMatrixId())
|
.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<FacPhotovoltaicPanelColumn> 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<FacPhotovoltaicPanelSupport> 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<FacPhotovoltaicPanelPoint> list = photovoltaicPanelPointService.lambdaQuery()
|
||||||
|
.eq(FacPhotovoltaicPanelPoint::getMatrixId, progressCategory.getMatrixId())
|
||||||
|
.eq(FacPhotovoltaicPanelPoint::getProgressCategoryId, id)
|
||||||
.list();
|
.list();
|
||||||
facilityList = list.stream().map(fac -> {
|
facilityList = list.stream().map(fac -> {
|
||||||
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
JSONArray jsonArray = JSONUtil.parseArray(fac.getPositions());
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import org.dromara.common.redis.utils.RedisUtils;
|
|||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.utils.BigDecimalUtil;
|
import org.dromara.common.utils.BigDecimalUtil;
|
||||||
import org.dromara.common.utils.IdCardEncryptorUtil;
|
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.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.SubContractor;
|
import org.dromara.contractor.domain.SubContractor;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
@ -579,7 +579,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
attendance.setLat(req.getLat());
|
attendance.setLat(req.getLat());
|
||||||
attendance.setLng(req.getLng());
|
attendance.setLng(req.getLng());
|
||||||
try {
|
try {
|
||||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
attendance.setClockLocation(JtsUtil.getLocationName(req.getLat(), req.getLng()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取打卡位置失败", e);
|
log.error("获取打卡位置失败", e);
|
||||||
}
|
}
|
||||||
@ -694,7 +694,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
attendance.setLat(req.getLat());
|
attendance.setLat(req.getLat());
|
||||||
attendance.setLng(req.getLng());
|
attendance.setLng(req.getLng());
|
||||||
try {
|
try {
|
||||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
attendance.setClockLocation(JtsUtil.getLocationName(req.getLat(), req.getLng()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取打卡位置失败", e);
|
log.error("获取打卡位置失败", e);
|
||||||
}
|
}
|
||||||
@ -830,7 +830,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
attendance.setLat(req.getLat());
|
attendance.setLat(req.getLat());
|
||||||
attendance.setLng(req.getLng());
|
attendance.setLng(req.getLng());
|
||||||
try {
|
try {
|
||||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
attendance.setClockLocation(JtsUtil.getLocationName(req.getLat(), req.getLng()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取打卡位置失败", e);
|
log.error("获取打卡位置失败", e);
|
||||||
}
|
}
|
||||||
@ -945,7 +945,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
attendance.setLat(req.getLat());
|
attendance.setLat(req.getLat());
|
||||||
attendance.setLng(req.getLng());
|
attendance.setLng(req.getLng());
|
||||||
try {
|
try {
|
||||||
attendance.setClockLocation(JSTUtil.getLocationName(req.getLat(), req.getLng()));
|
attendance.setClockLocation(JtsUtil.getLocationName(req.getLat(), req.getLng()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取打卡位置失败", e);
|
log.error("获取打卡位置失败", e);
|
||||||
}
|
}
|
||||||
@ -1131,7 +1131,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
throw new ServiceException(isConstruct ? "班组未配置考勤范围" : "项目未配置考勤范围", HttpStatus.ERROR);
|
throw new ServiceException(isConstruct ? "班组未配置考勤范围" : "项目未配置考勤范围", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<GeoPoint> matchingRange = JSTUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList);
|
List<GeoPoint> matchingRange = JtsUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList);
|
||||||
return matchingRange != null;
|
return matchingRange != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1196,7 +1196,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
if (CollUtil.isEmpty(punchRangeList)) {
|
if (CollUtil.isEmpty(punchRangeList)) {
|
||||||
throw new ServiceException(isConstruct ? "班组未配置考勤范围" : "项目未配置考勤范围", HttpStatus.ERROR);
|
throw new ServiceException(isConstruct ? "班组未配置考勤范围" : "项目未配置考勤范围", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
List<GeoPoint> matchingRange = JSTUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList);
|
List<GeoPoint> matchingRange = JtsUtil.findMatchingRange(req.getLat(), req.getLng(), punchRangeList);
|
||||||
return matchingRange != null;
|
return matchingRange != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import org.dromara.common.core.utils.SpringUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.domain.GeoPoint;
|
import org.dromara.common.domain.GeoPoint;
|
||||||
import org.dromara.common.redis.utils.RedisUtils;
|
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.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.service.impl.SubConstructionUserServiceImpl;
|
import org.dromara.contractor.service.impl.SubConstructionUserServiceImpl;
|
||||||
import org.dromara.gps.domain.bo.GpsEquipmentSonBo;
|
import org.dromara.gps.domain.bo.GpsEquipmentSonBo;
|
||||||
@ -270,7 +270,7 @@ public class RydwWebSocketServer {
|
|||||||
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
||||||
//转换范围
|
//转换范围
|
||||||
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
||||||
List<GeoPoint> matchingRange = JSTUtil.findMatchingRange(one.getLocLatitude().toString(), one.getLocLongitude().toString(), coordinates);
|
List<GeoPoint> matchingRange = JtsUtil.findMatchingRange(one.getLocLatitude().toString(), one.getLocLongitude().toString(), coordinates);
|
||||||
//如果范围外为 空
|
//如果范围外为 空
|
||||||
if (matchingRange != null && !matchingRange.isEmpty() && !isFind) {
|
if (matchingRange != null && !matchingRange.isEmpty() && !isFind) {
|
||||||
sysUserVo.setQy(busProjectPunchrange.getPunchName());
|
sysUserVo.setQy(busProjectPunchrange.getPunchName());
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.build.mapper.BudBoxChangeMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.build.mapper.BudDesignDrawingMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user