|
@@ -6,10 +6,15 @@ import com.jeeplus.common.utils.sg.ExcelUtil;
|
|
import com.jeeplus.modules.sg.overheadline.entity.Settlement;
|
|
import com.jeeplus.modules.sg.overheadline.entity.Settlement;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.text.FieldPosition;
|
|
|
|
+import java.text.NumberFormat;
|
|
|
|
+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();
|
|
public static final String RESON_TRUE=" 金额<span style='color:#0000FF'> 一致。</span>";
|
|
public static final String RESON_TRUE=" 金额<span style='color:#0000FF'> 一致。</span>";
|
|
public static final String RESON_FLASE=" 金额<span style='color:#FF0000'> 不一致。</span>";
|
|
public static final String RESON_FLASE=" 金额<span style='color:#FF0000'> 不一致。</span>";
|
|
public static final String BDZ_TBRNAME="投标人采购设备费";
|
|
public static final String BDZ_TBRNAME="投标人采购设备费";
|
|
@@ -295,6 +300,7 @@ 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;//获取当前汇总表金额
|
|
@@ -320,7 +326,7 @@ public class SettementUtil {
|
|
if (money==built&&money==division){
|
|
if (money==built&&money==division){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(built+","+division+","+builtTotal[0]+","+builtTotal[1]+","+divisiontotal[0]+","+divisiontotal[2]));
|
|
|
|
|
|
+ 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;
|
|
break;
|
|
case BashInfo.JS_CBRF:
|
|
case BashInfo.JS_CBRF:
|
|
if(money==cbperson){
|
|
if(money==cbperson){
|
|
@@ -355,7 +361,7 @@ public class SettementUtil {
|
|
if(money==divisionFbr){
|
|
if(money==divisionFbr){
|
|
settlement.setStatus("0");
|
|
settlement.setStatus("0");
|
|
}
|
|
}
|
|
- settlement.setTheAmount(String.valueOf(divisionFbr+","+divisiontotal[1]+","+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);
|
|
double[] jgComparison = getJgjsComparison(settlements);
|
|
@@ -676,11 +682,11 @@ public class SettementUtil {
|
|
public static String getDJoint(Settlement settlement){
|
|
public static String getDJoint(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()))
|
|
|
|
|
|
+ String reason1=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+SettementUtil.RESON_JZFBFX.replace("xxx",amout[2])
|
|
+"<br>"+SettementUtil.RESON_JZFBFX.replace("xxx",amout[2])
|
|
+"<br>"+SettementUtil.RESON_AZFBFX.replace("xxx",amout[3])
|
|
+"<br>"+SettementUtil.RESON_AZFBFX.replace("xxx",amout[3])
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
- String reason2=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(settlement.getMoney()))
|
|
|
|
|
|
+ String reason2=SettementUtil.RESON_FBFX1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+SettementUtil.RESON_JZFBFX3.replace("xxx",amout[4])
|
|
+"<br>"+SettementUtil.RESON_JZFBFX3.replace("xxx",amout[4])
|
|
+"<br>"+SettementUtil.RESON_AZFBFX3.replace("xxx",amout[5])
|
|
+"<br>"+SettementUtil.RESON_AZFBFX3.replace("xxx",amout[5])
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[1]);
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[1]);
|
|
@@ -710,9 +716,10 @@ 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(settlement.getMoney()))
|
|
|
|
|
|
+ String reason1=SettementUtil.BDZ_FXFX.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+SettementUtil.BDZ_FBFX1.replace("xxx",amout[2])
|
|
+"<br>"+SettementUtil.BDZ_FBFX1.replace("xxx",amout[2])
|
|
+"<br>"+SettementUtil.BDZ_FBFX2.replace("xxx",amout[3])
|
|
+"<br>"+SettementUtil.BDZ_FBFX2.replace("xxx",amout[3])
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
+"<br>"+SettementUtil.RESON_GCJS4.replace("xxx",amout[0]);
|
|
@@ -748,9 +755,10 @@ 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(settlement.getMoney()))
|
|
|
|
|
|
+ reason=constant1.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+constant2.replace("xxx",settlement.getTheAmount());
|
|
+"<br>"+constant2.replace("xxx",settlement.getTheAmount());
|
|
if (status.equals("0")){
|
|
if (status.equals("0")){
|
|
reason+="<br>"+SettementUtil.RESON_TRUE;
|
|
reason+="<br>"+SettementUtil.RESON_TRUE;
|
|
@@ -767,9 +775,10 @@ 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(settlement.getMoney()))
|
|
|
|
|
|
+ String reason=csxm.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+RESON_CSXM1.replace("xxx",amout[0])+
|
|
+"<br>"+RESON_CSXM1.replace("xxx",amout[0])+
|
|
"<br>"+RESON_CSXM2.replace("xxx",amout[1])+
|
|
"<br>"+RESON_CSXM2.replace("xxx",amout[1])+
|
|
"<br>"+RESON_CSXM3.replace("xxx",amout[2]);
|
|
"<br>"+RESON_CSXM3.replace("xxx",amout[2]);
|
|
@@ -787,10 +796,12 @@ 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();
|
|
- reason=fbrf.replace("xxx",String.valueOf(settlement.getMoney()))
|
|
|
|
|
|
+ reason=fbrf.replace("xxx",String.valueOf(nf.format(settlement.getMoney())))
|
|
+"<br>"+RESON_DLFBRF1.replace("xxx",amout[1])
|
|
+"<br>"+RESON_DLFBRF1.replace("xxx",amout[1])
|
|
+"<br>"+RESON_DLFBRF2.replace("xxx",amout[2])
|
|
+"<br>"+RESON_DLFBRF2.replace("xxx",amout[2])
|
|
+"<br>"+RESON_GCJS4.replace("xxx",amout[0]);
|
|
+"<br>"+RESON_GCJS4.replace("xxx",amout[0]);
|
|
@@ -808,9 +819,11 @@ 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(settlement.getMoney()));
|
|
|
|
|
|
+ reason+=RESON_JGJS.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
if (booleans[1]){
|
|
if (booleans[1]){
|
|
reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
}
|
|
}
|
|
@@ -848,9 +861,11 @@ 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(settlement.getMoney()));
|
|
|
|
|
|
+ reason+=BDZ_TBBJ.replace("xxx",String.valueOf(nf.format(settlement.getMoney())));
|
|
if (booleans[1]){
|
|
if (booleans[1]){
|
|
reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
reason+="<br>"+RESON_JGJS1.replace("xxx",amout[1]);
|
|
}
|
|
}
|
|
@@ -888,6 +903,8 @@ 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(settlement.getMoney()));
|