|
@ -421,6 +421,9 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
if ("-2".equals(stringObjectMap.get("sellState").toString())) {
|
|
|
stringObjectMap.put("sellStateName", "药房已作废");
|
|
|
}
|
|
|
if ("-5".equals(stringObjectMap.get("sellState").toString())) {
|
|
|
stringObjectMap.put("sellStateName", "出药异常");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -489,6 +492,9 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
case "-2":
|
|
|
sellStateName = "药房已作废";
|
|
|
break;
|
|
|
case "-5":
|
|
|
sellStateName = "出药异常";
|
|
|
break;
|
|
|
}
|
|
|
jsonObject.put("sellStateName", sellStateName);
|
|
|
jsonObject.put("socialSecurityCardNum", mediicineorder.getSocialSecurityCardNum());
|
|
@ -508,6 +514,35 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public JSONObject updateOrderToWaitOut(String orderId,String userId){
|
|
|
JSONObject result = new JSONObject();
|
|
|
String sql = " select count(id) from wlyy_hospital_sys_dict where dict_name='updateOrderToWaitOut' " +
|
|
|
" and dict_code='updateOrderToWaitOut' " +
|
|
|
" and dict_value='"+userId+"' ";
|
|
|
Integer total = jdbcTemplate.queryForObject(sql,Integer.class);
|
|
|
if (total==0){
|
|
|
result.put("msg", "当前操作无权限");
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
|
return result;
|
|
|
}
|
|
|
if (StringUtils.isEmpty(orderId)) {
|
|
|
result.put("msg", "orderId is empty");
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
|
return result;
|
|
|
}
|
|
|
Mediicineorder mediicineorder = orderDao.findOne(orderId);
|
|
|
if (mediicineorder == null) {
|
|
|
result.put("msg", "无相关订单信息,请重新确认信息!");
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
|
return result;
|
|
|
}
|
|
|
mediicineorder.setSellState("0");
|
|
|
orderDao.save(mediicineorder);
|
|
|
result.put("msg", "操作成功");
|
|
|
result.put("response", ConstantUtils.SUCCESS);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取时间范围内的订单销售额
|
|
|
*
|