⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderlist.java

📁 ajax开发的erp程序
💻 JAVA
字号:
package com.easyjf.asp.domain;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Date;
import com.easyjf.dbo.annotation.Table;
import com.easyjf.util.CommUtil;
@Table(tableName="OrderList",keyField="cid",keyGenerator="com.easyjf.dbo.RandomIdGenerator")
public class OrderList implements java.io.Serializable,Comparable {
private String cid;
private String orderSn;
private String productSn;
private String title;
private String types;
private Double num;
private Double width;
private Double height;
private BigDecimal price=new BigDecimal(0);
private BigDecimal amount=new BigDecimal(0);
private String unit;
private Integer status;
private Integer sequence;
private Integer unitType;
private Integer cou;
private Date vdate;
private final String[][] statusTitle={{"-1","暂不生产"},{"0","当日生产"},{"2","已生产"}}; 
private final String[][] unitTypeTitle={{"0","平方"},{"1","长度"}};
private final DecimalFormat df=new DecimalFormat("0.00");

public String showStatus()
{
	return CommUtil.getSelectOptions(statusTitle,status!=null?status.toString():"0");
}
public String showUnitType()
{
	return CommUtil.getSelectOptions(unitTypeTitle,unitType!=null?unitType.toString():"0");
}
//打印使用,根据unitType进行单位换算并显示在打印单据上
//统一显示为毫米
public String printWidth()
{	
		return ""+(new BigDecimal(this.width.floatValue() *1000).setScale(0,BigDecimal.ROUND_CEILING)).toString();
	
}
//统一显示为毫米
public String printHeight()
{
	return ""+(new BigDecimal(this.height.floatValue()*1000)).setScale(0,BigDecimal.ROUND_CEILING).toString();

}
//根据unitType进行价格转换
public String printPrice()
{
	if(unitType==null || (unitType.intValue()==0))return  df.format(price.setScale(2,BigDecimal.ROUND_CEILING));	
	String ret= df.format(new BigDecimal(this.price.floatValue()*this.height.floatValue()).setScale(2,BigDecimal.ROUND_CEILING));	
	return ret;
}
//若unitType为1则显示为1
public String printNum()
{
	if(unitType!=null && (unitType.intValue()==1)) return "1";
	else
		return ""+num;	
}
public String printUnit()
{
	if(unitType!=null && (unitType.intValue()==1)) return "米";
	else
		return unit;
}
//颜色
public String showColor()
{
	String ret="";
	if(status!=null)
	{
		if(status.intValue()==-1)ret="yellow";
		else if(status.intValue()==2)ret="blue";
	}
	return ret;
}
	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}



	public String getOrderSn() {
		return orderSn;
	}

	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getProductSn() {
		return productSn;
	}

	public void setProductSn(String productSn) {
		this.productSn = productSn;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	
	public String getTypes() {
		return types;
	}

	public void setTypes(String types) {
		this.types = types;
	}

	
	public Double getHeight() {
		return height;
	}

	public void setHeight(Double height) {
		this.height = height;
	}

	public Double getNum() {
		return num;
	}

	public void setNum(Double num) {
		this.num = num;
	}

	public Double getWidth() {
		return width;
	}

	public void setWidth(Double width) {
		this.width = width;
	}

	public Integer getUnitType() {
		return unitType;
	}

	public void setUnitType(Integer unitType) {
		this.unitType = unitType;
	}

	public Integer getCou() {
		return cou;
	}

	public void setCou(Integer cou) {
		this.cou = cou;
	}

	public int compareTo(Object o) {
		OrderList m = (OrderList) o;
		return  (this.sequence.intValue()- m.sequence.intValue());
		}
	
	public Date getVdate() {
		return vdate;
	}

	public void setVdate(Date vdate) {
		this.vdate = vdate;
	}



}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -