Browse Source

fix:[试验管理][填报表单]

master
15881625488@163.com 2 days ago
parent
commit
a2e8ef5494
9 changed files with 228 additions and 249 deletions
  1. +1
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java
  2. +6
    -6
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java
  3. +0
    -11
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java
  4. +0
    -11
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java
  5. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java
  6. +63
    -65
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java
  7. +31
    -29
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  8. +49
    -50
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java
  9. +77
    -74
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java

+ 1
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java View File

@ -114,8 +114,7 @@ public class StudyFormPreController extends BaseController
@RequiresPermissions({"business:studyFormPre:bj","business:nonTrialFormPre:bj","business:drugFormPre:bj"}) @RequiresPermissions({"business:studyFormPre:bj","business:nonTrialFormPre:bj","business:drugFormPre:bj"})
public AjaxResult tb(@RequestBody StudyFormPre studyFormPre) public AjaxResult tb(@RequestBody StudyFormPre studyFormPre)
{ {
studyFormPreService.tb(studyFormPre);
return AjaxResult.success("操作成功");
return AjaxResult.success(studyFormPreService.tb(studyFormPre));
} }
/** /**

+ 6
- 6
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java View File

@ -61,8 +61,8 @@ public class StudyFormFill extends MpBaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date tjsj; private Date tjsj;
/** 用量信息 */
private String ylxx;
/** 物资信息 */
private String resource;
/** 填报开始时间 */ /** 填报开始时间 */
@Excel(name = "填报开始时间") @Excel(name = "填报开始时间")
@ -103,12 +103,12 @@ public class StudyFormFill extends MpBaseEntity
@TableField(exist = false) @TableField(exist = false)
private String studyMc; private String studyMc;
public String getYlxx() {
return ylxx;
public String getResource() {
return resource;
} }
public void setYlxx(String ylxx) {
this.ylxx = ylxx;
public void setResource(String resource) {
this.resource = resource;
} }
public Date getTbkssj() { public Date getTbkssj() {

+ 0
- 11
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java View File

@ -24,17 +24,6 @@ public class StudyGyzj extends MpBaseEntity
/** 试验归还状态:1:未归还;10:已归还*/ /** 试验归还状态:1:未归还;10:已归还*/
private Integer syghzt; private Integer syghzt;
/** 来源:1:资源库;3:产生*/
private Integer ly;
public Integer getLy() {
return ly;
}
public void setLy(Integer ly) {
this.ly = ly;
}
public Integer getSyghzt() { public Integer getSyghzt() {
return syghzt; return syghzt;
} }

+ 0
- 11
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java View File

@ -24,17 +24,6 @@ public class StudyMjy extends MpBaseEntity
/** 试验归还状态:1:未归还;10:已归还*/ /** 试验归还状态:1:未归还;10:已归还*/
private Integer syghzt; private Integer syghzt;
/** 来源:1:资源库;3:产生*/
private Integer ly;
public Integer getLy() {
return ly;
}
public void setLy(Integer ly) {
this.ly = ly;
}
public Integer getSyghzt() { public Integer getSyghzt() {
return syghzt; return syghzt;
} }

+ 1
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java View File

@ -64,6 +64,6 @@ public interface IStudyFormPreService extends IService
* 填报 * 填报
* @param studyFormPre * @param studyFormPre
*/ */
public void tb(StudyFormPre studyFormPre);
public StudyFormFill tb(StudyFormPre studyFormPre);
} }

+ 63
- 65
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java View File

