소스 검색

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 8 년 전
부모
커밋
5cab18f8b6

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 6
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java


+ 44 - 15
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/prescription/Prescription.java

@ -82,6 +82,10 @@ public class Prescription extends IdEntity {
    private String jwDoctorCode; //基卫-开方医生的编码
    private String jwGisterTypeCode;//基卫-挂号类型编码
    private String jwRateTypeCode;//基卫-费别类型编码
    private String jwRegisterFee; //基卫-诊金
    private String prescribeReason; //开方失败/成功原因
    private Date prescribeTime ;//开方失败、成功时间
    @Column(name = "code", unique = true, nullable = false)
    public String getCode() {
@ -348,21 +352,6 @@ public class Prescription extends IdEntity {
        this.prescriptionType = prescriptionType;
    }
    @Transient
    public String getTypeName() {
        switch (type) {
            case 1: {
                return "自取";
            }
            case 2: {
                return "快递配送";
            }
            case 3: {
                return "健管师配送";
            }
        }
        return "";
    }
    @Transient
    public String getStatusName() {
@ -612,4 +601,44 @@ public class Prescription extends IdEntity {
    public void setJwHospital(String jwHospital) {
        this.jwHospital = jwHospital;
    }
    public String getJwRegisterFee() {
        return jwRegisterFee;
    }
    public void setJwRegisterFee(String jwRegisterFee) {
        this.jwRegisterFee = jwRegisterFee;
    }
    @Transient
    public String getDispensaryTypeName() {
        switch (dispensaryType) {
            case 1: {
                return "自取";
            }
            case 2: {
                return "快递配送";
            }
            case 3: {
                return "健管师配送";
            }
        }
        return "";
    }
    public String getPrescribeReason() {
        return prescribeReason;
    }
    public void setPrescribeReason(String prescribeReason) {
        this.prescribeReason = prescribeReason;
    }
    public Date getPrescribeTime() {
        return prescribeTime;
    }
    public void setPrescribeTime(Date prescribeTime) {
        this.prescribeTime = prescribeTime;
    }
}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 36 - 8
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java


+ 16 - 1
patient-co-service/wlyy_service/src/main/resources/application.yml

@ -57,7 +57,7 @@ redisChannel:
---
spring:
  profiles: dev
  profiles: dev1
  datasource:
    url: jdbc:mysql://172.19.103.77:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
    username: root
@ -71,6 +71,21 @@ spring:
    port: 6379 # Redis server port.
#    password: jkzl_ehr
---
spring:
  profiles: dev
  datasource:
    url: jdbc:mysql://172.19.103.85:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
    username: linzhou
    password: linzhou
    driverClassName: com.mysql.jdbc.Driver
    maxTotal: 500
    maxIdle: 30
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
---
spring:
  profiles: test

+ 14 - 14
patient-co-service/wlyy_service/src/main/resources/system.properties

@ -1,18 +1,18 @@
###基卫测试环境服务
#gateway_url = http://117.25.173.18:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicKeyTest.key
#jw_hospital = 350211B1013
#jw_licence = 5YGl5bq45LmL7Lev
gateway_url = http://117.25.173.18:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicKeyTest.key
jw_hospital = 350211B1013
jw_licence = 5YGl5bq45LmL7Lev
##基卫服务
guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
guahao_namespace = http://www.zysoft.com.cn/
gateway_url = http://10.95.21.21:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicGov.key
jw_hospital = 350211B1004
jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
ca_url = http://117.29.183.114:8081/XMCAService?wsdl
ca_namespace = http://platfomservice.xmca.com/
#guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
#guahao_namespace = http://www.zysoft.com.cn/
#gateway_url = http://10.95.21.21:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicGov.key
#jw_hospital = 350211B1004
#jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
#ca_url = http://117.29.183.114:8081/XMCAService?wsdl
#ca_namespace = http://platfomservice.xmca.com/

+ 14 - 22
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -38,10 +38,7 @@ import com.yihu.wlyy.service.app.talk.TalkGroupService;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.service.third.jw.ZyDictService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.ImUtill;
import com.yihu.wlyy.util.MessageType;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
@ -64,11 +61,14 @@ import org.springside.modules.persistence.DynamicSpecifications;
import org.springside.modules.persistence.SearchFilter;
import org.springside.modules.persistence.SearchFilter.Operator;
import org.springside.modules.utils.Clock;
import com.yihu.wlyy.util.CommonUtil;
import javax.annotation.PostConstruct;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * 網絡諮詢类.
 * test
@ -961,7 +961,8 @@ public class ConsultTeamService extends ConsultService {
            JSONObject messages = ImUtill.getCreateTopicMessage(patient, p.getName(), consult.getTitle(), content, consult.getImages(),agent);
            //5、(im创建咨询) 续方咨询的sessionid为居民code+续方code+咨询类型
            JSONObject obj = ImUtill.createTopics(patient + "_" + consult.getCode() + "_" + ct.getType(), consult.getCode(), p.getName(), users, messages, ImUtill.SESSION_TYPE_PRESCRIPTION);
            String sessionId = patient + "_" + consult.getCode() + "_" + ct.getType();
            JSONObject obj = ImUtill.createTopics(sessionId, consult.getCode(), p.getName(), users, messages, ImUtill.SESSION_TYPE_PRESCRIPTION);
            if (obj == null) {
                throw new RuntimeException("IM消息发送异常!");
            }
@ -985,7 +986,7 @@ public class ConsultTeamService extends ConsultService {
            consultTeamDoctorDao.save(cd);
            //7、发送系统消息提示团队长有未审核的消息
            addCheckMessage(prescription);
            addCheckMessage(prescription,sessionId);
            //8、 保存医生咨询信息
            // 添加咨询转发记录
@ -1000,7 +1001,7 @@ public class ConsultTeamService extends ConsultService {
     * 保存审核提醒消息
     * @param prescription
     */
    public void addCheckMessage(Prescription prescription){
    public void addCheckMessage(Prescription prescription,String sessionId){
        Message message = new Message();
        message.setCzrq(new Date());
        message.setCreateTime(new Date());
@ -1017,6 +1018,8 @@ public class ConsultTeamService extends ConsultService {
        message.setDel("1");
        message.setRelationCode(prescription.getConsult());
        message.setPrescriptionStatus("0");
        message.setSessionId(sessionId);
        message.setSessionName(prescription.getPatientName());
        messageDao.save(message);
    }
@ -1076,14 +1079,14 @@ public class ConsultTeamService extends ConsultService {
            prescriptionInfo.setDrugName(info.getString("drugName"));//药品名称
            prescriptionInfo.setDrugRate(info.getString("drugRate"));//吃药频率
            prescriptionInfo.setDrugFormat(info.getString("drugFormat"));//药品规格
            prescriptionInfo.setNum(doubleToInt(info.getDouble("num")));//药品数目
            prescriptionInfo.setPrice(doubleToInt(info.getDouble("price")));//药品单价
            prescriptionInfo.setNum(CommonUtil.doubleToInt(info.getDouble("num")));//药品数目
            prescriptionInfo.setPrice(CommonUtil.doubleToInt(info.getDouble("price")));//药品单价
            prescriptionInfo.setIsRefrigerate(0);//是否冷藏 1是 0否
            prescriptionInfo.setJwSubCode("");//智业子处方号
            prescriptionInfo.setDrugNumUnit(info.getString("drugNumUnit"));//数量单位编码
            prescriptionInfo.setDrugNumUnitName(info.getString("drugNumUnitName"));//数量单位名称
            prescriptionInfo.setCost(doubleToInt(info.getDouble("cost")));//金额
            prescriptionInfo.setCharge(doubleToInt(info.getDouble("charge")));//自付
            prescriptionInfo.setCost(CommonUtil.doubleToInt(info.getDouble("cost")));//金额
            prescriptionInfo.setCharge(CommonUtil.doubleToInt(info.getDouble("charge")));//自付
            prescriptionInfo.setBindFlag(info.getString("bindFlag"));//成组标志, 0.非成组,1.成组
            prescriptionInfo.setDayCount(info.getInteger("dayCount"));//用药天数
            prescriptionInfo.setDrugUsage(info.getString("drugUsage"));//用药方法编码
@ -1134,17 +1137,6 @@ public class ConsultTeamService extends ConsultService {
    }
    /**
     * double*100转int
     * @param d
     * @return
     */
    private Integer doubleToInt(Double d){
        if(d==null){
            return 0;
        }
        return new Double(d*100).intValue();
    }
    /**
     * 发送消息给IM

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.entity.doctor.DoctorMapping;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeam;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
@ -11,6 +12,7 @@ import com.yihu.wlyy.entity.patient.prescription.PrescriptionDiagnosis;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.repository.doctor.DoctorMappingDao;
import com.yihu.wlyy.repository.doctor.DoctorTeamDao;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
@ -61,6 +63,8 @@ public class PrescriptionService extends BaseService {
    private String wechat_base_url;
    @Autowired
    private PrescriptionDispensaryCodeDao prescriptionDispensaryCodeDao;
    @Autowired
    private DoctorTeamDao doctorTeamDao;
    /**
@ -117,6 +121,9 @@ public class PrescriptionService extends BaseService {
                    message.setDel("1");
                    message.setRelationCode(prescription.getCode());
                    message.setPrescriptionStatus("0");//待取药
                    //获取居民团队code
                    DoctorTeam dt = doctorTeamDao.findByParientCode(prescription.getPatient());
                    message.setData(dt.getCode());
                    messageDao.save(message);
                    pushMsgTask.put(expressage.getExpressageCode(), MessageType.MESSAGE_TYPE_PRESCRIPTION_WAIT_TAKE_DRUG.D_P_WRD.name(), MessageType.MESSAGE_TYPE_PRESCRIPTION_WAIT_TAKE_DRUG.续方消息.name(), content, prescription.getCode());

+ 12 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -118,6 +118,18 @@ public class CommonUtil {
        return fileUrls;
    }
    /**
     * double*100转int
     * @param d
     * @return
     */
    public static Integer doubleToInt(Double d){
        if(d==null){
            return 0;
        }
        return new Double(d*100).intValue();
    }
    /**
     * 校验健康指标是否正常
     *