Browse Source

Merge remote-tracking branch 'origin/dev' into dev

wangxingwang 7 years ago
parent
commit
87be630a7e
19 changed files with 91 additions and 602 deletions
  1. 1 2
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/medicine/IdEntity.java
  2. 3 2
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/PatientExam.java
  3. 2 2
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/medicine/questionnaire/MedicineAnswerLog.java
  4. 1 1
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/config/jpa/MedicineJpa.java
  5. 1 1
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java
  6. 0 88
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/dao/PatientDao.java
  7. 0 425
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/Patient.java
  8. 5 5
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/PatientExamDao.java
  9. 1 1
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/wlyy/patient/PatientDao.java
  10. 3 3
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PatientExamService.java
  11. 1 1
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PatientService.java
  12. 1 1
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java
  13. 7 10
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptDict.java
  14. 11 12
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvPhysicDict.java
  15. 27 27
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java
  16. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java
  17. 3 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java
  18. 20 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionCodeController.java
  19. 2 18
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java

+ 1 - 2
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/medicine/IdEntity.java

@ -3,12 +3,11 @@
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
 *******************************************************************************/
package com.yihu.mm.entity.medicine;
package com.yihu.mm.entity;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.GeneratedValue;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.io.Serializable;

+ 3 - 2
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/PatientExam.java

@ -1,6 +1,7 @@
package com.yihu.mm.entity;
package com.yihu.mm.entity.patient;
import com.yihu.wlyy.entity.IdEntity;
import com.yihu.mm.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Entity;

+ 2 - 2
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/medicine/questionnaire/MedicineAnswerLog.java

@ -1,7 +1,7 @@
package com.yihu.mm.entity.medicine.questionnaire;
package com.yihu.mm.entity.questionnaire;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.mm.entity.medicine.IdEntity;
import com.yihu.mm.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Table;

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/config/jpa/MedicineJpa.java

@ -29,7 +29,7 @@ import javax.sql.DataSource;
@EnableJpaRepositories(
@EnableJpaRepositories(
        entityManagerFactoryRef = "medicineEntityManagerFactory",
        entityManagerFactoryRef = "medicineEntityManagerFactory",
        transactionManagerRef = "medicineTransactionManager",
        transactionManagerRef = "medicineTransactionManager",
        basePackages = {"com.yihu.mm.repository.medicine"})   //设置Repository所在位置
        basePackages = {"com.yihu.mm.repository.mm"})   //设置Repository所在位置
