Commit 758f765c9cae42226f446166bfbee76a8f89209b
1 parent
dba3ff5f
入库打印页面,车辆入库出库打印,库位监控没有空容器报错问题
Showing
3 changed files
with
27 additions
and
20 deletions
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
@@ -290,21 +290,21 @@ public class ReceiptHeaderController extends BaseController { | @@ -290,21 +290,21 @@ public class ReceiptHeaderController extends BaseController { | ||
290 | public String report(@ApiParam(name = "id", value = "入库头表id") | 290 | public String report(@ApiParam(name = "id", value = "入库头表id") |
291 | @PathVariable("id") Integer id, ModelMap mmap) { | 291 | @PathVariable("id") Integer id, ModelMap mmap) { |
292 | ReceiptHeader receiptHeader = receiptHeaderService.getById(id); | 292 | ReceiptHeader receiptHeader = receiptHeaderService.getById(id); |
293 | - | 293 | + LambdaQueryWrapper<Supplier> companyLambda = Wrappers.lambdaQuery(); |
294 | + companyLambda.eq(Supplier::getCode, receiptHeader.getSupplierCode()); | ||
295 | + Supplier supplier = supplierService.getOne(companyLambda); | ||
296 | + String name=null; | ||
297 | + if (supplier != null) { | ||
298 | + name=supplier.getName(); | ||
299 | + } | ||
300 | + receiptHeader.setSupplierName(name); | ||
294 | 301 | ||
295 | //查询对应入库明细 | 302 | //查询对应入库明细 |
296 | LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | 303 | LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
297 | lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptId, id); | 304 | lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptId, id); |
298 | List<ReceiptContainerDetail> details = receiptContainerDetailService.list(lambdaQueryWrapper); | 305 | List<ReceiptContainerDetail> details = receiptContainerDetailService.list(lambdaQueryWrapper); |
299 | for (ReceiptContainerDetail receiptContainerDetail:details){ | 306 | for (ReceiptContainerDetail receiptContainerDetail:details){ |
300 | - LambdaQueryWrapper<Supplier> companyLambda = Wrappers.lambdaQuery(); | ||
301 | - companyLambda.eq(Supplier::getCode, receiptContainerDetail.getSupplierCode()); | ||
302 | - Supplier supplier = supplierService.getOne(companyLambda); | ||
303 | - String name=null; | ||
304 | - if (supplier != null) { | ||
305 | - name=supplier.getName(); | ||
306 | - } | ||
307 | - receiptContainerDetail.setCompanyName(name); | 307 | + |
308 | if(StringUtils.isNotEmpty(receiptContainerDetail.getBatteryTypes())){ | 308 | if(StringUtils.isNotEmpty(receiptContainerDetail.getBatteryTypes())){ |
309 | String batteryTypes=dictDataService.selectDictLabel("batteryTypes",receiptContainerDetail.getBatteryTypes()); | 309 | String batteryTypes=dictDataService.selectDictLabel("batteryTypes",receiptContainerDetail.getBatteryTypes()); |
310 | receiptContainerDetail.setBatteryTypesName(batteryTypes); | 310 | receiptContainerDetail.setBatteryTypesName(batteryTypes); |
src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java
@@ -89,6 +89,10 @@ public class ReceiptHeader implements Serializable { | @@ -89,6 +89,10 @@ public class ReceiptHeader implements Serializable { | ||
89 | @ApiModelProperty(value="供应商编码") | 89 | @ApiModelProperty(value="供应商编码") |
90 | private String supplierCode; | 90 | private String supplierCode; |
91 | 91 | ||
92 | + @TableField(exist = false) | ||
93 | + @ApiModelProperty(value="供应商编码") | ||
94 | + private String supplierName; | ||
95 | + | ||
92 | /** | 96 | /** |
93 | * 关联订单类型 | 97 | * 关联订单类型 |
94 | */ | 98 | */ |
src/main/resources/templates/receipt/receiptHeader/report.html
@@ -20,7 +20,10 @@ | @@ -20,7 +20,10 @@ | ||
20 | </td> | 20 | </td> |
21 | </tr> | 21 | </tr> |
22 | <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> | 22 | <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> |
23 | - <td colspan="11"> | 23 | + <td colspan="3"> |
24 | + <span>供应商:<span th:text="${receiptHeader['supplierName']}"></span></span> | ||
25 | + </td> | ||
26 | + <td colspan="8"> | ||
24 | <div style="width:50%; float:right; text-align:right"> | 27 | <div style="width:50%; float:right; text-align:right"> |
25 | <span>明细条数:<span th:text="${receiptHeader['totalLines']}"></span></span> | 28 | <span>明细条数:<span th:text="${receiptHeader['totalLines']}"></span></span> |
26 | <span style="padding-left:20px;">明细总数:<span th:text="${receiptHeader['totalQty']}"></span></span> | 29 | <span style="padding-left:20px;">明细总数:<span th:text="${receiptHeader['totalQty']}"></span></span> |
@@ -37,12 +40,12 @@ | @@ -37,12 +40,12 @@ | ||
37 | <th width="">数量</th> | 40 | <th width="">数量</th> |
38 | <th width="">磅单编号</th> | 41 | <th width="">磅单编号</th> |
39 | <th width="">电池类型</th> | 42 | <th width="">电池类型</th> |
40 | - <th width="">电池种类</th> | ||
41 | - <th width="">批号</th> | ||
42 | - <th width="">供应商</th> | ||
43 | - <th width="">国家编码</th> | 43 | + <!--<th width="">电池种类</th> |
44 | + <th width="">批号</th>--> | ||
45 | + <!--<th width="">供应商</th>--> | ||
46 | + <!--<th width="">国家编码</th> | ||
44 | <th width="">回收人</th> | 47 | <th width="">回收人</th> |
45 | - <th width="">电池二维码</th> | 48 | + <th width="">电池二维码</th>--> |
46 | <!--<th width="21%">条码</th>--> | 49 | <!--<th width="21%">条码</th>--> |
47 | </tr> | 50 | </tr> |
48 | </thead> | 51 | </thead> |
@@ -56,12 +59,12 @@ | @@ -56,12 +59,12 @@ | ||
56 | <td th:text="${row.qty}"></td> | 59 | <td th:text="${row.qty}"></td> |
57 | <td th:text="${row.poundCode}"></td> | 60 | <td th:text="${row.poundCode}"></td> |
58 | <td th:text="${row.batteryTypesName}"></td> | 61 | <td th:text="${row.batteryTypesName}"></td> |
59 | - <td th:text="${row.batteryPackTypeName}"></td> | ||
60 | - <td th:text="${row.lot}"></td> | ||
61 | - <td th:text="${row.companyName}"></td> | ||
62 | - <td th:text="${row.countryCode}"></td> | 62 | + <!--<td th:text="${row.batteryPackTypeName}"></td> |
63 | + <td th:text="${row.lot}"></td>--> | ||
64 | + <!-- <td th:text="${row.companyName}"></td>--> | ||
65 | + <!--<td th:text="${row.countryCode}"></td> | ||
63 | <td th:text="${row.recycler}"></td> | 66 | <td th:text="${row.recycler}"></td> |
64 | - <td><img th:src="@{'/image/'+${row.batteryPackTwoCode}}"></td> | 67 | + <td><img width="80px" th:src="@{'/image/'+${row.batteryPackTwoCode}}"></td>--> |
65 | <!--<td><img th:src="@{'/image/'+${row.materialCode}}"></td>--> | 68 | <!--<td><img th:src="@{'/image/'+${row.materialCode}}"></td>--> |
66 | </tr> | 69 | </tr> |
67 | </tbody> | 70 | </tbody> |