|
@@ -17,41 +17,25 @@ import java.util.List;
|
|
|
@Mapper
|
|
|
public interface NationalMatchDao {
|
|
|
|
|
|
- @Select("select a.code,a.serial,a.name,type=#{type}, " +
|
|
|
- "unit=(select name from yp_zd_unit where yp_zd_unit.code=dosage_unit), " +
|
|
|
- "dosage=(select name from yp_zd_dosage where yp_zd_dosage.code=dosage), " +
|
|
|
+ @Select("select a.code,a.serial,a.name,type=#{type},a.national_code,a.national_name, " +
|
|
|
+ "unit=(select name from yp_zd_unit where yp_zd_unit.code=a.dosage_unit), " +
|
|
|
+ "dosage=(select name from yp_zd_dosage where yp_zd_dosage.code=a.dosage), " +
|
|
|
"a.specification,rtrim(a.pzwh) as approvalNumber, " +
|
|
|
- "factory=(select name from yp_zd_manufactory where yp_zd_manufactory.code=manu_code) " +
|
|
|
+ "factory=(select name from yp_zd_manufactory where yp_zd_manufactory.code=a.manu_code) " +
|
|
|
"from yp_zd_dict a, (select max(serial) as serial,code from yp_zd_dict where isnull(visible_flag,0)=#{delFlag} " +
|
|
|
- "and isnull(del_flag,0)=#{delFlag} group by code) b " +
|
|
|
+ "and isnull(del_flag,0)=#{delFlag} group by code) b,yp_base c " +
|
|
|
"where isnull(national_status,0)=#{status} and a.code=b.code and a.serial=b.serial " +
|
|
|
- "and drug_kind in (select code from yp_zd_drug_kind where yp_type in (1,2)) " +
|
|
|
- "and a.code like #{code} and a.name like #{name} ")
|
|
|
+ "and c.group_no=#{groupNo} and a.code=c.charge_code and a.code like #{code} and a.name like #{name}")
|
|
|
IPage<StandardLocalItem> selectLocalMedicines(IPage<StandardLocalItem> iPage,
|
|
|
@Param("code") String code,
|
|
|
@Param("name") String name,
|
|
|
@Param("type") int type,
|
|
|
@Param("delFlag") int delFlag,
|
|
|
- @Param("status") int status);
|
|
|
-
|
|
|
- @Select("select code,serial,name,type=#{type}, " +
|
|
|
- "unit=(select name from yp_zd_unit where yp_zd_unit.code=dosage_unit), " +
|
|
|
- "dosage=(select name from yp_zd_dosage where yp_zd_dosage.code=dosage), " +
|
|
|
- "specification,rtrim(pzwh) as approvalNumber, " +
|
|
|
- "factory=(select name from yp_zd_manufactory where yp_zd_manufactory.code=manu_code) " +
|
|
|
- "from yp_zd_dict where isnull(national_status,0)=#{status} " +
|
|
|
- "and isnull(del_flag,0)=#{delFlag} " +
|
|
|
- "and drug_kind in (select code from yp_zd_drug_kind where yp_type=3) " +
|
|
|
- "and code like #{code} and name like #{name}")
|
|
|
- IPage<StandardLocalItem> selectLocalHerbals(IPage<StandardLocalItem> iPage,
|
|
|
- @Param("code") String code,
|
|
|
- @Param("name") String name,
|
|
|
- @Param("type") int type,
|
|
|
- @Param("delFlag") int delFlag,
|
|
|
- @Param("status") int status);
|
|
|
+ @Param("status") int status,
|
|
|
+ @Param("groupNo") int groupNo);
|
|
|
|
|
|
- @Select("select code,name,charge_unit as unit,type=#{type}, discription as specification," +
|
|
|
- "yb_comment as factory from zd_charge_item where isnull(national_status,0)=#{status} " +
|
|
|
+ @Select("select code,name,charge_unit as unit,type=#{type}, discription as specification,national_code," +
|
|
|
+ "national_name,yb_comment as factory from zd_charge_item where isnull(national_status,0)=#{status} " +
|
|
|
"and isnull(del_flag,0)=#{delFlag} and class_code='J' and code like #{code} and name like #{name}")
|
|
|
IPage<StandardLocalItem> selectLocalSupplies(IPage<StandardLocalItem> iPage,
|
|
|
@Param("code") String code,
|
|
@@ -61,7 +45,7 @@ public interface NationalMatchDao {
|
|
|
@Param("status") int status);
|
|
|
|
|
|
@Select("select code,new_name as name,charge_unit as unit,type=#{type}, discription as specification," +
|
|
|
- "s_code as standardCode, charge_amount as price from zd_charge_item " +
|
|
|
+ "national_code,national_name,s_code as standardCode, charge_amount as price from zd_charge_item " +
|
|
|
"where isnull(national_status,0)=#{status} and isnull(del_flag,0)=#{delFlag} and " +
|
|
|
"class_code!='J' and code like #{code} and name like #{name}")
|
|
|
IPage<StandardLocalItem> selectLocalServices(IPage<StandardLocalItem> iPage,
|