Fixiaobai
2023-11-17 2fb28b36f15de26249ae34160e1accf118c011c7
mes-basic/src/main/resources/mapper/ParamMapper.xml
@@ -38,7 +38,9 @@
      <result property="index" column="index"/>
      <result property="paramValue" column="param_value"/>
      <result property="defaultValue" column="default_value"/>
      <result property="parentId" column="parent_id"/>
      <result property="dict" column="dict"/>
      <result property="templateParentId" column="templateParentId"/>
      <collection property="sysDictItemList" ofType="com.chinaztt.ztt.admin.api.entity.SysDictItem"
               column="dict" select="com.chinaztt.mes.basic.mapper.ParamMapper.getDict">
      </collection>
@@ -116,4 +118,27 @@
      WHERE A."id" = #{paramDTO.technologyOperationTemplateId}
      ORDER BY B.sort
   </select>
    <select id="getNos" resultType="java.lang.String">
      SELECT parameter_item
      FROM basic_param
      WHERE code=#{code}
    </select>
   <select id="getTemplateParamPlus" resultMap="paramMap">
      SELECT
          bp.id id,
         bpj.parent_id templateParentId,
         bpj.technology_operation_template_id,
         bpj.technology_operation_param_id,
         bpj.default_value,
         bp.code,
         bp.parameter_item,
         bp."type",
         bp.unit
      FROM
         basic_param_join_template bpj
            LEFT JOIN basic_param bp ON bpj.technology_operation_param_id = bp.ID
      WHERE
         bpj.technology_operation_template_id = #{templateId}
   </select>
</mapper>