diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SystemLogController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SystemLogController.java new file mode 100644 index 0000000..aef1ea6 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SystemLogController.java @@ -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 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))); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/SystemLog.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/SystemLog.java new file mode 100644 index 0000000..3249e93 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/SystemLog.java @@ -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; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/SystemLogMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/SystemLogMapper.java new file mode 100644 index 0000000..3b4794c --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/SystemLogMapper.java @@ -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 +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISystemLogService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISystemLogService.java new file mode 100644 index 0000000..bd14371 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISystemLogService.java @@ -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 +{ + /** + * 查询系统日志列表 + * + * @param systemLog 系统日志 + * @return 系统日志集合 + */ + public List 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); + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java index 1c08d1b..40375ab 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyJcgjServiceImpl.java @@ -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 implements IStudyJcgjService { + @Autowired + private ISystemLogService systemLogService; + /** * 查询试验-稽查轨迹列表 * @@ -67,5 +72,7 @@ public class StudyJcgjServiceImpl extends ServiceImpl implements ISystemLogService +{ + /** + * 查询系统日志列表 + * + * @param systemLog 系统日志 + * @return 系统日志 + */ + @Override + public List queryList(SystemLog systemLog) + { + QueryWrapper 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); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SystemLogMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SystemLogMapper.xml new file mode 100644 index 0000000..8d7f0c8 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SystemLogMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file