@ -16,9 +16,7 @@ import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum ;
import com.hxhq.business.form.study.StudyFormPreAuditForm ;
import com.hxhq.business.form.study.StudyFormPreSearchForm ;
import com.hxhq.business.service.IStudyFormFillService ;
import com.hxhq.business.service.IStudyFormPreJcgjService ;
import com.hxhq.business.service.IStudyFormPreQmxxService ;
import com.hxhq.business.service.* ;
import com.hxhq.business.utils.JctUtil ;
import com.hxhq.common.core.exception.ServiceException ;
import com.hxhq.common.core.utils.StringUtils ;
@ -27,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service ;
import com.hxhq.business.mapper.StudyFormPreMapper ;
import com.hxhq.business.domain.StudyFormPre ;
import com.hxhq.business.service.IStudyFormPreService ;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl ;
import org.springframework.web.bind.annotation.PostMapping ;
@ -46,6 +43,10 @@ public class StudyFormPreServiceImpl extends ServiceImpl
private IStudyFormPreQmxxService studyFormPreQmxxService ;
@Autowired
private IStudyFormFillService studyFormFillService ;
@Autowired
private IStudyFormFillJcgjService studyFormFillJcgjService ;
@Autowired
private IStudyFormFillQmxxService studyFormFillQmxxService ;
/ * *
* 查询试验 - 预填单列表
@ -127,7 +128,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
}
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
studyFormPreJcgjService . saveJcgj ( studyFormPre . getId ( ) , JcgjlxEnum . bj . getValue ( ) , "制作保存预制表单" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
studyFormPreJcgjService . saveJcgj ( studyFormPre . getId ( ) , JcgjlxEnum . xg . getValue ( ) , "制作保存预制表单" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
studyFormPreQmxxService . saveQmxx ( studyFormPre . getId ( ) , "制作保存预制表单" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPre . getRemark ( ) ) ;
@ -165,18 +166,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService . saveJcgj ( studyFormPre . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "制作提交预制表单" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
studyFormPreQmxxService . saveQmxx ( studyFormPre . getId ( ) , "制作提交预制表单" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPre . getRemark ( ) ) ;
/ / 生成填报表单
StudyFormFill studyFormFill = new StudyFormFill ( ) ;
studyFormFill . setStudyId ( studyFormPre . getStudyId ( ) ) ;
studyFormFill . setUserId ( SecurityUtils . getUserId ( ) ) ;
studyFormFill . setUserMc ( SecurityUtils . getNickName ( ) ) ;
studyFormFill . setStudySubjectId ( studyFormPre . getStudySubjectId ( ) ) ;
studyFormFill . setBdbh ( studyFormPre . getBdbh ( ) ) ;
studyFormFill . setBdmc ( studyFormPre . getBdmc ( ) ) ;
studyFormFill . setBdsm ( studyFormPre . getBdsm ( ) ) ;
studyFormFill . setBdnr ( studyFormPre . getBdnr ( ) ) ;
studyFormFill . setTemplateId ( studyFormPre . getTemplateId ( ) ) ;
studyFormFillService . bc ( studyFormFill ) ;
}
/ * *
@ -185,6 +175,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
* /
@Override
public void tg ( StudyFormPreAuditForm form ) {
/ / 验证密码 todo
StudyFormPre studyFormPreOld = this . getById ( form . getId ( ) ) ;
if ( studyFormPreOld = = null ) {
throw new ServiceException ( "信息不存在或已删除" ) ;
@ -221,6 +212,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
* /
@Override
public void jj ( StudyFormPreAuditForm form ) {
/ / 验证密码 todo
StudyFormPre studyFormPreOld = this . getById ( form . getId ( ) ) ;
if ( studyFormPreOld = = null ) {
throw new ServiceException ( "信息不存在或已删除" ) ;
@ -244,6 +236,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
* /
@Override
public void tb ( StudyFormPre studyFormPre ) {
/ / 验证密码 todo
StudyFormPre studyFormPreOld = this . getById ( studyFormPre . getId ( ) ) ;
if ( studyFormPreOld = = null ) {
throw new ServiceException ( "信息不存在或已删除" ) ;
@ -254,7 +247,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
if ( ! studyFormPreOld . getTbzt ( ) . equals ( NormalEnum . no . getValue ( ) ) ) {
throw new ServiceException ( "已经填报" ) ;
}
/ / 新增填报表单 todo
studyFormPreOld . setTbzt ( NormalEnum . yes . getValue ( ) ) ;
this . updateById ( studyFormPreOld ) ;
/ / 稽查轨迹
@ -263,6 +256,26 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService . saveJcgj ( studyFormPreOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "创建记录" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
studyFormPreQmxxService . saveQmxx ( studyFormPreOld . getId ( ) , "创建记录" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPre . getRemark ( ) ) ;
/ / 生成填报表单
StudyFormFill studyFormFill = new StudyFormFill ( ) ;
studyFormFill . setStudyId ( studyFormPreOld . getStudyId ( ) ) ;
studyFormFill . setUserId ( SecurityUtils . getUserId ( ) ) ;
studyFormFill . setUserMc ( SecurityUtils . getNickName ( ) ) ;
studyFormFill . setStudySubjectId ( studyFormPreOld . getStudySubjectId ( ) ) ;
studyFormFill . setBdbh ( studyFormPreOld . getBdbh ( ) ) ;
studyFormFill . setBdmc ( studyFormPreOld . getBdmc ( ) ) ;
studyFormFill . setBdsm ( studyFormPreOld . getBdsm ( ) ) ;
studyFormFill . setBdnr ( studyFormPreOld . getBdnr ( ) ) ;
studyFormFill . setTemplateId ( studyFormPreOld . getTemplateId ( ) ) ;
studyFormFillService . bc ( studyFormFill ) ;
/ / 稽查轨迹
Map < String , String > formData1 = new LinkedHashMap < > ( ) ;
formData1 . put ( "备注" , studyFormFill . getRemark ( ) ) ;
studyFormFillJcgjService . saveJcgj ( studyFormFill . getId ( ) , JcgjlxEnum . bj . getValue ( ) , "创建记录" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData1 ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
studyFormFillQmxxService . saveQmxx ( studyFormFill . getId ( ) , "创建记录" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormFill . getRemark ( ) ) ;
}
}