@ -118,7 +118,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void jq(StudyFormApply studyFormApply) { public void jq(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -134,7 +134,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData.put("备注", studyFormApply.getRemark()); formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.bj.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());
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), studyFormApply.getQmyy(), SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -146,7 +146,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void fz(StudyFormApply studyFormApply) { public void fz(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -164,7 +164,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData.put("备注", studyFormApply.getRemark()); formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "申请废止", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "申请废止", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"申请废止",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), "申请废止", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -177,7 +177,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void qrfz(StudyFormApplyShfzForm form) { public void qrfz(StudyFormApplyShfzForm form) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),form.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -196,7 +196,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData.put("原因", form.getRemark()); formData.put("原因", form.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"废止通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "废止通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), form.getRemark());
} else { } else {
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue());
@ -206,7 +206,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
formData.put("原因", form.getRemark()); formData.put("原因", form.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"废止拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "废止拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), form.getRemark());
} }
@ -221,7 +221,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void ghgsr(StudyFormApply studyFormApply) { public void ghgsr(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -234,9 +234,9 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
} }
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormApply.getUserMc());
formData.put("原归属人",studyFormApplyOld.getUserMc());
formData.put("原因",studyFormApply.getRemark());
formData.put("新归属人", studyFormApply.getUserMc());
formData.put("原归属人", studyFormApplyOld.getUserMc());
formData.put("原因", studyFormApply.getRemark());
//是否验证新的归属人是否属于该实验 todo //是否验证新的归属人是否属于该实验 todo
studyFormApplyOld.setUserId(studyFormApply.getUserId()); studyFormApplyOld.setUserId(studyFormApply.getUserId());
@ -245,7 +245,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"更换归属人",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "更换归属人", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -256,13 +256,13 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
*/ */
@Override @Override
public void bc(StudyFormApply studyFormApply) { public void bc(StudyFormApply studyFormApply) {
if(studyFormApply.getId()!=null){
StudyFormApply studyFormApplyOld=this.queryInfo(studyFormApply.getId());
if(studyFormApplyOld==null){
throw new ServiceException("信息不存在或已删除");
if (studyFormApply.getId() != null) {
StudyFormApply studyFormApplyOld = this.queryInfo(studyFormApply.getId());
if (studyFormApplyOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!SecurityUtils.getUserId().equals(studyFormApplyOld.getUserId())){
throw new ServiceException("只能操作自己的表单");
if (!SecurityUtils.getUserId().equals(studyFormApplyOld.getUserId())) {
throw new ServiceException("只能操作自己的表单");
} }
studyFormApplyOld.setBdmc(studyFormApply.getBdmc()); studyFormApplyOld.setBdmc(studyFormApply.getBdmc());
studyFormApplyOld.setTemplateId(studyFormApply.getTemplateId()); studyFormApplyOld.setTemplateId(studyFormApply.getTemplateId());
@ -271,35 +271,34 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormApplyOld, studyFormApply); List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormApplyOld, studyFormApply);
if (fieldChanges.size() == 0) { 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);
} }
//稽查轨迹
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{
} else {
studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue());
studyFormApply.setUserId(SecurityUtils.getUserId()); studyFormApply.setUserId(SecurityUtils.getUserId());
studyFormApply.setUserMc(SecurityUtils.getNickName()); studyFormApply.setUserMc(SecurityUtils.getNickName());
this.save(studyFormApply); this.save(studyFormApply);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());
formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
} }
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并保存记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), "填写并保存记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -312,8 +311,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void tj(StudyFormApply studyFormApply) { public void tj(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
if(studyFormApply.getId()==null){
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormApply.getQmrmm());
if (studyFormApply.getId() == null) {
studyFormApply.setUserId(SecurityUtils.getUserId()); studyFormApply.setUserId(SecurityUtils.getUserId());
studyFormApply.setUserMc(SecurityUtils.getNickName()); studyFormApply.setUserMc(SecurityUtils.getNickName());
} }
@ -322,15 +321,13 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
this.saveOrUpdate(studyFormApply); this.saveOrUpdate(studyFormApply);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());
formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并提交记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), "填写并提交记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
/** /**
* 复核通过 * 复核通过
* *
@ -339,7 +336,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void fhtg(StudyFormApply studyFormApply) { public void fhtg(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -347,17 +344,17 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (studyFormApplyOld == null) { if (studyFormApplyOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue()) ) {
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue())) {
throw new ServiceException("表单不是已提交状态,不能复核"); throw new ServiceException("表单不是已提交状态,不能复核");
} }
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.yfh.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.yfh.getValue());
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());
formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -369,7 +366,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void fhjj(StudyFormApply studyFormApply) { public void fhjj(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -377,17 +374,17 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (studyFormApplyOld == null) { if (studyFormApplyOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue()) ) {
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue())) {
throw new ServiceException("表单不是已提交状态,不能复核"); throw new ServiceException("表单不是已提交状态,不能复核");
} }
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue());
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("原因",studyFormApply.getRemark());
formData.put("原因", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -399,7 +396,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void sy(StudyFormApply studyFormApply) { public void sy(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -414,10 +411,10 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());
formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"已审阅",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "已审阅", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -430,7 +427,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void shtg(StudyFormApply studyFormApply) { public void shtg(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -438,17 +435,17 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (studyFormApplyOld == null) { if (studyFormApplyOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.yfh.getValue()) ) {
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.yfh.getValue())) {
throw new ServiceException("表单不是已复核状态,不能审核"); throw new ServiceException("表单不是已复核状态,不能审核");
} }
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.ywc.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.ywc.getValue());
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());
formData.put("备注", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"审核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
@ -460,7 +457,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
@Override @Override
public void shjj(StudyFormApply studyFormApply) { public void shjj(StudyFormApply studyFormApply) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormApply.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -468,30 +465,31 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (studyFormApplyOld == null) { if (studyFormApplyOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.yfh.getValue()) ) {
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.yfh.getValue())) {
throw new ServiceException("表单不是已复核状态,不能审核"); throw new ServiceException("表单不是已复核状态,不能审核");
} }
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.wtg.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.wtg.getValue());
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("原因",studyFormApply.getRemark());
formData.put("原因", studyFormApply.getRemark());
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"审核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark());
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark());
} }
/** /**
* 验证密码 * 验证密码
*
* @param user * @param user
* @param qmrmm * @param qmrmm
*/ */
public void checkPassword(SysUser user, String qmrmm){
if(StringUtils.isBlank(qmrmm)){
public void checkPassword(SysUser user, String qmrmm) {
if (StringUtils.isBlank(qmrmm)) {
throw new ServiceException("签名密码不能为空"); throw new ServiceException("签名密码不能为空");
} }
sysUserService.checkPassword(user,qmrmm,false);
sysUserService.checkPassword(user, qmrmm, false);
} }
} }

