生产报错问题-拆分sql

This commit is contained in:
大米 2024-08-05 08:24:44 +08:00
parent fb53f628d1
commit 37856ae888
3 changed files with 24 additions and 1 deletions

View File

@ -109,8 +109,13 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
*/
void insertEBomFormalChild(@Param("parentRowIds") List<Long> parentRowIds);
@Deprecated
void delEBomHistory(@Param("parentRowIds") List<Long> parentRowIds);
void delEBomHistory1(@Param("parentRowIds") List<Long> parentRowIds);
void delEBomHistory2(@Param("parentRowIds") List<Long> parentRowIds);
Page<BomNewEbomParentVO> getSapErrorWorksheet(Page<Object> objectPage,@Param("query")BomNewEbomParentQuery query, String userCode);
Integer getSapErrorNum(String userCode);

View File

@ -2821,10 +2821,15 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
}
if(CollUtil.isNotEmpty(delRowIds)){
//转移后删除
this.getBaseMapper().delEBomHistory(delRowIds);
this.delEBomHistory(delRowIds);
}
}
public void delEBomHistory(List<Long> parentRowIds){
this.getBaseMapper().delEBomHistory1(parentRowIds);
this.getBaseMapper().delEBomHistory2(parentRowIds);
}
@Transactional(rollbackFor = Exception.class)
public Boolean deleteBomV2(Long bomRowId) {
BomNewEbomParentEntity parent = getById(bomRowId);

View File

@ -660,6 +660,19 @@
#{parentRowId}
</foreach>
</insert>
<delete id="delEBomHistory1">
delete from t_bom_new_ebom_parent where row_id in
<foreach collection="parentRowIds" item="parentRowId" open="(" separator="," close=");">
#{parentRowId}
</foreach>
</delete>
<delete id="delEBomHistory2">
delete from t_bom_new_ebom_child where parent_row_id in
<foreach collection="parentRowIds" item="parentRowId" open="(" separator="," close=");">
#{parentRowId}
</foreach>
</delete>
<delete id="delEBomHistory">
delete from t_bom_new_ebom_parent where row_id in