|
@@ -1,9 +1,10 @@
|
|
|
package com.diagbot.repository;
|
|
|
|
|
|
-import com.diagbot.entity.node.MedCode;
|
|
|
+import com.diagbot.entity.node.EntityInfo;
|
|
|
import com.diagbot.entity.node.MedCodeName;
|
|
|
import org.springframework.data.neo4j.annotation.Query;
|
|
|
import org.springframework.data.neo4j.repository.Neo4jRepository;
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -13,5 +14,65 @@ public interface MedicineCodeRepository extends Neo4jRepository<MedCodeName, Lon
|
|
|
List<MedCodeName> findByNameIs(String name);
|
|
|
|
|
|
List<MedCodeName> findByNameContaining(String name);
|
|
|
+
|
|
|
+ @Query("match (n:药品代码通用名) \n" +
|
|
|
+ "where id(n) = :#{#entityInfo.id} \n" +
|
|
|
+ "set " +
|
|
|
+ "n.name = :#{#entityInfo.name}," +
|
|
|
+ "n.拼音编码 = :#{#entityInfo.pycode}," +
|
|
|
+ "n.静态知识标识 = :#{#entityInfo.is_kl}," +
|
|
|
+ "n.状态 = :#{#entityInfo.status}," +
|
|
|
+ "n.注册剂型 = {reg_JiXin}," +
|
|
|
+ "n.药品本位码 = {BenWei_Code}," +
|
|
|
+ "n.最小包装单位 = {min_pack_unit}," +
|
|
|
+ "n.注册规格 = {reg_GuiGe}," +
|
|
|
+ "n.包装材质 = {pack_CaiLiao}," +
|
|
|
+ "n.药品企业 = {producer}," +
|
|
|
+ "n.批准文号 = {license_num}," +
|
|
|
+ "n.最小制剂单位 = {min_prod_unit}," +
|
|
|
+ "n.标准注册剂型 = {stand_reg_JiXin}" +
|
|
|
+ "\n" +
|
|
|
+ "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
|
|
|
+ MedCodeName update(@Param("entityInfo") EntityInfo entityInfo,
|
|
|
+ @Param("min_pack_num") Double min_pack_num,
|
|
|
+ @Param("reg_JiXin") String reg_JiXin,
|
|
|
+ @Param("BenWei_Code") String BenWei_Code,
|
|
|
+ @Param("min_pack_unit") String min_pack_unit,
|
|
|
+ @Param("reg_GuiGe") String reg_GuiGe,
|
|
|
+ @Param("pack_CaiLiao") String pack_CaiLiao,
|
|
|
+ @Param("producer") String producer,
|
|
|
+ @Param("license_num") String license_num,
|
|
|
+ @Param("min_prod_unit") String min_prod_unit,
|
|
|
+ @Param("stand_reg_JiXin") String stand_reg_JiXin);
|
|
|
+
|
|
|
+ @Query("create (n:药品代码通用名) \n" +
|
|
|
+ "set " +
|
|
|
+ "n.name = :#{#entityInfo.name}," +
|
|
|
+ "n.拼音编码 = :#{#entityInfo.pycode}," +
|
|
|
+ "n.静态知识标识 = :#{#entityInfo.is_kl}," +
|
|
|
+ "n.状态 = :#{#entityInfo.status}," +
|
|
|
+ "n.最小包装数量 = {min_pack_num}," +
|
|
|
+ "n.注册剂型 = {reg_JiXin}," +
|
|
|
+ "n.药品本位码 = {BenWei_Code}," +
|
|
|
+ "n.最小包装单位 = {min_pack_unit}," +
|
|
|
+ "n.注册规格 = {reg_GuiGe}," +
|
|
|
+ "n.包装材质 = {pack_CaiLiao}," +
|
|
|
+ "n.药品企业 = {producer}," +
|
|
|
+ "n.批准文号 = {license_num}," +
|
|
|
+ "n.最小制剂单位 = {min_prod_unit}," +
|
|
|
+ "n.标准注册剂型 = {stand_reg_JiXin}" +
|
|
|
+ "\n" +
|
|
|
+ "RETURN n,[ (n)-[r]->(m) | [ r, m ] ], ID(n)\n")
|
|
|
+ MedCodeName create(@Param("entityInfo") EntityInfo entityInfo,
|
|
|
+ @Param("min_pack_num") Double min_pack_num,
|
|
|
+ @Param("reg_JiXin") String reg_JiXin,
|
|
|
+ @Param("BenWei_Code") String BenWei_Code,
|
|
|
+ @Param("min_pack_unit") String min_pack_unit,
|
|
|
+ @Param("reg_GuiGe") String reg_GuiGe,
|
|
|
+ @Param("pack_CaiLiao") String pack_CaiLiao,
|
|
|
+ @Param("producer") String producer,
|
|
|
+ @Param("license_num") String license_num,
|
|
|
+ @Param("min_prod_unit") String min_prod_unit,
|
|
|
+ @Param("stand_reg_JiXin") String stand_reg_JiXin);
|
|
|
}
|
|
|
|