|
|
@@ -64,23 +64,30 @@ public class ListWorkflowsListener extends AbstractServiceApiPlusListener {
|
|
|
|
|
|
List<WorkflowDto> workflowDtos = null;
|
|
|
|
|
|
- if (count > 0) {
|
|
|
+ if (count > 2) {
|
|
|
workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto);
|
|
|
ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, workflowDtos);
|
|
|
ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
|
|
|
context.setResponseEntity(responseEntity);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- //插入默认的工作信息 投诉流程
|
|
|
- WorkflowPo workflowPo = new WorkflowPo();
|
|
|
- workflowPo.setCommunityId(reqJson.getString("communityId"));
|
|
|
- workflowPo.setFlowId("-1");
|
|
|
- workflowPo.setFlowName("投诉建议流程");
|
|
|
- workflowPo.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT);
|
|
|
- workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL);
|
|
|
- workflowPo.setStoreId(reqJson.getString("storeId"));
|
|
|
- super.insert(context, workflowPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW);
|
|
|
+ WorkflowPo workflowPo = null;
|
|
|
+ workflowDto = new WorkflowDto();
|
|
|
+ workflowDto.setStoreId(reqJson.getString("storeId"));
|
|
|
+ workflowDto.setCommunityId(reqJson.getString("communityId"));
|
|
|
+ workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT);
|
|
|
+ count = workflowInnerServiceSMOImpl.queryWorkflowsCount(workflowDto);
|
|
|
+ if (count < 1) {
|
|
|
+ //插入默认的工作信息 投诉流程
|
|
|
+ workflowPo = new WorkflowPo();
|
|
|
+ workflowPo.setCommunityId(reqJson.getString("communityId"));
|
|
|
+ workflowPo.setFlowId("-1");
|
|
|
+ workflowPo.setFlowName("投诉建议流程");
|
|
|
+ workflowPo.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT);
|
|
|
+ workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL);
|
|
|
+ workflowPo.setStoreId(reqJson.getString("storeId"));
|
|
|
+ super.insert(context, workflowPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW);
|
|
|
+ }
|
|
|
|
|
|
workflowDto = new WorkflowDto();
|
|
|
workflowDto.setStoreId(reqJson.getString("storeId"));
|