Commit 04109897 authored by 谢希宇's avatar 谢希宇

fix:微问诊图文对接完整流程

parent 8bab67be
......@@ -78,7 +78,7 @@
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/prescription/list')" method="get">
<div class="col-xs-5">
<div class="col-xs-2">
<div class="col-xs-4">
<input type="text" class="form-control"
name="number" placeholder="处方编码">
</div>
......@@ -299,6 +299,17 @@
}
}
},
{
"aTargets": [12],
"mData": "payAmount",
"mRender": function (a, b, c, d) {
if (a != null && a != '' && a > 100) {
return (a/100).toFixed(2);
} else {
return '';
}
}
},
{
"aTargets": [13],
"mData": "payTime",
......
......@@ -81,4 +81,12 @@ public interface PrescriptionService extends GenericService<Prescription> {
* @return
*/
boolean refund(String id);
/**
* 获取最近的处方单信息
* @param appId
* @param openId
* @return
*/
JSONObject findPrescriptDetail(String appId, String openId);
}
......@@ -119,6 +119,7 @@ public class PrescriptionServiceImpl extends GenericServiceImpl<Prescription> im
data.put("unit", params.get("unit"));
data.put("storeNo", storeNo);
data.put("prepayId", prescription.getPrepayId());
data.put("ftAppId", SystemConfig.p.getProperty("cdfortis.appid"));//微问诊Appid
retObj.put("errorNo", 0);
retObj.put("data", data);
......@@ -149,6 +150,7 @@ public class PrescriptionServiceImpl extends GenericServiceImpl<Prescription> im
data.put("productNo", params.get("productNumber"));
data.put("unit", params.get("unit"));
data.put("storeNo", storeNo);
data.put("ftAppId", SystemConfig.p.getProperty("cdfortis.appid"));//微问诊Appid
retObj.put("errorNo", 0);
retObj.put("data", data);
......@@ -251,6 +253,33 @@ public class PrescriptionServiceImpl extends GenericServiceImpl<Prescription> im
}
return retObj;
}
@Override
public JSONObject findPrescriptDetail(String appId, String openId) {
JSONObject retObj = new JSONObject();
try {
//获取最新处方单数据
Conds conds = new Conds();
conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("t.openid", openId);
conds.equal("t.description", "2");//已获取返回结果
conds.equal("t.doc_status", "0");//医生已审批
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Prescription> list = this.fetchSearchByPage(conds, sort, 0, 0);
if (CollectionUtils.isEmpty(list)) {
retObj.put("errorNo", 1);
retObj.put("errorMsg", "处方暂未开具");
return retObj;
}
retObj.put("errorNo", 0);
retObj.put("data", list.get(0));
} catch (Exception e) {
retObj.put("errorNo", 1);
e.printStackTrace();
}
return retObj;
}
@Override
public List<Prescription> findPreScriptionList(int iDisplayStart, int iDisplayLength) throws Exception {
return findPreScriptionList(iDisplayStart, iDisplayLength, null, null);
......
......@@ -38,6 +38,18 @@ public class MobilePrecriptionController {
return prescriptionService.findLastPrescription(appId, openId);
}
/**
* 获取处方单详情,用于记载上一次处方单信息
* @param appId
* @param openId
* @return
*/
@RequestMapping(value = "findPrescriptDetail", method = { RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject findPrescriptDetail(@RequestParam String appId,
@RequestParam String openId) {
return prescriptionService.findPrescriptDetail(appId, openId);
}
/**
* 更新处方单
* @param appId
......
......@@ -134,9 +134,9 @@ mch.pay_url=https://api.mch.weixin.qq.com/pay/unifiedorder
#\u5546\u6237\u53F7\u9000\u6B3E\u63A5\u53E3
msh.refund_url=https://api.mch.weixin.qq.com/secapi/pay/refund
#\u5546\u6237\u53F7\u4ED8\u6B3E\u6210\u529F\u56DE\u8C03url
mch.notify_url=https://pd.shxrtech.com/aidea/mobile/auth/order/wechatPayCallback
mch.notify_url=https://pe.aidea.com.cn/aidea/mobile/auth/order/wechatPayCallback
#\u5546\u6237\u53F7\u9000\u6B3E\u6210\u529F\u56DE\u8C03url
mch.refund_notify_url=https://pd.shxrtech.com/aidea/mobile/auth/order/wechatRefundCallback
mch.refund_notify_url=https://pe.aidea.com.cn/aidea/mobile/auth/order/wechatRefundCallback
#\u8BC1\u4E66\u5E8F\u5217\u53F7
mch.queue_no=4CB908135B122F41E127F6B60E41349E43A725C7
#\u8BC1\u4E66\u8DEF\u5F84
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment