2 Commits c092967bb7 ... 4a5494a402

Auteur SHA1 Message Date
  ZeroLiYi 4a5494a402 Merge branch 'dev' of http://101.36.160.140:21044/province-qinghai/province-all into dev il y a 4 mois
  ZeroLiYi 4a3045c310 轮换计划制定详情表头 il y a 4 mois

+ 19 - 16
unis-plugin/unis-plugin-biz/src/main/java/com/unis/rotationPlan/info/modular/businessrpreport/service/impl/BusinessRpReportServiceImpl.java

@@ -170,25 +170,28 @@ public class BusinessRpReportServiceImpl extends ServiceImpl<BusinessRpReportMap
170 170
                 newGrain.setName("grainVarietyName");
171 171
 
172 172
                 newGrain.setColumns(new ArrayList<>());
173
+
174
+                // Add columns only if there's corresponding quantity
175
+                if (report.getOutboundQuantity() != null) {
176
+                    TableColumn outboundColumn = new TableColumn();
177
+                    outboundColumn.setTitle("轮出数量");
178
+                    outboundColumn.setAlign("center");
179
+                    // Use dynamic indexing if required
180
+                    outboundColumn.setDataIndex(report.getGrainVarietyId()+"outboundQuantity");
181
+                    newGrain.getColumns().add(outboundColumn);
182
+                }
183
+                if (report.getInboundQuantity() != null) {
184
+                    TableColumn inboundColumn = new TableColumn();
185
+                    inboundColumn.setTitle("轮入数量");
186
+                    inboundColumn.setAlign("center");
187
+                    inboundColumn.setDataIndex(report.getGrainVarietyId()+"inboundQuantity");
188
+                    newGrain.getColumns().add(inboundColumn);
189
+                }
190
+
173 191
                 return newGrain;
174 192
             });
175 193
 
176
-            // Add columns only if there's corresponding quantity
177
-            if (report.getOutboundQuantity() != null) {
178
-                TableColumn outboundColumn = new TableColumn();
179
-                outboundColumn.setTitle("轮出数量");
180
-                outboundColumn.setAlign("center");
181
-                // Use dynamic indexing if required
182
-                outboundColumn.setDataIndex(report.getGrainVarietyId()+"outboundQuantity");
183
-                grain.getColumns().add(outboundColumn);
184
-            }
185
-            if (report.getInboundQuantity() != null) {
186
-                TableColumn inboundColumn = new TableColumn();
187
-                inboundColumn.setTitle("轮入数量");
188
-                inboundColumn.setAlign("center");
189
-                inboundColumn.setDataIndex(report.getGrainVarietyId()+"inboundQuantity");
190
-                grain.getColumns().add(inboundColumn);
191
-            }
194
+
192 195
            sumByGrain = sumByOrgId.computeIfAbsent(orgId, k -> new HashMap<>());
193 196
 
194 197
             // 更新或设置非数量字段,确保使用最新的值