fix(解读流程): 撤回问题
This commit is contained in:
+6
@@ -25,5 +25,11 @@ public interface ProcessStandardInterpretClauseMapper extends BaseMapper<Process
|
||||
*/
|
||||
List<ProcessStandardInterpretClause> queryList(@Param(Constants.WRAPPER)
|
||||
QueryWrapper<ProcessStandardInterpretClause> queryWrapper);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param id
|
||||
*/
|
||||
void physicalDeleteByMasterInterpretId(String id);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -25,5 +25,11 @@ public interface ProcessStandardInterpretClauseSublistMapper extends BaseMapper<
|
||||
*/
|
||||
List<ProcessStandardInterpretClauseSublist> queryList(@Param(Constants.WRAPPER)
|
||||
QueryWrapper<ProcessStandardInterpretClauseSublist> queryWrapper);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param standardInterpretClauseIdList
|
||||
*/
|
||||
void physicalDeleteBystandardInterpretClauseIdList(@Param("list") List<String> standardInterpretClauseIdList);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -31,5 +31,11 @@ public interface ProcessStandardInterpretMapper extends BaseMapper<ProcessStanda
|
||||
* @return
|
||||
*/
|
||||
IPage<HomeNewestStandardInterpret> homeNewestStandardInterpret(Page page);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param id
|
||||
*/
|
||||
void physicalDeleteById(String id);
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -19,5 +19,8 @@
|
||||
where psic.del_flag = 0) t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<delete id="physicalDeleteByMasterInterpretId">
|
||||
delete from process_standard_interpret_clause where standard_interpret_id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
||||
+7
@@ -57,5 +57,12 @@
|
||||
on psics.standard_interpret_clause_id = psic2.interpret_clause_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<delete id="physicalDeleteBystandardInterpretClauseIdList">
|
||||
delete from process_standard_interpret_clause_sublist where standard_interpret_clause_id in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
||||
+4
@@ -50,5 +50,9 @@
|
||||
and i.create_time >= date_format(date_add(now(), interval -90 day), '%Y-%m-%d')
|
||||
order by i.create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="physicalDeleteById">
|
||||
delete from process_standard_interpret where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
||||
+6
@@ -18,5 +18,11 @@ public interface ProcessStandardInterpretClauseService extends IService<ProcessS
|
||||
* @param processStandardInterpretClause
|
||||
*/
|
||||
List<ProcessStandardInterpretClause> queryList(ProcessStandardInterpretClause processStandardInterpretClause);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param id
|
||||
*/
|
||||
void physicalDeleteByMasterInterpretId(String id);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -20,5 +20,11 @@ public interface ProcessStandardInterpretClauseSublistService extends IService<P
|
||||
*/
|
||||
List<ProcessStandardInterpretClauseSublist> queryList(
|
||||
ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param processStandardInterpretClauseSublistList
|
||||
*/
|
||||
void physicalDeleteBystandardInterpretClauseIdList(List<String> processStandardInterpretClauseSublistList);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -16,5 +16,11 @@ public interface ProcessStandardInterpretService extends IService<ProcessStandar
|
||||
* @return
|
||||
*/
|
||||
ProcessStandardInterpret queryOne(ProcessStandardInterpret processStandardInterpret);
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param id
|
||||
*/
|
||||
void physicalDeleteById(String id);
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -45,5 +45,10 @@ public class ProcessStandardInterpretClauseServiceImpl
|
||||
queryWrapper.orderByAsc("id");
|
||||
return processStandardInterpretClauseMapper.queryList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void physicalDeleteByMasterInterpretId(String id) {
|
||||
processStandardInterpretClauseMapper.physicalDeleteByMasterInterpretId(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -49,5 +49,10 @@ public class ProcessStandardInterpretClauseSublistServiceImpl
|
||||
queryWrapper.orderByAsc("psics.id");
|
||||
return processStandardInterpretClauseSublistMapper.queryList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void physicalDeleteBystandardInterpretClauseIdList(List<String> standardInterpretClauseIdList) {
|
||||
processStandardInterpretClauseSublistMapper.physicalDeleteBystandardInterpretClauseIdList(standardInterpretClauseIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -33,5 +33,10 @@ public class ProcessStandardInterpretServiceImpl
|
||||
queryWrapper.eq("psi.del_flag", CommonConstant.DEL_FLAG_0);
|
||||
return processStandardInterpretMapper.queryOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void physicalDeleteById(String id) {
|
||||
processStandardInterpretMapper.physicalDeleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+33
-2
@@ -9,7 +9,9 @@ import com.jero.modules.activiti.enums.FinishFlagEnum;
|
||||
import com.jero.modules.activiti.process.standardinterpret.common.StandardInterpretCommon;
|
||||
import com.jero.modules.activiti.process.standardinterpret.dto.StandardInterpretDTO;
|
||||
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpret;
|
||||
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpretClause;
|
||||
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpretClauseSublist;
|
||||
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretClauseService;
|
||||
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretClauseSublistService;
|
||||
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretService;
|
||||
import com.jero.modules.activiti.process.standardinterpret.service.StandardInterpretFlowService;
|
||||
@@ -19,10 +21,14 @@ import com.jero.modules.activiti.service.WorkCenterService;
|
||||
import com.jero.modules.activiti.util.SpringContextUtil;
|
||||
import com.jero.modules.activiti.vo.DelegateTaskParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName: EsInspectPlanFlowService
|
||||
@@ -42,9 +48,34 @@ public class StandardInterpretFlow implements WorkCenterService {
|
||||
@Override
|
||||
public void changeToDraft(ProcessAll processAll) {
|
||||
// 删除业务表数据
|
||||
ProcessAllService processAllService = SpringContextUtil.getBean(ProcessAllService.class);
|
||||
processAllService.physicalDeleteByProjectId("process_standard_interpret", processAll.getProjectId());
|
||||
// 删除 标准解读流程
|
||||
ProcessStandardInterpretService processStandardInterpretService =
|
||||
SpringContextUtil.getBean(ProcessStandardInterpretService.class);
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getProjectId, processAll.getProjectId()));
|
||||
if (!Objects.isNull(processStandardInterpret) && StringUtils.isNotBlank(processStandardInterpret.getId())){
|
||||
processStandardInterpretService.physicalDeleteById(processStandardInterpret.getId());
|
||||
|
||||
// 删除 标准解读流程_条款中间表
|
||||
ProcessStandardInterpretClauseService processStandardInterpretClauseService =
|
||||
SpringContextUtil.getBean(ProcessStandardInterpretClauseService.class);
|
||||
List<ProcessStandardInterpretClause> processStandardInterpretClauseList = processStandardInterpretClauseService.list(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpretClause>()
|
||||
.eq(ProcessStandardInterpretClause::getStandardInterpretId, processStandardInterpret.getId()));
|
||||
|
||||
// // 删除 标准解读流程_条款中间表_子表
|
||||
if (CollectionUtils.isNotEmpty(processStandardInterpretClauseList)){
|
||||
processStandardInterpretClauseService.physicalDeleteByMasterInterpretId(processStandardInterpret.getId());
|
||||
List<String> processStandardInterpretClauseSublistList =
|
||||
processStandardInterpretClauseList.stream().map(ProcessStandardInterpretClause::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(processStandardInterpretClauseSublistList)){
|
||||
ProcessStandardInterpretClauseSublistService processStandardInterpretClauseSublistService =
|
||||
SpringContextUtil.getBean(ProcessStandardInterpretClauseSublistService.class);
|
||||
processStandardInterpretClauseSublistService.physicalDeleteBystandardInterpretClauseIdList(processStandardInterpretClauseSublistList);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 更新子流程进行中的为未处理
|
||||
ProcessApprovalRecordService processApprovalRecordService =
|
||||
SpringContextUtil.getBean(ProcessApprovalRecordService.class);
|
||||
|
||||
Reference in New Issue
Block a user