Browse Source

feat: [系统日志] 试验的系统日志

master
memorylkf 2 months ago
parent
commit
c47894b616
7 changed files with 311 additions and 0 deletions
  1. +64
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SystemLogController.java
  2. +110
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/SystemLog.java
  3. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/SystemLogMapper.java
  4. +46
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISystemLogService.java
  5. +7
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java
  6. +64
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java
  7. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/SystemLogMapper.xml

+ 64
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SystemLogController.java View File

@ -0,0 +1,64 @@
package com.hxhq.business.controller;
import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.SystemLog;
import com.hxhq.business.service.ISystemLogService;
import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.common.core.web.page.TableDataInfo;
/**
* 系统日志Controller
*
* @author hxhq
* @date 2026-02-02
*/
@RestController
@RequestMapping("/business/systemLog")
public class SystemLogController extends BaseController
{
@Autowired
private ISystemLogService systemLogService;
/**
* 查询系统日志列表
*/
@GetMapping("/list")
public TableDataInfo list(SystemLog systemLog)
{
startPage();
List<SystemLog> list = systemLogService.queryList(systemLog);
return getDataTable(list);
}
/**
* 获取系统日志详细信息
*/
@GetMapping(value = "/info")
public AjaxResult getInfo(Long id)
{
return AjaxResult.success(systemLogService.getById(id));
}
/**
* 新增系统日志信息
*/
@PostMapping("/save")
public AjaxResult save(@RequestBody SystemLog systemLog)
{
return toAjax(systemLogService.saveOrUpdate(systemLog));
}
/**
* 删除系统日志信息
*/
@PostMapping("/delete")
public AjaxResult delete(@RequestBody Long[] ids)
{
return toAjax(systemLogService.removeByIds(Arrays.asList(ids)));
}
}

+ 110
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/SystemLog.java View File

@ -0,0 +1,110 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
/**
* 系统日志对象 t_system_log
*
* @author hxhq
* @date 2026-02-02
*/
@TableName("t_system_log")
public class SystemLog extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 操作类型 */
private String jcmc;
/** 操作类型-英文 */
private String jcmcEn;
/** 操作内容 */
private String jcnr;
/** 操作内容-英文 */
private String jcnrEn;
/** 操作人id */
private Long qmrId;
/** 操作人名称 */
private String qmrMc;
/** 操作人名称-英文 */
private String qmrMcEn;
public void setJcmc(String jcmc)
{
this.jcmc = jcmc;
}
public String getJcmc()
{
return jcmc;
}
public void setJcmcEn(String jcmcEn)
{
this.jcmcEn = jcmcEn;
}
public String getJcmcEn()
{
return jcmcEn;
}
public void setJcnr(String jcnr)
{
this.jcnr = jcnr;
}
public String getJcnr()
{
return jcnr;
}
public void setJcnrEn(String jcnrEn)
{
this.jcnrEn = jcnrEn;
}
public String getJcnrEn()
{
return jcnrEn;
}
public void setQmrId(Long qmrId)
{
this.qmrId = qmrId;
}
public Long getQmrId()
{
return qmrId;
}
public void setQmrMc(String qmrMc)
{
this.qmrMc = qmrMc;
}
public String getQmrMc()
{
return qmrMc;
}
public void setQmrMcEn(String qmrMcEn)
{
this.qmrMcEn = qmrMcEn;
}
public String getQmrMcEn()
{
return qmrMcEn;
}
}

+ 14
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/SystemLogMapper.java View File

@ -0,0 +1,14 @@
package com.hxhq.business.mapper;
import com.hxhq.business.domain.SystemLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 系统日志Mapper接口
*
* @author hxhq
* @date 2026-02-02
*/
public interface SystemLogMapper extends BaseMapper<SystemLog>
{
}

+ 46
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISystemLogService.java View File

