trick9191 il y a 7 ans
Parent
commit
9d855a5401
33 fichiers modifiés avec 1017 ajouts et 427 suppressions
  1. 1 1
      patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/dao/DoctorAdminTeamDao.java
  2. 71 61
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/organization/HospitalMapping.java
  3. 6 22
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/Prescription.java
  4. 4 7
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDispensaryCode.java
  5. 174 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java
  6. 9 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionInfo.java
  7. 20 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java
  8. 2 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionPay.java
  9. 22 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDao.java
  10. 2 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java
  11. 15 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java
  12. 17 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java
  13. 17 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionLogDao.java
  14. 17 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java
  15. 82 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  16. 10 10
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java
  17. 29 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionLogService.java
  18. 29 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionPayService.java
  19. 30 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java
  20. 6 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java
  21. 4 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  22. 1 1
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java
  23. 26 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwSmjkService.java
  24. 31 31
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java
  25. 7 1
      patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java
  26. 26 4
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/WlyySerivceController.java
  27. 21 5
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java
  28. 51 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionLogController.java
  29. 1 1
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/survey/ManagerQuestionnaireController.java
  30. 85 43
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java
  31. 50 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionLogController.java
  32. 12 101
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java
  33. 139 137
      patient-co-wlyy/src/main/resources/system.properties

+ 1 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/dao/DoctorAdminTeamDao.java

@ -19,6 +19,6 @@ public interface DoctorAdminTeamDao extends
    @Query(" from AdminTeam t where length(t.orgCode) = 10")
    @Query(" from AdminTeam t where length(t.orgCode) = 10 and available=true")
    List<AdminTeam> findAllTeam();
    List<AdminTeam> findAllTeam();
}
}

+ 71 - 61
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/organization/HospitalMapping.java

@ -7,6 +7,7 @@ import javax.persistence.Table;
/**
/**
 * 医院映射表
 * 医院映射表
 *
 * @author hzp
 * @author hzp
 */
 */
@ -14,65 +15,74 @@ import javax.persistence.Table;
@Table(name = "wlyy_hospital_mapping")
@Table(name = "wlyy_hospital_mapping")
public class HospitalMapping extends IdEntity {
public class HospitalMapping extends IdEntity {
	// 本地机构代码
	private String code;
	// 机构名称
	private String name;	
	// 对接机构
	private String type;
	// 映射机构代码
	private String mappingCode;
	// 易联众appid
	private String appId;
	// 易联众app secret
	private String appSecret;
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMappingCode() {
		return mappingCode;
	}
	public void setMappingCode(String mappingCode) {
		this.mappingCode = mappingCode;
	}
	public String getAppId() {
		return appId;
	}
	public void setAppId(String appId) {
		this.appId = appId;
	}
	public String getAppSecret() {
		return appSecret;
	}
	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}
    // 本地机构代码
    private String code;
    // 机构名称
    private String name;
    // 对接机构
    private String type;
    // 映射机构代码
    private String mappingCode;
    // 易联众appid
    private String appId;
    // 易联众app secret
    private String appSecret;
    //机构编码号(来自基卫)
    private String sbCode;
    public String getSbCode() {
        return sbCode;
    }
    public void setSbCode(String sbCode) {
        this.sbCode = sbCode;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getMappingCode() {
        return mappingCode;
    }
    public void setMappingCode(String mappingCode) {
        this.mappingCode = mappingCode;
    }
    public String getAppId() {
        return appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getAppSecret() {
        return appSecret;
    }
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }
}
}

+ 6 - 22
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/Prescription.java

