|
@@ -19,6 +19,7 @@ public class SettementUtil {
|
|
|
public static final String BDZ_TBRNAME="投标人采购设备费";
|
|
|
public static final String BDZ_ZBRNAME="招标人采购材料费";
|
|
|
public static final String BDZ_TBNAME="投标报价";
|
|
|
+ public static final String SJ = "税";
|
|
|
|
|
|
/*
|
|
|
分布分项比对
|
|
@@ -120,6 +121,8 @@ public class SettementUtil {
|
|
|
public static final String[] TOP2 = {BDZ_TBBJ,RESON_JGJS1,BDZ_TBBJ1,RESON_JGJS3, RESON_JGJS4,RESON_JGJS5,RESON_JGJS6,BDZ_TBBJ2,RESON_JGJS8};
|
|
|
//工程竣工 拼接数组
|
|
|
public static final String[] TOP1 = {RESON_JGJS,RESON_JGJS1,RESON_JGJS2,RESON_JGJS3,RESON_JGJS4,RESON_JGJS5,RESON_JGJS6,RESON_JGJS7,RESON_JGJS8};
|
|
|
+ public static final String[] DLBDZ_FBFX2 = {BDZ_FXFX,BDZ_FBFX1,BDZ_FBFX2,RESON_GCJS4,RESON_JZFBFX3,RESON_AZFBFX3,RESON_GCJS4};
|
|
|
+ public static final String[] DLBDZ_FBFX1 = {RESON_FBFX1,RESON_JZFBFX,RESON_AZFBFX,RESON_GCJS4,RESON_JZFBFX3,RESON_AZFBFX3,RESON_GCJS4};
|
|
|
/*
|
|
|
设置转换参数
|
|
|
*/
|
|
@@ -141,7 +144,7 @@ public class SettementUtil {
|
|
|
for (int i = 0; i < lastDataRowNum; i++) {
|
|
|
settlement=new Settlement();
|
|
|
key = importExcel.getValue(i+1,1);
|
|
|
- if(key.contains(BashInfo.JS_SJ)){
|
|
|
+ if(key.contains(SJ)){
|
|
|
key=BashInfo.JS_SJ;
|
|
|
}
|
|
|
if(key.equals(BDZ_TBRNAME)){
|
|
@@ -320,7 +323,7 @@ public class SettementUtil {
|
|
|
// if (money==doubles[0]){
|
|
|
// settlement.setStatus("0");
|
|
|
// }
|
|
|
- if (doubles[0]<=moneyComparison1&&doubles[1]>=moneyComparison2){
|
|
|
+ if (doubles[0]<=moneyComparison1&&doubles[0]>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
String str = String.valueOf(nf.format(doubles[0])+','+nf.format(doubles[1])+','+nf.format(doubles[2])+','+nf.format(doubles[3])
|
|
@@ -417,15 +420,18 @@ public class SettementUtil {
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(cbperson)));
|
|
|
break;
|
|
|
case BashInfo.JS_CSXM:
|
|
|
- if (money==wordtotal){
|
|
|
+// if (money==wordtotal){
|
|
|
+// settlement.setStatus("0");
|
|
|
+// }
|
|
|
+ if (wordtotal<=moneyComparison1&&wordtotal>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(wordtotal1)+","+nf.format(wordtotal2)+","+nf.format(wordtotal)));
|
|
|
break;
|
|
|
case BashInfo.JS_QTXM:
|
|
|
- if(money==otherTotal){
|
|
|
- settlement.setStatus("0");
|
|
|
- }
|
|
|
+// if(money==otherTotal){
|
|
|
+// settlement.setStatus("0");
|
|
|
+// }
|
|
|
if(otherTotal<=moneyComparison1&&otherTotal>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
@@ -449,7 +455,7 @@ public class SettementUtil {
|
|
|
// if(money==divisionFbr){
|
|
|
// settlement.setStatus("0");
|
|
|
// }
|
|
|
- if(divisionFbr<=moneyComparison1&&divisionFbr>=money){
|
|
|
+ if(divisionFbr<=moneyComparison1&&divisionFbr>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(divisionFbr)+","+nf.format(divisiontotal[1])+","+nf.format(divisiontotal[3])));
|
|
@@ -507,6 +513,9 @@ public class SettementUtil {
|
|
|
for (Settlement settlement:settlements){
|
|
|
name = settlement.getEntryName();
|
|
|
//读取字段区分
|
|
|
+// if(name.contains(SJ)){
|
|
|
+// name=BashInfo.JS_SJ;
|
|
|
+// }
|
|
|
if(name.equals(BDZ_TBRNAME)){
|
|
|
name=BashInfo.JS_CBRF;
|
|
|
}
|
|
@@ -691,7 +700,7 @@ public class SettementUtil {
|
|
|
}
|
|
|
switch (key){
|
|
|
case BashInfo.JS_FBFX:
|
|
|
- reason = getDJoint(settlement);
|
|
|
+ reason = getDJoint(settlement,DLBDZ_FBFX1);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_CBRF:
|
|
@@ -784,7 +793,7 @@ public class SettementUtil {
|
|
|
}
|
|
|
switch (key){
|
|
|
case BashInfo.JS_FBFX:
|
|
|
- reason = getDJoint(settlement);
|
|
|
+ reason = getDJoint(settlement,DLBDZ_FBFX1);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BDZ_TBRNAME:
|
|
@@ -865,17 +874,28 @@ public class SettementUtil {
|
|
|
}
|
|
|
if(status.equals("1")){
|
|
|
double money = settlement.getMoney();
|
|
|
+ double moneyComparison1=money+5.0;//范围金额+5.0元
|
|
|
+ double moneyComparison2=money-5.0;//范围金额-5.0元
|
|
|
double amout1 = Double.valueOf(amout[0]);
|
|
|
double amout2 = Double.valueOf(amout[1]);
|
|
|
- if(money!=amout1&&amout1!=amout2){
|
|
|
+ if (amout1>moneyComparison1&&amout1<moneyComparison2&&amout2>moneyComparison1&&amout2<moneyComparison2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
}
|
|
|
- if(amout1!=amout2&&money==amout1){
|
|
|
+ if(amout1!=amout2&&amout1<=moneyComparison1&&amout1>=moneyComparison2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
}
|
|
|
- if (money!=amout1&&amout1==amout2){
|
|
|
+ if (amout1>moneyComparison1&&amout1<moneyComparison2&&amout1==amout2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
}
|
|
|
+// if(money!=amout1&&amout1!=amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if(amout1!=amout2&&money==amout1){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if (money!=amout1&&amout1==amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
+// }
|
|
|
}
|
|
|
return reason;
|
|
|
}
|
|
@@ -884,53 +904,17 @@ public class SettementUtil {
|
|
|
* @param settlement bean
|
|
|
* @return reason
|
|
|
*/
|
|
|
- public static String getDJoint(Settlement settlement){
|
|
|
- String reason="";
|
|
|
- String[] amout=settlement.getTheAmount().split(",");
|
|
|
- String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
- +"<br>"+SettementUtil.RESON_JZFBFX.replace("xxx",amout[2])
|
|
|
- +"<br>"+SettementUtil.RESON_AZFBFX.replace("xxx",amout[3])
|
|
|
- +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
|
- String reason2=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
- +"<br>"+SettementUtil.RESON_JZFBFX3.replace("xxx",amout[4])
|
|
|
- +"<br>"+SettementUtil.RESON_AZFBFX3.replace("xxx",amout[5])
|
|
|
- +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[1]);
|
|
|
- String status =settlement.getStatus();
|
|
|
- if(status.equals("0")){
|
|
|
- reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
- }
|
|
|
- if(status.equals("1")){
|
|
|
- double money = settlement.getMoney();
|
|
|
- double amout1 = Double.valueOf(amout[0]);
|
|
|
- double amout2 = Double.valueOf(amout[1]);
|
|
|
- if(money!=amout1&&money!=amout2){
|
|
|
- reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
- }
|
|
|
- if(money!=amout2&&money==amout1){
|
|
|
- reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
- }
|
|
|
- if (money!=amout1&&money==amout2){
|
|
|
- reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
- }
|
|
|
- }
|
|
|
- return reason;
|
|
|
- }
|
|
|
- /**
|
|
|
- * 获取 变电站 分部分项 reason值
|
|
|
- * @param settlement bean
|
|
|
- * @return reason
|
|
|
- */
|
|
|
- public static String getBdzJoint(Settlement settlement){
|
|
|
+ public static String getDJoint(Settlement settlement,String[] tips){
|
|
|
String reason="";
|
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
|
- String reason1=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
- +"<br>"+SettementUtil.BDZ_FBFX1.replace("xxx",amout[2])
|
|
|
- +"<br>"+SettementUtil.BDZ_FBFX2.replace("xxx",amout[3])
|
|
|
- +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
|
- String reason2=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(settlement.getMoney()))
|
|
|
- +"<br>"+SettementUtil.RESON_JZFBFX3.replace("xxx",amout[4])
|
|
|
- +"<br>"+SettementUtil.RESON_AZFBFX3.replace("xxx",amout[5])
|
|
|
- +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[1]);
|
|
|
+ String reason1=tips[0].replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
+ +"<br>"+tips[1].replace("xxx",amout[2])
|
|
|
+ +"<br>"+tips[2].replace("xxx",amout[3])
|
|
|
+ +"<br>"+tips[3].replace("xxx",amout[0]);
|
|
|
+ String reason2=tips[0].replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
+ +"<br>"+tips[4].replace("xxx",amout[4])
|
|
|
+ +"<br>"+tips[5].replace("xxx",amout[5])
|
|
|
+ +"<br>"+tips[6].replace("xxx",amout[1]);
|
|
|
String status =settlement.getStatus();
|
|
|
if(status.equals("0")){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
@@ -939,18 +923,67 @@ public class SettementUtil {
|
|
|
double money = settlement.getMoney();
|
|
|
double amout1 = Double.valueOf(amout[0]);
|
|
|
double amout2 = Double.valueOf(amout[1]);
|
|
|
- if(money!=amout1&&money!=amout2){
|
|
|
+ double moneyComparison1=money+5.0;//范围金额+5.0元
|
|
|
+ double moneyComparison2=money-5.0;//范围金额-5.0元
|
|
|
+ if (amout1>moneyComparison1&&amout1<moneyComparison2&&amout2>moneyComparison1&&amout2<moneyComparison2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
}
|
|
|
- if(money!=amout2&&money==amout1){
|
|
|
+ if(money!=amout2&&amout1<=moneyComparison1&&amout1>=moneyComparison2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
}
|
|
|
- if (money!=amout1&&money==amout2){
|
|
|
+ if (money!=amout1&&amout2<=moneyComparison1&&amout2>=moneyComparison2){
|
|
|
reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
}
|
|
|
+// if(money!=amout1&&money!=amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if(money!=amout2&&money==amout1){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if (money!=amout1&&money==amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
+// }
|
|
|
}
|
|
|
return reason;
|
|
|
}
|
|
|
+// /**
|
|
|
+// * 获取 变电站 分部分项 reason值
|
|
|
+// * @param settlement bean
|
|
|
+// * @return reason
|
|
|
+// */
|
|
|
+// public static String getBdzJoint(Settlement settlement){
|
|
|
+// String reason="";
|
|
|
+// String[] amout=settlement.getTheAmount().split(",");
|
|
|
+// String reason1=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
+// +"<br>"+SettementUtil.BDZ_FBFX1.replace("xxx",amout[2])
|
|
|
+// +"<br>"+SettementUtil.BDZ_FBFX2.replace("xxx",amout[3])
|
|
|
+// +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
|
+// String reason2=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(settlement.getMoney()))
|
|
|
+// +"<br>"+SettementUtil.RESON_JZFBFX3.replace("xxx",amout[4])
|
|
|
+// +"<br>"+SettementUtil.RESON_AZFBFX3.replace("xxx",amout[5])
|
|
|
+// +"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[1]);
|
|
|
+// String status =settlement.getStatus();
|
|
|
+// if(status.equals("0")){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
+// }
|
|
|
+// if(status.equals("1")){
|
|
|
+// double money = settlement.getMoney();
|
|
|
+// double amout1 = Double.valueOf(amout[0]);
|
|
|
+// double amout2 = Double.valueOf(amout[1]);
|
|
|
+// double moneyComparison1=money+5.0;//范围金额+5.0元
|
|
|
+// double moneyComparison2=money-5.0;//范围金额-5.0元
|
|
|
+// if(money!=amout1&&money!=amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if(money!=amout2&&money==amout1){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_TRUE+"<br>"+reason2+"<br>"+SettementUtil.RESON_FLASE;
|
|
|
+// }
|
|
|
+// if (money!=amout1&&money==amout2){
|
|
|
+// reason=reason1+"<br>"+SettementUtil.RESON_FLASE+"<br>"+reason2+"<br>"+SettementUtil.RESON_TRUE;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return reason;
|
|
|
+// }
|
|
|
/**
|
|
|
* 规费/其他费 等 计算 数据 常量匹配
|
|
|
* @param constant1 匹配的常量one
|