设备退运工作流程完成

This commit is contained in:
2024-05-14 15:20:47 +08:00
parent fc2f2d767a
commit d5f57a65bd
32 changed files with 506 additions and 47 deletions

View File

@@ -127,7 +127,7 @@ public class BpmModelController extends BaseController {
@PostMapping("/update")
@ApiOperation("修改模型")
@ApiImplicitParam(name = "updateParam", value = "流程分类数据", required = true)
public HttpResult<Object> update( @Validated @RequestBody BpmModelParam.BpmModelUpdateParam updateParam) {
public HttpResult<Object> update(@Validated @RequestBody BpmModelParam.BpmModelUpdateParam updateParam) {
String methodDescribe = getMethodDescribe("update");
modelService.updateModel(updateParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
@@ -153,7 +153,8 @@ public class BpmModelController extends BaseController {
modelService.deployModel(id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
//
//
// @PutMapping("/update-state")
// @Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态")
// @PreAuthorize("@ss.hasPermission('bpm:model:update')")
@@ -162,13 +163,13 @@ public class BpmModelController extends BaseController {
// return success(true);
// }
//
// @DeleteMapping("/delete")
// @Operation(summary = "删除模型")
// @Parameter(name = "id", description = "编号", required = true, example = "1024")
// @PreAuthorize("@ss.hasPermission('bpm:model:delete')")
// public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) {
// modelService.deleteModel(id);
// return success(true);
// }
@GetMapping("/delete")
@Operation(summary = "删除模型")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public HttpResult<Boolean> deleteModel(String id) {
String methodDescribe = getMethodDescribe("deleteModel");
modelService.deleteModel(id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
}
}

View File

@@ -0,0 +1,28 @@
package com.njcn.bpm.listener.business;
import com.njcn.bpm.listener.BpmProcessInstanceStatusEvent;
import com.njcn.bpm.listener.BpmProcessInstanceStatusEventListener;
import com.njcn.supervision.api.QuitRunningDeviceFeignClient;
import com.njcn.supervision.api.UserReportFeignClient;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
public class BpmQuitRunningDeviceStatusListener extends BpmProcessInstanceStatusEventListener {
@Resource
private QuitRunningDeviceFeignClient quitRunningDeviceFeignClient;
@Override
protected String getProcessDefinitionKey() {
return "quit_running_device";
}
@Override
protected void onEvent(BpmProcessInstanceStatusEvent event) {
quitRunningDeviceFeignClient.updateDeviceStatus(event.getBusinessKey(), event.getStatus());
}
}

View File

@@ -108,10 +108,9 @@ public interface BpmModelConvert {
// model.setMetaInfo(buildMetaInfoStr(null,
// null, bean.getDescription(),
// null, null, null, null));
//类型暂时写死为表单 todo...
model.setMetaInfo(buildMetaInfoStr(buildMetaInfo(model),
bean.getIcon(), bean.getDescription(),
BpmModelFormTypeEnum.NORMAL.getType(), bean.getFormId(), bean.getFormCustomCreatePath(), bean.getFormCustomViewPath()));
bean.getFormType(), bean.getFormId(), bean.getFormCustomCreatePath(), bean.getFormCustomViewPath()));
}
default void copyToUpdateModel(Model model, BpmModelParam.BpmModelUpdateParam bean) {