|
@@ -1,19 +1,25 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.diagbot.dto.DoctorPageModeDTO;
|
|
|
+import com.diagbot.dto.TemplateInfoDTO;
|
|
|
import com.diagbot.entity.DoctorPageMode;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.service.impl.DoctorPageModeServiceImpl;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.vo.DoctorIdVO;
|
|
|
import com.diagbot.vo.DoctorPageModeVO;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
-import javax.validation.Valid;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -34,13 +40,14 @@ public class DoctorPageModeFacade extends DoctorPageModeServiceImpl {
|
|
|
QueryWrapper<DoctorPageMode> doctorPageModeWrapper = new QueryWrapper<>();
|
|
|
Map<String, Object> mapAll = new HashMap<>();
|
|
|
mapAll.put("doctor_id", doctorPageModeVO.getDoctorId());
|
|
|
+ mapAll.put("mode_classify", doctorPageModeVO.getModeClassify());
|
|
|
mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
doctorPageModeWrapper.allEq(mapAll);
|
|
|
DoctorPageMode datas = getOne(doctorPageModeWrapper);
|
|
|
boolean res = false;
|
|
|
if (datas != null) {
|
|
|
UpdateWrapper<DoctorPageMode> doctorPageModeUpdate = new UpdateWrapper<>();
|
|
|
- doctorPageModeUpdate.allEq(mapAll)
|
|
|
+ doctorPageModeUpdate.eq("id",datas.getId())
|
|
|
.set("mode_classify", doctorPageModeVO.getModeClassify())
|
|
|
.set("mode_value", doctorPageModeVO.getModeValue())
|
|
|
.set("modifier", doctorPageModeVO.getDoctorId().toString())
|
|
@@ -66,14 +73,15 @@ public class DoctorPageModeFacade extends DoctorPageModeServiceImpl {
|
|
|
* @param doctorIdVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public DoctorPageMode getDoctorPageMode(@Valid DoctorIdVO doctorIdVO) {
|
|
|
+ public List<DoctorPageModeDTO> getDoctorPageMode(@Valid DoctorIdVO doctorIdVO) {
|
|
|
QueryWrapper<DoctorPageMode> doctorPageModeWrapper = new QueryWrapper<>();
|
|
|
Map<String, Object> mapAll = new HashMap<>();
|
|
|
mapAll.put("doctor_id", doctorIdVO.getDoctorId());
|
|
|
mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
doctorPageModeWrapper.allEq(mapAll);
|
|
|
- DoctorPageMode doctorPageModeData = getOne(doctorPageModeWrapper);
|
|
|
- return doctorPageModeData;
|
|
|
+ List<DoctorPageMode> doctorPageModeData = list(doctorPageModeWrapper);
|
|
|
+ List<DoctorPageModeDTO> data = BeanUtil.listCopyTo(doctorPageModeData, DoctorPageModeDTO.class);
|
|
|
+ return data;
|
|
|
}
|
|
|
|
|
|
}
|