Browse Source

Merge remote-tracking branch 'origin/master'

yue 5 years ago
parent
commit
0d245dd9c9

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/TransferOfPower2.java

@@ -3,7 +3,7 @@ package com.jeeplus.modules.sg.financial.erpcredit.entity;
 /**
  * 移交资产-配电网资产-一览表2(设备)
  */
-public class TransferOfPower2 {
+public class TransferOfEquipment {
     private String powerId;//配电网项目编号
     private String powerName;//配电网资产名称
     private String powerAssetClass;//资产类别

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/TransferOfPower1.java

@@ -3,7 +3,7 @@ package com.jeeplus.modules.sg.financial.erpcredit.entity;
 /**
  * 移交资产-配电网资产-一览表
  */
-public class TransferOfPower1 {
+public class TransferOfPowerLine {
     private String powerId;//配电网项目编号
     private String powerName;//配电网资产名称
     private String powerNumberBars;//线路条数

+ 49 - 18
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java

@@ -3,23 +3,23 @@
  */
 package com.jeeplus.modules.sg.financial.erpcredit.service;
 
-import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
 import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.audit.information.service.InformationService;
-import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCredit;
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditEquipment;
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditMaterial;
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpJudge;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditEquipmentMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMaterialMapper;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ErpInfo;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ExportTemplate;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil2;
+import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
 import com.jeeplus.modules.sg.financial.settlement.mapper.DataMaintenanceMapper;
 import com.jeeplus.modules.sg.financial.settlement.service.DataMaintenanceService;
-import org.apache.poi.hssf.usermodel.HSSFFont;
 import org.apache.poi.xssf.usermodel.XSSFFont;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -208,16 +208,16 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
         try {
             // 写数据
             FileOutputStream fos = new FileOutputStream(newFile);
-            ExportUtil2.getSheetOverView(sheetOverView,erpCreditList,maintainDatas);
-            ExportUtil2.getSheetView(sheetView,erpCreditList,maintainDatas,workbook);//调用一览表写入方法
-            ExportUtil2.getSheetOtherFee(sheetOtherFee,erpCreditList,maintainDatas);
-            ExportUtil2.getSheetAssetsTotal(sheetAssetsTotal,erpCreditList);
-            ExportUtil2.getSheetLine1(sheetLine1,erpCreditList,workbook);
-            ExportUtil2.getSheetEquip(sheetEquip,erpCreditList,workbook);
-            ExportUtil2.getSheetEquipMaterial(sheetEquipMaterial,erpCreditList,workbook);
-            ExportUtil2.getSheetSettlement(sheetSettlement,erpCreditList,maintainDatas);
-            ExportUtil2.getSheetLine2(sheetLine2,erpCreditList,workbook);
-            ExportUtil2.getSheetEquip2(sheetEquip2,erpCreditList,workbook);
+            ExportUtil.getSheetOverView(sheetOverView,erpCreditList,maintainDatas);
+            ExportUtil.getSheetView(sheetView,erpCreditList,maintainDatas,workbook);//调用一览表写入方法
+            ExportUtil.getSheetOtherFee(sheetOtherFee,erpCreditList,maintainDatas);
+            ExportUtil.getSheetAssetsTotal(sheetAssetsTotal,erpCreditList);
+            ExportUtil.getSheetLine1(sheetLine1,erpCreditList,workbook);
+            ExportUtil.getSheetEquip(sheetEquip,erpCreditList,workbook);
+            ExportUtil.getSheetEquipMaterial(sheetEquipMaterial,erpCreditList,workbook);
+            ExportUtil.getSheetSettlement(sheetSettlement,erpCreditList,maintainDatas);
+            ExportUtil.getSheetLine2(sheetLine2,erpCreditList,workbook);
+            ExportUtil.getSheetEquip2(sheetEquip2,erpCreditList,workbook);
             workbook.write(fos);
             fos.flush();
             fos.close();
@@ -249,8 +249,26 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
         // 删除创建的新文件
         // this.deleteFile(newFile);
     }
+    public List<ErpJudge> getMainTainList(List<ErpCredit> erpCredits,List<String> strings,List<String> maintainDataList){
+        ErpJudge erpJudge = null;
+        for (String s:maintainDataList){
+            System.out.println("qweqwe="+s);
+        }
+        List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
+        if (maintainDataList.isEmpty()){
+            for (ErpCredit erpCredit1:erpCredits){
+                erpJudge = new ErpJudge();
+                erpJudge.setItemId(erpCredit1.getItemId());
+                erpJudge.setMainFlag("是");
+                erpJudge.setInfoFlag("否");
+                erpJudges.add(erpJudge);
+            }
+        }
+        return erpJudges;
+    }
     //判断条件
     public List<ErpJudge> getCheck(List<ErpCredit> erpCredits){
+
         List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
         ErpJudge erpJudge = null;
         Map<String,List> map = new  HashMap<String,List>();
@@ -258,9 +276,13 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
         for (ErpCredit erpCredit:erpCredits){
             strings.add(erpCredit.getItemId());
         }
-        //得到物料是为完成数据
+//        //得到物料是为完成数据
         List<Information> informationList = informationService.findNoFinishList(strings);
-        List<String> maintainDataList = dataMaintenanceService.getJudge(strings);
+        List<String> maintainData = dataMaintenanceService.getJudge(strings);
+        List<String> maintainDataList = new ArrayList<String>();
+        for (int i = 0; i < maintainData.size()-1; i++) {
+            maintainDataList.add(maintainData.get(i));
+        }
         if (null!=informationList&&informationList.size()>0){
             for (Information information:informationList){
                 erpJudge=new ErpJudge();
@@ -274,7 +296,7 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
             Boolean flag = true;
             for (String maintain:maintainDataList){
                 flag=true;
-                if (null!=erpCredits&&erpCredits.size()>0){
+                if (null!=erpJudges&&erpJudges.size()>0){
                     for (ErpJudge erpJudge1:erpJudges){
                        if (erpJudge1.getItemId().equals(maintain)){
                            erpJudge1.setMainFlag("无");
@@ -292,6 +314,15 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
                 }
             }
         }
+        if (maintainData.get(maintainData.size()-1).equals("1")){
+                for (ErpCredit erpCredit1:erpCredits){
+                    erpJudge=new ErpJudge();
+                    erpJudge.setItemId(erpCredit1.getItemId());
+                    erpJudge.setMainFlag("无");
+                    erpJudge.setInfoFlag("是");
+                    erpJudges.add(erpJudge);
+                }
+        }
         return erpJudges;
     }
 }

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportTemplate.java

@@ -67,7 +67,7 @@ public class ExportTemplate {
 //                FileOutputStream fos = new FileOutputStream(newFile);
 //                XSSFRow row = sheet3.getRow(6);
 //                XSSFCell cell = row.getCell(3);
-//                ScheduleOther scheduleOther = ExportUtil1.getScheduleOfOtherExpenses(erpCredits);
+//                ScheduleOther scheduleOther = ExportUtilCalculate.getScheduleOfOtherExpenses(erpCredits);
 //                for (int i = 0; i < 20; i++) {
 //                    row =sheet3.getRow((int)i+6);
 //                    cell=row.getCell(3);

+ 17 - 21
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil2.java

@@ -2,10 +2,8 @@ package com.jeeplus.modules.sg.financial.erpcredit.util;
 
 import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
-import io.swagger.models.auth.In;
 import org.apache.poi.hssf.usermodel.HSSFCellStyle;
 import org.apache.poi.hssf.usermodel.HSSFFont;
-import org.apache.poi.hssf.util.HSSFColor;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFFont;
@@ -13,14 +11,12 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 写入表格中模板
  */
-public class ExportUtil2 {
+public class ExportUtil {
 
     //导出表(一览表) 写入数据
     public static void getSheetView(Sheet sheet,List<ErpCredit> erpCredits,List<MaintainData> maintainDataList,Workbook workbook){
@@ -30,7 +26,7 @@ public class ExportUtil2 {
             Schedule schedule = null;
             XSSFRow row = (XSSFRow) sheet.createRow(6);
             XSSFCell cell = row.getCell(3);
-            List<Schedule> scheduleList = ExportUtil1.getScheduleList(erpCredits, maintainDataList);
+            List<Schedule> scheduleList = ExportUtilCalculate.getScheduleList(erpCredits, maintainDataList);
             for (int i = 0; i <scheduleList.size(); i++) {
                 schedule = scheduleList.get(i);
                 row=(XSSFRow)sheet.createRow(i+6);
@@ -164,8 +160,8 @@ public class ExportUtil2 {
        if (null!=sheet){
            XSSFRow row = (XSSFRow) sheet.getRow(0);
            XSSFCell cell = row.getCell(3);
-           ScheduleOther scheduleOtherAct = ExportUtil1.getScheduleOfOtherExpenses(erpCredits);
-           ScheduleOther scheduleOtherBud = ExportUtil1.getScheduleOfOtherExpensesReg(maintainDataList);
+           ScheduleOther scheduleOtherAct = ExportUtilCalculate.getScheduleOfOtherExpenses(erpCredits);
+           ScheduleOther scheduleOtherBud = ExportUtilCalculate.getScheduleOfOtherExpensesReg(maintainDataList);
            List<String> listAct = new ArrayList<String>();
            List<String> listBud = new ArrayList<String>();
            List<String> listActual = getListSchOther(listAct, scheduleOtherAct);
@@ -189,8 +185,8 @@ public class ExportUtil2 {
            CellStyle cellStyle = getCellStyle(workbook);
            XSSFRow row = (XSSFRow) sheet.createRow(4);
            XSSFCell cell = row.getCell(0);
-           TransferOfPower1 transferOfPower1 = null;
-           List<TransferOfPower1> transferOfPower1s = ExportUtil1.getTransFerPower1(erpCredits);
+           TransferOfPowerLine transferOfPower1 = null;
+           List<TransferOfPowerLine> transferOfPower1s = ExportUtilCalculate.getTransFerPower1(erpCredits);
            for (int i = 0; i < transferOfPower1s.size(); i++) {
                transferOfPower1=transferOfPower1s.get(i);
                row = (XSSFRow) sheet.createRow((int)i+4);
@@ -311,8 +307,8 @@ public class ExportUtil2 {
           CellStyle cellStyle = getCellStyle(workbook);
           XSSFRow row = (XSSFRow) sheet.createRow(4);
           XSSFCell cell = row.getCell(0);
-          TransferOfPower2 transferOfPower2 = null;
-          List<TransferOfPower2> transferOfPower2s = ExportUtil1.getTransferOfPower2(erpCredits);
+          TransferOfEquipment transferOfPower2 = null;
+          List<TransferOfEquipment> transferOfPower2s = ExportUtilCalculate.getTransferOfPower2(erpCredits);
           for (int i = 0; i < transferOfPower2s.size(); i++) {
               transferOfPower2=transferOfPower2s.get(i);
               row = (XSSFRow) sheet.createRow((int)i+4);
@@ -429,7 +425,7 @@ public class ExportUtil2 {
         CellStyle cellStyle1 = getCellStyleAlign(workbook);
         MaterialEquipment materialEquipment = null;
         if (null!=sheet){
-            List<MaterialEquipment> materialEquipments = ExportUtil1.getMaterialEquipment(erpCredits);
+            List<MaterialEquipment> materialEquipments = ExportUtilCalculate.getMaterialEquipment(erpCredits);
             for (int i = 0; i < materialEquipments.size(); i++) {
                 materialEquipment = materialEquipments.get(i);
                 row = (XSSFRow) sheet.createRow((int)i+5);
@@ -507,8 +503,8 @@ public class ExportUtil2 {
             CellStyle cellStyle = getCellStyle(workbook);
             XSSFRow row = (XSSFRow) sheet.createRow(4);
             XSSFCell cell = row.getCell(0);
-            TransferOfPower1 transferOfPower1 = null;
-            List<TransferOfPower1> transferOfPower1s = ExportUtil1.getTransFerPower1(erpCredits);
+            TransferOfPowerLine transferOfPower1 = null;
+            List<TransferOfPowerLine> transferOfPower1s = ExportUtilCalculate.getTransFerPower1(erpCredits);
             for (int i = 0; i < transferOfPower1s.size(); i++) {
                 transferOfPower1=transferOfPower1s.get(i);
                 row = (XSSFRow) sheet.createRow((int)i+4);
@@ -641,8 +637,8 @@ public class ExportUtil2 {
             CellStyle cellStyle = getCellStyle(workbook);
             XSSFRow row = (XSSFRow) sheet.createRow(4);
             XSSFCell cell = row.getCell(0);
-            TransferOfPower2 transferOfPower2 = null;
-            List<TransferOfPower2> transferOfPower2s = ExportUtil1.getTransferOfPower2(erpCredits);
+            TransferOfEquipment transferOfPower2 = null;
+            List<TransferOfEquipment> transferOfPower2s = ExportUtilCalculate.getTransferOfPower2(erpCredits);
             for (int i = 0; i <transferOfPower2s.size(); i++) {
                 transferOfPower2=transferOfPower2s.get(i);
                 row = (XSSFRow) sheet.createRow((int)i+4);
@@ -761,7 +757,7 @@ public class ExportUtil2 {
     //概述表
     public static void getSheetOverView(Sheet sheet, List<ErpCredit> erpCredits, List<MaintainData> maintainDataList){
        if (sheet!=null){
-           GeneralSituation generalSituation = ExportUtil1.getFeneraSituation(erpCredits,maintainDataList);
+           GeneralSituation generalSituation = ExportUtilCalculate.getFeneraSituation(erpCredits,maintainDataList);
            XSSFRow row = (XSSFRow) sheet.getRow(6);
            XSSFCell cell = row.getCell(6);
            cell.setCellValue(generalSituation.getOrganDataNumber());//日期,批文号
@@ -805,10 +801,10 @@ public class ExportUtil2 {
            XSSFRow row = (XSSFRow) sheet.getRow(0);
            XSSFCell cell = row.getCell(0);
            TheAssetsTotal theAssetsTotal = null;
-           List<TheAssetsTotal> theAssetsTotals = ExportUtil1.getTheAssetsTotal(erpCredits);
+           List<TheAssetsTotal> theAssetsTotals = ExportUtilCalculate.getTheAssetsTotal(erpCredits);
            for (int i = 0; i < theAssetsTotals.size(); i++) {
                theAssetsTotal = theAssetsTotals.get(i);
-               row = (XSSFRow) sheet.getRow((int)i+6);
+               row = (XSSFRow) sheet.getRow((int)i+5);
                cell = row.getCell(2);
                cell.setCellValue(theAssetsTotal.getBuildProject());
                cell=row.getCell(3);
@@ -827,7 +823,7 @@ public class ExportUtil2 {
         if (null!=sheet){
             XSSFRow row = (XSSFRow) sheet.getRow(0);
             XSSFCell cell = row.getCell(0);
-            MCompletionProject mCompletionProject = ExportUtil1.getMCompletionProject(erpCredits,maintainDataList);
+            MCompletionProject mCompletionProject = ExportUtilCalculate.getMCompletionProject(erpCredits,maintainDataList);
             row = (XSSFRow)sheet.getRow(4);
             cell = row.getCell(5);
             cell.setCellValue(mCompletionProject.getTransferAssets());

+ 17 - 17
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil1.java

@@ -13,7 +13,7 @@ import java.util.TreeSet;
 /**
  * 导出数据计算类
  */
-public class ExportUtil1{
+public class ExportUtilCalculate {
     public static String POWER_DEPARTMENT="配电检修工区";
     public static String POWER_BDZ="变压器";
     public static String POWER_BOXBDZ="箱式变电站";
@@ -94,7 +94,7 @@ public class ExportUtil1{
                 actualOtherFeeAll+=Double.parseDouble(s.getActualOtherFee());
                 scheduletotal.setActualOtherFee(decimalFormat.format(actualOtherFeeAll));
             }
-            if (null!=s.getActualTotalFee()){
+            if (null!=s.getActualTotalFee()&&!"∞".equals(s.getActualTotalFee())){
                 actualTotalFeeAll+=Double.parseDouble(s.getActualTotalFee());
                 scheduletotal.setActualTotalFee(decimalFormat.format(actualTotalFeeAll));
             }
@@ -102,7 +102,7 @@ public class ExportUtil1{
                 addSubtractionLinesAll+=Double.parseDouble(s.getAddSubtractionLines());
                 scheduletotal.setAddSubtractionLines(decimalFormat.format(addSubtractionLinesAll));
             }
-            if (null!=s.getAddSubtractionRate()){
+            if (null!=s.getAddSubtractionRate()&&!"∞".equals(s.getActualTotalFee())){
                 addSubtractionRateAll+=Double.parseDouble(s.getAddSubtractionRate());
                 scheduletotal.setAddSubtractionRate(decimalFormat.format(addSubtractionRateAll));
             }
@@ -436,10 +436,10 @@ public class ExportUtil1{
      * 移交资产—配电网资产一览表(线路)
      * @return
      */
-    public static List<TransferOfPower1> getTransFerPower1(List<ErpCredit> erpCredits){
+    public static List<TransferOfPowerLine> getTransFerPower1(List<ErpCredit> erpCredits){
         DecimalFormat decimalFormat   = new DecimalFormat("#0.00");
-        List<TransferOfPower1> transferOfPower1s = new ArrayList<TransferOfPower1>();//创建一个线路集合
-        TransferOfPower1 transferOfPower1 = null;//定义线路对象
+        List<TransferOfPowerLine> transferOfPower1s = new ArrayList<TransferOfPowerLine>();//创建一个线路集合
+        TransferOfPowerLine transferOfPower1 = null;//定义线路对象
         List<ErpCreditEquipment> erpCreditChild1s = null;//定义设备对象
 
         Double materialTotal = 0.0;//材料费总计
@@ -484,13 +484,13 @@ public class ExportUtil1{
                 }
             }
             //添加固定数据:线路
-            transferOfPower1  = new TransferOfPower1();//得到线路集合
+            transferOfPower1  = new TransferOfPowerLine();//得到线路集合
             transferOfPower1.setPowerId(erpCredit.getItemId());//添加项目定义号
             transferOfPower1.setPowerName(erpCredit.getItemName());//添加项目名称
             transferOfPower1.setPowerArea("-");//添加其实地点和所在第
             transferOfPower1.setPowerNumberBars("1");
             transferOfPower1.setPowerAssetClass(POWER_ZYXL);//中亚线路
-            transferOfPower1.setPowerDepartment(ExportUtil1.POWER_DEPARTMENT);//添加保管
+            transferOfPower1.setPowerDepartment(ExportUtilCalculate.POWER_DEPARTMENT);//添加保管
             if (null!=erpCredit.getTenKvItsLine()) {//其中 10kv线路 10kv线路长度
                 transferOfPower1.setPowerTenKvLineLength(decimalFormat.format(erpCredit.getTenKvItsLine()));//添加10kv线路
                 powerTenKvLineLengthAll+=erpCredit.getTenKvItsLine();//交付使用资产价值
@@ -543,7 +543,7 @@ public class ExportUtil1{
             }
             transferOfPower1s.add(transferOfPower1);//添加到集合中
         }
-        transferOfPower1 = new TransferOfPower1();
+        transferOfPower1 = new TransferOfPowerLine();
         //添加 合计金额
         transferOfPower1.setPowerName(POWER_HJ);
         transferOfPower1.setPowerTenKvLineLength(decimalFormat.format(powerTenKvLineLengthAll));
@@ -560,12 +560,12 @@ public class ExportUtil1{
      * @param erpCredits
      * @return
      */
-    public static List<TransferOfPower2> getTransferOfPower2(List<ErpCredit> erpCredits){
+    public static List<TransferOfEquipment> getTransferOfPower2(List<ErpCredit> erpCredits){
         DecimalFormat decimalFormat   = new DecimalFormat("#0.00");
         DecimalFormat decimalFormat1   = new DecimalFormat("#0");
-        List<TransferOfPower2> transferOfPower2s =  new ArrayList<TransferOfPower2>();//得到设备表集合
+        List<TransferOfEquipment> transferOfPower2s =  new ArrayList<TransferOfEquipment>();//得到设备表集合
         List<ErpCreditEquipment> erpCreditChild1s = null;//定义设备 费对象
-        TransferOfPower2 transferOfPower2 = null;//定义设备表对象
+        TransferOfEquipment transferOfPower2 = null;//定义设备表对象
 
         Double materialTotal = 0.0;//材料费总计
 
@@ -605,11 +605,11 @@ public class ExportUtil1{
                     powerEqmMater=0.0;//物料材料合计
                     powerValue = 0.0;//赋予初始值
                     powerStandInFee=0.0;//赋予初始值
-                    transferOfPower2 = new TransferOfPower2();//定义设备表对象
+                    transferOfPower2 = new TransferOfEquipment();//定义设备表对象
                     transferOfPower2.setPowerId(erpCredit.getItemId());//赋值项目定义编号
                     transferOfPower2.setPowerName(erpCredit.getItemName());//添加项目名称
                     transferOfPower2.setPowerArea("-");//线路起始地带
-                    transferOfPower2.setPowerDepartment(ExportUtil1.POWER_DEPARTMENT);//添加保管
+                    transferOfPower2.setPowerDepartment(ExportUtilCalculate.POWER_DEPARTMENT);//添加保管
                     if (null!=erpCredit.getConsInstallFee()&& null != erpCreditChild1.getEqmBookedFee1()){//得到分摊后安装费
                         eqmFtIntalls=erpCredit.getConsTotalFee()/erpCreditChild1.getEqmBookedFee1();
                         eqmFtIntalls = eqmFtIntalls*erpCreditChild1.getEqmBookedFee1();
@@ -677,7 +677,7 @@ public class ExportUtil1{
                 }
             }
         }
-        transferOfPower2 = new TransferOfPower2();
+        transferOfPower2 = new TransferOfEquipment();
         transferOfPower2.setPowerName(POWER_HJ);
         transferOfPower2.setPowerNumber(decimalFormat1.format(eqmNumbersAll));//配电数量合计
         transferOfPower2.setPowerValue(decimalFormat.format(powerValueAll));//计量价值合计
@@ -782,8 +782,8 @@ public class ExportUtil1{
         Double equipmentValue1=0.0;//设备价值
         Double costSharing1=0.0;//分摊费用
         Double deliveryCostValue1=0.0;//交付使用资产价值
-        List<TransferOfPower1> transferOfPower1s = getTransFerPower1(erpCredits);//得到线路表
-        List<TransferOfPower2> transferOfPower2s = getTransferOfPower2(erpCredits);//得到设备表
+        List<TransferOfPowerLine> transferOfPower1s = getTransFerPower1(erpCredits);//得到线路表
+        List<TransferOfEquipment> transferOfPower2s = getTransferOfPower2(erpCredits);//得到设备表
         for (int i = 0; i < transferOfPower1s.size(); i++) {
             if (i!=transferOfPower1s.size()-1){
                 if (null!= transferOfPower1s.get(i).getPowerBuildFee()){//建筑

+ 2 - 1
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/web/ErpCreditController.java

@@ -54,6 +54,8 @@ public class ErpCreditController extends BaseController {
 
 	@Autowired
 	private ErpCreditService erpCreditService;
+	@Autowired
+	private DataMaintenanceService dataMaintenanceService;
 
 	@ModelAttribute
 	public ErpCredit get(@RequestParam(required=false) String id) {
@@ -230,7 +232,6 @@ public class ErpCreditController extends BaseController {
 			ImportUtil importUtil = new ImportUtil(file, 0, 0);
 			List<ErpAccount> erpAccounts = ErpInfo.getErpAccount(importUtil);//获取表格数据
 			List<ErpCredit> erpCredits = ErpInfo.getAllErpCreditList(erpAccounts);//获取单条数据
-			//判断条件
 			List<ErpJudge> erpJudges  = erpCreditService.getCheck(erpCredits);
 			if (null!=erpJudges&&erpJudges.size()>0){
 				String judge = "";

+ 7 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DataMaintenanceService.java

@@ -70,12 +70,14 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
 
     //判断erp是否存在
     public List<String> getJudge(List<String> strings){
+		boolean flagCount = true;
 		MaintainData maintainData1 = new MaintainData();
 		Boolean flag = false;
 		List<String> list = new ArrayList<>();//定义一个集合
 		List<MaintainData> maintainDatas = dataMaintenanceMapper.findList(maintainData1);//得到维护表所有数据
 		if (null!=strings&&strings.size()>0){
 			if (null!=maintainDatas&&maintainDatas.size()>0){
+				flagCount = false;
 				for (String str :strings){
 					flag = true;
 					for (MaintainData maintainData:maintainDatas){
@@ -90,6 +92,11 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
 				}
 			}
 		}
+		if (flagCount){
+			list.add("1");
+		}else {
+			list.add("2");
+		}
 		return list;
 	}