Selaa lähdekoodia

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageLogDO.java
wangzhinan 4 vuotta sitten
vanhempi
commit
ba2f86f733

+ 1 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -1,6 +1,5 @@
package com.yihu.jw.hospital.family.service;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.family.BasePatientMemberDictDO;
import com.yihu.jw.entity.hospital.family.WlyyPatientFamilyMemberDO;
@ -12,18 +11,14 @@ import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.management.MXBean;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -66,7 +61,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        }
        //获取his家属数据
        JSONArray jsonArray = entranceService.BS10008(idCard,"","","","","",demo);
        if(jsonArray.size()>0){
        if(jsonArray!=null&&jsonArray.size()>0){
            net.sf.json.JSONObject jsonObject= net.sf.json.JSONObject.fromObject(jsonArray.get(0).toString());
            String familyId="";
            //如果病人id为空则没有就诊记录

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -18,8 +18,8 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientList(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.hisStatus<>1")
    List<WlyyOutpatientDO> findByPatientListNoStatus(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.hisStatus=1 and a.createTime>=?2 and a.createTime<=?3")
    List<WlyyOutpatientDO> findByPatientListNoStatus(String patient,Date startDate,Date endDate);
    List<WlyyOutpatientDO> findByDoctorAndStatus(String doctor,String status);

+ 4 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -2136,7 +2136,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //========================处方操作结束=============================================================
        //加入处方状态变更流水日志
        prescriptionLogService.addPrescriptionLog(prescription.getId(), 10, 2, outpatientDO.getDoctor(), outpatientDO.getDoctorName(), "", new Date());
        prescriptionLogService.addPrescriptionLog(prescription.getId(), 0, 2, outpatientDO.getDoctor(), outpatientDO.getDoctorName(), "", new Date());
        //============================下诊断==============================================================
        //删除之前诊断
@ -7281,7 +7281,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            total +=wlyyPrescriptionDO1.getDrugFee();
                        }
                        String free = total + "";
                        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(patientCode);
                        Date startTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
                        Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
                        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(patientCode,startTime,endTime);
                        if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
                            free=(Double.parseDouble(free)+15)+"";
                        }

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -421,9 +421,11 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		//结束时医生未开处方则发送模板消息结算
		ConsultDo cons = consultDao.findOne(consult);
		if (StringUtils.isNoneBlank(cons.getRelationCode())){
			List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(cons.getPatient());
			Date startTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
			Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
			List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(cons.getPatient(),startTime,endTime);
			//发送诊断支付
			if (wlyyOutpatientDOList!=null&&wlyyOutpatientDOList.size()==1){
			if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
				WlyyOutpatientDO outpatientDO = wlyyOutpatientDOList.get(0);
				List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByOutpatientId(outpatientDO.getId());
				if (wlyyPrescriptionDOS==null||wlyyPrescriptionDOS.size()==0){

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -630,9 +630,11 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		//结束时医生未开处方则发送模板消息结算
		ConsultDo cons = consultDao.findOne(consult);
		if (org.apache.commons.lang3.StringUtils.isNoneBlank(cons.getRelationCode())){
			List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(cons.getPatient());
			Date startTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
			Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
			List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(cons.getPatient(),startTime,endTime);
			//发送诊断支付
			if (wlyyOutpatientDOList!=null&&wlyyOutpatientDOList.size()==1){
			if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
				WlyyOutpatientDO outpatientDO = wlyyOutpatientDOList.get(0);
				List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByOutpatientId(outpatientDO.getId());
				if (wlyyPrescriptionDOS==null||wlyyPrescriptionDOS.size()==0){

+ 5 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -854,9 +854,11 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                    if (prescriptionDO.getStatus()!=30){
                                        String fee=null;
                                        String title = null;
                                        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(prescriptionDO.getPatientCode());
                                        Date startTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
                                        Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
                                        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByPatientListNoStatus(prescriptionDO.getPatientCode(),startTime,endTime);
                                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                                        if (wlyyOutpatientDOList!=null&&wlyyOutpatientDOList.size()==1){
                                        if (wlyyOutpatientDOList==null&&wlyyOutpatientDOList.size()==0){
                                            fee=(prescriptionDO.getDrugFee()+15)+"";
                                            title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:15元。";
                                        }else {
@ -892,7 +894,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                if (waitPayDetailVO.getItemName().equalsIgnoreCase("互联网医院复诊诊查费")){
                                    WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findByRealOrder(waitPayDetailVO.getRecipeNo());
                                    if (wlyyOutpatientDO!=null){
                                        if (wlyyOutpatientDO.getHisStatus()==null||wlyyOutpatientDO.getHisStatus()!=1){
                                        if (wlyyOutpatientDO.getHisStatus()==null&&wlyyOutpatientDO.getHisStatus()!=1){
                                            String fee="15";
                                            String title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!";
                                            String url = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+wlyyOutpatientDO.getId()+"";