cxd hace 5 meses
padre
commit
79c44b4d5c

+ 9 - 0
gqy-system/src/main/java/com/gqy/document/mapper/DcProductMapper.java

@@ -13,6 +13,15 @@ public interface DcProductMapper {
 
 
 
+    /**
+     * 根据产品名称查询产品信息
+     *
+     * @param dcp_name 产品名称
+     * @return 产品信息
+     */
+    public DcProduct selectDcProductByName(String dcp_name);
+
+
     /**
      * 批量删除产品对象 dc_product
      *

+ 13 - 0
gqy-system/src/main/java/com/gqy/document/mapper/WorkMapper.java

@@ -7,6 +7,10 @@ import java.util.List;
  * 工程Mapper接口
  */
 public interface WorkMapper {
+
+
+
+
     /**
      * 查询工程列表
      */
@@ -29,4 +33,13 @@ public interface WorkMapper {
      * @return 工程信息
      */
     public DcWork selectWorkById(Long wkId);
+
+
+    /**
+     * 根据工程名称查询工程信息
+     *
+     * @param wkName 工程名称
+     * @return 工程信息
+     */
+    public DcWork selectWorkByName(String wkName);
 }

+ 3 - 0
gqy-system/src/main/java/com/gqy/document/service/IDcProductService.java

@@ -1,6 +1,7 @@
 package com.gqy.document.service;
 
 import com.gqy.document.domain.DcProduct;
+import com.gqy.document.domain.DcWork;
 
 import java.util.List;
 import java.util.Map;
@@ -11,6 +12,8 @@ import java.util.Map;
 public interface IDcProductService {
 
 
+
+
     /**
      * 删除产品
      * @param dcpId

+ 13 - 0
gqy-system/src/main/java/com/gqy/document/service/IWorkService.java

@@ -10,6 +10,10 @@ import java.util.List;
  * @author raycos
  */
 public interface IWorkService {
+
+
+
+
     /**
      * 查询工程列表
      *
@@ -26,6 +30,15 @@ public interface IWorkService {
      */
     public DcWork selectWorkById(Long wkId);
 
+
+    /**
+     * 根据工程名称查询工程信息
+     *
+     * @param wkName 工程名称
+     * @return 工程信息
+     */
+    public DcWork selectWorkByName(String wkName);
+
     /**
      * 新增工程
      *

+ 15 - 1
gqy-system/src/main/java/com/gqy/document/service/impl/DcProductServiceImpl.java

@@ -44,6 +44,7 @@ public class DcProductServiceImpl implements IDcProductService {
     private DcPsParamMapper dcPsParamMapper;
 
 
+
     /**
      *  获取
      * @param id
@@ -249,6 +250,18 @@ public class DcProductServiceImpl implements IDcProductService {
         return dcProductMapper.selectProductBaseList(params);
     }
 
+
+    /**
+     *
+     * @param params
+     * @return
+     */
+    public int addJson(Map<String,Object> params){
+        //产品code
+        String productCode = (String) params.get("productCode");
+        return 0;
+    }
+
     /**
      *
      * @param params
@@ -330,7 +343,8 @@ public class DcProductServiceImpl implements IDcProductService {
     public int exportJSON(String context){
         try{
 
-            CustomJsonParser.getParamValue(context,"");
+            String dcp_name =  CustomJsonParser.getParamValue(context,"OA编码");
+            String dcp_oa_code = CustomJsonParser.getParamValue(context,"产品名称");
 
 
 

+ 0 - 4
gqy-system/src/main/java/com/gqy/document/service/impl/ProductServiceImpl.java

@@ -1,4 +0,0 @@
-package com.gqy.document.service.impl;
-
-public class ProductServiceImpl {
-}

+ 10 - 0
gqy-system/src/main/java/com/gqy/document/service/impl/WorkServiceImpl.java

@@ -36,6 +36,16 @@ public class WorkServiceImpl implements IWorkService {
         return workMapper.selectWorkById(wkId);
     }
 
+
+    /**
+     *
+     * @param wkName 工程名称
+     * @return
+     */
+    public DcWork selectWorkByName(String wkName){
+        return workMapper.selectWorkByName(wkName);
+    }
+
     /**
      * 新增工程
      *

+ 11 - 0
gqy-system/src/main/resources/mapper/document/DcProductMapper.xml

@@ -26,6 +26,14 @@
     </sql>
 
 
+
+    <!-- 根据产品名称查询产品信息 -->
+    <select id="selectDcProductByName" parameterType="String" resultMap="DcProductResult">
+        <include refid="selectDcProductVo"/>
+        where dcp_name = #{dcp_name}
+    </select>
+
+
     <!-- 先查询所有规格参数名称 -->
     <select id="selectAllParamNames" resultType="string">
         SELECT DISTINCT psp_name
@@ -101,6 +109,9 @@
         where dcp_id = #{dcp_id}
     </select>
 
+
+
+
     <insert id="insertDcProduct" parameterType="DcProduct" useGeneratedKeys="true" keyProperty="dcp_id">
         insert into dc_product
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 8 - 0
gqy-system/src/main/resources/mapper/document/WorkMapper.xml

@@ -16,6 +16,14 @@
         from dc_work
     </sql>
 
+
+
+    <select id="selectWorkByName" parameterType="String" resultMap="WorkResult">
+        <include refid="selectWorkVo"/>
+        where wk_name = #{wkName}
+    </select>
+
+
     <select id="selectWorkList" parameterType="DcWork" resultMap="WorkResult">
         <include refid="selectWorkVo"/>
         <where>