|
@@ -0,0 +1,98 @@
|
|
|
+package thyyxxk.webserver.dao.his.nationalmatch;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+import org.apache.ibatis.annotations.Update;
|
|
|
+import thyyxxk.webserver.entity.nationalmatch.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description: 新医保国家目录匹配mapper
|
|
|
+ * @author: DingJie
|
|
|
+ * @create: 2021-06-10 14:49:56
|
|
|
+ **/
|
|
|
+@Mapper
|
|
|
+public interface NationalMatchDao {
|
|
|
+
|
|
|
+ @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 in (1,2)) " +
|
|
|
+ "and code like #{code} and 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);
|
|
|
+
|
|
|
+ @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} " +
|
|
|
+ "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,
|
|
|
+ @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 as specification," +
|
|
|
+ "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> selectLocalServices(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 * from si_central_medicine where national_name=#{name} and approval_number like #{approve}")
|
|
|
+ List<SiCentralMedicine> selectNationalMedicines(@Param("name") String name,
|
|
|
+ @Param("approve") String approve);
|
|
|
+
|
|
|
+ @Select("select * from si_central_herbal where national_name=#{name}")
|
|
|
+ List<SiCentralHerbal> selectNationalHerbals(@Param("name") String name);
|
|
|
+
|
|
|
+ @Select("select * from si_central_services where national_name=#{name} " +
|
|
|
+ "or local_medical_service_name=#{name}")
|
|
|
+ List<SiCentralServices> selectNationalServices(@Param("name") String name);
|
|
|
+
|
|
|
+ @Select("select * from si_central_supplies_mini where national_name like #{name}")
|
|
|
+ List<SiCentralSuppliesMini> selectNationalSupplies(@Param("name") String name);
|
|
|
+
|
|
|
+ @Update("update yp_zd_dict set national_status=1,national_code=#{nationalCode}," +
|
|
|
+ "national_name=#{nationalName} where code=#{code} and serial=#{serial}")
|
|
|
+ void updateYpZdDict(@Param("code") String code,
|
|
|
+ @Param("serial") String serial,
|
|
|
+ @Param("nationalCode") String nationalCode,
|
|
|
+ @Param("nationalName") String nationalName);
|
|
|
+
|
|
|
+ @Update("update zd_charge_item set national_status=1,national_code=#{nationalCode}," +
|
|
|
+ "national_name=#{nationalName} where code=#{code}")
|
|
|
+ void updateZdChargeItem(@Param("code") String code,
|
|
|
+ @Param("nationalCode") String nationalCode,
|
|
|
+ @Param("nationalName") String nationalName);
|
|
|
+}
|