| | |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField3" column="spare_field_3" /> |
| | | <result property="spareField4" column="spare_field_4" /> |
| | | <result property="collectData" column="collect_data" /> |
| | | <result property="results" column="results" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsFormulaChildInfoVo"> |
| | | select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_formula_child_info |
| | | select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, collect_data, results from bs_formula_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult"> |
| | |
| | | <if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
| | | <if test="operationType != null and operationType != ''"> and operation_type like concat('%', #{operationType}, '%')</if> |
| | | <if test="formulaCode != null and formulaCode != ''"> and formula_code like concat('%', #{formulaCode}, '%')</if> |
| | | <if test="collectData != null and collectData != ''"> and collect_data = #{collectData}</if> |
| | | <if test="results != null and result != ''"> and result = #{results}</if> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | |
| | | </where> |
| | | ORDER BY step_sort ASC |
| | | </select> |
| | | |
| | | <select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult"> |
| | |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="spareField3 != null">spare_field_3,</if> |
| | | <if test="spareField4 != null">spare_field_4,</if> |
| | | <if test="collectData != null">collect_data,</if> |
| | | <if test="results != null">results,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="workshopCode != null">#{workshopCode},</if> |
| | |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="spareField3 != null">#{spareField3},</if> |
| | | <if test="spareField4 != null">#{spareField4},</if> |
| | | <if test="collectData != null">collect_data,</if> |
| | | <if test="results != null">results,</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
| | | <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
| | | <if test="collectData != null">collect_data = #{collectData},</if> |
| | | <if test="results != null">results = #{results},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="selectBsFormulaChildInfoByTypeTopOne" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult"> |
| | | SELECT |
| | | TOP 1 * |
| | | FROM |
| | | bs_formula_child_info |
| | | WHERE NOT results = 'OK' |
| | | AND product_code = #{productCode} |
| | | AND processes_code = #{processesCode} |
| | | AND operation_type = #{operationType} |
| | | ORDER BY step_sort ASC |
| | | </select> |
| | | |
| | | <select id="releaseCheck" resultMap="BsFormulaChildInfoResult"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | bs_formula_child_info |
| | | WHERE NOT results = 'OK' |
| | | </select> |
| | | </mapper> |