Bladeren bron

删除质检删除对应的检斤

zhangyuewww 3 jaren geleden
bovenliggende
commit
b6aa7fcd82

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/QualityInspectionManagementServiceImpl.java

@@ -76,6 +76,12 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
         //查询质检管理信息
         QualityInspectionManagement qualityInspectionManagement = this.selectById(id);
         if(qualityInspectionManagement != null){
+            //检斤信息
+            WeighingManagement weighingManagement = weighingManagementService.selectOne(new EntityWrapper<WeighingManagement>()
+                    .eq("relation_id", qualityInspectionManagement.getRelationId()));
+            if (weighingManagement!=null){
+                weighingManagementService.deleteById(weighingManagement.getId());
+            }
             //删除质检管理信息
             this.deleteById(qualityInspectionManagement.getId());
         }