|
@@ -0,0 +1,57 @@
|
|
|
+package com.diagbot.facade;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.diagbot.dto.KlConceptAllDTO;
|
|
|
+import com.diagbot.dto.KlTcmSyndromeDTO;
|
|
|
+import com.diagbot.entity.CommonParam;
|
|
|
+import com.diagbot.entity.KlTcmSyndrome;
|
|
|
+import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.service.impl.KlTcmSyndromeServiceImpl;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.vo.KlTcmSyndromeVO;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zhoutg
|
|
|
+ * @Description:
|
|
|
+ * @date 2021-03-18 16:38
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class KlTcmSyndromeFacade extends KlTcmSyndromeServiceImpl {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存中医症候扩展表
|
|
|
+ *
|
|
|
+ * @param commonParam
|
|
|
+ * @param klTcmSyndromeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public boolean saveAll(CommonParam commonParam, KlTcmSyndromeVO klTcmSyndromeVO) {
|
|
|
+ if (klTcmSyndromeVO == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ // 先删除扩展表
|
|
|
+ this.remove(new QueryWrapper<KlTcmSyndrome>().eq("concept_id", commonParam.getConceptId()));
|
|
|
+ // 重新插入扩展表
|
|
|
+ KlTcmSyndrome klTcmSyndrome = new KlTcmSyndrome();
|
|
|
+ BeanUtil.copyProperties(klTcmSyndromeVO, klTcmSyndrome);
|
|
|
+ klTcmSyndrome.setConceptId(commonParam.getConceptId());
|
|
|
+ klTcmSyndrome.setGmtModified(commonParam.getNow());
|
|
|
+ klTcmSyndrome.setGmtCreate(commonParam.getNow());
|
|
|
+ klTcmSyndrome.setCreator(commonParam.getPerson());
|
|
|
+ klTcmSyndrome.setModifier(commonParam.getPerson());
|
|
|
+ return this.save(klTcmSyndrome);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void getKlTcmSyndrome(Long conceptId, KlConceptAllDTO klConceptAll) {
|
|
|
+ KlTcmSyndrome KlTcmSyndrome = this.getOne(new QueryWrapper<KlTcmSyndrome>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("concept_id", conceptId), false);
|
|
|
+ if (KlTcmSyndrome == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ KlTcmSyndromeDTO klTcmSyndromeDTO = new KlTcmSyndromeDTO();
|
|
|
+ BeanUtil.copyProperties(KlTcmSyndrome, klTcmSyndromeDTO);
|
|
|
+ klConceptAll.setKlTcmSyndromeDTO(klTcmSyndromeDTO);
|
|
|
+ }
|
|
|
+}
|