|
@@ -171,10 +171,14 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
|
|
|
Map<String, Object> paramMap = new HashMap<>(2);
|
|
|
paramMap.put("liftId", liftId);
|
|
|
paramMap.put("mtCompanyId", mtCompanyId);
|
|
|
- //查询该公司下是否有此电梯
|
|
|
+ //查询该公司下是否有此电梯id
|
|
|
boolean result = platformService.findCompanyLiftExist(paramMap);
|
|
|
+ //查询该公司下是否有此电梯注册代码
|
|
|
+ int registrationCodeCount = platformService.getBaseMapper().countForCompanyLiftRegistrationCode(mtCompanyId, registrationCode);
|
|
|
if (result) {
|
|
|
return RestResponse.fail(MessageUtils.get("msg.lift.exist"));
|
|
|
+ } else if (registrationCodeCount > 0) {
|
|
|
+ return RestResponse.fail(ApiConstants.ResponseMessage.LIFT_EXIST);
|
|
|
} else {
|
|
|
Object detail = detail(liftId, null);
|
|
|
return RestResponse.success(detail, MessageUtils.get("msg.lift.company.exist"));
|