|
|
|
@ -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);
|
|
|
|
|