| | |
| | | |
| | | //根据区县、场景类型、时间获取各个问题数量 |
| | | override fun getStatisticalResult(areaVo: AreaVo): List<StatisticsVo> { |
| | | val districtcode = areaVo.districtcode |
| | | val sceneType = areaVo.scensetypeid |
| | | val startTime = areaVo.starttime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) |
| | | val endTime = areaVo.endtime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) |
| | | return problemlistMapper.getStatisticalResult(districtcode, startTime, endTime, sceneType, areaVo.sceneId) |
| | | // val districtcode = areaVo.districtcode |
| | | // val sceneType = areaVo.scensetypeid |
| | | // val startTime = areaVo.starttime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) |
| | | // val endTime = areaVo.endtime?.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) |
| | | return problemlistMapper.getStatisticalResult(areaVo) |
| | | } |
| | | |
| | | override fun getChargeResult(areaVo: AreaVo): ChargeInfoVo { |
| | |
| | | userId: String, |
| | | userName: String, |
| | | ): BaseResponse<String> { |
| | | if (action !in 0..3) { |
| | | if (action !in 0..5) { |
| | | return BaseResponse(false, "非法的操作指令") |
| | | } |
| | | val p = problemlistMapper.selectByPrimaryKey(pId) ?: return BaseResponse(false, "问题不存在") |
| | |
| | | response.success = false |
| | | response.message = "问题提交还未审核,无法进行整改审核!" |
| | | } |
| | | 4.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题提交还未审核,无法进行撤回审核!" |
| | | } |
| | | 5.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题整改还未提交,无法进行撤回审核!" |
| | | } |
| | | } |
| | | } else if (extension3 == Constant.PROBLEM_CHECK_PASS || extension3 == Constant.PROBLEM_CHECK_FAIL) { |
| | | when (action) { |
| | |
| | | response.message = "问题还未整改,无法进行整改审核!操作无效" |
| | | } |
| | | } |
| | | 4.toByte() -> { |
| | | extension3 = Constant.PROBLEM_UNCHECKED |
| | | } |
| | | 5.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题整改还未审核,无法进行整改审核撤回操作!操作无效" |
| | | } |
| | | } |
| | | } else if (extension3 == Constant.CHANGE_UNCHECKED) { |
| | | event = "在${subtask?.scensename}审核了一个整改" |
| | |
| | | } |
| | | 2.toByte() -> extension3 = Constant.CHANGE_CHECK_PASS |
| | | 3.toByte() -> extension3 = Constant.CHANGE_CHECK_FAIL |
| | | 4.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题整改还未审核,无法进行撤回审核!" |
| | | } |
| | | 5.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题提交已审核,并且已被整改。操作无效" |
| | | } |
| | | } |
| | | } else if (extension3 == Constant.CHANGE_CHECK_PASS || extension3 == Constant.CHANGE_CHECK_FAIL) { |
| | | when (action) { |
| | |
| | | } |
| | | 2.toByte() -> extension3 = Constant.CHANGE_CHECK_PASS |
| | | 3.toByte() -> extension3 = Constant.CHANGE_CHECK_FAIL |
| | | 4.toByte() -> { |
| | | response.success = false |
| | | response.message = "问题提交已审核,并且已被整改,无法进行问题审核撤销操作。操作无效" |
| | | } |
| | | 5.toByte() -> { |
| | | extension3 = Constant.CHANGE_UNCHECKED |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | mediafileService.deleteList(deleteImg) |
| | | return "success" |
| | | } |
| | | |
| | | |
| | | override fun changeProblem(problemId: String, files: Array<MultipartFile>): BaseResponse<String> { |
| | | // 问题和问题图片合法性检查 |
| | |
| | | |
| | | override fun getSceneProSummary( |
| | | areaVo: AreaVo, |
| | | sortBy: String, |
| | | page: Int, |
| | | per_page: Int, |
| | | ): Pair<DataHead?, List<SceneProblemSummary>?> { |
| | | areaVo.scensetypeid ?: throw BizException("缺少场景类型参数") |
| | | val task = taskRep.findOneTask(areaVo) ?: throw BizException("未找到对应的巡查总任务") |
| | | // areaVo.scensetypeid ?: throw BizException("缺少场景类型参数") |
| | | // val task = taskRep.findOneTask(areaVo) ?: throw BizException("未找到对应的巡查总任务") |
| | | val p = PageHelper.startPage<SceneProblemSummary>(page, per_page) |
| | | val res = problemRep.selectSceneProSummary(task.tguid!!, areaVo.scensetypeid!!, areaVo.sort, sortBy) |
| | | val res = problemRep.selectSceneProSummary(areaVo) |
| | | return DataHead(p.pageNum, p.pages, p.total) to res |
| | | } |
| | | } |