Browse Source

发起协同门诊

Trick 5 years ago
parent
commit
6ff4430090

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

@ -1107,7 +1107,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public JSONArray getDrugDictionary(String chargeCode,String pyKey,String winNo)throws Exception{
        return entranceService.MS53001(chargeCode,pyKey,null,winNo,"0",demoFlag);
        return entranceService.MS53001(chargeCode,pyKey,"0",winNo,"0",demoFlag);
    }
    /**
@ -2600,38 +2600,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    @Autowired
    private FileUploadService fileUploadService;
    public Map<String,Object> test() {
        try {
            TransRequest e = new TransRequest();
            e.setMethod("ehc.ehealthcard.authurl");
            e.setApp_id("1BQA48ETK000A718A8C000001FFAA482");
            e.setTerm_id("35020010001");
            e.setVersion("X.M.0.1");
            e.setTimestamp(DateUtil.dateToStr(new Date(),"yyyyMMddHHmmss"));
            e.setSign_type("MD5");
            e.setEnc_type("AES");
            com.alibaba.fastjson.JSONObject bizContent = new com.alibaba.fastjson.JSONObject();
            String no = UUID.randomUUID().toString().substring(0,30);
            bizContent.put("out_authorize_no", no);
            bizContent.put("out_authorize_time", DateUtils.getOutTradeTime());
            e.setBiz_content(JSON.toJSONString(bizContent));
            EhcHandler ehcHandler = new EhcHandler("http://www.mstpay.com:1811/ehcService/gateway.do", "1BQA48ETK000A718A8C000001FFAA482", "35020010001", "1BQA48ETK001A718A8C00000FE996B9B");
            TransResponse re = ehcHandler.execute(e);
            String rs = com.alibaba.fastjson.JSONObject.toJSONString(re);
            com.alibaba.fastjson.JSONObject json = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(rs);
            com.alibaba.fastjson.JSONObject biz = json.getJSONObject("biz_content");
            InputStream qrcode = QrcodeUtil.createQrcode(biz.getString("ehealth_authurl"),300,"jpg");
            UploadVO uploadVO = fileUploadService.uploadStream(qrcode,"qrcode.jpg","http://172.26.0.110:8888/");
            Map<String,Object> map = new HashedMap();
            map.put("fileName",uploadVO.getFileName());
            map.put("fileType",uploadVO.getFileType());
            map.put("fullUrl",uploadVO.getFullUrl());
            map.put("fullUri",uploadVO.getFullUri());
            map.put("out_authorize_no",no);
            return map;
        } catch (Exception var5) {
            var5.printStackTrace();
        }
    public Map<String,Object> test() throws Exception{
        entranceService.MS02014(false);
        return null;
    }

File diff suppressed because it is too large
+ 24 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java


+ 13 - 8
business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java

@ -1,6 +1,8 @@
package com.yihu.jw.hospital.survey.service;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.hospital.doctor.WlyyDoctorWorkTimeDO;
import com.yihu.jw.entity.hospital.survey.*;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.survey.dao.*;
@ -8,9 +10,11 @@ import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO;
import com.yihu.jw.restmodel.hospital.survey.*;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.utils.EntityUtils;
import com.yihu.jw.utils.StringUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
@ -152,7 +156,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
    public Boolean saveSurveyQuestion(String sqjsons,String sqOptionJson)throws Exception{
        //保存问题
        List<WlyySurveyQuestionDO> surveys = (List<WlyySurveyQuestionDO>) com.alibaba.fastjson.JSONArray.parseArray(sqjsons, WlyySurveyQuestionDO.class);
        List<WlyySurveyQuestionDO> surveys = EntityUtils.jsonToList(sqjsons, WlyySurveyQuestionDO.class);
        surveyQuestionDao.save(surveys);
        if(surveys!=null&&surveys.size()>0){
@ -162,7 +166,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
                    surveyQuestionsOptionDao.delete(optionDOs);
                }
                if(StringUtils.isNotBlank(sqOptionJson)){
                    List<WlyySurveyQuestionsOptionDO> options = (List<WlyySurveyQuestionsOptionDO>) com.alibaba.fastjson.JSONArray.parseArray(sqOptionJson, WlyySurveyQuestionsOptionDO.class);
                    List<WlyySurveyQuestionsOptionDO> options = EntityUtils.jsonToList(sqOptionJson, WlyySurveyQuestionsOptionDO.class);
                    surveyQuestionsOptionDao.save(options);
                }
            }
@ -186,7 +190,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            surveyQuestionsOptionDao.delete(optionDOs);
        }
        if(StringUtils.isNotBlank(sqOptionJson)){
            List<WlyySurveyQuestionsOptionDO> options = (List<WlyySurveyQuestionsOptionDO>) com.alibaba.fastjson.JSONArray.parseArray(sqOptionJson, WlyySurveyQuestionsOptionDO.class);
            List<WlyySurveyQuestionsOptionDO> options = EntityUtils.jsonToList(sqOptionJson, WlyySurveyQuestionsOptionDO.class);
            surveyQuestionsOptionDao.save(options);
        }
        return true;
@ -347,7 +351,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        }
        //新增问题
        if(StringUtils.isNotBlank(tempQJson)){
            List<WlyySurveyTemplateQuestionDO> questions = (List<WlyySurveyTemplateQuestionDO>) com.alibaba.fastjson.JSONArray.parseArray(tempQJson, WlyySurveyTemplateQuestionDO.class);
            List<WlyySurveyTemplateQuestionDO> questions = EntityUtils.jsonToList(tempQJson, WlyySurveyTemplateQuestionDO.class);
            surveyTemplateQuestionDao.save(questions);
        }
@ -359,7 +363,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        //保存新问题选项
        if(StringUtils.isNotBlank(tempOpJson)){
            List<WlyySurveyTemplateOptionDO> questions = (List<WlyySurveyTemplateOptionDO>) com.alibaba.fastjson.JSONArray.parseArray(tempOpJson, WlyySurveyTemplateOptionDO.class);
            List<WlyySurveyTemplateOptionDO> questions = EntityUtils.jsonToList(tempOpJson, WlyySurveyTemplateOptionDO.class);
            surveyTemplateOptionDao.save(questions);
        }
@ -369,8 +373,8 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            surveyLabelInfoDao.delete(labelDels);
        }
        if(StringUtils.isNotBlank(labelJson)){
            List<WlyySurveyLabelInfoDO> labels = (List<WlyySurveyLabelInfoDO>) com.alibaba.fastjson.JSONArray.parseArray(labelJson, WlyySurveyLabelInfoDO.class);
            List<WlyySurveyLabelInfoDO> labels = EntityUtils.jsonToList(labelJson, WlyySurveyLabelInfoDO.class);
            surveyLabelInfoDao.save(labels);
        }
        //删除检查标签
@ -380,7 +384,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        }
        //保存检查标签
        if(StringUtils.isNotBlank(labelInspJson)){
            List<WlyySurveyInspLabelInfoDO> labels = (List<WlyySurveyInspLabelInfoDO>) com.alibaba.fastjson.JSONArray.parseArray(labelInspJson, WlyySurveyInspLabelInfoDO.class);
            List<WlyySurveyInspLabelInfoDO> labels = EntityUtils.jsonToList(labelInspJson, WlyySurveyInspLabelInfoDO.class);
            surveyInspLabelInfoDao.save(labels);
        }
@ -409,4 +413,5 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        }
        return true;
    }
}

+ 15 - 0
business/base-service/src/main/java/com/yihu/jw/utils/EntityUtils.java

@ -1,7 +1,11 @@
package com.yihu.jw.utils;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.ArrayList;
import java.util.List;
public class EntityUtils {
@ -17,4 +21,15 @@ public class EntityUtils {
        return entity;
    }
    public static <T> List<T> jsonToList(String json, Class<T> target)throws Exception{
        com.alibaba.fastjson.JSONArray array = JSON.parseArray(json);
        List<T> list = new ArrayList<>();
        for(int i=0;i<array.size();i++){
            com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject)array.get(i);
            T t = objectMapper.readValue(object.toJSONString(),target);
            list.add(t);
        }
        return list;
    }
}

+ 2 - 0
business/base-service/src/mqConfig/esbmq-config.xml

@ -63,6 +63,8 @@
				<BS16010_1>EwellQ.S60.BS16010.GET</BS16010_1>
				<BS16011_0>EwellQ.S60.BS16011.PUT</BS16011_0>
				<BS16011_1>EwellQ.S60.BS16011.GET</BS16011_1>
				<MS02014_0>EwellQ.S60.MS02014.PUT</MS02014_0>
				<MS02014_1>EwellQ.S60.MS02014.GET</MS02014_1>
			</QUEUES>
		</QMGR.S60>
	</MQCONFIG>

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

@ -164,6 +164,11 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date createTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date endTime;
    /**
	 * 就诊时间
	 */
