|
@@ -85,7 +85,7 @@ public class SettementUtil {
|
|
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>元,";
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 查找匹配
|
|
|
|
|
|
+ * 查找架空匹配
|
|
*/
|
|
*/
|
|
public static List<Settlement> getSelectSettlement(List<Settlement> settlementList){
|
|
public static List<Settlement> getSelectSettlement(List<Settlement> settlementList){
|
|
boolean[] booleans =getJgforJoint(settlementList);
|
|
boolean[] booleans =getJgforJoint(settlementList);
|
|
@@ -434,7 +434,7 @@ public class SettementUtil {
|
|
return reason;
|
|
return reason;
|
|
}
|
|
}
|
|
/*
|
|
/*
|
|
- 分布分项工程费对比
|
|
|
|
|
|
+ 架空分布分项工程费对比
|
|
*/
|
|
*/
|
|
public static String getFbfxJoint(Settlement settlement){
|
|
public static String getFbfxJoint(Settlement settlement){
|
|
String reason="";
|
|
String reason="";
|
|
@@ -549,84 +549,178 @@ public class SettementUtil {
|
|
return booleans;
|
|
return booleans;
|
|
}
|
|
}
|
|
|
|
|
|
-// /*
|
|
|
|
-//// 电缆校验
|
|
|
|
-//// */
|
|
|
|
-//// public static List<Settlement> getDLComparison(List<Settlement> settlements, double builtTotal[], double[] divisiontotal, double wordtotal1,double wordtotal2, double otherTotal, double feescount,double cbperson){
|
|
|
|
-//// double wordtotal=wordtotal1+wordtotal2;//措施费相加
|
|
|
|
-//// String name;//获取当前汇总表名称
|
|
|
|
-//// double money;//获取当前汇总表金额
|
|
|
|
-//// Settlement settlement;//对象
|
|
|
|
-//// for (int i = 0; i < settlements.size(); i++) {
|
|
|
|
-//// settlement=settlements.get(i);
|
|
|
|
-//// name=settlement.getEntryName();
|
|
|
|
-//// money=settlement.getMoney();
|
|
|
|
-//// settlement.setStatus("1");
|
|
|
|
-//// switch (name){
|
|
|
|
-//// case BashInfo.JS_FBFX:
|
|
|
|
-//// if (money==builtTotal&&money==divisiontotal[0]){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(builtTotal+","+divisiontotal[0]));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_CBRF:
|
|
|
|
-//// if(money==cbperson){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(cbperson));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_CSXM:
|
|
|
|
-//// if (money==wordtotal){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(wordtotal1+","+wordtotal2+","+wordtotal));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_QTXM:
|
|
|
|
-//// if(money==otherTotal){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(otherTotal));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_GF:
|
|
|
|
-//// if (money==feescount){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(feescount));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_SJ:
|
|
|
|
-//// settlement.setStatus("2");
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(money));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_FBRF:
|
|
|
|
-//// if(money==divisiontotal[1]){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(divisiontotal[1]));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_JGJS:
|
|
|
|
-//// double[] jgComparison = getJgjsComparison(settlements);
|
|
|
|
-//// if (money==jgComparison[0]){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_BZZS:
|
|
|
|
-//// settlement.setStatus("2");
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(money));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_KJJG:
|
|
|
|
-//// settlement.setStatus("2");
|
|
|
|
-//// settlement.setTheAmount(String.valueOf(money));
|
|
|
|
-//// break;
|
|
|
|
-//// case BashInfo.JS_GCJS:
|
|
|
|
-//// double[] gcComparison =getGcComparison(settlements);
|
|
|
|
-//// if (money==gcComparison[0]){
|
|
|
|
-//// settlement.setStatus("0");
|
|
|
|
-//// }
|
|
|
|
-//// settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
-//// break;
|
|
|
|
-//// }
|
|
|
|
-//// }
|
|
|
|
-//// return settlements;
|
|
|
|
-//// }
|
|
|
|
|
|
+ /*
|
|
|
|
+// 电缆校验
|
|
|
|
+// */
|
|
|
|
+ public static List<Settlement> getDLComparison(List<Settlement> settlements, double builtTotal[], double[] divisiontotal, double wordtotal1,double wordtotal2, double otherTotal, double feescount,double cbperson){
|
|
|
|
+ double wordtotal=wordtotal1+wordtotal2;//措施费相加
|
|
|
|
+ String name;//获取当前汇总表名称
|
|
|
|
+ double money;//获取当前汇总表金额
|
|
|
|
+ Settlement settlement;//对象
|
|
|
|
+ for (int i = 0; i < settlements.size(); i++) {
|
|
|
|
+ settlement=settlements.get(i);
|
|
|
|
+ name=settlement.getEntryName();
|
|
|
|
+ money=settlement.getMoney();
|
|
|
|
+ settlement.setStatus("1");
|
|
|
|
+ switch (name){
|
|
|
|
+ case BashInfo.JS_FBFX:
|
|
|
|
+ double division=divisiontotal[0]+divisiontotal[2];
|
|
|
|
+ double built = builtTotal[0]+builtTotal[1];
|
|
|
|
+ if (money==built&&money==division){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(built+","+division+","+builtTotal[0]+","+builtTotal[1]+","+divisiontotal[0]+","+divisiontotal[2]));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_CBRF:
|
|
|
|
+ if(money==cbperson){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(cbperson));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_CSXM:
|
|
|
|
+ if (money==wordtotal){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(wordtotal1+","+wordtotal2+","+wordtotal));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_QTXM:
|
|
|
|
+ if(money==otherTotal){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(otherTotal));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_GF:
|
|
|
|
+ if (money==feescount){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(feescount));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_SJ:
|
|
|
|
+ settlement.setStatus("2");
|
|
|
|
+ settlement.setTheAmount(String.valueOf(money));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_FBRF:
|
|
|
|
+ double divisionFbr =divisiontotal[1]+divisiontotal[3];
|
|
|
|
+ if(money==divisiontotal[1]){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(String.valueOf(divisionFbr+','+divisiontotal[1]+","+divisiontotal[3]));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_JGJS:
|
|
|
|
+ double[] jgComparison = getJgjsComparison(settlements);
|
|
|
|
+ if (money==jgComparison[0]){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(StringUtils.join(jgComparison,','));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_BZZS:
|
|
|
|
+ settlement.setStatus("2");
|
|
|
|
+ settlement.setTheAmount(String.valueOf(money));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_KJJG:
|
|
|
|
+ settlement.setStatus("2");
|
|
|
|
+ settlement.setTheAmount(String.valueOf(money));
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_GCJS:
|
|
|
|
+ double[] gcComparison =getGcComparison(settlements);
|
|
|
|
+ if (money==gcComparison[0]){
|
|
|
|
+ settlement.setStatus("0");
|
|
|
|
+ }
|
|
|
|
+ settlement.setTheAmount(StringUtils.join(gcComparison,','));
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return settlements;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * 查找电缆匹配
|
|
|
|
+ */
|
|
|
|
+ public static List<Settlement> getSelectDlSettlement(List<Settlement> settlementList){
|
|
|
|
+ boolean[] booleans =getJgforJoint(settlementList);
|
|
|
|
+ String key="";
|
|
|
|
+ String reason="";
|
|
|
|
+ for(Settlement settlement:settlementList){
|
|
|
|
+ key = settlement.getEntryName();
|
|
|
|
+ switch (key){
|
|
|
|
+ case BashInfo.JS_FBFX:
|
|
|
|
+ reason = getFbfxJoint(settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_CBRF:
|
|
|
|
+ reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_CSXM:
|
|
|
|
+ reason =getCsfJoint(settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_QTXM:
|
|
|
|
+ reason=getJoint(RESON_QTXM,RESON_QTXM1,settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_GF:
|
|
|
|
+ reason=getJoint(RESON_GF,RESON_GF1,settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_SJ:
|
|
|
|
+ reason=RESON_SJ;
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_FBRF:
|
|
|
|
+ reason=getJoint(RESON_FBRF,RESON_FBRF1,settlement);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_JGJS:
|
|
|
|
+ reason = getJgJoint(settlement,booleans);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_BZZS:
|
|
|
|
+ reason=RESON_BZZS;
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.JS_KJJG:
|
|
|
|
+ reason=RESON_BZZS;
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ case BashInfo.GCJS:
|
|
|
|
+ reason=getJshzJoint(settlement,booleans);
|
|
|
|
+ settlement.setReason(reason);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return settlementList;
|
|
|
|
+ }
|
|
|
|
+ /*
|
|
|
|
+ 电缆分布分项工程费对比
|
|
|
|
+ */
|
|
|
|
+ public static String getDJoint(Settlement settlement){
|
|
|
|
+ String reason="";
|
|
|
|
+ String[] amout=settlement.getTheAmount().split(",");
|
|
|
|
+ String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(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_FBFX2.replace("xxx",amout[0])+"<br>"+SettementUtil.RESON_FBFX3.replace("xxx",amout[1]);
|
|
|
|
+ String reason3=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(settlement.getMoney()))+"<br>"+SettementUtil.RESON_FBFX2.replace("xxx",amout[0]);
|
|
|
|
+ String reason4=SettementUtil.RESON_FBFX2.replace("xxx",amout[0])+"<br>"+SettementUtil.RESON_FBFX3.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&&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;
|
|
|
|
+ }
|
|
}
|
|
}
|