@ -21,6 +21,7 @@ import com.hxhq.business.utils.JctUtil;
import com.hxhq.business.utils.ObjectCompareUtil ;
import com.hxhq.business.utils.ObjectCompareUtil ;
import com.hxhq.business.utils.lang.StudyFormUtil ;
import com.hxhq.business.utils.lang.StudyFormUtil ;
import com.hxhq.common.core.exception.ServiceException ;
import com.hxhq.common.core.exception.ServiceException ;
import com.hxhq.common.core.utils.DateUtils ;
import com.hxhq.common.core.utils.StringUtils ;
import com.hxhq.common.core.utils.StringUtils ;
import com.hxhq.common.security.utils.SecurityUtils ;
import com.hxhq.common.security.utils.SecurityUtils ;
import com.hxhq.system.api.domain.SysUser ;
import com.hxhq.system.api.domain.SysUser ;
@ -80,6 +81,10 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if ( StringUtils . isNoneBlank ( form . getSfbl ( ) ) ) {
if ( StringUtils . isNoneBlank ( form . getSfbl ( ) ) ) {
queryWrapper . eq ( "t.sfbl" , form . getSfbl ( ) ) ;
queryWrapper . eq ( "t.sfbl" , form . getSfbl ( ) ) ;
}
}
if ( StringUtils . isNoneBlank ( form . getSfbl ( ) ) ) {
queryWrapper . eq ( "t.sfbl" , form . getSfbl ( ) ) ;
}
if ( StringUtils . isNoneBlank ( form . getBdbh ( ) ) ) {
if ( StringUtils . isNoneBlank ( form . getBdbh ( ) ) ) {
queryWrapper . and ( p - > p . like ( "t.`bdbh`" , form . getBdbh ( ) ) ) ;
queryWrapper . and ( p - > p . like ( "t.`bdbh`" , form . getBdbh ( ) ) ) ;
}
}
@ -119,7 +124,20 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if ( StringUtils . isNoneBlank ( form . getCjsjjs ( ) ) ) {
if ( StringUtils . isNoneBlank ( form . getCjsjjs ( ) ) ) {
queryWrapper . apply ( "t.create_time<{0}" , form . getCjsjjs ( ) ) ;
queryWrapper . apply ( "t.create_time<{0}" , form . getCjsjjs ( ) ) ;
}
}
queryWrapper . orderByDesc ( "t.create_time" ) ;
if ( form . getXyssort ( ) ! = null ) {
if ( form . getXyssort ( ) . equals ( NormalEnum . yes . getValue ( ) ) ) {
queryWrapper . orderByDesc ( "t.xysj" ) ;
} else {
queryWrapper . orderByAsc ( "t.xysj" ) ;
}
}
else if ( form . getTjsjsort ( ) ! = null ) {
if ( form . getTjsjsort ( ) . equals ( NormalEnum . yes . getValue ( ) ) ) {
queryWrapper . orderByDesc ( "t.tjsj" ) ;
} else {
queryWrapper . orderByAsc ( "t.tjsj" ) ;
}
}
return baseMapper . queryList ( queryWrapper ) ;
return baseMapper . queryList ( queryWrapper ) ;
}
}
@ -146,7 +164,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void jq ( StudyFormApply studyFormApply ) {
public void jq ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -161,7 +179,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . bj . getValue ( ) , studyFormApply . getQmyy ( ) , JcmcysEnum . orange . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . bj . getValue ( ) , studyFormApply . getQmyy ( ) , JcmcysEnum . orange . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , studyFormApply . getQmyy ( ) , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , studyFormApply . getQmyy ( ) , qmr , studyFormApply . getRemark ( ) ) ;
}
}
@ -174,7 +192,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void fz ( StudyFormApply studyFormApply ) {
public void fz ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -191,7 +209,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "申请废止" , JcmcysEnum . orange . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "申请废止" , JcmcysEnum . orange . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "申请废止" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "申请废止" , qmr , studyFormApply . getRemark ( ) ) ;
}
}
@ -205,7 +223,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void qrfz ( StudyFormApplyShfzForm form ) {
public void qrfz ( StudyFormApplyShfzForm form ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , form . getQmrmm ( ) ) ;
checkPassword ( qmr , form . getQmrmm ( ) ) ;
if ( form . getId ( ) = = null | | form . getId ( ) . longValue ( ) < 0 ) {
if ( form . getId ( ) = = null | | form . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -223,7 +241,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "废止通过" , JcmcysEnum . green . getValue ( ) , null , qmr , form . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "废止通过" , JcmcysEnum . green . getValue ( ) , null , qmr , form . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "废止通过" , qmr , form . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "废止通过" , qmr , form . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -235,7 +253,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "废止拒绝" , JcmcysEnum . red . getValue ( ) , null , qmr , form . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "废止拒绝" , JcmcysEnum . red . getValue ( ) , null , qmr , form . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "废止拒绝" , qmr , form . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "废止拒绝" , qmr , form . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -256,7 +274,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void ghgsr ( StudyFormApply studyFormApply ) {
public void ghgsr ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -280,7 +298,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "更换归属人" , JcmcysEnum . orange . getValue ( ) , formData , qmr , null , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "更换归属人" , JcmcysEnum . orange . getValue ( ) , formData , qmr , null , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "更换归属人" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "更换归属人" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -296,7 +314,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override
@Override
public StudyFormApply bc ( StudyFormApply studyFormApply ) {
public StudyFormApply bc ( StudyFormApply studyFormApply ) {
StudyFormApply result = null ;
StudyFormApply result = null ;
Date now = new Date ( ) ;
Date now = new Date ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
if ( studyFormApply . getId ( ) ! = null ) {
if ( studyFormApply . getId ( ) ! = null ) {
StudyFormApply studyFormApplyOld = this . queryInfo ( studyFormApply . getId ( ) ) ;
StudyFormApply studyFormApplyOld = this . queryInfo ( studyFormApply . getId ( ) ) ;
@ -308,14 +326,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
}
}
studyFormApplyOld . setBdmc ( studyFormApply . getBdmc ( ) ) ;
studyFormApplyOld . setBdmc ( studyFormApply . getBdmc ( ) ) ;
/ / 更新特殊字段
/ / 更新特殊字段
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
studyFormApplyOld . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApplyOld . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApplyOld . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApplyOld . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApplyOld . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApplyOld . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApplyOld . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApplyOld . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApplyOld . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApplyOld . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApplyOld . setXysj ( jsonObject . getString ( "xysj" ) ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "xysj" ) ) ) {
studyFormApplyOld . setXysj ( DateUtils . parseDate ( jsonObject . getString ( "xysj" ) ) ) ;
}
}
}
studyFormApplyOld . setTemplateId ( studyFormApply . getTemplateId ( ) ) ;
studyFormApplyOld . setTemplateId ( studyFormApply . getTemplateId ( ) ) ;
studyFormApplyOld . setBdnr ( studyFormApply . getBdnr ( ) ) ;
studyFormApplyOld . setBdnr ( studyFormApply . getBdnr ( ) ) ;
@ -326,21 +346,23 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
List < StudyFormApplyJcgj > studyFormApplyJcgjs = new ArrayList < > ( ) ;
List < StudyFormApplyJcgj > studyFormApplyJcgjs = new ArrayList < > ( ) ;
for ( ObjectCompareUtil . FieldChange fieldChange : fieldChanges ) {
for ( ObjectCompareUtil . FieldChange fieldChange : fieldChanges ) {
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( now , studyFormApply , JcgjlxEnum . xg . getValue ( ) , "修改" , JcmcysEnum . orange . getValue ( ) , fieldChange . toString ( ) , fieldChange . toEnString ( ) , SecurityUtils . getLoginUser ( ) . getSysUser ( ) , studyFormApply . getRemark ( ) ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( now , studyFormApply , JcgjlxEnum . xg . getValue ( ) , "修改" , JcmcysEnum . orange . getValue ( ) , fieldChange . toString ( ) , fieldChange . toEnString ( ) , SecurityUtils . getLoginUser ( ) . getSysUser ( ) , studyFormApply . getRemark ( ) ) ) ;
}
}
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
}
}
result = studyFormApplyOld ;
result = studyFormApplyOld ;
} else {
} else {
/ / 更新特殊字段
/ / 更新特殊字段
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXysj ( jsonObject . getString ( "xysj" ) ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "xysj" ) ) ) {
studyFormApply . setXysj ( DateUtils . parseDate ( jsonObject . getString ( "xysj" ) ) ) ;
}
}
}
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
@ -355,7 +377,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
result = studyFormApply ;
result = studyFormApply ;
}
}
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "填写并保存记录" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "填写并保存记录" , qmr , studyFormApply . getRemark ( ) ) ;
return baseMapper . queryInfo ( result . getId ( ) ) ;
return baseMapper . queryInfo ( result . getId ( ) ) ;
}
}
@ -380,28 +402,32 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyOld . setTemplateId ( studyFormApply . getTemplateId ( ) ) ;
studyFormApplyOld . setTemplateId ( studyFormApply . getTemplateId ( ) ) ;
studyFormApplyOld . setBdnr ( studyFormApply . getBdnr ( ) ) ;
studyFormApplyOld . setBdnr ( studyFormApply . getBdnr ( ) ) ;
/ / 更新特殊字段
/ / 更新特殊字段
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
studyFormApplyOld . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApplyOld . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApplyOld . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApplyOld . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApplyOld . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApplyOld . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApplyOld . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApplyOld . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApplyOld . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApplyOld . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApplyOld . setXysj ( jsonObject . getString ( "xysj" ) ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "xysj" ) ) ) {
studyFormApplyOld . setXysj ( DateUtils . parseDate ( jsonObject . getString ( "xysj" ) ) ) ;
}
}
}
studyFormApplyOld . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
studyFormApplyOld . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
this . updateById ( studyFormApplyOld ) ;
this . updateById ( studyFormApplyOld ) ;
result = studyFormApplyOld ;
result = studyFormApplyOld ;
} else {
} else {
/ / 更新特殊字段
/ / 更新特殊字段
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXysj ( jsonObject . getString ( "xysj" ) ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "xysj" ) ) ) {
studyFormApply . setXysj ( DateUtils . parseDate ( jsonObject . getString ( "xysj" ) ) ) ;
}
}
}
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . tbz . getValue ( ) ) ;
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
@ -424,7 +450,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void tj ( StudyFormApply studyFormApply ) {
public void tj ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null ) {
if ( studyFormApply . getId ( ) = = null ) {
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
studyFormApply . setUserId ( qmr . getUserId ( ) ) ;
@ -432,14 +458,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApply . setBdbh ( getSn ( studyFormApply ) ) ;
studyFormApply . setBdbh ( getSn ( studyFormApply ) ) ;
}
}
/ / 更新特殊字段
/ / 更新特殊字段
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( studyFormApply . getBdnr ( ) ) ) {
JSONObject jsonObject = JSONObject . parseObject ( studyFormApply . getBdnr ( ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSdId ( jsonObject . getLong ( "sdId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setSyId ( jsonObject . getLong ( "syId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setBmId ( jsonObject . getLong ( "bmId" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setSywzmc ( jsonObject . getString ( "sywzmc" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXynd ( jsonObject . getString ( "xynd" ) ) ;
studyFormApply . setXysj ( jsonObject . getString ( "xysj" ) ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "xysj" ) ) ) {
studyFormApply . setXysj ( DateUtils . parseDate ( jsonObject . getString ( "xysj" ) ) ) ;
}
}
}
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . ytj . getValue ( ) ) ;
studyFormApply . setBdzt ( StudyFormApplyBdztEnum . ytj . getValue ( ) ) ;
studyFormApply . setTjsj ( new Date ( ) ) ;
studyFormApply . setTjsj ( new Date ( ) ) ;
@ -449,7 +477,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "备注" , studyFormApply . getRemark ( ) ) ;
formData . put ( "备注" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApply , JcgjlxEnum . lc . getValue ( ) , "填写并提交记录" , JcmcysEnum . green . getValue ( ) , formData , qmr , null , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApply , JcgjlxEnum . lc . getValue ( ) , "填写并提交记录" , JcmcysEnum . green . getValue ( ) , formData , qmr , null , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "填写并提交记录" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApply . getId ( ) , "填写并提交记录" , qmr , studyFormApply . getRemark ( ) ) ;
}
}
@ -462,7 +490,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void fhtg ( StudyFormApply studyFormApply ) {
public void fhtg ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -481,7 +509,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核通过" , JcmcysEnum . green . getValue ( ) , formData , qmr , null , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核通过" , JcmcysEnum . green . getValue ( ) , formData , qmr , null , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "复核通过" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "复核通过" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -499,7 +527,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void fhjj ( StudyFormApply studyFormApply ) {
public void fhjj ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -518,7 +546,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核拒绝" , JcmcysEnum . red . getValue ( ) , formData , qmr , null , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核拒绝" , JcmcysEnum . red . getValue ( ) , formData , qmr , null , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "复核拒绝" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "复核拒绝" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -535,7 +563,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void sy ( StudyFormApply studyFormApply ) {
public void sy ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -554,7 +582,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "备注" , studyFormApply . getRemark ( ) ) ;
formData . put ( "备注" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "已审阅" , JcmcysEnum . green . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "已审阅" , JcmcysEnum . green . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "已审阅" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "已审阅" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -572,7 +600,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void shtg ( StudyFormApply studyFormApply ) {
public void shtg ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -589,7 +617,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 稽查轨迹
/ / 稽查轨迹
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "审核通过" , JcmcysEnum . green . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "审核通过" , JcmcysEnum . green . getValue ( ) , null , qmr , studyFormApply . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "审核通过" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "审核通过" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -607,7 +635,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
public void shjj ( StudyFormApply studyFormApply ) {
public void shjj ( StudyFormApply studyFormApply ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
/ / 验证签名人密码
/ / 验证签名人密码
Date now = new Date ( ) ;
Date now = new Date ( ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
checkPassword ( qmr , studyFormApply . getQmrmm ( ) ) ;
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
if ( studyFormApply . getId ( ) = = null | | studyFormApply . getId ( ) . longValue ( ) < 0 ) {
throw new ServiceException ( "参数id不正确" ) ;
throw new ServiceException ( "参数id不正确" ) ;
@ -626,7 +654,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
formData . put ( "原因" , studyFormApply . getRemark ( ) ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "审核拒绝" , JcmcysEnum . red . getValue ( ) , formData , qmr , studyFormApply . getRemark ( ) , now ) ;
studyFormApplyJcgjService . saveJcgj ( studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "审核拒绝" , JcmcysEnum . red . getValue ( ) , formData , qmr , studyFormApply . getRemark ( ) , now ) ;
/ / 签名信息
/ / 签名信息
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "审核拒绝" , qmr , studyFormApply . getRemark ( ) ) ;
studyFormApplyQmxxService . saveQmxx ( now , studyFormApplyOld . getId ( ) , "审核拒绝" , qmr , studyFormApply . getRemark ( ) ) ;
/ / 发送通知
/ / 发送通知
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
Study study = studyService . getById ( studyFormApplyOld . getStudyId ( ) ) ;
String url = getUrlQz ( study , "sqbd" ) ;
String url = getUrlQz ( study , "sqbd" ) ;
@ -654,46 +682,48 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override
@Override
public void updateBdnr ( StudyFormUpdateForm form ) {
public void updateBdnr ( StudyFormUpdateForm form ) {
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
SysUser qmr = SecurityUtils . getLoginUser ( ) . getSysUser ( ) ;
JSONObject bdnr = JSONObject . parseObject ( form . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( form . getZdxgjl ( ) ) ) {
baseMapper . updateBdnrZdxgjl ( form . getId ( ) , form . getBdnr ( ) , form . getZdxgjl ( ) , bdnr . getLong ( "syId" ) , bdnr . getLong ( "bmId" ) , bdnr . getLong ( "sdId" ) , bdnr . getString ( "sywzmc" ) , bdnr . getString ( "xynd" ) , bdnr . getString ( "xysj" ) ) ;
} else {
baseMapper . updateBdnr ( form . getId ( ) , form . getBdnr ( ) , bdnr . getLong ( "syId" ) , bdnr . getLong ( "bmId" ) , bdnr . getLong ( "sdId" ) ) ;
}
/ / 稽查轨迹
if ( StringUtils . isNoneBlank ( form . getFiledValue ( ) ) ) {
StudyFormApply studyFormApplyOld = this . getById ( form . getId ( ) ) ;
JSONArray jsonArray = JSONArray . parseArray ( form . getFiledValue ( ) ) ;
List < StudyFormApplyJcgj > studyFormApplyJcgjs = new ArrayList < > ( ) ;
for ( int i = 0 ; i < jsonArray . size ( ) ; i + + ) {
JSONObject jsonObject = jsonArray . getJSONObject ( i ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formDataEn = new LinkedHashMap < > ( ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "oldValue" ) ) ) {
/ / zh
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
formData . put ( "原值" , jsonObject . getString ( "oldValue" ) ) ;
formData . put ( "新值" , jsonObject . getString ( "value" ) ) ;
formData . put ( "原因" , jsonObject . getString ( "reason" ) ) ;
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "原值" , jsonObject . getString ( "oldValue" ) ) ;
formDataEn . put ( "新值" , jsonObject . getString ( "value" ) ) ;
formDataEn . put ( "原因" , jsonObject . getString ( "reason" ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . xg . getValue ( ) , "修改记录" , JcmcysEnum . orange . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
} else {
/ / zh
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
formData . put ( "填入值" , jsonObject . getString ( "value" ) ) ;
formData . put ( "填写人" , qmr . getNickName ( ) ) ;
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "填入值" , jsonObject . getString ( "value" ) ) ;
formDataEn . put ( "填写人" , qmr . getNickName ( ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . bj . getValue ( ) , "填写" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
if ( StringUtils . isNoneBlank ( form . getBdnr ( ) ) ) {
JSONObject bdnr = JSONObject . parseObject ( form . getBdnr ( ) ) ;
if ( StringUtils . isNoneBlank ( form . getZdxgjl ( ) ) ) {
baseMapper . updateBdnrZdxgjl ( form . getId ( ) , form . getBdnr ( ) , form . getZdxgjl ( ) , bdnr . getLong ( "syId" ) , bdnr . getLong ( "bmId" ) , bdnr . getLong ( "sdId" ) , bdnr . getString ( "sywzmc" ) , bdnr . getString ( "xynd" ) , bdnr . getDate ( "xysj" ) ) ;
} else {
baseMapper . updateBdnr ( form . getId ( ) , form . getBdnr ( ) , bdnr . getLong ( "syId" ) , bdnr . getLong ( "bmId" ) , bdnr . getLong ( "sdId" ) , bdnr . getString ( "sywzmc" ) , bdnr . getString ( "xynd" ) , bdnr . getDate ( "xysj" ) ) ;
}
/ / 稽查轨迹
if ( StringUtils . isNoneBlank ( form . getFiledValue ( ) ) ) {
StudyFormApply studyFormApplyOld = this . getById ( form . getId ( ) ) ;
JSONArray jsonArray = JSONArray . parseArray ( form . getFiledValue ( ) ) ;
List < StudyFormApplyJcgj > studyFormApplyJcgjs = new ArrayList < > ( ) ;
for ( int i = 0 ; i < jsonArray . size ( ) ; i + + ) {
JSONObject jsonObject = jsonArray . getJSONObject ( i ) ;
Map < String , String > formData = new LinkedHashMap < > ( ) ;
Map < String , String > formDataEn = new LinkedHashMap < > ( ) ;
if ( StringUtils . isNoneBlank ( jsonObject . getString ( "oldValue" ) ) ) {
/ / zh
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
formData . put ( "原值" , jsonObject . getString ( "oldValue" ) ) ;
formData . put ( "新值" , jsonObject . getString ( "value" ) ) ;
formData . put ( "原因" , jsonObject . getString ( "reason" ) ) ;
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "原值" , jsonObject . getString ( "oldValue" ) ) ;
formDataEn . put ( "新值" , jsonObject . getString ( "value" ) ) ;
formDataEn . put ( "原因" , jsonObject . getString ( "reason" ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . xg . getValue ( ) , "修改记录" , JcmcysEnum . orange . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
} else {
/ / zh
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
formData . put ( "填入值" , jsonObject . getString ( "value" ) ) ;
formData . put ( "填写人" , qmr . getNickName ( ) ) ;
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "填入值" , jsonObject . getString ( "value" ) ) ;
formDataEn . put ( "填写人" , qmr . getNickName ( ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . bj . getValue ( ) , "填写" , JcmcysEnum . green . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
}
}
}
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
}
}
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
}
}
}
}
@ -717,8 +747,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / en
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "复核意见" , jsonObject . getString ( "content" ) ) ;
formDataEn . put ( "复核意见" , jsonObject . getString ( "content" ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核意见" , JcmcysEnum . blue . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
} else if ( StringUtils . isNoneBlank ( form . getReply ( ) ) ) {
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "复核意见" , JcmcysEnum . blue . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
} else if ( StringUtils . isNoneBlank ( form . getReply ( ) ) ) {
JSONObject jsonObject = JSONArray . parseArray ( form . getReply ( ) ) . getJSONObject ( 0 ) ;
JSONObject jsonObject = JSONArray . parseArray ( form . getReply ( ) ) . getJSONObject ( 0 ) ;
/ / zh
/ / zh
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
formData . put ( "字段名" , jsonObject . getString ( "fieldCn" ) ) ;
@ -726,7 +756,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / en
/ / en
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "字段名" , jsonObject . getString ( "fieldEn" ) ) ;
formDataEn . put ( "意见回复" , jsonObject . getString ( "reply" ) ) ;
formDataEn . put ( "意见回复" , jsonObject . getString ( "reply" ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "意见回复" , JcmcysEnum . blue . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
studyFormApplyJcgjs . add ( studyFormApplyJcgjService . getJcgj ( jsonObject . getDate ( "time" ) , studyFormApplyOld , JcgjlxEnum . lc . getValue ( ) , "意见回复" , JcmcysEnum . blue . getValue ( ) , JctUtil . formatStr ( formData ) , StudyFormUtil . getJcnrEn ( formDataEn ) , qmr , null ) ) ;
}
}
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
studyFormApplyJcgjService . saveBatchWithLog ( studyFormApplyJcgjs ) ;
}
}
@ -758,7 +788,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
/ / 学科缩写 : 新增配制计划表 : 学科简称SD ; 非试验表单 : 学科简称GG ; 麻精药表单 : 学科简称GSP
/ / 学科缩写 : 新增配制计划表 : 学科简称SD ; 非试验表单 : 学科简称GG ; 麻精药表单 : 学科简称GSP
/ / 有预填的 = 预填编号 + 流水号 , 没有得 = 模板编号 + 试验编号 + 学科缩写 + 01 + 流水号
/ / 有预填的 = 预填编号 + 流水号 , 没有得 = 模板编号 + 试验编号 + 学科缩写 + 01 + 流水号
String pre = template . getShowSn ( ) + "-" + study . getSn ( ) + "-GSP-01" ;
String pre = template . getShowSn ( ) + "-" + study . getSn ( ) + "-GSP-01" ;
return pre + snGenService . getNewSn ( pre , SnTypeEnum . noDate . getValue ( ) ) ;
return pre + snGenService . getNewSn ( pre , SnTypeEnum . noDate . getValue ( ) ) ;
}
}