|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.hxhq.business.service.impl; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
@ -92,15 +93,24 @@ public class StudyFormPreServiceImpl extends ServiceImpl |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void tj(StudyFormPre studyFormPre){ |
|
|
|
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId()); |
|
|
|
if(studyFormPreOld==null){ |
|
|
|
throw new SecurityException("信息不存在或已删除"); |
|
|
|
} |
|
|
|
if(SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){ |
|
|
|
throw new SecurityException("只能操作自己的表单"); |
|
|
|
if(studyFormPre.getId()!=null){ |
|
|
|
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId()); |
|
|
|
if(studyFormPreOld==null){ |
|
|
|
throw new SecurityException("信息不存在或已删除"); |
|
|
|
} |
|
|
|
if(SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){ |
|
|
|
throw new SecurityException("只能操作自己的表单"); |
|
|
|
} |
|
|
|
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); |
|
|
|
studyFormPre.setTjsj(new Date()); |
|
|
|
this.updateById(studyFormPre); |
|
|
|
}else{ |
|
|
|
studyFormPre.setUserId(SecurityUtils.getUserId()); |
|
|
|
studyFormPre.setTjsj(new Date()); |
|
|
|
studyFormPre.setUserMc(SecurityUtils.getLoginUser().getSysUser().getNickName()); |
|
|
|
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); |
|
|
|
this.save(studyFormPre); |
|
|
|
} |
|
|
|
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); |
|
|
|
this.updateById(studyFormPre); |
|
|
|
//稽查轨迹 todo |
|
|
|
|
|
|
|
} |
|
|
|
|