| | |
| | | |
| | | 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) |
| | | |
| | | } |
| | | } |