📄 listsform.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 ListsForm extends ActionForm
{
private String id; //主键
private String productionId; //订单明细产品(一对一)
private String amount; //产品数量
private String price; //产品单价
private String sum; //总金额
private String orderId; //对应的订单(多对一)
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((productionId == null)||(productionId.length()<1)){
errors.add("productionId",new ActionMessage("sale.lists.productionId"));
}
if((amount == null)||(amount.length()<1)){
errors.add("amount",new ActionMessage("sale.lists.amount"));
}
if((sum == null)||(sum.length()<1)){
errors.add("sum",new ActionMessage("sale.lists.sum"));
}
return errors;
}
/**
* @return the amount
*/
public String getAmount() {
return amount;
}
/**
* @param amount the amount to set
*/
public void setAmount(String amount) {
this.amount = amount;
}
/**
* @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 price
*/
public String getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(String price) {
this.price = price;
}
/**
* @return the productionId
*/
public String getProductionId() {
return productionId;
}
/**
* @param productionId the productionId to set
*/
public void setProductionId(String productionId) {
this.productionId = productionId;
}
/**
* @return the sum
*/
public String getSum() {
return sum;
}
/**
* @param sum the sum to set
*/
public void setSum(String sum) {
this.sum = sum;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -