fix:报告模板评审预览增加fileId
This commit is contained in:
@@ -309,13 +309,14 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
public SdmResponse addSystemFormConfigure(FormConfigure configure) {
|
||||
SdmResponse response = SdmResponse.success();
|
||||
Long tenantId = ThreadLocalContext.getTenantId();
|
||||
Long userId = ThreadLocalContext.getUserId();
|
||||
if (CollectionUtils.isNotEmpty(formConfigureService.lambdaQuery().eq(SysFormConfigure::getFormName, configure.formName).eq(SysFormConfigure::getTenantId, tenantId).list())) {
|
||||
response = SdmResponse.failed("该表单配置已存在");
|
||||
} else {
|
||||
SysFormConfigure sysFormConfigure = new SysFormConfigure();
|
||||
BeanUtils.copyProperties(configure, sysFormConfigure);
|
||||
sysFormConfigure.setTenantId(tenantId);
|
||||
sysFormConfigure.setCreator(ThreadLocalContext.getUserId());
|
||||
sysFormConfigure.setCreator(userId);
|
||||
if (!formConfigureService.save(sysFormConfigure)) {
|
||||
response = SdmResponse.failed("添加表单配置失败");
|
||||
}
|
||||
@@ -329,9 +330,11 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
|
||||
tenantIdList.forEach(i -> {
|
||||
if (CollectionUtils.isEmpty(formConfigureService.lambdaQuery().eq(SysFormConfigure::getFormName, configure.formName)
|
||||
.eq(SysFormConfigure::getTenantId, i).list())) {
|
||||
sysFormConfigure.setId(null);
|
||||
sysFormConfigure.setTenantId(tenantId);
|
||||
formConfigureService.save(sysFormConfigure);
|
||||
SysFormConfigure formConfigure = new SysFormConfigure();
|
||||
BeanUtils.copyProperties(configure, formConfigure);
|
||||
formConfigure.setTenantId(i);
|
||||
formConfigure.setCreator(userId);
|
||||
formConfigureService.save(formConfigure);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user