|
@@ -172,7 +172,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 +332,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 +342,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 +435,7 @@ public class SettementUtil {
|
|
|
double money=0;
|
|
|
for (Settlement settlement:settlements){
|
|
|
name = settlement.getEntryName();
|
|
|
+ //读取字段区分
|
|
|
if(name.equals(BDZ_TBRNAME)){
|
|
|
name=BashInfo.JS_CBRF;
|
|
|
}
|
|
@@ -592,7 +596,7 @@ 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:
|
|
@@ -622,12 +626,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 +652,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 +679,20 @@ 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(settlement,booleans);
|
|
|
+
|
|
|
+ }else {
|
|
|
+ reason = getBDZJoint(settlement,booleans);
|
|
|
}
|
|
|
- reason = getBDZJoint(settlement,booleans);
|
|
|
settlement.setReason(reason);
|
|
|
break;
|
|
|
case BashInfo.JS_BZZS:
|
|
@@ -842,17 +855,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;
|