修改检测计划态,录波校验调整
This commit is contained in:
@@ -13,6 +13,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
@@ -44,6 +45,7 @@ import com.njcn.gather.system.dictionary.service.IDictDataService;
|
||||
import com.njcn.gather.system.dictionary.service.IDictTypeService;
|
||||
import com.njcn.gather.type.pojo.po.DevType;
|
||||
import com.njcn.gather.type.service.IDevTypeService;
|
||||
import com.njcn.gather.user.user.pojo.po.SysUser;
|
||||
import com.njcn.gather.user.user.service.ISysUserService;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.ExcelUtil;
|
||||
@@ -353,7 +355,10 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
pqDevVO.setDevKey(EncryptionUtil.decoderString(1, pqDevVO.getDevKey()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(pqDevVO.getCheckBy())) {
|
||||
pqDevVO.setCheckBy(userService.getById(pqDevVO.getCheckBy()).getName());
|
||||
SysUser user = userService.getById(pqDevVO.getCheckBy());
|
||||
if (ObjectUtil.isNotNull(user)) {
|
||||
pqDevVO.setCheckBy(user.getName());
|
||||
}
|
||||
}
|
||||
|
||||
DevType devType = devTypeService.getById(pqDevVO.getDevType());
|
||||
@@ -515,11 +520,18 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
Integer checkState = pqMonitorService.getDevCheckState(devId);
|
||||
Integer checkResult = pqMonitorService.getDevCheckResult(devId);
|
||||
|
||||
pqDevSubService.lambdaUpdate()
|
||||
SysUser user = userService.getById(userId);
|
||||
|
||||
LambdaUpdateChainWrapper<PqDevSub> w = pqDevSubService.lambdaUpdate()
|
||||
.set(PqDevSub::getCheckState, checkState)
|
||||
.set(PqDevSub::getCheckResult, checkResult)
|
||||
.set(StrUtil.isNotBlank(userId), PqDevSub::getCheckBy, userId)
|
||||
.eq(PqDevSub::getDevId, devId).update();
|
||||
.set(PqDevSub::getCheckTime, LocalDateTime.now())
|
||||
.eq(PqDevSub::getDevId, devId);
|
||||
|
||||
if(ObjectUtil.isNotNull(user)){
|
||||
w.set(PqDevSub::getCheckBy, user.getName());
|
||||
}
|
||||
w.update();
|
||||
|
||||
PqDevParam.QueryParam param = new PqDevParam.QueryParam();
|
||||
String planId = dev.getPlanId();
|
||||
@@ -539,6 +551,10 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
set = pqDevVOList.stream().map(PqDevVO::getCheckState).collect(Collectors.toSet());
|
||||
if (set.contains(CheckStateEnum.UNCHECKED.getValue())) {
|
||||
this.baseMapper.updatePlanTestState(planId, CheckStateEnum.CHECKING.getValue());
|
||||
} else if (set.contains(CheckStateEnum.CHECKING.getValue())) {
|
||||
this.baseMapper.updatePlanTestState(planId, CheckStateEnum.CHECKING.getValue());
|
||||
} else {
|
||||
this.baseMapper.updatePlanTestState(planId, CheckStateEnum.CHECKED.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user