bug修复
This commit is contained in:
parent
935e4353cb
commit
7375992f77
@ -123,7 +123,7 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
c.setSendSuccessStatus(4);
|
||||
if (old != null) {
|
||||
if (Objects.equals(old.getCarModuleType(), CarInfoCarModuleTypeEnum.GD.getValue())) {
|
||||
throw new OpenAlertException("该车辆已添加,请勿重复添加!");
|
||||
throw new OpenAlertException("该车辆已存在,请勿重复添加!");
|
||||
}
|
||||
Date now = new Date();
|
||||
boolean isHk = projectCarCameraConfigService.isHikvisionConfig(c.getProjectSn());
|
||||
|
||||
@ -125,7 +125,7 @@ public class XzTaskProgressContentController {
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "进度审批管理", operType = "删除", operDesc = "删除进度审批")
|
||||
|
||||
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -53,12 +52,6 @@ public class XzTaskProgressContentServiceImpl extends ServiceImpl<XzTaskProgress
|
||||
if (taskProgress == null) {
|
||||
throw new OpenAlertException("任务进度不存在");
|
||||
}
|
||||
if (taskProgressContent.getProgressRatio().equals(Cts.WORKER_SAFE_MAX_SCORE)) {
|
||||
taskProgress.setStatus(2);
|
||||
} else {
|
||||
taskProgress.setStatus(1);
|
||||
}
|
||||
taskProgressMapper.updateById(taskProgress);
|
||||
String projectSn = taskProgress.getProjectSn();
|
||||
taskProgressContent.setProjectSn(projectSn);
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
@ -86,20 +79,23 @@ public class XzTaskProgressContentServiceImpl extends ServiceImpl<XzTaskProgress
|
||||
|
||||
@Override
|
||||
public void edit(XzTaskProgressContent taskProgressContent) {
|
||||
XzTaskProgressContent taskProgress = xzTaskProgressContentMapper.selectById(taskProgressContent.getId());
|
||||
if (taskProgress == null) {
|
||||
XzTaskProgressContent content = xzTaskProgressContentMapper.selectById(taskProgressContent.getId());
|
||||
if (content == null) {
|
||||
throw new OpenAlertException("任务进度不存在");
|
||||
}
|
||||
if (Objects.equals(taskProgressContent.getAuditType(), XzTaskProgressContentAuditTypeEnum.PASS.getValue())) {
|
||||
XzTaskProgress xzTaskProgress = taskProgressMapper.selectById(taskProgress.getTaskProgressId());
|
||||
if (xzTaskProgress == null) {
|
||||
throw new OpenAlertException("任务进度不存在.");
|
||||
XzTaskProgress progress = taskProgressMapper.selectById(content.getTaskProgressId());
|
||||
if (progress == null) {
|
||||
throw new OpenAlertException("任务进度不存在");
|
||||
}
|
||||
if (NumberUtils.gt(taskProgress.getProgressRatio().toString(), xzTaskProgress.getProgressRatio().toString())) {
|
||||
taskProgressMapper.update(null, new LambdaUpdateWrapper<XzTaskProgress>()
|
||||
.eq(XzTaskProgress::getId, taskProgress.getTaskProgressId())
|
||||
.set(XzTaskProgress::getProgressRatio, taskProgress.getProgressRatio())
|
||||
);
|
||||
if (NumberUtils.gt(content.getProgressRatio().toString(), progress.getProgressRatio().toString())) {
|
||||
if (content.getProgressRatio().equals(Cts.WORKER_SAFE_MAX_SCORE)) {
|
||||
progress.setStatus(2);
|
||||
} else {
|
||||
progress.setStatus(1);
|
||||
}
|
||||
progress.setProgressRatio(content.getProgressRatio());
|
||||
taskProgressMapper.updateById(progress);
|
||||
}
|
||||
}
|
||||
baseMapper.updateById(taskProgressContent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user