From e756af0f5bfd1addbd5d5c145441fb34aad91a28 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期三, 25 六月 2025 13:55:58 +0800
Subject: [PATCH] 同步工控网

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java
index d22845e..4d861f3 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/ProductMixMapper.java
@@ -1,7 +1,46 @@
 package org.jeecg.modules.dnc.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import io.lettuce.core.dynamic.annotation.Param;
+import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.dnc.entity.ProductMix;
 
-public interface ProductMixMapper  extends BaseMapper<ProductMix> {
+public interface ProductMixMapper extends BaseMapper<ProductMix> {
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{productId} AND tree_type = 1")
+    ProductMix findByProductId(@Param("productId") String productId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{componentId} AND tree_type = 2")
+    ProductMix findByComponentId(@Param("componentId") String componentId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{partsId} AND tree_type = 3")
+    ProductMix findByPartsId(@Param("partsId") String partsId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{operationId} AND tree_type = 4")
+    ProductMix findByOperationId(@Param("operationId") String operationId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{processId} AND tree_type = 5")
+    ProductMix findByProcessId(@Param("operationId") String processId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{worksiteId} AND tree_type = 6")
+    ProductMix findByWorksiteId(@Param("operationId") String worksiteId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{productId} AND tree_type = 1")
+    ProductMix findByProductId(@Param("productId") String productId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{componentId} AND tree_type = 2")
+    ProductMix findByComponentId(@Param("componentId") String componentId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{partsId} AND tree_type = 3")
+    ProductMix findByPartsId(@Param("partsId") String partsId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{operationId} AND tree_type = 4")
+    ProductMix findByOperationId(@Param("operationId") String operationId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{processId} AND tree_type = 5")
+    ProductMix findByProcessId(@Param("operationId") String processId);
+
+    @Select("SELECT * FROM nc_product_mix WHERE id = #{worksiteId} AND tree_type = 6")
+    ProductMix findByWorksiteId(@Param("operationId") String worksiteId);
+
+
 }

--
Gitblit v1.9.3