src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -323,6 +323,12 @@
                mediafileMapper.deleteByExample(Example(Mediafile::class.java).apply {
                    createCriteria().andEqualTo("businessguid", id)
                })
                //更新巡查信息中的问题数量
                val inspection = inspectionMapper.selectByPrimaryKey(p.iguid)
                if (inspection.problemcount != null && inspection.problemcount!! > 0) {
                    inspection.problemcount = inspection.problemcount!! - 1
                    inspectionMapper.updateByPrimaryKey(inspection)
                }
                BaseResponse(true, "问题删除成功", data = i)
            }
        }
@@ -486,6 +492,12 @@
            }
        }
        //更新巡查信息的问题数
        if (inspection.problemcount != null) {
            inspection.problemcount = inspection.problemcount!! + 1
            inspectionMapper.updateByPrimaryKey(inspection)
        }
        return BaseResponse(true)
    }
@@ -544,4 +556,22 @@
        return BaseResponse(true)
    }
    override fun getBySubTask(stGuid: String): List<ProblemlistVo> {
        //根据子任务ID获取问题列表
        val problemListVo = findBySubtaskId(stGuid)
        //判断是否有问题列表
        if (!problemListVo.isEmpty()) {
            //根据每个问题,获取媒体文件
            problemListVo.forEach {
                val mediafileVo = mediafileService.findByBusinessGUID(it.guid!!)
                //判断是否有媒体资料
                if (!mediafileVo.isEmpty()) {
                    //赋值
                    it.mediafileList = mediafileVo
                }
            }
        }
        return problemListVo
    }
}