|
|
|
@ -1,13 +1,13 @@ |
|
|
|
package com.hxhq.business.service.impl; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.LinkedHashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.hxhq.business.domain.MjyFfjl; |
|
|
|
import com.hxhq.business.domain.StudyFormApply; |
|
|
|
import com.hxhq.business.domain.*; |
|
|
|
import com.hxhq.business.dto.mjy.DetailDto; |
|
|
|
import com.hxhq.business.dto.study.StudyFormApplyListDto; |
|
|
|
import com.hxhq.business.enums.NormalEnum; |
|
|
|
@ -23,6 +23,7 @@ import com.hxhq.business.form.study.StudyFormApplySearchForm; |
|
|
|
import com.hxhq.business.service.IStudyFormApplyJcgjService; |
|
|
|
import com.hxhq.business.service.IStudyFormApplyQmxxService; |
|
|
|
import com.hxhq.business.utils.JctUtil; |
|
|
|
import com.hxhq.business.utils.ObjectCompareUtil; |
|
|
|
import com.hxhq.common.core.exception.ServiceException; |
|
|
|
import com.hxhq.common.core.utils.StringUtils; |
|
|
|
import com.hxhq.common.security.utils.SecurityUtils; |
|
|
|
@ -130,7 +131,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
//稽查轨迹 |
|
|
|
Map<String, String> formData = new LinkedHashMap<>(); |
|
|
|
formData.put("备注", studyFormApply.getRemark()); |
|
|
|
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), studyFormApply.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); |
|
|
|
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.bj.getValue(), studyFormApply.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); |
|
|
|
//签名信息 |
|
|
|
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),studyFormApply.getQmyy(),SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); |
|
|
|
|
|
|
|
@ -252,7 +253,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
@Override |
|
|
|
public void bc(StudyFormApply studyFormApply) { |
|
|
|
if(studyFormApply.getId()!=null){ |
|
|
|
StudyFormApply studyFormApplyOld=this.getById(studyFormApply.getId()); |
|
|
|
StudyFormApply studyFormApplyOld=this.queryInfo(studyFormApply.getId()); |
|
|
|
if(studyFormApplyOld==null){ |
|
|
|
throw new ServiceException("信息不存在或已删除"); |
|
|
|
} |
|
|
|
@ -264,17 +265,36 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
studyFormApplyOld.setBdnr(studyFormApply.getBdnr()); |
|
|
|
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
this.updateById(studyFormApplyOld); |
|
|
|
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormApplyOld, studyFormApply); |
|
|
|
if (fieldChanges.size() == 0) { |
|
|
|
throw new ServiceException("你没有修改任何内容"); |
|
|
|
} |
|
|
|
//稽查轨迹 |
|
|
|
List<StudyFormApplyJcgj> studyFormApplyJcgjs = new ArrayList<>(); |
|
|
|
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { |
|
|
|
StudyFormApplyJcgj studyFormApplyJcgj = new StudyFormApplyJcgj(); |
|
|
|
studyFormApplyJcgj.setFormId(studyFormApply.getId()); |
|
|
|
studyFormApplyJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); |
|
|
|
studyFormApplyJcgj.setJcmc("修改"); |
|
|
|
studyFormApplyJcgj.setJcmcys(JcmcysEnum.orange.getValue()); |
|
|
|
studyFormApplyJcgj.setJcnr(fieldChange.toString()); |
|
|
|
studyFormApplyJcgj.setQmrId(SecurityUtils.getUserId()); |
|
|
|
studyFormApplyJcgj.setQmrMc( SecurityUtils.getNickName()); |
|
|
|
studyFormApplyJcgjs.add(studyFormApplyJcgj); |
|
|
|
} |
|
|
|
studyFormApplyJcgjService.saveBatch(studyFormApplyJcgjs); |
|
|
|
}else{ |
|
|
|
studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
studyFormApply.setUserId(SecurityUtils.getUserId()); |
|
|
|
studyFormApply.setUserMc(SecurityUtils.getNickName()); |
|
|
|
this.save(studyFormApply); |
|
|
|
//稽查轨迹 |
|
|
|
Map<String, String> formData = new LinkedHashMap<>(); |
|
|
|
formData.put("备注",studyFormApply.getRemark()); |
|
|
|
studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); |
|
|
|
|
|
|
|
} |
|
|
|
//稽查轨迹 |
|
|
|
Map<String, String> formData = new LinkedHashMap<>(); |
|
|
|
formData.put("备注",studyFormApply.getRemark()); |
|
|
|
studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); |
|
|
|
//签名信息 |
|
|
|
//签名信息 |
|
|
|
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); |
|
|
|
|
|
|
|
} |
|
|
|
|