From 6602fcd6e354817668a18752e25bb14ebeaedf35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BD=98=E8=8D=A3=E6=99=9F?=
<9691125+pan-rongsheng@user.noreply.gitee.com>
Date: Mon, 19 Jan 2026 17:31:52 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=AE=A1=E7=90=86=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../module/base/enums/ErrorCodeConstants.java | 2 +
.../ErrorCodeConstants.java | 14 ++
zt-module-base/zt-module-base-server/pom.xml | 6 +
...ErpMonthProductivePlanCheckController.java | 139 ++++++++++++++++++
...thProductivePlanCheckDetailController.java | 112 ++++++++++++++
...nthProductivePlanCheckDetailPageReqVO.java | 34 +++++
...pMonthProductivePlanCheckDetailRespVO.java | 40 +++++
...nthProductivePlanCheckDetailSaveReqVO.java | 28 ++++
.../ErpMonthProductivePlanCheckPageReqVO.java | 33 +++++
.../vo/ErpMonthProductivePlanCheckRespVO.java | 43 ++++++
.../ErpMonthProductivePlanCheckSaveReqVO.java | 31 ++++
.../admin/plandate/PlanDateController.java | 4 +-
.../admin/plandate/PlanOrderController.java | 59 ++++++++
.../admin/plandate/vo/PlanOrderRspVO.java | 34 +++++
.../admin/plandate/vo/PlanOrderSaveReqVO.java | 35 +++++
...pMonthProductivePlanCheckDetailMapper.java | 31 ++++
.../ErpMonthProductivePlanCheckMapper.java | 32 ++++
.../dal/dao/plandate/PlanOrderMapper.java | 9 ++
.../ErpMonthProductivePlanCheckDO.java | 56 +++++++
.../ErpMonthProductivePlanCheckDetailDO.java | 56 +++++++
.../dal/dataobject/plandate/PlanOrderDO.java | 51 +++++++
...MonthProductivePlanCheckDetailService.java | 81 ++++++++++
...hProductivePlanCheckDetailServiceImpl.java | 106 +++++++++++++
.../ErpMonthProductivePlanCheckService.java | 78 ++++++++++
...rpMonthProductivePlanCheckServiceImpl.java | 133 +++++++++++++++++
.../service/plandate/PlanOrderService.java | 20 +++
.../plandate/PlanOrderServiceImpl.java | 74 ++++++++++
...rpMonthProductivePlanCheckDetailMapper.xml | 12 ++
.../ErpMonthProductivePlanCheckMapper.xml | 12 ++
.../module/contractorder/api/OrderApi.java | 6 +
.../api/dto/order/OrderAndPlanDataReqDTO.java | 41 ++++++
.../contractorder/api/OrderApiImpl.java | 8 +
.../purchaseorder/PurchaseOrderMapper.java | 3 +
.../purchaseorder/PurchaseOrderService.java | 9 ++
.../PurchaseOrderServiceImpl.java | 23 +++
.../purchaseorder/PurchaseOrderMapper.xml | 111 +++++++++++++-
36 files changed, 1559 insertions(+), 7 deletions(-)
create mode 100644 zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/erpmonthproductiveplancheck/ErrorCodeConstants.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckController.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailController.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailPageReqVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailRespVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailSaveReqVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckPageReqVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckRespVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckSaveReqVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanOrderController.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderRspVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderSaveReqVO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/plandate/PlanOrderMapper.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailDO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/plandate/PlanOrderDO.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailService.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailServiceImpl.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckService.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckServiceImpl.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderService.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderServiceImpl.java
create mode 100644 zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.xml
create mode 100644 zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.xml
create mode 100644 zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/order/OrderAndPlanDataReqDTO.java
diff --git a/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/base/enums/ErrorCodeConstants.java b/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/base/enums/ErrorCodeConstants.java
index 447a009f..3e97983d 100644
--- a/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/base/enums/ErrorCodeConstants.java
+++ b/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/base/enums/ErrorCodeConstants.java
@@ -66,6 +66,8 @@ public interface ErrorCodeConstants {
ErrorCode PROCESSING_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_007, "工序不存在");
ErrorCode PROCESSING_OPERATION_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_008, "工艺工序物料不存在");
ErrorCode PLAN_DATE_NOT_EXISTS = new ErrorCode(1_027_101_009, "计划数据不存在");
+ ErrorCode PLAN_ORD_NOT_EXISTS = new ErrorCode(1_027_101_010, "计划与订单关系不存在");
+ ErrorCode PLAN_ORD_EXISTS = new ErrorCode(1_027_101_011, "该种类的绑定关系已存在");
// ========== 主数据同步 ==========
ErrorCode MASTER_DATA_SYNC_DISABLED = new ErrorCode(1_027_900_001, "主数据同步功能已禁用");
ErrorCode MASTER_DATA_SYNC_BATCH_SIZE_TOO_LARGE = new ErrorCode(1_027_900_002, "最大批次不得超过 1000");
diff --git a/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/erpmonthproductiveplancheck/ErrorCodeConstants.java b/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/erpmonthproductiveplancheck/ErrorCodeConstants.java
new file mode 100644
index 00000000..6cf55972
--- /dev/null
+++ b/zt-module-base/zt-module-base-api/src/main/java/com/zt/plat/module/erpmonthproductiveplancheck/ErrorCodeConstants.java
@@ -0,0 +1,14 @@
+package com.zt.plat.module.erpmonthproductiveplancheck;
+
+import com.zt.plat.framework.common.exception.ErrorCode;
+
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ //模块 base 错误码区间[1-027-000-000 ~1-028-000-000)
+
+ ErrorCode ERP_MONTH_PRODUCTIVE_PLAN_CHECK_NOT_EXISTS = new ErrorCode(1_027_000_709, "ERP月度产品计划核对不存在");
+ ErrorCode ERP_MONTH_PRODUCTIVE_PLAN_CHECK_DETAIL_NOT_EXISTS = new ErrorCode(1_027_000_710, "ERP月度产品计划核对明细不存在");
+ ErrorCode DATA_NOT_ERROR = new ErrorCode(1_027_000_711, "数据错误");
+}
+
diff --git a/zt-module-base/zt-module-base-server/pom.xml b/zt-module-base/zt-module-base-server/pom.xml
index 3547b084..4d26359f 100644
--- a/zt-module-base/zt-module-base-server/pom.xml
+++ b/zt-module-base/zt-module-base-server/pom.xml
@@ -166,6 +166,12 @@
zt-spring-boot-starter-biz-business
${revision}
+
+ com.zt.plat
+ zt-module-contract-order-api
+ 3.0.47-SNAPSHOT
+ compile
+
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckController.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckController.java
new file mode 100644
index 00000000..fb965008
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckController.java
@@ -0,0 +1,139 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck;
+
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckSaveReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDO;
+import com.zt.plat.module.base.service.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckService;
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
+
+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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
+import com.zt.plat.framework.common.pojo.PageParam;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+
+import static com.zt.plat.framework.common.pojo.CommonResult.success;
+
+import com.zt.plat.framework.excel.core.util.ExcelUtils;
+
+import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
+
+import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
+
+
+@Tag(name = "管理后台 - ERP月度产品计划核对")
+@RestController
+@RequestMapping("/base/erp-month-productive-plan-check")
+@Validated
+public class ErpMonthProductivePlanCheckController implements BusinessControllerMarker {
+
+
+ @Resource
+ private ErpMonthProductivePlanCheckService erpMonthProductivePlanCheckService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建ERP月度产品计划核对")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:create')")
+ public CommonResult createErpMonthProductivePlanCheck(@Valid @RequestBody ErpMonthProductivePlanCheckSaveReqVO createReqVO) {
+ return success(erpMonthProductivePlanCheckService.createErpMonthProductivePlanCheck(createReqVO));
+ }
+
+ @PostMapping("/create-batch")
+ @Operation(summary = "创建ERP月度产品计划核对")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:create')")
+ public CommonResult> createBatchErpMonthProductivePlanCheck(@Valid @RequestBody List createReqVOList) {
+ erpMonthProductivePlanCheckService.createBatchErpMonthProductivePlanCheck(createReqVOList);
+ return success(true);
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新ERP月度产品计划核对")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:update')")
+ public CommonResult updateErpMonthProductivePlanCheck(@Valid @RequestBody ErpMonthProductivePlanCheckSaveReqVO updateReqVO) {
+ erpMonthProductivePlanCheckService.updateErpMonthProductivePlanCheck(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除ERP月度产品计划核对")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:delete')")
+ public CommonResult deleteErpMonthProductivePlanCheck(@RequestParam("id") Long id) {
+ erpMonthProductivePlanCheckService.deleteErpMonthProductivePlanCheck(id);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete-list")
+ @Parameter(name = "ids", description = "编号", required = true)
+ @Operation(summary = "批量删除ERP月度产品计划核对")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:delete')")
+ public CommonResult deleteErpMonthProductivePlanCheckList(@RequestBody BatchDeleteReqVO req) {
+ erpMonthProductivePlanCheckService.deleteErpMonthProductivePlanCheckListByIds(req.getIds());
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得ERP月度产品计划核对")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:query')")
+ public CommonResult getErpMonthProductivePlanCheck(@RequestParam("id") Long id) {
+ ErpMonthProductivePlanCheckDO erpMonthProductivePlanCheck = erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheck(id);
+ ErpMonthProductivePlanCheckRespVO respVO = BeanUtils.toBean(erpMonthProductivePlanCheck, ErpMonthProductivePlanCheckRespVO.class);
+ if (respVO != null) {
+ respVO.setDetails(erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheckDetail(id));
+ }
+ return success(respVO);
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得ERP月度产品计划核对分页")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:query')")
+ public CommonResult> getErpMonthProductivePlanCheckPage(@Valid ErpMonthProductivePlanCheckPageReqVO pageReqVO) {
+ PageResult pageResult = erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheckPage(pageReqVO);
+ PageResult result = BeanUtils.toBean(pageResult, ErpMonthProductivePlanCheckRespVO.class);
+ if (result != null && result.getList() != null && !result.getList().isEmpty()){
+ result.getList().forEach(erpMonthProductivePlanCheckRespVO
+ -> erpMonthProductivePlanCheckRespVO.setDetails(erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheckDetail(erpMonthProductivePlanCheckRespVO.getId())));
+ }
+ return success(result);
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出ERP月度产品计划核对 Excel")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportErpMonthProductivePlanCheckExcel(@Valid ErpMonthProductivePlanCheckPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheckPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "ERP月度产品计划核对.xls", "数据", ErpMonthProductivePlanCheckRespVO.class,
+ BeanUtils.toBean(list, ErpMonthProductivePlanCheckRespVO.class));
+ }
+
+ //根据id查询明细详情
+ @GetMapping("/get-detail")
+ @Operation(summary = "获得ERP月度产品计划核对明细详情")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check:query')")
+ public CommonResult> getErpMonthProductivePlanCheckDetail(@RequestParam("id") Long id) {
+ return success(erpMonthProductivePlanCheckService.getErpMonthProductivePlanCheckDetail(id));
+ }
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailController.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailController.java
new file mode 100644
index 00000000..41e12122
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailController.java
@@ -0,0 +1,112 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck;
+
+
+
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailSaveReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailDO;
+import com.zt.plat.module.base.service.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailService;
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
+
+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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
+import com.zt.plat.framework.common.pojo.PageParam;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import static com.zt.plat.framework.common.pojo.CommonResult.success;
+
+import com.zt.plat.framework.excel.core.util.ExcelUtils;
+
+import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
+import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
+
+
+@Tag(name = "管理后台 - ERP月度产品计划核对明细")
+@RestController
+@RequestMapping("/base/erp-month-productive-plan-check-detail")
+@Validated
+public class ErpMonthProductivePlanCheckDetailController implements BusinessControllerMarker {
+
+
+ @Resource
+ private ErpMonthProductivePlanCheckDetailService erpMonthProductivePlanCheckDetailService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建ERP月度产品计划核对明细")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:create')")
+ public CommonResult createErpMonthProductivePlanCheckDetail(@Valid @RequestBody ErpMonthProductivePlanCheckDetailSaveReqVO createReqVO) {
+ return success(erpMonthProductivePlanCheckDetailService.createErpMonthProductivePlanCheckDetail(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新ERP月度产品计划核对明细")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:update')")
+ public CommonResult updateErpMonthProductivePlanCheckDetail(@Valid @RequestBody ErpMonthProductivePlanCheckDetailSaveReqVO updateReqVO) {
+ erpMonthProductivePlanCheckDetailService.updateErpMonthProductivePlanCheckDetail(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除ERP月度产品计划核对明细")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:delete')")
+ public CommonResult deleteErpMonthProductivePlanCheckDetail(@RequestParam("id") Long id) {
+ erpMonthProductivePlanCheckDetailService.deleteErpMonthProductivePlanCheckDetail(id);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete-list")
+ @Parameter(name = "ids", description = "编号", required = true)
+ @Operation(summary = "批量删除ERP月度产品计划核对明细")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:delete')")
+ public CommonResult deleteErpMonthProductivePlanCheckDetailList(@RequestBody BatchDeleteReqVO req) {
+ erpMonthProductivePlanCheckDetailService.deleteErpMonthProductivePlanCheckDetailListByIds(req.getIds());
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得ERP月度产品计划核对明细")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:query')")
+ public CommonResult getErpMonthProductivePlanCheckDetail(@RequestParam("id") Long id) {
+ ErpMonthProductivePlanCheckDetailDO erpMonthProductivePlanCheckDetail = erpMonthProductivePlanCheckDetailService.getErpMonthProductivePlanCheckDetail(id);
+ return success(BeanUtils.toBean(erpMonthProductivePlanCheckDetail, ErpMonthProductivePlanCheckDetailRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得ERP月度产品计划核对明细分页")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:query')")
+ public CommonResult> getErpMonthProductivePlanCheckDetailPage(@Valid ErpMonthProductivePlanCheckDetailPageReqVO pageReqVO) {
+ PageResult pageResult = erpMonthProductivePlanCheckDetailService.getErpMonthProductivePlanCheckDetailPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, ErpMonthProductivePlanCheckDetailRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出ERP月度产品计划核对明细 Excel")
+ @PreAuthorize("@ss.hasPermission('base:erp-month-productive-plan-check-detail:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportErpMonthProductivePlanCheckDetailExcel(@Valid ErpMonthProductivePlanCheckDetailPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = erpMonthProductivePlanCheckDetailService.getErpMonthProductivePlanCheckDetailPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "ERP月度产品计划核对明细.xls", "数据", ErpMonthProductivePlanCheckDetailRespVO.class,
+ BeanUtils.toBean(list, ErpMonthProductivePlanCheckDetailRespVO.class));
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailPageReqVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailPageReqVO.java
new file mode 100644
index 00000000..de786154
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailPageReqVO.java
@@ -0,0 +1,34 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import com.zt.plat.framework.common.pojo.PageParam;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对明细分页 Request VO")
+@Data
+public class ErpMonthProductivePlanCheckDetailPageReqVO extends PageParam {
+
+ @Schema(description = "日期(格式:YYYY-MM-DD)")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private String[] date;
+
+ @Schema(description = "排序")
+ private Integer sort;
+
+ @Schema(description = "值")
+ private BigDecimal value;
+
+ @Schema(description = "主数据ID(关联主表ID)", example = "3745")
+ private Long mainId;
+
+ @Schema(description = "创建时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private LocalDateTime[] createTime;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailRespVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailRespVO.java
new file mode 100644
index 00000000..da501488
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailRespVO.java
@@ -0,0 +1,40 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.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 com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对明细 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class ErpMonthProductivePlanCheckDetailRespVO {
+
+ @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14111")
+ @ExcelProperty("主键ID")
+ private Long id;
+
+ @Schema(description = "日期(格式:YYYY-MM-DD)")
+ @ExcelProperty("日期(格式:YYYY-MM-DD)")
+ private String date;
+
+ @Schema(description = "排序")
+ @ExcelProperty("排序")
+ private Integer sort;
+
+ @Schema(description = "值")
+ @ExcelProperty("值")
+ private BigDecimal value;
+
+ @Schema(description = "主数据ID(关联主表ID)", example = "3745")
+ @ExcelProperty("主数据ID(关联主表ID)")
+ private Long mainId;
+
+ @Schema(description = "创建时间")
+ @ExcelProperty("创建时间")
+ private LocalDateTime createTime;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailSaveReqVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailSaveReqVO.java
new file mode 100644
index 00000000..48e790dd
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckDetailSaveReqVO.java
@@ -0,0 +1,28 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import jakarta.validation.constraints.*;
+import java.math.BigDecimal;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对明细新增/修改 Request VO")
+@Data
+public class ErpMonthProductivePlanCheckDetailSaveReqVO {
+
+ @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14111")
+ private Long id;
+
+ @Schema(description = "日期(格式:YYYY-MM-DD)")
+ private String date;
+
+ @Schema(description = "排序")
+ private Integer sort;
+
+ @Schema(description = "值")
+ private BigDecimal value;
+
+ @Schema(description = "主数据ID(关联主表ID)", example = "3745")
+ private Long mainId;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckPageReqVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckPageReqVO.java
new file mode 100644
index 00000000..a4dc12c2
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckPageReqVO.java
@@ -0,0 +1,33 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import com.zt.plat.framework.common.pojo.PageParam;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对分页 Request VO")
+@Data
+public class ErpMonthProductivePlanCheckPageReqVO extends PageParam {
+
+ @Schema(description = "产品名")
+ private String product;
+
+ @Schema(description = "年度")
+ private String year;
+
+ @Schema(description = "月份")
+ private String month;
+
+ @Schema(description = "月计划量")
+ private BigDecimal monthPlan;
+
+ @Schema(description = "创建时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private LocalDateTime[] createTime;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckRespVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckRespVO.java
new file mode 100644
index 00000000..0b9d1bdf
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckRespVO.java
@@ -0,0 +1,43 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.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 com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class ErpMonthProductivePlanCheckRespVO {
+
+ @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19081")
+ @ExcelProperty("主键ID")
+ private Long id;
+
+ @Schema(description = "产品名")
+ @ExcelProperty("产品名")
+ private String product;
+
+ @Schema(description = "年度")
+ @ExcelProperty("年度")
+ private String year;
+
+ @Schema(description = "月份")
+ @ExcelProperty("月份")
+ private String month;
+
+ @Schema(description = "月计划量")
+ @ExcelProperty("月计划量")
+ private BigDecimal monthPlan;
+
+ @Schema(description = "创建时间")
+ @ExcelProperty("创建时间")
+ private LocalDateTime createTime;
+ @Schema(description = "详情")
+ @ExcelProperty("详情")
+ private List details;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckSaveReqVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckSaveReqVO.java
new file mode 100644
index 00000000..20e8ef21
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/erpmonthproductiveplancheck/vo/ErpMonthProductivePlanCheckSaveReqVO.java
@@ -0,0 +1,31 @@
+package com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import jakarta.validation.constraints.*;
+import java.math.BigDecimal;
+
+@Schema(description = "管理后台 - ERP月度产品计划核对新增/修改 Request VO")
+@Data
+public class ErpMonthProductivePlanCheckSaveReqVO {
+
+ @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19081")
+ private Long id;
+
+ @Schema(description = "产品名")
+ private String product;
+
+ @Schema(description = "年度")
+ private String year;
+
+ @Schema(description = "月份")
+ private String month;
+
+ @Schema(description = "月计划量")
+ private BigDecimal monthPlan;
+
+ @Schema(description = "月计划明细")
+ private List details;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanDateController.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanDateController.java
index 48eeab86..3cfe3265 100644
--- a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanDateController.java
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanDateController.java
@@ -113,7 +113,7 @@ public class PlanDateController implements BusinessControllerMarker {
@GetMapping("/tree/list-all")
@Operation(summary = "查询所有计划数据(树形结构)")
@PreAuthorize("@ss.hasPermission('base:plan-date:query')")
- public List listAllPlanDateTree() {
- return planDateService.listPlanDateTree();
+ public CommonResult> listAllPlanDateTree() {
+ return success(planDateService.listPlanDateTree());
}
}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanOrderController.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanOrderController.java
new file mode 100644
index 00000000..3559c5f5
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/PlanOrderController.java
@@ -0,0 +1,59 @@
+package com.zt.plat.module.base.controller.admin.plandate;
+
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDateRespVO;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanOrderSaveReqVO;
+import com.zt.plat.module.base.service.plandate.PlanOrderService;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
+import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import org.apache.ibatis.annotations.Delete;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import static com.zt.plat.framework.common.pojo.CommonResult.success;
+
+
+@Tag(name = "管理后台 - 计划数据与订单绑定")
+@RestController
+@RequestMapping("/base/plan-order")
+@Validated
+public class PlanOrderController {
+ @Resource
+ private PlanOrderService planOrderService;
+ //绑定订单
+ @PostMapping("/bind-order")
+ @Operation(summary = "计划与订单绑定")
+ @PreAuthorize("@ss.hasAnyPermissions({'base:plan-date:tree:list-all:query'})")
+ public CommonResult> bindOrder(@RequestBody PlanOrderSaveReqVO reqVO) {
+ return success( planOrderService.bindOrder(reqVO));
+ }
+ //解绑订单
+ @DeleteMapping("/release-order")
+ @Operation(summary = "计划与订单解绑")
+ @PreAuthorize("@ss.hasAnyPermissions({'base:plan-date:tree:list-all:releaseOrder'})")
+ public CommonResult> unbindOrder(@RequestParam("planId") String planId,@RequestParam("orderNumber") String orderNumber) {
+ planOrderService.unbindOrder(planId, orderNumber);
+ return success(true);
+ }
+ //根据订单号获取已绑定的订单
+ @GetMapping("/get-bound-order")
+ @Operation(summary = "根据计划ID获取已绑定的订单")
+ @PreAuthorize("@ss.hasAnyPermissions({'base:plan-date:tree:list-all:query'})")
+ public CommonResult> getBoundOrder(@RequestParam("planId") String planId) {
+ return success(planOrderService.getBoundOrder(planId));
+ }
+
+ //根据计划和订单的参数查询相关的订单
+ @PostMapping("/query-order-plan-data")
+ @Operation(summary = "根据计划和订单的参数查询相关的订单")
+ @PreAuthorize("@ss.hasAnyPermissions({'base:plan-date:tree:list-all:query'})")
+ public CommonResult> queryOrder(@RequestBody OrderAndPlanDataReqDTO reqVO) {
+ return success(planOrderService.queryOrderAndPlanData(reqVO));
+ }
+
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderRspVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderRspVO.java
new file mode 100644
index 00000000..6e8e2969
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderRspVO.java
@@ -0,0 +1,34 @@
+package com.zt.plat.module.base.controller.admin.plandate.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+@Schema(description = "计划数据与订单绑定响应VO")
+public class PlanOrderRspVO {
+ /**
+ * 编号
+ */
+ @Schema(description = "编号")
+ private Long id;
+ /**
+ * 订单编号
+ */
+ @Schema(description = "订单号")
+ private String orderNumber;
+ /**
+ * 订单类型
+ */
+ @Schema(description = "订单类型")
+ private String orderType;
+ /**
+ * 计划ID
+ */
+ @Schema(description = "计划ID")
+ private Long planId;
+ /**
+ * 订单状态
+ */
+ @Schema(description = "订单状态")
+ private String orderStatus;
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderSaveReqVO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderSaveReqVO.java
new file mode 100644
index 00000000..3e7f6545
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/controller/admin/plandate/vo/PlanOrderSaveReqVO.java
@@ -0,0 +1,35 @@
+package com.zt.plat.module.base.controller.admin.plandate.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+@Schema(description = "保存计划数据与订单绑定的请求VO")
+public class PlanOrderSaveReqVO {
+ /**
+ * 编号
+ */
+ @Schema(description = "编号")
+ private Long id;
+ /**
+ * 订单编号
+ */
+ @Schema(description = "订单号")
+ private String orderNumber;
+ /**
+ * 订单类型
+ */
+ @Schema(description = "订单类型")
+ private String orderType;
+ /**
+ * 订单ID
+ */
+ @Schema(description = "订单ID")
+ private Long orderId;
+ /**
+ * 计划ID
+ */
+ @Schema(description = "计划ID")
+ private Long planId;
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.java
new file mode 100644
index 00000000..6ebdcb4d
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.java
@@ -0,0 +1,31 @@
+package com.zt.plat.module.base.dal.dao.erpmonthproductiveplancheck;
+
+import java.util.*;
+
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
+import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailPageReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailDO;
+import org.apache.ibatis.annotations.Mapper;
+
+
+/**
+ * ERP月度产品计划核对明细 Mapper
+ *
+ * @author 后台管理-1
+ */
+@Mapper
+public interface ErpMonthProductivePlanCheckDetailMapper extends BaseMapperX {
+
+ default PageResult selectPage(ErpMonthProductivePlanCheckDetailPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .betweenIfPresent(ErpMonthProductivePlanCheckDetailDO::getDate, reqVO.getDate())
+ .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getSort, reqVO.getSort())
+ .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getValue, reqVO.getValue())
+ .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getMainId, reqVO.getMainId())
+ .betweenIfPresent(ErpMonthProductivePlanCheckDetailDO::getCreateTime, reqVO.getCreateTime())
+ .orderByDesc(ErpMonthProductivePlanCheckDetailDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.java
new file mode 100644
index 00000000..3b719f93
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.java
@@ -0,0 +1,32 @@
+package com.zt.plat.module.base.dal.dao.erpmonthproductiveplancheck;
+
+import java.util.*;
+
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
+import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
+
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckPageReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDO;
+import org.apache.ibatis.annotations.Mapper;
+
+
+/**
+ * ERP月度产品计划核对 Mapper
+ *
+ * @author 后台管理-1
+ */
+@Mapper
+public interface ErpMonthProductivePlanCheckMapper extends BaseMapperX {
+
+ default PageResult selectPage(ErpMonthProductivePlanCheckPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .eqIfPresent(ErpMonthProductivePlanCheckDO::getProduct, reqVO.getProduct())
+ .eqIfPresent(ErpMonthProductivePlanCheckDO::getYear, reqVO.getYear())
+ .eqIfPresent(ErpMonthProductivePlanCheckDO::getMonth, reqVO.getMonth())
+ .eqIfPresent(ErpMonthProductivePlanCheckDO::getMonthPlan, reqVO.getMonthPlan())
+ .betweenIfPresent(ErpMonthProductivePlanCheckDO::getCreateTime, reqVO.getCreateTime())
+ .orderByDesc(ErpMonthProductivePlanCheckDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/plandate/PlanOrderMapper.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/plandate/PlanOrderMapper.java
new file mode 100644
index 00000000..115a4b5e
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dao/plandate/PlanOrderMapper.java
@@ -0,0 +1,9 @@
+package com.zt.plat.module.base.dal.dao.plandate;
+
+import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
+import com.zt.plat.module.base.dal.dataobject.plandate.PlanOrderDO;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface PlanOrderMapper extends BaseMapperX {
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDO.java
new file mode 100644
index 00000000..e6b312fe
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDO.java
@@ -0,0 +1,56 @@
+package com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck;
+
+import lombok.*;
+import java.util.*;
+ import java.math.BigDecimal;
+ import java.time.LocalDateTime;
+ import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
+/**
+* ERP月度产品计划核对 DO
+*
+* @author 后台管理-1
+*/
+@TableName("bes_erp_mnt_pdtv_pln_chk")
+@KeySequence("bes_erp_mnt_pdtv_pln_chk_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+/**
+* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
+*/
+public class ErpMonthProductivePlanCheckDO extends BusinessBaseDO {
+
+
+
+ /**
+ * 主键ID
+ */
+ @TableId(type = IdType.ASSIGN_ID)
+ private Long id;
+ /**
+ * 产品名
+ */
+ @TableField("PDT")
+ private String product;
+ /**
+ * 年度
+ */
+ @TableField("YR")
+ private String year;
+ /**
+ * 月份
+ */
+ @TableField("MNT")
+ private String month;
+ /**
+ * 月计划量
+ */
+ @TableField("MNT_PLN")
+ private BigDecimal monthPlan;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailDO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailDO.java
new file mode 100644
index 00000000..25d04f4e
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailDO.java
@@ -0,0 +1,56 @@
+package com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck;
+
+import lombok.*;
+import java.util.*;
+ import java.math.BigDecimal;
+ import java.time.LocalDateTime;
+ import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
+/**
+* ERP月度产品计划核对明细 DO
+*
+* @author 后台管理-1
+*/
+@TableName("bes_erp_mnt_pdtv_pln_chk_dtl")
+@KeySequence("bes_erp_mnt_pdtv_pln_chk_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+/**
+* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
+*/
+public class ErpMonthProductivePlanCheckDetailDO extends BusinessBaseDO {
+
+
+
+ /**
+ * 主键ID
+ */
+ @TableId(type = IdType.ASSIGN_ID)
+ private Long id;
+ /**
+ * 日期(格式:YYYY-MM-DD)
+ */
+ @TableField("DT")
+ private String date;
+ /**
+ * 排序
+ */
+ @TableField("SRT")
+ private Integer sort;
+ /**
+ * 值
+ */
+ @TableField("VAL")
+ private BigDecimal value;
+ /**
+ * 主数据ID(关联主表ID)
+ */
+ @TableField("MAIN_ID")
+ private Long mainId;
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/plandate/PlanOrderDO.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/plandate/PlanOrderDO.java
new file mode 100644
index 00000000..5df5da91
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/dal/dataobject/plandate/PlanOrderDO.java
@@ -0,0 +1,51 @@
+package com.zt.plat.module.base.dal.dataobject.plandate;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
+import lombok.*;
+
+/**
+ * 计划订单 DO
+ *
+ * @author 后台管理-1
+ */
+@TableName("bse_pln_ord_corr")
+@KeySequence("bse_pln_ord_corr_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+/**
+ * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
+ */
+public class PlanOrderDO extends BusinessBaseDO {
+ /**
+ * 编号
+ */
+ @TableId(type = IdType.ASSIGN_ID)
+ private Long id;
+ /**
+ * 订单编号
+ */
+ @TableField("ORD_NUM")
+ private String orderNumber;
+
+ /**
+ * 订单类型
+ */
+ @TableField("ORD_ID")
+ private Long orderId;
+
+ /**
+ * 订单类型
+ */
+ @TableField("ORD_TP")
+ private String orderType;
+ /**
+ * 计划ID
+ */
+ @TableField("PLN_ID")
+ private Long planId;
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailService.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailService.java
new file mode 100644
index 00000000..7160ae18
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailService.java
@@ -0,0 +1,81 @@
+package com.zt.plat.module.base.service.erpmonthproductiveplancheck;
+
+import java.util.*;
+
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailSaveReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailDO;
+import jakarta.validation.*;
+
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.PageParam;
+
+/**
+ * ERP月度产品计划核对明细 Service 接口
+ *
+ * @author 后台管理-1
+ */
+public interface ErpMonthProductivePlanCheckDetailService {
+
+ /**
+ * 创建ERP月度产品计划核对明细
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ ErpMonthProductivePlanCheckDetailRespVO createErpMonthProductivePlanCheckDetail(@Valid ErpMonthProductivePlanCheckDetailSaveReqVO createReqVO);
+
+ /**
+ * 创建ERP月度产品计划核对明细
+ *
+ * @param createReqVOS 创建信息
+ * @return 编号
+ */
+ List createErpMonthProductivePlanCheckDetail(@Valid List createReqVOS);
+
+ /**
+ * 更新ERP月度产品计划核对明细
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateErpMonthProductivePlanCheckDetail(@Valid ErpMonthProductivePlanCheckDetailSaveReqVO updateReqVO);
+
+ /**
+ * 删除ERP月度产品计划核对明细
+ *
+ * @param id 编号
+ */
+ void deleteErpMonthProductivePlanCheckDetail(Long id);
+
+ /**
+ * 批量删除ERP月度产品计划核对明细
+ *
+ * @param ids 编号
+ */
+ void deleteErpMonthProductivePlanCheckDetailListByIds(List ids);
+
+ /**
+ * 获得ERP月度产品计划核对明细
+ *
+ * @param id 编号
+ * @return ERP月度产品计划核对明细
+ */
+ ErpMonthProductivePlanCheckDetailDO getErpMonthProductivePlanCheckDetail(Long id);
+
+ /**
+ * 获得ERP月度产品计划核对明细分页
+ *
+ * @param pageReqVO 分页查询
+ * @return ERP月度产品计划核对明细分页
+ */
+ PageResult getErpMonthProductivePlanCheckDetailPage(ErpMonthProductivePlanCheckDetailPageReqVO pageReqVO);
+
+ /**
+ * 根据mainId获取到ERP月度产品计划核对明细
+ *
+ * @param mainId 分页查询
+ * @return ERP月度产品计划核对明细
+ */
+ List getErpMonthProductivePlanCheckDetailListByMainId(Long mainId);
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailServiceImpl.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailServiceImpl.java
new file mode 100644
index 00000000..d1efa357
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailServiceImpl.java
@@ -0,0 +1,106 @@
+package com.zt.plat.module.base.service.erpmonthproductiveplancheck;
+
+import cn.hutool.core.collection.CollUtil;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailSaveReqVO;
+import com.zt.plat.module.base.dal.dao.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailMapper;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailDO;
+import jakarta.annotation.Resource;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+
+import java.util.List;
+
+import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zt.plat.module.erpmonthproductiveplancheck.ErrorCodeConstants.ERP_MONTH_PRODUCTIVE_PLAN_CHECK_DETAIL_NOT_EXISTS;
+
+
+/**
+ * ERP月度产品计划核对明细 Service 实现类
+ *
+ * @author 后台管理-1
+ */
+@Service
+@Validated
+public class ErpMonthProductivePlanCheckDetailServiceImpl implements ErpMonthProductivePlanCheckDetailService {
+
+ @Resource
+ private ErpMonthProductivePlanCheckDetailMapper erpMonthProductivePlanCheckDetailMapper;
+
+ @Override
+ public ErpMonthProductivePlanCheckDetailRespVO createErpMonthProductivePlanCheckDetail(ErpMonthProductivePlanCheckDetailSaveReqVO createReqVO) {
+ // 插入
+ ErpMonthProductivePlanCheckDetailDO erpMonthProductivePlanCheckDetail = BeanUtils.toBean(createReqVO, ErpMonthProductivePlanCheckDetailDO.class);
+ erpMonthProductivePlanCheckDetailMapper.insert(erpMonthProductivePlanCheckDetail);
+ // 返回
+ return BeanUtils.toBean(erpMonthProductivePlanCheckDetail, ErpMonthProductivePlanCheckDetailRespVO.class);
+ }
+
+ @Override
+ public List createErpMonthProductivePlanCheckDetail(List createReqVOS) {
+ if (CollUtil.isEmpty(createReqVOS)) {
+ return List.of();
+ }
+ List erpMonthProductivePlanCheckDetails = BeanUtils.toBean(createReqVOS, ErpMonthProductivePlanCheckDetailDO.class);
+ erpMonthProductivePlanCheckDetailMapper.insertBatch(erpMonthProductivePlanCheckDetails);
+ return BeanUtils.toBean(erpMonthProductivePlanCheckDetails, ErpMonthProductivePlanCheckDetailRespVO.class);
+ }
+
+ @Override
+ public void updateErpMonthProductivePlanCheckDetail(ErpMonthProductivePlanCheckDetailSaveReqVO updateReqVO) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckDetailExists(updateReqVO.getId());
+ // 更新
+ ErpMonthProductivePlanCheckDetailDO updateObj = BeanUtils.toBean(updateReqVO, ErpMonthProductivePlanCheckDetailDO.class);
+ erpMonthProductivePlanCheckDetailMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteErpMonthProductivePlanCheckDetail(Long id) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckDetailExists(id);
+ // 删除
+ erpMonthProductivePlanCheckDetailMapper.deleteById(id);
+ }
+
+ @Override
+ public void deleteErpMonthProductivePlanCheckDetailListByIds(List ids) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckDetailExists(ids);
+ // 删除
+ erpMonthProductivePlanCheckDetailMapper.deleteByIds(ids);
+ }
+
+ private void validateErpMonthProductivePlanCheckDetailExists(List ids) {
+ List list = erpMonthProductivePlanCheckDetailMapper.selectByIds(ids);
+ if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
+ throw exception(ERP_MONTH_PRODUCTIVE_PLAN_CHECK_DETAIL_NOT_EXISTS);
+ }
+ }
+
+ private void validateErpMonthProductivePlanCheckDetailExists(Long id) {
+ if (erpMonthProductivePlanCheckDetailMapper.selectById(id) == null) {
+ throw exception(ERP_MONTH_PRODUCTIVE_PLAN_CHECK_DETAIL_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public ErpMonthProductivePlanCheckDetailDO getErpMonthProductivePlanCheckDetail(Long id) {
+ return erpMonthProductivePlanCheckDetailMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getErpMonthProductivePlanCheckDetailPage(ErpMonthProductivePlanCheckDetailPageReqVO pageReqVO) {
+ return erpMonthProductivePlanCheckDetailMapper.selectPage(pageReqVO);
+ }
+
+ @Override
+ public List getErpMonthProductivePlanCheckDetailListByMainId(Long mainId) {
+
+ return BeanUtils.toBean(erpMonthProductivePlanCheckDetailMapper.selectList(ErpMonthProductivePlanCheckDetailDO::getMainId, mainId), ErpMonthProductivePlanCheckDetailRespVO.class);
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckService.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckService.java
new file mode 100644
index 00000000..c2725e76
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckService.java
@@ -0,0 +1,78 @@
+package com.zt.plat.module.base.service.erpmonthproductiveplancheck;
+
+import java.util.*;
+
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckSaveReqVO;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDO;
+import jakarta.validation.*;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.pojo.PageParam;
+
+/**
+ * ERP月度产品计划核对 Service 接口
+ *
+ * @author 后台管理-1
+ */
+public interface ErpMonthProductivePlanCheckService {
+
+ /**
+ * 创建ERP月度产品计划核对
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ ErpMonthProductivePlanCheckRespVO createErpMonthProductivePlanCheck(@Valid ErpMonthProductivePlanCheckSaveReqVO createReqVO);
+
+ /**
+ * 更新ERP月度产品计划核对
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateErpMonthProductivePlanCheck(@Valid ErpMonthProductivePlanCheckSaveReqVO updateReqVO);
+
+ /**
+ * 删除ERP月度产品计划核对
+ *
+ * @param id 编号
+ */
+ void deleteErpMonthProductivePlanCheck(Long id);
+
+ /**
+ * 批量删除ERP月度产品计划核对
+ *
+ * @param ids 编号
+ */
+ void deleteErpMonthProductivePlanCheckListByIds(List ids);
+
+ /**
+ * 获得ERP月度产品计划核对
+ *
+ * @param id 编号
+ * @return ERP月度产品计划核对
+ */
+ ErpMonthProductivePlanCheckDO getErpMonthProductivePlanCheck(Long id);
+
+ /**
+ * 获得ERP月度产品计划核对分页
+ *
+ * @param pageReqVO 分页查询
+ * @return ERP月度产品计划核对分页
+ */
+ PageResult getErpMonthProductivePlanCheckPage(ErpMonthProductivePlanCheckPageReqVO pageReqVO);
+ /**
+ * 批量创建ERP月度产品计划核对
+ *
+ * @param createReqVOList 创建信息
+ */
+ void createBatchErpMonthProductivePlanCheck(List createReqVOList);
+ /**
+ * 获得ERP月度产品计划核对明细
+ *
+ * @param id 编号
+ * @return ERP月度产品计划核对明细
+ */
+ List getErpMonthProductivePlanCheckDetail(Long id);
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckServiceImpl.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckServiceImpl.java
new file mode 100644
index 00000000..7c82fffe
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckServiceImpl.java
@@ -0,0 +1,133 @@
+package com.zt.plat.module.base.service.erpmonthproductiveplancheck;
+
+import cn.hutool.core.collection.CollUtil;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckDetailRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckPageReqVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckRespVO;
+import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckSaveReqVO;
+import com.zt.plat.module.base.dal.dao.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckMapper;
+import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDO;
+import jakarta.annotation.Resource;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zt.plat.module.erpmonthproductiveplancheck.ErrorCodeConstants.DATA_NOT_ERROR;
+import static com.zt.plat.module.erpmonthproductiveplancheck.ErrorCodeConstants.ERP_MONTH_PRODUCTIVE_PLAN_CHECK_NOT_EXISTS;
+
+
+/**
+ * ERP月度产品计划核对 Service 实现类
+ *
+ * @author 后台管理-1
+ */
+@Service
+@Validated
+public class ErpMonthProductivePlanCheckServiceImpl implements ErpMonthProductivePlanCheckService {
+
+ @Resource
+ private ErpMonthProductivePlanCheckMapper erpMonthProductivePlanCheckMapper;
+
+
+ @Resource
+ private ErpMonthProductivePlanCheckDetailService erpMonthProductivePlanCheckDetailService;
+
+ @Override
+ public ErpMonthProductivePlanCheckRespVO createErpMonthProductivePlanCheck(ErpMonthProductivePlanCheckSaveReqVO createReqVO) {
+ // 插入
+ ErpMonthProductivePlanCheckDO erpMonthProductivePlanCheck = BeanUtils.toBean(createReqVO, ErpMonthProductivePlanCheckDO.class);
+ erpMonthProductivePlanCheckMapper.insert(erpMonthProductivePlanCheck);
+ List erpMonthProductivePlanCheckDetail = new ArrayList<>();
+ if (createReqVO.getDetails() != null && !createReqVO.getDetails().isEmpty()) {
+ createReqVO.getDetails().forEach(detail -> detail.setMainId(erpMonthProductivePlanCheck.getId()));
+ erpMonthProductivePlanCheckDetail = erpMonthProductivePlanCheckDetailService.createErpMonthProductivePlanCheckDetail(createReqVO.getDetails());
+ }
+ // 返回
+ ErpMonthProductivePlanCheckRespVO erpMonthProductivePlanCheckRespVO = BeanUtils.toBean(erpMonthProductivePlanCheck, ErpMonthProductivePlanCheckRespVO.class);
+ erpMonthProductivePlanCheckRespVO.setDetails(erpMonthProductivePlanCheckDetail);
+ return erpMonthProductivePlanCheckRespVO;
+ }
+
+ @Override
+ public void updateErpMonthProductivePlanCheck(ErpMonthProductivePlanCheckSaveReqVO updateReqVO) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckExists(updateReqVO.getId());
+ // 更新
+ ErpMonthProductivePlanCheckDO updateObj = BeanUtils.toBean(updateReqVO, ErpMonthProductivePlanCheckDO.class);
+ erpMonthProductivePlanCheckMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteErpMonthProductivePlanCheck(Long id) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckExists(id);
+ // 删除
+ erpMonthProductivePlanCheckMapper.deleteById(id);
+ }
+
+ @Override
+ public void deleteErpMonthProductivePlanCheckListByIds(List ids) {
+ // 校验存在
+ validateErpMonthProductivePlanCheckExists(ids);
+ // 删除
+ erpMonthProductivePlanCheckMapper.deleteByIds(ids);
+ }
+
+ private void validateErpMonthProductivePlanCheckExists(List ids) {
+ List list = erpMonthProductivePlanCheckMapper.selectByIds(ids);
+ if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
+ throw exception(ERP_MONTH_PRODUCTIVE_PLAN_CHECK_NOT_EXISTS);
+ }
+ }
+
+ private void validateErpMonthProductivePlanCheckExists(Long id) {
+ if (erpMonthProductivePlanCheckMapper.selectById(id) == null) {
+ throw exception(ERP_MONTH_PRODUCTIVE_PLAN_CHECK_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public ErpMonthProductivePlanCheckDO getErpMonthProductivePlanCheck(Long id) {
+ return erpMonthProductivePlanCheckMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getErpMonthProductivePlanCheckPage(ErpMonthProductivePlanCheckPageReqVO pageReqVO) {
+ return erpMonthProductivePlanCheckMapper.selectPage(pageReqVO);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void createBatchErpMonthProductivePlanCheck(List createReqVOList) {
+ if (createReqVOList == null || createReqVOList.isEmpty()) {
+ throw exception(DATA_NOT_ERROR);
+ }
+ createReqVOList.forEach(createReqVO -> {
+ ErpMonthProductivePlanCheckDO erpMonthProductivePlanCheck = BeanUtils.toBean(createReqVO, ErpMonthProductivePlanCheckDO.class);
+ erpMonthProductivePlanCheckMapper.insert(erpMonthProductivePlanCheck);
+ if (createReqVO.getDetails() != null && !createReqVO.getDetails().isEmpty()) {
+ createReqVO.getDetails().forEach(detail -> detail.setMainId(erpMonthProductivePlanCheck.getId()));
+ erpMonthProductivePlanCheckDetailService.createErpMonthProductivePlanCheckDetail(createReqVO.getDetails());
+ }
+ });
+ }
+
+ @Override
+ public List getErpMonthProductivePlanCheckDetail(Long id) {
+ return setErpMonthProductivePlanCheckDetailData(id);
+ }
+
+ private List setErpMonthProductivePlanCheckDetailData(Long id){
+ if (id == null){
+ return new ArrayList<>();
+ }
+ return erpMonthProductivePlanCheckDetailService.getErpMonthProductivePlanCheckDetailListByMainId(id);
+ }
+
+}
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderService.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderService.java
new file mode 100644
index 00000000..a155c97b
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderService.java
@@ -0,0 +1,20 @@
+package com.zt.plat.module.base.service.plandate;
+
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDateRespVO;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanOrderRspVO;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanOrderSaveReqVO;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
+import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
+
+public interface PlanOrderService {
+
+ PlanOrderRspVO bindOrder(PlanOrderSaveReqVO reqVO);
+
+ void unbindOrder(String planId, String orderNumber);
+
+ PageResult getBoundOrder(String id);
+
+
+ PageResult queryOrderAndPlanData(OrderAndPlanDataReqDTO reqVO);
+}
diff --git a/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderServiceImpl.java b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderServiceImpl.java
new file mode 100644
index 00000000..20685a31
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/java/com/zt/plat/module/base/service/plandate/PlanOrderServiceImpl.java
@@ -0,0 +1,74 @@
+package com.zt.plat.module.base.service.plandate;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.framework.common.util.object.BeanUtils;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDateRespVO;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanOrderRspVO;
+import com.zt.plat.module.base.controller.admin.plandate.vo.PlanOrderSaveReqVO;
+import com.zt.plat.module.base.dal.dao.plandate.PlanOrderMapper;
+import com.zt.plat.module.base.dal.dataobject.plandate.PlanOrderDO;
+import com.zt.plat.module.contractorder.api.OrderApi;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
+import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
+import jakarta.annotation.Resource;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+
+import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zt.plat.module.base.enums.ErrorCodeConstants.*;
+
+@Service
+@Validated
+public class PlanOrderServiceImpl implements PlanOrderService {
+ @Resource
+ private PlanOrderMapper planOrderMapper;
+
+ @Resource
+ private OrderApi orderApi;
+
+ @Override
+ public PlanOrderRspVO bindOrder(PlanOrderSaveReqVO reqVO) {
+ PlanOrderDO bean = BeanUtils.toBean(reqVO, PlanOrderDO.class);
+ //校验当前计划下是否已存在该类型的订单
+ validateExists(reqVO);
+ planOrderMapper.insert(bean);
+ return BeanUtils.toBean(bean, PlanOrderRspVO.class);
+ }
+
+
+ @Override
+ public void unbindOrder(String planId, String orderNumber) {
+ //检验存在
+ validateExists(planId, orderNumber);
+ planOrderMapper.delete(new LambdaQueryWrapper().eq(PlanOrderDO::getPlanId, planId).eq(PlanOrderDO::getOrderNumber, orderNumber));
+ }
+
+ @Override
+ public PageResult getBoundOrder(String id) {
+ OrderAndPlanDataReqDTO reqVO = new OrderAndPlanDataReqDTO();
+ reqVO.setPlanId(id);
+ CommonResult> pageResultCommonResult = orderApi.queryOrderPlanData(reqVO);
+ return pageResultCommonResult.getData();
+ }
+
+ @Override
+ public PageResult queryOrderAndPlanData(OrderAndPlanDataReqDTO reqVO) {
+ CommonResult> pageResultCommonResult = orderApi.queryOrderPlanData(reqVO);
+ return pageResultCommonResult.getData();
+ }
+
+ private void validateExists(PlanOrderSaveReqVO reqVO) {
+ if (planOrderMapper.exists(new LambdaQueryWrapper().eq(PlanOrderDO::getPlanId, reqVO.getPlanId()).eq(PlanOrderDO::getOrderType, reqVO.getOrderType()).eq(PlanOrderDO::getOrderNumber, reqVO.getOrderNumber()))) {
+ throw exception(PLAN_ORD_EXISTS);
+ }
+ }
+
+ private void validateExists(String planId, String orderNumber) {
+ if (planOrderMapper.selectOne(new LambdaQueryWrapper().eq(PlanOrderDO::getPlanId, planId).eq(PlanOrderDO::getOrderNumber, orderNumber),false) == null) {
+ throw exception(PLAN_ORD_NOT_EXISTS);
+ }
+ }
+}
+
diff --git a/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.xml b/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.xml
new file mode 100644
index 00000000..458dfc12
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckDetailMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.xml b/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.xml
new file mode 100644
index 00000000..ea5dd2d6
--- /dev/null
+++ b/zt-module-base/zt-module-base-server/src/main/resources/mapper/erpmonthproductiveplancheck/ErpMonthProductivePlanCheckMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/OrderApi.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/OrderApi.java
index 2c6aa4da..4cce3700 100644
--- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/OrderApi.java
+++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/OrderApi.java
@@ -1,6 +1,8 @@
package com.zt.plat.module.contractorder.api;
import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.pojo.PageResult;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
import com.zt.plat.module.contractorder.api.dto.order.UpdateOrderLstQtyDTO;
@@ -44,4 +46,8 @@ public interface OrderApi {
@GetMapping(PREFIX + "/get-salas-order-details-by-id")
@Operation(summary = "通过销售订单明细id获取销售订单详情", description = "通过销售订单明细id获取销售订单详情")
CommonResult getSalesOrderDetailsByOrderId(@RequestParam("id") Long id);
+
+ @PostMapping(PREFIX + "/query-order-plan-data")
+ @Operation(summary = "根据计划和订单的参数查询相关的订单", description = "根据计划和订单的参数查询相关的订单")
+ CommonResult> queryOrderPlanData(@RequestBody @Valid OrderAndPlanDataReqDTO reqVO);
}
diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/order/OrderAndPlanDataReqDTO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/order/OrderAndPlanDataReqDTO.java
new file mode 100644
index 00000000..40152226
--- /dev/null
+++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/order/OrderAndPlanDataReqDTO.java
@@ -0,0 +1,41 @@
+package com.zt.plat.module.contractorder.api.dto.order;
+import com.zt.plat.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.Data;
+import org.springframework.validation.annotation.Validated;
+
+@Data
+@Schema(description = "订单和计划数据请求DTO")
+@Validated
+public class OrderAndPlanDataReqDTO extends PageParam {
+ //合同编号
+ @Schema(description = "合同编号")
+ private String contractSystemNumber;
+ //纸质合同编号
+ @Schema(description = "纸质合同编号")
+ private String paperContractNumber;
+ //订单号
+ @Schema(description = "订单号")
+ private String orderNumber;
+ //订单分类
+ @Schema(description = "订单分类")
+ //@NotEmpty(message = "订单分类不能为空")
+ private String orderType;
+ //物料编码
+ @Schema(description = "物料编码")
+ private String materialNumber;
+ //物料名称
+ @Schema(description = "物料名称")
+ private String materialName;
+ //客商编码
+ @Schema(description = "客商编码")
+ private String customerNumber;
+ //客商名称
+ @Schema(description = "客商名称")
+ private String customerName;
+ //计划编号
+ @Schema(description = "计划编号")
+ @NotEmpty(message = "计划Id不能为空")
+ private String planId;
+}
diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/api/OrderApiImpl.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/api/OrderApiImpl.java
index 52d2fe34..9b4b6c88 100644
--- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/api/OrderApiImpl.java
+++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/api/OrderApiImpl.java
@@ -3,6 +3,7 @@ package com.zt.plat.module.contractorder.api;
import cn.hutool.extra.spring.SpringUtil;
import com.zt.plat.framework.common.exception.ErrorCode;
import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.contractorder.api.dto.order.*;
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PrchOrdDtlDO;
@@ -183,6 +184,13 @@ public class OrderApiImpl implements OrderApi {
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
}
+ @Override
+ public CommonResult> queryOrderPlanData(OrderAndPlanDataReqDTO reqVO) {
+ PageResult pageResult = purchaseOrderService.queryOrderAndPlanData(reqVO);
+ List bean = BeanUtils.toBean(pageResult.getList(), OrderDTO.class);
+ return success(new PageResult<>(bean, pageResult.getTotal()));
+ }
+
private List getOrderByIds(List ids) {
return SpringUtil.getBean(SalesOrderMapper.class).selectByIds(ids); // 采购订单与销售订单的
}
diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/mysql/purchaseorder/PurchaseOrderMapper.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/mysql/purchaseorder/PurchaseOrderMapper.java
index 2e5cf0ff..bfbf7582 100644
--- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/mysql/purchaseorder/PurchaseOrderMapper.java
+++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/mysql/purchaseorder/PurchaseOrderMapper.java
@@ -6,6 +6,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO;
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
@@ -71,4 +72,6 @@ public interface PurchaseOrderMapper extends BaseMapperX {
List selectOrderByIds(@Param("ids") List id);
PurchaseOrderDO selectByOrderId(@Param("orderId") Long orderId);
+
+ List queryOrderAndPlanData(OrderAndPlanDataReqDTO reqDTO);
}
diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderService.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderService.java
index 6e9590b2..c019833c 100644
--- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderService.java
+++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderService.java
@@ -3,6 +3,7 @@ package com.zt.plat.module.contractorder.service.purchaseorder;
import java.util.*;
import com.zt.plat.framework.common.pojo.CommonResult;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
import com.zt.plat.module.contractorder.controller.admin.salesorder.vo.SalesOrderSaveReqVO;
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
@@ -145,4 +146,12 @@ public interface PurchaseOrderService {
* @return 订单详情
*/
List getOrdersByIds(List ids);
+
+ /**
+ * 查询订单和计划数据
+ *
+ * @param reqDTO 查询条件
+ * @return 订单和计划数据
+ */
+ PageResult queryOrderAndPlanData(OrderAndPlanDataReqDTO reqDTO);
}
diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderServiceImpl.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderServiceImpl.java
index 8fce6292..be6bc10f 100644
--- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderServiceImpl.java
+++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/purchaseorder/PurchaseOrderServiceImpl.java
@@ -13,6 +13,7 @@ import com.zt.plat.module.bpm.api.task.BpmProcessInstanceApi;
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
import com.zt.plat.module.bpm.api.task.dto.*;
import com.zt.plat.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
+import com.zt.plat.module.contractorder.api.dto.order.OrderAndPlanDataReqDTO;
import com.zt.plat.module.contractorder.api.vo.contract.ContractRespVO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
import com.zt.plat.module.contractorder.dal.dataobject.contract.SystemRelativityDO;
@@ -698,6 +699,8 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
return purchaseOrderMapper.selectByIds(ids);
}
+
+
@Override
@Transactional(rollbackFor=Exception.class)
public boolean orderPassReject(PurchaseorderReqVO purchaseorderReqVO) {
@@ -788,4 +791,24 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
int number = (int) (Math.random() * 900000 + 100000);
return String.valueOf(number);
}
+
+ @Override
+ public PageResult queryOrderAndPlanData(OrderAndPlanDataReqDTO reqDTO) {
+ // 1. 查询所有符合条件的数据
+ List allData = purchaseOrderMapper.queryOrderAndPlanData(reqDTO);
+
+ // 2. 获取分页参数
+ Integer pageSize = reqDTO.getPageSize();
+ Integer pageNum = reqDTO.getPageNo();
+
+ // 3. 计算分页截取的起始/结束索引
+ int startIndex = (pageNum - 1) * pageSize;
+ int endIndex = Math.min(startIndex + pageSize, allData.size());
+
+ // 4. 截取当前页数据(索引越界时返回空列表)
+ List pageData = startIndex >= allData.size()
+ ? new ArrayList<>()
+ : allData.subList(startIndex, endIndex);
+ return new PageResult<>(pageData, (long) allData.size());
+ }
}
diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/resources/mapper/purchaseorder/PurchaseOrderMapper.xml b/zt-module-contract-order/zt-module-contract-order-server/src/main/resources/mapper/purchaseorder/PurchaseOrderMapper.xml
index ffba659c..67916f0d 100644
--- a/zt-module-contract-order/zt-module-contract-order-server/src/main/resources/mapper/purchaseorder/PurchaseOrderMapper.xml
+++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/resources/mapper/purchaseorder/PurchaseOrderMapper.xml
@@ -237,17 +237,23 @@
-
+
-
+
-
+
@@ -298,7 +304,8 @@
-
+
@@ -346,4 +353,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+