抄码查询修改
This commit is contained in:
+35
@@ -1584,6 +1584,8 @@ public class StockReceiptOrderApplicationService {
|
|||||||
// 主项子项结构:将 children 第一条(parent_copy)赋值给主项并删除
|
// 主项子项结构:将 children 第一条(parent_copy)赋值给主项并删除
|
||||||
assignFirstChildToParentAndRemove(stockReceiptOrderDO);
|
assignFirstChildToParentAndRemove(stockReceiptOrderDO);
|
||||||
}
|
}
|
||||||
|
// PDA 抄码收货不要求毛重/体积/面积,提交侧统一置 0,避免展示累计值误入本次增量
|
||||||
|
normalizePdaCopyReceiptGrossVolumeAreaToZero(stockReceiptOrderDO.getMaterialDetailList());
|
||||||
// 供 assembleParamByReceipt 识别:方案二将单次实收拆成 level2 子行;fromPda 须在装配前设置
|
// 供 assembleParamByReceipt 识别:方案二将单次实收拆成 level2 子行;fromPda 须在装配前设置
|
||||||
// 若仅有 getInfoByApp 挂的 parent_copy:assign 后 children 已空,不可再 skip,否则从不走 inject、只会 UPDATE 主行
|
// 若仅有 getInfoByApp 挂的 parent_copy:assign 后 children 已空,不可再 skip,否则从不走 inject、只会 UPDATE 主行
|
||||||
// 注意 ensureFirstItemAsParent 可能替换 materialDetailList,须用 DO 上最新列表判断
|
// 注意 ensureFirstItemAsParent 可能替换 materialDetailList,须用 DO 上最新列表判断
|
||||||
@@ -2117,6 +2119,39 @@ public class StockReceiptOrderApplicationService {
|
|||||||
|| StringUtils.isNotBlank(line.getPalletNumber());
|
|| StringUtils.isNotBlank(line.getPalletNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PDA 抄码收货不采集毛重、体积、面积:在装配前将对应请求字段置 0,避免 getInfo 带回的累计展示值被当作本次增量。
|
||||||
|
*/
|
||||||
|
private static void normalizePdaCopyReceiptGrossVolumeAreaToZero(List<ReceiptMaterialDetailDO> lines) {
|
||||||
|
if (CollectionUtils.isEmpty(lines)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (ReceiptMaterialDetailDO line : lines) {
|
||||||
|
if (line == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isPdaCopyReceiptLine(line)) {
|
||||||
|
line.setReceiptGrossWeight(BigDecimal.ZERO);
|
||||||
|
line.setTotalGrossWeight(BigDecimal.ZERO);
|
||||||
|
line.setReceiptVolume(BigDecimal.ZERO);
|
||||||
|
line.setTotalVolume(BigDecimal.ZERO);
|
||||||
|
line.setReceiptArea(BigDecimal.ZERO);
|
||||||
|
line.setTotalArea(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
normalizePdaCopyReceiptGrossVolumeAreaToZero(line.getChildren());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isPdaCopyReceiptLine(ReceiptMaterialDetailDO line) {
|
||||||
|
if (line == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (line.getCopyCode() != null && line.getCopyCode() == 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return StringUtils.isNotBlank(line.getCopyDetails()) || StringUtils.isNotBlank(line.getCopyQuantity());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDA 收货回传时,将 materialDetailList 的第一项作为主项(level 1),其余项作为其子项(level 2)
|
* PDA 收货回传时,将 materialDetailList 的第一项作为主项(level 1),其余项作为其子项(level 2)
|
||||||
* 仅当数据库中第二项为 level 2(真实子项)时才转换,避免将两条平铺明细错误转为父子导致第一条被覆盖
|
* 仅当数据库中第二项为 level 2(真实子项)时才转换,避免将两条平铺明细错误转为父子导致第一条被覆盖
|
||||||
|
|||||||
+3
@@ -351,4 +351,7 @@ public class ReceiptMaterialDetailDO extends BaseVOEntity {
|
|||||||
@ApiModelProperty("抄码数量克重详情")
|
@ApiModelProperty("抄码数量克重详情")
|
||||||
@Excel(name = "抄码数量克重详情")
|
@Excel(name = "抄码数量克重详情")
|
||||||
private String copyDetails;
|
private String copyDetails;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否抄码:1-是 2-否(与物料主数据同源,PDA/PC 透传)")
|
||||||
|
private Integer copyCode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user