|
|
|
@ -83,6 +83,24 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
if (StringUtils.isNoneBlank(form.getBdbh())) { |
|
|
|
queryWrapper.and(p -> p.like("t.`bdbh`", form.getBdbh())); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getSywzmc())) { |
|
|
|
queryWrapper.and(p -> p.like("t.`sywzmc`", form.getSywzmc())); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getXynd())) { |
|
|
|
queryWrapper.and(p -> p.like("t.`xynd`", form.getXynd())); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getSybhbm())) { |
|
|
|
queryWrapper.and(p -> p.like("ts.sn", form.getSybhbm()).or().like("sd.dept_name", form.getSybhbm())); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getXysjks())) { |
|
|
|
queryWrapper.apply("t.xysj>={0}", form.getXysjks()); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getXysjjs())) { |
|
|
|
queryWrapper.apply("t.xysj<{0}", form.getXysjjs()); |
|
|
|
} |
|
|
|
if (form.getBdzt() != null && form.getBdzt().intValue() > 0) { |
|
|
|
queryWrapper.eq("t.bdzt", form.getBdzt()); |
|
|
|
} |
|
|
|
if (StringUtils.isNoneBlank(form.getBdmc())) { |
|
|
|
queryWrapper.and(p -> p.like("t.`bdmc`", form.getBdmc())); |
|
|
|
} |
|
|
|
@ -289,6 +307,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
throw new ServiceException("只能操作自己的表单"); |
|
|
|
} |
|
|
|
studyFormApplyOld.setBdmc(studyFormApply.getBdmc()); |
|
|
|
//更新特殊字段 |
|
|
|
if(StringUtils.isNoneBlank(studyFormApply.getBdnr())){ |
|
|
|
JSONObject jsonObject=JSONObject.parseObject(studyFormApply.getBdnr()); |
|
|
|
studyFormApplyOld.setSdId(jsonObject.getLong("sdId")); |
|
|
|
studyFormApplyOld.setSyId(jsonObject.getLong("syId")); |
|
|
|
studyFormApplyOld.setBmId(jsonObject.getLong("bmId")); |
|
|
|
studyFormApplyOld.setSywzmc(jsonObject.getString("sywzmc")); |
|
|
|
studyFormApplyOld.setXynd(jsonObject.getString("xynd")); |
|
|
|
studyFormApplyOld.setXysj(jsonObject.getString("xysj")); |
|
|
|
} |
|
|
|
studyFormApplyOld.setTemplateId(studyFormApply.getTemplateId()); |
|
|
|
studyFormApplyOld.setBdnr(studyFormApply.getBdnr()); |
|
|
|
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
@ -304,7 +332,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
} |
|
|
|
result = studyFormApplyOld; |
|
|
|
} else { |
|
|
|
|
|
|
|
//更新特殊字段 |
|
|
|
if(StringUtils.isNoneBlank(studyFormApply.getBdnr())){ |
|
|
|
JSONObject jsonObject=JSONObject.parseObject(studyFormApply.getBdnr()); |
|
|
|
studyFormApply.setSdId(jsonObject.getLong("sdId")); |
|
|
|
studyFormApply.setSyId(jsonObject.getLong("syId")); |
|
|
|
studyFormApply.setBmId(jsonObject.getLong("bmId")); |
|
|
|
studyFormApply.setSywzmc(jsonObject.getString("sywzmc")); |
|
|
|
studyFormApply.setXynd(jsonObject.getString("xynd")); |
|
|
|
studyFormApply.setXysj(jsonObject.getString("xysj")); |
|
|
|
} |
|
|
|
studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
studyFormApply.setUserId(qmr.getUserId()); |
|
|
|
studyFormApply.setBdbh(getSn(studyFormApply)); |
|
|
|
@ -342,11 +379,30 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
studyFormApplyOld.setBdmc(studyFormApply.getBdmc()); |
|
|
|
studyFormApplyOld.setTemplateId(studyFormApply.getTemplateId()); |
|
|
|
studyFormApplyOld.setBdnr(studyFormApply.getBdnr()); |
|
|
|
//更新特殊字段 |
|
|
|
if(StringUtils.isNoneBlank(studyFormApply.getBdnr())){ |
|
|
|
JSONObject jsonObject=JSONObject.parseObject(studyFormApply.getBdnr()); |
|
|
|
studyFormApplyOld.setSdId(jsonObject.getLong("sdId")); |
|
|
|
studyFormApplyOld.setSyId(jsonObject.getLong("syId")); |
|
|
|
studyFormApplyOld.setBmId(jsonObject.getLong("bmId")); |
|
|
|
studyFormApplyOld.setSywzmc(jsonObject.getString("sywzmc")); |
|
|
|
studyFormApplyOld.setXynd(jsonObject.getString("xynd")); |
|
|
|
studyFormApplyOld.setXysj(jsonObject.getString("xysj")); |
|
|
|
} |
|
|
|
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
this.updateById(studyFormApplyOld); |
|
|
|
result = studyFormApplyOld; |
|
|
|
} else { |
|
|
|
|
|
|
|
//更新特殊字段 |
|
|
|
if(StringUtils.isNoneBlank(studyFormApply.getBdnr())){ |
|
|
|
JSONObject jsonObject=JSONObject.parseObject(studyFormApply.getBdnr()); |
|
|
|
studyFormApply.setSdId(jsonObject.getLong("sdId")); |
|
|
|
studyFormApply.setSyId(jsonObject.getLong("syId")); |
|
|
|
studyFormApply.setBmId(jsonObject.getLong("bmId")); |
|
|
|
studyFormApply.setSywzmc(jsonObject.getString("sywzmc")); |
|
|
|
studyFormApply.setXynd(jsonObject.getString("xynd")); |
|
|
|
studyFormApply.setXysj(jsonObject.getString("xysj")); |
|
|
|
} |
|
|
|
studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); |
|
|
|
studyFormApply.setUserId(qmr.getUserId()); |
|
|
|
studyFormApply.setBdbh(getSn(studyFormApply)); |
|
|
|
@ -375,6 +431,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
studyFormApply.setUserMc(SecurityUtils.getNickName()); |
|
|
|
studyFormApply.setBdbh(getSn(studyFormApply)); |
|
|
|
} |
|
|
|
//更新特殊字段 |
|
|
|
if(StringUtils.isNoneBlank(studyFormApply.getBdnr())){ |
|
|
|
JSONObject jsonObject=JSONObject.parseObject(studyFormApply.getBdnr()); |
|
|
|
studyFormApply.setSdId(jsonObject.getLong("sdId")); |
|
|
|
studyFormApply.setSyId(jsonObject.getLong("syId")); |
|
|
|
studyFormApply.setBmId(jsonObject.getLong("bmId")); |
|
|
|
studyFormApply.setSywzmc(jsonObject.getString("sywzmc")); |
|
|
|
studyFormApply.setXynd(jsonObject.getString("xynd")); |
|
|
|
studyFormApply.setXysj(jsonObject.getString("xysj")); |
|
|
|
} |
|
|
|
studyFormApply.setBdzt(StudyFormApplyBdztEnum.ytj.getValue()); |
|
|
|
studyFormApply.setTjsj(new Date()); |
|
|
|
this.saveOrUpdate(studyFormApply); |
|
|
|
@ -590,7 +656,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl |
|
|
|
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")); |
|
|
|
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")); |
|
|
|
} |
|
|
|
|