1. 修复新增案件知识图谱保存不进去问题

jinan_dev
xueqingkun 4 months ago committed by longbao
parent b759955f5b
commit a8c9e84cbd

@ -1,5 +1,6 @@
package com.supervision.police.domain; package com.supervision.police.domain;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -7,7 +8,7 @@ import lombok.Data;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.time.LocalDateTime;
/** /**
* @TableName task_case_record * @TableName task_case_record
@ -59,7 +60,8 @@ public class TaskCaseRecord implements Serializable {
/** /**
* *
*/ */
private Date createTime; @TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/** /**
* ID * ID
@ -69,7 +71,8 @@ public class TaskCaseRecord implements Serializable {
/** /**
* *
*/ */
private Date updateTime; @TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
@Serial @Serial
@TableField(exist = false) @TableField(exist = false)

@ -1,11 +1,13 @@
package com.supervision.police.domain; package com.supervision.police.domain;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
@ -69,7 +71,8 @@ public class TaskRecord implements Serializable {
/** /**
* *
*/ */
private Date createTime; @TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/** /**
* ID * ID
@ -79,7 +82,8 @@ public class TaskRecord implements Serializable {
/** /**
* *
*/ */
private Date updateTime; @TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
@TableField(exist = false) @TableField(exist = false)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

@ -41,7 +41,7 @@ public class MroServiceImpl implements MroService {
.like(StrUtil.isNotEmpty(caseProcessReqVO.getCaseName()), ModelCase::getCaseName, caseProcessReqVO.getCaseName()) .like(StrUtil.isNotEmpty(caseProcessReqVO.getCaseName()), ModelCase::getCaseName, caseProcessReqVO.getCaseName())
.in(CollUtil.isNotEmpty(caseProcessReqVO.getIdentifyResult()), ModelCase::getIdentifyResult, caseProcessReqVO.getIdentifyResult()) .in(CollUtil.isNotEmpty(caseProcessReqVO.getIdentifyResult()), ModelCase::getIdentifyResult, caseProcessReqVO.getIdentifyResult())
.in(CollUtil.isNotEmpty(caseProcessReqVO.getAnalysisStatus()), ModelCase::getCaseAnalysisStatus, caseProcessReqVO.getAnalysisStatus()) .in(CollUtil.isNotEmpty(caseProcessReqVO.getAnalysisStatus()), ModelCase::getCaseAnalysisStatus, caseProcessReqVO.getAnalysisStatus())
.orderBy(true, StrUtil.equalsIgnoreCase(caseProcessReqVO.getSort(), "asc"), ModelCase::getCaseAnalysisSuccessTime) .orderBy(true, StrUtil.equalsIgnoreCase(caseProcessReqVO.getSort(), "desc"), ModelCase::getCaseAnalysisSuccessTime)
.page(Page.of(page, size)); .page(Page.of(page, size));
final Set<String> processCaseIds = new HashSet<>(); final Set<String> processCaseIds = new HashSet<>();

@ -186,6 +186,7 @@ public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRec
@Override @Override
public IPage<TaskInfoDTO> queryTaskList(TaskInfoReqVO taskInfo, Integer page, Integer size) { public IPage<TaskInfoDTO> queryTaskList(TaskInfoReqVO taskInfo, Integer page, Integer size) {
taskInfo.checkSorted();
return super.getBaseMapper().queryTaskList(taskInfo, Page.of(page, size)); return super.getBaseMapper().queryTaskList(taskInfo, Page.of(page, size));
} }

@ -33,9 +33,6 @@ public class TripleInfoServiceImpl extends ServiceImpl<TripleInfoMapper, TripleI
.eq(TripleInfo::getEndNodeType, tripleInfo.getEndNodeType()) .eq(TripleInfo::getEndNodeType, tripleInfo.getEndNodeType())
.eq(TripleInfo::getRecordSplitId, tripleInfo.getRecordSplitId()).one(); .eq(TripleInfo::getRecordSplitId, tripleInfo.getRecordSplitId()).one();
if (null != one) { if (null != one) {
tripleInfo.setId(one.getId());
super.updateById(tripleInfo);
} else {
super.save(tripleInfo); super.save(tripleInfo);
} }
} }

@ -1,7 +1,10 @@
package com.supervision.police.vo; package com.supervision.police.vo;
import cn.hutool.core.util.StrUtil;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Data @Data
public class TaskInfoReqVO { public class TaskInfoReqVO {
@ -26,4 +29,18 @@ public class TaskInfoReqVO {
* *
*/ */
private String cancelTimeSorted = "desc"; private String cancelTimeSorted = "desc";
/**
* sql
*/
public void checkSorted(){
if (!StrUtil.equalsAnyIgnoreCase(createTimeSorted, "desc", "asc")){
log.warn("checkSorted:createTimeSorted参数校验失败输入值:{},已重置为默认值:{}", createTimeSorted,"desc");
this.cancelTimeSorted = "desc";
}
if (!StrUtil.equalsAnyIgnoreCase(cancelTimeSorted, "desc", "asc")){
log.warn("checkSorted:cancelTimeSorted参数校验失败输入值:{},已重置为默认值:{}", cancelTimeSorted,"desc");
this.cancelTimeSorted = "desc";
}
}
} }

@ -40,13 +40,13 @@
left join model_case c on t.case_id = c.id left join model_case c on t.case_id = c.id
left join case_person p on t.create_user_id = p.id left join case_person p on t.create_user_id = p.id
<where> <where>
<if test="caseName != null and caseName != ''"> <if test="taskInfo.caseName != null and taskInfo.caseName != ''">
and c.case_name like concat('%',#{taskInfo.caseName},'%') and c.case_name like concat('%',#{taskInfo.caseName},'%')
</if> </if>
<if test="taskStatus != null and taskStatus != ''"> <if test="taskInfo.taskStatus != null and taskInfo.taskStatus != ''">
and t.status = #{taskInfo.taskStatus} and t.status = #{taskInfo.taskStatus}
</if> </if>
</where> </where>
order by c.create_time #{taskInfo.createTimeSorted} ,t.create_time #{taskInfo.cancelTimeSorted} order by c.create_time ${taskInfo.createTimeSorted} ,t.create_time ${taskInfo.cancelTimeSorted}
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save