1. 调试监管统计文件下载接口;
2. 新增自动评分刷新接口;
3. 针对前端页面,调整部分接口
已修改23个文件
311 ■■■■ 文件已修改
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcel.kt 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/net/NCHttpService.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/EvaluationService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SearchService.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/TownService.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationServiceImpl.kt 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TownServiceImpl.kt 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/SubtaskMapper.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -18,7 +18,7 @@
    @Bean
    fun runner() = ApplicationRunner {
//        fetchController.run()
        fetchController.run()
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcel.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.business.report
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import java.io.File
import java.io.FileOutputStream
import java.io.OutputStream
import java.util.*
@@ -17,9 +18,15 @@
    // excel文档
    private var workbook = HSSFWorkbook()
    fun getReportName(): String = "${dataSource.areaName()}-${fileName}.xls"
    fun toFile(path: String) {
        val fileName = "${dataSource.areaName()}-${fileName}-${Date().time}.xls"
        val out = FileOutputStream(path + fileName)
        val fileName = getReportName()
        val file = File(path + fileName)
        if (!file.parentFile.exists()) {
            file.parentFile.mkdirs()
        }
        val out = FileOutputStream(file)
        toOutputStream(out)
    }
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt
@@ -96,6 +96,9 @@
        //7、当月问题数超3个且全部未整改或连续两月问题整改率低于50%的场景,列为重点监管,由技术服务部当月增加不少于一次现场复核;
        if (rowData.problems.size > 3 && cPros == 0) {
            result += strategyList[6] + "\n"
        } else if (cPer < .5) {
        }
        //8、连续两月台账提交比例低于50%的,由技术服务部当月增加一次现场或线上操作指导;
src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt
@@ -29,6 +29,7 @@
 * 工地自动评分
 */
@Component
class StAutoScore(
    stScoreItem_1: StScoreItem_1,
    stScoreItem_2: StScoreItem_2,
src/main/kotlin/cn/flightfeather/supervision/common/net/NCHttpService.kt
@@ -14,7 +14,7 @@
            val time: String
    )
    private val httpMethod = HttpMethod("101.230.224.89", 8085)
    private val httpMethod = HttpMethod("101.230.224.89", 9006)
    fun getFile(time: String): JsonArray? {
        val params = Params(time)
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt
@@ -59,6 +59,25 @@
                "99" -> TYPE99.text
                else -> ""
            }
            fun getByValue(value: String?) = when (value.toString()) {
                "1" -> TYPE1
                "2" -> TYPE2
                "3" -> TYPE3
                "4" -> TYPE4
                "5" -> TYPE5
                "6" -> TYPE6
                "7" -> TYPE7
                "8" -> TYPE8
                "9" -> TYPE9
                "10" -> TYPE10
                "11" -> TYPE11
                "12" -> TYPE12
                "13" -> TYPE13
                "14" -> TYPE14
                "99" -> TYPE99
                else -> TYPE99
            }
        }
    }
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.domain.util.MyMapper
import cn.flightfeather.supervision.lightshare.vo.SubTaskSearchResultVo2
import cn.flightfeather.supervision.lightshare.vo.SubTaskSummary
import cn.flightfeather.supervision.lightshare.vo.SubtaskSearchResultVo
import cn.flightfeather.supervision.lightshare.vo.SubtaskVo
import org.apache.ibatis.annotations.Mapper
@@ -19,5 +20,5 @@
    fun selectByTopTask2(topTaskId: String, sceneTypeId: Int? = null): List<Subtask>
    fun getSummary(topTaskId: String, sceneTypeId: Int?): List<SubTaskSummary>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/EvaluationService.kt
@@ -25,5 +25,7 @@
    fun autoScore2(subTaskId: String): List<String>
    fun autoScore3(tGuid: String, sceneTypeId: String): String
    fun findByInspectionId(inspectionId:String):List<Evaluation>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemlistService.kt
