Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
10365d11d6

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

@ -34,6 +34,8 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    List<WlyyPrescriptionDO> findById(String id);
    WlyyPrescriptionDO findByRealOrder(String realOrder);
    List<WlyyPrescriptionDO> findByRealOrderList(String realOrder);
    
    WlyyPrescriptionDO findByAdmNoAndRealOrder(String admno,String realOrder);

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

@ -5667,11 +5667,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //根据门诊唯一号取就诊记录
//        List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByAdmNo(admNo);
        List<WlyyPrescriptionDO> wlyyPrescriptionDOList = prescriptionDao.findByAdmNoAndRealOrderList(admNo,realOrder);
        List<WlyyPrescriptionDO> wlyyPrescriptionDOList = prescriptionDao.findByRealOrderList(realOrder);
        Object result = "";
        System.out.println("获取顺丰物流面单信息:wlyyPrescriptionDOS != null=" + wlyyPrescriptionDOList != null);
        if (wlyyPrescriptionDOList != null) {
        if (wlyyPrescriptionDOList != null&&wlyyPrescriptionDOList.size()!=0) {
            WlyyPrescriptionDO wlyyPrescriptionDOS = wlyyPrescriptionDOList.get(0);
            List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId", wlyyPrescriptionDOS.getOutpatientId());
            WlyyPrescriptionExpressageDO sfexpress_obj = null;

+ 55 - 48
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1034,31 +1034,35 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
           WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
           wlyyOutpatientDO.setPayStatus(1);
           WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
            //发送企业模板消息给医生
            BasePatientDO patientDO = new BasePatientDO();
            String msg = "";
            String name=outpatientDO.getPatientName();
            String sex = "";
            String age="";
            String date = "";
            String title = "";
            String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
            if (patientDO!=null){
                sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
            }
            if (outpatientDO!=null){
                if (outpatientDO.getType().equalsIgnoreCase("1")){
                    title = "图文复诊";
                    msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
                }else if (outpatientDO.getType().equalsIgnoreCase("2")){
                    title = "视频复诊";
                    date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
                    msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                }
            }
            enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
            System.out.println("发送企业模板消息成功");
           if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()!=1){
               //发送企业模板消息给医生
               BasePatientDO patientDO = new BasePatientDO();
               patientDO = patientDao.findById(outpatientDO.getPatient());
               String msg = "";
               String name=outpatientDO.getPatientName();
               String sex = "";
               String age="";
               String date = "";
               String title = "";
               String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
               if (patientDO!=null){
                   sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                   age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
               }
               if (outpatientDO!=null){
                   if (outpatientDO.getType().equalsIgnoreCase("1")){
                       title = "图文复诊";
                       msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
                   }else if (outpatientDO.getType().equalsIgnoreCase("2")){
                       title = "视频复诊";
                       date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
                       msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                   }
               }
               enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               System.out.println("发送企业模板消息成功");
           }
        } else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")) {
           List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(businessOrderDO.getRelationCode());
           if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
@ -1094,31 +1098,34 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
            wlyyOutpatientDO.setPayStatus(1);
            WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
            //发送企业模板消息给医生
            BasePatientDO patientDO = new BasePatientDO();
            String msg = "";
            String name=outpatientDO.getPatientName();
            String sex = "";
            String age="";
            String date = "";
            String title = "";
            String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
            if (patientDO!=null){
                sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
            }
            if (outpatientDO!=null){
                if (outpatientDO.getType().equalsIgnoreCase("1")){
                    title = "图文复诊";
                    msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
                }else if (outpatientDO.getType().equalsIgnoreCase("2")){
                    title = "视频复诊";
                    date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
                    msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
            if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()!=1){
                //发送企业模板消息给医生
                BasePatientDO patientDO = new BasePatientDO();
                patientDO = patientDao.findById(outpatientDO.getPatient());
                String msg = "";
                String name=outpatientDO.getPatientName();
                String sex = "";
                String age="";
                String date = "";
                String title = "";
                String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                if (patientDO!=null){
                    sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                    age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
                }
                if (outpatientDO!=null){
                    if (outpatientDO.getType().equalsIgnoreCase("1")){
                        title = "图文复诊";
                        msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
                    }else if (outpatientDO.getType().equalsIgnoreCase("2")){
                        title = "视频复诊";
                        date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
                        msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                    }
                }
                enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                System.out.println("发送企业模板消息成功");
            }
            enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
            System.out.println("发送企业模板消息成功");
        } else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")) {
            List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(businessOrderDO.getRelationCode());
            if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){

+ 2 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3069,6 +3069,7 @@ public class ImService {
		}
		if("9".equals(type) || "16".equals(type)|| "12".equals(type)){
			sql = "SELECT " +
					" DISTINCT op.id AS \"outpatientId\"," +
					"op.description AS \"title\"," +
					"op.description AS \"symptoms\",";
			if("xm_ykyy_wx".equals(wxId)){
@ -3088,8 +3089,7 @@ public class ImService {
					"patient.id AS \"patientId\"," +
					"patient.idcard AS \"patientIdcard\"," +
					"patient.sex AS \"patientsex\"," +
					"patient.photo AS \"patientphoto\"," +
					"op.id AS \"outpatientId\"," ;
					"patient.photo AS \"patientphoto\",";
			if("xm_ykyy_wx".equals(wxId)){
				if (flag){
					sql = sql + "date_format(op.register_date,'%Y-%m-%d %H:%i:%S' )  AS \"registerDate\",";