Przeglądaj źródła

王子文 日报 导入 totalLoss lossPercentage 负号处理

wangggziwen 2 lat temu
rodzic
commit
11ce9d321b

+ 6 - 2
master/src/main/java/com/ruoyi/project/production/service/impl/TDailyProductionReportServiceImpl.java

@@ -415,7 +415,9 @@ public class TDailyProductionReportServiceImpl implements ITDailyProductionRepor
             tDailyProductionReport.setPguAeuLossPercentage(this.roundDecimal(this.getCellDataString(sheet, 39, 18), 2));
             // rowIndex = 40
             String totalLoss = this.roundDecimal(this.getCellDataString(sheet, 40, 2), 0);
-            totalLoss = totalLoss.substring(1);
+            if (totalLoss.indexOf("-") != -1) {
+                totalLoss = totalLoss.substring(1);
+            }
             tDailyProductionReport.setTotalLoss(totalLoss);
             tDailyProductionReport.setPguOffgasProduced(this.roundDecimal(this.getCellDataString(sheet, 40, 10), 0));
             tDailyProductionReport.setPguOffgasChange(this.roundDecimal(this.getCellDataString(sheet, 40, 11), 0));
@@ -424,7 +426,9 @@ public class TDailyProductionReportServiceImpl implements ITDailyProductionRepor
             tDailyProductionReport.setPguAeuFeedLoadPercentage(this.roundPercentage(this.getCellDataString(sheet, 40, 18), 2));
             // rowIndex = 41
             String lossPercentage = this.roundDecimal(this.getCellDataString(sheet, 41, 2), 3);
-            lossPercentage = lossPercentage.substring(1);
+            if (lossPercentage.indexOf("-") != -1) {
+                lossPercentage = lossPercentage.substring(1);
+            }
             tDailyProductionReport.setLossPercentage(lossPercentage);
             tDailyProductionReport.setPguTotalFeed(this.roundDecimal(this.getCellDataString(sheet, 41, 6), 0));
             tDailyProductionReport.setPguC5YeildPercentage(this.roundPercentage(this.getCellDataString(sheet, 41, 10), 2));

+ 2 - 2
master/src/main/java/com/ruoyi/project/production/service/impl/thread/SyncAfterDailyUpdateThread.java

@@ -100,8 +100,8 @@ public class SyncAfterDailyUpdateThread extends Thread {
         monthly.setMixedC3C4(mixedC3C4.toString());
         monthly.setHyC9(hyC9.toString());
         monthly.setPguOffgas(pguOffgas.toString());
-        monthly.setWashOil(toluene.toString());
-        monthly.setToluene(washOil.toString());
+        monthly.setWashOil(washOil.toString());
+        monthly.setToluene(toluene.toString());
         monthly.setHyC4FrR800(hyC4FrR800.toString());
         BigDecimal crackerRawFeed = new BigDecimal("0");
         BigDecimal crackerRawInput = new BigDecimal("0");

+ 1 - 0
ui/src/views/production/daily/index.vue

@@ -2808,6 +2808,7 @@
         :on-success="handleFileSuccess"
         :auto-upload="false"
         drag
+        multiple="true"
       >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">