|
|
|
@ -70,84 +70,133 @@ public class CountService {
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BigDecimal PITCount(String type,String produceType,double money) throws Exception{
|
|
|
|
|
double result = 0;
|
|
|
|
|
if(type.equals("1")){
|
|
|
|
|
double amount=money-5000;
|
|
|
|
|
double a = 36000 * 0.03-2520,
|
|
|
|
|
b = (144000 - 36000) * 0.10-16920,
|
|
|
|
|
c = (300000 - 144000) * 0.20-31920,
|
|
|
|
|
d = (420000 - 300000) * 0.25-52920,
|
|
|
|
|
e = (660000 - 420000) * 0.30-85920,
|
|
|
|
|
f = (960000 - 660000) * 0.35-181920;
|
|
|
|
|
if(amount<=36000){
|
|
|
|
|
result = result + amount * 0.03;
|
|
|
|
|
}
|
|
|
|
|
if(amount>36000&&amount<=144000){
|
|
|
|
|
result = result+(amount-36000)*0.10+a;
|
|
|
|
|
}
|
|
|
|
|
if(amount>144000&&amount<=300000){
|
|
|
|
|
result = result+(amount-144000)*0.20+a+b;
|
|
|
|
|
}
|
|
|
|
|
if(amount>300000&&amount<=420000){
|
|
|
|
|
result = result+(amount-300000)*0.25+a+b+c;
|
|
|
|
|
}
|
|
|
|
|
if(amount>420000&&amount<=660000){
|
|
|
|
|
result = result+(amount-420000)*0.30+a+b+c+d;
|
|
|
|
|
}
|
|
|
|
|
if(amount>660000&&amount<=960000){
|
|
|
|
|
result = result+(amount-660000)*0.35+a+b+c+d+e;
|
|
|
|
|
}
|
|
|
|
|
if(amount>960000){
|
|
|
|
|
result = result+(amount-960000)*0.45+a+b+c+d+e+f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if(type.equals("2")){
|
|
|
|
|
double a = 30000/1.03*0.05,
|
|
|
|
|
b=(90000-30000)/1.03*0.10,
|
|
|
|
|
c=(300000-90000)/1.03*0.20,
|
|
|
|
|
d=(500000-300000)/1.03*0.30;
|
|
|
|
|
if(produceType.equals("1")){//核定征收
|
|
|
|
|
|
|
|
|
|
if(money<=30000){
|
|
|
|
|
result = result + money/1.03*0.05;
|
|
|
|
|
}
|
|
|
|
|
if(money>30000&&money<=90000){
|
|
|
|
|
result = result + money/1.03*0.10+a;
|
|
|
|
|
}
|
|
|
|
|
if(money>90000&&money<=300000){
|
|
|
|
|
result = result + money/1.03*0.20+a+b;
|
|
|
|
|
}
|
|
|
|
|
if(money>300000&&money<=500000){
|
|
|
|
|
result = result + money/1.03*0.30+a+b+c;
|
|
|
|
|
}
|
|
|
|
|
if(money>500000){
|
|
|
|
|
result = result + money/1.03*0.35+a+b+c+d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if(produceType.equals("2")){//累进税率
|
|
|
|
|
if(money<=30000){
|
|
|
|
|
result = result + money/1.03*0.05;
|
|
|
|
|
}
|
|
|
|
|
if(money>30000&&money<=90000){
|
|
|
|
|
result = result + (money-30000)/1.03*0.10+(a-1500);
|
|
|
|
|
}
|
|
|
|
|
if(money>90000&&money<=300000){
|
|
|
|
|
result = result + (money-90000)/1.03*0.20+a-1500+b-10500;
|
|
|
|
|
}
|
|
|
|
|
if(money>300000&&money<=500000){
|
|
|
|
|
result = result + (money-300000)/1.03*0.30+a-1500+b-10500+c-40500;
|
|
|
|
|
}
|
|
|
|
|
if(money>500000){
|
|
|
|
|
result = result + (money-500000)/1.03*0.35+a+b+c+d-1500-10500-40500-65500;
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
throw new Exception("方式类型不正确");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
throw new Exception("专票类型不正确");
|
|
|
|
|
public BigDecimal PITCount(double money) throws Exception{
|
|
|
|
|
if(money <= 0){
|
|
|
|
|
throw new Exception("金额须大于0");
|
|
|
|
|
}
|
|
|
|
|
double result =0;
|
|
|
|
|
if(money<=300000){
|
|
|
|
|
result = money*0.005;
|
|
|
|
|
}else if(300000<money&&money<=310000){
|
|
|
|
|
result = money*0.0052;
|
|
|
|
|
}else if(310000<money&&money<=400000){
|
|
|
|
|
result = money*0.0063;
|
|
|
|
|
}else if(400000<money&&money<=500000){
|
|
|
|
|
result = money*0.007;
|
|
|
|
|
}else if(500000<money&&money<=600000){
|
|
|
|
|
result = money*0.0075;
|
|
|
|
|
}else if(600000<money&&money<=700000){
|
|
|
|
|
result = money*0.0079;
|
|
|
|
|
}else if(700000<money&&money<=800000){
|
|
|
|
|
result = money*0.0081;
|
|
|
|
|
}else if(800000<money&&money<=900000){
|
|
|
|
|
result = money*0.0083;
|
|
|
|
|
}else if(900000<money&&money<=910000){
|
|
|
|
|
result = money*0.0085;
|
|
|
|
|
}else if(910000<money&&money<=1000000){
|
|
|
|
|
result = money*0.0095;
|
|
|
|
|
}else if(1000000<money&&money<=1200000){
|
|
|
|
|
result = money*0.0113;
|
|
|
|
|
}else if(1200000<money&&money<=1210000){
|
|
|
|
|
result = money*0.0113;
|
|
|
|
|
}else if(1210000<money&&money<=1500000){
|
|
|
|
|
result = money*0.013;
|
|
|
|
|
}else if(1500000<money&&money<=2000000){
|
|
|
|
|
result = money*0.0148;
|
|
|
|
|
}else if(2000000<money&&money<=2500000){
|
|
|
|
|
result = money*0.0158;
|
|
|
|
|
}else if(2500000<money&&money<=3000000){
|
|
|
|
|
result = money*0.0168;
|
|
|
|
|
}else if(3000000<money&&money<=3100000){
|
|
|
|
|
result = money*0.0169;
|
|
|
|
|
}else if(3100000<money&&money<=3500000){
|
|
|
|
|
result = money*0.0184;
|
|
|
|
|
}else if(3500000<money&&money<=4000000){
|
|
|
|
|
result = money*0.0199;
|
|
|
|
|
}else if(4000000<money&&money<=4100000){
|
|
|
|
|
result = money*0.0201;
|
|
|
|
|
}else if(4100000<money&&money<=4500000){
|
|
|
|
|
result = money*0.021;
|
|
|
|
|
}else if(4500000<money&&money<=5000000){
|
|
|
|
|
result = money*0.0219;
|
|
|
|
|
}
|
|
|
|
|
// double result = 0;
|
|
|
|
|
// if(type.equals("1")){
|
|
|
|
|
// double amount=money-5000;
|
|
|
|
|
// double a = 36000 * 0.03-2520,
|
|
|
|
|
// b = (144000 - 36000) * 0.10-16920,
|
|
|
|
|
// c = (300000 - 144000) * 0.20-31920,
|
|
|
|
|
// d = (420000 - 300000) * 0.25-52920,
|
|
|
|
|
// e = (660000 - 420000) * 0.30-85920,
|
|
|
|
|
// f = (960000 - 660000) * 0.35-181920;
|
|
|
|
|
// if(amount<=36000){
|
|
|
|
|
// result = result + amount * 0.03;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>36000&&amount<=144000){
|
|
|
|
|
// result = result+(amount-36000)*0.10+a;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>144000&&amount<=300000){
|
|
|
|
|
// result = result+(amount-144000)*0.20+a+b;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>300000&&amount<=420000){
|
|
|
|
|
// result = result+(amount-300000)*0.25+a+b+c;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>420000&&amount<=660000){
|
|
|
|
|
// result = result+(amount-420000)*0.30+a+b+c+d;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>660000&&amount<=960000){
|
|
|
|
|
// result = result+(amount-660000)*0.35+a+b+c+d+e;
|
|
|
|
|
// }
|
|
|
|
|
// if(amount>960000){
|
|
|
|
|
// result = result+(amount-960000)*0.45+a+b+c+d+e+f;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }else if(type.equals("2")){
|
|
|
|
|
// double a = 30000/1.03*0.05,
|
|
|
|
|
// b=(90000-30000)/1.03*0.10,
|
|
|
|
|
// c=(300000-90000)/1.03*0.20,
|
|
|
|
|
// d=(500000-300000)/1.03*0.30;
|
|
|
|
|
// if(produceType.equals("1")){//核定征收
|
|
|
|
|
//
|
|
|
|
|
// if(money<=30000){
|
|
|
|
|
// result = result + money/1.03*0.05;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>30000&&money<=90000){
|
|
|
|
|
// result = result + money/1.03*0.10+a;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>90000&&money<=300000){
|
|
|
|
|
// result = result + money/1.03*0.20+a+b;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>300000&&money<=500000){
|
|
|
|
|
// result = result + money/1.03*0.30+a+b+c;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>500000){
|
|
|
|
|
// result = result + money/1.03*0.35+a+b+c+d;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }else if(produceType.equals("2")){//累进税率
|
|
|
|
|
// if(money<=30000){
|
|
|
|
|
// result = result + money/1.03*0.05;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>30000&&money<=90000){
|
|
|
|
|
// result = result + (money-30000)/1.03*0.10+(a-1500);
|
|
|
|
|
// }
|
|
|
|
|
// if(money>90000&&money<=300000){
|
|
|
|
|
// result = result + (money-90000)/1.03*0.20+a-1500+b-10500;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>300000&&money<=500000){
|
|
|
|
|
// result = result + (money-300000)/1.03*0.30+a-1500+b-10500+c-40500;
|
|
|
|
|
// }
|
|
|
|
|
// if(money>500000){
|
|
|
|
|
// result = result + (money-500000)/1.03*0.35+a+b+c+d-1500-10500-40500-65500;
|
|
|
|
|
// }
|
|
|
|
|
// }else{
|
|
|
|
|
// throw new Exception("方式类型不正确");
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }else {
|
|
|
|
|
// throw new Exception("专票类型不正确");
|
|
|
|
|
// }
|
|
|
|
|
BigDecimal b = new BigDecimal(result);
|
|
|
|
|
return b.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
}
|
|
|
|
|