陈昶聿
3 天以前 433e1e987f1c0bf9d7ee163200c67a8d69fe621b
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
@@ -7,6 +7,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.BaseOrganization;
@@ -18,8 +19,10 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -42,6 +45,12 @@
    @Autowired
    private IBaseOrganizationService baseOrganizationService;
    @Autowired
    private RSAPublicKeyExample rsaPublicKeyExample;
    @Value("${pri_key}")
    private String pri_key;
    /**
     * 查询主键列表
@@ -70,22 +79,15 @@
            ServiceOutPath serviceOutPath1 = list.get(0);
            serviceOutPath1.setId(null);
            serviceOutPath1.setRadix(null);
            //根据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);
                        }
                    }
            if(StringUtils.isNotEmpty(serviceOutPath1.getOrgid())){
                String orgId = serviceOutPath1.getOrgid();
                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);