diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/dto/BsAssignDTO.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/dto/BsAssignDTO.java new file mode 100644 index 00000000..c73f8a3c --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/dto/BsAssignDTO.java @@ -0,0 +1,46 @@ +/** + * 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.pojo.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.desk.basic.pojo.entity.BsAssignEntity; + +import java.io.Serial; + +/** + * 分派规则维护 数据传输对象实体类 + * + * @author BladeX + * @since 2026-02-27 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BsAssignDTO extends BsAssignEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/entity/BsAssignEntity.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/entity/BsAssignEntity.java new file mode 100644 index 00000000..6cc07621 --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/entity/BsAssignEntity.java @@ -0,0 +1,138 @@ +/** + * 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.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; +import java.math.BigDecimal; + +/** + * 分派规则维护 实体类 + * + * @author BladeX + * @since 2026-02-27 + */ +@Data +@TableName("BS_ASSIGN") +@Schema(description = "BsAssign对象") +@EqualsAndHashCode(callSuper = true) +public class BsAssignEntity extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 工艺名称 + */ + @Schema(description = "工艺名称") + private String craftAbility; + /** + * 工艺id + */ + @Schema(description = "工艺id") + private Long craftAbilityId; + /** + * 零件号 + */ + @Schema(description = "零件号") + private String partCode; + /** + * 生产标识 + */ + @Schema(description = "生产标识") + private String prodMark; + /** + * 生产标识id + */ + @Schema(description = "生产标识id") + private BigDecimal prodMarkId; + /** + * 单面积上限 + */ + @Schema(description = "单面积上限") + private BigDecimal upArea; + /** + * 单面积下限 + */ + @Schema(description = "单面积下限") + private BigDecimal lowArea; + /** + * 单批面积上限 + */ + @Schema(description = "单批面积上限") + private BigDecimal singleUpArea; + /** + * 单批面积下限 + */ + @Schema(description = "单批面积下限") + private BigDecimal singleDownArea; + /** + * 限制类型 + */ + @Schema(description = "限制类型") + private String limitType; + /** + * 指定类型 + */ + @Schema(description = "指定类型") + private String pointType; + /** + * 外协厂商id + */ + @Schema(description = "外协厂商id") + private Long oemId; + /** + * 外协厂商 + */ + @Schema(description = "外协厂商") + private String oemName; + /** + * 作业中心id + */ + @Schema(description = "作业中心id") + private Long centerId; + /** + * 作业中心名称 + */ + @Schema(description = "作业中心名称") + private String centerName; + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + /** + * + */ + @Schema(description = "") + private Long sort; + +} diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/vo/BsAssignVO.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/vo/BsAssignVO.java new file mode 100644 index 00000000..3cf07439 --- /dev/null +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/basic/pojo/vo/BsAssignVO.java @@ -0,0 +1,46 @@ +/** + * 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.pojo.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.desk.basic.pojo.entity.BsAssignEntity; + +import java.io.Serial; + +/** + * 分派规则维护 视图实体类 + * + * @author BladeX + * @since 2026-02-27 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class BsAssignVO extends BsAssignEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/BsAssignController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/BsAssignController.java new file mode 100644 index 00000000..1278fa03 --- /dev/null +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/controller/BsAssignController.java @@ -0,0 +1,244 @@ +/** + * 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.excel.BsAssignExcel;
+import org.springblade.desk.basic.excel.CoatingThicknessExcel;
+import org.springblade.desk.basic.pojo.entity.*;
+import org.springblade.desk.basic.pojo.vo.BsAssignVO;
+import org.springblade.desk.basic.service.IBsAssignService;
+import org.springblade.desk.basic.service.ICraftAbilityService;
+import org.springblade.desk.basic.service.IOemService;
+import org.springblade.desk.basic.service.IWorkCenterService;
+import org.springblade.desk.basic.util.ExcelExtUtil;
+import org.springblade.desk.basic.wrapper.BsAssignWrapper;
+import org.springblade.scheduling.pojo.entity.CraftAbilityEntity;
+import org.springblade.system.cache.DictCache;
+import org.springframework.core.io.Resource;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+/**
+ * 分派规则维护 控制器
+ *
+ * @author BladeX
+ * @since 2026-02-27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/bsAssign")
+@Tag(name = "分派规则维护", description = "分派规则维护接口")
+public class BsAssignController extends BladeController {
+
+ private final IBsAssignService bsAssignService;
+ private final ICraftAbilityService craftAbilityService;
+ private final IOemService service;
+ @jakarta.annotation.Resource
+ private IWorkCenterService centerService;
+ /**
+ * 分派规则维护 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @Operation(summary = "详情", description = "传入bsAssign")
+ 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 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 BladeX
+ * @since 2026-02-27
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class BsAssignExcel implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("")
+ private BigDecimal id;
+ /**
+ * 工艺名称
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("工艺能力")
+ private String craftAbility;
+ /**
+ * 工艺id
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("工艺id")
+ private BigDecimal craftAbilityId;
+ /**
+ * 零件号
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("零件号")
+ private String partCode;
+ /**
+ * 生产标识
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("生产标识")
+ private String prodMark;
+ /**
+ * 生产标识id
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("生产标识id")
+ private BigDecimal prodMarkId;
+ /**
+ * 单面积上限
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("单面积上限")
+ private BigDecimal upArea;
+ /**
+ * 单面积下限
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("单面积下限")
+ private BigDecimal lowArea;
+ /**
+ * 单批面积上限
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("单批面积上限")
+ private BigDecimal singleUpArea;
+ /**
+ * 单批面积下限
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("单批面积下限")
+ private BigDecimal singleDownArea;
+ /**
+ * 限制类型
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("限制类型")
+// private String limitType;
+ private String limitTypeName;
+ /**
+ * 指定类型
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("指定类型")
+ private String pointTypeName;
+ /**
+ * 外协厂商id
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("外协厂商id")
+ private Short oemId;
+ /**
+ * 外协厂商
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("外协厂商")
+ private String oemName;
+ /**
+ * 作业中心id
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("作业中心id")
+ private Short centerId;
+ /**
+ * 作业中心名称
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("作业中心")
+ private String centerName;
+ /**
+ * 备注
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("备注")
+ private String remark;
+ /**
+ *
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("")
+ private Long isDeleted;
+ /**
+ *
+ */
+ @ColumnWidth(20)
+ @ExcelProperty("")
+ private Long sort;
+
+}
diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/AssignMapper.xml b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/AssignMapper.xml
new file mode 100644
index 00000000..dd5b7ccb
--- /dev/null
+++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/basic/mapper/AssignMapper.xml
@@ -0,0 +1,43 @@
+
+
+
+ * 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.BsAssignExcel;
+import org.springblade.desk.basic.pojo.entity.BsAssignEntity;
+import org.springblade.desk.basic.pojo.vo.BsAssignVO;
+
+
+import java.util.List;
+
+/**
+ * 分派规则维护 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2026-02-27
+ */
+public interface BsAssignMapper 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.BsAssignExcel;
+import org.springblade.desk.basic.pojo.entity.BsAssignEntity;
+import org.springblade.desk.basic.pojo.vo.BsAssignVO;
+
+
+import java.util.List;
+
+/**
+ * 分派规则维护 服务类
+ *
+ * @author BladeX
+ * @since 2026-02-27
+ */
+public interface IBsAssignService 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.BsAssignExcel;
+import org.springblade.desk.basic.mapper.BsAssignMapper;
+import org.springblade.desk.basic.pojo.entity.BsAssignEntity;
+import org.springblade.desk.basic.pojo.vo.BsAssignVO;
+import org.springblade.desk.basic.service.IBsAssignService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 分派规则维护 服务实现类
+ *
+ * @author BladeX
+ * @since 2026-02-27
+ */
+@Service
+public class BsAssignServiceImpl 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.entity.BsAssignEntity;
+import org.springblade.desk.basic.pojo.vo.BsAssignVO;
+
+import java.util.Objects;
+
+/**
+ * 分派规则维护 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2026-02-27
+ */
+public class BsAssignWrapper extends BaseEntityWrapper