Compare commits

..

No commits in common. "86517ae77563e4f7913e2c817455a860914c44ca" and "c371d8156ca870185985a6e8fae18b2fb06971ad" have entirely different histories.

11 changed files with 174 additions and 189 deletions

View File

@ -219,7 +219,7 @@ public class ComponentPackingController {
ComponentPackingEditVO vo = getPackingInfo(packingId); ComponentPackingEditVO vo = getPackingInfo(packingId);
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
variables.put("info", vo.getPackingVO()); variables.put("info", vo.getPackingVO());
variables.put("pages", PdfPageDTO.create(vo.getPackingItemVO(), 12, new ComponentPackingItemVO())); variables.put("pages", PdfPageDTO.create(vo.getPackingItemVO(), 16, new ComponentPackingItemVO()));
String html = ThymeleafUtil.generator("/template/", "配件销售发货清单", ".html", variables); String html = ThymeleafUtil.generator("/template/", "配件销售发货清单", ".html", variables);
PdfGeneratorUtil.generatePdf("发货清单" + vo.getPackingVO().getNo(), html, response); PdfGeneratorUtil.generatePdf("发货清单" + vo.getPackingVO().getNo(), html, response);
} }

View File

@ -37,7 +37,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 采购退货 * 采购退货
*/ */
@ -73,7 +72,7 @@ public class PurchaseReturnController extends BaseController {
@PostMapping("search") @PostMapping("search")
@ApiMark(moduleName = "获取送货单的入库信息", apiName = "获取送货单的入库信息") @ApiMark(moduleName = "获取送货单的入库信息", apiName = "获取送货单的入库信息")
public ApiResult<PageData<ApplyReturnRequestVO>> getApplyOrders(@Valid @RequestBody ApplyReturnRequestSearchQO request) { public ApiResult<PageData<ApplyReturnRequestVO>> getApplyOrders(@Valid @RequestBody ApplyReturnRequestSearchQO request) {
return ApiResult.success(returnRequestService.getApplyOrders(request)); return returnRequestService.getApplyOrders(request);
} }
/** /**
@ -102,8 +101,7 @@ public class PurchaseReturnController extends BaseController {
@PostMapping("searchPos") @PostMapping("searchPos")
@ApiMark(moduleName = "获取送货单的入库信息", apiName = "获取送货单的入库信息") @ApiMark(moduleName = "获取送货单的入库信息", apiName = "获取送货单的入库信息")
public ApiResult<PageData<GoodsReceiptVO>> getGoodsReceipts(@Valid @RequestBody GoodsReceiptSearchQO request) { public ApiResult<PageData<GoodsReceiptVO>> getGoodsReceipts(@Valid @RequestBody GoodsReceiptSearchQO request) {
return returnRequestService.getGoodsReceipts(request);
return ApiResult.success(returnRequestService.getGoodsReceipts(request));
} }
/** /**

View File

@ -7,18 +7,19 @@
<style> <style>
@media print { @media print {
@page { @page {
size: A4 landscape; size: landscape;
margin: 0;
} }
} }
@page { @page {
size: A4 landscape; /*size: A4 landscape;*/
size: landscape;
margin: 0;
} }
body { body {
/*width: 1425px;*/ width: 1425px;
/*height: 825px;*/ height: 825px;
width: 100%;
height: 100%;
font-family: SimSun, monospace; font-family: SimSun, monospace;
font-size: 12pt; font-size: 12pt;
margin: 0; margin: 0;
@ -140,7 +141,7 @@
} }
.package-logo { .package-logo {
width: 250px; width: 300px;
margin: 0 auto 20px; margin: 0 auto 20px;
position: absolute; position: absolute;
} }

View File

