diff --git a/.agents/skills/prototype-design/SKILL.md b/.agents/skills/prototype-design/SKILL.md new file mode 100644 index 00000000..f4257ba6 --- /dev/null +++ b/.agents/skills/prototype-design/SKILL.md @@ -0,0 +1,98 @@ +--- +name: prototype-design +description: 为 PDA、手持终端或 PC 桌面端创建可交互的单文件 HTML 产品原型。当用户要求设计、复刻、修改或演示产品界面、业务页面、仪表盘、管理后台、表单、操作流程或可点击原型时使用;尤其适用于需要严格还原参考图,或由用户授权自由设计,并将结果保存到 docs/prototype_design/design/ 目录的任务。 +--- + +# 原型设计 + +先明确终端、业务、视觉方向和交付方式,再制作可用的 HTML 原型。 + +## 执行流程 + +### 1. 明确需求 + +从用户消息和用户提供的文件中确认以下信息: + +- 目标终端:`PDA`、手持终端或 `PC` 桌面端。 +- 业务目的:目标用户、核心任务、所需页面或流程、重要数据和可执行操作。 +- 视觉方向:严格还原参考图,或允许自由设计。 +- 交付方式:发布为外部可访问链接,或直接嵌入聊天回复。 +- 用于生成文件名的主题名称。 + +不得重复询问用户已经说明的信息。 + +如果用户未说明 PDA 或 PC,且无法从业务场景中可靠判断,先询问需要制作哪一种终端。只有在上下文明确支持时,才把手机和工业手持设备归为 PDA。用户未提供准确视口尺寸时,优先采用参考图的宽高比;没有参考图时,PDA 默认使用 `360 × 640`,PC 默认使用 `1440 × 900`。 + +### 2. 制作前解决业务歧义 + +当缺失的信息会实质影响信息架构、字段、操作、状态或业务流程时,必须在编写 HTML 前提问。将问题合并为简短的一组,只询问继续制作所必需的信息。 + +当能够确定原型的使用者、目标、主要内容和核心交互时,即可认为业务足够明确。示例文案、演示数据或非关键状态等可逆细节可以做合理假设,但要向用户说明,不要因此阻塞制作。 + +### 3. 选择视觉模式 + +当用户提供参考图片、截图、设计稿或已有界面,且没有明确授权重新设计时,使用**严格还原模式**。 + +在严格还原模式下: + +1. 编码前查看用户提供的所有参考资料。 +2. 在 HTML 和 CSS 能力范围内,尽可能准确地还原样式、布局、比例、间距、对齐、颜色、边框、圆角、阴影、字体、字号、字重、行高、图标处理、信息密度和视觉层级。 +3. 保留参考图中的内容结构;只有用户的业务要求明确需要变更时才调整内容。 +4. 不得根据个人偏好引入新的视觉体系、重新排列区域或添加参考图中不存在的装饰。 +5. 有可用图片素材时优先复用。无法准确复现某项素材时,使用最接近的 CSS 或文字替代,并在交付时说明限制。 +6. 多张参考图互相冲突,或业务改动会明显偏离参考图时,先询问用户以哪项要求为准。 + +只有用户明确表示“可以自行思考”“自由设计”“样式自行决定”或其他同等授权时,才使用**自由设计模式**。根据目标业务和终端形成一致、合理的设计,不要默认模仿无关产品。 + +如果用户既提供参考图,又只对部分内容授权自由发挥,则严格保留授权范围之外的参考图特征。 + +### 4. 制作前确认交付方式 + +在开始编写原型前,询问用户选择以下哪种方式: + +- 发布为可从外部访问的链接; +- 直接嵌入聊天回复内。 + +如果用户已经说明交付方式,则不得再次询问。修改同一个原型时也不要重复询问,除非用户要求改变交付方式。 + +选择外链交付时,先创建并验证本地 HTML,再使用当前环境可用的发布或托管能力生成公网链接。不得把本地文件路径描述成公网链接。如果无法发布或发布需要额外授权,应明确说明,并提供聊天内嵌或本地 HTML 文件作为替代方案。 + +选择聊天内嵌时,也要先创建相同的本地 HTML 文件,再使用当前环境支持的 HTML 预览或交互式制品能力展示。如果环境不支持真正的内嵌 HTML,应提供可点击的本地文件链接,并明确说明限制。 + +## 制作原型 + +创建自包含的单文件 HTML,在文件内嵌入 CSS 和 JavaScript。默认不使用构建步骤和远程依赖。只有在用户允许联网依赖,或严格还原参考图确实需要时,才使用远程字体、库或资源。 + +实现演示业务流程所需的交互,例如页面导航、标签切换、弹窗、抽屉、筛选、表单校验、选中状态、状态变更或模拟提交。除非用户明确要求接入真实后端,否则所有数据都保存在本地,并明确属于模拟数据。 + +遵循不同终端的设计要求: + +- PDA:优先考虑触摸操作、单手使用、快速扫描、紧凑信息、拇指易触达的主要操作和受控的页面溢出。 +- PC:优先考虑信息密度、键盘和鼠标操作、稳定的多栏布局、适当的表格或面板,以及清晰的悬停和聚焦状态。 + +保证页面在目标视口内可用。采用语义化 HTML、可见的键盘聚焦状态、明确的表单标签、足够的颜色对比度和减少动态效果的兼容处理;严格还原参考图时,在不破坏主要视觉效果的前提下满足这些要求。 + +## 按固定规则保存 + +始终将完成的文件保存到: + +`docs/prototype_design/design/YYYY-MM-DD--design.html` + +使用当前环境的本地日期生成 `YYYY-MM-DD`。根据业务主题将 `` 转换为简短的小写 ASCII kebab-case 文件名。例如: + +- `docs/prototype_design/design/2026-08-17-warehouse-picking-design.html` +- `docs/prototype_design/design/2026-08-17-customer-dashboard-design.html` + +目录不存在时创建目录。不得覆盖无关的既有原型。如果目标文件已经存在,先检查它是否属于当前原型;只有属于同一原型时才能更新,否则使用更具体的主题名称。 + +## 交付前验证 + +1. 使用目标视口打开 HTML 并检查实际渲染结果。 +2. 操作所有可见控件并走通核心流程。 +3. 检查内容裁切、意外滚动条、资源加载失败、控制台错误、文字难以阅读和控件无法访问等问题。 +4. 严格还原参考图时,对比渲染结果和参考图,优先修正最明显的视觉差异。 +5. 确认文件已保存到规定路径,并且无需构建即可打开。 + +## 汇报结果 + +说明目标终端、视觉模式、已经实现的交互和交付方式,并提供保存后的 HTML 文件链接。严格还原参考图时,只说明实质性的限制或有意保留的差异;没有达到逐像素一致时,不得声称已经做到像素级还原。 diff --git a/.agents/skills/prototype-design/agents/openai.yaml b/.agents/skills/prototype-design/agents/openai.yaml new file mode 100644 index 00000000..33d6cde6 --- /dev/null +++ b/.agents/skills/prototype-design/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "原型设计" + short_description: "根据业务、终端类型和参考图制作可交互 HTML 原型" + default_prompt: "使用 $prototype-design 根据我的需求制作一个可交互的 HTML 产品原型。" diff --git a/docs/prototype_design/design/2026-08-17-sub-package-relation-batch-design.html b/docs/prototype_design/design/2026-08-17-sub-package-relation-batch-design.html new file mode 100644 index 00000000..83f6c1f8 --- /dev/null +++ b/docs/prototype_design/design/2026-08-17-sub-package-relation-batch-design.html @@ -0,0 +1,74 @@ + + + + + + 子卷包装关系 - 批量新增原型 + + + +
+ +
+
管理员
+
首页 / 物流管理 / 子卷包装关系
+
+
子卷包装关系列表
木箱唯一码木箱类型重量(kg)销售订单号客户名称入库日期子卷号操作
BXSN-20260817-001BX-A38.50SO20260817001华东新能源材料有限公司2026-08-17JR-260817-001
BXSN-20260817-002BX-B32.80SO20260817002南方精密科技有限公司2026-08-16JR-260816-018
共 28 条
1
2 3 ›
+
+
+
+ + +
+ + + + diff --git a/nl-module-lms/nl-module-lms-api/src/main/java/cn/code/nl/module/lms/enums/ErrorCodeConstants.java b/nl-module-lms/nl-module-lms-api/src/main/java/cn/code/nl/module/lms/enums/ErrorCodeConstants.java index 1ddd7f45..3c3b9233 100644 --- a/nl-module-lms/nl-module-lms-api/src/main/java/cn/code/nl/module/lms/enums/ErrorCodeConstants.java +++ b/nl-module-lms/nl-module-lms-api/src/main/java/cn/code/nl/module/lms/enums/ErrorCodeConstants.java @@ -53,4 +53,8 @@ public interface ErrorCodeConstants { // ========== 装箱区点位库存 ========== ErrorCode PACKAGE_POINT_NOT_EXISTS = new ErrorCode(200001, "装箱区点位库存不存在"); + // ========== 子卷包装关系 ========== + ErrorCode SUB_PACKAGE_RELATION_NOT_EXISTS = new ErrorCode(300001, "子卷包装关系不存在"); + + } diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/SubPackageRelationController.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/SubPackageRelationController.java new file mode 100644 index 00000000..2b897e9a --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/SubPackageRelationController.java @@ -0,0 +1,104 @@ +package cn.code.nl.module.lms.controller.admin.subpackagerelation; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.framework.common.util.object.BeanUtils; +import static cn.code.nl.framework.common.pojo.CommonResult.success; + +import cn.code.nl.framework.excel.core.util.ExcelUtils; + +import cn.code.nl.framework.apilog.core.annotation.ApiAccessLog; +import static cn.code.nl.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*; +import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO; +import cn.code.nl.module.lms.service.subpackagerelation.SubPackageRelationService; + +@Tag(name = "管理后台 - 子卷包装关系") +@RestController +@RequestMapping("/lms/sub-package-relation") +@Validated +public class SubPackageRelationController { + + @Resource + private SubPackageRelationService subPackageRelationService; + + @PostMapping("/create") + @Operation(summary = "创建子卷包装关系") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:create')") + public CommonResult createSubPackageRelation(@Valid @RequestBody SubPackageRelationSaveReqVO createReqVO) { + return success(subPackageRelationService.createSubPackageRelation(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新子卷包装关系") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:update')") + public CommonResult updateSubPackageRelation(@Valid @RequestBody SubPackageRelationSaveReqVO updateReqVO) { + subPackageRelationService.updateSubPackageRelation(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除子卷包装关系") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:delete')") + public CommonResult deleteSubPackageRelation(@RequestParam("id") Long id) { + subPackageRelationService.deleteSubPackageRelation(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除子卷包装关系") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:delete')") + public CommonResult deleteSubPackageRelationList(@RequestParam("ids") List ids) { + subPackageRelationService.deleteSubPackageRelationListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得子卷包装关系") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:query')") + public CommonResult getSubPackageRelation(@RequestParam("id") Long id) { + SubPackageRelationDO subPackageRelation = subPackageRelationService.getSubPackageRelation(id); + return success(BeanUtils.toBean(subPackageRelation, SubPackageRelationRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得子卷包装关系分页") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:query')") + public CommonResult> getSubPackageRelationPage(@Valid SubPackageRelationPageReqVO pageReqVO) { + PageResult pageResult = subPackageRelationService.getSubPackageRelationPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SubPackageRelationRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出子卷包装关系 Excel") + @PreAuthorize("@ss.hasPermission('lms:sub-package-relation:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSubPackageRelationExcel(@Valid SubPackageRelationPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = subPackageRelationService.getSubPackageRelationPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "子卷包装关系.xls", "数据", SubPackageRelationRespVO.class, + BeanUtils.toBean(list, SubPackageRelationRespVO.class)); + } + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationPageReqVO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationPageReqVO.java new file mode 100644 index 00000000..26c92dab --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationPageReqVO.java @@ -0,0 +1,45 @@ +package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.code.nl.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.code.nl.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 子卷包装关系分页 Request VO") +@Data +public class SubPackageRelationPageReqVO extends PageParam { + + @Schema(description = "木箱唯一码") + private String packageBoxSn; + + @Schema(description = "木箱料号", example = "2") + private String boxType; + + @Schema(description = "销售订单及行号", example = "王五") + private String saleOrderName; + + @Schema(description = "客户编号", example = "王五") + private String customerName; + + @Schema(description = "产品编码", example = "李四") + private String productName; + + @Schema(description = "入库日期") + private String dateOfFgInbound; + + @Schema(description = "子卷号", example = "李四") + private String containerName; + + @Schema(description = "储存地点") + private String extCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationRespVO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationRespVO.java new file mode 100644 index 00000000..cf2abaab --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationRespVO.java @@ -0,0 +1,212 @@ +package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 子卷包装关系 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SubPackageRelationRespVO { + + @Schema(description = "子卷包装标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14551") + @ExcelProperty("子卷包装标识") + private Long id; + + @Schema(description = "木箱唯一码") + @ExcelProperty("木箱唯一码") + private String packageBoxSn; + + @Schema(description = "箱内子卷数量") + @ExcelProperty("箱内子卷数量") + private Integer qualityInBox; + + @Schema(description = "erp木箱号") + @ExcelProperty("erp木箱号") + private String extBoxSn; + + @Schema(description = "木箱自身重量") + @ExcelProperty("木箱自身重量") + private BigDecimal boxWeight; + + @Schema(description = "木箱料号", example = "2") + @ExcelProperty("木箱料号") + private String boxType; + + @Schema(description = "保质期") + @ExcelProperty("保质期") + private String qualityGuaranPeriod; + + @Schema(description = "销售订单及行号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("销售订单及行号") + private String saleOrderName; + + @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("客户编号") + private String customerName; + + @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") + @ExcelProperty("客户名称") + private String customerDescription; + + @Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("产品编码") + private String productName; + + @Schema(description = "产品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") + @ExcelProperty("产品描述") + private String productDescription; + + @Schema(description = "入库日期") + @ExcelProperty("入库日期") + private String dateOfFgInbound; + + @Schema(description = "子卷号", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("子卷号") + private String containerName; + + @Schema(description = "产品规格(幅宽)", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("产品规格(幅宽)") + private String width; + + @Schema(description = "产品厚度") + @ExcelProperty("产品厚度") + private String thickness; + + @Schema(description = "单位面积质量") + @ExcelProperty("单位面积质量") + private BigDecimal massPerUnitArea; + + @Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("净重") + private BigDecimal netWeight; + + @Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("长度") + private BigDecimal length; + + @Schema(description = "制造完成日期") + @ExcelProperty("制造完成日期") + private String dateOfProduction; + + @Schema(description = "计划外分切的子卷", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("计划外分切的子卷") + private String isUnPlanProduction; + + @Schema(description = "子卷的物性值1") + @ExcelProperty("子卷的物性值1") + private String unPlanProductProperty1; + + @Schema(description = "子卷的物性值2") + @ExcelProperty("子卷的物性值2") + private String unPlanProductProperty2; + + @Schema(description = "子卷的物性值3") + @ExcelProperty("子卷的物性值3") + private String unPlanProductProperty3; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("状态") + private String status; + + @Schema(description = "是否需要重打外包装标签") + @ExcelProperty("是否需要重打外包装标签") + private Integer isReprintBoxLabel; + + @Schema(description = "是否需要拆包重打子卷标签") + @ExcelProperty("是否需要拆包重打子卷标签") + private Integer isUnpackBox; + + @Schema(description = "SAP批次", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("SAP批次") + private String sapPcsn; + + @Schema(description = "交货单号") + @ExcelProperty("交货单号") + private String vbeln; + + @Schema(description = "交货单行号") + @ExcelProperty("交货单行号") + private String posnr; + + @Schema(description = "木箱长度") + @ExcelProperty("木箱长度") + private String boxLength; + + @Schema(description = "木箱宽度") + @ExcelProperty("木箱宽度") + private String boxWidth; + + @Schema(description = "木箱高度") + @ExcelProperty("木箱高度") + private String boxHigh; + + @Schema(description = "销售订单描述", example = "你说的对") + @ExcelProperty("销售订单描述") + private String saleOrderDescription; + + @Schema(description = "客户要求规格幅宽") + @ExcelProperty("客户要求规格幅宽") + private String widthStandard; + + @Schema(description = "物料标准厚度") + @ExcelProperty("物料标准厚度") + private String thicknessRequest; + + @Schema(description = "实际木箱自身重量") + @ExcelProperty("实际木箱自身重量") + private BigDecimal realWeight; + + @Schema(description = "包装关系类型", example = "1") + @ExcelProperty("包装关系类型") + private String subType; + + @Schema(description = "客户需求抗拉下限") + @ExcelProperty("客户需求抗拉下限") + private String demandLimit; + + @Schema(description = "内控标准抗拉下限") + @ExcelProperty("内控标准抗拉下限") + private String standardLimit; + + @Schema(description = "生产实际抗拉值") + @ExcelProperty("生产实际抗拉值") + private String actualValue; + + @Schema(description = "解绑删除标识") + @ExcelProperty("解绑删除标识") + private String needDelete; + + @Schema(description = "储存地点", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("储存地点") + private String extCode; + + @Schema(description = "木箱组") + @ExcelProperty("木箱组") + private String boxGroup; + + @Schema(description = "物料类型", example = "1") + @ExcelProperty("物料类型") + private String materialType; + + @Schema(description = "接头数", example = "1") + @ExcelProperty("接头数") + private Long jointType; + + @Schema(description = "是否放行", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否放行") + private Integer isPass; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationSaveReqVO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationSaveReqVO.java new file mode 100644 index 00000000..6a587bc2 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/admin/subpackagerelation/vo/SubPackageRelationSaveReqVO.java @@ -0,0 +1,168 @@ +package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 子卷包装关系新增/修改 Request VO") +@Data +public class SubPackageRelationSaveReqVO { + + @Schema(description = "子卷包装标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14551") + private Long id; + + @Schema(description = "木箱唯一码") + private String packageBoxSn; + + @Schema(description = "箱内子卷数量") + private Integer qualityInBox; + + @Schema(description = "木箱自身重量") + private BigDecimal boxWeight; + + @Schema(description = "木箱料号", example = "2") + private String boxType; + + @Schema(description = "保质期") + private String qualityGuaranPeriod; + + @Schema(description = "销售订单及行号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "销售订单及行号不能为空") + private String saleOrderName; + + @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "客户编号不能为空") + private String customerName; + + @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") + @NotEmpty(message = "客户名称不能为空") + private String customerDescription; + + @Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "产品编码不能为空") + private String productName; + + @Schema(description = "产品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") + @NotEmpty(message = "产品描述不能为空") + private String productDescription; + + @Schema(description = "入库日期") + private String dateOfFgInbound; + + @Schema(description = "子卷号", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "子卷号不能为空") + private String containerName; + + @Schema(description = "产品规格(幅宽)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "产品规格(幅宽)不能为空") + private String width; + + @Schema(description = "产品厚度") + private String thickness; + + @Schema(description = "单位面积质量") + private BigDecimal massPerUnitArea; + + @Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "净重不能为空") + private BigDecimal netWeight; + + @Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "长度不能为空") + private BigDecimal length; + + @Schema(description = "制造完成日期") + private String dateOfProduction; + + @Schema(description = "计划外分切的子卷", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "计划外分切的子卷不能为空") + private String isUnPlanProduction; + + @Schema(description = "子卷的物性值1") + private String unPlanProductProperty1; + + @Schema(description = "子卷的物性值2") + private String unPlanProductProperty2; + + @Schema(description = "子卷的物性值3") + private String unPlanProductProperty3; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "状态不能为空") + private String status; + + @Schema(description = "是否需要重打外包装标签") + private Integer isReprintBoxLabel; + + @Schema(description = "是否需要拆包重打子卷标签") + private Integer isUnpackBox; + + @Schema(description = "SAP批次", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "SAP批次不能为空") + private String sapPcsn; + + @Schema(description = "交货单号") + private String vbeln; + + @Schema(description = "交货单行号") + private String posnr; + + @Schema(description = "木箱长度") + private String boxLength; + + @Schema(description = "木箱宽度") + private String boxWidth; + + @Schema(description = "木箱高度") + private String boxHigh; + + @Schema(description = "销售订单描述", example = "你说的对") + private String saleOrderDescription; + + @Schema(description = "客户要求规格幅宽") + private String widthStandard; + + @Schema(description = "物料标准厚度") + private String thicknessRequest; + + @Schema(description = "实际木箱自身重量") + private BigDecimal realWeight; + + @Schema(description = "包装关系类型", example = "1") + private String subType; + + @Schema(description = "客户需求抗拉下限") + private String demandLimit; + + @Schema(description = "内控标准抗拉下限") + private String standardLimit; + + @Schema(description = "生产实际抗拉值") + private String actualValue; + + @Schema(description = "解绑删除标识") + private String needDelete; + + @Schema(description = "储存地点", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "储存地点不能为空") + private String extCode; + + @Schema(description = "木箱组") + private String boxGroup; + + @Schema(description = "物料类型", example = "1") + private String materialType; + + @Schema(description = "接头数", example = "1") + private Long jointType; + + @Schema(description = "是否放行", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否放行不能为空") + private Integer isPass; + +} \ No newline at end of file diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/PackagePdaController.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/PackagePdaController.java new file mode 100644 index 00000000..97d1f90a --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/PackagePdaController.java @@ -0,0 +1,65 @@ +package cn.code.nl.module.lms.controller.pda; + +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.module.lms.controller.admin.packagepoint.vo.PackagePointRespVO; +import cn.code.nl.module.lms.controller.pda.vo.ManaQualityCheckReqVO; +import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO; +import cn.code.nl.module.lms.service.packagepoint.PackagePdaService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; +import jakarta.validation.Valid; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static cn.code.nl.framework.common.pojo.CommonResult.success; + +/** + * + * @Author: liyongde + * @Date: 2026/8/13 18:54 + */ +@Tag(name = "手持接口 - 打包管理") +@RestController +@RequestMapping("/lms/pda/package") +@Validated +public class PackagePdaController { + + /** PDA 装箱业务服务 */ + @Resource + private PackagePdaService packagePdaService; + + /** + * 根据点位编码查询装箱区点位信息 + * + * @param manaQualityCheckReqVO 查询参数 + * @return 点位编码、子卷号和载具号 + */ + @PostMapping("/query-point-info") + @Operation(summary = "查询点位信息") + @PermitAll + public CommonResult queryPointInfo( + @Valid @RequestBody ManaQualityCheckReqVO manaQualityCheckReqVO) { + PackagePointDO packagePoint = packagePdaService.queryPointInfo(manaQualityCheckReqVO.getPointCode()); + PackagePointRespVO response = new PackagePointRespVO(); + response.setPointCode(packagePoint.getPointCode()); + response.setContainerName(packagePoint.getContainerName()); + response.setVehicleCode(packagePoint.getVehicleCode()); + return success(response); + } + + + + @PostMapping("/quality-check") + @Operation(summary = "人工质检") + @PermitAll + public CommonResult executeManualQualityCheck(@Valid @RequestBody ManaQualityCheckReqVO manaQualityCheckReqVO) { +// packagePdaService.executeManualQualityCheck(manaQualityCheckReqVO) + return success("操作成功!"); + } + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/vo/ManaQualityCheckReqVO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/vo/ManaQualityCheckReqVO.java new file mode 100644 index 00000000..76c0ee8b --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/controller/pda/vo/ManaQualityCheckReqVO.java @@ -0,0 +1,26 @@ +package cn.code.nl.module.lms.controller.pda.vo; + +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +/** + * 人工质检 + * @Author: liyongde + * @Date: 2026/8/13 19:06 + */ +@Data +public class ManaQualityCheckReqVO { + + /** 点位编码 */ + @NotEmpty(message = "点位编码不能为空") + private String pointCode; + + /** 子卷号 */ + private String containerName; + + /** 架子号 */ + private String vehicleCode; + + /** 是否合格 */ + private Boolean isQualified; +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/slittingproductionplan/SlittingproductionplanDO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/slittingproductionplan/SlittingproductionplanDO.java index ee5a1a90..6ea421d8 100644 --- a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/slittingproductionplan/SlittingproductionplanDO.java +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/slittingproductionplan/SlittingproductionplanDO.java @@ -40,6 +40,14 @@ public class SlittingproductionplanDO extends BaseDO { * 产品编码 */ private String productName; + /** + * 子卷号 + */ + private String containerName; + /** + * 外部子卷号 + */ + private String extContainerName; /** * 产品描述 */ diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/subpackagerelation/SubPackageRelationDO.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/subpackagerelation/SubPackageRelationDO.java new file mode 100644 index 00000000..e2fcaa54 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/dataobject/subpackagerelation/SubPackageRelationDO.java @@ -0,0 +1,221 @@ +package cn.code.nl.module.lms.dal.dataobject.subpackagerelation; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.code.nl.framework.mybatis.core.dataobject.BaseDO; + +/** + * 子卷包装关系 DO + * + * @author 诺力管理员 + */ +@TableName("lms_sub_package_relation") +@KeySequence("lms_sub_package_relation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SubPackageRelationDO extends BaseDO { + + /** + * 子卷包装标识 + */ + @TableId + private Long id; + /** + * 木箱唯一码 + */ + private String packageBoxSn; + /** + * 箱内子卷数量 + */ + private Integer qualityInBox; + /** + * 木箱自身重量 + */ + private BigDecimal boxWeight; + /** + * 木箱料号 + */ + private String boxType; + /** + * 保质期 + */ + private String qualityGuaranPeriod; + /** + * 销售订单及行号 + */ + private String saleOrderName; + /** + * 客户编号 + */ + private String customerName; + /** + * 客户名称 + */ + private String customerDescription; + /** + * 产品编码 + */ + private String productName; + /** + * 产品描述 + */ + private String productDescription; + /** + * 入库日期 + */ + private String dateOfFgInbound; + /** + * 子卷号 + */ + private String containerName; + /** + * 产品规格(幅宽) + */ + private String width; + /** + * 产品厚度 + */ + private String thickness; + /** + * 单位面积质量 + */ + private BigDecimal massPerUnitArea; + /** + * 净重 + */ + private BigDecimal netWeight; + /** + * 长度 + */ + private BigDecimal length; + /** + * 制造完成日期 + */ + private String dateOfProduction; + /** + * 计划外分切的子卷 + */ + private String isUnPlanProduction; + /** + * 子卷的物性值1 + */ + private String unPlanProductProperty1; + /** + * 子卷的物性值2 + */ + private String unPlanProductProperty2; + /** + * 子卷的物性值3 + */ + private String unPlanProductProperty3; + /** + * 备注 + */ + private String remark; + /** + * 状态 + */ + private String status; + /** + * 是否需要重打外包装标签 + */ + private Integer isReprintBoxLabel; + /** + * 是否需要拆包重打子卷标签 + */ + private Integer isUnpackBox; + /** + * SAP批次 + */ + private String sapPcsn; + /** + * 交货单号 + */ + private String vbeln; + /** + * 交货单行号 + */ + private String posnr; + /** + * 木箱长度 + */ + private String boxLength; + /** + * 木箱宽度 + */ + private String boxWidth; + /** + * 木箱高度 + */ + private String boxHigh; + /** + * 销售订单描述 + */ + private String saleOrderDescription; + /** + * 客户要求规格幅宽 + */ + private String widthStandard; + /** + * 物料标准厚度 + */ + private String thicknessRequest; + /** + * 实际木箱自身重量 + */ + private BigDecimal realWeight; + /** + * 包装关系类型 + */ + private String subType; + /** + * 客户需求抗拉下限 + */ + private String demandLimit; + /** + * 内控标准抗拉下限 + */ + private String standardLimit; + /** + * 生产实际抗拉值 + */ + private String actualValue; + /** + * 解绑删除标识 + */ + private String needDelete; + /** + * 储存地点 + */ + private String extCode; + /** + * 木箱组 + */ + private String boxGroup; + /** + * 物料类型 + */ + private String materialType; + /** + * 接头数 + */ + private Long jointType; + /** + * 是否放行 + */ + private Integer isPass; + + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/subpackagerelation/SubPackageRelationMapper.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/subpackagerelation/SubPackageRelationMapper.java new file mode 100644 index 00000000..b3c1aedf --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/subpackagerelation/SubPackageRelationMapper.java @@ -0,0 +1,34 @@ +package cn.code.nl.module.lms.dal.mysql.subpackagerelation; + +import java.util.*; + +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX; +import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO; +import org.apache.ibatis.annotations.Mapper; +import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*; + +/** + * 子卷包装关系 Mapper + * + * @author 诺力管理员 + */ +@Mapper +public interface SubPackageRelationMapper extends BaseMapperX { + + default PageResult selectPage(SubPackageRelationPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(SubPackageRelationDO::getPackageBoxSn, reqVO.getPackageBoxSn()) + .eqIfPresent(SubPackageRelationDO::getBoxType, reqVO.getBoxType()) + .likeIfPresent(SubPackageRelationDO::getSaleOrderName, reqVO.getSaleOrderName()) + .likeIfPresent(SubPackageRelationDO::getCustomerName, reqVO.getCustomerName()) + .likeIfPresent(SubPackageRelationDO::getProductName, reqVO.getProductName()) + .eqIfPresent(SubPackageRelationDO::getDateOfFgInbound, reqVO.getDateOfFgInbound()) + .likeIfPresent(SubPackageRelationDO::getContainerName, reqVO.getContainerName()) + .eqIfPresent(SubPackageRelationDO::getExtCode, reqVO.getExtCode()) + .betweenIfPresent(SubPackageRelationDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(SubPackageRelationDO::getId)); + } + +} \ No newline at end of file diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaService.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaService.java new file mode 100644 index 00000000..044a96bc --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaService.java @@ -0,0 +1,19 @@ +package cn.code.nl.module.lms.service.packagepoint; + +import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO; + +/** + * + * @Author: liyongde + * @Date: 2026/8/13 18:56 + */ +public interface PackagePdaService { + + /** + * 根据点位编码查询装箱区点位信息 + * + * @param pointCode 点位编码 + * @return 装箱区点位信息 + */ + PackagePointDO queryPointInfo(String pointCode); +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaServiceImpl.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaServiceImpl.java new file mode 100644 index 00000000..9c6321b1 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/packagepoint/PackagePdaServiceImpl.java @@ -0,0 +1,36 @@ +package cn.code.nl.module.lms.service.packagepoint; + +import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.code.nl.module.lms.enums.ErrorCodeConstants.PACKAGE_POINT_NOT_EXISTS; + +/** + * + * @Author: liyongde + * @Date: 2026/8/13 18:56 + */ +@Service +public class PackagePdaServiceImpl implements PackagePdaService { + + /** 装箱区点位服务 */ + @Resource + private PackagePointService packagePointService; + + /** + * 根据点位编码查询装箱区点位信息 + * + * @param pointCode 点位编码 + * @return 装箱区点位信息 + */ + @Override + public PackagePointDO queryPointInfo(String pointCode) { + PackagePointDO packagePoint = packagePointService.getPackagePointByCode(pointCode, false); + if (packagePoint == null) { + throw exception(PACKAGE_POINT_NOT_EXISTS); + } + return packagePoint; + } +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationService.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationService.java new file mode 100644 index 00000000..7b03919c --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationService.java @@ -0,0 +1,62 @@ +package cn.code.nl.module.lms.service.subpackagerelation; + +import java.util.*; +import jakarta.validation.*; +import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*; +import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; + +/** + * 子卷包装关系 Service 接口 + * + * @author 诺力管理员 + */ +public interface SubPackageRelationService { + + /** + * 创建子卷包装关系 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSubPackageRelation(@Valid SubPackageRelationSaveReqVO createReqVO); + + /** + * 更新子卷包装关系 + * + * @param updateReqVO 更新信息 + */ + void updateSubPackageRelation(@Valid SubPackageRelationSaveReqVO updateReqVO); + + /** + * 删除子卷包装关系 + * + * @param id 编号 + */ + void deleteSubPackageRelation(Long id); + + /** + * 批量删除子卷包装关系 + * + * @param ids 编号 + */ + void deleteSubPackageRelationListByIds(List ids); + + /** + * 获得子卷包装关系 + * + * @param id 编号 + * @return 子卷包装关系 + */ + SubPackageRelationDO getSubPackageRelation(Long id); + + /** + * 获得子卷包装关系分页 + * + * @param pageReqVO 分页查询 + * @return 子卷包装关系分页 + */ + PageResult getSubPackageRelationPage(SubPackageRelationPageReqVO pageReqVO); + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationServiceImpl.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationServiceImpl.java new file mode 100644 index 00000000..17d0ea48 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/subpackagerelation/SubPackageRelationServiceImpl.java @@ -0,0 +1,85 @@ +package cn.code.nl.module.lms.service.subpackagerelation; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*; +import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.util.object.BeanUtils; + +import cn.code.nl.module.lms.dal.mysql.subpackagerelation.SubPackageRelationMapper; + +import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList; +import static cn.code.nl.module.lms.enums.ErrorCodeConstants.*; + +/** + * 子卷包装关系 Service 实现类 + * + * @author 诺力管理员 + */ +@Service +@Validated +public class SubPackageRelationServiceImpl implements SubPackageRelationService { + + @Resource + private SubPackageRelationMapper subPackageRelationMapper; + + @Override + public Long createSubPackageRelation(SubPackageRelationSaveReqVO createReqVO) { + // 插入 + SubPackageRelationDO subPackageRelation = BeanUtils.toBean(createReqVO, SubPackageRelationDO.class); + subPackageRelationMapper.insert(subPackageRelation); + + // 返回 + return subPackageRelation.getId(); + } + + @Override + public void updateSubPackageRelation(SubPackageRelationSaveReqVO updateReqVO) { + // 校验存在 + validateSubPackageRelationExists(updateReqVO.getId()); + // 更新 + SubPackageRelationDO updateObj = BeanUtils.toBean(updateReqVO, SubPackageRelationDO.class); + subPackageRelationMapper.updateById(updateObj); + } + + @Override + public void deleteSubPackageRelation(Long id) { + // 校验存在 + validateSubPackageRelationExists(id); + // 删除 + subPackageRelationMapper.deleteById(id); + } + + @Override + public void deleteSubPackageRelationListByIds(List ids) { + // 删除 + subPackageRelationMapper.deleteByIds(ids); + } + + + private void validateSubPackageRelationExists(Long id) { + if (subPackageRelationMapper.selectById(id) == null) { + throw exception(SUB_PACKAGE_RELATION_NOT_EXISTS); + } + } + + @Override + public SubPackageRelationDO getSubPackageRelation(Long id) { + return subPackageRelationMapper.selectById(id); + } + + @Override + public PageResult getSubPackageRelationPage(SubPackageRelationPageReqVO pageReqVO) { + return subPackageRelationMapper.selectPage(pageReqVO); + } + +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/resources/mapper/subpackagerelation/SubPackageRelationMapper.xml b/nl-module-lms/nl-module-lms-server/src/main/resources/mapper/subpackagerelation/SubPackageRelationMapper.xml new file mode 100644 index 00000000..771270e0 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/resources/mapper/subpackagerelation/SubPackageRelationMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/nl-module-task/nl-module-task-api/src/main/java/cn/code/nl/module/task/enums/TaskOwnerServiceEnum.java b/nl-module-task/nl-module-task-api/src/main/java/cn/code/nl/module/task/enums/TaskOwnerServiceEnum.java index 9c476647..b6722b68 100644 --- a/nl-module-task/nl-module-task-api/src/main/java/cn/code/nl/module/task/enums/TaskOwnerServiceEnum.java +++ b/nl-module-task/nl-module-task-api/src/main/java/cn/code/nl/module/task/enums/TaskOwnerServiceEnum.java @@ -15,14 +15,10 @@ public enum TaskOwnerServiceEnum { LMS("lms", "LMS"), WMS("wms", "WMS"); - private String code; - - private String name; - /** * MQ Topic 前缀 */ - private final String topicPrefix; + private final String code; /** * 服务注册名称 @@ -51,6 +47,6 @@ public enum TaskOwnerServiceEnum { * @return 完整 Topic */ public String buildTopic(String topic) { - return topicPrefix + "_" + topic; + return code + "_" + topic; } } diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/lms/subpackagerelation/index.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/lms/subpackagerelation/index.ts new file mode 100644 index 00000000..ff2a136e --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/lms/subpackagerelation/index.ts @@ -0,0 +1,101 @@ +import type { PageParam, PageResult } from '@vben/request'; + +import { requestClient } from '#/api/request'; + +export namespace LmsSubPackageRelationApi { + /** 子卷包装关系信息 */ + export interface SubPackageRelation { + id: number; // 子卷包装标识 + packageBoxSn: string; // 木箱唯一码 + qualityInBox: number; // 箱内子卷数量 + extBoxSn: string; // erp木箱号 + boxWeight: number; // 木箱自身重量 + boxType: string; // 木箱料号 + qualityGuaranPeriod: string; // 保质期 + saleOrderName?: string; // 销售订单及行号 + customerName?: string; // 客户编号 + customerDescription?: string; // 客户名称 + productName?: string; // 产品编码 + productDescription?: string; // 产品描述 + dateOfFgInbound: string; // 入库日期 + containerName?: string; // 子卷号 + width?: string; // 产品规格(幅宽) + thickness: string; // 产品厚度 + massPerUnitArea: number; // 单位面积质量 + netWeight?: number; // 净重 + length?: number; // 长度 + dateOfProduction: string; // 制造完成日期 + isUnPlanProduction?: string; // 计划外分切的子卷 + unPlanProductProperty1: string; // 子卷的物性值1 + unPlanProductProperty2: string; // 子卷的物性值2 + unPlanProductProperty3: string; // 子卷的物性值3 + remark: string; // 备注 + status?: string; // 状态 + isReprintBoxLabel: number; // 是否需要重打外包装标签 + isUnpackBox: number; // 是否需要拆包重打子卷标签 + sapPcsn?: string; // SAP批次 + vbeln: string; // 交货单号 + posnr: string; // 交货单行号 + boxLength: string; // 木箱长度 + boxWidth: string; // 木箱宽度 + boxHigh: string; // 木箱高度 + saleOrderDescription: string; // 销售订单描述 + widthStandard: string; // 客户要求规格幅宽 + thicknessRequest: string; // 物料标准厚度 + realWeight: number; // 实际木箱自身重量 + subType: string; // 包装关系类型 + demandLimit: string; // 客户需求抗拉下限 + standardLimit: string; // 内控标准抗拉下限 + actualValue: string; // 生产实际抗拉值 + needDelete: string; // 解绑删除标识 + extCode?: string; // 储存地点 + boxGroup: string; // 木箱组 + materialType: string; // 物料类型 + jointType: number; // 接头数 + isPass?: number; // 是否放行 + } +} + +/** 查询子卷包装关系分页 */ +export function getSubPackageRelationPage(params: PageParam) { + return requestClient.get>( + '/lms/sub-package-relation/page', + { params }, + ); +} + +/** 查询子卷包装关系详情 */ +export function getSubPackageRelation(id: number) { + return requestClient.get( + `/lms/sub-package-relation/get?id=${id}`, + ); +} + +/** 新增子卷包装关系 */ +export function createSubPackageRelation(data: LmsSubPackageRelationApi.SubPackageRelation) { + return requestClient.post('/lms/sub-package-relation/create', data); +} + +/** 修改子卷包装关系 */ +export function updateSubPackageRelation(data: LmsSubPackageRelationApi.SubPackageRelation) { + return requestClient.put('/lms/sub-package-relation/update', data); +} + +/** 删除子卷包装关系 */ +export function deleteSubPackageRelation(id: number) { + return requestClient.delete(`/lms/sub-package-relation/delete?id=${id}`); +} + +/** 批量删除子卷包装关系 */ +export function deleteSubPackageRelationList(ids: number[]) { + return requestClient.delete( + `/lms/sub-package-relation/delete-list?ids=${ids.join(',')}`, + ); +} + +/** 导出子卷包装关系 */ +export function exportSubPackageRelation(params: any) { + return requestClient.download('/lms/sub-package-relation/export-excel', { params }); +} + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/packagepoint/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/packagepoint/data.ts index 953d2160..4dd2ec32 100644 --- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/packagepoint/data.ts +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/packagepoint/data.ts @@ -283,6 +283,17 @@ export function useGridColumns(): VxeTableGridOptions false, + }, + }, + { + fieldName: 'packageBoxSn', + label: '木箱唯一码', + component: 'Input', + componentProps: { + placeholder: '请输入木箱唯一码', + }, + }, + { + fieldName: 'qualityInBox', + label: '箱内子卷数量', + component: 'Input', + componentProps: { + placeholder: '请输入箱内子卷数量', + }, + }, + { + fieldName: 'extBoxSn', + label: 'erp木箱号', + component: 'Input', + componentProps: { + placeholder: '请输入erp木箱号', + }, + }, + { + fieldName: 'boxWeight', + label: '木箱自身重量', + component: 'Input', + componentProps: { + placeholder: '请输入木箱自身重量', + }, + }, + { + fieldName: 'boxType', + label: '木箱料号', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择木箱料号', + }, + }, + { + fieldName: 'qualityGuaranPeriod', + label: '保质期', + component: 'Input', + componentProps: { + placeholder: '请输入保质期', + }, + }, + { + fieldName: 'saleOrderName', + label: '销售订单及行号', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入销售订单及行号', + }, + }, + { + fieldName: 'customerName', + label: '客户编号', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入客户编号', + }, + }, + { + fieldName: 'customerDescription', + label: '客户名称', + rules: 'required', + component: 'RichTextarea', + }, + { + fieldName: 'productName', + label: '产品编码', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入产品编码', + }, + }, + { + fieldName: 'productDescription', + label: '产品描述', + rules: 'required', + component: 'RichTextarea', + }, + { + fieldName: 'dateOfFgInbound', + label: '入库日期', + component: 'Input', + componentProps: { + placeholder: '请输入入库日期', + }, + }, + { + fieldName: 'containerName', + label: '子卷号', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入子卷号', + }, + }, + { + fieldName: 'width', + label: '产品规格(幅宽)', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入产品规格(幅宽)', + }, + }, + { + fieldName: 'thickness', + label: '产品厚度', + component: 'Input', + componentProps: { + placeholder: '请输入产品厚度', + }, + }, + { + fieldName: 'massPerUnitArea', + label: '单位面积质量', + component: 'Input', + componentProps: { + placeholder: '请输入单位面积质量', + }, + }, + { + fieldName: 'netWeight', + label: '净重', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入净重', + }, + }, + { + fieldName: 'length', + label: '长度', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入长度', + }, + }, + { + fieldName: 'dateOfProduction', + label: '制造完成日期', + component: 'Input', + componentProps: { + placeholder: '请输入制造完成日期', + }, + }, + { + fieldName: 'isUnPlanProduction', + label: '计划外分切的子卷', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入计划外分切的子卷', + }, + }, + { + fieldName: 'unPlanProductProperty1', + label: '子卷的物性值1', + component: 'Input', + componentProps: { + placeholder: '请输入子卷的物性值1', + }, + }, + { + fieldName: 'unPlanProductProperty2', + label: '子卷的物性值2', + component: 'Input', + componentProps: { + placeholder: '请输入子卷的物性值2', + }, + }, + { + fieldName: 'unPlanProductProperty3', + label: '子卷的物性值3', + component: 'Input', + componentProps: { + placeholder: '请输入子卷的物性值3', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Input', + componentProps: { + placeholder: '请输入备注', + }, + }, + { + fieldName: 'status', + label: '状态', + rules: 'required', + component: 'RadioGroup', + componentProps: { + options: [], + buttonStyle: 'solid', + optionType: 'button', + }, + }, + { + fieldName: 'isReprintBoxLabel', + label: '是否需要重打外包装标签', + component: 'Input', + componentProps: { + placeholder: '请输入是否需要重打外包装标签', + }, + }, + { + fieldName: 'isUnpackBox', + label: '是否需要拆包重打子卷标签', + component: 'Input', + componentProps: { + placeholder: '请输入是否需要拆包重打子卷标签', + }, + }, + { + fieldName: 'sapPcsn', + label: 'SAP批次', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入SAP批次', + }, + }, + { + fieldName: 'vbeln', + label: '交货单号', + component: 'Input', + componentProps: { + placeholder: '请输入交货单号', + }, + }, + { + fieldName: 'posnr', + label: '交货单行号', + component: 'Input', + componentProps: { + placeholder: '请输入交货单行号', + }, + }, + { + fieldName: 'boxLength', + label: '木箱长度', + component: 'Input', + componentProps: { + placeholder: '请输入木箱长度', + }, + }, + { + fieldName: 'boxWidth', + label: '木箱宽度', + component: 'Input', + componentProps: { + placeholder: '请输入木箱宽度', + }, + }, + { + fieldName: 'boxHigh', + label: '木箱高度', + component: 'Input', + componentProps: { + placeholder: '请输入木箱高度', + }, + }, + { + fieldName: 'saleOrderDescription', + label: '销售订单描述', + component: 'RichTextarea', + }, + { + fieldName: 'widthStandard', + label: '客户要求规格幅宽', + component: 'Input', + componentProps: { + placeholder: '请输入客户要求规格幅宽', + }, + }, + { + fieldName: 'thicknessRequest', + label: '物料标准厚度', + component: 'Input', + componentProps: { + placeholder: '请输入物料标准厚度', + }, + }, + { + fieldName: 'realWeight', + label: '实际木箱自身重量', + component: 'Input', + componentProps: { + placeholder: '请输入实际木箱自身重量', + }, + }, + { + fieldName: 'subType', + label: '包装关系类型', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择包装关系类型', + }, + }, + { + fieldName: 'demandLimit', + label: '客户需求抗拉下限', + component: 'Input', + componentProps: { + placeholder: '请输入客户需求抗拉下限', + }, + }, + { + fieldName: 'standardLimit', + label: '内控标准抗拉下限', + component: 'Input', + componentProps: { + placeholder: '请输入内控标准抗拉下限', + }, + }, + { + fieldName: 'actualValue', + label: '生产实际抗拉值', + component: 'Input', + componentProps: { + placeholder: '请输入生产实际抗拉值', + }, + }, + { + fieldName: 'needDelete', + label: '解绑删除标识', + component: 'Input', + componentProps: { + placeholder: '请输入解绑删除标识', + }, + }, + { + fieldName: 'extCode', + label: '储存地点', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入储存地点', + }, + }, + { + fieldName: 'boxGroup', + label: '木箱组', + component: 'Input', + componentProps: { + placeholder: '请输入木箱组', + }, + }, + { + fieldName: 'materialType', + label: '物料类型', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择物料类型', + }, + }, + { + fieldName: 'jointType', + label: '接头数', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择接头数', + }, + }, + { + fieldName: 'isPass', + label: '是否放行', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入是否放行', + }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'packageBoxSn', + label: '木箱唯一码', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入木箱唯一码', + }, + }, + { + fieldName: 'boxType', + label: '木箱料号', + component: 'Select', + componentProps: { + allowClear: true, + options: [], + placeholder: '请选择木箱料号', + }, + }, + { + fieldName: 'saleOrderName', + label: '销售订单及行号', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入销售订单及行号', + }, + }, + { + fieldName: 'customerName', + label: '客户编号', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入客户编号', + }, + }, + { + fieldName: 'productName', + label: '产品编码', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入产品编码', + }, + }, + { + fieldName: 'dateOfFgInbound', + label: '入库日期', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入入库日期', + }, + }, + { + fieldName: 'containerName', + label: '子卷号', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入子卷号', + }, + }, + { + fieldName: 'extCode', + label: '储存地点', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入储存地点', + }, + }, + { + fieldName: 'createTime', + label: '创建时间', + component: 'RangePicker', + defaultValue: [ + dayjs().subtract(7, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'), + dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss'), + ], + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { type: 'checkbox', width: 40 }, + { + field: 'id', + title: '子卷包装标识', + minWidth: 120, + }, + { + field: 'packageBoxSn', + title: '木箱唯一码', + minWidth: 120, + }, + { + field: 'qualityInBox', + title: '箱内子卷数量', + minWidth: 120, + }, + { + field: 'boxWeight', + title: '木箱自身重量', + minWidth: 120, + }, + { + field: 'boxType', + title: '木箱料号', + minWidth: 120, + }, + { + field: 'qualityGuaranPeriod', + title: '保质期', + minWidth: 120, + }, + { + field: 'saleOrderName', + title: '销售订单及行号', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户编号', + minWidth: 120, + }, + { + field: 'customerDescription', + title: '客户名称', + minWidth: 120, + }, + { + field: 'productName', + title: '产品编码', + minWidth: 120, + }, + { + field: 'productDescription', + title: '产品描述', + minWidth: 120, + }, + { + field: 'dateOfFgInbound', + title: '入库日期', + minWidth: 120, + }, + { + field: 'containerName', + title: '子卷号', + minWidth: 120, + }, + { + field: 'width', + title: '产品规格(幅宽)', + minWidth: 120, + }, + { + field: 'thickness', + title: '产品厚度', + minWidth: 120, + }, + { + field: 'massPerUnitArea', + title: '单位面积质量', + minWidth: 120, + }, + { + field: 'netWeight', + title: '净重', + minWidth: 120, + }, + { + field: 'length', + title: '长度', + minWidth: 120, + }, + { + field: 'dateOfProduction', + title: '制造完成日期', + minWidth: 120, + }, + { + field: 'isUnPlanProduction', + title: '计划外分切的子卷', + minWidth: 120, + }, + { + field: 'unPlanProductProperty1', + title: '子卷的物性值1', + minWidth: 120, + }, + { + field: 'unPlanProductProperty2', + title: '子卷的物性值2', + minWidth: 120, + }, + { + field: 'unPlanProductProperty3', + title: '子卷的物性值3', + minWidth: 120, + }, + { + field: 'remark', + title: '备注', + minWidth: 120, + }, + { + field: 'status', + title: '状态', + minWidth: 120, + }, + { + field: 'isReprintBoxLabel', + title: '是否需要重打外包装标签', + minWidth: 120, + }, + { + field: 'isUnpackBox', + title: '是否需要拆包重打子卷标签', + minWidth: 120, + }, + { + field: 'sapPcsn', + title: 'SAP批次', + minWidth: 120, + }, + { + field: 'vbeln', + title: '交货单号', + minWidth: 120, + }, + { + field: 'posnr', + title: '交货单行号', + minWidth: 120, + }, + { + field: 'boxLength', + title: '木箱长度', + minWidth: 120, + }, + { + field: 'boxWidth', + title: '木箱宽度', + minWidth: 120, + }, + { + field: 'boxHigh', + title: '木箱高度', + minWidth: 120, + }, + { + field: 'saleOrderDescription', + title: '销售订单描述', + minWidth: 120, + }, + { + field: 'widthStandard', + title: '客户要求规格幅宽', + minWidth: 120, + }, + { + field: 'thicknessRequest', + title: '物料标准厚度', + minWidth: 120, + }, + { + field: 'realWeight', + title: '实际木箱自身重量', + minWidth: 120, + }, + { + field: 'subType', + title: '包装关系类型', + minWidth: 120, + }, + { + field: 'demandLimit', + title: '客户需求抗拉下限', + minWidth: 120, + }, + { + field: 'standardLimit', + title: '内控标准抗拉下限', + minWidth: 120, + }, + { + field: 'actualValue', + title: '生产实际抗拉值', + minWidth: 120, + }, + { + field: 'needDelete', + title: '解绑删除标识', + minWidth: 120, + }, + { + field: 'extCode', + title: '储存地点', + minWidth: 120, + }, + { + field: 'boxGroup', + title: '木箱组', + minWidth: 120, + }, + { + field: 'materialType', + title: '物料类型', + minWidth: 120, + }, + { + field: 'jointType', + title: '接头数', + minWidth: 120, + }, + { + field: 'isPass', + title: '是否放行', + minWidth: 120, + }, + { + field: 'createTime', + title: '创建时间', + minWidth: 120, + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 200, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/index.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/index.vue new file mode 100644 index 00000000..70446746 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/modules/form.vue new file mode 100644 index 00000000..73de7909 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/lms/subpackagerelation/modules/form.vue @@ -0,0 +1,82 @@ + + + diff --git a/sql/mysql/lms_sub_package_relation.sql b/sql/mysql/lms_sub_package_relation.sql new file mode 100644 index 00000000..89d14965 --- /dev/null +++ b/sql/mysql/lms_sub_package_relation.sql @@ -0,0 +1,72 @@ +-- auto-generated definition +create table lms_sub_package_relation +( + id bigint not null comment '子卷包装标识' + primary key, + package_box_sn varchar(50) null comment '木箱唯一码', + quality_in_box decimal(5) null comment '箱内子卷数量', + box_weight decimal(18, 6) null comment '木箱自身重量', + quality_guaran_period varchar(20) null comment '保质期', + sale_order_name varchar(20) not null comment '销售订单及行号', + customer_name varchar(50) not null comment '客户编号', + customer_description varchar(50) not null comment '客户名称', + product_name varchar(20) not null comment '产品编码', + product_description varchar(50) not null comment '产品描述', + date_of_FG_inbound char(10) null comment '入库日期', + container_name varchar(30) not null comment '子卷号', + width varchar(20) not null comment '产品规格(幅宽)', + thickness varchar(20) null comment '产品厚度', + mass_per_unit_area decimal(18, 6) null comment '单位面积质量', + net_weight decimal(18, 6) not null comment '净重', + length decimal(18, 6) not null comment '长度', + date_of_production char(10) null comment '制造完成日期', + is_un_plan_production char default '0' not null comment '计划外分切的子卷', + un_plan_product_property1 varchar(2000) null comment '子卷的物性值1', + un_plan_product_property2 varchar(2000) null comment '子卷的物性值2', + un_plan_product_property3 varchar(2000) null comment '子卷的物性值3', + remark varchar(1000) null comment '备注', + status varchar(2) default '0' not null comment '状态', + is_reprint_box_label tinyint null comment '是否需要重打外包装标签', + is_unpack_box tinyint null comment '是否需要拆包重打子卷标签', + box_type varchar(50) null comment '木箱料号', + sap_pcsn varchar(20) not null comment 'SAP批次', + vbeln varchar(50) null comment '交货单号', + posnr varchar(50) null comment '交货单行号', + box_length varchar(50) null comment '木箱长度', + box_width varchar(50) null comment '木箱宽度', + box_high varchar(50) null comment '木箱高度', + sale_order_description varchar(1000) null comment '销售订单描述', + width_standard varchar(20) null comment '客户要求规格幅宽', + thickness_request varchar(20) null comment '物料标准厚度', + real_weight decimal(18, 6) null comment '实际木箱自身重量', + sub_type char null comment '包装关系类型', + demand_limit varchar(50) null comment '客户需求抗拉下限', + standard_limit varchar(50) null comment '内控标准抗拉下限', + actual_value varchar(50) null comment '生产实际抗拉值', + need_delete char(2) null comment '解绑删除标识', + ext_code varchar(10) default 'AC01' not null comment '储存地点', + box_group varchar(20) default '0' null comment '木箱组', + material_type varchar(10) null comment '物料类型', + joint_type bigint unsigned default '0' null comment '接头数', + is_pass tinyint default 1 not null comment '是否放行', + creator varchar(64) default '' null comment '创建者', + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', + updater varchar(64) default '' null comment '更新者', + update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间' +) comment '子卷包装关系表' collate = utf8_bin; + +create index boxType + on lms_sub_package_relation (box_type); + +create index containerName + on lms_sub_package_relation (container_name); + +create index customer_name + on lms_sub_package_relation (customer_name); + +create index packageSn + on lms_sub_package_relation (package_box_sn); + +create index sapPcsn + on lms_sub_package_relation (sap_pcsn); +