+ 31
- 29
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java View File

@ -119,7 +119,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void jq(StudyFormFill studyFormFill) { public void jq(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -147,7 +147,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void fz(StudyFormFill studyFormFill) { public void fz(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -178,7 +178,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void qrfz(StudyFormFillShfzForm form) { public void qrfz(StudyFormFillShfzForm form) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),form.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -222,7 +222,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void ghgsr(StudyFormFill studyFormFill) { public void ghgsr(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -270,23 +270,23 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillOld.setBdzt(StudyFormFillBdztEnum.tbz.getValue()); studyFormFillOld.setBdzt(StudyFormFillBdztEnum.tbz.getValue());
this.updateById(studyFormFillOld); this.updateById(studyFormFillOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormFillOld, studyFormFill); List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormFillOld, studyFormFill);
if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容");
}
//稽查轨迹
List<StudyFormFillJcgj> studyFormFillJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormFillJcgj studyFormFillJcgj = new StudyFormFillJcgj();
studyFormFillJcgj.setFormId(studyFormFill.getId());
studyFormFillJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormFillJcgj.setJcmc("修改");
studyFormFillJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormFillJcgj.setJcnr(fieldChange.toString());
studyFormFillJcgj.setQmrId(SecurityUtils.getUserId());
studyFormFillJcgj.setQmrMc(SecurityUtils.getNickName());
studyFormFillJcgjs.add(studyFormFillJcgj);
if (fieldChanges.size() > 0) {
//稽查轨迹
List<StudyFormFillJcgj> studyFormFillJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormFillJcgj studyFormFillJcgj = new StudyFormFillJcgj();
studyFormFillJcgj.setFormId(studyFormFill.getId());
studyFormFillJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormFillJcgj.setJcmc("修改");
studyFormFillJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormFillJcgj.setJcnr(fieldChange.toString());
studyFormFillJcgj.setQmrId(SecurityUtils.getUserId());
studyFormFillJcgj.setQmrMc(SecurityUtils.getNickName());
studyFormFillJcgjs.add(studyFormFillJcgj);
}
studyFormFillJcgjService.saveBatch(studyFormFillJcgjs);
} }
studyFormFillJcgjService.saveBatch(studyFormFillJcgjs);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", studyFormFill.getRemark()); formData.put("备注", studyFormFill.getRemark());
@ -317,7 +317,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void tj(StudyFormFill studyFormFill) { public void tj(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() != null) { if (studyFormFill.getId() != null) {
StudyFormFill studyFormFillOld = this.queryInfo(studyFormFill.getId()); StudyFormFill studyFormFillOld = this.queryInfo(studyFormFill.getId());
if (studyFormFillOld == null) { if (studyFormFillOld == null) {
@ -328,6 +328,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
} }
studyFormFillOld.setBdmc(studyFormFill.getBdmc()); studyFormFillOld.setBdmc(studyFormFill.getBdmc());
studyFormFillOld.setBdnr(studyFormFill.getBdnr()); studyFormFillOld.setBdnr(studyFormFill.getBdnr());
studyFormFillOld.setResource(studyFormFill.getResource());
studyFormFillOld.setBdzt(StudyFormFillBdztEnum.ytj.getValue()); studyFormFillOld.setBdzt(StudyFormFillBdztEnum.ytj.getValue());
this.updateById(studyFormFillOld); this.updateById(studyFormFillOld);
// todo 处置存放用量 // todo 处置存放用量
@ -378,7 +379,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void gc(StudyFormFillGcForm form) { public void gc(StudyFormFillGcForm form) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),form.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), 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不正确");
} }
@ -408,7 +409,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void fhtg(StudyFormFill studyFormFill) { public void fhtg(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -438,7 +439,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void fhjj(StudyFormFill studyFormFill) { public void fhjj(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -468,7 +469,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void tg(StudyFormFill studyFormFill) { public void tg(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -498,7 +499,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
@Override @Override
public void sy(StudyFormFill studyFormFill) { public void sy(StudyFormFill studyFormFill) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormFill.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getQmrmm());
if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -520,14 +521,15 @@ public class StudyFormFillServiceImpl extends ServiceImpl
/** /**
* 验证密码 * 验证密码
*
* @param user * @param user
* @param qmrmm * @param qmrmm
*/ */
public void checkPassword(SysUser user, String qmrmm){
if(StringUtils.isBlank(qmrmm)){
public void checkPassword(SysUser user, String qmrmm) {
if (StringUtils.isBlank(qmrmm)) {
throw new ServiceException("签名密码不能为空"); throw new ServiceException("签名密码不能为空");
} }
sysUserService.checkPassword(user,qmrmm,false);
sysUserService.checkPassword(user, qmrmm, false);
} }
} }

+ 49
- 50
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java View File

@ -36,8 +36,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2025-12-29 * @date 2025-12-29
*/ */
@Service @Service
public class StudyFormPlanServiceImpl extends ServiceImpl<StudyFormPlanMapper, StudyFormPlan> implements IStudyFormPlanService
{
public class StudyFormPlanServiceImpl extends ServiceImpl<StudyFormPlanMapper, StudyFormPlan> implements IStudyFormPlanService {
@Autowired @Autowired
private IStudyFormPlanJcgjService studyFormPlanJcgjService; private IStudyFormPlanJcgjService studyFormPlanJcgjService;
@Autowired @Autowired
@ -101,7 +100,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
@Override @Override
public void ghgsr(StudyFormPlan studyFormPlan) { public void ghgsr(StudyFormPlan studyFormPlan) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPlan.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPlan.getQmrmm());
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) { if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -111,9 +110,9 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
} }
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormPlan.getUserMc());
formData.put("原归属人",studyFormPlanOld.getUserMc());
formData.put("原因",studyFormPlan.getRemark());
formData.put("新归属人", studyFormPlan.getUserMc());
formData.put("原归属人", studyFormPlanOld.getUserMc());
formData.put("原因", studyFormPlan.getRemark());
//是否验证新的归属人是否属于该实验 todo //是否验证新的归属人是否属于该实验 todo
studyFormPlanOld.setUserId(studyFormPlan.getUserId()); studyFormPlanOld.setUserId(studyFormPlan.getUserId());
@ -122,7 +121,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.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());
} }
@ -133,13 +132,13 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
*/ */
@Override @Override
public void bc(StudyFormPlan studyFormPlan) { public void bc(StudyFormPlan studyFormPlan) {
if(studyFormPlan.getId()!=null){
StudyFormPlan studyFormPlanOld=this.queryInfo(studyFormPlan.getId());
if(studyFormPlanOld==null){
throw new ServiceException("信息不存在或已删除");
if (studyFormPlan.getId() != null) {
StudyFormPlan studyFormPlanOld = this.queryInfo(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!SecurityUtils.getUserId().equals(studyFormPlanOld.getUserId())){
throw new ServiceException("只能操作自己的表单");
if (!SecurityUtils.getUserId().equals(studyFormPlanOld.getUserId())) {
throw new ServiceException("只能操作自己的表单");
} }
studyFormPlanOld.setBdmc(studyFormPlan.getBdmc()); studyFormPlanOld.setBdmc(studyFormPlan.getBdmc());
studyFormPlanOld.setTemplateId(studyFormPlan.getTemplateId()); studyFormPlanOld.setTemplateId(studyFormPlan.getTemplateId());
@ -148,35 +147,34 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
this.updateById(studyFormPlanOld); this.updateById(studyFormPlanOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormPlanOld, studyFormPlan); List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormPlanOld, studyFormPlan);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容");
//稽查轨迹
List<StudyFormPlanJcgj> studyFormPlanJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormPlanJcgj studyFormPlanJcgj = new StudyFormPlanJcgj();
studyFormPlanJcgj.setFormId(studyFormPlan.getId());
studyFormPlanJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormPlanJcgj.setJcmc("修改");
studyFormPlanJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormPlanJcgj.setJcnr(fieldChange.toString());
studyFormPlanJcgj.setQmrId(SecurityUtils.getUserId());
studyFormPlanJcgj.setQmrMc(SecurityUtils.getNickName());
studyFormPlanJcgjs.add(studyFormPlanJcgj);
}
studyFormPlanJcgjService.saveBatch(studyFormPlanJcgjs);
} }
//稽查轨迹
List<StudyFormPlanJcgj> studyFormPlanJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormPlanJcgj studyFormPlanJcgj = new StudyFormPlanJcgj();
studyFormPlanJcgj.setFormId(studyFormPlan.getId());
studyFormPlanJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormPlanJcgj.setJcmc("修改");
studyFormPlanJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormPlanJcgj.setJcnr(fieldChange.toString());
studyFormPlanJcgj.setQmrId(SecurityUtils.getUserId());
studyFormPlanJcgj.setQmrMc( SecurityUtils.getNickName());
studyFormPlanJcgjs.add(studyFormPlanJcgj);
}
studyFormPlanJcgjService.saveBatch(studyFormPlanJcgjs);
}else{
} else {
studyFormPlan.setBdzt(StudyFormPlanBdztEnum.tbz.getValue()); studyFormPlan.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
studyFormPlan.setUserId(SecurityUtils.getUserId()); studyFormPlan.setUserId(SecurityUtils.getUserId());
studyFormPlan.setUserMc(SecurityUtils.getNickName()); studyFormPlan.setUserMc(SecurityUtils.getNickName());
this.save(studyFormPlan); this.save(studyFormPlan);
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormPlan.getRemark());
formData.put("备注", studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
} }
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并保存记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(), "填写并保存记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark());
} }
@ -189,8 +187,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
@Override @Override
public void tj(StudyFormPlan studyFormPlan) { public void tj(StudyFormPlan studyFormPlan) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPlan.getQmrmm());
if(studyFormPlan.getId()==null){
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPlan.getQmrmm());
if (studyFormPlan.getId() == null) {
studyFormPlan.setUserId(SecurityUtils.getUserId()); studyFormPlan.setUserId(SecurityUtils.getUserId());
studyFormPlan.setUserMc(SecurityUtils.getNickName()); studyFormPlan.setUserMc(SecurityUtils.getNickName());
} }
@ -200,10 +198,10 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
//通知 todo //通知 todo
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormPlan.getRemark());
formData.put("备注", studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并提交记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(), "填写并提交记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark());
} }
@ -216,7 +214,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
@Override @Override
public void fhtg(StudyFormPlan studyFormPlan) { public void fhtg(StudyFormPlan studyFormPlan) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPlan.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPlan.getQmrmm());
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) { if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -224,17 +222,17 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (studyFormPlanOld == null) { if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue())) {
throw new ServiceException("表单不是已提交状态,不能复核"); throw new ServiceException("表单不是已提交状态,不能复核");
} }
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ywcfh.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());
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());
} }
@ -246,7 +244,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
@Override @Override
public void fhjj(StudyFormPlan studyFormPlan) { public void fhjj(StudyFormPlan studyFormPlan) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPlan.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPlan.getQmrmm());
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) { if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -254,17 +252,17 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (studyFormPlanOld == null) { if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除"); throw new ServiceException("表单不存在或已删除");
} }
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.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.red.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());
} }
@ -277,7 +275,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
@Override @Override
public void sy(StudyFormPlan studyFormPlan) { public void sy(StudyFormPlan studyFormPlan) {
//验证签名人密码 //验证签名人密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPlan.getQmrmm());
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPlan.getQmrmm());
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) { if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确"); throw new ServiceException("参数id不正确");
} }
@ -292,24 +290,25 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
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 user * @param user
* @param qmrmm * @param qmrmm
*/ */
public void checkPassword(SysUser user, String qmrmm){
if(StringUtils.isBlank(qmrmm)){
public void checkPassword(SysUser user, String qmrmm) {
if (StringUtils.isBlank(qmrmm)) {
throw new ServiceException("签名密码不能为空"); throw new ServiceException("签名密码不能为空");
} }
sysUserService.checkPassword(user,qmrmm,false);
sysUserService.checkPassword(user, qmrmm, false);
} }
} }

