jiangping
2024-01-02 64554509a1df6f7626151c7339954388bf7786f7
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/erp/ErpSyncServiceImpl.java
@@ -122,6 +122,9 @@
    @Override
    @Transactional
    public String syncCompany(OrgListRequest param){
        if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~");
        }
        //获取ERP组织信息(全量同步)
        List<ErpOrgListResponse>  list = ErpTool.getErpOrgList(ErpConstants.orgListUrl,param);
        if(list !=null && list.size()>0){
@@ -262,6 +265,9 @@
    @Override
    @Transactional
    public  String syncUsers(UserListRequest param){
        if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持人员同步操作~");
        }
        List<ErpUserListResponse>  list = ErpTool.getErpUserList(ErpConstants.userListUrl,param);
        if(list !=null && list.size()>0) {
            List<Member> addList = new ArrayList<>();
@@ -715,9 +721,10 @@
            if(Objects.isNull(param)
                    ||Objects.isNull(param.getId())
                    ||StringUtils.isBlank(param.getName())
                    ||StringUtils.isBlank(param.getLinkName())
                    ||StringUtils.isBlank(param.getLinkPhone())
                    ||Objects.isNull(param.getEditDate())
//                    ||StringUtils.isBlank(param.getLinkName())
//                    ||StringUtils.isBlank(param.getLinkPhone())
//                    ||Objects.isNull(param.getEditDate())
            ){
                throw new BusinessException(ResponseStatus.BAD_REQUEST);
            }