|
|
@ -257,9 +257,58 @@ |
|
|
|
CONCAT(ifi.COLUMN_NAME, if(ifi.COLUMN_NUM = 0, '', ifi.COLUMN_NUM)) columnName |
|
|
|
FROM |
|
|
|
ic_form_item ifi |
|
|
|
LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID |
|
|
|
LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID |
|
|
|
WHERE |
|
|
|
ITEM_GROUP_ID = #{groupId} and ifi.CUSTOMER_ID = #{customerId} |
|
|
|
and ifi.del_flag='0' |
|
|
|
AND LENGTH(ifi.COLUMN_NAME)>0 |
|
|
|
ORDER BY ifi.SORT |
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap id="FormItemBaseResultMap" type="com.epmet.dto.result.FormItemBaseResult"> |
|
|
|
<id property="itemId" column="item_id" ></id> |
|
|
|
<result property="customerId" column="CUSTOMER_ID"/> |
|
|
|
<result property="itemGroupId" column="ITEM_GROUP_ID"/> |
|
|
|
<result property="label" column="LABEL"/> |
|
|
|
<result property="sort" column="SORT"/> |
|
|
|
<result property="optionSourceValue" column="OPTION_SOURCE_VALUE"/> |
|
|
|
<result property="optionSourceType" column="OPTION_SOURCE_TYPE"/> |
|
|
|
<result property="tableName" column="TABLE_NAME"/> |
|
|
|
<result property="supportAdd" column="SUPPORT_ADD"/> |
|
|
|
<result property="columnName" column="columnName"/> |
|
|
|
<result property="itemType" column="item_type"/> |
|
|
|
<collection property="options" ofType="com.epmet.dto.result.OptionDTO" |
|
|
|
column="item_id" select="com.epmet.dao.IcFormDao.selectListOption"> |
|
|
|
<result property="label" column="label"/> |
|
|
|
<result property="value" column="value"/> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="getItemListByGroupIdV2" resultMap="FormItemBaseResultMap"> |
|
|
|
SELECT |
|
|
|
ifi.ID item_id, |
|
|
|
ifi.CUSTOMER_ID, |
|
|
|
ifi.ITEM_GROUP_ID, |
|
|
|
ifi.LABEL, |
|
|
|
ifi.SORT, |
|
|
|
ifi.OPTION_SOURCE_VALUE, |
|
|
|
ifi.OPTION_SOURCE_TYPE, |
|
|
|
ifig.TABLE_NAME, |
|
|
|
ifig.SUPPORT_ADD, |
|
|
|
CONCAT(ifi.COLUMN_NAME, if(ifi.COLUMN_NUM = 0, '', ifi.COLUMN_NUM)) columnName, |
|
|
|
ifi.item_type |
|
|
|
FROM |
|
|
|
ic_form_item ifi |
|
|
|
LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID |
|
|
|
WHERE |
|
|
|
ifi.del_flag='0' |
|
|
|
and ifi.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="groupId != null and groupId != ''"> |
|
|
|
and ITEM_GROUP_ID = #{groupId} |
|
|
|
</if> |
|
|
|
<if test="policyFlag != null and policyFlag != ''"> |
|
|
|
and ifi.POLICY_FLAG = #{policyFlag} |
|
|
|
</if> |
|
|
|
AND LENGTH(ifi.COLUMN_NAME)>0 |
|
|
|
ORDER BY ifi.SORT |
|
|
|
</select> |
|
|
|