| | |
| | | package com.java110.store.smo.impl; |
| | | |
| | | |
| | | import com.java110.dto.itemRelease.ItemReleaseTypeDto; |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | | import com.java110.store.dao.IResourceAuditFlowV1ServiceDao; |
| | | import com.java110.intf.store.IResourceAuditFlowV1InnerServiceSMO; |
| | | import com.java110.dto.resourceAuditFlow.ResourceAuditFlowDto; |
| | | import com.java110.po.resourceAuditFlow.ResourceAuditFlowPo; |
| | | import com.java110.dto.resource.ResourceAuditFlowDto; |
| | | import com.java110.po.resource.ResourceAuditFlowPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Autowired |
| | | private IResourceAuditFlowV1ServiceDao resourceAuditFlowV1ServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IOaWorkflowInnerServiceSMO oaWorkflowInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public int saveResourceAuditFlow(@RequestBody ResourceAuditFlowPo resourceAuditFlowPo) { |
| | |
| | | } |
| | | |
| | | List<ResourceAuditFlowDto> resourceAuditFlows = BeanConvertUtil.covertBeanList(resourceAuditFlowV1ServiceDaoImpl.getResourceAuditFlowInfo(BeanConvertUtil.beanCovertMap(resourceAuditFlowDto)), ResourceAuditFlowDto.class); |
| | | |
| | | refreshWorkflow(resourceAuditFlows); |
| | | return resourceAuditFlows; |
| | | } |
| | | |
| | |
| | | public int queryResourceAuditFlowsCount(@RequestBody ResourceAuditFlowDto resourceAuditFlowDto) { |
| | | return resourceAuditFlowV1ServiceDaoImpl.queryResourceAuditFlowsCount(BeanConvertUtil.beanCovertMap(resourceAuditFlowDto)); } |
| | | |
| | | |
| | | /** |
| | | * 查询工作流信息 |
| | | * |
| | | * @param resourceAuditFlows |
| | | */ |
| | | private void refreshWorkflow(List<ResourceAuditFlowDto> resourceAuditFlows) { |
| | | if(resourceAuditFlows == null || resourceAuditFlows.size()< 1){ |
| | | return ; |
| | | } |
| | | List<String> flowIds = new ArrayList<>(); |
| | | for (ResourceAuditFlowDto resourceAuditFlowDto : resourceAuditFlows) { |
| | | flowIds.add(resourceAuditFlowDto.getFlowId()); |
| | | } |
| | | |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setFlowIds(flowIds.toArray(new String[flowIds.size()])); |
| | | List<OaWorkflowDto> oaWorkflowDtos = oaWorkflowInnerServiceSMOImpl.queryOaWorkflows(oaWorkflowDto); |
| | | for (ResourceAuditFlowDto resourceAuditFlowDto : resourceAuditFlows) { |
| | | for (OaWorkflowDto tmpOaWorkflowDto : oaWorkflowDtos) { |
| | | if (resourceAuditFlowDto.getFlowId().equals(tmpOaWorkflowDto.getFlowId())) { |
| | | BeanConvertUtil.covertBean(tmpOaWorkflowDto, resourceAuditFlowDto); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |