Pārlūkot izejas kodu

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

liuwenbin 7 gadi atpakaļ
vecāks
revīzija
b08fe93d07

+ 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
     *

+ 3 - 3
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);
@ -153,7 +153,7 @@ public class PrescriptionController extends BaseController{
	}
	@RequestMapping(value = "saveRecipe",method = RequestMethod.POST)
	@ApiOperation("挂号开处方接口")
	@ApiOperation("挂号开处方接口,调整处方接口")
	public Result saveRecipe(@ApiParam(name="prescriptionCode",value="续方code",defaultValue = "123")
							 @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode)
	{
@ -301,7 +301,7 @@ public class PrescriptionController extends BaseController{
	@ResponseBody
	@ApiOperation("根据基卫挂号单获取顺丰快递相关信息")
	public Result getSFExpressInfo(
			@ApiParam(name="visitNo", value="基卫处方编号") @RequestParam(value = "visitNo",required = true) String visitNo){
			@ApiParam(name="visitNo", value="基卫挂号号") @RequestParam(value = "visitNo",required = true) String visitNo){
		try {
			return prescriptionService.getSFExpressInfoByVisitNo(visitNo);
		}catch (Exception e){

+ 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

+ 13 - 7
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;
@ -129,24 +128,31 @@ public class PresModeAdapter {
                    p.put("hospital",doctor.getHospital());
                }else{
                    p.put("doctor",mode.getString("APPLY_OPERATOR"));
                    p.put("hospitalName",mode.getString("APPLY_OPERATOR_NAME"));
                    p.put("doctorName",mode.getString("APPLY_OPERATOR_NAME"));
                    //p.setHospitalName(doctor.getHospitalName());
                    p.put("hospital",mode.getString("HEALTH_ORG_CODE"));
                }
                PrescriptionDiagnosis diagnosis = new PrescriptionDiagnosis();
                diagnosis.setCode(mode.getString("DIAGNOSE_CODE"));//诊断代码
                diagnosis.setName(mode.getString("DIAGNOSE_NAME"));//诊断名称
                String icd10 = icd10DictServcie.getHealthProblemsByIcd10Code(mode.getString("DIAGNOSE_CODE"));
//                String diagnoseCode = mode.getString("DIAGNOSE_CODE");
//                String diagnoseName = mode.getString("DIAGNOSE_NAME");
                String diagnoseCode = "E10.100";
                String diagnoseName = "1型糖尿病性酮症";
                diagnosis.setCode(diagnoseCode);//诊断代码
                diagnosis.setName(diagnoseName);//诊断名称
                String icd10 = icd10DictServcie.getHealthProblemsByIcd10Code(diagnoseCode);
                if(!StringUtils.isEmpty(icd10)){
                    JSONObject icd = JSONObject.parseObject(icd10);
                    diagnosis.setHealthProblemName(icd.getString("value"));//诊断名称
                    diagnosis.setHealthProblem(icd.getString("key"));//诊断代码
                }else{
                    diagnosis.setHealthProblemName(mode.getString("DIAGNOSE_CODE"));//诊断名称
                    diagnosis.setHealthProblem(mode.getString("DIAGNOSE_NAME"));//诊断代码
                    diagnosis.setHealthProblemName(diagnoseName);//诊断名称
                    diagnosis.setHealthProblem(diagnoseCode);//诊断代码
                }
                JSONArray jsonArrayDt = new JSONArray();
                jsonArrayDt.add(diagnosis);
                p.put("prescriptionDt",jsonArrayDt);
                JSONArray infos = mode.getJSONArray("RECIPE_DETAIL");
                Iterator infoIt = infos.iterator();

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/express/SFExpressService.java

@ -558,6 +558,8 @@ public class SFExpressService extends BaseService {
            }
            //如果成功获取到快递单号,则保存处方物流记录,保存配送日志
            //修改处方状态为配送中
            prescriptionDao.updateStatus(sfexpress_obj.getPrescriptionCode(),65);
            //保存处方物流记录
            prescriptionExpressageDao.save(sfexpress_obj);

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -262,12 +262,17 @@ public class PrescriptionExpressageService {
    }
    /**
     * 保存快递单号和增加处方物流记录为配送
     * 1,保存快递单号增
     * 2,加处方物流记录为配送
     * 3,修改处方状态为配送配送中
     *
     * @param prescriptionExpressage
     * @throws Exception
     */
    public void updatePrescriptionExpressage(PrescriptionExpressage prescriptionExpressage) throws Exception {
        //修改处方状态为配送配送中
        prescriptionDao.updateStatus(prescriptionExpressage.getPrescriptionCode(),65);
        //保存处方物流记录
        prescriptionExpressageDao.save(prescriptionExpressage);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -172,9 +172,9 @@ public class PrescriptionInfoController extends BaseController{
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            //获取配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            jo.put("prescriptionExpressage", prescriptionExpressage);
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionExpressage", new JSONObject(prescriptionExpressage));
            jo.put("prescriptionHospital", prescription.getHospitalName());//出药机构
            jo.put("dispensaryDispensaryType", prescription.getType());//处方配送方式
            jo.put("dispensaryDispensaryTypeName", prescription.getTypeName());//处方配送方式

+ 0 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/express/SFExpressController.java

@ -11,7 +11,6 @@ import com.yihu.wlyy.service.app.express.SFExpressService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -25,7 +24,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.UUID;
/**
 * 顺丰速运相关接口