|
|
|
@ -285,7 +285,10 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
// 检查BOM模板 |
|
|
|
PartInformationEntity oldPart = partInformationMapper.selectOne(new QueryWrapper<PartInformationEntity>().eq("site", data.getSite()).eq("part_no", data.getPartNo())); |
|
|
|
// 修改了物料模板 |
|
|
|
if ((oldPart.getTemplateNo() == null && StringUtils.isNotBlank(data.getTemplateNo())) || (!data.getTemplateNo().equals(oldPart.getTemplateNo()))) { |
|
|
|
String oldTemplateNo = oldPart.getTemplateNo(); |
|
|
|
String newTemplateNo = data.getTemplateNo(); |
|
|
|
|
|
|
|
if ((oldTemplateNo == null && StringUtils.isNotBlank(newTemplateNo)) || (newTemplateNo != null && !newTemplateNo.equals(oldTemplateNo))) { |
|
|
|
// 删除物料的BOM节点 |
|
|
|
quicklyCreateBomMapper.deleteQuicklyBomInfo(data.getSite(), data.getPartNo()); |
|
|
|
// 查模板数据 |
|
|
|
|