Browse Source

添加父级parentCode

dev
zxc 4 years ago
parent
commit
ba7c4b1410
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryResultDTO.java
  2. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryResultDTO.java

@ -23,6 +23,11 @@ public class ProjectCategoryResultDTO implements Serializable {
*/ */
private String categoryCode; private String categoryCode;
/**
* 分类code父级
*/
private String parentCategoryCode;
/** /**
* 分类名字 * 分类名字
*/ */

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -94,9 +94,11 @@
<resultMap id="selectCategoryByCustomerIdMap" type="com.epmet.project.dto.result.ProjectCategoryResultDTO"> <resultMap id="selectCategoryByCustomerIdMap" type="com.epmet.project.dto.result.ProjectCategoryResultDTO">
<result column="c" property="categoryCode"/> <result column="c" property="categoryCode"/>
<result column="n" property="categoryName"/> <result column="n" property="categoryName"/>
<result column="pc1" property="parentCategoryCode"/>
<collection property="children" ofType="com.epmet.project.dto.result.ProjectCategoryResultDTO"> <collection property="children" ofType="com.epmet.project.dto.result.ProjectCategoryResultDTO">
<result column="c2" property="categoryCode"/> <result column="c2" property="categoryCode"/>
<result column="n2" property="categoryName"/> <result column="n2" property="categoryName"/>
<result column="pc2" property="parentCategoryCode"/>
</collection> </collection>
</resultMap> </resultMap>
<select id="selectCategoryByCustomerId" resultMap="selectCategoryByCustomerIdMap"> <select id="selectCategoryByCustomerId" resultMap="selectCategoryByCustomerIdMap">
@ -104,7 +106,9 @@
p1.CATEGORY_CODE AS c, p1.CATEGORY_CODE AS c,
p2.CATEGORY_CODE AS c2, p2.CATEGORY_CODE AS c2,
p1.CATEGORY_NAME AS n, p1.CATEGORY_NAME AS n,
p2.CATEGORY_NAME AS n2 p2.CATEGORY_NAME AS n2,
p1.PARENT_CATEGORY_CODE AS pc1,
p2.PARENT_CATEGORY_CODE AS pc2
FROM customer_project_category_dict p1,customer_project_category_dict p2 FROM customer_project_category_dict p1,customer_project_category_dict p2
WHERE p1.DEL_FLAG = '0' WHERE p1.DEL_FLAG = '0'
AND p2.DEL_FLAG = '0' AND p2.DEL_FLAG = '0'

Loading…
Cancel
Save