diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/FeiBaSetEntity.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/FeiBaSetEntity.java new file mode 100644 index 00000000..e2e968a5 --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/FeiBaSetEntity.java @@ -0,0 +1,46 @@ +package org.springblade.desk.device.pojo.entity; + +import lombok.Data; +import io.swagger.v3.oas.annotations.media.Schema; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.io.Serial; + +/** + * 飞跋设置 实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@TableName("MES_FEI_BA_SET") +@Schema(description = "FeiBaSet对象") +@EqualsAndHashCode(callSuper = true) +public class FeiBaSetEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 编码 + */ + @Schema(description = "编码") + private String fsCode; + /** + * 类型 + */ + @Schema(description = "类型") + private String fsType; + /** + * + */ + @Schema(description = "") + private Short bindQty; + /** + * 名称 + */ + @Schema(description = "名称") + private String fsName; +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/RackSetEntity.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/RackSetEntity.java new file mode 100644 index 00000000..9d4ffb2b --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/entity/RackSetEntity.java @@ -0,0 +1,47 @@ +package org.springblade.desk.device.pojo.entity; + +import lombok.Data; +import io.swagger.v3.oas.annotations.media.Schema; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.io.Serial; + +/** + * 挂具设置 实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@TableName("MES_RACK_SET") +@Schema(description = "RackSet对象") +@EqualsAndHashCode(callSuper = true) +public class RackSetEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 编码 + */ + @Schema(description = "编码") + private String rsCode; + /** + * 类型 + */ + @Schema(description = "类型") + private String rsType; + /** + * + */ + @Schema(description = "") + private Short bindQty; + /** + * 名称 + */ + @Schema(description = "名称") + private String rsName; + +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/FeiBaSetExcel.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/FeiBaSetExcel.java new file mode 100644 index 00000000..3297155d --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/FeiBaSetExcel.java @@ -0,0 +1,76 @@ +package org.springblade.desk.device.pojo.excel; + + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +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 java.io.Serializable; +import java.io.Serial; + + +/** + * 飞跋设置 Excel实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class FeiBaSetExcel implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private BigDecimal id; + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private String tenantId; + /** + * 删除标记;1:删除,0:正常 + */ + @ColumnWidth(20) + @ExcelProperty("删除标记;1:删除,0:正常") + private Long isDeleted; + /** + * 编码 + */ + @ColumnWidth(20) + @ExcelProperty("编码") + private String fsCode; + /** + * 类型 + */ + @ColumnWidth(20) + @ExcelProperty("类型") + private String fsType; + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private Short bindQty; + /** + * 名称 + */ + @ColumnWidth(20) + @ExcelProperty("名称") + private String fsName; + +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/RackSetExcel.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/RackSetExcel.java new file mode 100644 index 00000000..a7109f57 --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/excel/RackSetExcel.java @@ -0,0 +1,76 @@ +package org.springblade.desk.device.pojo.excel; + + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +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 java.io.Serializable; +import java.io.Serial; + + +/** + * 挂具设置 Excel实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class RackSetExcel implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private BigDecimal id; + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private String tenantId; + /** + * 删除标记;1:删除,0:正常 + */ + @ColumnWidth(20) + @ExcelProperty("删除标记;1:删除,0:正常") + private Long isDeleted; + /** + * 编码 + */ + @ColumnWidth(20) + @ExcelProperty("编码") + private String rsCode; + /** + * 类型 + */ + @ColumnWidth(20) + @ExcelProperty("类型") + private String rsType; + /** + * + */ + @ColumnWidth(20) + @ExcelProperty("") + private Short bindQty; + /** + * 名称 + */ + @ColumnWidth(20) + @ExcelProperty("名称") + private String rsName; + +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/FeiBaSetVO.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/FeiBaSetVO.java new file mode 100644 index 00000000..2d1d1eef --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/FeiBaSetVO.java @@ -0,0 +1,31 @@ +package org.springblade.desk.device.pojo.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; + +import java.io.Serial; + +/** + * 飞跋设置 视图实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class FeiBaSetVO extends FeiBaSetEntity { + @Serial + private static final long serialVersionUID = 1L; + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + /** + * 状态名称 + */ + String statusName; +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/RackSetVO.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/RackSetVO.java new file mode 100644 index 00000000..cf020ebb --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/device/pojo/vo/RackSetVO.java @@ -0,0 +1,32 @@ +package org.springblade.desk.device.pojo.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.desk.device.pojo.entity.RackSetEntity; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 挂具设置 视图实体类 + * + * @author qyl + * @since 2025-12-29 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class RackSetVO extends RackSetEntity implements Serializable { + @Serial + private static final long serialVersionUID = 1L; + /** + * 主键ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + /** + * 状态名称 + */ + String statusName; +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/FeiBaSetController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/FeiBaSetController.java new file mode 100644 index 00000000..86ec268c --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/FeiBaSetController.java @@ -0,0 +1,162 @@ +/** + * 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.device.controller; + +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import jakarta.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.annotation.IsAdmin; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.excel.FeiBaSetExcel; +import org.springblade.desk.device.pojo.vo.FeiBaSetVO; +import org.springblade.desk.device.service.IFeiBaSetService; +import org.springblade.desk.device.wrapper.EquipmentWrapper; +import org.springblade.desk.device.wrapper.FeiBaSetWrapper; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; + +import java.util.Map; +import java.util.List; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * 飞靶设置 控制器 + * + * @author qyl + * @since 2025-12-29 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/feiBaSet") +@Tag(name = "飞靶设置", description = "飞靶设置接口") +public class FeiBaSetController extends BladeController { + + private final IFeiBaSetService feiBaSetService; + + /** + * 飞靶设置 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入feiBaSet") + public R detail(FeiBaSetEntity feiBaSet) { + FeiBaSetEntity detail = feiBaSetService.getOne(Condition.getQueryWrapper(feiBaSet)); + return R.data(FeiBaSetWrapper.build().entityVO(detail)); + } + + /** + * 飞靶设置 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "") + @Parameters({ + @Parameter(name = "fsCode", description = "飞靶编码", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "fsName", description = "飞靶名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "status", description = "飞靶状态", in = ParameterIn.QUERY, schema = @Schema(type = "int")), + }) + public R> page(@Parameter(hidden = true) FeiBaSetEntity feiBaSet, Query query) { + IPage pages = feiBaSetService.selectFeiBaSetPage(Condition.getPage(query), feiBaSet); + return R.data(FeiBaSetWrapper.build().pageVO(pages)); + } + + /** + * 飞靶设置 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入feiBaSet") + public R save(@Valid @RequestBody FeiBaSetEntity feiBaSet) { + return R.status(feiBaSetService.save(feiBaSet)); + } + + /** + * 飞靶设置 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入feiBaSet") + public R update(@Valid @RequestBody FeiBaSetEntity feiBaSet) { + return R.status(feiBaSetService.updateById(feiBaSet)); + } + + /** + * 飞靶设置 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入feiBaSet") + public R submit(@Valid @RequestBody FeiBaSetEntity feiBaSet) { + return R.status(feiBaSetService.saveOrUpdate(feiBaSet)); + } + + /** + * 飞靶设置 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + return R.status(feiBaSetService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @IsAdmin + @GetMapping("/export-feiBaSet") + @ApiOperationSupport(order = 9) + @Operation(summary = "导出数据", description = "传入feiBaSet") + public void exportFeiBaSet(@Parameter(hidden = true) @RequestParam Map feiBaSet, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(feiBaSet, FeiBaSetEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(FeiBaSet::getTenantId, bladeUser.getTenantId()); + //} + //queryWrapper.lambda().eq(FeiBaSetEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = feiBaSetService.exportFeiBaSet(queryWrapper); + ExcelUtil.export(response, "飞靶设置数据" + DateUtil.time(), "飞靶设置数据表", list, FeiBaSetExcel.class); + } + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/RackSetController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/RackSetController.java new file mode 100644 index 00000000..ad183a91 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/controller/RackSetController.java @@ -0,0 +1,162 @@ +/** + * 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.device.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import jakarta.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.annotation.IsAdmin; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springblade.desk.device.pojo.entity.RackSetEntity; +import org.springblade.desk.device.pojo.excel.RackSetExcel; +import org.springblade.desk.device.pojo.vo.RackSetVO; +import org.springblade.desk.device.service.IRackSetService; +import org.springblade.desk.device.wrapper.FeiBaSetWrapper; +import org.springblade.desk.device.wrapper.RackSetWrapper; +import org.springframework.web.bind.annotation.*; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; + +import java.util.Map; +import java.util.List; + +import jakarta.servlet.http.HttpServletResponse; + +/** + * 挂具设置 控制器 + * + * @author qyl + * @since 2025-12-29 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/rackSet") +@Tag(name = "挂具设置", description = "挂具设置接口") +public class RackSetController extends BladeController { + + private final IRackSetService rackSetService; + + /** + * 挂具设置 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入rackSet") + public R detail(RackSetEntity rackSet) { + RackSetEntity detail = rackSetService.getOne(Condition.getQueryWrapper(rackSet)); + return R.data(RackSetWrapper.build().entityVO(detail)); + } + + /** + * 挂具设置 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "") + @Parameters({ + @Parameter(name = "rsCode", description = "挂具编码", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "rsName", description = "挂具名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "status", description = "挂具状态", in = ParameterIn.QUERY, schema = @Schema(type = "int")), + }) + public R> page(@Parameter(hidden = true) RackSetEntity rackSet, Query query) { + IPage pages = rackSetService.selectRackSetPage(Condition.getPage(query), rackSet); + return R.data(RackSetWrapper.build().pageVO(pages)); + } + + /** + * 挂具设置 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入rackSet") + public R save(@Valid @RequestBody RackSetEntity rackSet) { + return R.status(rackSetService.save(rackSet)); + } + + /** + * 挂具设置 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入rackSet") + public R update(@Valid @RequestBody RackSetEntity rackSet) { + return R.status(rackSetService.updateById(rackSet)); + } + + /** + * 挂具设置 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入rackSet") + public R submit(@Valid @RequestBody RackSetEntity rackSet) { + return R.status(rackSetService.saveOrUpdate(rackSet)); + } + + /** + * 挂具设置 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + return R.status(rackSetService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @IsAdmin + @GetMapping("/export-rackSet") + @ApiOperationSupport(order = 9) + @Operation(summary = "导出数据", description = "传入rackSet") + public void exportRackSet(@Parameter(hidden = true) @RequestParam Map rackSet, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(rackSet, RackSetEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(RackSet::getTenantId, bladeUser.getTenantId()); + //} + //queryWrapper.lambda().eq(RackSetEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = rackSetService.exportRackSet(queryWrapper); + ExcelUtil.export(response, "挂具设置数据" + DateUtil.time(), "挂具设置数据表", list, RackSetExcel.class); + } + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.java new file mode 100644 index 00000000..8aa3c5b6 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.java @@ -0,0 +1,63 @@ +/** + * 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.device.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.excel.FeiBaSetExcel; + +import java.util.List; + +/** + * 飞跋设置 Mapper 接口 + * + * @author qyl + * @since 2025-12-29 + */ +public interface FeiBaSetMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page 分页参数 + * @param feiBaSet 查询参数 + * @return List + */ + List selectFeiBaSetPage(IPage page, FeiBaSetEntity feiBaSet); + + + /** + * 获取导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List exportFeiBaSet(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.xml b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.xml new file mode 100644 index 00000000..d5fab31b --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/FeiBaSetMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.java new file mode 100644 index 00000000..0529f467 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.java @@ -0,0 +1,63 @@ +/** + * 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.device.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Param; +import org.springblade.desk.device.pojo.entity.RackSetEntity; +import org.springblade.desk.device.pojo.excel.RackSetExcel; + +import java.util.List; + +/** + * 挂具设置 Mapper 接口 + * + * @author qyl + * @since 2025-12-29 + */ +public interface RackSetMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page 分页参数 + * @param rackSet 查询参数 + * @return List + */ + List selectRackSetPage(IPage page, RackSetEntity rackSet); + + + /** + * 获取导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List exportRackSet(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.xml b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.xml new file mode 100644 index 00000000..55902b8e --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/mapper/RackSetMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IFeiBaSetService.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IFeiBaSetService.java new file mode 100644 index 00000000..08e789ef --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IFeiBaSetService.java @@ -0,0 +1,61 @@ +/** + * 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.device.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.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.excel.FeiBaSetExcel; + +import java.util.List; + +/** + * 飞跋设置 服务类 + * + * @author qyl + * @since 2025-12-29 + */ +public interface IFeiBaSetService extends BaseService { + /** + * 自定义分页 + * + * @param page 分页参数 + * @param feiBaSet 查询参数 + * @return IPage + */ + IPage selectFeiBaSetPage(IPage page, FeiBaSetEntity feiBaSet); + + + /** + * 导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List exportFeiBaSet(Wrapper queryWrapper); + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IRackSetService.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IRackSetService.java new file mode 100644 index 00000000..00559087 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/IRackSetService.java @@ -0,0 +1,61 @@ +/** + * 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.device.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.device.pojo.entity.RackSetEntity; +import org.springblade.desk.device.pojo.excel.RackSetExcel; + +import java.util.List; + +/** + * 挂具设置 服务类 + * + * @author qyl + * @since 2025-12-29 + */ +public interface IRackSetService extends BaseService { + /** + * 自定义分页 + * + * @param page 分页参数 + * @param rackSet 查询参数 + * @return IPage + */ + IPage selectRackSetPage(IPage page, RackSetEntity rackSet); + + + /** + * 导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List exportRackSet(Wrapper queryWrapper); + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/FeiBaSetServiceImpl.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/FeiBaSetServiceImpl.java new file mode 100644 index 00000000..02ba12e2 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/FeiBaSetServiceImpl.java @@ -0,0 +1,78 @@ +/** + * 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.device.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import org.springblade.desk.device.mapper.FeiBaSetMapper; +import org.springblade.desk.device.pojo.entity.EquipmentEntity; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.excel.FeiBaSetExcel; +import org.springblade.desk.device.service.IFeiBaSetService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.mp.base.BaseServiceImpl; + +import java.util.List; +import java.util.Objects; + +/** + * 飞跋设置 服务实现类 + * + * @author qyl + * @since 2025-12-29 + */ +@Service +public class FeiBaSetServiceImpl extends BaseServiceImpl implements IFeiBaSetService { + + @Override + public IPage selectFeiBaSetPage(IPage page, FeiBaSetEntity feiBaSet) { +// return page.setRecords(baseMapper.selectFeiBaSetPage(page, feiBaSet)); + // 1. 创建条件构造器 + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); + + // 2. 动态添加条件(核心!) + // 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件 + wrapper.like(Objects.nonNull(feiBaSet.getFsCode()), FeiBaSetEntity::getFsCode, feiBaSet.getFsCode()) + .like(Objects.nonNull(feiBaSet.getFsName()), FeiBaSetEntity::getFsName, feiBaSet.getFsName()) + .eq(Objects.nonNull(feiBaSet.getFsType()), FeiBaSetEntity::getFsType, feiBaSet.getFsType()); + + // 3. 执行分页查询 + return baseMapper.selectPage(page, wrapper); + } + + + @Override + public List exportFeiBaSet(Wrapper queryWrapper) { + List feiBaSetList = baseMapper.exportFeiBaSet(queryWrapper); + //feiBaSetList.forEach(feiBaSet -> { + // feiBaSet.setTypeName(DictCache.getValue(DictEnum.YES_NO, FeiBaSet.getType())); + //}); + return feiBaSetList; + } + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/RackSetServiceImpl.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/RackSetServiceImpl.java new file mode 100644 index 00000000..2d1538db --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/service/impl/RackSetServiceImpl.java @@ -0,0 +1,78 @@ +/** + * 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.device.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import org.springblade.desk.device.mapper.RackSetMapper; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.entity.RackSetEntity; +import org.springblade.desk.device.pojo.excel.RackSetExcel; +import org.springblade.desk.device.service.IRackSetService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springblade.core.mp.base.BaseServiceImpl; + +import java.util.List; +import java.util.Objects; + +/** + * 挂具设置 服务实现类 + * + * @author qyl + * @since 2025-12-29 + */ +@Service +public class RackSetServiceImpl extends BaseServiceImpl implements IRackSetService { + + @Override + public IPage selectRackSetPage(IPage page, RackSetEntity rackSet) { +// return page.setRecords(baseMapper.selectRackSetPage(page, rackSet)); + // 1. 创建条件构造器 + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); + + // 2. 动态添加条件(核心!) + // 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件 + wrapper.like(Objects.nonNull(rackSet.getRsCode()), RackSetEntity::getRsCode, rackSet.getRsCode()) + .like(Objects.nonNull(rackSet.getRsName()), RackSetEntity::getRsName, rackSet.getRsName()) + .eq(Objects.nonNull(rackSet.getRsType()), RackSetEntity::getRsType, rackSet.getRsType()); + + // 3. 执行分页查询 + return baseMapper.selectPage(page, wrapper); + } + + + @Override + public List exportRackSet(Wrapper queryWrapper) { + List rackSetList = baseMapper.exportRackSet(queryWrapper); + //rackSetList.forEach(rackSet -> { + // rackSet.setTypeName(DictCache.getValue(DictEnum.YES_NO, RackSet.getType())); + //}); + return rackSetList; + } + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/FeiBaSetWrapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/FeiBaSetWrapper.java new file mode 100644 index 00000000..4335a6f6 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/FeiBaSetWrapper.java @@ -0,0 +1,60 @@ +/** + * 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.device.wrapper; + +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.desk.device.pojo.entity.FeiBaSetEntity; +import org.springblade.desk.device.pojo.vo.FeiBaSetVO; + +import java.util.Objects; + +/** + * 飞跋设置 包装类,返回视图层所需的字段 + * + * @author qyl + * @since 2025-12-29 + */ +public class FeiBaSetWrapper extends BaseEntityWrapper { + + public static FeiBaSetWrapper build() { + return new FeiBaSetWrapper(); + } + + @Override + public FeiBaSetVO entityVO(FeiBaSetEntity feiBaSet) { + FeiBaSetVO feiBaSetVO = Objects.requireNonNull(BeanUtil.copyProperties(feiBaSet, FeiBaSetVO.class)); + + //User createUser = UserCache.getUser(feiBaSet.getCreateUser()); + //User updateUser = UserCache.getUser(feiBaSet.getUpdateUser()); + //feiBaSetVO.setCreateUserName(createUser.getName()); + //feiBaSetVO.setUpdateUserName(updateUser.getName()); + + return feiBaSetVO; + } + + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/RackSetWrapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/RackSetWrapper.java new file mode 100644 index 00000000..7fcc3e64 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/device/wrapper/RackSetWrapper.java @@ -0,0 +1,60 @@ +/** + * 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.device.wrapper; + +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.desk.device.pojo.entity.RackSetEntity; +import org.springblade.desk.device.pojo.vo.RackSetVO; + +import java.util.Objects; + +/** + * 挂具设置 包装类,返回视图层所需的字段 + * + * @author qyl + * @since 2025-12-29 + */ +public class RackSetWrapper extends BaseEntityWrapper { + + public static RackSetWrapper build() { + return new RackSetWrapper(); + } + + @Override + public RackSetVO entityVO(RackSetEntity rackSet) { + RackSetVO rackSetVO = Objects.requireNonNull(BeanUtil.copyProperties(rackSet, RackSetVO.class)); + + //User createUser = UserCache.getUser(rackSet.getCreateUser()); + //User updateUser = UserCache.getUser(rackSet.getUpdateUser()); + //rackSetVO.setCreateUserName(createUser.getName()); + //rackSetVO.setUpdateUserName(updateUser.getName()); + + return rackSetVO; + } + + +} diff --git a/doc/sql/mes/increase-251229.sql b/doc/sql/mes/increase-251229.sql new file mode 100644 index 00000000..98e9b0da --- /dev/null +++ b/doc/sql/mes/increase-251229.sql @@ -0,0 +1,9 @@ +ALTER TABLE MES_FEI_BA_SET + ADD (FS_NAME NVARCHAR2(255) NOT NULL); +COMMENT +ON COLUMN MES_FEI_BA_SET.FS_NAME IS '名称'; + +ALTER TABLE MES_RACK_SET + ADD (RS_NAME NVARCHAR2(255) NOT NULL); +COMMENT +ON COLUMN MES_RACK_SET.RS_NAME IS '名称'; \ No newline at end of file