jiangping
2024-08-13 6765787baa5e0b771d71f865c4deb776367410c4
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java
@@ -771,7 +771,9 @@
                company.setParentId(Objects.isNull(parentCompany)?null:parentCompany.getId());
                company.setErpParentId(param.getParentId());
                company.setFsStatus(Constants.ZERO);
                company.setStatus(Constants.ZERO);
                company.setType(Constants.ONE);
                company.setIsdeleted(Constants.ZERO);
                company.setLinkName(param.getLinkName());
                company.setLinkPhone(param.getLinkPhone());
                companyMapper.insert(company);
@@ -1116,7 +1118,6 @@
                throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,请选择有效的访客门禁组!");
            }
        }
    }
    @Override
@@ -1159,25 +1160,30 @@
        }catch (BusinessException e){
            throw e;
        }finally {
            saveInterfaceLog(param,"/visitBiz/resource/approveApply",null,Constants.ZERO);
//            saveInterfaceLog(param,"/visitBiz/resource/approveApply",null,Constants.ZERO);
        }
    }
    @Override
    public void saveInterfaceLog(Object param, String path, String result, Integer type) {
        InterfaceLog interfaceLog=new InterfaceLog();
        interfaceLog.setType(type);
        interfaceLog.setCreateDate(new Date());
        interfaceLog.setIsdeleted(Constants.ZERO);
        if(param!=null){
            interfaceLog.setRequest(JSONObject.toJSONString(param));
        try {
            InterfaceLog interfaceLog=new InterfaceLog();
            interfaceLog.setType(type);
            interfaceLog.setCreateDate(new Date());
            interfaceLog.setIsdeleted(Constants.ZERO);
            if(param!=null){
                interfaceLog.setRequest(JSONObject.toJSONString(param));
            }
            interfaceLog.setPlat(Constants.ONE);
            interfaceLog.setRepose(result);
            interfaceLog.setName(path);
            interfaceLog.setUrl(path);
            interfaceLogService.create(interfaceLog);
        }catch (Exception e){
e.printStackTrace();
        }
        interfaceLog.setPlat(Constants.ONE);
        interfaceLog.setRepose(result);
        interfaceLog.setName(path);
        interfaceLog.setUrl(path);
        interfaceLogService.create(interfaceLog);
    }
}