Преглед изворни кода

接口调整升级-定时相关内容调整

lantone пре 5 година
родитељ
комит
55ead7f80e
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      src/main/java/com/diagbot/service/impl/QcTypeServiceImpl.java

+ 10 - 0
src/main/java/com/diagbot/service/impl/QcTypeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.QcTypePageDTO;
 import com.diagbot.entity.QcType;
@@ -23,4 +24,13 @@ public class QcTypeServiceImpl extends ServiceImpl<QcTypeMapper, QcType> impleme
     public IPage<QcTypePageDTO> getList(QcTypePageVO qcTypePageVO) {
         return baseMapper.getList(qcTypePageVO);
     }
+
+    public Long saveT(QcType qcType){
+        this.baseMapper.insert(qcType);
+        QueryWrapper<QcType> qWrapper =new QueryWrapper<>();
+        qWrapper.eq("name",qcType.getName());
+        qWrapper.eq("hospital_id", qcType.getHospitalId());
+        QcType entity=this.baseMapper.selectOne(qWrapper);
+        return entity.getId();
+    }
 }