Jelajahi Sumber

眼科医院v2.0.5

lhh 2 minggu lalu
induk
melakukan
b68ad9b8e8

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

@ -3947,7 +3947,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"患者姓名","问诊医生","就诊科室","问诊类型","发起时间","接诊时间","结束时间","咨询问题","是否开方","咨询状态"};
            String[] header = {"患者姓名","问诊医生","就诊科室","问诊类型","发起时间","接诊时间","结束时间","咨询问题","是否开方","咨询状态","检查机构"};
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
@ -4006,6 +4006,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                addCell(ws, i, 7, m.get("des")!=null?m.get("des").toString():n);
                addCell(ws, i, 8, payy!=null?payy:n);
                addCell(ws, i, 9, status.toString()!=null?status.toString():n);
                addCell(ws, i, 10, m.get("scbgjtOrgName")!=null?m.get("scbgjtOrgName").toString():n);
                i++;
            }
            wwb.write();

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

@ -1359,6 +1359,9 @@ public class ImService {
                }
                if (wxId.equalsIgnoreCase("xm_ykyy_wx")) {
                    imUtil.sendImMsg(doctorCode, doctor.getName(),sessionId,"1","您好,很高兴为您服务,请问有什么可以帮助到您?","1","");
                }
                if (obj == null) {
                    throw new RuntimeException("IM消息发送异常!");
@ -4069,6 +4072,11 @@ public class ImService {
                "op.type as \"type\"," +
                "op.outpatient_type as \"outpatientType\"," +
                "op.description AS \"title\"," +
                "op.scbgjt AS \"scbgjt\"," +
                "op.scbgjt_type AS \"scbgjtType\"," +
                "op.scbgjt_name AS \"scbgjtName\"," +
                "op.scbgjt_org_code AS \"scbgjtOrgCode\"," +
                "op.scbgjt_org_name AS \"scbgjtOrgName\"," +
                "op.description AS \"symptoms\",";
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag) {
@ -4174,6 +4182,8 @@ public class ImService {
                sql += " AND op.type =2 and op.outpatient_type = 3";
            } else if (type.equalsIgnoreCase("12")) {
                sql += " AND op.outpatient_type = 2";
            } else if (type.equalsIgnoreCase("19")) {
                sql += " AND op.scbgjt is not null ";
            } else {
                sql += " AND op.type in (1,2,3) ";
            }
@ -4227,6 +4237,9 @@ public class ImService {
                    map.put("type", 12);
                }
            }
            if(!StringUtils.isEmpty(map.get("scbgjt"))) {
                map.put("type", 19);
            }
            if (map.get("id") != null) {
                if ("1".equals(type) || "15".equals(type) || type.contains(",") || "17".equals(type)) {
                    String consultCode = map.get("id").toString();
@ -4338,6 +4351,8 @@ public class ImService {
                sql += " AND op.type =2 and op.outpatient_type = 3";
            } else if (type.equalsIgnoreCase("12")) {
                sql += " AND op.outpatient_type = 2";
            }else if (type.equalsIgnoreCase("19")) {
                sql += " AND op.scbgjt is not null ";
            } else {
                sql += " AND op.type in (1,2,3) ";
            }
@ -4367,7 +4382,9 @@ public class ImService {
                        "\ta.end_time AS \"etime\",\n" +
                        "\ta.description AS \"des\",\n" +
                        "\tb. STATUS AS \"pay\",\n" +
                        "\ta. STATUS AS \"STATUS\"\n" +
                        "\ta. STATUS AS \"STATUS\",\n" +
                        "\ta. scbgjt_org_code AS \"scbgjtOrgCode\",\n" +
                        "\ta. scbgjt_org_name AS \"scbgjtOrgName\"\n" +
                        "FROM\n" +
                        "\twlyy_outpatient a\n" +
                        "LEFT JOIN wlyy_prescription b ON a.id = b.outpatient_id\n" +

+ 10 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/TimeoutOverDueService.java

@ -47,6 +47,7 @@ import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
@Transactional
@ -112,6 +113,15 @@ public class TimeoutOverDueService {
    public void cancelOutPatientOver(){
            logger.info("进入结束超时未接诊的门诊");
            List<WlyyOutpatientDO> timeout = outpatientDao.findAllWaitingOutpatient();
            timeout = timeout.stream().filter(item -> {
                long currentTime = new Date().getTime();
                long outpatientTime = item.getRegisterDate().getTime();
                if(currentTime-outpatientTime<24*60*60*1000 && currentTime-outpatientTime>23*60*60*1000) {
                    return true;
                } else {
                    return false;
                }
            }).collect(Collectors.toList());
            if (null!=timeout&&timeout.size()>0){
                logger.info("开始结束超时未接诊的门诊");
                String cancelValue = "超时订单系统自动取消";