feat(oms/wms): 出入库明细查询-已入库/已出库状态过滤、WMS新增出入库明细查询页面及专用导出
一、OMS 入库/出库明细查询(修复+导出) - 出库明细SQL状态过滤由=9改为in(9,12,13):已出库/已复核/已交接均算已出库,与出库排名统计口径一致 - 入库明细SQL固定只统计已入库(status=5)单据 - 入/出库明细SQL新增实际入仓/出仓日期区间过滤(IFNULL(实际日期,建档时间)兜底),支持统计当天 - 新增Excel导出接口 /executionInMaterialDetailApi/exportWithOrder、/executionOutMaterialDetailApi/exportWithOrder(全量不分页) - 退货回仓统计:通过入库单类型 inOrderTypeCode=tui_huo_ru_ku(退货入库)过滤 二、WMS 新增入库/出库明细查询页面 - 入库明细查询:GET /materialDetailApi/listWithOrder(明细关联入库单,固定已入库(5),level=1防父子行重复计数) - 出库明细查询:GET /outMaterialDetailApi/listWithOrder(新建OutMaterialDetailApi,关联出库单,固定in(9,12,13)) - 返回单头字段:单据状态/审核状态/货主/供应商/客户/单据类型/实际入仓出仓日期/保额/货物类型等 - 入库客户编号/名称/客户预约名称经通知单号关联notice_order取得(入库单表无客户字段) 三、WMS 明细导出专用列集 - 出库导出/exportWithOrder:按客户要求30列导出,含出库单号/出库日期/客户信息/LOT号/费用组(单价、总价、折扣、仓租、合同收费)等 - 入库导出/exportWithOrder:按客户要求30列导出,含客户信息/入库日期/每件保额/收费标准/有效期等 - 单据状态、货物种类导出时自动转文字;导出列顺序与客户清单一致 - 火险保费、入库单件净重(KG)暂无数据来源,导出空列占位,待确认数据来源后补充 四、其他 - 查询条件不传日期时默认查全部日期,统计当天由前端传当天日期区间实现 - 数据权限:非平台超管按登录人一级组织过滤
This commit is contained in:
+8
@@ -1,5 +1,7 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -16,20 +18,26 @@ public class ExecutionInMaterialDetailWithOrderPO extends ExecutionInMaterialDet
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库 6-已取消 7-已关闭")
|
||||
@Excel(name = "入库单状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库 6-已取消 7-已关闭")
|
||||
private Integer inOrderStatus;
|
||||
|
||||
@ApiModelProperty("入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer inOrderAuditStatus;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
private Long orderShipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String orderShipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String orderShipperName;
|
||||
|
||||
@ApiModelProperty("入库日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "入仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date warehouseDate;
|
||||
}
|
||||
|
||||
+6
@@ -66,4 +66,10 @@ public class ExecutionInMaterialDetailQueryDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("实际入仓日期 开始(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String warehouseDateStart;
|
||||
|
||||
@ApiModelProperty("实际入仓日期 结束(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String warehouseDateEnd;
|
||||
}
|
||||
|
||||
+6
@@ -137,4 +137,10 @@ public class QueryOrderOverStockDO extends BaseVOEntity {
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("实际入仓日期 开始(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String warehouseDateStart;
|
||||
|
||||
@ApiModelProperty("实际入仓日期 结束(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String warehouseDateEnd;
|
||||
}
|
||||
+9
@@ -1,6 +1,7 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -19,33 +20,41 @@ public class ExecutionOutMaterialDetailWithOrderPO extends ExecutionOutMaterialD
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
|
||||
@Excel(name = "出库单状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核 13-已交接")
|
||||
private Integer outOrderStatus;
|
||||
|
||||
@ApiModelProperty("出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer outOrderAuditStatus;
|
||||
|
||||
@ApiModelProperty("货主ID")
|
||||
private Long orderShipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String orderShipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String orderShipperName;
|
||||
|
||||
@ApiModelProperty("出仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "出仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderOutboundDate;
|
||||
|
||||
@ApiModelProperty("出库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderOutboundTime;
|
||||
|
||||
@ApiModelProperty("保额")
|
||||
@Excel(name = "保额")
|
||||
private BigDecimal insureAmount;
|
||||
|
||||
@ApiModelProperty("货物类型:0-物料 1-半成品 2-成品")
|
||||
@Excel(name = "货物类型: 0-物料 1-半成品 2-成品")
|
||||
private Integer goodsType;
|
||||
}
|
||||
|
||||
+6
@@ -66,4 +66,10 @@ public class ExecutionOutMaterialDetailQueryDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("实际出仓日期 开始(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String outboundDateStart;
|
||||
|
||||
@ApiModelProperty("实际出仓日期 结束(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String outboundDateEnd;
|
||||
}
|
||||
|
||||
+6
@@ -137,4 +137,10 @@ public class QueryOrderOverStockDO extends BaseVOEntity {
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("实际出仓日期 开始(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String outboundDateStart;
|
||||
|
||||
@ApiModelProperty("实际出仓日期 结束(yyyy-MM-dd,为空按建档时间兜底)")
|
||||
private String outboundDateEnd;
|
||||
}
|
||||
+23
@@ -3,6 +3,7 @@ package com.mhd.oms.interfaces.facade.executionInMaterialDetail;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.core.utils.poi.ExcelUtil;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailWithOrderPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
@@ -16,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -96,4 +99,24 @@ public class ExecutionInMaterialDetailApi extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库明细查询Excel(关联入库执行单,全量不分页;
|
||||
* SQL固定只统计已入库(5)单据,可按单据类型(如退货入库tui_huo_ru_ku)与实际入仓日期区间过滤)
|
||||
*/
|
||||
@ApiOperation("导出入库明细查询Excel")
|
||||
@GetMapping("/exportWithOrder")
|
||||
public void exportWithOrder(HttpServletResponse response, ExecutionInMaterialDetailQueryDTO queryDTO) throws Exception
|
||||
{
|
||||
//转换实体(不分页,导出全量)
|
||||
QueryOrderOverStockDO queryDO = inMaterialDetailAssembler.toQueryDO(queryDTO);
|
||||
List<ExecutionInMaterialDetailWithOrderPO> list = inMaterialDetailApplicationService.queryInOrderDetailList(queryDO);
|
||||
|
||||
String fileName = URLEncoder.encode("入库明细查询", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
ExcelUtil<ExecutionInMaterialDetailWithOrderPO> util = new ExcelUtil<>(ExecutionInMaterialDetailWithOrderPO.class);
|
||||
util.exportExcel(response, list, "入库明细查询");
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -2,6 +2,7 @@ package com.mhd.oms.interfaces.facade.executionOutMaterialDetail;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.core.utils.poi.ExcelUtil;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailWithOrderPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailQueryDTO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.service.ExecutionOutMaterialDetailApplicationService;
|
||||
@@ -14,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -41,4 +44,23 @@ public class ExecutionOutMaterialDetailApi extends BaseController {
|
||||
List<ExecutionOutMaterialDetailWithOrderPO> list = outMaterialDetailApplicationService.queryOutOrderDetailList(queryDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库明细查询Excel(关联出库执行单,全量不分页;
|
||||
* SQL固定只统计已出库(9/12/13)单据,可按单据类型与实际出仓日期区间过滤)
|
||||
*/
|
||||
@ApiOperation("导出出库明细查询Excel")
|
||||
@GetMapping("/exportWithOrder")
|
||||
public void exportWithOrder(HttpServletResponse response, ExecutionOutMaterialDetailQueryDTO queryDTO) throws Exception {
|
||||
//转换实体(不分页,导出全量)
|
||||
QueryOrderOverStockDO queryDO = outMaterialDetailAssembler.toQueryDO(queryDTO);
|
||||
List<ExecutionOutMaterialDetailWithOrderPO> list = outMaterialDetailApplicationService.queryOutOrderDetailList(queryDO);
|
||||
|
||||
String fileName = URLEncoder.encode("出库明细查询", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
ExcelUtil<ExecutionOutMaterialDetailWithOrderPO> util = new ExcelUtil<>(ExecutionOutMaterialDetailWithOrderPO.class);
|
||||
util.exportExcel(response, list, "出库明细查询");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user