@ -31,18 +31,10 @@
.table-cell { .table-cell {
float: left; float: left;
height: 50px; padding: 6px;
padding: 10px;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #000; border-top: 1px solid #000;
border-left: 1px solid #000; border-left: 1px solid #000;
text-align: center;
}
.table-cell-non-border {
float: left;
padding: 3px;
box-sizing: border-box;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -68,123 +60,134 @@
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
font-size: 18pt; font-size: 18pt;
padding: 5px; padding: 10px;
} }
.cell-center { .cell-center {
text-align: center; text-align: center;
} }
.data-title {
font-weight: bold;
}
.data-item{
padding: 17px;
}
table{
border-collapse: collapse;
width: 100%;
}
td,th{
padding: 5px;
}
.border td,tr,th{
border: 1px solid #000;
}
</style> </style>
</head> </head>
<body> <body>
<div class="table-container" th:each="page,pageStat : ${pages}"> <div class="table-container" th:each="page,pageStat : ${pages}">
<div class="table-row first-row">
<div class="table-cell header-cell last-col" style="width: 100%">发货清单</div>
</div>
<div class="table-row"> <div class="table-row">
<div class="table-cell-non-border header-cell" style="width: 100%"> <div class="table-cell" style="width: 35%" th:text="${info.no}">ZL-4.15(3-04)</div>
福建南方路面机械股份有限公司<br/>Fujian South Highway Machinery Co., Ltd. <div class="table-cell" style="width: 35%">福建南方路面机械股份有限公司</div>
<div class="table-cell" style="width: 15%">装车号V01</div>
<div class="table-cell last-col" style="width: 15%"
th:text="${#strings.isEmpty(info.cnum)?'&nbsp;':info.cnum}">&nbsp;</div>
</div>
<div class="table-row">
<div class="table-cell cell-center" style="width: 9%">订单号</div>
<div class="table-cell" style="width: 11%" th:utext="${#strings.isEmpty(info.vbeln)?'&nbsp;':info.vbeln}">
1172000
</div>
<div class="table-cell cell-center" style="width: 8%">发货员</div>
<div class="table-cell" style="width: 8%" th:text="${#strings.isEmpty(info.uname)?'&nbsp;':info.uname}">程慧芳
</div>
<div class="table-cell cell-center" style="width: 13%">办事处/代理商</div>
<div class="table-cell" style="width: 11%" th:text="${#strings.isEmpty(info.pName)?'&nbsp;':info.pName}">测试
</div>
<div class="table-cell cell-center" style="width: 9%">发货日期</div>
<div class="table-cell" style="width: 11%"
th:text="${info.datum != null?#temporals.format(info.datum, 'yyyy-MM-dd'):'&nbsp;'}">
2025-08-04
</div>
<div class="table-cell cell-center" style="width: 9%">发运方式</div>
<div class="table-cell last-col" style="width: 11%"
th:text="${#strings.isEmpty(info.lBezei)?'&nbsp;':info.lBezei}">&nbsp;
</div> </div>
</div> </div>
<table> <div class="table-row">
<tr> <div class="table-cell cell-center" style="width: 9%">设备编码</div>
<td style="width: 20%" rowspan="2"></td> <div class="table-cell" style="width: 11%" th:utext="${#strings.isEmpty(info.matnr)?'&nbsp;':info.matnr}">
<td rowspan="2" style="text-align: center;font-size: 18pt;font-weight: bold"> 22222222222
发货清单<br/>Shipping List </div>
</td> <div class="table-cell cell-center" style="width: 12%">收货人电话</div>
<td style="width: 20%;border: 1px solid #000;"> <div class="table-cell" style="width: 40%"
<span class="data-title">货单编号</span><br/>Shipping Order Number th:text="${#strings.isEmpty(info.gStrSuppl2)?'&nbsp;':info.gStrSuppl2}">于文强18365529799
</td> </div>
</tr> <div class="table-cell cell-center" style="width: 8%">货单号</div>
<tr> <div class="table-cell last-col" style="width: 20%"
<td th:text="${info.no}" style="border: 1px solid #000;"> th:text="${#strings.isEmpty(info.huodh)?'&nbsp;':info.huodh}">0000
ZL-4.15(3-04) </div>
</td> </div>
</tr> <div class="table-row">
</table> <div class="table-cell cell-center" style="width: 9%">收货单位</div>
<table class="border"> <div class="table-cell" style="width: 40%" th:text="${#strings.isEmpty(info.lName)?'&nbsp;':info.lName}">
<tr> 安徽华恒创远新材料有限责任公司
<td style="width: 15%"><span class="data-title">订单号</span><br/>Order No.</td> </div>
<td style="width: 30%" colspan="2" th:text="${#strings.isEmpty(info.vbeln)?'&nbsp;':info.vbeln}">1172000</td> <div class="table-cell cell-center" style="width: 12%">签收人/电话</div>
<td style="width: 15%"><span class="data-title">设备编码</span><br/>Equipment Code</td> <div class="table-cell last-col" style="width: 39%">&nbsp;</div>
<td colspan="3" th:text="${#strings.isEmpty(info.matnr)?'&nbsp;':info.matnr}">200012111</td> </div>
</tr> <div class="table-row">
<tr> <div class="table-cell cell-center" style="width: 9%">收货地址</div>
<td><span class="data-title">收货单位</span><br/>Consignee Unit</td> <div class="table-cell" style="width: 71%" th:text="${#strings.isEmpty(info.gStreen)?'&nbsp;':info.gStreen}">
<td colspan="2" th:text="${#strings.isEmpty(info.lName)?'&nbsp;':info.lName}">安徽华恒创远新材料有限责任公司</td> 安徽华恒创远新材料有限责任公司
<td><span class="data-title">收货地址</span><br/>Consignee Address</td> </div>
<td colspan="3" th:text="${#strings.isEmpty(info.gStreen)?'&nbsp;':info.gStreen}">1172000</td> <div class="table-cell cell-center" style="width: 9%">收货日期</div>
</tr> <div class="table-cell last-col" style="width: 11%">2025-08-04</div>
<tr> </div>
<td><span class="data-title">收货人/电话</span><br/>Consignee's Phone No.</td> <div class="table-row">
<td th:text="${#strings.isEmpty(info.gStrSuppl2)?'&nbsp;':info.gStrSuppl2}">于文强18365529799</td> <div class="table-cell cell-center" style="width: 6%">司机</div>
<td style="width: 15%"><span class="data-title">签收人/电话</span><br/>Signatory/Phone No.</td> <div class="table-cell" style="width: 14%" th:text="${#strings.isEmpty(info.bname)?'&nbsp;':info.bname}">
<td style="width: 25%" colspan="2"></td> 于文强
<td style="width: 10%"><span class="data-title">收货日期</span><br/>Receipt Date</td> </div>
<td></td> <div class="table-cell cell-center" style="width: 8%">驾驶证</div>
</tr> <div class="table-cell" style="width: 26%" th:text="${#strings.isEmpty(info.zjshz)?'&nbsp;':info.zjshz}">
</table> 51254685465465465
<table class="border"> </div>
<tr> <div class="table-cell cell-center" style="width: 9%">车牌号</div>
<td style="width: 15%"><span class="data-title">发货员</span><br/>Dispatcher</td> <div class="table-cell" style="width: 12%" th:text="${#strings.isEmpty(info.zchep)?'&nbsp;':info.zchep}">
<td style="width: 15%" th:text="${#strings.isEmpty(info.uname)?'&nbsp;':info.uname}">程慧芳</td> 粤A12345
<td style="width: 15%"><span class="data-title">发货日期</span><br/>Shipping Date</td> </div>
<td style="width: 10%" th:text="${info.datum != null?#temporals.format(info.datum, 'yyyy-MM-dd'):'&nbsp;'}">2025-08-04</td> <div class="table-cell cell-center" style="width: 10%">司机电话</div>
<td style="width: 15%"><span class="data-title">办事处/代理商</span><br/>Office/Agent</td> <div class="table-cell last-col" style="width: 15%"
<td colspan="3" th:text="${#strings.isEmpty(info.pName)?'&nbsp;':info.pName}">测试</td> th:text="${#strings.isEmpty(info.telNumber)?'&nbsp;':info.telNumber}">18888888888
</tr> </div>
<tr> </div>
<td><span class="data-title">发运方式</span><br/>Shipping Method</td> <div class="table-row">
<td th:text="${#strings.isEmpty(info.lBezei)?'&nbsp;':info.lBezei}">汽车</td> <div class="table-cell cell-center" style="width: 6%">序号</div>
<td><span class="data-title">货单号</span><br/>Waybill No.</td> <div class="table-cell cell-center" style="width: 9%">配件编码</div>
<td th:text="${#strings.isEmpty(info.huodh)?'&nbsp;':info.huodh}">0000</td> <div class="table-cell cell-center" style="width: 39%">配件名称</div>
<td><span class="data-title">装车号</span><br/>Loading No.</td> <div class="table-cell cell-center" style="width: 12%">货位号</div>
<td colspan="3" th:text="${#strings.isEmpty(info.cnum)?'&nbsp;':info.cnum}">V01</td> <div class="table-cell cell-center" style="width: 6%">单位</div>
</tr> <div class="table-cell cell-center" style="width: 8%">数量</div>
<tr> <div class="table-cell cell-center last-col" style="width: 20%">备注</div>
<td><span class="data-title">车牌号</span><br/>License Plate No.</td> </div>
<td th:text="${#strings.isEmpty(info.zchep)?'&nbsp;':info.zchep}">粤A12345</td> <div class="table-row" th:each="item,iterStat : ${page.datas}">
<td><span class="data-title">司机</span><br/>Driver</td> <div class="table-cell cell-center" style="width: 6%" th:text="${iterStat.count}">1</div>
<td th:text="${#strings.isEmpty(info.bname)?'&nbsp;':info.bname}">于文强</td> <div class="table-cell cell-center" style="width: 9%"
<td><span class="data-title">驾驶证</span><br/>Driver's License No.</td> th:text="${#strings.isEmpty(item.idnrk)?'&nbsp;':item.idnrk}">2100552783
<td th:text="${#strings.isEmpty(info.zjshz)?'&nbsp;':info.zjshz}"></td> </div>
<td style="width: 8%"><span class="data-title">电话</span><br/>Phone No.</td> <div class="table-cell" style="width: 39%" th:text="${#strings.isEmpty(item.ojtxb)?'&nbsp;':item.ojtxb}">
<td style="width: 10%" th:text="${#strings.isEmpty(info.telNumber)?'&nbsp;':info.telNumber}">18888888888</td> IH1213T.4 衬板6号
</tr> </div>
</table> <div class="table-cell cell-center" style="width: 12%"
<table class="border" style="margin-top: 5px;"> th:text="${#strings.isEmpty(item.lgpbe)?'&nbsp;':item.lgpbe}">E1-4-4
<tr> </div>
<td style="width: 10%"><span class="data-title">序号</span><br/>Serial No.</td> <div class="table-cell cell-center" style="width: 6%"
<td style="width: 15%"><span class="data-title">配件编码</span><br/>Spare Part Code</td> th:text="${#strings.isEmpty(item.meins)?'&nbsp;':item.meins}">PC
<td><span class="data-title">配件名称</span><br/>Spare Part Name</td> </div>
<td style="width: 15%"><span class="data-title">货位号</span><br/>Storage Location No.</td> <div class="table-cell cell-center" style="width: 8%"
<td style="width: 5%"><span class="data-title">单位</span><br/>Unit</td> th:text="${#strings.isEmpty(item.outQty)?'&nbsp;':item.outQty}">20.000
<td style="width: 5%"><span class="data-title">数量</span><br/>Quantity</td> </div>
<td style="width: 10%"><span class="data-title">备注</span><br/>Remarks</td> <div class="table-cell last-col" style="width: 20%"
</tr> th:text="${#strings.isEmpty(item.zatwrt)?'&nbsp;':item.zatwrt}">&nbsp;
<tr th:each="item,iterStat : ${page.datas}"> </div>
<td th:text="${iterStat.count}">1</td> </div>
<td th:text="${#strings.isEmpty(item.idnrk)?'&nbsp;':item.idnrk}">2100552783</td> <div class="table-row last-row">
<td style="text-align: left" th:text="${#strings.isEmpty(item.ojtxb)?'&nbsp;':item.ojtxb}">IH1213T.4 衬板6号</td> <div class="table-cell" style="width: 6%">&nbsp;</div>
<td th:text="${#strings.isEmpty(item.lgpbe)?'&nbsp;':item.lgpbe}">E1-4-4</td> <div class="table-cell" style="width: 9%">&nbsp;</div>
<td th:text="${#strings.isEmpty(item.meins)?'&nbsp;':item.meins}">PC</td> <div class="table-cell" style="width: 39%">&nbsp;</div>
<td th:text="${#strings.isEmpty(item.outQty)?'&nbsp;':item.outQty}">20.000</td> <div class="table-cell" style="width: 12%">&nbsp;</div>
<td th:text="${#strings.isEmpty(item.zatwrt)?'&nbsp;':item.zatwrt}">&nbsp;</td> <div class="table-cell" style="width: 6%">&nbsp;</div>
</tr> <div class="table-cell" style="width: 8%">&nbsp;</div>
</table> <div class="table-cell last-col" style="width: 20%">&nbsp;</div>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,7 +1,6 @@
package com.nflg.wms.repository.mapper; package com.nflg.wms.repository.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nflg.wms.common.pojo.ApiResult; import com.nflg.wms.common.pojo.ApiResult;
import com.nflg.wms.common.pojo.PageData; import com.nflg.wms.common.pojo.PageData;
@ -21,7 +20,7 @@ import com.nflg.wms.repository.entity.WmsReturnRequest;
*/ */
public interface WmsReturnRequestMapper extends BaseMapper<WmsReturnRequest> { public interface WmsReturnRequestMapper extends BaseMapper<WmsReturnRequest> {
IPage<GoodsReceiptVO> getGoodsReceipts(GoodsReceiptSearchQO request, Page<Object> objectPage); ApiResult<PageData<GoodsReceiptVO>> getGoodsReceipts(GoodsReceiptSearchQO request, Page<Object> objectPage);
IPage<ApplyReturnRequestVO> getApplyOrders(ApplyReturnRequestSearchQO request, Page<Object> objectPage); ApiResult<PageData<ApplyReturnRequestVO>> getApplyOrders(ApplyReturnRequestSearchQO request, Page<Object> objectPage);
} }

View File

@ -1,6 +1,5 @@
package com.nflg.wms.repository.service; package com.nflg.wms.repository.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nflg.wms.common.pojo.ApiResult; import com.nflg.wms.common.pojo.ApiResult;
import com.nflg.wms.common.pojo.PageData; import com.nflg.wms.common.pojo.PageData;
import com.nflg.wms.common.pojo.qo.ApplyReturnRequestSearchQO; import com.nflg.wms.common.pojo.qo.ApplyReturnRequestSearchQO;
@ -27,9 +26,9 @@ public interface IWmsReturnRequestService extends IService<WmsReturnRequest> {
void addPurchaseReturns(List<WmsReturnRequest> returnRequests, List<WmsReturnRequestItem> returnRequestItems); void addPurchaseReturns(List<WmsReturnRequest> returnRequests, List<WmsReturnRequestItem> returnRequestItems);
IPage<GoodsReceiptVO> getGoodsReceipts(@Valid GoodsReceiptSearchQO request); ApiResult<PageData<GoodsReceiptVO>> getGoodsReceipts(@Valid GoodsReceiptSearchQO request);
void delApplyOrders(@NotNull Long id); void delApplyOrders(@NotNull Long id);
IPage<ApplyReturnRequestVO> getApplyOrders(@Valid ApplyReturnRequestSearchQO request); ApiResult<PageData<ApplyReturnRequestVO>> getApplyOrders(@Valid ApplyReturnRequestSearchQO request);
} }

View File

@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nflg.wms.common.pojo.ApiResult; import com.nflg.wms.common.pojo.ApiResult;
import com.nflg.wms.common.pojo.PageData; import com.nflg.wms.common.pojo.PageData;
@ -50,7 +49,7 @@ public class WmsReturnRequestServiceImpl extends ServiceImpl<WmsReturnRequestMap
} }
@Override @Override
public IPage<GoodsReceiptVO> getGoodsReceipts(GoodsReceiptSearchQO request) { public ApiResult<PageData<GoodsReceiptVO>> getGoodsReceipts(GoodsReceiptSearchQO request) {
return baseMapper.getGoodsReceipts(request, new Page<>(request.getPage(), request.getPageSize())); return baseMapper.getGoodsReceipts(request, new Page<>(request.getPage(), request.getPageSize()));
} }
@ -64,7 +63,7 @@ public class WmsReturnRequestServiceImpl extends ServiceImpl<WmsReturnRequestMap
} }
@Override @Override
public IPage<ApplyReturnRequestVO> getApplyOrders(ApplyReturnRequestSearchQO request) { public ApiResult<PageData<ApplyReturnRequestVO>> getApplyOrders(ApplyReturnRequestSearchQO request) {
return baseMapper.getApplyOrders(request, new Page<>(request.getPage(), request.getPageSize())); return baseMapper.getApplyOrders(request, new Page<>(request.getPage(), request.getPageSize()));
} }
} }

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nflg.wms.repository.mapper.WmsReturnRequestMapper"> <mapper namespace="com.nflg.wms.repository.mapper.WmsReturnRequestMapper">
<select id="getGoodsReceipts" resultType="com.nflg.wms.common.pojo.vo.GoodsReceiptVO"> <select id="getGoodsReceipts" resultType="com.nflg.wms.common.pojo.PageData">
select a.note_num as delivery_no,a.line_number as delivery_line_no,a.po_num,a.po_line_number,a.item_code as select a.note_num as delivery_no,a.line_number as delivery_line_no,a.po_num,a.po_line_number,a.item_code as
material_code,a.item_name as material_description,sum(a.in_qty) as request_quantity, material_code,a.item_name as material_description,sum(a.in_qty) as request_quantity,
a.uom_code,a.received_warehouse as storage_location,a.iu_code as factory_code,a.purchase_group,a.supplier_num as a.uom_code,a.received_warehouse as storage_location,a.iu_code as factory_code,a.purchase_group,a.supplier_num as
@ -40,34 +40,33 @@
a.note_num,a.line_number,a.po_num,a.po_line_number,a.item_code,a.item_name,a.uom_code,a.received_warehouse,a.iu_code,a.purchase_group,a.supplier_num,b.supplier_name,a.received_warehouse a.note_num,a.line_number,a.po_num,a.po_line_number,a.item_code,a.item_name,a.uom_code,a.received_warehouse,a.iu_code,a.purchase_group,a.supplier_num,b.supplier_name,a.received_warehouse
</select> </select>
<select id="getApplyOrders" resultType="com.nflg.wms.common.pojo.vo.ApplyReturnRequestVO"> <select id="getApplyOrders" resultType="com.nflg.wms.common.pojo.PageData">
SELECT * from wms_return_request SELECT * from wms_return_request
<where> <where>
<if test="request.applicationNo !=null and request.applicationNo !=''"> <if test="request.applicationNo !=null and request.applicationNo !=''">
and a.application_no =#{request.applicationNo} and a.application_no =#{request.applicationNo}
</if> </if>
<if test="request.supplierCode !=null and request.supplierCode !=''"> <if test="request.supplierCode !=null and request.supplierCode !=''">
and a.supplier_code =#{ request.supplierCode} and a.supplier_code =#{ request.supplierCode}
</if> </if>
<if test="request.poNum !=null and request.poNum !=''"> <if test="request.poNum !=null and request.poNum !=''">
and a.po_num =#{ request.poNum} and a.po_num =#{ request.poNum}
</if> </if>
<if test="request.approvalStatus !=null and request.approvalStatus !=''"> <if test="request.approvalStatus !=null and request.approvalStatus !=''">
and a.approval_status =#{ request.approvalStatus} and a.approval_status =#{ request.approvalStatus}
</if> </if>
<if test="request.documentType !=null and request.documentType !=''"> <if test="request.documentType !=null and request.documentType !=''">
and a.document_type =#{ request.documentType} and a.document_type =#{ request.documentType}
</if> </if>
<if test="request.purchaseGroup !=null and request.purchaseGroup !=''"> <if test="request.purchaseGroup !=null and request.purchaseGroup !=''">
and a.purchase_group =#{ request.purchaseGroup} and a.purchase_group =#{ request.purchaseGroup}
</if> </if>
<if test="request.startDate !=null"> <if test="request.startDate !=null">
and a.approve_time>= #{request.inStartDate} and a.approve_time>= #{request.inStartDate}
</if> </if>
<if test="request.endDate !=null"> <if test="request.endDate !=null">
and a.approve_time &lt;= #{request.inEndDate} and a.approve_time &lt;= #{request.inEndDate}
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

