行号改为计算后传值
This commit is contained in:
parent
d70ad6e943
commit
cf3e898c86
|
@ -184,13 +184,17 @@ public class BomResource extends AbstractNCCRestResource {
|
|||
BomReplVO newReplVO = new BomReplVO();
|
||||
IdGenerator idGenerator = NCLocator.getInstance().lookup(IdGenerator.class);
|
||||
|
||||
// i5ItemVO.setPrimaryKey(idGenerator.generate());
|
||||
// 设置新增必要属性(可根据实际业务补充)
|
||||
newReplVO.setCbom_replaceid(idGenerator.generate()); // 假设生成新ID的方法
|
||||
newReplVO.setCbom_replaceid(idGenerator.generate()); // 生成新ID
|
||||
newReplVO.setCbom_bid(targetCbomBid); // 关联当前物料项
|
||||
// 设置其他属性
|
||||
|
||||
// 计算新行号:(原有替代项数量 + 1) * 10
|
||||
int existingCount = replList.size();
|
||||
int newRowNumber = (existingCount + 1) * 10;
|
||||
newReplVO.setVrowno(String.valueOf(newRowNumber)); // 设置新行号
|
||||
|
||||
// 设置其他属性(会覆盖param中的vrowno,确保按规则生成)
|
||||
setReplVOProperties(newReplVO, param);
|
||||
// newReplVO.set
|
||||
|
||||
newReplVO.setStatus(VOStatus.NEW);
|
||||
replList.add(newReplVO);
|
||||
}
|
||||
|
@ -245,9 +249,9 @@ public class BomResource extends AbstractNCCRestResource {
|
|||
if (param.containsKey("vreplaceindex")) {
|
||||
replVO.setVreplaceindex((String) param.get("vreplaceindex"));
|
||||
}
|
||||
if (param.containsKey("vrowno")) {
|
||||
replVO.setVrowno((String) param.get("vrowno"));
|
||||
}
|
||||
// if (param.containsKey("vrowno")) {
|
||||
// replVO.setVrowno((String) param.get("vrowno"));
|
||||
// }
|
||||
|
||||
// 处理数字类型转换
|
||||
if (param.containsKey("ireplorder")) {
|
||||
|
|
Loading…
Reference in New Issue