浏览代码

新增确认接口

chenweida 8 年之前
父节点
当前提交
f8b45351cc

+ 7 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java

@ -61,6 +61,7 @@ public class PrescriptionExpressage extends IdEntity{
    private String acceptName;        //医院药品接收人名称
    private String acceptHospital;        //医院药品接收人名称
    private String acceptHospitalName;        //医院药品接收人名称
    private String acceptHospitalAddress;        //医院药品接收人名称
    private Date acceptTime;                //接收的时间
@ -380,5 +381,11 @@ public class PrescriptionExpressage extends IdEntity{
        this.patientHospitalCode = patientHospitalCode;
    }
    public String getAcceptHospitalAddress() {
        return acceptHospitalAddress;
    }
    public void setAcceptHospitalAddress(String acceptHospitalAddress) {
        this.acceptHospitalAddress = acceptHospitalAddress;
    }
}

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

@ -340,6 +340,14 @@ public class PrescriptionExpressageService {
            Prescription prescription=prescriptionDao.findByCode(prescriptionCode);
            prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.expressage2hospital.getValue());
            prescription.setExpressageTime(new Date());
            prescriptionExpressage.setAcceptCode(userCode);
            prescriptionExpressage.setAcceptName(userName);
            prescriptionExpressage.setAcceptMobile(mobile);
            prescriptionExpressage.setAcceptHospital(hospital);
            prescriptionExpressage.setAcceptHospitalName(hospitalName);
            prescriptionExpressage.setAcceptHospitalAddress(hospitalAddress);
            prescriptionExpressage.setAcceptTime(new Date());
        }
    }
}

+ 10 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionLogController.java

@ -1,7 +1,10 @@
package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.entity.doctor.reply.DoctorQuickReply;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressageLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
@ -26,6 +29,9 @@ import java.util.List;
public class PrescriptionLogController extends BaseController {
    @Autowired
    private PrescriptionLogService prescriptionLogService;
    @Autowired
    private PrescriptionExpressageLogService prescriptionExpressageLogService;
    /**
     * 根据处方code获取处方流程
@ -81,6 +87,10 @@ public class PrescriptionLogController extends BaseController {
                    PrescriptionLog.PrescriptionLogStatus.expressage2hospital.getValue(),
                    PrescriptionLog.PrescriptionLogStatus.finish.getValue()};
            List<PrescriptionLog> prescriptionLogs = prescriptionLogService.findPrescriptionLogsByPrescriptionCode(prescriptionCode, types);
            List<PrescriptionExpressageLog> expressageLogs = prescriptionExpressageLogService.findByPrescriptionCode(prescriptionCode);
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", new JSONArray(copyBeans(prescriptionLogs, "statusName", "createTime")));
            } else {