chendayu 2 rokov pred
rodič
commit
644615f3f9

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/impl/ProductServiceImpl.java

@@ -245,7 +245,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
             productQueryPageDTO.setOrderBy(orderBy);
         }
 
-        //根据产品类别或公司分组查询产品
+        //根据 产品类别/公司 分组查询产品
         if (groupBy != null && !groupBy.equals("")) {
             if (current != null && size != null) {
                 PageHelper.startPage(current, size);

+ 2 - 5
PAS/src/main/java/cn/cslg/pas/service/impl/StructureServiceImpl.java

@@ -350,13 +350,11 @@ public class StructureServiceImpl extends ServiceImpl<StructureMapper, Structure
         for (StructureVO structure : structures) {
             Integer id = structure.getId();
             String path = structure.getPath();
-            //path = path.substring(path.indexOf(",") + 1);
             String[] pathSplit = path.split(",");
             //String pathStructureName = "";
             StringBuilder builder = new StringBuilder();
             for (int i = 1; i < pathSplit.length; i++) {
                 String structureName = map.get(pathSplit[i]);
-                //pathStructureName = pathStructureName + structureName + "/";
                 builder.append(structureName).append("/");
             }
             PathStructureNameVO pathStructureNameVO = new PathStructureNameVO()
@@ -458,11 +456,10 @@ public class StructureServiceImpl extends ServiceImpl<StructureMapper, Structure
 
     private HashMap<String, String> getStructureIdAndStructureNameMap(Integer productId) {
         List<StructureVO> structures = structureMapper.selectAllByProductId(productId);
-        //map存储所有架构id(key)和架构名称(value)
+        //map存储所有架构id(key)和架构名称(value)的键值对
         HashMap<String, String> map = new HashMap<>();
         for (StructureVO structure : structures) {
-            Integer structureId = structure.getId();
-            String structureStrId = structureId + "";
+            String structureStrId = structure.getId() + "";
             String structureName = structure.getStructureName();
             map.put(structureStrId, structureName);
         }

+ 8 - 8
PAS/src/main/resources/mapper/ProductMapper.xml

@@ -221,7 +221,7 @@
     <select id="queryByGroupProductCategoryId" resultMap="queryByGroupProductCategoryIdMap">
         select product_category_id pci,
         product_category_name,
-        p.create_person_tenant_id pCreatePersonTenantId,
+        create_person_tenant_id as createPersonTenantId,
         ifnull(#{orderBy}, '') orderBy,
         ifnull(#{orderType}, '') orderType,
         ifnull(#{productName}, '') productName,
@@ -263,7 +263,7 @@
         <collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
                     select="queryByGroupProductCategoryId2"
                     column="{pci=pci, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
-                             patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, pCreatePersonTenantId=pCreatePersonTenantId}">
+                             patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, createPersonTenantId=createPersonTenantId}">
         </collection>
     </resultMap>
 
@@ -303,7 +303,7 @@
                 and product_category_id = #{pci}
             </if>
             <if test="true">
-                and p.create_person_tenant_id = #{pCreatePersonTenantId}
+                and p.create_person_tenant_id = #{createPersonTenantId}
             </if>
         </where>
         order by
@@ -321,7 +321,7 @@
     <!--List<ProductGroupVO> queryByGroupCompanyName(ProductQueryPageDTO productQueryPageDTO);-->
     <select id="queryByGroupCompanyName" resultMap="queryByGroupCompanyNameMap">
         select company_name cn,
-        create_person_tenant_id CreatePersonTenantId,
+        create_person_tenant_id as createPersonTenantId,
         ifnull(#{orderBy}, '') orderBy,
         ifnull(#{orderType}, '') orderType,
         ifnull(#{productName}, '') productName,
@@ -362,13 +362,13 @@
     <resultMap id="queryByGroupCompanyNameMap" type="cn.cslg.pas.common.model.vo.ProductGroupVO">
         <result column="cn" property="companyName"/>
         <collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
-                    select="queryByGroupCompanyNameMap2"
+                    select="queryByGroupCompanyName2"
                     column="{cn=cn, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
-                             patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, CreatePersonTenantId=CreatePersonTenantId}">
+                             patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, createPersonTenantId=createPersonTenantId}">
         </collection>
     </resultMap>
 
-    <select id="queryByGroupCompanyNameMap2" resultMap="queryMap">
+    <select id="queryByGroupCompanyName2" resultMap="queryMap">
         select p.id p_id,
         product_name,
         market_time,
@@ -404,7 +404,7 @@
                 and company_name = #{cn}
             </if>
             <if test="true">
-                and p.create_person_tenant_id = #{CreatePersonTenantId}
+                and p.create_person_tenant_id = #{createPersonTenantId}
             </if>
         </where>
         order by