📄 b0f2ed954c30001d1e52e118c965c1c9
字号:
/**
*
*/
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 StockForm extends ActionForm
{
private String id; // 主键
private String stockId; // 采购单单号
private String employeeId; // 采购员 级联员工表
private String createDate; // 采购日期
private String clientProductionId; // 采购的产品 级联客户产品表 1-----1
private String amount; // 采购产品数量
private String sum; // 总金额
private String payDate; // 付款日期
private String state; // 采购单的状态
private String clientId; // 此单的客户 级联客户 1------1
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((stockId == null)||(stockId.length()<1)){
errors.add("stockId",new ActionMessage("system.stock.stockId"));
}
if((employeeId == null)||(employeeId.length()<1)){
errors.add("employeeId",new ActionMessage("system.stock.employeeId"));
}
if((createDate == null)||(createDate.length()<1)){
errors.add("createDate",new ActionMessage("system.stock.createDate"));
}
if((amount == null)||(amount.length()<1)){
errors.add("amount",new ActionMessage("system.stock.amount"));
}
if((sum == null)||(sum.length()<1)){
errors.add("sum",new ActionMessage("system.stock.sum"));
}
if((payDate == null)||(payDate.length()<1)){
errors.add("payDate",new ActionMessage("system.stock.payDate"));
}
if((state == null)||(state.length()<1)){
errors.add("state",new ActionMessage("system.stock.state"));
}
if((clientId == null)||(clientId.length()<1)){
errors.add("clientId",new ActionMessage("system.stock.clientId"));
}
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 clientId
*/
public String getClientId() {
return clientId;
}
/**
* @param clientId the clientId to set
*/
public void setClientId(String clientId) {
this.clientId = clientId;
}
/**
* @return the clientProductionId
*/
public String getClientProductionId() {
return clientProductionId;
}
/**
* @param clientProductionId the clientProductionId to set
*/
public void setClientProductionId(String clientProductionId) {
this.clientProductionId = clientProductionId;
}
/**
* @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 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 stockId
*/
public String getStockId() {
return stockId;
}
/**
* @param stockId the stockId to set
*/
public void setStockId(String stockId) {
this.stockId = stockId;
}
/**
* @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 + -