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