@@ -44,4 +44,6 @@
    fun newProblem(problem: String, files: Array<MultipartFile>): BaseResponse<String>
    fun changeProblem(problemId: String, files: Array<MultipartFile>): BaseResponse<String>
    fun getBySubTask(stGuid: String): List<ProblemlistVo>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SearchService.kt
@@ -11,7 +11,7 @@
    fun writeToFile(config: ExcelConfigVo, mode: Int)
    fun getExcel(config: ExcelConfigVo, response: HttpServletResponse): HttpServletResponse
    fun getExcel(config: ExcelConfigVo, response: HttpServletResponse): Boolean
    fun getSubTaskDetail(config: ExcelConfigVo): SubTaskTableVo
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/TownService.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.ds1.entity.District
import cn.flightfeather.supervision.domain.ds1.entity.Town
@@ -13,4 +14,6 @@
    fun update(town: Town): Int
    fun delete(id: String): Int
    fun getByDistrict(districtCode: String): List<Town>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationServiceImpl.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.business.AutoScore2
import cn.flightfeather.supervision.business.storage.StAutoScore
import cn.flightfeather.supervision.domain.ds1.entity.Domainitem
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
@@ -29,6 +30,9 @@
    lateinit var domainitemMapper: DomainitemMapper
    @Autowired
    lateinit var subtaskMapper: SubtaskMapper
    @Autowired
    lateinit var autoScore: StAutoScore
    private var isAutoScoreRunning = false
    //获取某顶层任务下某个场景的街道评分排名
    override fun getRankOfTown(tguid: String, scensetypeid: String?): List<AreaVo> {
@@ -244,6 +248,16 @@
        return resultList
    }
    override fun autoScore3(tGuid: String, sceneTypeId: String): String {
        if (isAutoScoreRunning) return "自动评分执行中,请等待完成"
        isAutoScoreRunning = true
        val t = Constant.ScenseType.getByValue(sceneTypeId)
        autoScore.sceneType = t
        autoScore.topTaskGrade(tGuid)
        isAutoScoreRunning = false
        return "自动评分完成"
    }
    override fun findByInspectionId(inspectionId: String): List<Evaluation> {
        return evaluationMapper.selectByExample(Example(Evaluation::class.java).apply {
            createCriteria().andEqualTo("iguid", inspectionId)
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -556,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
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -21,6 +21,9 @@
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.OutputStream
import java.net.URLEncoder
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
import java.util.*
import javax.servlet.http.HttpServletResponse
@@ -103,25 +106,49 @@
        t?.toFile("target/")
    }
    override fun getExcel(config: ExcelConfigVo, response: HttpServletResponse): HttpServletResponse {
    override fun getExcel(config: ExcelConfigVo, response: HttpServletResponse): Boolean {
        val dbMapper = DbMapper(
            scenseMapper,
            problemlistMapper,
            problemtypeMapper,
            subtaskMapper,
            monitorobjectversionMapper,
            sceneConstructionSiteMapper,
            sceneMixingPlantMapper,
            sceneStorageYardMapper,
            sceneWharfMapper,
            taskMapper,
            evaluationruleMapper, evaluationsubruleMapper, evaluationMapper, itemevaluationMapper,
            ledgerSubTypeMapper, ledgerRecordMapper, userinfoMapper, userMapMapper, townMapper
        )
        val dataSource = DataSource(config, dbMapper)
        val t = when (config.mode) {
            1 -> ReportOne(dataSource)
            2 -> ReportTwo(dataSource)
            3 -> ReportThree(dataSource)
        val fileName = "${dateUtil.DateToString(Date(), "yyyy-MM-dd hh:mm:ss")}.xls"
            else -> ReportOne(dataSource)
        }
        val fileName = t.getReportName()
        val fName = URLEncoder.encode(fileName, "UTF-8")
        response.apply {
            setHeader("Content-Disposition", "attachment;filename=$fileName")
            setHeader("fileName", fileName)
            setHeader("Content-Disposition", "attachment;filename=$fName")
            setHeader("fileName", fName)
            addHeader("Access-Control-Expose-Headers", "fileName")
            contentType = "application/vnd.ms-excel;charset=UTF-8"
            setHeader("Pragma", "no-cache")
            setHeader("Cache-Control", "no-cache")
            setDateHeader("Expires", 0)
        }
//        val heads = getTableTitles(config.sceneType, config.districtCode)
//        val contents = getTableContents(config, heads.size)
        val r = getTable(1, config)
        val out = response.outputStream
        ExcelUtil.write2(out, r.first, r.second)
        val p = Constant.DEFAULT_FILE_PATH + "/files/autoscore/"
        val file = File(p + fileName)
        if (config.forceUpdate || !file.exists()) {
            t.toFile(p)
        }
        response.outputStream.write(file.readBytes())
        return response
        return true
    }
    override fun getSubTaskDetail(config: ExcelConfigVo): SubTaskTableVo {
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -2,6 +2,9 @@
import cn.flightfeather.supervision.business.AutoScore
import cn.flightfeather.supervision.business.AutoScore2
import cn.flightfeather.supervision.business.storage.StAutoScore
import cn.flightfeather.supervision.business.storage.item.StScoreItem_1
import cn.flightfeather.supervision.business.storage.item.StScoreItem_2
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.mapper.*
import cn.flightfeather.supervision.common.utils.Constant
@@ -24,6 +27,10 @@
    val dateUtil = DateUtil()
    @Autowired
    lateinit var scoreItem1: StScoreItem_1
    @Autowired
    lateinit var scoreItem2: StScoreItem_2
    @Autowired
    lateinit var taskService: TaskService
    @Autowired
@@ -474,6 +481,8 @@
                    autoScore.subtask = subtask
                    autoScore.calculateScore()
                }
//                val autoScore = StAutoScore(scoreItem1, scoreItem2)
//                autoScore.sceneType = Constant.ScenseType.TYPE1
            }
        }
@@ -992,36 +1001,43 @@
    }
    override fun getSummary(topTaskId: String, sceneTypeId: Int?): List<SubTaskSummary> {
        val result = mutableListOf<SubTaskSummary>()
//        val result = mutableListOf<SubTaskSummary>()
        subtaskMapper.selectByTopTask2(topTaskId, sceneTypeId).forEach {
            val scene = scenseMapper.selectByPrimaryKey(it.scenseid)
            var p = 0
            var c = 0
            var pc = 0
            var cc = 0
            problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
                createCriteria().andEqualTo("stguid", it.stguid)
            }).forEach {pro ->
                p++
                if (pro.ischanged == true) c++
                if (pro.extension3 != Constant.PROBLEM_UNCHECKED) pc++
                if (pro.extension3 == Constant.CHANGE_CHECK_PASS || pro.extension3 == Constant.CHANGE_CHECK_FAIL) cc++
            }
            result.add(SubTaskSummary().apply {
                stGuid = it.stguid
                stName = it.name
                sceneId = it.scenseid
                sceneName = scene.name
                sceneType = scene.type
                stPlanTime = it.planstarttime
                proNum = p
                changeNum = c
                proCheckedNum = pc
                changeCheckedNum = cc
            })
        }
