|
@@ -20,21 +20,38 @@ public interface NationalMatchDao {
|
|
|
@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, " +
|
|
|
+ "ltrim(a.specification) as specification,rtrim(a.pzwh) as approvalNumber, " +
|
|
|
"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,yp_base c " +
|
|
|
"where isnull(national_status,0)=#{status} and a.code=b.code and a.serial=b.serial " +
|
|
|
- "and c.group_no=#{groupNo} and a.code=c.charge_code and a.code like #{code} and a.name like #{name}")
|
|
|
+ "and c.group_no=11 and a.code=c.charge_code and a.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}")
|
|
|
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,
|
|
|
- @Param("groupNo") int groupNo);
|
|
|
+ @Param("status") int status);
|
|
|
|
|
|
- @Select("select code,name,charge_unit as unit,type=#{type}, discription as specification,national_code," +
|
|
|
+ @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), " +
|
|
|
+ "ltrim(a.specification) as specification,rtrim(a.pzwh) as approvalNumber, " +
|
|
|
+ "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,yp_base c " +
|
|
|
+ "where isnull(national_status,0)=#{status} and a.code=b.code and a.serial=b.serial " +
|
|
|
+ "and c.group_no=22 and a.code=c.charge_code and a.drug_kind in ('0007','0003') " +
|
|
|
+ "and a.code like #{code} and a.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);
|
|
|
+
|
|
|
+ @Select("select code,name,charge_unit as unit,type=#{type},discription,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,
|
|
@@ -44,7 +61,7 @@ public interface NationalMatchDao {
|
|
|
@Param("delFlag") int delFlag,
|
|
|
@Param("status") int status);
|
|
|
|
|
|
- @Select("select code,new_name as name,charge_unit as unit,type=#{type}, discription as specification," +
|
|
|
+ @Select("select code,new_name as name,charge_unit as unit,type=#{type}, discription,specification," +
|
|
|
"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}")
|
|
@@ -113,4 +130,11 @@ public interface NationalMatchDao {
|
|
|
@Param("standardCode") String standardCode,
|
|
|
@Param("discription") String discription,
|
|
|
@Param("code") String code);
|
|
|
+
|
|
|
+ @Update("update zd_charge_item set new_name=#{name},oper_id=#{staffId}," +
|
|
|
+ "specification=#{specification},oper_date=getdate() where code=#{code}")
|
|
|
+ void updateSupply(@Param("name") String name,
|
|
|
+ @Param("staffId") String staffId,
|
|
|
+ @Param("specification") String specification,
|
|
|
+ @Param("code") String code);
|
|
|
}
|