예제 #1
0
 /*
  * 返回病人列表,通过session获取病区id,caozuoyuan, 再查询相应的病区病人列表,病区列表
  */
 public String getListBingqBingrBySessionBingqId() throws IOException {
   VwRybq vwRybq = (VwRybq) session.get("caozuoyuan");
   System.out.println(vwRybq.getId());
   String dangqianbqid = "";
   dangqianbqid = session.get("dangqianbingqu_id").toString();
   if (dangqianbqid != "") {
     List<VwRybq> vwRybqs = vwRybqService.listBingQuByCaozyId(vwRybq.getId());
     request.put("caozuoyuan_bingqu", vwRybqs);
     List<VwBqbrZy> vwBqbrZys = vwBqbrZyService.listBingqBingrByBingqId(dangqianbqid);
     request.put("bqry", vwBqbrZys);
     return SUCCESS;
   } else {
     return ERROR;
   }
 }
예제 #2
0
  /*
   * 根据人员代码(登录的操作员代码) 获取对应人员id, 病人列表,当前操作病区id
   */
  public String getRenYuanIdByRenYuanDaiMa() {
    vwRybq = vwRybqService.getRenYuanIdByRenYuanDaiMa(yonghu_name);
    session.put("caozuoyuan", vwRybq);
    String bqid = vwRybqService.getCaoZuoBingQuIdByCaozyId(vwRybq.getId());
    session.put("dangqianbingqu_id", bqid);
    System.out.println(vwRybq.getId());
    request.put("bqry", vwRybqService.listBingrByBingQuId(bqid));
    List<VwRybq> vwRybqs = vwRybqService.listBingQuByCaozyId(vwRybq.getId());

    System.out.println("变量病区id:" + bqid);
    for (int i = 0; i < vwRybqs.size(); i++) {
      //			VwRybq vwRybq_i = vwRybqs.get(i);
      System.out.println("循环病区:" + vwRybqs.get(i).getBqmc());
      System.out.println("循环病区id:" + vwRybqs.get(i).getBq());
      //			if(vwRybqs.get(i).getBq() == bqid){
      if (vwRybqs.get(i).getBq().contains(bqid)) {
        session.put("dangqianbingqu_name", vwRybqs.get(i).getBqmc());
        System.out.println("当前病区:" + vwRybqs.get(i).getBqmc());
      }
    }
    request.put("caozuoyuan_bingqu", vwRybqs);
    return SUCCESS;
  }