|
@@ -3,6 +3,7 @@ package com.jeeplus.test.cw.reportCancellApply.service;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -246,7 +247,7 @@ public class ReportCancellApplyService extends ServiceImpl<ReportCancellApplyMap
|
|
|
}
|
|
|
}
|
|
|
//根据新建行id修改newLine的作废删除标记
|
|
|
- infoMapper.updateSignById(report.getReportNewLineId(),"1");
|
|
|
+// infoMapper.updateSignById(report.getReportNewLineId(),"1");
|
|
|
|
|
|
this.applyMapper.insert(report);
|
|
|
// //向存放报废报告号表中添加数据
|
|
@@ -280,12 +281,25 @@ public class ReportCancellApplyService extends ServiceImpl<ReportCancellApplyMap
|
|
|
*/
|
|
|
public IPage<ReportInfoDto> findList(Page<ReportInfoDto> page, ReportInfoDto reportInfoDto) throws Exception{
|
|
|
QueryWrapper<ReportInfoDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition (reportInfoDto,ReportInfoDto.class);
|
|
|
+ // 查询当前作废表中有效的报告文号 获取这些报告文号所属new_line表id
|
|
|
+ List<ReportCancellApply> reportCancellApplies = this.list(new QueryWrapper<>());
|
|
|
+ if (CollectionUtil.isNotEmpty(reportCancellApplies)) {
|
|
|
+ List<String> newLineIdList = reportCancellApplies.stream().filter(item -> {
|
|
|
+ if (StringUtils.isNotBlank(item.getReportNewLineId())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }).map(ReportCancellApply::getReportNewLineId).collect(Collectors.toList());
|
|
|
+ if (CollectionUtil.isNotEmpty(newLineIdList)) {
|
|
|
+ queryWrapper.notIn("b.id",newLineIdList);
|
|
|
+ }
|
|
|
+ }
|
|
|
//获取当前登录人信息
|
|
|
UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
queryWrapper.eq("a.create_by",userDTO.getId());
|
|
|
queryWrapper.eq("a.del_flag","0");
|
|
|
queryWrapper.eq("a.status","5");
|
|
|
- queryWrapper.eq("b.delete_sign","0");
|
|
|
+// queryWrapper.eq("b.delete_sign","0");
|
|
|
// queryWrapper.eq("cw_re.review_status","5");
|
|
|
queryWrapper.isNotNull("b.report_no");
|
|
|
queryWrapper.orderByDesc("a.create_date");
|