| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.BaseOrganization; |
| | | import com.smartor.domain.ServiceOutPath; |
| | | import com.smartor.domain.ServiceTask; |
| | | import com.smartor.service.IBaseOrganizationService; |
| | | import com.smartor.service.IServiceOutPathService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | |
| | | public class ServiceOutPathController extends BaseController { |
| | | @Autowired |
| | | private IServiceOutPathService serviceOutPathService; |
| | | |
| | | @Autowired |
| | | private IServiceTaskService serviceTaskService; |
| | | |
| | | @Autowired |
| | | private IBaseOrganizationService baseOrganizationService; |
| | |
| | | ServiceOutPath serviceOutPath1 = list.get(0); |
| | | serviceOutPath1.setId(null); |
| | | serviceOutPath1.setRadix(null); |
| | | if(StringUtils.isNotEmpty(serviceOutPath1.getOrgid())){ |
| | | BaseOrganization baseOrganization = new BaseOrganization(); |
| | | baseOrganization.setOrgid(serviceOutPath1.getOrgid()); |
| | | List<BaseOrganization> orgs = baseOrganizationService.selectBaseOrganizationList(baseOrganization); |
| | | if(CollectionUtils.isNotEmpty(orgs)){ |
| | | String orgname = orgs.get(0).getOrganizationName(); |
| | | serviceOutPath1.setOrgname(orgname); |
| | | //根据taskid获取机构信息 |
| | | if(StringUtils.isNotEmpty(serviceOutPath1.getParam1())){ |
| | | String taskId = serviceOutPath1.getParam1(); |
| | | if(StringUtils.isNotEmpty(taskId)){ |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(Long.valueOf(taskId)); |
| | | String orgId = serviceTask.getOrgid(); |
| | | if(StringUtils.isNotEmpty(orgId)){ |
| | | BaseOrganization baseOrganization = new BaseOrganization(); |
| | | baseOrganization.setOrgid(orgId); |
| | | List<BaseOrganization> orgs = baseOrganizationService.selectBaseOrganizationList(baseOrganization); |
| | | if(CollectionUtils.isNotEmpty(orgs)){ |
| | | String orgname = orgs.get(0).getOrganizationName(); |
| | | serviceOutPath1.setOrgid(orgId); |
| | | serviceOutPath1.setOrgname(orgname); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return success(serviceOutPath1); |