|
|
|
@ -1016,7 +1016,11 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
item.setRecordType(recordType); |
|
|
|
item.setCodeNo(codeNo); |
|
|
|
}); |
|
|
|
partInformationMapper.addPartItems(list1); |
|
|
|
try { |
|
|
|
partInformationMapper.addPartItems(list1); |
|
|
|
} catch (RuntimeException e) { |
|
|
|
throw new RuntimeException("请先维护属性模版!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
partInformationService.commitItemValue(list.get(i)); |
|
|
|
@ -1149,18 +1153,18 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
BomComponentEntity entityToUpdate = new BomComponentEntity(); |
|
|
|
BeanUtils.copyProperties(component, entityToUpdate); |
|
|
|
entityToUpdate.setQtyPerAssembly(qtyPerAssembly); |
|
|
|
|
|
|
|
|
|
|
|
// 打印更新条件用于诊断 |
|
|
|
System.out.println(" WHERE条件: site=" + entityToUpdate.getSite() |
|
|
|
System.out.println(" WHERE条件: site=" + entityToUpdate.getSite() |
|
|
|
+ ", partNo=" + entityToUpdate.getPartNo() |
|
|
|
+ ", engChgLevel=" + entityToUpdate.getEngChgLevel() |
|
|
|
+ ", bomType=" + entityToUpdate.getBomType() |
|
|
|
+ ", alternativeNo=" + entityToUpdate.getAlternativeNo() |
|
|
|
+ ", lineItemNo=" + entityToUpdate.getLineItemNo()); |
|
|
|
|
|
|
|
|
|
|
|
int updateCount = bomManagementMapper.updateBomComponent(entityToUpdate); |
|
|
|
System.out.println(" 更新结果: " + (updateCount > 0 ? "✅ 成功" : "❌ 失败 - 未找到匹配记录")); |
|
|
|
|
|
|
|
|
|
|
|
if (updateCount == 0) { |
|
|
|
System.err.println(" !!! 更新失败,请检查WHERE条件是否正确"); |
|
|
|
} |
|
|
|
|