|
@ -339,6 +339,11 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 通过订单id,获取详细订单信息
|
|
|
* @param orderId
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getOrderDetail(String orderId) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
if (StringUtils.isEmpty(orderId)) {
|
|
@ -354,7 +359,8 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
}
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("drugList", orderdetailDao.getorderdetail(orderId));
|
|
|
|
|
|
List<MedicineShipmentLog> shipmentLogs = shipmentLogDao.findMedicineShipmentLogsByOrderId(orderId);
|
|
|
jsonObject.put("outList", (shipmentLogs == null && shipmentLogs.size() == 0) ? null : shipmentLogs);
|
|
|
|
|
|
jsonObject.put("patientName", mediicineorder.getName());
|
|
|
jsonObject.put("patientSex", mediicineorder.getSex());
|
|
@ -362,6 +368,13 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
jsonObject.put("patientAge", mediicineorder.getAge());
|
|
|
jsonObject.put("patientContact", mediicineorder.getContact());
|
|
|
jsonObject.put("patientAddress", mediicineorder.getAddress());
|
|
|
jsonObject.put("prescribeNum", mediicineorder.getPrescribeNum());
|
|
|
jsonObject.put("orderType", mediicineorder.getOrderType());
|
|
|
jsonObject.put("prescribeTime", mediicineorder.getPrescribeTime());
|
|
|
jsonObject.put("amount", mediicineorder.getAmount());
|
|
|
jsonObject.put("socialinsurPayment", mediicineorder.getSocialinsurPayment());
|
|
|
jsonObject.put("orderState", mediicineorder.getOrderState());
|
|
|
jsonObject.put("infoAccess", mediicineorder.getInfoAccess());
|
|
|
jsonObject.put("device",StringUtils.isEmpty(mediicineorder.getShippingEqu()) ? null : deviceDao.findOne(mediicineorder.getShippingEqu()));
|
|
|
result.put("msg", jsonObject);
|
|
|
result.put("response", ConstantUtils.SUCCESS);
|
|
@ -687,7 +700,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
* @param status
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject updateOrderOutStatus(String shipmentLogId, String status) {
|
|
|
public JSONObject updateOrderOutStatus(String shipmentLogId, String status, String msg) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
if (shipmentLogId == null || StringUtils.isEmpty(shipmentLogId)) {
|
|
|
result.put("msg", "shipmentLogId is null or empty");
|
|
@ -708,7 +721,12 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
return result;
|
|
|
}
|
|
|
medicineShipmentLog.setStatus(status);
|
|
|
|
|
|
if ("2".equals(status)) {
|
|
|
medicineShipmentLog.setOutTime(new Date());
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(msg)) {
|
|
|
medicineShipmentLog.setDescription(msg);
|
|
|
}
|
|
|
shipmentLogDao.save(medicineShipmentLog);
|
|
|
|
|
|
//表示已出货
|