@ -1,17 +1,16 @@
package com.hxhq.business.service.impl ;
package com.hxhq.business.service.impl ;
import java.util.ArrayList ;
import java.util.LinkedHashMap ;
import java.util.List ;
import java.util.Map ;
import java.util.* ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.baomidou.mybatisplus.core.toolkit.Wrappers ;
import com.baomidou.mybatisplus.core.toolkit.Wrappers ;
import com.hxhq.business.domain.StudyFormPlan ;
import com.hxhq.business.domain.StudyFormFillJcgj ;
import com.hxhq.business.domain.StudyFormFillJcgj ;
import com.hxhq.business.domain.StudyFormPlan ;
import com.hxhq.business.domain.StudyFormPlan ;
import com.hxhq.business.domain.StudyFormPlanJcgj ;
import com.hxhq.business.domain.StudyFormPlanJcgj ;
import com.hxhq.business.dto.study.StudyFormPlanListDto ;
import com.hxhq.business.dto.study.StudyFormPlanListDto ;
import com.hxhq.business.enums.study.StudyFormPlanBdztEnum ;
import com.hxhq.business.enums.study.StudyFormPlanBdztEnum ;
import com.hxhq.business.enums.study.StudyFormPlanBdztEnum ;
import com.hxhq.business.enums.zykgl.JcgjlxEnum ;
import com.hxhq.business.enums.zykgl.JcgjlxEnum ;
import com.hxhq.business.enums.zykgl.JcmcysEnum ;
import com.hxhq.business.enums.zykgl.JcmcysEnum ;
import com.hxhq.business.form.study.StudyFormPlanSearchForm ;
import com.hxhq.business.form.study.StudyFormPlanSearchForm ;
@ -107,8 +106,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
}
}
/ / 稽查轨迹
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
formData . put ( "新归属人" , studyFormPlan . getRemark ( ) ) ;
formData . put ( "原归属人" , studyFormPlanOld . getRemark ( ) ) ;
formData . put ( "新归属人" , studyFormPlan . getUserMc ( ) ) ;
formData . put ( "原归属人" , studyFormPlanOld . getUserMc ( ) ) ;
formData . put ( "原因" , studyFormPlan . getRemark ( ) ) ;
formData . put ( "原因" , studyFormPlan . getRemark ( ) ) ;
/ / 是否验证新的归属人 , 是否属于该实验 ? todo
/ / 是否验证新的归属人 , 是否属于该实验 ? todo
@ -184,17 +183,6 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
* /
* /
@Override
@Override
public void tj ( StudyFormPlan studyFormPlan ) {
public void tj ( StudyFormPlan studyFormPlan ) {
/ / todo
}
/ * *
* 复核通过
*
* @param studyFormPlan
* /
@Override
public void fhtg ( StudyFormPlan studyFormPlan ) {
/ / 验证签名人密码 todo
/ / 验证签名人密码 todo
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -203,27 +191,29 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if ( studyFormPlanOld = = null ) {
if ( studyFormPlanOld = = null ) {
throw new ServiceException ( "表单不存在或已删除" ) ;
throw new ServiceException ( "表单不存在或已删除" ) ;
}
}
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ) {
throw new ServiceException ( "表单不是已提交状态,不能复核" ) ;
}
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . ywcfh . getValue ( ) ) ;
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ;
studyFormPlanOld . setBdnr ( studyFormPlan . getBdnr ( ) ) ;
studyFormPlanOld . setBdmc ( studyFormPlan . getBdmc ( ) ) ;
studyFormPlanOld . setBdsm ( studyFormPlan . getBdsm ( ) ) ;
studyFormPlanOld . setTjsj ( new Date ( ) ) ;
this . updateById ( studyFormPlanOld ) ;
this . updateById ( studyFormPlanOld ) ;
/ / 稽查轨迹
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
formData . put ( "备注" , studyFormPlan . getRemark ( ) ) ;
formData . put ( "备注" , studyFormPlan . getRemark ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "复核通过 " , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "填写并提交记录 " , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
/ / 签名信息
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "复核通过" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "填写并提交记录" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
}
}
/ * *
/ * *
* 复核拒绝
* 复核通过
*
*
* @param studyFormPlan
* @param studyFormPlan
* /
* /
@Override
@Override
public void fhjj ( StudyFormPlan studyFormPlan ) {
public void fhtg ( StudyFormPlan studyFormPlan ) {
/ / 验证签名人密码 todo
/ / 验证签名人密码 todo
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -235,24 +225,24 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ) {
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ) {
throw new ServiceException ( "表单不是已提交状态,不能复核" ) ;
throw new ServiceException ( "表单不是已提交状态,不能复核" ) ;
}
}
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . tbz . getValue ( ) ) ;
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . ywcfh . getValue ( ) ) ;
this . updateById ( studyFormPlanOld ) ;
this . updateById ( studyFormPlanOld ) ;
/ / 稽查轨迹
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
formData . put ( "原因 " , studyFormPlan . getRemark ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "复核拒绝 " , JcmcysEnum . red . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
formData . put ( "备注 " , studyFormPlan . getRemark ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "复核通过 " , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
/ / 签名信息
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "复核拒绝" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "复核通过" , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
}
}
/ * *
/ * *
* 通过
* 复核拒绝
*
*
* @param studyFormPlan
* @param studyFormPlan
* /
* /
@Override
@Override
public void tg ( StudyFormPlan studyFormPlan ) {
public void fhjj ( StudyFormPlan studyFormPlan ) {
/ / 验证签名人密码 todo
/ / 验证签名人密码 todo
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormPlan . getId ( ) = = null | | studyFormPlan . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -264,17 +254,18 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ) {
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ytj . getValue ( ) ) ) {
throw new ServiceException ( "表单不是已提交状态,不能复核" ) ;
throw new ServiceException ( "表单不是已提交状态,不能复核" ) ;
}
}
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . ywc . getValue ( ) ) ;
studyFormPlanOld . setBdzt ( StudyFormPlanBdztEnum . tbz . getValue ( ) ) ;
this . updateById ( studyFormPlanOld ) ;
this . updateById ( studyFormPlanOld ) ;
/ / 稽查轨迹
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
formData . put ( "原因" , studyFormPlan . getRemark ( ) ) ;
formData . put ( "原因" , studyFormPlan . getRemark ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "免复核通过 " , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
studyFormPlanJcgjService . saveJcgj ( studyFormPlanOld . getId ( ) , JcgjlxEnum . lc . getValue ( ) , "复核拒绝 " , JcmcysEnum . red . getValue ( ) , JctUtil . formatStr ( formData ) , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) ) ;
/ / 签名信息
/ / 签名信息
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "免复核通过 " , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
studyFormPlanQmxxService . saveQmxx ( studyFormPlanOld . getId ( ) , "复核拒绝 " , SecurityUtils . getUserId ( ) , SecurityUtils . getNickName ( ) , studyFormPlan . getRemark ( ) ) ;
}
}
/ * *
/ * *
* 审阅
* 审阅
*
*
@ -290,8 +281,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if ( studyFormPlanOld = = null ) {
if ( studyFormPlanOld = = null ) {
throw new ServiceException ( "表单不存在或已删除" ) ;
throw new ServiceException ( "表单不存在或已删除" ) ;
}
}
if ( ! ( studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ywcfh . getValue ( ) ) | | studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ywc . getValue ( ) ) ) ) {
throw new ServiceException ( "表单不是已完成状态,不能审阅" ) ;
if ( ! studyFormPlanOld . getBdzt ( ) . equals ( StudyFormPlanBdztEnum . ywcfh . getValue ( ) ) ) {
throw new ServiceException ( "表单不是已完成(经复核) 状态,不能审阅" ) ;
}
}
/ / 稽查轨迹
/ / 稽查轨迹
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;