|
|
@ -12,6 +12,7 @@ import com.keyware.shandan.dynacmicform.core.db.parser.TableInfoParser; |
|
|
|
import com.keyware.shandan.dynacmicform.core.db.pojo.Table; |
|
|
|
import com.keyware.shandan.dynacmicform.core.db.pojo.Table; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -37,6 +38,7 @@ public class DynamicFormService { |
|
|
|
* @return boolean |
|
|
|
* @return boolean |
|
|
|
* @throws Exception 异常 |
|
|
|
* @throws Exception 异常 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public boolean saveForm(FormInfoPo form) throws Exception { |
|
|
|
public boolean saveForm(FormInfoPo form) throws Exception { |
|
|
|
FormInfoPo oldForm = formInfoService.getById(form.getId()); |
|
|
|
FormInfoPo oldForm = formInfoService.getById(form.getId()); |
|
|
|
Table table = TableInfoParser.parseTable(form); |
|
|
|
Table table = TableInfoParser.parseTable(form); |
|
|
@ -70,6 +72,7 @@ public class DynamicFormService { |
|
|
|
* @param id |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public boolean delete(Integer id) { |
|
|
|
public boolean delete(Integer id) { |
|
|
|
FormInfoPo form = formInfoService.getById(id); |
|
|
|
FormInfoPo form = formInfoService.getById(id); |
|
|
|
boolean ok = formInfoService.removeById(id); |
|
|
|
boolean ok = formInfoService.removeById(id); |
|
|
|