Przeglądaj źródła

Merge remote-tracking branch 'origin/dev/icss' into dev/icss

wangyu 6 lat temu
rodzic
commit
9f66975822

+ 1 - 1
config-server/src/main/resources/shared/icssman-service-dev.yml

@@ -8,7 +8,7 @@ spring:
       driverClassName: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.236:3306/sys-icssman?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息

+ 1 - 1
config-server/src/main/resources/shared/icssman-service-local.yml

@@ -8,7 +8,7 @@ spring:
       driverClassName: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.236:3306/sys-icssman?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息

+ 1 - 1
config-server/src/main/resources/shared/icssman-service-pro.yml

@@ -8,7 +8,7 @@ spring:
       driverClassName: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.236:3306/sys-icssman?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息

+ 1 - 1
config-server/src/main/resources/shared/icssman-service-test.yml

@@ -8,7 +8,7 @@ spring:
       driverClassName: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.241:3306/sys-icss?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.241:3306/sys-icssman?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息

+ 30 - 0
icss-service/src/main/java/com/diagbot/dto/GetLastOtherDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2019/01/14 45:00
+ */
+@ApiModel(value="获取最近一次其他史信息接口出参")
+@Getter
+@Setter
+public class GetLastOtherDTO {
+	
+	/**
+	 * 内容JSON字符串
+	 */
+	@ApiModelProperty(value="内容JSON字符串")
+	private String dataJson;
+	
+	/**
+	 * 问诊明细中的其他史
+	 */
+	@ApiModelProperty(value="问诊明细中的其他史")
+	private String otherStr;
+	
+}

+ 7 - 0
icss-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -131,6 +131,13 @@ public class GetTopPatientInfoDTO {
 	@ApiModelProperty(value="系统时间")
 	private Date systemTime;
 	
+	/**
+     * 出生日期
+     */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+	@ApiModelProperty(value="出生日期")
+    private Date birthday;
+	
 	/**
      * 门诊号
      */

+ 1 - 0
icss-service/src/main/java/com/diagbot/dto/IntroduceDTO.java

@@ -16,4 +16,5 @@ import java.util.List;
 @Setter
 public class IntroduceDTO extends IntroduceInfo {
     private List<IntroduceDetail> introduceDetailList;
+    private String tagName;
 }

+ 15 - 5
icss-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java

@@ -8,13 +8,13 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
 
-import com.diagbot.enums.IsDeleteEnum;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.GetInquiryDetailDTO;
+import com.diagbot.dto.GetLastOtherDTO;
 import com.diagbot.dto.HisInquiryDTO;
 import com.diagbot.dto.ReadInquiryDTO;
 import com.diagbot.dto.SaveInquiryDTO;
@@ -24,6 +24,7 @@ import com.diagbot.entity.HospitalInfo;
 import com.diagbot.entity.InquiryDetail;
 import com.diagbot.entity.InquiryInfo;
 import com.diagbot.entity.PatientInfo;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.SexTypeEnum;
 import com.diagbot.service.impl.InquiryInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
@@ -153,7 +154,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
      * @param getLastOtherVO
      * @return
      */
-    public String getLastOther(GetLastOtherVO getLastOtherVO) {
+    public GetLastOtherDTO getLastOther(GetLastOtherVO getLastOtherVO) {
+    	GetLastOtherDTO getLastOtherDTO = new GetLastOtherDTO();
+    	
         HospitalInfo hospitalInfo = hospitalInfoFacade.getHospitalByCode(getLastOtherVO.getHospitalCode());
         PatientInfo patientInfo = patientInfoFacade.getPatientByCode(getLastOtherVO.getHospitalCode(), getLastOtherVO.getPatientCode());
 
@@ -164,10 +167,17 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
         InquiryInfo inquiryInfo = baseMapper.getPatientLast(map);
 
         if (inquiryInfo != null) {
-        	return inquiryInfo.getDataJson();
-        }else{
-        	return null;
+        	getLastOtherDTO.setDataJson(inquiryInfo.getDataJson());
+        	
+        	QueryWrapper<InquiryDetail> inquiryDetailQe = new QueryWrapper<>();
+            inquiryDetailQe.eq("inquiry_id", inquiryInfo.getId());
+            inquiryDetailQe.eq("type", 3);
+            InquiryDetail inquiryDetail = inquiryDetailFacade.getOne(inquiryDetailQe);
+            if(inquiryDetail!=null){
+            	getLastOtherDTO.setOtherStr(inquiryDetail.getContent());
+            }
         }
+        return getLastOtherDTO;
     }
 
     /**

+ 8 - 1
icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -40,9 +40,14 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
      * @return
      */
     public IntroduceDTO getByQuestionId(IntroduceByQuestionVO introduceByQuestionVO) {
-        if (introduceByQuestionVO.getQuestionId() == null) {
+        Long questionId = introduceByQuestionVO.getQuestionId();
+        if (questionId == null) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入标签id");
         }
+        QuestionInfo questionInfo = questionFacade.getById(questionId);
+        if (questionInfo == null) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "未找到标签");
+        }
         QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
         introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
                 eq("question_id", introduceByQuestionVO.getQuestionId()).
@@ -53,6 +58,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         }
 
         IntroduceDTO introduceDTO = this.getRecordByIdAndPosition(introduceMap.getIntroduceId(), introduceByQuestionVO.getPosition());