+ 77
- 74
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java View File

@ -38,8 +38,7 @@ import org.springframework.web.bind.annotation.PostMapping;
* @date 2025-12-29 * @date 2025-12-29
*/ */
@Service @Service
public class StudyFormPreServiceImpl extends ServiceImpl<StudyFormPreMapper, StudyFormPre> implements IStudyFormPreService
{
public class StudyFormPreServiceImpl extends ServiceImpl<StudyFormPreMapper, StudyFormPre> implements IStudyFormPreService {
@Autowired @Autowired
private IStudyFormPreJcgjService studyFormPreJcgjService; private IStudyFormPreJcgjService studyFormPreJcgjService;
@Autowired @Autowired
@ -60,8 +59,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
* @return 试验-预填单 * @return 试验-预填单
*/ */
@Override @Override
public List<StudyFormPreListDto> queryList(StudyFormPreSearchForm form)
{
public List<StudyFormPreListDto> queryList(StudyFormPreSearchForm form) {
QueryWrapper<StudyFormPre> queryWrapper = Wrappers.query(); QueryWrapper<StudyFormPre> queryWrapper = Wrappers.query();
queryWrapper.eq("t.del_flag", "0"); queryWrapper.eq("t.del_flag", "0");
if (form.getUserId() != null && form.getUserId().longValue() > 0) { if (form.getUserId() != null && form.getUserId().longValue() > 0) {
@ -108,17 +106,18 @@ public class StudyFormPreServiceImpl extends ServiceImpl
/** /**
* 保存 * 保存
*
* @param studyFormPre * @param studyFormPre
*/ */
@Override @Override
public void bc(StudyFormPre studyFormPre){
if(studyFormPre.getId()!=null){
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
public void bc(StudyFormPre studyFormPre) {
if (studyFormPre.getId() != null) {
StudyFormPre studyFormPreOld = this.getById(studyFormPre.getId());
if (studyFormPreOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
throw new ServiceException("只能操作自己的表单");
if (!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())) {
throw new ServiceException("只能操作自己的表单");
} }
studyFormPreOld.setBdmc(studyFormPre.getBdmc()); studyFormPreOld.setBdmc(studyFormPre.getBdmc());
studyFormPreOld.setTemplateId(studyFormPre.getTemplateId()); studyFormPreOld.setTemplateId(studyFormPre.getTemplateId());
@ -126,23 +125,22 @@ public class StudyFormPreServiceImpl extends ServiceImpl
this.updateById(studyFormPreOld); this.updateById(studyFormPreOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormPreOld, studyFormPre); List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(studyFormPreOld, studyFormPre);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容");
}
//稽查轨迹
List<StudyFormPreJcgj> studyFormPreJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormPreJcgj studyFormPreJcgj = new StudyFormPreJcgj();
studyFormPreJcgj.setFormId(studyFormPre.getId());
studyFormPreJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormPreJcgj.setJcmc("修改");
studyFormPreJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormPreJcgj.setJcnr(fieldChange.toString());
studyFormPreJcgj.setQmrId(SecurityUtils.getUserId());
studyFormPreJcgj.setQmrMc( SecurityUtils.getNickName());
studyFormPreJcgjs.add(studyFormPreJcgj);
//稽查轨迹
List<StudyFormPreJcgj> studyFormPreJcgjs = new ArrayList<>();
for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) {
StudyFormPreJcgj studyFormPreJcgj = new StudyFormPreJcgj();
studyFormPreJcgj.setFormId(studyFormPre.getId());
studyFormPreJcgj.setJcgjlx(JcgjlxEnum.xg.getValue());
studyFormPreJcgj.setJcmc("修改");
studyFormPreJcgj.setJcmcys(JcmcysEnum.orange.getValue());
studyFormPreJcgj.setJcnr(fieldChange.toString());
studyFormPreJcgj.setQmrId(SecurityUtils.getUserId());
studyFormPreJcgj.setQmrMc(SecurityUtils.getNickName());
studyFormPreJcgjs.add(studyFormPreJcgj);
}
studyFormPreJcgjService.saveBatch(studyFormPreJcgjs);
} }
studyFormPreJcgjService.saveBatch(studyFormPreJcgjs);
}else{
} else {
studyFormPre.setBdbh("todo"); studyFormPre.setBdbh("todo");
studyFormPre.setUserId(SecurityUtils.getUserId()); studyFormPre.setUserId(SecurityUtils.getUserId());
studyFormPre.setUserMc(SecurityUtils.getNickName()); studyFormPre.setUserMc(SecurityUtils.getNickName());
@ -153,31 +151,32 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.lc.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); 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());
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPre.getId(), "制作保存预制表单", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPre.getRemark());
} }
/** /**
* 提交 * 提交
*
* @param studyFormPre * @param studyFormPre
*/ */
@Override @Override
public void tj(StudyFormPre studyFormPre){
public void tj(StudyFormPre studyFormPre) {
//验证密码 //验证密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPre.getQmrmm());
if(studyFormPre.getId()!=null){
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPre.getQmrmm());
if (studyFormPre.getId() != null) {
StudyFormPre studyFormPreOld = this.getById(studyFormPre.getId());
if (studyFormPreOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
throw new ServiceException("只能操作自己的表单");
if (!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())) {
throw new ServiceException("只能操作自己的表单");
} }
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue());
studyFormPre.setTjsj(new Date()); studyFormPre.setTjsj(new Date());
this.updateById(studyFormPre); this.updateById(studyFormPre);
}else{
} else {
studyFormPre.setUserId(SecurityUtils.getUserId()); studyFormPre.setUserId(SecurityUtils.getUserId());
studyFormPre.setTjsj(new Date()); studyFormPre.setTjsj(new Date());
studyFormPre.setUserMc(SecurityUtils.getNickName()); studyFormPre.setUserMc(SecurityUtils.getNickName());
@ -189,36 +188,37 @@ public class StudyFormPreServiceImpl extends ServiceImpl
formData.put("备注", studyFormPre.getRemark()); formData.put("备注", studyFormPre.getRemark());
studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.lc.getValue(), "制作提交预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); 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());
studyFormPreQmxxService.saveQmxx(studyFormPre.getId(), "制作提交预制表单", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPre.getRemark());
} }
/** /**
* 通过 * 通过
*
* @param form * @param form
*/ */
@Override @Override
public void tg(StudyFormPreAuditForm form){
public void tg(StudyFormPreAuditForm form) {
//验证密码 //验证密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),form.getQmrmm());
StudyFormPre studyFormPreOld=this.getById(form.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
checkPassword(SecurityUtils.getLoginUser().getSysUser(), form.getQmrmm());
StudyFormPre studyFormPreOld = this.getById(form.getId());
if (studyFormPreOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())){
throw new ServiceException("不是已提交状态,不能审核");
if (!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())) {
throw new ServiceException("不是已提交状态,不能审核");
} }
//负责人审核 //负责人审核
if(studyFormPreOld.getFzrshzt().equals(StudyFormPreFzrshztEnum.shz.getValue())){
if (studyFormPreOld.getFzrshzt().equals(StudyFormPreFzrshztEnum.shz.getValue())) {
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue()); studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.ysh.getValue()); studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.ysh.getValue());
}else{
} else {
//权限审核 //权限审核
if(studyFormPreOld.getFzrsh().equals(NormalEnum.yes.getValue())){
if (studyFormPreOld.getFzrsh().equals(NormalEnum.yes.getValue())) {
//是否需要负责人审核 //是否需要负责人审核
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.shz.getValue()); studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.shz.getValue());
}else{
} else {
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue()); studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
} }
} }
@ -228,23 +228,24 @@ public class StudyFormPreServiceImpl extends ServiceImpl
formData.put("备注", form.getRemark()); formData.put("备注", form.getRemark());
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); 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(),form.getRemark());
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "审核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), form.getRemark());
} }
/** /**
* 拒绝 * 拒绝
*
* @param form * @param form
*/ */
@Override @Override
public void jj(StudyFormPreAuditForm form){
public void jj(StudyFormPreAuditForm form) {
//验证密码 //验证密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),form.getQmrmm());
StudyFormPre studyFormPreOld=this.getById(form.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
checkPassword(SecurityUtils.getLoginUser().getSysUser(), form.getQmrmm());
StudyFormPre studyFormPreOld = this.getById(form.getId());
if (studyFormPreOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())){
throw new ServiceException("不是已提交状态,不能审核");
if (!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())) {
throw new ServiceException("不是已提交状态,不能审核");
} }
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.wtg.getValue()); studyFormPreOld.setBdzt(StudyFormPreBdztEnum.wtg.getValue());
this.updateById(studyFormPreOld); this.updateById(studyFormPreOld);
@ -253,32 +254,33 @@ public class StudyFormPreServiceImpl extends ServiceImpl
formData.put("原因", form.getRemark()); formData.put("原因", form.getRemark());
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"审核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark());
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "审核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), form.getRemark());
} }
/** /**
* 填报 * 填报
*
* @param studyFormPre * @param studyFormPre
*/ */
@Override @Override
public void tb(StudyFormPre studyFormPre){
public StudyFormFill tb(StudyFormPre studyFormPre) {
//验证密码 //验证密码
checkPassword(SecurityUtils.getLoginUser().getSysUser(),studyFormPre.getQmrmm());
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
checkPassword(SecurityUtils.getLoginUser().getSysUser(), studyFormPre.getQmrmm());
StudyFormPre studyFormPreOld = this.getById(studyFormPre.getId());
if (studyFormPreOld == null) {
throw new ServiceException("信息不存在或已删除");
} }
if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytg.getValue())){
throw new ServiceException("不是已通过状态,不能填报");
if (!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytg.getValue())) {
throw new ServiceException("不是已通过状态,不能填报");
} }
//稽查轨迹 //稽查轨迹
Map<String, String> formData = new LinkedHashMap<>(); Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", studyFormPre.getRemark()); formData.put("备注", studyFormPre.getRemark());
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); 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());
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "创建记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPre.getRemark());
//生成填报表单 //生成填报表单
StudyFormFill studyFormFill=new StudyFormFill();
StudyFormFill studyFormFill = new StudyFormFill();
studyFormFill.setStudyId(studyFormPreOld.getStudyId()); studyFormFill.setStudyId(studyFormPreOld.getStudyId());
studyFormFill.setUserId(SecurityUtils.getUserId()); studyFormFill.setUserId(SecurityUtils.getUserId());
studyFormFill.setUserMc(SecurityUtils.getNickName()); studyFormFill.setUserMc(SecurityUtils.getNickName());
@ -292,23 +294,24 @@ public class StudyFormPreServiceImpl extends ServiceImpl
//稽查轨迹 //稽查轨迹
Map<String, String> formData1 = new LinkedHashMap<>(); Map<String, String> formData1 = new LinkedHashMap<>();
formData1.put("备注",studyFormFill.getRemark());
formData1.put("备注", studyFormFill.getRemark());
studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData1), SecurityUtils.getUserId(), SecurityUtils.getNickName()); studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData1), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息 //签名信息
studyFormFillQmxxService.saveQmxx(studyFormFill.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormFill.getRemark());
studyFormFillQmxxService.saveQmxx(studyFormFill.getId(), "创建记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormFill.getRemark());
return studyFormFill;
} }
/** /**
* 验证密码 * 验证密码
*
* @param user * @param user
* @param qmrmm * @param qmrmm
*/ */
public void checkPassword(SysUser user,String qmrmm){
if(StringUtils.isBlank(qmrmm)){
public void checkPassword(SysUser user, String qmrmm) {
if (StringUtils.isBlank(qmrmm)) {
throw new ServiceException("签名密码不能为空"); throw new ServiceException("签名密码不能为空");
} }
sysUserService.checkPassword(user,qmrmm,false);
sysUserService.checkPassword(user, qmrmm, false);
} }
} }

Loading…
Cancel
Save