Browse Source

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

yeshijie 7 years ago
parent
commit
f813988566
14 changed files with 1181 additions and 374 deletions
  1. 23 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/BaseController.java
  2. 18 5
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java
  3. 4 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionDiagnosis.java
  4. 427 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionExpressage.java
  5. 458 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionPay.java
  6. 20 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java
  7. 19 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java
  8. 2 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java
  9. 42 8
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/prescription/PrescriptionService.java
  10. 32 29
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp
  11. 78 85
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp
  12. 11 136
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order.jsp
  13. 47 107
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order_js.jsp
  14. 0 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java

+ 23 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/BaseController.java

@ -233,6 +233,28 @@ public class BaseController {
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	
	/**
	 * 返回接口处理结果
	 *
	 *
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, com.alibaba.fastjson.JSONObject value) {
		try {
			com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			json.put(key, value);
			return json.toJSONString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
@ -378,6 +400,7 @@ public class BaseController {
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, value);
			System.out.println(mapper.writeValueAsString(map));
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);

+ 18 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java

@ -68,12 +68,25 @@ public class PrescriptionStaticController extends BaseController {
			return error(-1, "操作失败!");
		}
	}
	
	@RequestMapping(value = "/getinfo", method = RequestMethod.GET)
	@ApiOperation(value = "续方详情")
	public String getContinuedPrescriptionAsDoctor(@RequestParam(required = true) @ApiParam(value = "续方CODE", name = "code") String code) {
	@ResponseBody
	@RequestMapping(value = "getinfo/{code}",method = RequestMethod.GET)
	public String getinfo(
			@PathVariable(value = "code") String code) {
		try {
			com.alibaba.fastjson.JSONObject result = prescriptionService.getinfo(code);
			return write(200,"操作成功!","data",result);
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");
		}
	}
	@ResponseBody
	@RequestMapping(value = "getorder/{code}",method = RequestMethod.GET)
	public String getorder(
			@PathVariable(value = "code") String code) {
		try {
			return write(200, "查询成功!", "data", prescriptionService.getContinuedPrescriptionAsDoctor(code));
			com.alibaba.fastjson.JSONObject result = prescriptionService.getorder(code);
			return write(200,"操作成功!","data",result);
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");

+ 4 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionDiagnosis.java

@ -3,12 +3,16 @@ package com.yihu.wlyy.entity.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:57
 */
@Entity
@Table(name = "wlyy_prescription_diagnosis")
public class PrescriptionDiagnosis  extends IdEntity {
	
	private String code;

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

@ -0,0 +1,427 @@
package com.yihu.wlyy.entity.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;
/**
 * @author huangwenjie
 * @date 2017/12/20 20:29
 */
@Entity
@Table(name = "wlyy_prescription_expressage")
public class PrescriptionExpressage extends IdEntity {
	
	private String code;                    //业务code
	private String prescriptionCode;      //处方code  关联表wlyy_prescription code
	private String mailno;                  //快递单号
	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 Integer price;                    //快递的配送费用 单位是分
	private Integer weight;                  //快递重量  单位是g
	
	//患者填写的需要送达的机构信息
	private String  patientHospitalAddress;         // 患者填写的需要送达的机构地址
	private String  patientHospitalName;            // 患者填写的需要送达的机构名称
	private String  patientHospitalCode;            // 患者填写的需要送达的机构code
	
	
	//配药机构信息
	private String hospitalAddress;         // 配药机构地址
	private String hospitalName;            // 配药机构名称
	private String hospitalCode;            // 配药机构code
	private String hospitalDoctor;          // 配药机构出药人(健管师或者称工作人员)
	private String hospitalDoctorCode;     // 配药机构出药人code
	private Date fetchingMedicineTime;    //配药机构出药时间
	
	//配送人信息
	private String expressageHospitalName;            // 如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
	private String expressageHospitalAddress;         // 配送机构地址
	private String expressageHospitalCode;            //配送机构code
	private String expressageName;          //配送人名称
	private String expressageCode;          //配送人code
	private String expressageMobile;        //配送人电话
	private Date expressageTime;                //开始配送的时间
	
	//医院接收快递信息
	private String acceptMobile;        //医院药品接收人电话
	private String acceptCode;        //医院药品接收人Code
	private String acceptName;        //医院药品接收人名称
	private String acceptHospital;        //医院药品接收人名称
	private String acceptHospitalName;        //医院药品接收人名称
	private String acceptHospitalAddress;        //医院药品接收人名称
	private Date acceptTime;                //接收的时间
	
	
	private Integer oneselfPickupFlg;//是否自取 1是 0否
	private Date createTime;                //创建的时间
	private Integer del;    //1可用 0删除
	
	private Date deliveryTime; //送达时间
	
	public String getHospitalCode() {
		return hospitalCode;
	}
	
	public void setHospitalCode(String hospitalCode) {
		this.hospitalCode = hospitalCode;
	}
	
	@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 Integer getPrice() {
		return price;
	}
	
	public void setPrice(Integer 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;
	}
	
	public Integer getOneselfPickupFlg() {
		return oneselfPickupFlg;
	}
	
	public void setOneselfPickupFlg(Integer oneselfPickupFlg) {
		this.oneselfPickupFlg = oneselfPickupFlg;
	}
	
	public String getMailno() { return mailno; }
	
	public void setMailno(String mailno) { this.mailno = mailno; }
	
	public String getExpressageName() {
		return expressageName;
	}
	
	public void setExpressageName(String expressageName) {
		this.expressageName = expressageName;
	}
	
	public String getExpressageCode() {
		return expressageCode;
	}
	
	public void setExpressageCode(String expressageCode) {
		this.expressageCode = expressageCode;
	}
	
	public String getExpressageMobile() {
		return expressageMobile;
	}
	
	public void setExpressageMobile(String expressageMobile) {
		this.expressageMobile = expressageMobile;
	}
	
	public Integer getWeight() {
		return weight;
	}
	
	public void setWeight(Integer weight) {
		this.weight = weight;
	}
	
	public Integer getDel() {
		return del;
	}
	
	public void setDel(Integer del) {
		this.del = del;
	}
	
	public String getHospitalAddress() {
		return hospitalAddress;
	}
	
	public void setHospitalAddress(String hospitalAddress) {
		this.hospitalAddress = hospitalAddress;
	}
	
	public String getAcceptMobile() {
		return acceptMobile;
	}
	
	public void setAcceptMobile(String acceptMobile) {
		this.acceptMobile = acceptMobile;
	}
	
	public String getAcceptCode() {
		return acceptCode;
	}
	
	public void setAcceptCode(String acceptCode) {
		this.acceptCode = acceptCode;
	}
	
	public String getAcceptName() {
		return acceptName;
	}
	
	public void setAcceptName(String acceptName) {
		this.acceptName = acceptName;
	}
	
	public String getAcceptHospital() {
		return acceptHospital;
	}
	
	public void setAcceptHospital(String acceptHospital) {
		this.acceptHospital = acceptHospital;
	}
	
	public String getAcceptHospitalName() {
		return acceptHospitalName;
	}
	
	public void setAcceptHospitalName(String acceptHospitalName) {
		this.acceptHospitalName = acceptHospitalName;
	}
	
	public Date getExpressageTime() {
		return expressageTime;
	}
	
	public void setExpressageTime(Date expressageTime) {
		this.expressageTime = expressageTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getAcceptTime() {
		return acceptTime;
	}
	
	public void setAcceptTime(Date acceptTime) {
		this.acceptTime = acceptTime;
	}
	
	public String getExpressageHospitalName() {
		return expressageHospitalName;
	}
	
	public void setExpressageHospitalName(String expressageHospitalName) {
		this.expressageHospitalName = expressageHospitalName;
	}
	
	public String getExpressageHospitalAddress() {
		return expressageHospitalAddress;
	}
	
	public void setExpressageHospitalAddress(String expressageHospitalAddress) {
		this.expressageHospitalAddress = expressageHospitalAddress;
	}
	
	public String getExpressageHospitalCode() {
		return expressageHospitalCode;
	}
	
	public void setExpressageHospitalCode(String expressageHospitalCode) {
		this.expressageHospitalCode = expressageHospitalCode;
	}
	
	public String getPatientHospitalAddress() {
		return patientHospitalAddress;
	}
	
	public void setPatientHospitalAddress(String patientHospitalAddress) {
		this.patientHospitalAddress = patientHospitalAddress;
	}
	
	public String getPatientHospitalName() {
		return patientHospitalName;
	}
	
	public void setPatientHospitalName(String patientHospitalName) {
		this.patientHospitalName = patientHospitalName;
	}
	
	public String getPatientHospitalCode() {
		return patientHospitalCode;
	}
	
	public void setPatientHospitalCode(String patientHospitalCode) {
		this.patientHospitalCode = patientHospitalCode;
	}
	
	public String getAcceptHospitalAddress() {
		return acceptHospitalAddress;
	}
	
	public void setAcceptHospitalAddress(String acceptHospitalAddress) {
		this.acceptHospitalAddress = acceptHospitalAddress;
	}
	
	public String getHospitalDoctor() {
		return hospitalDoctor;
	}
	
	public void setHospitalDoctor(String hospitalDoctor) {
		this.hospitalDoctor = hospitalDoctor;
	}
	
	public String getHospitalDoctorCode() {
		return hospitalDoctorCode;
	}
	
	public void setHospitalDoctorCode(String hospitalDoctorCode) {
		this.hospitalDoctorCode = hospitalDoctorCode;
	}
	
	public Date getFetchingMedicineTime() {
		return fetchingMedicineTime;
	}
	
	public void setFetchingMedicineTime(Date fetchingMedicineTime) {
		this.fetchingMedicineTime = fetchingMedicineTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getDeliveryTime() {
		return deliveryTime;
	}
	
	public void setDeliveryTime(Date deliveryTime) {
		this.deliveryTime = deliveryTime;
	}
}

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

@ -0,0 +1,458 @@
package com.yihu.wlyy.entity.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by chenweida on 2017/7/26.
 * 处方支付实体
 */
@Entity
@Table(name = "wlyy_prescription_pay")
public class PrescriptionPay extends IdEntity {
	
	private String code;//接入应用业务流水号outChargeNo
	private String prescriptionCode;//开处方的医生code 关联 wlyy_prescription
	private Integer type;//1 医保支付
	private Date outChargeTime;//接入应用时间
	private String channel;//支付方式
	private String chargeNo;//支付平台流水号
	private Date chargeTime;//支付平台交易成功时间
	private String billNo;//待结算费用单据号
	private String cardNo;//医保卡号
	private Integer totalAmount;//交易总金额
	private Integer insuranceAmount;//医保支付金额
	private Integer selfPayAmount;//自付金额
	private String openid;//用户openID
	private String userName;//用户名字
	private String idType;//证件类型
	private String idNo;//证件号码
	private String tradeStatus;//交易状态
	private String miSettleNo;//医保收费单据号
	private String miRegisterNo;//医保挂号
	private Date miCollectDate;//收费日期
	private Date miCollectTime;//收费时间
	private String miCollectorName;//收费人姓名
	private Integer miTotalFee;//本次报销总额
	private Integer selfPay;//个人现金支付
	private Integer accountPay;//个人账户支付
	private Integer heathPay;//健康账户支付
	private Integer cadresPay;//公务员补助
	private Integer fundPay;//基金支付
	private Integer healthCarePay;//保健基金支付
	private Integer commercePay;//商业保险支付
	private Integer familyPay;//共济账户支付
	private Integer civilPay;//民政补助金额
	private String civilZone;//民政行政区号
	private Integer bdrugPay;//乙类支付金额
	private Integer unlessAmount;//非医保费用
	private Integer exceedAmount;//超封顶线金额
	private Integer accountBalance;//个人账户余额
	private Integer healthBalance;//健康账户余额
	private String recipeContent;//处方主信息
	private String zdlist;//诊断明细
	private String mxlist;//处方明细
	private Date createTime;//续方确认支付时间
	private Date czrq;//续方记录最后操作时间
	//    易联众新增查询返回字段v1.3.7
	private String medOrgNo;//医疗机构编号
	private String medOrgName;//医疗机构名称
	private Date traceTime;//交易成功时间
	private String traceNo;//支付平台跟踪号
	
	private String principalCardNo;//实际签约卡号
	
	public String getPrincipalCardNo() {
		return principalCardNo;
	}
	
	public void setPrincipalCardNo(String principalCardNo) {
		this.principalCardNo = principalCardNo;
	}
	
	public Date getTraceTime() {
		return traceTime;
	}
	
	public void setTraceTime(Date traceTime) {
		this.traceTime = traceTime;
	}
	
	public String getTraceNo() {
		return traceNo;
	}
	
	public void setTraceNo(String traceNo) {
		this.traceNo = traceNo;
	}
	
	public String getMedOrgNo() {
		return medOrgNo;
	}
	
	public void setMedOrgNo(String medOrgNo) {
		this.medOrgNo = medOrgNo;
	}
	
	public String getMedOrgName() {
		return medOrgName;
	}
	
	public void setMedOrgName(String medOrgName) {
		this.medOrgName = medOrgName;
	}
	
	public Integer getAccountBalance() {
		return accountBalance;
	}
	
	public void setAccountBalance(Integer accountBalance) {
		this.accountBalance = accountBalance;
	}
	
	public Integer getHealthBalance() {
		return healthBalance;
	}
	
	public void setHealthBalance(Integer healthBalance) {
		this.healthBalance = healthBalance;
	}
	
	public String getRecipeContent() {
		return recipeContent;
	}
	
	public void setRecipeContent(String recipeContent) {
		this.recipeContent = recipeContent;
	}
	
	public String getZdlist() {
		return zdlist;
	}
	
	public void setZdlist(String zdlist) {
		this.zdlist = zdlist;
	}
	
	public String getMxlist() {
		return mxlist;
	}
	
	public void setMxlist(String mxlist) {
		this.mxlist = mxlist;
	}
	
	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 Integer getType() {
		return type;
	}
	
	public void setType(Integer type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getOutChargeTime() {
		return outChargeTime;
	}
	
	public void setOutChargeTime(Date outChargeTime) {
		this.outChargeTime = outChargeTime;
	}
	
	public String getChannel() {
		return channel;
	}
	
	public void setChannel(String channel) {
		this.channel = channel;
	}
	
	public String getChargeNo() {
		return chargeNo;
	}
	
	public void setChargeNo(String chargeNo) {
		this.chargeNo = chargeNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getChargeTime() {
		return chargeTime;
	}
	
	public void setChargeTime(Date chargeTime) {
		this.chargeTime = chargeTime;
	}
	
	public String getBillNo() {
		return billNo;
	}
	
	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}
	
	public String getCardNo() {
		return cardNo;
	}
	
	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
	
	public Integer getTotalAmount() {
		return totalAmount;
	}
	
	public void setTotalAmount(Integer totalAmount) {
		this.totalAmount = totalAmount;
	}
	
	public Integer getInsuranceAmount() {
		return insuranceAmount;
	}
	
	public void setInsuranceAmount(Integer insuranceAmount) {
		this.insuranceAmount = insuranceAmount;
	}
	
	public Integer getSelfPayAmount() {
		return selfPayAmount;
	}
	
	public void setSelfPayAmount(Integer selfPayAmount) {
		this.selfPayAmount = selfPayAmount;
	}
	
	public String getOpenid() {
		return openid;
	}
	
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	public String getUserName() {
		return userName;
	}
	
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getIdType() {
		return idType;
	}
	
	public void setIdType(String idType) {
		this.idType = idType;
	}
	
	public String getIdNo() {
		return idNo;
	}
	
	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}
	
	public String getTradeStatus() {
		return tradeStatus;
	}
	
	public void setTradeStatus(String tradeStatus) {
		this.tradeStatus = tradeStatus;
	}
	
	public String getMiSettleNo() {
		return miSettleNo;
	}
	
	public void setMiSettleNo(String miSettleNo) {
		this.miSettleNo = miSettleNo;
	}
	
	public String getMiRegisterNo() {
		return miRegisterNo;
	}
	
	public void setMiRegisterNo(String miRegisterNo) {
		this.miRegisterNo = miRegisterNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getMiCollectDate() {
		return miCollectDate;
	}
	
	public void setMiCollectDate(Date miCollectDate) {
		this.miCollectDate = miCollectDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getMiCollectTime() {
		return miCollectTime;
	}
	
	public void setMiCollectTime(Date miCollectTime) {
		this.miCollectTime = miCollectTime;
	}
	
	public String getMiCollectorName() {
		return miCollectorName;
	}
	
	public void setMiCollectorName(String miCollectorName) {
		this.miCollectorName = miCollectorName;
	}
	
	public Integer getMiTotalFee() {
		return miTotalFee;
	}
	
	public void setMiTotalFee(Integer miTotalFee) {
		this.miTotalFee = miTotalFee;
	}
	
	public Integer getSelfPay() {
		return selfPay;
	}
	
	public void setSelfPay(Integer selfPay) {
		this.selfPay = selfPay;
	}
	
	public Integer getAccountPay() {
		return accountPay;
	}
	
	public void setAccountPay(Integer accountPay) {
		this.accountPay = accountPay;
	}
	
	public Integer getHeathPay() {
		return heathPay;
	}
	
	public void setHeathPay(Integer heathPay) {
		this.heathPay = heathPay;
	}
	
	public Integer getCadresPay() {
		return cadresPay;
	}
	
	public void setCadresPay(Integer cadresPay) {
		this.cadresPay = cadresPay;
	}
	
	public Integer getFundPay() {
		return fundPay;
	}
	
	public void setFundPay(Integer fundPay) {
		this.fundPay = fundPay;
	}
	
	public Integer getHealthCarePay() {
		return healthCarePay;
	}
	
	public void setHealthCarePay(Integer healthCarePay) {
		this.healthCarePay = healthCarePay;
	}
	
	public Integer getCommercePay() {
		return commercePay;
	}
	
	public void setCommercePay(Integer commercePay) {
		this.commercePay = commercePay;
	}
	
	public Integer getFamilyPay() {
		return familyPay;
	}
	
	public void setFamilyPay(Integer familyPay) {
		this.familyPay = familyPay;
	}
	
	public Integer getCivilPay() {
		return civilPay;
	}
	
	public void setCivilPay(Integer civilPay) {
		this.civilPay = civilPay;
	}
	
	public String getCivilZone() {
		return civilZone;
	}
	
	public void setCivilZone(String civilZone) {
		this.civilZone = civilZone;
	}
	
	public Integer getBdrugPay() {
		return bdrugPay;
	}
	
	public void setBdrugPay(Integer bdrugPay) {
		this.bdrugPay = bdrugPay;
	}
	
	public Integer getUnlessAmount() {
		return unlessAmount;
	}
	
	public void setUnlessAmount(Integer unlessAmount) {
		this.unlessAmount = unlessAmount;
	}
	
	public Integer getExceedAmount() {
		return exceedAmount;
	}
	
	public void setExceedAmount(Integer exceedAmount) {
		this.exceedAmount = exceedAmount;
	}
	
	@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;
	}
	
	@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;
	}
}

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

@ -0,0 +1,20 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionExpressage;
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 and p.del=1")
	PrescriptionExpressage findByPrescriptionPay(String prescriptionCode);
	
	@Query("from PrescriptionExpressage p where p.mailno=?1")
	PrescriptionExpressage findByPrescriptionExpressMailno(String mailno);
	
	@Query(" from PrescriptionExpressage p where p.prescriptionCode=?1 and p.del=1")
	PrescriptionExpressage findByPrescriptionCode(String prescriptionCode);
}

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

@ -0,0 +1,19 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.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 PrescriptionPayDao extends PagingAndSortingRepository<PrescriptionPay, Long>, JpaSpecificationExecutor<PrescriptionPay> {
	//    查询已经支付成功的支付记录
	@Query("from PrescriptionPay p where p.prescriptionCode=?1 and p.tradeStatus=1")
	PrescriptionPay findByPrescriptionPay(String prescriptionCode);
	
	//查询支付记录
	@Query("from PrescriptionPay p where p.code=?1 ")
	PrescriptionPay findByCode(String code);
}

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java

@ -196,8 +196,8 @@ public class UserService extends BaseJpaService<User,UserDao> {
            String[] codes = code.split(",");
            List<ManageDictEntry> manageDictEntries = manageDictEntryDao.findByDictIdAndCodes(dictId, codes);
            if (null != manageDictEntries && manageDictEntries.size() > 0) {
//                return manageDictEntries.get(0).getValue();
                return "http://localhost:8180/admin/main";
                return manageDictEntries.get(0).getValue();
//                return "http://localhost:8180/admin/main";
            }
        }
        return null;

+ 42 - 8
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/prescription/PrescriptionService.java

@ -1,8 +1,10 @@
package com.yihu.wlyy.service.prescription;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.entity.prescription.*;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -42,7 +44,13 @@ public class PrescriptionService {
	PatientDao patientDao;
	
	@Autowired
	private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
	PrescriptionDiagnosisDao prescriptionDiagnosisDao;
	
	@Autowired
	PrescriptionExpressageDao prescriptionExpressageDao;
	
	@Autowired
	PrescriptionPayDao prescriptionPayDao;
	
	public List<PrescriptionVO> getPrescriptionList(String hospital,
	                                                String disease,
@ -270,20 +278,18 @@ public class PrescriptionService {
	 * @param code
	 * @return
	 */
	public com.alibaba.fastjson.JSONObject getContinuedPrescriptionAsDoctor(String code) {
	public com.alibaba.fastjson.JSONObject getinfo(String code) {
		Prescription prescription = prescriptionDao.findByCode(code);
		List<PrescriptionInfo> prescriptionInfos = prescriptionInfoDao.findByPrescriptionCode(code);
		PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
		List<PrescriptionAdjust> prescriptionAdjusts = prescriptionAdjustDao.findByPrescriptionCodeOrderByIdDesc(code);
		com.alibaba.fastjson.JSONObject rs = new com.alibaba.fastjson.JSONObject();
		prescription.setStatusName("");
		rs.put("prescription", prescription);
		rs.put("createTime", DateUtil.dateToStrLong(prescription.getCreateTime()));
		rs.put("reviewedTime",DateUtil.dateToStrLong(reviewed.getCreateTime()));
		rs.put("prescriptionInfo", prescriptionInfos);
		rs.put("reviewed", reviewed);
//        if(prescription!=null&&StringUtils.isNotBlank(prescription.getDoctor())){
//            rs.put("doctor",doctorDao.findByCode(prescription.getDoctor()));
//        }else{
//            rs.put("doctor","");
//        }
		if (prescription != null && StringUtils.isNotBlank(prescription.getPatient())) {
			rs.put("patient", patientDao.findByCode(prescription.getPatient()));
		} else {
@ -296,7 +302,35 @@ public class PrescriptionService {
		} else {
			rs.put("prescriptionAdjust", "");
		}
		
		return rs;
	}
	
	/**
	 * 获取续方信息
	 *
	 * @param code
	 * @return
	 */
	public com.alibaba.fastjson.JSONObject getorder(String code) {
		JSONObject jo = new JSONObject();
		//获取处方信息
		Prescription prescription = prescriptionDao.findByCode(code);
		//获取付款信息
		PrescriptionPay prescriptionPay = prescriptionPayDao.findByPrescriptionPay(code);
		//获取配送信息
		PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionCode(code);
		jo.put("prescriptionExpressage", prescriptionExpressage);
		jo.put("prescriptionPay", prescriptionPay);
		if (prescription != null) {
			jo.put("createTime", prescription.getCreateTime());//创建时间
			jo.put("doctorName", prescription.getDoctorName());//审核医生
			jo.put("prescriptionHospital", prescription.getHospitalName());//出药机构
			jo.put("dispensaryDispensaryType", prescription.getDispensaryType());//处方配送方式
			jo.put("dispensaryDispensaryTypeName", prescription.getDispensaryTypeName());//处方配送方式
			jo.put("prescriptionStatus", prescription.getStatus());//处方状态
			jo.put("prescriptionStatusName", prescription.getStatusName(prescription.getStatus(), "",""));//处方状态名称
			jo.put("ssc",prescription.getSsc());//医保卡号
		}
		return jo;
	}
}

+ 32 - 29
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp

@ -33,18 +33,18 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input readonly id="patientName" class="fd-input" type="text"   />
            </div>
            <label class="label_title fd-label">医保卡号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
                <input readonly id="ssc" class="fd-input" type="text"  />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">身份证号</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input readonly id="idcard" class="fd-input" type="text"   />
            </div>
        </div>
@ -55,9 +55,9 @@
            <label class="label_title fd-label">临床诊断</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <label class="label_title fd-label">诊断结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input readonly id="diagnosisinfo" class="fd-input" type="text"   />
            </div>
        </div>
@ -66,20 +66,23 @@
        <div style="margin-left:10px;">
            <label class="label_title fd-label">RP.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        <div id="prescriptionInfo_div" class="m-form-group" style="border-top: solid 1px #ccc;">
            <%--<label class="label_title fd-label">药品名称1 </label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input readonly value="" class="fd-input" type="text"   />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label"> 用法:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"   />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">总量:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"  />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">规格:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"   />--%>
            <%--</div>--%>
        </div>
@ -89,11 +92,11 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="prescriptionStatueName" readonly class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">续方说明:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="reason" readonly class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
@ -104,28 +107,28 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="createTime" readonly class="fd-input" type="text"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
                <input id="doctorName" readonly class="fd-input" type="text"   />
            </div>
        </div>
        <div style="margin-left:10px;">
        <div class="m-form-group" style="">
            <label class="label_title fd-label">审核机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="hospitalName" readonly class="fd-input" type="text" />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <label class="label_title fd-label">审核时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="reviewedTime" readonly class="fd-input" type="text"  />
            </div>
        </div>
        <div style="margin-left:10px;">
        <div  class="m-form-group" style="">
            <label class="label_title fd-label">结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="presult" readonly class="fd-input" type="text"  />
            </div>
        </div>
    </div>

+ 78 - 85
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp

@ -18,109 +18,102 @@
            rolesInfo = {
                init: function () {
                    _this = this;
                    var id = $("#code").val();
                    var code = $("#code").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                    if (isNoEmpty(code)) {
                        $.ajax({
                            url: ctx + "/admin/static/prescription/getinfo",
                            url: ctx + "/admin/static/prescription/getinfo/"+code,
                            method: "get",
                            dataType: "json",
                            data: {id: id},
                            async: false,
                            success: function (result) {
                                alert(result.toString())
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    //续方居民姓名
                                    var patientName = data.prescription.patientName;
                                    $('#patientName').val(patientName);
                                    //居民社保卡
                                    var ssc = data.patient.ssc;
                                    $('#ssc').val(ssc);
                                    //身份证号
                                    var idcard = data.patient.idcard;
                                    $('#idcard').val(idcard);
                                    //诊断
                                    var diagnosisinfo = "";
                                    var diagnosis = data.diagnosis;
                                    if(diagnosis.length > 0){
                                        for (var i=0;i<diagnosis.length;i++)
                                        {
                                            if(i != 0){
                                                diagnosisinfo = diagnosisinfo +"/"
                                            }
                                            diagnosisinfo = diagnosisinfo + diagnosis[i].healthProblemName;
                                        }
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    $('#diagnosisinfo').val(diagnosisinfo);
                                    //药品信息
                                    var prescriptionInfo =  data.prescriptionInfo;
                                    if(prescriptionInfo.length >0){
                                        var prescriptionInfoStr = "";
                                        for (var i=0;i<prescriptionInfo.length;i++)
                                        {
                                            var str = "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp药品信息:"+prescriptionInfo[i].drugName+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp用法:"+prescriptionInfo[i].usageName+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp每次 "+prescriptionInfo[i].physicDose+prescriptionInfo[i].drugNumUnitName+prescriptionInfo[i].drugRateName;
                                            str += "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp总量:"+prescriptionInfo[i].physicAmountUnit+prescriptionInfo[i].physicAmountUnitName;
                                            str += "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp规格:"+prescriptionInfo[i].drugFormat;
                                            prescriptionInfoStr += "<a style=\"margin-left:10px;\">"+str+"</a><br>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+str+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">用法:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].usageName+" 每次 "+prescriptionInfo[i].physicDose+prescriptionInfo[i].drugNumUnitName+prescriptionInfo[i].drugRateName+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">总量:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].physicAmountUnit+prescriptionInfo[i].physicAmountUnitName+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">规格:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].drugFormat+"\" class=\"fd-input\" type=\"text\"   /></div><br>";
                                        }
                                    }
                                    $('#prescriptionInfo_div').html(prescriptionInfoStr)
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    //续方状态
                                    var prescriptionStatueName = data.prescription.statusName;
                                    $('#prescriptionStatueName').val(prescriptionStatueName)
                                    //续方说明
                                    var reason = data.prescription.reason;
                                    $('#reason').val(reason)
                                    //申请时间
                                    var createTime = data.createTime;
                                    $('#createTime').val(createTime);
                                    //审核医生
                                    var doctorName = data.prescription.doctorName;
                                    $('#doctorName').val(doctorName);
                                    //审核机构
                                    var hospitalName = data.prescription.hospitalName;
                                    $('#hospitalName').val(hospitalName);
                                    //审核时间
                                    var reviewedTime = data.reviewedTime;
                                    $('#reviewedTime').val(reviewedTime);
                                    //审核结果
                                    var status = data.prescription.status;
                                    if(status > 1){
                                        $('#presult').val("审核通过")
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                        $('#presult').val("审核未通过")
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */

+ 11 - 136
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order.jsp

@ -14,28 +14,6 @@
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
@ -44,173 +22,70 @@
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <%--<div style="margin-left:10px;">--%>
            <%--<label class="label_title fd-label">续方记录</label>--%>
        <%--</div>--%>
        <%--<div class="m-form-group" style="border-top: solid 1px #ccc;">--%>
            <%--<label class="label_title fd-label">申请时间:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">审核医生:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"  class="min-length-6 validate-special-char" />--%>
            <%--</div>--%>
        <%--</div>--%>
        <input type="hidden" id="code" value='${code}'/>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">收药信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">配送方式:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="dispensaryDispensaryTypeName" readonly class="fd-input" type="text"   />
            </div>
            <label class="label_title fd-label">配送地点:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
                <input id="expressaddress" readonly class="fd-input" type="text"   />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">居民姓名</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="patientname" readonly class="fd-input" type="text"  />
            </div>
            <label class="label_title fd-label">居民电话</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="phone" readonly class="fd-input" type="text"   />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">配送员</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="expressageName" readonly class="fd-input" type="text"  />
            </div>
            <label class="label_title fd-label">服务站地址</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="expressageHospitalAddress" readonly class="fd-input" type="text"   />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">订单记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="prescriptionStatus" readonly class="fd-input" type="text"  />
            </div>
            <label class="label_title fd-label">订单号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input class="fd-input" type="text" />
            </div>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单跟踪:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input class="fd-input" readonly type="text"  value="订单跟踪" />
            </div>
            <label class="label_title fd-label">出药机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="prescriptionHospital" readonly class="fd-input" type="text"  />
            </div>
        </div>
        <%--<div style="margin-left:10px;">--%>
            <%--<label class="label_title fd-label">药品信息.</label>--%>
        <%--</div>--%>
        <%--<div class="m-form-group" style="border-top: solid 1px #ccc;">--%>
            <%--<label class="label_title fd-label">药品名称1 </label>--%>
            <%--<label class="label_title fd-label"> 用法:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">总量:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">规格:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />--%>
            <%--</div>--%>
        <%--</div>--%>
    </div>
</div>
</body>

+ 47 - 107
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order_js.jsp

@ -12,133 +12,73 @@
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    var code = $("#code").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                    if (isNoEmpty(code)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            url: ctx + "/admin/static/prescription/getorder/"+code,
                            method: "get",
                            dataType: "json",
                            data: {id: id},
                            async: false,
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    }
                                    //配送方式
                                    var dispensaryDispensaryTypeName = data.dispensaryDispensaryTypeNamee;
                                    $('#dispensaryDispensaryTypeName').val(dispensaryDispensaryTypeName);
                                    if(data.prescriptionExpressage){
                                        //配送地点
                                        var expressaddress = data.prescriptionExpressage.provinceName
                                            +data.prescriptionExpressage.address
                                            +data.prescriptionExpressage.cityName
                                            +data.prescriptionExpressage.townName
                                            +data.prescriptionExpressage.streetName
                                            +data.prescriptionExpressage.address;
                                        $('#expressaddress').val(expressaddress);
                                        //居民姓名
                                        var patientname = data.prescriptionExpressage.name;
                                        $('#patientname').val(patientname);
                                        //居民电话
                                        var phone = data.prescriptionExpressage.phone;
                                        $('#phone').val(phone);
                                        //配送员
                                        var expressageName = data.prescriptionExpressage.expressageName;
                                        $('#expressageName').val(expressageName);
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                        //配送机构
                                        var expressageHospitalAddress = data.prescriptionExpressage.expressageHospitalAddress;
                                        $('#expressageHospitalAddress').val(expressageHospitalAddress);
                                        //订单号
                                        var prescriptionCode = data.prescriptionExpressage.prescriptionCode;
                                        $('#prescriptionCode').val(prescriptionCode);
                                    }
                                    //出药机构
                                    var prescriptionHospital = data.prescriptionHospital;
                                    $('#prescriptionHospital').val(prescriptionHospital);
                                    //订单状态
                                    var prescriptionStatus = data.prescriptionStatusName;
                                    $('#prescriptionStatus').val(prescriptionStatus);
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */

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

@ -1,12 +1,10 @@
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.