+        introduceDTO.setTagName(questionInfo.getTagName());
         return introduceDTO;
     }
 
@@ -85,6 +91,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         }
 
         IntroduceDTO introduceDTO = this.getRecordByIdAndPosition(introduceMap.getIntroduceId(), introduceByQuestionVO.getPosition());
+        introduceDTO.setTagName(questionInfo.getTagName());
         return introduceDTO;
     }
 

+ 1 - 0
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -49,6 +49,7 @@ public class PatientInfoFacade extends PatientInfoServiceImpl {
         GetTopPatientInfoDTO getTopPatientInfoDTO = baseMapper.getTopPatientInfo(getTopPatientInfoVO);
         getTopPatientInfoDTO.setSystemTime(DateUtil.now());
         getTopPatientInfoDTO.setRecordId(getTopPatientInfoVO.getRecordId());
+        getTopPatientInfoDTO.setPatientAge(DateUtil.yearCompare(getTopPatientInfoDTO.getBirthday(), DateUtil.now()));
 
         QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
         deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/InquiryInfoController.java

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetInquiryDetailDTO;
+import com.diagbot.dto.GetLastOtherDTO;
 import com.diagbot.dto.HisInquiryDTO;
 import com.diagbot.dto.ReadInquiryDTO;
 import com.diagbot.dto.RespDTO;
@@ -59,7 +60,7 @@ public class InquiryInfoController {
     @ApiOperation(value = "获取最近一次其他史信息[by:rengb]")
     @PostMapping("/getLastOther")
     @SysLogger("getLastOther")
-    public RespDTO<String> getLastOther(@Valid @RequestBody GetLastOtherVO getLastOtherVO) {
+    public RespDTO<GetLastOtherDTO> getLastOther(@Valid @RequestBody GetLastOtherVO getLastOtherVO) {
         return RespDTO.onSuc(inquiryInfoFacade.getLastOther(getLastOtherVO));
     }
 

+ 1 - 1
icss-service/src/main/resources/mapper/PatientInfoMapper.xml

@@ -55,7 +55,7 @@
 		d.`name` as patientName,
 		case when d.sex=1 then '男' when d.sex=2 then '女' else '未知' end as patientSex,
 		d.id_no as patientIdNo,
-		ROUND(DATEDIFF(CURDATE(), d.birthday)/365.2422) as patientAge
+		d.birthday as birthday
 		FROM tran_hospital_info a LEFT JOIN tran_hospital_dept b 
 		ON a.`code`=b.hospital_code and b.`status`=1 and b.is_deleted='N' and b.`code`=#{hospitalDeptCode} 	
 		LEFT JOIN tran_doctor_info c 

+ 2 - 2
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -128,7 +128,7 @@
 
     <select id="getList" resultType="com.diagbot.dto.QuestionPageDTO">
         SELECT a.* FROM `icss_question_info` a WHERE a.is_deleted = 'N'
-        <if test="type != null">
+        <if test="type != null and type != ''">
             AND a.type = #{type}
         </if>
         <if test="tagName != null and tagName != ''">
@@ -140,7 +140,7 @@
                 #{tagType}
             </foreach>
         </if>
-        order by a.gmt_create desc
+        order by a.gmt_modified desc
 
     </select>
 

+ 1 - 1
user-service/src/main/java/com/diagbot/facade/UserFacade.java

@@ -1449,7 +1449,7 @@ public class UserFacade extends UserServiceImpl {
         Map<String, String> map = new HashMap<>();
         if (ListUtil.isNotEmpty(userList)){
             for (User user: userList){
-                map.put(user.getId().toString(), user.getUsername());
+                map.put(user.getId().toString(), user.getLinkman());
             }
         }
         return map;