Quellcode durchsuchen

bug fix: 生产日报Total loss、loss%取值问题

wangggziwen vor 2 Jahren
Ursprung
Commit
921b94278e

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

@@ -415,9 +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);
-            if (totalLoss.indexOf("-") != -1) {
-                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));
@@ -426,9 +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);
-            if (lossPercentage.indexOf("-") != -1) {
-                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
ui/src/views/production/daily/index.vue

@@ -1263,7 +1263,7 @@
           <tr>
             <td class="bg-blue-light" colspan="2">Total loss</td>
             <td class="bg-yellow-light" @click="openDialog('total_loss', 'Total loss')">
-              <span v-if="!updating">{{reportData.totalLoss}}</span>
+              <span v-if="!updating">{{reportData.totalLoss}}</span>
               <el-input v-if="updating" size="mini" v-model="reportData.totalLoss"/>
             </td>
             <td class="no-border" colspan="6"></td>
@@ -1296,7 +1296,7 @@
           <tr>
             <td class="bg-blue-light" colspan="2">loss%</td>
             <td class="bg-yellow-light" @click="openDialog('loss_percentage', 'loss%')">
-              <span v-if="!updating">{{reportData.lossPercentage}}</span>
+              <span v-if="!updating">{{reportData.lossPercentage}}</span>
               <el-input v-if="updating" size="mini" v-model="reportData.lossPercentage"/>
             </td>
             <td class="no-border" colspan="2"></td>