Compare commits
9 Commits
eabaf79d53
...
15149edb4d
| Author | SHA1 | Date |
|---|---|---|
|
|
15149edb4d | |
|
|
07dabfa9ad | |
|
|
43de593cb0 | |
|
|
b10cb9ca42 | |
|
|
acf65034ee | |
|
|
402b6159ba | |
|
|
59bbb396c3 | |
|
|
0f945a5f4b | |
|
|
b608383244 |
|
|
@ -13,9 +13,11 @@ import com.nflg.wms.repository.entity.QmsPdiInspectionResults;
|
|||
import com.nflg.wms.common.pojo.vo.QmsPdiInspectionResultsPageVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskListVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordDetailVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordSummaryVO;
|
||||
import com.nflg.wms.starter.BaseController;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -83,4 +85,22 @@ public class QmsPdiInspectionResultsController extends BaseController {
|
|||
@Valid @RequestBody QmsPdiTaskRecordStatusItemDetailQO request) {
|
||||
return ApiResult.success(inspectionResultsControllerService.detail(request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务概要:基本信息 + 各类检测项数量统计
|
||||
*/
|
||||
@GetMapping("summary")
|
||||
public ApiResult<QmsPdiTaskRecordSummaryVO> summary(
|
||||
@NotNull(message = "任务ID不能为空") @RequestParam Long id) {
|
||||
return ApiResult.success(inspectionResultsControllerService.summary(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货前检测项详情(inspectionItemType=2),图片直接返回URL列表
|
||||
*/
|
||||
@GetMapping("deliveryDetail")
|
||||
public ApiResult<List<QmsPdiTaskRecordDetailVO.DeliveryItemDetailVO>> deliveryDetail(
|
||||
@NotNull(message = "任务ID不能为空") @RequestParam Long id) {
|
||||
return ApiResult.success(inspectionResultsControllerService.deliveryDetail(id));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import com.nflg.wms.common.pojo.qo.QmsPdiTaskRecordTransferQO;
|
|||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordDefectPageVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordDetailVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordPageVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordSummaryVO;
|
||||
import com.nflg.wms.starter.BaseController;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
|
@ -82,13 +81,4 @@ public class QmsPdiTaskRecordController extends BaseController {
|
|||
@NotNull(message = "检测记录ID不能为空") @RequestParam Long id) {
|
||||
return ApiResult.success(taskRecordControllerService.getInspectionImages(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务概要:基本信息 + 各类检测项数量统计
|
||||
*/
|
||||
@GetMapping("summary")
|
||||
public ApiResult<QmsPdiTaskRecordSummaryVO> summary(
|
||||
@NotNull(message = "任务ID不能为空") @RequestParam Long id) {
|
||||
return ApiResult.success(taskRecordControllerService.summary(id));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -762,11 +762,11 @@ public class IncomingInspectionTaskControllerService {
|
|||
.setCount(Math.min(task.getDetectionQty() - count, request.getNum()))
|
||||
.setPdfDrawings(
|
||||
inspectionStandardItemService.lambdaQuery()
|
||||
.select(QmsInspectionStandardItem::getPdfDrawing)
|
||||
.select(QmsInspectionStandardItem::getId, QmsInspectionStandardItem::getPdfDrawing)
|
||||
.eq(QmsInspectionStandardItem::getInspectionStandardId, standard.getId())
|
||||
.list()
|
||||
.stream()
|
||||
.map(QmsInspectionStandardItem::getPdfDrawing)
|
||||
.map(it -> new PdfDrawingVO(it.getId(), it.getPdfDrawing()))
|
||||
.toList()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,14 @@ import com.nflg.wms.common.pojo.qo.QmsPdiTaskRecordStatusItemDetailQO;
|
|||
import com.nflg.wms.common.pojo.vo.QmsPdiInspectionResultsPageVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskListVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordDetailVO;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPdiTaskRecordSummaryVO;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.repository.entity.QmsPdiDetectionRules;
|
||||
import com.nflg.wms.repository.entity.QmsPdiDetectionRulesDeliveryItem;
|
||||
import com.nflg.wms.repository.entity.QmsPdiInspectionResults;
|
||||
import com.nflg.wms.repository.entity.QmsPdiTaskRecord;
|
||||
import com.nflg.wms.repository.service.IQmsPdiDetectionRulesDeliveryItemService;
|
||||
import com.nflg.wms.repository.service.IQmsPdiDetectionRulesService;
|
||||
import com.nflg.wms.repository.service.IQmsPdiInspectionResultsService;
|
||||
import com.nflg.wms.repository.service.IQmsPdiTaskRecordService;
|
||||
import jakarta.annotation.Resource;
|
||||
|
|
@ -23,9 +28,12 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -40,6 +48,12 @@ public class QmsPdiInspectionResultsControllerService {
|
|||
@Resource
|
||||
private IQmsPdiTaskRecordService taskRecordService;
|
||||
|
||||
@Resource
|
||||
private IQmsPdiDetectionRulesService detectionRulesService;
|
||||
|
||||
@Resource
|
||||
private IQmsPdiDetectionRulesDeliveryItemService deliveryItemService;
|
||||
|
||||
@Resource
|
||||
private QmsPdiTaskRecordControllerService taskRecordControllerService;
|
||||
|
||||
|
|
@ -267,4 +281,110 @@ public class QmsPdiInspectionResultsControllerService {
|
|||
public List<QmsPdiTaskRecordDetailVO.StatusItemVO> detail(QmsPdiTaskRecordStatusItemDetailQO request) {
|
||||
return taskRecordControllerService.statusItemList(request.getId(), request.getInspectionItemType());
|
||||
}
|
||||
|
||||
// ========================= 任务概要 =========================
|
||||
|
||||
/**
|
||||
* 查询任务概要信息:基本信息 + 各类检测项数量统计
|
||||
*/
|
||||
public QmsPdiTaskRecordSummaryVO summary(Long taskId) {
|
||||
QmsPdiTaskRecord task = taskRecordService.getById(taskId);
|
||||
if (task == null) {
|
||||
throw new NflgException(STATE.BusinessError, "任务记录不存在");
|
||||
}
|
||||
|
||||
QmsPdiTaskRecordSummaryVO vo = new QmsPdiTaskRecordSummaryVO();
|
||||
vo.setTaskNo(task.getTaskNo());
|
||||
vo.setDeviceNo(task.getDeviceNo());
|
||||
vo.setOrderNo(task.getOrderNo());
|
||||
vo.setRequiredCompletionTime(task.getRequiredCompletionTime());
|
||||
|
||||
// 查询检测规则获取机型编号和检测版本
|
||||
if (task.getDetectionRulesId() != null) {
|
||||
QmsPdiDetectionRules rules = detectionRulesService.getById(task.getDetectionRulesId());
|
||||
if (rules != null) {
|
||||
vo.setMachineNo(rules.getMachineNo());
|
||||
vo.setInspectionVersion(rules.getInspectionVersion());
|
||||
}
|
||||
}
|
||||
|
||||
// 从 qms_pdi_inspection_results 按 inspection_item_type 分组统计
|
||||
List<QmsPdiInspectionResults> results = inspectionResultsService.lambdaQuery()
|
||||
.eq(QmsPdiInspectionResults::getTaskId, taskId)
|
||||
.list();
|
||||
|
||||
int staticCount = 0;
|
||||
int dynamicCount = 0;
|
||||
int specialCount = 0;
|
||||
for (QmsPdiInspectionResults r : results) {
|
||||
if (r.getInspectionItemType() == null) continue;
|
||||
switch (r.getInspectionItemType()) {
|
||||
case 0 -> staticCount++;
|
||||
case 1 -> dynamicCount++;
|
||||
case 3 -> specialCount++;
|
||||
}
|
||||
}
|
||||
vo.setStaticItemCount(staticCount);
|
||||
vo.setDynamicItemCount(dynamicCount);
|
||||
vo.setSpecialItemCount(specialCount);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
// ========================= 发货前检测项详情 =========================
|
||||
|
||||
/**
|
||||
* 查询发货前检测项(inspectionItemType=2),图片直接返回URL列表
|
||||
*/
|
||||
public List<QmsPdiTaskRecordDetailVO.DeliveryItemDetailVO> deliveryDetail(Long taskId) {
|
||||
// 查询该任务下所有 type=2 的记录
|
||||
List<QmsPdiInspectionResults> results = inspectionResultsService.lambdaQuery()
|
||||
.eq(QmsPdiInspectionResults::getTaskId, taskId)
|
||||
.eq(QmsPdiInspectionResults::getInspectionItemType, 2)
|
||||
.list();
|
||||
|
||||
if (results.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
// 批量查 delivery_item 获取 checklist
|
||||
Set<Long> deliveryItemIds = results.stream()
|
||||
.map(QmsPdiInspectionResults::getInspectionItemId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toSet());
|
||||
Map<Long, QmsPdiDetectionRulesDeliveryItem> deliveryItemMap = Map.of();
|
||||
if (!deliveryItemIds.isEmpty()) {
|
||||
List<QmsPdiDetectionRulesDeliveryItem> deliveryItems = deliveryItemService.listByIds(deliveryItemIds);
|
||||
deliveryItemMap = deliveryItems.stream()
|
||||
.collect(Collectors.toMap(QmsPdiDetectionRulesDeliveryItem::getId, di -> di, (a, b) -> a));
|
||||
}
|
||||
|
||||
// 构建返回列表
|
||||
Map<Long, QmsPdiDetectionRulesDeliveryItem> finalMap = deliveryItemMap;
|
||||
List<QmsPdiTaskRecordDetailVO.DeliveryItemDetailVO> detailList = new ArrayList<>();
|
||||
for (QmsPdiInspectionResults r : results) {
|
||||
QmsPdiTaskRecordDetailVO.DeliveryItemDetailVO vo = new QmsPdiTaskRecordDetailVO.DeliveryItemDetailVO();
|
||||
vo.setDeliveryItemId(r.getInspectionItemId());
|
||||
|
||||
// checklist 从 delivery_item 获取
|
||||
QmsPdiDetectionRulesDeliveryItem di = finalMap.get(r.getInspectionItemId());
|
||||
if (di != null) {
|
||||
vo.setChecklist(di.getChecklist());
|
||||
}
|
||||
|
||||
// inspectionItemImage 按逗号拆分,直接返回URL列表
|
||||
String imageStr = r.getInspectionItemImage();
|
||||
if (imageStr != null && !imageStr.isEmpty()) {
|
||||
vo.setInspectionItemImage(Arrays.stream(imageStr.split(","))
|
||||
.map(String::trim)
|
||||
.filter(s -> !s.isEmpty())
|
||||
.collect(Collectors.toList()));
|
||||
} else {
|
||||
vo.setInspectionItemImage(List.of());
|
||||
}
|
||||
|
||||
detailList.add(vo);
|
||||
}
|
||||
return detailList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,53 +322,4 @@ public class QmsPdiTaskRecordControllerService {
|
|||
}
|
||||
return convertImageIdsToVO(result.getInspectionItemImage());
|
||||
}
|
||||
|
||||
// ========================= 任务概要 =========================
|
||||
|
||||
/**
|
||||
* 查询任务概要信息:基本信息 + 各类检测项数量统计
|
||||
*/
|
||||
public QmsPdiTaskRecordSummaryVO summary(Long taskId) {
|
||||
QmsPdiTaskRecord task = taskRecordService.getById(taskId);
|
||||
if (task == null) {
|
||||
throw new NflgException(STATE.BusinessError, "任务记录不存在");
|
||||
}
|
||||
|
||||
QmsPdiTaskRecordSummaryVO vo = new QmsPdiTaskRecordSummaryVO();
|
||||
vo.setTaskNo(task.getTaskNo());
|
||||
vo.setDeviceNo(task.getDeviceNo());
|
||||
vo.setOrderNo(task.getOrderNo());
|
||||
vo.setRequiredCompletionTime(task.getRequiredCompletionTime());
|
||||
|
||||
// 查询检测规则获取机型编号和检测版本
|
||||
if (task.getDetectionRulesId() != null) {
|
||||
QmsPdiDetectionRules rules = detectionRulesService.getById(task.getDetectionRulesId());
|
||||
if (rules != null) {
|
||||
vo.setMachineNo(rules.getMachineNo());
|
||||
vo.setInspectionVersion(rules.getInspectionVersion());
|
||||
}
|
||||
}
|
||||
|
||||
// 从 qms_pdi_inspection_results 按 inspection_item_type 分组统计
|
||||
List<QmsPdiInspectionResults> results = inspectionResultsService.lambdaQuery()
|
||||
.eq(QmsPdiInspectionResults::getTaskId, taskId)
|
||||
.list();
|
||||
|
||||
int staticCount = 0;
|
||||
int dynamicCount = 0;
|
||||
int specialCount = 0;
|
||||
for (QmsPdiInspectionResults r : results) {
|
||||
if (r.getInspectionItemType() == null) continue;
|
||||
switch (r.getInspectionItemType()) {
|
||||
case 0 -> staticCount++;
|
||||
case 1 -> dynamicCount++;
|
||||
case 3 -> specialCount++;
|
||||
}
|
||||
}
|
||||
vo.setStaticItemCount(staticCount);
|
||||
vo.setDynamicItemCount(dynamicCount);
|
||||
vo.setSpecialItemCount(specialCount);
|
||||
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.common.pojo.qo;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -35,6 +36,76 @@ public class QmsQcMaterialSearchQO extends PageQO {
|
|||
*/
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 描述是否变更(精确匹配):false=未变更,true=已变更
|
||||
*/
|
||||
private Boolean materialDescIsUpgrade;
|
||||
|
||||
/**
|
||||
* 物料类别全路径名称(模糊匹配)
|
||||
*/
|
||||
private String materialCategoryCodePathName;
|
||||
|
||||
/**
|
||||
* 物料图号(模糊匹配)
|
||||
*/
|
||||
private String drawingNo;
|
||||
|
||||
/**
|
||||
* 图号版本号(模糊匹配)
|
||||
*/
|
||||
private String drawingNoVer;
|
||||
|
||||
/**
|
||||
* 物料材质(模糊匹配)
|
||||
*/
|
||||
private String materialTexture;
|
||||
|
||||
/**
|
||||
* 物料规格(模糊匹配)
|
||||
*/
|
||||
private String materialSpecifications;
|
||||
|
||||
/**
|
||||
* 规则是否已维护(精确匹配):false=未维护,true=已维护
|
||||
*/
|
||||
private Boolean isStandardMaintained;
|
||||
|
||||
/**
|
||||
* 创建方式(精确匹配):0=人工操作,1=系统同步
|
||||
*/
|
||||
private Integer createdType;
|
||||
|
||||
/**
|
||||
* 创建人名称(模糊匹配)
|
||||
*/
|
||||
private String createByName;
|
||||
|
||||
/**
|
||||
* 创建时间范围-开始日期(含)
|
||||
*/
|
||||
private LocalDate createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间范围-结束日期(含)
|
||||
*/
|
||||
private LocalDate createTimeEnd;
|
||||
|
||||
/**
|
||||
* 修改人名称(模糊匹配)
|
||||
*/
|
||||
private String updateByName;
|
||||
|
||||
/**
|
||||
* 修改时间范围-开始日期(含)
|
||||
*/
|
||||
private LocalDate updateTimeStart;
|
||||
|
||||
/**
|
||||
* 修改时间范围-结束日期(含)
|
||||
*/
|
||||
private LocalDate updateTimeEnd;
|
||||
|
||||
/**
|
||||
* 排序字段(对应 QmsQcMaterialVO 中的字段名,如 materialNo、createTime 等)
|
||||
* 为空时默认按物料编号倒序
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class PdfDrawingVO {
|
||||
|
||||
/**
|
||||
* 检测项ID
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* pdf地址
|
||||
*/
|
||||
private String pdfUrl;
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ public class QmsIncomingInspectionTaskCheckDetailVO {
|
|||
/**
|
||||
* pdf图纸列表
|
||||
*/
|
||||
private List<String> pdfDrawings;
|
||||
private List<PdfDrawingVO> pdfDrawings;
|
||||
|
||||
/**
|
||||
* 样本数量
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ import lombok.Data;
|
|||
@Data
|
||||
public class QmsIncomingInspectionTaskCheckItemVO {
|
||||
|
||||
/**
|
||||
* 检查项ID
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 检查项内容ID
|
||||
*/
|
||||
|
|
@ -34,4 +39,29 @@ public class QmsIncomingInspectionTaskCheckItemVO {
|
|||
* 判定类型,0:直接判定;1:测量值
|
||||
*/
|
||||
private Integer judgmentType;
|
||||
|
||||
/**
|
||||
* PDF页码
|
||||
*/
|
||||
private Integer pdfPageNum;
|
||||
|
||||
/**
|
||||
* PDF x轴起始位置
|
||||
*/
|
||||
private Float pdfX;
|
||||
|
||||
/**
|
||||
* PDF y轴起始位置
|
||||
*/
|
||||
private Float pdfY;
|
||||
|
||||
/**
|
||||
* PDF宽度
|
||||
*/
|
||||
private Float pdfWidth;
|
||||
|
||||
/**
|
||||
* PDF高度
|
||||
*/
|
||||
private Float pdfHeight;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,4 +110,26 @@ public class QmsPdiTaskRecordDetailVO {
|
|||
*/
|
||||
private List<FileDetailVO> inspectionItemImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货前检测项明细VO(图片直接返回URL列表)
|
||||
*/
|
||||
@Data
|
||||
public static class DeliveryItemDetailVO {
|
||||
|
||||
/**
|
||||
* 发货检查项ID
|
||||
*/
|
||||
private Long deliveryItemId;
|
||||
|
||||
/**
|
||||
* 检查项目
|
||||
*/
|
||||
private String checklist;
|
||||
|
||||
/**
|
||||
* 现场图片/视频URL列表
|
||||
*/
|
||||
private List<String> inspectionItemImage;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
SELECT
|
||||
t.id,
|
||||
t.task_no,
|
||||
t.check_no,
|
||||
t.request_no,
|
||||
t.material_id,
|
||||
m.material_no,
|
||||
m.material_desc,
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
SELECT
|
||||
t.id,
|
||||
t.task_no,
|
||||
t.check_no,
|
||||
t.request_no,
|
||||
t.material_id,
|
||||
m.material_no,
|
||||
m.material_desc,
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
<select id="getDetail" resultType="com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskVO">
|
||||
SELECT t.id,
|
||||
t.task_no,
|
||||
t.check_no,
|
||||
t.request_no,
|
||||
t.material_id,
|
||||
m.material_no,
|
||||
m.material_desc,
|
||||
|
|
|
|||
|
|
@ -90,9 +90,20 @@
|
|||
</select>
|
||||
|
||||
<select id="getItemsForCheck" resultType="com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO">
|
||||
SELECT qisic.id as "itemContentId",qisi.item_type,CASE WHEN qisi.item_type=0 THEN qisi.name ELSE qisic.name END as "name",qisic.test_standard,qisic.legend,qisic.judgment_type
|
||||
SELECT qisi.id as "itemId"
|
||||
, qisic.id as "itemContentId"
|
||||
, qisi.item_type
|
||||
, CASE WHEN qisi.item_type = 0 THEN qisi.name ELSE qisic.name END as "name"
|
||||
, qisic.test_standard
|
||||
, qisic.legend
|
||||
, qisic.judgment_type
|
||||
, qisic.pdf_page_num
|
||||
, qisic.pdf_x
|
||||
, qisic.pdf_y
|
||||
, qisic.pdf_width
|
||||
, qisic.pdf_height
|
||||
FROM qms_inspection_standard_item qisi
|
||||
INNER JOIN qms_inspection_standard_item_content qisic ON qisi."id"=qisic.inspection_standard_item_id
|
||||
WHERE qisi.inspection_standard_id=#{id}
|
||||
INNER JOIN qms_inspection_standard_item_content qisic ON qisi."id" = qisic.inspection_standard_item_id
|
||||
WHERE qisi.inspection_standard_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
<!--
|
||||
分页查询质检物料
|
||||
支持动态过滤:物料类别编码(materialCategoryCode)、物料编号模糊(materialNo)、物料描述模糊(materialDesc)、物料名称模糊(materialName)
|
||||
、描述是否变更(materialDescIsUpgrade)、类别全路径名称模糊(materialCategoryCodePathName)、图号模糊(drawingNo)
|
||||
、图号版本号模糊(drawingNoVer)、材质模糊(materialTexture)、规格模糊(materialSpecifications)
|
||||
、规则是否已维护(isStandardMaintained)、创建方式(createdType)、创建人模糊(createByName)
|
||||
、创建时间范围(createTimeStart/createTimeEnd)、修改人模糊(updateByName)、修改时间范围(updateTimeStart/updateTimeEnd)
|
||||
-->
|
||||
<select id="searchPage" resultType="com.nflg.wms.common.pojo.vo.QmsQcMaterialVO">
|
||||
SELECT
|
||||
|
|
@ -47,6 +51,48 @@
|
|||
<if test="request.materialName != null and request.materialName != ''">
|
||||
AND material_name ilike concat('%', #{request.materialName}, '%')
|
||||
</if>
|
||||
<if test="request.materialDescIsUpgrade != null">
|
||||
AND material_desc_is_upgrade = #{request.materialDescIsUpgrade}
|
||||
</if>
|
||||
<if test="request.materialCategoryCodePathName != null and request.materialCategoryCodePathName != ''">
|
||||
AND material_category_code_path_name ilike concat('%', #{request.materialCategoryCodePathName}, '%')
|
||||
</if>
|
||||
<if test="request.drawingNo != null and request.drawingNo != ''">
|
||||
AND drawing_no ilike concat('%', #{request.drawingNo}, '%')
|
||||
</if>
|
||||
<if test="request.drawingNoVer != null and request.drawingNoVer != ''">
|
||||
AND drawing_no_ver ilike concat('%', #{request.drawingNoVer}, '%')
|
||||
</if>
|
||||
<if test="request.materialTexture != null and request.materialTexture != ''">
|
||||
AND material_texture ilike concat('%', #{request.materialTexture}, '%')
|
||||
</if>
|
||||
<if test="request.materialSpecifications != null and request.materialSpecifications != ''">
|
||||
AND material_specifications ilike concat('%', #{request.materialSpecifications}, '%')
|
||||
</if>
|
||||
<if test="request.isStandardMaintained != null">
|
||||
AND is_standard_maintained = #{request.isStandardMaintained}
|
||||
</if>
|
||||
<if test="request.createdType != null">
|
||||
AND created_type = #{request.createdType}
|
||||
</if>
|
||||
<if test="request.createByName != null and request.createByName != ''">
|
||||
AND create_by_name ilike concat('%', #{request.createByName}, '%')
|
||||
</if>
|
||||
<if test="request.createTimeStart != null">
|
||||
AND create_time >= #{request.createTimeStart}::date
|
||||
</if>
|
||||
<if test="request.createTimeEnd != null">
|
||||
AND create_time < (#{request.createTimeEnd}::date + interval '1 day')
|
||||
</if>
|
||||
<if test="request.updateByName != null and request.updateByName != ''">
|
||||
AND update_by_name ilike concat('%', #{request.updateByName}, '%')
|
||||
</if>
|
||||
<if test="request.updateTimeStart != null">
|
||||
AND update_time >= #{request.updateTimeStart}::date
|
||||
</if>
|
||||
<if test="request.updateTimeEnd != null">
|
||||
AND update_time < (#{request.updateTimeEnd}::date + interval '1 day')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
<choose>
|
||||
|
|
@ -83,12 +129,15 @@
|
|||
<!--
|
||||
查询全部质检物料(不分页,用于导出)
|
||||
支持动态过滤:物料类别编码(materialCategoryCode)、物料编号模糊(materialNo)、物料描述模糊(materialDesc)、物料名称模糊(materialName)
|
||||
、描述是否变更(materialDescIsUpgrade)、类别全路径名称模糊(materialCategoryCodePathName)、图号模糊(drawingNo)
|
||||
、图号版本号模糊(drawingNoVer)、材质模糊(materialTexture)、规格模糊(materialSpecifications)
|
||||
、规则是否已维护(isStandardMaintained)、创建方式(createdType)、创建人模糊(createByName)
|
||||
、创建时间范围(createTimeStart/createTimeEnd)、修改人模糊(updateByName)、修改时间范围(updateTimeStart/updateTimeEnd)
|
||||
-->
|
||||
<select id="searchAll" resultType="com.nflg.wms.common.pojo.dto.QmsQcMaterialExportDTO">
|
||||
SELECT
|
||||
material_no,
|
||||
material_desc,
|
||||
CASE WHEN material_desc_is_upgrade THEN '是' ELSE '否' END AS material_desc_is_upgrade,
|
||||
material_category_code,
|
||||
material_category_code_path_name,
|
||||
drawing_no,
|
||||
|
|
@ -122,6 +171,48 @@
|
|||
<if test="request.materialName != null and request.materialName != ''">
|
||||
AND material_name ilike concat('%', #{request.materialName}, '%')
|
||||
</if>
|
||||
<if test="request.materialDescIsUpgrade != null">
|
||||
AND material_desc_is_upgrade = #{request.materialDescIsUpgrade}
|
||||
</if>
|
||||
<if test="request.materialCategoryCodePathName != null and request.materialCategoryCodePathName != ''">
|
||||
AND material_category_code_path_name ilike concat('%', #{request.materialCategoryCodePathName}, '%')
|
||||
</if>
|
||||
<if test="request.drawingNo != null and request.drawingNo != ''">
|
||||
AND drawing_no ilike concat('%', #{request.drawingNo}, '%')
|
||||
</if>
|
||||
<if test="request.drawingNoVer != null and request.drawingNoVer != ''">
|
||||
AND drawing_no_ver ilike concat('%', #{request.drawingNoVer}, '%')
|
||||
</if>
|
||||
<if test="request.materialTexture != null and request.materialTexture != ''">
|
||||
AND material_texture ilike concat('%', #{request.materialTexture}, '%')
|
||||
</if>
|
||||
<if test="request.materialSpecifications != null and request.materialSpecifications != ''">
|
||||
AND material_specifications ilike concat('%', #{request.materialSpecifications}, '%')
|
||||
</if>
|
||||
<if test="request.isStandardMaintained != null">
|
||||
AND is_standard_maintained = #{request.isStandardMaintained}
|
||||
</if>
|
||||
<if test="request.createdType != null">
|
||||
AND created_type = #{request.createdType}
|
||||
</if>
|
||||
<if test="request.createByName != null and request.createByName != ''">
|
||||
AND create_by_name ilike concat('%', #{request.createByName}, '%')
|
||||
</if>
|
||||
<if test="request.createTimeStart != null">
|
||||
AND create_time >= #{request.createTimeStart}::date
|
||||
</if>
|
||||
<if test="request.createTimeEnd != null">
|
||||
AND create_time < (#{request.createTimeEnd}::date + interval '1 day')
|
||||
</if>
|
||||
<if test="request.updateByName != null and request.updateByName != ''">
|
||||
AND update_by_name ilike concat('%', #{request.updateByName}, '%')
|
||||
</if>
|
||||
<if test="request.updateTimeStart != null">
|
||||
AND update_time >= #{request.updateTimeStart}::date
|
||||
</if>
|
||||
<if test="request.updateTimeEnd != null">
|
||||
AND update_time < (#{request.updateTimeEnd}::date + interval '1 day')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
<choose>
|
||||
|
|
|
|||
Loading…
Reference in New Issue