wangzhinan 4 éve
szülő
commit
770b1b5ec0

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

@ -81,4 +81,10 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    @Query("update WlyyOutpatientDO p set p.hisStatus=?2 where p.id=?1")
    void updateHisStatusById(String id,Integer hisStatus);
    @Transactional
    @Modifying
    @Query("update WlyyOutpatientDO p set p.channelId=?2 where p.id=?1")
    void updateChannelId(String id,String channelId);
}

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

@ -11393,4 +11393,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public  BaseDoctorDO findByIdCard(String idCard){
        return  baseDoctorDao.findByIdcardAndDel(idCard);
    }
    public  void updateChannelId(String id,String channelId){
        outpatientDao.updateChannelId(id,channelId);
    }
}

+ 14 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -274,6 +274,11 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
     * 处方号
     */
    private String chargeType;
    /**
     * 云信房间号
     */
    private String channelId;
    @Column(name = "charge_type")
    public String getChargeType() {
        return chargeType;
@ -729,4 +734,13 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    public void setRealOrder(String realOrder) {
        this.realOrder = realOrder;
    }
    @Column(name = "channel_id")
    public String getChannelId() {
        return channelId;
    }
    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }
}

+ 2 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -38,6 +38,8 @@ public class BaseHospitalRequestMapping {
        public static final String PREFIX  = "/prescription";
        public static final String findDoctorByIdCard = "/findDoctorByIdCard";
        public static final String updateChannelId = "/updateChannelId";
        //=====================start=======================================
        /**
         * 获取门诊记录

+ 1 - 5
svr/svr-internet-hospital/pom.xml

@ -235,11 +235,7 @@
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>xom</groupId>
            <artifactId>xom</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>

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

@ -22,6 +22,7 @@ import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.es.service.StatisticsEsService;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.dao.consult.KnowledgeArticleUserDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.service.WlyyHttpLogService;
@ -53,6 +54,7 @@ import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.sms.service.YkyyINSMSService;
import com.yihu.jw.util.common.FileUtil;
import com.yihu.jw.util.common.XMLUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -195,6 +197,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private SystemMessageService systemMessageService;
    @Autowired
    private ConsultDao consultDao;
    @Autowired
    FileUploadService fileUploadService;
    @Autowired
    private FileUtil fileUtil;
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDoctorByHospitalAndDiseaseAndDept)
    @ApiOperation(value = "根据疾病名称,热门部门查询医生", notes = "根据疾病名称,热门部门查询医生")
@ -1602,4 +1610,68 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                      @RequestParam(value = "idCard", required = false)String idCard) {
        return success(prescriptionService.findByIdCard(idCard));
    }
    @PostMapping(value = "updateChannelId")
    @ApiOperation(value = "保存云信channelId", notes = "保存云信channelId")
    public Envelop updateChannelId(@ApiParam(name = "id", value = "outpatientId")
                                      @RequestParam(value = "id", required = false)String id,
                                      @ApiParam(name = "channelId", value = "渠道id")
                                      @RequestParam(value = "channelId", required = false)String channelId) {
        prescriptionService.updateChannelId(id,channelId);
        return success("保存成功");
    }
    @PostMapping(value = "uploadFileToWx")
    @ApiOperation(value = "上传语音文件或者视频")
    public Envelop append(
            @ApiParam(name = "type", value = "追问内容类型:1文字,2图片,3语音  ... (im消息类型)")
            @RequestParam(value = "type",required = true) Integer type,
            @ApiParam(name = "times", value = "")
            @RequestParam(value = "times",required = false) Integer times) throws Exception {
        JSONObject object = new JSONObject();
        //处理语音文件
        if(!org.springframework.util.StringUtils.isEmpty(wxId)){
//			imService.getInputStream("1",wechat_appid);
            if(3 == type){//语音文件
                String voicepath = imService.fetchWxVoices(wxId);
                logger.info("voice_path:"+voicepath);
                JSONObject obj = new JSONObject();
                String voiceurl = "";
                // 将临时语音拷贝到正式存储路径下
                if (org.apache.commons.lang3.StringUtils.isNotEmpty(voicepath)) {
                    if("xm_ihealth_wx".equals(wxId)){
                        logger.info("voice_wx_type:"+wxId);
                        voiceurl = fileUploadService.uploadWxVoice(voicepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
                    }else {
                        voiceurl = fileUtil.copyTempVoice(voicepath,fastdfs_file_url);
                    }
                    obj.put("path", voiceurl);
                    obj.put("times", times);
                }
                object.put("path",voiceurl);
            }else if(2 == type){//图片文件
                String imagepath = imService.fetchWxImages(wxId);
                logger.info("image_path:"+imagepath);
                JSONObject obj = new JSONObject();
                String imgeUrl = "";
                // 将临时语音拷贝到正式存储路径下
                if (org.apache.commons.lang3.StringUtils.isNotEmpty(imagepath)) {
                    if("xm_ihealth_wx".equals(wxId)){
                        logger.info("imge_wx_type:"+wxId);
                        imgeUrl = fileUploadService.uploadWxImage(imagepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
                    }else{
                        imgeUrl = fileUtil.copyTempVoice(imagepath,fastdfs_file_url);
                    }
                    object.put("path",imgeUrl);
                }
            }else{}
        }
        return success(object);
    }
}

+ 2 - 2
svr/svr-internet-hospital/src/main/resources/application.yml

@ -455,9 +455,9 @@ spring:
    host: 192.168.33.198 # Redis server host.
    port: 6380 # Redis server port.
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
  fastdfs_file_url: http://192.168.33.198:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
  tracker-server: 192.168.33.198:22122 #服务器地址
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle