ludc
2023-07-17 c6f3f7b0d977c88b93bec7106c0fde364486cd5f
Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
已修改1个文件
51 ■■■■ 文件已修改
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -46,6 +46,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
@@ -64,7 +65,8 @@
@Slf4j
@VciWebservice(path = "/universalInterface")
public class UniversalInterfaceImpl<IDockingLogeServiceing> implements UniversalInterfaceI {
    @Value("${code.checkConfig:true}")
    public boolean CODE_CHECKCONFIG;
    @Autowired(required = false)
    private AttributeMapConfig attributeMapConfig;
    /**
@@ -334,14 +336,12 @@
            ClassfysVO classfysVO = interParameterVO.getData().getClassifys();
            systemId = interParameterVO.getData().getSystemId();
            //校验是否配置
            boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue());
            if(!checkPass){
                errorid="101";
                throw new Throwable("系统标识为【"+systemId+"】,"+sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!");
            boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue());
            if (!checkPass) {
                errorid = "101";
                throw new Throwable("系统标识为【" + systemId + "】," + sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText() + "接口配置已停用或者未配置,请联系编码管理员!");
            }
            UserVO userVo = interParameterVO.getData().getUser();
            List<ClassfyVO> classVOList = classfysVO.getClassify();
            InterParameterVO finalInterParameterVO = interParameterVO;
@@ -493,12 +493,11 @@
            String libId= libraryVO.getId();
            List<String> classifyIdList=  libraryVO.getClassifyid();
            List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>();
            //校验是否配置
            boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getValue());
            if(!checkPass){
                errorid="101";
                throw new Throwable("系统标识为【"+systemId+"】,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getText()+"接口配置已停用或者未配置,请联系编码管理员!");
                //校验是否配置
            boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getValue());
            if (!checkPass) {
                errorid = "101";
                throw new Throwable("系统标识为【" + systemId + "】," + sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getText() + "接口配置已停用或者未配置,请联系编码管理员!");
            }
            //这是账号信息
@@ -662,12 +661,14 @@
                msg = "接口参数:library 为null";
                throw new Throwable(msg);
            }
            //校验是否配置
            boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue());
            if(!checkPass){
                errorid="101";
                throw new Throwable("系统标识为【"+systemId+"】,"+sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText()+"接口配置已停用或者未配置,请联系编码管理员!");
            boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue());
            if (!checkPass) {
                errorid = "101";
                throw new Throwable("系统标识为【" + systemId + "】," + sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText() + "接口配置已停用或者未配置,请联系编码管理员!");
            }
            //先简称是否有关联模板,有模板要先删除
            List<CodeClassify> libIdDos =classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getId,library));
@@ -853,12 +854,13 @@
            List<String> classifyIdList=  libraryVO.getClassifyid();
            List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>();
            /*//校验是否配置
            boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getValue());
            if(!checkPass){
                errorid="101";
                throw new Throwable("系统标识为【"+systemId+"】,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getText()+"接口配置已停用或者未配置,请联系编码管理员!");
            }*/
            //校验是否配置
            boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getValue());
            if (!checkPass) {
                errorid = "101";
                throw new Throwable("系统标识为【" + systemId + "】," + sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getText() + "接口配置已停用或者未配置,请联系编码管理员!");
            }
            //这是账号信息
            //这是账号信息
            if(userVo!=null) {
@@ -1394,6 +1396,9 @@
     * @return
     */
    private boolean checkIspass(String systemId,String type,String operationType){
        if(!CODE_CHECKCONFIG) {
            return true;
        }
        //根据类型去查询需要集成的分类或者数据
        LambdaQueryWrapper<DockingSystemConfig> queryWrapper = Wrappers.<DockingSystemConfig>lambdaQuery();
        queryWrapper.eq(DockingSystemConfig::getUsedFlag, MdmDuckingConstant.SEND_FLAG_TRUE);