| | |
| | | <resultMap id="ProcessRouteItemParamResultMap" type="com.ruoyi.production.pojo.ProcessRouteItemParam"> |
| | | <id property="id" column="id"/> |
| | | <result property="routeItemId" column="route_item_id"/> |
| | | <result property="paramId" column="param_id"/> |
| | | <result property="processParamId" column="process_param_id"/> |
| | | <result property="standardValue" column="standard_value"/> |
| | | <result property="minValue" column="min_value"/> |
| | |
| | | <result property="tenantId" column="tenant_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="paramKey" column="param_key"/> |
| | | <result property="paramName" column="param_name"/> |
| | | <result property="paramType" column="param_type"/> |
| | | <result property="paramFormat" column="param_format"/> |
| | | <result property="valueMode" column="value_mode"/> |
| | | <result property="unit" column="unit"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | <insert id="insertFromProcessTemplate"> |
| | | INSERT INTO process_route_item_param (route_item_id, param_id, process_param_id, |
| | | standard_value, min_value, max_value, |
| | | is_required, sort, tenant_id, create_time) |
| | | SELECT #{routeItemId}, |
| | | param_id, |
| | | id, |
| | | INSERT INTO process_route_item_param (route_item_id, |
| | | process_param_id, |
| | | standard_value, |
| | | min_value, |
| | | max_value, |
| | | is_required, |
| | | sort, |
| | | tenant_id, |
| | | create_time, |
| | | param_key, |
| | | param_name, |
| | | param_type, |
| | | param_format, |
| | | value_mode, |
| | | unit, |
| | | remark) |
| | | SELECT #{routeItemId}, |
| | | ppp.id, |
| | | ppp.standard_value, |
| | | ppp.min_value, |
| | | ppp.max_value, |
| | | ppp.is_required, |
| | | ppp.sort, |
| | | #{tenantId}, |
| | | NOW() |
| | | FROM product_process_param |
| | | WHERE process_id = #{processId} |
| | | NOW(), |
| | | ppp.param_key, |
| | | ppp.param_name, |
| | | ppp.param_type, |
| | | ppp.param_format, |
| | | ppp.value_mode, |
| | | ppp.unit, |
| | | ppp.remark |
| | | FROM product_process_param ppp |
| | | WHERE ppp.process_id = #{processId} |
| | | </insert> |
| | | |
| | | <select id="selectParamPage" resultType="com.ruoyi.production.dto.ProcessRouteItemParamDto"> |
| | | select |
| | | prip.*, |
| | | bp.param_name, |
| | | bp.param_key, |
| | | bp.unit, |
| | | bp.param_type, |
| | | bp.param_format, |
| | | bp.value_mode |
| | | prip.* |
| | | from process_route_item_param prip |
| | | left join base_param bp on prip.param_id = bp.id |
| | | <where> |
| | | <if test="p.routeItemId != null"> |
| | | and prip.route_item_id = #{p.routeItemId} |