@ -548,4 +553,12 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    public void setDoctorCancelRemark(String doctorCancelRemark) {
        this.doctorCancelRemark = doctorCancelRemark;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
}

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyQuestionDO.java

@ -3,7 +3,9 @@ package com.yihu.jw.entity.hospital.survey;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@ -12,8 +14,9 @@ import java.util.Date;
 */
@Entity
@Table(name = "wlyy_survey_question")
public class WlyySurveyQuestionDO extends UuidIdentityEntity {
public class WlyySurveyQuestionDO {
    private String id;
    private String title;//问题标题',
    private String questionComment;//问题说明(可为null)',
    private Integer questionType;//问题类型(0单选 1多选 2问答)',
@ -24,6 +27,16 @@ public class WlyySurveyQuestionDO extends UuidIdentityEntity {
    private Date createTime;//创建时间',
    private Date updateTime;//修改时间',
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyQuestionsOptionDO.java

@ -2,7 +2,9 @@ package com.yihu.jw.entity.hospital.survey;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
@ -10,14 +12,25 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "wlyy_survey_questions_option")
public class WlyySurveyQuestionsOptionDO extends UuidIdentityEntity {
public class WlyySurveyQuestionsOptionDO {
    private String id;
    private String questionCode;//题库问题编码',
    private String content;//选项内容',
    private Integer isRequired;//选项说明是否必填(0否 1是)',
    private Integer sort;//单题内排序',
    private String del;//删除标志(1正常,0删除)',
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getQuestionCode() {
        return questionCode;
    }

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyTemplateDO.java

@ -3,7 +3,9 @@ package com.yihu.jw.entity.hospital.survey;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@ -12,8 +14,9 @@ import java.util.Date;
 */
@Entity
@Table(name = "wlyy_survey_template")
public class WlyySurveyTemplateDO extends UuidIdentityEntity {
public class WlyySurveyTemplateDO {
    private String id;
    private String title;//模板标题',
    private String templateComment;//模板说明',
    private String creater;//创建人',
@ -22,6 +25,16 @@ public class WlyySurveyTemplateDO extends UuidIdentityEntity {
    private Date createTime;//创建时间',
    private Date updateTime;//修改时间',
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyTemplateOptionDO.java

@ -2,7 +2,9 @@ package com.yihu.jw.entity.hospital.survey;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
@ -10,8 +12,9 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "wlyy_survey_template_option")
public class WlyySurveyTemplateOptionDO extends UuidIdentityEntity {
public class WlyySurveyTemplateOptionDO  {
    private String id;
    private String templateCode;//模板编码',
    private String templateQuestionCode;//模板问题编码',
    private String content;//选项内容',
@ -22,6 +25,16 @@ public class WlyySurveyTemplateOptionDO extends UuidIdentityEntity {
    private String del;//删除标志(1正常,0删除)',
    private Integer sort;//单题内排序',
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getTemplateCode() {
        return templateCode;
    }

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyTemplateQuestionDO.java

@ -3,7 +3,9 @@ package com.yihu.jw.entity.hospital.survey;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@ -12,8 +14,9 @@ import java.util.Date;
 */
@Entity
@Table(name = "wlyy_survey_template_question")
public class WlyySurveyTemplateQuestionDO extends UuidIdentityEntity {
public class WlyySurveyTemplateQuestionDO {
    private String id;
    private String title;//问题标题',
    private String questionComment;//问题说明(可为null)',
    private Integer questionType;//问题类型(0单选 1多选 2问答)',
@ -28,6 +31,16 @@ public class WlyySurveyTemplateQuestionDO extends UuidIdentityEntity {
    private Date createTime;//创建时间',
    private Date updateTime;//修改时间',
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }