增加公司间出库报表

This commit is contained in:
彭枝刚 2024-12-24 18:47:13 +08:00
parent e9c1d0e538
commit 3972350fc4
6 changed files with 34 additions and 0 deletions

View File

@ -70,4 +70,7 @@ public class InventoryDto extends Inventory {
private String site;
private List<String> warehouseList;//线边仓
private String documentNo;
private String externalDocumentNo;
}

View File

@ -567,5 +567,12 @@ public class ZWmsInventoryController {
return R.ok(inventoryService.getInventoryId(dto));
}
@ApiOperation(value = "公司间出货报表-按单据号查询", notes = "公司间出货报表-按单据号查询")
@GetMapping("/getInventoryPageByDocument")
public R getInventoryPageByDocument(FrontPage page, InventoryDto dto) {
dto.setSite(TenantContextHolder.getTenantId());
return R.ok(inventoryService.getInventoryPageByDocument(page, dto));
}
//------------------------------------------------------------------------------------
}

View File

@ -159,4 +159,6 @@ public interface ZWmsInventoryService extends IService<Inventory> {
* @return
*/
IPage<InventoryByDocumentResponseDTO> readInventoryByDocumentNoPage(Page page, InventoryByDocumentRequestDTO inventoryByDocumentRequestDTO);
IPage getInventoryPageByDocument(FrontPage page, InventoryDto inventoryDto);
}

View File

@ -1283,4 +1283,9 @@ public class ZWmsInventoryServiceImpl extends ServiceImpl<ZWmsInventoryMapper, I
public IPage<InventoryByDocumentResponseDTO> readInventoryByDocumentNoPage(Page page, InventoryByDocumentRequestDTO inventoryByDocumentRequestDTO) {
return baseMapper.readInventoryByDocumentNoPage(page, inventoryByDocumentRequestDTO);
}
@Override
public IPage getInventoryPageByDocument(FrontPage page, InventoryDto inventoryDto) {
return baseMapper.getInventoryPageByDocument(page, inventoryDto);
}
}

View File

@ -88,4 +88,6 @@ public interface ZWmsInventoryMapper extends BaseMapper<Inventory> {
InventoryDto getInventoryId(@Param("site") String site, @Param("dto")InventoryDto dto);
IPage<InventoryByDocumentResponseDTO> readInventoryByDocumentNoPage(Page page, @Param("dto") InventoryByDocumentRequestDTO inventoryByDocumentRequestDTO);
IPage getInventoryPageByDocument(FrontPage page, @Param("dto") InventoryDto inventory);
}

View File

@ -589,4 +589,19 @@
and ls.STATUS in ('Q','R')
</select>
<select id="getInventoryPageByDocument" resultMap="fullMap">
select i.ITEM,i.DESCRIPTION ITEM_DESC,wi.*
from wms.z_document_sfc zds
left join wms.wms_inventory wi on wi.INVENTORY_ID = zds.SFC and zds.SITE = wi.SITE
left join wip.item i on i.HANDLE = wi.ITEM_BO
left join wms.z_document zd on zd.DOCUMENT_NO = zds.DOCUMENT_NO and zd.SITE = zds.SITE
where zds.SITE = #{dto.site}
<if test="dto.documentNo != null and dto.documentNo != ''">
and zds.DOCUMENT_NO = #{dto.documentNo}
</if>
<if test="dto.externalDocumentNo != null and dto.externalDocumentNo != ''">
and zd.EXTERNAL_DOCUMENT_NO = #{dto.externalDocumentNo}
</if>
</select>
</mapper>