Jelajahi Sumber

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 tahun lalu
induk
melakukan
656fe86d41

+ 14 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/common/util/DateUtil.java

@ -50,6 +50,20 @@ public class DateUtil {
        return formatter.format(currentTime);
    }
    public static String getNextDay(java.util.Date d, int days) {
        Calendar c = Calendar.getInstance();
        c.setTime(d);
        c.add(Calendar.DATE, days);
        return dateToStrShort(c.getTime());
    }
    public static String getNextMonth(java.util.Date d, int months) {
        Calendar c = Calendar.getInstance();
        c.setTime(d);
        c.add(Calendar.MONTH, months);
        return dateToStrShort(c.getTime());
    }
    /**
     * 将长时间格式时间转换为字符串 yyyy-MM-dd HH:mm:ss
     *

+ 1 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -142,7 +142,7 @@ public class PrescriptionController extends BaseController{
								@RequestParam(value = "applyTimeEnd",required = false) String applyTimeEnd)
	{
		try {
//			cardNo = "D40612663";
			String re = prescriptionService.getLastRecipe(cardNo,recipeNo,applyTimeFrom,applyTimeEnd);
			return Result.success("调阅历史处方接口!",re);

+ 10 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.service.service.prescription;
import com.yihu.wlyy.service.common.model.Result;
import com.yihu.wlyy.service.common.util.DateUtil;
import com.yihu.wlyy.service.dao.*;
import com.yihu.wlyy.service.dao.prescription.*;
import com.yihu.wlyy.service.entity.Doctor;
@ -388,9 +389,16 @@ public class PrescriptionService extends ZysoftBaseService{
        Map<String,String> params = new HashMap<>();
        params.put("cardNo",cardNo);
        if(StringUtils.isEmpty(recipeNo)){
            recipeNo = "0";
        }
        params.put("recipeNo",recipeNo);
//        params.put("applyTimeFrom",applyTimeFrom);
//        params.put("applyTimeEnd",applyTimeEnd);
        if(StringUtils.isEmpty(applyTimeFrom)){
            applyTimeEnd = DateUtil.getStringDateShort();
            applyTimeFrom = DateUtil.getNextDay(new Date(),-60);
        }
        params.put("applyTimeFrom",applyTimeFrom);
        params.put("applyTimeEnd",applyTimeEnd);
        String response = postSecond("getLastRecipe","调阅历史处方接口",params,null,header,false,2);

+ 1 - 1
patient-co-service/wlyy_service/src/main/resources/application.yml

@ -75,7 +75,7 @@ spring:
spring:
  profiles: test
  datasource:
    url: jdbc:mysql://172.19.103.85:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://172.17.110.160:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
    username: ssgg
    password: ssgg
    driverClassName: com.mysql.jdbc.Driver

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/adapter/PresModeAdapter.java

@ -3,7 +3,6 @@ package com.yihu.wlyy.adapter;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDiagnosis;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.service.system.Icd10DictServcie;
@ -147,6 +146,9 @@ public class PresModeAdapter {
                    diagnosis.setHealthProblemName(mode.getString("DIAGNOSE_CODE"));//诊断名称
                    diagnosis.setHealthProblem(mode.getString("DIAGNOSE_NAME"));//诊断代码
                }
                JSONArray jsonArrayDt = new JSONArray();
                jsonArrayDt.add(diagnosis);
                p.put("prescriptionDt",jsonArrayDt);
                JSONArray infos = mode.getJSONArray("RECIPE_DETAIL");
                Iterator infoIt = infos.iterator();