View File

@ -203,16 +203,16 @@ public class DeliveryController extends BaseController {
WmsShipmentDelivery delivery = deliveryService.getById(id); WmsShipmentDelivery delivery = deliveryService.getById(id);
VUtil.trueThrowBusinessError(Objects.isNull(delivery)).throwMessage("清单不存在"); VUtil.trueThrowBusinessError(Objects.isNull(delivery)).throwMessage("清单不存在");
AtomicInteger index = new AtomicInteger(1); AtomicInteger index = new AtomicInteger(1);
List<ShipmentMaterialCodeItemVO> list = deliveryItemService.lambdaQuery() // List<ShipmentMaterialCodeItemVO> list = deliveryItemService.lambdaQuery()
.eq(WmsShipmentDeliveryItem::getDeliveryId, id) // .eq(WmsShipmentDeliveryItem::getDeliveryId, id)
.orderByAsc(WmsShipmentDeliveryItem::getId) // .orderByAsc(WmsShipmentDeliveryItem::getId)
.list() // .list()
.stream().map(item -> { // .stream().map(item -> {
ShipmentMaterialCodeItemVO vo = Convert.convert(ShipmentMaterialCodeItemVO.class, item); // ShipmentMaterialCodeItemVO vo = Convert.convert(ShipmentMaterialCodeItemVO.class, item);
vo.setIndex(index.getAndIncrement()); // vo.setIndex(index.getAndIncrement());
return vo; // return vo;
}).toList(); // }).toList();
// List<ShipmentMaterialCodeItemVO> list = deliveryItemService.getItemsVO(id); List<ShipmentMaterialCodeItemVO> list = deliveryItemService.getItemsVO(id);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("发货清单-" + delivery.getNo() + ".xlsx", StandardCharsets.UTF_8)); response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("发货清单-" + delivery.getNo() + ".xlsx", StandardCharsets.UTF_8));
new Workbook() new Workbook()

View File

@ -125,19 +125,6 @@ public class MaterialController extends BaseController {
); );
} }
/**
* 同步-查询
* @param materialNos 图纸编号列表
*/
@PostMapping("syncSearch")
public ApiResult<List<WmsShipmentMaterial>> syncSearch(@RequestBody @NotEmpty List<String> materialNos) {
return ApiResult.success(
shipmentMaterialService.lambdaQuery()
.in(WmsShipmentMaterial::getNo, materialNos)
.list()
);
}
/** /**
* 同步-保存 * 同步-保存
*/ */