From a7418fdc3875d68b03f5d89ceaa0c66a8e3902cd Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 24 十二月 2025 14:03:54 +0800
Subject: [PATCH] 销售订单报检区分物料属性
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
index a515e38..da12559 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -104,6 +104,7 @@
private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper;
+ private final NumberGenerator<IfsSplitOrderRecord> splitOrderRecordNumberGenerator;
@Override
public Result selectStandardTreeListByPartNo(String partNo) {
@@ -115,7 +116,7 @@
for (FactoryDto factoryDto : factoryDtos) {
for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) {
for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) {
- if (sampleTypeDto.getChildren().size() == 0) {
+ if (sampleTypeDto.getChildren().isEmpty()) {
sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue()));
}
// 鍒ゆ柇缁戝畾鐨勬槸鍚︽槸褰撳墠闆朵欢鍙�
@@ -170,7 +171,7 @@
* @return
*/
@Override
- public int inspectionReport(List<Long> ids,String orderType) {
+ public int inspectionReport(List<Long> ids,String orderType,String materialProp) {
Integer userId = SecurityUtils.getUserId().intValue();
ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
.in(IfsInventoryQuantity::getId, ids)
@@ -178,6 +179,7 @@
.set(IfsInventoryQuantity::getDeclareUserId, userId)
.set(IfsInventoryQuantity::getIsInspect, 1)
.set(IfsInventoryQuantity::getOrderType,orderType)
+ .set(IfsInventoryQuantity::getMaterialProp,materialProp)
.set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
);
threadPoolTaskExecutor.execute(() -> {
@@ -253,6 +255,7 @@
.set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
.set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
.set(IfsInventoryQuantity::getOrderType,ifsInventoryQuantity.getOrderType())
+ .set(IfsInventoryQuantity::getMaterialProp,ifsInventoryQuantity.getMaterialProp())
);
threadPoolTaskExecutor.execute(() -> {
@@ -938,20 +941,21 @@
if(Objects.nonNull(splitOrderList) && !splitOrderList.isEmpty()){
List<Long> ids = splitOrderList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList());
ids.add(ifsInventoryQuantity.getId());
- this.inspectionReport(ids,OrderType.RAW.getValue());
+ this.inspectionReport(ids,OrderType.RAW.getValue(),orderSplitDTO.getMaterialProp());
}
//鍕鹃�夊悓姝ュ埌MES锛屼繚瀛樿鍗曟媶鍒嗚褰�
if(orderSplitDTO.getPushToMes()){
- List<IfsSplitOrderRecord> collect = orderSplitDTO.getSplitDetailList().stream().map(m -> {
+ orderSplitDTO.getSplitDetailList().forEach(m -> {
IfsSplitOrderRecord record = new IfsSplitOrderRecord();
BeanUtil.copyProperties(m, record);
+ record.setSystemNo(splitOrderRecordNumberGenerator.generateNumberWithPrefix(IfsSplitOrderRecord.DIGIT, IfsSplitOrderRecord.PREFIX, IfsSplitOrderRecord::getSystemNo));
record.setOrderNo(ifsInventoryQuantity.getOrderNo());
record.setLineNo(ifsInventoryQuantity.getLineNo());
record.setReleaseNo(ifsInventoryQuantity.getReleaseNo());
record.setReceiptNo(ifsInventoryQuantity.getReceiptNo());
- return record;
- }).collect(Collectors.toList());
- return ifsSplitOrderRecordService.saveBatch(collect);
+ ifsSplitOrderRecordService.save(record);
+ });
+ return true;
}
return false;
}
--
Gitblit v1.9.3