@ -0,0 +1,46 @@
package com.hxhq.business.service;
import java.util.List;
import com.hxhq.business.domain.SystemLog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.common.SignForm;
/**
* 系统日志Service接口
*
* @author hxhq
* @date 2026-02-02
*/
public interface ISystemLogService extends IService<SystemLog>
{
/**
* 查询系统日志列表
*
* @param systemLog 系统日志
* @return 系统日志集合
*/
public List<SystemLog> queryList(SystemLog systemLog);
/**
* 试验稽查轨迹
* @param jcnr
* @param jcnrEn
* @param signForm
*/
void saveStudyInfo(String jcnr, String jcnrEn, SignForm signForm);
/**
* 普通日志
* @param jcmc
* @param jcmcEn
* @param jcnr
* @param jcnrEn
* @param qmrid
* @param qmrMc
* @param remark
*/
void saveInfo(String jcmc, String jcmcEn, String jcnr, String jcnrEn,Long qmrid, String qmrMc, String qmrMcEn, String remark);
}

+ 7
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java View File

@ -7,9 +7,11 @@ import com.hxhq.business.domain.MjyJcgj;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.common.SignForm;
import com.hxhq.business.service.ISystemLogService;
import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.DateUtils;
import com.hxhq.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyJcgjMapper;
import com.hxhq.business.domain.StudyJcgj;
@ -25,6 +27,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class StudyJcgjServiceImpl extends ServiceImpl<StudyJcgjMapper, StudyJcgj> implements IStudyJcgjService
{
@Autowired
private ISystemLogService systemLogService;
/**
* 查询试验-稽查轨迹列表
*
@ -67,5 +72,7 @@ public class StudyJcgjServiceImpl extends ServiceImpl
info.setQmrMcEn(signForm.getQmrMcEn());
info.setRemark(signForm.getRemark());
save(info);
systemLogService.saveStudyInfo(jcnr,jcnrEn,signForm);
}
}

+ 64
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java View File

@ -0,0 +1,64 @@
package com.hxhq.business.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.business.domain.StudyJcgj;
import com.hxhq.business.form.common.SignForm;
import com.hxhq.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.SystemLogMapper;
import com.hxhq.business.domain.SystemLog;
import com.hxhq.business.service.ISystemLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 系统日志Service业务层处理
*
* @author hxhq
* @date 2026-02-02
*/
@Service
public class SystemLogServiceImpl extends ServiceImpl<SystemLogMapper, SystemLog> implements ISystemLogService
{
/**
* 查询系统日志列表
*
* @param systemLog 系统日志
* @return 系统日志
*/
@Override
public List<SystemLog> queryList(SystemLog systemLog)
{
QueryWrapper<SystemLog> queryWrapper = Wrappers.query();
return this.list(queryWrapper);
}
@Override
public void saveStudyInfo(String jcnr, String jcnrEn, SignForm signForm) {
SystemLog info = new SystemLog();
info.setJcnr(jcnr);
info.setJcnrEn(jcnrEn);
info.setJcmc(signForm.getQmyy());
info.setJcmcEn(signForm.getQmyyEn());
info.setQmrId(signForm.getQmrId());
info.setQmrMc(signForm.getQmrMc());
info.setQmrMcEn(signForm.getQmrMcEn());
info.setRemark(signForm.getRemark());
save(info);
}
@Override
public void saveInfo(String jcmc, String jcmcEn, String jcnr, String jcnrEn, Long qmrid, String qmrMc, String qmrMcEn, String remark) {
SystemLog info = new SystemLog();
info.setJcnr(jcnr);
info.setJcnrEn(jcnrEn);
info.setJcmc(jcmc);
info.setJcmcEn(jcmcEn);
info.setQmrId(qmrid);
info.setQmrMc(qmrMc);
info.setQmrMcEn(qmrMcEn);
info.setRemark(remark);
save(info);
}
}

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/SystemLogMapper.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.SystemLogMapper">
</mapper>

Loading…
Cancel
Save