get_id("select goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"%(
hos_goods_id,id2)))
pkg_def_id=process_tuple(
get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;"%hos_goods_id))
get_id("select pkg_def_id from mcms_dept_goods_info where hos_goods_id='%s' and dept_name='%s' and branch_id='%s' LIMIT 1;"%(hos_goods_id,dept_name2,branch_id)))
supply_id=process_tuple(
get_id("select supply_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"%(