| | |
| | | <result property="applyCode" column="apply_code"></result> |
| | | <result property="num" column="num"></result> |
| | | <result property="used" column="used"></result> |
| | | <result property="arrivalNum" column="arrival_num"></result> |
| | | <result property="status" column="status" typeHandler="com.nanometer.smartlab.entity.handler.ApplyStatusHandler"></result> |
| | | <result property="applyUserId" column="apply_user_id"></result> |
| | | <result property="arrivalTime" column="arrival_time"></result> |
| | | <association property="reagent" javaType="com.nanometer.smartlab.entity.SysReagent"> |
| | | <id property="id" column="reagent_id"></id> |
| | | <result property="name" column="reagentName"></result> |
| | |
| | | sr.dangerous_flag, |
| | | oa.num, |
| | | oa.used, |
| | | su.`name` apply_user_id |
| | | oa.arrival_num, |
| | | su.`name` apply_user_id, |
| | | oa.arrival_time |
| | | </sql> |
| | | |
| | | <sql id="getOpeApplyReserveList_queryJoins1"> |
| | |
| | | <select id="selectByReId" resultMap="OpeApply"> |
| | | select * from ope_apply where reagent_id=#{id} |
| | | </select> |
| | | <select id="getOpeApplyDetail" resultMap="OpeApplyReserve"> |
| | | select oa.id, oa.apply_code, |
| | | sr.id reagent_id, |
| | | oa.status, |
| | | sr.product_sn reagentProductSn, |
| | | sr.`name` reagentName, |
| | | bm2.meta_value controlProducts, |
| | | bm3.meta_value reagentFormat, |
| | | sr.main_metering reagentMainMetering, |
| | | sr.price reagentPrice, |
| | | sr.cas reagentCas, |
| | | oa.article_number articleNumber, |
| | | bm4.meta_value reagentCharacter, |
| | | bm1.meta_value productHome, |
| | | sr.dangerous_flag, |
| | | oa.num, |
| | | oa.used, |
| | | oa.arrival_num, |
| | | su.id apply_user_id |
| | | from ope_apply as oa |
| | | left JOIN sys_reagent sr on sr.id = oa.reagent_id |
| | | left JOIN sys_user su on su.id = oa.apply_user_id |
| | | left join base_meta as bm2 on sr.control_products = bm2.id |
| | | left join base_meta as bm3 on sr.reagent_format = bm3.id |
| | | left join base_meta as bm4 on sr.reagent_character = bm4.id |
| | | left join base_meta as bm1 on sr.product_home = bm1.id |
| | | where oa.valid_flag = 1 |
| | | and oa.id = #{0} |
| | | </select> |
| | | |
| | | |
| | | <update id="updateByReId" parameterType="java.util.Map"> |
| | | update ope_apply set reagent_id=#{newReId} where reagent_id=#{oldReId} |
| | | </update> |
| | | <update id="updateOpeApplyInfo" parameterType="java.util.Map"> |
| | | update |
| | | ope_apply |
| | | set status = #{status}, |
| | | arrival_time = #{arrivalTime}, |
| | | consignee_id = #{consigneeId} |
| | | where valid_flag = 1 |
| | | and id = #{applyId} |
| | | </update> |
| | | </mapper> |