|
@@ -137,7 +137,8 @@ public class ReportFormServiceImpl extends ServiceImpl<ReportFormMapper, ReportF
|
|
* @param reportForm 需要构建的实体
|
|
* @param reportForm 需要构建的实体
|
|
* @param parentId 父级id
|
|
* @param parentId 父级id
|
|
*/
|
|
*/
|
|
- private void setDataByParentId(Long hospId, ReportForm reportForm, Long parentId) {
|
|
|
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
|
|
|
|
+ public void setDataByParentId(Long hospId, ReportForm reportForm, Long parentId) {
|
|
if (parentId == 0L) {
|
|
if (parentId == 0L) {
|
|
reportForm.setCalcType(0);
|
|
reportForm.setCalcType(0);
|
|
reportForm.setCalcFormula("");
|
|
reportForm.setCalcFormula("");
|
|
@@ -157,7 +158,9 @@ public class ReportFormServiceImpl extends ServiceImpl<ReportFormMapper, ReportF
|
|
checkExist(byId,"选择的父报表层级不正确");
|
|
checkExist(byId,"选择的父报表层级不正确");
|
|
reportForm.setReportType(byId.getReportType());
|
|
reportForm.setReportType(byId.getReportType());
|
|
// 如果子节点 小计只能存在一个
|
|
// 如果子节点 小计只能存在一个
|
|
- this.isSubtotal(parentId, hospId);
|
|
|
|
|
|
+ if (reportForm.getCalcType() == 3) {
|
|
|
|
+ this.isSubtotal(parentId, hospId);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|