From 1cfa50b78d7c507016ceda5edda96b8183d5727d Mon Sep 17 00:00:00 2001 From: sunjianxi <839419401@qq.com> Date: Thu, 18 Dec 2025 18:22:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E4=BA=A7=E7=9B=B8=E5=85=B3-sjx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DifferentFurnaceTankController.java | 160 +++++++++++ .../controller/InspectionItemController.java | 160 +++++++++++ .../controller/QualityGradeController.java | 160 +++++++++++ .../entity/DifferentFurnaceTankEntity.java | 129 +++++++++ .../entity/InspectionItemEntity.java | 84 ++++++ .../scheduling/entity/QualityGradeEntity.java | 64 +++++ .../excel/DifferentFurnaceTankExcel.java | 159 +++++++++++ .../scheduling/excel/InspectionItemExcel.java | 105 +++++++ .../scheduling/excel/QualityGradeExcel.java | 81 ++++++ .../mapper/DifferentFurnaceTankMapper.java | 64 +++++ .../mapper/DifferentFurnaceTankMapper.xml | 42 +++ .../mapper/InspectionItemMapper.java | 64 +++++ .../mapper/InspectionItemMapper.xml | 33 +++ .../scheduling/mapper/QualityGradeMapper.java | 64 +++++ .../scheduling/mapper/QualityGradeMapper.xml | 29 ++ .../scheduling/mapper/WorkOrderMapper.xml | 3 +- .../service/IDifferentFurnaceTankService.java | 62 +++++ .../service/IInspectionItemService.java | 62 +++++ .../service/IQualityGradeService.java | 62 +++++ .../impl/DifferentFurnaceTankServiceImpl.java | 63 +++++ .../impl/InspectionItemServiceImpl.java | 64 +++++ .../service/impl/QualityGradeServiceImpl.java | 64 +++++ .../service/impl/WorkOrderServiceImpl.java | 262 ++++-------------- .../scheduling/vo/DifferentFurnaceTankVO.java | 46 +++ .../scheduling/vo/InspectionItemVO.java | 46 +++ .../scheduling/vo/QualityGradeVO.java | 46 +++ .../wrapper/DifferentFurnaceTankWrapper.java | 60 ++++ .../wrapper/InspectionItemWrapper.java | 60 ++++ .../wrapper/QualityGradeWrapper.java | 60 ++++ 29 files changed, 2150 insertions(+), 208 deletions(-) create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/DifferentFurnaceTankController.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/InspectionItemController.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/QualityGradeController.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/DifferentFurnaceTankEntity.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/InspectionItemEntity.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/QualityGradeEntity.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/DifferentFurnaceTankExcel.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/InspectionItemExcel.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/QualityGradeExcel.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.xml create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.xml create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.xml create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IDifferentFurnaceTankService.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IInspectionItemService.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IQualityGradeService.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/DifferentFurnaceTankServiceImpl.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/InspectionItemServiceImpl.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/QualityGradeServiceImpl.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/DifferentFurnaceTankVO.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/InspectionItemVO.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/QualityGradeVO.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/DifferentFurnaceTankWrapper.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/InspectionItemWrapper.java create mode 100644 blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/QualityGradeWrapper.java diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/DifferentFurnaceTankController.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/DifferentFurnaceTankController.java new file mode 100644 index 00000000..730e2cf5 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/DifferentFurnaceTankController.java @@ -0,0 +1,160 @@ +/** + * 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.scheduling.scheduling.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.DateUtil; +import org.springblade.core.tool.utils.Func; +import org.springblade.scheduling.scheduling.entity.DifferentFurnaceTankEntity; +import org.springblade.scheduling.scheduling.excel.DifferentFurnaceTankExcel; +import org.springblade.scheduling.scheduling.service.IDifferentFurnaceTankService; +import org.springblade.scheduling.scheduling.vo.DifferentFurnaceTankVO; +import org.springblade.scheduling.scheduling.wrapper.DifferentFurnaceTankWrapper; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 非同炉同槽因素表 控制器 + * + * @author BladeX + * @since 2025-12-18 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/differentFurnaceTank") +@Tag(name = "非同炉同槽因素表", description = "非同炉同槽因素表接口") +public class DifferentFurnaceTankController extends BladeController { + + private final IDifferentFurnaceTankService differentFurnaceTankService; + + /** + * 非同炉同槽因素表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入DifferentFurnaceTank") + public R detail(DifferentFurnaceTankEntity DifferentFurnaceTank) { + DifferentFurnaceTankEntity detail = differentFurnaceTankService.getOne(Condition.getQueryWrapper(DifferentFurnaceTank)); + return R.data(DifferentFurnaceTankWrapper.build().entityVO(detail)); + } + /** + * 非同炉同槽因素表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入DifferentFurnaceTank") + public R> list(@Parameter(hidden = true) @RequestParam Map DifferentFurnaceTank, Query query) { + IPage pages = differentFurnaceTankService.page(Condition.getPage(query), Condition.getQueryWrapper(DifferentFurnaceTank, DifferentFurnaceTankEntity.class)); + return R.data(DifferentFurnaceTankWrapper.build().pageVO(pages)); + } + + /** + * 非同炉同槽因素表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "传入DifferentFurnaceTank") + public R> page(DifferentFurnaceTankVO DifferentFurnaceTank, Query query) { + IPage pages = differentFurnaceTankService.selectDifferentFurnaceTankPage(Condition.getPage(query), DifferentFurnaceTank); + return R.data(pages); + } + + /** + * 非同炉同槽因素表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入DifferentFurnaceTank") + public R save(@Valid @RequestBody DifferentFurnaceTankEntity DifferentFurnaceTank) { + return R.status(differentFurnaceTankService.save(DifferentFurnaceTank)); + } + + /** + * 非同炉同槽因素表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入DifferentFurnaceTank") + public R update(@Valid @RequestBody DifferentFurnaceTankEntity DifferentFurnaceTank) { + return R.status(differentFurnaceTankService.updateById(DifferentFurnaceTank)); + } + + /** + * 非同炉同槽因素表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入DifferentFurnaceTank") + public R submit(@Valid @RequestBody DifferentFurnaceTankEntity DifferentFurnaceTank) { + return R.status(differentFurnaceTankService.saveOrUpdate(DifferentFurnaceTank)); + } + + /** + * 非同炉同槽因素表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + return R.status(differentFurnaceTankService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @IsAdmin + @GetMapping("/export") + @ApiOperationSupport(order = 9) + @Operation(summary = "导出数据", description = "传入DifferentFurnaceTank") + public void export(@Parameter(hidden = true) @RequestParam Map DifferentFurnaceTank, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(DifferentFurnaceTank, DifferentFurnaceTankEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(DifferentFurnaceTank::getTenantId, bladeUser.getTenantId()); + //} + //queryWrapper.lambda().eq(DifferentFurnaceTankEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = differentFurnaceTankService.export(queryWrapper); + ExcelUtil.export(response, "非同炉同槽因素表数据" + DateUtil.time(), "非同炉同槽因素表数据表", list, DifferentFurnaceTankExcel.class); + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/InspectionItemController.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/InspectionItemController.java new file mode 100644 index 00000000..0f7ea322 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/InspectionItemController.java @@ -0,0 +1,160 @@ +/** + * 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.scheduling.scheduling.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.DateUtil; +import org.springblade.core.tool.utils.Func; +import org.springblade.scheduling.scheduling.entity.InspectionItemEntity; +import org.springblade.scheduling.scheduling.excel.InspectionItemExcel; +import org.springblade.scheduling.scheduling.service.IInspectionItemService; +import org.springblade.scheduling.scheduling.vo.InspectionItemVO; +import org.springblade.scheduling.scheduling.wrapper.InspectionItemWrapper; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 检验工时表 控制器 + * + * @author BladeX + * @since 2025-12-18 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/inspectionItem") +@Tag(name = "检验工时表", description = "检验工时表接口") +public class InspectionItemController extends BladeController { + + private final IInspectionItemService inspectionItemService; + + /** + * 检验工时表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入InspectionItem") + public R detail(InspectionItemEntity InspectionItem) { + InspectionItemEntity detail = inspectionItemService.getOne(Condition.getQueryWrapper(InspectionItem)); + return R.data(InspectionItemWrapper.build().entityVO(detail)); + } + /** + * 检验工时表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入InspectionItem") + public R> list(@Parameter(hidden = true) @RequestParam Map InspectionItem, Query query) { + IPage pages = inspectionItemService.page(Condition.getPage(query), Condition.getQueryWrapper(InspectionItem, InspectionItemEntity.class)); + return R.data(InspectionItemWrapper.build().pageVO(pages)); + } + + /** + * 检验工时表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "传入InspectionItem") + public R> page(InspectionItemVO InspectionItem, Query query) { + IPage pages = inspectionItemService.selectInspectionItemPage(Condition.getPage(query), InspectionItem); + return R.data(pages); + } + + /** + * 检验工时表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入InspectionItem") + public R save(@Valid @RequestBody InspectionItemEntity InspectionItem) { + return R.status(inspectionItemService.save(InspectionItem)); + } + + /** + * 检验工时表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入InspectionItem") + public R update(@Valid @RequestBody InspectionItemEntity InspectionItem) { + return R.status(inspectionItemService.updateById(InspectionItem)); + } + + /** + * 检验工时表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入InspectionItem") + public R submit(@Valid @RequestBody InspectionItemEntity InspectionItem) { + return R.status(inspectionItemService.saveOrUpdate(InspectionItem)); + } + + /** + * 检验工时表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + return R.status(inspectionItemService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @IsAdmin + @GetMapping("/export") + @ApiOperationSupport(order = 9) + @Operation(summary = "导出数据", description = "传入InspectionItem") + public void exportInspectionItem(@Parameter(hidden = true) @RequestParam Map InspectionItem, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(InspectionItem, InspectionItemEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(InspectionItem::getTenantId, bladeUser.getTenantId()); + //} + //queryWrapper.lambda().eq(InspectionItemEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = inspectionItemService.export(queryWrapper); + ExcelUtil.export(response, "检验工时表数据" + DateUtil.time(), "检验工时表数据表", list, InspectionItemExcel.class); + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/QualityGradeController.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/QualityGradeController.java new file mode 100644 index 00000000..f598f551 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/controller/QualityGradeController.java @@ -0,0 +1,160 @@ +/** + * 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.scheduling.scheduling.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.DateUtil; +import org.springblade.core.tool.utils.Func; +import org.springblade.scheduling.scheduling.entity.QualityGradeEntity; +import org.springblade.scheduling.scheduling.excel.QualityGradeExcel; +import org.springblade.scheduling.scheduling.service.IQualityGradeService; +import org.springblade.scheduling.scheduling.vo.QualityGradeVO; +import org.springblade.scheduling.scheduling.wrapper.QualityGradeWrapper; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 质量等级表 控制器 + * + * @author BladeX + * @since 2025-12-18 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/qualityGrade") +@Tag(name = "质量等级表", description = "质量等级表接口") +public class QualityGradeController extends BladeController { + + private final IQualityGradeService qualityGradeService; + + /** + * 质量等级表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入QualityGrade") + public R detail(QualityGradeEntity QualityGrade) { + QualityGradeEntity detail = qualityGradeService.getOne(Condition.getQueryWrapper(QualityGrade)); + return R.data(QualityGradeWrapper.build().entityVO(detail)); + } + /** + * 质量等级表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入QualityGrade") + public R> list(@Parameter(hidden = true) @RequestParam Map QualityGrade, Query query) { + IPage pages = qualityGradeService.page(Condition.getPage(query), Condition.getQueryWrapper(QualityGrade, QualityGradeEntity.class)); + return R.data(QualityGradeWrapper.build().pageVO(pages)); + } + + /** + * 质量等级表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "传入QualityGrade") + public R> page(QualityGradeVO QualityGrade, Query query) { + IPage pages = qualityGradeService.selectQualityGradePage(Condition.getPage(query), QualityGrade); + return R.data(pages); + } + + /** + * 质量等级表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入QualityGrade") + public R save(@Valid @RequestBody QualityGradeEntity QualityGrade) { + return R.status(qualityGradeService.save(QualityGrade)); + } + + /** + * 质量等级表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入QualityGrade") + public R update(@Valid @RequestBody QualityGradeEntity QualityGrade) { + return R.status(qualityGradeService.updateById(QualityGrade)); + } + + /** + * 质量等级表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入QualityGrade") + public R submit(@Valid @RequestBody QualityGradeEntity QualityGrade) { + return R.status(qualityGradeService.saveOrUpdate(QualityGrade)); + } + + /** + * 质量等级表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + return R.status(qualityGradeService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @IsAdmin + @GetMapping("/export") + @ApiOperationSupport(order = 9) + @Operation(summary = "导出数据", description = "传入QualityGrade") + public void exportQualityGrade(@Parameter(hidden = true) @RequestParam Map QualityGrade, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(QualityGrade, QualityGradeEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(QualityGrade::getTenantId, bladeUser.getTenantId()); + //} + //queryWrapper.lambda().eq(QualityGradeEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = qualityGradeService.export(queryWrapper); + ExcelUtil.export(response, "质量等级表数据" + DateUtil.time(), "质量等级表数据表", list, QualityGradeExcel.class); + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/DifferentFurnaceTankEntity.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/DifferentFurnaceTankEntity.java new file mode 100644 index 00000000..6e9f6fef --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/DifferentFurnaceTankEntity.java @@ -0,0 +1,129 @@ +/** + * 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.scheduling.scheduling.entity; + +import lombok.Data; +import io.swagger.v3.oas.annotations.media.Schema; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.Date; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; +import org.springblade.core.tenant.mp.TenantEntity; +import java.io.Serial; + +/** + * 非同炉同槽因素表 实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@TableName("MES_DIFFERENT_FURNACE_TANK") +@Schema(description = "MesDifferentFurnaceTank对象") +@EqualsAndHashCode(callSuper = true) +public class DifferentFurnaceTankEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 作业中心id + */ + @Schema(description = "作业中心id") + private BigDecimal workCenterId; + /** + * 作业中心名称 + */ + @Schema(description = "作业中心名称") + private String workCenterName; + /** + * 工序id + */ + @Schema(description = "工序id") + private BigDecimal processId; + /** + * 工序名称 + */ + @Schema(description = "工序名称") + private String processName; + /** + * 工艺能力id + */ + @Schema(description = "工艺能力id") + private BigDecimal craftId; + /** + * 工艺能力 + */ + @Schema(description = "工艺能力") + private String craftName; + /** + * 键位 + */ + @Schema(description = "键位") + private String keyBinding; + /** + * 生产厂家 + */ + @Schema(description = "生产厂家") + private String factory; + /** + * 检验编号 + */ + @Schema(description = "检验编号") + private String inspectionCode; + /** + * 材料 + */ + @Schema(description = "材料") + private String material; + /** + * 厚度 + */ + @Schema(description = "厚度") + private String thickness; + /** + * 镀化 + */ + @Schema(description = "镀化") + private String passivation; + /** + * 硬度 + */ + @Schema(description = "硬度") + private String hardness; + /** + * 生产标识 + */ + @Schema(description = "生产标识") + private String productionIdent; + /** + * 结构/单件面积 + */ + @Schema(description = "结构/单件面积") + private String singleArea; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/InspectionItemEntity.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/InspectionItemEntity.java new file mode 100644 index 00000000..d4c683b1 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/InspectionItemEntity.java @@ -0,0 +1,84 @@ +/** + * 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.scheduling.scheduling.entity; + +import lombok.Data; +import io.swagger.v3.oas.annotations.media.Schema; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.Date; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; +import org.springblade.core.tenant.mp.TenantEntity; +import java.io.Serial; + +/** + * 检验工时表 实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@TableName("MES_INSPECTION_ITEM") +@Schema(description = "MesInspectionItem对象") +@EqualsAndHashCode(callSuper = true) +public class InspectionItemEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 抽样数量 + */ + @Schema(description = "抽样数量") + private String samplingQuantity; + /** + * 额定工时 + */ + @Schema(description = "额定工时") + private BigDecimal standardTime; + /** + * 准备时间 + */ + @Schema(description = "准备时间") + private BigDecimal prepareTime; + /** + * 单位 + */ + @Schema(description = "单位") + private String unit; + /** + * 备注 + */ + @Schema(description = "备注") + private String remarks; + /** + * 检验项目 + */ + @Schema(description = "检验项目") + private String inspectionItem; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/QualityGradeEntity.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/QualityGradeEntity.java new file mode 100644 index 00000000..d5f7ea49 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/entity/QualityGradeEntity.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.entity; + +import lombok.Data; +import io.swagger.v3.oas.annotations.media.Schema; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.Date; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; +import org.springblade.core.tenant.mp.TenantEntity; +import java.io.Serial; + +/** + * 质量等级表 实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@TableName("MES_QUALITY_GRADE") +@Schema(description = "MesQualityGrade对象") +@EqualsAndHashCode(callSuper = true) +public class QualityGradeEntity extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 质量等级 + */ + @Schema(description = "质量等级") + private String qualityGrade; + /** + * 类型 1-军品 2-商飞 3-宇航 + */ + @Schema(description = "类型 1-军品 2-商飞 3-宇航") + private String type; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/DifferentFurnaceTankExcel.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/DifferentFurnaceTankExcel.java new file mode 100644 index 00000000..43e1f221 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/DifferentFurnaceTankExcel.java @@ -0,0 +1,159 @@ +/** + * 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.scheduling.scheduling.excel; + + +import lombok.Data; + +import java.math.BigDecimal; + +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 2025-12-18 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DifferentFurnaceTankExcel implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @ColumnWidth(20) + @ExcelProperty("ID") + private BigDecimal id; + /** + * 作业中心id + */ + @ColumnWidth(20) + @ExcelProperty("作业中心id") + private BigDecimal workCenterId; + /** + * 作业中心名称 + */ + @ColumnWidth(20) + @ExcelProperty("作业中心名称") + private String workCenterName; + /** + * 工序id + */ + @ColumnWidth(20) + @ExcelProperty("工序id") + private BigDecimal processId; + /** + * 工序名称 + */ + @ColumnWidth(20) + @ExcelProperty("工序名称") + private String processName; + /** + * 工艺能力id + */ + @ColumnWidth(20) + @ExcelProperty("工艺能力id") + private BigDecimal craftId; + /** + * 工艺能力 + */ + @ColumnWidth(20) + @ExcelProperty("工艺能力") + private String craftName; + /** + * 键位 + */ + @ColumnWidth(20) + @ExcelProperty("键位") + private String keyBinding; + /** + * 生产厂家 + */ + @ColumnWidth(20) + @ExcelProperty("生产厂家") + private String factory; + /** + * 检验编号 + */ + @ColumnWidth(20) + @ExcelProperty("检验编号") + private String inspectionCode; + /** + * 材料 + */ + @ColumnWidth(20) + @ExcelProperty("材料") + private String material; + /** + * 厚度 + */ + @ColumnWidth(20) + @ExcelProperty("厚度") + private String thickness; + /** + * 镀化 + */ + @ColumnWidth(20) + @ExcelProperty("镀化") + private String passivation; + /** + * 硬度 + */ + @ColumnWidth(20) + @ExcelProperty("硬度") + private String hardness; + /** + * 生产标识 + */ + @ColumnWidth(20) + @ExcelProperty("生产标识") + private String productionIdent; + /** + * 结构/单件面积 + */ + @ColumnWidth(20) + @ExcelProperty("结构/单件面积") + private String singleArea; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Long isDeleted; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/InspectionItemExcel.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/InspectionItemExcel.java new file mode 100644 index 00000000..ffa2800c --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/InspectionItemExcel.java @@ -0,0 +1,105 @@ +/** + * 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.scheduling.scheduling.excel; + + +import lombok.Data; + +import java.math.BigDecimal; + +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 2025-12-18 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class InspectionItemExcel implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 抽样数量 + */ + @ColumnWidth(20) + @ExcelProperty("抽样数量") + private String samplingQuantity; + /** + * 额定工时 + */ + @ColumnWidth(20) + @ExcelProperty("额定工时") + private BigDecimal standardTime; + /** + * 准备时间 + */ + @ColumnWidth(20) + @ExcelProperty("准备时间") + private BigDecimal prepareTime; + /** + * 单位 + */ + @ColumnWidth(20) + @ExcelProperty("单位") + private String unit; + /** + * 备注 + */ + @ColumnWidth(20) + @ExcelProperty("备注") + private String remarks; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Long isDeleted; + /** + * ID + */ + @ColumnWidth(20) + @ExcelProperty("ID") + private BigDecimal id; + /** + * 检验项目 + */ + @ColumnWidth(20) + @ExcelProperty("检验项目") + private String inspectionItem; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/QualityGradeExcel.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/QualityGradeExcel.java new file mode 100644 index 00000000..d628ef88 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/excel/QualityGradeExcel.java @@ -0,0 +1,81 @@ +/** + * 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.scheduling.scheduling.excel; + + +import lombok.Data; + +import java.math.BigDecimal; + +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 2025-12-18 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class QualityGradeExcel implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @ColumnWidth(20) + @ExcelProperty("ID") + private BigDecimal id; + /** + * 质量等级 + */ + @ColumnWidth(20) + @ExcelProperty("质量等级") + private String qualityGrade; + /** + * 类型 1-军品 2-商飞 3-宇航 + */ + @ColumnWidth(20) + @ExcelProperty("类型 1-军品 2-商飞 3-宇航") + private String type; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Long isDeleted; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.java new file mode 100644 index 00000000..ee38a6a2 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.DifferentFurnaceTankEntity; +import org.springblade.scheduling.scheduling.excel.DifferentFurnaceTankExcel; +import org.springblade.scheduling.scheduling.vo.DifferentFurnaceTankVO; + +import java.util.List; + +/** + * 非同炉同槽因素表 Mapper 接口 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface DifferentFurnaceTankMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page 分页参数 + * @param DifferentFurnaceTank 查询参数 + * @return List + */ + List selectDifferentFurnaceTankPage(IPage page, DifferentFurnaceTankVO DifferentFurnaceTank); + + + /** + * 获取导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.xml b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.xml new file mode 100644 index 00000000..9af6dfe3 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/DifferentFurnaceTankMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.java new file mode 100644 index 00000000..35b2471e --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.InspectionItemEntity; +import org.springblade.scheduling.scheduling.excel.InspectionItemExcel; +import org.springblade.scheduling.scheduling.vo.InspectionItemVO; + +import java.util.List; + +/** + * 检验工时表 Mapper 接口 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface InspectionItemMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page 分页参数 + * @param InspectionItem 查询参数 + * @return List + */ + List selectInspectionItemPage(IPage page, InspectionItemVO InspectionItem); + + + /** + * 获取导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.xml b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.xml new file mode 100644 index 00000000..138219e4 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/InspectionItemMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.java new file mode 100644 index 00000000..95b446f7 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.QualityGradeEntity; +import org.springblade.scheduling.scheduling.excel.QualityGradeExcel; +import org.springblade.scheduling.scheduling.vo.QualityGradeVO; + +import java.util.List; + +/** + * 质量等级表 Mapper 接口 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface QualityGradeMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page 分页参数 + * @param QualityGrade 查询参数 + * @return List + */ + List selectQualityGradePage(IPage page, QualityGradeVO QualityGrade); + + + /** + * 获取导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.xml b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.xml new file mode 100644 index 00000000..4b9e632b --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/QualityGradeMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/WorkOrderMapper.xml b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/WorkOrderMapper.xml index 68997204..ee306c9b 100644 --- a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/WorkOrderMapper.xml +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/mapper/WorkOrderMapper.xml @@ -113,7 +113,7 @@ LEFT JOIN MES_WORK_PLAN e on a.wp_id = e.id LEFT JOIN BS_PROCESS_SET f on e.pps_id = f.id - c.ts_name is not null and b.EQUIP_CODE is not null and a.is_deleted = 0 + c.ts_name is not null and a.is_deleted = 0 and (to_char(b.start_time,'YYYY-MM-DD') = #{startTime} or (b.start_time to_date(CONCAT(#{startTime},' 00:00:00'),'YYYY-MM-DD HH24:MI:SS') and b.end_time ]]> to_date(CONCAT(#{startTime},' 23:59:59'),'YYYY-MM-DD HH24:MI:SS'))) @@ -150,6 +150,7 @@ FROM MES_YIELD_ORDER a LEFT JOIN BS_WORK_CENTER b ON a.WORK_CENTER_ID = b.ID + a.is_deleted = 0 and a.receive_time = ]]> to_date(#{startTime},'YYYY-MM-DD HH24:MI:SS') diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IDifferentFurnaceTankService.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IDifferentFurnaceTankService.java new file mode 100644 index 00000000..36b5a573 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IDifferentFurnaceTankService.java @@ -0,0 +1,62 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.DifferentFurnaceTankEntity; +import org.springblade.scheduling.scheduling.excel.DifferentFurnaceTankExcel; +import org.springblade.scheduling.scheduling.vo.DifferentFurnaceTankVO; + +import java.util.List; + +/** + * 非同炉同槽因素表 服务类 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface IDifferentFurnaceTankService extends BaseService { + /** + * 自定义分页 + * + * @param page 分页参数 + * @param DifferentFurnaceTank 查询参数 + * @return IPage + */ + IPage selectDifferentFurnaceTankPage(IPage page, DifferentFurnaceTankVO DifferentFurnaceTank); + + + /** + * 导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IInspectionItemService.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IInspectionItemService.java new file mode 100644 index 00000000..e3967379 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IInspectionItemService.java @@ -0,0 +1,62 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.InspectionItemEntity; +import org.springblade.scheduling.scheduling.excel.InspectionItemExcel; +import org.springblade.scheduling.scheduling.vo.InspectionItemVO; + +import java.util.List; + +/** + * 检验工时表 服务类 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface IInspectionItemService extends BaseService { + /** + * 自定义分页 + * + * @param page 分页参数 + * @param InspectionItem 查询参数 + * @return IPage + */ + IPage selectInspectionItemPage(IPage page, InspectionItemVO InspectionItem); + + + /** + * 导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IQualityGradeService.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IQualityGradeService.java new file mode 100644 index 00000000..d79e49f9 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/IQualityGradeService.java @@ -0,0 +1,62 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.QualityGradeEntity; +import org.springblade.scheduling.scheduling.excel.QualityGradeExcel; +import org.springblade.scheduling.scheduling.vo.QualityGradeVO; + +import java.util.List; + +/** + * 质量等级表 服务类 + * + * @author BladeX + * @since 2025-12-18 + */ +public interface IQualityGradeService extends BaseService { + /** + * 自定义分页 + * + * @param page 分页参数 + * @param QualityGrade 查询参数 + * @return IPage + */ + IPage selectQualityGradePage(IPage page, QualityGradeVO QualityGrade); + + + /** + * 导出数据 + * + * @param queryWrapper 查询条件 + * @return List + */ + List export(Wrapper queryWrapper); + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/DifferentFurnaceTankServiceImpl.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/DifferentFurnaceTankServiceImpl.java new file mode 100644 index 00000000..7b1ddcc1 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/DifferentFurnaceTankServiceImpl.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.scheduling.scheduling.service.impl; + +import org.springblade.scheduling.scheduling.entity.DifferentFurnaceTankEntity; +import org.springblade.scheduling.scheduling.excel.DifferentFurnaceTankExcel; +import org.springblade.scheduling.scheduling.mapper.DifferentFurnaceTankMapper; +import org.springblade.scheduling.scheduling.service.IDifferentFurnaceTankService; +import org.springblade.scheduling.scheduling.vo.DifferentFurnaceTankVO; +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; + +/** + * 非同炉同槽因素表 服务实现类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Service +public class DifferentFurnaceTankServiceImpl extends BaseServiceImpl implements IDifferentFurnaceTankService { + + @Override + public IPage selectDifferentFurnaceTankPage(IPage page, DifferentFurnaceTankVO DifferentFurnaceTank) { + return page.setRecords(baseMapper.selectDifferentFurnaceTankPage(page, DifferentFurnaceTank)); + } + + + @Override + public List export(Wrapper queryWrapper) { + List DifferentFurnaceTankList = baseMapper.export(queryWrapper); + //DifferentFurnaceTankList.forEach(DifferentFurnaceTank -> { + // DifferentFurnaceTank.setTypeName(DictCache.getValue(DictEnum.YES_NO, DifferentFurnaceTank.getType())); + //}); + return DifferentFurnaceTankList; + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/InspectionItemServiceImpl.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/InspectionItemServiceImpl.java new file mode 100644 index 00000000..7fd3028d --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/InspectionItemServiceImpl.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.InspectionItemEntity; +import org.springblade.scheduling.scheduling.excel.InspectionItemExcel; +import org.springblade.scheduling.scheduling.mapper.InspectionItemMapper; +import org.springblade.scheduling.scheduling.service.IInspectionItemService; +import org.springblade.scheduling.scheduling.vo.InspectionItemVO; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 检验工时表 服务实现类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Service +public class InspectionItemServiceImpl extends BaseServiceImpl implements IInspectionItemService { + + @Override + public IPage selectInspectionItemPage(IPage page, InspectionItemVO InspectionItem) { + return page.setRecords(baseMapper.selectInspectionItemPage(page, InspectionItem)); + } + + + @Override + public List export(Wrapper queryWrapper) { + List InspectionItemList = baseMapper.export(queryWrapper); + //InspectionItemList.forEach(InspectionItem -> { + // InspectionItem.setTypeName(DictCache.getValue(DictEnum.YES_NO, InspectionItem.getType())); + //}); + return InspectionItemList; + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/QualityGradeServiceImpl.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/QualityGradeServiceImpl.java new file mode 100644 index 00000000..299c14c9 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/QualityGradeServiceImpl.java @@ -0,0 +1,64 @@ +/** + * 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.scheduling.scheduling.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.scheduling.scheduling.entity.QualityGradeEntity; +import org.springblade.scheduling.scheduling.excel.QualityGradeExcel; +import org.springblade.scheduling.scheduling.mapper.QualityGradeMapper; +import org.springblade.scheduling.scheduling.service.IQualityGradeService; +import org.springblade.scheduling.scheduling.vo.QualityGradeVO; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 质量等级表 服务实现类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Service +public class QualityGradeServiceImpl extends BaseServiceImpl implements IQualityGradeService { + + @Override + public IPage selectQualityGradePage(IPage page, QualityGradeVO QualityGrade) { + return page.setRecords(baseMapper.selectQualityGradePage(page, QualityGrade)); + } + + + @Override + public List export(Wrapper queryWrapper) { + List QualityGradeList = baseMapper.export(queryWrapper); + //QualityGradeList.forEach(QualityGrade -> { + // QualityGrade.setTypeName(DictCache.getValue(DictEnum.YES_NO, QualityGrade.getType())); + //}); + return QualityGradeList; + } + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/WorkOrderServiceImpl.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/WorkOrderServiceImpl.java index e6b98c31..38daf2cf 100644 --- a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/WorkOrderServiceImpl.java +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/service/impl/WorkOrderServiceImpl.java @@ -169,216 +169,62 @@ public class WorkOrderServiceImpl extends BaseServiceImpl> schedulingBoard(WorkOrderDto workOrder) { List list = baseMapper.selectWorkOrderList(workOrder); Map> resultList = new HashMap<>(); - if("1".equals(workOrder.getType())){ - Map> woCodeGroup = list.stream().collect(Collectors.groupingBy(WorkOrderDto::getWoCode)); - - for (Map.Entry> entry : woCodeGroup.entrySet()) { - String woCode = entry.getKey(); - List woList = entry.getValue(); - - //按processName二次分组 - Map> processGroup = woList.stream() - .collect(Collectors.groupingBy(WorkOrderDto::getProcessName)); - - //整合每个processName的时间 - List mergedProcessList = new ArrayList<>(); - for (Map.Entry> processEntry : processGroup.entrySet()) { - String processName = processEntry.getKey(); - List processList = processEntry.getValue(); - - // 计算最早的开始时间、最晚的结束时间 - String minStartTime = getMinTime(processList.stream().map(WorkOrderDto::getPlanStartTime).toList()); - String maxEndTime = getMaxTime(processList.stream().map(WorkOrderDto::getPlanEndTime).toList()); - - // 封装整合后的DTO(复用第一个对象或新建) - WorkOrderDto mergedDto = new WorkOrderDto(); - mergedDto.setWoCode(woCode); - mergedDto.setProcessName(processName); - for(WorkOrderDto dto : processList){ - mergedDto.setTeamName(dto.getTeamName()); - mergedDto.setCardNo(dto.getCardNo()); - mergedDto.setBatchNo(dto.getBatchNo()); - mergedDto.setPartCode(dto.getPartCode()); - mergedDto.setCurrentProcessName(dto.getCurrentProcessName()); - mergedDto.setMakeQty(dto.getMakeQty()); - if(dto.getPlanStartTime().equals(minStartTime)){ - mergedDto.setStartTime(dto.getStartTime()); - } - if(dto.getPlanEndTime().equals(maxEndTime)){ - mergedDto.setEndTime(dto.getEndTime()); - mergedDto.setPlanStatus(dto.getPlanStatus()); - } + Map> woCodeGroup = list.stream().collect(Collectors.groupingBy(WorkOrderDto::getWoCode)); + + for (Map.Entry> entry : woCodeGroup.entrySet()) { + String woCode = entry.getKey(); + List woList = entry.getValue(); + + //按processName二次分组 + Map> processGroup = woList.stream() + .collect(Collectors.groupingBy(WorkOrderDto::getProcessName)); + + //整合每个processName的时间 + List mergedProcessList = new ArrayList<>(); + for (Map.Entry> processEntry : processGroup.entrySet()) { + String processName = processEntry.getKey(); + List processList = processEntry.getValue(); + + // 计算最早的开始时间、最晚的结束时间 + String minStartTime = getMinTime(processList.stream().map(WorkOrderDto::getPlanStartTime).toList()); + String maxEndTime = getMaxTime(processList.stream().map(WorkOrderDto::getPlanEndTime).toList()); + + // 封装整合后的DTO(复用第一个对象或新建) + WorkOrderDto mergedDto = new WorkOrderDto(); + mergedDto.setWoCode(woCode); + mergedDto.setProcessName(processName); + for(WorkOrderDto dto : processList){ + mergedDto.setTeamName(dto.getTeamName()); + mergedDto.setCardNo(dto.getCardNo()); + mergedDto.setBatchNo(dto.getBatchNo()); + mergedDto.setPartCode(dto.getPartCode()); + mergedDto.setCurrentProcessName(dto.getCurrentProcessName()); + mergedDto.setMakeQty(dto.getMakeQty()); + if(dto.getPlanStartTime().equals(minStartTime)){ + mergedDto.setStartTime(dto.getStartTime()); } - //处理跨天的工序 - if(!maxEndTime.substring(0,10).equals(minStartTime.substring(0,10))){ - if(minStartTime.substring(0,10).equals(workOrder.getStartTime())){ - mergedDto.setEndTime("24:00"); - } - if(maxEndTime.substring(0,10).equals(workOrder.getStartTime())){ - mergedDto.setStartTime("0:00"); - } - + if(dto.getPlanEndTime().equals(maxEndTime)){ + mergedDto.setEndTime(dto.getEndTime()); + mergedDto.setPlanStatus(dto.getPlanStatus()); } - mergedDto.setPlanStartTime(minStartTime); - mergedDto.setPlanEndTime(maxEndTime); - - mergedProcessList.add(mergedDto); } + //处理跨天的工序 + if(!maxEndTime.substring(0,10).equals(minStartTime.substring(0,10))){ + if(minStartTime.substring(0,10).equals(workOrder.getStartTime())){ + mergedDto.setEndTime("24:00"); + } + if(maxEndTime.substring(0,10).equals(workOrder.getStartTime())){ + mergedDto.setStartTime("0:00"); + } - resultList.put(woCode, mergedProcessList); - } - - }else if("2".equals(workOrder.getType())){ - Map>> teamWoGroupMap = list.stream() - .collect(Collectors.groupingBy( - WorkOrderDto::getTeamName, // 第一层分组:teamName - Collectors.groupingBy(WorkOrderDto::getWoCode) // 第二层分组:woCode - )); - for (Map.Entry>> teamEntry : teamWoGroupMap.entrySet()) { - String teamName = teamEntry.getKey(); - Map> woMap = teamEntry.getValue(); - List list1 = new ArrayList<>(); - for (Map.Entry> woEntry : woMap.entrySet()) { - WorkOrderDto workOrderDto = new WorkOrderDto(); - String woCode = woEntry.getKey(); - List woList = woEntry.getValue(); - - // 计算最小开始时间 - String minStartTime = woList.stream() - .map(WorkOrderDto::getStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算最大结束时间 - String maxEndTime = woList.stream() - .map(WorkOrderDto::getEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - // 计算最小开始时间 - String minPlanStartTime = woList.stream() - .map(WorkOrderDto::getPlanStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算最大结束时间 - String maxPlanEndTime = woList.stream() - .map(WorkOrderDto::getPlanEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - // 计算实际最小开始时间 - String minFactStartTime = woList.stream() - .map(WorkOrderDto::getFactStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算实际最大结束时间 - String maxFactEndTime = woList.stream() - .map(WorkOrderDto::getFactEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - workOrderDto.setWoCode(woCode); - workOrderDto.setStartTime(minStartTime); - workOrderDto.setEndTime(maxEndTime); - workOrderDto.setPlanStartTime(minPlanStartTime); - workOrderDto.setPlanEndTime(maxPlanEndTime); - workOrderDto.setFactStartTime(minFactStartTime); - workOrderDto.setFactEndTime(maxFactEndTime); - workOrderDto.setTeamName(teamName); - workOrderDto.setOrderStatus(woList.get(0).getOrderStatus()); - workOrderDto.setPartCode(woList.get(0).getPartCode()); - workOrderDto.setBatchNo(woList.get(0).getBatchNo()); - workOrderDto.setCardNo(woList.get(0).getCardNo()); - workOrderDto.setCurrentProcessName(woList.get(0).getCurrentProcessName()); - workOrderDto.setMakeQty(woList.get(0).getMakeQty()); - list1.add(workOrderDto); } - resultList.put(teamName,list1); - } + mergedDto.setPlanStartTime(minStartTime); + mergedDto.setPlanEndTime(maxEndTime); - }else if("3".equals(workOrder.getType())){ - Map>> equipWoGroupMap = list.stream().filter(e -> e.getEquipName() != null) - .collect(Collectors.groupingBy( - dto -> String.format("%s(%s)", dto.getEquipName(), dto.getEquipCode()), // 第一层分组:equipName - Collectors.groupingBy(WorkOrderDto::getWoCode) // 第二层分组:woCode - )); - for (Map.Entry>> equipEntry : equipWoGroupMap.entrySet()) { - String equipName = equipEntry.getKey(); - Map> woMap = equipEntry.getValue(); - List list1 = new ArrayList<>(); - for (Map.Entry> woEntry : woMap.entrySet()) { - WorkOrderDto workOrderDto = new WorkOrderDto(); - String woCode = woEntry.getKey(); - List woList = woEntry.getValue(); - - // 计算最小开始时间 - String minStartTime = woList.stream() - .map(WorkOrderDto::getStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算最大结束时间 - String maxEndTime = woList.stream() - .map(WorkOrderDto::getEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - // 计算最小开始时间 - String minPlanStartTime = woList.stream() - .map(WorkOrderDto::getPlanStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算最大结束时间 - String maxPlanEndTime = woList.stream() - .map(WorkOrderDto::getPlanEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - // 计算实际最小开始时间 - String minFactStartTime = woList.stream() - .map(WorkOrderDto::getFactStartTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .min(String::compareTo) - .orElse(null); - - // 计算最大结束时间 - String maxFactEndTime = woList.stream() - .map(WorkOrderDto::getFactEndTime) - .filter(Objects::nonNull) // 过滤空时间,避免NPE - .max(String::compareTo) - .orElse(null); - - workOrderDto.setPlanStartTime(minPlanStartTime); - workOrderDto.setPlanEndTime(maxPlanEndTime); - workOrderDto.setFactStartTime(minFactStartTime); - workOrderDto.setFactEndTime(maxFactEndTime); - workOrderDto.setWoCode(woCode); - workOrderDto.setStartTime(minStartTime); - workOrderDto.setEndTime(maxEndTime); - workOrderDto.setEquipName(equipName); - workOrderDto.setOrderStatus(woList.get(0).getOrderStatus()); - workOrderDto.setPartCode(woList.get(0).getPartCode()); - workOrderDto.setBatchNo(woList.get(0).getBatchNo()); - workOrderDto.setCardNo(woList.get(0).getCardNo()); - workOrderDto.setCurrentProcessName(woList.get(0).getCurrentProcessName()); - workOrderDto.setMakeQty(woList.get(0).getMakeQty()); - list1.add(workOrderDto); - } - resultList.put(equipName,list1); + mergedProcessList.add(mergedDto); } + + resultList.put(woCode, mergedProcessList); } return resultList; @@ -493,7 +339,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl equipAbilityList = equipAbilityService.list(Wrappers.lambdaQuery().in(EquipAbilityEntity::getWorkCenterId, craft.getWorkCenterId())); + List equipAbilityList = equipAbilityService.list(Wrappers.lambdaQuery().in(EquipAbilityEntity::getWorkCenterId, craft.getWorkCenterId()).eq(EquipAbilityEntity::getCraftId,craft.getCaId())); if(CollectionUtils.isEmpty(equipAbilityList)){ order.setErrorInfo("设备未匹配到对应的设备能力"); order.setStatus(6); @@ -627,20 +473,20 @@ public class WorkOrderServiceImpl extends BaseServiceImpl ppsIds = Arrays.asList(Long.valueOf(10),Long.valueOf(21)); //镀后检验和镀后接收先按半小时计算 if(ability != null){ if(ppsIds.contains(craft.getPpsId())){ totalTime = BigDecimal.valueOf(30); - workPlan.setStartTime(prevProcessEnd); - workPlan.setEndTime(prevProcessEnd.plusMinutes(30)); + workPlan.setStartTime(prevProcessEnd.plusMinutes(30)); + workPlan.setEndTime(prevProcessEnd.plusMinutes(60)); if(craft.getPpsId() == 10){ workPlan.setMakeTeam(Long.valueOf(64)); } if(craft.getPpsId() == 21){ workPlan.setMakeTeam(Long.valueOf(65)); } + prevProcessEnd = workPlan.getEndTime(); }else{ totalTime = totalTime.add(BigDecimal.valueOf(order.getYpQty()).multiply(personAbilityMap.get(craft.getWorkCenterId() + "-" + craft.getPpsId() + "-" + craft.getCaId()).getStandardTime()).add(personAbilityMap.get(craft.getWorkCenterId() + "-" + craft.getPpsId() + "-" + craft.getCaId()).getPrepareTime())); } @@ -712,6 +558,7 @@ public class WorkOrderServiceImpl 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.scheduling.scheduling.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.scheduling.scheduling.entity.DifferentFurnaceTankEntity; + +import java.io.Serial; + +/** + * 非同炉同槽因素表 视图实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DifferentFurnaceTankVO extends DifferentFurnaceTankEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/InspectionItemVO.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/InspectionItemVO.java new file mode 100644 index 00000000..0d3ed567 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/InspectionItemVO.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.scheduling.scheduling.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.scheduling.scheduling.entity.InspectionItemEntity; + +import java.io.Serial; + +/** + * 检验工时表 视图实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InspectionItemVO extends InspectionItemEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/QualityGradeVO.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/QualityGradeVO.java new file mode 100644 index 00000000..80569836 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/vo/QualityGradeVO.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.scheduling.scheduling.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.scheduling.scheduling.entity.QualityGradeEntity; + +import java.io.Serial; + +/** + * 质量等级表 视图实体类 + * + * @author BladeX + * @since 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class QualityGradeVO extends QualityGradeEntity { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/DifferentFurnaceTankWrapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/DifferentFurnaceTankWrapper.java new file mode 100644 index 00000000..76389431 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/DifferentFurnaceTankWrapper.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.scheduling.scheduling.wrapper; + +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.scheduling.scheduling.entity.DifferentFurnaceTankEntity; +import org.springblade.scheduling.scheduling.vo.DifferentFurnaceTankVO; + +import java.util.Objects; + +/** + * 非同炉同槽因素表 包装类,返回视图层所需的字段 + * + * @author BladeX + * @since 2025-12-18 + */ +public class DifferentFurnaceTankWrapper extends BaseEntityWrapper { + + public static DifferentFurnaceTankWrapper build() { + return new DifferentFurnaceTankWrapper(); + } + + @Override + public DifferentFurnaceTankVO entityVO(DifferentFurnaceTankEntity DifferentFurnaceTank) { + DifferentFurnaceTankVO DifferentFurnaceTankVO = Objects.requireNonNull(BeanUtil.copyProperties(DifferentFurnaceTank, DifferentFurnaceTankVO.class)); + + //User createUser = UserCache.getUser(DifferentFurnaceTank.getCreateUser()); + //User updateUser = UserCache.getUser(DifferentFurnaceTank.getUpdateUser()); + //DifferentFurnaceTankVO.setCreateUserName(createUser.getName()); + //DifferentFurnaceTankVO.setUpdateUserName(updateUser.getName()); + + return DifferentFurnaceTankVO; + } + + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/InspectionItemWrapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/InspectionItemWrapper.java new file mode 100644 index 00000000..92d82b40 --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/InspectionItemWrapper.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.scheduling.scheduling.wrapper; + +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.scheduling.scheduling.entity.InspectionItemEntity; +import org.springblade.scheduling.scheduling.vo.InspectionItemVO; + +import java.util.Objects; + +/** + * 检验工时表 包装类,返回视图层所需的字段 + * + * @author BladeX + * @since 2025-12-18 + */ +public class InspectionItemWrapper extends BaseEntityWrapper { + + public static InspectionItemWrapper build() { + return new InspectionItemWrapper(); + } + + @Override + public InspectionItemVO entityVO(InspectionItemEntity InspectionItem) { + InspectionItemVO InspectionItemVO = Objects.requireNonNull(BeanUtil.copyProperties(InspectionItem, InspectionItemVO.class)); + + //User createUser = UserCache.getUser(InspectionItem.getCreateUser()); + //User updateUser = UserCache.getUser(InspectionItem.getUpdateUser()); + //InspectionItemVO.setCreateUserName(createUser.getName()); + //InspectionItemVO.setUpdateUserName(updateUser.getName()); + + return InspectionItemVO; + } + + +} diff --git a/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/QualityGradeWrapper.java b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/QualityGradeWrapper.java new file mode 100644 index 00000000..ff50595e --- /dev/null +++ b/blade-service/blade-scheduling/src/main/java/org/springblade/scheduling/scheduling/wrapper/QualityGradeWrapper.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.scheduling.scheduling.wrapper; + +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.scheduling.scheduling.entity.QualityGradeEntity; +import org.springblade.scheduling.scheduling.vo.QualityGradeVO; + +import java.util.Objects; + +/** + * 质量等级表 包装类,返回视图层所需的字段 + * + * @author BladeX + * @since 2025-12-18 + */ +public class QualityGradeWrapper extends BaseEntityWrapper { + + public static QualityGradeWrapper build() { + return new QualityGradeWrapper(); + } + + @Override + public QualityGradeVO entityVO(QualityGradeEntity QualityGrade) { + QualityGradeVO QualityGradeVO = Objects.requireNonNull(BeanUtil.copyProperties(QualityGrade, QualityGradeVO.class)); + + //User createUser = UserCache.getUser(QualityGrade.getCreateUser()); + //User updateUser = UserCache.getUser(QualityGrade.getUpdateUser()); + //QualityGradeVO.setCreateUserName(createUser.getName()); + //QualityGradeVO.setUpdateUserName(updateUser.getName()); + + return QualityGradeVO; + } + + +}