📄 orderform.java
字号:
/**
*
*/
package com.qrsx.qrsxcrm.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
/**
* @author Administrator
*
*/
@SuppressWarnings("serial")
public class OrderForm extends ActionForm
{
private String id; //主键
private String orderId; //订单编号
private String userId; //订单创建者(多个订单对应一个创建者)
private String createDate; //创建日期
private String clientId; //订单所对应的客户(一对一)
private String payDate; //付款日期
private String state; //订单状态
private String employeeId; //订单负责人(一对一)
private String remark;
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((orderId == null)||(orderId.length()<1)){
errors.add("orderId",new ActionMessage("sale.order.orderId"));
}
if((userId == null)||(userId.length()<1)){
errors.add("userId",new ActionMessage("sale.order.userId"));
}
if((createDate == null)||(createDate.length()<1)){
errors.add("createDate",new ActionMessage("sale.order.createDate"));
}
if((clientId == null)||(clientId.length()<1)){
errors.add("clientId",new ActionMessage("sale.order.clientId"));
}
if((payDate == null)||(payDate.length()<1)){
errors.add("payDate",new ActionMessage("sale.order.payDate"));
}
if((state == null)||(state.length()<1)){
errors.add("state",new ActionMessage("sale.order.state"));
}
if((employeeId == null)||(employeeId.length()<1)){
errors.add("employeeId",new ActionMessage("sale.order.employeeId"));
}
return errors;
}
/**
* @return the remark
*/
public String getRemark() {
return remark;
}
/**
* @param remark the remark to set
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* @return the clientId
*/
public String getClientId() {
return clientId;
}
/**
* @param clientId the clientId to set
*/
public void setClientId(String clientId) {
this.clientId = clientId;
}
/**
* @return the createDate
*/
public String getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
/**
* @return the employeeId
*/
public String getEmployeeId() {
return employeeId;
}
/**
* @param employeeId the employeeId to set
*/
public void setEmployeeId(String employeeId) {
this.employeeId = employeeId;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the orderId
*/
public String getOrderId() {
return orderId;
}
/**
* @param orderId the orderId to set
*/
public void setOrderId(String orderId) {
this.orderId = orderId;
}
/**
* @return the payDate
*/
public String getPayDate() {
return payDate;
}
/**
* @param payDate the payDate to set
*/
public void setPayDate(String payDate) {
this.payDate = payDate;
}
/**
* @return the state
*/
public String getState() {
return state;
}
/**
* @param state the state to set
*/
public void setState(String state) {
this.state = state;
}
/**
* @return the userId
*/
public String getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(String userId) {
this.userId = userId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -