first commit
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
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<Product> getPrice(int count, Double area, List<Product> 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<Product> getSlqPrice(int count, List<Product> list) {
|
||||
Product pro = new Product();
|
||||
pro = new Product();
|
||||
pro.setCount(count);
|
||||
pro.setPrice(Math.ceil(30 * count));
|
||||
list.add(pro);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<Product> getSlqSpeicPrice(int count, List<Product> 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user