@ -28,10 +28,10 @@ public class Prescription extends IdEntity {
    private String patient;                  //关联 wlyy_patient code
    private String patient;                  //关联 wlyy_patient code
    private String patientName;             //患者名称
    private String patientName;             //患者名称
    private Integer type;                    //1 处方 2 续方
    private Integer type;                    //1 处方 2 续方
    private Integer status;                  //状态 (1 审核不通过 , 0 审核中, 10 待支付 , 20 配药中, 21 等待领药 ,30 配送中 ,100已完成)
    private Integer status;                  //状态 (-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,21支付失败  20 配药中/支付成功, 21 等待领药 ,30 配送中 ,100配送成功/已完成)
    private String doctor;                   //开处方的医生code 关联 wlyy_doctor
    private String doctor;                   //开处方的医生code 关联 wlyy_doctor
    private String doctorName;               //医生名称
    private String doctorName;               //医生名称
    private Integer adminTeamId;             //患者签约的行政团队
    private Long adminTeamId;             //患者签约的行政团队
    private String hospital;                  //医院 关联 dm_hospital code
    private String hospital;                  //医院 关联 dm_hospital code
    private String hospitalName;              //医院 关联 dm_hospital name
    private String hospitalName;              //医院 关联 dm_hospital name
    private String dept;                       //科室code
    private String dept;                       //科室code
@ -48,8 +48,8 @@ public class Prescription extends IdEntity {
    private String caMessage;                   //ca指纹信息
    private String caMessage;                   //ca指纹信息
    private String remark;                     //处方备注
    private String remark;                     //处方备注
    private String reason;                      //续方原因
    private String reason;                      //续方原因
    private Double ybCost;                      //医保费用
    private Double myCost;                      //自己付费
//    private Double ybCost;                      //医保费用
//    private Double myCost;                      //自己付费
    @Column(name = "code", unique = true, nullable = false)
    @Column(name = "code", unique = true, nullable = false)
    public String getCode() {
    public String getCode() {
@ -184,11 +184,11 @@ public class Prescription extends IdEntity {
    }
    }
    @Column(name = "admin_team_id")
    @Column(name = "admin_team_id")
    public Integer getAdminTeamId() {
    public Long getAdminTeamId() {
        return adminTeamId;
        return adminTeamId;
    }
    }
    public void setAdminTeamId(Integer adminTeamId) {
    public void setAdminTeamId(Long adminTeamId) {
        this.adminTeamId = adminTeamId;
        this.adminTeamId = adminTeamId;
    }
    }
@ -307,20 +307,4 @@ public class Prescription extends IdEntity {
    public void setCaCertData(String caCertData) {
    public void setCaCertData(String caCertData) {
        this.caCertData = caCertData;
        this.caCertData = caCertData;
    }
    }
    public Double getYbCost() {
        return ybCost;
    }
    public void setYbCost(Double ybCost) {
        this.ybCost = ybCost;
    }
    public Double getMyCost() {
        return myCost;
    }
    public void setMyCost(Double myCost) {
        this.myCost = myCost;
    }
}
}

+ 4 - 7
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDispensaryCode.java

@ -19,7 +19,6 @@ public class PrescriptionDispensaryCode extends IdEntity{
    private String code;                    //年月日8位数字+6位随机数字
    private String code;                    //年月日8位数字+6位随机数字
    private String prescriptionCode;      //处方code  关联表wlyy_prescription code
    private String prescriptionCode;      //处方code  关联表wlyy_prescription code
    private Date createTime;               //创建时间
    private Date createTime;               //创建时间
    private Date outTime;                  //过期时间
    private Integer type;                   //编码类型:1 居民取药码 2 配送员(健管师)取药码
    private Integer type;                   //编码类型:1 居民取药码 2 配送员(健管师)取药码
    @Column(name = "code", unique = true , nullable=false)
    @Column(name = "code", unique = true , nullable=false)
@ -50,13 +49,11 @@ public class PrescriptionDispensaryCode extends IdEntity{
        this.createTime = createTime;
        this.createTime = createTime;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "out_time")
    public Date getOutTime() {
        return outTime;
    public Integer getType() {
        return type;
    }
    }
    public void setOutTime(Date outTime) {
        this.outTime = outTime;
    public void setType(Integer type) {
        this.type = type;
    }
    }
}
}

+ 174 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java

@ -0,0 +1,174 @@
package com.yihu.wlyy.entity.patient.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Administrator on 2017/7/21.
 * 处方配送
 */
@Entity
@Table(name = "wlyy_prescription_expressage")
public class PrescriptionExpressage extends IdEntity{
    private String code;                    //业务code
    private String prescriptionCode;      //处方code  关联表wlyy_prescription code
    private String name;                    //收货人名称
    private String mobile;                  //收货人手机号码
    private String phone;                   //收货人座机号
    private String address;                 //收货人详细地址
    private String provinceCode;           //省代码
    private String provinceName;           //省名称
    private String cityCode;                //市代码
    private String cityName;                //市名称
    private String townCode;                //区代码
    private String townName;                //区名称
    private String streetCode;              //街道代码
    private String streetName;              //街道名称
    private String hospitalName;            //如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
    private Double price;                    //快递的配送费用
    private Date createTime;                //创建的时间
    @Column(name = "code", unique = true , nullable=false)
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getPrescriptionCode() {
        return prescriptionCode;
    }
    public void setPrescriptionCode(String prescriptionCode) {
        this.prescriptionCode = prescriptionCode;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
    public String getStreetCode() {
        return streetCode;
    }
    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }
    public String getStreetName() {
        return streetName;
    }
    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    public Double getPrice() {
        return price;
    }
    public void setPrice(Double price) {
        this.price = price;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 9 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionInfo.java

@ -26,6 +26,7 @@ public class PrescriptionInfo extends IdEntity{
    private Integer isRefrigerate;         //是否冷藏 1是 0否
    private Integer isRefrigerate;         //是否冷藏 1是 0否
    private String direction;               //药品用法
    private String direction;               //药品用法
    private Double price;                    //药品价格
    private Double price;                    //药品价格
    private Integer del;               //1可用 0删除 不填数据库默认是1
    @Column(name = "code",unique = true , nullable=false)
    @Column(name = "code",unique = true , nullable=false)
    public String getCode() {
    public String getCode() {
@ -110,4 +111,12 @@ public class PrescriptionInfo extends IdEntity{
    public void setPrice(Double price) {
    public void setPrice(Double price) {
        this.price = price;
        this.price = price;
    }
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}
}

+ 20 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java

@ -14,12 +14,22 @@ import java.util.Date;
 */
 */
@Entity
@Entity
@Table(name = "wlyy_prescription_log")
@Table(name = "wlyy_prescription_log")
public class PrescriptionLog extends IdEntity{
public class PrescriptionLog extends IdEntity {
    public final static class PrescriptionLogType {
        static public Integer zy = 1; //智业对接
        static public Integer ylz = 2;  //易联众对接
        static public Integer create = 3;   //创建处方
        static public Integer reviewed  = 4;    //审核
        static public Integer pay = 5;  //支付
        static public Integer expressage = 6;   //配送
        static public Integer finish = 7;   //已完成
    }
    private String code;                    //业务流程
    private String code;                    //业务流程
    private String prescriptionCode;      //处方code 关联表wlyy_prescription code
    private String prescriptionCode;      //处方code 关联表wlyy_prescription code
    private Date createTime;               //处方创建时间
    private Date createTime;               //处方创建时间
    private Integer type;                    //-1与智业对接的日志   11 创建处方  12 审核成功 13 审核失败 20等待付款 21 付款成功 22付款失败  30等待配药 31配药成功 40开始配送 41配送员已领药 42配送员送达  100处方完成
    private Integer status;                  //状态 (-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,21支付失败  20 配药中/支付成功, 21 等待领药 ,30 配送中 ,100配送成功/已完成)
    private Integer type;                //类型: 1智业对接 2易联众对接  3创建处方 4 审核  5付款 6 配送 7完成
    private String userCode;                  //医生或者患者code
    private String userCode;                  //医生或者患者code
    private String userName;                  //医生或者患者name
    private String userName;                  //医生或者患者name
    private Integer userType;                 //1 患者 2医生
    private Integer userType;                 //1 患者 2医生
@ -107,4 +117,12 @@ public class PrescriptionLog extends IdEntity{
    public void setRemark(String remark) {
    public void setRemark(String remark) {
        this.remark = remark;
        this.remark = remark;
    }
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
}
}

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionPay.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.entity.patient.prescription;
package com.yihu.wlyy.entity.patient.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Entity;
@ -47,6 +48,7 @@ public class PrescriptionPay extends IdEntity {
        this.prescriptionCode = prescriptionCode;
        this.prescriptionCode = prescriptionCode;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
    public Date getCreateTime() {
        return createTime;
        return createTime;
    }
    }

+ 22 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDao.java

@ -0,0 +1,22 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionDao extends PagingAndSortingRepository<Prescription, Long>, JpaSpecificationExecutor<Prescription> {
    @Query("from Prescription p where p.code=?1")
    Prescription findByCode(String prescriptionCode);
    @Modifying
    @Query("update Prescription p set p.status=?2 where p.code=?1")
    void updateStatus(String prescriptionCode,Integer status);
}

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java

@ -10,6 +10,8 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 * 处方取码
 * 处方取码
 */
 */
public interface PrescriptionDispensaryCodeDao extends PagingAndSortingRepository<PrescriptionDispensaryCode, Long>, JpaSpecificationExecutor<PrescriptionDispensaryCode> {
public interface PrescriptionDispensaryCodeDao extends PagingAndSortingRepository<PrescriptionDispensaryCode, Long>, JpaSpecificationExecutor<PrescriptionDispensaryCode> {
    @Query("from PrescriptionDispensaryCode where code=?1")
    PrescriptionDispensaryCode finByCode(String code);
//    @Query("select  count(1) from wlyy_prescription_dispensary_code p1 \n" +
//    @Query("select  count(1) from wlyy_prescription_dispensary_code p1 \n" +
//            "LEFT JOIN wlyy_prescription p2 on p1.prescription_Code = p2.code where p2.status in(21,20,100) and p2.patient =?1 ")
//            "LEFT JOIN wlyy_prescription p2 on p1.prescription_Code = p2.code where p2.status in(21,20,100) and p2.patient =?1 ")

+ 15 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java

@ -0,0 +1,15 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionExpressageDao extends PagingAndSortingRepository<PrescriptionExpressage, Long>, JpaSpecificationExecutor<PrescriptionExpressage> {
    @Query("from PrescriptionExpressage p where p.prescriptionCode=?1")
    PrescriptionExpressage findByPrescriptionPay(String prescriptionCode);
}

+ 17 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java

@ -0,0 +1,17 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionInfoDao extends PagingAndSortingRepository<PrescriptionInfo, Long>, JpaSpecificationExecutor<PrescriptionInfo> {
    @Query("from PrescriptionInfo p where p.prescriptionCode=?1 and p.del=1")
    List<PrescriptionInfo> findByPrescriptionCode(String prescriptionCode);
}

+ 17 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionLogDao.java

@ -0,0 +1,17 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDispensaryCode;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionLogDao extends PagingAndSortingRepository<PrescriptionLog, Long>, JpaSpecificationExecutor<PrescriptionLog> {
    @Query("from PrescriptionLog l where l.prescriptionCode=?1 and l.type in ?2 order by createTime desc")
    List<PrescriptionLog> findPrescriptionLogsByPrescriptionCode(String prescriptionCode, Integer[] types);
}

+ 17 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java

@ -0,0 +1,17 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionPayDao extends PagingAndSortingRepository<PrescriptionPay, Long>, JpaSpecificationExecutor<PrescriptionPay> {
    @Query("from PrescriptionPay p where p.prescriptionCode=?1 ")
    PrescriptionPay findByPrescriptionPay(String prescriptionCode);
}

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

@ -0,0 +1,82 @@
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.entity.patient.prescription.*;
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
import com.yihu.wlyy.repository.prescription.PrescriptionDispensaryCodeDao;
import com.yihu.wlyy.repository.prescription.PrescriptionExpressageDao;
import com.yihu.wlyy.repository.prescription.PrescriptionLogDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
/**
 * Created by chenweida on 2017/7/27.
 * 订单相关
 */
@Service
public class PrescriptionExpressageService {
    @Autowired
    private PrescriptionExpressageDao prescriptionExpressageDao;
    @Autowired
    private PrescriptionDispensaryCodeDao prescriptionDispensaryCodeDao;
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
    /**
     * 获取处方配送信息信息
     *
     * @param prescriptionCode 处方code
     * @return
     */
    public PrescriptionExpressage findByPrescriptionCode(String prescriptionCode) {
        return prescriptionExpressageDao.findByPrescriptionPay(prescriptionCode);
    }
    /**
     * 确认配送成功
     *
     * @param code
     */
    @Transactional
    public Integer expressage(String code, String userCode) throws Exception {
        //获取根据wlyy_prescription_dispensary_code的code处方编码
        PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeDao.finByCode(code);
        if (prescriptionDispensaryCode == null) {
            //保存配送失败的日志
            PrescriptionLog prescriptionLog = new PrescriptionLog();
            prescriptionLog.setCode(UUID.randomUUID().toString());
            prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
            prescriptionLog.setCreateTime(new Date());
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage);
            prescriptionLog.setFlag(1);
            prescriptionLog.setUserCode(userCode);
            prescriptionLog.setUserType(2);
            prescriptionLog.setType(42);
            prescriptionLog.setRemark("配送失败,处方编码不存在");
            prescriptionLogDao.save(prescriptionLog);
            return -1;
        }
        //修改处方状态为完成
        prescriptionDao.updateStatus(prescriptionDispensaryCode.getPrescriptionCode(),100);
        //保存配送成功的日志
        PrescriptionLog prescriptionLog = new PrescriptionLog();
        prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
        prescriptionLog.setCode(UUID.randomUUID().toString());
        prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage);
        prescriptionLog.setCreateTime(new Date());
        prescriptionLog.setFlag(1);
        prescriptionLog.setUserCode(userCode);
        prescriptionLog.setUserType(2);
        prescriptionLog.setType(100);
        prescriptionLogDao.save(prescriptionLog);
        return 1;
    }
}

+ 10 - 10
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -1,26 +1,26 @@
package com.yihu.wlyy.service.app.prescription;
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.repository.dict.SystemDictDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.BaseService;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
/**
 * Created by Trick on 2017/7/25.
 * Created by Trick on 2017/7/25.
 */
 */
@Service
@Service
@Transactional
@Transactional
public class PrescriptionInfoService extends BaseService {
public class PrescriptionInfoService extends BaseService {
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    /**
     * 获取处方下的详细药品
     * @param prescriptionCode
     * @return
     */
    public List<PrescriptionInfo> getPrescriptionInfo(String prescriptionCode) {
        return prescriptionInfoDao.findByPrescriptionCode(prescriptionCode);
    }
    @Autowired
    @Autowired
    private SystemDictDao systemDictDao;
    private SystemDictDao systemDictDao;

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

@ -0,0 +1,29 @@
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.repository.prescription.PrescriptionLogDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
@Service
public class PrescriptionLogService extends BaseService {
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    /**
     * 根据处方code 和 types查询处方的流程日志 时间倒叙
     *
     * @param prescriptionCode 处方code
     * @param types            需要查询的types
     * @return
     */
    public List<PrescriptionLog> findPrescriptionLogsByPrescriptionCode(String prescriptionCode, Integer[] types) {
        return prescriptionLogDao.findPrescriptionLogsByPrescriptionCode(prescriptionCode, types);
    }
}

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

@ -0,0 +1,29 @@
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.repository.prescription.PrescriptionLogDao;
import com.yihu.wlyy.repository.prescription.PrescriptionPayDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 * 处方支付相关
 */
@Service
public class PrescriptionPayService extends BaseService {
    @Autowired
    private PrescriptionPayDao prescriptionPayDao;
    /**
     *  获取处方支付信息
     * @param prescriptionCode 处方code
     * @return
     */
    public PrescriptionPay findByPrescriptionCode(String prescriptionCode) {
        return prescriptionPayDao.findByPrescriptionPay(prescriptionCode);
    }
}

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

@ -0,0 +1,30 @@
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
import com.yihu.wlyy.repository.prescription.PrescriptionLogDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
@Service
public class PrescriptionService extends BaseService {
    @Autowired
    private PrescriptionDao prescriptionDao;
    /**
     *  获取处方信息
     * @param prescriptionCode 处方code
     * @return
     */
    public Prescription findByCode(String prescriptionCode) {
        return prescriptionDao.findByCode(prescriptionCode);
    }
}

+ 6 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -1106,6 +1106,7 @@ public class FamilyContractService extends BaseService {
            json.put("remark", ""); //您好,您成功签约家庭医生
            json.put("remark", ""); //您好,您成功签约家庭医生
//            添加签约code by wjj  2017.7.18
//            添加签约code by wjj  2017.7.18
            json.put("signCode", signCode);
            json.put("signCode", signCode);
            json.put("agent", "0");
            if (StringUtils.isNotBlank(sf.getOpenid())) {
            if (StringUtils.isNotBlank(sf.getOpenid())) {
                // 添加到发送队列
                // 添加到发送队列
                PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
                PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
@ -1130,7 +1131,9 @@ public class FamilyContractService extends BaseService {
                    Patient member = (Patient) j.get("member");
                    Patient member = (Patient) j.get("member");
                    JSONObject data = json;
                    JSONObject data = json;
                    data.remove("toUser");
                    data.remove("toUser");
                    data.remove("agent");
                    data.put("toUser",member.getCode());
                    data.put("toUser",member.getCode());
                    data.put("agent","1");
                    //String first = (String) json.get("first");
                    //String first = (String) json.get("first");
                    data.remove("first");
                    data.remove("first");
                    data.put("first",weiXinOpenIdUtils.getTitleMes(patient,j.getInt("relation"),patient.getName()));
                    data.put("first",weiXinOpenIdUtils.getTitleMes(patient,j.getInt("relation"),patient.getName()));
@ -1445,6 +1448,7 @@ public class FamilyContractService extends BaseService {
            json.put("remark", ""); //您好,您成功签约家庭医生
            json.put("remark", ""); //您好,您成功签约家庭医生
//            添加签约code by wjj 2017.7.18
//            添加签约code by wjj 2017.7.18
            json.put("signCode",sf.getCode()); //签约code
            json.put("signCode",sf.getCode()); //签约code
            json.put("agent","0"); //是否是代理 否
            // 添加到发送队列
            // 添加到发送队列
            if (StringUtils.isNotBlank(sf.getOpenid())) {
            if (StringUtils.isNotBlank(sf.getOpenid())) {
                PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
                PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
@ -1467,7 +1471,9 @@ public class FamilyContractService extends BaseService {
                    Patient member = (Patient) j.get("member");
                    Patient member = (Patient) j.get("member");
                    JSONObject data = json;
                    JSONObject data = json;
                    data.remove("toUser");
                    data.remove("toUser");
                    data.remove("agent");
                    data.put("toUser",member.getCode());
                    data.put("toUser",member.getCode());
                    data.put("agent","1");
                    //String first = (String) json.get("first");
                    //String first = (String) json.get("first");
                    data.remove("first");
                    data.remove("first");
                    data.put("first",weiXinOpenIdUtils.getTitleMes(p,j.getInt("relation"),p.getName()));
                    data.put("first",weiXinOpenIdUtils.getTitleMes(p,j.getInt("relation"),p.getName()));

+ 4 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -507,6 +507,8 @@ public class SignWebService extends BaseService {
            jsonObject.put("doctorName", renew.getDoctorName());
            jsonObject.put("doctorName", renew.getDoctorName());
            jsonObject.put("doctorHealthName", renew.getDoctorHealthName());
            jsonObject.put("doctorHealthName", renew.getDoctorHealthName());
            jsonObject.put("expensesStatus", StringUtils.isNotBlank(renew.getExpensesStatus()) ? renew.getExpensesStatus() : "1");
            jsonObject.put("expensesStatus", StringUtils.isNotBlank(renew.getExpensesStatus()) ? renew.getExpensesStatus() : "1");
//            新增支付成功的支付流水号
            jsonObject.put("medicalInsuranceNum", renew.getMedicalInsuranceNum());
            jsonObject.put("applyDate", renew.getApplyDate());
            jsonObject.put("applyDate", renew.getApplyDate());
            jsonObject.put("createTime", renew.getCzrq());
            jsonObject.put("createTime", renew.getCzrq());
            jsonObject.put("type", renew.getType());
            jsonObject.put("type", renew.getType());
@ -576,6 +578,8 @@ public class SignWebService extends BaseService {
            jsonObject.put("doctorName", signFamily.getDoctorName());
            jsonObject.put("doctorName", signFamily.getDoctorName());
            jsonObject.put("doctorHealthName", signFamily.getDoctorHealthName());
            jsonObject.put("doctorHealthName", signFamily.getDoctorHealthName());
            jsonObject.put("expensesStatus", StringUtils.isNotBlank(signFamily.getExpensesStatus()) ? signFamily.getExpensesStatus() : "1");
            jsonObject.put("expensesStatus", StringUtils.isNotBlank(signFamily.getExpensesStatus()) ? signFamily.getExpensesStatus() : "1");
            //            新增支付成功的支付流水号
            jsonObject.put("medicalInsuranceNum", signFamily.getMedicalInsuranceNum());
            jsonObject.put("applyDate", signFamily.getApplyDate());
            jsonObject.put("applyDate", signFamily.getApplyDate());
            jsonObject.put("createTime", signFamily.getCzrq());
            jsonObject.put("createTime", signFamily.getCzrq());
            jsonObject.put("type", signFamily.getType());
            jsonObject.put("type", signFamily.getType());

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java

@ -1664,7 +1664,7 @@ public class ManagerQuestionnaireService extends BaseService {
        if (StringUtils.isNotEmpty(ser)) {
        if (StringUtils.isNotEmpty(ser)) {
            str += " AND ( " + ser.substring(0, ser.lastIndexOf("OR")) + " ) ";
            str += " AND ( " + ser.substring(0, ser.lastIndexOf("OR")) + " ) ";
        }
        }
        str += " )tt WHERE lb.patient=tt.patient ";
        str += " )tt WHERE lb.`status` = 1 AND lb.patient=tt.patient ";
        JSONArray healthCondition = jsonObject.getJSONArray("healthCondition");
        JSONArray healthCondition = jsonObject.getJSONArray("healthCondition");
        String healSql = "";
        String healSql = "";

+ 26 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwSmjkService.java

@ -1041,4 +1041,30 @@ public class JwSmjkService {
            return resultArray.toString();
            return resultArray.toString();
        }
        }
    }
    }
    /**
     * 获取转诊预约医生列表
     * @param orgCode   机构编码
     * @param deptCode  科室编码
     * @param strCredential 身份证据
     * @return
     */
    public String getRegDeptSpeDoctorList(String orgCode, String deptCode, String strCredential) {
        String url = jwUrl + "/third/smjk/RegDeptSpeDoctorList";
        List<NameValuePair> params = new ArrayList<>();
        //当前时间;
        String strStart = DateUtil.getStringDateShort();
        //10天预约
        String strEnd = DateUtil.getNextDay(strStart, 11);
        params.add(new BasicNameValuePair("orgCode", orgCode));
        params.add(new BasicNameValuePair("deptCode", deptCode));
        params.add(new BasicNameValuePair("strStart", strStart));
        params.add(new BasicNameValuePair("strEnd", strEnd));
        params.add(new BasicNameValuePair("strCredential", strCredential));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        return response;
    }
}
}

+ 31 - 31
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java

@ -179,20 +179,22 @@ public class OnePayService {
    /**
    /**
     * 家庭医生签约支付
     * 家庭医生签约支付
     */
     */
    public String charge(String orgCode, String chargeType, String chargeRelation, Integer totalAmount, String feeDetail, String patient, String openid,String accessToken) throws Exception {
    public String charge(String orgCode, String chargeType, String chargeRelation, Integer totalAmount, String patient, String openid,String accessToken) throws Exception {
        //获取机构映射
        //获取机构映射
        HospitalMapping hos = hospitalMappingDao.findByCode(orgCode);
        HospitalMapping hos = hospitalMappingDao.findByCode(orgCode);
        if (hos == null) {
        if (hos == null) {
            throw new Exception("no hospital mapping!");
            throw new Exception("no hospital mapping!");
        }
        }
        return charge(orgCode, hos.getName(), hos.getAppId(), hos.getAppSecret(), chargeType, chargeRelation, totalAmount, feeDetail, patient, openid,accessToken);
//        return charge(orgCode, hos.getName(), hos.getAppId(), hos.getAppSecret(),hos.getSbCode(), chargeType, chargeRelation, totalAmount,patient, openid,accessToken);
//        对应机构的APPID和appsecret
//        return charge(orgCode, hos.getName(), "54BBAF5148521AC9E053F000660AC502", "54BBAF5148531AC9E053F000660AC502",hos.getSbCode(), chargeType, chargeRelation, totalAmount,patient, openid,accessToken);
        return charge(orgCode, hos.getName(), "54BBAF5148521AC9E053F000660AC502", "54BBAF5148531AC9E053F000660AC502","0380", chargeType, chargeRelation, totalAmount,patient, openid,accessToken);
    }
    }
    /**
    /**
     * 家庭医生签约支付,成功则返回支付路径
     * 家庭医生签约支付,成功则返回支付路径
     */
     */
    private String charge(String orgCode, String orgName, String appId, String appSecret, String chargeType, String chargeRelation, Integer totalAmount, String feeDetail, String patient, String openid,String accessToken) throws Exception {
    private String charge(String orgCode, String orgName, String appId, String appSecret,String sbCode, String chargeType, String chargeRelation, Integer totalAmount,String patient, String openid,String accessToken) throws Exception {
        Boolean isSuccess = true;
        Boolean isSuccess = true;
        String msgBody = "";
        String msgBody = "";
        String response = "";
        String response = "";
@ -220,10 +222,6 @@ public class OnePayService {
            charge.setMerchName(orgName);
            charge.setMerchName(orgName);
            charge.setSubject(subject);
            charge.setSubject(subject);
            charge.setTotalAmount(totalAmount);  //  交易总金额
            charge.setTotalAmount(totalAmount);  //  交易总金额
//            charge.setSelfpayAmount(selfpayAmount);  //  自费金额
//            charge.setInsuranceAmount(insuranceAmount);  //  医保支付金额
//            charge.setFinancialAmount(financialAmount);  //  财政补贴金额
            charge.setFeeDetail(feeDetail);  //  费用明细
            BindCard card = ownerCard(openid);
            BindCard card = ownerCard(openid);
            String name = card.getAttachName();
            String name = card.getAttachName();
@ -260,14 +258,10 @@ public class OnePayService {
            params.put("idType", idType);
            params.put("idType", idType);
            params.put("idNo", idNo);
            params.put("idNo", idNo);
            params.put("totalAmount", totalAmount);   //交易总金额
            params.put("totalAmount", totalAmount);   //交易总金额
//            params.put("selfpayAmount",selfpayAmount);   //自费金额
//            params.put("insuranceAmount",insuranceAmount);   //医保支付金额
//            params.put("financialAmount",financialAmount);   //财政补贴金额
//            params.put("returnUrl","https://mp.weixin.qq.com/insurance/pay/detail");   //页面跳转地址
            Properties systemConf = SystemConf.getInstance().getSystemProperties();
            Properties systemConf = SystemConf.getInstance().getSystemProperties();
            String returnUrl = systemConf.getProperty("return_url");
            String returnUrl = systemConf.getProperty("return_url");
            returnUrl = returnUrl.replace("{server}", systemConf.getProperty("server_url"));
            params.put("returnUrl",returnUrl);   //页面跳转地址
            params.put("returnUrl",returnUrl);   //页面跳转地址
            params.put("feeDetail", feeDetail);   //费用明细
            params.put("channel", channel);  //微信医保支付
            params.put("channel", channel);  //微信医保支付
            params.put("merchName", orgName);  //收款单位名称
            params.put("merchName", orgName);  //收款单位名称
            params.put("subject", subject);  //订单名称
            params.put("subject", subject);  //订单名称
@ -282,35 +276,37 @@ public class OnePayService {
//                //签约人Code
//                //签约人Code
                String signDoctorCode = signFamily.getSignDoctorCode();
                String signDoctorCode = signFamily.getSignDoctorCode();
                String people = signFamily.getPatient();
                String people = signFamily.getPatient();
//                Doctor doctor = doctorDao.findByCode(signDoctorCode);
                Doctor doctor = doctorDao.findByCode(signDoctorCode);
                Patient user = patientDao.findByCode(people);
                Patient user = patientDao.findByCode(people);
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                Map<String, String> familyContent = new HashMap<>();
                Map<String, String> familyContent = new HashMap<>();
                familyContent.put("moRegNo", chargeRelation);//医院签约号
                familyContent.put("moRegName",signFamily.getName()); //签约人姓名
                familyContent.put("moRegNo", "1481497932");//医院签约号限长20
//                familyContent.put("moRegName",signFamily.getName()); //签约人姓名
                familyContent.put("moRegName","林逸祥"); //签约人姓名
                familyContent.put("moRegAddr",user.getAddress() ); //签约人地址
                familyContent.put("moRegAddr",user.getAddress() ); //签约人地址
                familyContent.put("moRegTelephone", signFamily.getMobile());//签约人联系电话
                familyContent.put("moRegTelephone", signFamily.getMobile());//签约人联系电话
                familyContent.put("moRegOrgNo", signFamily.getHospital()); //签约机构
                familyContent.put("moRegDocNo", signFamily.getSignDoctorCode());//签约医生编号
                familyContent.put("moRegOrgNo", sbCode); //签约机构 限长4
                familyContent.put("moRegDocNo", doctor.getIdcard());//签约医生编号 限长18 身份证号
                familyContent.put("moRegDocName", signFamily.getSignDoctorName()); //签约医生姓名
                familyContent.put("moRegDocName", signFamily.getSignDoctorName()); //签约医生姓名
                familyContent.put("moRegTime", sdf.format(signFamily.getBegin())); //签约时间
                familyContent.put("moRegTime", sdf.format(signFamily.getBegin())); //签约时间
                familyContent.put("moRegEndTime", sdf.format(signFamily.getEnd())); //签约截止时间
                familyContent.put("moRegEndTime", sdf.format(signFamily.getEnd())); //签约截止时间
//            familyContent.put("moRegYear", "04");//签约年度
//            familyContent.put("moRegYear", "04");//签约年度
                familyContent.put("moRegTear", signFamily.getSignYear());//签约年度
                familyContent.put("moRegTear", signFamily.getSignYear());//签约年度
                familyContent.put("moRegSource", signFamily.getSignSource()); //签约来源
                familyContent.put("moRegSource", signFamily.getSignSource()); //签约来源
                familyContent.put("moCollectOrgNo", "03"); //扣费机构
                familyContent.put("moCollectorNo", "04");//扣费人
                familyContent.put("benefitType", signFamily.getExpensesType()); //补贴类型
                familyContent.put("moBookOrgNo", "05");//登记机构
                familyContent.put("moBookerNo", "06"); //登记人
                familyContent.put("moBookTime", "07"); //登记时间
                familyContent.put("moCollectOrgNo", sbCode); //扣费机构 签约机构
                familyContent.put("moCollectorNo", signFamily.getSignDoctorName());//扣费人 签约医生姓名
                familyContent.put("benefitType", signFamily.getExpensesType() ); //补贴类型
                familyContent.put("moBookOrgNo", sbCode);//登记机构 签约机构
                familyContent.put("moBookerNo", signFamily.getSignDoctorName()); //登记人 签约医生姓名
                familyContent.put("moBookTime", sdf.format(signFamily.getBegin())); //登记时间 签约时间
                params.put("familyContent", objectMapper.writeValueAsString(familyContent));// 家庭医生签约信息
                params.put("familyContent", objectMapper.writeValueAsString(familyContent));// 家庭医生签约信息
            }
            }
            //请求结构体
            //请求结构体
            Map<String, String> map = new HashMap<>();
            Map<String, String> map = new HashMap<>();
            map.put("feeType", "04");//家庭医生签约
            map.put("feeType", "04");//家庭医生签约
            map.put("settleType", "02"); //健康账户支付
            map.put("settleType", "03"); //健康账户支付
            params.put("requestContent", objectMapper.writeValueAsString(map));// 请求结构体
            params.put("requestContent", objectMapper.writeValueAsString(map));// 请求结构体
            requestParams.setParam(params);
            requestParams.setParam(params);
            msgBody = JSON.toJSONString(requestParams);
            msgBody = JSON.toJSONString(requestParams);
@ -322,11 +318,9 @@ public class OnePayService {
                JSONObject json = res.getParam();
                JSONObject json = res.getParam();
                String chargeNo = String.valueOf(json.get("chargeNo"));      //医保结算业务流水号
                String chargeNo = String.valueOf(json.get("chargeNo"));      //医保结算业务流水号
                result = String.valueOf(json.get("payUrl"));
                result = String.valueOf(json.get("payUrl"));
//                charge.setTradeStatus("0");//交易状态0 成功 1 失败 2 已退款
                charge.setChargeNo(chargeNo);
                charge.setChargeNo(chargeNo);
            } else {
            } else {
//                charge.setTradeStatus("1");
                isSuccess = false;
                isSuccess = false;
                error = "请求失败,返回结果:" + res.getRespCode() + "," + res.getRespMsg();
                error = "请求失败,返回结果:" + res.getRespCode() + "," + res.getRespMsg();
            }
            }
@ -361,15 +355,21 @@ public class OnePayService {
        String error = "";
        String error = "";
        Charge result = null;
        Charge result = null;
        String appId = config.getOnepayAppId();
        String appSecret = config.getOnepayAppSecret();
        OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), appId, appSecret, signType, encryptType);
//        String appId = config.getOnepayAppId();
//        String appSecret = config.getOnepayAppSecret();
//        OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), appId, appSecret, signType, encryptType);
//        WlyyCharge charge = chargeDao.findByCode(code);
//        HospitalMapping hospitalMapping = hospitalMappingDao.findByCode(charge.getHospital());
//        OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), hospitalMapping.getAppId(), hospitalMapping.getAppSecret(), signType, encryptType);
        OnepayDefaultClient onepayClient = new OnepayDefaultClient(config.getOnepayApi(), "54BBAF5148521AC9E053F000660AC501", "54BBAF5148531AC9E053F000660AC501", signType, encryptType);
        try {
        try {
            RequestParams requestParams = new RequestParams();
            RequestParams requestParams = new RequestParams();
//            requestParams.setVersion();
//            requestParams.setVersion();
//            requestParams.setSign();
//            requestParams.setSign();
//            requestParams.setEncryptData();
//            requestParams.setEncryptData();
            requestParams.setAppId(appId);
//            requestParams.setAppId(appId);
//            requestParams.setAppId(hospitalMapping.getAppId());
            requestParams.setAppId("54BBAF5148521AC9E053F000660AC501");
            requestParams.setTimestamp(DateUtil.getCurrentDateTime());
            requestParams.setTimestamp(DateUtil.getCurrentDateTime());
            requestParams.setSignType(signType);
            requestParams.setSignType(signType);
            requestParams.setEncryptType(encryptType);
            requestParams.setEncryptType(encryptType);

+ 7 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -285,7 +285,13 @@ public class PushMsgTask {
                if(json.has("isRenew")&&type==2){
                if(json.has("isRenew")&&type==2){
                    //如果续签失败,不发送详情
                    //如果续签失败,不发送详情
                }else{
                }else{
                    temp.setUrl(url + "ssgg/html/doctor-homepage-new.html?openid=" + openid + "&state=" + json.getString("doctor") + "&toUser=" + json.getString("toUser") + "&toName=" + name+"&isRenew="+isRenew+"&signState="+signState+"&represented="+json.getString("represented")+"&signCode"+json.getString("signCode"));
                    if (json.has("agent")&&("1".equals(json.getString("agent")))){
//                        发送给授权代理人
                        temp.setUrl(url + "ssgg/html/doctor-homepage-new.html?openid=" + openid + "&state=" + json.getString("doctor") + "&toUser=" + json.getString("toUser") + "&toName=" + name+"&isRenew="+isRenew+"&signState="+signState+"&represented="+json.getString("represented")+"&signCode"+json.getString("signCode"));
                    }else if(json.has("agent")&&("0".equals(json.getString("agent")))){
//                        发送给自己
                        temp.setUrl(url + "html/qygl/html/pay_flow.html?openid=" + openid + "&state=" + json.getString("doctor") + "&toUser=" + json.getString("toUser") + "&toName=" + name+"&isRenew="+isRenew+"&signState="+signState+"&represented="+json.getString("represented")+"&signCode"+json.getString("signCode"));
                    }
                }
                }
                temp.setTouser(openid);
                temp.setTouser(openid);
                temp.setTopcolor("#000000");
                temp.setTopcolor("#000000");

+ 26 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/WlyySerivceController.java

@ -7,16 +7,14 @@ import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Element;
import org.json.JSONObject;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.*;
@ -218,6 +216,30 @@ public class WlyySerivceController extends BaseController{
        }
        }
    }
    }
    /**
     * 获取转诊预约医生列表
     * @param orgCode   机构编码
     * @param deptCode  科室编码
     * @param strCredential 身份证据
     * @return
     */
    @RequestMapping(value = "/third/smjk/RegDeptSpeDoctorList",method = RequestMethod.POST)
    @ApiOperation("获取转诊预约医生列表")
    @ResponseBody
    public String getRegDeptSpeDoctorList(
            @ApiParam(name="orgCode",value="机构编码") @RequestParam(name="orgCode",required = true) String orgCode,
            @ApiParam(name="deptCode",value="科室编码") @RequestParam(name="deptCode",required = true) String deptCode,
            @ApiParam(name="strCredential",value="身份证据") @RequestParam(name="strCredential",required = true) String strCredential){
        try {
            String list  = jwSmjkService.getRegDeptSpeDoctorList(orgCode,deptCode,strCredential);
            return write(200, "获取转诊预约医生列表成功!", "data", list);
        } catch (Exception ex) {
            ex.printStackTrace();
            return error(-1,"获取转诊预约医生列表列表失败");
        }
    }
    /**
    /**
     * 转诊预约医生号源转换
     * 转诊预约医生号源转换
     * @param xml
     * @param xml

+ 21 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -3,13 +3,9 @@ package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.quartz.impl.calendar.BaseCalendar;
import org.quartz.impl.calendar.BaseCalendar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
/**
/**
@ -22,6 +18,27 @@ public class PrescriptionInfoController extends BaseController{
    @Autowired
    @Autowired
    private PrescriptionInfoService prescriptionInfoService;
    private PrescriptionInfoService prescriptionInfoService;
    /**
     * 确认配送 二维码方式
     * 根据处方code获取处方流程
     *
     * @param code wlyy_prescription_dispensary_code的code
     * @return
     */
    @RequestMapping(value = "/expressage", method = RequestMethod.GET)
    @ApiOperation(value = "确认配送")
    public String expressage(
            @RequestParam(required = true) @ApiParam(value = "wlyy_prescription_dispensary_code的code", name = "code") String code) {
        try {
            Integer status = prescriptionExpressageService.expressage(code, getUID());
            if (status == -1) {
                return error(-1, "编码不存在");
            }
            return write(200, "配送成功");
        } catch (Exception e) {
            return error(-1, "失败");
        }
    }
    @RequestMapping(value = "/getPrescriptionFilter")
    @RequestMapping(value = "/getPrescriptionFilter")
    @ResponseBody
    @ResponseBody
@ -37,5 +54,4 @@ public class PrescriptionInfoController extends BaseController{
    }
    }
}
}

+ 51 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionLogController.java

@ -0,0 +1,51 @@
package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.entity.doctor.reply.DoctorQuickReply;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
@RestController("doctorPrescriptionLogController")
@RequestMapping(value = "/doctor/prescriptionlog")
@Api("医生端-处方日志")
public class PrescriptionLogController extends BaseController {
    @Autowired
    private PrescriptionLogService prescriptionLogService;
    /**
     * 根据处方code获取处方流程
     *
     * @param prescriptionCode
     * @return
     */
    @RequestMapping(value = "/getPrescriptionLogs", method = RequestMethod.GET)
    @ApiOperation(value = "获取处方流程")
    public String addReply(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            Integer[] types = new Integer[]{12, 21, 31, 41, 100};
            List<PrescriptionLog> prescriptionLogs = prescriptionLogService.findPrescriptionLogsByPrescriptionCode(prescriptionCode, types);
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", prescriptionLogs);
            } else {
                return error(-1, "获取失败");
            }
        } catch (Exception e) {
            return error(-1, "获取失败");
        }
    }
}

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/survey/ManagerQuestionnaireController.java

@ -538,7 +538,7 @@ public class ManagerQuestionnaireController extends WeixinBaseController {
    @ApiOperation(value = "获取筛选条件数量")
    @ApiOperation(value = "获取筛选条件数量")
    @ResponseBody
    @ResponseBody
    public String getAmount(
    public String getAmount(
            @ApiParam(value = "筛选条件")
            @ApiParam(value = "筛选条件",defaultValue = "{\"sex\":1,\"disease\":[2,5,6],\"healthCondition\":[0],\"service\":[1,3]}")
            @RequestParam String json) {
            @RequestParam String json) {
        try {
        try {
            int amount = managerQuestionnaireService.getAmount(json);
            int amount = managerQuestionnaireService.getAmount(json);

+ 85 - 43
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java

@ -1,82 +1,90 @@
package com.yihu.wlyy.web.patient.prescription;
package com.yihu.wlyy.web.patient.prescription;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.service.app.medicines.MedicalRecordsService;
import com.yihu.wlyy.service.app.prescription.PrescriptionDispensaryCodeService;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.service.app.prescription.*;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONArray;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.MediaType;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.util.Calendar;
import java.util.Calendar;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Random;
/**
/**
 * Created by Administrator on 2017/7/21.
 * Created by Administrator on 2017/7/21.
 *
 */
 */
@Controller
@RestController("patientPrescriptionController")
@RequestMapping(value = "/patient/prescription", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/patient/prescription", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "患者端-长处方接口")
@Api(description = "患者端-长处方接口")
public class PatientPrescriptionController extends BaseController {
public class PatientPrescriptionController extends BaseController {
    @Autowired
    @Autowired
    private PrescriptionDispensaryCodeService prescriptionDispensaryCodeService;
    private PrescriptionDispensaryCodeService prescriptionDispensaryCodeService;
    @Autowired
    private PrescriptionService prescriptionService;
    @Autowired
    private PrescriptionInfoService prescriptionInfoService;
    @Autowired
    private PrescriptionPayService prescriptionPayService;
    @Autowired
    private PrescriptionExpressageService prescriptionExpressageService;
    /**
    /**
     *居民取药码
     * 居民取药码
     *
     * @return
     * @return
     */
     */
    @RequestMapping(value = "/dispensaryCode/getResidentQRCode",method = RequestMethod.GET)
    @RequestMapping(value = "/dispensaryCode/getResidentQRCode", method = RequestMethod.GET)
    @ResponseBody
    @ResponseBody
    //@ObserverRequired
    //@ObserverRequired
    public String getResidentQRCode(){
    public String getResidentQRCode() {
        Calendar cal = Calendar.getInstance();
        Calendar cal = Calendar.getInstance();
        String year = String.valueOf(cal.get(Calendar.YEAR));
        String year = String.valueOf(cal.get(Calendar.YEAR));
        int temp = cal.get(Calendar.MONTH)+1;
        String month = cal.get(Calendar.MONTH)+1<10?"0"+temp:""+temp;
        String day = ""+cal.get(Calendar.DAY_OF_MONTH);
        String ymd = year+month+day;
        int temp2 = (int)((Math.random()*9+1)*100000);
        String code = ymd +temp2;
        int temp = cal.get(Calendar.MONTH) + 1;
        String month = cal.get(Calendar.MONTH) + 1 < 10 ? "0" + temp : "" + temp;
        String day = "" + cal.get(Calendar.DAY_OF_MONTH);
        String ymd = year + month + day;
        int temp2 = (int) ((Math.random() * 9 + 1) * 100000);
        String code = ymd + temp2;
        return ymd;
        return ymd;
    }
    }
    /**
    /**
     *配送员取药码
     * 配送员取药码
     *
     * @return
     * @return
     */
     */
    @RequestMapping(value = "/dispensaryCode/getDiliveryQRCode",method = RequestMethod.GET)
    @RequestMapping(value = "/dispensaryCode/getDiliveryQRCode", method = RequestMethod.GET)
    @ResponseBody
    @ResponseBody
    //@ObserverRequired
    //@ObserverRequired
    public String getDiliveryQRCode(){
    public String getDiliveryQRCode() {
        Calendar cal = Calendar.getInstance();
        Calendar cal = Calendar.getInstance();
        String year = String.valueOf(cal.get(Calendar.YEAR));
        String year = String.valueOf(cal.get(Calendar.YEAR));
        int temp = cal.get(Calendar.MONTH)+1;
        String month = cal.get(Calendar.MONTH)+1<10?"0"+temp:""+temp;
        String day = ""+cal.get(Calendar.DAY_OF_MONTH);
        String ymd = year+month+day;
        int temp = cal.get(Calendar.MONTH) + 1;
        String month = cal.get(Calendar.MONTH) + 1 < 10 ? "0" + temp : "" + temp;
        String day = "" + cal.get(Calendar.DAY_OF_MONTH);
        String ymd = year + month + day;
        //int temp2 = (int)((Math.random()*9+1)*100000);
        //int temp2 = (int)((Math.random()*9+1)*100000);
        String randomNum = randomString("0123456789",6);
        String code = ymd +randomNum;
        String randomNum = randomString("0123456789", 6);
        String code = ymd + randomNum;
        return ymd;
        return ymd;
    }
    }
    public  String randomString(String base, int length) {
    public String randomString(String base, int length) {
        Random random = new Random();
        Random random = new Random();
        StringBuffer sb = new StringBuffer();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < length; i++) {
        for (int i = 0; i < length; i++) {
@ -88,43 +96,77 @@ public class PatientPrescriptionController extends BaseController {
    /**
    /**
     * 显示居民所有的取药码列表
     * 显示居民所有的取药码列表
     *
     * @param status
     * @param status
     * @param timeType
     * @param timeType
     * @param page
     * @param page
     * @param pagesize
     * @param pagesize
     * @return
     * @return
     */
     */
    @RequestMapping(value = "/dispensaryCode/list",method = RequestMethod.GET)
    @RequestMapping(value = "/dispensaryCode/list", method = RequestMethod.GET)
    @ResponseBody
    @ResponseBody
    //@ObserverRequired
    //@ObserverRequired
    public String list(
    public String list(
            //@RequestParam(value = "patientCode",required = true) String patientCode,
            //@RequestParam(value = "patientCode",required = true) String patientCode,
            @RequestParam(value = "status",required = false) Integer status,
            @RequestParam(value = "timeType",required = false) Integer timeType,
            @RequestParam(value = "page",required = true) Integer page,
            @RequestParam(value = "pagesize",required = true) Integer pagesize) {
            @RequestParam(value = "status", required = false) Integer status,
            @RequestParam(value = "timeType", required = false) Integer timeType,
            @RequestParam(value = "page", required = true) Integer page,
            @RequestParam(value = "pagesize", required = true) Integer pagesize) {
        //getRepUID()
        //getRepUID()
        JSONArray result = prescriptionDispensaryCodeService.findByStatusAndTime(timeType,"915cc456-5b1d-11e6-8344-fa163e8aee56",status,page,pagesize);
        JSONArray result = prescriptionDispensaryCodeService.findByStatusAndTime(timeType, "915cc456-5b1d-11e6-8344-fa163e8aee56", status, page, pagesize);
        System.out.println(result.toString());
        System.out.println(result.toString());
        return result.toString();
        return result.toString();
    }
    }
    /**
    /**
     * 判断该居民是否有待取的药的接口
     * 判断该居民是否有待取的药的接口
     *
     * @return
     * @return
     */
     */
    @RequestMapping(value = "/dispensaryCode/whetherHaveCode",method = RequestMethod.GET)
    @RequestMapping(value = "/dispensaryCode/whetherHaveCode", method = RequestMethod.GET)
    @ResponseBody
    @ResponseBody
    //@ObserverRequired
    //@ObserverRequired
    public String whetherHaveCode(){
    public String whetherHaveCode() {
        JSONObject json = new JSONObject();
        JSONObject json = new JSONObject();
        String patientCode=getRepUID();
        String patientCode = getRepUID();
        int count = prescriptionDispensaryCodeService.dispensaryCodeCount(patientCode);
        int count = prescriptionDispensaryCodeService.dispensaryCodeCount(patientCode);
        if(count>0){
            json.put("data",true);
        if (count > 0) {
            json.put("data", true);
            return json.toString();
            return json.toString();
        }
        }
        json.put("data",false);
        json.put("data", false);
        return json.toString();
        return json.toString();
    }
    }
    /**
     * 订单跟踪 包含处方药品信息 订单记录  支付记录
     * 根据处方code获取处方流程
     *
     * @param prescriptionCode
     * @return
     */
    @RequestMapping(value = "/prescriptionFollow", method = RequestMethod.GET)
    @ApiOperation(value = "获取处方订单详情")
    public String prescriptionFollow(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            JSONObject jo = new JSONObject();
            //获取处方信息
            Prescription prescription = prescriptionService.findByCode(prescriptionCode);
            //获取处方药品信息
            List<PrescriptionInfo> prescriptionInfos = prescriptionInfoService.getPrescriptionInfo(prescriptionCode);
            //获取付款信息
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            //获取配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionExpressage", prescriptionExpressage);
            jo.put("prescriptionStatus", prescription.getStatus());//处方状态
            return write(200, "查询成功", "data", jo);
        } catch (Exception e) {
            return error(-1, "获取失败");
        }
    }
}
}

+ 50 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionLogController.java

@ -0,0 +1,50 @@
package com.yihu.wlyy.web.patient.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * Created by chenweida on 2017/7/27.
 */
@RestController
@RequestMapping(value = "/patient/prescriptionlog")
@Api("患者端-处方日志")
public class PatientPrescriptionLogController extends BaseController {
    @Autowired
    private PrescriptionLogService prescriptionLogService;
    /**
     * 订单跟踪
     * 根据处方code获取处方流程
     *
     * @param prescriptionCode
     * @return
     */
    @RequestMapping(value = "/getPrescriptionLogs", method = RequestMethod.GET)
    @ApiOperation(value = "获取处方流程")
    public String addReply(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            Integer[] types = new Integer[]{12, 21, 31, 41, 100};
            List<PrescriptionLog> prescriptionLogs = prescriptionLogService.findPrescriptionLogsByPrescriptionCode(prescriptionCode, types);
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", prescriptionLogs);
            } else {
                return error(-1, "获取失败");
            }
        } catch (Exception e) {
            return error(-1, "获取失败");
        }
    }
}

+ 12 - 101
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

@ -73,83 +73,6 @@ public class OnePayController extends WeixinBaseController {
    private Configure config;
    private Configure config;
    @RequestMapping(value = "expensesStatus", method = RequestMethod.GET)
    @ApiOperation("居民缴费状态查询")
    @ResponseBody
    public String expensesStatus() throws Exception {
        try {
            //            获取居民个人信息  要根据签约code去查找签约扣费状态
            String patient = getUID();
//            String singCode = "044701ea-5b23-11e6-8344-fa163e8aee56";
//            SignFamily sign = signFamilyDao.findByCode(singCode);
//            String patient = "915cc456-5b1d-11e6-8344-fa163e8aee56";
            SignFamily signFamily = signFamilyDao.findPatientExpensesStatus(patient);
            String expensesStatus = signFamily.getExpensesStatus();
            if ("0".equals(expensesStatus)) {
                return write(200, "未扣费!", "expensesStatus", expensesStatus);
            } else if ("1".equals(expensesStatus)) {
                return write(200, "已扣费!", "expensesStatus", expensesStatus);
            } else if ("2".equals(expensesStatus)) {
                return write(200, "已退费!", "expensesStatus", expensesStatus);
            } else {
                return write(200, "扣费状态数据有误!", "expensesStatus", expensesStatus);
            }
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    /**
     * 补贴类型:无补贴01,全补贴02,补个人承担部分(20)03,补统筹基金(70)04
     *
     * @param expensesType 补贴类型
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "bill", method = RequestMethod.GET)
    @ApiOperation("居民缴费账单")
    @ResponseBody
    public String getBill(@RequestParam String expensesType) throws Exception {
        try {
            Pattern pattern = Pattern.compile("[0-9]*");
            Boolean flag = pattern.matcher(expensesType).matches();
            JSONObject json = new JSONObject();
            if (flag) {
                switch (expensesType) {
                    case "01":
                        json.put("selfpayAmount", 20);
                        json.put("financialAmount", 0);
                        json.put("insuranceAmount", 70);
                        json.put("totalAmount", 90);
                        break;
                    case "02":
                        json.put("selfpayAmount", 0);
                        json.put("financialAmount", 90);
                        json.put("insuranceAmount", 0);
                        json.put("totalAmount", 90);
                        break;
                    case "03":
                        json.put("selfpayAmount", 0);
                        json.put("financialAmount", 20);
                        json.put("insuranceAmount", 70);
                        json.put("totalAmount", 90);
                        break;
                    case "04":
                        json.put("selfpayAmount", 20);
                        json.put("financialAmount", 70);
                        json.put("insuranceAmount", 0);
                        json.put("totalAmount", 90);
                        break;
                }
            }
            return write(200, "查询缴费账单成功!", "data", json);
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "createSicard", method = RequestMethod.POST)
    @RequestMapping(value = "createSicard", method = RequestMethod.POST)
    @ApiOperation("生成电子社保卡")
    @ApiOperation("生成电子社保卡")
    @ResponseBody
    @ResponseBody
@ -167,10 +90,10 @@ public class OnePayController extends WeixinBaseController {
    @ResponseBody
    @ResponseBody
    public String bindCard() throws Exception {
    public String bindCard() throws Exception {
        try {
        try {
            String patient = getUID();
            String openid = getOpenid();
//            String patient = "0cc6e4562de2437ab2dbbf51a9fc3b49";
//            String openid = "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc";
//            String patient = getUID();
//            String openid = getOpenid();
            String patient = "0cc6e4562de2437ab2dbbf51a9fc3b49";
            String openid = "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc";
            BindCard bindCard = pay.bindCard(patient, openid);//getUID(), getOpenid());      oULM4xAj9sOsHJ95ttKYd_Fjh6Hc
            BindCard bindCard = pay.bindCard(patient, openid);//getUID(), getOpenid());      oULM4xAj9sOsHJ95ttKYd_Fjh6Hc
            String sicardUrl = pay.createSicard(patient, openid);//getUID(), getOpenid());
            String sicardUrl = pay.createSicard(patient, openid);//getUID(), getOpenid());
            if (bindCard != null) {
            if (bindCard != null) {
@ -185,8 +108,6 @@ public class OnePayController extends WeixinBaseController {
                json.put("bindStatus", "030007");
                json.put("bindStatus", "030007");
                return write(200, "生成电子社保卡成功!", "data", json);
                return write(200, "生成电子社保卡成功!", "data", json);
            }
            }
//            BindCard bindCard = pay.bindCard("0cc6e4562de2437ab2dbbf51a9fc3b49", "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc");//getUID(), getOpenid());      oULM4xAj9sOsHJ95ttKYd_Fjh6Hc
//            return write(200, "查询绑卡信息成功!", "data", bindCard);
        } catch (Exception e) {
        } catch (Exception e) {
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
@ -196,36 +117,26 @@ public class OnePayController extends WeixinBaseController {
    @ApiOperation("家庭医生签约支付")
    @ApiOperation("家庭医生签约支付")
    @ResponseBody
    @ResponseBody
    public String charge(
    public String charge(
            @ApiParam(name = "orgCode", value = "医疗机构编号", defaultValue = "3502050300")
            @ApiParam(name = "orgCode", value = "医疗机构编号hospital", defaultValue = "3502050300")
            @RequestParam String orgCode,
            @RequestParam String orgCode,
            @ApiParam(name = "chargeType", value = "支付类型", defaultValue = "1")
            @ApiParam(name = "chargeType", value = "支付类型", defaultValue = "1")
            @RequestParam String chargeType,
            @RequestParam String chargeType,
            @ApiParam(name = "chargeRelation", value = "支付关联代码", defaultValue = "044701ea5b2311e68344fa163e8aee56")
            @ApiParam(name = "chargeRelation", value = "支付关联代码签约code", defaultValue = "044701ea-5b23-11e6-8344-fa163e8aee56")
            @RequestParam String chargeRelation,
            @RequestParam String chargeRelation,
            @ApiParam(name = "totalAmount", value = "交易总金额(分)", defaultValue = "1")
            @ApiParam(name = "totalAmount", value = "交易总金额(分)", defaultValue = "1")
            @RequestParam Integer totalAmount,
            /*@ApiParam(name = "selfpayAmount", value = "自费金额(分)", defaultValue = "0")
            @RequestParam Integer selfpayAmount,
            @ApiParam(name = "insuranceAmount", value = "医保支付金额(分)", defaultValue = "1")
            @RequestParam Integer insuranceAmount,
            @ApiParam(name = "insuranceAmount", value = "区财政补贴金额(分)", defaultValue = "1")
            @RequestParam Integer financialAmount,*/
            @ApiParam(name = "feeDetail", value = "费用明细", defaultValue = "[{\"itemName\":\"家庭医生签约支付\",\"itemDesc\":\"家庭医生签约支付\",\"itemOrigPrice\":\"1\",\"itemNowPrice\":\"1\",\"itemNum\":\"1\",\"itemTotalAmt\":\"1\"}]")
            @RequestParam String feeDetail) throws Exception {
            @RequestParam Integer totalAmount) throws Exception {
        try {
        try {
            //            获取居民个人信息
            //            获取居民个人信息
            String patient = getUID();
            String openId = getOpenid();
//            String patient = "0cc6e4562de2437ab2dbbf51a9fc3b49";
//            String openId = "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc";
//            String patient = getUID();
//            String openId = getOpenid();
            String patient = "0cc6e4562de2437ab2dbbf51a9fc3b49";
            String openId = "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc";
            if (StringUtils.isNotEmpty(openId)) {
            if (StringUtils.isNotEmpty(openId)) {
                String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, feeDetail, patient, openId,getAccessToken());  //ohNH9sh4uwuJCxIwcLJtGTX-BaSk    getUID(),getOpenid()
                String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, patient, openId,getAccessToken());  //ohNH9sh4uwuJCxIwcLJtGTX-BaSk    getUID(),getOpenid()
                return write(200, "家庭医生签约支付成功!", "data", settleNo);
                return write(200, "家庭医生签约支付成功!", "data", settleNo);
            } else {
            } else {
                return write(-1, "openId为空!");
                return write(-1, "openId为空!");
            }
            }
//            String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, selfpayAmount, insuranceAmount, feeDetail, "0cc6e4562de2437ab2dbbf51a9fc3b49", "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc");  //getUID(),getOpenid()
//            return write(200, "家庭医生签约支付成功!", "data", settleNo);
        } catch (Exception e) {
        } catch (Exception e) {
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }

+ 139 - 137
patient-co-wlyy/src/main/resources/system.properties

@ -79,213 +79,215 @@ prenatal_inspector_job_trigger=0 0 6 * * ?
evaluate_score_job = 0 0 */2 * * ?
evaluate_score_job = 0 0 */2 * * ?
#统一支付平台 页面跳转地址
return_url={server}/wx/html/qygl/html/bind_return.html
#统一支付平台支付成功后页面跳转地址
return_url={server}/wx/html/qygl/html/pay_result.html
#-------------------------开发环境配置-------------------------#
#-------------------------开发环境配置-------------------------#
# 服务器基本配置
server_ip=weixin.xmtyw.cn
server_port=
server_domain=wlyy-dev
server_url=http://weixin.xmtyw.cn/wlyy-dev/
# 上传文件配置
image_server=http://weixin.xmtyw.cn/res/images/
voice_server=http://weixin.xmtyw.cn/res/voice/
chat_server=http://weixin.xmtyw.cn/res/chat/
# 是否签约检查和签约数据上传
sign_check_upload=http://172.19.103.87:8011/wlyy_service
# IM配置
im_list_get=http://172.19.103.88:3000/
im_group_server=http://172.19.103.29:3000/api/v1/chats/gm
msg_push_server=http://172.19.103.29:3000/api/v1/chats/sm
# 微信基本配置
accId=gh_ffd64560fb21
appId=wxd03f859efdf0873d
appSecret=2935b54b53a957d9516c920a544f2537
# 个人微信测试平台基本配置
#appId=wxb3827510b2e15012
#appSecret=c5bdedd909ded9c2ee08028487e6f50d
wechat_base_url=http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
wechat_token=27eb3bb24f149a7760cf1bb154b08040
# 微信模板消息ID
#签约邀请
doctor_invitel_template=TLWrBtNE2kBJaFCdVzDOOnQC8N2TtRY9ZxEzwZXQcR0
#咨询回复
template_consult_notice=qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc
#签约成功
template_sign_success=hDWV_sknKlhxhOwR5h68OCXbAhRpcgnx9INrT8BybE8
#签约失败
template_sign_failed=ezgttXE7rG4rAboQK2ituG1dKq4PeyCj3LxGJWO_vOA
#健康指导提醒
template_health_notice=128RCfyCHi22jW8PZzo7vabKMsA3SBv5VeHaDPr2Bhw
#解约提醒
template_termination=LrrzHjnIF67ww5uQUvSiv3_pVKJiIK4ZE3fKrvsT0AE
#预约成功
template_appoint_success=Bo2yqNczSU9zkg4wXoouv9tSeefZ6TziggWL3dTXPYE
#预约取消
template_appoint_failed=pErTBTdweIdrNRf_1Oo62YtQC0aHwPvtLaCzw44JzCQ
#缴费提醒
template_expenses_remind=BkTGJ8S18qZ3DfaptAXnZznAk8RJjx9v93og5vyO0bs
#健康教育
template_healthy_article=LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
#医生变更
template_doctor_change=TNIDMjduVKgVL4-k71umYLpHROvFB8K6mmm8aZC_EH8
#问卷调查
template_doctor_survey=IjQvzBy0PLeft2kN9mdBhACXPE9I_jyJywJ6B-JRxsY
#template_doctor_survey=fgYiMntj1amEkE8_GLUPmAIyssUAroJrNSHqvydt-PQ
#群发图文消息图片地址
renew_path=/usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/renew.png
sign_path=/usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/familycontract.png
#健康之路开放平台
yihu_OpenPlatform_url=http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
yihu_OpenPlatform_appId=9000276
yihu_OpenPlatform_secret=OKC8BS1KGXTDE9GPP1EO4VYLUXF8DJ7QUP72H613ZXA
# FastDFS文件Http访问地址
fastdfs_file_url=http://172.19.103.54:80/
im数据库名
im_dataBase =ichat
#-------------------------测试环境配置-------------------------#
## 服务器基本配置
## 服务器基本配置
#server_ip=weixin.xmtyw.cn
#server_ip=ehr.yihu.com
#server_port=
#server_port=
#server_domain=wlyy-dev
#server_url=http://weixin.xmtyw.cn/wlyy-dev/
#server_domain=wlyy
#server_url=http://ehr.yihu.com/wlyy/
#
#
## 上传文件配置
## 上传文件配置
#image_server=http://weixin.xmtyw.cn/res/images/
#voice_server=http://weixin.xmtyw.cn/res/voice/
#chat_server=http://weixin.xmtyw.cn/res/chat/
#image_server=http://ehr.yihu.com/res/images/
#voice_server=http://ehr.yihu.com/res/voice/
#chat_server=http://ehr.yihu.com/res/chat/
#
#
## 是否签约检查和签约数据上传
## 是否签约检查和签约数据上传
#sign_check_upload=http://172.19.103.87:8011/wlyy_service
#sign_check_upload=http://172.19.103.85:8011/wlyy_service
#
#
## IM配置
## IM配置
#im_list_get=http://172.19.103.88:3000/
#im_list_get=http://172.19.103.88:3000/
#im_group_server=http://172.19.103.29:3000/api/v1/chats/gm
#msg_push_server=http://172.19.103.29:3000/api/v1/chats/sm
#im_group_server=http://172.19.103.88:3000/api/v1/chats/gm
#msg_push_server=http://172.19.103.88:3000/api/v1/chats/sm
#
#
## 微信基本配置
## 微信基本配置
#appId=wxd03f859efdf0873d
#appSecret=2935b54b53a957d9516c920a544f2537
## 个人微信测试平台基本配置
##appId=wxb3827510b2e15012
##appSecret=c5bdedd909ded9c2ee08028487e6f50d
#
#wechat_base_url=http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
#accId=gh_ffd64560fb21
#appId=wx1f129f7b51701428
#appSecret=988f005d8309ed1795939e0f042431fb
#wechat_base_url=http%3a%2f%2fehr.yihu.com%2fwlyy
#wechat_token=27eb3bb24f149a7760cf1bb154b08040
#wechat_token=27eb3bb24f149a7760cf1bb154b08040
#
#
## 微信模板消息ID
## 微信模板消息ID
##签约邀请
##签约邀请
#doctor_invitel_template=TLWrBtNE2kBJaFCdVzDOOnQC8N2TtRY9ZxEzwZXQcR0
#doctor_invitel_template=uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
##咨询回复
##咨询回复
#template_consult_notice=qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc
#template_consult_notice=-dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
##签约成功
##签约成功
#template_sign_success=hDWV_sknKlhxhOwR5h68OCXbAhRpcgnx9INrT8BybE8
#template_sign_success=VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
##签约失败
##签约失败
#template_sign_failed=ezgttXE7rG4rAboQK2ituG1dKq4PeyCj3LxGJWO_vOA
#template_sign_failed=m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
##健康指导提醒
##健康指导提醒
#template_health_notice=128RCfyCHi22jW8PZzo7vabKMsA3SBv5VeHaDPr2Bhw
#template_health_notice=5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
##解约提醒
##解约提醒
#template_termination=LrrzHjnIF67ww5uQUvSiv3_pVKJiIK4ZE3fKrvsT0AE
#template_termination=qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
##预约成功
##预约成功
#template_appoint_success=Bo2yqNczSU9zkg4wXoouv9tSeefZ6TziggWL3dTXPYE
#template_appoint_success=-vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
##预约取消
##预约取消
#template_appoint_failed=pErTBTdweIdrNRf_1Oo62YtQC0aHwPvtLaCzw44JzCQ
#template_appoint_failed=r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
##缴费提醒
##缴费提醒
#template_expenses_remind=BkTGJ8S18qZ3DfaptAXnZznAk8RJjx9v93og5vyO0bs
#template_expenses_remind=pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
##健康教育
##健康教育
#template_healthy_article=LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
#template_healthy_article=aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
##医生变更
##医生变更
#template_doctor_change=TNIDMjduVKgVL4-k71umYLpHROvFB8K6mmm8aZC_EH8
#template_doctor_change=V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
##问卷调查
##问卷调查
#template_doctor_survey=IjQvzBy0PLeft2kN9mdBhACXPE9I_jyJywJ6B-JRxsY
##template_doctor_survey=fgYiMntj1amEkE8_GLUPmAIyssUAroJrNSHqvydt-PQ
#template_doctor_survey=OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
#
#
##群发图文消息图片地址
##群发图文消息图片地址
#renew_path=/usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/renew.png
#sign_path=/usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/familycontract.png
#renew_path=/usr/local/apache-tomcat-8.0.36/webapps/wlyy/images/renew.png
#sign_path=/usr/local/apache-tomcat-8.0.36/webapps/wlyy/images/familycontract.png
#
#
## FastDFS文件Http访问地址
#fastdfs_file_url=http://172.19.103.54:80/
#
#
##健康之路开放平台
##健康之路开放平台
#yihu_OpenPlatform_url=http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
#yihu_OpenPlatform_url=http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
#yihu_OpenPlatform_appId=9000276
#yihu_OpenPlatform_appId=9000276
#yihu_OpenPlatform_secret=OKC8BS1KGXTDE9GPP1EO4VYLUXF8DJ7QUP72H613ZXA
#yihu_OpenPlatform_secret=OKC8BS1KGXTDE9GPP1EO4VYLUXF8DJ7QUP72H613ZXA
#
#
## FastDFS文件Http访问地址
#fastdfs_file_url=http://172.19.103.54:80/
#
#im数据库名
#im_dataBase =ichat
#-------------------------测试环境配置-------------------------#
##im数据库名
#im_dataBase = im_new
#-------------------------正式环境配置-------------------------#
## 服务器基本配置
## 服务器基本配置
#server_ip=ehr.yihu.com
#server_ip=www.xmtyw.cn
#server_port=
#server_port=
#server_domain=wlyy
#server_domain=wlyy
#server_url=http://ehr.yihu.com/wlyy/
#server_url=http://www.xmtyw.cn/wlyy/
#
#
## 上传文件配置
## 上传文件配置
#image_server=http://ehr.yihu.com/res/images/
#voice_server=http://ehr.yihu.com/res/voice/
#chat_server=http://ehr.yihu.com/res/chat/
#image_server=http://www.xmtyw.cn/res/images/
#voice_server=http://www.xmtyw.cn/res/voice/
#chat_server=http://www.xmtyw.cn/res/chat/
#
#
## 是否签约检查和签约数据上传
## 是否签约检查和签约数据上传
#sign_check_upload=http://172.19.103.85:8011/wlyy_service
#sign_check_upload=http://59.61.92.90:8072/wlyy_service
#
#
## IM配置
## IM配置
#im_list_get=http://172.19.103.88:3000/
#im_group_server=http://172.19.103.88:3000/api/v1/chats/gm
#msg_push_server=http://172.19.103.88:3000/api/v1/chats/sm
#im_list_get=http://120.41.253.95:3000/
#im_group_server=http://120.41.253.95:3000/api/v1/chats/gm
#msg_push_server=http://120.41.253.95:3000/api/v1/chats/sm
#
#
## 微信基本配置
## 微信基本配置
#appId=wx1f129f7b51701428
#appSecret=988f005d8309ed1795939e0f042431fb
#wechat_base_url=http%3a%2f%2fehr.yihu.com%2fwlyy
#accId=gh_ffd64560fb21
#appId=wxad04e9c4c5255acf
#appSecret=ae77c48ccf1af5d07069f5153d1ac8d3
#wechat_token=27eb3bb24f149a7760cf1bb154b08040
#wechat_token=27eb3bb24f149a7760cf1bb154b08040
#wechat_base_url=http%3a%2f%2fwww.xmtyw.cn%2fwlyy
#
#
## 微信模板消息ID
## 微信模板消息ID
##签约邀请
##签约邀请
#doctor_invitel_template=uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
#doctor_invitel_template=MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA
##咨询回复
##咨询回复
#template_consult_notice=-dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
#template_consult_notice=0mF_vHj-ILx8EH8DwzmAi7LqzjqYiU9IrSRRmziTZyc
##签约成功
##签约成功
#template_sign_success=VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
#template_sign_success=0D2vYZVRzFz15p9Y_pkZ1DKutDq8UOsks79FXUKS0tA
##签约失败
##签约失败
#template_sign_failed=m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
#template_sign_failed=My2VNERjJt4NXR4Ibh42pdrP6B6ka8rQxZeWinQh99s
##健康指导提醒
##健康指导提醒
#template_health_notice=5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
#template_health_notice=uv31ES_VCmq3tBYtyGmEQvIwU_zh9LDhF3bFpbIUt5g
##解约提醒
##解约提醒
#template_termination=qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
#template_termination=C0tdXtA_8k-Cy4a1EkzQuI877vqaqAtRkc-e_Gsd7sk
##预约成功
##预约成功
#template_appoint_success=-vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
#template_appoint_success=FY3Pqa66tHIE1Fv-irbFBPOh5cYP71fkOzfZKH4S-Fo
##预约取消
##预约取消
#template_appoint_failed=r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
#template_appoint_failed=tldWEb9AN7p_RoHoD8ml0GxWW3V1V_mpEEhp2v6p56s
##缴费提醒
##缴费提醒
#template_expenses_remind=pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
#template_expenses_remind=AcrlihhoGbm22A8cdFFDQ4u38ptRw0aiIPf-aGvNxMM
##健康教育
##健康教育
#template_healthy_article=aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
#template_healthy_article=a5-ZGf-IUUULsuRNoHWQiBMU6pSYhLgPPqV67SjdLRo
##医生变更
##医生变更
#template_doctor_change=V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
#template_doctor_change=dtzSHImbPKfwcrjWlJEjAw3lGlvrLjsobSOE8g4adZA
##问卷调查
##问卷调查
#template_doctor_survey=OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
#template_doctor_survey=8ZWKJmoJ7VR7Uk4YS7aa0Z94QzCkxsyTW6R4CHhUJII
#
#
##群发图文消息图片地址
##群发图文消息图片地址
#renew_path=/usr/local/apache-tomcat-8.0.36/webapps/wlyy/images/renew.png
#sign_path=/usr/local/apache-tomcat-8.0.36/webapps/wlyy/images/familycontract.png
#renew_path=/usr/local/tomcat8/webapps/wlyy/images/renew.png
#sign_path=/usr/local/tomcat8/webapps/wlyy/images/familycontract.png
#
#
## FastDFS文件Http访问地址
## FastDFS文件Http访问地址
#fastdfs_file_url=http://172.19.103.54:80/
#fastdfs_file_url=http://www.xmtyw.cn/
#
#
##健康之路开放平台
##健康之路开放平台
#yihu_OpenPlatform_url=http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
#yihu_OpenPlatform_url=http://api.yihu.com.cn/OpenPlatform/cgiBin/1.0/
#yihu_OpenPlatform_appId=9000276
#yihu_OpenPlatform_appId=9000276
#yihu_OpenPlatform_secret=OKC8BS1KGXTDE9GPP1EO4VYLUXF8DJ7QUP72H613ZXA
#yihu_OpenPlatform_secret=2JGL19AH3JS55MQY6ZOFJE1JZJ1OF23GWV67MCDQV74
#
#
##im数据库名
##im数据库名
#im_dataBase = im_new
#-------------------------正式环境配置-------------------------#
# 服务器基本配置
server_ip=www.xmtyw.cn
server_port=
server_domain=wlyy
server_url=http://www.xmtyw.cn/wlyy/
# 上传文件配置
image_server=http://www.xmtyw.cn/res/images/
voice_server=http://www.xmtyw.cn/res/voice/
chat_server=http://www.xmtyw.cn/res/chat/
# 是否签约检查和签约数据上传
sign_check_upload=http://59.61.92.90:8072/wlyy_service
# IM配置
im_list_get=http://120.41.253.95:3000/
im_group_server=http://120.41.253.95:3000/api/v1/chats/gm
msg_push_server=http://120.41.253.95:3000/api/v1/chats/sm
# 微信基本配置
accId=gh_ffd64560fb21
appId=wxad04e9c4c5255acf
appSecret=ae77c48ccf1af5d07069f5153d1ac8d3
wechat_token=27eb3bb24f149a7760cf1bb154b08040
wechat_base_url=http%3a%2f%2fwww.xmtyw.cn%2fwlyy
# 微信模板消息ID
#签约邀请
doctor_invitel_template=MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA
#咨询回复
template_consult_notice=0mF_vHj-ILx8EH8DwzmAi7LqzjqYiU9IrSRRmziTZyc
#签约成功
template_sign_success=0D2vYZVRzFz15p9Y_pkZ1DKutDq8UOsks79FXUKS0tA
#签约失败
template_sign_failed=My2VNERjJt4NXR4Ibh42pdrP6B6ka8rQxZeWinQh99s
#健康指导提醒
template_health_notice=uv31ES_VCmq3tBYtyGmEQvIwU_zh9LDhF3bFpbIUt5g
#解约提醒
template_termination=C0tdXtA_8k-Cy4a1EkzQuI877vqaqAtRkc-e_Gsd7sk
#预约成功
template_appoint_success=FY3Pqa66tHIE1Fv-irbFBPOh5cYP71fkOzfZKH4S-Fo
#预约取消
template_appoint_failed=tldWEb9AN7p_RoHoD8ml0GxWW3V1V_mpEEhp2v6p56s
#缴费提醒
template_expenses_remind=AcrlihhoGbm22A8cdFFDQ4u38ptRw0aiIPf-aGvNxMM
#健康教育
template_healthy_article=a5-ZGf-IUUULsuRNoHWQiBMU6pSYhLgPPqV67SjdLRo
#医生变更
template_doctor_change=dtzSHImbPKfwcrjWlJEjAw3lGlvrLjsobSOE8g4adZA
#问卷调查
template_doctor_survey=8ZWKJmoJ7VR7Uk4YS7aa0Z94QzCkxsyTW6R4CHhUJII
#群发图文消息图片地址
renew_path=/usr/local/tomcat8/webapps/wlyy/images/renew.png
sign_path=/usr/local/tomcat8/webapps/wlyy/images/familycontract.png
# FastDFS文件Http访问地址
fastdfs_file_url=http://www.xmtyw.cn/
#健康之路开放平台
yihu_OpenPlatform_url=http://api.yihu.com.cn/OpenPlatform/cgiBin/1.0/
yihu_OpenPlatform_appId=9000276
yihu_OpenPlatform_secret=2JGL19AH3JS55MQY6ZOFJE1JZJ1OF23GWV67MCDQV74
#im数据库名
im_dataBase =ichat
#im_dataBase =ichat