//        subtaskMapper.selectByTopTask2(topTaskId, sceneTypeId).forEach {
//            val scene = scenseMapper.selectByPrimaryKey(it.scenseid)
//            var p = 0
//            var c = 0
//            var pc = 0
//            var cc = 0
//            problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
//                createCriteria().andEqualTo("stguid", it.stguid)
//            }).forEach {pro ->
//                p++
//                if (pro.ischanged == true) c++
//                if (pro.extension3 != Constant.PROBLEM_UNCHECKED) pc++
//                if (pro.extension3 == Constant.CHANGE_CHECK_PASS || pro.extension3 == Constant.CHANGE_CHECK_FAIL) cc++
//            }
//            val ins = inspectionMapper.selectByExample(Example(Inspection::class.java).apply {
//                createCriteria().andEqualTo("stguid", it.stguid)
//            })
//            result.add(SubTaskSummary().apply {
//                stGuid = it.stguid
//                stName = it.name
//                if (ins.isNotEmpty()) insGuid = ins[0].guid
//                sceneId = it.scenseid
//                sceneName = scene.name
//                sceneType = scene.type
//                stPlanTime = it.planstarttime
//                proNum = p
//                changeNum = c
//                proCheckedNum = pc
//                changeCheckedNum = cc
//            })
//        }
        return result
