|
@@ -115,6 +115,14 @@ public class SettementUtil {
|
|
|
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_GCJS4=" 汇总金额为<span style='font-weight: bold;'>xxx</span>元,";
|
|
|
+ //工程投标 拼接数组
|
|
|
+ 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};
|
|
|
+// //分部分项 架空 电缆
|
|
|
+// String[] FBFXTOP1={RESON_FBFX1,RESON_JZFBFX,RESON_AZFBFX,RESON_GCJS4,RESON_FBFX1,RESON_JZFBFX3,RESON_AZFBFX3,RESON_GCJS4};
|
|
|
+// //分部分项 变电站
|
|
|
+// String[] FBFXTOPS2= {BDZ_FXFX,BDZ_FBFX1,BDZ_FBFX2,RESON_GCJS4,BDZ_FXFX,RESON_JZFBFX3,RESON_AZFBFX3,RESON_GCJS4};
|
|
|
/*
|
|
|
设置转换参数
|
|
|
*/
|
|
@@ -172,7 +180,7 @@ public class SettementUtil {
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
case BashInfo.JS_SJ:
|
|
|
- count+=1;
|
|
|
+ count+=1;//计数器
|
|
|
if (count>1){
|
|
|
for (Settlement st:settlementList){
|
|
|
if (st.getEntryName().equals(BashInfo.JS_SJ)){
|
|
@@ -332,6 +340,7 @@ public class SettementUtil {
|
|
|
for (int i = 0; i < settlements.size(); i++) {
|
|
|
settlement=settlements.get(i);
|
|
|
name=settlement.getEntryName();
|
|
|
+ //读取字段区分
|
|
|
if(name.equals(BDZ_TBRNAME)){
|
|
|
name=BashInfo.JS_CBRF;
|
|
|
}
|
|
@@ -341,7 +350,9 @@ public class SettementUtil {
|
|
|
if (name.equals(BDZ_TBNAME)){
|
|
|
name=BashInfo.JS_JGJS;
|
|
|
}
|
|
|
+ //获取金额
|
|
|
money=settlement.getMoney();
|
|
|
+ //默认初始状态为 1-不一致
|
|
|
settlement.setStatus("1");
|
|
|
switch (name){
|
|
|
case BashInfo.JS_FBFX:
|
|
@@ -432,6 +443,7 @@ public class SettementUtil {
|
|
|
double money=0;
|
|
|
for (Settlement settlement:settlements){
|
|
|
name = settlement.getEntryName();
|
|
|
+ //读取字段区分
|
|
|
if(name.equals(BDZ_TBRNAME)){
|
|
|
name=BashInfo.JS_CBRF;
|
|
|
}
|
|
@@ -536,7 +548,7 @@ public class SettementUtil {
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_JGJS:
|
|
|
- reason = getJgJoint(settlement,booleans);
|
|
|
+ reason = getJgJoint(TOP1,settlement,booleans);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_BZZS:
|
|
@@ -592,11 +604,11 @@ public class SettementUtil {
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_FBRF:
|
|
|
- reason=getDlJoint(RESON_FBRF,settlement);
|
|
|
+ reason=getDlJoint(RESON_FBRF,RESON_DLFBRF1,RESON_DLFBRF2,settlement);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_JGJS:
|
|
|
- reason = getJgJoint(settlement,booleans);
|
|
|
+ reason = getJgJoint(TOP1,settlement,booleans);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_BZZS:
|
|
@@ -622,12 +634,14 @@ public class SettementUtil {
|
|
|
* @return 数据库匹配后返回 集合
|
|
|
*/
|
|
|
public static List<Settlement> getSelectBdzSettlement(List<Settlement> settlementList){
|
|
|
- boolean flag= false;
|
|
|
- boolean[] booleans =getJgforJoint(settlementList);
|
|
|
- String key="";
|
|
|
- String reason="";
|
|
|
+ boolean flag;//定义开关
|
|
|
+ boolean[] booleans =getJgforJoint(settlementList);//判断读取存在字段
|
|
|
+ String key=""; //匹配字段
|
|
|
+ String reason=""; //提示 字段
|
|
|
for(Settlement settlement:settlementList){
|
|
|
+ flag= false; //默认关闭
|
|
|
key = settlement.getEntryName();
|
|
|
+ //字段 匹配
|
|
|
if (key.equals(BashInfo.JS_CBRF)){
|
|
|
flag=true;
|
|
|
key = BDZ_TBRNAME;
|
|
@@ -646,10 +660,12 @@ public class SettementUtil {
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BDZ_TBRNAME:
|
|
|
- if(flag){
|
|
|
+ if(flag){ //如果为true 变电站字段为工程竣工
|
|
|
settlement.setEntryName(BashInfo.JS_CBRF);
|
|
|
+ reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);
|
|
|
+ }else {
|
|
|
+ reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);
|
|
|
}
|
|
|
- reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_CSXM:
|
|
@@ -671,15 +687,19 @@ public class SettementUtil {
|
|
|
case SettementUtil.BDZ_ZBRNAME:
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BashInfo.JS_FBRF);
|
|
|
+ reason=getDlJoint(RESON_FBRF,RESON_DLFBRF1,RESON_DLFBRF2,settlement);
|
|
|
+ }else {
|
|
|
+ reason=getDlJoint(BDZ_FBRF,BDZ_FBRF1,BDZ_FBRF2,settlement);
|
|
|
}
|
|
|
- reason=getDlJoint(BDZ_FBRF,settlement);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case SettementUtil.BDZ_TBNAME:
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BashInfo.JS_JGJS);
|
|
|
+ reason = getJgJoint(TOP1,settlement,booleans);
|
|
|
+ }else {
|
|
|
+ reason = getJgJoint(TOP2,settlement,booleans);
|
|
|
}
|
|
|
- reason = getBDZJoint(settlement,booleans);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_BZZS:
|
|
@@ -842,17 +862,17 @@ public class SettementUtil {
|
|
|
}
|
|
|
/**
|
|
|
* 电缆/变电站 发包人采购对比
|
|
|
- * @param fbrf 发包人采购 常量
|
|
|
+ * @param s 发包人采购 常量 s1
|
|
|
* @param settlement bean
|
|
|
* @return reason
|
|
|
*/
|
|
|
- public static String getDlJoint(String fbrf,Settlement settlement){
|
|
|
+ public static String getDlJoint(String s,String s1,String s2,Settlement settlement){
|
|
|
String reason="";
|
|
|
String[] amout = settlement.getTheAmount().split(",");
|
|
|
String status=settlement.getStatus();
|
|
|
- reason=fbrf.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
- +"<br>"+RESON_DLFBRF1.replace("xxx",amout[1])
|
|
|
- +"<br>"+RESON_DLFBRF2.replace("xxx",amout[2])
|
|
|
+ reason=s.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
|
+ +"<br>"+s1.replace("xxx",amout[1])
|
|
|
+ +"<br>"+s2.replace("xxx",amout[2])
|
|
|
+"<br>"+RESON_GCJS4.replace("xxx",amout[0]);
|
|
|
if (status.equals("0")){
|
|
|
reason+="<br>"+SettementUtil.RESON_TRUE;
|
|
@@ -863,76 +883,37 @@ public class SettementUtil {
|
|
|
}
|
|
|
/**
|
|
|
* 工程竣工 常量匹配
|
|
|
+ * @param tops //常量拼接
|
|
|
* @param settlement bean
|
|
|
* @param booleans 判断《工程竣工结算表》字段 是否存在
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static String getJgJoint(Settlement settlement,boolean[] booleans){
|
|
|
- String reason="";
|
|
|
- String[] amout=settlement.getTheAmount().split(",");
|
|
|
- reason+=RESON_JGJS.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
|
- if (booleans[1]){
|
|
|
- reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
|
- }
|
|
|
- if (booleans[2]){
|
|
|
- reason+="<br>"+RESON_JGJS2.replace("xxx",amout[2]);
|
|
|
- }
|
|
|
- if (booleans[3]){
|
|
|
- reason+="<br>"+RESON_JGJS3.replace("xxx",amout[3]);
|
|
|
- }
|
|
|
- if (booleans[4]){
|
|
|
- reason+="<br>"+RESON_JGJS4.replace("xxx",amout[4]);
|
|
|
- }
|
|
|
- if (booleans[5]){
|
|
|
- reason+="<br>"+RESON_JGJS5.replace("xxx",amout[5]);
|
|
|
- }
|
|
|
- if (booleans[6]){
|
|
|
- reason+="<br>"+RESON_JGJS6.replace("xxx",amout[6]);
|
|
|
- }
|
|
|
- if (booleans[7]){
|
|
|
- reason+="<br>"+RESON_JGJS7.replace("xxx",amout[7]);
|
|
|
- }
|
|
|
- reason+="<br>"+RESON_JGJS8.replace("xxx",amout[0]);
|
|
|
- if (settlement.getStatus().equals("0")){
|
|
|
- reason+="<br>"+SettementUtil.RESON_TRUE;
|
|
|
- }else {
|
|
|
- reason+="<br>"+SettementUtil.RESON_FLASE;
|
|
|
- }
|
|
|
- return reason;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 工程投标价格匹配方法
|
|
|
- * @param settlement bean
|
|
|
- * @param booleans 判断 匹配字段 是否存在
|
|
|
- * @return reason
|
|
|
+ * @return string
|
|
|
*/
|
|
|
- public static String getBDZJoint(Settlement settlement,boolean[] booleans){
|
|
|
+ public static String getJgJoint(String[] tops,Settlement settlement,boolean[] booleans){
|
|
|
String reason="";
|
|
|
String[] amout=settlement.getTheAmount().split(",");
|
|
|
- reason+=BDZ_TBBJ.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
|
+ reason+=tops[0].replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
|
if (booleans[1]){
|
|
|
- reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
|
+ reason+="<br>"+tops[1].replace("xxx",amout[1]);
|
|
|
}
|
|
|
if (booleans[2]){
|
|
|
- reason+="<br>"+BDZ_TBBJ1.replace("xxx",amout[2]);
|
|
|
+ reason+="<br>"+tops[2].replace("xxx",amout[2]);
|
|
|
}
|
|
|
if (booleans[3]){
|
|
|
- reason+="<br>"+RESON_JGJS3.replace("xxx",amout[3]);
|
|
|
+ reason+="<br>"+tops[3].replace("xxx",amout[3]);
|
|
|
}
|
|
|
if (booleans[4]){
|
|
|
- reason+="<br>"+RESON_JGJS4.replace("xxx",amout[4]);
|
|
|
+ reason+="<br>"+tops[4].replace("xxx",amout[4]);
|
|
|
}
|
|
|
if (booleans[5]){
|
|
|
- reason+="<br>"+RESON_JGJS5.replace("xxx",amout[5]);
|
|
|
+ reason+="<br>"+tops[5].replace("xxx",amout[5]);
|
|
|
}
|
|
|
if (booleans[6]){
|
|
|
- reason+="<br>"+RESON_JGJS6.replace("xxx",amout[6]);
|
|
|
+ reason+="<br>"+tops[6].replace("xxx",amout[6]);
|
|
|
}
|
|
|
if (booleans[7]){
|
|
|
- reason+="<br>"+BDZ_TBBJ2.replace("xxx",amout[7]);
|
|
|
+ reason+="<br>"+tops[7].replace("xxx",amout[7]);
|
|
|
}
|
|
|
- reason+="<br>"+RESON_JGJS8.replace("xxx",amout[0]);
|
|
|
+ reason+="<br>"+tops[8].replace("xxx",amout[0]);
|
|
|
if (settlement.getStatus().equals("0")){
|
|
|
reason+="<br>"+SettementUtil.RESON_TRUE;
|
|
|
}else {
|