// 根据ID查询TDFmdreportdetail实体对象 TDFmdreportdetail entity = fmdreportdetailMapper.selectTDFmdreportdetailById(id); // 如果查询结果为空,抛出异常 if (entity == null) throw new RuntimeException("找不到数据"); // 如果用户所在地与实体对象的所有者ID不同,抛出异常 if (!user.getPlace().equals(entity.getOwnerid())) throw new RuntimeException("非法操作");

// 根据实体对象的审核ID查询TDAgrunitaudit实体对象 TDAgrunitaudit audit = agrunitauditMapper.selectTDAgrunitauditById(entity.getAudirId());

// 如果查询结果为空,抛出异常 if (audit == null) throw new RuntimeException("数据异常"); // 如果审核状态不为草稿状态,抛出异常 if (!checkJadStatus(audit.getStatus())) throw new RuntimeException("该填报已提交,请先退回");

// 更新实体对象的更新时间、更新人ID、更新人名称和删除标志 entity.setUpdateat(LocalDateTime.now()); entity.setUpdaterid(user.getUserId()); entity.setUpdatername(user.getUserName()); entity.setDeleted(true); // 更新TDFmdreportdetail实体对象 fmdreportdetailMapper.updateTDFmdreportdetail(entity);

// 清空示范带线路 fmdplaceMapper.updateByR_DETAIL_ID(id);

// 重新加载示范带数据 reloadFmdData(user,audit.getId())

TDFmdreportdetail entity = fmdreportdetailMapperselectTDFmdreportdetailByIdid; if entity == null throw new RuntimeException找不到数据; if !usergetPlaceequalsentitygetOwnerid throw new Runtime

原文地址: https://www.cveoy.top/t/topic/e1kF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录