| | |
| | | package cn.flightfeather.supervision.lightshare.service.impl |
| | | |
| | | import cn.flightfeather.supervision.business.storage.JinAnScore |
| | | import cn.flightfeather.supervision.business.storage.StAutoScore |
| | | import cn.flightfeather.supervision.business.storage.item.* |
| | | import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation |
| | | import cn.flightfeather.supervision.domain.ds1.entity.* |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.* |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | |
| | | @Service |
| | | class SubtaskServiceImpl( |
| | | private val subtaskMapper: SubtaskMapper, |
| | | private val mpScoreItem_1: MpScoreItem_1, |
| | | private val mpScoreItem_2: MpScoreItem_2, |
| | | private val stScoreItem_1: StScoreItem_1, |
| | | private val whScoreItem_1: WhScoreItem_1, |
| | | private val whScoreItem_2: WhScoreItem_2, |
| | | private val jinAnScore: JinAnScore, |
| | | private val aopEvaluation: AopEvaluation, |
| | | ) : SubtaskService { |
| | | |
| | | val dateUtil = DateUtil() |
| | | |
| | | @Autowired |
| | | lateinit var scoreItem1: CsScoreItem_1 |
| | | @Autowired |
| | | lateinit var scoreItem2: CsScoreItem_2 |
| | | @Autowired |
| | | lateinit var taskService: TaskService |
| | | @Autowired |
| | |
| | | if (StringUtil.isNotEmpty(areaVo.towncode)) |
| | | criteria.andEqualTo("towncode", areaVo.towncode) |
| | | criteria.andBetween("planstarttime", areaVo.starttime, areaVo.endtime) |
| | | if (!Objects.equals(userGuid, Constant.UserType.ALLUSER.text)) |
| | | if (!Objects.equals(userGuid, Constant.UserType.ALL_USER.des)) |
| | | criteria.andLike("executorguids","%"+userGuid+"%") |
| | | var completecount = 0 |
| | | var subtasklist = subtaskMapper.selectByExample(example) |
| | |
| | | criteria.andEqualTo("stguid", subtask.stguid) |
| | | val result = evaluationMapper.selectByExample(example) |
| | | if (result.isEmpty()) { |
| | | // if (subtask.districtname == "徐汇区") { |
| | | // val autoScore = AutoScore2() |
| | | // autoScore.subtask = subtask |
| | | // autoScore.calculateScore() |
| | | // } else { |
| | | // val autoScore = AutoScore() |
| | | // autoScore.subtask = subtask |
| | | // autoScore.calculateScore() |
| | | // } |
| | | val s = scenseMapper.selectByPrimaryKey(subtask.scenseid) |
| | | val autoScore = StAutoScore(scoreItem1, scoreItem2, mpScoreItem_1, mpScoreItem_2, stScoreItem_1, |
| | | whScoreItem_1, whScoreItem_2, jinAnScore) |
| | | autoScore.sceneType = Constant.ScenseType.getByValue(s.typeid?.toString()) |
| | | autoScore.sceneGrade(subtask) |
| | | aopEvaluation.executeBySubTask(subtask) |
| | | } |
| | | } |
| | | |