|
@@ -177,8 +177,7 @@ public class CommonBtnController extends BaseController {
|
|
|
} else if (commonEntity.getBasicMap().get("visible").toString().equals("false")) {
|
|
|
if (dragTableBtn.getBtnFormType().equals("dragForm")) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- String sqlKey = commonEntity.getBasicMap().get("sqlKey").toString();
|
|
|
- DragForm dragForm = dragFormService.selectDragFormBySqlKey(sqlKey);
|
|
|
+ DragForm dragForm = dragFormService.selectDragFormByformKey(dragTableBtn.getBtnFormKey());
|
|
|
map.put("template", dragForm);
|
|
|
// 返回结果
|
|
|
map.put("result", commonService.getInfoById(commonEntity));
|
|
@@ -324,21 +323,15 @@ public class CommonBtnController extends BaseController {
|
|
|
public AjaxResult initiatedBtn(CommonEntity commonEntity, DragTableBtn dragTableBtn) throws JsonProcessingException {
|
|
|
//是否开启弹窗
|
|
|
if (commonEntity.getBasicMap().get("visible").toString().equals("true")) {
|
|
|
- // 根据流程的key判断当前按钮是否执行触发流程
|
|
|
- if (!dragTableBtn.getBtnProcessKey().isEmpty()) {
|
|
|
- // 表示对当前操作是及时选择的流程模板
|
|
|
- System.out.println(dragTableBtn.getBtnProcessKey());
|
|
|
- if (dragTableBtn.getBtnProcessKey() != null && !dragTableBtn.getBtnProcessKey().isEmpty()) {
|
|
|
- if (commonEntity.getCommMap().get("process_key") == null) {
|
|
|
- commonEntity.getCommMap().put("process_key", dragTableBtn.getBtnProcessKey());
|
|
|
- }
|
|
|
- CommonEntity common1 = JSON.parseObject(JSON.toJSONString(commonEntity), CommonEntity.class);
|
|
|
- // 调用发起流程接口
|
|
|
- ipreExecutionToolClass.ReadyToExecute(common1);
|
|
|
- } else {
|
|
|
- // 执行当前按钮绑定的流程-》暂无直接执行流程
|
|
|
- }
|
|
|
+
|
|
|
+ // 判断当前按钮是否绑定流程
|
|
|
+ if (!dragTableBtn.getBtnProcessKey().equals("unknown")) {
|
|
|
+ commonEntity.getCommMap().put("process_key", dragTableBtn.getBtnProcessKey());
|
|
|
}
|
|
|
+ CommonEntity common1 = JSON.parseObject(JSON.toJSONString(commonEntity), CommonEntity.class);
|
|
|
+ // 调用发起流程接口
|
|
|
+ ipreExecutionToolClass.ReadyToExecute(common1);
|
|
|
+
|
|
|
// 如果当前发起流程表单使用的是表单组
|
|
|
if (dragTableBtn.getBtnFormType() != null && dragTableBtn.getBtnFormType().equals("dragFormGroup")) {
|
|
|
BpmRunNodeFormDateVo bpmRunNodeFormDateVo = JSON.parseObject(JSON.toJSONString(commonEntity.getBasicMap().get("BpmRunNodeFormDateVo")), BpmRunNodeFormDateVo.class);
|