| | |
| | | package cn.flightfeather.supervision.lightshare.service.impl |
| | | |
| | | import cn.flightfeather.supervision.common.exception.BizException |
| | | import cn.flightfeather.supervision.domain.ds1.entity.NightConstruction |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.NightConstructionMapper |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper |
| | |
| | | .andEqualTo("ncDistrictCode", districtCode) |
| | | orderBy("ncRead").orderBy("ncId").desc() |
| | | }) |
| | | return BaseResponse(true, head = DataHead(p.pageNum, p.pages), data = result) |
| | | return BaseResponse(true, head = DataHead(p.pageNum, p.pages, p.total), data = result) |
| | | } |
| | | |
| | | override fun getNightWorkFile(userId: String, isRead: Boolean?, page: Int, perPage: Int): BaseResponse<List<NightConstruction?>> { |
| | |
| | | } |
| | | } |
| | | |
| | | override fun updateRecord(recordId: Int, userId: String?, sceneId: String?): NightConstruction { |
| | | val record = nightConstructionMapper.selectByPrimaryKey(recordId) ?: throw BizException("夜间许可证记录不存在") |
| | | record.ncUserId = userId |
| | | record.ncSceneId = sceneId |
| | | nightConstructionMapper.updateByPrimaryKey(record) |
| | | return record |
| | | } |
| | | |
| | | override fun getSummary(cityCode: String?, districtCode: String): BaseResponse<NightWorkSummary> { |
| | | val total = nightConstructionMapper.selectCountByExample(Example(NightConstruction::class.java).apply { |
| | | createCriteria().andEqualTo("ncCityCode", cityCode ?: "3100") |