| | |
| | | <result property="updateTime" column="update_time"></result> |
| | | <result property="validFlag" column="valid_flag" typeHandler="com.nanometer.smartlab.entity.handler.ValidFlagHandler"></result> |
| | | <result property="approveUserId" column="approve_user_id"></result> |
| | | <result property="beforeApproveUserId" column="before_approve_user_id"></result> |
| | | <result property="beforeApproveUserId" column="before_approve_user_id"></result> |
| | | <result property="memo" column="memo"></result> |
| | | <result property="applyUserName" column="applyUserName"></result> |
| | | <result property="approveUserName" column="approveUserName"></result> |
| | |
| | | <result property="productSn" column="reagentProductSn"></result> |
| | | <result property="controlProducts" column="controlProducts"></result> |
| | | <result property="dangerousFlag" column="reagentDangerousFlag" typeHandler="com.nanometer.smartlab.entity.handler.DangerousFlagHandler"></result> |
| | | <result property="productHome" column="productHome"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="productHome" column="productHome"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="type" column="type"></result> |
| | | <result property="supplierFlag" column="supplierFlag"></result> |
| | | </association> |
| | | </resultMap> |
| | | |
| | |
| | | and (oa.approve_user_id = #{searchApproval} or oa.before_approve_user_id = #{searchApproval}) |
| | | </if> |
| | | |
| | | <if test="applyUserName != null and applyUserName != ''"> |
| | | and su.name like #{applyUserName} |
| | | </if> |
| | | |
| | | <if test="approvaUserName != null and approvaUserName != ''"> |
| | | and (suApprove.name like #{approvaUserName} or sys.name like #{approvaUserName}) |
| | | and (suApprove.name like concat('%',#{approvaUserName},'%') |
| | | or sys.name like concat('%',#{approvaUserName},'%') ) |
| | | </if> |
| | | |
| | | <if test="editId != null and editId != ''"> |
| | |
| | | ss.name as supplierName, |
| | | su.name as applyUserName, |
| | | suApprove.name as approveUserName, |
| | | bm.meta_value as productHomeName |
| | | bm.meta_value as productHomeName, |
| | | ss.valid_flag as supplierFlag, |
| | | sr.type as type |
| | | from ope_apply as oa |
| | | left join sys_reagent sr on oa.reagent_id = sr.id |
| | | left join sys_supplier as ss on sr.supplier_id = ss.id |
| | |
| | | su.name as applyUserName, |
| | | suApprove.name as approveUserName, |
| | | bm.meta_value as productHomeName, |
| | | fir.name as firName |
| | | fir.name as firName, |
| | | ss.valid_flag as supplierFlag, |
| | | sr.type as type |
| | | from ope_apply as oa |
| | | left join sys_reagent sr on oa.reagent_id = sr.id |
| | | left join sys_supplier as ss on sr.supplier_id = ss.id |
| | | left join sys_user as su on oa.apply_user_id = su.id |
| | | left join sys_user as suApprove on oa.approve_user_id = suApprove.id |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join base_meta as bm on sr.product_home = bm.id |
| | | where oa.valid_flag = 1 |
| | | and sr.valid_flag = 1 |
| | | <if test="isShow != null and isShow ==0"> |
| | | and (ss.valid_flag = 1 or sr.type = 0) |
| | | </if> |
| | | <include refid="queryWhereSql"/> |
| | | order by oa.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join base_meta as bm on sr.product_home = bm.id |
| | | where oa.valid_flag = 1 and sr.valid_flag = 1 |
| | | where oa.valid_flag = 1 |
| | | <if test="isShow != null and isShow ==0"> |
| | | and (ss.valid_flag = 1 or sr.type = 0) |
| | | </if> |
| | | <include refid="queryWhereSql"/> |
| | | </select> |
| | | |
| | |
| | | </insert> |
| | | |
| | | <insert id="insertOpeApplyList" parameterType="java.util.List"> |
| | | |
| | | insert into ope_apply |
| | | (id, apply_code, reagent_id, num, deadline, apply_user_id, objective, status, approve_user_id, memo, valid_flag, create_time, update_time,apply_goal,apply_price,first_user) |
| | | values |
| | | <foreach collection="list" item="opeApply" separator=","> |
| | | (#{opeApply.id}, #{opeApply.applyCode}, #{opeApply.reagent.id}, #{opeApply.num}, #{opeApply.deadline}, |
| | | #{opeApply.applyUserId}, #{opeApply.objective}, #{opeApply.status}, #{opeApply.approveUserId}, #{opeApply.memo}, 1, now(), now(),#{opeApply.applyGoal},#{opeApply.reagent.price},#{opeApply.approveUserId}) |
| | | </foreach> |
| | | </insert> |
| | | <insert id="insertList"> |
| | | insert into ope_apply |