|
@ -2,7 +2,6 @@ package com.yihu.wlyy.service.app.prescription;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.organization.Hospital;
|
|
import com.yihu.wlyy.entity.organization.Hospital;
|
|
import com.yihu.wlyy.entity.organization.HospitalDept;
|
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.prescription.*;
|
|
import com.yihu.wlyy.entity.patient.prescription.*;
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
@ -10,18 +9,13 @@ import com.yihu.wlyy.repository.organization.HospitalDao;
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
import com.yihu.wlyy.repository.prescription.*;
|
|
import com.yihu.wlyy.repository.prescription.*;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
|
|
import org.json.JSONArray;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
import java.util.concurrent.ExecutionException;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by chenweida on 2017/7/27.
|
|
* Created by chenweida on 2017/7/27.
|
|
@ -41,7 +35,8 @@ public class PrescriptionExpressageService {
|
|
private PrescriptionNoticesService prescriptionNoticesService;
|
|
private PrescriptionNoticesService prescriptionNoticesService;
|
|
@Autowired
|
|
@Autowired
|
|
private PrescriptionExpressageLogDao prescriptionExpressageLogDao;
|
|
private PrescriptionExpressageLogDao prescriptionExpressageLogDao;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private PrescriptionService prescriptionService;
|
|
@Autowired
|
|
@Autowired
|
|
private DoctorDao doctorDao;
|
|
private DoctorDao doctorDao;
|
|
@Autowired
|
|
@Autowired
|
|
@ -300,20 +295,18 @@ public class PrescriptionExpressageService {
|
|
* 全科医生分配健管师
|
|
* 全科医生分配健管师
|
|
*
|
|
*
|
|
* @param code 健管师code
|
|
* @param code 健管师code
|
|
* @param name 健管师名称
|
|
|
|
* @param mobile 健管师联系电话
|
|
|
|
* @param prescriptionCode 处方code
|
|
* @param prescriptionCode 处方code
|
|
* @param doctorQK 分配的全科
|
|
* @param doctorQK 分配的全科
|
|
*/
|
|
*/
|
|
@Transactional
|
|
@Transactional
|
|
public void updateExpressageJGS(String code, String name, String mobile, String prescriptionCode, String doctorQK) {
|
|
|
|
|
|
public void updateExpressageJGS(String code, String prescriptionCode, String doctorQK) {
|
|
Doctor doctor = doctorDao.findByCode(code);
|
|
Doctor doctor = doctorDao.findByCode(code);
|
|
Hospital hospital = hospitalDao.findByCode(doctor.getHospital());
|
|
Hospital hospital = hospitalDao.findByCode(doctor.getHospital());
|
|
//更新配送表 新增配送人员记录
|
|
//更新配送表 新增配送人员记录
|
|
PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionPay(prescriptionCode);
|
|
PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionPay(prescriptionCode);
|
|
prescriptionExpressage.setExpressageCode(code);
|
|
prescriptionExpressage.setExpressageCode(code);
|
|
prescriptionExpressage.setExpressageMobile(mobile);
|
|
|
|
prescriptionExpressage.setExpressageName(name);
|
|
|
|
|
|
prescriptionExpressage.setExpressageMobile(doctor.getMobile());
|
|
|
|
prescriptionExpressage.setExpressageName(doctor.getName());
|
|
prescriptionExpressage.setExpressageHospitalAddress(hospital.getAddress());
|
|
prescriptionExpressage.setExpressageHospitalAddress(hospital.getAddress());
|
|
prescriptionExpressage.setExpressageHospitalCode(doctor.getHospital());
|
|
prescriptionExpressage.setExpressageHospitalCode(doctor.getHospital());
|
|
prescriptionExpressage.setExpressageHospitalName(doctor.getHospitalName());
|
|
prescriptionExpressage.setExpressageHospitalName(doctor.getHospitalName());
|
|
@ -330,6 +323,9 @@ public class PrescriptionExpressageService {
|
|
prescriptionLog.setUserType(2);
|
|
prescriptionLog.setUserType(2);
|
|
prescriptionLog.setRemark("团队长分配健管师配送");
|
|
prescriptionLog.setRemark("团队长分配健管师配送");
|
|
prescriptionLogDao.save(prescriptionLog);
|
|
prescriptionLogDao.save(prescriptionLog);
|
|
|
|
|
|
|
|
//提醒健管师待取药
|
|
|
|
prescriptionService.waitExpressageMessage(prescriptionCode,code);
|
|
}
|
|
}
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|