案件日志

This commit is contained in:
18792927508
2023-10-11 11:31:35 +08:00
parent 90578ca29e
commit e09da313e0
14 changed files with 173 additions and 202 deletions
@@ -1,14 +1,11 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.CaseLog;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -1,34 +0,0 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.*;
/**
* 案件操作日志记录注解
*
* @author wangqiong
*
*/
@Target({ ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CaseLog
{
/**
* 案件申请人id
*/
public long caseAppliId() default 0L;
/**
* 案件节点
*/
public String caseNode() default "";
/**
* 备注
*/
public String notes() default "";
}
@@ -1,87 +0,0 @@
package com.ruoyi.framework.aspectj;
import com.ruoyi.common.annotation.CaseLog;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 案件操作日志记录处理
*
* @author wangqiong
*/
@Aspect
@Component
public class CaseLogAspect {
@Autowired
private CaseLogRecordMapper logRecordMapper;
private static final Logger log = LoggerFactory.getLogger(CaseLogAspect.class);
/**
* 处理请求前执行
*/
@Before(value = "@annotation(controllerLog)")
public void boBefore(JoinPoint joinPoint, CaseLog controllerLog) {
}
/**
* 处理完请求后执行
*
* @param joinPoint 切点
*/
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
public void doAfterReturning(JoinPoint joinPoint, CaseLog controllerLog, Object jsonResult) {
handleLog(joinPoint, controllerLog, null, jsonResult);
}
protected void handleLog(final JoinPoint joinPoint, CaseLog controllerLog, final Exception e, Object jsonResult) {
try {
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
String nickName = loginUser.getUser().getNickName();
// *========数据库日志=========*//
CaseLogRecord operLog = new CaseLogRecord();
operLog.setCreateBy(nickName);
operLog.setUpdateBy(nickName);
// 处理设置注解上的参数
getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
// 保存数据库
logRecordMapper.insertCaseLogRecord(operLog);
} catch (Exception exp) {
// 记录本地异常日志
log.error("异常信息:{}", exp.getMessage());
exp.printStackTrace();
}
}
/**
* 获取注解中对方法的描述信息 用于Controller层注解
*
* @param log 日志
* @param operLog 操作日志
* @throws Exception
*/
public void getControllerMethodDescription(JoinPoint joinPoint, CaseLog log, CaseLogRecord operLog, Object jsonResult) throws Exception {
// 设置案件id
operLog.setCaseAppliId(log.caseAppliId());
// 设置案件节点
operLog.setNotes(log.caseNode());
// 设置备注
operLog.setNotes(log.notes());
}
}
@@ -334,6 +334,10 @@ public class CaseApplication extends BaseEntity {
/** 姓名 */
@Excel(name = "申请人主体信息-申请人(机构)",width = 26)
private String name;
/**
* 申请人主体信息-申请人(机构)id
*/
private String nameId;
/** 身份证号 */
@Excel(name = "申请人主体信息-代码",width = 26)
private String identityNum;
@@ -415,6 +419,14 @@ public class CaseApplication extends BaseEntity {
this.name = name;
}
public String getNameId() {
return nameId;
}
public void setNameId(String nameId) {
this.nameId = nameId;
}
public String getIdentityNum() {
return identityNum;
}
@@ -32,7 +32,7 @@ public class CaseLogRecord extends BaseEntity {
/**
* 用户昵称
*/
private String nickName;
private String createNickName;
public String getCaseNum() {
@@ -59,7 +59,7 @@ public class CaseLogRecord extends BaseEntity {
this.caseAppliId = caseAppliId;
}
public int getCaseNode() {
public Integer getCaseNode() {
return caseNode;
}
@@ -95,11 +95,11 @@ public class CaseLogRecord extends BaseEntity {
this.content = content;
}
public String getNickName() {
return nickName;
public String getCreateNickName() {
return createNickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
public void setCreateNickName(String nickName) {
this.createNickName = nickName;
}
}
@@ -2,9 +2,9 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.deepoove.poi.config.Configure;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.EmailOutUtil;
import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.wisdomarbitrate.domain.*;
@@ -16,7 +16,6 @@ import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xwpf.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.MailSendException;
import org.springframework.mail.javamail.JavaMailSender;
@@ -32,7 +31,6 @@ import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@@ -310,6 +308,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,"");
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
}
@@ -318,6 +319,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,"");
return AjaxResult.success("归档成功,案件状态已改为已归档");
}
@@ -349,6 +353,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,"");
return AjaxResult.success("仲裁文书送达成功");
}
@@ -357,6 +364,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,"");
return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
}
@@ -3,11 +3,12 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.CaseLog;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.common.utils.StringUtils;
@@ -115,6 +116,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_APPLICATION,"");
return rows;
}
@@ -206,6 +209,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//提交立案申请
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CHECK,"");
return rows;
}
@@ -429,7 +434,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL,"");
return rows;
}
@@ -440,6 +446,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION,"");
return rows;
}
@@ -453,9 +461,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
if(agreeOrNotCheck.intValue()==1){//同意审核
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.VERPRIF_ARBITRATION,"");
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
@@ -606,6 +620,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
SmsUtils.sendSms(request);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
return rows;
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
@@ -44,18 +45,30 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
//修改案件状态为待开庭审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
}else {
caseApplication1.setArbitratMethod(2);
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
}
}else {
if (arbitratMethod == 2){
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
}else {
//修改案件状态为待开庭审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
}
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
@@ -87,6 +100,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
}
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
return AjaxResult.success("审核成功");
}
return AjaxResult.error();
@@ -118,6 +134,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
return AjaxResult.success("提交成功");
}
}else {
@@ -136,6 +155,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
return AjaxResult.success("提交成功");
}
}
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
@@ -130,6 +131,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
return AjaxResult.success("证据确认成功");
}
return AjaxResult.error("暂无需要确认的证据");
@@ -165,15 +169,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseStatus);
String createBy = caseApplication1.getCreateBy();
if (createBy != null) {
caseLogRecord.setCreateBy(createBy);
}
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
return AjaxResult.success("提交成功");
}
}
@@ -1,6 +1,8 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
@@ -22,10 +24,12 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
if(CollectionUtil.isNotEmpty(records)){
records.forEach(record->{
StringBuilder contentBuilder = new StringBuilder();
if(StrUtil.isNotEmpty(record.getNickName())) {
contentBuilder.append(record.getNickName());
String caseNodeTime="";
if(record.getCaseNodeTime()!=null){
caseNodeTime= DateUtil.format(record.getCaseNodeTime(), DatePattern.NORM_DATETIME_FORMATTER);
}
contentBuilder.append("于").append(record.getCaseNodeTime());
contentBuilder.append(record.getCreateNickName()).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
switch(record.getCaseNode()){
case 0:
contentBuilder.append("创建立案申请");
@@ -34,53 +38,61 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
contentBuilder.append("提交立案申请");
break;
case 2:
contentBuilder.append("同意立案申请");
contentBuilder.append("提交立案审查");
break;
case 3:
contentBuilder.append("缴费成功");
contentBuilder.append("支付成功");
break;
case 4:
contentBuilder.append("已确认缴费");
contentBuilder.append("缴费确认");
break;
case 5:
contentBuilder.append("进行案件质证");
contentBuilder.append("案件质证");
break;
case 6:
contentBuilder.append("同意组庭审核");
contentBuilder.append("组庭审核");
break;
case 7:
contentBuilder.append("组庭确认成功");
contentBuilder.append("组庭确认");
break;
case 8:
contentBuilder.append("同意待开庭审理");
contentBuilder.append("待开庭审理");
break;
case 9:
contentBuilder.append("同意书面审理");
contentBuilder.append("待书面审理");
break;
case 10:
contentBuilder.append("已完成书面审理");
contentBuilder.append("书面审理");
break;
case 11:
contentBuilder.append("已生成仲裁文书");
contentBuilder.append("审核裁决书,拒绝");
break;
case 12:
contentBuilder.append("已核查仲裁文书");
contentBuilder.append("核验裁决书");
break;
case 13:
contentBuilder.append("已同意仲裁文书");
contentBuilder.append("审核裁决书,同意");
break;
case 14:
contentBuilder.append("已完成仲裁文书签名");
contentBuilder.append("签名成功");
break;
case 15:
contentBuilder.append("已完成仲裁文书用印");
contentBuilder.append("用印成功");
break;
case 16:
contentBuilder.append("已送达仲裁文书");
contentBuilder.append("送达仲裁文书");
break;
case 17:
contentBuilder.append("已完成案件归档");
contentBuilder.append("案件归档");
break;
case 26:
contentBuilder.append("已完成证据确认");
contentBuilder.append("证据确认成功");
break;
default:break;
}
record.setContent(contentBuilder.toString());
});
}
return records;
@@ -4,6 +4,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.ElegentPay;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.dto.PayRequest;
import com.ruoyi.dto.PayResponse;
@@ -19,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@@ -127,6 +127,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
SmsUtils.sendSms(request);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CROSSEXAMI,"");
return AjaxResult.success();
}
}
@@ -0,0 +1,42 @@
package com.ruoyi.wisdomarbitrate.utils;
import cn.hutool.extra.spring.SpringUtil;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 案件记录日志文件
*
* @author wangqiong
*/
public class CaseLogUtils
{
private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
/**
* 新增案件日志
* @param caseAppliId 案件id,不能为空
* @param caseNode 案件节点,不能为空
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ){
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
String nickName = loginUser.getUser().getNickName();
CaseLogRecord operLog = new CaseLogRecord();
operLog.setCreateBy(loginUser.getUsername());
operLog.setCreateNickName(nickName);
operLog.setUpdateBy(loginUser.getUsername());
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode);
operLog.setNotes(notes);
caseLogRecordMapper.insertCaseLogRecord(operLog);
}
}
@@ -67,7 +67,7 @@
AND c.case_num = #{caseNum}
</if>
<if test="name != null and name != ''">
AND d.dept_name like CONCAT( '%',#{name},'%') AND ca.identity_type=1 and ca.name=d.dept_id
AND ca.NAME=#{nameId} AND ca.identity_type=1 and ca.name=d.dept_id
</if>
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
@@ -10,50 +10,30 @@
<result property="caseNodeTime" column="case_node_time" />
<result property="notes" column="notes" />
<result property="caseNum" column="case_num" />
<result property="nick_name" column="nickName" />
<result property="nick_name" column="nickName" />
<result property="createBy" column=" create_by" />
<result property="createNickName" column="create_nick_name" />
</resultMap>
<insert id="insertCaseLogRecord">
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},sysdate()
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
)
</insert>
<select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes ,cl.id ,cl.case_appli_id caseAppliId,
cl.create_by createBy,cl.create_nick_name createNickName
from case_log_record cl
<select id="selectCaseLogRecordList" parameterType="CaseLogRecord" resultMap="CaseLogRecordResult">
select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id,
u.nick_name
from case_log_record cl left join case_application c on cl.case_appli_id = c.id
join sys_user u on cl.create_by=u.user_id
<where>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="id != null and id != ''">
AND c.case_appli_id = #{caseAppliId}
<if test="caseAppliId != null and caseAppliId != ''">
AND cl.case_appli_id = #{caseAppliId}
</if>
</where>
order by create_time desc
</select>
</mapper>