添加设备时,同一个设备可以关联到2个工位,需要修复。

tags/yfai-mes-ext-v1.0
jun 11 months ago
parent 05512b63f5
commit e3e8d6ed8d

@ -56,13 +56,8 @@ public class MesWcEquipmentServiceImpl extends BaseMesService<MesWcEquipment> im
ValidatorBean.checkNotNull(item.getWorkCenterCode(), "工作中心代码不能为空");
//校验数据是否存在
MesWcEquipment mesWcEquipmentDb = baseRDao.getById(item.getId());
if (null == mesWcEquipmentDb ||
(null != mesWcEquipmentDb && CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == mesWcEquipmentDb.getIsDeleted())) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
.setErrorDetail("数据不存在")
.build();
if (null == mesWcEquipmentDb || CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == mesWcEquipmentDb.getIsDeleted()) {
MesException.throwMesBusiException("数据不存在");
}
//校验设备代码是否有效,校验设备是否已经绑定该工位,校验设备是否已经绑定其他生产线
this.checkSaveOrUpdateMesWcEquipment(item);

Loading…
Cancel
Save