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 index bd14371..a6717f0 100644 --- 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 @@ -1,6 +1,8 @@ package com.hxhq.business.service; import java.util.List; + +import com.hxhq.business.domain.StudyJcgj; import com.hxhq.business.domain.SystemLog; import com.baomidou.mybatisplus.extension.service.IService; import com.hxhq.business.enums.zykgl.JcgjlxEnum; @@ -32,6 +34,12 @@ public interface ISystemLogService extends IService void saveStudyInfo(String jcnr, String jcnrEn, SignForm signForm); /** + * 试验稽查轨迹-批量 + * @param jcgjList + */ + void saveStudyBatch(List jcgjList); + + /** * 普通日志 * @param jcmc * @param jcmcEn diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java index 54788ae..5242b2c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyServiceImpl.java @@ -20,9 +20,7 @@ import com.hxhq.business.enums.zykgl.JcmcysEnum; import com.hxhq.business.form.common.SignForm; import com.hxhq.business.form.study.StudySaveForm; import com.hxhq.business.form.study.StudySearchForm; -import com.hxhq.business.service.IArchiveLogService; -import com.hxhq.business.service.INoticeService; -import com.hxhq.business.service.IStudyJcgjService; +import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; @@ -37,7 +35,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyMapper; import com.hxhq.business.domain.Study; -import com.hxhq.business.service.IStudyService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; @@ -58,6 +55,8 @@ public class StudyServiceImpl extends ServiceImpl implements private INoticeService noticeService; @Autowired private IArchiveLogService archiveLogService; + @Autowired + private ISystemLogService systemLogService; private QueryWrapper getListBaseQuery(StudySearchForm form){ QueryWrapper queryWrapper = new QueryWrapper(); @@ -229,6 +228,8 @@ public class StudyServiceImpl extends ServiceImpl implements //获取修改的稽查轨迹 List jcgjList = getChangeJcgj(old,study,sign); studyJcgjService.saveBatch(jcgjList); + systemLogService.saveStudyBatch(jcgjList); + if(!old.getLeaderName().equals(study.getLeaderName())){ Map formData = new LinkedHashMap<>(); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java index 4a444fb..5e0ee05 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SystemLogServiceImpl.java @@ -1,5 +1,6 @@ package com.hxhq.business.service.impl; +import java.util.ArrayList; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -49,6 +50,27 @@ public class SystemLogServiceImpl extends ServiceImpl jcgjList) { + List logList = new ArrayList<>(); + for(StudyJcgj jcgj : jcgjList){ + SystemLog info = new SystemLog(); + info.setJcnr(jcgj.getJcnr()); + info.setJcnrEn(jcgj.getJcnrEn()); + info.setJcmc(jcgj.getJcmc()); + info.setJcmcEn(jcgj.getJcmcEn()); + info.setQmrId(jcgj.getQmrId()); + info.setQmrMc(jcgj.getQmrMc()); + info.setQmrMcEn(jcgj.getQmrMcEn()); + info.setRemark(jcgj.getRemark()); + + logList.add(info); + } + if(logList.size()>0){ + saveBatch(logList); + } + } + + @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);