Commit 758f765c9cae42226f446166bfbee76a8f89209b

Authored by pengcheng
1 parent dba3ff5f

入库打印页面,车辆入库出库打印,库位监控没有空容器报错问题

src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... ... @@ -290,21 +290,21 @@ public class ReceiptHeaderController extends BaseController {
290 290 public String report(@ApiParam(name = "id", value = "入库头表id")
291 291 @PathVariable("id") Integer id, ModelMap mmap) {
292 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 303 LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
297 304 lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptId, id);
298 305 List<ReceiptContainerDetail> details = receiptContainerDetailService.list(lambdaQueryWrapper);
299 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 308 if(StringUtils.isNotEmpty(receiptContainerDetail.getBatteryTypes())){
309 309 String batteryTypes=dictDataService.selectDictLabel("batteryTypes",receiptContainerDetail.getBatteryTypes());
310 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 89 @ApiModelProperty(value="供应商编码")
90 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 20 </td>
21 21 </tr>
22 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 27 <div style="width:50%; float:right; text-align:right">
25 28 <span>明细条数:<span th:text="${receiptHeader['totalLines']}"></span></span>
26 29 <span style="padding-left:20px;">明细总数:<span th:text="${receiptHeader['totalQty']}"></span></span>
... ... @@ -37,12 +40,12 @@
37 40 <th width="">数量</th>
38 41 <th width="">磅单编号</th>
39 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 47 <th width="">回收人</th>
45   - <th width="">电池二维码</th>
  48 + <th width="">电池二维码</th>-->
46 49 <!--<th width="21%">条码</th>-->
47 50 </tr>
48 51 </thead>
... ... @@ -56,12 +59,12 @@
56 59 <td th:text="${row.qty}"></td>
57 60 <td th:text="${row.poundCode}"></td>
58 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 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 68 <!--<td><img th:src="@{'/image/'+${row.materialCode}}"></td>-->
66 69 </tr>
67 70 </tbody>
... ...