public void delDetailReport(SysUser user, Long id) { // 判断是否可以进行操作 functionConfigUtil.isLock_Village(FunctionType.JAD, OperateType.UPDATE,"暂时锁定填报!"); // 判断当前是否可以进行操作 TDSfdreportdetail entity = sfdreportdetailMapper.selectTDSfdreportdetailById(id); // 根据id查询填报详情实体 if (entity == null) throw new RuntimeException("找不到数据"); // 如果实体为空,抛出异常 if (!user.getPlace().equals(entity.getOwnerid())) throw new RuntimeException("非法操作"); // 如果操作用户的所属地点与实体的所属地点不一致,抛出异常 TDAgrunitaudit audit = agrunitauditMapper.selectTDAgrunitauditById(entity.getAudirId()); // 根据实体的审核id查询审核实体 if (audit == null) throw new RuntimeException("数据异常"); // 如果审核实体为空,抛出异常 if (!checkJadStatus(audit.getStatus())) throw new RuntimeException("该填报已提交,请先退回"); // 如果审核状态不为未提交,抛出异常 entity.setUpdateat(LocalDateTime.now()); // 设置实体的更新时间为当前时间 entity.setUpdaterid(user.getUserId()); // 设置实体的更新人id为当前用户id entity.setUpdatername(user.getUserName()); // 设置实体的更新人姓名为当前用户姓名 entity.setDeleted(true); // 设置实体为已删除状态 //修改操作 sfdreportdetailMapper.updateTDSfdreportdetail(entity); // 更新填报详情实体

    //把示范带线路也清空
  //  String update_sql = " update db_twenty.t_d_sfdplace x set x.C_DELETED = 1 where x.R_DETAIL_ID = ? and x.C_DELETED = 0 ";
    sfdplaceMapper.updateByR_DETAIL_ID(id); // 根据填报详情id更新示范带实体的删除状态

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

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

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