|
@@ -8,7 +8,6 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.TemplateInfoServiceImpl;
|
|
|
-import com.diagbot.util.ArrayUtil;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.GsonUtil;
|
|
@@ -23,7 +22,6 @@ import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -38,8 +36,8 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
|
|
|
* @return 医生病历模板信息
|
|
|
*/
|
|
|
public List<TemplateInfoDTO> findByDoctorIdTemplates(TemplateInfoVO templateInfoVO) {
|
|
|
- //根据传入的医生id和部门id还有医院id在数据表中查出相应的模板数据
|
|
|
-
|
|
|
+ //根据传入的医生id和部门id还有医院id在数据表中查出相应的模板数据
|
|
|
+
|
|
|
QueryWrapper<TemplateInfo> templateInfoQuery = new QueryWrapper<>();
|
|
|
Map<String, Object> mapAll = new HashMap<>();
|
|
|
mapAll.put("hospital_dept_id", templateInfoVO.getHospitalDeptId());
|
|
@@ -47,14 +45,14 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
|
|
|
mapAll.put("hospital_id", templateInfoVO.getHospitalId());
|
|
|
mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
mapAll.put("type", templateInfoVO.getType());
|
|
|
- if(templateInfoVO.getSex()!=null){
|
|
|
- templateInfoQuery.allEq(mapAll).in("sex", 3,templateInfoVO.getSex()).orderByDesc("gmt_create");
|
|
|
- }else {
|
|
|
- templateInfoQuery.allEq(mapAll).orderByDesc("gmt_create");
|
|
|
- }
|
|
|
+ if (templateInfoVO.getSex() != null) {
|
|
|
+ templateInfoQuery.allEq(mapAll).in("sex", 3, templateInfoVO.getSex()).orderByDesc("gmt_create");
|
|
|
+ } else {
|
|
|
+ templateInfoQuery.allEq(mapAll).orderByDesc("gmt_create");
|
|
|
+ }
|
|
|
List<TemplateInfoDTO> data = new ArrayList<TemplateInfoDTO>();
|
|
|
List<TemplateInfo> datas = list(templateInfoQuery);
|
|
|
- //过滤
|
|
|
+ //过滤
|
|
|
data = BeanUtil.listCopyTo(datas, TemplateInfoDTO.class);
|
|
|
|
|
|
return data;
|
|
@@ -119,7 +117,7 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
|
|
|
mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
mapAll.put("name", templateInfosVO.getModeName());
|
|
|
mapAll.put("type", templateInfosVO.getModeType());
|
|
|
-
|
|
|
+
|
|
|
templateInfoFand.allEq(mapAll);
|
|
|
int sum = count(templateInfoFand);
|
|
|
if (sum != 0) {
|