package lingtao.net.util; import java.text.DecimalFormat; import java.util.List; import lingtao.net.bean.Product; public class FgqPrice { DecimalFormat df = new DecimalFormat("0.00"); /**仿古旗报价*/ public List getPrice(int count, Double area, List list,String[] craftList, String kind, int num) { Product pro = new Product(); pro = new Product(); pro.setCount(count); String craft = craftList[0]; double dj = 0,wei = 0; if(kind.equals("1")) { if(craft.equals("单面")) { dj = 90; wei = 0.065; }else { dj = 100; wei = 0.195; } }else { if(craft.equals("单面")) { dj = 100; wei = 0.165; }else { dj = 135; wei = 0.33; } } double price = Math.ceil(area * dj); pro.setPrice(price); pro.setWeight(df.format(area * wei * num)); list.add(pro); return list; } /**手拉旗报价*/ public List getSlqPrice(int count, List list) { Product pro = new Product(); pro = new Product(); pro.setCount(count); pro.setPrice(Math.ceil(30 * count)); list.add(pro); return list; } public List getSlqSpeicPrice(int count, List list, int type) { Product pro = new Product(); pro = new Product(); pro.setCount(count); if(type == 1) { pro.setPrice(Math.ceil(16 * count)); }else { pro.setPrice(Math.ceil(12 * count)); } list.add(pro); return list; } }