feat: bug-967 单据管理/质检单管理增加查询条件和报表导出功能
This commit is contained in:
parent
ade7669e21
commit
9fbbd6188b
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.admin.controller;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.wms.admin.pojo.dto.*;
|
||||
import com.nflg.wms.admin.service.NormalQMControllerService;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
|
|
@ -15,6 +16,7 @@ import com.nflg.wms.common.pojo.vo.QCTaskItemScanCodesVO;
|
|||
import com.nflg.wms.common.pojo.vo.QCTaskItemVO;
|
||||
import com.nflg.wms.common.pojo.vo.QCTaskVO;
|
||||
import com.nflg.wms.common.pojo.vo.QualityInspectionVO;
|
||||
import com.nflg.wms.common.util.EecExcelUtil;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.common.util.VUtil;
|
||||
import com.nflg.wms.repository.entity.WmsQcReceive;
|
||||
|
|
@ -24,10 +26,12 @@ import com.nflg.wms.repository.service.*;
|
|||
import com.nflg.wms.starter.BaseController;
|
||||
import com.nflg.wms.starter.annotation.ApiMark;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -62,7 +66,6 @@ public class NormalQMController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取SRM推送过来的质检单信息
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -72,9 +75,21 @@ public class NormalQMController extends BaseController {
|
|||
return ApiResult.success(wmsSrmQualityInspectionService.search(request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出质检单
|
||||
* @param request 查询条件
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("search/export")
|
||||
public void export(HttpServletResponse response, @Valid @RequestBody NomalQMOrderSearchQO request) throws IOException {
|
||||
request.setPageSize(Integer.MAX_VALUE);
|
||||
IPage<QualityInspectionVO> datas = wmsSrmQualityInspectionService.search(request);
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(datas.getRecords())).throwMessage("没有需要导出的数据");
|
||||
EecExcelUtil.export("质检单", "sheet1", datas.getRecords(), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 质检物料上架任务(PDA)
|
||||
*
|
||||
* @param orderNo 送货单号或任务单号
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -87,7 +102,6 @@ public class NormalQMController extends BaseController {
|
|||
|
||||
/**
|
||||
* 质检物料上架物料详情
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
**/
|
||||
@GetMapping("PDA/task/item")
|
||||
|
|
@ -99,7 +113,6 @@ public class NormalQMController extends BaseController {
|
|||
|
||||
/**
|
||||
* 质检物料上架任务确认
|
||||
*
|
||||
* @param request
|
||||
**/
|
||||
@PostMapping("PDA/task/confirm")
|
||||
|
|
@ -265,7 +278,6 @@ public class NormalQMController extends BaseController {
|
|||
|
||||
/**
|
||||
* 无码质检任务上架确认
|
||||
*
|
||||
* @param request 任务ID
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,4 +32,9 @@ public class NomalQMOrderSearchQO extends SearchBaseQO{
|
|||
|
||||
|
||||
public String itemCode;
|
||||
|
||||
/**
|
||||
* 检验结果,合格或者不合格
|
||||
*/
|
||||
private String inspectionResult;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -12,113 +14,141 @@ public class QualityInspectionVO {
|
|||
/**
|
||||
* 质检单号
|
||||
*/
|
||||
@ExcelColumn("质检单号")
|
||||
private String inspectionNum;
|
||||
|
||||
/**
|
||||
* 工厂
|
||||
* 采购订单号
|
||||
*/
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 送货数量
|
||||
*/
|
||||
private BigDecimal deliveryQty;
|
||||
|
||||
/**
|
||||
* 检验结果
|
||||
*/
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
private String itemCode;
|
||||
|
||||
/**
|
||||
* 供应商代码
|
||||
*/
|
||||
private String supplierNum;
|
||||
|
||||
/**
|
||||
* 检验类型
|
||||
*/
|
||||
private String inspectionType;
|
||||
@ExcelColumn("采购订单号")
|
||||
private String poNum;
|
||||
|
||||
/**
|
||||
* 采购单行号
|
||||
*/
|
||||
@ExcelColumn("采购单行号")
|
||||
private String poLineNumber;
|
||||
|
||||
/**
|
||||
* 检验数量
|
||||
* 供应商代码
|
||||
*/
|
||||
private BigDecimal inspectionQty;
|
||||
@ExcelColumn("供应商代码")
|
||||
private String supplierNum;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelColumn("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@ExcelColumn("物料编号")
|
||||
private String itemCode;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@ExcelColumn("物料描述")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 物料单位
|
||||
*/
|
||||
@ExcelColumn("物料单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 工厂
|
||||
*/
|
||||
@ExcelColumn("工厂")
|
||||
private String factory;
|
||||
|
||||
/**
|
||||
* 仓库编号
|
||||
*/
|
||||
@ExcelColumn("仓库编号")
|
||||
private String receivedWarehouse;
|
||||
|
||||
/**
|
||||
* 不合格原因
|
||||
* 送货单号
|
||||
*/
|
||||
private String unqualifiedReason;
|
||||
@ExcelColumn("送货单号")
|
||||
private String noteNum;
|
||||
|
||||
/**
|
||||
* 采购订单号
|
||||
* 送货单行号
|
||||
*/
|
||||
private String poNum;
|
||||
|
||||
/**
|
||||
* 物料凭证(收货时SAP返回的凭证)
|
||||
*/
|
||||
private String receiveNum;
|
||||
|
||||
/**
|
||||
* 不合格数量
|
||||
*/
|
||||
private BigDecimal unqualifiedQty;
|
||||
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
private BigDecimal qualifiedQty;
|
||||
@ExcelColumn("送货单行号")
|
||||
private String lineNumber;
|
||||
|
||||
/**
|
||||
* 收货时的凭证
|
||||
*/
|
||||
@ExcelColumn("收货时的凭证")
|
||||
private String materialBatch;
|
||||
|
||||
/**
|
||||
* 收货时的序列号
|
||||
*/
|
||||
@ExcelColumn("收货时的序列号")
|
||||
private String serialNum;
|
||||
|
||||
/**
|
||||
* 送货单行号
|
||||
*/
|
||||
private String lineNumber;
|
||||
|
||||
/**
|
||||
* 送货单号
|
||||
*/
|
||||
private String noteNum;
|
||||
|
||||
/**
|
||||
* 接收时间
|
||||
*/
|
||||
@ExcelColumn("接收时间")
|
||||
private LocalDateTime acceptTime;
|
||||
|
||||
/**
|
||||
* 送货数量
|
||||
*/
|
||||
@ExcelColumn("送货数量")
|
||||
private BigDecimal deliveryQty;
|
||||
|
||||
/**
|
||||
* 检验结果
|
||||
*/
|
||||
@ExcelColumn("检验结果")
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 检验类型
|
||||
*/
|
||||
@ExcelColumn("检验类型")
|
||||
private String inspectionType;
|
||||
|
||||
/**
|
||||
* 检验数量
|
||||
*/
|
||||
@ExcelColumn("检验数量")
|
||||
private BigDecimal inspectionQty;
|
||||
|
||||
/**
|
||||
* 不合格原因
|
||||
*/
|
||||
@ExcelColumn("不合格原因")
|
||||
private String unqualifiedReason;
|
||||
|
||||
/**
|
||||
* 物料凭证(收货时SAP返回的凭证)
|
||||
*/
|
||||
@ExcelColumn("物料凭证")
|
||||
private String receiveNum;
|
||||
|
||||
/**
|
||||
* 不合格数量
|
||||
*/
|
||||
@ExcelColumn("不合格数量")
|
||||
private BigDecimal unqualifiedQty;
|
||||
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
@ExcelColumn("合格数量")
|
||||
private BigDecimal qualifiedQty;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
*/
|
||||
|
|
@ -134,23 +164,32 @@ public class QualityInspectionVO {
|
|||
*/
|
||||
private Boolean isIn;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
* 是否已入库
|
||||
*/
|
||||
private String supplierName;
|
||||
@JsonIgnore
|
||||
@ExcelColumn("是否已入库")
|
||||
private String isInDesc;
|
||||
|
||||
public String getIsInDesc() {
|
||||
return isIn ? "是" : "否";
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库时间
|
||||
*/
|
||||
@ExcelColumn("入库时间")
|
||||
private String inTime;
|
||||
|
||||
/**
|
||||
* 凭证
|
||||
*/
|
||||
@ExcelColumn("凭证")
|
||||
private String materialDoc105;
|
||||
|
||||
/**
|
||||
* 年度凭证
|
||||
*/
|
||||
@ExcelColumn("年度凭证")
|
||||
private String materialDocYear105;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@
|
|||
<if test="request.itemCode !=null and request.itemCode !='' ">
|
||||
and a.item_code ilike concat('%',#{request.itemCode},'%')
|
||||
</if>
|
||||
<if test="request.inspectionResult != null and request.inspectionResult !='' ">
|
||||
and a.inspection_result = #{request.inspectionResult}
|
||||
</if>
|
||||
</where>
|
||||
order by accept_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue