LAPTOP-KB9HII50\70708 1 год назад
Родитель
Сommit
059d05ef5f

+ 0 - 5
business/im-service/src/main/java/com/yihu/jw/im/dao/ConsultDao.java

@ -1,12 +1,9 @@
package com.yihu.jw.im.dao;
import com.yihu.jw.entity.base.im.ConsultDo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
@ -15,8 +12,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
public interface ConsultDao extends JpaRepository<ConsultDo, String>, JpaSpecificationExecutor<ConsultDo> {
	ConsultDo findByCode(String code);
	@Query("from ConsultDo a where a.relationCode = ?1")
	ConsultDo findByRelationCode(String outpatientid);

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

@ -2054,15 +2054,20 @@ public class ImService {
     * @return
     */
    public JSONObject getConsultInfoAndPatientInfo(String consult, String patientCode) {
        ConsultDo consultDo = consultDao.getOne(consult);
        BasePatientDO basePatientDO = null;
        if (StringUtils.isEmpty(patientCode)) {
            patientCode = consultDo.getPatient();
        JSONObject result = new JSONObject();
        if(!StringUtils.isEmpty(consult)){
            ConsultDo consultDo = consultDao.findById(consult).orElse(null);
            if (StringUtils.isEmpty(patientCode)) {
                patientCode = consultDo.getPatient();
            }
            result.put("consultDo", consultDo);
        }else {
            result.put("consultDo", null);
        }
        BasePatientDO basePatientDO = null;
        basePatientDO = basePatientDao.getOne(patientCode);
        JSONObject result = new JSONObject();
        JSONObject patientinfoObj = new JSONObject();
        patientinfoObj.put("name", basePatientDO.getName());
        patientinfoObj.put("sex", basePatientDO.getSex());
@ -2073,7 +2078,6 @@ public class ImService {
        Integer age = DateUtil.getAgeForIdcard(basePatientDO.getIdcard());
        patientinfoObj.put("age", age);
        result.put("patientInfo", patientinfoObj);
        result.put("consultDo", consultDo);
        return result;
    }

+ 0 - 12
common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ConsultDo.java

@ -15,10 +15,6 @@ import java.util.Date;
@Table(name = "wlyy_consult")
public class ConsultDo extends UuidIdentityEntity {
	// 咨询标识
	private String code;
	// 患者标识
	private String patient;
	// 咨询类型:1三师咨询,2视频咨询,3图文咨询,4公共咨询,
@ -56,14 +52,6 @@ public class ConsultDo extends UuidIdentityEntity {
		this.signCode = signCode;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getSource() {
		return source;
	}

+ 105 - 0
common/commons-util/src/main/java/com/yihu/jw/ehr/util/Pair.java

@ -0,0 +1,105 @@
package com.yihu.jw.ehr.util;
import javafx.beans.NamedArg;
import java.io.Serializable;
/**
 * yeshijie
 */
public class Pair<K,V> implements Serializable{
    /**
     * Key of this <code>Pair</code>.
     */
    private K key;
    /**
     * Gets the key for this pair.
     * @return key for this pair
     */
    public K getKey() { return key; }
    /**
     * Value of this this <code>Pair</code>.
     */
    private V value;
    /**
     * Gets the value for this pair.
     * @return value for this pair
     */
    public V getValue() { return value; }
    /**
     * Creates a new pair
     * @param key The key for this pair
     * @param value The value to use for this pair
     */
    public Pair(@NamedArg("key") K key, @NamedArg("value") V value) {
        this.key = key;
        this.value = value;
    }
    /**
     * <p><code>String</code> representation of this
     * <code>Pair</code>.</p>
     *
     * <p>The default name/value delimiter '=' is always used.</p>
     *
     *  @return <code>String</code> representation of this <code>Pair</code>
     */
    @Override
    public String toString() {
        return key + "=" + value;
    }
    /**
     * <p>Generate a hash code for this <code>Pair</code>.</p>
     *
     * <p>The hash code is calculated using both the name and
     * the value of the <code>Pair</code>.</p>
     *
     * @return hash code for this <code>Pair</code>
     */
    @Override
    public int hashCode() {
        // name's hashCode is multiplied by an arbitrary prime number (13)
        // in order to make sure there is a difference in the hashCode between
        // these two parameters:
        //  name: a  value: aa
        //  name: aa value: a
        return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
    }
    /**
     * <p>Test this <code>Pair</code> for equality with another
     * <code>Object</code>.</p>
     *
     * <p>If the <code>Object</code> to be tested is not a
     * <code>Pair</code> or is <code>null</code>, then this method
     * returns <code>false</code>.</p>
     *
     * <p>Two <code>Pair</code>s are considered equal if and only if
     * both the names and values are equal.</p>
     *
     * @param o the <code>Object</code> to test for
     * equality with this <code>Pair</code>
     * @return <code>true</code> if the given <code>Object</code> is
     * equal to this <code>Pair</code> else <code>false</code>
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o instanceof Pair) {
            Pair pair = (Pair) o;
            if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
            if (value != null ? !value.equals(pair.value) : pair.value != null) return false;
            return true;
        }
        return false;
    }
}

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorPrescriptionService.java

@ -231,7 +231,7 @@ public class WlyyDoorPrescriptionService {
            logger.error("当前工单未关联咨询,工单id:" + orderId);
            return result;
        }
        String response = imUtill.sendTopicIM(sendId, sendName, consult.getCode(), contentType, content, null);
        String response = imUtill.sendTopicIM(sendId, sendName, consult.getId(), contentType, content, null);
        JSONObject resObj = JSONObject.parseObject(response);
        if (resObj.getIntValue("status") == -1) {
            logger.error("上门服务工单消息发送失败:" + resObj.getString("message"));

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorServiceOrderService.java

@ -2261,7 +2261,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                WlyyDoorDoctorStatusDO.Status.serving.getType(),
        });
        if (null == doorDoctorStatusDO) {
            String failMsg = "当前派单的医生不存在或禁止接单,doctor:" + doctor;
            String failMsg = "当前派单的医生不存在或禁止接单" ;
            throw new Exception(failMsg);
        }

+ 0 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java

@ -96,7 +96,6 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
        try {
            if (StringUtils.isBlank(doctorId)) {
                doctorId = getUID();
                System.out.println("医生id==>getUID()==>" + getUID());
            }
            List<Map<String, Object>> list = rehabilitationInfoService.getRehabilitationPatientCountNew(doctorId);
            return write(200, "请求成功", "data", list);

+ 3 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java

@ -1288,14 +1288,15 @@ public class RehabilitationInfoService {
//                "		WHEN d.`status`='5' THEN '同步居民失败'\n" +
                "		WHEN d.`status`='7' THEN '已管理'\n" +
                "  END 'statusName',\n" +
                "  d.`status`,count(1) 'count' \n" +
                "  d.`status`,count(DISTINCT p.id) 'count' \n" +
                "FROM\n" +
                "	base_patient p\n" +
                "	INNER JOIN wlyy_rehabilitation_patient_info d ON p.id = d.patient\n" +
                "	LEFT JOIN wlyy_patient_rehabilitation_plan q ON d.`code` = q.patient_info_code \n" +
                "	LEFT JOIN wlyy_rehabilitation_plan_detail pd ON pd.plan_id = q.id " +
                "WHERE\n" +
                "	1 = 1 \n" +
                " 	AND ( d.create_user = '" + doctorId + "'  OR q.plan_doctor='" + doctorId + "' OR ISNULL( d.create_user ) ) \n" +
                " 	AND ( d.create_user = '" + doctorId + "'  OR q.plan_doctor='" + doctorId + "' OR ISNULL( d.create_user ) or pd.doctor='"+doctorId+"' ) \n" +
                "	AND ( ISNULL( d.type ) OR d.type = 2 )\n" +
                "	GROUP BY d.`status`";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);