feat(qms): 添加来料检验任务二维码关联功能

- 在ExternalIncomingInspectionApplyQO和ExternalInventoryInspectionApplyQO中新增qrCodes字段
- 新增QmsIncomingInspectionTaskQr实体、Mapper和服务类用于二维码关联管理
- 在来料检验任务创建时保存二维码与任务的关联关系
- 修改NormalPGIController中的数据传输结构,移除旧的SRM相关DTO
- 更新QmsService中QMS接口调用地址配置
- 优化QCMaterialSyncDTO的数据结构,使用新的二维码列表替代旧的推送DTO
- 更新待办事项查询接口,添加来源类型编码字段返回
This commit is contained in:
曹鹏飞 2026-06-05 15:00:00 +08:00
parent c50972be50
commit b0f937e72a
16 changed files with 302 additions and 177 deletions

View File

@ -113,6 +113,9 @@ public class IncomingInspectionTaskControllerService {
@Resource
private List<ISendMessageService> sendMessageServices;
@Resource
private IQmsIncomingInspectionTaskQrService incomingInspectionTaskQrService;
/**
* 来料检验申请对外接口
* 业务规则
@ -248,6 +251,17 @@ public class IncomingInspectionTaskControllerService {
.eq(QmsIncomingInspectionTask::getId, task.getId())
.update();
if (CollectionUtil.isNotEmpty(request.getQrCodes())) {
incomingInspectionTaskQrService.saveBatch(
request.getQrCodes().stream()
.map(qrCode -> new QmsIncomingInspectionTaskQr()
.setTaskId(task.getId())
.setMaterialQrCode(qrCode)
)
.toList()
);
}
QmsTodoItem qmsTodoItem = new QmsTodoItem()
.setTitle("新的IQC来料检测任务" + task.getTaskNo())
.setCode(basdeSerialNumberControllerService.generateSerialNumber(32))
@ -381,6 +395,17 @@ public class IncomingInspectionTaskControllerService {
.eq(QmsIncomingInspectionTask::getId, task.getId())
.update();
if (CollectionUtil.isNotEmpty(request.getQrCodes())) {
incomingInspectionTaskQrService.saveBatch(
request.getQrCodes().stream()
.map(qrCode -> new QmsIncomingInspectionTaskQr()
.setTaskId(task.getId())
.setMaterialQrCode(qrCode)
)
.toList()
);
}
QmsTodoItem qmsTodoItem = new QmsTodoItem()
.setTitle("新的IQC库存检测任务" + task.getTaskNo())
.setCode(basdeSerialNumberControllerService.generateSerialNumber(32))

View File

@ -350,22 +350,22 @@ public class NormalPGIController extends BaseController {
.setItem1(new ArrayList<>())
.setItem2(new ArrayList<>());
SRMInspectionInputDTO srmDto = new SRMInspectionInputDTO();
srmDto.setCode("WMS_RCV_RECEIVE_TO_SRM");
SRMInspectionContentDTO content = new SRMInspectionContentDTO();
content.setSupplierName(order.getSupplierName());
content.setSupplierNum(order.getSupplierNum());
content.setReceiveNum("");
content.setReceiveType("BY_DELIVERY");
content.setPurchaseGroup(order.getPurchaseGroup());
content.setLineVOList(new ArrayList<>());
srmDto.setContent(content);
// SRMInspectionInputDTO_D srmDto = new SRMInspectionInputDTO_D();
// srmDto.setCode("WMS_RCV_RECEIVE_TO_SRM");
// SRMInspectionContentDTO content = new SRMInspectionContentDTO();
// content.setSupplierName(order.getSupplierName());
// content.setSupplierNum(order.getSupplierNum());
// content.setReceiveNum("");
// content.setReceiveType("BY_DELIVERY");
// content.setPurchaseGroup(order.getPurchaseGroup());
// content.setLineVOList(new ArrayList<>());
// srmDto.setContent(content);
qcDto = new QCMaterialSyncDTO()
.setPoNum(orderItem.getPoNum())
.setReceiptIds(new ArrayList<>())
.setZwm3A17DTO(sapDto)
.setPushDto(srmDto);
.setZwm3A17DTO(sapDto);
// .setPushDto(srmDto);
qcMaterialSyncDTOS.add(qcDto);
}
@ -381,21 +381,36 @@ public class NormalPGIController extends BaseController {
.setKZKRI(materialInfoInOrder.getKzkri()));
// SRM DTO
SRMLineVOListItem srmItem = new SRMLineVOListItem();
srmItem.setItemCode(item.getMaterialNo());
srmItem.setItemName(materialInfoInOrder.getMaktx());
srmItem.setUnit(materialInfoInOrder.getMeins());
srmItem.setFactory(materialInfoInOrder.getWerks());
srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
srmItem.setReceiveBatchNum("");
srmItem.setReceivedQty(totalQty);
srmItem.setSerialNum("");
srmItem.setLineNumber(Integer.valueOf(orderItem.getLineNumber()));
srmItem.setNoteNum(order.getNoteNum());
srmItem.setRequestNo(String.valueOf(qcItem.getId()));
srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
srmItem.setInspectionFlag("Y");
qcDto.getPushDto().getContent().getLineVOList().add(srmItem);
// SRMLineVOListItem srmItem = new SRMLineVOListItem();
// srmItem.setItemCode(item.getMaterialNo());
// srmItem.setItemName(materialInfoInOrder.getMaktx());
// srmItem.setUnit(materialInfoInOrder.getMeins());
// srmItem.setFactory(materialInfoInOrder.getWerks());
// srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
// srmItem.setReceiveBatchNum("");
// srmItem.setReceivedQty(totalQty);
// srmItem.setSerialNum("");
// srmItem.setLineNumber(Integer.valueOf(orderItem.getLineNumber()));
// srmItem.setNoteNum(order.getNoteNum());
// srmItem.setRequestNo(String.valueOf(qcItem.getId()));
// srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
// srmItem.setInspectionFlag("Y");
// qcDto.getPushDto().getContent().getLineVOList().add(srmItem);
qcDto.getIncomingInspectionApplyQOS().add(
new ExternalIncomingInspectionApplyQO()
.setRequestNo(String.valueOf(receiveItemId))
.setMaterialNo(item.getMaterialNo())
.setInspectionType(0)
.setSupplierCode(order.getSupplierNum())
.setSupplierName(order.getSupplierName())
.setDeliveryOrderNo(order.getNoteNum())
.setDeliveryOrderLine(String.valueOf(qcItem.getLineNumber()))
.setPurchaseOrderNo(qcItem.getNoteNum())
.setPurchaseOrderLine(String.valueOf(qcItem.getLineNumber()))
.setFactory(order.getIuCode())
.setInspectionQty(qcItem.getReceiptNum() != null ? qcItem.getReceiptNum().intValue() : 0)
.setPurchaseGroup(order.getPurchaseGroup())
);
qcDto.getReceiptIds().add(qcItem.getId());
@ -1115,52 +1130,75 @@ public class NormalPGIController extends BaseController {
}
private void setSrmData(
SRMInspectionInputDTO pushDto,
// SRMInspectionInputDTO_D pushDto,
List<ExternalIncomingInspectionApplyQO> incomingInspectionApplyQOS,
WmsSrmOrder order,
List<SrmMaterialReceiptScanCodes> codes,
SrmMaterialReceiptQO item,
SAPSyncParamsDTO materialInfoInOrder
Long receiveItemId
) {
if (CollectionUtil.isNotEmpty(codes)) {
// 根据 BatchNumber SerialNumbers 分组并汇总 CodeNum
Map<String, BigDecimal> batchNumbers = codes.stream()
.collect(Collectors.groupingBy(SrmMaterialReceiptScanCodes::getKey,
Collectors.mapping(SrmMaterialReceiptScanCodes::getCodeNum, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
for (Map.Entry<String, BigDecimal> entry : batchNumbers.entrySet()) {
String[] keys = entry.getKey().split(";", -1);
SRMLineVOListItem srmItem = new SRMLineVOListItem();
srmItem.setItemCode(item.getItemCode());
srmItem.setItemName(materialInfoInOrder.getMaktx());
srmItem.setUnit(materialInfoInOrder.getMeins());
srmItem.setFactory(materialInfoInOrder.getWerks());
srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
srmItem.setReceiveBatchNum(keys[0]);
srmItem.setReceivedQty(entry.getValue());
srmItem.setSerialNum(keys[1]);
srmItem.setLineNumber(Integer.valueOf(item.getLineNumber()));
srmItem.setNoteNum(item.getNoteNum());
srmItem.setRequestNo(IdUtil.getSnowflakeNextIdStr());
srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
srmItem.setInspectionFlag("Y");
pushDto.getContent().getLineVOList().add(srmItem);
}
} else {
SRMLineVOListItem srmItem = new SRMLineVOListItem();
srmItem.setItemCode(item.getItemCode());
srmItem.setItemName(materialInfoInOrder.getMaktx());
srmItem.setUnit(materialInfoInOrder.getMeins());
srmItem.setFactory(materialInfoInOrder.getWerks());
srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
srmItem.setReceiveBatchNum("");
srmItem.setReceivedQty(item.getReceiptNum());
srmItem.setSerialNum("");
srmItem.setLineNumber(Integer.valueOf(item.getLineNumber()));
srmItem.setNoteNum(item.getNoteNum());
srmItem.setRequestNo(IdUtil.getSnowflakeNextIdStr());
srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
srmItem.setInspectionFlag("Y");
pushDto.getContent().getLineVOList().add(srmItem);
}
// if (CollectionUtil.isNotEmpty(codes)) {
// // 根据 BatchNumber SerialNumbers 分组并汇总 CodeNum
// Map<String, BigDecimal> batchNumbers = codes.stream()
// .collect(Collectors.groupingBy(SrmMaterialReceiptScanCodes::getKey,
// Collectors.mapping(SrmMaterialReceiptScanCodes::getCodeNum, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
// for (Map.Entry<String, BigDecimal> entry : batchNumbers.entrySet()) {
// String[] keys = entry.getKey().split(";", -1);
// SRMLineVOListItem srmItem = new SRMLineVOListItem();
// srmItem.setItemCode(item.getItemCode());
// srmItem.setItemName(materialInfoInOrder.getMaktx());
// srmItem.setUnit(materialInfoInOrder.getMeins());
// srmItem.setFactory(materialInfoInOrder.getWerks());
// srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
// srmItem.setReceiveBatchNum(keys[0]);
// srmItem.setReceivedQty(entry.getValue());
// srmItem.setSerialNum(keys[1]);
// srmItem.setLineNumber(Integer.valueOf(item.getLineNumber()));
// srmItem.setNoteNum(item.getNoteNum());
// srmItem.setRequestNo(IdUtil.getSnowflakeNextIdStr());
// srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
// srmItem.setInspectionFlag("Y");
// pushDto.getContent().getLineVOList().add(srmItem);
// }
// } else {
// SRMLineVOListItem srmItem = new SRMLineVOListItem();
// srmItem.setItemCode(item.getItemCode());
// srmItem.setItemName(materialInfoInOrder.getMaktx());
// srmItem.setUnit(materialInfoInOrder.getMeins());
// srmItem.setFactory(materialInfoInOrder.getWerks());
// srmItem.setReceivedWarehouse(materialInfoInOrder.getWarehouseNo());
// srmItem.setReceiveBatchNum("");
// srmItem.setReceivedQty(item.getReceiptNum());
// srmItem.setSerialNum("");
// srmItem.setLineNumber(Integer.valueOf(item.getLineNumber()));
// srmItem.setNoteNum(item.getNoteNum());
// srmItem.setRequestNo(IdUtil.getSnowflakeNextIdStr());
// srmItem.setReceivedDate(DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd"));
// srmItem.setInspectionFlag("Y");
// pushDto.getContent().getLineVOList().add(srmItem);
// }
incomingInspectionApplyQOS.add(
new ExternalIncomingInspectionApplyQO()
.setRequestNo(String.valueOf(receiveItemId))
.setMaterialNo(item.getItemCode())
.setInspectionType(0)
.setSupplierCode(order.getSupplierNum())
.setSupplierName(order.getSupplierName())
.setDeliveryOrderNo(order.getNoteNum())
.setDeliveryOrderLine(String.valueOf(item.getLineNumber()))
.setPurchaseOrderNo(item.getNoteNum())
.setPurchaseOrderLine(String.valueOf(item.getLineNumber()))
.setFactory(order.getIuCode())
.setInspectionQty(item.getReceiptNum() != null ? item.getReceiptNum().intValue() : 0)
.setPurchaseGroup(order.getPurchaseGroup())
.setQrCodes(
CollectionUtil.isNotEmpty(codes)
? codes.stream()
.map(SrmMaterialReceiptScanCodes::getCodeId)
.collect(Collectors.toList())
: Collections.emptyList()
)
);
}
private void setQcMaterialSyncDto(List<QCMaterialSyncDTO> qcMaterialSyncDTOS,
@ -1174,7 +1212,7 @@ public class NormalPGIController extends BaseController {
) {
ZWM3A17DTO zwm3A17DTO = null;
QCMaterialSyncDTO qcDto = null;
SRMInspectionInputDTO srmPushDto = null;
// SRMInspectionInputDTO_D srmPushDto = null;
qcDto = qcMaterialSyncDTOS.stream()
.filter(qcMaterialSyncDTO -> qcMaterialSyncDTO
@ -1199,25 +1237,25 @@ public class NormalPGIController extends BaseController {
}
zwm3A17DTO = qcDto.getZwm3A17DTO();
if (Objects.isNull(qcDto.getPushDto())) {
SRMInspectionInputDTO dto = new SRMInspectionInputDTO();
SRMInspectionContentDTO content = new SRMInspectionContentDTO();
content.setSupplierName(order.getSupplierName());
content.setSupplierNum(order.getSupplierNum());
content.setReceiveNum("");
content.setReceiveType("BY_DELIVERY");
content.setPurchaseGroup(order.getPurchaseGroup());
content.setLineVOList(new ArrayList<>());
dto.setContent(content);
dto.setCode("WMS_RCV_RECEIVE_TO_SRM");
qcDto.setPushDto(dto);
}
srmPushDto = qcDto.getPushDto();
// if (Objects.isNull(qcDto.getPushDto())) {
// SRMInspectionInputDTO_D dto = new SRMInspectionInputDTO_D();
// SRMInspectionContentDTO content = new SRMInspectionContentDTO();
// content.setSupplierName(order.getSupplierName());
// content.setSupplierNum(order.getSupplierNum());
// content.setReceiveNum("");
// content.setReceiveType("BY_DELIVERY");
// content.setPurchaseGroup(order.getPurchaseGroup());
// content.setLineVOList(new ArrayList<>());
// dto.setContent(content);
// dto.setCode("WMS_RCV_RECEIVE_TO_SRM");
// qcDto.setPushDto(dto);
// }
// srmPushDto = qcDto.getPushDto();
//组装SAP的参数
setZWM3A17DTO(zwm3A17DTO, codes, item, materialInfoInOrder);
//组装SRM的参数
setSrmData(srmPushDto, codes, item, materialInfoInOrder);
////组装SRM的参数
setSrmData(qcDto.getIncomingInspectionApplyQOS(), order, codes, item, receiveItemId);
WmsQcReceiveItem qmsReceiptItem = new WmsQcReceiveItem()
.setId(receiveItemId)

View File

@ -1,10 +1,10 @@
package com.nflg.wms.admin.pojo.dto;
import com.nflg.wms.common.pojo.dto.QCReceiptItemDTO;
import com.nflg.wms.common.pojo.dto.SRMInspectionInputDTO;
import com.nflg.wms.common.pojo.qo.ExternalIncomingInspectionApplyQO;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.ArrayList;
import java.util.List;
@Data
@ -13,7 +13,9 @@ public class QCMaterialSyncDTO {
private ZWM3A17DTO zwm3A17DTO;
private SRMInspectionInputDTO pushDto;
// private SRMInspectionInputDTO pushDto;
private List<ExternalIncomingInspectionApplyQO> incomingInspectionApplyQOS = new ArrayList<>();
private String poNum;

View File

@ -3,7 +3,6 @@ package com.nflg.wms.admin.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Pair;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.nflg.wms.admin.pojo.dto.GoodReceiptDTO;
import com.nflg.wms.admin.pojo.dto.QCMaterialSyncDTO;
import com.nflg.wms.admin.pojo.dto.ZWM3A17DTO;
@ -26,9 +25,7 @@ import jakarta.annotation.Resource;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
@ -38,9 +35,6 @@ import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import static cn.dev33.satoken.SaManager.log;
@Component
public class NormalPGIControllerService {
@ -273,9 +267,10 @@ public class NormalPGIControllerService {
//导入SAP
Pair<Pair<String, String>, Pair<String, String>> zwm3A17ReturnDTO = sapService.zwm3a17(dto.getZwm3A17DTO());
//推入srm
SRMInspectionContentDTO content = dto.getPushDto().getContent();
content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
pushInspectionMaterialsToSRM(dto.getPushDto());
// SRMInspectionContentDTO content = dto.getPushDto().getContent();
// content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
// pushInspectionMaterialsToSRM(dto.getPushDto());
qmsService.pushIQCIncoming(dto.getIncomingInspectionApplyQOS());
//修改收货单的物料凭证和年度物料凭证
List<Long> ids = dto.getReceiptIds();
//修改收货单的物料凭证和年度物料凭证
@ -410,9 +405,10 @@ public class NormalPGIControllerService {
//导入SAP
Pair<Pair<String, String>, Pair<String, String>> zwm3A17ReturnDTO = sapService.zwm3a17(dto.getZwm3A17DTO());
//推入srm
SRMInspectionContentDTO content = dto.getPushDto().getContent();
content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
pushInspectionMaterialsToSRM(dto.getPushDto());
// SRMInspectionContentDTO content = dto.getPushDto().getContent();
// content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
// pushInspectionMaterialsToSRM(dto.getPushDto());
qmsService.pushIQCIncoming(dto.getIncomingInspectionApplyQOS());
//修改收货单的物料凭证和年度物料凭证
List<Long> ids = dto.getReceiptIds();
//修改收货单的物料凭证和年度物料凭证
@ -487,9 +483,10 @@ public class NormalPGIControllerService {
if (CollectionUtil.isNotEmpty(qcMaterialSyncDTOS)) {
for (QCMaterialSyncDTO dto : qcMaterialSyncDTOS) {
Pair<Pair<String, String>, Pair<String, String>> zwm3A17ReturnDTO = sapService.zwm3a17(dto.getZwm3A17DTO());
SRMInspectionContentDTO content = dto.getPushDto().getContent();
content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
pushInspectionMaterialsToSRM(dto.getPushDto());
// SRMInspectionContentDTO content = dto.getPushDto().getContent();
// content.setReceiveNum(zwm3A17ReturnDTO.getValue().getKey());
// pushInspectionMaterialsToSRM(dto.getPushDto());
qmsService.pushIQCIncoming(dto.getIncomingInspectionApplyQOS());
List<Long> ids = dto.getReceiptIds();
if (CollectionUtil.isNotEmpty(ids)) {
@ -579,37 +576,37 @@ public class NormalPGIControllerService {
// }
}
/**
* 将检验物料信息推送到SRM系统
*
* @param request SRM检验输入数据传输对象包含需要推送的检验物料信息
*/
private void pushInspectionMaterialsToSRM(SRMInspectionInputDTO request) {
SRMInspectionContentDTO content = request.getContent();
if (content == null || CollectionUtil.isEmpty(content.getLineVOList())) {
return;
}
List<ExternalIncomingInspectionApplyQO> qoList = new ArrayList<>();
for (SRMLineVOListItem item : content.getLineVOList()) {
ExternalIncomingInspectionApplyQO qo = new ExternalIncomingInspectionApplyQO();
qo.setRequestNo(item.getRequestNo());
qo.setMaterialNo(item.getItemCode());
qo.setInspectionType(0);
qo.setSupplierCode(content.getSupplierNum());
qo.setSupplierName(content.getSupplierName());
qo.setDeliveryOrderNo(content.getReceiveNum());
qo.setDeliveryOrderLine(String.valueOf(item.getLineNumber()));
qo.setPurchaseOrderNo(item.getNoteNum());
qo.setPurchaseOrderLine(String.valueOf(item.getLineNumber()));
qo.setFactory(item.getFactory());
qo.setInspectionQty(item.getReceivedQty() != null ? item.getReceivedQty().intValue() : 0);
qo.setPurchaseGroup(content.getPurchaseGroup());
qoList.add(qo);
}
qmsService.pushIQCIncoming(qoList);
}
// /**
// * 将检验物料信息推送到SRM系统
// *
// * @param request SRM检验输入数据传输对象包含需要推送的检验物料信息
// */
// private void pushInspectionMaterialsToSRM(SRMInspectionInputDTO_D request) {
// SRMInspectionContentDTO content = request.getContent();
// if (content == null || CollectionUtil.isEmpty(content.getLineVOList())) {
// return;
// }
//
// List<ExternalIncomingInspectionApplyQO> qoList = new ArrayList<>();
// for (SRMLineVOListItem item : content.getLineVOList()) {
// ExternalIncomingInspectionApplyQO qo = new ExternalIncomingInspectionApplyQO();
// qo.setRequestNo(item.getRequestNo());
// qo.setMaterialNo(item.getItemCode());
// qo.setInspectionType(0);
// qo.setSupplierCode(content.getSupplierNum());
// qo.setSupplierName(content.getSupplierName());
// qo.setDeliveryOrderNo(content.getReceiveNum());
// qo.setDeliveryOrderLine(String.valueOf(item.getLineNumber()));
// qo.setPurchaseOrderNo(item.getNoteNum());
// qo.setPurchaseOrderLine(String.valueOf(item.getLineNumber()));
// qo.setFactory(item.getFactory());
// qo.setInspectionQty(item.getReceivedQty() != null ? item.getReceivedQty().intValue() : 0);
// qo.setPurchaseGroup(content.getPurchaseGroup());
// qoList.add(qo);
// }
//
// qmsService.pushIQCIncoming(qoList);
// }
// /**

View File

@ -26,8 +26,8 @@ public class QmsService {
@Resource
private RestTemplate restTemplate;
@Value("${qms.inspection.url:}")
private String qmsUrl;
@Value("${qms.host}")
private String qmsHost;
public void pushIQCIncoming(List<ExternalIncomingInspectionApplyQO> qoList) {
log.info("推送来料检验申请到QMS{}", JSONUtil.toJsonStr(qoList));
@ -37,7 +37,7 @@ public class QmsService {
HttpEntity<List<ExternalIncomingInspectionApplyQO>> requestEntity = new HttpEntity<>(qoList, headers);
ResponseEntity<ApiResult<Void>> response = restTemplate.exchange(
qmsUrl + "/external/incoming-inspection-task/incoming-apply",
qmsHost + "/external/incoming-inspection-task/incoming-apply",
HttpMethod.POST,
requestEntity,
new ParameterizedTypeReference<ApiResult<Void>>() {}

View File

@ -1,20 +0,0 @@
package com.nflg.wms.common.pojo.dto;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.util.List;
@Data
public class SRMInspectionContentDTO {
private String supplierName;
private String supplierNum;
private List<SRMLineVOListItem> lineVOList;
private String receiveNum;
private String receiveType;
/**
* 采购组
*/
private String purchaseGroup;
}

View File

@ -1,9 +0,0 @@
package com.nflg.wms.common.pojo.dto;
import lombok.Data;
@Data
public class SRMInspectionInputDTO {
private String code;
private SRMInspectionContentDTO content;
}

View File

@ -4,11 +4,15 @@ import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 对外接口-来料检验申请 QO
*/
@Data
@Accessors(chain = true)
public class ExternalIncomingInspectionApplyQO {
/**
@ -83,4 +87,9 @@ public class ExternalIncomingInspectionApplyQO {
*/
@NotBlank(message = "采购组不能为空")
private String purchaseGroup;
/**
* 二维码列表
*/
private List<String> qrCodes;
}

View File

@ -5,6 +5,8 @@ import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.util.List;
/**
* 对外接口-库存检测申请 QO
*/
@ -54,4 +56,9 @@ public class ExternalInventoryInspectionApplyQO {
@NotNull(message = "存储时长不能为空")
@Min(value = 1, message = "存储时长必须大于0")
private Integer storageDays;
/**
* 二维码列表
*/
private List<String> qrCodes;
}

View File

@ -10,11 +10,6 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class QmsTodoItemSearchQO extends SearchBaseQO {
/**
* 来源类型0=IQC检测任务1=PDI检测任务2=巡检
*/
private Short sourceType;
/**
* 标题
*/

View File

@ -32,6 +32,11 @@ public class QmsTodoItemVO {
*/
private String sourceTypeName;
/**
* 来源类型编码
*/
private String sourceTypeCode;
/**
* 来源ID
*/

View File

@ -0,0 +1,42 @@
package com.nflg.wms.repository.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
* 来料检验任务二维码关联表
* </p>
*
* @author 代码生成器生成
* @since 2026
*/
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("qms_incoming_inspection_task_qr")
public class QmsIncomingInspectionTaskQr implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 检测任务id关联来料检验任务表
*/
private Long taskId;
/**
* 物料二维码唯一编号
*/
private String materialQrCode;
}

View File

@ -0,0 +1,11 @@
package com.nflg.wms.repository.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskQr;
/**
* 来料检验任务二维码关联 Mapper
*/
public interface QmsIncomingInspectionTaskQrMapper extends BaseMapper<QmsIncomingInspectionTaskQr> {
}

View File

@ -0,0 +1,11 @@
package com.nflg.wms.repository.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskQr;
/**
* 来料检验任务二维码关联 服务类
*/
public interface IQmsIncomingInspectionTaskQrService extends IService<QmsIncomingInspectionTaskQr> {
}

View File

@ -0,0 +1,15 @@
package com.nflg.wms.repository.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskQr;
import com.nflg.wms.repository.mapper.QmsIncomingInspectionTaskQrMapper;
import com.nflg.wms.repository.service.IQmsIncomingInspectionTaskQrService;
import org.springframework.stereotype.Service;
/**
* 来料检验任务二维码关联 服务实现类
*/
@Service
public class QmsIncomingInspectionTaskQrServiceImpl extends ServiceImpl<QmsIncomingInspectionTaskQrMapper, QmsIncomingInspectionTaskQr> implements IQmsIncomingInspectionTaskQrService {
}

View File

@ -3,7 +3,7 @@
<mapper namespace="com.nflg.wms.repository.mapper.QmsTodoItemMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.QmsTodoItemVO">
SELECT qti.*,di.name as source_type_name
SELECT qti.*,di.name as source_type_name,di.code as source_type_code
FROM qms_todo_item qti
LEFT JOIN dictionary_item di on qti.source_type_id=di.id
WHERE 1=1
@ -13,9 +13,6 @@
<if test="request.sourceTypeId != null">
AND qti.source_type_id = #{request.sourceTypeId}
</if>
<if test="request.sourceType != null">
AND qti.source_type_id = #{request.sourceType}
</if>
<if test="userId != null">
AND qti.create_user_id = #{userId}
</if>