|
@ -1,8 +1,14 @@
|
|
package com.yihu.wlyy.web.doctor.prescription;
|
|
package com.yihu.wlyy.web.doctor.prescription;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
|
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionPayService;
|
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -11,6 +17,8 @@ import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by Trick on 2017/7/25.
|
|
* Created by Trick on 2017/7/25.
|
|
*/
|
|
*/
|
|
@ -23,6 +31,10 @@ public class PrescriptionInfoController extends BaseController{
|
|
private PrescriptionInfoService prescriptionInfoService;
|
|
private PrescriptionInfoService prescriptionInfoService;
|
|
@Autowired
|
|
@Autowired
|
|
private PrescriptionExpressageService prescriptionExpressageService;
|
|
private PrescriptionExpressageService prescriptionExpressageService;
|
|
|
|
@Autowired
|
|
|
|
private PrescriptionService prescriptionService;
|
|
|
|
@Autowired
|
|
|
|
private PrescriptionPayService prescriptionPayService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 确认配送 二维码方式
|
|
* 确认配送 二维码方式
|
|
@ -143,5 +155,37 @@ public class PrescriptionInfoController extends BaseController{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 订单跟踪 包含处方药品信息 订单记录 支付记录
|
|
|
|
* 根据处方code获取处方流程
|
|
|
|
*
|
|
|
|
* @param prescriptionCode
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "/prescriptionFollow", method = RequestMethod.GET)
|
|
|
|
@ApiOperation(value = "获取处方订单详情")
|
|
|
|
public String prescriptionFollow(
|
|
|
|
@RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
|
|
|
|
try {
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
//获取处方信息
|
|
|
|
Prescription prescription = prescriptionService.findByCode(prescriptionCode);
|
|
|
|
//获取处方药品信息
|
|
|
|
List<PrescriptionInfo> prescriptionInfos = prescriptionInfoService.getPrescriptionInfo(prescriptionCode);
|
|
|
|
//获取付款信息
|
|
|
|
PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
|
|
|
|
//获取配送信息
|
|
|
|
PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
|
|
|
|
prescriptionExpressage.setDispensaryType(prescription.getType());//处方配送方式
|
|
|
|
prescriptionExpressage.setStatus(prescription.getStatus());//处方状态
|
|
|
|
|
|
|
|
jo.put("prescriptionInfos", prescriptionInfos);
|
|
|
|
jo.put("prescriptionPay", prescriptionPay);
|
|
|
|
jo.put("prescriptionExpressage", prescriptionExpressage);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", jo);
|
|
|
|
} catch (Exception e) {
|
|
|
|
return error(-1, "获取失败");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|