|
@@ -110,14 +110,14 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
}
|
|
|
/**
|
|
|
* 根据维保公司和电梯id查找急修
|
|
|
- * @param mtCompany
|
|
|
+ * @param mtCompanyId
|
|
|
* @param liftId
|
|
|
* @return
|
|
|
*/
|
|
|
- public EmergencyRepair findByMtCompanyAndLift(Long mtCompany,Long liftId){
|
|
|
+ public EmergencyRepair findByMtCompanyAndLift(Long mtCompanyId,Long liftId){
|
|
|
QueryWrapper<EmergencyRepair> queryWrapper = new QueryWrapper<>();
|
|
|
LambdaQueryWrapper<EmergencyRepair> lambdaQueryWrapper = queryWrapper.lambda();
|
|
|
- lambdaQueryWrapper.eq(EmergencyRepair::getMtCompanyId, mtCompany);
|
|
|
+ lambdaQueryWrapper.eq(EmergencyRepair::getMtCompanyId, mtCompanyId);
|
|
|
lambdaQueryWrapper.eq(EmergencyRepair::getLiftId,liftId);
|
|
|
//只查询一条
|
|
|
lambdaQueryWrapper.last("LIMIT 1");
|
|
@@ -126,14 +126,14 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
|
|
|
/**
|
|
|
* 统计维保公司和电梯下是否存在待急修和急修中的急修单
|
|
|
- * @param mtCompany
|
|
|
+ * @param mtCompanyId
|
|
|
* @param liftId
|
|
|
* @return
|
|
|
*/
|
|
|
- public int countRepairing(Long mtCompany,Long liftId){
|
|
|
+ public int countRepairing(Long mtCompanyId,Long liftId){
|
|
|
QueryWrapper<EmergencyRepair> queryWrapper = new QueryWrapper<>();
|
|
|
LambdaQueryWrapper<EmergencyRepair> lambdaQueryWrapper = queryWrapper.lambda();
|
|
|
- lambdaQueryWrapper.eq(EmergencyRepair::getMtCompanyId, mtCompany);
|
|
|
+ lambdaQueryWrapper.eq(EmergencyRepair::getMtCompanyId, mtCompanyId);
|
|
|
lambdaQueryWrapper.eq(EmergencyRepair::getLiftId,liftId);
|
|
|
lambdaQueryWrapper.in(EmergencyRepair::getStatus,Arrays.asList(Values.ER_STATUS_TO_REPAIRED,Values.ER_STATUS_REPAIRING));
|
|
|
return count(lambdaQueryWrapper);
|
|
@@ -141,14 +141,14 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
}
|
|
|
/**
|
|
|
* 开启维保,暂停急修,修改电梯业务状态为维保中
|
|
|
- * @param mtCompany
|
|
|
+ * @param mtCompanyId
|
|
|
* @param liftId
|
|
|
* @return
|
|
|
*/
|
|
|
@Transactional
|
|
|
- public boolean startMaintenance(Long mtCompany,Long liftId){
|
|
|
+ public boolean startMaintenance(Long mtCompanyId,Long liftId){
|
|
|
// 如果急修单不存在,直接返回,
|
|
|
- EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompany,liftId);
|
|
|
+ EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompanyId,liftId);
|
|
|
if(null == emergencyRepair){
|
|
|
return true;
|
|
|
}
|
|
@@ -159,7 +159,7 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
boolean er = updateById(emergencyRepair);
|
|
|
boolean re = false;
|
|
|
if(er){
|
|
|
- PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompany,liftId);
|
|
|
+ PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId,liftId);
|
|
|
if(null != relevance){
|
|
|
//电梯业务状态改成维保中
|
|
|
relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.MAINTENANCE.getCode());
|
|
@@ -179,13 +179,13 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
|
|
|
/**
|
|
|
* 停止维保,恢复急修,修改电梯业务状态为急修中
|
|
|
- * @param mtCompany
|
|
|
+ * @param mtCompanyId
|
|
|
* @param liftId
|
|
|
* @return
|
|
|
*/
|
|
|
- public boolean stopMaintenance(Long mtCompany,Long liftId){
|
|
|
+ public boolean stopMaintenance(Long mtCompanyId,Long liftId){
|
|
|
//如果急修单不存在,直接返回,
|
|
|
- EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompany,liftId);
|
|
|
+ EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompanyId,liftId);
|
|
|
if(null == emergencyRepair){
|
|
|
return true;
|
|
|
}
|
|
@@ -195,7 +195,7 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
|
|
|
boolean er = updateById(emergencyRepair);
|
|
|
boolean re = false;
|
|
|
if(er){
|
|
|
- PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompany,liftId);
|
|
|
+ PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId,liftId);
|
|
|
if(null == relevance){
|
|
|
return false;
|
|
|
}
|