diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java index b890fdd..d7e12f0 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java @@ -78,12 +78,24 @@ public class SjController extends BaseController Sj sj = sjService.getSjByBh(form.getBh()); if(sj == null) { sj = new Sj(); - BeanUtils.copyProperties(form, sj); + sj.setBh(form.getBh()); + sj.setKc(form.getKc()); + sj.setKcdw(form.getKcdw()); + sj.setStudyId(form.getStudyId()); + sj.setStudyFormId(form.getStudyFormId()); + sj.setNd(form.getNd()); + sj.setNddw(form.getNddw()); sj.setZjzt(ZjztEnum.rk.getValue()); sj.setJyzt(JyztEnum.wjy.getValue()); sjService.save(sj); } else { - BeanUtils.copyProperties(form, sj); + sj.setBh(form.getBh()); + sj.setKc(form.getKc()); + sj.setKcdw(form.getKcdw()); + sj.setStudyId(form.getStudyId()); + sj.setStudyFormId(form.getStudyFormId()); + sj.setNd(form.getNd()); + sj.setNddw(form.getNddw()); sj.setZjzt(ZjztEnum.rk.getValue()); sj.setJyzt(JyztEnum.wjy.getValue()); sjService.updateById(sj); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java index 118ffdd..e4c7f60 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java @@ -49,6 +49,39 @@ public class SjBjForm { /** 签名备注 */ private String qmbz; + /** 试验id */ + private Long studyId; + + /** 试验表单id */ + private Long studyFormId; + + /** 所属部门/学科 */ + private Long deptId; + + public Long getStudyId() { + return studyId; + } + + public void setStudyId(Long studyId) { + this.studyId = studyId; + } + + public Long getStudyFormId() { + return studyFormId; + } + + public void setStudyFormId(Long studyFormId) { + this.studyFormId = studyFormId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + public Long getId() { return id; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java index 4cc814d..e3e9885 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java @@ -636,7 +636,6 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi @Override public void genResource(StudyFormFill studyFormFill, Template template) { - System.out.println(System.currentTimeMillis()); SysUser qmr = sysUserService.selectUserById(SecurityUtils.getUserId()); Long studyId = studyFormFill.getStudyId(); @@ -783,8 +782,6 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi sjJcgjService.saveBatch(jcgjList); sjTzService.saveBatch(tzList); studySjService.saveBatch(studyId, sjList); - System.out.println(System.currentTimeMillis()); - } @Override diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml index a207d44..496b185 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml @@ -5,14 +5,14 @@ UPDATE t_sj SET kc = #{kc} WHERE bh in - - (#{item}) + + #{item} UPDATE t_sj SET cctj = #{cctj}, ccwz = #{ccwz} WHERE bh in - - (#{item}) + + #{item}