Browse Source

fix:[资源库管理][试剂管理]配置

master
HanLong 2 months ago
parent
commit
481b84871f
4 changed files with 51 additions and 9 deletions
  1. +14
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java
  2. +33
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java
  3. +0
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java
  4. +4
    -4
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml

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

@ -78,12 +78,24 @@ public class SjController extends BaseController
Sj sj = sjService.getSjByBh(form.getBh()); Sj sj = sjService.getSjByBh(form.getBh());
if(sj == null) { if(sj == null) {
sj = new Sj(); 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.setZjzt(ZjztEnum.rk.getValue());
sj.setJyzt(JyztEnum.wjy.getValue()); sj.setJyzt(JyztEnum.wjy.getValue());
sjService.save(sj); sjService.save(sj);
} else { } 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.setZjzt(ZjztEnum.rk.getValue());
sj.setJyzt(JyztEnum.wjy.getValue()); sj.setJyzt(JyztEnum.wjy.getValue());
sjService.updateById(sj); sjService.updateById(sj);

+ 33
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjBjForm.java View File

@ -49,6 +49,39 @@ public class SjBjForm {
/** 签名备注 */ /** 签名备注 */
private String qmbz; 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() { public Long getId() {
return id; return id;
} }

+ 0
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java View File

@ -636,7 +636,6 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
@Override @Override
public void genResource(StudyFormFill studyFormFill, Template template) { public void genResource(StudyFormFill studyFormFill, Template template) {
System.out.println(System.currentTimeMillis());
SysUser qmr = sysUserService.selectUserById(SecurityUtils.getUserId()); SysUser qmr = sysUserService.selectUserById(SecurityUtils.getUserId());
Long studyId = studyFormFill.getStudyId(); Long studyId = studyFormFill.getStudyId();
@ -783,8 +782,6 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
sjJcgjService.saveBatch(jcgjList); sjJcgjService.saveBatch(jcgjList);
sjTzService.saveBatch(tzList); sjTzService.saveBatch(tzList);
studySjService.saveBatch(studyId, sjList); studySjService.saveBatch(studyId, sjList);
System.out.println(System.currentTimeMillis());
} }
@Override @Override

+ 4
- 4
hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml View File

@ -5,14 +5,14 @@
<mapper namespace="com.hxhq.business.mapper.SjMapper"> <mapper namespace="com.hxhq.business.mapper.SjMapper">
<update id="updateKcBatch"> <update id="updateKcBatch">
UPDATE t_sj SET kc = #{kc} WHERE bh in UPDATE t_sj SET kc = #{kc} WHERE bh in
<foreach item="item" index="index" collection="bhList" separator=",">
(#{item})
<foreach item="item" index="index" collection="bhList" open="(" separator="," close=")">
#{item}
</foreach> </foreach>
</update> </update>
<update id="updateCc"> <update id="updateCc">
UPDATE t_sj SET cctj = #{cctj}, ccwz = #{ccwz} WHERE bh in UPDATE t_sj SET cctj = #{cctj}, ccwz = #{ccwz} WHERE bh in
<foreach item="item" index="index" collection="bhList" separator=",">
(#{item})
<foreach item="item" index="index" collection="bhList" open="(" separator="," close=")">
#{item}
</foreach> </foreach>
</update> </update>
<update id="updateKc"> <update id="updateKc">

Loading…
Cancel
Save