From 6c82f16f44cf9e51d0fae9593fdefe4c43cb5e55 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 06 五月 2026 15:38:38 +0800
Subject: [PATCH] feat:1.生产追溯(订单-工单-报工-质检) 2.订单工序数据查询 3.领料退料调整
---
src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
index 18bdc96..afe4de3 100644
--- a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
+++ b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
@@ -1,16 +1,15 @@
package com.ruoyi.projectManagement.service.impl.handle;
import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.projectManagement.dto.ContractInfoDto;
import com.ruoyi.projectManagement.mapper.ContractInfoMapper;
import com.ruoyi.projectManagement.pojo.ContractInfo;
+import jakarta.annotation.Nullable;
+import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Nullable;
-import javax.validation.constraints.NotNull;
/**
* @author buhuazhen
@@ -19,10 +18,10 @@
*/
@Component
@Transactional(rollbackFor = Exception.class,readOnly = true)
+@RequiredArgsConstructor
public class ContractInfoHandleService{
- @Autowired
- private ContractInfoMapper contractInfoMapper;
+ private final ContractInfoMapper contractInfoMapper;
@Transactional(rollbackFor = Exception.class)
public void save(@Nullable Long id, @NotNull ContractInfoDto contractInfoDto) {
@@ -34,4 +33,14 @@
contractInfoMapper.updateById(contractInfo);
}
}
+
+ public ContractInfoDto getByInfoId(@NotNull Long id) {
+ LambdaQueryWrapper<ContractInfo> queryWrapper = new LambdaQueryWrapper<ContractInfo>();
+ queryWrapper.eq(ContractInfo::getProjectManagementInfoId, id);
+ queryWrapper.eq(ContractInfo::getIsDelete, 0);
+ queryWrapper.last("limit 1");
+ ContractInfo contractInfo = contractInfoMapper.selectOne(queryWrapper);
+ return BeanUtil.copyProperties(contractInfo, ContractInfoDto.class);
+ }
+
}
--
Gitblit v1.9.3