//        return result
        return subtaskMapper.getSummary(topTaskId, sceneTypeId)
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TownServiceImpl.kt
@@ -1,12 +1,15 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.domain.ds1.entity.District
import cn.flightfeather.supervision.domain.ds1.entity.Town
import cn.flightfeather.supervision.domain.ds1.mapper.DistrictMapper
import cn.flightfeather.supervision.domain.ds1.mapper.TownMapper
import cn.flightfeather.supervision.lightshare.service.TownService
import org.springframework.stereotype.Service
import tk.mybatis.mapper.entity.Example
@Service
class TownServiceImpl(val townMapper: TownMapper) : TownService {
class TownServiceImpl(val townMapper: TownMapper, private val districtMapper: DistrictMapper) : TownService {
    override fun findOne(id: String): Town = townMapper.selectByPrimaryKey(id)
    override fun findAll(): MutableList<Town> = townMapper.selectAll()
@@ -16,4 +19,16 @@
    override fun update(town: Town): Int = townMapper.updateByPrimaryKey(town)
    override fun delete(id: String): Int = townMapper.deleteByPrimaryKey(id)
    override fun getByDistrict(districtCode: String): List<Town> {
        var result = mutableListOf<Town>()
        districtMapper.selectByExample(Example(District::class.java).apply {
            createCriteria().andEqualTo("districtcode", districtCode)
        })?.takeIf { it.isNotEmpty() }?.get(0)?.let {
            result = townMapper.selectByExample(Example(Town::class.java).apply {
                createCriteria().andEqualTo("districtid", it.districtid)
            })
        }
        return result
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ExcelConfigVo.kt
@@ -23,5 +23,8 @@
        val subTaskIdList: List<String>? = null,
        val problemTypeName: String? = null,
        val problemName: String? = null
        val problemName: String? = null,
        val mode: Int = 0,
        val forceUpdate: Boolean = false
)
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt
@@ -5,6 +5,7 @@
class SubTaskSummary {
    var stGuid: String? = null
    var stName: String? = null
    var insGuid: String? = null
    var sceneId: String? = null
    var sceneName: String? = null
    var sceneType: String? = null
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
@@ -37,6 +37,12 @@
    fun autoScore(@RequestParam(value = "districtCode") districtCode: String,
                  @RequestParam(value = "time") time: String) = evaluationService.autoScore(districtCode, time)
    @GetMapping("/autoScore3")
    fun autoScore3(
        @RequestParam(value = "topTaskId") tGuid: String,
        @RequestParam(value = "sceneTypeId") sceneTypeId: String
    ) = evaluationService.autoScore3(tGuid, sceneTypeId)
    @PostMapping("/autoScore")
    fun autoScore2(@RequestParam(value = "subTaskId") subTaskId: String) = evaluationService.autoScore2(subTaskId)
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
@@ -83,4 +83,10 @@
        @RequestParam("problemId") problemId: String,
        @RequestPart("images") files: Array<MultipartFile>
    ) = problemlistService.changeProblem(problemId, files)
    @ApiOperation(value = "通过任务查找问题", notes = "简化上传所需问题信息,将大部分操作交由后台完成")
    @GetMapping("/subtask")
    fun getBySubTask(
        @RequestParam("stGuid") stGuid: String,
    ) = problemlistService.getBySubTask(stGuid)
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt
@@ -23,4 +23,9 @@
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = townService.delete(id)
    @GetMapping("/district")
    fun getByDistrict(
        @RequestParam("districtCode") districtCode: String,
    ) = townService.getByDistrict(districtCode)
}
src/main/resources/application.yml
@@ -14,14 +14,14 @@
  #    password: cn.FLIGHTFEATHER
      #-远程测试服务器-
      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: remoteU1
      password: eSoF8DnzfGTlhAjE
#      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: remoteU1
#      password: eSoF8DnzfGTlhAjE
      #-发布服务器-
#      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: supervision
#      password: supervision_feiyu2021
      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: supervision
      password: supervision_feiyu2021
      #-环境督察测试服务器-
  #    url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
@@ -56,14 +56,14 @@
      #-TestEnd-
      #-发布服务器-
#      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: ledger
#      password: ledger_fxxchackxr
      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: ledger
      password: ledger_fxxchackxr
      #   开发远程服务器
      url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: remoteU1
      password: eSoF8DnzfGTlhAjE
#      url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: remoteU1
#      password: eSoF8DnzfGTlhAjE
      initialSize: 5
      minIdle: 5
src/main/resources/mapper/ds1/SubtaskMapper.xml
@@ -148,6 +148,20 @@
        <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR" />
        <result column="ST_Remark" property="remark" jdbcType="VARCHAR" />
    </resultMap>
    <resultMap id="SubTaskSummary" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSummary" >
        <result column="ST_GUID" property="stGuid" jdbcType="VARCHAR" />
        <result column="ST_name" property="stName" jdbcType="VARCHAR" />
        <result column="ST_PlanStartTime" property="stPlanTime" jdbcType="TIMESTAMP" />
        <result column="S_GUID" property="sceneId" jdbcType="VARCHAR" />
        <result column="S_Name" property="sceneName" jdbcType="VARCHAR" />
        <result column="S_Type" property="sceneType" jdbcType="VARCHAR" />
        <result column="I_GUID" property="insGuid" jdbcType="VARCHAR" />
        <result column="proNum" property="proNum" jdbcType="INTEGER" />
        <result column="changeNum" property="changeNum" jdbcType="INTEGER" />
        <result column="proCheckedNum" property="proCheckedNum" jdbcType="INTEGER" />
        <result column="changeCheckedNum" property="changeCheckedNum" jdbcType="INTEGER" />
    </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
@@ -259,4 +273,34 @@
            and b.S_TypeID = #{param2}
        </if>
    </select>
    <select id="getSummary" resultMap="SubTaskSummary">
        SELECT
        a.ST_GUID,
        a.ST_name,
        a.ST_PlanStartTime,
        b.S_GUID,
        b.S_Name,
        b.S_Type,
        c.I_GUID,
        SUM(d.PL_GUID is NOT null) AS proNum,
        SUM(d.PL_IsChanged = TRUE) AS changeNum,
        SUM(d.PL_Extension3 != 'unCheck') AS proCheckedNum,
        SUM(
        d.PL_Extension3 = 'change_pass' || d.PL_Extension3 = 'change_fail'
        ) AS changeCheckedNum
        FROM
        tm_t_subtask AS a
        LEFT JOIN sm_t_scense AS b ON a.ST_ScenseID = b.S_GUID
        LEFT JOIN im_t_inspection AS c ON a.ST_GUID = c.ST_GUID
        LEFT JOIN im_t_problemlist AS d ON a.ST_GUID = d.ST_GUID
        WHERE
        a.T_GUID = #{param1}
        <if test="param2 != null">
            and b.S_TypeID = #{param2}
        </if>
        GROUP BY
        a.ST_GUID
    </select>
</mapper>