1. 调试监管统计文件下载接口;
2. 新增自动评分刷新接口;
3. 针对前端页面,调整部分接口
| | |
| | | |
| | | @Bean |
| | | fun runner() = ApplicationRunner { |
| | | // fetchController.run() |
| | | fetchController.run() |
| | | } |
| | | } |
| | | |
| | |
| | | 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.* |
| | |
| | | // 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) |
| | | } |
| | | |
| | |
| | | |
| | | //7、当月问题数超3个且全部未整改或连续两月问题整改率低于50%的场景,列为重点监管,由技术服务部当月增加不少于一次现场复核; |
| | | if (rowData.problems.size > 3 && cPros == 0) { |
| | | result += strategyList[6] + "\n" |
| | | } else if (cPer < .5) { |
| | | |
| | | } |
| | | |
| | | //8、连续两月台账提交比例低于50%的,由技术服务部当月增加一次现场或线上操作指导; |
| | |
| | | * 工地自动评分 |
| | | */ |
| | | @Component |
| | | |
| | | class StAutoScore( |
| | | stScoreItem_1: StScoreItem_1, |
| | | stScoreItem_2: StScoreItem_2, |
| | |
| | | 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) |
| | |
| | | "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 |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | fun selectByTopTask2(topTaskId: String, sceneTypeId: Int? = null): List<Subtask> |
| | | |
| | | |
| | | fun getSummary(topTaskId: String, sceneTypeId: Int?): List<SubTaskSummary> |
| | | } |
| | |
| | | |
| | | fun autoScore2(subTaskId: String): List<String> |
| | | |
| | | fun autoScore3(tGuid: String, sceneTypeId: String): String |
| | | |
| | | fun findByInspectionId(inspectionId:String):List<Evaluation> |
| | | } |
| | |
| | | fun newProblem(problem: String, files: Array<MultipartFile>): BaseResponse<String> |
| | | |
| | | fun changeProblem(problemId: String, files: Array<MultipartFile>): BaseResponse<String> |
| | | |
| | | fun getBySubTask(stGuid: String): List<ProblemlistVo> |
| | | } |
| | |
| | | |
| | | 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 |
| | | |
| | |
| | | package cn.flightfeather.supervision.lightshare.service |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.District |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Town |
| | | |
| | | |
| | |
| | | fun update(town: Town): Int |
| | | |
| | | fun delete(id: String): Int |
| | | |
| | | fun getByDistrict(districtCode: String): List<Town> |
| | | } |
| | |
| | | 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 |
| | |
| | | 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> { |
| | |
| | | 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) |
| | |
| | | |
| | | 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 |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | 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 { |
| | |
| | | |
| | | 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 |
| | |
| | | |
| | | val dateUtil = DateUtil() |
| | | |
| | | @Autowired |
| | | lateinit var scoreItem1: StScoreItem_1 |
| | | @Autowired |
| | | lateinit var scoreItem2: StScoreItem_2 |
| | | @Autowired |
| | | lateinit var taskService: TaskService |
| | | @Autowired |
| | |
| | | autoScore.subtask = subtask |
| | | autoScore.calculateScore() |
| | | } |
| | | // val autoScore = StAutoScore(scoreItem1, scoreItem2) |
| | | // autoScore.sceneType = Constant.ScenseType.TYPE1 |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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) |
| | | |
| | | } |
| | | } |
| | |
| | | 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() |
| | |
| | | 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 |
| | | } |
| | | } |
| | |
| | | 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 |
| | | ) |
| | |
| | | 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 |
| | |
| | | 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) |
| | | |
| | |
| | | @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) |
| | | } |
| | |
| | | |
| | | @DeleteMapping("/{id}") |
| | | fun delete (@PathVariable id: String) = townService.delete(id) |
| | | |
| | | @GetMapping("/district") |
| | | fun getByDistrict( |
| | | @RequestParam("districtCode") districtCode: String, |
| | | ) = townService.getByDistrict(districtCode) |
| | | } |
| | |
| | | # 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 |
| | |
| | | #-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 |
| | |
| | | <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 |
| | |
| | | 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> |