|
@@ -122,40 +122,40 @@ public class SettementUtil {
|
|
|
nf.setGroupingUsed(false);
|
|
|
}
|
|
|
/**
|
|
|
- * 《工程竣工表》、《工程项目投标表》获取所有数据
|
|
|
+ * 《工程竣工表》、《工程项目投标表》获取所需要的数据存放在集合当中
|
|
|
* @param importExcel 表格对象
|
|
|
- * @return 《工程竣工表》/《工程项目投资表》 list集合
|
|
|
+ * @return 《工程竣工表》/《工程项目投资表》 list集合 集合为汇总表结算比对时所需要的内容
|
|
|
*/
|
|
|
public static List<Settlement> getComparison(ImportExcel importExcel){
|
|
|
List<JkxlAdjustFee> jkxlAdjustFees = BashInfo.getWsbFee(importExcel);
|
|
|
- boolean flag = false;//判断 是否是变电站
|
|
|
- boolean flagTotal= true;//判断是否有分部分项
|
|
|
- double countTotal=0.0;//安装/建筑合计金额
|
|
|
- Settlement settlement;
|
|
|
- List<Settlement> settlementList = new ArrayList<Settlement>();
|
|
|
- int lastDataRowNum = importExcel.getLastDataRowNum();
|
|
|
+ boolean flag = false;//判断 工程表/投标表名称以及字段比较
|
|
|
+ boolean flagTotal= true;//判断是否有分部分项 如果没有为true
|
|
|
+ double countTotal=0.0;//安装分部分项/建筑分部分项合计金额
|
|
|
+ Settlement settlement; //结算汇总对象
|
|
|
+ List<Settlement> settlementList = new ArrayList<Settlement>(); //存储对象集合
|
|
|
+ int lastDataRowNum = importExcel.getLastDataRowNum(); //汇总表总长度
|
|
|
String key = "";//获取结算名称
|
|
|
- Integer count = 0; //计数器
|
|
|
- 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(ST)){
|
|
|
- key=ST;
|
|
|
+ Integer count = 0; //计数器 用作税金 默认值为0,当存在一次税金时 count++
|
|
|
+ for (int i = 0; i < lastDataRowNum; i++) { //循环当前表格
|
|
|
+ settlement=new Settlement(); //常见settlement对象
|
|
|
+ key = importExcel.getValue(i+1,1);//获取汇总表名称
|
|
|
+ if (key.contains(BashInfo.JS_SJ)){ //判断key是否为税金
|
|
|
+ if (key.contains(ST)){ //如果存在税金并且包含"税金调差"
|
|
|
+ key=ST; //赋值key为税金调差
|
|
|
}else {
|
|
|
- key=BashInfo.JS_SJ;
|
|
|
+ key=BashInfo.JS_SJ;//否则key赋值给税金
|
|
|
}
|
|
|
}
|
|
|
- if(key.contains(SE)){
|
|
|
- if (key.contains(SE1)){
|
|
|
- key=SE1;
|
|
|
+ if(key.contains(SE)){ //判断是否为税额
|
|
|
+ if (key.contains(SE1)){ //如果包含税额调差
|
|
|
+ key=SE1; //key赋值给税额调差
|
|
|
}else {
|
|
|
key=BashInfo.JS_SJ;
|
|
|
}
|
|
|
}
|
|
|
- if(key.equals(BDZ_TBRNAME)){
|
|
|
- flag=true;
|
|
|
- key=BashInfo.JS_CBRF;
|
|
|
+ if(key.equals(BDZ_TBRNAME)){//判断是否包含“投标人采购设备费”
|
|
|
+ flag=true; //flag为true时说明包含 投标人采购设备费
|
|
|
+ key=BashInfo.JS_CBRF; //如果时 赋值key为 “承包人”
|
|
|
}
|
|
|
if (key.equals(BDZ_ZBRNAME)){
|
|
|
flag=true;
|
|
@@ -166,35 +166,35 @@ public class SettementUtil {
|
|
|
key=BashInfo.JS_JGJS;
|
|
|
}
|
|
|
switch (key){
|
|
|
- case RESON_FBFXGCF1:
|
|
|
- countTotal+=importExcel.getDouble(i+1,2);
|
|
|
+ case RESON_FBFXGCF1: //如果存在 建筑工程费
|
|
|
+ countTotal+=importExcel.getDouble(i+1,2);//得到金额
|
|
|
break;
|
|
|
- case RESON_FBFXGCF2:
|
|
|
- countTotal+=importExcel.getDouble(i+1,2);
|
|
|
+ case RESON_FBFXGCF2://如果存在 安装工程费
|
|
|
+ countTotal+=importExcel.getDouble(i+1,2);//累加金额
|
|
|
break;
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
- flagTotal=false;
|
|
|
- settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
+ case BashInfo.JS_FBFX: //如果存在 分部分项
|
|
|
+ flagTotal=false; //flagTotal 设置为false 说明分部分项存在
|
|
|
+ settlementList.add(getSettlement(settlement,key,importExcel,i));//存到list中
|
|
|
break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
- if (flag){
|
|
|
- key=BDZ_TBRNAME;
|
|
|
+ case BashInfo.JS_CBRF: //如果存在 承包人费
|
|
|
+ if (flag){ //如果为flag为true
|
|
|
+ key=BDZ_TBRNAME;//投标人赋值赋值给key
|
|
|
flag=false;
|
|
|
}
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_CSXM:
|
|
|
+ case BashInfo.JS_CSXM://如果存在措施费存到list中
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_QTXM:
|
|
|
+ case BashInfo.JS_QTXM://如果存在其他项目费存到list中
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_GF:
|
|
|
+ case BashInfo.JS_GF://如果存在规费存在list当中
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_SJ:
|
|
|
- count+=1;//计数器
|
|
|
- if (count>1){
|
|
|
+ case BashInfo.JS_SJ://如果存在税金
|
|
|
+ count+=1;//计数器+1
|
|
|
+ if (count>1){//如果count>1则第二次出现税金 进行税金累加替换list当中 存在税金的settement替换金额
|
|
|
for (Settlement st:settlementList){
|
|
|
if (st.getEntryName().equals(BashInfo.JS_SJ)){
|
|
|
double s = importExcel.getDouble(i+1,2);
|
|
@@ -203,8 +203,9 @@ public class SettementUtil {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (count==1){
|
|
|
- settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
+ if (count==1){//如果等于一 税金第一次出现
|
|
|
+ settlementList.add(getSettlement(settlement,key,importExcel,i));//存在集合当中
|
|
|
+ //获取 其他需要的字段 存放集合当中
|
|
|
for (JkxlAdjustFee jkxlAdjustFee:jkxlAdjustFees){
|
|
|
settlement=new Settlement();
|
|
|
settlement.setEntryName(jkxlAdjustFee.getType());
|
|
@@ -214,27 +215,27 @@ public class SettementUtil {
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
- if (flag){
|
|
|
+ case BashInfo.JS_FBRF://如果存在发包人采购费
|
|
|
+ if (flag){ //如果为 true 则key为招标人采购设备费
|
|
|
key=BDZ_ZBRNAME;
|
|
|
- flag=false;
|
|
|
+ flag=false;//关闭开关
|
|
|
}
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case ST:
|
|
|
+ case ST://如果为“税金调差”
|
|
|
settlementList.add(getSettlement(settlement,ST,importExcel,i));
|
|
|
break;
|
|
|
- case SE1:
|
|
|
+ case SE1://如果为“税额调差”
|
|
|
settlementList.add(getSettlement(settlement,ST,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_JGJS:
|
|
|
+ case BashInfo.JS_JGJS://如果为“竣工结算价合计”
|
|
|
if (flag){
|
|
|
key=BDZ_TBNAME;
|
|
|
flag=false;
|
|
|
}
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
- case BashInfo.JS_GCJS:
|
|
|
+ case BashInfo.JS_GCJS://如果为工程结算价
|
|
|
settlementList.add(getSettlement(settlement,key,importExcel,i));
|
|
|
break;
|
|
|
case RESON_ZZFC:
|
|
@@ -251,10 +252,10 @@ public class SettementUtil {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if (flagTotal){
|
|
|
+ if (flagTotal){//flagTotal为true 则不存在分部分项费
|
|
|
settlement=new Settlement();
|
|
|
- settlement.setEntryName(BashInfo.JS_FBFX);
|
|
|
- settlement.setMoney(countTotal);
|
|
|
+ settlement.setEntryName(BashInfo.JS_FBFX); //赋值settlement 的名称为分部分项费
|
|
|
+ settlement.setMoney(countTotal);//countTotal 赋值金额 为countTotal
|
|
|
settlementList.add(0,settlement);
|
|
|
}
|
|
|
return settlementList;
|
|
@@ -283,95 +284,101 @@ public class SettementUtil {
|
|
|
settlement=settlements.get(i);
|
|
|
name=settlement.getEntryName();
|
|
|
//读取字段区分
|
|
|
- if(name.equals(BDZ_TBRNAME)){
|
|
|
- name=BashInfo.JS_CBRF;
|
|
|
+ if(name.equals(BDZ_TBRNAME)){//如果为“投标人采购设备费”
|
|
|
+ name=BashInfo.JS_CBRF;//把name赋值 “承包人采购费”
|
|
|
}
|
|
|
- if (name.equals(BDZ_ZBRNAME)){
|
|
|
- name=BashInfo.JS_FBRF;
|
|
|
+ if (name.equals(BDZ_ZBRNAME)){//如果为 “招标人采购设备费”
|
|
|
+ name=BashInfo.JS_FBRF;//赋值 “发包人采购设备费”
|
|
|
}
|
|
|
- if (name.equals(BDZ_TBNAME)){
|
|
|
- name=BashInfo.JS_JGJS;
|
|
|
+ if (name.equals(BDZ_TBNAME)){ //如果为 “投标报价”
|
|
|
+ name=BashInfo.JS_JGJS; //赋值 “竣工结算价合计”
|
|
|
}
|
|
|
- if (name.contains(RESON_KYJ)){
|
|
|
- name = RESON_KYJ;
|
|
|
+ if (name.contains(RESON_KYJ)){ //如果包含“扣”
|
|
|
+ name = RESON_KYJ; //赋值 “扣”
|
|
|
}
|
|
|
- if (name.contains(RESON_KYJ1)){
|
|
|
- name = RESON_KYJ1;
|
|
|
+ if (name.contains(RESON_KYJ1)){ //如果包含“减”
|
|
|
+ name = RESON_KYJ1; //赋值:“减”
|
|
|
}
|
|
|
- if (name.equals(RESON_ZZJS)){
|
|
|
+ if (name.equals(RESON_ZZJS)){//同上
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZZFC)){
|
|
|
+ if (name.equals(RESON_ZZFC)){//同上
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZGTB)){
|
|
|
+ if (name.equals(RESON_ZGTB)){//同上
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_XFHZJ)){
|
|
|
+ if (name.equals(RESON_XFHZJ)){//同上
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- money=settlement.getMoney();
|
|
|
- moneyComparison1 = money+5.0;
|
|
|
+ money=settlement.getMoney();//获取对象金额
|
|
|
+ moneyComparison1 = money+5.0;//取值范围
|
|
|
moneyComparison2 = money-5.0;
|
|
|
settlement.setStatus("1");
|
|
|
switch (name){
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
+ case BashInfo.JS_FBFX://如果存在分部分项费
|
|
|
+ //builtTotal 架空线路工程费用汇总表 分部分项 合计 divisiontotal[0] 获取分部分项比对数据清单 分部分项费用
|
|
|
+ //判断
|
|
|
if(builtTotal<=moneyComparison1&&builtTotal>=moneyComparison2&&divisiontotal[0]<=moneyComparison1&&divisiontotal[0]>=moneyComparison2){
|
|
|
- settlement.setStatus("0");
|
|
|
+ settlement.setStatus("0");//一致
|
|
|
}
|
|
|
- settlement.setTheAmount(String.valueOf(nf.format(builtTotal)+","+nf.format(divisiontotal[0])));
|
|
|
+ settlement.setTheAmount(String.valueOf(nf.format(builtTotal)+","+nf.format(divisiontotal[0])));//存入数据库
|
|
|
break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
+ case BashInfo.JS_CBRF://如果存在承包人采购设备费
|
|
|
+ //cbperson 获取承包人采购表合计
|
|
|
if(cbperson<=moneyComparison1&&cbperson>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(cbperson)));
|
|
|
break;
|
|
|
- case BashInfo.JS_CSXM:
|
|
|
+ case BashInfo.JS_CSXM://如果存在措施项目费
|
|
|
+ //wordtotal 措施费(1),措施费(2)金额相加
|
|
|
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:
|
|
|
+ case BashInfo.JS_QTXM://如果存在其他项目费
|
|
|
+ //otherTotal 其他项目费合计
|
|
|
if(otherTotal<=moneyComparison1&&otherTotal>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(otherTotal)));
|
|
|
break;
|
|
|
- case BashInfo.JS_GF:
|
|
|
+ case BashInfo.JS_GF://如果存在规费
|
|
|
if (feescount<=moneyComparison1&&feescount>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(feescount)));
|
|
|
break;
|
|
|
case BashInfo.JS_SJ:
|
|
|
- settlement.setStatus("2");
|
|
|
+ settlement.setStatus("2");//不验证
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
|
break;
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
+ case BashInfo.JS_FBRF: //如果存在发包人费
|
|
|
if(divisiontotal[1]<=moneyComparison1&&divisiontotal[1]>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(divisiontotal[1])));
|
|
|
break;
|
|
|
- case BashInfo.JS_JGJS:
|
|
|
- double doubles = getJgjsComparison(settlements);
|
|
|
+ case BashInfo.JS_JGJS://如果存在竣工结算价
|
|
|
+ double doubles = getJgjsComparison(settlements);//获取与竣工结算价比对的金额 doubles为比对金额
|
|
|
if (doubles<=moneyComparison1&&doubles>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
String str = String.valueOf(nf.format(doubles));
|
|
|
settlement.setTheAmount(str);
|
|
|
break;
|
|
|
- case BashInfo.JS_GCJS:
|
|
|
+ case BashInfo.JS_GCJS: //如果存在工程结算价
|
|
|
+ //gcComparison 工程结算价 比对金额
|
|
|
double gcComparison =getGcComparison(settlements);
|
|
|
if (gcComparison<=moneyComparison1&&gcComparison>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(gcComparison)));
|
|
|
break;
|
|
|
- default:
|
|
|
- settlement.setStatus("2");
|
|
|
+ default://如果以上都不匹配
|
|
|
+ settlement.setStatus("2");//设置为不验证
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -435,66 +442,75 @@ public class SettementUtil {
|
|
|
//默认初始状态为 1-不一致
|
|
|
settlement.setStatus("1");
|
|
|
switch (name){
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
+ case BashInfo.JS_FBFX://分部分项工程费
|
|
|
double division=divisiontotal[0]+divisiontotal[2];//分工清单分部分项
|
|
|
double built = builtTotal[0]+builtTotal[1];//安装合计总金额
|
|
|
+ //比对是否在范围内
|
|
|
if(built<=moneyComparison1&&built>=moneyComparison2&&division<=moneyComparison1&&division>=moneyComparison2){
|
|
|
- settlement.setStatus("0");
|
|
|
+ settlement.setStatus("0"); //比对结果 一致
|
|
|
}
|
|
|
+ //存放字符串 用“,”隔开
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(built)+","+nf.format(division)+","+nf.format(builtTotal[0])+","+nf.format(builtTotal[1])+","+nf.format(divisiontotal[0])+","+nf.format(divisiontotal[2])));
|
|
|
break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
+ case BashInfo.JS_CBRF://承包人采购设备费
|
|
|
+ //cbperson 发包人/招标人 费用
|
|
|
if(cbperson<=moneyComparison1&&cbperson>=moneyComparison2){
|
|
|
- settlement.setStatus("0");
|
|
|
+ settlement.setStatus("0");//比对结果 一致
|
|
|
}
|
|
|
+ //存放字符串 用“,”隔开
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(cbperson)));
|
|
|
break;
|
|
|
- case BashInfo.JS_CSXM:
|
|
|
+ case BashInfo.JS_CSXM://措施项目费
|
|
|
+ //wordtotal 措施表1,2相加
|
|
|
if (wordtotal<=moneyComparison1&&wordtotal>=moneyComparison2){
|
|
|
- settlement.setStatus("0");
|
|
|
+ settlement.setStatus("0");//比对结果 一致
|
|
|
}
|
|
|
+ //存放字符串 用“,”隔开
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(wordtotal1)+","+nf.format(wordtotal2)+","+nf.format(wordtotal)));
|
|
|
break;
|
|
|
- case BashInfo.JS_QTXM:
|
|
|
+ case BashInfo.JS_QTXM://其他项目费
|
|
|
+ //otherTotal 其他费比对金额
|
|
|
if(otherTotal<=moneyComparison1&&otherTotal>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(otherTotal)));
|
|
|
break;
|
|
|
- case BashInfo.JS_GF:
|
|
|
+ case BashInfo.JS_GF://规费
|
|
|
+ //feescount 规费表等到合计金额
|
|
|
if (feescount<=moneyComparison1&&feescount>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(feescount)));
|
|
|
break;
|
|
|
- case BashInfo.JS_SJ:
|
|
|
- settlement.setStatus("2");
|
|
|
+ case BashInfo.JS_SJ://税金
|
|
|
+ settlement.setStatus("2");//不验证
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(money)));
|
|
|
break;
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
- double divisionFbr =divisiontotal[1]+divisiontotal[3];
|
|
|
+ case BashInfo.JS_FBRF://发包人采购材料费
|
|
|
+ double divisionFbr =divisiontotal[1]+divisiontotal[3];//发包人比对金额相加
|
|
|
if(divisionFbr<=moneyComparison1&&divisionFbr>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(divisionFbr)+","+nf.format(divisiontotal[1])+","+nf.format(divisiontotal[3])));
|
|
|
break;
|
|
|
- case BashInfo.JS_JGJS:
|
|
|
- double doubles = getJgjsComparison(settlements);
|
|
|
+ case BashInfo.JS_JGJS://竣工结算价合计
|
|
|
+ double doubles = getJgjsComparison(settlements);//获取比对金额
|
|
|
if (doubles<=moneyComparison1&&doubles>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
String str = String.valueOf(nf.format(doubles));
|
|
|
settlement.setTheAmount(str);
|
|
|
break;
|
|
|
- case BashInfo.JS_GCJS:
|
|
|
- double gcComparison =getGcComparison(settlements);
|
|
|
+ case BashInfo.JS_GCJS://工程结算价
|
|
|
+ double gcComparison =getGcComparison(settlements);//获取比对金额
|
|
|
+ //验证 金额 误差是否在范围内
|
|
|
if (gcComparison<=moneyComparison1&&gcComparison>=moneyComparison2){
|
|
|
settlement.setStatus("0");
|
|
|
}
|
|
|
settlement.setTheAmount(String.valueOf(nf.format(gcComparison)));
|
|
|
break;
|
|
|
- default:
|
|
|
- settlement.setStatus("2");
|
|
|
+ default://如果以上不匹配
|
|
|
+ settlement.setStatus("2");//默认不验证
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -506,109 +522,102 @@ public class SettementUtil {
|
|
|
* @return Double 经过计算后的竣工结算价
|
|
|
*/
|
|
|
public static Double getJgjsComparison(List<Settlement> settlements){
|
|
|
- double[] doubles = new double[8];
|
|
|
- boolean flag= false;
|
|
|
- String name="";
|
|
|
- double money=0.0;
|
|
|
- double minus = 0.0;
|
|
|
- double addcount = 0.0;
|
|
|
- double jgjeCount = 0.0;
|
|
|
+ double[] doubles = new double[8]; //定义数组 (可改)
|
|
|
+ boolean flag= false; //用作判断是否存在 工程结算价/最终结算价 等等。
|
|
|
+ String name=""; //settlement对象名称
|
|
|
+ double money=0.0;//settlement对象金额
|
|
|
+ double minus = 0.0;// 减去的金额合计
|
|
|
+ double addcount = 0.0;//加上的金额合计
|
|
|
+ double jgjeCount = 0.0;//存放竣工结算价金额
|
|
|
for (Settlement settlement:settlements){
|
|
|
name = settlement.getEntryName();
|
|
|
money = settlement.getMoney();
|
|
|
- if (name.equals(BDZ_TBNAME)){
|
|
|
- name=BashInfo.JS_JGJS;
|
|
|
+ if (name.equals(BDZ_TBNAME)){//如果为投标报价
|
|
|
+ name=BashInfo.JS_JGJS; //name=竣工结算
|
|
|
}
|
|
|
- if(name.equals(BDZ_TBRNAME)){
|
|
|
- name=BashInfo.JS_CBRF;
|
|
|
+ if(name.equals(BDZ_TBRNAME)){//如果为 投标人采购设备费
|
|
|
+ name=BashInfo.JS_CBRF; //承包人费
|
|
|
}
|
|
|
- if (name.equals(BDZ_ZBRNAME)){
|
|
|
- name=BashInfo.JS_FBRF;
|
|
|
- }
|
|
|
- if (name.equals(BDZ_TBNAME)){
|
|
|
- name=BashInfo.JS_JGJS;
|
|
|
+ if (name.equals(BDZ_ZBRNAME)){ //如果为招标人费
|
|
|
+ name=BashInfo.JS_FBRF;//发包人采购材料费
|
|
|
}
|
|
|
+ //如果包含 “扣” “减” “下浮”
|
|
|
if (name.contains(RESON_KYJ)||name.contains(RESON_XF)||name.contains(RESON_KYJ1)){
|
|
|
- if (!name.equals(RESON_XFHZJ)){
|
|
|
- name = RESON_KYJ;
|
|
|
+ if (!name.equals(RESON_XFHZJ)){//如果 不等于下浮造价
|
|
|
+ name = RESON_KYJ; //赋值name:“扣”
|
|
|
}
|
|
|
}
|
|
|
-// if (){
|
|
|
-// name = RESON_KYJ1;
|
|
|
-// }
|
|
|
- if (name.equals(RESON_ZZJS)){
|
|
|
+ if (name.equals(RESON_ZZJS)){//工程结算价 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZZFC)){
|
|
|
+ if (name.equals(RESON_ZZFC)){//工程结算价 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZGTB)){
|
|
|
+ if (name.equals(RESON_ZGTB)){//工程结算价 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_XFHZJ)){
|
|
|
+ if (name.equals(RESON_XFHZJ)){//工程结算价 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
switch (name) {
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
+ case BashInfo.JS_FBFX://分部分项工程费
|
|
|
doubles[1]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
+ case BashInfo.JS_CBRF://承包人采购设备费
|
|
|
doubles[2]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_CSXM:
|
|
|
+ case BashInfo.JS_CSXM://措施项目费
|
|
|
doubles[3]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_QTXM:
|
|
|
+ case BashInfo.JS_QTXM://其他项目费
|
|
|
doubles[4]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_GF:
|
|
|
+ case BashInfo.JS_GF://规费
|
|
|
doubles[5]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_SJ:
|
|
|
+ case BashInfo.JS_SJ://税金
|
|
|
doubles[6]=money;
|
|
|
break;
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
+ case BashInfo.JS_FBRF://发包人采购材料费
|
|
|
doubles[7]=money;
|
|
|
break;
|
|
|
- case RESON_KYJ:
|
|
|
- minus += money;
|
|
|
+ case RESON_KYJ://扣
|
|
|
+ minus += money; //需要减去的金额累加
|
|
|
break;
|
|
|
-// case RESON_KYJ1:
|
|
|
-// minus += money;
|
|
|
-// break;
|
|
|
- default:
|
|
|
- if (name.equals(BashInfo.JS_JGJS)){
|
|
|
- jgjeCount=money;
|
|
|
- }else if (!name.equals(BashInfo.JS_GCJS)){
|
|
|
- addcount+=money;
|
|
|
+ default: //如果以上不匹配
|
|
|
+ if (name.equals(BashInfo.JS_JGJS)){//如果等于 "竣工结算价合计"
|
|
|
+ jgjeCount=money; //存储 "竣工结算价合计" 金额
|
|
|
+ }else if (!name.equals(BashInfo.JS_GCJS)){ //如果不等于 工程结算价
|
|
|
+ addcount+=money; //需要加上的金额 累加
|
|
|
}
|
|
|
- if (name.equals(BashInfo.JS_GCJS)){
|
|
|
- flag=true;
|
|
|
+ if (name.equals(BashInfo.JS_GCJS)){ //如果name为 工程结算价
|
|
|
+ flag=true;//存在 工程结算价/最终结算价 等等
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- doubles[0]=doubles[1]+doubles[2]+doubles[3]+doubles[4]+doubles[5]+doubles[6]-minus+addcount;
|
|
|
- getFlag = false;
|
|
|
- if (flag){
|
|
|
- doubles[0] = doubles[0]+ minus - addcount;
|
|
|
+ doubles[0]=doubles[1]+doubles[2]+doubles[3]+doubles[4]+doubles[5]+doubles[6]-minus+addcount;//默认竣工结算比对金额 默认为不减去发包人
|
|
|
+ getFlag = false;//默认 变量为 flase 传给 其他方法进行判断
|
|
|
+ if (flag){//如果为true 说明存在 工程结算价
|
|
|
+ doubles[0] = doubles[0]+ minus - addcount;//还原
|
|
|
}
|
|
|
if ((jgjeCount-5.0)>=doubles[0]||(jgjeCount+5.0)<=doubles[0]){
|
|
|
+ //减去发包人
|
|
|
doubles[0]=doubles[1]+doubles[2]+doubles[3]+doubles[4]+doubles[5]+doubles[6]-doubles[7]-minus+addcount;
|
|
|
- getFlag = true;
|
|
|
+ getFlag = true;//改变 变量为 flase 传给 其他方法进行判断
|
|
|
}
|
|
|
- if (flag){
|
|
|
+ if (flag){//如果为true 说明存在 工程结算价
|
|
|
doubles[0] = doubles[0]+ minus - addcount;
|
|
|
}
|
|
|
- return doubles[0];
|
|
|
+ return doubles[0];//竣工结算价 比对金额
|
|
|
}
|
|
|
/**
|
|
|
* 工程结算价 校验
|
|
|
* @param settlements 《工程项目结算汇总表》 集合
|
|
|
- * @return double[] 计算工程结算价
|
|
|
+ * @return double 计算工程结算价核对金额
|
|
|
*/
|
|
|
public static double getGcComparison(List<Settlement> settlements){
|
|
|
- double fbrMoney = 0.0;
|
|
|
+ double fbrMoney = 0.0;//发包人费 存储
|
|
|
String name="";
|
|
|
double money=0.0;
|
|
|
double minus = 0.0;
|
|
@@ -616,56 +625,59 @@ public class SettementUtil {
|
|
|
double count = 0.0;
|
|
|
for (Settlement settlement:settlements){
|
|
|
name = settlement.getEntryName();
|
|
|
- if (name.equals(BDZ_TBNAME)){
|
|
|
- name=BashInfo.JS_JGJS;
|
|
|
- }
|
|
|
- if(name.equals(BDZ_TBRNAME)){
|
|
|
- name=BashInfo.JS_CBRF;
|
|
|
+ //判断 兼容
|
|
|
+ if (name.equals(BDZ_TBNAME)){//投标报价
|
|
|
+ name=BashInfo.JS_JGJS;//竣工结算价合计
|
|
|
}
|
|
|
- if (name.equals(BDZ_ZBRNAME)){
|
|
|
- name=BashInfo.JS_FBRF;
|
|
|
+ if(name.equals(BDZ_TBRNAME)){//投标人采购设备费
|
|
|
+ name=BashInfo.JS_CBRF;//承包人采购设备费
|
|
|
}
|
|
|
- if (name.equals(BDZ_TBNAME)){
|
|
|
- name=BashInfo.JS_JGJS;
|
|
|
+ if (name.equals(BDZ_ZBRNAME)){//招标人采购材料费
|
|
|
+ name=BashInfo.JS_FBRF;//发包人采购材料费
|
|
|
}
|
|
|
+// if (name.equals(BDZ_TBNAME)){//投标报价
|
|
|
+// name=BashInfo.JS_JGJS;//竣工结算价合计
|
|
|
+// }
|
|
|
+ //如果包含 “扣” “减” “下浮”
|
|
|
if (name.contains(RESON_KYJ)||name.contains(RESON_XF)||name.contains(RESON_KYJ1)){
|
|
|
- if (!name.equals(RESON_XFHZJ)){
|
|
|
- name = RESON_KYJ;
|
|
|
+ if (!name.equals(RESON_XFHZJ)){//如果 不等于下浮造价
|
|
|
+ name = RESON_KYJ;//赋值name:“扣”
|
|
|
}
|
|
|
}
|
|
|
- if (name.equals(RESON_ZZJS)){
|
|
|
+ if (name.equals(RESON_ZZJS)){//工程结算价/最终结算价 等等 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZZFC)){
|
|
|
+ if (name.equals(RESON_ZZFC)){//工程结算价/最终结算价 等等 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_ZGTB)){
|
|
|
+ if (name.equals(RESON_ZGTB)){//工程结算价/最终结算价 等等 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
- if (name.equals(RESON_XFHZJ)){
|
|
|
+ if (name.equals(RESON_XFHZJ)){//工程结算价/最终结算价 等等 兼容
|
|
|
name = BashInfo.JS_GCJS;
|
|
|
}
|
|
|
money =settlement.getMoney();
|
|
|
switch (name) {
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
- fbrMoney+=money;
|
|
|
+ case BashInfo.JS_FBRF://发包人采购材料费
|
|
|
+ fbrMoney+=money;//估值给fbrMoney
|
|
|
break;
|
|
|
- case RESON_KYJ:
|
|
|
- minus += money;
|
|
|
+ case RESON_KYJ://扣
|
|
|
+ minus += money; //获取减去的金额
|
|
|
break;
|
|
|
default:
|
|
|
+ //如果不等于 竣工结算价 和工程结算价
|
|
|
if (!name.equals(BashInfo.JS_JGJS)&&!name.equals(BashInfo.JS_GCJS)){
|
|
|
- addcount+=money;
|
|
|
+ addcount+=money; //金额相加
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if (getFlag){
|
|
|
+ if (getFlag){//为true时 减去发包人费
|
|
|
count =addcount-fbrMoney-minus;
|
|
|
- }else {
|
|
|
- count=addcount-minus;
|
|
|
+ }else {//否则
|
|
|
+ count=addcount-minus;//不减去
|
|
|
}
|
|
|
- return count;
|
|
|
+ return count; //返回 工程结算价/最终结算价 等等 比对金额
|
|
|
}
|
|
|
/**
|
|
|
* 前台显示提示数据匹配:架空线路
|
|
@@ -674,93 +686,93 @@ public class SettementUtil {
|
|
|
*/
|
|
|
public static List<Settlement> getSelectSettlement(List<Settlement> settlementList){
|
|
|
boolean flag = false;//定义开关
|
|
|
- String key="";
|
|
|
- String reason="";
|
|
|
+ String key="";//名称
|
|
|
+ String reason="";//拼接字符串 提示信息 返会给前台
|
|
|
for(Settlement settlement:settlementList){
|
|
|
key = settlement.getEntryName();
|
|
|
- if (key.equals(BDZ_TBRNAME)){
|
|
|
- flag=true;
|
|
|
- key = BashInfo.JS_CBRF;
|
|
|
+ if (key.equals(BDZ_TBRNAME)){//投标人采购设备费
|
|
|
+ flag=true;//打开开关
|
|
|
+ key = BashInfo.JS_CBRF;//key="承包人采购设备费"
|
|
|
}
|
|
|
- if (key.equals(BDZ_ZBRNAME)){
|
|
|
+ if (key.equals(BDZ_ZBRNAME)){//招标人采购材料费
|
|
|
flag=true;
|
|
|
- key=BashInfo.JS_FBRF;
|
|
|
+ key=BashInfo.JS_FBRF;//"发包人采购材料费"
|
|
|
}
|
|
|
- if (key.equals(BDZ_TBNAME)){
|
|
|
+ if (key.equals(BDZ_TBNAME)){//投标报价
|
|
|
flag=true;
|
|
|
- key = BashInfo.JS_JGJS;
|
|
|
+ key = BashInfo.JS_JGJS;//"竣工结算价合计"
|
|
|
}
|
|
|
- if (key.equals(RESON_ZZJS)){
|
|
|
- key = BashInfo.GCJS;
|
|
|
+ if (key.equals(RESON_ZZJS)){//最终结算价
|
|
|
+ key = BashInfo.GCJS;//工程结算价
|
|
|
}
|
|
|
switch (key){
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
- reason = getFbfxJoint(settlement);
|
|
|
- settlement.setReason(reason);
|
|
|
- break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
- if(flag){
|
|
|
- settlement.setEntryName(BDZ_TBRNAME);
|
|
|
- reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);
|
|
|
+ case BashInfo.JS_FBFX://"分部分项工程费
|
|
|
+ //得到提示分部分项字符串
|
|
|
+ reason = getFbfxJoint(settlement);//提示字符串
|
|
|
+ settlement.setReason(reason);//存放到对象当中
|
|
|
+ break;
|
|
|
+ case BashInfo.JS_CBRF://承包人采购设备费
|
|
|
+ if(flag){ //如果为true 为 投标人采购设备费
|
|
|
+ settlement.setEntryName(BDZ_TBRNAME);//(可去掉)
|
|
|
+ reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);//提示字符串
|
|
|
flag= false; //默认关闭
|
|
|
}else {
|
|
|
- reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);
|
|
|
+ reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);//提示字符串
|
|
|
}
|
|
|
- settlement.setReason(reason);
|
|
|
+ settlement.setReason(reason);//存放到对象当中
|
|
|
break;
|
|
|
- case BashInfo.JS_CSXM:
|
|
|
- reason =getCsfJoint(RESON_CSXM,settlement);
|
|
|
- settlement.setReason(reason);
|
|
|
+ case BashInfo.JS_CSXM://措施项目费
|
|
|
+ reason =getCsfJoint(RESON_CSXM,settlement);//提示字符串
|
|
|
+ settlement.setReason(reason);//存放到对象当中
|
|
|
break;
|
|
|
- case BashInfo.JS_QTXM:
|
|
|
- reason=getJoint(RESON_QTXM,RESON_QTXM1,settlement);
|
|
|
+ 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);
|
|
|
+ case BashInfo.JS_GF://"规费"
|
|
|
+ reason=getJoint(RESON_GF,RESON_GF1,settlement);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
- case BashInfo.JS_SJ:
|
|
|
+ case BashInfo.JS_SJ://"税金"
|
|
|
reason=RESON_SJ;
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
- case BashInfo.JS_FBRF:
|
|
|
+ case BashInfo.JS_FBRF://发包人采购材料费
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BashInfo.JS_FBRF);
|
|
|
- reason=getJoint(BDZ_FBRF,RESON_FBRF2,settlement);
|
|
|
+ reason=getJoint(BDZ_FBRF,RESON_FBRF2,settlement);//提示字符串
|
|
|
flag= false; //默认关闭
|
|
|
}else {
|
|
|
- reason=getJoint(RESON_FBRF,RESON_FBRF1,settlement);
|
|
|
+ reason=getJoint(RESON_FBRF,RESON_FBRF1,settlement);//提示字符串
|
|
|
}
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_JGJS:
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BDZ_TBNAME);
|
|
|
- reason = getJgJoint(BDZ_TBBJ,settlement,settlementList);
|
|
|
+ reason = getJgJoint(BDZ_TBBJ,settlement,settlementList);//提示字符串
|
|
|
flag = false;
|
|
|
}else {
|
|
|
- reason = getJgJoint(RESON_JGJS,settlement,settlementList);
|
|
|
+ reason = getJgJoint(RESON_JGJS,settlement,settlementList);//提示字符串
|
|
|
}
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.GCJS:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_ZZFC:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_ZGTB:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_XFHZJ:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
return settlementList;
|
|
@@ -776,46 +788,46 @@ public class SettementUtil {
|
|
|
String reason="";
|
|
|
for(Settlement settlement:settlementList){
|
|
|
key = settlement.getEntryName();
|
|
|
- if (key.equals(BDZ_TBRNAME)){
|
|
|
+ if (key.equals(BDZ_TBRNAME)){//"投标人采购设备费"
|
|
|
flag=true;
|
|
|
- key = BashInfo.JS_CBRF;
|
|
|
+ key = BashInfo.JS_CBRF;//"承包人采购设备费"
|
|
|
}
|
|
|
- if (key.equals(BDZ_ZBRNAME)){
|
|
|
+ if (key.equals(BDZ_ZBRNAME)){//"招标人采购材料费"
|
|
|
flag=true;
|
|
|
- key=BashInfo.JS_FBRF;
|
|
|
+ key=BashInfo.JS_FBRF;//"发包人采购材料费"
|
|
|
}
|
|
|
- if (key.equals(BDZ_TBNAME)){
|
|
|
+ if (key.equals(BDZ_TBNAME)){//投标报价
|
|
|
flag=true;
|
|
|
- key = BashInfo.JS_JGJS;
|
|
|
+ key = BashInfo.JS_JGJS;//"竣工结算价合计"
|
|
|
}
|
|
|
- if (key.equals(RESON_ZZJS)){
|
|
|
- key = BashInfo.GCJS;
|
|
|
+ if (key.equals(RESON_ZZJS)){// "最终结算价"
|
|
|
+ key = BashInfo.GCJS;//"工程结算价"
|
|
|
}
|
|
|
switch (key){
|
|
|
- case BashInfo.JS_FBFX:
|
|
|
- reason = getDJoint(settlement,DLBDZ_FBFX1);
|
|
|
+ case BashInfo.JS_FBFX:// "分部分项工程费"
|
|
|
+ reason = getDJoint(settlement,DLBDZ_FBFX1);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
- case BashInfo.JS_CBRF:
|
|
|
+ case BashInfo.JS_CBRF://"承包人采购设备费
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BDZ_TBRNAME);
|
|
|
- reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);
|
|
|
+ reason = getJoint(BDZ_TBRCG,BDZ_TBRCG1,settlement);//提示字符串
|
|
|
flag= false; //默认关闭
|
|
|
}else {
|
|
|
- reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);
|
|
|
+ reason = getJoint(RESON_CBRF,RESON_CBRF1,settlement);//提示字符串
|
|
|
}
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_CSXM:
|
|
|
- reason =getCsfJoint(RESON_CSXM,settlement);
|
|
|
+ reason =getCsfJoint(RESON_CSXM,settlement);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_QTXM:
|
|
|
- reason=getJoint(RESON_QTXM,RESON_QTXM1,settlement);
|
|
|
+ reason=getJoint(RESON_QTXM,RESON_QTXM1,settlement);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_GF:
|
|
|
- reason=getJoint(RESON_GF,RESON_GF1,settlement);
|
|
|
+ reason=getJoint(RESON_GF,RESON_GF1,settlement);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_SJ:
|
|
@@ -825,37 +837,37 @@ public class SettementUtil {
|
|
|
case BashInfo.JS_FBRF:
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BDZ_ZBRNAME);
|
|
|
- reason=getDlJoint(BDZ_FBRF,BDZ_FBRF1,BDZ_FBRF2,settlement);
|
|
|
+ reason=getDlJoint(BDZ_FBRF,BDZ_FBRF1,BDZ_FBRF2,settlement);//提示字符串
|
|
|
flag = false;
|
|
|
}else {
|
|
|
- reason=getDlJoint(RESON_FBRF,RESON_DLFBRF1,RESON_DLFBRF2,settlement);
|
|
|
+ reason=getDlJoint(RESON_FBRF,RESON_DLFBRF1,RESON_DLFBRF2,settlement);//提示字符串
|
|
|
}
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_JGJS:
|
|
|
if(flag){
|
|
|
settlement.setEntryName(BDZ_TBNAME);
|
|
|
- reason = getJgJoint(BDZ_TBBJ,settlement,settlementList);
|
|
|
+ reason = getJgJoint(BDZ_TBBJ,settlement,settlementList);//提示字符串
|
|
|
flag =false;
|
|
|
}else {
|
|
|
- reason = getJgJoint(RESON_JGJS,settlement,settlementList);
|
|
|
+ reason = getJgJoint(RESON_JGJS,settlement,settlementList);//提示字符串
|
|
|
}
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.GCJS:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_ZZFC:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_ZGTB:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case RESON_XFHZJ:
|
|
|
- reason=getJshzJoint(RESON_GCJS,settlement,settlementList);
|
|
|
+ reason=getJshzJoint(RESON_GCJS,settlement,settlementList);//提示字符串
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
}
|
|
@@ -963,20 +975,22 @@ public class SettementUtil {
|
|
|
return settlementList;
|
|
|
}
|
|
|
/**
|
|
|
- * 架空项目 分部分项对比
|
|
|
+ * 架空项目 分部分项提示
|
|
|
* @param settlement bean
|
|
|
- * @return String reason
|
|
|
+ * @return String reason提示字符串
|
|
|
*/
|
|
|
public static String getFbfxJoint(Settlement settlement){
|
|
|
- String reason="";
|
|
|
- String[] amout=settlement.getTheAmount().split(",");
|
|
|
+ String reason="";//提示字符串
|
|
|
+ String[] amout=settlement.getTheAmount().split(",");//数据库字段theAmount(该字段存放的金额)截取为数组
|
|
|
+ //替换常量 中的xxx
|
|
|
String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))+SettementUtil.RESON_FBFX2.replace("xxx",amout[0]);
|
|
|
String reason2=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))+SettementUtil.RESON_FBFX3.replace("xxx",amout[1]);
|
|
|
- String status =settlement.getStatus();
|
|
|
- if(status.equals("0")){
|
|
|
+ String status =settlement.getStatus();//获取状态
|
|
|
+ if(status.equals("0")){ //如果为0
|
|
|
+ //字符串加上 “金额一致” 并且 得到最总的分部分项提示字符串。
|
|
|
reason=reason1+SettementUtil.RESON_TRUE+","+","+","+reason2+SettementUtil.RESON_TRUE;
|
|
|
}
|
|
|
- if(status.equals("1")){
|
|
|
+ if(status.equals("1")){//如果为“1”,金额不一致 进行判断 哪些金额一致/不一致
|
|
|
double money = settlement.getMoney();
|
|
|
double moneyComparison1=money+5.0;//范围金额+5.0元
|
|
|
double moneyComparison2=money-5.0;//范围金额-5.0元
|
|
@@ -997,11 +1011,12 @@ public class SettementUtil {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return reason;
|
|
|
+ return reason; //最终分部分项提示信息
|
|
|
}
|
|
|
/**
|
|
|
* 获取 电缆/变电站 分部分项 reason 值
|
|
|
* @param settlement bean
|
|
|
+ * @param tips 常量数组
|
|
|
* @return reason
|
|
|
*/
|
|
|
public static String getDJoint(Settlement settlement,String[] tips){
|
|
@@ -1105,18 +1120,18 @@ public class SettementUtil {
|
|
|
return reason;
|
|
|
}
|
|
|
/**
|
|
|
- * 工程竣工 常量匹配
|
|
|
+ * 竣工结算价合计 常量匹配
|
|
|
* @param tops //常量拼接
|
|
|
* @param settlement bean
|
|
|
* @param settlements 集合
|
|
|
- * @return string
|
|
|
+ * @return string reason值
|
|
|
*/
|
|
|
public static String getJgJoint(String tops,Settlement settlement,List<Settlement> settlements){
|
|
|
String reason="";
|
|
|
reason+=tops.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
|
String amout=settlement.getTheAmount();
|
|
|
String name = "";
|
|
|
- for (int i = 0; i < settlements.size(); i++) {
|
|
|
+ for (int i = 0; i < settlements.size(); i++) {//循环遍历list集合中的settlement对象
|
|
|
name = settlements.get(i).getEntryName();
|
|
|
if (name.equals(BashInfo.JS_JGJS)||
|
|
|
name.equals(BDZ_TBNAME)){
|
|
@@ -1139,18 +1154,18 @@ public class SettementUtil {
|
|
|
return reason;
|
|
|
}
|
|
|
/**
|
|
|
- * 工程结算
|
|
|
+ * 工程结算 提示
|
|
|
* @param tops 表名 常量
|
|
|
* @param settlement 对象
|
|
|
* @param settlements 对象集合
|
|
|
- * @return String
|
|
|
+ * @return String reason 提示字符串
|
|
|
*/
|
|
|
public static String getJshzJoint(String tops,Settlement settlement,List<Settlement> settlements){
|
|
|
String reason="";
|
|
|
String name="";
|
|
|
reason = tops.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
|
String amout=settlement.getTheAmount();
|
|
|
- for (int i = 0; i < settlements.size(); i++) {
|
|
|
+ for (int i = 0; i < settlements.size(); i++) {//循环遍历list集合中的settlement对象
|
|
|
name = settlements.get(i).getEntryName();
|
|
|
if (name.equals(BashInfo.JS_JGJS)|| name.equals(BDZ_TBNAME)){
|
|
|
continue;
|