已修改20个文件
已删除10个文件
已添加5个文件
| | |
| | | public class ClueConclusion { |
| | | @Id |
| | | @Column(name = "CC_Id") |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Integer ccId; |
| | | |
| | | @Column(name = "C_Id") |
| | |
| | | |
| | | @Column(name = "CC_Upload_Time") |
| | | private Date ccUploadTime; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯å
é¨çº¿ç´¢çç»è®º |
| | | */ |
| | | @Column(name = "CC_Internal") |
| | | private Boolean ccInternal; |
| | | |
| | | @Column(name = "CC_Details") |
| | | private String ccDetails; |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¯å¦æ¯å
é¨çº¿ç´¢çç»è®º |
| | | * |
| | | * @return CC_Internal - æ¯å¦æ¯å
é¨çº¿ç´¢çç»è®º |
| | | */ |
| | | public Boolean getCcInternal() { |
| | | return ccInternal; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦æ¯å
é¨çº¿ç´¢çç»è®º |
| | | * |
| | | * @param ccInternal æ¯å¦æ¯å
é¨çº¿ç´¢çç»è®º |
| | | */ |
| | | public void setCcInternal(Boolean ccInternal) { |
| | | this.ccInternal = ccInternal; |
| | | } |
| | | |
| | | /** |
| | | * @return CC_Details |
| | | */ |
| | | public String getCcDetails() { |
| | |
| | | public class ClueQuestion { |
| | | @Id |
| | | @Column(name = "CQ_Id") |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Integer cqId; |
| | | |
| | | @Column(name = "CQ_Uid") |
| | |
| | | |
| | | @Column(name = "CQ_Upload_Time") |
| | | private Date cqUploadTime; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯å
é¨çº¿ç´¢çé®é¢ |
| | | */ |
| | | @Column(name = "CQ_Internal") |
| | | private Boolean cqInternal; |
| | | |
| | | @Column(name = "CQ_File_Path") |
| | | private String cqFilePath; |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¯å¦æ¯å
é¨çº¿ç´¢çé®é¢ |
| | | * |
| | | * @return CQ_Internal - æ¯å¦æ¯å
é¨çº¿ç´¢çé®é¢ |
| | | */ |
| | | public Boolean getCqInternal() { |
| | | return cqInternal; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦æ¯å
é¨çº¿ç´¢çé®é¢ |
| | | * |
| | | * @param cqInternal æ¯å¦æ¯å
é¨çº¿ç´¢çé®é¢ |
| | | */ |
| | | public void setCqInternal(Boolean cqInternal) { |
| | | this.cqInternal = cqInternal; |
| | | } |
| | | |
| | | /** |
| | | * @return CQ_File_Path |
| | | */ |
| | | public String getCqFilePath() { |
| | |
| | | private String executorIds; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯å
é¨ä»»å¡ |
| | | */ |
| | | @Column(name = "internal_task") |
| | | private Boolean internalTask; |
| | | |
| | | /** |
| | | * @return guid |
| | | */ |
| | | public String getGuid() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @return clueId |
| | | * @return clue_id |
| | | */ |
| | | public Integer getClueId() { |
| | | return clueId; |
| | |
| | | public void setExecutorIds(String executorIds) { |
| | | this.executorIds = executorIds == null ? null : executorIds.trim(); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¯å¦æ¯å
é¨ä»»å¡ |
| | | * |
| | | * @return internal_task - æ¯å¦æ¯å
é¨ä»»å¡ |
| | | */ |
| | | public Boolean getInternalTask() { |
| | | return internalTask; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦æ¯å
é¨ä»»å¡ |
| | | * |
| | | * @param internalTask æ¯å¦æ¯å
é¨ä»»å¡ |
| | | */ |
| | | public void setInternalTask(Boolean internalTask) { |
| | | this.internalTask = internalTask; |
| | | } |
| | | } |
| | |
| | | * è·å线索ç»è®º |
| | | * @param clueId |
| | | */ |
| | | fun getClueConclusion(clueId: String): ClueConclusion? |
| | | fun getClueConclusion(clueId: String, internal: Boolean?): ClueConclusion? |
| | | |
| | | /** |
| | | * æ¨é线索ç»è®ºè³ç¬¬ä¸æ¹ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.flightfeather.grid.service |
| | | |
| | | import com.flightfeather.grid.constant.ConstantHttp |
| | | import com.flightfeather.grid.domain.ds1.entity.Clue |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.utils.net.HttpMethod |
| | | import com.flightfeather.grid.vo.BaseResponse |
| | | import com.flightfeather.grid.vo.DataHead |
| | | |
| | | interface ClueInternalService { |
| | | |
| | | fun getClueInternal( |
| | | sTime: String?, |
| | | eTime: String?, |
| | | pageNum: Int? = ConstantHttp.DEFAULT_PAGE_NUM, |
| | | pageSize: Int? = ConstantHttp.DEFAULT_PAGE_SIZE, |
| | | ): Pair<DataHead, List<ClueInternal?>> |
| | | |
| | | |
| | | fun searchClueInternal(clueInternal: ClueInternal): List<ClueInternal?> |
| | | |
| | | fun createClueInternal(clueInternal: ClueInternal): Int |
| | | |
| | | fun updateClueInternal(clueInternal: ClueInternal): Int |
| | | |
| | | fun deleteClueInternal(clueInternal: ClueInternal): Int |
| | | } |
| | |
| | | * è·å线索é®é¢ |
| | | * @param clueId |
| | | */ |
| | | fun getClueQuestion(clueId: String): List<ClueQuestion?> |
| | | fun getClueQuestion(clueId: String, internal: Boolean?): List<ClueQuestion?> |
| | | |
| | | /** |
| | | * æ¨é线索é®é¢åå¾çè³ç¬¬ä¸æ¹ |
| | |
| | | |
| | | import com.flightfeather.grid.constant.ConstantHttp |
| | | import com.flightfeather.grid.domain.ds1.entity.Clue |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.utils.net.HttpMethod |
| | | import com.flightfeather.grid.vo.BaseResponse |
| | | import com.flightfeather.grid.vo.DataHead |
| | |
| | | pageSize: Int? = ConstantHttp.DEFAULT_PAGE_SIZE, |
| | | ): Pair<DataHead, List<Clue?>> |
| | | |
| | | fun searchClue(clue: Clue): List<Clue?> |
| | | |
| | | /** |
| | | * ä»è¿ç¨æ°æ®æºæåä¸å线索 |
| | | * @param updateTime ä¸åæ¶é´ï¼æ¯æ¬¡æ¥è¯¢å¤§äºæ¤æ¶é´çæ°æ®ï¼ |
| | |
| | | package com.flightfeather.grid.service |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueTask |
| | | import com.flightfeather.grid.vo.ClueInternalTaskVo |
| | | |
| | | /** |
| | | * 线索任å¡ç¸å
³æå¡ |
| | |
| | | */ |
| | | interface ClueTaskService { |
| | | |
| | | fun createInternalClueTask(clueInternalTaskVo: ClueInternalTaskVo): Int |
| | | |
| | | fun createClueTask(clueTask: ClueTask): Int |
| | | |
| | | fun updateClueTask(clueTask: ClueTask): Int |
| | | |
| | | fun getClueTask(clueTask: ClueTask): List<ClueTask?> |
| | | |
| | | fun deleteClueTask(clueTask: ClueTask): Int |
| | | |
| | | } |
| | |
| | | clueConclusion.cId ?: throw BizException("线索id缺失") |
| | | clueConclusion.ccUploaded = false |
| | | clueConclusion.ccCreateTime = Date() |
| | | if (clueConclusion.ccInternal == null) clueConclusion.ccInternal = false |
| | | try { |
| | | val conclusion = clueConclusionMapper.selectOne(ClueConclusion().apply { cId = clueConclusion.cId }) |
| | | // æ´æ° |
| | |
| | | } |
| | | } |
| | | |
| | | override fun getClueConclusion(clueId: String): ClueConclusion? { |
| | | override fun getClueConclusion(clueId: String, internal: Boolean?): ClueConclusion? { |
| | | val res = clueConclusionMapper.selectByExample(Example(ClueConclusion::class.java).apply { |
| | | createCriteria().andEqualTo("cId", clueId) |
| | | .apply { |
| | | if (internal == true) { |
| | | andEqualTo("ccInternal", true) |
| | | } else { |
| | | and( |
| | | createCriteria().orIsNull("ccInternal") |
| | | .orEqualTo("ccInternal", false) |
| | | ) |
| | | } |
| | | } |
| | | }) |
| | | return if (res.isNotEmpty()) res[0] else null |
| | | } |
| | | |
| | | override fun pushConclusion(conclusionIdList: List<String>?): Boolean { |
| | | clueConclusionMapper.selectByExample(Example(ClueConclusion::class.java).apply { |
| | | createCriteria().andEqualTo("ccUploaded", false).apply { |
| | | conclusionIdList?.let { |
| | | andIn("ccId", it) |
| | | createCriteria() |
| | | .andEqualTo("ccUploaded", false) |
| | | .apply { |
| | | conclusionIdList?.let { |
| | | andIn("ccId", it) |
| | | } |
| | | // æé¤æå
é¨çº¿ç´¢ç»è®º |
| | | and( |
| | | createCriteria().orIsNull("ccInternal") |
| | | .orEqualTo("ccInternal", false) |
| | | ) |
| | | } |
| | | } |
| | | }).forEach { |
| | | it?.let { |
| | | clueHttpService.uploadConclusion(it) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.flightfeather.grid.service.impl |
| | | |
| | | import com.flightfeather.grid.config.exception.BizException |
| | | import com.flightfeather.grid.constant.ConstantHttp |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueTask |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueInternalMapper |
| | | import com.flightfeather.grid.service.ClueInternalService |
| | | import com.flightfeather.grid.service.ClueTaskService |
| | | import com.flightfeather.grid.vo.DataHead |
| | | import com.github.pagehelper.PageHelper |
| | | import org.springframework.stereotype.Service |
| | | import org.springframework.transaction.annotation.Transactional |
| | | |
| | | /** |
| | | * |
| | | * @date 2025/4/24 |
| | | * @author feiyu02 |
| | | */ |
| | | @Service |
| | | class ClueInternalServiceImpl( |
| | | private val clueInternalMapper: ClueInternalMapper, |
| | | private val clueTaskService: ClueTaskService, |
| | | ) : ClueInternalService { |
| | | |
| | | override fun getClueInternal( |
| | | sTime: String?, |
| | | eTime: String?, |
| | | pageNum: Int?, |
| | | pageSize: Int?, |
| | | ): Pair<DataHead, List<ClueInternal?>> { |
| | | val p = PageHelper.startPage<ClueInternal>(pageNum ?: ConstantHttp.DEFAULT_PAGE_NUM, |
| | | pageSize ?: ConstantHttp.DEFAULT_PAGE_SIZE) |
| | | val res = clueInternalMapper.getClue(sTime, eTime) |
| | | return DataHead(p.pageNum, p.pages, p.total) to res |
| | | } |
| | | |
| | | override fun searchClueInternal(clueInternal: ClueInternal): List<ClueInternal?> { |
| | | return clueInternalMapper.select(clueInternal) |
| | | } |
| | | |
| | | override fun createClueInternal(clueInternal: ClueInternal): Int { |
| | | return clueInternalMapper.insert(clueInternal) |
| | | } |
| | | |
| | | override fun updateClueInternal(clueInternal: ClueInternal): Int { |
| | | return clueInternalMapper.updateByPrimaryKey(clueInternal) |
| | | } |
| | | |
| | | @Transactional |
| | | override fun deleteClueInternal(clueInternal: ClueInternal): Int { |
| | | clueInternal.cId ?: throw BizException("å é¤å
é¨çº¿ç´¢å¤±è´¥ï¼ç¼ºå°çº¿ç´¢ä¸»é®cId") |
| | | |
| | | clueTaskService.deleteClueTask(ClueTask().apply { |
| | | clueId = clueInternal.cId |
| | | internalTask = true |
| | | }) |
| | | return clueInternalMapper.delete(clueInternal) |
| | | } |
| | | } |
| | |
| | | import com.google.gson.Gson |
| | | import org.springframework.beans.factory.annotation.Value |
| | | import org.springframework.stereotype.Service |
| | | import org.springframework.transaction.annotation.Transactional |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.io.IOException |
| | |
| | | |
| | | override fun uploadQuestionAndImage(question: String, files: Array<MultipartFile>?): Boolean { |
| | | val questionVo = Gson().fromJson(question, ClueQuestion::class.java) |
| | | if (questionVo.cqInternal == null) questionVo.cqInternal = false |
| | | newQuestionUid(questionVo) |
| | | val picPath = saveImageFile(questionVo, files) |
| | | questionVo.cqFilePath = picPath |
| | |
| | | if (question.cqId != null || question.cqUid != null) return |
| | | // å¦åæ ¹æ®ä¸ä¸ä¸ªé®é¢ç¼å·é¡ºå»¶çææ°ç¼å· |
| | | PageHelper.startPage<ClueQuestion>(1, 1) |
| | | val clues = clueQuestionMapper.selectByExample(Example(ClueQuestion::class.java).apply { |
| | | createCriteria().andEqualTo("cId", question.cId) |
| | | val clueQuestions = clueQuestionMapper.selectByExample(Example(ClueQuestion::class.java).apply { |
| | | createCriteria().andEqualTo("cId", question.cId).apply { |
| | | if (question.cqInternal == true) { |
| | | andEqualTo("cqInternal", true) |
| | | } else { |
| | | and( |
| | | createCriteria().orIsNull("cqInternal") |
| | | .orEqualTo("cqInternal", false) |
| | | ) |
| | | } |
| | | } |
| | | orderBy("cqId").desc() |
| | | }) |
| | | if (clues.isNotEmpty()) { |
| | | val clue = clues[0] |
| | | clue?.cqUid?.split("-")?.let { |
| | | if (clueQuestions.isNotEmpty()) { |
| | | val clueQuestion = clueQuestions[0] |
| | | clueQuestion?.cqUid?.split("-")?.let { |
| | | question.cqUid = "${it[0]}-${it[1].toInt() + 1}" |
| | | } |
| | | } else { |
| | |
| | | val suffix = file.originalFilename?.split(".")?.last() |
| | | val fileName = UUID.randomUUID().toString() + "." + suffix |
| | | val basePath = imgPath |
| | | val path = "clue/${question.cId}/${question.cqUid}/" |
| | | |
| | | // 对äºå
é¨çº¿ç´¢é®é¢ï¼å¾çè·¯å¾è¦ååºåºå |
| | | val path = if (question.cqInternal) { |
| | | "internal-clue/${question.cId}/${question.cqUid}/" |
| | | } else { |
| | | "clue/${question.cId}/${question.cqUid}/" |
| | | } |
| | | picPath += if (picPath.isEmpty()) { |
| | | "$path$fileName" |
| | | } else { |
| | |
| | | return picPath |
| | | } |
| | | |
| | | @Transactional |
| | | override fun deleteImageFile(question: ClueQuestion, deleteImg: String) { |
| | | try { |
| | | deleteImg.split(";").forEach { |
| | | val path = imgPath + it |
| | | FileUtil.deleteFile(path) |
| | | if (FileUtil.deleteFile(path)) { |
| | | question.cqFilePath = question.cqFilePath.replace(it, "") |
| | | question.cqFilePath = question.cqFilePath.replace(";;", ";") |
| | | } |
| | | } |
| | | } catch (e: IOException) { |
| | | throw BizException("å¾çå é¤å¤±è´¥ï¼æå¡å¨IOæä½é误") |
| | | } |
| | | question.cqFilePath.replace(deleteImg, "") |
| | | if (question.cqFilePath.isNotEmpty() && question.cqFilePath.last() == ';') question.cqFilePath.removeSuffix(";") |
| | | question.cqFilePath = question.cqFilePath.removePrefix(";") |
| | | question.cqFilePath = question.cqFilePath.removeSuffix(";") |
| | | } |
| | | |
| | | override fun getClueQuestion(clueId: String): List<ClueQuestion?> { |
| | | override fun getClueQuestion(clueId: String, internal: Boolean?): List<ClueQuestion?> { |
| | | val res = clueQuestionMapper.selectByExample(Example(ClueQuestion::class.java).apply { |
| | | createCriteria().andEqualTo("cId", clueId) |
| | | .apply { |
| | | if (internal == true) { |
| | | andEqualTo("cqInternal", true) |
| | | } else { |
| | | and( |
| | | createCriteria().orIsNull("cqInternal") |
| | | .orEqualTo("cqInternal", false) |
| | | ) |
| | | } |
| | | } |
| | | orderBy("cqId") |
| | | }) |
| | | return res |
| | |
| | | createCriteria().andEqualTo("cqUploaded", false).apply { |
| | | questionIdList?.let { |
| | | andIn("cqId", it) |
| | | // æé¤æå
é¨çº¿ç´¢é®é¢ |
| | | and( |
| | | createCriteria().orIsNull("cqInternal") |
| | | .orEqualTo("cqInternal", false) |
| | | ) |
| | | } |
| | | } |
| | | }).forEach { it?.let { clueHttpService.uploadQuestion(it) } } |
| | |
| | | } |
| | | |
| | | private fun deleteImageDirectory(question: ClueQuestion) { |
| | | val path = imgPath + "clue/${question.cId}/${question.cqUid}/" |
| | | // 对äºå
é¨çº¿ç´¢é®é¢ï¼å¾çè·¯å¾è¦ååºåºå |
| | | val p = if (question.cqInternal) { |
| | | "internal-clue/${question.cId}/${question.cqUid}/" |
| | | } else { |
| | | "clue/${question.cId}/${question.cqUid}/" |
| | | } |
| | | val path = imgPath + p |
| | | FileUtil.deleteDirectory(path) |
| | | } |
| | | } |
| | |
| | | import com.flightfeather.grid.constant.ConstantHttp |
| | | import com.flightfeather.grid.domain.ds1.entity.Clue |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueConclusion |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueQuestion |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueConclusionMapper |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueInternalMapper |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueMapper |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueQuestionMapper |
| | | import com.flightfeather.grid.external.ClueHttpService |
| | |
| | | return DataHead(p.pageNum, p.pages, p.total) to res |
| | | } |
| | | |
| | | override fun searchClue(clue: Clue): List<Clue?> { |
| | | return clueMapper.select(clue) |
| | | } |
| | | |
| | | override fun fetchRemoteClue(updateTime: String): List<Clue?> { |
| | | val res = clueHttpService.getClue(updateTime) |
| | | val result = res.map { |
| | |
| | | |
| | | import com.flightfeather.grid.config.exception.BizException |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueTask |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueInternalMapper |
| | | import com.flightfeather.grid.domain.ds1.mapper.ClueTaskMapper |
| | | import com.flightfeather.grid.service.ClueTaskService |
| | | import com.flightfeather.grid.vo.ClueInternalTaskVo |
| | | import org.springframework.stereotype.Service |
| | | import org.springframework.transaction.annotation.Transactional |
| | | import java.util.* |
| | | |
| | | /** |
| | |
| | | * @author feiyu02 |
| | | */ |
| | | @Service |
| | | class ClueTaskServiceImpl(private val clueTaskMapper: ClueTaskMapper) : ClueTaskService { |
| | | class ClueTaskServiceImpl( |
| | | private val clueTaskMapper: ClueTaskMapper, |
| | | private val clueInternalMapper: ClueInternalMapper, |
| | | ) : ClueTaskService { |
| | | |
| | | @Transactional |
| | | override fun createInternalClueTask(clueInternalTaskVo: ClueInternalTaskVo): Int { |
| | | clueInternalTaskVo.clueInternal?.cReleaseTime = Date() |
| | | clueInternalTaskVo.clueInternal?.cCreateTime = Date() |
| | | clueInternalTaskVo.clueInternal?.cUploaded = false |
| | | clueInternalMapper.insert(clueInternalTaskVo.clueInternal) |
| | | |
| | | // |
| | | clueInternalTaskVo.clueTask?.clueId = clueInternalTaskVo.clueInternal?.cId |
| | | if (clueInternalTaskVo.clueTask?.guid == null) { |
| | | clueInternalTaskVo.clueTask?.guid = UUID.randomUUID().toString() |
| | | } |
| | | if (clueInternalTaskVo.clueTask?.hasUav == null) { |
| | | clueInternalTaskVo.clueTask?.hasUav = false |
| | | } |
| | | clueInternalTaskVo.clueTask?.createTime = Date() |
| | | clueInternalTaskVo.clueTask?.updateTime = Date() |
| | | clueInternalTaskVo.clueTask?.internalTask = true |
| | | return clueTaskMapper.insert(clueInternalTaskVo.clueTask) |
| | | } |
| | | |
| | | override fun createClueTask(clueTask: ClueTask): Int { |
| | | if (clueTask.guid == null) { |
| | |
| | | } |
| | | clueTask.createTime = Date() |
| | | clueTask.updateTime = Date() |
| | | clueTask.internalTask = false |
| | | return clueTaskMapper.insert(clueTask) |
| | | } |
| | | |
| | |
| | | override fun getClueTask(clueTask: ClueTask): List<ClueTask?> { |
| | | return clueTaskMapper.select(clueTask) |
| | | } |
| | | |
| | | override fun deleteClueTask(clueTask: ClueTask): Int { |
| | | clueTask.guid ?: throw BizException("å é¤çº¿ç´¢ä»»å¡å¤±è´¥ï¼ç¼ºå°ä»»å¡ä¸»é®guid") |
| | | return clueTaskMapper.delete(clueTask) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.flightfeather.grid.vo |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueTask |
| | | |
| | | /** |
| | | * |
| | | * @date 2025/4/23 |
| | | * @author feiyu02 |
| | | */ |
| | | class ClueInternalTaskVo { |
| | | |
| | | var clueInternal: ClueInternal? = null |
| | | var clueTask: ClueTask? = null |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.flightfeather.grid.vo |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | |
| | | class ClueInternalVo : ClueInternal() { |
| | | var questionCount: Int = 0 |
| | | var conclusionCount: Int = 0 |
| | | var taskCount: Int = 0 |
| | | } |
| | |
| | | @GetMapping("/fetch") |
| | | fun getClueConclusion( |
| | | @ApiParam("线索id") @RequestParam clueId: String, |
| | | ) = resPack { clueConclusionService.getClueConclusion(clueId) } |
| | | @ApiParam("æ¯å¦ä¸ºçº¿ç´¢") @RequestParam(required = false) internal: Boolean?, |
| | | ) = resPack { clueConclusionService.getClueConclusion(clueId, internal) } |
| | | |
| | | @ApiOperation("æ¨é线索ç»è®ºè³ç¬¬ä¸æ¹") |
| | | @PostMapping("/push") |
| | |
| | | package com.flightfeather.grid.web |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.Clue |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.service.ClueService |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | |
| | | @ApiParam("åé¡µæ°æ®é") @RequestParam(required = false) pageSize: Int?, |
| | | ) = resPack { clueService.getClue(sTime, eTime, pageNum, pageSize) } |
| | | |
| | | @ApiOperation("æ¥è¯¢ä¸å线索") |
| | | @PostMapping("/search") |
| | | fun searchClue( |
| | | @ApiParam("æ¥è¯¢æ¡ä»¶") @RequestBody clue: Clue, |
| | | ) = resPack { clueService.searchClue(clue) } |
| | | |
| | | @ApiOperation("ä»è¿ç¨æ°æ®æºæåä¸å线索") |
| | | @GetMapping("/fetch/remote") |
| | | fun fetchRemoteClue( |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.flightfeather.grid.web |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueInternal |
| | | import com.flightfeather.grid.service.ClueInternalService |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.web.bind.annotation.* |
| | | |
| | | @Api(tags = ["ClueController"], description = "ä¸å线索APIæ¥å£") |
| | | @RestController |
| | | @RequestMapping("/clue/internal") |
| | | class ClueInternalController(val clueInternalService: ClueInternalService) { |
| | | |
| | | @ApiOperation("è·åå
é¨çº¿ç´¢") |
| | | @GetMapping("/fetch") |
| | | fun getClueInternal( |
| | | @ApiParam("èµ·å§æ¶é´") @RequestParam(required = false) sTime: String?, |
| | | @ApiParam("ç»ææ¶é´") @RequestParam(required = false) eTime: String?, |
| | | @ApiParam("页ç ") @RequestParam(required = false) pageNum: Int?, |
| | | @ApiParam("åé¡µæ°æ®é") @RequestParam(required = false) pageSize: Int?, |
| | | ) = resPack { clueInternalService.getClueInternal(sTime, eTime, pageNum, pageSize) } |
| | | |
| | | @ApiOperation("æ¥è¯¢å
é¨çº¿ç´¢") |
| | | @PostMapping("/search") |
| | | fun searchClueInternal( |
| | | @ApiParam("æ¥è¯¢æ¡ä»¶") @RequestBody clueInternal: ClueInternal, |
| | | ) = resPack { clueInternalService.searchClueInternal(clueInternal) } |
| | | |
| | | @ApiOperation("æ´æ°å
é¨çº¿ç´¢") |
| | | @PutMapping("/create") |
| | | fun createClueInternal( |
| | | @ApiParam("å
é¨çº¿ç´¢") @RequestBody clueInternal: ClueInternal, |
| | | ) = resPack { clueInternalService.createClueInternal(clueInternal) } |
| | | |
| | | @ApiOperation("æ´æ°å
é¨çº¿ç´¢") |
| | | @PostMapping("/update") |
| | | fun updateClueInternal( |
| | | @ApiParam("å
é¨çº¿ç´¢") @RequestBody clueInternal: ClueInternal, |
| | | ) = resPack { clueInternalService.updateClueInternal(clueInternal) } |
| | | |
| | | @ApiOperation("æ´æ°å
é¨çº¿ç´¢") |
| | | @DeleteMapping("/delete") |
| | | fun deleteClueInternal( |
| | | @ApiParam("å
é¨çº¿ç´¢") @RequestBody clueInternal: ClueInternal, |
| | | ) = resPack { clueInternalService.deleteClueInternal(clueInternal) } |
| | | } |
| | |
| | | @GetMapping("/fetch") |
| | | fun getClueQuestion( |
| | | @ApiParam("线索id") @RequestParam clueId: String, |
| | | ) = resPack { clueQuestionService.getClueQuestion(clueId) } |
| | | @ApiParam("æ¯å¦ä¸ºçº¿ç´¢") @RequestParam(required = false) internal: Boolean?, |
| | | ) = resPack { clueQuestionService.getClueQuestion(clueId, internal) } |
| | | |
| | | @ApiOperation("æ¨é线索é®é¢åå¾çè³ç¬¬ä¸æ¹") |
| | | @PostMapping("/push") |
| | |
| | | package com.flightfeather.grid.web |
| | | |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueConclusion |
| | | import com.flightfeather.grid.domain.ds1.entity.ClueTask |
| | | import com.flightfeather.grid.service.ClueTaskService |
| | | import com.flightfeather.grid.vo.ClueInternalTaskVo |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | |
| | | @RestController |
| | | @RequestMapping("/clue/task") |
| | | class ClueTaskController(val clueTaskService: ClueTaskService) { |
| | | |
| | | @ApiOperation("å建å
é¨çº¿ç´¢å·¡æ¥ä»»å¡") |
| | | @PutMapping("/create/internal") |
| | | fun createInternalClueTask( |
| | | @ApiParam("线索任å¡") @RequestBody clueInternalTaskVo: ClueInternalTaskVo, |
| | | ) = resPack { clueTaskService.createInternalClueTask(clueInternalTaskVo) } |
| | | |
| | | @ApiOperation("å建线索巡æ¥ä»»å¡") |
| | | @PutMapping("/create") |
| | |
| | | @ApiParam("线索任å¡") @RequestBody clueTask: ClueTask, |
| | | ) = resPack { clueTaskService.updateClueTask(clueTask) } |
| | | |
| | | @ApiOperation("è·å线索ç»è®º") |
| | | @ApiOperation("æ¥è¯¢çº¿ç´¢ä»»å¡") |
| | | @PostMapping("/fetch") |
| | | fun getClueTask( |
| | | @ApiParam("线索任å¡") @RequestBody clueTask: ClueTask, |
| | | ) = resPack { clueTaskService.getClueTask(clueTask) } |
| | | |
| | | @ApiOperation("å é¤çº¿ç´¢ä»»å¡") |
| | | @DeleteMapping("/delete") |
| | | fun deleteClueTask( |
| | | @ApiParam("线索任å¡") @RequestBody clueTask: ClueTask, |
| | | ) = resPack { clueTaskService.deleteClueTask(clueTask) } |
| | | } |
| | |
| | | <!-- <table tableName="g_t_clue" domainObjectName="Clue" enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> |
| | | <!-- <table tableName="g_t_clue_conclusion" domainObjectName="ClueConclusion" enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> |
| | | <!-- <table tableName="g_t_clue_question" domainObjectName="ClueQuestion" enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> |
| | | <table tableName="g_t_clue_task" domainObjectName="ClueTask" enableCountByExample="false" |
| | | enableUpdateByExample="false" enableDeleteByExample="false" |
| | | enableSelectByExample="false" selectByExampleQueryId="false"/> |
| | | <table tableName="g_t_clue_conclusion" domainObjectName="ClueConclusion" enableCountByExample="false" |
| | | enableUpdateByExample="false" enableDeleteByExample="false" |
| | | enableSelectByExample="false" selectByExampleQueryId="false"/> |
| | | <table tableName="g_t_clue_question" domainObjectName="ClueQuestion" enableCountByExample="false" |
| | | enableUpdateByExample="false" enableDeleteByExample="false" |
| | | enableSelectByExample="false" selectByExampleQueryId="false"/> |
| | | <!-- <table tableName="g_t_clue_task" domainObjectName="ClueTask" enableCountByExample="false"--> |
| | | <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> |
| | | <!-- <table tableName="g_t_clue_internal" domainObjectName="ClueInternal" enableCountByExample="true"--> |
| | | <!-- enableUpdateByExample="true" enableDeleteByExample="true"--> |
| | | <!-- enableSelectByExample="true" selectByExampleQueryId="true"/>--> |
| | | </context> |
| | | </generatorConfiguration> |
| | |
| | | <result column="CC_Create_Time" jdbcType="TIMESTAMP" property="ccCreateTime" /> |
| | | <result column="CC_Uploaded" jdbcType="BIT" property="ccUploaded" /> |
| | | <result column="CC_Upload_Time" jdbcType="TIMESTAMP" property="ccUploadTime" /> |
| | | <result column="CC_Internal" jdbcType="BIT" property="ccInternal" /> |
| | | </resultMap> |
| | | <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.flightfeather.grid.domain.ds1.entity.ClueConclusion"> |
| | | <!-- |
| | |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | CC_Id, C_Id, CC_Question_Type, CC_Conclusion, CC_Create_Time, CC_Uploaded, CC_Upload_Time |
| | | CC_Id, C_Id, CC_Question_Type, CC_Conclusion, CC_Create_Time, CC_Uploaded, CC_Upload_Time, |
| | | CC_Internal |
| | | </sql> |
| | | <sql id="Blob_Column_List"> |
| | | <!-- |
| | |
| | | </sql> |
| | | |
| | | <resultMap extends="BaseResultMap" id="ClueVoMap" type="com.flightfeather.grid.vo.ClueVo"> |
| | | <!-- <result column="questionCount" jdbcType="INTEGER" property="questionCount" />--> |
| | | <!-- <result column="conclusionCount" jdbcType="INTEGER" property="conclusionCount" />--> |
| | | <!-- &lt;result column="questionCount" jdbcType="INTEGER" property="questionCount" /&gt;--> |
| | | <!-- &lt;result column="conclusionCount" jdbcType="INTEGER" property="conclusionCount" /&gt;--> |
| | | </resultMap> |
| | | |
| | | <sql id="selectClueVo"> |
| | |
| | | </sql> |
| | | |
| | | <select id="getClue" resultMap="ClueVoMap"> |
| | | <include refid="selectClueVo"/> |
| | | <include refid="selectClueVo" /> |
| | | <where> |
| | | <if test="sTime != null"> |
| | | a.C_Release_Time >= #{sTime} |
| | |
| | | AND a.C_Release_Time <= #{eTime} |
| | | </if> |
| | | </where> |
| | | <include refid="groupClueId"/> |
| | | <include refid="groupClueId" /> |
| | | </select> |
| | | |
| | | <select id="getClueById" resultMap="ClueVoMap"> |
| | | <include refid="selectClueVo"/> |
| | | <include refid="selectClueVo" /> |
| | | <where> |
| | | a.C_Id = #{clueId} |
| | | </where> |
| | | <include refid="groupClueId"/> |
| | | <include refid="groupClueId" /> |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="CQ_Create_Time" jdbcType="TIMESTAMP" property="cqCreateTime" /> |
| | | <result column="CQ_Uploaded" jdbcType="BIT" property="cqUploaded" /> |
| | | <result column="CQ_Upload_Time" jdbcType="TIMESTAMP" property="cqUploadTime" /> |
| | | <result column="CQ_Internal" jdbcType="BIT" property="cqInternal" /> |
| | | </resultMap> |
| | | <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.flightfeather.grid.domain.ds1.entity.ClueQuestion"> |
| | | <!-- |
| | |
| | | WARNING - @mbg.generated |
| | | --> |
| | | CQ_Id, CQ_Uid, C_Id, CQ_Name, CQ_Description, CQ_Street, CQ_Address, CQ_Longitude, |
| | | CQ_Latitude, CQ_Create_Time, CQ_Uploaded, CQ_Upload_Time |
| | | CQ_Latitude, CQ_Create_Time, CQ_Uploaded, CQ_Upload_Time, CQ_Internal |
| | | </sql> |
| | | <sql id="Blob_Column_List"> |
| | | <!-- |
| | |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| | | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
| | | <result column="executor_ids" jdbcType="VARCHAR" property="executorIds" /> |
| | | <result column="internal_task" jdbcType="BIT" property="internalTask" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | guid, clue_id, task_time, province_code, province_name, city_code, city_name, district_code, |
| | | guid, clue_id, task_time, province_code, province_name, city_code, city_name, district_code, |
| | | district_name, town_code, town_name, response_level, travel_mode, has_uav, create_time, |
| | | update_time, executor_ids |
| | | update_time, executor_ids, internal_task |
| | | </sql> |
| | | </mapper> |