|
@@ -12,7 +12,6 @@ import java.text.NumberFormat;
|
|
import java.text.ParsePosition;
|
|
import java.text.ParsePosition;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-
|
|
|
|
public class SettementUtil {
|
|
public class SettementUtil {
|
|
private static final NumberFormat nf= NumberFormat.getInstance();
|
|
private static final NumberFormat nf= NumberFormat.getInstance();
|
|
public static final String RESON_TRUE=" 金额<span style='color:#0000FF'> 一致。</span>";
|
|
public static final String RESON_TRUE=" 金额<span style='color:#0000FF'> 一致。</span>";
|
|
@@ -116,7 +115,12 @@ public class SettementUtil {
|
|
public static final String RESON_GCJS2=" 补增值税税率调整差额为<span style='font-weight: bold;'>xxx</span>元,";
|
|
public static final String RESON_GCJS2=" 补增值税税率调整差额为<span style='font-weight: bold;'>xxx</span>元,";
|
|
public static final String RESON_GCJS3=" 扣减甲供材超供材料费为<span style='font-weight: bold;'>xxx</span>元,";
|
|
public static final String RESON_GCJS3=" 扣减甲供材超供材料费为<span style='font-weight: bold;'>xxx</span>元,";
|
|
public static final String RESON_GCJS4=" 汇总金额为<span style='font-weight: bold;'>xxx</span>元,";
|
|
public static final String RESON_GCJS4=" 汇总金额为<span style='font-weight: bold;'>xxx</span>元,";
|
|
-
|
|
|
|
|
|
+ /*
|
|
|
|
+ 设置转换参数
|
|
|
|
+ */
|
|
|
|
+ static {
|
|
|
|
+ nf.setGroupingUsed(false);
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 《工程竣工表》、《工程项目投标表》获取所有数据
|
|
* 《工程竣工表》、《工程项目投标表》获取所有数据
|
|
* @param importExcel 表格对象
|
|
* @param importExcel 表格对象
|
|
@@ -224,63 +228,71 @@ public class SettementUtil {
|
|
if (money==builtTotal&&money==divisiontotal[0]){
|
|
if (money==builtTotal&&money==divisiontotal[0]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(builtTotal+","+divisiontotal[0]));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(builtTotal)+","+nf.format(divisiontotal[0])));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_CBRF:
|
|
case BashInfo.JS_CBRF:
|
|
if(money==cbperson){
|
|
if(money==cbperson){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(cbperson));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(cbperson)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_CSXM:
|
|
case BashInfo.JS_CSXM:
|
|
if (money==wordtotal){
|
|
if (money==wordtotal){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(wordtotal1+","+wordtotal2+","+wordtotal));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(wordtotal1)+","+nf.format(wordtotal2)+","+nf.format(wordtotal)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_QTXM:
|
|
case BashInfo.JS_QTXM:
|
|
if(money==otherTotal){
|
|
if(money==otherTotal){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(otherTotal));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(otherTotal)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_GF:
|
|
case BashInfo.JS_GF:
|
|
if (money==feescount){
|
|
if (money==feescount){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(feescount));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(feescount)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_SJ:
|
|
case BashInfo.JS_SJ:
|
|
settlement.setStatus("2");
|
|
settlement.setStatus("2");
|
|
- settlement.setTheAmount(String.valueOf(money));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_FBRF:
|
|
case BashInfo.JS_FBRF:
|
|
if(money==divisiontotal[1]){
|
|
if(money==divisiontotal[1]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(divisiontotal[1]));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(divisiontotal[1])));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_JGJS:
|
|
case BashInfo.JS_JGJS:
|
|
- double[] jgComparison = getJgjsComparison(settlements);
|
|
|
|
- if (money==jgComparison[0]){
|
|
|
|
|
|
+ double[] doubles = getJgjsComparison(settlements);
|
|
|
|
+ if (money==doubles[0]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
|
|
+ String str = String.valueOf(nf.format(doubles[0])+','+nf.format(doubles[1])+','+nf.format(doubles[2])+','+nf.format(doubles[3])
|
|
|
|
+ +','+nf.format(doubles[4])+','+nf.format(doubles[5])+','+nf.format(doubles[6])+','+nf.format(doubles[7]));
|
|
|
|
+// settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
+ settlement.setTheAmount(str);
|
|
break;
|
|
break;
|
|
case BashInfo.JS_BZZS:
|
|
case BashInfo.JS_BZZS:
|
|
settlement.setStatus("2");
|
|
settlement.setStatus("2");
|
|
- settlement.setTheAmount(String.valueOf(money));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_KJJG:
|
|
case BashInfo.JS_KJJG:
|
|
settlement.setStatus("2");
|
|
settlement.setStatus("2");
|
|
- settlement.setTheAmount(String.valueOf(money));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_GCJS:
|
|
case BashInfo.JS_GCJS:
|
|
double[] gcComparison =getGcComparison(settlements);
|
|
double[] gcComparison =getGcComparison(settlements);
|
|
if (money==gcComparison[0]){
|
|
if (money==gcComparison[0]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
|
|
+ String gc = String.valueOf(nf.format(gcComparison[0])+','+
|
|
|
|
+ nf.format(gcComparison[1])+','
|
|
|
|
+ +nf.format(gcComparison[2])+','+
|
|
|
|
+ nf.format(gcComparison[3]));
|
|
|
|
+// settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
+ settlement.setTheAmount(gc);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -300,7 +312,6 @@ public class SettementUtil {
|
|
* @return 电缆/变电站 项目 导入后 校验规则 list集合
|
|
* @return 电缆/变电站 项目 导入后 校验规则 list集合
|
|
*/
|
|
*/
|
|
public static List<Settlement> getDLComparison(List<Settlement> settlements, double builtTotal[], double[] divisiontotal, double wordtotal1,double wordtotal2, double otherTotal, double feescount,double cbperson){
|
|
public static List<Settlement> getDLComparison(List<Settlement> settlements, double builtTotal[], double[] divisiontotal, double wordtotal1,double wordtotal2, double otherTotal, double feescount,double cbperson){
|
|
- nf.setGroupingUsed(false);
|
|
|
|
double wordtotal=wordtotal1+wordtotal2;//措施费相加
|
|
double wordtotal=wordtotal1+wordtotal2;//措施费相加
|
|
String name;//获取当前汇总表名称
|
|
String name;//获取当前汇总表名称
|
|
double money;//获取当前汇总表金额
|
|
double money;//获取当前汇总表金额
|
|
@@ -332,29 +343,29 @@ public class SettementUtil {
|
|
if(money==cbperson){
|
|
if(money==cbperson){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(cbperson));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(cbperson)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_CSXM:
|
|
case BashInfo.JS_CSXM:
|
|
if (money==wordtotal){
|
|
if (money==wordtotal){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(wordtotal1+","+wordtotal2+","+wordtotal));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(wordtotal1)+","+nf.format(wordtotal2)+","+nf.format(wordtotal)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_QTXM:
|
|
case BashInfo.JS_QTXM:
|
|
if(money==otherTotal){
|
|
if(money==otherTotal){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(otherTotal));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(otherTotal)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_GF:
|
|
case BashInfo.JS_GF:
|
|
if (money==feescount){
|
|
if (money==feescount){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(feescount));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(feescount)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_SJ:
|
|
case BashInfo.JS_SJ:
|
|
settlement.setStatus("2");
|
|
settlement.setStatus("2");
|
|
- settlement.setTheAmount(String.valueOf(money));
|
|
|
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_FBRF:
|
|
case BashInfo.JS_FBRF:
|
|
double divisionFbr =divisiontotal[1]+divisiontotal[3];
|
|
double divisionFbr =divisiontotal[1]+divisiontotal[3];
|
|
@@ -364,11 +375,14 @@ public class SettementUtil {
|
|
settlement.setTheAmount(String.valueOf(nf.format(divisionFbr)+","+nf.format(divisiontotal[1])+","+nf.format(divisiontotal[3])));
|
|
settlement.setTheAmount(String.valueOf(nf.format(divisionFbr)+","+nf.format(divisiontotal[1])+","+nf.format(divisiontotal[3])));
|
|
break;
|
|
break;
|
|
case BashInfo.JS_JGJS:
|
|
case BashInfo.JS_JGJS:
|
|
- double[] jgComparison = getJgjsComparison(settlements);
|
|
|
|
- if (money==jgComparison[0]){
|
|
|
|
|
|
+ double[] doubles = getJgjsComparison(settlements);
|
|
|
|
+ if (money==doubles[0]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
|
|
+ String str = String.valueOf(nf.format(doubles[0])+','+nf.format(doubles[1])+','+nf.format(doubles[2])+','+nf.format(doubles[3])
|
|
|
|
+ +','+nf.format(doubles[4])+','+nf.format(doubles[5])+','+nf.format(doubles[6])+','+nf.format(doubles[7]));
|
|
|
|
+// settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
+ settlement.setTheAmount(str);
|
|
break;
|
|
break;
|
|
case BashInfo.JS_BZZS:
|
|
case BashInfo.JS_BZZS:
|
|
settlement.setStatus("2");
|
|
settlement.setStatus("2");
|
|
@@ -383,7 +397,12 @@ public class SettementUtil {
|
|
if (money==gcComparison[0]){
|
|
if (money==gcComparison[0]){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
|
|
+ String gc = String.valueOf(nf.format(gcComparison[0])+','+
|
|
|
|
+ nf.format(gcComparison[1])+','
|
|
|
|
+ +nf.format(gcComparison[2])+','+
|
|
|
|
+ nf.format(gcComparison[3]));
|
|
|
|
+// settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
+ settlement.setTheAmount(gc);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -652,7 +671,7 @@ public class SettementUtil {
|
|
public static String getFbfxJoint(Settlement settlement){
|
|
public static String getFbfxJoint(Settlement settlement){
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
- String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(settlement.getMoney()))+"<br>"+SettementUtil.RESON_FBFX2.replace("xxx",amout[0]);
|
|
|
|
|
|
+ String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))+"<br>"+SettementUtil.RESON_FBFX2.replace("xxx",amout[0]);
|
|
String reason2=SettementUtil.RESON_FBFX2.replace("xxx",amout[0])+"<br>"+SettementUtil.RESON_FBFX3.replace("xxx",amout[1]);
|
|
String reason2=SettementUtil.RESON_FBFX2.replace("xxx",amout[0])+"<br>"+SettementUtil.RESON_FBFX3.replace("xxx",amout[1]);
|
|
String status =settlement.getStatus();
|
|
String status =settlement.getStatus();
|
|
if(status.equals("0")){
|
|
if(status.equals("0")){
|
|
@@ -716,7 +735,6 @@ public class SettementUtil {
|
|
* @return reason
|
|
* @return reason
|
|
*/
|
|
*/
|
|
public static String getBdzJoint(Settlement settlement){
|
|
public static String getBdzJoint(Settlement settlement){
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String reason1=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
String reason1=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
@@ -755,7 +773,6 @@ public class SettementUtil {
|
|
* @return Settlement reason 属性 赋值
|
|
* @return Settlement reason 属性 赋值
|
|
*/
|
|
*/
|
|
public static String getJoint(String constant1,String constant2,Settlement settlement){
|
|
public static String getJoint(String constant1,String constant2,Settlement settlement){
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String status=settlement.getStatus();
|
|
String status=settlement.getStatus();
|
|
reason=constant1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
reason=constant1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
@@ -775,7 +792,6 @@ public class SettementUtil {
|
|
* @return reason
|
|
* @return reason
|
|
*/
|
|
*/
|
|
public static String getCsfJoint(String csxm,Settlement settlement){
|
|
public static String getCsfJoint(String csxm,Settlement settlement){
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String status =settlement.getStatus();
|
|
String status =settlement.getStatus();
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String reason=csxm.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
String reason=csxm.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
@@ -796,8 +812,6 @@ public class SettementUtil {
|
|
* @return reason
|
|
* @return reason
|
|
*/
|
|
*/
|
|
public static String getDlJoint(String fbrf,Settlement settlement){
|
|
public static String getDlJoint(String fbrf,Settlement settlement){
|
|
- NumberFormat nf= NumberFormat.getInstance();
|
|
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout = settlement.getTheAmount().split(",");
|
|
String[] amout = settlement.getTheAmount().split(",");
|
|
String status=settlement.getStatus();
|
|
String status=settlement.getStatus();
|
|
@@ -819,8 +833,6 @@ public class SettementUtil {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public static String getJgJoint(Settlement settlement,boolean[] booleans){
|
|
public static String getJgJoint(Settlement settlement,boolean[] booleans){
|
|
- NumberFormat nf= NumberFormat.getInstance();
|
|
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
reason+=RESON_JGJS.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
reason+=RESON_JGJS.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
@@ -861,8 +873,6 @@ public class SettementUtil {
|
|
* @return reason
|
|
* @return reason
|
|
*/
|
|
*/
|
|
public static String getBDZJoint(Settlement settlement,boolean[] booleans){
|
|
public static String getBDZJoint(Settlement settlement,boolean[] booleans){
|
|
- NumberFormat nf= NumberFormat.getInstance();
|
|
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
reason+=BDZ_TBBJ.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
reason+=BDZ_TBBJ.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
@@ -903,11 +913,9 @@ public class SettementUtil {
|
|
* @return bean rason
|
|
* @return bean rason
|
|
*/
|
|
*/
|
|
public static String getJshzJoint(Settlement settlement,boolean[] booleans){
|
|
public static String getJshzJoint(Settlement settlement,boolean[] booleans){
|
|
- NumberFormat nf= NumberFormat.getInstance();
|
|
|
|
- nf.setGroupingUsed(false);
|
|
|
|
String reason="";
|
|
String reason="";
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
- reason+=RESON_GCJS.replace("xxx",String.valueOf(settlement.getMoney()));
|
|
|
|
|
|
+ reason+=RESON_GCJS.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
if (booleans[8]){
|
|
if (booleans[8]){
|
|
reason+="<br>"+RESON_GCJS1.replace("xxx",amout[1]);
|
|
reason+="<br>"+RESON_GCJS1.replace("xxx",amout[1]);
|
|
}
|
|
}
|
|
@@ -932,7 +940,7 @@ public class SettementUtil {
|
|
* @return 布尔 数组
|
|
* @return 布尔 数组
|
|
*/
|
|
*/
|
|
public static boolean[] getJgforJoint(List<Settlement> settlements){
|
|
public static boolean[] getJgforJoint(List<Settlement> settlements){
|
|
- String key;
|
|
|
|
|
|
+ String key = "";
|
|
boolean[] booleans = new boolean[11];
|
|
boolean[] booleans = new boolean[11];
|
|
for (int i = 0; i < booleans.length; i++) {
|
|
for (int i = 0; i < booleans.length; i++) {
|
|
booleans[i]=false;
|
|
booleans[i]=false;
|