代码更新
This commit is contained in:
@ -171,27 +171,42 @@ public class ExcelReader {
|
|||||||
Map<String, TreeNode> nodeMap = new HashMap<>();
|
Map<String, TreeNode> nodeMap = new HashMap<>();
|
||||||
nodeMap.put("", root);
|
nodeMap.put("", root);
|
||||||
List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
||||||
|
Map<String, String> lastChineseNumberMap = new HashMap<>(); // 记录各级别最近的中文数字节点
|
||||||
|
|
||||||
|
// 初始化根级中文数字节点
|
||||||
|
lastChineseNumberMap.put("", "");
|
||||||
|
|
||||||
for (List<String> row : data) {
|
for (List<String> row : data) {
|
||||||
String key = row.get(0).trim();
|
String key = row.get(0).trim();
|
||||||
TreeNode node = new TreeNode(row);
|
TreeNode node = new TreeNode(row);
|
||||||
|
|
||||||
if (!key.isEmpty()) {
|
if (!key.isEmpty()) {
|
||||||
String parentKey = getParentKey(key);
|
String parentKey = getParentKey(key, lastChineseNumberMap, nonEmptyKeys);
|
||||||
|
|
||||||
|
// 更新最近的中文数字节点记录
|
||||||
|
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||||
|
String currentLevelParentKey = getParentKey(key, lastChineseNumberMap, nonEmptyKeys);
|
||||||
|
lastChineseNumberMap.put(key, key);
|
||||||
|
lastChineseNumberMap.put(parentKey + ".children", key);
|
||||||
|
}
|
||||||
|
|
||||||
TreeNode parent = nodeMap.get(parentKey);
|
TreeNode parent = nodeMap.get(parentKey);
|
||||||
|
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
parent = new TreeNode(new ArrayList<>());
|
parent = new TreeNode(new ArrayList<>());
|
||||||
nodeMap.put(parentKey, parent);
|
nodeMap.put(parentKey, parent);
|
||||||
TreeNode grandParent = nodeMap.get(getParentKey(parentKey));
|
TreeNode grandParent = nodeMap.get(getParentKey(parentKey, lastChineseNumberMap, nonEmptyKeys));
|
||||||
if (grandParent != null) {
|
if (grandParent != null) {
|
||||||
|
parent.setParent(grandParent);
|
||||||
grandParent.addChild(parent);
|
grandParent.addChild(parent);
|
||||||
} else {
|
} else {
|
||||||
// 如果没有更高级别的父节点,就挂到根节点
|
// 如果没有更高级别的父节点,就挂到根节点
|
||||||
|
parent.setParent(root);
|
||||||
root.addChild(parent);
|
root.addChild(parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node.setParent(parent);
|
||||||
parent.addChild(node);
|
parent.addChild(node);
|
||||||
nodeMap.put(key, node);
|
nodeMap.put(key, node);
|
||||||
nonEmptyKeys.add(key);
|
nonEmptyKeys.add(key);
|
||||||
@ -201,9 +216,11 @@ public class ExcelReader {
|
|||||||
String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
||||||
TreeNode parent = nodeMap.get(lastKey);
|
TreeNode parent = nodeMap.get(lastKey);
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
node.setParent(parent);
|
||||||
parent.addChild(node);
|
parent.addChild(node);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
node.setParent(root);
|
||||||
root.addChild(node);
|
root.addChild(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,6 +228,51 @@ public class ExcelReader {
|
|||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
// public static TreeNode buildTree(List<List<String>> data) {
|
||||||
|
// TreeNode root = new TreeNode(new ArrayList<>());
|
||||||
|
// Map<String, TreeNode> nodeMap = new HashMap<>();
|
||||||
|
// nodeMap.put("", root);
|
||||||
|
// List<String> nonEmptyKeys = new ArrayList<>(); // 记录非空A列值的顺序
|
||||||
|
//
|
||||||
|
// for (List<String> row : data) {
|
||||||
|
// String key = row.get(0).trim();
|
||||||
|
// TreeNode node = new TreeNode(row);
|
||||||
|
//
|
||||||
|
// if (!key.isEmpty()) {
|
||||||
|
// String parentKey = getParentKey(key);
|
||||||
|
// TreeNode parent = nodeMap.get(parentKey);
|
||||||
|
//
|
||||||
|
// if (parent == null) {
|
||||||
|
// parent = new TreeNode(new ArrayList<>());
|
||||||
|
// nodeMap.put(parentKey, parent);
|
||||||
|
// TreeNode grandParent = nodeMap.get(getParentKey(parentKey));
|
||||||
|
// if (grandParent != null) {
|
||||||
|
// grandParent.addChild(parent);
|
||||||
|
// } else {
|
||||||
|
// // 如果没有更高级别的父节点,就挂到根节点
|
||||||
|
// root.addChild(parent);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// parent.addChild(node);
|
||||||
|
// nodeMap.put(key, node);
|
||||||
|
// nonEmptyKeys.add(key);
|
||||||
|
// } else {
|
||||||
|
// // A列为空,挂到上一个非空节点下
|
||||||
|
// if (!nonEmptyKeys.isEmpty()) {
|
||||||
|
// String lastKey = nonEmptyKeys.get(nonEmptyKeys.size() - 1);
|
||||||
|
// TreeNode parent = nodeMap.get(lastKey);
|
||||||
|
// if (parent != null) {
|
||||||
|
// parent.addChild(node);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// root.addChild(node);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return root;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以可视化方式打印树形结构
|
* 以可视化方式打印树形结构
|
||||||
@ -270,7 +332,7 @@ public class ExcelReader {
|
|||||||
/**
|
/**
|
||||||
* 根据A列的值确定父节点的键
|
* 根据A列的值确定父节点的键
|
||||||
*/
|
*/
|
||||||
private static String getParentKey(String key) {
|
private static String getParentKey(String key, Map<String, String> lastChineseNumberMap, List<String> nonEmptyKeys) {
|
||||||
// 中文数字(一、二、三...)的父节点是根节点
|
// 中文数字(一、二、三...)的父节点是根节点
|
||||||
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||||
return "";
|
return "";
|
||||||
@ -282,14 +344,44 @@ public class ExcelReader {
|
|||||||
if (lastDotIndex > 0) {
|
if (lastDotIndex > 0) {
|
||||||
return key.substring(0, lastDotIndex);
|
return key.substring(0, lastDotIndex);
|
||||||
} else {
|
} else {
|
||||||
// 一级数字(如1、2)的父节点是根节点或最近的中文数字节点
|
// 一级数字(如1、2)的父节点是最近的中文数字节点
|
||||||
return "";
|
if (!nonEmptyKeys.isEmpty()) {
|
||||||
|
// 查找最近的中文数字节点作为父节点
|
||||||
|
for (int i = nonEmptyKeys.size() - 1; i >= 0; i--) {
|
||||||
|
String prevKey = nonEmptyKeys.get(i);
|
||||||
|
if (prevKey.matches(CHINESE_NUMBERS_REGEX)) {
|
||||||
|
return prevKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 如果没有找到中文数字节点,使用根节点
|
||||||
|
return lastChineseNumberMap.getOrDefault("", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其他格式默认父节点是根节点
|
// 其他格式默认父节点是根节点
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
// private static String getParentKey(String key) {
|
||||||
|
// // 中文数字(一、二、三...)的父节点是根节点
|
||||||
|
// if (key.matches(CHINESE_NUMBERS_REGEX)) {
|
||||||
|
// return "";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 数字格式(1、1.1、1.2.1等)的父节点是上一级
|
||||||
|
// if (key.matches("\\d+(\\.\\d+)*")) {
|
||||||
|
// int lastDotIndex = key.lastIndexOf('.');
|
||||||
|
// if (lastDotIndex > 0) {
|
||||||
|
// return key.substring(0, lastDotIndex);
|
||||||
|
// } else {
|
||||||
|
// // 一级数字(如1、2)的父节点是根节点或最近的中文数字节点
|
||||||
|
// return "";
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 其他格式默认父节点是根节点
|
||||||
|
// return "";
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel数据实体类,包含所有工作表数据
|
* Excel数据实体类,包含所有工作表数据
|
||||||
@ -333,13 +425,18 @@ public class ExcelReader {
|
|||||||
/**
|
/**
|
||||||
* 树形节点类
|
* 树形节点类
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* 树形节点类,增加了父节点引用
|
||||||
|
*/
|
||||||
public static class TreeNode {
|
public static class TreeNode {
|
||||||
List<String> data;
|
List<String> data;
|
||||||
List<TreeNode> children;
|
List<TreeNode> children;
|
||||||
|
TreeNode parent; // 新增:父节点引用
|
||||||
|
|
||||||
public TreeNode(List<String> data) {
|
public TreeNode(List<String> data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.children = new ArrayList<>();
|
this.children = new ArrayList<>();
|
||||||
|
this.parent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addChild(TreeNode child) {
|
public void addChild(TreeNode child) {
|
||||||
@ -353,6 +450,35 @@ public class ExcelReader {
|
|||||||
public List<TreeNode> getChildren() {
|
public List<TreeNode> getChildren() {
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TreeNode getParent() {
|
||||||
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setParent(TreeNode parent) {
|
||||||
|
this.parent = parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// public static class TreeNode {
|
||||||
|
// List<String> data;
|
||||||
|
// List<TreeNode> children;
|
||||||
|
//
|
||||||
|
// public TreeNode(List<String> data) {
|
||||||
|
// this.data = data;
|
||||||
|
// this.children = new ArrayList<>();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void addChild(TreeNode child) {
|
||||||
|
// this.children.add(child);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public List<String> getData() {
|
||||||
|
// return data;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public List<TreeNode> getChildren() {
|
||||||
|
// return children;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,9 @@ import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
|||||||
import org.dromara.cailiaoshebei.service.IBusSuppliespriceService;
|
import org.dromara.cailiaoshebei.service.IBusSuppliespriceService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
|
import org.dromara.design.domain.bo.ObtainTheListReq;
|
||||||
|
import org.dromara.design.domain.dto.ObtainTheListRes;
|
||||||
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -235,5 +238,17 @@ public class BusCailiaoshebeiController extends BaseController {
|
|||||||
return toAjax(busCailiaoshebeiService.updateByPlanBo(bo));
|
return toAjax(busCailiaoshebeiService.updateByPlanBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===============================物资-工程量清单===============================
|
||||||
|
|
||||||
|
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工程量清单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:cailiaoshebei:obtainTheList")
|
||||||
|
@GetMapping("/obtainTheList")
|
||||||
|
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
|
||||||
|
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,105 +0,0 @@
|
|||||||
package org.dromara.design.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.design.domain.vo.BusBillofquantitiesVo;
|
|
||||||
import org.dromara.design.domain.bo.BusBillofquantitiesBo;
|
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工程量清单
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
* @date 2025-08-11
|
|
||||||
*/
|
|
||||||
@Validated
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/design/billofquantities")
|
|
||||||
public class BusBillofquantitiesController extends BaseController {
|
|
||||||
|
|
||||||
private final IBusBillofquantitiesService busBillofquantitiesService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询工程量清单列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<BusBillofquantitiesVo> list(BusBillofquantitiesBo bo, PageQuery pageQuery) {
|
|
||||||
return busBillofquantitiesService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出工程量清单列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:export")
|
|
||||||
@Log(title = "工程量清单", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(BusBillofquantitiesBo bo, HttpServletResponse response) {
|
|
||||||
List<BusBillofquantitiesVo> list = busBillofquantitiesService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "工程量清单", BusBillofquantitiesVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程量清单详细信息
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:query")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public R<BusBillofquantitiesVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(busBillofquantitiesService.queryById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增工程量清单
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:add")
|
|
||||||
@Log(title = "工程量清单", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping()
|
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusBillofquantitiesBo bo) {
|
|
||||||
return toAjax(busBillofquantitiesService.insertByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改工程量清单
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:edit")
|
|
||||||
@Log(title = "工程量清单", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping()
|
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusBillofquantitiesBo bo) {
|
|
||||||
return toAjax(busBillofquantitiesService.updateByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除工程量清单
|
|
||||||
*
|
|
||||||
* @param ids 主键串
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantities:remove")
|
|
||||||
@Log(title = "工程量清单", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
||||||
@PathVariable Long[] ids) {
|
|
||||||
return toAjax(busBillofquantitiesService.deleteWithValidByIds(List.of(ids), true));
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,9 +7,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.design.domain.bo.ImportExcelFileReq;
|
import org.dromara.design.domain.bo.*;
|
||||||
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
|
|
||||||
import org.dromara.design.domain.bo.ObtainTheListReq;
|
|
||||||
import org.dromara.design.domain.dto.ObtainTheListRes;
|
import org.dromara.design.domain.dto.ObtainTheListRes;
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -24,7 +22,6 @@ import org.dromara.common.core.validate.EditGroup;
|
|||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
||||||
import org.dromara.design.domain.bo.BusBillofquantitiesVersionsBo;
|
|
||||||
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@ -43,73 +40,6 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
|
|
||||||
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
private final IBusBillofquantitiesVersionsService busBillofquantitiesVersionsService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询工程量清单版本列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:list")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo<BusBillofquantitiesVersionsVo> list(BusBillofquantitiesVersionsBo bo, PageQuery pageQuery) {
|
|
||||||
return busBillofquantitiesVersionsService.queryPageList(bo, pageQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出工程量清单版本列表
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:export")
|
|
||||||
@Log(title = "工程量清单版本", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(BusBillofquantitiesVersionsBo bo, HttpServletResponse response) {
|
|
||||||
List<BusBillofquantitiesVersionsVo> list = busBillofquantitiesVersionsService.queryList(bo);
|
|
||||||
ExcelUtil.exportExcel(list, "工程量清单版本", BusBillofquantitiesVersionsVo.class, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程量清单版本详细信息
|
|
||||||
*
|
|
||||||
* @param id 主键
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:query")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public R<BusBillofquantitiesVersionsVo> getInfo(@NotNull(message = "主键不能为空")
|
|
||||||
@PathVariable Long id) {
|
|
||||||
return R.ok(busBillofquantitiesVersionsService.queryById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增工程量清单版本
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:add")
|
|
||||||
@Log(title = "工程量清单版本", businessType = BusinessType.INSERT)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PostMapping()
|
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusBillofquantitiesVersionsBo bo) {
|
|
||||||
return toAjax(busBillofquantitiesVersionsService.insertByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改工程量清单版本
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:edit")
|
|
||||||
@Log(title = "工程量清单版本", businessType = BusinessType.UPDATE)
|
|
||||||
@RepeatSubmit()
|
|
||||||
@PutMapping()
|
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusBillofquantitiesVersionsBo bo) {
|
|
||||||
return toAjax(busBillofquantitiesVersionsService.updateByBo(bo));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除工程量清单版本
|
|
||||||
*
|
|
||||||
* @param ids 主键串
|
|
||||||
*/
|
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:remove")
|
|
||||||
@Log(title = "工程量清单版本", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
||||||
@PathVariable Long[] ids) {
|
|
||||||
return toAjax(busBillofquantitiesVersionsService.deleteWithValidByIds(List.of(ids), true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入excel
|
* 导入excel
|
||||||
*/
|
*/
|
||||||
@ -131,11 +61,87 @@ public class BusBillofquantitiesVersionsController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工程量清单
|
* 获取指定版本的sheet
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:billofquantitiesVersions:sheetList")
|
||||||
|
@GetMapping("/sheetList")
|
||||||
|
public R<List<String>> sheetList(SheetListReq bo) {
|
||||||
|
return R.ok(busBillofquantitiesVersionsService.sheetList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工程量清单列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesVersions:obtainTheList")
|
@SaCheckPermission("design:billofquantitiesVersions:obtainTheList")
|
||||||
@GetMapping("/obtainTheList")
|
@GetMapping("/obtainTheList")
|
||||||
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
|
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
|
||||||
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 查询工程量清单版本列表
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:list")
|
||||||
|
// @GetMapping("/list")
|
||||||
|
// public TableDataInfo<BusBillofquantitiesVersionsVo> list(BusBillofquantitiesVersionsBo bo, PageQuery pageQuery) {
|
||||||
|
// return busBillofquantitiesVersionsService.queryPageList(bo, pageQuery);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 导出工程量清单版本列表
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:export")
|
||||||
|
// @Log(title = "工程量清单版本", businessType = BusinessType.EXPORT)
|
||||||
|
// @PostMapping("/export")
|
||||||
|
// public void export(BusBillofquantitiesVersionsBo bo, HttpServletResponse response) {
|
||||||
|
// List<BusBillofquantitiesVersionsVo> list = busBillofquantitiesVersionsService.queryList(bo);
|
||||||
|
// ExcelUtil.exportExcel(list, "工程量清单版本", BusBillofquantitiesVersionsVo.class, response);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取工程量清单版本详细信息
|
||||||
|
// *
|
||||||
|
// * @param id 主键
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:query")
|
||||||
|
// @GetMapping("/{id}")
|
||||||
|
// public R<BusBillofquantitiesVersionsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
// @PathVariable Long id) {
|
||||||
|
// return R.ok(busBillofquantitiesVersionsService.queryById(id));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增工程量清单版本
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:add")
|
||||||
|
// @Log(title = "工程量清单版本", businessType = BusinessType.INSERT)
|
||||||
|
// @RepeatSubmit()
|
||||||
|
// @PostMapping()
|
||||||
|
// public R<Void> add(@Validated(AddGroup.class) @RequestBody BusBillofquantitiesVersionsBo bo) {
|
||||||
|
// return toAjax(busBillofquantitiesVersionsService.insertByBo(bo));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改工程量清单版本
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:edit")
|
||||||
|
// @Log(title = "工程量清单版本", businessType = BusinessType.UPDATE)
|
||||||
|
// @RepeatSubmit()
|
||||||
|
// @PutMapping()
|
||||||
|
// public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusBillofquantitiesVersionsBo bo) {
|
||||||
|
// return toAjax(busBillofquantitiesVersionsService.updateByBo(bo));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 删除工程量清单版本
|
||||||
|
// *
|
||||||
|
// * @param ids 主键串
|
||||||
|
// */
|
||||||
|
// @SaCheckPermission("design:billofquantitiesVersions:remove")
|
||||||
|
// @Log(title = "工程量清单版本", businessType = BusinessType.DELETE)
|
||||||
|
// @DeleteMapping("/{ids}")
|
||||||
|
// public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
// @PathVariable Long[] ids) {
|
||||||
|
// return toAjax(busBillofquantitiesVersionsService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.design.design.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.design.domain.vo.BusDrawingreviewVo;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewBo;
|
||||||
|
import org.dromara.design.service.IBusDrawingreviewService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/design/drawingreview")
|
||||||
|
public class BusDrawingreviewController extends BaseController {
|
||||||
|
|
||||||
|
private final IBusDrawingreviewService busDrawingreviewService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BusDrawingreviewVo> list(BusDrawingreviewBo bo, PageQuery pageQuery) {
|
||||||
|
return busDrawingreviewService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设计-图纸评审列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:export")
|
||||||
|
@Log(title = "设计-图纸评审", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BusDrawingreviewBo bo, HttpServletResponse response) {
|
||||||
|
List<BusDrawingreviewVo> list = busDrawingreviewService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "设计-图纸评审", BusDrawingreviewVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计-图纸评审详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BusDrawingreviewVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(busDrawingreviewService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:add")
|
||||||
|
@Log(title = "设计-图纸评审", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusDrawingreviewBo bo) {
|
||||||
|
return toAjax(busDrawingreviewService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:edit")
|
||||||
|
@Log(title = "设计-图纸评审", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusDrawingreviewBo bo) {
|
||||||
|
return toAjax(busDrawingreviewService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreview:remove")
|
||||||
|
@Log(title = "设计-图纸评审", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(busDrawingreviewService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.design.design.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.design.domain.vo.BusDrawingreviewReceiptsVo;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewReceiptsBo;
|
||||||
|
import org.dromara.design.service.IBusDrawingreviewReceiptsService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/design/drawingreviewReceipts")
|
||||||
|
public class BusDrawingreviewReceiptsController extends BaseController {
|
||||||
|
|
||||||
|
private final IBusDrawingreviewReceiptsService busDrawingreviewReceiptsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审验证列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BusDrawingreviewReceiptsVo> list(BusDrawingreviewReceiptsBo bo, PageQuery pageQuery) {
|
||||||
|
return busDrawingreviewReceiptsService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出设计-图纸评审验证列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:export")
|
||||||
|
@Log(title = "设计-图纸评审验证", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BusDrawingreviewReceiptsBo bo, HttpServletResponse response) {
|
||||||
|
List<BusDrawingreviewReceiptsVo> list = busDrawingreviewReceiptsService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "设计-图纸评审验证", BusDrawingreviewReceiptsVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计-图纸评审验证详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BusDrawingreviewReceiptsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(busDrawingreviewReceiptsService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审验证
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:add")
|
||||||
|
@Log(title = "设计-图纸评审验证", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusDrawingreviewReceiptsBo bo) {
|
||||||
|
return toAjax(busDrawingreviewReceiptsService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审验证
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:edit")
|
||||||
|
@Log(title = "设计-图纸评审验证", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BusDrawingreviewReceiptsBo bo) {
|
||||||
|
return toAjax(busDrawingreviewReceiptsService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("design:drawingreviewReceipts:remove")
|
||||||
|
@Log(title = "设计-图纸评审验证", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(busDrawingreviewReceiptsService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.design.design.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审对象 bus_drawingreview
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_drawingreview")
|
||||||
|
public class BusDrawingreview extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核类型
|
||||||
|
*/
|
||||||
|
private String auditType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
package org.dromara.design.design.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证对象 bus_drawingreview_receipts
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_drawingreview_receipts")
|
||||||
|
public class BusDrawingreviewReceipts extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计评审ID
|
||||||
|
*/
|
||||||
|
private Long drawingreviewId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目ID
|
||||||
|
*/
|
||||||
|
private Long subprojectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目名称
|
||||||
|
*/
|
||||||
|
private String subprojectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计阶段
|
||||||
|
*/
|
||||||
|
private String stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String professional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卷册
|
||||||
|
*/
|
||||||
|
private String volume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人
|
||||||
|
*/
|
||||||
|
private String designer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证内容
|
||||||
|
*/
|
||||||
|
private String verificationContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证意见
|
||||||
|
*/
|
||||||
|
private String verificationOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行意见
|
||||||
|
*/
|
||||||
|
private String executionOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员ID
|
||||||
|
*/
|
||||||
|
private Long proofreadingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员ID
|
||||||
|
*/
|
||||||
|
private Long auditId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员ID
|
||||||
|
*/
|
||||||
|
private Long executorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员
|
||||||
|
*/
|
||||||
|
private String proofreading;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员
|
||||||
|
*/
|
||||||
|
private String audit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审时间
|
||||||
|
*/
|
||||||
|
private Date proofreadingDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核时间
|
||||||
|
*/
|
||||||
|
private Date auditDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行时间
|
||||||
|
*/
|
||||||
|
private Date executorDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终审核状态
|
||||||
|
*/
|
||||||
|
private String finalState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package org.dromara.design.design.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.BusDrawingreview;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审业务对象 bus_drawingreview
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BusDrawingreview.class, reverseConvertGenerate = false)
|
||||||
|
public class BusDrawingreviewBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核类型
|
||||||
|
*/
|
||||||
|
private String auditType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,152 @@
|
|||||||
|
package org.dromara.design.design.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.BusDrawingreviewReceipts;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证业务对象 bus_drawingreview_receipts
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BusDrawingreviewReceipts.class, reverseConvertGenerate = false)
|
||||||
|
public class BusDrawingreviewReceiptsBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计评审ID
|
||||||
|
*/
|
||||||
|
private Long drawingreviewId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目ID
|
||||||
|
*/
|
||||||
|
private Long subprojectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目名称
|
||||||
|
*/
|
||||||
|
private String subprojectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计阶段
|
||||||
|
*/
|
||||||
|
private String stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String professional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卷册
|
||||||
|
*/
|
||||||
|
private String volume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人
|
||||||
|
*/
|
||||||
|
private String designer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证内容
|
||||||
|
*/
|
||||||
|
private String verificationContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证意见
|
||||||
|
*/
|
||||||
|
private String verificationOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行意见
|
||||||
|
*/
|
||||||
|
private String executionOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员ID
|
||||||
|
*/
|
||||||
|
private Long proofreadingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员ID
|
||||||
|
*/
|
||||||
|
private Long auditId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员ID
|
||||||
|
*/
|
||||||
|
private Long executorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员
|
||||||
|
*/
|
||||||
|
private String proofreading;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员
|
||||||
|
*/
|
||||||
|
private String audit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审时间
|
||||||
|
*/
|
||||||
|
private Date proofreadingDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核时间
|
||||||
|
*/
|
||||||
|
private Date auditDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行时间
|
||||||
|
*/
|
||||||
|
private Date executorDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终审核状态
|
||||||
|
*/
|
||||||
|
private String finalState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,184 @@
|
|||||||
|
package org.dromara.design.design.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.design.domain.BusDrawingreviewReceipts;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证视图对象 bus_drawingreview_receipts
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusDrawingreviewReceipts.class)
|
||||||
|
public class BusDrawingreviewReceiptsVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计评审ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设计评审ID")
|
||||||
|
private Long drawingreviewId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "编号")
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "子项目ID")
|
||||||
|
private Long subprojectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项目名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "子项目名称")
|
||||||
|
private String subprojectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计阶段
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设计阶段")
|
||||||
|
private String stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "专业")
|
||||||
|
private String professional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卷册
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "卷册")
|
||||||
|
private String volume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "设计人")
|
||||||
|
private String designer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证内容
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "验证内容")
|
||||||
|
private String verificationContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证意见
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "验证意见")
|
||||||
|
private String verificationOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行意见
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行意见")
|
||||||
|
private String executionOpinion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "校审人员ID")
|
||||||
|
private Long proofreadingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审核人员ID")
|
||||||
|
private Long auditId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行人员ID")
|
||||||
|
private Long executorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审人员
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "校审人员")
|
||||||
|
private String proofreading;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人员
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审核人员")
|
||||||
|
private String audit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行人员")
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校审时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "校审时间")
|
||||||
|
private Date proofreadingDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "审核时间")
|
||||||
|
private Date auditDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行时间")
|
||||||
|
private Date executorDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图纸
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "图纸")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终审核状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "最终审核状态")
|
||||||
|
private String finalState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.design.design.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.BusDrawingreview;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审视图对象 bus_drawingreview
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusDrawingreview.class)
|
||||||
|
public class BusDrawingreviewVo 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 auditType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.design.design.mapper;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.BusDrawingreview;
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
public interface BusDrawingreviewMapper extends BaseMapperPlus<BusDrawingreview, BusDrawingreviewVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.design.design.mapper;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.BusDrawingreviewReceipts;
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewReceiptsVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
public interface BusDrawingreviewReceiptsMapper extends BaseMapperPlus<BusDrawingreviewReceipts, BusDrawingreviewReceiptsVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.design.design.service;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewReceiptsVo;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewReceiptsBo;
|
||||||
|
import org.dromara.design.domain.BusDrawingreviewReceipts;
|
||||||
|
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 Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
public interface IBusDrawingreviewReceiptsService extends IService<BusDrawingreviewReceipts>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设计-图纸评审验证
|
||||||
|
*/
|
||||||
|
BusDrawingreviewReceiptsVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设计-图纸评审验证列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设计-图纸评审验证分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BusDrawingreviewReceiptsVo> queryPageList(BusDrawingreviewReceiptsBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设计-图纸评审验证列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设计-图纸评审验证列表
|
||||||
|
*/
|
||||||
|
List<BusDrawingreviewReceiptsVo> queryList(BusDrawingreviewReceiptsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审验证
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BusDrawingreviewReceiptsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审验证
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BusDrawingreviewReceiptsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除设计-图纸评审验证信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.design.design.service;
|
||||||
|
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewVo;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewBo;
|
||||||
|
import org.dromara.design.domain.BusDrawingreview;
|
||||||
|
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 Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
public interface IBusDrawingreviewService extends IService<BusDrawingreview>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设计-图纸评审
|
||||||
|
*/
|
||||||
|
BusDrawingreviewVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设计-图纸评审列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设计-图纸评审分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BusDrawingreviewVo> queryPageList(BusDrawingreviewBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设计-图纸评审列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设计-图纸评审列表
|
||||||
|
*/
|
||||||
|
List<BusDrawingreviewVo> queryList(BusDrawingreviewBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BusDrawingreviewBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BusDrawingreviewBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除设计-图纸评审信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -0,0 +1,132 @@
|
|||||||
|
package org.dromara.design.design.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewReceiptsBo;
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewReceiptsVo;
|
||||||
|
import org.dromara.design.domain.BusDrawingreviewReceipts;
|
||||||
|
import org.dromara.design.mapper.BusDrawingreviewReceiptsMapper;
|
||||||
|
import org.dromara.design.service.IBusDrawingreviewReceiptsService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审验证Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BusDrawingreviewReceiptsServiceImpl extends ServiceImpl<BusDrawingreviewReceiptsMapper, BusDrawingreviewReceipts> implements IBusDrawingreviewReceiptsService {
|
||||||
|
|
||||||
|
private final BusDrawingreviewReceiptsMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设计-图纸评审验证
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusDrawingreviewReceiptsVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设计-图纸评审验证列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设计-图纸评审验证分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusDrawingreviewReceiptsVo> queryPageList(BusDrawingreviewReceiptsBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusDrawingreviewReceipts> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BusDrawingreviewReceiptsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设计-图纸评审验证列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设计-图纸评审验证列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusDrawingreviewReceiptsVo> queryList(BusDrawingreviewReceiptsBo bo) {
|
||||||
|
LambdaQueryWrapper<BusDrawingreviewReceipts> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BusDrawingreviewReceipts> buildQueryWrapper(BusDrawingreviewReceiptsBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BusDrawingreviewReceipts> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BusDrawingreviewReceipts::getId);
|
||||||
|
lqw.eq(bo.getDrawingreviewId() != null, BusDrawingreviewReceipts::getDrawingreviewId, bo.getDrawingreviewId());
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusDrawingreviewReceipts::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(bo.getSubprojectId() != null, BusDrawingreviewReceipts::getSubprojectId, bo.getSubprojectId());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审验证
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BusDrawingreviewReceiptsBo bo) {
|
||||||
|
BusDrawingreviewReceipts add = MapstructUtils.convert(bo, BusDrawingreviewReceipts.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审验证
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审验证
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BusDrawingreviewReceiptsBo bo) {
|
||||||
|
BusDrawingreviewReceipts update = MapstructUtils.convert(bo, BusDrawingreviewReceipts.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BusDrawingreviewReceipts 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,131 @@
|
|||||||
|
package org.dromara.design.design.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.design.domain.bo.BusDrawingreviewBo;
|
||||||
|
import org.dromara.design.domain.vo.BusDrawingreviewVo;
|
||||||
|
import org.dromara.design.domain.BusDrawingreview;
|
||||||
|
import org.dromara.design.mapper.BusDrawingreviewMapper;
|
||||||
|
import org.dromara.design.service.IBusDrawingreviewService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-图纸评审Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-12
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BusDrawingreviewServiceImpl extends ServiceImpl<BusDrawingreviewMapper, BusDrawingreview> implements IBusDrawingreviewService {
|
||||||
|
|
||||||
|
private final BusDrawingreviewMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 设计-图纸评审
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusDrawingreviewVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询设计-图纸评审列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 设计-图纸评审分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusDrawingreviewVo> queryPageList(BusDrawingreviewBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusDrawingreview> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BusDrawingreviewVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的设计-图纸评审列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 设计-图纸评审列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusDrawingreviewVo> queryList(BusDrawingreviewBo bo) {
|
||||||
|
LambdaQueryWrapper<BusDrawingreview> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BusDrawingreview> buildQueryWrapper(BusDrawingreviewBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BusDrawingreview> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BusDrawingreview::getId);
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusDrawingreview::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditType()), BusDrawingreview::getAuditType, bo.getAuditType());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BusDrawingreviewBo bo) {
|
||||||
|
BusDrawingreview add = MapstructUtils.convert(bo, BusDrawingreview.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设计-图纸评审
|
||||||
|
*
|
||||||
|
* @param bo 设计-图纸评审
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BusDrawingreviewBo bo) {
|
||||||
|
BusDrawingreview update = MapstructUtils.convert(bo, BusDrawingreview.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BusDrawingreview entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除设计-图纸评审信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程量清单对象 bus_billofquantities
|
* 工程量清单对象 bus_billofquantities
|
||||||
@ -70,12 +71,17 @@ public class BusBillofquantities extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
private int quantity;
|
private BigDecimal quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.design.domain;
|
package org.dromara.design.domain;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
@ -39,5 +40,15 @@ public class BusBillofquantitiesVersions extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String versions;
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* exlce文件
|
||||||
|
*/
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册目录对象 des_volume_catalog
|
* 卷册目录对象 des_volume_catalog
|
||||||
@ -38,6 +39,16 @@ public class DesVolumeCatalog extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long designSubitemId;
|
private Long designSubitemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计子项
|
||||||
|
*/
|
||||||
|
private String designSubitem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String specialty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册号
|
* 卷册号
|
||||||
*/
|
*/
|
||||||
@ -48,6 +59,21 @@ public class DesVolumeCatalog extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate plannedCompletion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典)
|
||||||
|
*/
|
||||||
|
private String designState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +21,12 @@ public class ImportExcelFileReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 工单类型(字典)
|
* 工单类型(字典)
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "工单类型(字典)不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "工单类型(字典)不能为空")
|
||||||
private String workOrderType;
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.design.domain.bo;
|
package org.dromara.design.domain.bo;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@ -21,4 +22,10 @@ public class ObtainAllVersionNumbersReq implements Serializable {
|
|||||||
@NotBlank(message = "工单类型(字典)不能为空")
|
@NotBlank(message = "工单类型(字典)不能为空")
|
||||||
private String workOrderType;
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.design.domain.bo;
|
package org.dromara.design.domain.bo;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
@ -36,4 +37,10 @@ public class ObtainTheListReq implements Serializable {
|
|||||||
@NotBlank(message = "表名不能为空")
|
@NotBlank(message = "表名不能为空")
|
||||||
private String sheet;
|
private String sheet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package org.dromara.design.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/8/12 9:52
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SheetListReq implements Serializable {
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 工单类型(字典)
|
||||||
|
// */
|
||||||
|
// @NotBlank(message = "工单类型(字典)不能为空")
|
||||||
|
// private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "版本号不能为空")
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
}
|
@ -6,6 +6,7 @@ import lombok.experimental.Accessors;
|
|||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -37,10 +38,16 @@ public class ObtainTheListRes implements Serializable {
|
|||||||
private String sheet;
|
private String sheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父子ID
|
* 子ID
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "父子ID")
|
@ExcelProperty(value = "子ID")
|
||||||
private Long pid;
|
private String sid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "父ID")
|
||||||
|
private String pid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编号
|
* 编号
|
||||||
@ -70,7 +77,7 @@ public class ObtainTheListRes implements Serializable {
|
|||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "数量")
|
@ExcelProperty(value = "数量")
|
||||||
private Long quantity;
|
private BigDecimal quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -28,6 +29,17 @@ public class DesVolumeCatalogCreateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long designSubitemId;
|
private Long designSubitemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计子项
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "设计子项不能为空")
|
||||||
|
private String designSubitem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String specialty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册号
|
* 卷册号
|
||||||
*/
|
*/
|
||||||
@ -40,6 +52,21 @@ public class DesVolumeCatalogCreateReq implements Serializable {
|
|||||||
@NotBlank(message = "资料名称不能为空")
|
@NotBlank(message = "资料名称不能为空")
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate plannedCompletion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典)
|
||||||
|
*/
|
||||||
|
private String designState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package org.dromara.design.domain.dto.volumecatalog;
|
package org.dromara.design.domain.dto.volumecatalog;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -20,11 +22,6 @@ public class DesVolumeCatalogQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 设计子项ID
|
|
||||||
*/
|
|
||||||
private Long designSubitemId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册号
|
* 卷册号
|
||||||
*/
|
*/
|
||||||
@ -35,4 +32,6 @@ public class DesVolumeCatalogQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
@ -22,6 +23,16 @@ public class DesVolumeCatalogUpdateReq implements Serializable {
|
|||||||
@NotNull(message = "主键ID不能为空")
|
@NotNull(message = "主键ID不能为空")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计子项
|
||||||
|
*/
|
||||||
|
private String designSubitem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String specialty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册号
|
* 卷册号
|
||||||
*/
|
*/
|
||||||
@ -32,6 +43,21 @@ public class DesVolumeCatalogUpdateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate plannedCompletion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典)
|
||||||
|
*/
|
||||||
|
private String designState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -48,4 +48,11 @@ public class BusBillofquantitiesVersionsVo implements Serializable {
|
|||||||
private String versions;
|
private String versions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excel文件
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "Excel文件")
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import org.dromara.system.domain.vo.SysUserVo;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +40,16 @@ public class DesVolumeCatalogVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long designSubitemId;
|
private Long designSubitemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计子项
|
||||||
|
*/
|
||||||
|
private String designSubitem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String specialty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册号
|
* 卷册号
|
||||||
*/
|
*/
|
||||||
@ -49,6 +60,26 @@ public class DesVolumeCatalogVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String documentName;
|
private String documentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private LocalDate plannedCompletion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典)
|
||||||
|
*/
|
||||||
|
private String designState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件列表
|
* 文件列表
|
||||||
*/
|
*/
|
||||||
@ -64,9 +95,4 @@ public class DesVolumeCatalogVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<SysUserVo> noViewerList;
|
private List<SysUserVo> noViewerList;
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
package org.dromara.design.service;
|
package org.dromara.design.service;
|
||||||
|
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.design.domain.bo.ImportExcelFileReq;
|
import org.dromara.design.domain.bo.*;
|
||||||
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
|
|
||||||
import org.dromara.design.domain.bo.ObtainTheListReq;
|
|
||||||
import org.dromara.design.domain.dto.ObtainTheListRes;
|
import org.dromara.design.domain.dto.ObtainTheListRes;
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
||||||
import org.dromara.design.domain.bo.BusBillofquantitiesVersionsBo;
|
|
||||||
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
@ -87,6 +84,8 @@ public interface IBusBillofquantitiesVersionsService extends IService<BusBillofq
|
|||||||
*/
|
*/
|
||||||
TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery);
|
TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
List<String> sheetList(SheetListReq bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工程量清单
|
* 获取工程量清单
|
||||||
*/
|
*/
|
||||||
|
@ -13,9 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.design.domain.BusBillofquantities;
|
||||||
import org.dromara.design.domain.bo.ImportExcelFileReq;
|
import org.dromara.design.domain.bo.*;
|
||||||
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
|
|
||||||
import org.dromara.design.domain.bo.ObtainTheListReq;
|
|
||||||
import org.dromara.design.domain.dto.ObtainTheListRes;
|
import org.dromara.design.domain.dto.ObtainTheListRes;
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVo;
|
||||||
import org.dromara.design.mapper.BusBillofquantitiesMapper;
|
import org.dromara.design.mapper.BusBillofquantitiesMapper;
|
||||||
@ -24,7 +22,6 @@ import org.dromara.system.domain.vo.SysOssUploadVo;
|
|||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.design.domain.bo.BusBillofquantitiesVersionsBo;
|
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
||||||
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
import org.dromara.design.domain.BusBillofquantitiesVersions;
|
||||||
import org.dromara.design.mapper.BusBillofquantitiesVersionsMapper;
|
import org.dromara.design.mapper.BusBillofquantitiesVersionsMapper;
|
||||||
@ -33,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -161,11 +159,17 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
@Transactional
|
@Transactional
|
||||||
public Boolean importExcelFile(ImportExcelFileReq bo, MultipartFile file) throws IOException {
|
public Boolean importExcelFile(ImportExcelFileReq bo, MultipartFile file) throws IOException {
|
||||||
//0、创建版本
|
//0、创建版本
|
||||||
// SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(BillOfQuantities,file));
|
SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(BillOfQuantities,file));
|
||||||
|
if(wordEntity==null){
|
||||||
|
throw new ServiceException("上传文件失败");
|
||||||
|
}
|
||||||
String banBen = BatchNumberGenerator.generateBatchNumber("GCLBB-");
|
String banBen = BatchNumberGenerator.generateBatchNumber("GCLBB-");
|
||||||
int insert = baseMapper.insert(new BusBillofquantitiesVersions().
|
int insert = baseMapper.insert(new BusBillofquantitiesVersions().
|
||||||
setWorkOrderType(bo.getWorkOrderType()).
|
setWorkOrderType(bo.getWorkOrderType()).
|
||||||
setVersions(banBen));
|
setVersions(banBen).
|
||||||
|
setProjectId(bo.getProjectId()).
|
||||||
|
setExcelFile(wordEntity.getUrl()));
|
||||||
|
|
||||||
if(insert<=0){
|
if(insert<=0){
|
||||||
throw new ServiceException("创建版本失败");
|
throw new ServiceException("创建版本失败");
|
||||||
}
|
}
|
||||||
@ -187,18 +191,12 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
traverseTree(rootNode, nodeMap, allMaterials, sheetName,banBen);
|
traverseTree(rootNode, nodeMap, allMaterials, sheetName,banBen);
|
||||||
}
|
}
|
||||||
// 3. 批量插入数据库
|
// 3. 批量插入数据库
|
||||||
|
for (BusBillofquantities allMaterial : allMaterials) {
|
||||||
|
allMaterial.setProjectId(bo.getProjectId());
|
||||||
|
}
|
||||||
return busBillofquantitiesService.saveBatch(allMaterials);
|
return busBillofquantitiesService.saveBatch(allMaterials);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery) {
|
|
||||||
LambdaQueryWrapper<BusBillofquantitiesVersions> lqw = Wrappers.lambdaQuery();
|
|
||||||
lqw.orderByDesc(BusBillofquantitiesVersions::getId);
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getWorkOrderType()), BusBillofquantitiesVersions::getWorkOrderType, bo.getWorkOrderType());
|
|
||||||
lqw.last("create_time desc");
|
|
||||||
Page<BusBillofquantitiesVersionsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
||||||
return TableDataInfo.build(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ObtainTheListRes> obtainTheList(ObtainTheListReq bo) {
|
public List<ObtainTheListRes> obtainTheList(ObtainTheListReq bo) {
|
||||||
@ -209,11 +207,11 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. 构建父子映射:key=父节点pid,value=该父节点的所有子节点
|
// 2. 构建父子映射:key=父节点pid,value=该父节点的所有子节点
|
||||||
Map<Long, List<ObtainTheListRes>> parentMap = flatList.stream()
|
Map<String, List<ObtainTheListRes>> parentMap = flatList.stream()
|
||||||
.collect(Collectors.groupingBy(ObtainTheListRes::getPid));
|
.collect(Collectors.groupingBy(ObtainTheListRes::getPid));
|
||||||
|
|
||||||
// 3. 递归组装树形结构,从顶级节点(pid=0)开始
|
// 3. 递归组装树形结构,从顶级节点(pid=0)开始
|
||||||
List<ObtainTheListRes> treeList = buildTree(0L, parentMap);
|
List<ObtainTheListRes> treeList = buildTree("0", parentMap);
|
||||||
|
|
||||||
return treeList;
|
return treeList;
|
||||||
}
|
}
|
||||||
@ -224,7 +222,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
* @param parentMap 父子映射表(key=pid,value=子节点列表)
|
* @param parentMap 父子映射表(key=pid,value=子节点列表)
|
||||||
* @return 组装好的子树列表
|
* @return 组装好的子树列表
|
||||||
*/
|
*/
|
||||||
private List<ObtainTheListRes> buildTree(Long parentId, Map<Long, List<ObtainTheListRes>> parentMap) {
|
private List<ObtainTheListRes> buildTree(String parentId, Map<String, List<ObtainTheListRes>> parentMap) {
|
||||||
// 获取当前父节点的所有直接子节点
|
// 获取当前父节点的所有直接子节点
|
||||||
List<ObtainTheListRes> children = parentMap.getOrDefault(parentId, Collections.emptyList());
|
List<ObtainTheListRes> children = parentMap.getOrDefault(parentId, Collections.emptyList());
|
||||||
if (children.isEmpty()) {
|
if (children.isEmpty()) {
|
||||||
@ -234,7 +232,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
// 为每个子节点递归设置其下一级子节点
|
// 为每个子节点递归设置其下一级子节点
|
||||||
for (ObtainTheListRes child : children) {
|
for (ObtainTheListRes child : children) {
|
||||||
// 递归查询当前子节点的子节点,设置为它的子树
|
// 递归查询当前子节点的子节点,设置为它的子树
|
||||||
List<ObtainTheListRes> subChildren = buildTree(child.getId(), parentMap);
|
List<ObtainTheListRes> subChildren = buildTree(child.getSid(), parentMap);
|
||||||
// 注意:需要在Vo中添加子节点列表字段,用于存储子树
|
// 注意:需要在Vo中添加子节点列表字段,用于存储子树
|
||||||
child.setChildren(subChildren);
|
child.setChildren(subChildren);
|
||||||
}
|
}
|
||||||
@ -273,13 +271,22 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
// 封装数据到实体类
|
// 封装数据到实体类
|
||||||
BusBillofquantities material = new BusBillofquantities();
|
BusBillofquantities material = new BusBillofquantities();
|
||||||
material.setSheet(sheetName);
|
material.setSheet(sheetName);
|
||||||
|
material.setVersions(banBen);
|
||||||
material.setSid(sid);
|
material.setSid(sid);
|
||||||
material.setPid(pid);
|
material.setPid(pid);
|
||||||
material.setNum(aNum);
|
material.setNum(aNum);
|
||||||
material.setName(rowData.size() >= 2 ? rowData.get(1).trim() : "");
|
material.setName(rowData.size() >= 2 ? rowData.get(1).trim() : null);
|
||||||
material.setUnit(rowData.size() >= 3 ? rowData.get(2).trim() : "");
|
material.setUnit(rowData.size() >= 3 ? rowData.get(2).trim() : null);
|
||||||
material.setQuantity(Integer.parseInt(rowData.size() >= 4 ? rowData.get(3).trim() : ""));
|
String quantityStr = rowData.size() >= 4 ? rowData.get(3).trim() : null;
|
||||||
material.setRemark(rowData.size() >= 5 ? rowData.get(4).trim() : "");
|
if (!quantityStr.isEmpty()) {
|
||||||
|
try {
|
||||||
|
// 支持整数和小数解析
|
||||||
|
material.setQuantity(new BigDecimal(quantityStr));
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
// 解析失败(如非数字内容),保持null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
material.setRemark(rowData.size() >= 5 ? rowData.get(4).trim() : null);
|
||||||
|
|
||||||
// 存储映射关系(供子节点查询父sid)
|
// 存储映射关系(供子节点查询父sid)
|
||||||
nodeMap.put(currentNode, material);
|
nodeMap.put(currentNode, material);
|
||||||
@ -299,22 +306,68 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
|
|||||||
private String determineParentId(ExcelReader.TreeNode currentNode,
|
private String determineParentId(ExcelReader.TreeNode currentNode,
|
||||||
String aNum,
|
String aNum,
|
||||||
Map<ExcelReader.TreeNode, BusBillofquantities> nodeMap) {
|
Map<ExcelReader.TreeNode, BusBillofquantities> nodeMap) {
|
||||||
// 检查是否为顶级节点(A列为中文数字:一、二、三...)
|
// 1. 中文数字(一、二、三...)→ 顶级节点,pid=0
|
||||||
if (aNum.matches(ExcelReader.CHINESE_NUMBERS_REGEX)) {
|
if (aNum.matches(ExcelReader.CHINESE_NUMBERS_REGEX)) {
|
||||||
return "0"; // 顶级节点pid固定为0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 非顶级节点:查找父节点的sid
|
|
||||||
// 遍历nodeMap找到当前节点的父节点(通过Tree结构的父子关系反向查找)
|
|
||||||
for (Map.Entry<ExcelReader.TreeNode, BusBillofquantities> entry : nodeMap.entrySet()) {
|
|
||||||
ExcelReader.TreeNode parentNode = entry.getKey();
|
|
||||||
if (parentNode.getChildren().contains(currentNode)) {
|
|
||||||
return entry.getValue().getSid(); // 父节点的sid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 异常情况:未找到父节点(默认顶级节点处理,避免数据丢失)
|
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2. 非中文数字 → 获取直接父节点的sid作为pid
|
||||||
|
// 关键修正:通过getParent()获取真正的父节点
|
||||||
|
ExcelReader.TreeNode parentNode = currentNode.getParent();
|
||||||
|
if (parentNode != null) {
|
||||||
|
// 处理父节点可能是中间空节点的情况(递归查找有效父节点)
|
||||||
|
ExcelReader.TreeNode validParent = findValidParent(parentNode, nodeMap);
|
||||||
|
if (validParent != null && nodeMap.containsKey(validParent)) {
|
||||||
|
return nodeMap.get(validParent).getSid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归查找有效父节点(跳过空节点)
|
||||||
|
*/
|
||||||
|
private ExcelReader.TreeNode findValidParent(ExcelReader.TreeNode node, Map<ExcelReader.TreeNode, BusBillofquantities> nodeMap) {
|
||||||
|
if (node == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 空节点(无数据且无映射)则继续向上查找
|
||||||
|
if (node.getData().isEmpty() && !nodeMap.containsKey(node)) {
|
||||||
|
return findValidParent(node.getParent(), nodeMap);
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusBillofquantitiesVersionsVo> obtainAllVersionNumbers(ObtainAllVersionNumbersReq bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusBillofquantitiesVersions> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BusBillofquantitiesVersions::getId);
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusBillofquantitiesVersions::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWorkOrderType()), BusBillofquantitiesVersions::getWorkOrderType, bo.getWorkOrderType());
|
||||||
|
lqw.orderByDesc(BusBillofquantitiesVersions::getCreateTime);
|
||||||
|
Page<BusBillofquantitiesVersionsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> sheetList(SheetListReq bo) {
|
||||||
|
LambdaQueryWrapper<BusBillofquantities> lqw = Wrappers.lambdaQuery();
|
||||||
|
// 只查询需要的sheet字段
|
||||||
|
lqw.select(BusBillofquantities::getSheet);
|
||||||
|
// 条件过滤
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getVersions()), BusBillofquantities::getVersions, bo.getVersions());
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusBillofquantities::getProjectId, bo.getProjectId());
|
||||||
|
// 排序
|
||||||
|
lqw.orderByAsc(BusBillofquantities::getSheet);
|
||||||
|
// 分组
|
||||||
|
lqw.groupBy(BusBillofquantities::getSheet);
|
||||||
|
|
||||||
|
// 查询并转换为String列表
|
||||||
|
return busBillofquantitiesService.list(lqw).stream()
|
||||||
|
.map(BusBillofquantities::getSheet)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -258,13 +258,11 @@ public class DesVolumeCatalogServiceImpl extends ServiceImpl<DesVolumeCatalogMap
|
|||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
Long designSubitemId = req.getDesignSubitemId();
|
|
||||||
String volumeNumber = req.getVolumeNumber();
|
String volumeNumber = req.getVolumeNumber();
|
||||||
String documentName = req.getDocumentName();
|
String documentName = req.getDocumentName();
|
||||||
lqw.like(StringUtils.isNotBlank(documentName), DesVolumeCatalog::getDocumentName, documentName);
|
lqw.like(StringUtils.isNotBlank(documentName), DesVolumeCatalog::getDocumentName, documentName);
|
||||||
lqw.eq(StringUtils.isNotBlank(volumeNumber), DesVolumeCatalog::getVolumeNumber, volumeNumber);
|
lqw.eq(StringUtils.isNotBlank(volumeNumber), DesVolumeCatalog::getVolumeNumber, volumeNumber);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), DesVolumeCatalog::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), DesVolumeCatalog::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(designSubitemId), DesVolumeCatalog::getDesignSubitemId, designSubitemId);
|
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,18 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.design.mapper.BusBillofquantitiesVersionsMapper">
|
<mapper namespace="org.dromara.design.mapper.BusBillofquantitiesVersionsMapper">
|
||||||
|
|
||||||
<select id="obtainTheList" resultType="org.dromara.design.domain.dto.ObtainTheListRes">>
|
<select id="obtainTheList" resultType="org.dromara.design.domain.dto.ObtainTheListRes">
|
||||||
select
|
select
|
||||||
*
|
*
|
||||||
from
|
from
|
||||||
bus_billofquantities
|
bus_billofquantities
|
||||||
<where>
|
<where>
|
||||||
<if test="versions != null">
|
versions = #{bo.versions} AND sheet = #{bo.sheet} AND project_id = #{bo.projectId}
|
||||||
bo.versions = #{versions}
|
|
||||||
</if>
|
|
||||||
<if test="sheet != null">
|
|
||||||
bo.sheet = #{sheet}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</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.design.mapper.BusDrawingreviewMapper">
|
||||||
|
|
||||||
|
</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.design.mapper.BusDrawingreviewReceiptsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Reference in New Issue
Block a user