public class MedicineJpa {
public class MedicineJpa {
    @Autowired
    @Autowired

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java

@ -1,7 +1,7 @@
package com.yihu.mm.controller.medicine;
package com.yihu.mm.controller.medicine;
import com.yihu.mm.controller.BaseController;
import com.yihu.mm.controller.BaseController;
import com.yihu.mm.entity.PatientExam;
import com.yihu.mm.entity.patient.PatientExam;
import com.yihu.mm.service.PatientExamService;
import com.yihu.mm.service.PatientExamService;
import com.yihu.mm.service.PatientService;
import com.yihu.mm.service.PatientService;
import com.yihu.mm.service.PhysicalExaminationService;
import com.yihu.mm.service.PhysicalExaminationService;

+ 0 - 88
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/dao/PatientDao.java

@ -1,88 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.mm.dao;
import com.yihu.mm.entity.Patient;
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;
public interface PatientDao extends PagingAndSortingRepository<Patient, Long>,JpaSpecificationExecutor<Patient> {
	// 查询患者姓名
	@Query("select p.name from Patient p where p.code=?1")
	String findNameByCode(String code);
    // 根据姓名查询
    @Query("select p.code from Patient p where p.name=?1")
    String[] findByName(String name);
	// 根據患者標識查詢患者信息
	@Query("select p from Patient p where p.code=?1")
	Patient findByCode(String code);
    // 根據患者標識查詢患者信息
    @Query("select p from Patient p where p.code=?1 and p.idcard =?2")
    Patient findByCodeAndIdcard(String code, String idcard);
	// 根據身份證號查詢患者信息
	@Query("select p from Patient p where p.idcard=?1")
	Patient findByIdcard(String idcard);
	@Query("select p from Patient p where p.ssc=?1")
	Patient findBySsc(String ssc);
	// 根據手机号查詢患者信息
	@Query("select p from Patient p where p.mobile=?1")
	Patient findByMobile(String mobile);
	// 根據病情等级获取患者信息
	@Query("select p from Patient p where p.diseaseCondition=?1")
	Iterable<Patient> findInfoByLevel(int level);
	@Query("select p from Patient p where p.openid=?1")
	Patient findByOpenid(String openid);
	@Query("select count(1) from Patient p where p.openid=?1")
	int countByOpenid(String openid);
	//清空openid
	@Modifying
	@Query("update Patient p set p.openid = null where p.code <> ?1 and p.openid = ?2")
	int clearOpenid(String patient, String openid);
    @Modifying
    @Query(value = "update Patient p set p.status=?1 where p.id=?2 ")
    int updateStatus(Integer status, Long id);
    @Modifying
    @Query(value = "update Patient p set p.password=?1,p.salt=?2 where p.id=?3 ")
    int initPassword(String password, String salt, Long id);
    @Query(value = "select count(1) from Patient p where p.mobile = ?1")
    int isMobileExist(String mobile);
    @Query(value = "select count(1) from Patient p where p.idcard = ?1")
    int isIdCardExist(String idcard);
    @Query(value = "select count(1) from Patient p where p.ssc = ?1")
    int isSscExist(String ssc);
	@Query("select p from Patient p where p.city = ?1 and p.mobile is not null and p.mobile!='' ")
	List<Patient> findByCity(String city);
	@Query("select p from Patient p where p.city = ?1 and p.mobile is not null and p.mobile!=''  and p.town in ?2 ")
	List<Patient> findByCityAndTowns(String city, String towns[]);
	@Query(value = "SELECT DISTINCT p.* from wlyy_patient p LEFT JOIN wlyy_sign_family f on p.code = f.patient WHERE p.city = ?1 and p.mobile is not null and p.mobile!=''  and f.hospital in ?2 ",nativeQuery = true)
	List<Patient> findByCityAndHospital(String city, String hospital[]);
	@Query("select p from Patient p where p.idcard=?1 and p.ssc=?2")
	Patient findByIdcardAndSsc(String idcard, String ssc);
}

+ 0 - 425
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/Patient.java

@ -1,425 +0,0 @@
package com.yihu.mm.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * 患者信息
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_patient")
public class Patient extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8358924836164389434L;
	// 业务主键
	private String code;
	// 身份证号
	private String idcard;
	// 登录密码
	private String password;
	private String salt;
	// 姓名
	private String name;
	// 生日
	private Date birthday;
	// 性別,1男,2女
	private Integer sex;
	// 手機號
	private String mobile;
	// (基卫)手機號
	private String mobileRemarks;
	// 聯繫電話
	private String phone;
	// 社保卡號
	private String ssc;
	// 頭像HTTP地址
	private String photo;
	// 省代碼
	private String province;
	// 城市代碼
	private String city;
	// 區縣代碼
	private String town;
	// 街道代码
	private String street;
	// 省名
	private String provinceName;
	// 市名
	private String cityName;
	// 區縣名
	private String townName;
	// 街道名称
	private String streetName;
	// 地址
	private String address;
	// 疾病类型,0健康,1高血压,2糖尿病,3高血压+糖尿病
	private Integer disease;
	// 病情:0绿标,1黄标,2红标
	private Integer diseaseCondition;
	// 病历记录总数
	private Integer recordAmount;
	// 總積分
	private Integer points;
	// 更新時間
	private Date czrq;
	// 微信编号
	private String openid;
	//微信时间
	private Date openidTime;
	// 用户状态:1正常,0禁用,-1恶意注册,2审核中
	private Integer status;
	// 居委会字段id
	private String sickVillage;
	// 居委会字段名称
	private String sickVillageName;
//	是否绑定电子社保卡
	private Integer sicardStatus;
//	绑定电子社保卡时间
	private Date sicardTime;
	//是否分配过微信标签  1分配过 0或者空没有
	private Integer isWxtag;
	public Integer getSicardStatus() {
		return sicardStatus;
	}
	public void setSicardStatus(Integer sicardStatus) {
		this.sicardStatus = sicardStatus;
	}
	public Date getSicardTime() {
		return sicardTime;
	}
	public void setSicardTime(Date sicardTime) {
		this.sicardTime = sicardTime;
	}
	private List<SignPatientLabelInfo> labelInfos=new ArrayList<>();//患者的疾病标签list
	public Patient() {
	}
	public Patient(Long id) {
		this.id = id;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	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 getSsc() {
		return ssc;
	}
	public void setSsc(String ssc) {
		this.ssc = ssc;
	}
	@Column(name = "photo", insertable = false)
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getTown() {
		return town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	public String getStreet() {
		return street;
	}
	public void setStreet(String street) {
		this.street = street;
	}
	@Column(name = "province_name")
	public String getProvinceName() {
		return provinceName;
	}
	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}
	@Column(name = "city_name")
	public String getCityName() {
		return cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town_name")
	public String getTownName() {
		return townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	@Column(name = "street_name")
	public String getStreetName() {
		return streetName;
	}
	public void setStreetName(String streetName) {
		this.streetName = streetName;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Integer getDisease() {
		return disease;
	}
	public void setDisease(Integer disease) {
		this.disease = disease;
	}
	@Column(name = "disease_condition")
	public Integer getDiseaseCondition() {
		return diseaseCondition;
	}
	public void setDiseaseCondition(Integer diseaseCondition) {
		this.diseaseCondition = diseaseCondition;
	}
	@Column(name = "record_amount")
	public Integer getRecordAmount() {
		return recordAmount;
	}
	public void setRecordAmount(Integer recordAmount) {
		this.recordAmount = recordAmount;
	}
	public Integer getPoints() {
		return points;
	}
	public void setPoints(Integer points) {
		this.points = points;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCzrq() {
		return czrq;
	}
	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	@Transient
	public List<SignPatientLabelInfo> getLabelInfos() {
		return labelInfos;
	}
	public void setLabelInfos(List<SignPatientLabelInfo> labelInfos) {
		this.labelInfos = labelInfos;
	}
	public String getMobileRemarks() {
		return mobileRemarks;
	}
	public void setMobileRemarks(String mobileRemarks) {
		this.mobileRemarks = mobileRemarks;
	}
	public Date getOpenidTime() {
		return openidTime;
	}
	public void setOpenidTime(Date openidTime) {
		this.openidTime = openidTime;
	}
	public String getSickVillage() {
		return sickVillage;
	}
	public void setSickVillage(String sickVillage) {
		this.sickVillage = sickVillage;
	}
	public String getSickVillageName() {
		return sickVillageName;
	}
	public void setSickVillageName(String sickVillageName) {
		this.sickVillageName = sickVillageName;
	}
	public Integer getIsWxtag() {
		return isWxtag;
	}
	public void setIsWxtag(Integer isWxtag) {
		this.isWxtag = isWxtag;
	}
	//---------------------------常量----------------------------
	public enum isWchatTage{
		yes(1),no(0);
		isWchatTage(Integer value) {
			this.value = value;
		}
		private Integer value;
		public Integer getValue() {
			return value;
		}
		public void setValue(Integer value) {
			this.value = value;
		}
	}
}

+ 5 - 5
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/PatientExamDao.java

@ -3,17 +3,17 @@
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
 *******************************************************************************/
package com.yihu.mm.repository;
package com.yihu.mm.repository.mm.patient;
import com.yihu.mm.entity.PatientExam;
import com.yihu.mm.entity.patient.PatientExam;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface PatientExamDao extends PagingAndSortingRepository<PatientExam, Long>,JpaSpecificationExecutor<PatientExam> {
public interface PatientExamDao extends PagingAndSortingRepository<PatientExam, String>,JpaSpecificationExecutor<PatientExam> {
	// 查询患者code和试卷编号查询
	// 查询患者code和试卷编号查询
	@Query("select p from PatientExam p where p.code=?1 and p.tpId=?2")
	PatientExam findByPatientAndTpId(String code, String tpId);
	@Query("select p from PatientExam p where p.id=?1 and p.tpId=?2")
	PatientExam findByPatientAndTpId(String id, String tpId);
}
}

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/wlyy/patient/PatientDao.java

@ -6,7 +6,7 @@ package com.yihu.mm.repository.wlyy.patient;
 * Licensed under the Apache License, Version 2.0 (the "License");
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
 *******************************************************************************/
import com.yihu.mm.entity.Patient;
import com.yihu.wlyy.entity.patient.Patient;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.Query;

+ 3 - 3
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PatientExamService.java

@ -6,8 +6,8 @@
package com.yihu.mm.service;
package com.yihu.mm.service;
import com.yihu.mm.entity.PatientExam;
import com.yihu.mm.repository.PatientExamDao;
import com.yihu.mm.entity.patient.PatientExam;
import com.yihu.mm.repository.mm.patient.PatientExamDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
@ -25,7 +25,7 @@ public class PatientExamService{
    private PatientExamDao patientExamDao;
    private PatientExamDao patientExamDao;
    public PatientExam findByPatientAndTpId(String patientCode,String tpId){
    public PatientExam findByPatientAndTpId(String patientCode, String tpId){
        return patientExamDao.findByPatientAndTpId(patientCode,tpId);
        return patientExamDao.findByPatientAndTpId(patientCode,tpId);
    }
    }

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PatientService.java

@ -6,8 +6,8 @@
package com.yihu.mm.service;
package com.yihu.mm.service;
import com.yihu.mm.entity.Patient;
import com.yihu.mm.repository.wlyy.patient.PatientDao;
import com.yihu.mm.repository.wlyy.patient.PatientDao;
import com.yihu.wlyy.entity.patient.Patient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java

@ -1,7 +1,7 @@
package com.yihu.mm.service;
package com.yihu.mm.service;
import com.yihu.mm.entity.Patient;
import com.yihu.mm.util.HttpClientUtil;
import com.yihu.mm.util.HttpClientUtil;
import com.yihu.wlyy.entity.patient.Patient;
import org.json.JSONObject;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;

+ 7 - 10
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptDict.java

@ -20,7 +20,7 @@ public class ZyIvDeptDict extends IdEntity implements java.io.Serializable {
	private String orgCode;//机构编码
	private String orgCode;//机构编码
	private String deptCode;//科室代码
	private String deptCode;//科室代码
	private String deptName;//科室名称
	private String deptName;//科室名称
	private String deptType;//科室类型  详见科室类型字典中定义
	private String deptClass;//科室类型  详见科室类型字典中定义
	private String upperDept;//上级科室
	private String upperDept;//上级科室
	// Constructors
	// Constructors
@ -31,11 +31,10 @@ public class ZyIvDeptDict extends IdEntity implements java.io.Serializable {
	/** full constructor */
	/** full constructor */
	public ZyIvDeptDict(String orgCode, String deptCode, String deptName,
	public ZyIvDeptDict(String orgCode, String deptCode, String deptName,
			String deptType, String upperDept) {
						String deptType, String upperDept) {
		this.orgCode = orgCode;
		this.orgCode = orgCode;
		this.deptCode = deptCode;
		this.deptCode = deptCode;
		this.deptName = deptName;
		this.deptName = deptName;
		this.deptType = deptType;
		this.upperDept = upperDept;
		this.upperDept = upperDept;
	}
	}
@ -66,14 +65,12 @@ public class ZyIvDeptDict extends IdEntity implements java.io.Serializable {
	public void setDeptName(String deptName) {
	public void setDeptName(String deptName) {
		this.deptName = deptName;
		this.deptName = deptName;
	}
	}
	@Column(name = "dept_type", length = 50)
	public String getDeptType() {
		return this.deptType;
	@Column(name = "dept_class", length = 50)
	public String getDeptClass() {
		return deptClass;
	}
	}
	public void setDeptType(String deptType) {
		this.deptType = deptType;
	public void setDeptClass(String deptClass) {
		this.deptClass = deptClass;
	}
	}
	@Column(name = "upper_dept", length = 50)
	@Column(name = "upper_dept", length = 50)

+ 11 - 12
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvPhysicDict.java

@ -27,7 +27,7 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
	private Double minDose;//最小剂量
	private Double minDose;//最小剂量
	private Double packSpec;
	private Double packSpec;
	private Double retailPrice;//零售价
	private Double retailPrice;//零售价
	private String physicFrom;//药品剂型  药品剂型字典中定义
	private String physicForm;//药品剂型  药品剂型字典中定义
	private String toxicologyType;//毒理分类  药品毒理分类字典中定义
	private String toxicologyType;//毒理分类  药品毒理分类字典中定义
	private String basicFlag;//基本药物标志  0:否;1:是
	private String basicFlag;//基本药物标志  0:否;1:是
	private String validFlag;//有效标志 0:无效;1:有效
	private String validFlag;//有效标志 0:无效;1:有效
@ -43,11 +43,11 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
	/** full constructor */
	/** full constructor */
	public ZyIvPhysicDict(String physicCode, String physicName,
	public ZyIvPhysicDict(String physicCode, String physicName,
			String physicSpec, String subjectClass, String doseUnit,
			String quantityUnit, String packUnit, Double minDose,
			Double packSpec, Double retailPrice, String physicFrom,
			String toxicologyType, String basicFlag, String validFlag,
			String spellCode, String wbzxCode, Integer sequence) {
						  String physicSpec, String subjectClass, String doseUnit,
						  String quantityUnit, String packUnit, Double minDose,
						  Double packSpec, Double retailPrice, String physicFrom,
						  String toxicologyType, String basicFlag, String validFlag,
						  String spellCode, String wbzxCode, Integer sequence) {
		this.physicCode = physicCode;
		this.physicCode = physicCode;
		this.physicName = physicName;
		this.physicName = physicName;
		this.physicSpec = physicSpec;
		this.physicSpec = physicSpec;
@ -58,7 +58,6 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
		this.minDose = minDose;
		this.minDose = minDose;
		this.packSpec = packSpec;
		this.packSpec = packSpec;
		this.retailPrice = retailPrice;
		this.retailPrice = retailPrice;
		this.physicFrom = physicFrom;
		this.toxicologyType = toxicologyType;
		this.toxicologyType = toxicologyType;
		this.basicFlag = basicFlag;
		this.basicFlag = basicFlag;
		this.validFlag = validFlag;
		this.validFlag = validFlag;
@ -158,13 +157,13 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
		this.retailPrice = retailPrice;
		this.retailPrice = retailPrice;
	}
	}
	@Column(name = "physic_from", length = 50)
	public String getPhysicFrom() {
		return this.physicFrom;
	@Column(name = "physic_form", length = 50)
	public String getPhysicForm() {
		return physicForm;
	}
	}
	public void setPhysicFrom(String physicFrom) {
		this.physicFrom = physicFrom;
	public void setPhysicForm(String physicForm) {
		this.physicForm = physicForm;
	}
	}
	@Column(name = "toxicology_type", length = 250)
	@Column(name = "toxicology_type", length = 250)

+ 27 - 27
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java

@ -456,7 +456,7 @@ public class PatientPrescriptionPayService extends BaseService {
            response.getWriter().write(e.getMessage());
            response.getWriter().write(e.getMessage());
        }
        }
        //                记录log日志到数据库
        //                记录log日志到数据库
        logService.saveHttpLog(isSuccess, config.getReturnUrl(), "长处方支付页面跳转", "POST", null, "", responses, error, logService.onepayType);
        logService.saveHttpLog(isSuccess, config.getRecipeReturnUrl(), "长处方支付页面跳转", "POST", null, "", responses, error, logService.onepayType);
        //记录支付log日志到数据库
        //记录支付log日志到数据库
        payLogService.addLog(prescription, 2, flag, 1);
        payLogService.addLog(prescription, 2, flag, 1);
        return resultMap;
        return resultMap;
@ -753,6 +753,32 @@ public class PatientPrescriptionPayService extends BaseService {
                expressage.setExpressageHospitalName("顺丰快递");
                expressage.setExpressageHospitalName("顺丰快递");
                expressage.setCreateTime(now);//创建时间
                expressage.setOneselfPickupFlg(0);//是否自取 1是 0否
                expressage.setDel(1);//有效
                break;
            case 3:
                prescription.setDispensaryType(3);//取药类型:1 自取 2快递配送 3健管师配送
                //健管师配送
                expressage.setName(userName);//居民姓名
                expressage.setProvinceCode(userProvince);//省代码
                expressage.setProvinceName(userProvinceName);//省名称
                expressage.setCityCode(userCity);//市代码
                expressage.setCityName(userCityName);//市名称
                expressage.setTownCode(userTown);//区code
                expressage.setTownName(userTownName);//区名称
                expressage.setStreetCode(userStreet);//街道code
                expressage.setStreetName(userStreetName);//街道名称
                expressage.setAddress(userAddress);//居民详细地址
                //居民选择的要送达的服务站
                String userOrgCode = addressInfo.getString("code");
                String userOrgName = addressInfo.getString("name");
                String userOrgAddress = addressInfo.getString("address");
                expressage.setPatientHospitalCode(userOrgCode);
                expressage.setPatientHospitalName(userOrgName);
                expressage.setPatientHospitalAddress(userOrgAddress);
                expressage.setCreateTime(now);//创建时间
                expressage.setCreateTime(now);//创建时间
                expressage.setOneselfPickupFlg(0);//是否自取 1是 0否
                expressage.setOneselfPickupFlg(0);//是否自取 1是 0否
                expressage.setDel(1);//有效
                expressage.setDel(1);//有效
@ -793,32 +819,6 @@ public class PatientPrescriptionPayService extends BaseService {
                message.setRelationCode(prescriptionCode);//业务关联code 续方code
                message.setRelationCode(prescriptionCode);//业务关联code 续方code
                messageDao.save(message);
                messageDao.save(message);
                break;
                break;
            case 3:
                prescription.setDispensaryType(3);//取药类型:1 自取 2快递配送 3健管师配送
                //健管师配送
                expressage.setName(userName);//居民姓名
                expressage.setProvinceCode(userProvince);//省代码
                expressage.setProvinceName(userProvinceName);//省名称
                expressage.setCityCode(userCity);//市代码
                expressage.setCityName(userCityName);//市名称
                expressage.setTownCode(userTown);//区code
                expressage.setTownName(userTownName);//区名称
                expressage.setStreetCode(userStreet);//街道code
                expressage.setStreetName(userStreetName);//街道名称
                expressage.setAddress(userAddress);//居民详细地址
                //居民选择的要送达的服务站
                String userOrgCode = addressInfo.getString("code");
                String userOrgName = addressInfo.getString("name");
                String userOrgAddress = addressInfo.getString("address");
                expressage.setPatientHospitalCode(userOrgCode);
                expressage.setPatientHospitalName(userOrgName);
                expressage.setPatientHospitalAddress(userOrgAddress);
                expressage.setCreateTime(now);//创建时间
                expressage.setOneselfPickupFlg(0);//是否自取 1是 0否
                expressage.setDel(1);//有效
                break;
        }
        }

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

@ -366,7 +366,8 @@ public class PrescriptionInfoService extends BaseService {
            if(st==200&&"1".equals(code)&&data.getJSONArray("returnData").size()>0){
            if(st==200&&"1".equals(code)&&data.getJSONArray("returnData").size()>0){
                //开方成功返回遗嘱号
                //开方成功返回遗嘱号
                com.alibaba.fastjson.JSONArray returnDatas = data.getJSONArray("returnData");
                com.alibaba.fastjson.JSONArray returnDatas = data.getJSONArray("returnData");
                com.alibaba.fastjson.JSONObject returnData = (com.alibaba.fastjson.JSONObject)returnDatas.get(0);
                com.alibaba.fastjson.JSONArray reData = (com.alibaba.fastjson.JSONArray)returnDatas.get(0);
                com.alibaba.fastjson.JSONObject returnData = (com.alibaba.fastjson.JSONObject)reData.get(0);
                p.setVisitNo(returnData.getString("VISIT_NO"));
                p.setVisitNo(returnData.getString("VISIT_NO"));
                p.setRecipeNo(returnData.getString("RECIPE_NO"));
                p.setRecipeNo(returnData.getString("RECIPE_NO"));
                prescriptionDao.save(p);
                prescriptionDao.save(p);

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -389,8 +389,9 @@ public class WechatController extends WeixinBaseController {
                    loginLogService.saveLog(loginLog);
                    loginLogService.saveLog(loginLog);
                    //判断是否打过标签
                    //判断是否打过标签
                   //if (!(Patient.isWchatTage.yes.getValue() == p.getIsWxtag())) {
                   //if (!(Patient.isWchatTage.yes.getValue() == p.getIsWxtag())) {
                        //给患者打微信标签
                        weiXinTagUtil.addTagWithOpenid(openid, p.getCode(), p.getName());
                    //给患者打微信标签
                    weiXinTagUtil.addTagWithOpenid(openid, p.getCode(), p.getName());
                    //}
                    //}
                    return write(200, "登录成功", "data", map);
                    return write(200, "登录成功", "data", map);
                } else {
                } else {

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

@ -1,6 +1,7 @@
package com.yihu.wlyy.web.doctor.prescription;
package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDispensaryCode;
import com.yihu.wlyy.service.app.prescription.PrescriptionDispensaryCodeService;
import com.yihu.wlyy.service.app.prescription.PrescriptionDispensaryCodeService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
@ -154,4 +155,23 @@ public class PrescriptionCodeController extends BaseController{
        }
        }
    }
    }
    /**
     * 扫码
     * @param code
     * @return
     */
    @RequestMapping(value = "/dispensaryCode/scanQrcode",method = RequestMethod.GET)
    @ObserverRequired
    @ResponseBody
    public String scanQrcode(
            @RequestParam(value = "code",required = true) String code){
        try {
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.scanQrcode(code);
            return write(200, "扫码成功!", "data", prescriptionDispensaryCode);
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
}
}

+ 2 - 18
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java

@ -166,23 +166,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
        }
        }
    }
    }
    /**
     * 扫码
     * @param code
     * @return
     */
    @RequestMapping(value = "/dispensaryCode/scanQrcode",method = RequestMethod.GET)
    @ResponseBody
    public String scanQrcode(
            @RequestParam(value = "code",required = true) String code){
        try {
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.scanQrcode(code);
            return write(200, "扫码成功!", "data", prescriptionDispensaryCode);
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    /**
    /**
     * 判断该居民是否有待取的药的接口
     * 判断该居民是否有待取的药的接口
@ -229,7 +213,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            //获取配送信息
            //获取配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            jo.put("prescriptionExpressage", prescriptionExpressage);
            jo.put("prescriptionExpressage", new JSONObject(prescriptionExpressage));
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionHospital", prescription.getHospitalName());//出药机构
            jo.put("prescriptionHospital", prescription.getHospitalName());//出药机构