+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *
+ * 1. This software is for development use only under a valid license + * from BladeX. + *
+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *
+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *
+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *
+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.desk.basic.pojo.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.scheduling.pojo.entity.CraftAbilityEntity; + +import java.io.Serial; + +/** + * 工艺能力 视图实体类 + * + * @author BladeX + * @since 2025-12-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class CraftAbilityVO extends CraftAbilityEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service-api/blade-scheduling-api/src/main/java/org/springblade/scheduling/pojo/entity/CraftAbilityEntity.java b/blade-service-api/blade-scheduling-api/src/main/java/org/springblade/scheduling/pojo/entity/CraftAbilityEntity.java index a904c34a..efc1fee0 100644 --- a/blade-service-api/blade-scheduling-api/src/main/java/org/springblade/scheduling/pojo/entity/CraftAbilityEntity.java +++ b/blade-service-api/blade-scheduling-api/src/main/java/org/springblade/scheduling/pojo/entity/CraftAbilityEntity.java @@ -55,17 +55,17 @@ public class CraftAbilityEntity extends BaseEntity { /** * 作业中心 */ - @Schema(description = "作业中心") + @Schema(description = "编码") private String caCode; /** * 设备编码 */ - @Schema(description = "设备编码") + @Schema(description = "名称") private String caName; /** * 设备分类 */ - @Schema(description = "设备分类") + @Schema(description = "能力类型") private Long wtId; /** * 设备名称 diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/CraftAbilityController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/CraftAbilityController.java new file mode 100644 index 00000000..6f0b604e --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/CraftAbilityController.java @@ -0,0 +1,262 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *
+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *
+ * 1. This software is for development use only under a valid license + * from BladeX. + *
+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *
+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *
+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.annotation.IsAdmin;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.desk.basic.constant.BAModuleConst;
+import org.springblade.desk.basic.excel.CraftAbilityExcel;
+import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
+import org.springblade.desk.basic.service.ICraftAbilityService;
+import org.springblade.desk.basic.wrapper.CraftAbilityWrapper;
+
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 工艺能力 控制器
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping(BAModuleConst.CONTROLLER_PREFIX + "/craftAbility")
+@Tag(name = "工艺能力", description = "工艺能力接口")
+public class CraftAbilityController extends BladeController {
+
+ private final ICraftAbilityService craftAbilityService;
+// private final INoticeClient noticeClient;
+ /**
+ * 工艺能力 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @Operation(summary = "详情", description = "传入CraftAbility")
+ public R
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
+ * not liable for any claims arising from secondary or illegal development.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.excel;
+
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+
+/**
+ * 工艺能力 Excel实体类
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class CraftAbilityExcel implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 产品ID
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("产品ID")
+ private BigDecimal id;
+ /**
+ * 作业中心
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("编码")
+ private String caCode;
+ /**
+ * 设备编码
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("名称")
+ private String caName;
+ /**
+ * 设备分类
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("能力类型")
+ private Long wtId;
+ /**
+ * 设备名称
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("设备名称")
+ private Long bpsId;
+ /**
+ * 是否已删除
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("是否已删除")
+ private Long isDeleted;
+
+}
diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/CraftAbilityMapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/CraftAbilityMapper.java
new file mode 100644
index 00000000..3889e6b8
--- /dev/null
+++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/CraftAbilityMapper.java
@@ -0,0 +1,65 @@
+/**
+ * BladeX Commercial License Agreement
+ * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
+ *
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
+ * not liable for any claims arising from secondary or illegal development.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.desk.basic.excel.CraftAbilityExcel;
+import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+
+
+import java.util.List;
+
+/**
+ * 工艺能力 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+public interface CraftAbilityMapper extends BaseMapper
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
+ * not liable for any claims arising from secondary or illegal development.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.service;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.desk.basic.excel.CraftAbilityExcel;
+import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+
+
+import java.util.List;
+
+/**
+ * 工艺能力 服务类
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+public interface ICraftAbilityService extends BaseService
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
+ * not liable for any claims arising from secondary or illegal development.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.desk.basic.excel.CraftAbilityExcel;
+import org.springblade.desk.basic.mapper.CraftAbilityMapper;
+import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
+import org.springblade.desk.basic.service.ICraftAbilityService;
+
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 工艺能力 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+@Service
+public class CraftAbilityServiceImpl extends BaseServiceImpl
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
+ * not liable for any claims arising from secondary or illegal development.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.desk.basic.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.desk.basic.pojo.vo.CraftAbilityVO;
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+
+import java.util.Objects;
+
+/**
+ * 工艺能力 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2025-12-22
+ */
+public class CraftAbilityWrapper extends BaseEntityWrapper> getSelectCraftAbility(@Valid @RequestBody WorkCenter workCenter) {
+// List
> findList() {
+ List
> getSelectCraftAbility(@Valid @RequestBody WorkCenter workCenter) {
+ List