Exemplo n.º 1
0
  /**
   * 更新餐桌
   *
   * @return
   */
  @Action(
      value = "updateTableT",
      results = {@Result(name = "json", type = "json")})
  public String updateTableT() {
    if (Validate.StrisNull(this.getTableid())
        && Validate.StrisNull(this.getTableNumber())
        && Validate.StrisNull(this.getRoomName())) {
      this.setSucflag(false);
      return "json";
    }
    if (this.getTableTService().findTableBytableid(this.getTableid()) != null) {
      TableT tt = new TableT();
      tt.setTableid(this.getTableid());
      tt.setTableNumber(this.getTableNumber());
      tt.setRoomName(this.getRoomName());
      tt.setFloor(this.getFloor());
      tt.setNop(this.getNop());
      tt.setNote(this.getNote());
      tt.setCreatetime(BaseTools.systemtime());
      tt.setCreatorid(BaseTools.adminCreateId());
      tt.setTablestate(this.getTablestate());

      this.getTableTService().updateTableT(tt);
      this.setSucflag(true);
      return "json";
    } else {
      this.setSucflag(false);
      return "json";
    }
  }
Exemplo n.º 2
0
  /** 增加餐桌 */
  @Action(
      value = "addTableT",
      results = {@Result(name = "json", type = "json")})
  public String addTableT() {

    if (Validate.StrisNull(this.getTableNumber()) && Validate.StrisNull(this.getRoomName())) {
      this.setSucflag(false);
      return "json";
    }
    TableT tt = new TableT();
    tt.setTableid(this.getSerial().Serialid(Serial.ELECTABLE));
    tt.setTableNumber(this.getTableNumber().trim());
    tt.setRoomName(this.getRoomName().trim());
    tt.setFloor(this.getFloor());
    tt.setNop(this.getNop());
    tt.setCreatetime(BaseTools.systemtime());
    tt.setCreatorid(BaseTools.adminCreateId());
    tt.setTablestate("0");

    if (this.getTableTService().addTableT(tt) > 0) {
      this.setSucflag(true);
      return "json";
    } else {
      this.setSucflag(false);
      return "json";
    }
  }
Exemplo n.º 3
0
 /**
  * 根据餐桌id改变状态
  *
  * @return
  */
 @Action(
     value = "updateTableTtablestateBytableNo",
     results = {@Result(name = "json", type = "json")})
 public String updateTableTtablestateBytableNo() {
   if (Validate.StrNotNull(this.getTableid()) && Validate.StrNotNull(this.getTablestate())) {
     String[] strs = StringUtils.split(this.getTableid(), ',');
     for (String s : strs) {
       @SuppressWarnings("unused")
       int i = this.getTableTService().updateTableTtablestateBytableNo(s, this.getTablestate());
     }
     this.setSucflag(true);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
Exemplo n.º 4
0
 /** 根据地址ID更新用户地址 */
 @Action(
     value = "updateDeliverAddress",
     results = {@Result(name = "json", type = "json")})
 public String updateDeliverAddress() {
   UserT user = (UserT) ActionContext.getContext().getSession().get(BaseTools.USER_SESSION_KEY);
   if (user != null) {
     this.setSlogin(true);
     if (Validate.StrNotNull(this.getAddressid())) {
       bean = this.getDeliverAddressTService().findDeliverAddressById(this.getAddressid());
       bean.setUsername(this.getUsername().trim());
       bean.setCountry(this.getCountry());
       bean.setProvince(this.getProvince());
       bean.setCity(this.getCity());
       bean.setDistrict(this.getDistrict());
       bean.setStreet(this.getStreet());
       bean.setTelno(this.getTelno());
       bean.setMobile(this.getMobile());
       bean.setPostcode(this.getPostcode());
       bean.setEmail(this.getEmail());
       this.getDeliverAddressTService().updateDeliverAddress(bean);
       this.setSucflag(true);
       return "json";
     } else {
       this.setSucflag(false);
       return "json";
     }
   }
   this.setSucflag(false);
   return "json";
 }
Exemplo n.º 5
0
public   boolean dovalidate(){
	String name2="fsdf";
	if(Validate.StrNotNull(name2)==false){
		System.out.println("false");
		return false;
	}
		System.out.println("pass");
	System.out.println("true");
	return true;
}
Exemplo n.º 6
0
 /**
  * 通过ID获取某个餐桌信息
  *
  * @return
  */
 @Action(
     value = "findTableBytableid",
     results = {@Result(name = "json", type = "json")})
 public String findTableBytableid() {
   if (Validate.StrNotNull(this.getTableid())) {
     bean = this.getTableTService().findTableBytableid(this.getTableid());
     if (bean != null) {
       return "json";
     }
   }
   return "json";
 }
Exemplo n.º 7
0
 /**
  * 根据id获取邮箱信息
  *
  * @return
  */
 @Action(
     value = "findSysmailByid",
     results = {@Result(name = "json", type = "json")})
 public String findSysmailByid() {
   if (Validate.StrNotNull(this.getId())) {
     bean = this.getSystemMailTService().findSysmailByid(this.getId());
     if (bean != null) {
       this.setSucflag(true);
     }
   }
   return "json";
 }
Exemplo n.º 8
0
 /**
  * 查询系统邮件
  *
  * @return
  */
 @Action(
     value = "findAllSystemMail",
     results = {@Result(name = "json", type = "json")})
 public String findAllSystemMail() {
   if (StaticString.SC.equals(this.getQtype())) {
     this.findDefaultAllSystemMail();
   } else {
     if (Validate.StrisNull(this.getQuery())) {
       return "json";
     } else {
       return "json";
     }
   }
   return "json";
 }
Exemplo n.º 9
0
 /**
  * 根据ID删除选择的餐桌
  *
  * @return
  */
 @Action(
     value = "delTableT",
     results = {@Result(name = "json", type = "json")})
 public String delTableT() {
   if (Validate.StrNotNull(this.getTableid())) {
     String[] strs = this.getTableid().trim().split(",");
     int delconfirm = this.getTableTService().delTableT(strs);
     if (delconfirm > 0) {
       this.setSucflag(true);
       return "json";
     } else {
       this.setSucflag(false);
       return "json";
     }
   }
   return "json";
 }
Exemplo n.º 10
0
 /** 获取所有餐桌 */
 @Action(
     value = "findAllTableT",
     results = {@Result(name = "json", type = "json")})
 public String findAllTableT() {
   if (this.getQtype().equals("sc")) {
     this.setTotal(0);
     rows.clear();
     this.findDefaultAllTableT();
   } else {
     if (Validate.StrisNull(this.getQuery())) {
       return "json";
     } else {
       return "json";
     }
   }
   return "json";
 }
Exemplo n.º 11
0
 /** 根据地址ID获取用户地址 return */
 @Action(
     value = "findDeliverAddressByaddresid",
     results = {@Result(name = "json", type = "json")})
 public String findDeliverAddressByaddresid() {
   UserT user = (UserT) ActionContext.getContext().getSession().get(BaseTools.USER_SESSION_KEY);
   if (user != null) {
     this.setSlogin(true);
     if (Validate.StrNotNull(this.getAddressid())) {
       bean = this.getDeliverAddressTService().findDeliverAddressById(this.getAddressid());
       this.setSucflag(true);
       return "json";
     } else {
       this.setSucflag(false);
       return "json";
     }
   }
   this.setSucflag(false);
   return "json";
 }