Bladeren bron

代码修改

LAPTOP-KB9HII50\70708 2 jaren geleden
bovenliggende
commit
4e05638024

+ 34 - 155
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/JwSmjkEntranceService.java

@ -511,40 +511,21 @@ public class JwSmjkEntranceService {
     */
    public String GetDoctorList(String hospitalId,String hosDeptId) throws Exception{
        if(isdemo){
            return "{\n" +
                    "  \"status\": 200,\n" +
                    "  \"msg\": \"获取医生列表成功!\",\n" +
                    "  \"data\": [\n" +
                    "    {\n" +
                    "      \"id\": \"259724\",\n" +
                    "      \"name\": \"陈水龙\",\n" +
                    "      \"sex\": \"1\",\n" +
                    "      \"title\": \"主任医师\",\n" +
                    "      \"edu\": \"硕士\",\n" +
                    "      \"introduce\": \"主任医师、硕士,毕业于福建医科大学。现任科教部副主任,心内二科医疗组长。\\r\\n从事心血管内科临床及教学工作20余年,积累了丰富的临床工作经验。擅长高血压、冠心病、心力衰竭的临床诊治工作,在高血压的诊治方面有独到的造诣。\",\n" +
                    "      \"photo\": \"\",\n" +
                    "      \"fee\": null,\n" +
                    "      \"hosDeptId\": \"30100\",\n" +
                    "      \"hosDeptName\": \"心内科门诊\",\n" +
                    "      \"hospitalId\": \"350211A1002\",\n" +
                    "      \"hospitalName\": \"马銮湾医院\"\n" +
                    "    },\n" +
                    "    {\n" +
                    "      \"id\": \"259726\",\n" +
                    "      \"name\": \"王斌\",\n" +
                    "      \"sex\": \"1\",\n" +
                    "      \"title\": \"主任医师\",\n" +
                    "      \"edu\": \"博士\",\n" +
                    "      \"introduce\": \"主任医师、博士,毕业于四川大学华西临床医学院。现任急诊科主任。\\r\\n主要从事心血管内科临床、冠脉介入、瓣膜性心脏病微创介入及胸痛中心建设、维护及认证工作。\",\n" +
                    "      \"photo\": \"\",\n" +
                    "      \"fee\": null,\n" +
                    "      \"hosDeptId\": \"30100\",\n" +
                    "      \"hosDeptName\": \"心内科门诊\",\n" +
                    "      \"hospitalId\": \"350211A1002\",\n" +
                    "      \"hospitalName\": \"马銮湾医院\"\n" +
                    "    }\n" +
                    "  ]\n" +
                    "}";
            String sql = "select * from booking_doctor_temp where 1=1 ";
//            if(StringUtils.isNotBlank(hospitalId)){
//                sql+=" and hospitalId='"+hospitalId+"'";
//            }
//            if(StringUtils.isNotBlank(hosDeptId)){
//                sql+=" and hosDeptId='"+hosDeptId+"'";
//            }
            List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
            com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
            json.put("status",200);
            json.put("msg","获取医生列表成功");
            json.put("data",list);
            return  json.toJSONString();
        }
        String url = jwUrl + "/third/guahao/GetDoctorList";
        List<NameValuePair> params = new ArrayList<>();
@ -563,107 +544,18 @@ public class JwSmjkEntranceService {
     */
    public String GetDoctorArrange(String hospitalId,String hosDeptId,String doctorId) throws Exception{
        if(isdemo){
            return "{\n" +
                    "  \"status\": 200,\n" +
                    "  \"message\": \"获取医生排班成功!\",\n" +
                    "  \"data\": [\n" +
                    "    {\n" +
                    "      \"date\": \"2022/12/23 0:00:00\",\n" +
                    "      \"max\": \"28\",\n" +
                    "      \"fee\": \"50\",\n" +
                    "      \"time\": \"a\",\n" +
                    "      \"used\": \"14\",\n" +
                    "      \"regType\": \"主任号\",\n" +
                    "      \"sections\": [\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 8:34:40\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 8:42:00\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 8:42:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 8:49:20\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 8:49:20\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 8:56:40\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 9:26:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 9:33:20\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 9:48:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 9:55:20\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 9:55:20\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 10:02:40\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 10:17:20\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 10:24:40\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 10:54:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:01:20\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:01:20\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:08:40\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:08:40\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:16:00\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:16:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:23:20\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:23:20\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:30:40\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:30:40\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:38:00\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "          \"max\": \"1\",\n" +
                    "          \"startTime\": \"2022/12/23 11:38:00\",\n" +
                    "          \"used\": \"0\",\n" +
                    "          \"endTime\": \"2022/12/23 11:45:20\"\n" +
                    "        }\n" +
                    "      ],\n" +
                    "      \"status\": \"1\"\n" +
                    "    }\n" +
                    "  ]\n" +
                    "}";
            String sql1 = "select date,max,fee,time,used,regType,status from booking_doctor_arrange_temp";
            String sql2 = "select max,startTime,used,endTime from booking_doctor_arrange_detail_temp";
            List<Map<String,Object>> list1 = jdbcTemplate.queryForList(sql1);
            for (Map<String,Object> map:list1){
                List<Map<String,Object>> list2 = jdbcTemplate.queryForList(sql2);
                map.put("sections",list2);
            }
            JSONObject json = new JSONObject();
            json.put("status",200);
            json.put("message","获取医生排班成功");
            json.put("data",list1);
            return  json.toString();
        }
        String url = jwUrl + "/third/guahao/GetDoctorArrange";
@ -1353,26 +1245,13 @@ public class JwSmjkEntranceService {
    public JSONObject GetDoctorInfoTen(String hospitalId, String hosDeptId, String doctorId) {
        if(isdemo){
            String tmp = "{\n" +
                    "  \"message\": \"获取医生详细信息成功!\",\n" +
                    "  \"data\": {\n" +
                    "    \"hosDeptId\": \"30100\",\n" +
                    "    \"hospitalId\": \"350211A1002\",\n" +
                    "    \"introduce\": \"主任医师、硕士,毕业于福建医科大学。现任科教部副主任,心内二科医疗组长。\\r\\n从事心血管内科临床及教学工作20余年,积累了丰富的临床工作经验。擅长高血压、冠心病、心力衰竭的临床诊治工作,在高血压的诊治方面有独到的造诣。\",\n" +
                    "    \"hosDeptName\": \"心内科门诊\",\n" +
                    "    \"sex\": \"1\",\n" +
                    "    \"edu\": \"硕士\",\n" +
                    "    \"fee\": null,\n" +
                    "    \"name\": \"陈水龙\",\n" +
                    "    \"photo\": \"\",\n" +
                    "    \"id\": \"259724\",\n" +
                    "    \"hospitalName\": \"马銮湾医院\",\n" +
                    "    \"title\": \"主任医师\"\n" +
                    "  },\n" +
                    "  \"status\": 200\n" +
                    "}";
            return new JSONObject(tmp);
            String sql = "select * from booking_doctor_temp where id ='259724' ";
            List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
            JSONObject json = new JSONObject();
            json.put("status",200);
            json.put("message","获取医生详细信息成功");
            json.put("data",list.get(0));
            return json;
        }
        String url = jwUrl + "/third/smjk/RegDeptSpeDoctorList";
        List<NameValuePair> params = new ArrayList<>();

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/processGuidance/dao/BaseProcessGuidanceNodeDao.java

@ -9,4 +9,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 */
public interface BaseProcessGuidanceNodeDao extends JpaRepository<BaseProcessGuidanceNodeDO, String>,
        JpaSpecificationExecutor<BaseProcessGuidanceNodeDO> {
    BaseProcessGuidanceNodeDO findByNodeCode(String nodeCode);
}

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/processGuidance/dao/BaseProcessGuidanceThirdPushLogDao.java

@ -4,11 +4,15 @@ import com.yihu.jw.entity.base.processGuidance.BaseProcessGuidanceThirdPushLogDO
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.List;
/**
 * Created by yeshijie on 2022/11/29.
 */
public interface BaseProcessGuidanceThirdPushLogDao extends JpaRepository<BaseProcessGuidanceThirdPushLogDO, String>,
        JpaSpecificationExecutor<BaseProcessGuidanceThirdPushLogDO> {
    List<BaseProcessGuidanceThirdPushLogDO> findByIdcard(String idcard);
    List<BaseProcessGuidanceThirdPushLogDO> findByIdcardAndNodeCode(String idcard,String nodeCode);
}

+ 75 - 0
business/base-service/src/main/java/com/yihu/jw/processGuidance/service/ProcessGuidanceService.java

@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +43,31 @@ public class ProcessGuidanceService {
    private BaseProcessGuidanceThirdPushLogDao thirdPushLogDao;
    @Autowired
    private BaseProcessGuidanceNodeAppDao nodeAppDao;
    @Autowired
    private BaseProcessGuidanceNodeDao nodeDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    public Integer findStep(String patient){
        String sql = "SELECT CAST(node_code AS UNSIGNED) step from base_process_guidance_third_push_log " +
                "WHERE idcard = '"+patient+"' and guidance_id=1  ORDER BY step desc limit 1 ";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list.size()>0){
            return Integer.parseInt(list.get(0).get("step")+"");
        }
        return null;
    }
    public Integer nextStep(String patient,Integer setp){
        setp++;
        List<BaseProcessGuidanceThirdPushLogDO> logDOList = thirdPushLogDao.findByIdcardAndNodeCode(patient,setp+"");
        if(logDOList.size()>0){
            BaseProcessGuidanceThirdPushLogDO logDO = logDOList.get(0);
            logDO.setGuidanceId("1");
            thirdPushLogDao.save(logDO);
        }
        return setp;
    }
    public JSONArray findProcessGuidanceList(String patient,Integer isApp){
@ -70,6 +96,11 @@ public class ProcessGuidanceService {
                    presetJson.put("status",1);
                    BaseProcessGuidanceBookingDO bookingDO = processGuidanceBookingDao.findById(logDOMap.get(processCode).getRelationId()).orElse(null);
                    presetJson.put("obj", bookingDO);
                    //注意事项
                    BaseProcessGuidanceNodeDO nodeDO = nodeDao.findByNodeCode(processCode);
                    if(nodeDO!=null){
                        presetJson.put("notice",nodeDO.getNotice());
                    }
                }else {
                    presetJson.put("status",0);
                }
@ -77,6 +108,50 @@ public class ProcessGuidanceService {
                    List<BaseProcessGuidanceNodeAppDO> appDOS = nodeAppDao.findByNodeCode(processCode);
                    presetJson.put("appDOS", appDOS);
                }
                if("gotoHospital".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("address","厦门市海沧区浮莲路120号");
                    obj.put("tips","请携带您的身份证、医保卡");
                    presetJson.put("obj", obj);
                }
                if("gotoConsultationRoom".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("address","厦门市海沧区浮莲路120号");
                    obj.put("tips","可查看平面图进行指引");
                    presetJson.put("obj", obj);
                }
                if("gotoDoctor".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("doctorName","林殊");
                    obj.put("doctor","123456");
                    obj.put("patientNum","30");
                    obj.put("num","5");
                    obj.put("queueNo","18");
                    obj.put("wait","33分钟");
//                    obj.put("tips","");
                    presetJson.put("obj", obj);
                }
                if("gotoCheck".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("dept","消化内科");
                    obj.put("deptCode","1010");
                    obj.put("address","门诊四楼A区");
                    obj.put("tips","检查完成后返回就诊科室");
                    presetJson.put("obj", obj);
                }
                if("gotoFurtherConsultation".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("address","急诊大厅右侧自助机");
                    obj.put("tips","您于11月25日全身磁共振检查结果已出,请您近日到医院门诊3楼305室进行复诊,祝您健康。");
                    presetJson.put("obj", obj);
                }
                if("gotoTakeMedicine".equals(processCode)){
                    JSONObject obj = new JSONObject();
                    obj.put("address","急诊大厅右侧自助机");
                    obj.put("tips","您已完成就诊,可到急诊大厅右侧自助机上缴费领取取药凭证并进行取药。");
                    presetJson.put("obj", obj);
                }
                presetArray.add(presetJson);
            }
            json.put("presetDOList",presetArray);

+ 28 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/processGuidance/ProcessGuidanceEndpoint.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.endpoint.processGuidance;
import com.yihu.jw.processGuidance.service.ProcessGuidanceService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -22,6 +23,33 @@ public class ProcessGuidanceEndpoint extends EnvelopRestEndpoint {
    @Resource
    private ProcessGuidanceService processGuidanceService;
    @GetMapping(value = "nextStep")
    @ApiOperation(value = "获取居民进行中的流程")
    public Envelop nextStep(@ApiParam(name = "patient", value = "居民id", required = true)
                                           @RequestParam(value = "patient") String patient,
                                           @ApiParam(name = "setp", value = "当前步骤", required = true)
                                           @RequestParam(value = "setp") Integer setp) {
        try {
            return ObjEnvelop.getSuccess("查询成功",processGuidanceService.nextStep(patient,setp));
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("查询失败");
    }
    @GetMapping(value = "findStep")
    @ApiOperation(value = "获取居民进行中的流程步骤")
    public Envelop findStep(@ApiParam(name = "patient", value = "居民id", required = true)
                                           @RequestParam(value = "patient") String patient) {
        try {
            return ObjEnvelop.getSuccess("查询成功",processGuidanceService.findStep(patient));
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("查询失败");
    }
    @GetMapping(value = "findProcessGuidanceList")
    @ApiOperation(value = "获取居民进行中的流程")
    public Envelop findProcessGuidanceList(@ApiParam(name = "patient", value = "居民id", required = true)

+ 3 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/WlyyPatientExpressageAddrService.java

@ -105,6 +105,9 @@ public class WlyyPatientExpressageAddrService extends BaseJpaService<WlyyPatient
                this.save(olddefaultAddr);
            }
        }
        if(addrDO.getCreateTime()==null){
            addrDO.setCreateTime(new Date());
        }
        this.save(addrDO);
        return addrDO;
    }