17 changed files with 693 additions and 54 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,111 @@ |
|||
package org.dromara.productManagement.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.productManagement.domain.vo.SjjDocumentTasksVo; |
|||
import org.dromara.productManagement.domain.bo.SjjDocumentTasksBo; |
|||
import org.dromara.productManagement.service.ISjjDocumentTasksService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 审计局标书任务 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/productManagement/SjjDocumentTasks") |
|||
public class SjjDocumentTasksController extends BaseController { |
|||
|
|||
private final ISjjDocumentTasksService sjjDocumentTasksService; |
|||
|
|||
/** |
|||
* 查询审计局标书任务列表 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:list") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<SjjDocumentTasksVo> list(SjjDocumentTasksBo bo, PageQuery pageQuery) { |
|||
return sjjDocumentTasksService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出审计局标书任务列表 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:export") |
|||
@Log(title = "审计局标书任务", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(SjjDocumentTasksBo bo, HttpServletResponse response) { |
|||
List<SjjDocumentTasksVo> list = sjjDocumentTasksService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "审计局标书任务", SjjDocumentTasksVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取审计局标书任务详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:query") |
|||
@GetMapping("/{id}") |
|||
public R<SjjDocumentTasksVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable String id) { |
|||
return R.ok(sjjDocumentTasksService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增审计局标书任务 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:add") |
|||
@Log(title = "审计局标书任务", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SjjDocumentTasksBo bo) { |
|||
return toAjax(sjjDocumentTasksService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改审计局标书任务 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:edit") |
|||
@Log(title = "审计局标书任务", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SjjDocumentTasksBo bo) { |
|||
return toAjax(sjjDocumentTasksService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除审计局标书任务 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@SaCheckPermission("productManagement:SjjDocumentTasks:remove") |
|||
@Log(title = "审计局标书任务", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
return toAjax(sjjDocumentTasksService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
@DeleteMapping("/ossRemoveById/{ids}") |
|||
public R<Void> ossRemoveById(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
|
|||
return toAjax(sjjDocumentTasksService.ossRemoveById(List.of(ids), true)); |
|||
} |
|||
} |
@ -0,0 +1,88 @@ |
|||
package org.dromara.productManagement.domain; |
|||
|
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* 审计局标书任务对象 sjj_document_tasks |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("sjj_document_tasks") |
|||
public class SjjDocumentTasks extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务名称 |
|||
*/ |
|||
private String taskName; |
|||
|
|||
/** |
|||
* 招标文件名称 |
|||
*/ |
|||
private String tenderDocumentName; |
|||
|
|||
/** |
|||
* 投标文件名称 |
|||
*/ |
|||
private String bidDocumentName; |
|||
|
|||
/** |
|||
* 进度状态 |
|||
*/ |
|||
private String progressStatus; |
|||
|
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
@TableLogic |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 版本号 |
|||
*/ |
|||
@Version |
|||
private Long version; |
|||
|
|||
/** |
|||
* 任务组ID |
|||
*/ |
|||
private Long groupId; |
|||
|
|||
/** |
|||
* 列队任务ID |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 审核结果 |
|||
*/ |
|||
private String resultType; |
|||
|
|||
/** |
|||
* 招标文件对象存储ID |
|||
*/ |
|||
private String tenderDocOssId; |
|||
|
|||
/** |
|||
* 投标文件对象存储ID |
|||
*/ |
|||
private String bidDocOssId; |
|||
|
|||
private String deleteFlag; |
|||
} |
@ -0,0 +1,48 @@ |
|||
package org.dromara.productManagement.domain.bo; |
|||
|
|||
import org.dromara.productManagement.domain.SjjDocumentTasks; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* 审计局标书任务业务对象 sjj_document_tasks |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = SjjDocumentTasks.class, reverseConvertGenerate = false) |
|||
public class SjjDocumentTasksBo extends BaseEntity { |
|||
private String id; |
|||
|
|||
/** |
|||
* 任务名称 |
|||
*/ |
|||
@NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String taskName; |
|||
|
|||
/** |
|||
* 招标文件名称 |
|||
*/ |
|||
private String tenderDocumentName; |
|||
|
|||
/** |
|||
* 投标文件名称 |
|||
*/ |
|||
private String bidDocumentName; |
|||
private String bidDocOssId; |
|||
private String tenderDocOssId; |
|||
|
|||
/** |
|||
* 进度状态 |
|||
*/ |
|||
private String progressStatus; |
|||
|
|||
private String deleteFlag; |
|||
} |
@ -0,0 +1,73 @@ |
|||
package org.dromara.productManagement.domain.vo; |
|||
|
|||
import org.dromara.productManagement.domain.SjjDocumentTasks; |
|||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 审计局标书任务视图对象 sjj_document_tasks |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = SjjDocumentTasks.class) |
|||
public class SjjDocumentTasksVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
private Long id; |
|||
/** |
|||
* 任务名称 |
|||
*/ |
|||
@ExcelProperty(value = "任务名称") |
|||
private String taskName; |
|||
|
|||
/** |
|||
* 招标文件名称 |
|||
*/ |
|||
@ExcelProperty(value = "招标文件名称") |
|||
private String tenderDocumentName; |
|||
|
|||
/** |
|||
* 投标文件名称 |
|||
*/ |
|||
@ExcelProperty(value = "投标文件名称") |
|||
private String bidDocumentName; |
|||
|
|||
/** |
|||
* 进度状态 |
|||
*/ |
|||
@ExcelProperty(value = "进度状态", converter = ExcelDictConvert.class) |
|||
@ExcelDictFormat(dictType = "document_task_status") |
|||
private String progressStatus; |
|||
|
|||
/** |
|||
* 审核结果 |
|||
*/ |
|||
@ExcelProperty(value = "审核结果", converter = ExcelDictConvert.class) |
|||
@ExcelDictFormat(dictType = "document_task_status") |
|||
private String resultType; |
|||
|
|||
private String deleteFlag; |
|||
/** |
|||
* 招标文件对象存储ID |
|||
*/ |
|||
private String tenderDocOssId; |
|||
|
|||
/** |
|||
* 投标文件对象存储ID |
|||
*/ |
|||
private String bidDocOssId; |
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.dromara.productManagement.mapper; |
|||
|
|||
import org.dromara.productManagement.domain.SjjDocumentTasks; |
|||
import org.dromara.productManagement.domain.vo.SjjDocumentTasksVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 审计局标书任务Mapper接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
public interface SjjDocumentTasksMapper extends BaseMapperPlus<SjjDocumentTasks, SjjDocumentTasksVo> { |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package org.dromara.productManagement.service; |
|||
|
|||
import org.dromara.productManagement.domain.vo.SjjDocumentTasksVo; |
|||
import org.dromara.productManagement.domain.bo.SjjDocumentTasksBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 审计局标书任务Service接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
public interface ISjjDocumentTasksService { |
|||
|
|||
/** |
|||
* 查询审计局标书任务 |
|||
* |
|||
* @param id 主键 |
|||
* @return 审计局标书任务 |
|||
*/ |
|||
SjjDocumentTasksVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询审计局标书任务列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 审计局标书任务分页列表 |
|||
*/ |
|||
TableDataInfo<SjjDocumentTasksVo> queryPageList(SjjDocumentTasksBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的审计局标书任务列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 审计局标书任务列表 |
|||
*/ |
|||
List<SjjDocumentTasksVo> queryList(SjjDocumentTasksBo bo); |
|||
|
|||
/** |
|||
* 新增审计局标书任务 |
|||
* |
|||
* @param bo 审计局标书任务 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(SjjDocumentTasksBo bo); |
|||
|
|||
/** |
|||
* 修改审计局标书任务 |
|||
* |
|||
* @param bo 审计局标书任务 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(SjjDocumentTasksBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除审计局标书任务信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
|
|||
Boolean ossRemoveById(List<String> ids, Boolean b); |
|||
} |
@ -0,0 +1,210 @@ |
|||
package org.dromara.productManagement.service.impl; |
|||
|
|||
import okhttp3.*; |
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.common.satoken.utils.LoginHelper; |
|||
import org.dromara.productManagement.domain.DocumentTasks; |
|||
import org.dromara.productManagement.mapper.DocumentTasksMapper; |
|||
import org.dromara.system.domain.vo.SysOssVo; |
|||
import org.dromara.system.service.ISysOssService; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.stereotype.Service; |
|||
import org.dromara.productManagement.domain.bo.SjjDocumentTasksBo; |
|||
import org.dromara.productManagement.domain.vo.SjjDocumentTasksVo; |
|||
import org.dromara.productManagement.domain.SjjDocumentTasks; |
|||
import org.dromara.productManagement.mapper.SjjDocumentTasksMapper; |
|||
import org.dromara.productManagement.service.ISjjDocumentTasksService; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 审计局标书任务Service业务层处理 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2025-04-13 |
|||
*/ |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class SjjDocumentTasksServiceImpl implements ISjjDocumentTasksService { |
|||
|
|||
private final SjjDocumentTasksMapper baseMapper; |
|||
private final DocumentTasksMapper documentTasksMapper; |
|||
protected final ISysOssService ossService; |
|||
@Value("${chat.filePath}") |
|||
protected String fileRootPath; |
|||
|
|||
@Value("${chat.chatUrl}") |
|||
protected String chatUrl; |
|||
@Value("${chat.tempfilePath}") |
|||
protected String tempfilePath; |
|||
/** |
|||
* 查询审计局标书任务 |
|||
* |
|||
* @param id 主键 |
|||
* @return 审计局标书任务 |
|||
*/ |
|||
@Override |
|||
public SjjDocumentTasksVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询审计局标书任务列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 审计局标书任务分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<SjjDocumentTasksVo> queryPageList(SjjDocumentTasksBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<SjjDocumentTasks> lqw = buildQueryWrapper(bo); |
|||
Page<SjjDocumentTasksVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的审计局标书任务列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 审计局标书任务列表 |
|||
*/ |
|||
@Override |
|||
public List<SjjDocumentTasksVo> queryList(SjjDocumentTasksBo bo) { |
|||
LambdaQueryWrapper<SjjDocumentTasks> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<SjjDocumentTasks> buildQueryWrapper(SjjDocumentTasksBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<SjjDocumentTasks> lqw = Wrappers.lambdaQuery(); |
|||
lqw.like(StringUtils.isNotBlank(bo.getTaskName()), SjjDocumentTasks::getTaskName, bo.getTaskName()); |
|||
lqw.like(StringUtils.isNotBlank(bo.getTenderDocumentName()), SjjDocumentTasks::getTenderDocumentName, bo.getTenderDocumentName()); |
|||
lqw.like(StringUtils.isNotBlank(bo.getBidDocumentName()), SjjDocumentTasks::getBidDocumentName, bo.getBidDocumentName()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getDeleteFlag()), SjjDocumentTasks::getDeleteFlag, bo.getDeleteFlag()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getProgressStatus()), SjjDocumentTasks::getProgressStatus, bo.getProgressStatus()); |
|||
lqw.orderByDesc(SjjDocumentTasks::getCreateTime); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增审计局标书任务 |
|||
* |
|||
* @param bo 审计局标书任务 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(SjjDocumentTasksBo bo) { |
|||
SjjDocumentTasks add = MapstructUtils.convert(bo, SjjDocumentTasks.class); |
|||
String bidDocOssId = add.getBidDocOssId(); |
|||
String tenderDocOssId = add.getTenderDocOssId(); |
|||
SysOssVo bidFileInfo = ossService.getById(Long.valueOf(bidDocOssId)); |
|||
String bidDocName = bidFileInfo.getOriginalName(); |
|||
String bidDocPath = fileRootPath + bidFileInfo.getFileName(); |
|||
SysOssVo tenderFileInfo = ossService.getById(Long.valueOf(tenderDocOssId)); |
|||
String tenderDocName = tenderFileInfo.getOriginalName(); |
|||
String tenderDocPath = fileRootPath + tenderFileInfo.getFileName(); |
|||
add.setBidDocumentName(bidDocName); |
|||
add.setTenderDocumentName(tenderDocName); |
|||
add.setProgressStatus("PENDING"); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
DocumentTasks documentTasks = new DocumentTasks(); |
|||
documentTasks.setId(Long.valueOf(add.getId())); |
|||
documentTasksMapper.insert(documentTasks); |
|||
//发起请求
|
|||
OkHttpClient client = new OkHttpClient.Builder().build(); |
|||
if (chatUrl == null) { |
|||
throw new IllegalArgumentException("无效的任务名称: " + add.getTaskName()); |
|||
} |
|||
|
|||
// Request request = new Request.Builder()
|
|||
// .url(url+"?userId="+ LoginHelper.getUserId()+"&taskId="+taskId+"&filename="+filename+"&taskName="+taskName+"&priority="+priority)
|
|||
// .build();
|
|||
HttpUrl.Builder urlBuilder = HttpUrl.parse(chatUrl +"/back/taskStart").newBuilder(); |
|||
urlBuilder.addQueryParameter("userId", String.valueOf(LoginHelper.getUserId())); |
|||
urlBuilder.addQueryParameter("taskId", String.valueOf(add.getId())); |
|||
urlBuilder.addQueryParameter("filename", bidDocPath+"\n"+tenderDocPath); |
|||
urlBuilder.addQueryParameter("taskName", add.getTaskName()); |
|||
urlBuilder.addQueryParameter("priority", "1"); |
|||
Request request = new Request.Builder() |
|||
.url(urlBuilder.build()) |
|||
.build(); |
|||
// 使用异步调用
|
|||
client.newCall(request).enqueue(new Callback() { |
|||
@Override |
|||
public void onFailure(Call call, IOException e) { |
|||
e.printStackTrace(); // 处理请求失败
|
|||
} |
|||
|
|||
@Override |
|||
public void onResponse(Call call, Response response) throws IOException { |
|||
// 忽略返回内容
|
|||
response.close(); // 确保响应被关闭
|
|||
} |
|||
}); |
|||
|
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改审计局标书任务 |
|||
* |
|||
* @param bo 审计局标书任务 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(SjjDocumentTasksBo bo) { |
|||
SjjDocumentTasks update = MapstructUtils.convert(bo, SjjDocumentTasks.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(SjjDocumentTasks entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除审计局标书任务信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
|
|||
@Override |
|||
public Boolean ossRemoveById(List<String> ids, Boolean b) { |
|||
List<SjjDocumentTasksVo> sjjDocumentTasksVos = baseMapper.selectVoByIds(ids); |
|||
for (SjjDocumentTasksVo sjjDocumentTasksVo : sjjDocumentTasksVos) { |
|||
ossService.deleteWithValidByIds(Collections.singletonList(Long.valueOf(sjjDocumentTasksVo.getTenderDocOssId())), true); |
|||
ossService.deleteWithValidByIds(Collections.singletonList(Long.valueOf(sjjDocumentTasksVo.getBidDocOssId())), true); |
|||
SjjDocumentTasks convert = MapstructUtils.convert(sjjDocumentTasksVo, SjjDocumentTasks.class); |
|||
convert.setDeleteFlag("Y"); |
|||
baseMapper.updateById(convert); |
|||
} |
|||
return true; |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="org.dromara.productManagement.mapper.SjjDocumentTasksMapper"> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue